2e02a2afff
Currently, there is a potential problem that changing the content of dev->data->dev_conf.rxmode.offloads even when there is no vlan_offload_set driver callback. It is a good idea that prevent the side effect and make the API return success if no change requested. This patch fixes the problem, the detail information as below: - keep possibility to do dummy set even if there is no driver callback - do not touch Rx mode offloads in device data before checking the driver callback availability - ensure that Rx mode offloads are rolled back correctly if driver callback returns error Fixes: 81f9db8ecc2c ("ethdev: add vlan offload support") Cc: stable@dpdk.org Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: Chunsong Feng <fengchunsong@huawei.com> Signed-off-by: Min Wang (Jushui) <wangmin3@huawei.com> Signed-off-by: Min Hu (Connor) <humin29@huawei.com> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>