Skip to content

Commit 9cfe262

Browse files
prgeortjchadaga
authored andcommitted
Added port serdes attributes for various taps (#2207)
Signed-off-by: Prince George <prgeor@microsoft.com>
1 parent 25579f3 commit 9cfe262

5 files changed

Lines changed: 106 additions & 8 deletions

File tree

inc/saiport.h

Lines changed: 78 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3965,7 +3965,7 @@ typedef enum _sai_port_serdes_attr_t
39653965
/**
39663966
* @brief Port serdes control TX FIR PRE1 filter
39673967
*
3968-
* List of port serdes TX fir precursor1 tap-filter values.
3968+
* List of port serdes TX FIR precursor1 tap-filter values.
39693969
* The values are of type sai_s32_list_t where the count is number lanes in
39703970
* a port and the list specifies list of values to be applied to each lane.
39713971
*
@@ -3978,7 +3978,7 @@ typedef enum _sai_port_serdes_attr_t
39783978
/**
39793979
* @brief Port serdes control TX FIR PRE2 filter
39803980
*
3981-
* List of port serdes TX fir precursor2 tap-filter values.
3981+
* List of port serdes TX FIR precursor2 tap-filter values.
39823982
* The values are of type sai_s32_list_t where the count is number lanes in
39833983
* a port and the list specifies list of values to be applied to each lane.
39843984
*
@@ -3991,7 +3991,7 @@ typedef enum _sai_port_serdes_attr_t
39913991
/**
39923992
* @brief Port serdes control TX FIR PRE3 filter
39933993
*
3994-
* List of port serdes TX fir precursor3 tap-filter values.
3994+
* List of port serdes TX FIR precursor3 tap-filter values.
39953995
* The values are of type sai_s32_list_t where the count is number lanes in
39963996
* a port and the list specifies list of values to be applied to each lane.
39973997
*
@@ -4004,7 +4004,7 @@ typedef enum _sai_port_serdes_attr_t
40044004
/**
40054005
* @brief Port serdes control TX FIR MAIN filter
40064006
*
4007-
* List of port serdes TX fir maincursor tap-filter values.
4007+
* List of port serdes TX FIR maincursor tap-filter values.
40084008
* The values are of type sai_s32_list_t where the count is number lanes in
40094009
* a port and the list specifies list of values to be applied to each lane.
40104010
*
@@ -4017,7 +4017,7 @@ typedef enum _sai_port_serdes_attr_t
40174017
/**
40184018
* @brief Port serdes control TX FIR POST1 filter
40194019
*
4020-
* List of port serdes TX fir postcursor1 tap-filter values.
4020+
* List of port serdes TX FIR postcursor1 tap-filter values.
40214021
* The values are of type sai_s32_list_t where the count is number lanes in
40224022
* a port and the list specifies list of values to be applied to each lane.
40234023
*
@@ -4030,7 +4030,7 @@ typedef enum _sai_port_serdes_attr_t
40304030
/**
40314031
* @brief Port serdes control TX FIR POST2 filter
40324032
*
4033-
* List of port serdes TX fir postcursor2 tap-filter values.
4033+
* List of port serdes TX FIR postcursor2 tap-filter values.
40344034
* The values are of type sai_s32_list_t where the count is number lanes in
40354035
* a port and the list specifies list of values to be applied to each lane.
40364036
*
@@ -4043,7 +4043,7 @@ typedef enum _sai_port_serdes_attr_t
40434043
/**
40444044
* @brief Port serdes control TX FIR POST3 filter
40454045
*
4046-
* List of port serdes TX fir postcursor3 tap-filter values.
4046+
* List of port serdes TX FIR postcursor3 tap-filter values.
40474047
* The values are of type sai_s32_list_t where the count is number lanes in
40484048
* a port and the list specifies list of values to be applied to each lane.
40494049
*
@@ -4056,7 +4056,7 @@ typedef enum _sai_port_serdes_attr_t
40564056
/**
40574057
* @brief Port serdes control TX FIR attenuation
40584058
*
4059-
* List of port serdes TX fir attn values.
4059+
* List of port serdes TX FIR attn values.
40604060
* The values are of type sai_s32_list_t where the count is number lanes in
40614061
* a port and the list specifies list of values to be applied to each lane.
40624062
*
@@ -4277,6 +4277,76 @@ typedef enum _sai_port_serdes_attr_t
42774277
*/
42784278
SAI_PORT_SERDES_ATTR_RX_POLARITY,
42794279

4280+
/**
4281+
* @brief Total number of RX FFE taps supported
4282+
*
4283+
* @type sai_uint32_t
4284+
* @flags READ_ONLY
4285+
*/
4286+
SAI_PORT_SERDES_ATTR_RX_FFE_COUNT,
4287+
4288+
/**
4289+
* @brief Total number of TX FIR taps supported
4290+
*
4291+
* @type sai_uint32_t
4292+
* @flags READ_ONLY
4293+
*/
4294+
SAI_PORT_SERDES_ATTR_TX_FIR_COUNT,
4295+
4296+
/**
4297+
* @brief Total number of RX DFE taps supported
4298+
*
4299+
* @type sai_uint32_t
4300+
* @flags READ_ONLY
4301+
*/
4302+
SAI_PORT_SERDES_ATTR_RX_DFE_COUNT,
4303+
4304+
/**
4305+
* @brief Port serdes RX FFE taps
4306+
*
4307+
* List of port serdes RX FFE tap values
4308+
*
4309+
* @type sai_taps_list_t
4310+
* @flags CREATE_AND_SET
4311+
* @default internal
4312+
*/
4313+
SAI_PORT_SERDES_ATTR_RX_FFE_TAPS_LIST,
4314+
4315+
/**
4316+
* @brief Port serdes TX FIR taps
4317+
*
4318+
* List of port serdes TX FIR tap values
4319+
*
4320+
* @type sai_taps_list_t
4321+
* @flags CREATE_AND_SET
4322+
* @default internal
4323+
*/
4324+
SAI_PORT_SERDES_ATTR_TX_FIR_TAPS_LIST,
4325+
4326+
/**
4327+
* @brief Port serdes DFE taps
4328+
*
4329+
* List of port serdes RX DFE tap values
4330+
*
4331+
* @type sai_taps_list_t
4332+
* @flags CREATE_AND_SET
4333+
* @default internal
4334+
*/
4335+
SAI_PORT_SERDES_ATTR_RX_DFE_TAPS_LIST,
4336+
4337+
/**
4338+
* @brief Port serdes VGA settings
4339+
*
4340+
* List of port serdes VGA settings values
4341+
* The values are of type sai_u32_list_t where the count is number of lanes
4342+
* in a port and the list specifies list of VGA settings for each lane.
4343+
*
4344+
* @type sai_u32_list_t
4345+
* @flags CREATE_AND_SET
4346+
* @default internal
4347+
*/
4348+
SAI_PORT_SERDES_ATTR_RX_VGA,
4349+
42804350
/**
42814351
* @brief End of attributes
42824352
*/

inc/saitypes.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,18 @@ typedef struct _sai_vlan_list_t
392392

393393
} sai_vlan_list_t;
394394

