From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, andrew+netdev@lunn.ch,
pavan.chebbi@broadcom.com, andrew.gospodarek@broadcom.com
Subject: [PATCH net-next v6 14/15] bnxt_en: Add support for inline transmit BDs
Date: Sun, 9 Aug 2026 22:13:57 -0700 [thread overview]
Message-ID: <20260810051358.1244418-15-michael.chan@broadcom.com> (raw)
In-Reply-To: <20260810051358.1244418-1-michael.chan@broadcom.com>
Newer chips (P5_PLUS) support inline transmit BDs that contain extra
data. One such use case is to transmit out-of-sequence kTLS packets
with encryption enabled. To account for these inline BDs during TX
completion, we add the inline_data_bds field to struct bnxt_sw_tx_bd
(tx_buf). tx_buf->is_push will always be set when sending these
inline BDs as the operation is similar to push packets. tx_buf->skb
will always be NULL as there is no associated SKB.
The next patch will make use of this feature.
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
v6:
Clear is_push and inline_data_bds during TX ring free.
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 21 ++++++++++++++++++---
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 +
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 15b329ee878b..55f999dbe7ad 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -848,7 +848,7 @@ static bool __bnxt_tx_int(struct bnxt *bp, struct bnxt_tx_ring_info *txr,
head_buf = tx_buf;
skb = tx_buf->skb;
- if (unlikely(!skb)) {
+ if (unlikely(!skb && !tx_buf->is_push)) {
bnxt_sched_reset_txr(bp, txr, cons);
return rc;
}
@@ -860,13 +860,22 @@ static bool __bnxt_tx_int(struct bnxt *bp, struct bnxt_tx_ring_info *txr,
}
cons = NEXT_TX(cons);
- tx_pkts++;
- tx_bytes += skb->len;
+ if (skb) {
+ tx_pkts++;
+ tx_bytes += skb->len;
+ }
tx_buf->skb = NULL;
tx_buf->is_ts_pkt = 0;
if (tx_buf->is_push) {
tx_buf->is_push = 0;
+ cons += tx_buf->inline_data_bds;
+ tx_buf->inline_data_bds = 0;
+ if (!skb) {
+ /* presync BD */
+ cons = NEXT_TX(cons);
+ continue;
+ }
goto next_tx_int;
}
@@ -3481,6 +3490,10 @@ static void bnxt_free_one_tx_ring_skbs(struct bnxt *bp,
skb = tx_buf->skb;
if (!skb) {
+ if (tx_buf->is_push) {
+ tx_buf->is_push = 0;
+ tx_buf->inline_data_bds = 0;
+ }
i++;
continue;
}
@@ -3489,6 +3502,8 @@ static void bnxt_free_one_tx_ring_skbs(struct bnxt *bp,
if (tx_buf->is_push) {
dev_kfree_skb(skb);
+ tx_buf->is_push = 0;
+ tx_buf->inline_data_bds = 0;
i += 2;
continue;
}
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
index 5ff70623e849..e500178d5f80 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
@@ -918,6 +918,7 @@ struct bnxt_sw_tx_bd {
u8 is_push;
u8 is_sw_gso;
u8 action;
+ u8 inline_data_bds;
unsigned short nr_frags;
union {
u16 rx_prod;
--
2.51.0
next prev parent reply other threads:[~2026-08-10 5:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 5:13 [PATCH net-next v6 00/15] bnxt_en: Add kTLS TX offload support Michael Chan
2026-08-10 5:13 ` [PATCH net-next v6 01/15] bnxt_en: Add Midpath channel information Michael Chan
2026-08-10 5:13 ` [PATCH net-next v6 02/15] bnxt_en: Account for the MPC TX and CP rings Michael Chan
2026-08-10 5:13 ` [PATCH net-next v6 03/15] bnxt_en: Set default MPC ring count Michael Chan
2026-08-10 5:13 ` [PATCH net-next v6 04/15] bnxt_en: Rename xdp_tx_lock to tx_lock Michael Chan
2026-08-10 5:13 ` [PATCH net-next v6 05/15] bnxt_en: Allocate and free MPC software structures Michael Chan
2026-08-10 5:13 ` [PATCH net-next v6 06/15] bnxt_en: Allocate and free MPC channels from firmware Michael Chan
2026-08-12 6:36 ` Michael Chan
2026-08-12 23:18 ` Jakub Kicinski
2026-08-10 5:13 ` [PATCH net-next v6 07/15] bnxt_en: Allocate crypto structure and backing store Michael Chan
2026-08-10 5:13 ` [PATCH net-next v6 08/15] bnxt_en: Reserve crypto RX and TX key contexts on a PF Michael Chan
2026-08-10 5:13 ` [PATCH net-next v6 09/15] bnxt_en: Add infrastructure for crypto key context IDs Michael Chan
2026-08-10 5:13 ` [PATCH net-next v6 10/15] bnxt_en: Add MPC transmit and completion functions Michael Chan
2026-08-12 6:59 ` Michael Chan
2026-08-10 5:13 ` [PATCH net-next v6 11/15] bnxt_en: Add crypto MPC transmit/completion infrastructure Michael Chan
2026-08-12 7:39 ` Michael Chan
2026-08-10 5:13 ` [PATCH net-next v6 12/15] bnxt_en: Support kTLS TX offload by implementing .tls_dev_add/del() Michael Chan
2026-08-10 5:13 ` [PATCH net-next v6 13/15] bnxt_en: Implement kTLS TX normal path Michael Chan
2026-08-10 5:13 ` Michael Chan [this message]
2026-08-10 5:13 ` [PATCH net-next v6 15/15] bnxt_en: Add kTLS retransmission support Michael Chan
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=20260810051358.1244418-15-michael.chan@broadcom.com \
--to=michael.chan@broadcom.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew.gospodarek@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.