The refactor allows us to use *recirc_depth_get() to obtain the depth across ovs which was previously limited to only dpif-netdev.c.
Signed-off-by: Kumar Amber <kumar.am...@intel.com> Signed-off-by: Cian Ferriter <cian.ferri...@intel.com> Co-authored-by: Cian Ferriter <cian.ferri...@intel.com> Acked-by: Harry van Haaren <harry.van.haa...@intel.com> --- lib/dpif-netdev-private-dpif.c | 2 ++ lib/dpif-netdev-private-dpif.h | 5 +++++ lib/dpif-netdev.c | 3 --- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/dpif-netdev-private-dpif.c b/lib/dpif-netdev-private-dpif.c index 84d4ec156..6f8de9094 100644 --- a/lib/dpif-netdev-private-dpif.c +++ b/lib/dpif-netdev-private-dpif.c @@ -28,6 +28,8 @@ VLOG_DEFINE_THIS_MODULE(dpif_netdev_impl); +DEFINE_EXTERN_PER_THREAD_DATA(recirc_depth, 0); + enum dpif_netdev_impl_info_idx { DPIF_NETDEV_IMPL_SCALAR, DPIF_NETDEV_IMPL_AVX512 diff --git a/lib/dpif-netdev-private-dpif.h b/lib/dpif-netdev-private-dpif.h index 0da639c55..15f1f36b3 100644 --- a/lib/dpif-netdev-private-dpif.h +++ b/lib/dpif-netdev-private-dpif.h @@ -18,6 +18,11 @@ #define DPIF_NETDEV_PRIVATE_DPIF_H 1 #include "openvswitch/types.h" +#include "ovs-thread.h" + +#define MAX_RECIRC_DEPTH 6 +/* Use per thread recirc_depth to prevent recirculation loop. */ +DECLARE_EXTERN_PER_THREAD_DATA(uint32_t, recirc_depth); /* Forward declarations to avoid including files. */ struct dp_netdev_pmd_thread; diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index ff57b3961..f65d9ee8c 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -98,9 +98,6 @@ VLOG_DEFINE_THIS_MODULE(dpif_netdev); #define MIN_TO_MSEC 60000 #define FLOW_DUMP_MAX_BATCH 50 -/* Use per thread recirc_depth to prevent recirculation loop. */ -#define MAX_RECIRC_DEPTH 6 -DEFINE_STATIC_PER_THREAD_DATA(uint32_t, recirc_depth, 0) /* Use instant packet send by default. */ #define DEFAULT_TX_FLUSH_INTERVAL 0 -- 2.25.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev