]> git.proxmox.com Git - mirror_ovs.git/commit - lib/dp-packet.c
dp-packet: Refactor offloading API.
authorIlya Maximets <i.maximets@samsung.com>
Tue, 26 Feb 2019 10:38:37 +0000 (13:38 +0300)
committerIan Stokes <ian.stokes@intel.com>
Wed, 13 Mar 2019 09:51:30 +0000 (09:51 +0000)
commita47e2db209e4da594ea35202f59d14371c2078a7
tree78d987a2760c4557c4dec922ec5bdf7730e4828d
parentcae643534e628b57533f12253062e0b5bbd3c9cd
dp-packet: Refactor offloading API.

1. No reason to have mbuf related APIs in a generic code.
2. Not only RSS/checksums should be invalidated in case of tunnel
   decapsulation or sending to 'ring' ports.

In order to fix two above issues, new function
'dp_packet_reset_offload' introduced. In order to clean up/unify
the code and simplify addition of new offloading features to non-DPDK
version of dp_packet, introduced 'ol_flags' bitmask. Additionally
reduced code complexity in 'dp_packet_clone_with_headroom' by using
already existent generic APIs.

Unfortunately, we still need to have a special case for mbuf
initialization inside 'dp_packet_init__()'.
'dp_packet_init_specific()' introduced for this purpose as a generic
API for initialization of the implementation-specific fields.

Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
lib/dp-packet.c
lib/dp-packet.h
lib/netdev-dpdk.c
lib/netdev.c