I sent v3 which adds data range as output. There are small differences between 
NICs on what is included to the sum, e.g. some include IP options, others 
don't. So, it's better not to force all implementations to the same data range, 
since (as Janne said) it would cause implementations to always adjust the sum - 
also when an application is not interested about it. Sum cannot be "lazy" 
adjusted as application might have modified the data already.

-Petri


> -----Original Message-----
> From: Peltonen, Janne (Nokia - FI/Espoo)
> Sent: Thursday, October 26, 2017 11:45 AM
> To: Savolainen, Petri (Nokia - FI/Espoo) <petri.savolai...@nokia.com>;
> Github ODP bot <odp...@yandex.ru>; lng-odp@lists.linaro.org
> Subject: Re: [lng-odp] [PATCH API-NEXT v2 0/3] api: ones complement
> metadata
> 
> As discussed offline with Petri, I feel that it would be useful
> to let the ODP implementation tell from which packet offset the
> sum calculation starts (or even let the implementation specify
> the range, i.e. also the end).
> 
> The rationale is that even though starting from L4 offset is
> reasonable from API point-of-view, different HW may start the
> sum calculation from different offsets and fixing the sum in
> SW is somewhat costly in those cases where the application is
> not actually interested in the sum, for example:
> 
> - An application both forwards packets receives packets locally
>   and needs checksum checking only for the locally received packets.
> - An application receives all incoming traffic locally, but drops
>   some of it before it event wants to check the checksum (e.g.
>   QoS filtering, one fragment lost, packet to wrong TCP port).
> 
>       Janne
> 
> > -----Original Message-----
> > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
> Savolainen, Petri
> > (Nokia - FI/Espoo)
> > Sent: Thursday, October 26, 2017 10:00 AM
> > To: Github ODP bot <odp...@yandex.ru>; lng-odp@lists.linaro.org
> > Subject: Suspected SPAM - Re: [lng-odp] [PATCH API-NEXT v2 0/3] api:
> ones complement
> > metadata
> >
> > [This sender failed our fraud detection checks and may not be who they
> appear to be. Learn
> > about spoofing at http://aka.ms/LearnAboutSpoofing]
> >
> > Ping.
> >
> > > -----Original Message-----
> > > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
> > > Github ODP bot
> > > Sent: Monday, October 23, 2017 1:00 PM
> > > To: lng-odp@lists.linaro.org
> > > Subject: [lng-odp] [PATCH API-NEXT v2 0/3] api: ones complement
> metadata
> > >
> > > Added packet metadata for ones complement sum over IP
> > > payload in a packet. Some NICs calculate the sum
> > > during packet input (at least for IP fragments) and
> > > store the value into the packet descriptor. This offloads
> > > L4 checksum calculation for IP fragments as SW does not
> > > need sum all payload data, but just combine pre-calculated
> > > sums from packet descriptors and remove extra header fields
> > > from the sum.

Reply via email to