From 3d1459b142d16a74a79576ed4c18f8c1ac14ed47 Mon Sep 17 00:00:00 2001 From: Monendra Singh Kushwaha Date: Wed, 14 Feb 2024 16:18:24 +0530 Subject: octeon: add flow offload infra Type: feature Change-Id: I3485e1627eafc5125255985003573247e7562db2 Signed-off-by: Kommula Shiva Shankar Signed-off-by: Monendra Singh Kushwaha --- src/plugins/dev_octeon/octeon.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/plugins/dev_octeon/octeon.h') diff --git a/src/plugins/dev_octeon/octeon.h b/src/plugins/dev_octeon/octeon.h index a87330c6f90..39501d04104 100644 --- a/src/plugins/dev_octeon/octeon.h +++ b/src/plugins/dev_octeon/octeon.h @@ -9,6 +9,9 @@ #include #include #include +#include +#include +#include #include #include @@ -31,12 +34,23 @@ typedef struct struct roc_nix *nix; } oct_device_t; +typedef struct +{ + /* vnet flow index */ + u32 vnet_flow_index; + + u32 index; + /* Internal flow object */ + struct roc_npc_flow *npc_flow; +} oct_flow_entry_t; + typedef struct { u8 lf_allocated : 1; u8 tm_initialized : 1; u8 npc_initialized : 1; struct roc_npc npc; + oct_flow_entry_t *flow_entries; } oct_port_t; typedef struct @@ -87,6 +101,7 @@ typedef struct format_function_t format_oct_port_status; format_function_t format_oct_rx_trace; format_function_t format_oct_tx_trace; +format_function_t format_oct_port_flow; /* port.c */ vnet_dev_rv_t oct_port_init (vlib_main_t *, vnet_dev_port_t *); @@ -95,6 +110,8 @@ void oct_port_stop (vlib_main_t *, vnet_dev_port_t *); void oct_port_deinit (vlib_main_t *, vnet_dev_port_t *); vnet_dev_rv_t oct_port_cfg_change (vlib_main_t *, vnet_dev_port_t *, vnet_dev_port_cfg_change_req_t *); +vnet_dev_rv_t oct_port_cfg_change_validate (vlib_main_t *, vnet_dev_port_t *, + vnet_dev_port_cfg_change_req_t *); /* queue.c */ vnet_dev_rv_t oct_rx_queue_alloc (vlib_main_t *, vnet_dev_rx_queue_t *); @@ -108,6 +125,15 @@ void oct_txq_deinit (vlib_main_t *, vnet_dev_tx_queue_t *); format_function_t format_oct_rxq_info; format_function_t format_oct_txq_info; +/* flow.c */ +vnet_dev_rv_t oct_flow_ops_fn (vlib_main_t *, vnet_dev_port_t *, + vnet_dev_port_cfg_type_t, u32, uword *); +vnet_dev_rv_t oct_flow_validate_params (vlib_main_t *, vnet_dev_port_t *, + vnet_dev_port_cfg_type_t, u32, + uword *); +vnet_dev_rv_t oct_flow_query (vlib_main_t *, vnet_dev_port_t *, u32, uword, + u64 *); + #define log_debug(dev, f, ...) \ vlib_log (VLIB_LOG_LEVEL_DEBUG, oct_log.class, "%U: " f, \ format_vnet_dev_addr, (dev), ##__VA_ARGS__) -- cgit 1.2.3-korg