Re: [PATCH net v2 3/4] ipv6: no CHECKSUM_PARTIAL on MSG_MORE corked sockets
From: Tom Herbert <hidden>
Date: 2015-10-27 18:37:22
On Tue, Oct 27, 2015 at 11:29 AM, Hannes Frederic Sowa [off-list ref] wrote:
On Tue, Oct 27, 2015, at 18:32, Tom Herbert wrote:quoted
On Tue, Oct 27, 2015 at 9:44 AM, Hannes Frederic Sowa [off-list ref] wrote:quoted
On Tue, Oct 27, 2015, at 17:36, Tom Herbert wrote:> > - if (cork->length + length > maxnonfragsize - headersize) {quoted
quoted
+ if (cork->length + length > maxnonfragsize - headersize) { emsgsize: - ipv6_local_error(sk, EMSGSIZE, fl6, - mtu - headersize + - sizeof(struct ipv6hdr)); - return -EMSGSIZE; - } + ipv6_local_error(sk, EMSGSIZE, fl6, + mtu - headersize + + sizeof(struct ipv6hdr)); + return -EMSGSIZE; } + /* CHECKSUM_PARTIAL only with no extension headers and whenNo, please don't do this. CHECKSUM_PARTIAL should work with extension headers as defined, so this is just disabling otherwise valid and useful functionality. If (some) drivers have problems with this they need to be identified and fixed.I don't understand. The old code already didn't allow the use of opt_flen with CHECKSUM_PARTIAL.Then that's a problem with the old code :-). Is there any other reason that we can't use CHECKSUM_PARTIAL with extension headers other than lack of correct driver support?The lack of correct driver support is a big bumper, but as I wrote, I don't see a reason to not lift this restriction in net-next. I proposed a new feature flag, or by looking at your series, we could probably use the extension header okay field for that.
Okay, but why bother doing this for net? This problem has obviously existed for a while, and even if the restriction is maintained here there are still other paths that don't go through ip_append_data that could trip the bug. Also, drivers are welcome to fix their issues in net I believe.
I would be conservative in net though. Bye, Hannes