395+
/**
396+
* @brief Defines a list of FIR/FFE/DFE taps
397+
*/
398+
typedef struct _sai_taps_list_t
399+
{
400+
/** Number of taps */
401+
uint32_t count;
402+
403+
/** List of tap values */
404+
sai_s32_list_t *list;
405+
} sai_taps_list_t;
406+
395407
typedef enum _sai_ip_addr_family_t
396408
{
397409
SAI_IP_ADDR_FAMILY_IPV4,
@@ -1696,6 +1708,9 @@ typedef union _sai_attribute_value_t
16961708

16971709
/** @validonly meta->attrvaluetype == SAI_ATTR_VALUE_TYPE_PORT_PAM4_EYE_VALUES_LIST */
16981710
sai_port_pam4_eye_values_list_t portpam4eyevalues;
1711+
1712+
/** @validonly meta->attrvaluetype == SAI_ATTR_VALUE_TYPE_TAPS_LIST */
1713+
sai_taps_list_t portserdestaps;
16991714
} sai_attribute_value_t;
17001715

17011716
/**

meta/acronyms.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ CMIS - Common Management Interface Specification
2727
CPLD - Complex programmable logic device
2828
CPU - Central Processing Unit
2929
CRC - Cyclic Redundancy Code
30+
DFE - Decision Feedback Equalizer
3031
DHCP - Dynamic Host Configuration Protocol
3132
DHCPV6 - Dynamic Host Configuration Protocol for IPv6
3233
DLD - Dead Lock Detection
@@ -54,6 +55,8 @@ FCS - Frame Check Sequence
5455
FD - File Descriptor
5556
FDB - Forwarding Data Base
5657
FEC - Forward Error Correction
58+
FFE - Feedforward Equalizer
59+
FIR - Finite Impulse Response
5760
FPGA - Field Programmable Gate Array
5861
FW - Firmware
5962
GCM - Galois Counter Mode
@@ -173,6 +176,7 @@ UDP - User Datagram Protocol
173176
USD - Ultimate Segment Decapsulation
174177
USP - Ultimate Segment Pop
175178
USXGMII - Universal Serial 10 Gigabit Media Independent Interface
179+
VGA - Variable Gain Amplifier
176180
VNET - Virtual Network
177181
VNI - Virtual Network Interface
178182
VNID - Virtual Network Identifier

meta/saimetadatatypes.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,11 @@ typedef enum _sai_attr_value_type_t
500500
* @brief Attribute value is port PAM4 eye values list.
501501
*/
502502
SAI_ATTR_VALUE_TYPE_PORT_PAM4_EYE_VALUES_LIST,
503+
504+
/**
505+
* @brief Attribute value is port SerDes tap values list.
506+
*/
507+
SAI_ATTR_VALUE_TYPE_TAPS_LIST
503508
} sai_attr_value_type_t;
504509

