net/ice/base: fix tunnel type match word handling
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 18 May 2020 04:23:51 +0000 (12:23 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 21 May 2020 13:53:14 +0000 (15:53 +0200)
commit3ccf61bc1ea8aa19663bc32fdd82d908c22ac1fa
tree8142fcb2f5e3d2bb65288c5764babffc9d4e3eea
parente475fd853ac1cae9cf837a10e8c386503175752e
net/ice/base: fix tunnel type match word handling

Use a common function when selecting the proper word and mask match for
a tunnel type when programming switch rules.

Store switch recipe field mask as little endian, which avoids needing to
convert back to big endian after reading recipe from FW.

Obtain word mask from FW recipe.

Fix word matching element and index pairing.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
Cc: stable@dpdk.org
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_osdep.h
drivers/net/ice/base/ice_protocol_type.h
drivers/net/ice/base/ice_switch.c