drivers/net: fix RSS hash offload flag if no RSS
[dpdk.git] / drivers / net / iavf / iavf_ethdev.c
index 64037e1..a39ba14 100644 (file)
@@ -141,16 +141,14 @@ iavf_dev_configure(struct rte_eth_dev *dev)
        struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
 
        ad->rx_bulk_alloc_allowed = true;
-#ifdef RTE_LIBRTE_IAVF_INC_VECTOR
        /* Initialize to TRUE. If any of Rx queues doesn't meet the
         * vector Rx/Tx preconditions, it will be reset.
         */
        ad->rx_vec_allowed = true;
        ad->tx_vec_allowed = true;
-#else
-       ad->rx_vec_allowed = false;
-       ad->tx_vec_allowed = false;
-#endif
+
+       if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
+               dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 
        /* Vlan stripping setting */
        if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) {
@@ -527,7 +525,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
                DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
                DEV_RX_OFFLOAD_SCATTER |
                DEV_RX_OFFLOAD_JUMBO_FRAME |
-               DEV_RX_OFFLOAD_VLAN_FILTER;
+               DEV_RX_OFFLOAD_VLAN_FILTER |
+               DEV_RX_OFFLOAD_RSS_HASH;
        dev_info->tx_offload_capa =
                DEV_TX_OFFLOAD_VLAN_INSERT |
                DEV_TX_OFFLOAD_QINQ_INSERT |