Skip to content

Commit

Permalink
Modified notification to include separate byte-count status and SN st…
Browse files Browse the repository at this point in the history
…atus.

Signed-off-by: Dipankar Acharya <dipankar@us221.sjc.aristanetworks.com>
  • Loading branch information
Dipankar Acharya committed Jun 23, 2021
1 parent 2227b36 commit ce6d675
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
31 changes: 18 additions & 13 deletions inc/saiipsec.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ typedef enum _sai_ipsec_cipher_t
/**
* @brief IPsec SA sequence number status type
*/
typedef enum _sai_ipsec_sa_status_t
typedef enum _sai_ipsec_sa_octet_count_status_t
{
/** SA byte count above lower of 2 watermarks */
SAI_IPSEC_SA_STATUS_ABOVE_LOW_WATERMARK,
/** SA byte count below lower of 2 watermarks */
SAI_IPSEC_SA_OCTET_COUNT_STATUS_BELOW_LOW_WATERMARK,

/** SA byte count above higher of 2 watermarks */
SAI_IPSEC_SA_STATUS_ABOVE_HIGH_WATERMARK,
/** SA byte count below higher of 2 watermarks */
SAI_IPSEC_SA_OCTET_COUNT_STATUS_BELOW_HIGH_WATERMARK,

/** SA byte count reached supported maximum value */
SAI_IPSEC_SA_STATUS_REACHED_MAX_LIMIT,
/** SA byte count above higher of 2 watermarks */
SAI_IPSEC_SA_OCTET_COUNT_STATUS_ABOVE_HIGH_WATERMARK,

} sai_ipsec_sa_status_t;
} sai_ipsec_sa_octet_count_status_t;

/**
* @brief IPsec SA status for notification
Expand All @@ -83,9 +83,14 @@ typedef struct _sai_ipsec_sa_status_notification_t
sai_object_id_t ipsec_sa_id;

/**
* @brief IPsec SA status
* @brief IPsec SA byte count status
*/
sai_ipsec_sa_octet_count_status_t ipsec_sa_octet_count_status;

/**
* @brief IPsec egress SA sequence number at max limit
*/
sai_ipsec_sa_status_t ipsec_sa_status;
bool ipsec_egress_sn_at_max_limit;

} sai_ipsec_sa_status_notification_t;

Expand Down Expand Up @@ -449,12 +454,12 @@ typedef enum _sai_ipsec_sa_attr_t
SAI_IPSEC_SA_ATTR_IPSEC_ID,

/**
* @brief SA status.
* @brief SA byte count status.
*
* @type sai_ipsec_sa_status_t
* @type sai_ipsec_sa_octet_count_status_t
* @flags READ_ONLY
*/
SAI_IPSEC_SA_ATTR_STATUS,
SAI_IPSEC_SA_ATTR_OCTET_COUNT_STATUS,

/**
* @brief Externally assigned SA Index value for this Security Association.
Expand Down
3 changes: 2 additions & 1 deletion inc/saiswitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,8 @@ typedef enum _sai_switch_attr_t
* @brief IPsec SA status change notification callback function.
*
* In case driver does not support this attribute, The Host adapter should poll
* port status by SAI_IPSEC_SA_ATTR_STATUS.
* IPsec SA status by SAI_IPSEC_SA_ATTR_OCTET_COUNT_STATUS and
* SAI_IPSEC_SA_ATTR_EGRESS_ESN.
*
* Use sai_ipsec_sa_status_change_notification_fn as notification function.
*
Expand Down

0 comments on commit ce6d675

Please sign in to comment.