505510
/**

meta/saisanitycheck.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,7 @@ void check_attr_object_type_provided(
848848
case SAI_ATTR_VALUE_TYPE_IP_PREFIX_LIST:
849849
case SAI_ATTR_VALUE_TYPE_ACL_CHAIN_LIST:
850850
case SAI_ATTR_VALUE_TYPE_POE_PORT_POWER_CONSUMPTION:
851+
case SAI_ATTR_VALUE_TYPE_TAPS_LIST:
851852

852853
if (md->allowedobjecttypes != NULL)
853854
{
@@ -1113,6 +1114,7 @@ void check_attr_default_required(
11131114
case SAI_ATTR_VALUE_TYPE_SYSTEM_PORT_CONFIG_LIST:
11141115
case SAI_ATTR_VALUE_TYPE_IP_PREFIX_LIST:
11151116
case SAI_ATTR_VALUE_TYPE_ACL_CHAIN_LIST:
1117+
case SAI_ATTR_VALUE_TYPE_TAPS_LIST:
11161118

11171119
if (((md->objecttype == SAI_OBJECT_TYPE_PORT) || (md->objecttype == SAI_OBJECT_TYPE_PORT_SERDES))
11181120
&& md->defaultvaluetype == SAI_DEFAULT_VALUE_TYPE_SWITCH_INTERNAL)
@@ -2978,6 +2980,7 @@ void check_attr_is_primitive(
29782980
case SAI_ATTR_VALUE_TYPE_JSON:
29792981
case SAI_ATTR_VALUE_TYPE_IP_PREFIX_LIST:
29802982
case SAI_ATTR_VALUE_TYPE_ACL_CHAIN_LIST:
2983+
case SAI_ATTR_VALUE_TYPE_TAPS_LIST:
29812984

29822985
if (md->isprimitive)
29832986
{
@@ -6318,6 +6321,7 @@ void check_struct_and_union_size()
63186321
CHECK_STRUCT_SIZE(sai_u32_range_t, 8);
63196322
CHECK_STRUCT_SIZE(sai_u8_list_t, 16);
63206323
CHECK_STRUCT_SIZE(sai_vlan_list_t, 16);
6324+
CHECK_STRUCT_SIZE(sai_taps_list_t, 16)
63216325
}
63226326
#pragma GCC diagnostic pop
63236327

0 commit comments

Comments
 (0)