[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e80ea4e8f42c2113af358b971610f7341eb7494b.camel@redhat.com>
Date: Tue, 29 Nov 2022 19:08:27 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
edumazet@...gle.com
Subject: Re: [PATCH net-next] selftests/net: add csum offload test
On Mon, 2022-11-28 at 11:14 -0500, Willem de Bruijn wrote:
> On Mon, Nov 28, 2022 at 11:08 AM Paolo Abeni <pabeni@...hat.com> wrote:
> > On Mon, 2022-11-28 at 09:02 -0500, Willem de Bruijn wrote:
> > > From: Willem de Bruijn <willemb@...gle.com>
> > >
> > > Test NIC hardware checksum offload:
> > >
> > > - Rx + Tx
> > > - IPv4 + IPv6
> > > - TCP + UDP
> > >
> > > Optional features:
> > >
> > > - zero checksum 0xFFFF
> > > - checksum disable 0x0000
> > > - transport encap headers
> > > - randomization
> > >
> > > See file header for detailed comments.
> > >
> > > Expected results differ depending on NIC features:
> > >
> > > - CHECKSUM_UNNECESSARY vs CHECKSUM_COMPLETE
> > > - NETIF_F_HW_CSUM (csum_start/csum_off) vs NETIF_F_IP(V6)_CSUM
> > >
> > > Signed-off-by: Willem de Bruijn <willemb@...gle.com>
> >
> > I'm wondering if we could hook this into the self-tests list with a
> > suitable wrapper script, e.g. searching for a NIC exposing the loopback
> > feature, quering the NETIF_F_HW_CSUM/NETIF_F_IP(V6)_CSUM bit via
> > ethtool and guessing CHECKSUM_UNNECESSARY vs CHECKSUM_COMPLETE via the
> > received packet.
> >
> > If the host lacks a suitable device, the test is skipped. WDYT?
>
> We could. Optionally with ipvlan and two netns to really emulate a two
> host setup.
>
> I'm hesitant to include this into kselftests without warning though.
> Have too often had to debug tests that crashed and left a machine
> unreachable, because in loopback mode.
I see your point. The forwarding/loopback.sh test does nothing by
default without additional command line arguments, something similar
could work here, too.
I think it would still be valuable, because it will simplify automating
this kind of testing - compared to guessing the needed setup from the
binary alone.
> Either way, something to do as a separate follow-up patch?
Fine by me.
Thanks,
Paolo
Powered by blists - more mailing lists