Skip to content

swss: Dataplane telemetry support in SONiC#521

Merged
lguohan merged 96 commits intosonic-net:masterfrom
barefootnetworks:bf-master
Jul 15, 2018
Merged

swss: Dataplane telemetry support in SONiC#521
lguohan merged 96 commits intosonic-net:masterfrom
barefootnetworks:bf-master

Conversation

@shruthi9
Copy link
Contributor

@shruthi9 shruthi9 commented Jun 8, 2018

Adding dataplane telemetry configuration support in SONiC

Pending: new VS tests to be added for this feature
A separate PR will be created for new community tests that will added for this feature

Design for the feature is at:
sonic-net/SONiC#182

kram and others added 30 commits November 2, 2017 16:58
enable mirror
@shruthi9
Copy link
Contributor Author

Fixed the VS test

m_orchList = { switch_orch, gCrmOrch, gPortsOrch, intfs_orch, gNeighOrch, gRouteOrch, copp_orch, tunnel_decap_orch, qos_orch, gBufferOrch, mirror_orch };

bool initialize_dtel = false;
if (platform == BFN_PLATFORM_SUBSTRING)
Copy link
Contributor

Choose a reason for hiding this comment

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

in vs env, the platform is not BFN, then initialize_dtel is false and dtel_orch is not initialized, how can dtel vs test passing? Where do I miss here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I locally remove the platform check when I run the test. Without the check, I make sure it still passes for other platforms. Is there some other way to handle platform-specific feature tests for VS?

Copy link
Contributor

Choose a reason for hiding this comment

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

I will add platform vs for this env, and you can check if platform == "vs" or platform == BFN_PLATFORM_SUBSTRING

atbl = swsscommon.Table(adb, "ASIC_STATE:SAI_OBJECT_TYPE_DTEL")
keys = atbl.getKeys()

for k in keys:
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, here the keys is null then, no assert is checked, that is why it is passing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor

Choose a reason for hiding this comment

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

need to assert len(keys) > 1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The check would fail if platform is not barefoot. Is there a "vs platform" check that we can add to orchdaemon.cpp to initialize dtel, in addition to barefoot?


#define MLNX_PLATFORM_SUBSTRING "mellanox"
#define BRCM_PLATFORM_SUBSTRING "broadcom"
#define BFN_PLATFORM_SUBSTRING "barefoot"
Copy link
Contributor

Choose a reason for hiding this comment

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

add BFN_PLATFORM_SUBSTRING "vs" here.

I will export the env in the vs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean #define VS_PLATFORM_SUBSTRING "vs"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed


atbl = swsscommon.Table(adb, "ASIC_STATE:SAI_OBJECT_TYPE_DTEL_REPORT_SESSION")
keys = atbl.getKeys()

Copy link
Contributor

Choose a reason for hiding this comment

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

check keys is not empty.

atbl = swsscommon.Table(adb, "ASIC_STATE:SAI_OBJECT_TYPE_DTEL_INT_SESSION")
keys = atbl.getKeys()

for k in keys:
Copy link
Contributor

Choose a reason for hiding this comment

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

check keys is not empty.

atbl = swsscommon.Table(adb, "ASIC_STATE:SAI_OBJECT_TYPE_DTEL_QUEUE_REPORT")
keys = atbl.getKeys()

for k in keys:
Copy link
Contributor

Choose a reason for hiding this comment

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

check keys is not empty.

atbl = swsscommon.Table(adb, "ASIC_STATE:SAI_OBJECT_TYPE_DTEL_EVENT")
keys = atbl.getKeys()

for k in keys:
Copy link
Contributor

Choose a reason for hiding this comment

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

check keys is not empty.

@shruthi9
Copy link
Contributor Author

Enabled DTel for VS platform and fixed the test

@lguohan
Copy link
Contributor

lguohan commented Jul 13, 2018

retest this please

@shruthi9
Copy link
Contributor Author

Looks like platform env variable is not set to "vs" and dtel test fails due to that in the newly added assert. sonic-buildimage seems to be at commit daf590e. How do we fix this to pick the latest?

@shruthi9
Copy link
Contributor Author

buildimage-vs-all build has been failing last couple of times. VS tests here are not passing because the requisite change in buildimage is not present

@lguohan
Copy link
Contributor

lguohan commented Jul 14, 2018

platform vs is added. the dtel orch tests are passing, but it looks like it is causing mirror test to fail.

it looks like it is causing two tests to fail.

