From 942e3d583c448f6b632a09f15a250b6804304a0d Mon Sep 17 00:00:00 2001 From: Monendra Singh Kushwaha Date: Thu, 7 Nov 2024 01:20:38 +0530 Subject: octeon: set rss flowkey after mac update Type: fix Change-Id: I1b087b9e1e7a17ca545f960e896ca48266cdcc93 Signed-off-by: Monendra Singh Kushwaha --- src/plugins/dev_octeon/port.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/dev_octeon/port.c b/src/plugins/dev_octeon/port.c index 4c6d8414239..f8a7d6ba7db 100644 --- a/src/plugins/dev_octeon/port.c +++ b/src/plugins/dev_octeon/port.c @@ -429,6 +429,7 @@ oct_port_start (vlib_main_t *vm, vnet_dev_port_t *port) { vnet_dev_t *dev = port->dev; oct_device_t *cd = vnet_dev_get_data (dev); + oct_port_t *cp = vnet_dev_get_port_data (port); struct roc_nix *nix = cd->nix; struct roc_nix_eeprom_info eeprom_info = {}; vnet_dev_rv_t rv; @@ -452,6 +453,12 @@ oct_port_start (vlib_main_t *vm, vnet_dev_port_t *port) goto done; } + if ((rrv = roc_npc_mcam_enable_all_entries (&cp->npc, true))) + { + rv = oct_roc_err (dev, rrv, "roc_npc_mcam_enable_all_entries() failed"); + goto done; + } + vnet_dev_poll_port_add (vm, port, 0.5, oct_port_poll); if (roc_nix_eeprom_info_get (nix, &eeprom_info) == 0) @@ -470,6 +477,7 @@ oct_port_stop (vlib_main_t *vm, vnet_dev_port_t *port) { vnet_dev_t *dev = port->dev; oct_device_t *cd = vnet_dev_get_data (dev); + oct_port_t *cp = vnet_dev_get_port_data (port); struct roc_nix *nix = cd->nix; int rrv; @@ -477,6 +485,14 @@ oct_port_stop (vlib_main_t *vm, vnet_dev_port_t *port) vnet_dev_poll_port_remove (vm, port, oct_port_poll); + /* Disable all the NPC entries */ + rrv = roc_npc_mcam_enable_all_entries (&cp->npc, false); + if (rrv) + { + oct_roc_err (dev, rrv, "roc_npc_mcam_enable_all_entries() failed"); + return; + } + rrv = roc_nix_npc_rx_ena_dis (nix, false); if (rrv) { @@ -576,6 +592,10 @@ oct_port_add_del_eth_addr (vlib_main_t *vm, vnet_dev_port_t *port, rv = oct_roc_err (dev, rrv, "roc_nix_mac_addr_set() failed"); } } + + rrv = roc_nix_rss_default_setup (nix, default_rss_flowkey); + if (rrv) + rv = oct_roc_err (dev, rrv, "roc_nix_rss_default_setup() failed"); } } -- cgit 1.2.3-korg