On 03/29/17 13:10, Savolainen, Petri (Nokia - FI/Espoo) wrote: > > > From: Maxim Uvarov [mailto:maxim.uva...@linaro.org] > Sent: Wednesday, March 29, 2017 10:26 AM > To: Savolainen, Petri (Nokia - FI/Espoo) > <petri.savolai...@nokia-bell-labs.com> > Cc: Bill Fischofer <bill.fischo...@linaro.org>; lng-odp-forward > <lng-odp@lists.linaro.org> > 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.