[v1,7/9] net/bnxt: fix to use RSS config from eth dev struct
Checks
Commit Message
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 | 1 -
drivers/net/bnxt/bnxt_ethdev.c | 4 +++-
drivers/net/bnxt/bnxt_rxq.c | 4 +---
3 files changed, 4 insertions(+), 5 deletions(-)
@@ -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;
@@ -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(ð_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);
@@ -168,10 +168,8 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
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];