Message ID | 20170714124357.7926-1-petri.savolainen@linaro.org |
---|---|
State | Accepted |
Commit | 0c31364968b9c615d668388682e666806bcd2dd6 |
Headers | show |
This should also be reviewed by Bala and Nikhil, but it looks reasonable to me and reflects the discussion we had earlier this week. On Fri, Jul 14, 2017 at 7:43 AM, Petri Savolainen < petri.savolainen@linaro.org> wrote: > Add status ID for warning messages. Outbound inline soft lifetime > expiration is currently the only source of these events. API spec > keeps simple when the same warning structure is shared with IPSEC > packet and status events. > > Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> > Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > include/odp/api/spec/ipsec.h | 33 +++++++++++++++++++++++++++------ > 1 file changed, 27 insertions(+), 6 deletions(-) > > diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h > index de126c37..7085bc0d 100644 > --- a/include/odp/api/spec/ipsec.h > +++ b/include/odp/api/spec/ipsec.h > @@ -1123,8 +1123,26 @@ typedef struct odp_ipsec_packet_result_t { > * IPSEC status ID > */ > typedef enum odp_ipsec_status_id_t { > - /** Response to SA disable command */ > - ODP_IPSEC_STATUS_SA_DISABLE = 0 > + /** Response to SA disable command > + * > + * Following status event (odp_ipsec_status_t) fields have valid > + * content, other fields must be ignored: > + * - sa: The SA that was requested to be disabled > + * - result: Operation result > + */ > + ODP_IPSEC_STATUS_SA_DISABLE = 0, > + > + /** Warning from inline IPSEC processing > + * > + * Following status event (odp_ipsec_status_t) fields have valid > + * content, other fields must be ignored: > + * - sa: The SA that caused the warning > + * - warn: The warning(s) reported by this event > + * > + * This status event is generated only for outbound SAs in > + * ODP_IPSEC_OP_MODE_INLINE mode. > + */ > + ODP_IPSEC_STATUS_WARN > > } odp_ipsec_status_id_t; > > @@ -1135,15 +1153,18 @@ typedef struct odp_ipsec_status_t { > /** IPSEC status ID */ > odp_ipsec_status_id_t id; > > - /** Return value from the operation > + /** IPSEC SA that was target of the operation */ > + odp_ipsec_sa_t sa; > + > + /** Result of the operation > * > * 0: Success > * <0: Failure > */ > - int ret; > + int result; > > - /** IPSEC SA that was target of the operation */ > - odp_ipsec_sa_t sa; > + /** Warnings of an ODP_IPSEC_STATUS_WARN status event */ > + odp_ipsec_warn_t warn; > > } odp_ipsec_status_t; > > -- > 2.13.0 > >
On 14.07.2017 15:43, Petri Savolainen wrote: > Add status ID for warning messages. Outbound inline soft lifetime > expiration is currently the only source of these events. API spec > keeps simple when the same warning structure is shared with IPSEC > packet and status events. > > Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Ideally we can have a config option to enable/disable sending such events in ASYNC or even SYNC mode. > --- > include/odp/api/spec/ipsec.h | 33 +++++++++++++++++++++++++++------ > 1 file changed, 27 insertions(+), 6 deletions(-) > > diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h > index de126c37..7085bc0d 100644 > --- a/include/odp/api/spec/ipsec.h > +++ b/include/odp/api/spec/ipsec.h > @@ -1123,8 +1123,26 @@ typedef struct odp_ipsec_packet_result_t { > * IPSEC status ID > */ > typedef enum odp_ipsec_status_id_t { > - /** Response to SA disable command */ > - ODP_IPSEC_STATUS_SA_DISABLE = 0 > + /** Response to SA disable command > + * > + * Following status event (odp_ipsec_status_t) fields have valid > + * content, other fields must be ignored: > + * - sa: The SA that was requested to be disabled > + * - result: Operation result > + */ > + ODP_IPSEC_STATUS_SA_DISABLE = 0, > + > + /** Warning from inline IPSEC processing > + * > + * Following status event (odp_ipsec_status_t) fields have valid > + * content, other fields must be ignored: > + * - sa: The SA that caused the warning > + * - warn: The warning(s) reported by this event > + * > + * This status event is generated only for outbound SAs in > + * ODP_IPSEC_OP_MODE_INLINE mode. > + */ > + ODP_IPSEC_STATUS_WARN > > } odp_ipsec_status_id_t; > > @@ -1135,15 +1153,18 @@ typedef struct odp_ipsec_status_t { > /** IPSEC status ID */ > odp_ipsec_status_id_t id; > > - /** Return value from the operation > + /** IPSEC SA that was target of the operation */ > + odp_ipsec_sa_t sa; > + > + /** Result of the operation > * > * 0: Success > * <0: Failure > */ > - int ret; > + int result; > > - /** IPSEC SA that was target of the operation */ > - odp_ipsec_sa_t sa; > + /** Warnings of an ODP_IPSEC_STATUS_WARN status event */ > + odp_ipsec_warn_t warn; > > } odp_ipsec_status_t; > > -- With best wishes Dmitry
On Fri, Jul 14, 2017 at 8:30 AM, Dmitry Eremin-Solenikov < dmitry.ereminsolenikov@linaro.org> wrote: > On 14.07.2017 15:43, Petri Savolainen wrote: > > Add status ID for warning messages. Outbound inline soft lifetime > > expiration is currently the only source of these events. API spec > > keeps simple when the same warning structure is shared with IPSEC > > packet and status events. > > > > Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> > > Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> > > Ideally we can have a config option to enable/disable sending such > events in ASYNC or even SYNC mode. > If you don't want the notification wouldn't you just not set an expiration limit in the SA? That would seem the simplest solution. > > > --- > > include/odp/api/spec/ipsec.h | 33 +++++++++++++++++++++++++++------ > > 1 file changed, 27 insertions(+), 6 deletions(-) > > > > diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h > > index de126c37..7085bc0d 100644 > > --- a/include/odp/api/spec/ipsec.h > > +++ b/include/odp/api/spec/ipsec.h > > @@ -1123,8 +1123,26 @@ typedef struct odp_ipsec_packet_result_t { > > * IPSEC status ID > > */ > > typedef enum odp_ipsec_status_id_t { > > - /** Response to SA disable command */ > > - ODP_IPSEC_STATUS_SA_DISABLE = 0 > > + /** Response to SA disable command > > + * > > + * Following status event (odp_ipsec_status_t) fields have valid > > + * content, other fields must be ignored: > > + * - sa: The SA that was requested to be disabled > > + * - result: Operation result > > + */ > > + ODP_IPSEC_STATUS_SA_DISABLE = 0, > > + > > + /** Warning from inline IPSEC processing > > + * > > + * Following status event (odp_ipsec_status_t) fields have valid > > + * content, other fields must be ignored: > > + * - sa: The SA that caused the warning > > + * - warn: The warning(s) reported by this event > > + * > > + * This status event is generated only for outbound SAs in > > + * ODP_IPSEC_OP_MODE_INLINE mode. > > + */ > > + ODP_IPSEC_STATUS_WARN > > > > } odp_ipsec_status_id_t; > > > > @@ -1135,15 +1153,18 @@ typedef struct odp_ipsec_status_t { > > /** IPSEC status ID */ > > odp_ipsec_status_id_t id; > > > > - /** Return value from the operation > > + /** IPSEC SA that was target of the operation */ > > + odp_ipsec_sa_t sa; > > + > > + /** Result of the operation > > * > > * 0: Success > > * <0: Failure > > */ > > - int ret; > > + int result; > > > > - /** IPSEC SA that was target of the operation */ > > - odp_ipsec_sa_t sa; > > + /** Warnings of an ODP_IPSEC_STATUS_WARN status event */ > > + odp_ipsec_warn_t warn; > > > > } odp_ipsec_status_t; > > > > > > > -- > With best wishes > Dmitry >
From: Bill Fischofer [mailto:bill.fischofer@linaro.org] Sent: Friday, July 14, 2017 4:40 PM To: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Cc: Petri Savolainen <petri.savolainen@linaro.org>; lng-odp-forward <lng-odp@lists.linaro.org> Subject: Re: [lng-odp] [API-NEXT PATCH] api: ipsec: add warning status event On Fri, Jul 14, 2017 at 8:30 AM, Dmitry Eremin-Solenikov <mailto:dmitry.ereminsolenikov@linaro.org> wrote: On 14.07.2017 15:43, Petri Savolainen wrote: > Add status ID for warning messages. Outbound inline soft lifetime > expiration is currently the only source of these events. API spec > keeps simple when the same warning structure is shared with IPSEC > packet and status events. > > Signed-off-by: Petri Savolainen <mailto:petri.savolainen@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <mailto:dmitry.ereminsolenikov@linaro.org> Ideally we can have a config option to enable/disable sending such events in ASYNC or even SYNC mode. If you don't want the notification wouldn't you just not set an expiration limit in the SA? That would seem the simplest solution. This spec limits event generation just for outbound inline: "This status event is generated only for outbound SAs in ODP_IPSEC_OP_MODE_INLINE mode." -Petri
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> On 14 July 2017 at 18:13, Petri Savolainen <petri.savolainen@linaro.org> wrote: > Add status ID for warning messages. Outbound inline soft lifetime > expiration is currently the only source of these events. API spec > keeps simple when the same warning structure is shared with IPSEC > packet and status events. > > Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> > --- > include/odp/api/spec/ipsec.h | 33 +++++++++++++++++++++++++++------ > 1 file changed, 27 insertions(+), 6 deletions(-) > > diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h > index de126c37..7085bc0d 100644 > --- a/include/odp/api/spec/ipsec.h > +++ b/include/odp/api/spec/ipsec.h > @@ -1123,8 +1123,26 @@ typedef struct odp_ipsec_packet_result_t { > * IPSEC status ID > */ > typedef enum odp_ipsec_status_id_t { > - /** Response to SA disable command */ > - ODP_IPSEC_STATUS_SA_DISABLE = 0 > + /** Response to SA disable command > + * > + * Following status event (odp_ipsec_status_t) fields have valid > + * content, other fields must be ignored: > + * - sa: The SA that was requested to be disabled > + * - result: Operation result > + */ > + ODP_IPSEC_STATUS_SA_DISABLE = 0, > + > + /** Warning from inline IPSEC processing > + * > + * Following status event (odp_ipsec_status_t) fields have valid > + * content, other fields must be ignored: > + * - sa: The SA that caused the warning > + * - warn: The warning(s) reported by this event > + * > + * This status event is generated only for outbound SAs in > + * ODP_IPSEC_OP_MODE_INLINE mode. > + */ > + ODP_IPSEC_STATUS_WARN > > } odp_ipsec_status_id_t; > > @@ -1135,15 +1153,18 @@ typedef struct odp_ipsec_status_t { > /** IPSEC status ID */ > odp_ipsec_status_id_t id; > > - /** Return value from the operation > + /** IPSEC SA that was target of the operation */ > + odp_ipsec_sa_t sa; > + > + /** Result of the operation > * > * 0: Success > * <0: Failure > */ > - int ret; > + int result; > > - /** IPSEC SA that was target of the operation */ > - odp_ipsec_sa_t sa; > + /** Warnings of an ODP_IPSEC_STATUS_WARN status event */ > + odp_ipsec_warn_t warn; > > } odp_ipsec_status_t; > > -- > 2.13.0 > >
Reviewed-by: Nikhil Agarwal <nikhil.agarwal@linaro.org> -----Original Message----- From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Petri Savolainen Sent: Friday, July 14, 2017 6:14 PM To: lng-odp@lists.linaro.org Subject: [lng-odp] [API-NEXT PATCH] api: ipsec: add warning status event Add status ID for warning messages. Outbound inline soft lifetime expiration is currently the only source of these events. API spec keeps simple when the same warning structure is shared with IPSEC packet and status events. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> --- include/odp/api/spec/ipsec.h | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) -- 2.13.0diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index de126c37..7085bc0d 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -1123,8 +1123,26 @@ typedef struct odp_ipsec_packet_result_t { * IPSEC status ID */ typedef enum odp_ipsec_status_id_t { - /** Response to SA disable command */ - ODP_IPSEC_STATUS_SA_DISABLE = 0 + /** Response to SA disable command + * + * Following status event (odp_ipsec_status_t) fields have valid + * content, other fields must be ignored: + * - sa: The SA that was requested to be disabled + * - result: Operation result + */ + ODP_IPSEC_STATUS_SA_DISABLE = 0, + + /** Warning from inline IPSEC processing + * + * Following status event (odp_ipsec_status_t) fields have valid + * content, other fields must be ignored: + * - sa: The SA that caused the warning + * - warn: The warning(s) reported by this event + * + * This status event is generated only for outbound SAs in + * ODP_IPSEC_OP_MODE_INLINE mode. + */ + ODP_IPSEC_STATUS_WARN } odp_ipsec_status_id_t; @@ -1135,15 +1153,18 @@ typedef struct odp_ipsec_status_t { /** IPSEC status ID */ odp_ipsec_status_id_t id; - /** Return value from the operation + /** IPSEC SA that was target of the operation */ + odp_ipsec_sa_t sa; + + /** Result of the operation * * 0: Success * <0: Failure */ - int ret; + int result; - /** IPSEC SA that was target of the operation */ - odp_ipsec_sa_t sa; + /** Warnings of an ODP_IPSEC_STATUS_WARN status event */ + odp_ipsec_warn_t warn; } odp_ipsec_status_t;
Merged, Maxim. On 07/18/17 07:54, Nikhil Agarwal wrote: > Reviewed-by: Nikhil Agarwal <nikhil.agarwal@linaro.org> > > -----Original Message----- > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Petri Savolainen > Sent: Friday, July 14, 2017 6:14 PM > To: lng-odp@lists.linaro.org > Subject: [lng-odp] [API-NEXT PATCH] api: ipsec: add warning status event > > Add status ID for warning messages. Outbound inline soft lifetime expiration is currently the only source of these events. API spec keeps simple when the same warning structure is shared with IPSEC packet and status events. > > Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> > --- > include/odp/api/spec/ipsec.h | 33 +++++++++++++++++++++++++++------ > 1 file changed, 27 insertions(+), 6 deletions(-) > > diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index de126c37..7085bc0d 100644 > --- a/include/odp/api/spec/ipsec.h > +++ b/include/odp/api/spec/ipsec.h > @@ -1123,8 +1123,26 @@ typedef struct odp_ipsec_packet_result_t { > * IPSEC status ID > */ > typedef enum odp_ipsec_status_id_t { > - /** Response to SA disable command */ > - ODP_IPSEC_STATUS_SA_DISABLE = 0 > + /** Response to SA disable command > + * > + * Following status event (odp_ipsec_status_t) fields have valid > + * content, other fields must be ignored: > + * - sa: The SA that was requested to be disabled > + * - result: Operation result > + */ > + ODP_IPSEC_STATUS_SA_DISABLE = 0, > + > + /** Warning from inline IPSEC processing > + * > + * Following status event (odp_ipsec_status_t) fields have valid > + * content, other fields must be ignored: > + * - sa: The SA that caused the warning > + * - warn: The warning(s) reported by this event > + * > + * This status event is generated only for outbound SAs in > + * ODP_IPSEC_OP_MODE_INLINE mode. > + */ > + ODP_IPSEC_STATUS_WARN > > } odp_ipsec_status_id_t; > > @@ -1135,15 +1153,18 @@ typedef struct odp_ipsec_status_t { > /** IPSEC status ID */ > odp_ipsec_status_id_t id; > > - /** Return value from the operation > + /** IPSEC SA that was target of the operation */ > + odp_ipsec_sa_t sa; > + > + /** Result of the operation > * > * 0: Success > * <0: Failure > */ > - int ret; > + int result; > > - /** IPSEC SA that was target of the operation */ > - odp_ipsec_sa_t sa; > + /** Warnings of an ODP_IPSEC_STATUS_WARN status event */ > + odp_ipsec_warn_t warn; > > } odp_ipsec_status_t; > > -- > 2.13.0 >
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index de126c37..7085bc0d 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -1123,8 +1123,26 @@ typedef struct odp_ipsec_packet_result_t { * IPSEC status ID */ typedef enum odp_ipsec_status_id_t { - /** Response to SA disable command */ - ODP_IPSEC_STATUS_SA_DISABLE = 0 + /** Response to SA disable command + * + * Following status event (odp_ipsec_status_t) fields have valid + * content, other fields must be ignored: + * - sa: The SA that was requested to be disabled + * - result: Operation result + */ + ODP_IPSEC_STATUS_SA_DISABLE = 0, + + /** Warning from inline IPSEC processing + * + * Following status event (odp_ipsec_status_t) fields have valid + * content, other fields must be ignored: + * - sa: The SA that caused the warning + * - warn: The warning(s) reported by this event + * + * This status event is generated only for outbound SAs in + * ODP_IPSEC_OP_MODE_INLINE mode. + */ + ODP_IPSEC_STATUS_WARN } odp_ipsec_status_id_t; @@ -1135,15 +1153,18 @@ typedef struct odp_ipsec_status_t { /** IPSEC status ID */ odp_ipsec_status_id_t id; - /** Return value from the operation + /** IPSEC SA that was target of the operation */ + odp_ipsec_sa_t sa; + + /** Result of the operation * * 0: Success * <0: Failure */ - int ret; + int result; - /** IPSEC SA that was target of the operation */ - odp_ipsec_sa_t sa; + /** Warnings of an ODP_IPSEC_STATUS_WARN status event */ + odp_ipsec_warn_t warn; } odp_ipsec_status_t;
Add status ID for warning messages. Outbound inline soft lifetime expiration is currently the only source of these events. API spec keeps simple when the same warning structure is shared with IPSEC packet and status events. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> --- include/odp/api/spec/ipsec.h | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) -- 2.13.0