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/format.c | |
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/format.c')
-rw-r--r-- | src/plugins/dev_octeon/format.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/plugins/dev_octeon/format.c b/src/plugins/dev_octeon/format.c index 5ee956ad4f4..e624b84f54e 100644 --- a/src/plugins/dev_octeon/format.c +++ b/src/plugins/dev_octeon/format.c @@ -162,3 +162,22 @@ format_oct_tx_trace (u8 *s, va_list *args) return s; } + +u8 * +format_oct_port_flow (u8 *s, va_list *args) +{ + vlib_main_t *vm = vlib_get_main (); + vnet_dev_port_t *port = va_arg (*args, vnet_dev_port_t *); + u32 flow_index = va_arg (*args, u32); + uword private_data = va_arg (*args, uword); + u64 hits; + + if (flow_index == ~0) + return s; + + if (oct_flow_query (vm, port, flow_index, private_data, &hits) == + VNET_DEV_OK) + s = format (s, "flow (%u) hit count: %lu", flow_index, hits); + + return s; +} |