[ovs-dev] [PATCH dpdk-latest v2 3/4] dp-packet: handle new dpdk buffer flags

Stokes, Ian ian.stokes at intel.com
Mon Jan 6 20:24:14 UTC 2020



On 12/31/2019 8:14 PM, Flavio Leitner wrote:
> DPDK included a couple flags EXT_ATTACHED_MBUF and IND_ATTACHED_MBUF
> which are not really offloading flags, so this patch fixes to reset
> only offloading flags or to reset only those flags when needed.
> 

I don't think this patch is required anymore as the same changes have 
been applied to master via the following commit

9965fef8db79 ("dp-packet: Fix clearing/copying of memory layout flags.")

Regards
Ian

> Signed-off-by: Flavio Leitner <fbl at sysclose.org>
> ---
>   lib/dp-packet.c | 4 +++-
>   lib/dp-packet.h | 2 +-
>   2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/dp-packet.c b/lib/dp-packet.c
> index 62d7faa4c..e02891449 100644
> --- a/lib/dp-packet.c
> +++ b/lib/dp-packet.c
> @@ -193,7 +193,9 @@ dp_packet_clone_with_headroom(const struct dp_packet *buffer, size_t headroom)
>               offsetof(struct dp_packet, l2_pad_size));
>   
>   #ifdef DPDK_NETDEV
> -    new_buffer->mbuf.ol_flags = buffer->mbuf.ol_flags;
> +    /* The new packet is linear, so copy only the offloading flags */
Missing period for comment.

> +    new_buffer->mbuf.ol_flags = buffer->mbuf.ol_flags
> +                                & ~(EXT_ATTACHED_MBUF | IND_ATTACHED_MBUF);
>   #endif
>   
>       if (dp_packet_rss_valid(buffer)) {
> diff --git a/lib/dp-packet.h b/lib/dp-packet.h
> index 1e5362304..325924eaa 100644
> --- a/lib/dp-packet.h
> +++ b/lib/dp-packet.h
> @@ -538,7 +538,7 @@ dp_packet_rss_valid(const struct dp_packet *p)
>   static inline void
>   dp_packet_reset_offload(struct dp_packet *p)
>   {
> -    p->mbuf.ol_flags = 0;
> +    p->mbuf.ol_flags &= (EXT_ATTACHED_MBUF | IND_ATTACHED_MBUF);
>   }
>   
>   static inline bool
> 


More information about the dev mailing list