aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMonendra Singh Kushwaha <kmonendra@marvell.com>2024-11-07 01:20:38 +0530
committerDamjan Marion <dmarion@0xa5.net>2024-11-13 16:06:03 +0000
commit942e3d583c448f6b632a09f15a250b6804304a0d (patch)
tree6d370293a1616e38fddcca52616b2b41cdd32fe9 /src/plugins
parentf611870e8d8237f860cd607a98ad9a406a88a98f (diff)
octeon: set rss flowkey after mac update
Type: fix Change-Id: I1b087b9e1e7a17ca545f960e896ca48266cdcc93 Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dev_octeon/port.c20
1 files changed, 20 insertions, 0 deletions
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");
}
}