net/mlx5: fix build on Arm
authorShahaf Shuler <shahafs@mellanox.com>
Tue, 16 Oct 2018 06:05:17 +0000 (09:05 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 18 Oct 2018 08:24:39 +0000 (10:24 +0200)
commitcd18e1b72f73b9694e23b639f6d84c8ea71c5af4
tree2ec11c719ad07bcdd79937921cd7ff4d7e1140ab
parentaa18d98bcade59d1b808f1074f1dbe9890586e65
net/mlx5: fix build on Arm

On some ARM environment, the below compilation error will be seen

dpdk/drivers/net/mlx5/mlx5_flow_dv.c: In function
'flow_dv_translate_item_nvgre':
/tmp/dpdk/drivers/net/mlx5/mlx5_flow_dv.c:785:22: error: pointer targets
in initialization differ in signedness [-Werror=pointer-sign]
  const char *tni_v = nvgre_v->tni;

The reason for this error is that nvgre_v->tni is defined as byte array
in size of 3B. However the code in the function iterate till the 4B in
order to copy/set also the subsequent field after it (flow_id)

Fixing by pointing to this struct from a different pointer.

Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
drivers/net/mlx5/mlx5_flow_dv.c