Hi Carl,

Indeed, there is no way in AF_XDP to detect whether the checksum is offloaded 
or not.
We could always add a flag but I am not sure it would worth it.
Can you try host-interface (AF_PACKET) and see if it solves your issue: 
https://s3-docs.fd.io/vpp/22.06/cli-reference/clis/clicmd_src_vnet_devices_af_packet.html
With veth, AF_XDP and AF_PACKET should have similar performance anyway.

Best
ben

> -----Original Message-----
> From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Carl Lei
> Sent: mercredi 9 mars 2022 02:56
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] Question on checksum offload in veth+AF_XDP
> 
> Hello list,
> 
> I configured an address in the kernel on one side of veth and attached
> the other side to VPP using AF_XDP, then I found that kernel-sent
> packets into this veth pair would be forwarded by VPP without fixing
> checksums.  Kernel seems to believe the veth has checksum offload
> features, well apparently it has not; the receiver then discards all
> TCP/UDP packets, but ICMP packets are accepted.  This can be fixed by
> `ethtool -K interface tx off` on the kernel side, but it is quite slow
> (~10Gbps); is this expected on AF_XDP with veth, or is there a toggle
> to fixup checksums on an AF_XDP interface, or should I use some other
> interface to connect to my running kernel?
> 
> I have tried `create tap`, but using vpp 22.02-release package for
> ubuntu focal running kernel 5.14.0-1024-oem, in rx-mode=adaptive it
> misses quite some packets (~3% packet loss in ping tests).  Using the
> same 22.02-release in ubuntu focal userspace but running kernel
> 5.16.12-arch1-1 (this is a ubuntu chroot on arch linux) it works
> fine.  Maybe something was fixed between the two kernels, but I want
> to run ubuntu kernels without busy polling, so unfortunately I cannot
> use tap for now.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20988): https://lists.fd.io/g/vpp-dev/message/20988
Mute This Topic: https://lists.fd.io/mt/89653493/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to