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