summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/dpdk_priv.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-01-09 14:05:27 +0100
committerDamjan Marion <dmarion@me.com>2022-01-11 11:42:59 +0000
commitce4083ce48958d9d3956e8317445a5552780af1a (patch)
tree56ddc02d9a2d606a6b6c51197a8ea0b5c756f6de /src/plugins/dpdk/device/dpdk_priv.h
parent3b7ef512f190a506f62af53536b586b4800f66c1 (diff)
dpdk: offloads cleanup
Type: improvement Change-Id: Ibf43aa483548e6055e4b851ad893371d7af3b018 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/dpdk_priv.h')
-rw-r--r--src/plugins/dpdk/device/dpdk_priv.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/dpdk_priv.h b/src/plugins/dpdk/device/dpdk_priv.h
index d1cdea32453..535a532f0b3 100644
--- a/src/plugins/dpdk/device/dpdk_priv.h
+++ b/src/plugins/dpdk/device/dpdk_priv.h
@@ -42,6 +42,12 @@ _(iova-mode) \
_(base-virtaddr)
/* clang-format on */
+static_always_inline void
+dpdk_device_flag_set (dpdk_device_t *xd, __typeof__ (xd->flags) flag, int val)
+{
+ xd->flags = val ? xd->flags | flag : xd->flags & ~flag;
+}
+
static inline void
dpdk_get_xstats (dpdk_device_t * xd)
{