That patch is in the api-next branch now.

The checksum insertion override has basically three different states:
1) Override not set, i.e. odp_packet_l{3,4}_chksum_insert() not called for the 
packet
2) Override set: do not insert checksum
3) Override set: insert checksum

If the override is set, then checksum insertion should be according to it
regardless of the pktio checksum config setting, and if it is not set,
then the pktio config setting should be followed for the packet.

What is not clear is what happens if the override is set to "insert" when
the pktio capabilities indicate that the pktio checksum config flag cannot
be set. I suppose the behavior needs to be one of the following:

1) undefined behavior (the capa indicates that ODP cannot ever insert checksum)
2) checksum is not inserted but things work
3) checksum is inserted by ODP (the capability indicates just that the pktio
   checksum config setting cannot be set)

The current wording about pktio capabilities in the API, IMHO, implies 3,
but maybe that is not the desired behavior.

        Janne


Bogdan Pricope wrote:
> 
> Hi,
> 
> What is the status of this patch?
> 
> Can we assume this logic?
> 
> HW Supported       & configured          & override insert
>  => HW calculation
> HW Supported       & configured          & override NOT insert      =>
> NO HW calculation
> HW Supported       & NOT configured  & override insert              =>
> HW calculation
> HW Supported       & NOT configured  & override NOT insert      => NO
> HW calculation
> HW Not Supported
>            => NO HW calculation
> 
> On 3 April 2017 at 15:43, Bala Manoharan <bala.manoha...@linaro.org> wrote:
> > Reviewed-by: Balasubramanian Manoharan <bala.manoha...@linaro.org>
> >
> >
> > On 28 March 2017 at 16:37, Petri Savolainen <petri.savolai...@linaro.org> 
> > wrote:
> >> Checksum insertion has pktio interface level configuration
> >> options. Per packet override is needed for example when
> >> L4 checksumming is enabled and application forwards packets.
> >> Forwarded packets need to maintain original, end-to-end checksum
> >> value.
> >>
> >> Signed-off-by: Petri Savolainen <petri.savolai...@linaro.org>
> >> ---
> >>  include/odp/api/spec/packet.h | 26 ++++++++++++++++++++++++++
> >>  1 file changed, 26 insertions(+)
> >>
> >> diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h
> >> index 92c35ae..5439f23 100644
> >> --- a/include/odp/api/spec/packet.h
> >> +++ b/include/odp/api/spec/packet.h
> >> @@ -1366,6 +1366,32 @@ uint32_t odp_packet_l4_offset(odp_packet_t pkt);
> >>  int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset);
> >>
> >>  /**
> >> + * Layer 3 checksum insertion override
> >> + *
> >> + * Override checksum insertion configuration per packet. This per packet 
> >> setting
> >> + * overrides a higher level configuration for checksum insertion into a L3
> >> + * header during packet output processing.
> >> + *
> >> + * @param pkt     Packet handle
> >> + * @param l3      0: do not insert L3 checksum
> >> + *                1: insert L3 checksum
> >> + */
> >> +void odp_packet_l3_chksum_insert(odp_packet_t pkt, int l3);
> >> +
> >> +/**
> >> + * Layer 4 checksum insertion override
> >> + *
> >> + * Override checksum insertion configuration per packet. This per packet 
> >> setting
> >> + * overrides a higher level configuration for checksum insertion into a L4
> >> + * header during packet output processing.
> >> + *
> >> + * @param pkt     Packet handle
> >> + * @param l4      0: do not insert L4 checksum
> >> + *                1: insert L4 checksum
> >> + */
> >> +void odp_packet_l4_chksum_insert(odp_packet_t pkt, int l4);
> >> +
> >> +/**
> >>   * Packet flow hash value
> >>   *
> >>   * Returns the hash generated from the packet header. Use
> >> --
> >> 2.8.1
> >>

Reply via email to