Skip to content

Commit

Permalink
Merge branch 'opencomputeproject:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
prafull-brcm committed Oct 6, 2023
2 parents 2f0f3b2 + bd1b722 commit e2f385c
Show file tree
Hide file tree
Showing 12 changed files with 1,009 additions and 912 deletions.
2 changes: 1 addition & 1 deletion bm/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ** WARNING ** THIS DIRECTORY IS DEPRECATED AND WILL BE REMOVED END OF 2023
# ** WARNING ** USE tests/saithriftv2 and sonic-net/DASH repo for bvm2/p4 model
# ** WARNING ** USE tests/saithriftv2 and sonic-net/DASH repo for bmv2/p4 model

# SAI BEHAVIORAL MODEL
This repository clearly defines widely accepted network switch behaviour.
Expand Down
2 changes: 1 addition & 1 deletion bm/build_p4_target.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo
echo "** WARNING ** THIS DIRECTORY IS DEPRECATED AND WILL BE REMOVED END OF 2023"
echo "** WARNING ** USE tests/saithriftv2 and sonic-net/DASH repo for bvm2/p4 model"
echo "** WARNING ** USE tests/saithriftv2 and sonic-net/DASH repo for bmv2/p4 model"
echo

sleep 10
Expand Down
8 changes: 4 additions & 4 deletions inc/saiport.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,16 @@ typedef enum _sai_port_media_type_t
*/
typedef enum _sai_port_cable_pair_state_t
{
/** Cable state no faults */
/** Cable pair state is good */
SAI_PORT_CABLE_PAIR_STATE_OK,

/** Cable state open */
/** The Cable pair state open */
SAI_PORT_CABLE_PAIR_STATE_OPEN,

/** Cable state short */
/** The Cable pair state short (intra-short) */
SAI_PORT_CABLE_PAIR_STATE_SHORT,

/** Cable state cross talk */
/** The Cable pair state is shorted with another pair (inter-short) cross talk */
SAI_PORT_CABLE_PAIR_STATE_CROSSTALK,

/** Cable state unknown */
Expand Down
2 changes: 1 addition & 1 deletion inc/saitunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ typedef enum _sai_tunnel_term_table_entry_attr_t
* @brief Tunnel virtual router id
*
* @type sai_object_id_t
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
* @flags MANDATORY_ON_CREATE | CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_VIRTUAL_ROUTER
*/
SAI_TUNNEL_TERM_TABLE_ENTRY_ATTR_VR_ID = SAI_TUNNEL_TERM_TABLE_ENTRY_ATTR_START,
Expand Down
29 changes: 17 additions & 12 deletions meta/parse.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1446,6 +1446,9 @@ sub ProcessType

if ($type =~ /^sai_acl_field_data_mask_t (bool|sai_\w+_t)$/)
{
# TODO this is temporary solution, since mask should have it's own attribute type
# and not reuseing existing ones from aclfield, this provides confusion

my $prefix = "SAI_ATTR_VALUE_TYPE_ACL_FIELD_DATA";

return "${prefix}_BOOL" if $1 eq "bool";
Expand Down Expand Up @@ -2124,9 +2127,9 @@ sub ProcessIsAclAction

sub ProcessIsAclMask
{
my $attr = shift;
my ($attr, $type)= @_;

return "true" if $attr =~ /^SAI_ACL_TABLE_ATTR_FIELD_DATA_MASK_\w+$/;
return "true" if $type =~ /^sai_acl_field_data_mask_t /;

return "false";
}
Expand Down Expand Up @@ -2335,6 +2338,7 @@ sub ProcessSingleObjectType
my $getsave = ProcessGetSave($attr, $meta{getsave});
my $isaclfield = ProcessIsAclField($attr);
my $isaclaction = ProcessIsAclAction($attr);
my $isaclmask = ProcessIsAclMask($attr, $meta{type});
my $brief = ProcessBrief($attr, $meta{brief});
my $isprimitive = ProcessIsPrimitive($attr, $meta{type});
my $ntftype = ProcessNotificationType($attr, $meta{type});
Expand Down Expand Up @@ -2388,6 +2392,7 @@ sub ProcessSingleObjectType
WriteSource ".isvlan = $isvlan,";
WriteSource ".isaclfield = $isaclfield,";
WriteSource ".isaclaction = $isaclaction,";
WriteSource ".isaclmask = $isaclmask,";
WriteSource ".ismandatoryoncreate = $ismandatoryoncreate,";
WriteSource ".iscreateonly = $iscreateonly,";
WriteSource ".iscreateandset = $iscreateandset,";
Expand Down Expand Up @@ -2503,7 +2508,7 @@ sub CreateMetadataForAttributes

if (not $ot =~ /^SAI_OBJECT_TYPE_(\w+)$/)
{
LogError "invalid obejct type '$ot'";
LogError "invalid object type '$ot'";
next;
}

Expand Down Expand Up @@ -2538,7 +2543,7 @@ sub CreateMetadataForAttributes
{
if (not $ot =~ /^SAI_OBJECT_TYPE_(\w+)$/)
{
LogError "invalid obejct type '$ot'";
LogError "invalid object type '$ot'";
next;
}

Expand Down Expand Up @@ -2928,7 +2933,7 @@ sub CreateStructNonObjectId
{
if (not $ot =~ /^SAI_OBJECT_TYPE_(\w+)$/)
{
LogError "invalid obejct type '$ot'";
LogError "invalid object type '$ot'";
next;
}

Expand Down Expand Up @@ -3325,7 +3330,7 @@ sub ProcessGenericQuadApi
{
if (not $ot =~ /^SAI_OBJECT_TYPE_(\w+)$/)
{
LogError "invalid obejct type '$ot'";
LogError "invalid object type '$ot'";
next;
}

Expand Down Expand Up @@ -3467,7 +3472,7 @@ sub ProcessGenericStatsApi
{
if (not $ot =~ /^SAI_OBJECT_TYPE_(\w+)$/)
{
LogError "invalid obejct type '$ot'";
LogError "invalid object type '$ot'";
next;
}

Expand Down Expand Up @@ -3590,7 +3595,7 @@ sub ProcessGenericQuadBulkApi
{
if (not $ot =~ /^SAI_OBJECT_TYPE_(\w+)$/)
{
LogError "invalid obejct type '$ot'";
LogError "invalid object type '$ot'";
next;
}

Expand Down Expand Up @@ -3915,7 +3920,7 @@ sub CreateObjectInfo
{
if (not $ot =~ /^SAI_OBJECT_TYPE_(\w+)$/)
{
LogError "invalid obejct type '$ot'";
LogError "invalid object type '$ot'";
next;
}

Expand Down Expand Up @@ -4002,7 +4007,7 @@ sub CreateObjectInfo
{
if (not $ot =~ /^SAI_OBJECT_TYPE_(\w+)$/)
{
LogError "invalid obejct type '$ot'";
LogError "invalid object type '$ot'";
next;
}

Expand Down Expand Up @@ -4369,7 +4374,7 @@ sub CheckObjectTypeStatitics
{
#
# Purpose is to check if each defined statistics for object type has 3 stat
# functions defined and if there is corresponding obejct type for stat enum
# functions defined and if there is corresponding object type for stat enum
#

for my $ot (sort keys %OBJECT_TYPE_TO_STATS_MAP)
Expand Down Expand Up @@ -4546,7 +4551,7 @@ sub GetReverseDependencyGraph
{
if (not $ot =~ /^SAI_OBJECT_TYPE_(\w+)$/)
{
LogError "invalid obejct type '$ot'";
LogError "invalid object type '$ot'";
next;
}

Expand Down
Loading

0 comments on commit e2f385c

Please sign in to comment.