From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: tom@herbertland.com, pablo@netfilter.org, kaber@trash.net,
netfilter-devel@vger.kernel.org, netdev@vger.kernel.org,
herbert@gondor.apana.org.au
Subject: Re: [PATCH net] netfilter: xt_TCPMSS: handle CHECKSUM_COMPLETE in tcpmss_tg6()
Date: Fri, 15 Jan 2016 14:04:49 -0500 (EST) [thread overview]
Message-ID: <20160115.140449.1324683966791337294.davem@davemloft.net> (raw)
In-Reply-To: <1452878324.1223.188.camel@edumazet-glaptop2.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 15 Jan 2016 09:18:44 -0800
> On Fri, 2016-01-15 at 08:43 -0800, Tom Herbert wrote:
>
>> Probably should have a utility function do this. Maybe something like
>> update_hdr_field(skb, old, new)? Could return new value so above could
>> just be:
>>
>> ipv6h->payload_len = update_hdr_field(skb, ipv6h->payload_len,
>> htons(ntohs(oldlen) + ret);
>
> Well, oldlen would still need to be ipv6h->payload_len
>
> Not sure a helper will be nice for a stable submission.
>
> Probably better for net-next ?
Agreed. We already have those csum_replace{2,4}() helpers in net/checksum.h
which we could augment with ones that can handle length changes too.
next prev parent reply other threads:[~2016-01-15 19:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-15 16:21 [PATCH net] netfilter: xt_TCPMSS: handle CHECKSUM_COMPLETE in tcpmss_tg6() Eric Dumazet
2016-01-15 16:43 ` Tom Herbert
2016-01-15 17:18 ` Eric Dumazet
2016-01-15 17:25 ` Tom Herbert
2016-01-15 19:04 ` David Miller [this message]
2016-01-15 20:04 ` Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160115.140449.1324683966791337294.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=tom@herbertland.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).