From: Vladimir Oltean <olteanv@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Household Cang <canghousehold@aol.com>,
Romain Gantois <romain.gantois@bootlin.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net v5 1/2] net: ethernet: cortina: Drop software checksum and TSO
Date: Fri, 5 Jan 2024 13:32:47 +0200 [thread overview]
Message-ID: <20240105113247.wml4ldq3abvizi2a@skbuf> (raw)
In-Reply-To: <20240102-new-gemini-ethernet-regression-v5-1-cf61ab3aa8cd@linaro.org>
On Tue, Jan 02, 2024 at 09:34:25PM +0100, Linus Walleij wrote:
> @@ -1143,39 +1142,13 @@ static int gmac_map_tx_bufs(struct net_device *netdev, struct sk_buff *skb,
> struct gmac_txdesc *txd;
> skb_frag_t *skb_frag;
> dma_addr_t mapping;
> - unsigned short mtu;
> void *buffer;
> - int ret;
> -
> - mtu = ETH_HLEN;
> - mtu += netdev->mtu;
> - if (skb->protocol == htons(ETH_P_8021Q))
> - mtu += VLAN_HLEN;
>
> + /* TODO: implement proper TSO using MTU in word3 */
> word1 = skb->len;
> - word3 = SOF_BIT;
> -
> - if (word1 > mtu) {
> - word1 |= TSS_MTU_ENABLE_BIT;
> - word3 |= mtu;
> - }
> + word3 = SOF_BIT | skb->len;
>
> - if (skb->len >= ETH_FRAME_LEN) {
> - /* Hardware offloaded checksumming isn't working on frames
> - * bigger than 1514 bytes. A hypothesis about this is that the
> - * checksum buffer is only 1518 bytes, so when the frames get
> - * bigger they get truncated, or the last few bytes get
> - * overwritten by the FCS.
> - *
> - * Just use software checksumming and bypass on bigger frames.
> - */
> - if (skb->ip_summed == CHECKSUM_PARTIAL) {
> - ret = skb_checksum_help(skb);
> - if (ret)
> - return ret;
> - }
> - word1 |= TSS_BYPASS_BIT;
> - } else if (skb->ip_summed == CHECKSUM_PARTIAL) {
So are you taking back the statement that "Hardware offloaded
checksumming isn't working on frames bigger than 1514 bytes"?
Have you increased the interface MTU beyond 1500, and tested with plain
TCP (no DSA) on top of it? Who will provide the TCP checksum for them now?
I don't understand why you remove the skb_checksum_help() call.
It doesn't play nice with skb_is_gso() packets, agreed, but you removed
the TSO netdev feature.
> + if (skb->ip_summed == CHECKSUM_PARTIAL) {
> int tcp = 0;
>
> /* We do not switch off the checksumming on non TCP/UDP
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2024-01-05 11:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-02 20:34 [PATCH net v5 0/2] Fix a regression in the Gemini ethernet controller Linus Walleij
2024-01-02 20:34 ` [PATCH net v5 1/2] net: ethernet: cortina: Drop software checksum and TSO Linus Walleij
2024-01-04 0:24 ` Vladimir Oltean
2024-01-05 0:00 ` Linus Walleij
2024-01-05 11:32 ` Vladimir Oltean [this message]
2024-01-05 14:36 ` Eric Dumazet
2024-01-05 23:35 ` Linus Walleij
2024-01-05 14:40 ` Eric Dumazet
2024-01-02 20:34 ` [PATCH net v5 2/2] net: ethernet: cortina: Bypass checksumming engine of alien ethertypes Linus Walleij
2024-01-04 0:53 ` Vladimir Oltean
2024-01-06 0:17 ` Linus Walleij
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=20240105113247.wml4ldq3abvizi2a@skbuf \
--to=olteanv@gmail.com \
--cc=canghousehold@aol.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=romain.gantois@bootlin.com \
--cc=ulli.kroll@googlemail.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