Skip to content

[syncd_saiswitch]: Keep full port oids#234

Merged
lguohan merged 1 commit intosonic-net:masterfrom
marian-pritsak:patch-1
Oct 3, 2017
Merged

[syncd_saiswitch]: Keep full port oids#234
lguohan merged 1 commit intosonic-net:masterfrom
marian-pritsak:patch-1

Conversation

@marian-pritsak
Copy link
Copy Markdown
Contributor

Keep port oids in COUNTERS_DB in serializable format
This way client code can reuse sai_deserialize... api

Keep port oids in COUNTERS_DB in serializable format
This way client code can reuse sai_deserialize... api
@stcheng
Copy link
Copy Markdown
Contributor

stcheng commented Oct 1, 2017

could you explain a little bit more about this change? what client code is to reuse the sai_deserialize_ api? any examples?

@stcheng
Copy link
Copy Markdown
Contributor

stcheng commented Oct 1, 2017

could you provide an output of the database dump?

@marian-pritsak
Copy link
Copy Markdown
Contributor Author

In case of PFC WD we run an arbitrary .lua plugin on Counters DB to check if storm condition is met. According to design, it is going to receive notification from .lua script indicating that queue state changed.
It would be better to have oids in serializable format in order for watchdog to just deserialize them without modification.

@stcheng
Copy link
Copy Markdown
Contributor

stcheng commented Oct 2, 2017

what will be the final output in the database?

@marian-pritsak
Copy link
Copy Markdown
Contributor Author

marian-pritsak commented Oct 3, 2017

 1) "COUNTERS:oid:0x100000000023a"
 2) "COUNTERS:oid:0x100000000012a"
 3) "COUNTERS:oid:0x100000000038e"
 4) "COUNTERS:oid:0x100000000036c"
 5) "COUNTERS:oid:0x1000000000190"
 6) "COUNTERS:oid:0x100000000049e"
 7) "COUNTERS:oid:0x1000000000548"
 8) "COUNTERS:oid:0x100000000025c"
 9) "COUNTERS:oid:0x1000000000416"
10) "COUNTERS:oid:0x1000000000306"
11) "COUNTERS:oid:0x10000000002e4"
...

@marian-pritsak
Copy link
Copy Markdown
Contributor Author

127.0.0.1:6379[2]> hgetall COUNTERS_PORT_NAME_MAP
 1) "Ethernet0"
 2) "oid:0x1000000000526"
 3) "Ethernet100"
 4) "oid:0x100000000025c"
 5) "Ethernet104"
 6) "oid:0x100000000027e"
 7) "Ethernet108"
 8) "oid:0x10000000002a0"
 9) "Ethernet112"
10) "oid:0x10000000002c2"
11) "Ethernet116"
12) "oid:0x10000000002e4"
13) "Ethernet12"
14) "oid:0x1000000000504"
...

@kcudnik
Copy link
Copy Markdown
Collaborator

kcudnik commented Oct 3, 2017

im ok with this change but just remember to update related components to be aware of this change

@lguohan lguohan merged commit 888e69c into sonic-net:master Oct 3, 2017
@stcheng
Copy link
Copy Markdown
Contributor

stcheng commented Oct 24, 2017

this commit along with the commit in the swss repository are breaking the image.

@stcheng
Copy link
Copy Markdown
Contributor

stcheng commented Oct 25, 2017

this change goes along with this: sonic-net/sonic-swss#331

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