From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH v2 5/7] net/mlx5: add port representor awareness Date: Wed, 27 Jun 2018 15:32:03 +0200 Message-ID: <20180627133202.GT4025@6wind.com> References: <20180525161814.13873-1-adrien.mazarguil@6wind.com> <20180614083047.10812-1-adrien.mazarguil@6wind.com> <20180614083047.10812-6-adrien.mazarguil@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Shahaf Shuler , "dev@dpdk.org" To: "Xueming(Steven) Li" Return-path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id 340661BB72 for ; Wed, 27 Jun 2018 15:32:20 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id e18-v6so2079320wrs.5 for ; Wed, 27 Jun 2018 06:32:20 -0700 (PDT) Content-Disposition: inline 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" On Sat, Jun 16, 2018 at 08:37:14AM +0000, Xueming(Steven) Li wrote: > Reviewed-by: Xueming Li > > One minor issue we should be able to ignore. > > +static int > > +mlx5_cmp_ibv_name(const void *a, const void *b) { > > + const char *name_a = (*(const struct ibv_device *const *)a)->name; > > + const char *name_b = (*(const struct ibv_device *const *)b)->name; > > + size_t i = 0; > > + > > + while (name_a[i] && name_a[i] == name_b[i]) > > + ++i; > > + while (i && isdigit(name_a[i - 1]) && isdigit(name_b[i - 1])) > > name_a[i - 1] and name_b[i - 1] must be same here. Indeed, I'll simplify it in v3, thanks. -- Adrien Mazarguil 6WIND