mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 22:35:15 +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
@@ -3775,11 +3775,11 @@ netdev_dpdk_ring_send(struct netdev *netdev, int qid,
|
||||
struct dp_packet *packet;
|
||||
|
||||
/* When using 'dpdkr' and sending to a DPDK ring, we want to ensure that
|
||||
* the rss hash field is clear. This is because the same mbuf may be
|
||||
* the offload fields are clear. This is because the same mbuf may be
|
||||
* modified by the consumer of the ring and return into the datapath
|
||||
* without recalculating the RSS hash. */
|
||||
* without recalculating the RSS hash or revalidating the checksums. */
|
||||
DP_PACKET_BATCH_FOR_EACH (i, packet, batch) {
|
||||
dp_packet_mbuf_rss_flag_reset(packet);
|
||||
dp_packet_reset_offload(packet);
|
||||
}
|
||||
|
||||
netdev_dpdk_send__(dev, qid, batch, concurrent_txq);
|
||||
|
Reference in New Issue
Block a user