net/bnxt: various fixes
cover net/bnxt: various fixes
Several fixes for the bnxt PMD:
- Fix NUMA-aware memory allocations.
- Fix transmit descriptor status implementation.
- Fix handling of transmit completions in non-vector path.
- Remove dead code.
Lance Richardson (4):
net/bnxt: fix ring and context memory allocation net/bnxt: fix tx desc status implementation net/bnxt: fix scalar Tx completion handling net/bnxt: remove dead code
drivers/net/bnxt/bnxt_cpr.h | 17 ------- drivers/net/bnxt/bnxt_ethdev.c | 71 +++++++++++++++------------ drivers/net/bnxt/bnxt_hwrm.c | 2 - drivers/net/bnxt/bnxt_ring.c | 31 ++++++------ drivers/net/bnxt/bnxt_ring.h | 2 +- drivers/net/bnxt/bnxt_rxq.c | 4 +- drivers/net/bnxt/bnxt_rxr.c | 11 ----- drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 3 -- drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 3 -- drivers/net/bnxt/bnxt_txq.c | 4 +- drivers/net/bnxt/bnxt_txr.c | 22 ++++----- drivers/net/bnxt/bnxt_vnic.c | 3 +- 12 files changed, 70 insertions(+), 103 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/4 net/bnxt: fix ring and context memory allocation
Use requested socket ID when allocating memory for transmit rings, receive rings, and completion queues. Use device NUMA ID when allocating context memory, notification queue rings, async completion queue rings, and VNIC attributes.
--- drivers/net/bnxt/bnxt_ethdev.c | 17 +++++++++-------- drivers/net/bnxt/bnxt_ring.c | 30 ++++++++++++++---------------- drivers/net/bnxt/bnxt_ring.h | 2 +- drivers/net/bnxt/bnxt_rxq.c | 4 ++-- drivers/net/bnxt/bnxt_txq.c | 4 ++-- drivers/net/bnxt/bnxt_vnic.c | 3 ++- 6 files changed, 30 insertions(+), 30 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +9 -8
@@ -580,13 +580,14 @@ static int bnxt_register_fc_ctx_mem(struct bnxt *bp)return rc; } -static int bnxt_alloc_ctx_mem_buf (char *type,size_t size, +static int bnxt_alloc_ctx_mem_buf (struct bnxt *bp,char *type,size_t size,struct bnxt_ctx_mem_buf_info *ctx) {if (!ctx)return -EINVAL ; - ctx->va =rte_zmalloc (type, size,0 ); + ctx->va =rte_zmalloc_socket (type, size,0 , + bp->eth_dev->device->numa_node);if (ctx->va ==NULL )return -ENOMEM ;rte_mem_lock_page (ctx->va);
@@ -610,7 +611,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)sprintf (type,"bnxt_rx_fc_in_" PCI_PRI_FMT , pdev->addr.domain, pdev->addr.bus, pdev->addr.devid, pdev->addr.function);/* 4 bytes for each counter-id */ - rc =bnxt_alloc_ctx_mem_buf (type, + rc =bnxt_alloc_ctx_mem_buf (bp, type, max_fc *4 , &bp->flow_stat->rx_fc_in_tbl);if (rc)
@@ -619,7 +620,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)sprintf (type,"bnxt_rx_fc_out_" PCI_PRI_FMT , pdev->addr.domain, pdev->addr.bus, pdev->addr.devid, pdev->addr.function);/* 16 bytes for each counter - 8 bytes pkt_count, 8 bytes byte_count */ - rc =bnxt_alloc_ctx_mem_buf (type, + rc =bnxt_alloc_ctx_mem_buf (bp, type, max_fc *16 , &bp->flow_stat->rx_fc_out_tbl);if (rc)
@@ -628,7 +629,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)sprintf (type,"bnxt_tx_fc_in_" PCI_PRI_FMT , pdev->addr.domain, pdev->addr.bus, pdev->addr.devid, pdev->addr.function);/* 4 bytes for each counter-id */ - rc =bnxt_alloc_ctx_mem_buf (type, + rc =bnxt_alloc_ctx_mem_buf (bp, type, max_fc *4 , &bp->flow_stat->tx_fc_in_tbl);if (rc)
@@ -637,7 +638,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)sprintf (type,"bnxt_tx_fc_out_" PCI_PRI_FMT , pdev->addr.domain, pdev->addr.bus, pdev->addr.devid, pdev->addr.function);/* 16 bytes for each counter - 8 bytes pkt_count, 8 bytes byte_count */ - rc =bnxt_alloc_ctx_mem_buf (type, + rc =bnxt_alloc_ctx_mem_buf (bp, type, max_fc *16 , &bp->flow_stat->tx_fc_out_tbl);if (rc)
@@ -4518,7 +4519,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,if (!mz) { mz = rte_memzone_reserve_aligned(mz_name, rmem->nr_pages * 8, - SOCKET_ID_ANY, + bp->eth_dev->device->numa_node, RTE_MEMZONE_2MB | RTE_MEMZONE_SIZE_HINT_ONLY | RTE_MEMZONE_IOVA_CONTIG,
@@ -4541,7 +4542,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,if (!mz) { mz = rte_memzone_reserve_aligned(mz_name, mem_size, - SOCKET_ID_ANY, + bp->eth_dev->device->numa_node, RTE_MEMZONE_1GB | RTE_MEMZONE_SIZE_HINT_ONLY | RTE_MEMZONE_IOVA_CONTIG,
drivers/net/bnxt/bnxt_ring.c +14 -16
@@ -94,7 +94,7 @@ int bnxt_alloc_ring_grps(struct bnxt *bp)* tx bd ring - Only non-zero length if tx_ring_info is not NULL * rx bd ring - Only non-zero length if rx_ring_info is not NULL */ -int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx, +int bnxt_alloc_rings(struct bnxt *bp, unsigned int socket_id, uint16_t qidx, struct bnxt_tx_queue *txq, struct bnxt_rx_queue *rxq, struct bnxt_cp_ring_info *cp_ring_info,
@@ -203,7 +203,7 @@ int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx, mz =rte_memzone_lookup (mz_name);if (!mz) { mz = rte_memzone_reserve_aligned(mz_name, total_alloc_len, - SOCKET_ID_ANY, + socket_id, RTE_MEMZONE_2MB | RTE_MEMZONE_SIZE_HINT_ONLY | RTE_MEMZONE_IOVA_CONTIG,
@@ -435,24 +435,23 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp)struct bnxt_cp_ring_info *nqr;struct bnxt_ring *ring;int ring_index =BNXT_NUM_ASYNC_CPR (bp); -unsigned int socket_id;uint8_t ring_type;int rc =0 ;if (!BNXT_HAS_NQ (bp) || bp->rxtx_nq_ring)return 0 ; - socket_id =rte_lcore_to_socket_id (rte_get_main_lcore ()); - nqr =rte_zmalloc_socket ("nqr" ,sizeof (struct bnxt_cp_ring_info ), -RTE_CACHE_LINE_SIZE , socket_id); +RTE_CACHE_LINE_SIZE , + bp->eth_dev->device->numa_node);if (nqr ==NULL )return -ENOMEM ; ring =rte_zmalloc_socket ("bnxt_cp_ring_struct" ,sizeof (struct bnxt_ring ), -RTE_CACHE_LINE_SIZE , socket_id); +RTE_CACHE_LINE_SIZE , + bp->eth_dev->device->numa_node);if (ring ==NULL ) {rte_free (nqr);return -ENOMEM ;
@@ -467,7 +466,8 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp) ring->fw_ring_id =INVALID_HW_RING_ID ; nqr->cp_ring_struct = ring; - rc =bnxt_alloc_rings (bp,0 ,NULL ,NULL , nqr,NULL ,"l2_nqr" ); + rc =bnxt_alloc_rings (bp, bp->eth_dev->device->numa_node,0 ,NULL , +NULL , nqr,NULL ,"l2_nqr" );if (rc) {rte_free (ring);rte_free (nqr);
@@ -805,22 +805,21 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp) {struct bnxt_cp_ring_info *cpr =NULL ;struct bnxt_ring *ring =NULL ; -unsigned int socket_id;if (BNXT_NUM_ASYNC_CPR (bp) ==0 )return 0 ; - socket_id =rte_lcore_to_socket_id (rte_get_main_lcore ()); - cpr =rte_zmalloc_socket ("cpr" ,sizeof (struct bnxt_cp_ring_info ), -RTE_CACHE_LINE_SIZE , socket_id); +RTE_CACHE_LINE_SIZE , + bp->eth_dev->device->numa_node);if (cpr ==NULL )return -ENOMEM ; ring =rte_zmalloc_socket ("bnxt_cp_ring_struct" ,sizeof (struct bnxt_ring ), -RTE_CACHE_LINE_SIZE , socket_id); +RTE_CACHE_LINE_SIZE , + bp->eth_dev->device->numa_node);if (ring ==NULL ) {rte_free (cpr);return -ENOMEM ;
@@ -836,7 +835,6 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp) bp->async_cp_ring = cpr; cpr->cp_ring_struct = ring; -return bnxt_alloc_rings (bp,0 ,NULL ,NULL , - bp->async_cp_ring,NULL , -"def_cp" ); +return bnxt_alloc_rings (bp, bp->eth_dev->device->numa_node,0 ,NULL , +NULL , bp->async_cp_ring,NULL ,"def_cp" ); }
drivers/net/bnxt/bnxt_ring.h +1 -1
@@ -67,7 +67,7 @@ struct bnxt_rx_ring_info;struct bnxt_cp_ring_info ;void bnxt_free_ring (struct bnxt_ring *ring);int bnxt_alloc_ring_grps (struct bnxt *bp); -int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx, +int bnxt_alloc_rings(struct bnxt *bp, unsigned int socket_id, uint16_t qidx, struct bnxt_tx_queue *txq, struct bnxt_rx_queue *rxq, struct bnxt_cp_ring_info *cp_ring_info,
drivers/net/bnxt/bnxt_rxq.c +2 -2
@@ -345,8 +345,8 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev, eth_dev->data->rx_queues[queue_idx] = rxq;/* Allocate RX ring hardware descriptors */ - rc =bnxt_alloc_rings (bp, queue_idx,NULL , rxq, rxq->cp_ring,NULL , -"rxr" ); + rc =bnxt_alloc_rings (bp, socket_id, queue_idx,NULL , rxq, rxq->cp_ring, +NULL ,"rxr" );if (rc) {PMD_DRV_LOG (ERR ,"ring_dma_zone_reserve for rx_ring failed!\n" );
drivers/net/bnxt/bnxt_txq.c +2 -2
@@ -149,8 +149,8 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, txq->port_id = eth_dev->data->port_id;/* Allocate TX ring hardware descriptors */ -if (bnxt_alloc_rings (bp, queue_idx, txq,NULL , txq->cp_ring,NULL , -"txr" )) { +if (bnxt_alloc_rings (bp, socket_id, queue_idx, txq,NULL , txq->cp_ring, +NULL ,"txr" )) {PMD_DRV_LOG (ERR ,"ring_dma_zone_reserve for tx_ring failed!" ); rc = -ENOMEM ; goto err;
drivers/net/bnxt/bnxt_vnic.c +2 -1
@@ -145,7 +145,8 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp) mz =rte_memzone_lookup (mz_name);if (!mz) { mz =rte_memzone_reserve (mz_name, - entry_length * max_vnics,SOCKET_ID_ANY , + entry_length * max_vnics, + bp->eth_dev->device->numa_node,RTE_MEMZONE_2MB |RTE_MEMZONE_SIZE_HINT_ONLY |RTE_MEMZONE_IOVA_CONTIG );
Signature · 1 line
2.25.1
PATCH 2/4 net/bnxt: fix tx desc status implementation
In reply to Lance RichardsonWith tx completion batching, a single transmit completion can correspond to one or more transmit descriptors, adjust implementation to account for this.
RTE_ETH_TX_DESC_DONE should be returned for descriptors that are available for use instead of RTE_ETH_TX_DESC_UNAVAIL.
--- drivers/net/bnxt/bnxt_ethdev.c | 54 +++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 23 deletions(-)
drivers/net/bnxt/bnxt_ethdev.c +31 -23
@@ -3296,41 +3296,49 @@ static int bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset) {struct bnxt_tx_queue *txq = (struct bnxt_tx_queue *)tx_queue; -struct bnxt_tx_ring_info *txr; -struct bnxt_cp_ring_info *cpr; -struct rte_mbuf **tx_buf; -struct tx_pkt_cmpl *txcmp; -uint32_t cons, cp_cons; +struct bnxt_cp_ring_info *cpr = txq->cp_ring; +uint32_t ring_mask, raw_cons, nb_tx_pkts =0 ; +struct bnxt_ring *cp_ring_struct; +struct cmpl_base *cp_desc_ring;int rc; -if (!txq) -return -EINVAL ; - rc =is_bnxt_in_error (txq->bp);if (rc)return rc; - cpr = txq->cp_ring; - txr = txq->tx_ring; -if (offset >= txq->nb_tx_desc)return -EINVAL ; - cons =RING_CMP (cpr->cp_ring_struct, offset); - txcmp = (struct tx_pkt_cmpl *)&cpr->cp_desc_ring[cons]; - cp_cons = cpr->cp_raw_cons; +/* Return "desc done" if descriptor is available for use. */ +if (bnxt_tx_bds_in_hw (txq) <= offset) +return RTE_ETH_TX_DESC_DONE ; -if (cons > cp_cons) { -if (CMPL_VALID (txcmp, cpr->valid)) -return RTE_ETH_TX_DESC_UNAVAIL ; - }else { -if (CMPL_VALID (txcmp, !cpr->valid)) -return RTE_ETH_TX_DESC_UNAVAIL ; + raw_cons = cpr->cp_raw_cons; + cp_desc_ring = cpr->cp_desc_ring; + cp_ring_struct = cpr->cp_ring_struct; + ring_mask = cpr->cp_ring_struct->ring_mask; + +/* Check to see if hw has posted a completion for the descriptor. */ +while (1 ) { +struct tx_cmpl *txcmp; +uint32_t cons; + + cons =RING_CMPL (ring_mask, raw_cons); + txcmp = (struct tx_cmpl *)&cp_desc_ring[cons]; + +if (!CMP_VALID (txcmp, raw_cons, cp_ring_struct)) +break ; + +if (CMP_TYPE (txcmp) ==TX_CMPL_TYPE_TX_L2 ) + nb_tx_pkts +=rte_le_to_cpu_32 (txcmp->opaque); + +if (nb_tx_pkts > offset) +return RTE_ETH_TX_DESC_DONE ; + + raw_cons =NEXT_RAW_CMP (raw_cons); } - tx_buf = &txr->tx_buf_ring[cons]; -if (*tx_buf ==NULL ) -return RTE_ETH_TX_DESC_DONE ; +/* Descriptor is pending transmit, not yet completed by hardware. */ return RTE_ETH_TX_DESC_FULL ; }
Signature · 1 line
2.25.1
PATCH 3/4 net/bnxt: fix scalar Tx completion handling
In reply to Lance RichardsonPreserve the raw (unmasked) transmit completion ring consumer index.
Remove cache prefetches that have no measurable performance benefit.
--- drivers/net/bnxt/bnxt_txr.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-)
drivers/net/bnxt/bnxt_txr.c +11 -13
@@ -444,30 +444,26 @@ static void bnxt_tx_cmp(struct bnxt_tx_queue *txq, int nr_pkts)static int bnxt_handle_tx_cp (struct bnxt_tx_queue *txq) { +uint32_t nb_tx_pkts =0 , cons, ring_mask, opaque;struct bnxt_cp_ring_info *cpr = txq->cp_ring;uint32_t raw_cons = cpr->cp_raw_cons; -uint32_t cons; -uint32_t nb_tx_pkts =0 ; +struct bnxt_ring *cp_ring_struct;struct tx_cmpl *txcmp; -struct cmpl_base *cp_desc_ring = cpr->cp_desc_ring; -struct bnxt_ring *cp_ring_struct = cpr->cp_ring_struct; -uint32_t ring_mask = cp_ring_struct->ring_mask; -uint32_t opaque =0 ;if (bnxt_tx_bds_in_hw (txq) < txq->tx_free_thresh)return 0 ; + cp_ring_struct = cpr->cp_ring_struct; + ring_mask = cp_ring_struct->ring_mask; + do { cons = RING_CMPL(ring_mask, raw_cons); txcmp = (struct tx_cmpl *)&cpr->cp_desc_ring[cons]; - rte_prefetch_non_temporal(&cp_desc_ring[(cons + 2) & - ring_mask]); - if (!CMPL_VALID(txcmp, cpr->valid)) + if (!CMP_VALID(txcmp, raw_cons, cp_ring_struct)) break; - opaque = rte_cpu_to_le_32(txcmp->opaque); - NEXT_CMPL(cpr, cons, cpr->valid, 1); - rte_prefetch0(&cp_desc_ring[cons]); + + opaque = rte_le_to_cpu_32(txcmp->opaque); if (CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2) nb_tx_pkts += opaque;
@@ -475,9 +471,11 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)RTE_LOG_DP (ERR ,PMD ,"Unhandled CMP type %02x\n" ,CMP_TYPE (txcmp)); - raw_cons = cons; + raw_cons =NEXT_RAW_CMP (raw_cons); }while (nb_tx_pkts < ring_mask); + cpr->valid = !!(raw_cons & cp_ring_struct->ring_size); +if (nb_tx_pkts) {if (txq->offloads &DEV_TX_OFFLOAD_MBUF_FAST_FREE )bnxt_tx_cmp_fast (txq, nb_tx_pkts);
Signature · 1 line
2.25.1
PATCH 4/4 net/bnxt: remove dead code
In reply to Lance RichardsonCode related to maintaining completion ring "valid" state is no longer needed, remove it.
--- drivers/net/bnxt/bnxt_cpr.h | 17 ----------------- drivers/net/bnxt/bnxt_hwrm.c | 2 -- drivers/net/bnxt/bnxt_ring.c | 1 - drivers/net/bnxt/bnxt_rxr.c | 11 ----------- drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 3 --- drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 3 --- drivers/net/bnxt/bnxt_txr.c | 2 -- 7 files changed, 39 deletions(-)
drivers/net/bnxt/bnxt_cpr.h +0 -17
@@ -15,14 +15,6 @@ struct bnxt_db_info; (!!(rte_le_to_cpu_32 (((struct cmpl_base *)(cmp))->info3_v) & \ CMPL_BASE_V) == !((raw_cons) & ((ring)->ring_size))) -#define CMPL_VALID (cmp, v) \ - (!!(rte_le_to_cpu_32(((struct cmpl_base *)(cmp))->info3_v) & \ - CMPL_BASE_V) == !(v)) - -#define NQ_CMP_VALID (nqcmp, raw_cons, ring) \ - (!!((nqcmp)->v & rte_cpu_to_le_32(NQ_CN_V)) == \ - !((raw_cons) & ((ring)->ring_size))) -#define CMP_TYPE (cmp) \ (((struct cmpl_base *)cmp)->type & CMPL_BASE_TYPE_MASK)
@@ -35,18 +27,10 @@ struct bnxt_db_info;#define RING_CMP (ring, idx) ((idx) & (ring)->ring_mask)#define RING_CMPL (ring_mask, idx) ((idx) & (ring_mask))#define NEXT_CMP (idx) RING_CMP(ADV_RAW_CMP(idx, 1)) -#define FLIP_VALID (cons, mask, val) ((cons) >= (mask) ? !(val) : (val))#define DB_CP_REARM_FLAGS (DB_KEY_CP | DB_IDX_VALID)#define DB_CP_FLAGS (DB_KEY_CP | DB_IDX_VALID | DB_IRQ_DIS) -#define NEXT_CMPL (cpr, idx, v, inc) do { \ - (idx) += (inc); \ - if (unlikely((idx) >= (cpr)->cp_ring_struct->ring_size)) { \ - (v) = !(v); \ - (idx) = 0; \ - } \ -} while (0)#define B_CP_DB_REARM (cpr, raw_cons) \ rte_write32((DB_CP_REARM_FLAGS | \ DB_RING_IDX(&((cpr)->cp_db), raw_cons)), \
@@ -107,7 +91,6 @@ struct bnxt_cp_ring_info {uint32_t hw_stats_ctx_id;struct bnxt_ring *cp_ring_struct; -bool valid; };#define RX_CMP_L2_ERRORS \
drivers/net/bnxt/bnxt_hwrm.c +0 -2
@@ -2670,7 +2670,6 @@ void bnxt_free_nq_ring(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)memset (cpr->cp_desc_ring,0 , cpr->cp_ring_struct->ring_size *sizeof (*cpr->cp_desc_ring)); cpr->cp_raw_cons =0 ; - cpr->valid =0 ; }void bnxt_free_cp_ring (struct bnxt *bp,struct bnxt_cp_ring_info *cpr)
@@ -2684,7 +2683,6 @@ void bnxt_free_cp_ring(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)memset (cpr->cp_desc_ring,0 , cpr->cp_ring_struct->ring_size *sizeof (*cpr->cp_desc_ring)); cpr->cp_raw_cons =0 ; - cpr->valid =0 ; }void bnxt_free_hwrm_rx_ring (struct bnxt *bp,int queue_index)
drivers/net/bnxt/bnxt_ring.c +0 -1
@@ -769,7 +769,6 @@ int bnxt_alloc_async_cp_ring(struct bnxt *bp)return rc; cpr->cp_raw_cons =0 ; - cpr->valid =0 ;bnxt_set_db (bp, &cpr->cp_db, ring_type,0 , cp_ring->fw_ring_id, cp_ring->ring_mask);
drivers/net/bnxt/bnxt_rxr.c +0 -11
@@ -297,9 +297,6 @@ static int bnxt_agg_bufs_valid(struct bnxt_cp_ring_info *cpr, raw_cp_cons =ADV_RAW_CMP (raw_cp_cons, agg_bufs); last_cp_cons =RING_CMP (cpr->cp_ring_struct, raw_cp_cons); agg_cmpl = (struct rx_pkt_cmpl *)&cpr->cp_desc_ring[last_cp_cons]; - cpr->valid =FLIP_VALID (raw_cp_cons, - cpr->cp_ring_struct->ring_mask, - cpr->valid);return CMP_VALID (agg_cmpl, raw_cp_cons, cpr->cp_ring_struct); }
@@ -898,10 +895,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,if (!CMP_VALID (rxcmp1, tmp_raw_cons, cpr->cp_ring_struct))return -EBUSY ; - cpr->valid =FLIP_VALID (cp_cons, - cpr->cp_ring_struct->ring_mask, - cpr->valid); -if (cmp_type ==RX_TPA_START_CMPL_TYPE_RX_TPA_START || cmp_type ==RX_TPA_START_V2_CMPL_TYPE_RX_TPA_START_V2 ) { bnxt_tpa_start(rxq, (struct rx_tpa_start_cmpl *)rxcmp,
@@ -1086,10 +1079,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,if (!CMP_VALID (rxcmp, raw_cons, cpr->cp_ring_struct))break ; - cpr->valid =FLIP_VALID (cons, - cpr->cp_ring_struct->ring_mask, - cpr->valid); -if (CMP_TYPE (rxcmp) ==CMPL_BASE_TYPE_HWRM_DONE ) {PMD_DRV_LOG (ERR ,"Rx flush done\n" ); } else if ((CMP_TYPE(rxcmp) >= CMPL_BASE_TYPE_RX_TPA_START_V2) &&
drivers/net/bnxt/bnxt_rxtx_vec_neon.c +0 -3
@@ -296,8 +296,6 @@ recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) rxq->rxrearm_nb += nb_rx_pkts; cpr->cp_raw_cons +=2 * nb_rx_pkts; - cpr->valid = - !!(cpr->cp_raw_cons & cpr->cp_ring_struct->ring_size);bnxt_db_cq (cpr); }
@@ -353,7 +351,6 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq) raw_cons =NEXT_RAW_CMP (raw_cons); }while (nb_tx_pkts < ring_mask); - cpr->valid = !!(raw_cons & cp_ring_struct->ring_size);if (nb_tx_pkts) {if (txq->offloads &DEV_TX_OFFLOAD_MBUF_FAST_FREE )bnxt_tx_cmp_vec_fast (txq, nb_tx_pkts);
drivers/net/bnxt/bnxt_rxtx_vec_sse.c +0 -3
@@ -277,8 +277,6 @@ recv_burst_vec_sse(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) rxq->rxrearm_nb += nb_rx_pkts; cpr->cp_raw_cons +=2 * nb_rx_pkts; - cpr->valid = - !!(cpr->cp_raw_cons & cpr->cp_ring_struct->ring_size);bnxt_db_cq (cpr); }
@@ -334,7 +332,6 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq) raw_cons =NEXT_RAW_CMP (raw_cons); }while (nb_tx_pkts < ring_mask); - cpr->valid = !!(raw_cons & cp_ring_struct->ring_size);if (nb_tx_pkts) {if (txq->offloads &DEV_TX_OFFLOAD_MBUF_FAST_FREE )bnxt_tx_cmp_vec_fast (txq, nb_tx_pkts);
drivers/net/bnxt/bnxt_txr.c +0 -2
@@ -474,8 +474,6 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq) raw_cons =NEXT_RAW_CMP (raw_cons); }while (nb_tx_pkts < ring_mask); - cpr->valid = !!(raw_cons & cp_ring_struct->ring_size); -if (nb_tx_pkts) {if (txq->offloads &DEV_TX_OFFLOAD_MBUF_FAST_FREE )bnxt_tx_cmp_fast (txq, nb_tx_pkts);
Signature · 1 line
2.25.1
Quoted 7 lines · Lance Richardson
Several fixes for the bnxt PMD:
- Fix NUMA-aware memory allocations.
- Fix transmit descriptor status implementation.
- Fix handling of transmit completions in non-vector path.
- Remove dead code.
Quoted 5 lines
Lance Richardson (4):
net/bnxt: fix ring and context memory allocation net/bnxt: fix tx desc status implementation net/bnxt: fix scalar Tx completion handling net/bnxt: remove dead code
Patchset applied to dpdk-next-net-brcm for-next-net branch.
Quoted 18 lines
drivers/net/bnxt/bnxt_cpr.h | 17 ------- drivers/net/bnxt/bnxt_ethdev.c | 71 +++++++++++++++------------ drivers/net/bnxt/bnxt_hwrm.c | 2 - drivers/net/bnxt/bnxt_ring.c | 31 ++++++------ drivers/net/bnxt/bnxt_ring.h | 2 +- drivers/net/bnxt/bnxt_rxq.c | 4 +- drivers/net/bnxt/bnxt_rxr.c | 11 ----- drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 3 -- drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 3 -- drivers/net/bnxt/bnxt_txq.c | 4 +- drivers/net/bnxt/bnxt_txr.c | 22 ++++----- drivers/net/bnxt/bnxt_vnic.c | 3 +- 12 files changed, 70 insertions(+), 103 deletions(-)--
2.25.1