From: Ajit Khaparde Date: Fri, 15 May 2020 11:25:11 +0000 (-0700) Subject: net/bnxt: fix using RSS config struct X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=39395b9d41aff5488db4924df94098abbe4d4e8c;p=dpdk.git net/bnxt: fix using RSS config struct 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 Reviewed-by: Kalesh AP --- diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index 7410db5e42..4093a2f01e 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -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; diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index b647450031..4d64a98351 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -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); diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index 457ebede0e..e42308a97f 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -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];