From: Andrew Rybchenko Date: Wed, 4 Mar 2020 15:01:04 +0000 (+0000) Subject: net/sfc: fix reported promiscuous/multicast mode X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=9d28d6b0b0bf4e7d9386c2ab56893d5cc95e78e5 net/sfc: fix reported promiscuous/multicast mode Requested promiscuous or all-multicast mode may be dropped on port start if FW denies to enable it (e.g. because of no permission in the case of VF). Return applied value on get. Fixes: f5258439ee5d ("net/sfc: avoid failure on port start if Rx mode is rejected") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko --- diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index 7afd2c8b33..f589ece757 100644 --- a/drivers/net/sfc/sfc_rx.c +++ b/drivers/net/sfc/sfc_rx.c @@ -719,6 +719,7 @@ retry: sfc_warn(sa, "promiscuous mode will be disabled"); port->promisc = B_FALSE; + sa->eth_dev->data->promiscuous = 0; rc = sfc_set_rx_mode(sa); if (rc != 0) return rc; @@ -732,6 +733,7 @@ retry: sfc_warn(sa, "all-multicast mode will be disabled"); port->allmulti = B_FALSE; + sa->eth_dev->data->all_multicast = 0; rc = sfc_set_rx_mode(sa); if (rc != 0) return rc;