add Passive Optical Network (PON) to experimental - #2350
dpelton-ciena wants to merge 1 commit into
Conversation
Signed-off-by: David Pelton <dpelton@ciena.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
| */ | ||
| typedef enum _sai_pon_action_type_t | ||
| { | ||
| SAI_PON_ACTION_TYPE_OLT_RESET = 0, |
There was a problem hiding this comment.
no need for expicit numeration if numbers are continous
There was a problem hiding this comment.
and add empty line before each enum
| sai_bulk_get_pon_onu_statistics_accumulating_olt_pon_omcc_attribute_fn get_pon_onu_statistics_accumulating_olt_pon_omccs_attribute; | ||
| sai_bulk_get_pon_onu_statistics_accumulating_olt_pon_service_attribute_fn get_pon_onu_statistics_accumulating_olt_pon_services_attribute; | ||
| sai_bulk_get_pon_onu_statistics_accumulating_onu_enhanced_tc_pm_attribute_fn get_pon_onu_statistics_accumulating_onu_enhanced_tc_pms_attribute; | ||
| sai_bulk_get_pon_onu_statistics_accumulating_onu_ethernet_frame_extended_pm_attribute_fn get_pon_onu_statistics_accumulating_onu_ethernet_frame_extended_pms_attribute; |
There was a problem hiding this comment.
why those naming must be so long ?
| sai_create_pon_service_config_profile_extended_vlan_tagging_operation_config_data_received_frame_vlan_tagging_operation_fn create_pon_service_config_profile_extended_vlan_tagging_operation_config_data_received_frame_vlan_tagging_operation; | ||
| sai_remove_pon_service_config_profile_extended_vlan_tagging_operation_config_data_received_frame_vlan_tagging_operation_fn remove_pon_service_config_profile_extended_vlan_tagging_operation_config_data_received_frame_vlan_tagging_operation; | ||
| sai_set_pon_service_config_profile_extended_vlan_tagging_operation_config_data_received_frame_vlan_tagging_operation_attribute_fn set_pon_service_config_profile_extended_vlan_tagging_operation_config_data_received_frame_vlan_tagging_operation_attribute; | ||
| sai_get_pon_service_config_profile_extended_vlan_tagging_operation_config_data_received_frame_vlan_tagging_operation_attribute_fn get_pon_service_config_profile_extended_vlan_tagging_operation_config_data_received_frame_vlan_tagging_operation_attribute; |
| if ((!defined $type or $type eq "") and $attr eq "SAI_ACL_COUNTER_ATTR_TABLE_ID") | ||
| { | ||
| LogWarning "missing type for $attr, defaulting to sai_object_id_t"; | ||
| return "SAI_ATTR_VALUE_TYPE_OBJECT_ID"; |
There was a problem hiding this comment.
why this condition is added?
| $APITOOBJMAP{$api} = \@objects; | ||
| if (defined $APITOOBJMAP{$api}) | ||
| { | ||
| my %seen = map { $_ => 1 } @{ $APITOOBJMAP{$api} }; | ||
|
|
||
| for my $obj (@objects) | ||
| { | ||
| next if $seen{$obj}; | ||
| push @{ $APITOOBJMAP{$api} }, $obj; | ||
| $seen{$obj} = 1; | ||
| } | ||
| } | ||
| else | ||
| { | ||
| $APITOOBJMAP{$api} = \@objects; | ||
| } | ||
|
|
||
| if (defined $API_METHODS{$api}) | ||
| { | ||
| for my $name (keys %methods) | ||
| { | ||
| $API_METHODS{$api}{$name} = 1; | ||
| } | ||
| } | ||
| else | ||
| { | ||
| $API_METHODS{$api} = \%methods; |
There was a problem hiding this comment.
each header should have its own apid and this logic would not be needed, you are breaking header design here !
There was a problem hiding this comment.
please follow entire SAI design
There was a problem hiding this comment.
Thanks for the feedback. A number of these changes were made such that the header file could be broken up into smaller pieces. We will revert these changes.
There was a problem hiding this comment.
you can still break this to smaller modules, just eachmodule should have it's own API
and not all put in single SAI_API_PON
| return if $fname eq "sai_bulk_object_clear_stats_fn"; # exception | ||
|
|
||
| if (not $fname =~ /^sai_((get|clear)_(\w+)_stats|get_\w+_stats_ext)_fn$/) | ||
| if (not $fname =~ /^sai_((get|clear)_(\w+)_stat(s)?|get_\w+_stat(s)?_ext)_fn$/) |
There was a problem hiding this comment.
why this condition is added?
| $order =~ s/012/s/g; # order should be: get_stats,get_stats_ext,clear_stats | ||
| $order =~ s/CR/E/g; # order should be: bulk_create,bulk_remove | ||
| $order =~ s/SG/T/g; # order should be: bulk_set,bulk_get | ||
| $order =~ s/g+/g/g; # order can include runs of read-only get attribute APIs |
There was a problem hiding this comment.
why such api exists only ?
| my $itemname = $2; | ||
|
|
||
| if ($1 ne $spaces or (length($2) != length($inside) and $struct =~ /_api_t/)) | ||
| if ($1 ne $spaces or (length($2) != length($inside) and $struct =~ /_api_t/ and $struct !~ /sai_pon_api_t/)) |
There was a problem hiding this comment.
you are breaking design here
| next if $line =~ m![^\\]\\$!; # macro multiline | ||
| next if $line =~ /^ {4}(\w+);$/; # union entries | ||
| next if $line =~ /^union _sai_\w+ \{/; # union entries | ||
| next if $line =~ /^ {20,}\w+/; # api struct member lines |
There was a problem hiding this comment.
why this condition is added?
This PR adds API definitions to control Passive Optical Network (PON) hardware components. These are added to the experimental SAI headers.
The changes cover the objects necessary to implement a data center based PON deployment as described in these SONiC PRs:
PON HLD
Dual Homed PON gateway HLD
As the SONiC features are planned for the SONiC 202611 release, we are proposing these changes for inclusion in the 1.19 SAI release.