From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH] net/mlx4: fix undefined behavior of RSS conversion Date: Tue, 22 May 2018 15:21:27 +0200 Message-ID: <20180522132127.GW6497@6wind.com> References: <20180521154829.6297-2-adrien.mazarguil@6wind.com> <20180522112533.2785-1-adrien.mazarguil@6wind.com> <797d8b79-721c-1611-7b04-127eff7b31cc@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Shahaf Shuler , dev@dpdk.org To: Ferruh Yigit Return-path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id 25F8B2BFA for ; Tue, 22 May 2018 15:21:43 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id r13-v6so7813698wrj.10 for ; Tue, 22 May 2018 06:21:43 -0700 (PDT) Content-Disposition: inline In-Reply-To: <797d8b79-721c-1611-7b04-127eff7b31cc@intel.com> 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 Tue, May 22, 2018 at 02:01:38PM +0100, Ferruh Yigit wrote: > On 5/22/2018 12:26 PM, Adrien Mazarguil wrote: > > As reported by ICC, an array initializer that uses values found in the > > array being initialized, although semantically correct (GCC and clang do > > not complain and generate correct code), results in undefined behavior > > since initialization order is itself undefined. > > > > This patch restores the static keyword and initializes array entries with > > constant expressions as a safety measure. > > > > Fixes: f76ccd763422 ("net/mlx4: refactor RSS conversion functions") > > > > Reported-by: Ferruh Yigit > > Signed-off-by: Adrien Mazarguil > > > > -- > > > > Shahaf, Ferruh, please remove the "Note the loss of the [...]" paragraph of > > the original commit if this patch gets squashed in it, as it is no longer > > relevant in that case. > > Squashed into relevant commit in next-net, thanks. > > Can you please confirm updated commit log? Looks good, thanks! -- Adrien Mazarguil 6WIND