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

merge azure sonic-swss master #2

Merged
merged 71 commits into from
Aug 21, 2018
Merged

Conversation

tylerlinp
Copy link
Owner

What I did

Why I did it

How I verified it

Details if related

sihuihan88 and others added 30 commits April 24, 2018 17:42
Signed-off-by: Sihui Han <sihan@microsoft.com>
* Fix tables handling race condition in buffermgr

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>

* Fixed status lose in loop

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
* [buffermgr]: remove the item from consumer queue if invalid

Signed-off-by: Sihui Han <sihan@microsoft.com>

* change error to task_invalid_entry

Signed-off-by: Sihui Han <sihan@microsoft.com>
* [pfcwd]: enable BIG_RED_SWITCH mode

Signed-off-by: Sihui Han <sihan@microsoft.com>

* update as comments
* Populate existing interface cache, bring down before configDone

* simplify the logic and add logging

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

* add logging for publish event to state db

Signed-off-by: Guohan Lu <gulv@microsoft.com>
Signed-off-by: Sihui Han <sihan@microsoft.com>
Signed-off-by: Nadiya Stetskovych <Nadiya.Stetskovych@cavium.com>
Without the return value check, it is possible that ifname is
empty due to interface not found.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
* [crmorch]: neighbor used counter increased twice
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
…ovided (#509)

* Suppress Cable length error in case buffer config file is not provided

* fix PR feedback
…494)

* enhance acl orch to handle the LAG port not configured case
* rename variable, function; redunce redundant code; fix memory issue
* revise according to comments
* one more blank line
* add new VS test cases for acl on LAG
* update with PR comments fix
* rename getValidPortId and move it to portOrch
* fix indent
* fix test case comments
…494)

