> -----Original Message-----
> From: Bala Manoharan [mailto:bala.manoha...@linaro.org]
> Sent: Thursday, December 08, 2016 11:16 AM
> To: Savolainen, Petri (Nokia - FI/Espoo) <petri.savolainen@nokia-bell-
> labs.com>
> Cc: lng-odp-forward <lng-odp@lists.linaro.org>
> Subject: Re: [lng-odp] [API-NEXT PATCH v3] api: ipsec: added IPSEC API
> 
> Regards,
> Bala
> 
> 
> On 8 December 2016 at 14:37, Savolainen, Petri (Nokia - FI/Espoo)
> <petri.savolai...@nokia-bell-labs.com> wrote:
> >
> >> > +
> >> > +/**
> >> > + * Fragmentation mode
> >> > + *
> >> > + * These options control outbound IP packet fragmentation offload.
> When
> >> offload
> >> > + * is enabled, IPSEC operation will determine if fragmentation is
> >> needed and
> >> > + * does it according to the mode.
> >> > + */
> >> > +typedef enum odp_ipsec_frag_mode_t {
> >> > +       /** Do not fragment IP packets */
> >> > +       ODP_IPSEC_FRAG_DISABLED = 0,
> >> > +
> >> > +       /** Fragment IP packet before IPSEC operation */
> >> > +       ODP_IPSEC_FRAG_BEFORE,
> >> > +
> >> > +       /** Fragment IP packet after IPSEC operation */
> >> > +       ODP_IPSEC_FRAG_AFTER,
> >> > +
> >> > +       /** Only check if IP fragmentation is needed,
> >> > +         * do not fragment packets. */
> >> > +       ODP_IPSEC_FRAG_CHECK
> >>
> >> What is the expected behaviour for this case of ODP_IPSEC_FRAG_CHECK?
> >> Does the implementation send an error code if the packet needs to be
> >> fragmented?
> >>
> >> -Bala
> >
> >
> > Yes, implementation checks packet length against MTU and returns this
> status ...
> 
> Okay. This could be done but it is simple and could be done by the
> application itself right? There is no value addition in implementation
> doing this.
> 

ODP_IPSEC_FRAG_DISABLED is there to indicate that even check is not needed. 
ODP_IPSEC_FRAG_CHECK offloads IPSEC header, pad, etc size calculation from 
application. Implementation needs to have size calculation code anyway for 
fragmentation offload anyway. Application is simpler when it does not need to 
include size calculation code for all IPSEC modes and algorithms.

-Petri

Reply via email to