Coder Social home page Coder Social logo

sonic-net / sonic-sairedis Goto Github PK

View Code? Open in Web Editor NEW
56.0 69.0 255.0 8.65 MB

SAI object interface to Redis database, as used in the SONiC project

License: Other

Makefile 0.65% Shell 0.65% C++ 95.88% M4 0.78% C 0.56% Perl 1.03% Python 0.35% Dockerfile 0.03% SWIG 0.08%

sonic-sairedis's Introduction

static analysis:

Total alerts Language grade: C/C++

sairedis builds:

master build 202205 build 202111 build 202106 build 202012 build 201911 build

SONiC - SAI Redis - sairedis

Description

The SAI Redis provides a SAI redis service built on top of redis database. It contains two major components:

  1. SAI library that puts SAI objects into the redis database.
  2. syncd that takes the SAI objects and puts them into the ASIC.

Getting Started

Install

Before installing, add key and package sources:

sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
echo 'deb http://apt-mo.trafficmanager.net/repos/sonic/ trusty main' | sudo tee -a /etc/apt/sources.list.d/sonic.list
sudo apt-get update

Install dependencies:

sudo apt-get install redis-server -t trusty
sudo apt-get install libhiredis0.13 -t trusty

Install building dependencies:

sudo apt-get install libtool autoconf dh-exec

There are a few different ways you can install sairedis.

Install from Debian Repo

For your convenience, you can install prepared packages on Debian Jessie:

sudo apt-get install libsairedis syncd

Install from Source

Checkout the source: git clone https://github.com/sonic-net/sonic-sairedis.git and install it yourself.

You will also need SAI submodule: git submodule update --init --recursive

Get SAI header files into /usr/include/sai. Put the SAI header files that you use to compile libsairedis into /usr/include/sai

Get ASIC SDK and SAI packages from your ASIC vendor and install them.

Install prerequisite packages:

sudo apt-get install libswsscommon libswsscommon-dev libhiredis-dev libzmq3-dev libpython-dev

Note: libswsscommon-dev requires libnl-3-200-dev, libnl-route-3-200-dev and libnl-nf-3-200-dev version >= 3.5.0. If these are not available via apt repositories, you can get them from the latest sonic-buildimage build.

Install SAI dependencies:

sudo apt-get install doxygen graphviz aspell

You can compile and install from source using:

./autogen.sh
./configure
make && sudo make install

You can also build a debian package using:

./autogen.sh
fakeroot debian/rules binary

If you do not have libsai, you can build a debian package using:

./autogen.sh
fakeroot debian/rules binary-syncd-vs

Need Help?

For general questions, setup help, or troubleshooting:

For bug reports or feature requests, please open an Issue.

Contribution guide

See the contributors guide for information about how to contribute.

All contributors must sign an Individual Contributor License Agreement (ICLA) before contributions can be accepted. This process is managed by the Linux Foundation - EasyCLA and automated via a GitHub bot. If the contributor has not yet signed a CLA, the bot will create a comment on the pull request containing a link to electronically sign the CLA.

GitHub Workflow

We're following basic GitHub Flow. If you have no idea what we're talking about, check out GitHub's official guide. Note that merge is only performed by the repository maintainer.

Guide for performing commits:

  • Isolate each commit to one component/bugfix/issue/feature
  • Use a standard commit message format:
[component/folder touched]: Description intent of your changes

[List of changes]

Signed-off-by: Your Name [email protected]

For example:

swss-common: Stabilize the ConsumerTable

* Fixing autoreconf
* Fixing unit-tests by adding checkers and initialize the DB before start
* Adding the ability to select from multiple channels
* Health-Monitor - The idea of the patch is that if something went wrong with the notification channel,
  we will have the option to know about it (Query the LLEN table length).

  Signed-off-by: [email protected]
  • Each developer should fork this repository and add the team as a Contributor
  • Push your changes to your private fork and do "pull-request" to this repository
  • Use a pull request to do code review
  • Use issues to keep track of what is going on

sonic-sairedis's People

Contributors

abanu-ms avatar ashish1805 avatar daall avatar dgsudharsan avatar dzhangalibaba avatar jimmyzhai avatar jleveque avatar junchao-mellanox avatar kcudnik avatar lguohan avatar liushilongbuaa avatar marian-pritsak avatar mykolaf avatar nazariig avatar oleksandrivantsiv avatar pavel-shirshov avatar prsunny avatar pterosaur avatar qiluo-msft avatar richardyu-ms avatar saiarcot895 avatar shi-su avatar sihuihan88 avatar stcheng avatar stepanblyschak avatar vganesan-nokia avatar vmittal-msft avatar wendani avatar yakiv-huryk avatar yxieca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sonic-sairedis's Issues

Several Issues Question

  1. The README.md file uses '-t trusty'. Is the trusty for the Ubuntu version?
    If so, I am using Ubuntu 18.04 and installed any software using '-t trusty' without it. Is that correct?
  2. The README.md says "Get SAI header files into /usr/include/sai." Where does one get the SAI header files from? I don't have an asic/switch, what do I do to run sairedis DB on a Ubuntu machine? I haven't invoked this "Get SAI header files" step.

I used 'autogen.sh' followed by './configure' and 'make'. make fails as shown below.

