From 38f59c315b0587d570fb85825c1129ec14c959bf Mon Sep 17 00:00:00 2001 From: Harish Malik Date: Fri, 7 Jun 2024 17:04:46 +0530 Subject: octeon: enable vf device promiscuous mode feature This patch enables promiscuous mode on vf devices except SDP vf and LBK devices Type: feature Change-Id: I2e18c63590f22f99c69500f10b42b64d899249ce Signed-off-by: Kommula Shiva Shankar Signed-off-by: Monendra Singh Kushwaha --- src/plugins/dev_octeon/port.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/plugins/dev_octeon') diff --git a/src/plugins/dev_octeon/port.c b/src/plugins/dev_octeon/port.c index 2ed278d8841..0bbada8ecc1 100644 --- a/src/plugins/dev_octeon/port.c +++ b/src/plugins/dev_octeon/port.c @@ -386,7 +386,7 @@ oct_validate_config_promisc_mode (vnet_dev_port_t *port, int enable) oct_device_t *cd = vnet_dev_get_data (dev); struct roc_nix *nix = cd->nix; - if (roc_nix_is_vf_or_sdp (nix)) + if (roc_nix_is_sdp (nix) || roc_nix_is_lbk (nix)) return VNET_DEV_ERR_UNSUPPORTED_DEVICE; return VNET_DEV_OK; @@ -406,6 +406,9 @@ oct_op_config_promisc_mode (vlib_main_t *vm, vnet_dev_port_t *port, int enable) return oct_roc_err (dev, rv, "roc_nix_npc_promisc_ena_dis failed"); } + if (!roc_nix_is_pf (nix)) + return VNET_DEV_OK; + rv = roc_nix_mac_promisc_mode_enable (nix, enable); if (rv) { -- cgit 1.2.3-korg