Regards,
Bala

On 23 March 2017 at 17:40, Savolainen, Petri (Nokia - FI/Espoo)
<petri.savolai...@nokia-bell-labs.com> wrote:
>> >
>> >  /**
>> > @@ -381,11 +547,29 @@ typedef enum odp_ipsec_lookup_mode_t {
>> >         ODP_IPSEC_LOOKUP_DISABLED = 0,
>> >
>> >         /** Inbound SA lookup is enabled. Used SPI values must be
>> unique. */
>> > -       ODP_IPSEC_LOOKUP_IN_UNIQUE_SA
>> > +       ODP_IPSEC_LOOKUP_IN_UNIQUE_SPI,
>> > +
>> > +       /** Inbound SA lookup is enabled. Lookup matches both SPI and
>> > +         * destination IP address. Used SPI values must be unique. */
>> > +       ODP_IPSEC_LOOKUP_IN_DSTADDR_UNIQUE_SPI
>> >
>> >  } odp_ipsec_lookup_mode_t;
>>
>> odp_ipsec_lookup_mode_t is not added either in odp_ipsec_config() or
>> in odp_ipsec_capability().
>> I believe this should be added in both these struct?
>
>
> This is part of odp_ipsec_sa_param_t, so lookup config is per SA.

Does that mean that both SPI lookup and DEST ADDR lookup are mandatory?
Is there a reason lookup mode is per SA?

>
>
>>
>> >
>> >
>> >  /**
>> > + * Result event destination
>> > + */
>> > +typedef enum odp_ipsec_dest_mode_t {
>> > +       /** Destination for IPSEC result events is a queue. */
>> > +       ODP_IPSEC_DEST_QUEUE = 0,
>> > +
>> > +       /** Destination for IPSEC result events is the classifier.
>> > +        *  IPSEC capability 'cls_inline' determines if inline
>> classification
>> > +        *  is supported. */
>> > +       ODP_IPSEC_DEST_CLS
>> > +
>> > +} odp_ipsec_dest_mode_t;
>>
>> Should'nt we add a dest_mode ODP_IPSEC_DEST_PKTIO for outbound inline
>> when the packet is sent out through interface directly.
>
> This selection is for result events. For output direction, queue are the only 
> option (for events). Queue vs inline pktout is selected by 
> odp_ipsec_out_enq() vs odp_ipsec_out_inline(). Selection of output pktio (or 
> TM queue in the future) is parameters to odp_ipsec_out_inline().

Yes. But the odp_ipsec_dest_mode_t is available in SA params and if
the SA is configured in outbound direction and linked to the pktio
then the configuration of dest_mode cannot be ODP_IPSEC_DEST_QUEUE.

>
> -Petri
>
>
>

Reply via email to