[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1538672124.3024.270.camel@codethink.co.uk>
Date: Thu, 04 Oct 2018 17:55:24 +0100
From: Ben Hutchings <ben.hutchings@...ethink.co.uk>
To: Ben Dooks <ben.dooks@...ethink.co.uk>, netdev@...r.kernel.org
Cc: linux-kernel@...ts.codethink.co.uk, linux-usb@...r.kernel.org,
oneukum@...e.com, linux-kernel@...r.kernel.org, davem@...emloft.net
Subject: Re: [Linux-kernel] [PATCH 3/4] usbnet: smsc95xx: check for csum
being in last four bytes
On Tue, 2018-10-02 at 10:26 +0100, Ben Dooks wrote:
[...]
> @@ -2031,7 +2045,8 @@ static struct sk_buff *smsc95xx_tx_fixup(struct usbnet *dev,
> > }
>
> if (csum) {
> - if (skb->len <= 45) {
> + /* note, csum does not work if csum in last DWORD of packet */
> + if (skb->len <= 45 || !smsc95xx_can_checksum(skb)) {
It would make more sense to move the length check into
smsc95xx_can_checksum() as well.
Ben.
> /* workaround - hardware tx checksum does not work
> * properly with extremely small packets */
> long csstart = skb_checksum_start_offset(skb);
--
Ben Hutchings, Software Developer Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United Kingdom
Powered by blists - more mailing lists