Hello,

On Sat, Nov 23, 2024 at 8:37 PM caobinnjupt <caobin_nj...@163.com> wrote:
>
> Description:
>
>  if packet contain vlan flag we will push vlan length in the mbuf of 
> dp_packet;
>  if packet pop vlan flag we will pop vlan legth in the mbufof dp_packet;
>
>  Author: caobinnjupt <caobin_nj...@163.com>
>  Signed-off-by: caobinnjupt <caobin_nj...@163.com>

Could you please describe the setup and the issue you hit?


> ---
>  lib/dp-packet.h | 24 ++++++++++++++++++++++++
>  lib/packets.c   |  4 ++++
>  2 files changed, 28 insertions(+)
>
> diff --git a/lib/dp-packet.h b/lib/dp-packet.h
> index 4afbbe722..184bfb920 100644
> --- a/lib/dp-packet.h
> +++ b/lib/dp-packet.h
> @@ -1064,6 +1064,30 @@ dp_packet_reset_offload(struct dp_packet *p)
>      *dp_packet_ol_flags_ptr(p) &= ~DP_PACKET_OL_SUPPORTED_MASK;
>  }
>
> +#ifdef DPDK_NETDEV
> +static inline void
> +dp_packet_push_vlan_update_offload(struct dp_packet *p)
> +{
> +    if (p->mbuf.ol_flags & PKT_TX_L4_MASK && p->mbuf.l2_len == 
> ETH_HEADER_LEN) {
> +        p->mbuf.l2_len += VLAN_HEADER_LEN;
> +    }
> +}

The mbuf l2_len is supposed to be filled by OVS before calling DPDK
drivers (see netdev_dpdk_prep_hwol_packet()).
Are you perhaps hitting an issue with vhost-user ports?


-- 
David Marchand

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to