summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/flow.c
diff options
context:
space:
mode:
authorPiotr Bronowski <piotrx.bronowski@intel.com>2021-07-02 09:20:03 +0000
committerDamjan Marion <dmarion@me.com>2021-08-31 15:24:33 +0000
commitda6520b4ed7ddd35a7c52403a2df1c9fac3c24ca (patch)
treea12d6c7f589a453711ecb272168db93d1a0fa81c /src/plugins/dpdk/device/flow.c
parent8990f095a58748f82a1ef6388d3b4ea833365af9 (diff)
flow: add esp spi rss type
Type: feature This patch adds IPsec ESP SPI as RSS key for better IPsec inbound processing scaling. With this feature enabled, The NIC will use the packets' SPI index as the RSS key to distribute them to different queues. The dpdk-input is also updated to support this feature. Sample CLI command to enable Ipsec ESP SPI as RSS key: test flow add src-ip any dst-ip any rss types esp test flow enable eth0 index 0 Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com> Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com> Change-Id: I8b7d01cfc065e9099fad33042ce76898e16ddbf0
Diffstat (limited to 'src/plugins/dpdk/device/flow.c')
-rw-r--r--src/plugins/dpdk/device/flow.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/flow.c b/src/plugins/dpdk/device/flow.c
index a090ec0e930..850476b87c1 100644
--- a/src/plugins/dpdk/device/flow.c
+++ b/src/plugins/dpdk/device/flow.c
@@ -444,6 +444,14 @@ dpdk_flow_add (dpdk_device_t * xd, vnet_flow_t * f, dpdk_flow_entry_t * fe)
}
pattern_end:
+ if ((f->actions & VNET_FLOW_ACTION_RSS) &&
+ (f->rss_types & (1ULL << VNET_FLOW_RSS_TYPES_ESP)))
+ {
+
+ vec_add2 (items, item, 1);
+ item->type = RTE_FLOW_ITEM_TYPE_ESP;
+ }
+
vec_add2 (items, item, 1);
item->type = RTE_FLOW_ITEM_TYPE_END;