diff options
author | Monendra Singh Kushwaha <kmonendra@marvell.com> | 2024-02-14 16:18:24 +0530 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2024-02-28 15:35:52 +0100 |
commit | 3d1459b142d16a74a79576ed4c18f8c1ac14ed47 (patch) | |
tree | a93ceb00a114141b9ab317625a2c473405485199 /src/plugins/dev_octeon/octeon.h | |
parent | 7f050d9749bbf16c0d16625d52d94e0811f284c7 (diff) |
octeon: add flow offload infra
Type: feature
Change-Id: I3485e1627eafc5125255985003573247e7562db2
Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Diffstat (limited to 'src/plugins/dev_octeon/octeon.h')
-rw-r--r-- | src/plugins/dev_octeon/octeon.h | 26 |
1 files changed, 26 insertions, 0 deletions
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 <vppinfra/format.h> #include <vnet/vnet.h> #include <vnet/dev/dev.h> +#include <vnet/flow/flow.h> +#include <vnet/udp/udp.h> +#include <vnet/ipsec/esp.h> #include <base/roc_api.h> #include <dev_octeon/hw_defs.h> @@ -33,10 +36,21 @@ typedef struct 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__) |