From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 183B7160 for ; Sat, 30 Dec 2017 21:51:22 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 79FBB21BE5; Sat, 30 Dec 2017 15:51:22 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sat, 30 Dec 2017 15:51:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=QDJEmoWT9Z6KWIZVmNjWwxSWJZ YgBGwpfloBXIDtkZ0=; b=cR4emgkMR3jvusc0WA43yc4/IsnR6RWtd4/EYpGs2C N6zCEkTdtnBxhwUQrBW/31oNqGmqJNBkZq4QIXbyvXLjf5vRbgX0e6COQjXbVCIt /M0eqA5FUmC9+oZeVJKhSsEwYwmSjyzqaE6pW6psTAUEJjwBcIEm/UUxRYsS2Pln 4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=QDJEmo WT9Z6KWIZVmNjWwxSWJZYgBGwpfloBXIDtkZ0=; b=qd2W9445lUpQ2+8vN3kNVV /Y7+6/Sd7Q3JaGElhMB+KC5xOAoCDtm2eW0KuLaBaBHKiFR8pkvC0Osqe79jcR5s 2GF/634ipB1C9lYSsRAcUYzHg8a85CEU95zi1mYYINzyhCy0RYeZuNON74biLK2B pENXtEESYmJ0nAx10b1NdKRcEDVoC2UIlEF1xKuQuo9ZnYuIZ1N8aGsUwjnPjNqE F3HTcaBE9PSsf10/gMSv+xY/CbZ0UChLrFnC+bP1Rr6I7LKp2QfYJDHPKU01ZOEP KIWGTCw+nhHy28H3dqTz/B6Xy93wdQ+oBMiEuGP8YNg9e8CGNEh7XNhwq0tICHdA == X-ME-Sender: Received: from xps.localnet (11.18.136.77.rev.sfr.net [77.136.18.11]) by mail.messagingengine.com (Postfix) with ESMTPA id 1475A24714; Sat, 30 Dec 2017 15:51:22 -0500 (EST) From: Thomas Monjalon To: Matan Azrad Cc: dev@dpdk.org Date: Sat, 30 Dec 2017 21:51:06 +0100 Message-ID: <5248035.SzZHBmRRCd@xps> In-Reply-To: References: <1512028170-18637-1-git-send-email-matan@mellanox.com> <6214136.ixGVTiWP3P@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] ethdev: allow all ports event registration X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2017 20:51:23 -0000 30/12/2017 20:04, Matan Azrad: > From: Thomas Monjalon, December 29, 2017 > > 04/12/2017 16:43, Matan Azrad: > > > @@ -2827,37 +2837,59 @@ > > > + uint32_t next_port; > > > + uint32_t last_port; > > > > A port id should be uint16_t. > > > Yes, I know but please note that we use next_port variable in the while statement and it can be rolled in case the max value of port id is the max value of uint16_t type. > This is the reason I defined it as uint32_t type. OK, so I suggest 2 possible fixes: - either keep uint32_t with a comment in the code. - or use a for loop What do you prefer?