Commit Graph

5503 Commits

Author SHA1 Message Date
kellyyeh
14aca812e6
Fix dhcpmon bugs (#9008)
* Exclude incrementing on aggregate device if packet received on mgmt interface

* Fix DHCPv6 header offset calculation
2021-10-19 16:15:21 -07:00
ohu1
459d3d1f55
SONiC QoS MAPs and PORT_QOS_MAP Yang (#7375)
Why I did it
Created SONiC Yang model for the following QOS MAPs and PORT QOS MAP:
DSCP_TO_TC_MAP
DOT1P_TO_TC_MAP
TC_TO_QUEUE_MAP
TC_TO_PRIORITY_GROUP_MAP
MAP_PFC_PRIORITY_TO_QUEUE
PORT_QOS_MAP

How I did it
Defined Yang models for QOS MAPs based on Guideline doc:
https://github.com/Azure/SONiC/blob/master/doc/mgmt/SONiC_YANG_Model_Guidelines.md
and
https://github.com/Azure/sonic-utilities/blob/master/doc/Command-Reference.md

How to verify it
sonic_yang_models package build
The infra code was modified to handle the nested list definition in YANG and translate it to a flat list in DB.
2021-10-19 12:50:07 -07:00
Guohan Lu
e6733e96fe [build]: update sonic-slave-bullseye for armhf and arm64
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-10-19 12:18:16 +00:00
shlomibitton
546340bf7b
[dhcp_relay] Fix import for dhcp_counters on clear_dhcp6relay_counter.py (#8991)
#### Why I did it

**Import issue will cause:**
root@sonic:/# sudo sonic-clear arp
failed to import plugin clear.plugins.dhcprelay: No module named 'show_dhcp_relay'

#### How I did it

Fix the import.

#### How to verify it

run sudo sonic-clear arp
2021-10-19 03:10:36 -07:00
Saikrishna Arcot
6432b508d9
redis-dump-load: Pin the redis package to use 3.5.3 (#9001)
Redis 4.0.0b1 has been uploaded to pip as a prerelease version. This
version drops support for Python 2 and only supports Python 3. Because
setup.py is being run, it will use the latest version of a package and
not the latest stable version (which is still 3.5.3).

Therefore, pin the redis package to version 3.5.3, so that it will work
for both Python 2 and 3.

#### How to verify it

Make sure that redis-dump-load for Python 2 builds today.
2021-10-18 20:57:26 -07:00
abdosi
3bb248bd67
[chassis-packet] minigraph parsing and BGP template changes (#8966)
1. Changes for Generation LC-Graph for packet-based chassis.
2. Added Support Ipv6 Peering on Loopback4096 for voq also
3. Updated asic topology yml files to be offset of slot
4. Made slot_num to take string slot<number> instead of number
5. Consolidated template_dpg_voq_asic.j2 into dpg_asic.j2
6. Remove Loopback4096 from asic topology and parse as dut invertory for
   multi-asic
7. Updated topo_facts parsing for asic topology_
8. Internal BGP Session rename from <VoqChassisInternal> to <ChassisInternal> and take switch_type as value.
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
2021-10-18 18:44:24 -07:00
thomas.cappleman@metaswitch.com
c971fa7ff9
[swss, swss-common, sairedis] submodule update (#8996)
Sonic-swss-common:

[schema.h] Add trap flow counter support (#534) (Azure/sonic-swss-common@31f4253)
[schema] Add CBF table names (#525) (Azure/sonic-swss-common@b15e08d)

Sonic-sairedis:

[cbf] Add Class Based Forwarding support (#909) Azure/sonic-sairedis@ecb95a8
[azp] Enable pretty code coverage results xml (#946) Azure/sonic-sairedis@1148d16
[gearbox] startup gbsyncd in sync mode in vSonic (#939) Azure/sonic-sairedis@e59a085
[unittest] Add more Meta tests (#948) Azure/sonic-sairedis@812f7a5
[syncd] Fix SwitchNotifications to be const reference (#945) Azure/sonic-sairedis@5863ed3
[syncd] Refactor syncd request shutdown command line parser (#944) Azure/sonic-sairedis@d598dea
[unittest] Update meta tests (#943) Azure/sonic-sairedis@26b2237
[ci]: Support code diff coverage (#934) Azure/sonic-sairedis@e545b17
Sonic sairedis changes for SAI SRV6 and SAI refpoint update to v1.9.0 (#937) Azure/sonic-sairedis@921cf0b
[sairedis] Fail get/clear api on objects created in init view mode (#930) Azure/sonic-sairedis@362b34e
[vslib]: Remove invalid lane when create ports (#938) Azure/sonic-sairedis@db403f4
[Barefoot] enable bulk api`s in SAI (#927) Azure/sonic-sairedis@6df04d8
[unittest] Add NotificationBfdSessionStateChange tests (#940) Azure/sonic-sairedis@89d639b
[azp] Skip auto generated saimetadata lib code coverage (#935) Azure/sonic-sairedis@40e9c74
Remove tail white spaces Azure/sonic-sairedis@dabd1a7
Bring back pyext in Makefile.am Azure/sonic-sairedis@94d5545
Add RedisChannel tests Azure/sonic-sairedis@e16606a
Add RedisVidIndexGenerator tests Azure/sonic-sairedis@62b8fdd
Add ServerConfig tests Azure/sonic-sairedis@58725df
Add SkipRecordAttrContainer tests Azure/sonic-sairedis@6842d92
Update Switch tests Azure/sonic-sairedis@cd13f49
Add SwitchConfigContainer tests Azure/sonic-sairedis@6fc213d
Add SwitchConfigContainer tests Azure/sonic-sairedis@ee24c0e
Add SwitchContainer tests Azure/sonic-sairedis@e33c6e9
Add ZeroMQChannel tests Azure/sonic-sairedis@bcd1648
Add VirtualObjectIdManager tests Azure/sonic-sairedis@0a2cb2c
[sairedis] Remove legacy allocateSwitchIndex api Azure/sonic-sairedis@16fff7f

Sonic-swss:

[orchagent] Add separate next hop table and orch (#1702) Azure/sonic-swss@f248e26
[portorch]: Skip to create port if the lane set isn't available in ASIC (#1923) Azure/sonic-swss@fd0cafe
fix the type for SAI_BUFFER_PROFILE_ATTR_BUFFER_SIZE (#1942) Azure/sonic-swss@ef6b5d4
[cfgmgr] Fix for STATE_DB Port check (#1936) Azure/sonic-swss@b592ad7
2021-10-18 11:46:58 -07:00
Ashok Daparthi-Dell
a99d78dedb
[Yang model] SONiC QOS Scheduler, WRED, Queue Yangs (#7281) 2021-10-18 10:01:08 -07:00
Dror Prital
5356244e53
[Mellanox] Add NVIDIA Copyright header to "mellanox" files (#8799)
- Why I did it
Add NVIDIA Copyright header to "mellanox" files

- How I did it
Add NVIDIA Copyright header as a comment for Mellanox files

- How to verify it
Sanity tests and PR checkers.
2021-10-17 19:03:02 +03:00
Alexander Allen
e6e6f414cd
[mellanox] Remove validation for fw filenames with no extension (#8956)
Why I did it
Currently the mellanox platform API is validating the file extensions of firmware packages to be installed for basic sanity checking. However, ONIE packages do not have an extension and as such if there is a "." in the name it is taken to be an extension and then fails the sanity check.

How I did it
I removed the check which ensures that ONIE images don't have a file extension.

How to verify it
Name the ONIE updater file 2021.onie and attempt to install it via fwutil install fw 2021.onie --yes
2021-10-15 13:29:24 -07:00
Alexander Allen
cefb9c1946
[platform] [mellanox] Use correct API call to update firmware in auto_update_firmware (#8961)
Why I did it
The fwutil update all utility expects the auto_update_firmware method in the Platform API to execute the update_firmware() call and not the install_firmware() call.

How I did it
Changed the method in the mellanox platform API component implementation.

How to verify it
Run fwutil update all with a CPLD update on a Mellanox platform and verify that it properly updates the firmware using the MPFA file.
2021-10-15 13:28:52 -07:00
Lawrence Lee
d5834fcb1b Merged PR 4679112: [write_standby]: Ignore non-auto interfaces
[write_standby]: Ignore non-auto interfaces

* In the event that `write_standby.py` is used to automatically switchover interfaces when linkmgrd or bgp crashes, ignore any interfaces that are not configured to auto-switch

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
2021-10-15 09:59:59 -07:00
Lawrence Lee
17cbfc44e6 Merged PR 4559560: [bgp]: Switch to standby if BGP container exits
[bgp]: Switch mux to standby if BGP container exits

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
2021-10-15 09:59:59 -07:00
Lawrence Lee
69bae5b27a [write_standby]: Improve logging
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
2021-10-15 09:59:59 -07:00
Lawrence Lee
fad5ec47b4 [mux]: Call write_standby from host only
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
2021-10-15 09:59:59 -07:00
Lawrence Lee
5232647b33 [mux]: Make write_standby available on host
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>

[write_standby]: Cleanup and fix build

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
2021-10-15 09:59:59 -07:00
Lawrence Lee
14403c61d2 [mux]: Initialize all mux ports as standby
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
2021-10-15 09:59:59 -07:00
Tamer Ahmed
b880f9d973 Merged PR 4813977: [mux] Update Service Install With SONiC Target
[mux] Update Service Install With SONiC Target

Recent PR grouped all SONiC service into sonic.taget. The install section
of mux.service was not update and this causes delays when using config
reload as the service failed state is not being reset.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2021-10-15 09:59:59 -07:00
Lawrence Lee
0295c832c2 Merged PR 4366316: [mux.service]: Bind to sonic.target
[mux.service]: Bind to sonic.target

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
2021-10-15 09:59:59 -07:00
Tamer Ahmed
bff785ec49 Merged PR 4234524: [mux] Start Mux on Only Dual-ToR Platform
[mux] Start Mux on Only Dual-ToR Platform

mux docker depends on the presence of mux cable hardware and is
supposed to run only Gemini ToRs. This PR change the mux feature
config in order to enable mux docker based on device configuration.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2021-10-15 09:59:59 -07:00
Tamer Ahmed
56d4c34be7 [linkmgrd] Relocate Linkmgrd to Github
This PR deletes local-to-buildimage linkmgrd and creates new submodule
pointing to github repo of sonic-linkmgrd.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2021-10-15 09:59:59 -07:00
Tamer Ahmed
29e9b775c1 [mux] Add New Package Vars
Ading new packaging variable to mux docker

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2021-10-15 09:59:59 -07:00
Tamer Ahmed
f0711494f3 [linkmgrd] Enhance Init And Switch State When Config Is Active
During warm reboot, linkmgrd would go away and so heartbeats will
be lost. This would result in standby link son peer ToR to pull the
link active. This is undesirable since we would not create tunnel
from the ToR that is being rebooted to the peer ToR. This PR
implicitly lock the state of the mux if config is not set to auto.

Also, orchagent does not initialize MUX to it hardware state, rather
it initilizes MUX to Unknown state. linkmgrd will detect this situation
and probe MUX state to correct orchagent state.

There a fix for the case when state os switched MUX is delayed. The
PR will poll the MUX for the new state. This is required to update
the state ds and hence create/tear tunnel.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2021-10-15 09:59:59 -07:00
Tamer Ahmed
c9c2826520 Merged PR 3845699: [linkmgrd]: Introduce MUX cable linkmgrd
Linkmgrd monitors link status, mux status, and link state. Has
the link becomes unhealthy, linkmgrd will trigger mux switchover
on a standby ToR ensuring uninterrupted service to servers/blades.
This PR is initial implementation of linkmgrd.

Also, docker-mux container hold packages related to maintaining and managing
mux cable. It currently runs linkmgrd binary that monitor and switches
the mux if needed.
This PR also introduces mux-container and starts linkmgrd as startup when
build is configured with INCLUDE_MUX=y

Edit: linkmgrd PR will follow.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>

Related work items: #2315, #3146150
2021-10-15 09:59:59 -07:00
Marty Y. Lok
c37470544a
[Nokia][port]Modify the Nokia-IXR7250E-36x400G device data (#8875)
-- Based on the new BCM configuration, Modify the portcoreid for the front panel port in the port_config.ini for line card Nokia-IXR7250e-36x400G
 -- Correct the pcie.pmal file
 -- Update the platform_ndk.json with new field "update-asic-pvt"
 -- Add chassis-internal-intf to chassisdb.conf
 -- update platform_reboot

Signed-off-by: mlok <marty.lok@nokia.com>
2021-10-14 13:47:12 -07:00
Rajkumar-Marvell
669dfaa207
[Marvell] Update amd64 SAI version (#8868)
Move Marvell SAI deb version to 1.8.1-1 for amd64 platform

Signed-off-by: Rajkumar Pennadam Ramamoorthy <rpennadamram@marvell.com>
2021-10-14 11:55:59 -07:00
Ze Gan
f4f6955e43
[devices]: Add new SKU for SONiC VM (#8971)
The default ethernet port naming style is Ethernet0, Ethernet4...Ethernet(i*4) which isn't compatible with EOS's style Ethernet1,Ethernet2...Etherent(i+1)
SONiC-mgmt usually use EOS as neighbor devices. To relieve the compatible issue on SONiC as neighbor devices, This PR introduces a new SKU SONiC VM.

Signed-off-by: Ze Gan <ganze718@gmail.com>
2021-10-14 10:47:40 -07:00
xumia
b9366f3f8e
Fix failed to download cisco artifacts issue (#8942)
Why I did it
Fix the failure to download cisco artifacts issue
2021-10-14 14:14:27 +08:00
Ying Xie
638c287837
[copp] bind copp-config.service to sonic.target (#8969)
copp-config service needs to be started after sonic.target so that it could
render the copp-config with the latest information.

It also needs to be restarted when config reload or load_minigraph is invoked.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2021-10-13 21:07:44 -07:00
liuh-80
a4ac69e4f0
[TACACS+]: Extract tacacs support functions into library and fix memory leak issue. (#8659)
This pull request extract tacacs support functions into library to share TACACS config file parse code with other project. Also fix memory leak issue in parse config code.

Why I did it
    To support TACACS per command authorization, we need reuse the TACACS config file parse code in bash plugin project.

How I did it
    Add libtacsupport.pc.in to extract tacacs support functions into library.
    Fix memory leak issue in TACACS config parse code by convert the dynamic memory allocation memory to static memory allocation.

How to verify it
    Pass all current UT.
    Check shared library generated manually.

Which release branch to backport (provide reason below if selected)
    N/A

Description for the changelog
    Extract tacacs support functions into library, this will share TACACS config file parse code with other project.
    Also fix memory leak issue in parse config code.
2021-10-14 10:04:58 +08:00
Xichen96
4654f72f1c
[determine-reboot-cause] delay execution (#8935)
Since database.service has been moved to execute after rc-local.service,
and determine-reboot-cause.service rely on database.service, we have to
specify that in "After=".

Signed-off-by: Xichen Lin <xichenlin@microsoft.com>

Co-authored-by: Xichen Lin <xichenlin@microsoft.com>
2021-10-14 08:33:19 +08:00
Dmytro
e8adee2c83
[frrcfgd][bgpcfgd] Add portchannel support (#8911)
* To add portchannel support in frrcfgd and bgpcfgd
* Update is_zero_ip() to handle portchannel name
Signed-off-by: d-dashkov <Dmytro_Dashkov@Jabil.com>
2021-10-12 18:54:37 -07:00
Sudharsan Dhamal Gopalarathnam
434a641026
[DPB][Mellanox]Fixing DPB modes in Mellanox-SN2700-D40C8S8 (#8953)
#### Why I did it
Fixing https://github.com/Azure/sonic-buildimage/issues/8938
Fixing 1x10G DPB mode in Mellanox-SN2700-D40C8S8 SKU as it was causing sonic-cfggen to fail.


#### How I did it
Added correct mode format in hwksu.json in Mellanox-SN2700-D40C8S8  and updated platform.json for the new mode.


#### How to verify it
Using sonic-cfggen verify it works fine
2021-10-12 18:16:13 -07:00
Volodymyr Samotiy
ce7abad3ba
[Mellanox] Update SAI to v1.19.4 (#8929)
- Why I did it
Advance to new Nvidia SAI release with the following changes:
New features:
- Align with new SDK/FW version 4.5.1006 and above and in parallel to existing used SDK/FW bundle
- Implement timestamp and egress_queue_index hostif packet attributes.

Bugs fixes:
- Fix compilation issues with gcc10
- Fix return code for buffer overflow for query enum values and query statistics capabilities
- Reduce verbosity of print in case packet ingress on invalid port
- Fix mirror Qos settings

- How I did it
Updated SAI version and submodule pointer

- How to verify it
Run regression tests from sonic-mgmt

Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
2021-10-12 10:33:35 +03:00
gechiang
f52f97cfa5
[sonic-utilities] Update sonic-utilities submodule to pick set of new fixes (#8947) 2021-10-11 23:07:27 -07:00
liuh-80
7d40384c58
[TACACS+] Add plugin support to bash. (#8660)
This pull request add plugin support library to bash.
    And we will create a TACACS+ plugin for bash in an other PR, which will bring per command authorization feature to bash.

Why I did it
    To support TACACS per command authorization, we check user command before execute it.

How I did it
    Add plugin support to bash.

How to verify it
    UT with CUnit under bash project cover all new code in plugin.c.
    Also pass all current UT.

Which release branch to backport (provide reason below if selected)
    N/A

Description for the changelog
    Add plugin support to bash.
2021-10-11 15:20:51 +08:00
Sumukha Tumkur Vani
32e73b0872
[RESTAPI] Update Submodule (#8931)
Include the following commits:

f9bbed3cb86a3bab9a07745096835dbdbe5a4db6
Convert Unit Tests from unittest framework to pytest framework

e842c5ff317c67919dcbcab3358143cb9a16c9dd
Generate code coverage for Unit Tests
2021-10-09 15:41:22 -07:00
Qi Luo
add9b651b6
Add platform_asic file to each platform folder in sonic-device-data based package (#8542)
#### Why I did it
Add platform_asic file to each platform folder in sonic-device-data package. The file content will be used as the ground truth of mapping from PLATFORM_STRING to switch ASIC family.

One use case of the mapping is to prevent installing a wrong image, which targets for other ASIC platforms. For example, currently we have several ONIE images naming as sonic-*.bin, it's easy to mistakenly install the wrong image. With this mapping built into image, we could fetch the ONIE platform string, and figure out which ASIC it is using, and check we are installing the correct image.

After this PR merged, each platform vendor has to add one mandatory text file  `device/PLATFORM_VENDOR/PLATFORM_STRING/platform_asic`, with the content of the platform's switch ASIC family.

I will update https://github.com/Azure/SONiC/wiki/Porting-Guide after this PR is merged.

You can get a list of the ASIC platforms by `ls -b platform | cat`. Currently the options are
```
barefoot
broadcom
cavium
centec
centec-arm64
generic
innovium
marvell
marvell-arm64
marvell-armhf
mellanox
nephos
p4
vs
```

Also support
```
broadcom-dnx
```

#### How I did it

#### How to verify it
Test one image on DUT. And check the folders under `/usr/share/sonic/device`
2021-10-08 19:27:48 -07:00
Vaibhav Hemant Dixit
0780aea966
[master] Submodule advance sonic-swss (#8915)
[Submodule advance sonic-swss]
Include below commits to master image:

Cache routes for single nexthop for faster retrieval Azure/sonic-swss#1922
Reduce route count for route perf test (Azure/sonic-swss#1928)
[pytest]: Re-use DVS container when possible (Azure/sonic-swss#1816)
[PORTSYNCD] when no ports on config db on init, continue and set Port… (Azure/sonic-swss#1861)
[gearbox] Add gearbox unit test (Azure/sonic-swss#1920)
Reverted skipped test_buffer_dynamic test cases (Azure/sonic-swss#1937)
Revert "[buffer orch] Bugfix: Don't query counter SAI_BUFFER_POOL_STA… (Azure/sonic-swss#1945)
2021-10-08 17:29:23 -07:00
xumia
3855ce2849
[ci]: Support azp for cisco 8000 (#8654)
Why I did it
Setup Azure pipeline for cisco 8000.
2021-10-08 15:31:49 +08:00
Aravind Mani
77b6bc39be
DellEMC: Fix z9332f low power mode issue (#8693) 2021-10-08 11:17:36 +05:30
Wirut Getbamrung
800de696db
[Celestica/sonic_platform]: Fixed failed test cases in Haliburton platform testing (#8815)
* [device/celestica-e1031]: fix apis follow lastest spec
* [device/celestica-e1031]: fix lgtm (#261)
2021-10-08 11:10:05 +08:00
arlakshm
34267393b3
[yang] Feature yang changes (#7955)
Why I did it
Add yang model for Feature configuration

How I did it
Add feature.yang and unit tests

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
2021-10-05 15:44:24 -07:00
Aravind Mani
b7d49b0a0c
Dell S6000: PCIe Gen1 settings (#8663)
Why I did it
PCIe Gen1 settings was needed for Dell S6000 device.

How I did it
Modified from Gen2 to Gen 1 speed for Dell S6000 PCIe devices

How to verify it
Check lspci output, verify the syslogs
2021-10-05 10:17:26 -07:00
byu343
677f31dac3
[arista] Add asic and phy configs for clearwater2ms (#8174)
* Add ASIC configs for clearwater2ms
* Add 100G gearbox configs for clearwater2ms
2021-10-04 19:11:57 -07:00
Junchao-Mellanox
552963ab0e
[Mellanox] Change thermal recover threshold from temp_trip_norm to temp_trip_high (#8792)
- Why I did it
Change thermal recover threshold from temp_trip_norm to temp_trip_high, so that thermal algorithm would set fan speed to minimum allowed earlier and save power.

- How I did it
Change thermal recover threshold from temp_trip_norm to temp_trip_high

- How to verify it
Manual test
2021-10-04 20:20:33 +03:00
kellyyeh
df6361f50c
Change radv interval to 3min (#8882) 2021-10-01 15:00:16 -07:00
Ying Xie
3e397ce8b2
[Nokia 7215] Rename alias column with etpN normination (#8879)
also add hwsku alias Nokia-M0-7215

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2021-09-30 15:27:54 -07:00
Praveen Chaudhary
83108d9c9a
[YANG MGMT]: Support Grouping translation in YANG Models. (#8318)
Changes:
 -- pre Process Grouping section from all yang models, so it can be used
from any yang model.
-- add jsondiff in setup.py, it is useful for test debugging in case of
failures.
-- use 'stypes' instead of head.
-- pass config DB table name in _createLeafDict().
-- added test config for grouping.
-- white spaces changes.

Note: Changes are done in the way that we can add support for other
Generic YANG statement easily for translation.

Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
2021-09-30 12:53:34 -07:00
Sudharsan Dhamal Gopalarathnam
1e35915dcf
Load global config in caclmgrd only in multi asic NPU (#8812)
How I did it
Added if multi npu check before invoking the load global config.

How to verify it
Restart caclmgrd after this change and check if no error log is thrown.
2021-09-30 12:45:51 -07:00