[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <036b481e-ac5b-4e77-b93a-4badaf19e185@lunn.ch>
Date: Sat, 4 Nov 2023 15:56:59 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Hans Ulli Kroll <ulli.kroll@...glemail.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Michał Mirosław <mirq-linux@...e.qmqm.pl>,
Vladimir Oltean <olteanv@...il.com>,
linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 4/4] net: ethernet: cortina: Handle large frames
> @@ -1170,7 +1171,14 @@ static int gmac_map_tx_bufs(struct net_device *netdev, struct sk_buff *skb,
> word3 |= mtu;
> }
>
> - if (skb->ip_summed != CHECKSUM_NONE) {
> + if (skb->len >= ETH_FRAME_LEN) {
> + /* Hardware offloaded checksumming isn't working on frames
> + * bigger than 1514 bytes. Perhaps the buffer is only 1518
> + * bytes fitting mach a normal frame and a checksum?
mach ?
> + * Just bypass on bigger frames.
> + */
> + word1 |= TSS_BYPASS_BIT;
> + } else if (skb->ip_summed != CHECKSUM_NONE) {
I've never looked at how the network stack does checksums. But looking
at this patch, it made me wounder, how do you tell the stack it needs
to do a software checksum because the hardware cannot? Or for this
driver, is it always calculating a checksum, which is then ignored?
Maybe you can improve performance a little but disabling software
checksum when it is not needed?
Andrew
Powered by blists - more mailing lists