net/sfc: fix an Rx queue double release possibility
[dpdk.git] / drivers / net / sfc / sfc_rx.c
index c6321d1..58c57ac 100644 (file)
@@ -793,7 +793,6 @@ sfc_rx_get_dev_offload_caps(struct sfc_adapter *sa)
        uint64_t caps = 0;
 
        caps |= DEV_RX_OFFLOAD_JUMBO_FRAME;
-       caps |= DEV_RX_OFFLOAD_CRC_STRIP;
 
        if (sa->dp_rx->features & SFC_DP_RX_FEAT_CHECKSUM) {
                caps |= DEV_RX_OFFLOAD_IPV4_CKSUM;
@@ -1104,6 +1103,7 @@ sfc_rx_qfini(struct sfc_adapter *sa, unsigned int sw_index)
        struct sfc_rxq *rxq;
 
        SFC_ASSERT(sw_index < sa->rxq_count);
+       sa->eth_dev->data->rx_queues[sw_index] = NULL;
 
        rxq_info = &sa->rxq_info[sw_index];
 
@@ -1201,7 +1201,7 @@ sfc_rx_hash_init(struct sfc_adapter *sa)
                return EINVAL;
 
        rc = efx_rx_scale_hash_flags_get(sa->nic, alg, flags_supp,
-                                        &nb_flags_supp);
+                                        RTE_DIM(flags_supp), &nb_flags_supp);
        if (rc != 0)
                return rc;
 
@@ -1441,14 +1441,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode)
                rc = EINVAL;
        }
 
-       /* KEEP_CRC offload flag is not supported by PMD
-        * can remove the below block when DEV_RX_OFFLOAD_CRC_STRIP removed
-        */
-       if (rte_eth_dev_must_keep_crc(rxmode->offloads)) {
-               sfc_warn(sa, "FCS stripping cannot be disabled - always on");
-               rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
-       }
-
        /*
         * Requested offloads are validated against supported by ethdev,
         * so unsupported offloads cannot be added as the result of