All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: Paolo Abeni <pabeni@redhat.com>, Christoph Paasch <cpaasch@apple.com>
Cc: mptcp@lists.linux.dev, Geliang Tang <geliang.tang@suse.com>
Subject: Re: apropos https://github.com/multipath-tcp/mptcp_net-next/issues/265 (checksums)
Date: Tue, 3 May 2022 11:37:07 -0700 (PDT)	[thread overview]
Message-ID: <e868da1-c75e-2027-83f8-2aae37cfb923@linux.intel.com> (raw)
In-Reply-To: <3e23ea866374467e2c9aeec60049716b42d6634e.camel@redhat.com>

On Fri, 29 Apr 2022, Paolo Abeni wrote:

> Hello,
>
> I'm investigating the mentioned issue. Not strictily related to the
> observed failure, I think/fear we have a very serious problem WRT csum.
>
> Currently, AFAICS, we encode the csum converting the value returned
> from csum_fold(csum_partial(csum_unfold)) to be:
>
> https://elixir.bootlin.com/linux/v5.18-rc4/source/net/mptcp/options.c#L1343
>
> while the UDP/TCP csum store directly the result for the same
> operation:
>
> https://elixir.bootlin.com/linux/v5.18-rc4/source/net/core/dev.c#L3228
>

Another example where the checksum is usually assigned in the tcphdr shows 
similar direct assignment:

https://elixir.bootlin.com/linux/latest/source/net/ipv4/tcp_ipv4.c#L634

> I guess we are doing it wrong but we don't obseve any specific problem
> as tests runs on the same arch and we do swap on rx, too.

It looks that way to me as well... Back when we did interop with 
multipath-tcp.org (before moving to MPTCPv1, which was prior to 
upstreaming), we hadn't added checksum support yet.

> I think should see sistematic csum failure when the involved peers have
> different endianess (e.g. x86 vs arm). If anyone has easy access to
> both systems, could please verify the above?

Most ARM systems are also little-endian.

Aside from mixed-endian interop, there's also stack interop to consider. 
@Christoph, do you know if DSS checksums are interoperating with other 
MPTCPv1 stacks?


The emulated MIPS VM I tried to set up in qemu last year was not stable 
enough to even 'git clone' the kernel code, it would be worth trying that 
again with a cross-compiled kernel.

I noticed yesterday that the BPF CI is running big-endian tests on the z15 
architecture. I think that's through travis-ci. Do CI providers like 
Travis or Cirrus allow interop testing between multiple VMs?

Checking on other tools we could use to confirm checksum operation (and 
run on either big- or little-endian platforms), it looks like wireshark 
tries to track DSS checksums but does not verify them. Packetdrill seems 
to have some code (maybe incomplete?) for getting the checksum data from 
headers - would require some work to complete that code and add test 
cases.

>
> If the above is true the nasty part is that I don't see how to fix this
> without breaking the interop with bugged versions :////

Same :|

--
Mat Martineau
Intel

  reply	other threads:[~2022-05-03 18:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 10:08 apropos https://github.com/multipath-tcp/mptcp_net-next/issues/265 Paolo Abeni
2022-05-03 18:37 ` Mat Martineau [this message]
2022-05-04 16:41   ` apropos https://github.com/multipath-tcp/mptcp_net-next/issues/265 (checksums) Matthieu Baerts
2022-05-03 20:41 ` apropos https://github.com/multipath-tcp/mptcp_net-next/issues/265 Maxim Galaganov
2022-05-03 23:47   ` Mat Martineau
2022-05-04  9:52   ` Paolo Abeni
2022-05-04 14:30     ` Maxim Galaganov
2022-05-06  1:11       ` Mat Martineau
2022-05-07  0:49         ` Mat Martineau

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=e868da1-c75e-2027-83f8-2aae37cfb923@linux.intel.com \
    --to=mathew.j.martineau@linux.intel.com \
    --cc=cpaasch@apple.com \
    --cc=geliang.tang@suse.com \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.