From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id 9516168AA for ; Wed, 17 Dec 2014 01:43:10 +0100 (CET) Received: by mail-wi0-f181.google.com with SMTP id r20so14372276wiv.2 for ; Tue, 16 Dec 2014 16:43:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=66gnYCy2T//jo9MXrreIuFZ5jGN6Ky53N+d/q1CtMoY=; b=S78nfaCNqWDJm+PRgbSSmkjwS/mlA5ojAKQfJdaw/pmy41QchlsKuKslInffvEk3pO ZJ23u573I1h63aCVvwTHGWJACckF4p1UFGlg3nT68KKQWHclLaK3xnRo+aT1OMCtctjQ EDqh2KUKJofEJNXelr6ptPJ2euTs0KyoynpLJX/0fyxG8UsSAz3q94Stdr0fqol1W9Gf rgkk+EnpBDRzoDzFFhVYL7Swi6Pi3XK4VA27OyaUXh+vErZ9sUaLKVutaXB9Vno/j/Do GaE49OlGzuog4V4lrsjw7nPIACGuup8qSsyhXcL+6KgHGbM4doOqAFjFoEdgYvVOPTDx Xq8g== X-Gm-Message-State: ALoCoQnDqH46WxuD+H/rqDUbD5zfwDq2B/2h2bSSAMehMg0pD68R1cTvGBg3ABkEchNf+EvXElyS X-Received: by 10.180.91.136 with SMTP id ce8mr9287743wib.29.1418776990471; Tue, 16 Dec 2014 16:43:10 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id n8sm3049932wjx.0.2014.12.16.16.43.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Dec 2014 16:43:09 -0800 (PST) From: Thomas Monjalon To: Bruce Richardson Date: Wed, 17 Dec 2014 01:09:29 +0100 Message-ID: <2024529.1MsobXgOel@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.17.4-1-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: <20141216214343.GG13806@hmsreliant.think-freely.org> References: <20141216140926.GD13806@hmsreliant.think-freely.org> <1418740784-12155-1-git-send-email-bruce.richardson@intel.com> <20141216214343.GG13806@hmsreliant.think-freely.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] testpmd: limit port mask bits to RTE_MAX_ETHPORTS X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2014 00:43:10 -0000 2014-12-16 16:43, Neil Horman: > On Tue, Dec 16, 2014 at 02:39:44PM +0000, Bruce Richardson wrote: > > The port mask parsing in testpmd allowed up to 64 bits to be processed, > > even if RTE_MAX_ETHPORTS is set to a max of 32. Fix this by only > > processing up to min(RTE_MAX_ETHPORTS,64) bits of the mask. > > > > Signed-off-by: Bruce Richardson > > --- > > V2: changed to use RTE_MIN in comparison, instead of double "<". > > I was thinking of assigning a new temp variable to the return of RTE_MIN so as > to avoid the comparison within the for loop, but since both arguments are > constant, I'm sure the compiler will avoid multiple comparisons. > > Acked-by: Neil Horman Applied Thanks -- Thomas