10/11/2022 11:08, Andrew Rybchenko:
> On 11/10/22 12:55, Morten Brørup wrote:
> >> From: Andrew Rybchenko [mailto:andrew.rybche...@oktetlabs.ru]
> >> Sent: Thursday, 10 November 2022 10.26
> >>
> >> Hi all,
> >>
> >> some drivers report RTE_MBUF_F_RX_IP_CKSUM_GOOD for IPv6 packets.
> >> For me it looks strange, but I see some technical reasons behind.
> > 
> > Please note: IPv6 packets by definition have no IP checksum.
> > 
> >> Documentation in lib/mbuf/rte_mbuf_core.h is a bit vague.
> >> Should UNKNOWN or NONE be used instead?
> > 
> > Certainly not NONE. Its description says: "the IP checksum is *not* correct 
> > in the packet [...]". But there is no incorrect IP checksum in the packet.
> > 
> 
> Thanks, I should read the definition of none more careful.
> 
> > I will argue against UNKNOWN. Its description says: "no information about 
> > the RX IP checksum". But we do have information about it! We know that the 
> > IP checksum is not there (the value is "NULL"), and that it is not supposed 
> > to be there (the value is supposed to be "NULL").
> > 
> 
> I thought that "no checksum" => "no information" => UNKNOWN
> 
> > So I consider GOOD the correct response here.
> > 
> > GOOD also means that the application can proceed processing the packet 
> > normally without further IP header checksum checking, so it's good for 
> > performance.
> > 
> 
> It is very important point and would be nice to have in GOOD
> case definition (both IP and L4 cases). It is the right
> motivation why GOOD makes sense for IPv6.
> 
> > It should be added to the description of RTE_MBUF_F_RX_IP_CKSUM_GOOD that 
> > IPv6 packets always return this value, because IPv6 packets have no IP 
> > header checksum, and that is what is expected of them.
> 
> Could you make a patch?

That would be perfect. I agree to use GOOD for IPv6 checksum.

> Bonus question is UDP checksum 0 case. GOOD as well?
> (just want to clarify the documentation while we're on it).

Good question :)


Reply via email to