Skip to content

add Passive Optical Network (PON) to experimental - #2350

Open
dpelton-ciena wants to merge 1 commit into
opencomputeproject:masterfrom
dpelton-ciena:dpelton-20260909
Open

dpelton-ciena wants to merge 1 commit into
opencomputeproject:masterfrom
dpelton-ciena:dpelton-20260909

Conversation

@dpelton-ciena

Copy link
Copy Markdown

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.

Signed-off-by: David Pelton <dpelton@ciena.com>
@azure-pipelines

Copy link
Copy Markdown
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,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for expicit numeration if numbers are continous

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this naming is insane !

Comment thread experimental/saiexperimentalpononu.h
Comment thread meta/parse.pl
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";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this condition is added?

Comment thread meta/parse.pl
Comment on lines -4690 to +4775
$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;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each header should have its own apid and this logic would not be needed, you are breaking header design here !

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please follow entire SAI design

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread meta/style.pm
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$/)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this condition is added?

Comment thread meta/style.pm
$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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why such api exists only ?

Comment thread meta/style.pm
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/))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are breaking design here

Comment thread meta/style.pm
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this condition is added?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants