mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
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>
This commit is contained in:
committed by
Ian Stokes
parent
cae643534e
commit
a47e2db209
@@ -814,10 +814,10 @@ netdev_pop_header(struct netdev *netdev, struct dp_packet_batch *batch)
|
||||
DP_PACKET_BATCH_REFILL_FOR_EACH (i, size, packet, batch) {
|
||||
packet = netdev->netdev_class->pop_header(packet);
|
||||
if (packet) {
|
||||
/* Reset the checksum offload flags if present, to avoid wrong
|
||||
/* Reset the offload flags if present, to avoid wrong
|
||||
* interpretation in the further packet processing when
|
||||
* recirculated.*/
|
||||
reset_dp_packet_checksum_ol_flags(packet);
|
||||
dp_packet_reset_offload(packet);
|
||||
dp_packet_batch_refill(batch, packet, i);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user