[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1368745249.2655.60.camel@bwh-desktop.uk.solarflarecom.com>
Date: Fri, 17 May 2013 00:00:49 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Francois Romieu <romieu@...zoreil.com>
CC: "David S. Miller" <davem@...emloft.net>, <netdev@...r.kernel.org>,
"Hayes Wang" <hayeswang@...ltek.com>,
Stefan Bader <stefan.bader@...onical.com>,
Holger Hoffstätte
<holger.hoffstaette@...glemail.com>
Subject: Re: [PATCH] r8169: fix offloaded tx checksum for small packets.
On Fri, 2013-05-17 at 00:38 +0200, Francois Romieu wrote:
> 8168evl offloaded checksums are wrong since
> e5195c1f31f399289347e043d6abf3ffa80f0005 pads small packets to
> 60 bytes (without ethernet checksum). Observed UDP checksums are
> typically wrong by the count of added bytes.
>
> It isn't worth compensating. Let's checksum by hand, then pad.
[...]
> @@ -5869,13 +5877,24 @@ static inline void rtl8169_tso_csum(struct rtl8169_private *tp,
> } else if (skb->ip_summed == CHECKSUM_PARTIAL) {
> const struct iphdr *ip = ip_hdr(skb);
>
> + if (unlikely(skb->len < ETH_ZLEN &&
> + (tp->mac_version == RTL_GIGA_MAC_VER_34))) {
> + skb_checksum_help(skb);
> + return rtl_skb_pad(skb);
[...]
skb_checksum_help() can fail, though it is unlikely for such a short
packet. So I think this should be:
return skb_checksum_help(skb) == 0 && rtl_skb_pad(skb);
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists