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 scheduler groups support to virtual switch #132

Merged
merged 6 commits into from
Dec 2, 2016

Conversation

kcudnik
Copy link
Collaborator

@kcudnik kcudnik commented Nov 23, 2016

No description provided.

@@ -84,6 +84,12 @@ sai_status_t transfer_list(
{
transfer_primitive(src_element.count, dst_element.count);

if (src_element.list == NULL && src_element.count > 0)
Copy link
Contributor

@qiluo-msft qiluo-msft Nov 23, 2016

Choose a reason for hiding this comment

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

if (src_element.list == NULL && src_element.count > 0) [](start = 7, length = 55)

replace src with dst, and move if-block before previous statement? #Closed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no, src must be check since from it it will be copy

Copy link
Contributor

@qiluo-msft qiluo-msft Nov 24, 2016

Choose a reason for hiding this comment

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

Sorry, I thought the wrong direction. So move if-block before previous statement? So that there is no partially assigned dst_element when throw? #Closed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't quite get that, when you will get currupted dst_element ?

Copy link
Contributor

@qiluo-msft qiluo-msft Nov 24, 2016

Choose a reason for hiding this comment

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

(update the original comment to clarify) #Closed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah in this case, sure i can move that, anyway this partial override doesen't matter since api will fail

@@ -20,6 +20,12 @@ if SAICAVM
SAIFLAGS = -DCAVMSAI
endif

if SAIVS
SAILIB=-L$(top_srcdir)/vslib/src/.libs -lsaivs
Copy link
Contributor

Choose a reason for hiding this comment

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

.libs [](start = 33, length = 5)

.libs is not necessary. This is an example: https://github.com/Azure/sonic-swss-common/blob/master/tests/Makefile.am

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

its needed since i want to prefer local build lib agains the one installed in the system which is causing a lot of confusion and require to build twice

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually that is actual behavior. libtool does the magic.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure about this, i will need to investigate on that, for now i leave this as is since its working


// sg 0 (2 groups)
{
sai_object_id_t sg_0 = sgs.at(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

sgs [](start = 31, length = 3)

Do you have assumption on sgs.size()? Add assertion or runtime check?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

at() is runtime check

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. It will throw. Is it better to return a sai_status_t?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Depends how to look at this, since this is one off, if written correctly it will never fail, and if some actions will lead to throw it will need to be corrected right away since this logic is executed in vs tests when doing make check, then is auto tested

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually all those CHECK_STATUS could throw anyway

{
sai_object_id_t childs[2];

childs[0] = queues[queue_index]; // first half are in queues
Copy link
Contributor

@qiluo-msft qiluo-msft Nov 23, 2016

Choose a reason for hiding this comment

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

queue_index [](start = 31, length = 11)

i? #Closed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no, queue_index, analyze code

@@ -44,13 +46,175 @@ service_method_table_t test_services = {
profile_get_next_value
};

#define SUCCESS(x) \
if (x != SAI_STATUS_SUCCESS) \
Copy link
Contributor

@qiluo-msft qiluo-msft Nov 23, 2016

Choose a reason for hiding this comment

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

x [](start = 8, length = 1)

(x) #Closed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes


ASSERT_TRUE(attr.value.objlist.count == expected_ports);
}

int main()
Copy link
Contributor

Choose a reason for hiding this comment

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

main [](start = 4, length = 4)

Just wondering why not use gtest?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you are wellcome to move all tests to gtest

@svc-acs
Copy link
Collaborator

svc-acs commented Nov 28, 2016

this commit is failing for the build check. seems it wants to link with opennsl on the mellanox platform. Not sure why.

if SAIVS
SAILIB=-L$(top_srcdir)/vslib/src/.libs -lsaivs
else
SAILIB=-lsai -lopennsl -ldl
Copy link
Contributor

Choose a reason for hiding this comment

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

-lopennsl [](start = 13, length = 9)

this should be brcm specific.

@kcudnik kcudnik merged commit e90bf4f into sonic-net:master Dec 2, 2016
@kcudnik kcudnik deleted the schedvs branch December 2, 2016 23:35
jianyuewu pushed a commit to jianyuewu/sonic-sairedis that referenced this pull request Feb 7, 2025
We observe that the change made by installer sometimes fails to be written onto hard disk. This PR will fix this issue.
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.

4 participants