net/bnxt: fix drop en in rxq get information
PATCH 1/2 net/bnxt: fix drop en in rxq get information
Return correct value for rx_drop_en. Add per-queue field to track rx_drop_en configuration.
Fixes 2fc201884be8 ("net/bnxt: support rxq/txq get information")
Signed-off-by Lance Richardson <[email protected]>
Reviewed-by Somnath Kotur <[email protected]>
Reviewed-by Ajit Khaparde <[email protected]>
--- drivers/net/bnxt/bnxt_ethdev.c | 5 ++--- drivers/net/bnxt/bnxt_rxq.c | 5 +++++ drivers/net/bnxt/bnxt_rxq.h | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +2 -3
@@ -887,8 +887,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, .wthresh = 0, }, .rx_free_thresh = 32, -/* If no descriptors available, pkts are dropped by default */ - .rx_drop_en = 1, + .rx_drop_en = BNXT_DEFAULT_RX_DROP_EN, }; dev_info->default_txconf = (struct rte_eth_txconf) {
@@ -2600,7 +2599,7 @@ bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->nb_desc = rxq->nb_rx_desc; qinfo->conf.rx_free_thresh = rxq->rx_free_thresh; - qinfo->conf.rx_drop_en =0 ; + qinfo->conf.rx_drop_en = rxq->drop_en; qinfo->conf.rx_deferred_start = rxq->rx_deferred_start; }
drivers/net/bnxt/bnxt_rxq.c +5 -0
@@ -330,6 +330,11 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev, rxq->rx_free_thresh =RTE_MIN (rte_align32pow2 (nb_desc) /4 ,RTE_BNXT_MAX_RX_BURST ); +if (rx_conf->rx_drop_en !=BNXT_DEFAULT_RX_DROP_EN ) +PMD_DRV_LOG (NOTICE , +"Per-queue config of drop-en is not supported.\n" ); + rxq->drop_en =BNXT_DEFAULT_RX_DROP_EN ; +PMD_DRV_LOG (DEBUG ,"RX Buf MTU %d\n" , eth_dev->data->mtu); rc =bnxt_init_rx_ring_struct (rxq, socket_id);
drivers/net/bnxt/bnxt_rxq.h +4 -0
@@ -9,6 +9,9 @@/* Maximum receive burst supported in vector mode. */ #define RTE_BNXT_MAX_RX_BURST 64U +/* Drop by default when receive desc is not available. */ +#define BNXT_DEFAULT_RX_DROP_EN 1 +struct bnxt ;struct bnxt_rx_ring_info ;struct bnxt_cp_ring_info ;
@@ -34,6 +37,7 @@ struct bnxt_rx_queue {uint8_t crc_len;/* 0 if CRC stripped, 4 otherwise */ uint8_t rx_deferred_start;/* not in global dev start */ uint8_t rx_started;/* RX queue is started */ +uint8_t drop_en;/* Drop when rx desc not available. */ struct bnxt *bp;int index;
Signature · 1 line
2.25.1
PATCH 2/2 net/bnxt: fix rxq/txq offload information get op
Return current offloads in rxq_info_get()/txq_info_get().
Fixes 2fc201884be8 ("net/bnxt: support rxq/txq get information")
Signed-off-by Lance Richardson <[email protected]>
Reviewed-by Somnath Kotur <[email protected]>
Reviewed-by Ajit Khaparde <[email protected]>
--- drivers/net/bnxt/bnxt_ethdev.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/bnxt/bnxt_ethdev.c +2 -0
@@ -2601,6 +2601,7 @@ bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->conf.rx_free_thresh = rxq->rx_free_thresh; qinfo->conf.rx_drop_en = rxq->drop_en; qinfo->conf.rx_deferred_start = rxq->rx_deferred_start; + qinfo->conf.offloads = dev->data->dev_conf.rxmode.offloads; } static void
@@ -2624,6 +2625,7 @@ bnxt_txq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->conf.tx_free_thresh = txq->tx_free_thresh; qinfo->conf.tx_rs_thresh =0 ; qinfo->conf.tx_deferred_start = txq->tx_deferred_start; + qinfo->conf.offloads = dev->data->dev_conf.txmode.offloads; } static const struct {
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH 2/2] net/bnxt: fix rxq/txq offload information get op
Quoted 1 line · Lance Richardson
Apologies for not sending a cover letter. I can resend if needed.
Lance
Re: [dpdk-dev] [PATCH 2/2] net/bnxt: fix rxq/txq offload information get op
In reply to Lance RichardsonQuoted 9 lines · Lance Richardson
Return current offloads in rxq_info_get()/txq_info_get().
Fixes 2fc201884be8 ("net/bnxt: support rxq/txq get information")Signed-off-by Lance Richardson <[email protected]>Reviewed-by Somnath Kotur <[email protected]>Reviewed-by Ajit Khaparde <[email protected]>
Patch applied to dpdk-next-net-brcm. Thanks
Quoted 27 lines
--- drivers/net/bnxt/bnxt_ethdev.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/bnxt/bnxt_ethdev.c +2
-1@@ -2601,6 +2601,7 @@ bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->conf.rx_free_thresh = rxq->rx_free_thresh; qinfo->conf.rx_drop_en = rxq->drop_en; qinfo->conf.rx_deferred_start = rxq->rx_deferred_start; + qinfo->conf.offloads = dev->data->dev_conf.rxmode.offloads; } static void@@ -2624,6 +2625,7 @@ bnxt_txq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->conf.tx_free_thresh = txq->tx_free_thresh; qinfo->conf.tx_rs_thresh =0 ; qinfo->conf.tx_deferred_start = txq->tx_deferred_start; + qinfo->conf.offloads = dev->data->dev_conf.txmode.offloads; } static const struct { --2.25.1