Skip to content

Commit

Permalink
[meta] Add support for port stat extensions (#1947)
Browse files Browse the repository at this point in the history
Will be required for DASH port stat extensions

Co-authored-by: r12f <[email protected]>
  • Loading branch information
kcudnik and r12f authored Jan 18, 2024
1 parent a9070a5 commit 7bffa33
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 1 deletion.
1 change: 1 addition & 0 deletions experimental/saiextensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
/* existing enum extensions */
#include "saitypesextensions.h"
#include "saiswitchextensions.h"
#include "saiportextensions.h"

/* new experimental object type includes */
#include "saiexperimentaldashvip.h"
Expand Down
61 changes: 61 additions & 0 deletions experimental/saiportextensions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/**
* Copyright (c) 2018 Microsoft Open Technologies, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
* LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS
* FOR A PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT.
*
* See the Apache Version 2.0 License for specific language governing
* permissions and limitations under the License.
*
* Microsoft would like to thank the following companies for their review and
* assistance with these files: Intel Corporation, Mellanox Technologies Ltd,
* Dell Products, L.P., Facebook, Inc., Marvell International Ltd.
*
* @file saiportextensions.h
*
* @brief This module defines port extensions of the Switch Abstraction Interface (SAI)
*/

#ifndef __SAIPORTEXTENSIONS_H_
#define __SAIPORTEXTENSIONS_H_

#include <saiport.h>
#include <saitypes.h>

/**
* @brief SAI port attribute extensions.
*
* @flags free
*/
typedef enum _sai_port_attr_extensions_t
{
SAI_PORT_ATTR_EXTENSIONS_RANGE_START = SAI_PORT_ATTR_END,

/* Add new experimental port attributes above this line */

SAI_PORT_ATTR_EXTENSIONS_RANGE_END

} sai_port_attr_extensions_t;

/**
* @brief SAI port stat extensions.
*
* @flags free
*/
typedef enum _sai_port_stat_extensions_t
{
SAI_PORT_STAT_EXTENSIONS_RANGE_START = SAI_PORT_STAT_END,

/* Add new experimental port stats above this line */

SAI_PORT_STAT_EXTENSIONS_RANGE_END

} sai_port_stat_extensions_t;

#endif /* __SAIPORTEXTENSIONS_H_ */
8 changes: 7 additions & 1 deletion inc/saiport.h
Original file line number Diff line number Diff line change
Expand Up @@ -2505,8 +2505,11 @@ typedef enum _sai_port_attr_t
*/
typedef enum _sai_port_stat_t
{
/** Port stat range start */
SAI_PORT_STAT_START,

/** SAI port stat if in octets */
SAI_PORT_STAT_IF_IN_OCTETS,
SAI_PORT_STAT_IF_IN_OCTETS = SAI_PORT_STAT_START,

/** SAI port stat if in ucast pkts */
SAI_PORT_STAT_IF_IN_UCAST_PKTS,
Expand Down Expand Up @@ -3217,6 +3220,9 @@ typedef enum _sai_port_stat_t
/** Port stat out drop reasons range end */
SAI_PORT_STAT_OUT_DROP_REASON_RANGE_END = 0x00002fff,

/** Port stat range end */
SAI_PORT_STAT_END

} sai_port_stat_t;

/**
Expand Down

0 comments on commit 7bffa33

Please sign in to comment.