Skip to contentSkip to conversation

net/sfc: fix promisc or all-multi mode reporting if dropped

PATCH Applied Andrew Rybchenko 2 participants 2 messages Mar 4, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/sfc: fix promisc or all-multi mode reporting if dropped

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")
---
 drivers/net/sfc/sfc_rx.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/sfc/sfc_rx.c +2 -0
index 7afd2c8b3..f589ece75 100644
@@ -719,6 +719,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;
@@ -732,6 +733,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;
Signature · 1 line
2.17.1
Applied
#1 lore raw
Quoted 8 lines · Andrew Rybchenko

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")

Applied to dpdk-next-net/master, thanks.