From: Geetha sowjanya <gakula@marvell.com>
To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <kuba@kernel.org>, <davem@davemloft.net>, <pabeni@redhat.com>,
<edumazet@google.com>, <sgoutham@marvell.com>,
<gakula@marvell.com>, <sbhatta@marvell.com>, <hkelam@marvell.com>
Subject: [net PATCH] octeontx2-pf: Do not use HW TSO when gso_size < 16bytes
Date: Fri, 8 Mar 2024 17:27:22 +0530 [thread overview]
Message-ID: <20240308115722.14671-1-gakula@marvell.com> (raw)
Hardware doesn't support packet segmentation when segment size
is < 16 bytes. Hence add an additional check and use SW
segmentation in such case.
Fixes: 86d7476078b8 ("octeontx2-pf: TCP segmentation offload support").
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
---
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
index f828d32737af..2ac56abb3a0e 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
@@ -967,6 +967,13 @@ static bool is_hw_tso_supported(struct otx2_nic *pfvf,
{
int payload_len, last_seg_size;
+ /* Due to hw issue segment size less than 16 bytes
+ * are not supported. Hence do not offload such TSO
+ * segments.
+ */
+ if (skb_shinfo(skb)->gso_size < 16)
+ return false;
+
if (test_bit(HW_TSO, &pfvf->hw.cap_flag))
return true;
--
2.25.1
next reply other threads:[~2024-03-08 11:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 11:57 Geetha sowjanya [this message]
2024-03-08 13:58 ` [net PATCH] octeontx2-pf: Do not use HW TSO when gso_size < 16bytes Eric Dumazet
2024-03-11 6:41 ` [EXTERNAL] " Geethasowjanya Akula
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=20240308115722.14671-1-gakula@marvell.com \
--to=gakula@marvell.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkelam@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.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).