Ok, then I guess you could give a shot at adding checksum offload support in 
the AF_XDP plugin.
I think that should roughly mean:
 - add a flag at interface creation such as "csum-enabled"
 - when this flag is set, in the rx function add something akin to 
https://git.fd.io/vpp/tree/src/vnet/devices/af_packet/node.c#n119 to set the 
various buffer metadatas needed for checksum offload

I'll add that to the back burner but I'll be happy to help you if you want to 
give it a shot.

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 11:21
> To: vpp-dev@lists.fd.io
> Subject: Fw: [vpp-dev] Question on checksum offload in veth+AF_XDP
> 
> 
> 
> Begin forwarded message:
> 
> Date: Wed, 9 Mar 2022 18:20:00 +0800
> From: Carl Lei <m...@xecycle.info>
> To: "Benoit Ganne (bganne)" <bga...@cisco.com>
> Subject: Re: [vpp-dev] Question on checksum offload in veth+AF_XDP
> Sorry, forgot to CC list.
> 
> Hi Benoit,
> 
> On Wed, 9 Mar 2022 09:45:58 +0000
> "Benoit Ganne (bganne)" <bga...@cisco.com> wrote:
> 
> > 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.
> 
> Yes, AF_PACKET works fine, but performance is...  iperf3 says 2Mbps for
> AF_PACKET, 7Gbps for AF_XDP.
> 
> Setup is
> host veth - VPP veth - L2 bridge - VPP veth - container veth,
> by AF_PACKET I mean both VPP veths are connected by AF_PACKET, same for
> AF_XDP.
> 
> This 7Gbps is different from my 10Gbps result yesterday, which is
> host veth - VPP veth - L2 bridge - VPP tap - container.
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20993): https://lists.fd.io/g/vpp-dev/message/20993
Mute This Topic: https://lists.fd.io/mt/89665215/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