From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] ethdev: allow all ports event registration Date: Sat, 30 Dec 2017 21:51:06 +0100 Message-ID: <5248035.SzZHBmRRCd@xps> References: <1512028170-18637-1-git-send-email-matan@mellanox.com> <6214136.ixGVTiWP3P@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Matan Azrad 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) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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?