summaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/avf.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/avf/avf.h')
-rw-r--r--src/plugins/avf/avf.h43
1 files changed, 33 insertions, 10 deletions
diff --git a/src/plugins/avf/avf.h b/src/plugins/avf/avf.h
index 53e1275ea62..6c09084eb8c 100644
--- a/src/plugins/avf/avf.h
+++ b/src/plugins/avf/avf.h
@@ -29,6 +29,9 @@
#include <vnet/interface.h>
+#include <vnet/devices/devices.h>
+#include <vnet/flow/flow.h>
+
#define AVF_QUEUE_SZ_MAX 4096
#define AVF_QUEUE_SZ_MIN 64
@@ -97,16 +100,17 @@ extern vlib_log_class_registration_t avf_log;
format_vlib_pci_addr, &dev->pci_addr, \
## __VA_ARGS__)
-#define foreach_avf_device_flags \
- _(0, INITIALIZED, "initialized") \
- _(1, ERROR, "error") \
- _(2, ADMIN_UP, "admin-up") \
- _(3, VA_DMA, "vaddr-dma") \
- _(4, LINK_UP, "link-up") \
- _(5, SHARED_TXQ_LOCK, "shared-txq-lock") \
- _(6, ELOG, "elog") \
- _(7, PROMISC, "promisc") \
- _(8, RX_INT, "rx-interrupts")
+#define foreach_avf_device_flags \
+ _ (0, INITIALIZED, "initialized") \
+ _ (1, ERROR, "error") \
+ _ (2, ADMIN_UP, "admin-up") \
+ _ (3, VA_DMA, "vaddr-dma") \
+ _ (4, LINK_UP, "link-up") \
+ _ (5, SHARED_TXQ_LOCK, "shared-txq-lock") \
+ _ (6, ELOG, "elog") \
+ _ (7, PROMISC, "promisc") \
+ _ (8, RX_INT, "rx-interrupts") \
+ _ (9, RX_FLOW_OFFLOAD, "rx-flow-offload")
enum
{
@@ -183,6 +187,20 @@ typedef struct
typedef struct
{
+ u32 flow_index;
+ u32 mark;
+ struct avf_fdir_conf *rcfg;
+} avf_flow_entry_t;
+
+typedef struct
+{
+ u32 flow_id;
+ u16 next_index;
+ i16 buffer_advance;
+} avf_flow_lookup_entry_t;
+
+typedef struct
+{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
u32 flags;
u32 per_interface_next_index;
@@ -224,6 +242,10 @@ typedef struct
virtchnl_link_speed_t link_speed;
vlib_pci_addr_t pci_addr;
+ /* flow */
+ avf_flow_entry_t *flow_entries; /* pool */
+ avf_flow_lookup_entry_t *flow_lookup_entries; /* pool */
+
/* stats */
virtchnl_eth_stats_t eth_stats;
virtchnl_eth_stats_t last_cleared_eth_stats;
@@ -319,6 +341,7 @@ clib_error_t *avf_program_flow (u32 dev_instance, int is_add, u8 *rule,
format_function_t format_avf_device;
format_function_t format_avf_device_name;
format_function_t format_avf_input_trace;
+vnet_flow_dev_ops_function_t avf_flow_ops_fn;
static_always_inline avf_device_t *
avf_get_device (u32 dev_instance)