[08/13] net/bnxt: fix LRO offload capability
Checks
Commit Message
Fix LRO offload capability for P7 devices.
Export the capability to the application only if compressed
Rx CQE mode is not enabled.
LRO aka TPA is not supported when compressed CQE mode is set.
Fixes: 3b56c3ffc182 ("net/bnxt: refactor code to support P7 devices")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Vasuthevan Maheswaran <vasuthevan.maheswaran@broadcom.com>
---
drivers/net/bnxt/bnxt_rxq.c | 7 ++++++-
drivers/net/bnxt/bnxt_rxr.c | 3 +++
2 files changed, 9 insertions(+), 1 deletion(-)
@@ -30,10 +30,12 @@ uint64_t bnxt_get_rx_port_offloads(struct bnxt *bp)
RTE_ETH_RX_OFFLOAD_KEEP_CRC |
RTE_ETH_RX_OFFLOAD_VLAN_FILTER |
RTE_ETH_RX_OFFLOAD_VLAN_EXTEND |
- RTE_ETH_RX_OFFLOAD_TCP_LRO |
RTE_ETH_RX_OFFLOAD_SCATTER |
RTE_ETH_RX_OFFLOAD_RSS_HASH;
+ if ((BNXT_CHIP_P7(bp) && !bnxt_compressed_rx_cqe_mode_enabled(bp)) ||
+ BNXT_CHIP_P5(bp))
+ rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TCP_LRO;
if (bp->flags & BNXT_FLAG_PTP_SUPPORTED)
rx_offload_capa |= RTE_ETH_RX_OFFLOAD_TIMESTAMP;
if (bp->vnic_cap_flags & BNXT_VNIC_CAP_VLAN_RX_STRIP)
@@ -244,6 +246,9 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
}
}
+ if (bnxt_compressed_rx_cqe_mode_enabled(rxq->bp))
+ return;
+
/* Free up mbufs in TPA */
tpa_info = rxq->rx_ring->tpa_info;
if (tpa_info) {
@@ -1671,6 +1671,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
}
PMD_DRV_LOG_LINE(DEBUG, "AGG Done!");
+ if (bnxt_compressed_rx_cqe_mode_enabled(rxq->bp))
+ return 0;
+
if (rxr->tpa_info) {
unsigned int max_aggs = BNXT_TPA_MAX_AGGS(rxq->bp);