------------------------------------------------------------------
发件人:Stephen Hemminger <stephen@networkplumber.org>
发送时间:2025年11月25日(周二) 07:35
收件人:Dimon<dimon.zhao@nebula-matrix.com>
抄 送:dev<dev@dpdk.org>; Kyo Liu<kyo.liu@nebula-matrix.com>; Leon<leon.yu@nebula-matrix.com>; Sam<sam.chen@nebula-matrix.com>
主 题:Re: [PATCH v1 1/1] net/nbl: add VLAN offload set interface
On Sun, 23 Nov 2025 19:40:26 -0800
Dimon Zhao <dimon.zhao@nebula-matrix.com> wrote:
> The rte_eth_dev_set_vlan_offload function internally calls
> the vlan_offload_set interface, so we must implement this function.
> Otherwise, an error will occur when
> executing the vlan set strip on command.
>
> Fixes: 9d7757dce874 ("net/nbl: simulate VLAN offload")
>
> Signed-off-by: Dimon Zhao <dimon.zhao@nebula-matrix.com>
> ---
> drivers/net/nbl/nbl_dev/nbl_dev.c | 5 +++++
> drivers/net/nbl/nbl_dev/nbl_dev.h | 1 +
> drivers/net/nbl/nbl_ethdev.c | 1 +
> 3 files changed, 7 insertions(+)
>
> diff --git a/drivers/net/nbl/nbl_dev/nbl_dev.c b/drivers/net/nbl/nbl_dev/nbl_dev.c
> index 58eb1c6231..923de2e9d0 100644
> --- a/drivers/net/nbl/nbl_dev/nbl_dev.c
> +++ b/drivers/net/nbl/nbl_dev/nbl_dev.c
> @@ -758,6 +758,11 @@ int nbl_promiscuous_disable(struct rte_eth_dev *eth_dev)
> return 0;
> }
>
> +int nbl_vlan_offload_set(__rte_unused struct rte_eth_dev *dev, __rte_unused int mask)
> +{
> + return 0;
> +}
This seems broken in handling VLAN.
The intention is that the driver changes how vlans handled based on the mask
in the API call.
The driver is not advertising RTE_ETH_VLAN_STRIP_OFFLOAD in the offload flags.
Same for QINQ or FILTER flags.
What is the intention? How is the hardware handling VLAN tags? Does it
have the capability to do this in hardware? Can it be enabled and disabled?