From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0075.outbound.protection.outlook.com [104.47.0.75]) by dpdk.org (Postfix) with ESMTP id 395FD160 for ; Sat, 30 Dec 2017 22:14:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ljWAU50vYjAFTrUeRNMM15JefsE0c4WZFRBiy2OTmNo=; b=xH4n6u/PvvbTLp3nXpW5OQQVvVq84RgAhalTta7C7t8fW5IhXyQv1u2fsCYCP6WpWVN0KkCzF0p+W9YgY0G2QMfNaqFh+wk1zQ4P2ZX0QVSuSADG53xwa1vgdlzfu/FCiBtKP0+5vicnXn/O3E20tJx5UCFdnijHD8KZTQDnQAI= Received: from AM6PR0502MB3797.eurprd05.prod.outlook.com (52.133.21.26) by AM6PR0502MB3800.eurprd05.prod.outlook.com (52.133.21.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.366.8; Sat, 30 Dec 2017 21:14:43 +0000 Received: from AM6PR0502MB3797.eurprd05.prod.outlook.com ([fe80::b4b4:7de8:cf70:aa3a]) by AM6PR0502MB3797.eurprd05.prod.outlook.com ([fe80::b4b4:7de8:cf70:aa3a%13]) with mapi id 15.20.0366.007; Sat, 30 Dec 2017 21:14:43 +0000 From: Matan Azrad To: Thomas Monjalon CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] ethdev: allow all ports event registration Thread-Index: AQHTbRa/J/fPsp/f2UCVtHAOhwSW/qNaWsoAgAIGylCAACQRAIAABa4w Date: Sat, 30 Dec 2017 21:14:43 +0000 Message-ID: References: <1512028170-18637-1-git-send-email-matan@mellanox.com> <6214136.ixGVTiWP3P@xps> <5248035.SzZHBmRRCd@xps> In-Reply-To: <5248035.SzZHBmRRCd@xps> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [85.64.136.190] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR0502MB3800; 6:2sxnJEoLlKJNnmpWqJYkmPSHLuL0lRfyI6Jx2uid71wxCH+Mv664FzU7C054XGqYne62TOF6iiCSCYeOCt/cDwwxeEGda1qZUWc7ki7UfUi8NByIL8eaC5Hj8Ls6ElmZF096FQn+UFxFqiMRY8CovJ9IckqwUSAwj9mXG3w9Rpo2K/g+aqZRriutTiBP5nC3RWMFmpU5ZqwhYPH+/FLMwGyVgA8CbKP5/iVjxfrsLLN+6PkdyHGPgOsAcT0yZxUxCgflIq4n3GA/li4v7QytGoa/JXkxqPyStkg4og3Vq/X8p0KyKjOOlMLUdAbPSqcibJrutaEFhmKFr7D9ZZxK+bvQFyGo423CXENLmiJ+D2yGqvvLRWxvZFzhKxjpTy4v; 5:BhlrS+DLvYVUQz2zsg15Q9XBoUxBA/i5w0DN48/g7q1adfTAN0yOkwrpSoRze5DnVs1dl9qjXPMPx0vh/aEmVtDpwe76VUa3goRRHfTGXV+HbkkTckYIwTQnYFWhmSl88U5yUEGDF43dtTCq3EiQk2G1l9zRu2G1FSoeMrurhDM=; 24:JRwx3u1QkvJGHoajDHM8ywMK77NYQyWQPbFXx0C3ieXStWPRyAdekx0ul1VVYATObv37hWKdtxoLQYe+4X+tQr5TkEHNvEcZRam/JSJjXDQ=; 7:0OyLJCAeUK6VaLw/wWW7puEu9Q8NJtWa5r2f++yr/9FZmTTPPk3VPahVvrdzMYr3ef+eDmr1GCHwDVDpObgMFtXMsnAm1X++lPSI4PtP6014S/zvEZXRqSH0PRUKtTEjN8B5CsmVn4cMoZqi3eojP6YLITPqAD+QQOjrYVJyZw8z6iZi+pfTagTg8zdZ3WsLI+B/4uT1bpjxhSTeVukYlpxjZAssoFhkp8eMabgsPPCiEM/wrQ5Ggwyg76FQ1CX9 x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 4ec117a3-3837-4953-f8d0-08d54fca58ce x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603307)(7153060); SRVR:AM6PR0502MB3800; x-ms-traffictypediagnostic: AM6PR0502MB3800: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231023)(944501075)(3002001)(10201501046)(6055026)(6041268)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:AM6PR0502MB3800; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM6PR0502MB3800; x-forefront-prvs: 05373A0663 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(376002)(39380400002)(39860400002)(346002)(199004)(189003)(6506007)(33656002)(106356001)(7736002)(9686003)(6916009)(68736007)(2950100002)(74316002)(81156014)(81166006)(105586002)(8676002)(102836004)(5660300001)(97736004)(3846002)(66066001)(86362001)(6246003)(6116002)(76176011)(3280700002)(305945005)(14454004)(8936002)(6436002)(99286004)(2900100001)(3660700001)(7696005)(53936002)(478600001)(25786009)(316002)(55016002)(93886005)(4326008)(5250100002)(2906002)(229853002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0502MB3800; H:AM6PR0502MB3797.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 6NB8TW//PyOKSLVXwqBif48GhP3eFNp5B+YWhJ9GAThdMsp8GLxE7VLGVlWExRBK0Hh8f5IDcyH9iibL1TEmAA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ec117a3-3837-4953-f8d0-08d54fca58ce X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Dec 2017 21:14:43.3519 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0502MB3800 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 21:14:45 -0000 From: Thomas Monjalon, December 30, 2017 10:51 PM > 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 m= ax > value of uint16_t type. > > This is the reason I defined it as uint32_t type. >=20 > OK, so I suggest 2 possible fixes: > - either keep uint32_t with a comment in the code. > - or use a for loop >=20 > What do you prefer? The comment :)