net/sfc: fix reported promiscuous/multicast mode
[dpdk.git] / drivers / net / sfc / sfc_rx.c
index 10fa1e5..f589ece 100644 (file)
@@ -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;
@@ -1403,7 +1405,7 @@ sfc_rx_process_adv_conf_rss(struct sfc_adapter *sa,
 
        if (conf->rss_key != NULL) {
                if (conf->rss_key_len != sizeof(rss->key)) {
-                       sfc_err(sa, "RSS key size is wrong (should be %lu)",
+                       sfc_err(sa, "RSS key size is wrong (should be %zu)",
                                sizeof(rss->key));
                        return EINVAL;
                }
@@ -1558,7 +1560,7 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode)
        }
 
        if ((offloads_supported & DEV_RX_OFFLOAD_RSS_HASH) &&
-           (~rxmode->offloads & DEV_RX_OFFLOAD_RSS_HASH))
+           (rxmode->mq_mode & ETH_MQ_RX_RSS_FLAG))
                rxmode->offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 
        return rc;