hemant@ubuntu:~/sonic-sairedis$ make
make  all-recursive
make[1]: Entering directory '/home/hemant/sonic-sairedis'
Making all in meta
make[2]: Entering directory '/home/hemant/sonic-sairedis/meta'
make -C ../SAI/meta
make[3]: Entering directory '/home/hemant/sonic-sairedis/SAI/meta'
Makefile:68: *** "Missing doxygen in PATH".  Stop.
make[3]: Leaving directory '/home/hemant/sonic-sairedis/SAI/meta'
Makefile:1265: recipe for target '../SAI/meta/saimetadata.c' failed
make[2]: *** [../SAI/meta/saimetadata.c] Error 2
make[2]: Leaving directory '/home/hemant/sonic-sairedis/meta'
Makefile:404: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/hemant/sonic-sairedis'
Makefile:336: recipe for target 'all' failed
make: *** [all] Error 2
hemant@ubuntu:~/sonic-sairedis$ hemant@ubuntu:~/sonic-sairedis$ make
make  all-recursive
make[1]: Entering directory '/home/hemant/sonic-sairedis'
Making all in meta
make[2]: Entering directory '/home/hemant/sonic-sairedis/meta'
make -C ../SAI/meta
make[3]: Entering directory '/home/hemant/sonic-sairedis/SAI/meta'
Makefile:68: *** "Missing dot in PATH".  Stop.
make[3]: Leaving directory '/home/hemant/sonic-sairedis/SAI/meta'
Makefile:1265: recipe for target '../SAI/meta/saimetadata.c' failed
make[2]: *** [../SAI/meta/saimetadata.c] Error 2
make[2]: Leaving directory '/home/hemant/sonic-sairedis/meta'
Makefile:404: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/hemant/sonic-sairedis'
Makefile:336: recipe for target 'all' failed
make: *** [all] Error 2
hemant@ubuntu:~/sonic-sairedis$ 

Is this expected for syncd to send shutdown request when a dynamic route is failed to be added due to table full?

We've faced the situation when syncd sends shutdown notification (https://github.com/Azure/sonic-sairedis/blob/master/syncd/syncd.cpp#L2792) when a dynamic route is failed to be added (https://github.com/Azure/sonic-sairedis/blob/master/syncd/syncd.cpp#L2747) due to table full.

At the same time in orchagent such a fail doesn't seem to be something critical as it doesn't raise any runtime error on route add fail: https://github.com/Azure/sonic-swss/blob/316ae6c0d2a47c95b3becb89497c42e46404b252/orchagent/routeorch.cpp#L809

So, is this situation with shutdown notification sent expected scenario or this is an issue?

How is orchagent connecting to ASIC_DB?

How is orchagent connecting to ASIC_DB? Ochagent is connecting to APPL_DB using DBConnector. What is orchagent using to communicate with ASIC_DB? Where is the code located for this connection?

service syncd stop broken on mlnx platform

root@str-msn2700-1:/# service syncd stop
start-stop-daemon: option '--exec' requires an argument
Try 'start-stop-daemon --help' for more information.
root@str-msn2700-1:/#

syncd crash with port breakout?

it looks to be happening with port breakout feature in swss?

not seeing crash with swss commit
"
bff69e9321b492c0ebf2e08bd62776b6e03a6590
Author: sihuihan88 [email protected]
Date: Thu Sep 28 11:22:09 2017 -0700

[aclorch]: Fix crashing when removing ACL table that has associated ACL rules (#322)

" or older version.

root@sonic:/etc/sonic/debug# gdb /usr/bin/syncd syncd.1507110449.27.core
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/syncd...Reading symbols from /usr/lib/debug/.build-id/c6/46ea06970329ef1ce3887267a23c3d95f02bf7.debug...done.
done.
[New LWP 27]
[New LWP 35]
[New LWP 48]
[New LWP 32]
[New LWP 49]
[New LWP 30]
[New LWP 72]
[New LWP 34]
[New LWP 47]
[New LWP 36]
[New LWP 31]
[New LWP 71]
[New LWP 50]
[New LWP 51]
[New LWP 37]
[New LWP 39]
[New LWP 40]
[New LWP 41]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by /usr/bin/syncd --diag -p /usr/share/sonic/hwsku/sai.profile'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in ?? () #1 0x0000000000411c04 in handle_generic (object_type=SAI_OBJECT_TYPE_PORT, str_object_id="oid:0x1000000000026", api=api@entry=SAI_COMMON_API_REMOVE, attr_count=attr_count@entry=0, attr_list=attr_list@entry=0x0) at syncd.cpp:1245 #2 0x00000000004127d0 in processEvent (consumer=...) at syncd.cpp:2298 #3 0x0000000000408cab in main (argc=<optimized out>, argv=<optimized out>) at syncd.cpp:3110 (gdb) info locals No symbol table info available. (gdb) up 1 #1 0x0000000000411c04 in handle_generic (object_type=SAI_OBJECT_TYPE_PORT, str_object_id="oid:0x1000000000026", api=api@entry=SAI_COMMON_API_REMOVE, attr_count=attr_count@entry=0, attr_list=attr_list@entry=0x0) at syncd.cpp:1245 1245 syncd.cpp: No such file or directory. (gdb) info locals rid = 4294967362 status = <optimized out> logger__LINE__ = {m_line = 1123, m_fun = 0x444923 <handle_generic(_sai_object_type_t, std::string const&, _sai_common_api_t, unsigned int, _sai_attribute_t*)::__FUNCTION__> "handle_generic"} __FUNCTION__ = "handle_generic" object_id = 281474976710694 info = 0x7ffb0cccb480 <sai_metadata_object_type_info_SAI_OBJECT_TYPE_PORT> meta_key = {objecttype = SAI_OBJECT_TYPE_PORT, objectkey = {key = {object_id = 4294967362, fdb_entry = {switch_id = 4294967362, mac_address = "6\203\f\373\177",
bridge_type = (unknown: 44), vlan_id = 0, bridge_id = 11512109}, neighbor_entry = {switch_id = 4294967362, rif_id = 140716223444576, ip_address = {
addr_family = (unknown: 44), addr = {ip4 = 0, ip6 = "\000\000\000\000-\251\257\000\000\000\000\000:\330g\021"}}}, route_entry = {switch_id = 4294967362,
vr_id = 140716223444576, destination = {addr_family = (unknown: 44), addr = {ip4 = 0, ip6 = "\000\000\000\000-\251\257\000\000\000\000\000:\330g\021"}, mask = {ip4 = 32763,
ip6 = "\373\177\000\000\000\000\000\000\000\000\000\000!\360@"}}}, mcast_fdb_entry = {switch_id = 4294967362, mac_address = "6\203\f\373\177", vlan_id = 0}, l2mc_entry = {switch_id = 4294967362, bridge_type = (unknown: 209925728), vlan_id = 32763, bridge_id = 44, type = (SAI_L2MC_ENTRY_TYPE_XG | unknown: 11512108), destination = { addr_family = SAI_IP_ADDR_FAMILY_IPV4, addr = {ip4 = 292018234, ip6 = ":\330g\021\373\177\000\000\000\000\000\000\000\000\000"}}, source = { addr_family = (SAI_IP_ADDR_FAMILY_IPV6 | unknown: 4255776), addr = {ip4 = 0, ip6 = "\000\000\000\000\002\000\000\000\000\000\000pJD"}}}, ipmc_entry = {
switch_id = 4294967362, vr_id = 140716223444576, type = (unknown: 44), destination = {addr_family = SAI_IP_ADDR_FAMILY_IPV4, addr = {ip4 = 11512109,
ip6 = "-\251\257\000\000\000\000\000:\330g\021\373\177\000"}}, source = {addr_family = SAI_IP_ADDR_FAMILY_IPV4, addr = {ip4 = 0,
ip6 = "\000\000\000\000!\360@\000\000\000\000\000`\002\000"}}}}}}
(gdb) up 1
#2 0x00000000004127d0 in processEvent (consumer=...) at syncd.cpp:2298
2298 in syncd.cpp
(gdb) info locals
logger__LINE__ = {m_line = 2128, m_fun = 0x4447f2 <processEvent(swss::ConsumerTable&)::FUNCTION> "processEvent"}
FUNCTION = "processEvent"
str_object_id = "oid:0x1000000000026"
api = SAI_COMMON_API_REMOVE
object_type = SAI_OBJECT_TYPE_PORT
attr_count = 0
kco = std::tuple containing = {[1] = "SAI_OBJECT_TYPE_PORT:oid:0x1000000000026", [2] = "remove", [3] = std::vector of length 0, capacity 0}
list = {m_attr_list = std::vector of length 0, capacity 0, m_attr_value_type_list = std::vector of length 0, capacity 0}
info = 0x7ffb0cccb480 <sai_metadata_object_type_info_SAI_OBJECT_TYPE_PORT>
status =
lock = {_M_device = @0x657980}
str_object_type = "SAI_OBJECT_TYPE_PORT"
attr_list = 0x0
(gdb)

