summaryrefslogtreecommitdiff
path: root/lib/netdev-offload.h
diff options
context:
space:
mode:
authorGaetan Rivet <grive@u256.net>2021-09-08 11:47:29 +0200
committerIlya Maximets <i.maximets@ovn.org>2022-01-18 15:12:01 +0100
commitadbd4301a249aa60519374476c362e474fede842 (patch)
treefda7a2d1a2c16b784136dea438167d4a852b2f35 /lib/netdev-offload.h
parent1088f4e7fb95843210895f49377ab9e81a93d7cd (diff)
downloadopenvswitch-adbd4301a249aa60519374476c362e474fede842.tar.gz
netdev-offload-dpdk: Use per-netdev offload metadata.
Add a per-netdev offload data field as part of netdev hw_info structure. Use this field in netdev-offload-dpdk to map offload metadata (ufid to rte_flow). Use flow API deinit ops to destroy the per-netdev metadata when deallocating a netdev. Use RCU primitives to ensure coherency during port deletion. Signed-off-by: Gaetan Rivet <grive@u256.net> Reviewed-by: Eli Britstein <elibr@nvidia.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'lib/netdev-offload.h')
-rw-r--r--lib/netdev-offload.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/netdev-offload.h b/lib/netdev-offload.h
index 43a98d499..fe5969a36 100644
--- a/lib/netdev-offload.h
+++ b/lib/netdev-offload.h
@@ -20,6 +20,7 @@
#include "openvswitch/netdev.h"
#include "openvswitch/types.h"
+#include "ovs-rcu.h"
#include "packets.h"
#include "flow.h"
@@ -45,6 +46,7 @@ struct netdev_hw_info {
bool oor; /* Out of Offload Resources ? */
int offload_count; /* Pending (non-offloaded) flow count */
int pending_count; /* Offloaded flow count */
+ OVSRCU_TYPE(void *) offload_data; /* Offload metadata. */
};
enum hw_info_type {