Commit Graph

7462 Commits

Author SHA1 Message Date
Guilt
a73d443c1d
[CI][doc][build] Trim src folder files trailing blanks (#15162)
- Run pre-commit tox profile to trim all trailing blanks
- Use several commits with a per-folder based strategy
  to ease their merge

Issue #15114

Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
2023-05-24 10:01:43 -07:00
Guilt
6745691eb5
[CI][doc][build] Trim script and sonic-slave-* folders files trailing blanks (#15161)
- run pre-commit tox profile to trim all trailing blanks
- use several commits with a per-folder based strategy
  to ease their merge

Issue #15114

Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
2023-05-24 09:25:12 -07:00
Liu Shilong
4467f43449
[ci] Remove debian mirror timestamp from sonic slave base tag (#15189)
showtag target didn't shows the correct target when setting MIRROR_SNAPSHOT options.

Microsoft ADO: 23982694
2023-05-24 09:22:12 -07:00
Junchao-Mellanox
18cf719d6a
[Mellanox] Use sysfs for sfp reset/LPM/presence (#14130)
- Why I did it
The current implementation of SFP reset, LPM, present relies on SDK API. This PR moves the implementation to SDK sysfs. By this PR, it gains following benefit:
1. SDK sysfs provides better performance.
2. Host side and container side share the same code.
3. Code is much cleaner.

- How I did it
Use SDK sysfs to implement SFP reset, LPM, present.

- How to verify it
1. Manual test.
2. Unit test.
2023-05-24 17:24:34 +03:00
Kebo Liu
3e9437b63e
[Mellanox] Update SAI to 2211.24.0.21 and SDK/FW to 4.5.5142/2010_5144 (#15072)
SDK/FW Fixed Issues:
• When a system has more than 256 ACL entries, on rare occasion, removing/adding entries may cause some ACL entries not to work.
• When using mirror session policer on spectrum-2, spectrum-3, the actual CIR was 1.28 times more than the configured CIR value
• After warm boot process, when enabling ECN marking and the port is in split mode, traffic sent to the port under congestion (for example, when connecting two ports with a total speed of 50GbE to a single 25GbE port) is not marked.
• Warm boot might fail if the key value SAI_KEY_ACCUMULATED_FLOW_COUNTER_UNITS_IN_KB is set
• If counters are bound to an next hop group, there is a probability the next API calls that modify the next-hop group members will fail.
• In Spectrum platforms Fastboot mode is not operational for Split port with Force mode in 50G speed
• When fine grain next hop group has a size of 2K or 4K members, and group is removed, FW will remove only (size % 2048) members, resulting in leakage of KVD resources
• When reading some port statistics, or bulk reading some Queue or PG statistics, and in parallel reading or writing other counters, FW may, in rare cases, get stuck
• SN2201 Module 1 is considered to be present/linked while no cable/module is plugged
• On Spectrum-3 when port configure to 400G FW might stuck after running mlxlink while 400G interface connected and swap between upper and lower 4 lanes

SAI New features:
• ACL: Added support for an ACL match on the AETH field (SAI_ACL_TABLE_ATTR_FIELD_AETH_SYNDROME, SAI_ACL_ENTRY_ATTR_FIELD_AETH_SYNDROME) to count RoCE NAK and CNP packets.
• PLL Status: Added a new logging entry that alerts the user upon a PLL lock loss event.
• Dual ToR - Additional MAC Address: Added support for setting a MAC address for the router interface which is not part of the 10 bit MAC address available for RIFs on Spectrum-1, as part of the Dual ToR scenario.
• Dual ToR: DSCP Remapping Added support for tunnel QoS maps as part of the Dual TOR scenario.

SAI Fixed issues:
• When setting a WRED profile attribute for a color that was not enabled during the profile create time, an error would be returned. After the fix, a default profile is create on such scenario and the set attribute is applied on top of it
• When calling the flush FDB by using the SAI_FDB_FLUSH_ATTR_BRIDGE_PORT_ID attribute, the bridge bv_id value was filled on the notification callback where it should have been left empty.

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2023-05-24 17:20:33 +03:00
mssonicbld
a9cd1a655b [submodule] Update submodule sonic-mgmt-common to the latest HEAD automatically 2023-05-24 16:32:41 +08:00
mssonicbld
c69ddd11ed
[submodule] Update submodule sonic-platform-daemons to the latest HEAD automatically (#15196) 2023-05-24 14:09:43 +08:00
Liu Shilong
3b10334e10
[ci] Remove saiserverv2 build in official build. (#15191)
Why I did it
libsaithriftv2 build fails and nobody is maintaining saiserverv2's build.
Remove them from official build.

Work item tracking
Microsoft ADO (number only): 23764652
How I did it
How to verify it
2023-05-23 10:22:31 +00:00
mssonicbld
2d233f5c18 [submodule] Update submodule sonic-gnmi to the latest HEAD automatically 2023-05-23 16:32:46 +08:00
mssonicbld
134f3b9854 [submodule] Update submodule sonic-mgmt-common to the latest HEAD automatically 2023-05-23 16:32:41 +08:00
mssonicbld
3ffd2ac814 [submodule] Update submodule sonic-swss to the latest HEAD automatically 2023-05-23 16:32:37 +08:00
Sachin Holla
ba6aba2b92
[mgmt-framework] Fix rest-server startup script (#14979)
This script was using 'null' as default value for all optional fields
of REST_SERVER table -- due to incorrect use of 'jq -r' command.
Server was not coming up when REST_SERVER entry exists but some fields
were not given (which is a valid configuration).
Fixed the jq query expression to return empty string for non existing
fields.

Signed-off-by: Sachin Holla <sachin.holla@broadcom.com>
2023-05-22 17:42:38 -07:00
mssonicbld
f5d488dd49 [submodule] Update submodule sonic-swss-common to the latest HEAD automatically 2023-05-22 16:33:19 +08:00
Mai Bui
c5f2a0eac3
[sonic-bgpcfgd] replace yaml.load() and exit() (#14989)
#### Why I did it
It is not safe to call yaml.load with any data received from an untrusted source.
sys.exit is better than exit, considered good to use in production code.
Ref:
https://stackoverflow.com/questions/6501121/difference-between-exit-and-sys-exit-in-python
https://stackoverflow.com/questions/19747371/python-exit-commands-why-so-many-and-when-should-each-be-used
##### Work item tracking
- Microsoft ADO **(number only)**: 15022050

#### How I did it
Replace yaml.load() with yaml.safe_load()
Replace exit() by sys.exit()
#### How to verify it
pass UT
test in DUT
2023-05-21 18:23:30 -07:00
mssonicbld
bef9550b1d
[submodule] Update submodule sonic-sairedis to the latest HEAD automatically (#15055) 2023-05-21 16:03:32 +08:00
Yaqiang Zhu
c69d71af1c
[minigraph] Add rack_mgmt_rack parse support in minigraph.py (#15064)
Why I did it
We need to store information of power shelf in config_db for SONiC MX switch. Current minigraph parser cannot parse rack_mgmt_map field.

Work item tracking
Microsoft ADO (number only): 22179645
How I did it
Add support for parsing rack_mgmt_map.
2023-05-20 09:25:21 -07:00
mssonicbld
b7d0f2213f
[submodule] Update submodule sonic-platform-common to the latest HEAD automatically (#15150) 2023-05-20 15:16:51 +08:00
mssonicbld
8ac2696142
[submodule] Update submodule sonic-mgmt-common to the latest HEAD automatically (#15149) 2023-05-20 15:14:05 +08:00
mssonicbld
f74577f606
[submodule] Update submodule sonic-swss to the latest HEAD automatically (#15151) 2023-05-20 15:04:54 +08:00
abdosi
b5b5883c27
[minigraph.py]: Updated Static Route Minigraph Attribute property (#14951)
What I did:
Updated Static Route Attribute in Minigraph. NGS Minigraph has define semantics of static route differently.
See below for differences:-

Microsoft ADO: 17956325

Before

<AssociatedTo>8.0.0.1/32</AssociatedTo>
<Address>192.168.1.2,192.168.2.2</Address>
<AttachTo>PortChannel40,PortChannel50</AttachTo>

Now:

<Address>8.0.0.1</Address>
<AttachTo>PortChannel40,192.168.1.2;PortChannel50,192.168.2.2</AttachTo>

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
2023-05-19 11:49:10 -07:00
vmittal-msft
ecb4db58a9
Update PG headroom settings ports based on port speed/cable length (#14908)
* Update PG headroom settings ports based on port speed/cable length

* Updated XOFF settings to use chip level numbers than core

* Updated PG headroom based on uplink/downlink side

* fix for sonic-config-gen tests

* More fixes for unit test cases

* more test fixes

* Merged multiple functions into one
2023-05-19 08:19:27 -07:00
siqbal1986
c900abbdb0
[Yang model] Add Yang models for VNET table. (#14873)
Created Yang Modle for VNET table.
https://github.com/sonic-net/sonic-buildimage/issues/14534

##### Work item tracking
- Microsoft ADO **(number only)**:
18215579
2023-05-18 14:53:26 -07:00
Pavan-Nokia
c5d0507224
[arm64][Nokia-7215-A1]Add support for Nokia-7215-A1 platform (#13795)
Add new Nokia build target and establish an arm64 build:

    Platform: arm64-nokia_ixs7215_52xb-r0
    HwSKU: Nokia-7215-A1
    ASIC: marvell
    Port Config: 48x1G + 4x10G

How I did it

- Change make files for saiserver and syncd to use Bulleseye kernel
- Change Marvell SAI version to 1.11.0-1
- Add Prestera make files to build kernel, Flattened Device Tree blob and ramdisk for arm64 platforms
- Provide device and platform related files for new platform support (arm64-nokia_ixs7215_52xb-r0).
2023-05-18 14:24:05 -07:00
Samuel Angebault
fa95ebcaae Add optional zram compression for docker_inram
Some devices running SONiC have a small storage device (2G and 4G mainly)
The SONiC image growth over time has made it impossible to install
2 images on a single device.
Some mitigations have been implemented in the past for some devices but
there is a need to do more.

One such mitigation is `docker_inram` which creates a `tmpfs` and
extracts `dockerfs.tar.gz` in it.
This all happens in the SONiC initramfs and by ensuring the installation
process does not extract `dockerfs.tar.gz` on the flash but keep the file as is.

This mitigation does a tradeoff by using more RAM to reduce the disk footprint.
It however creates new issues for devices with 4G of system memory since
the extracted `dockerfs.tar.gz` nears the 1.6G.
Considering debian upgrades (with dual base images) and the continuous
stream of features this is only going to get bigger.

This change introduces an alternative to the `tmpfs` by allowing a system
to extract the `dockerfs.tar.gz` inside a `zram` device thus bringing
compression in play at the detriment of performance.

Introduce 2 new optional kernel parameters to be consumed by SONiC initramfs.
 - `docker_inram_size` which represent the max physical size of the
   `zram` or `tmpfs` volume (defaults to DOCKER_RAMFS_SIZE)
 - `docker_inram_algo` which is the method to use to extract the
   `dockerfs.tar.gz` (defaults to `tmpfs`)
   other values are considered to be compression algorithm for `zram`
   (e.g `zstd`, `zlo-rle`, `lz4`)

Refactored the logic to mount the docker fs in the SONiC initramfs under
the `union-mount` script.
Moved the code into a function to make it cleaner and separated the
inram volume creation and docker extraction.

On Arista platform with a flash smaller or equal to 4GB set
`docker_inram_algo` to `zstd` which produces the best compression ratio
at the detriment of a slower write performance and a similar read
performance to other `zram` compression algorithms.
2023-05-18 14:21:52 -07:00
Samuel Angebault
467994c024 [Arista] Fix boot0 code for docker_inram
Enable docker_inram for all systems with 4GB or less of flash.
This is mandatory to allow these systems to store 2 SONiC images.

This change also fixes the missing docker_inram attribute when
installing a new image from SONiC.
Because the SWI image can ship with additional kernel parameters within
such as `sonic_fips=` this lead to a conflict.
To prevent the conflict, the extra kernel parameters from the SWI are
now stored in the file `kernel-cmdline-append` which isn't used anywhere.
2023-05-18 14:21:52 -07:00
FuzailBrcm
37eddd479d
[pddf]: Adding S3IP supported attribute for FAN in PDDF (#15075)
The S3IP (Simplified Switch System INtegration Program) sysfs specification defines a unified interface to access peripheral hardware on devices from different vendors, making it easier for SONiC to support different devices and platforms.

PDDF is a framework to simplify the driver and SONiC platform APIs development for new platforms. This effort is first step in combining the two frameworks.

This specific PR adds S3IP supported sysfs attribute in common FAN driver of PDDF.
2023-05-18 14:06:46 -07:00
FuzailBrcm
d6768b3259
[pddf]: Adding S3IP supported attribute for LEDs in PDDF (#15074)
The S3IP (Simplified Switch System INtegration Program) sysfs specification defines a unified interface to access peripheral hardware on devices from different vendors, making it easier for SONiC to support different devices and platforms.

PDDF is a framework to simplify the driver and SONiC platform APIs development for new platforms. This effort is first step in combining the two frameworks.

This specific PR adds the S3IP supported sysfs attributes in PDDF common LED driver.
2023-05-18 14:06:19 -07:00
FuzailBrcm
771a1170d8
[pddf]: Adding and enabling S3IP support in PDDF (#15073)
Why I did it
The S3IP (Simplified Switch System INtegration Program) sysfs specification defines a unified interface to access peripheral hardware on devices from different vendors, making it easier for SONiC to support different devices and platforms.

PDDF is a framework to simplify the driver and SONiC platform APIs development for new platforms. This effort is first step in combining the two frameworks.

This specific PR adds support for pddf-s3ip-init.service and enables it in PDDF.
2023-05-18 13:13:16 -07:00
xumia
819ab5db50
Change the docker image from alpine to debian in Makefile (#15132)
Why I did it
For security and consistency consideration, change the docker image from alpine to Debian in Makefile

Work item tracking
Microsoft ADO (number only): 23077660
How I did it
change the docker image from alpine to Debian in Makefile
2023-05-18 11:37:49 -07:00
abdosi
b7d04b6bd5
[minigraph]: Enhancement to minigraph parsing for chassis/multi-asic use case (#14243)
Following changes are done:    

Added Support where if asic configuration is not present in minigraph sonic-cfggen do not error out but instead process it gracefully. 

Use Case: In Supervisor we have number of asic are define as max possible but in minigraph configuration of only valid/available asics only are present. Without this change load_minigraph fails.

Microsoft ADO: 17956325

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
2023-05-18 10:57:16 -07:00
lixiaoyuner
6dffa55e9c
Clean up the old version container images (#14978)
Why I did it
Our k8s feature will pull new version container images for each upgrade, the container images inside sonic will be more and more, but for now we don’t have a way to clean up the old version container images, the disk may be filled up. Need to add cleaning up the old version container images logic.

Work item tracking
Microsoft ADO (number only):
17979809
How I did it
Remove the old version container images besides the feature's current version and last version image, last version image is saved for supporting fallback.

How to verify it
Check whether the old version images are removed
2023-05-18 10:37:34 -07:00
Yaqiang Zhu
6332aa31cc
[yang] Extend device_metadata yang model with rack_mgmt_map (#15109)
* [yang] Extend device_metadata yang model with rack_mgmt_map

* Update doc and sample
2023-05-18 09:00:20 -07:00
mssonicbld
deb760002a [submodule] Update submodule sonic-py-swsssdk to the latest HEAD automatically 2023-05-18 16:32:32 +08:00
mssonicbld
0603516414 [submodule] Update submodule sonic-swss to the latest HEAD automatically 2023-05-18 16:32:26 +08:00
Liu Shilong
2505dac8fb
[ci] Enable kvm test when upgrading package versions. (#15111)
Why I did it
Run kvmtest when update package versions to avoid test break.

Work item tracking
Microsoft ADO (number only): 22335854
How I did it
How to verify it
2023-05-18 16:02:22 +08:00
mssonicbld
99fbf97e97 [submodule] Update submodule sonic-mgmt-framework to the latest HEAD automatically 2023-05-18 14:33:23 +08:00
arista-nwolfe
93add6ed05
Add soc property sai_pfc_dlr_init_capability=0 to missing DNX SKUs (#15098) 2023-05-17 14:03:42 -07:00
Song Yuan
21bcaab280
Install ptf afpacket module required by ptf_nn_agent. (#14503)
Why I did it
ptf_nn_agent failed to start in dnx rpc syncd because module afpacket was not installed.
Please see issue sonic-net/sonic-mgmt#7822

How I did it
Add downloading ptf afpacket module in docker file.

How to verify it
Verified that ptf_nn_agent was started successfully in dnx rpc syncd with the change.
2023-05-17 11:34:43 -07:00
Anish Narsian
05a85b57b8
[arp_update] Resolve neighbors from config_db (#15006)
* To resolve NEIGH table entries present in CONFIG_DB. Without this change arp/ndp entries which we wish to resolve, and configured via CONFIG_DB are not resolved.
2023-05-17 10:42:03 -07:00
Liu Shilong
7afeffcabb
[action] Only add 'automerge' label on master version upgrade PR. (#15112)
Why I did it
Don't auto update package version for release branch.

Work item tracking
Microsoft ADO (number only): 22335854
How I did it
How to verify it
2023-05-17 18:09:12 +08:00
mssonicbld
c1c00145e3 [submodule] Update submodule sonic-mgmt-common to the latest HEAD automatically 2023-05-17 16:33:04 +08:00
mssonicbld
0514615975 [submodule] Update submodule sonic-linux-kernel to the latest HEAD automatically 2023-05-17 16:32:58 +08:00
mssonicbld
cd296f2b3e [submodule] Update submodule sonic-platform-common to the latest HEAD automatically 2023-05-17 16:32:52 +08:00
Rajkumar-Marvell
f2ff2bfc3c
[Marvell] Update armhf sai debian (#15096)
- SAI-1.11.0 support
- SONIC 20220531.25 OC Failure: Everflow testcases failing due to SAI orchagent crash
- SONIC 20220531.25 OC Failure: ACL IPv6 testcases.
- TPID support

Signed-off-by: rajkumar38 <rpennadamram@marvell.com>
2023-05-16 23:03:15 -07:00
Liu Shilong
b9c25ec006
Add OVERRIDE_BUILD_OPTIONS options in UpgrateVersion pipeline. (#15088)
Why I did it
Provide a method to override build options in webUI.
We can stop python dependency upgrade version.

Work item tracking
Microsoft ADO (number only): 22335854
How I did it
Add a variable at the tail of make command.
2023-05-17 11:07:35 +08:00
Liu Shilong
6303cd91d0
[action] Update github workflows about automerge_scan and pr_cherrypick_prestep. (#15090)
Why I did it
When auto cherry pick workflow create PR, fill the body field.
Rerun Azure.sonic-buildimage on failure perday.
Work item tracking
Microsoft ADO (number only): 17979778
How I did it
How to verify it
2023-05-17 11:06:50 +08:00
mssonicbld
93adb9c5e5 [submodule] Update submodule dhcprelay to the latest HEAD automatically 2023-05-16 16:26:51 +08:00
DavidZagury
5acec530bb
Add SECURE_UPGRADE_PROD_TOOL_ARGS flag to make it possible for vendors to pass their own arguments on the prod signing script (#14581)
- Why I did it
Since the prod signing tool is vendor specific, and each vendor may have different arguments they would like to use in the script, we would need a way to inject those arguments to the script.

- How I did it
Add a compilation flag SECURE_UPGRADE_PROD_TOOL_ARGS which vendors can use to inject any flag they would want to the prod signing script.

- How to verify it
Build SONiC using your own prod script
2023-05-16 08:36:13 +03:00
daxia16
1175143af1
[Mellanox] Support UID LED in platform API (#11592)
- Why I did it
As a LED indicator to help user to find switch location in the lab, UID LED is a useful LED in Mellanox switch.

- How I did it
I add a new member _led_uid in Mellanox/Chassis.py, and extend Mellanox/led.py to support blue color.
Relevant platform-common PR sonic-net/sonic-platform-common#369

- How to verify it
Add unit test cases in test.py, and do manual test including turn-on/off/show uid led.

Signed-off-by: David Xia <daxia@nvidia.com>
2023-05-16 08:24:39 +03:00
andywongarista
dad61f3d81
[Arista] Update platform library submodules (#15049)
Fix lpmode on 7060DX5-32
Fix psu led issue on 7060DX5-64
Use sonic_xcvr lpmode if platform does not support hw lpmode
Add chassis cooling algorithm
Change cooling algorithm default interval to 10s
Force filesystem sync on linecard reboot
2023-05-15 15:42:29 -07:00