Skip to content

Commit 0cde58a

Browse files
committed
Packet Drop Monitoring
Signed-off-by: JaiOCP <jai.kumar@broadcom.com>
1 parent 591c69c commit 0cde58a

3 files changed

Lines changed: 43 additions & 16 deletions

File tree

doc/DropMonitor/SAI-Proposal-Packet-Drop-Monitoring-Spec.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ The SAI_TAM_EVENT_LEARN_ENTRY_ATTR_COUNTER_ID is allocated by the SAI adapter an
249249

250250
The SAI_TAM_EVENT_LEARN_ENTRY_ATTR_COUNTER_ID is read using standard stats api.
251251

252+
SAI_TAM_EVENT_LEARN_ENTRY_ATTR_ACL_ENTRY object is allocated by the SAI adapter for the learned entry and is used by NOS to age the entry if needed.
253+
252254
```
253255
/**
254256
* @brief Enum defining learn event.
@@ -407,6 +409,15 @@ typedef enum _sai_tam_event_learn_entry_attr_t
407409
*/
408410
SAI_TAM_EVENT_LEARN_ENTRY_ATTR_COUNTER_ID,
409411
412+
/**
413+
* @brief ACL table entry associated with this learn entry.
414+
*
415+
* @type sai_object_id_t
416+
* @flags READ_ONLY
417+
* @objects SAI_OBJECT_TYPE_ACL_ENTRY
418+
*/
419+
SAI_TAM_EVENT_LEARN_ENTRY_ATTR_ACL_ENTRY,
420+
410421
/**
411422
* @brief End of Attributes
412423
*/
@@ -435,6 +446,13 @@ New data type is created to capture flow information as part of the bacllback.
435446
*/
436447
typedef struct _sai_tam_event_learn_notification_data_t
437448
{
449+
/**
450+
* @brief TAM Learn entry ID
451+
*
452+
* @objects SAI_OBJECT_TYPE_TAM_EVENT_LEARN_ENTRY
453+
*/
454+
sai_object_id_t le_id;
455+
438456
/** Attributes count */
439457
uint32_t attr_count;
440458
@@ -445,12 +463,6 @@ typedef struct _sai_tam_event_learn_notification_data_t
445463
*/
446464
sai_attribute_t *attr;
447465
448-
/**
449-
* @brief TAM Learn entry ID
450-
*
451-
* @objects SAI_OBJECT_TYPE_TAM_EVENT_LEARN_ENTRY
452-
*/
453-
sai_object_id_t le_id;
454466
455467
} sai_tam_event_learn_notification_data_t;
456468
```
@@ -549,7 +561,12 @@ create_tam(
549561

550562
ACL table is created with fields enabled that will be used to install the flow entry when the leraning happens. In this example flow is learned for the qset[ip proto, src ip, dst ip, sport, dport, ingress port].
551563

552-
This table can later be queried by NOS for learned entries using the GET API. Conceptually there is no SET or REMOVE on this table and SAI adapter should fail any set/remove operation if done by the NOS.
564+
This table can later be queried by NOS for learned entries using the GET API. Learned entries can be aged out using the SAI_TAM_EVENT_LEARN_ENTRY_ATTR_ACL_ENTRY object.
565+
566+
Conceptually there is no SET on the ACL table entries as they are created by SAI adapter.
567+
SAI adapter should fail any SET operation if done by the NOS.
568+
569+
New SAI_ACL_BIND_POINT_TYPE_TAM bind point is introduced for ACL table. This is to provide hint to the SAI adapter that this ACL table is mainly used for TAM purposes.
553570

554571

555572
```

inc/saitam.h

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2873,6 +2873,15 @@ typedef enum _sai_tam_event_learn_entry_attr_t
28732873
*/
28742874
SAI_TAM_EVENT_LEARN_ENTRY_ATTR_COUNTER_ID,
28752875

2876+
/**
2877+
* @brief ACL table entry associated with this learn entry.
2878+
*
2879+
* @type sai_object_id_t
2880+
* @flags READ_ONLY
2881+
* @objects SAI_OBJECT_TYPE_ACL_ENTRY
2882+
*/
2883+
SAI_TAM_EVENT_LEARN_ENTRY_ATTR_ACL_ENTRY,
2884+
28762885
/**
28772886
* @brief End of Attributes
28782887
*/
@@ -2993,23 +3002,22 @@ typedef sai_status_t (*sai_clear_tam_event_learn_entry_stats_fn)(
29933002
*/
29943003
typedef struct _sai_tam_event_learn_notification_data_t
29953004
{
2996-
/** Attributes count */
2997-
uint32_t attr_count;
2998-
29993005
/**
3000-
* @brief Attributes
3006+
* @brief TAM Learn entry ID
30013007
*
30023008
* @objects SAI_OBJECT_TYPE_TAM_EVENT_LEARN_ENTRY
30033009
*/
3004-
sai_attribute_t *attr;
3010+
sai_object_id_t le_id;
3011+
3012+
/** Attributes count */
3013+
uint32_t attr_count;
30053014

30063015
/**
3007-
* @brief TAM Learn entry ID
3016+
* @brief Attributes
30083017
*
30093018
* @objects SAI_OBJECT_TYPE_TAM_EVENT_LEARN_ENTRY
30103019
*/
3011-
sai_object_id_t le_id;
3012-
3020+
sai_attribute_t *attr;
30133021
} sai_tam_event_learn_notification_data_t;
30143022

30153023
/**

inc/saitypes.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,8 +1033,10 @@ typedef enum _sai_acl_bind_point_type_t
10331033
SAI_ACL_BIND_POINT_TYPE_ROUTER_INTF = SAI_ACL_BIND_POINT_TYPE_ROUTER_INTERFACE,
10341034

10351035
/** Bind Point Type Switch */
1036-
SAI_ACL_BIND_POINT_TYPE_SWITCH
1036+
SAI_ACL_BIND_POINT_TYPE_SWITCH,
10371037

1038+
/** Bind Point Type TAM */
1039+
SAI_ACL_BIND_POINT_TYPE_TAM,
10381040
} sai_acl_bind_point_type_t;
10391041

10401042
/**

0 commit comments

Comments
 (0)