From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: stable@dpdk.org,
Vasuthevan Maheswaran <vasuthevan.maheswaran@broadcom.com>
Subject: [PATCH v2 08/13] net/bnxt: fix LRO offload capability
Date: Sun, 27 Oct 2024 10:11:23 -0700 [thread overview]
Message-ID: <20241027171128.50221-9-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20241027171128.50221-1-ajit.khaparde@broadcom.com>
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(-)
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 1c25c57ca6..249fe7f6e5 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -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) {
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 0f3fd5326e..dc0bf6032b 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -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);
--
2.39.5 (Apple Git-154)
prev parent reply other threads:[~2024-10-27 17:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241027171128.50221-1-ajit.khaparde@broadcom.com>
2024-10-27 17:11 ` [PATCH v2 01/13] net/bnxt: fix TCP and UDP checksum flags Ajit Khaparde
2024-10-27 17:11 ` [PATCH v2 02/13] net/bnxt: fix bad action offset in Tx bd Ajit Khaparde
2024-10-27 17:11 ` Ajit Khaparde [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241027171128.50221-9-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=vasuthevan.maheswaran@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).