net/bnxt: fix using RSS config struct
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Fri, 15 May 2020 11:25:11 +0000 (04:25 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 18 May 2020 18:35:57 +0000 (20:35 +0200)
There is no need to maintain local copy.
This helps reduce the size of the bnxt structure.

Fixes: fcc0aa1edc10 ("net/bnxt: add RSS hash configuration")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/bnxt_rxq.c

index 7410db5..4093a2f 100644 (file)
@@ -530,7 +530,6 @@ struct bnxt {
        void                            *bar0;
 
        struct rte_eth_dev              *eth_dev;
-       struct rte_eth_rss_conf         rss_conf;
        struct rte_pci_device           *pdev;
        void                            *doorbell_base;
 
index b647450..4d64a98 100644 (file)
@@ -1796,7 +1796,9 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
        }
 
        bp->flags |= BNXT_FLAG_UPDATE_HASH;
-       memcpy(&bp->rss_conf, rss_conf, sizeof(*rss_conf));
+       memcpy(&eth_dev->data->dev_conf.rx_adv_conf.rss_conf,
+              rss_conf,
+              sizeof(*rss_conf));
 
        /* Update the default RSS VNIC(s) */
        vnic = BNXT_GET_DEFAULT_VNIC(bp);
index 457ebed..e42308a 100644 (file)
@@ -168,10 +168,8 @@ out:
        if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
                struct rte_eth_rss_conf *rss = &dev_conf->rx_adv_conf.rss_conf;
 
-               if (bp->flags & BNXT_FLAG_UPDATE_HASH) {
-                       rss = &bp->rss_conf;
+               if (bp->flags & BNXT_FLAG_UPDATE_HASH)
                        bp->flags &= ~BNXT_FLAG_UPDATE_HASH;
-               }
 
                for (i = 0; i < bp->nr_vnics; i++) {
                        vnic = &bp->vnic_info[i];