[dpdk-dev] [PATCH] net/mlx4: fix undefined behavior of RSS conversion

Ferruh Yigit ferruh.yigit at intel.com
Tue May 22 15:01:38 CEST 2018


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 <ferruh.yigit at intel.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
> 
> --
> 
> 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?



More information about the dev mailing list