summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.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/vnet/interface.h
parentcd330c878dfdb9f52b372007a5086138b12d89f7 (diff)
vnet: device flow offload infra
Change-Id: Ibea4a96bdec5e368301a03d8b11a0712fa0265e0 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/interface.h')
-rw-r--r--src/vnet/interface.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vnet/interface.h b/src/vnet/interface.h
index b7b350f68fe..6eaf50166c0 100644
--- a/src/vnet/interface.h
+++ b/src/vnet/interface.h
@@ -81,6 +81,20 @@ typedef clib_error_t *(vnet_interface_set_l2_mode_function_t)
(struct vnet_main_t * vnm, struct vnet_hw_interface_t * hi,
i32 l2_if_adjust);
+typedef enum
+{
+ VNET_FLOW_DEV_OP_ADD_FLOW,
+ VNET_FLOW_DEV_OP_DEL_FLOW,
+ VNET_FLOW_DEV_OP_GET_COUNTER,
+ VNET_FLOW_DEV_OP_RESET_COUNTER,
+} vnet_flow_dev_op_t;
+
+/* Interface flow opeations callback. */
+typedef int (vnet_flow_dev_ops_function_t) (struct vnet_main_t * vnm,
+ vnet_flow_dev_op_t op,
+ u32 hw_if_index, u32 index,
+ uword * private_data);
+
typedef enum vnet_interface_function_priority_t_
{
VNET_ITF_FUNC_PRIORITY_LOW,
@@ -189,6 +203,9 @@ typedef struct _vnet_device_class
int (*name_renumber) (struct vnet_hw_interface_t * hi,
u32 new_dev_instance);
+ /* Interface flow offload operations */
+ vnet_flow_dev_ops_function_t *flow_ops_function;
+
/* Format device instance as name. */
format_function_t *format_device_name;
@@ -201,6 +218,9 @@ typedef struct _vnet_device_class
/* Trace buffer format for TX function. */
format_function_t *format_tx_trace;
+ /* Format flow offload entry */
+ format_function_t *format_flow;
+
/* Function to clear hardware counters for device. */
void (*clear_counters) (u32 dev_class_instance);