* enhance acl orch to handle the LAG port not configured case
* rename variable, function; redunce redundant code; fix memory issue
* revise according to comments
* one more blank line
* add new VS test cases for acl on LAG
* update with PR comments fix
* rename getValidPortId and move it to portOrch
* fix indent
* fix test case comments
…TABLE in orchagent processing (#514)

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
* Add files via upload

* Test case: ACL rule with diff subnet masks

Added a test case with ACL rules with different mask /8 /19 ,etc.  Verified the proper subnet masks were reflected in the ASICDB.

* changing addition of acl rules to a loop to avoid redundancy

* added a helper function to improve code efficiency

* Update test_acl.py
…uration was applied (#515)

* Don't up ports, until buffer configuration is applied

* Set MTU first, then set port state to UP

* Introduce the test

* Use logical operator && for boolean values
…t0 (#522)

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
* Allocate buffer for 256 entries for ACL resource query

* Changed to MACRO
Signed-off-by: Sihui Han <sihan@microsoft.com>
Signed-off-by: Sihui Han <sihan@microsoft.com>
…tialization (#528)

* Pospone QueueMap initialization until activation of counters

* Initialize CounterCheckOrch after we initialized the QueueMaps
* Generate queue maps only for front panel ports
…#530)

* Pospone QueueMap initialization until activation of counters

* Check that port ready list has the information before referencing the information
jipanyang and others added 28 commits July 25, 2018 10:43
)

This also ensures all port setting applied before intf setting.

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
* Port table should be ProducerTable
* Fix vs test
* Fix initializePort: only set down status if attr missing
* Refine logging
add acl table created by dtel to acl default tables
* [aclorch]: only bind to port for ACL_TABLE_PFCWD type

Signed-off-by: Sihui Han <sihan@microsoft.com>

* make the code easier to read

Signed-off-by: Sihui Han <sihan@microsoft.com>
* Simplify PortsOrch::doPortTask
* Revert "Simplify PortsOrch::doPortTask", but keep unit test
* Fix handling m_autoneg, speed, mtu, admin_status, fec_mode before PortConfigDone
* Refine unit test with swsscommon.ProducerStateTable
…#553)

* Add basic schema for warm start schema in configDB and application DB.

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Move warm start table for process stats to state DB

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Add reconciliation timer entry in configDB warm restart table.

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Update warm restart timer schema

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* There might be more than one timer at system level or individual docker

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
* Fix addExistingData consumer converstion
* Add more addExistingData()
* Warm reboot for PortsOrch
* Remove calling doPortConfigDoneTask in ctor
* Remove unused function signature
…rocesses (#547)

* Add common warm start functions to be used by all SWSS processes

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Use updated state schema

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Adapt to the new warm reboot schema

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Use the new Table::getEntry() and Table::setEntry to replace redisClient operations

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* use the new Table:hget() and Table:hset() APIs

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Add illustration about warm start knob usage

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
Signed-off-by: stepanb <stepanb@mellanox.com>
* Warm reboot for BufferOrch
* Add log for warm reboot
* Add bake() interface
* OrchDaemon supports warm start
* swss: flush g_asicState after each event is done
* add flush() after event is handled in case some entries are still in buffer, don't wait
* with the changes in sairedis and swss-common, route performance improved by 200~300 routes/sec
* swss-common: remove unnecessary flush() in timeout case and update comment
* remove unnecessary flush() in timeout case and update comment
Enable configuring IPv4 and IPv6 addresses on regular ports
Add tests to test IPv4 add/remove to regular ports

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
This function allows the propagation of MTU from port MTU to router
interface MTU if the router interface is created based on this port.

Once the port MTU gets changes, the router interface MTU will also
get changed.

Update the VS unit test test_InterfaceChangeMtu case. It will check
the data flow from application database to ASIC database.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
In order to get rid of /etc/network/interfaces file and move
all the configurations to the configuration database, MTU configurations
are required to be put into the database and monitored by a specific
daemon. This daemon portmgrd is to achieve this goal.

Currently, this daemon will only listen to the port MTU configurations
if existed in the database and then call the 'ip link' command to
configure the kernel netdevs.

It will also capture the admin status set in the configuration database
and call the 'ip link' command to configure the kernel netdevs.

The default MTUs, however, are set as the default value in the orchagent
port.h file. The MTU value in the netlink message is anyway ignored.

In the next stage, the change of the MTU will be supported so that the
kernel host interface MTU will be reflected to the SAI port/router
interface MTU.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
With the recent pull requests, if the router interface is created
without specifying the MTU in the configuration database, the
default MTU would be 9100 instead of 1500.

Note:
9100 comes from the orchagent/port.h; 1500 comes from the kernel.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
* Support vlanmgrd process warm restart

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* [VS]: add test case for vlanmgrd warm restart

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Adapt to the new warm reboot schema

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Update warm_restart common functions

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* warm_restart common functions already available, remove them from this PR

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Use fixed CFG_WARM_RESTART_TABLE_NAME and STATE_WARM_RESTART_TABLE_NAME  to avoid jenkins environment error

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Remove hardcoded names for warm restart config table and state table

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
* Add the capability to set wred drop probability of all packet colors
(green, yellow, and red)

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

* Ensure drop probability takes default value 100% if not explicitly
specified in qos.json

Signed-off-by: Wenda <wenni@microsoft.com>
* Orchagent state restore

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Adpat to the new warm reboot schema

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Set Executor name at constructor phase

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Use common Consumer::dumpTuple() for Orch::recordTuple() and Orch::dumpToSyncTasks()

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Change the validation of pending task after restore to NOTICE level for now.

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Remove unused function call, and update comment format

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Move orchagent state restore and sync up out of main select loop.

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Remove the extra round of data draining processing which is not needed.

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Address review comments

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
* Use "[WRED_PROFILE|]" as a CLI signal to unbind wred profile from a queue or
a list of queues; Add the parsing and processing logic in qosorch to
support such an operation

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

* Add print out for debugging purpose

	modified:   orchagent/qosorch.cpp

* Adjust log level

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

* Change to use "[]" as a signal to unbind wred profile from a queue
or a list of queues

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

* Remove logs for debugging

* Adjust code format

* Address comments

Signed-off-by: Wenda <wenni@microsoft.com>
* support to use python docker 3.5.0

start from docker 3.0.0, results from exec_run changed to
dict(outout, code)

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

* limit the scope of exception

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

* modify runcmd output to include exitcode

Signed-off-by: Guohan Lu <gulv@microsoft.com>
- cleanup testbed during init failure
- turn off nic tx offloading
- add runcmd_async
- add copy_file
- enable ipv6

Signed-off-by: Guohan Lu <gulv@microsoft.com>
* Allow decap tunnel configuration without "src_ip"

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>

* Remove overlay loopback interface when removing tunnel

After tunnel removal there was still overlay loopback
interface in ASIC DB.

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>

* Add more test cases to test_tunnel.py

Seperate symmetric and decap tunnel test
Add checks for tunnel removal

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
@tylerlinp tylerlinp merged commit fa95f1e into tylerlinp:master Aug 21, 2018
tylerlinp pushed a commit that referenced this pull request Apr 20, 2020
* Fix the stack-overflow issue in AclOrch::getTableById()

In case the table_id and m_mirrorTableId/m_mirrorTableId are empty
The function would be called recursively without ending.

```
If we have some rule that does not have table defined, it will trigger this issue.

(gdb) bt
#0  0x00007f77ac5af3a9 in swss::Logger::write (this=0x7f77ac801ec0 <swss::Logger::getInstance()::m_logger>, prio=swss::Logger::SWSS_DEBUG, fmt=0x7f77ac5f1690 ":> %s: enter")
    at logger.cpp:209
#1  0x00000000004a5792 in AclOrch::getTableById (this=this@entry=0x1c722a0, table_id="") at aclorch.cpp:2617
#2  0x00000000004a59d1 in AclOrch::getTableById (this=this@entry=0x1c722a0, table_id="") at aclorch.cpp:2634
#3  0x00000000004a59d1 in AclOrch::getTableById (this=this@entry=0x1c722a0, table_id="") at aclorch.cpp:2634
...
#20944 0x00000000004a59d1 in AclOrch::getTableById (this=this@entry=0x1c722a0, table_id="") at aclorch.cpp:2634
#20945 0x00000000004ad3ce in AclOrch::doAclRuleTask (this=this@entry=0x1c722a0, consumer=...) at aclorch.cpp:2437
#20946 0x00000000004b04cd in AclOrch::doTask (this=0x1c722a0, consumer=...) at aclorch.cpp:2141
#20947 0x00000000004231b2 in Orch::doTask (this=0x1c722a0) at orch.cpp:369
#20948 0x000000000041c4e9 in OrchDaemon::start (this=this@entry=0x1c19960) at orchdaemon.cpp:376
#20949 0x0000000000409ffc in main (argc=<optimized out>, argv=0x7ffe2e392d68) at main.cpp:295

(gdb) p table_id
$1 = ""
(gdb) p m_mirrorTableId
$2 = ""
(gdb) p m_mirrorV6TableId
$3 = ""
```

Signed-off-by: Zhenggen Xu <zxu@linkedin.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.