net/bnxt: cleanup MTU setting
Minor cleanup in bnxt_mtu_set_op() to move pre-mature
setting of jumbo flag post mtu check and remove
a redundant mtu set operation from rxq vnic configs.
Fixes: daef48efe5
("net/bnxt: support set MTU")
Cc: stable@dpdk.org
Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
This commit is contained in:
parent
a42ab1eb33
commit
89670e3b0f
@ -3037,15 +3037,15 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
|
||||
if (!eth_dev->data->nb_rx_queues)
|
||||
return -ENOTSUP;
|
||||
|
||||
/* Is there a change in mtu setting? */
|
||||
if (eth_dev->data->mtu == new_mtu)
|
||||
return 0;
|
||||
|
||||
if (new_mtu > RTE_ETHER_MTU)
|
||||
bp->flags |= BNXT_FLAG_JUMBO;
|
||||
else
|
||||
bp->flags &= ~BNXT_FLAG_JUMBO;
|
||||
|
||||
/* Is there a change in mtu setting? */
|
||||
if (eth_dev->data->mtu == new_mtu)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < bp->nr_vnics; i++) {
|
||||
struct bnxt_vnic_info *vnic = &bp->vnic_info[i];
|
||||
uint16_t size = 0;
|
||||
|
@ -402,10 +402,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
|
||||
rxq->rx_started = rxq->rx_deferred_start ? false : true;
|
||||
rxq->vnic = BNXT_GET_DEFAULT_VNIC(bp);
|
||||
|
||||
/* Configure mtu if it is different from what was configured before */
|
||||
if (!queue_idx)
|
||||
bnxt_mtu_set_op(eth_dev, eth_dev->data->mtu);
|
||||
|
||||
return 0;
|
||||
err:
|
||||
bnxt_rx_queue_release_op(eth_dev, queue_idx);
|
||||
|
Loading…
Reference in New Issue
Block a user