US-70998M:sonic-sairedis jipanyang$ git log
commit 888e69c
Author: Marian Pritsak [email protected]
Date: Wed Oct 4 02:28:10 2017 +0300

[syncd_saiswitch]: Keep full port oids (#234)

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

commit e4d2427
Author: Qi Luo [email protected]
Date: Mon Oct 2 18:07:49 2017 +0000

Implement sai_bulk_create_route_entry in sairedis and syncd

* internal_redis_bulk_generic_create() support multiple attrs for one entry
* implement bulkcreate in syncd
* add bulk API for rotue create and set
* add bulk route set api test

Signed-off-by: Qi Luo <[email protected]>

root@sonic:/var/log/swss# tail sairedis.rec
2017-10-04.09:47:29.528050|c|SAI_OBJECT_TYPE_ACL_TABLE:oid:0x7000000000974|SAI_ACL_TABLE_ATTR_ACL_BIND_POINT_TYPE_LIST=1:SAI_ACL_BIND_POINT_TYPE_PORT|SAI_ACL_TABLE_ATTR_ACL_STAGE=SAI_ACL_STAGE_INGRESS|SAI_ACL_TABLE_ATTR_FIELD_ECN=true|SAI_ACL_TABLE_ATTR_FIELD_DSCP=true
2017-10-04.09:47:29.528759|c|SAI_OBJECT_TYPE_ACL_ENTRY:oid:0x8000000000975|SAI_ACL_ENTRY_ATTR_TABLE_ID=oid:0x7000000000974|SAI_ACL_ENTRY_ATTR_PRIORITY=1000|SAI_ACL_ENTRY_ATTR_FIELD_ECN=0&mask:0x3|SAI_ACL_ENTRY_ATTR_FIELD_DSCP=8&mask:0x3f|SAI_ACL_ENTRY_ATTR_ACTION_SET_PACKET_COLOR=SAI_PACKET_COLOR_YELLOW
2017-10-04.09:47:29.529558|c|SAI_OBJECT_TYPE_ACL_ENTRY:oid:0x8000000000976|SAI_ACL_ENTRY_ATTR_TABLE_ID=oid:0x7000000000974|SAI_ACL_ENTRY_ATTR_PRIORITY=999|SAI_ACL_ENTRY_ATTR_FIELD_ECN=0&mask:0x3|SAI_ACL_ENTRY_ATTR_FIELD_DSCP=0&mask:0x3f|SAI_ACL_ENTRY_ATTR_ACTION_SET_PACKET_COLOR=SAI_PACKET_COLOR_YELLOW
2017-10-04.09:47:29.534823|g|SAI_OBJECT_TYPE_SWITCH:oid:0x21000000000000|SAI_SWITCH_ATTR_ACL_ENTRY_MINIMUM_PRIORITY=91|SAI_SWITCH_ATTR_ACL_ENTRY_MAXIMUM_PRIORITY=1450447592
2017-10-04.09:47:29.539093|G|SAI_STATUS_SUCCESS|SAI_SWITCH_ATTR_ACL_ENTRY_MINIMUM_PRIORITY=0|SAI_SWITCH_ATTR_ACL_ENTRY_MAXIMUM_PRIORITY=2147483647
2017-10-04.09:47:29.539389|a|APPLY_VIEW
2017-10-04.09:47:29.540439|A|SAI_STATUS_SUCCESS
2017-10-04.09:47:29.546332|r|SAI_OBJECT_TYPE_PORT:oid:0x1000000000026
2017-10-04.09:47:29.546580|r|SAI_OBJECT_TYPE_PORT:oid:0x1000000000034
2017-10-04.09:47:29.547281|g|SAI_OBJECT_TYPE_PORT:oid:0x1000000000002|SAI_PORT_ATTR_NUMBER_OF_INGRESS_PRIORITY_GROUPS=2300402016

Mac entries in ASIC_DB can't be flushed when receive SAI_FDB_EVENT_FLUSHED from SAI

in function void redisPutFdbEntryToAsicView( In const sai_fdb_event_notification_data_t *fdb) when it handles the SAI_FDB_EVENT_FLUSHED event it expecting all the flushed entries will be carried as the SAI_FDB_EVENT_AGED case.

if ((fdb->event_type == SAI_FDB_EVENT_AGED)||(fdb->event_type == SAI_FDB_EVENT_FLUSHED))
{
        if (fdb->event_type == SAI_FDB_EVENT_AGED)
        {
            SWSS_LOG_DEBUG("remove fdb entry %s for SAI_FDB_EVENT_AGED",key.c_str());
        }
        if (fdb->event_type == SAI_FDB_EVENT_FLUSHED)
        {
            SWSS_LOG_DEBUG("remove fdb entry %s for SAI_FDB_EVENT_FLUSHED",key.c_str());
        }
        g_redisClient->del(key);
        return;
 }

But seems this is not the case. I did some test on MLNX platform, in the mac entry flush case, SAI only send one '00:00:00:00:00:00' mac entry with the event.

2018-01-01.09:41:55.073229|n|fdb_event|[{"fdb_entry":"{"bridge_id":"oid:0x0","bridge_type":"SAI_FDB_ENTRY_BRIDGE_TYPE_1Q","mac":"00:00:00:00:00:00","switch_id":"oid:0x21000000000000","vlan":"0"}","fdb_event":"SAI_FDB_EVENT_FLUSHED","list":[{"id":"SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID","value":"oid:0x0"},{"id":"SAI_FDB_ENTRY_ATTR_TYPE","value":"SAI_FDB_ENTRY_TYPE_DYNAMIC"},{"id":"SAI_FDB_ENTRY_ATTR_PACKET_ACTION","value":"SAI_PACKET_ACTION_FORWARD"}]}]|

I am not sure the situation on other platforms?

Operational status is nil after system start up for ports with linkDown status

This is because orgagent haven`t start to get on_port_state_change notification.
After triggering link status to up/down operational status become correct.

show version

SONiC Software Version: SONiC.HEAD.149-8af03fd
Distribution: Debian 8.8
Kernel: 3.16.0-4-amd64
Build commit: 8af03fd
Build date: Tue May 16 04:41:05 UTC 2017
Built by: johnar@jenkins-worker-1

Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-orchagent-cavm latest 6068b8895ea5 257.7 MB
docker-syncd-cavm latest 8ddae1f89263 297.9 MB
docker-dhcp-relay latest 021514bcc010 252.8 MB
docker-database latest 7872aec5900d 220.8 MB
docker-snmp-sv2 latest 498cd73cdf7c 290.5 MB
docker-teamd latest da176f334b6b 254.7 MB
docker-platform-monitor latest 39e4618ae9b1 269.9 MB
docker-lldp-sv2 latest ca07da5c55f4 256.3 MB
docker-fpm-quagga latest f7c6d0818c8f 261.2 MB

Warm reboot: view comparison for LAG

This is to record the open issue related to lag processing in current view comparison logic, for tracking purpose.

As commented in #351, the special comparison logic for LAG didn't take into account the case of lag member being removed/disabled temporarily before warm reboot. Further fix is needed to handle that scenario.

port oper status is still up even when admin is down on virtual switch

admin@vlab-01:~$ show int status
      Interface            Lanes    Speed    MTU           Alias             Vlan    Oper    Admin    Type    Asym PFC
---------------  ---------------  -------  -----  --------------  ---------------  ------  -------  ------  ----------
      Ethernet0      25,26,27,28      40G   9100    fortyGigE0/0           routed      up     down     N/A         off
      Ethernet4      29,30,31,32      40G   9100    fortyGigE0/4            trunk      up       up     N/A         off
      Ethernet8      33,34,35,36      40G   9100    fortyGigE0/8            trunk      up       up     N/A         off
     Ethernet12      37,38,39,40      40G   9100   fortyGigE0/12            trunk      up       up     N/A         off
     Ethernet16      45,46,47,48      40G   9100   fortyGigE0/16            trunk      up       up     N/A         off
     Ethernet20      41,42,43,44      40G   9100   fortyGigE0/20            trunk      up       up     N/A         off
     Ethernet24          1,2,3,4      40G   9100   fortyGigE0/24            trunk      up       up     N/A         off
     Ethernet28          5,6,7,8      40G   9100   fortyGigE0/28            trunk      up       up     N/A         off
     Ethernet32      13,14,15,16      40G   9100   fortyGigE0/32            trunk      up       up     N/A         off
     Ethernet36       9,10,11,12      40G   9100   fortyGigE0/36            trunk      up       up     N/A         off
     Ethernet40      17,18,19,20      40G   9100   fortyGigE0/40            trunk      up       up     N/A         off
     Ethernet44      21,22,23,24      40G   9100   fortyGigE0/44            trunk      up       up     N/A         off
     Ethernet48      53,54,55,56      40G   9100   fortyGigE0/48            trunk      up       up     N/A         off
     Ethernet52      49,50,51,52      40G   9100   fortyGigE0/52            trunk      up       up     N/A         off
     Ethernet56      57,58,59,60      40G   9100   fortyGigE0/56            trunk      up       up     N/A         off
     Ethernet60      61,62,63,64      40G   9100   fortyGigE0/60            trunk      up       up     N/A         off
     Ethernet64      69,70,71,72      40G   9100   fortyGigE0/64            trunk      up       up     N/A         off
     Ethernet68      65,66,67,68      40G   9100   fortyGigE0/68            trunk      up       up     N/A         off
     Ethernet72      73,74,75,76      40G   9100   fortyGigE0/72            trunk      up       up     N/A         off
     Ethernet76      77,78,79,80      40G   9100   fortyGigE0/76            trunk      up       up     N/A         off
     Ethernet80  109,110,111,112      40G   9100   fortyGigE0/80            trunk      up       up     N/A         off
     Ethernet84  105,106,107,108      40G   9100   fortyGigE0/84            trunk      up       up     N/A         off
     Ethernet88  113,114,115,116      40G   9100   fortyGigE0/88            trunk      up       up     N/A         off
     Ethernet92  117,118,119,120      40G   9100   fortyGigE0/92            trunk      up       up     N/A         off
     Ethernet96  125,126,127,128      40G   9100   fortyGigE0/96            trunk      up       up     N/A         off
    Ethernet100  121,122,123,124      40G   9100  fortyGigE0/100           routed      up     down     N/A         off
    Ethernet104      81,82,83,84      40G   9100  fortyGigE0/104           routed      up     down     N/A         off
    Ethernet108      85,86,87,88      40G   9100  fortyGigE0/108           routed      up     down     N/A         off
    Ethernet112      93,94,95,96      40G   9100  fortyGigE0/112  PortChannel0001      up       up     N/A         off
    Ethernet116      89,90,91,92      40G   9100  fortyGigE0/116  PortChannel0002      up       up     N/A         off
    Ethernet120  101,102,103,104      40G   9100  fortyGigE0/120  PortChannel0003      up       up     N/A         off
    Ethernet124     97,98,99,100      40G   9100  fortyGigE0/124  PortChannel0004      up       up     N/A         off
PortChannel0001              N/A      40G   9100             N/A           routed      up       up     N/A         N/A
PortChannel0002              N/A      40G   9100             N/A           routed      up       up     N/A         N/A
PortChannel0003              N/A      40G   9100             N/A           routed      up       up     N/A         N/A
PortChannel0004              N/A      40G   9100             N/A           routed      up       up     N/A         N/A

cannot set port MTU in virtual switch

Virtual switch tests (test_interface.py) are failing because orchagent is crashing when it tries to set the MTU on a port:

Mar 16 15:59:36.167059 3c64f3b4620b NOTICE #teammgrd: :- setLagMtu: Set port channel PortChannel002 MTU to 8888
Mar 16 15:59:36.167292 3c64f3b4620b NOTICE #orchagent: :- doPortTask: Set port Ethernet0 MTU to 8888
Mar 16 15:59:36.167450 3c64f3b4620b NOTICE #orchagent: :- doPortTask: Set port Ethernet4 MTU to 8888
Mar 16 15:59:36.167673 3c64f3b4620b NOTICE #orchagent: :- set: setting attribute 0x10000004 status: SAI_STATUS_SUCCESS
Mar 16 15:59:36.167982 3c64f3b4620b NOTICE #syncd: :- vs_get_veth_name: using eth1 instead of vEthernet0
Mar 16 15:59:36.168184 3c64f3b4620b WARNING #syncd: :- vs_set_dev_mtu: failed to set mtu on Ethernet0 to 8910
Mar 16 15:59:36.168207 3c64f3b4620b ERR #syncd: :- setPort: failed to set MTU on portId oid:0x100000001
Mar 16 15:59:36.168211 3c64f3b4620b ERR #syncd: :- set: set status: SAI_STATUS_FAILURE
Mar 16 15:59:36.168215 3c64f3b4620b ERR #syncd: :- processQuadEvent: VID: oid:0x1000000000002 RID: oid:0x100000001
Mar 16 15:59:36.168217 3c64f3b4620b ERR #syncd: :- processQuadEvent: attr: SAI_PORT_ATTR_MTU: 8910
Mar 16 15:59:36.168224 3c64f3b4620b ERR #syncd: :- processQuadEvent: failed to execute api: set, key: SAI_OBJECT_TYPE_PORT:oid:0x1000000000002, status: SAI_STATUS_FAILURE
Mar 16 15:59:36.168301 3c64f3b4620b ERR #syncd: :- run: Runtime error: :- processQuadEvent: failed to execute api: set, key: SAI_OBJECT_TYPE_PORT:oid:0x1000000000002, status: SAI_STATUS_FAILURE
Mar 16 15:59:36.168324 3c64f3b4620b NOTICE #syncd: :- sendShutdownRequest: sending switch_shutdown_request notification to OA for switch: oid:0x21000000000000
Mar 16 15:59:36.168498 3c64f3b4620b NOTICE #syncd: :- sendShutdownRequestAfterException: notification send successfull
Mar 16 15:59:36.169100 3c64f3b4620b INFO #supervisord: orchagent terminate called after throwing an instance of 'std::invalid_argument'
Mar 16 15:59:36.169150 3c64f3b4620b INFO #supervisord: orchagent   what():  parse error - unexpected 'o'
Mar 16 15:59:37.870598 3c64f3b4620b INFO #supervisord 2020-03-16 15:59:29,908 INFO reaped unknown pid 1064
Mar 16 15:59:37.870612 3c64f3b4620b INFO #supervisord 2020-03-16 15:59:36,267 INFO exited: orchagent (terminated by SIGABRT (core dumped); not expected)

With "fdbclear", syncd is not sending FDB_FLUSH event to SAI, hence MAC entries not removed

In Coldboot, when we do the fdbclear, the MAC entries are not getting cleared from redis db (this test is performed after stopping the traffic only to see the entries are gone). But, this can not be reproed all the time, in QA testbed we see more often with traffic.

Attached the syncd and swss logs. I see that swss is sending FLUSH event to syncd but syncd didn’t call the SAI. Can you please check and let’s know why is syncd silently ignoring the FDB flush request?

The last message that I see in syncd is:
Apr 9 18:18:16.951002 switch120 NOTICE swss#orchagent: :- meta_sai_on_fdb_flush_event_consolidated: processing consolidated fdb flush event of type:

syslog.log
sairedis-rec_fdbclear.log
saidump_forfdb.log

SAI_FDB_ENTRY_TYPE_DYNAMIC

Version: Sonic master branch last commit on Mar 26th with Hash: 9af7d21e2e911e8b0334bd621623c563affff9de

root@switch120:/var/log# fdbclear
FDB entries are cleared.
root@switch120:/var/log# fdbshow
No. Vlan MacAddress Port Type


1    1500  AA:00:00:00:00:04  Ethernet76  Dynamic
2    1500  AA:00:00:00:00:0F  Ethernet76  Dynamic
3    1500  AA:00:00:00:00:0D  Ethernet76  Dynamic
4    1500  AA:00:00:00:00:10  Ethernet76  Dynamic
5    1500  AA:00:00:00:00:0E  Ethernet76  Dynamic
6    1500  AA:00:00:00:00:11  Ethernet76  Dynamic
7    1500  AA:00:00:00:00:08  Ethernet76  Dynamic
8    1500  AA:00:00:00:00:13  Ethernet76  Dynamic
9    1500  AA:00:00:00:00:05  Ethernet76  Dynamic

10 1500 AA:00:00:00:00:12 Ethernet76 Dynamic
11 1500 AA:00:00:00:00:0A Ethernet76 Dynamic
12 1500 AA:00:00:00:00:14 Ethernet76 Dynamic
13 1500 AA:00:00:00:00:0C Ethernet76 Dynamic
14 1500 AA:00:00:00:00:01 Ethernet76 Dynamic
15 1500 AA:00:00:00:00:03 Ethernet76 Dynamic
16 1500 AA:00:00:00:00:02 Ethernet76 Dynamic
17 1500 AA:00:00:00:00:0B Ethernet76 Dynamic
18 1500 AA:00:00:00:00:06 Ethernet76 Dynamic
19 1500 AA:00:00:00:00:09 Ethernet76 Dynamic
20 1500 AA:00:00:00:00:07 Ethernet76 Dynamic
21 1500 00:FE:C8:09:99:8E Ethernet76 Dynamic
Total number of entries 21

root@switch120:/var/log# redis-cli -n 1 --scan --pattern "*" | grep FDB
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:10","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:0C","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:14","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:12","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"00:FE:C8:09:99:8E","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:01","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:0B","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:08","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:0E","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:0D","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:0F","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:13","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:02","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:07","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:11","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:0A","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:04","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:05","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:09","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"00:00:8B:47:8E:B8","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:06","switch_id":"oid:0x21000000000000"}
ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000492","mac":"AA:00:00:00:00:03","switch_id":"oid:0x21000000000000"}

Abnormal syncd termination

Nov 16 23:49:36.819308 lca1-tx1-asw04 INFO supervisord: syncd terminate called without an active exception#015
Nov 16 23:49:36.825152 lca1-tx1-asw04 NOTICE dsserve: child /usr/bin/syncd exited status: 134
Nov 16 23:49:36.825474 lca1-tx1-asw04 INFO supervisord: syncd [5] child /usr/bin/syncd exited status: 134
Nov 16 23:49:43.781123 lca1-tx1-asw04 INFO supervisord 2017-11-16 23:49:36,825 INFO exited: syncd (exit status 3; not expected)
Nov 16 23:49:43.781123 lca1-tx1-asw04 INFO supervisord 2017-11-16 23:49:39,998 INFO reaped unknown pid 52

POLICER:SAI_POLICER_ATTR_PIR should not be needed for SR_TCM

See below error in policer validation when swssconfig tries to push trap group configurations. To workaround it, I had to add PIR attribute to copp.json. Since the meter type is SAI_POLICER_MODE_SR_TCM, I am not sure why PIR is expected as mandatory. Appreciate if this can be clarified.

Dec 14 20:37:12 switch3 WARNING orchagent: :- processCoppRule: Creating policer for existing Trap group:f000000000003 (name:default).
Dec 14 20:37:12 switch3 ERR orchagent: :- meta_generic_validation_create: POLICER:SAI_POLICER_ATTR_PIR:UINT64 attribute is conditional and is mandatory but not passed in attr list
Dec 14 20:37:12 switch3 ERR orchagent: :- createPolicer: Failed to create policer for existing trap_group_name:f000000000003, name:default, error:-14
Dec 14 20:37:12 switch3 ERR orchagent: :- doTask: Processing copp task item failed, exiting.

replay sairedis record captured in S6000 in S6000 virtual switch failed

I captured a sairedis record file in S6000, fail to reply it in the S6000 virtual switch.

root@2e9b5c2dc2a2:/# ./saiplayer syncd_crash.rec
terminate called after throwing an instance of 'std::runtime_error'
  what():  :- match_list_lengths: get response list count not match recording 0 vs 32 (expected)

syslogs:

Nov 10 23:40:31.699238 2e9b5c2dc2a2 ERR saiplayer: :- match_list_lengths: get response list count not match recording 0 vs 32 (expected)
Nov 10 23:40:31.699288 2e9b5c2dc2a2 NOTICE saiplayer: :- replay: line: 2017-11-10.16:08:01.293189|g|SAI_OBJECT_TYPE_VLAN:oid:0x2600000000002e|SAI_VLAN_ATTR_MEMBER_LIST=32:oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0,oid:0x0
Nov 10 23:40:31.699296 2e9b5c2dc2a2 NOTICE saiplayer: :- replay: resp: 2017-11-10.16:08:01.295668|G|SAI_STATUS_SUCCESS|SAI_VLAN_ATTR_MEMBER_LIST=32:oid:0x27000000000077,oid:0x270000000000a1,oid:0x270000000000cb,oid:0x270000000000f5,oid:0x2700000000011f,oid:0x27000000000149,oid:0x27000000000173,oid:0x2700000000019d,oid:0x270000000001c7,oid:0x270000000001f1,oid:0x2700000000021b,oid:0x27000000000245,oid:0x2700000000026f,oid:0x27000000000299,oid:0x270000000002c3,oid:0x270000000002ed,oid:0x27000000000317,oid:0x27000000000341,oid:0x2700000000036b,oid:0x27000000000395,oid:0x270000000003bf,oid:0x270000000003e9,oid:0x27000000000413,oid:0x2700000000043d,oid:0x27000000000467,oid:0x27000000000491,oid:0x270000000004bb,oid:0x270000000004e5,oid:0x2700000000050f,oid:0x27000000000539,oid:0x27000000000563,oid:0x2700000000058d
Nov 10 23:41:03.688926 2e9b5c2dc2a2 DEBUG saiplayer: :> main: enter

It's not friendly for developer to compile libsairedis twice.

Hi folks,

sonic-sairedis may compile in three ways: syncd / syncd-rpc / syncd-vs.

in debian/rules:

binary: binary-syncd binary-syncd-rpc

binary-syncd:
	$(shell echo > /tmp/syncd-build)
	dh clean  --with autotools-dev
	dh build  -N syncd-rpc -N syncd-rpc-dbg -N syncd-vs -N syncd-vs-dbg --with autotools-dev
	dh binary -N syncd-rpc -N syncd-rpc-dbg -N syncd-vs -N syncd-vs-dbg --with autotools-dev

binary-syncd-rpc: | binary-syncd
	$(shell echo '--enable-rpcserver=yes' > /tmp/syncd-build)
	dh clean  --with autotools-dev
	dh build  -N syncd -N syncd-dbg -N syncd-vs -N syncd-vs-dbg --with autotools-dev
	dh binary -N syncd -N syncd-dbg -N syncd-vs -N syncd-vs-dbg --with autotools-dev

binary-syncd-vs:
	$(shell echo '--with-sai=vs' > /tmp/syncd-build)
	dh clean  --with autotools-dev
	dh build  -N syncd -N syncd-dbg -N syncd-rpc -N syncd-rpc-dbg --with autotools-dev
	dh binary -N syncd -N syncd-dbg -N syncd-rpc -N syncd-rpc-dbg --with autotools-dev

In general, we only need to compile one at a time. But now we have to compile syncd / syncd-rpc every time.
It's really waste of time, especially for developer, who need to revise and debug syncd code.

Why not use configuration ENABLE_SYNCD_RPC here to distinguish which target to use?

Regards,
Jerome

vs error at the startup time

Dec 19 02:13:53.296659 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 63
Dec 19 02:13:53.552463 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 67
Dec 19 02:13:54.064588 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 61
Dec 19 02:13:54.576561 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 51
Dec 19 02:13:54.576630 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 65
Dec 19 02:13:54.832563 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 69
Dec 19 02:13:55.088500 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 59
Dec 19 02:13:55.600660 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 55
Dec 19 02:13:56.113016 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 53
Dec 19 02:13:56.368590 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 49
Dec 19 02:13:56.368636 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 57
Dec 19 02:13:56.368710 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 75
Dec 19 02:13:56.624558 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 79
Dec 19 02:13:56.624768 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 71
Dec 19 02:13:57.136521 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 105
Dec 19 02:13:57.136628 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 73
Dec 19 02:13:57.392596 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 103
Dec 19 02:13:57.648536 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 85
Dec 19 02:13:57.648631 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 81
Dec 19 02:13:57.904603 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 83
Dec 19 02:13:57.904654 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 77
Dec 19 02:13:58.160618 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 101
Dec 19 02:13:58.416550 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 87
Dec 19 02:13:58.416590 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 109
Dec 19 02:13:58.672597 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 95
Dec 19 02:13:58.928572 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 93
Dec 19 02:13:59.184476 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 91
Dec 19 02:13:59.184501 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 107
Dec 19 02:13:59.440678 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 99
Dec 19 02:13:59.696506 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 97
Dec 19 02:13:59.952584 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 111
Dec 19 02:13:59.952609 bfa8f5cc60f2 ERR syncd: :- veth2tap_fun: failed to write to tap device 89

Support for these value types in meta_validation

Hi Team,

As we talked in CSP, the following types are not yet supported in meta_validation, pls add it.

  1. SAI_ATTR_VALUE_TYPE_SEGMENT_LIST
  2. SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST
  3. SAI_ATTR_VALUE_TYPE_TLV_LIST
  4. SAI_ATTR_VALUE_TYPE_MAP_LIST

Thanks.

FDB meta reference validation error, orchagent crash

meta_fdb_event_snoop_oid() is adding reference for FDB entries with objects bvid and SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID. https://github.com/Azure/sonic-sairedis/pull/420/files

While before "status = sai_bridge_api->remove_bridge_port(port.m_bridge_port_id);"
https://github.com/Azure/sonic-swss/blob/master/orchagent/portsorch.cpp#L2609
no guarantee that all fdb entries have been flushed. meta data validation will fail and cause orchagent to crash.

Wrong WARNING in meta_sai_on_fdb_event_single

When I removing FDB object which I created manually (not ASIC created it) I receive:
meta_sai_on_fdb_event_single: object key fdb:mac:02:09:87:65:43:21;vlan:2 don't exist but received AGED/FLUSHED event

ASIC_STATE:SAI_OBJECT_TYPE_PORT has NULL:NULL field/value

127.0.0.1:6379[1]> hgetall ASIC_STATE:SAI_OBJECT_TYPE_PORT:oid:0x100000000001a
 1) "NULL"
 2) "NULL"
 3) "SAI_PORT_ATTR_FDB_LEARNING"
 4) "SAI_PORT_FDB_LEARNING_MODE_HW"
 5) "SAI_PORT_ATTR_ADMIN_STATE"
 6) "true"
 7) "SAI_PORT_ATTR_QOS_DSCP_TO_TC_MAP"
 8) "oid:0x130000000005e5"
 9) "SAI_PORT_ATTR_QOS_TC_TO_QUEUE_MAP"
10) "oid:0x130000000005eb"
11) "SAI_PORT_ATTR_QOS_TC_TO_PRIORITY_GROUP_MAP"
12) "oid:0x130000000005ea"
13) "SAI_PORT_ATTR_QOS_PFC_PRIORITY_TO_QUEUE_MAP"
14) "oid:0x130000000005e6"
15) "SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL"
16) "24"

Support query APIs in SAI Player

SAI Player should be able to play back query APIs that have been added like sai_query_attribute_enum_values_capability and sai_object_type_get_availability.

Errors while installing sonic-sairedis

When I try to install the 'libsairedis, syncd' packages using 'sudo apt-get install libsairedis syncd', I get the following error :

Reading package lists... Done
Building dependency tree...
Reading state information... Done
E: Unable to locate package libsairedis
E: Unable to locate package syncd

Actually this has been the case for other related packages too like libswsscommon libswsscommon-dev
sairedis0

When I try to install using git, I get the following error while running the 'make && sudo make install' command :

root@sonic-Standard-PC-i440FX-PIIX-1996:/sonic-sairedis# make && sudo make install
make all-recursive
make[1]: Entering directory '/sonic-sairedis'
Making all in meta
make[2]: Entering directory '/sonic-sairedis/meta'
Makefile:609: ../SAI/meta/.deps/libsaimeta_la-saimetadata.Plo: No such file or directory
Makefile:610: ../SAI/meta/.deps/libsaimeta_la-saimetadatautils.Plo: No such file or directory
Makefile:611: ../SAI/meta/.deps/libsaimeta_la-saiserialize.Plo: No such file or directory
make[2]: *** No rule to make target '../SAI/meta/.deps/libsaimeta_la-saiserialize.Plo'. Stop.
make[2]: Leaving directory '/sonic-sairedis/meta'
Makefile:404: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/sonic-sairedis'
Makefile:336: recipe for target 'all' failed
make: *** [all] Error 2

sairedis

How to fix this error?

Regards,
Vinay

[BRCM SAI] Why set log level of version-information entry as "ERR" in syncd log?

On AS7816-64X which uses Broadcom ASIC, there is a log entry shown below in syncd log which contains version information.

Nov 4 03:01:47.652728 as7816-64x ERR syncd#syncd: sai_api_initialize:112 BRCM SAI ver: [3.5.2.3], OCP SAI ver: [1.4], SDK ver: [6.5.14]

It seems that log entry is not an error actually.

Why is the log level for that entry being set as "ERR"? Why not set it as "NOTICE" or any lower log level?

SYSLOG FDB error message on system boot

We are doing Ansible tests but the loganalyzer found following errors in syslog:
Nov 4 00:22:56.219916 as7726-32x WARNING syncd#syncd: :- check_fdb_event_notification_data: RID 0x1003a00000000 on SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID is not present on local ASIC DB
Nov 4 00:22:56.220206 as7726-32x ERR syncd#syncd: :- process_on_fdb_event: FDB notification was not sent since it contain invalid OIDs, bug?

After doing some investigation, it is triggered by the default VLAN 1 CPU MAC:

admin@sonic~$ bcmcmd "l2 show"
l2 show
mac=cc37abe0b8ac vlan=1 GPORT=0x0 modid=0 port=0cpu0 Static CPU

We have tried to create bridge port for CPU port but problem still exist, because the FDB event comes earlier before we create bridge port.

Does anyone have idea about how to fix this issue?

syncd crashed due to db memory limit?

I think the cause is that orchagent generates too route churns in the ecmp converges period which as database to reach the limit.

We need to solve two issues:

  1. raise database limit
  2. decrease the route churns in orchagent to reduce number of routes in the ecmp convergence time.
Apr 22 10:31:02 str-msn2700-05 INFO database.sh[1124]: 1:M 22 Apr 10:31:02.156 # Client id=14 addr=/var/run/redis/redis.
sock:0 fd=10 name= age=101 idle=85 flags=U db=0 sub=0 psub=1 multi=-1 qbuf=0 qbuf-free=0 obl=16327 oll=1536 omem=2870096
0 events=rw cmd=psubscribe scheduled to be closed ASAP for overcoming of output buffer limits.
127.0.0.1:6379[1]> KEYS ASIC_STATE_*
1) "ASIC_STATE_VALUE_QUEUE"
2) "ASIC_STATE_OP_QUEUE"
3) "ASIC_STATE_KEY_QUEUE"
127.0.0.1:6379[1]> LLEN "ASIC_STATE_VALUE_QUEUE"
(integer) 195587
127.0.0.1:6379[1]> LLEN "ASIC_STATE_OP_QUEUE"
(integer) 195587
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/syncd -p /tmp/sai.profile'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f7aa06ab067 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007f7aa06ab067 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007f7aa06ac448 in __GI_abort () at abort.c:89
#2  0x00007f7aa0f98b3d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007f7aa0f96bb6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007f7aa0f96c01 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007f7aa0f96e19 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007f7aa1ac90d7 in swss::RedisSelect::readMe() () from /usr/lib/x86_64-linux-gnu/libswsscommon.so.0
#7  0x00007f7aa1ac5327 in swss::Select::select(swss::Selectable**, int*, unsigned int) ()
   from /usr/lib/x86_64-linux-gnu/libswsscommon.so.0
#8  0x0000000000407abf in ?? ()
#9  0x00007f7aa0697b45 in __libc_start_main (main=0x407370, argc=3, argv=0x7fff39375ba8, init=<optimized out>, 
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff39375b98) at libc-start.c:287
#10 0x0000000000408d7d in ?? ()

Warm-reboot: SET request on ACL Entry with wrong ACL Counter ID

After Warm-reboot, I see a SET request on the ACL Entry with the SAI_ACL_ENTRY_ATTR_ACTION_COUNTER attribute.
However, the corresponding ACL counter RID being passed in this request from syncd is incorrect.

This ACL counter RID received in the request is random. This counter RID belongs to another ACL Entry.
I have not observed “new” RIDs. I have only seen a counter rid that is linked to another entry.

I had tested another case where I configured only 1 ACL Entry. In this case, warm-reboot was proceeding without any issue most of the time.
But, since we also have a default ACL entry (Drop all) created in this scenario, we receive its Counter RID sometimes and crash.

Warm reboot: view comparison for ACL table group

For tracking purpose.

Current view comparison logic for ACL table group doesn't handle the cases that multiple ACL table group exists and the bind type is Vlan or router interface, also egress binding cases are not covered either.

As discussed in #358

vlan tag is not proprogated from peer link to host interface.

root@5ce48f3510b0:/# tcpdump -evni Ethernet68
tcpdump: listening on Ethernet68, link-type EN10MB (Ethernet), capture size 262144 bytes
03:03:22.011854 02:7c:5e:b5:87:82 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 8.8.8.1 tell 8.8.8.6, length 28
03:03:23.030518 02:7c:5e:b5:87:82 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 8.8.8.1 tell 8.8.8.6, length 28
^C
11 packets captured
11 packets received by filter
0 packets dropped by kernel
root@5ce48f3510b0:/# tcpdump -evni eth19
tcpdump: listening on eth19, link-type EN10MB (Ethernet), capture size 262144 bytes
03:03:36.342362 02:7c:5e:b5:87:82 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 46: vlan 8, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 8.8.8.1 tell 8.8.8.6, length 28
03:03:37.366378 02:7c:5e:b5:87:82 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 46: vlan 8, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 8.8.8.1 tell 8.8.8.6, length 28

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.