On Wed, Mar 29, 2017 at 8:38 AM, Bogdan Pricope <[email protected]> wrote: > > What about: > > void odp_packet_out_l3_csum_override(odp_packet_t pkt, odp_bool_t compute);
That's a bit of a mouthful. Since chksum insertion only makes sense on output that's implied here, so I think Petri's name choices seem clear and natural. > > On 29 March 2017 at 16:16, Maxim Uvarov <[email protected]> wrote: > > On 03/29/17 13:10, Savolainen, Petri (Nokia - FI/Espoo) wrote: > >> > >> > >> From: Maxim Uvarov [mailto:[email protected]] > >> Sent: Wednesday, March 29, 2017 10:26 AM > >> To: Savolainen, Petri (Nokia - FI/Espoo) > >> <[email protected]> > >> Cc: Bill Fischofer <[email protected]>; lng-odp-forward > >> <[email protected]> > >> Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet: add per packet > >> checksum control > >> > >> I have few questions for better understanding of usage: > >> > >> if check sum is 0 it will be updated or left as zero. > >> if check sum is some wrong value (i.e. packet was modified), what is > >> expected? > >> if check sum is valid and this feature supported only in software, what is > >> expected? > >> Maxim. > >> > >> > >> Current value of the checksum field does not matter. This API (and the per > >> interface config option) controls only checksum insertion. When enabled, > >> ODP (HW) calculates checksum (before sending packet out of the interface) > >> and overwrites the checksum field with the new value. When disabled, ODP > >> does not overwrite the field. > >> > >> -Petri > >> > > > > I asked about that because of naming is a little bit confusing. How > > about define it as: > > > > void odp_packet_out_l2_csum_update(odp_packet_t pkt, odp_bool_t enable); > > void odp_packet_out_l3_csum_update(odp_packet_t pkt, odp_bool_t enable); > > > > Maxim.
