RE: Definition and usage of NETIF_F_HW_SUM?
From: Ron Mercer <hidden>
Date: 2007-06-04 15:35:45
I was out of town last week and did not have a chance to respond. Yes, qla3xxx is (before Stephen's fix) broken on IPV6. I will review the changes and post a patch if necessary.
-----Original Message----- From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On Behalf Of Stephen Hemminger Sent: Tuesday, May 29, 2007 4:46 PM To: Michael Chan Cc: Herbert Xu; netdev Subject: Re: Definition and usage of NETIF_F_HW_SUM? On Tue, 29 May 2007 17:10:52 -0700 "Michael Chan" [off-list ref] wrote:quoted
On Wed, 2007-05-30 at 07:36 +1000, Herbert Xu wrote:quoted
I just checked e1000 and it's correct as it does use thecsum_offsetquoted
quoted
when doing TX offload. However, you're definitely right that bnx2 seems to be broken.quoted
A few devices take a offset, starting point, andinsertion point. This looks likequoted
quoted
quoted
the correct model. But no upper layer protocols otherthan IPV4/IPV6 can do checksumquoted
quoted
quoted
offload at present, so it seems moot.I could easily whip up a patch to get GRE to use it for a start :)quoted
IMHO the correct solution would be to get rid ifNETIF_F_HW_SUM and make a new flagquoted
quoted
quoted
NETIF_F_IPV6_SUM. Devices that can checksum both coulddo NETIF_F_IPV4_SUM|NETI_F_IPV6_SUM.quoted
quoted
We should definitely keep NETIF_F_HW_SUM for sanehardware such as thequoted
quoted
e1000. Unfortunately we may just have to invent IPV6_SUMfor the brokenquoted
quoted
ones. Ccing Michael to see if the bnx2 chip can actually do offset-based checksum offload.bnx2 and tg3 cannot do offset-based checksumming becausethe hardwarequoted
doesn't have room in the buffer descriptors to specify theoffsets. Soquoted
regrettably, the NETIF_F_HW_SUM flag has been misused inthese drivers.quoted
A new NETIF_F_IPV6_SUM flag will be very useful for us.Look furthur many drivers are just plain broken and use F_HW_SUM and can't even do IPV6 properly. I'll fix The worst code award goes to: qla3xxx.c which is broken on IPV6 and goes to trouble of computing all the offsets and they are already there in skb... -- Stephen Hemminger [off-list ref] - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html