From: Steffen Klassert <steffen.klassert@secunet.com>
To: Alexander Lobakin <alobakin@pm.me>
Cc: Dongseok Yi <dseok.yi@samsung.com>,
"David S. Miller" <davem@davemloft.net>,
<namkyu78.kim@samsung.com>, Jakub Kicinski <kuba@kernel.org>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
"Willem de Bruijn" <willemb@google.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net v2] udp: ipv4: manipulate network header of NATed UDP GRO fraglist
Date: Mon, 18 Jan 2021 13:58:14 +0100 [thread overview]
Message-ID: <20210118125814.GL3576117@gauss3.secunet.de> (raw)
In-Reply-To: <20210118121707.2130-1-alobakin@pm.me>
On Mon, Jan 18, 2021 at 12:17:34PM +0000, Alexander Lobakin wrote:
> > From: Steffen Klassert <steffen.klassert@secunet.com>
> > Date: Mon, 18 Jan 2021 07:37:59 +0100
> > On Fri, Jan 15, 2021 at 05:12:33PM +0000, Alexander Lobakin wrote:
> >>
> >> I used another approach, tried to make fraglist GRO closer to plain
> >> in terms of checksummming, as it is confusing to me why GSO packet
> >> should have CHECKSUM_UNNECESSARY.
> >
> > This is intentional. With fraglist GRO, we don't mangle packets
> > in the standard (non NAT) case. So the checksum is still correct
> > after segmentation. That is one reason why it has good forwarding
> > performance when software segmentation is needed. Checksuming
> > touches the whole packet and has a lot of overhead, so it is
> > heplfull to avoid it whenever possible.
> >
> > We should find a way to do the checksum only when we really
> > need it. I.e. only if the headers of the head skb changed.
>
> I suggest to do memcmp() between skb_network_header(skb) and
> skb_network_header(skb->frag_list) with the len of
> skb->data - skb_network_header(skb). This way we will detect changes
> in IPv4/IPv6 and UDP headers.
I thought about that too. Bbut with fraglist GRO, the length of
the packets can vary. Unlike standard GRO, there is no requirement
that the packets in the fraglist must be equal in length here. So
we can't compare the full headers. I think we need to test for
addresses and ports.
> If so, copy the full headers and fall back to the standard checksum,
> recalculation, else use the current path.
I agree that we should fallback to standard checksum recalculation
if the addresses or ports changed.
next prev parent reply other threads:[~2021-01-18 13:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210115133200epcas2p1f52efe7bbc2826ed12da2fde4e03e3b2@epcas2p1.samsung.com>
2021-01-15 13:20 ` Dongseok Yi
2021-01-15 17:12 ` Alexander Lobakin
2021-01-17 23:55 ` Dongseok Yi
2021-01-18 6:37 ` Steffen Klassert
2021-01-18 7:23 ` Dongseok Yi
2021-01-18 12:17 ` Alexander Lobakin
2021-01-18 12:58 ` Steffen Klassert [this message]
2021-01-18 13:27 ` Steffen Klassert
2021-01-20 6:55 ` Dongseok Yi
2021-01-21 12:28 ` Steffen Klassert
2021-01-21 12:47 ` Dongseok Yi
2021-01-21 12:13 ` Dongseok Yi
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=20210118125814.GL3576117@gauss3.secunet.de \
--to=steffen.klassert@secunet.com \
--cc=alobakin@pm.me \
--cc=davem@davemloft.net \
--cc=dseok.yi@samsung.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namkyu78.kim@samsung.com \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.com \
--cc=yoshfuji@linux-ipv6.org \
/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
all inboxes | Powered by JetHome®