aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/dpdk.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-03-16 01:25:27 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2018-05-10 15:45:03 +0000
commita35cc14d37466f0737fa928d25697fbfe6e7d657 (patch)
tree7242bb0bc9feebc35a2b1ab56986bc2a7ddb0ceb /src/plugins/dpdk/device/dpdk.h
parentcd330c878dfdb9f52b372007a5086138b12d89f7 (diff)
vnet: device flow offload infra
Change-Id: Ibea4a96bdec5e368301a03d8b11a0712fa0265e0 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/dpdk.h')
-rw-r--r--src/plugins/dpdk/device/dpdk.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index 0778659db55..e1966e438c0 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -40,6 +40,7 @@
#include <rte_sched.h>
#include <rte_net.h>
#include <rte_bus_pci.h>
+#include <rte_flow.h>
#include <vnet/unix/pcap.h>
#include <vnet/devices/devices.h>
@@ -51,6 +52,7 @@
#endif
#include <vlib/pci/pci.h>
+#include <vnet/flow/flow.h>
#define NB_MBUF (16<<10)
@@ -158,6 +160,7 @@ typedef struct
_( 8, BOND_SLAVE_UP, "bond-slave-up") \
_( 9, TX_OFFLOAD, "tx-offload") \
_(10, INTEL_PHDR_CKSUM, "intel-phdr-cksum") \
+ _(11, RX_FLOW_OFFLOAD, "rx-flow-offload")
enum
{
@@ -168,6 +171,20 @@ enum
typedef struct
{
+ u32 flow_index;
+ u32 mark;
+ struct rte_flow *handle;
+} dpdk_flow_entry_t;
+
+typedef struct
+{
+ u32 flow_id;
+ u16 next_index;
+ i16 buffer_advance;
+} dpdk_flow_lookup_entry_t;
+
+typedef struct
+{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
volatile u32 **lockp;
@@ -202,6 +219,12 @@ typedef struct
struct rte_eth_conf port_conf;
struct rte_eth_txconf tx_conf;
+ /* flow related */
+ u32 supported_flow_actions;
+ dpdk_flow_entry_t *flow_entries; /* pool */
+ dpdk_flow_lookup_entry_t *flow_lookup_entries; /* vector */
+ struct rte_flow_error last_flow_error;
+
/* HQoS related */
dpdk_device_hqos_per_worker_thread_t *hqos_wt;
dpdk_device_hqos_per_hqos_thread_t *hqos_ht;
@@ -472,7 +495,10 @@ format_function_t format_dpdk_tx_trace;
format_function_t format_dpdk_rx_trace;
format_function_t format_dpdk_rte_mbuf;
format_function_t format_dpdk_rx_rte_mbuf;
+format_function_t format_dpdk_flow;
unformat_function_t unformat_dpdk_log_level;
+vnet_flow_dev_ops_function_t dpdk_flow_ops_fn;
+
clib_error_t *unformat_rss_fn (unformat_input_t * input, uword * rss_fn);
clib_error_t *unformat_hqos (unformat_input_t * input,
dpdk_device_config_hqos_t * hqos);