diff --git a/inc/saiswitch.h b/inc/saiswitch.h index 0356ed5d3..8481046ca 100644 --- a/inc/saiswitch.h +++ b/inc/saiswitch.h @@ -4061,6 +4061,8 @@ typedef struct _sai_switch_api_t sai_get_switch_tunnel_attribute_fn get_switch_tunnel_attribute; sai_switch_mdio_cl22_read_fn switch_mdio_cl22_read; sai_switch_mdio_cl22_write_fn switch_mdio_cl22_write; + sai_bulk_object_set_attribute_fn set_switches_attribute; + sai_bulk_object_get_attribute_fn get_switches_attribute } sai_switch_api_t; diff --git a/meta/parse.pl b/meta/parse.pl index fbf7e23e0..c1da450d2 100755 --- a/meta/parse.pl +++ b/meta/parse.pl @@ -4452,6 +4452,13 @@ sub ExtractObjectTypeBulkMap my $OT = "SAI_OBJECT_TYPE_" . uc($ot); + # Object type is extracted from name like "routes" -> "route", and then + # from "switches" -> "switche" which fails due to invalid type. + # Map "switche" to "switch" to avoid this error. + if ($OT eq "SAI_OBJECT_TYPE_SWITCHE") { + $OT = "SAI_OBJECT_TYPE_SWITCH"; + } + if (not defined $OBJECT_TYPE_MAP{$OT}) { LogError "invalid object type $OT extracted from bulk definition: $fn"; diff --git a/meta/style.pm b/meta/style.pm index 9e1dea9f2..7234e58af 100644 --- a/meta/style.pm +++ b/meta/style.pm @@ -459,7 +459,9 @@ sub CheckFunctionNaming switch_mdio_cl22_read switch_mdio_cl22_write switch_register_read - switch_register_write); + switch_register_write + set_switches_attribute + get_switches_attribute); my $REG = "(" . (join"|",@listex) . ")";