[dpdk-dev] [PATCH v3] ethdev: fix VLAN offloads set if no driver callback

Ferruh Yigit ferruh.yigit at intel.com
Fri Jan 17 15:31:36 CET 2020


On 1/17/2020 11:49 AM, Wei Hu (Xavier) wrote:
> From: "Wei Hu (Xavier)" <xavier.huwei at huawei.com>
> 
> 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: dfebfc9882fb ("ethdev: support dynamic configuration of QinQ strip")

I think the problem (API modifying the device config even 'vlan_offload_set'
dev_ops is not implemented) exists from the beginning.

Fixes: 81f9db8ecc2c ("ethdev: add vlan offload support")


> Cc: stable at dpdk.org
> 
> Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
> Signed-off-by: Chunsong Feng <fengchunsong at huawei.com>
> Signed-off-by: Min Wang (Jushui) <wangmin3 at huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
> Reviewed-by: Andrew Rybchenko <arybchenko at solarflare.com>


More information about the dev mailing list