drivers/net: update Rx RSS hash offload capabilities
[dpdk.git] / drivers / net / bnxt / bnxt_ethdev.c
index a1e9c70..e39b873 100644 (file)
@@ -123,7 +123,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
                                     DEV_RX_OFFLOAD_KEEP_CRC | \
                                     DEV_RX_OFFLOAD_VLAN_EXTEND | \
                                     DEV_RX_OFFLOAD_TCP_LRO | \
-                                    DEV_RX_OFFLOAD_SCATTER)
+                                    DEV_RX_OFFLOAD_SCATTER | \
+                                    DEV_RX_OFFLOAD_RSS_HASH)
 
 static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
 static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
@@ -479,22 +480,6 @@ static int bnxt_shutdown_nic(struct bnxt *bp)
        return 0;
 }
 
-static int bnxt_init_nic(struct bnxt *bp)
-{
-       int rc;
-
-       if (BNXT_HAS_RING_GRPS(bp)) {
-               rc = bnxt_init_ring_grps(bp);
-               if (rc)
-                       return rc;
-       }
-
-       bnxt_init_vnics(bp);
-       bnxt_init_filters(bp);
-
-       return 0;
-}
-
 /*
  * Device configuration and status function
  */
@@ -689,6 +674,9 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
        bp->rx_cp_nr_rings = bp->rx_nr_rings;
        bp->tx_cp_nr_rings = bp->tx_nr_rings;
 
+       rx_offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+       eth_dev->data->dev_conf.rxmode.offloads = rx_offloads;
+
        if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
                eth_dev->data->mtu =
                        eth_dev->data->dev_conf.rxmode.max_rx_pkt_len -
@@ -4662,8 +4650,6 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
        if (rc)
                return rc;
 
-       bnxt_init_nic(bp);
-
        rc = bnxt_request_int(bp);
        if (rc)
                return rc;