net/nfp: fix disabling VLAN stripping
authorPeng Zhang <peng.zhang@corigine.com>
Thu, 26 May 2022 14:34:44 +0000 (16:34 +0200)
committerFerruh Yigit <ferruh.yigit@xilinx.com>
Tue, 31 May 2022 13:03:02 +0000 (15:03 +0200)
commit7988cdca98940faa80d3e030c1b9811bcdd4c67d
treea2c3cb6636a429f1f10b6400d5a873b639bd0948
parent09b010da8ec6388edae44ff55e1feab5c08191ab
net/nfp: fix disabling VLAN stripping

"vlan set strip off 0" can't work, due to the incorrect usage
of the mask, it just represent that the status is changed or not,
not represent offloaded or not, so that the driver send the
error control message to the nic.

Now, by first inspect the mask of things that changed, and then
change the requested state if VLAN stripping according the
requested offload status. So this change can fix this bug.

Fixes: d4a27a3b092a ("nfp: add basic features")
Cc: stable@dpdk.org
Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Signed-off-by: Yong Xu <yong.xu@corigine.com>
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
drivers/net/nfp/nfp_common.c