On Thu, Nov 21, 2019 at 2:59 PM Ilya Maximets <[email protected]> wrote:
>
> 'ol_flags' of DPDK mbuf could contain bits responsible for external
> or indirect buffers which are not actually offload flags in a common
> sense.  Clearing/copying of these flags could lead to memory leaks of
> external memory chunks and crashes due to access to wrong memory.
>
> OVS should not clear these flags while resetting offloads and also
> should not copy them to the newly allocated packets.
>
> This change is required to support DPDK 19.11, as some drivers may
> return mbufs with these flags set.  However, it might be good to do
> the same for DPDK 18.11, because these flags are present and should
> be taken into account.

Did you consider inverting the logic?

Rather than exclude a set of flags, I would touch/copy only the flags
that OVS uses/understands.

When OVS uses a DPDK flag, it has an associated API and meaning wrt
the rte_mbuf and the data.
- when the flags are reset in OVS, that's because something has been
done to the data (and the checksums and the rss hash must be
reevaluated),
- when a buffer is copied, OVS copies the data and the context that
matters to OVS,

Anything else should be discarded when copying to a new dp-packet.


-- 
David Marchand

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to