Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fabric port test to vslib. #737

Merged
merged 2 commits into from
Jan 12, 2021
Merged

Conversation

ngoc-do
Copy link
Contributor

@ngoc-do ngoc-do commented Dec 10, 2020

In this PR, I'm adding test for fabric ports.

Testing asic supported in this PR is VOQ because fabric ports are enabled on a VOQ asic so that it can connect to other VOQ asics or fabric asics.

This PR is to add support for testing changes in sonic-net/sonic-swss#1459.

Together with this PR is sonic-net/sonic-buildimage#6185 that defines lane mapping for fabric part in Force10-S6000.

Signed-off-by: ngocdo ngocdo@arista.com

Signed-off-by: ngocdo <ngocdo@arista.com>
@kcudnik
Copy link
Collaborator

kcudnik commented Dec 11, 2020

Are there any queues IPGs or scheduler groups related with those ports ?

@ngoc-do
Copy link
Contributor Author

ngoc-do commented Dec 11, 2020

Are there any queues IPGs or scheduler groups related with those ports ?

Hmm which change in this commit your comment refers to?

@kcudnik
Copy link
Collaborator

kcudnik commented Dec 11, 2020

its not about this change, its about port properties, take a look inside source that for each port when it's created, another SG's, queues and IPGs are created for each port, but not in your case

take a look at methods:
create_ingress_priority_groups
create_qos_queues
create_qos_queues_per_port

in each of specific classes

@ngoc-do
Copy link
Contributor Author

ngoc-do commented Jan 4, 2021

its not about this change, its about port properties, take a look inside source that for each port when it's created, another SG's, queues and IPGs are created for each port, but not in your case

take a look at methods:
create_ingress_priority_groups
create_qos_queues
create_qos_queues_per_port

in each of specific classes

Hello Kamil, thanks for pointing these functions out -- very useful information.

Fabric ports are different from regular front panel ports. They don't have properties like INGRESS_PRIORITY_GROUP, INGRESS_PRIORITY_GROUP_LIST, QOS_NUMBER_OF_SCHEDULER_GROUPS, QOS_SCHEDULER_GROUP_LIST, and etc...

            case SAI_PORT_ATTR_NUMBER_OF_INGRESS_PRIORITY_GROUPS:
                if (SAI_PORT_TYPE_FABRIC == port_type)
                {
                    rv = SAI_STATUS_ATTR_NOT_SUPPORTED_0+i;
                    break;
                }

            case SAI_PORT_ATTR_INGRESS_PRIORITY_GROUP_LIST:
            {
                if (SAI_PORT_TYPE_FABRIC == port_type)
                {
                    rv = SAI_STATUS_ATTR_NOT_SUPPORTED_0+i;
                    break;
                }
            case SAI_PORT_ATTR_QOS_NUMBER_OF_SCHEDULER_GROUPS:
                if (SAI_PORT_TYPE_FABRIC == port_type)
                {
                    rv = SAI_STATUS_ATTR_NOT_SUPPORTED_0+i;
                    break;
                }

            case SAI_PORT_ATTR_QOS_SCHEDULER_GROUP_LIST:
            {
                if (SAI_PORT_TYPE_FABRIC == port_type)
                {
                    rv = SAI_STATUS_ATTR_NOT_SUPPORTED_0+i;
                    break;
                }

QOS_NUMBER_OF_QUEUES is available for fabric ports, but currently not supported in network forwarding asics. I can't test on real hardware, and so queue counters for fabric ports are not collected yet.

            case SAI_PORT_ATTR_QOS_NUMBER_OF_QUEUES:
                if (SAI_PORT_TYPE_FABRIC == port_type)
                {
                    {
                        /* FIXME: Add fabric queue support in JR2 if applicable */
                        rv = SAI_STATUS_ATTR_NOT_SUPPORTED_0+i;
                    }
                }

Once Broadcom enables this feature, I will update swss, test on real hardware, as well as update vstest lib for this property.

@kcudnik
Copy link
Collaborator

kcudnik commented Jan 4, 2021

so if SAI_PORT_ATTR_QOS_NUMBER_OF_QUEUES will be supported, then also qos queues will also be supported later probably, so i think for now we can go with this approach

@ngoc-do
Copy link
Contributor Author

ngoc-do commented Jan 5, 2021

retest this please

@ngoc-do
Copy link
Contributor Author

ngoc-do commented Jan 5, 2021

Hello Kamil, do you have any advices for vs test failures? The first time I saw 4 failures, which looked weird to me (very unlikely to related to my changes). I retested, and now there were 299 failures. Those were due to another issue that seemed to system setup:

def __init__(self, *args):
> this = _swsscommon.new_Table(*args)
E RuntimeError: Sonic database config file doesn't exist at /var/run/redis/sonic-db/database_config.json

What should I do next? retest one more time?

@kcudnik
Copy link
Collaborator

kcudnik commented Jan 5, 2021

yea, this is some new error, not related to your changes

@ngoc-do
Copy link
Contributor Author

ngoc-do commented Jan 5, 2021

yea, this is some new error, not related to your changes

Cool, so would you approve this PR to merge?

@ngoc-do
Copy link
Contributor Author

ngoc-do commented Jan 11, 2021

Hello, I'm trying to follow up what the next step I should do to merge it up?

@kcudnik
Copy link
Collaborator

kcudnik commented Jan 11, 2021

retest vs please

@ngoc-do
Copy link
Contributor Author

ngoc-do commented Jan 11, 2021

Thank you. It passed all. Definitely inside things got fixed.

@ngoc-do
Copy link
Contributor Author

ngoc-do commented Jan 12, 2021

Could we merge it now?

@kcudnik kcudnik merged commit 7d31204 into sonic-net:master Jan 12, 2021
ngoc-do added a commit to ngoc-do/sonic-swss that referenced this pull request Feb 8, 2021
Now voq and fabric asics are enabled with fabric ports. Need to fix
the tests to count for fabric ports. vstest infrastructure for fabric
ports merged in sonic-net/sonic-sairedis#737 and
769. This infrastructure requires sonic-net/sonic-buildimage#6185
to be effective. However, this PR (6185) will have some swss tests
failing. We need to disable those tests, let the PR merge, and reenable
the tests.
ngoc-do added a commit to ngoc-do/sonic-swss that referenced this pull request Apr 2, 2021
Now voq and fabric asics are enabled with fabric ports. Need to fix
the tests to count for fabric ports. vstest infrastructure for fabric
ports merged in sonic-net/sonic-sairedis#737 and
769. This infrastructure requires sonic-net/sonic-buildimage#6185
to be effective. However, this PR (6185) will have some swss tests
failing. We need to disable those tests, let the PR merge, and reenable
the tests.
ngoc-do added a commit to ngoc-do/sonic-swss that referenced this pull request Apr 28, 2021
Now voq and fabric asics are enabled with fabric ports. Need to fix
the tests to count for fabric ports. vstest infrastructure for fabric
ports merged in sonic-net/sonic-sairedis#737 and
769. This infrastructure requires sonic-net/sonic-buildimage#6185
to be effective. However, this PR (6185) will have some swss tests
failing. We need to disable those tests, let the PR merge, and reenable
the tests.
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
Signed-off-by: ngocdo <ngocdo@arista.com>
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