test_mirror.py::TestMirror::test_AclRuleDscpWithoutMask FAILED           [ 70%]
test_mirror.py::TestMirror::test_AclRuleDscpWithMask FAILED              [ 72%]

@shruthi9 , ca you take a look?
@stcheng , can you also take a look?

@lguohan
Copy link
Contributor

lguohan commented Jul 15, 2018

thanks

@lguohan lguohan merged commit dcf6c90 into sonic-net:master Jul 15, 2018
Copy link
Contributor

@stcheng stcheng left a comment

Choose a reason for hiding this comment

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

could you explain a little bit about my questions?


acl_tables = [k for k in keys if k not in dvs.asicdb.default_acl_table]
assert len(acl_tables) == 1
assert len(acl_tables) >= 1
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the exact number of the ACL tables?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DTel adds 2 additional ACL tables in addition to the default one

assert len(acl_tables) >= 1

return acl_tables[0]
# Filter out DTel Acl tables
Copy link
Contributor

Choose a reason for hiding this comment

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

If this ACL table is there by default, you could add the table information in the conftest.py file.

EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…onic-net#521)

* Add buffer pool watermark support to watermarkstat

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Add buffer pool watermark to counterpoll

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Print N/A if the buffer pool watermark value is not present

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Fix syntax error; Change signature of function get_print_all_stat

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Address review comments

Signed-off-by: Wenda Ni <wenni@microsoft.com>
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
* initial barefoot support october 2017

* import changes from telemetry branch

* Fix merge issues w.r.t rel_6_0 branch

* add validate and get port speed APIs - cleanup deletes from earlier checkin

* missed changes from earlier

* missed integration delete

* trying to get close to master version - and not break other vendor

* set the port config in the ASIC_DB

* update hostif oper status besides the DB update

* Fix compilation issues

* merge closer to master - including spaces and comments

* fix typos
enable mirror

* cosmetic fix

* Fix errors due to saiacl.h changes

* Fix more errors due to sai header file changes

* fix the order of nexthop/neighbor delete

* Fix compilation issues and few issues seen in testing

* Changes needed to add new Dtel api support to sairedis

* Report session DTel table related fixes

* Add more error handling code

* Fix logic to read table name and keys from m_toSync map

* Update value for dtel actions

* Handle boolean attributes to accept true/false as well as presence/absence

* Fix merge errors

* Incorporate configdb related changes for dtel

* fix code merge issue

* Incorporate configdb related changes for dtel

* add pfc_detect lua script

* Changes to incorporate new DTel SAI changes

* SONiC changes due to DTel experimental SAI changes

* cleanup configure.ac to allow barefoot platform includes

* fix typo

* revert commented tunneldecap

* test selective tunneldecap

* revert too ambitious an attempt and just push_back into vector!

* change fec mode to string (from integer)

* cleanup based on review

* closer to 201712 - cosmetic cleanup

* address review comments

* fix format

* Support for platforms based on Barefoot Networks' device (sonic-net#452)

* Fix issue with "config save" followed by reboot

* Temp remove crmorch

Currently orchagent crashes if crm is running. Needs to be fixed

* Initial code changes to address community design review comments

* Temp remove crmorch

Currently orchagent crashes if crm is running. Needs to be fixed
P.S This is actual commit that removes crm. Previous commit was to correct a typo, and has wrong commit message

* More changes to address review comments

* Fix build errors

* Fix for orchagent crash

* Fix queue report deletion error

* Bug fixes

* Re-enable crm orchagent (Pterosaur#3)

* Add support for new watchlist attribute to enable/disable tail drop reporting

* Add new VS test for Dataplane Telemetry feature

* Add support for AN and FEC to be specified in port_config.ini

* do not set autoneg if it is already set

* Address review comments

* Fix compilation errors

* set port adv speed for AN and add test

Signed-off-by: Guohan Lu <gulv@microsoft.com>

* Convert all the tabs to spaces

* Bring in changes for port an/fec from azure master

* support autoneg and fec in port config ini file
* if autoneg is specified, along with speed; speed is set seperately as port attribute

* Address review comments

* Remove trailing whitespaces

* Fix vs test indentation

* Address review comments

* Fix for VS test

* Fix VS test failure

* Fix for VS test

* More VS test fixes

* Fix for test_mirror VS test that was failing due to new DTel ACL tables
jianyuewu pushed a commit to jianyuewu/sonic-swss that referenced this pull request Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants