Skip to content

Commit

Permalink
net/sfc: fix reported promiscuous/multicast mode
Browse files Browse the repository at this point in the history
[ upstream commit 9d28d6b ]

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: f525843 ("net/sfc: avoid failure on port start if Rx mode is rejected")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
  • Loading branch information
arybchenko authored and kevintraynor committed May 27, 2020
1 parent 8d329ee commit 1ce3cca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/sfc/sfc_rx.c
Expand Up @@ -646,6 +646,7 @@ sfc_rx_default_rxq_set_filter(struct sfc_adapter *sa, struct sfc_rxq *rxq)
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;
Expand All @@ -659,6 +660,7 @@ sfc_rx_default_rxq_set_filter(struct sfc_adapter *sa, struct sfc_rxq *rxq)
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;
Expand Down

0 comments on commit 1ce3cca

Please sign in to comment.