Commit Graph

651 Commits

Author SHA1 Message Date
Andriy Moroz
9a418e34dd [Mellanox] Update SAI (#3265)
New SAI has fix for 50G FEC issue

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
2019-08-01 16:24:08 -07:00
Roy Lee
ff8e34463d [device/Accton] Fix i2c fault from ir3570a on 3 models (#3245)
I2c burst read may failed due to misoperation of ir3570a(A DC-to-DC converter IC).
As #2966, there are 3 more models have this symptom, as7326-56x, as7726-32x, and as9716-32d.
Also correct typo of naming on as7816-64x and as7716-32x.

Signed-off-by: roy_lee roy_lee@accton.com

What I did
Disabling i2c function of ir3570a which may failed i2c tranfer to others.
Close channel of mux after data transfered.

How I did it
Identify version of ir3570, if it's ir3570a, disable its alias i2c address.
Enable parameter of driver i2c_mux_pca954x to close channel on after every access.

How to verify it
Write 08 to offset 0xcf of systom eeprom and execute i2c block read.
It will return error.
plug-in several transceivers and run "show interfaces transceiver presence" and "sfputil show presence". You may see the different result. (But doing this requires updated xcvrd).

Signed-off-by: roy_lee <roy_lee@accton.com>
2019-07-31 11:28:03 -07:00
Lawrence Lee
7271fe598f [build]: Move Systemd service start to systemd generator (#3172)
- What I did

 Move the enabling of Systemd services from sonic_debian_extension to a new systemd generator

- How I did it

  Create a new systemd generator to manually create symlinks to enable systemd services
  Add rules/Makefile to build generator
  Add services to be enabled to /etc/sonic/generated_services.conf to be read by the generator at boot time

Signed-off-by: Lawrence Lee <t-lale@microsoft.com>
2019-07-29 15:52:15 -07:00
Stephen Sun
a5de31bf43 [Mellanox]new platform api -- support get_change_event (#3142)
* [Mellanox]refractor the sfp event change notification logic for new platform api
remove the standalong daemon which is in charge of polling sfp change event through sdk interface
and move the polling stuff to the event in the chassis daemon.

* rephase some comment

* fix typo in sfp_event.sfp_event.initialize
2019-07-28 15:18:39 +03:00
arheneus@marvell.com
50fe458592 [build]: SONiC buildimage ARM arch support (#2980)
ARM Architecture support in SONIC

make configure platform=[ASIC_VENDOR_ARCH] PLATFORM_ARCH=[ARM_ARCH]
SONIC_ARCH: default amd64
armhf - arm32bit
arm64 - arm64bit

Signed-off-by: Antony Rheneus <arheneus@marvell.com>
2019-07-25 22:06:41 -07:00
Volodymyr Samotiy
2c6cd620fb [Mellanox]: Update SAI pointer (#3208)
Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
2019-07-25 09:43:57 -07:00
Andriy Kokhan
4eb356874e [platform]: fixed syseeprom access for BFN platform (#3216)
Signed-off-by: Andriy Kokhan <akokhan@barefootnetworks.com>
2019-07-25 08:43:30 -07:00
sridhar-ravindran
95558ad5ce [DELLEMC][S6000] Platform 2.0 Reboot Reason and fixed issue in process-reboot-cause (#3156)
Added Reboot Reason for S6000 in platform 2.0
Fixed issue in process-reboot-cause
Added package uninstall code in platform de-init code for z9100, s6100
- How I did it
-> Added support for S6000 Reboot Reason
-> Added platform.py for all platforms
-> Verified show reboot-cause command with the code changes. Added UT logs with show reboot-cause
-> Modified process-reboot-cause service to start after pmon.service. In S6000, we have to wait for nvram to be loaded.
-> If reboot-cause service starts before pmon.service, show reboot-cause is showing incorrect reason.
-> Bug fix in process-reboot-cause file
- import sonic_platform
+ import sonic_platform.platform
2019-07-24 12:15:46 -07:00
Roy Lee
efe9438c61 [Accton] Correct port index and offer the default speed. (#3213)
* [as5712-54x]
Verified with index from 1.
Add qsfp_event() for command "show interaface trancerver".
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as6712-32x]
Add default port speed.
Verified with index from 1.

Signed-off-by: roy_lee <roy_lee@accton.com>

* [as7726-32x]
Add default port speed.
Verified with index from 1.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as7712-32x]
Add default port speed.
Verified with index from 1.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as5812-54x]
Add default port speed.
Verified with index from 1.

Signed-off-by: roy_lee <roy_lee@accton.com>

* [as5712-54x]
Update port-config with 1-based index.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as5812-54x]
Somehow the service may block, use type=simple to work-around.
Add syslog function for monitor.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as7716-32x]
Update port-config with 1-based index.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as7816-64x]
Update port-config with 1-based index.
Implement sfputil change_event.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as7326-56x]
Update port-config with 1-based index.
Implement sfputil change_event.

Signed-off-by: roy_lee <roy_lee@accton.com>

* Remove debug code.
Signed-off-by: roy_lee <roy_lee@accton.com>

* [as7312-54x]
Update port-config with 1-based index and default port speed.

Signed-off-by: roy_lee <roy_lee@accton.com>
2019-07-24 12:14:43 -07:00
Harish Venkatraman
dbe07a4339 [sonic-platform-modules-dell] Graceful platform reboot (#2912)
The following commit addresses the graceful unmounting of file
system and graceful shutdown of dockers before calling a
cold reboot which will cause a power cycle of SSD. This ensures
orderly shutdown and no corruption of files systems because
of the power cycle to SSD.
This commit will use the existing systemd-reboot service scripts
and override the configuration to do cold reboot for S6100 and
Z9100.
Unit tested the fix and graceful shutdown of file system and
dockers are done with cold reboot.

Signed-off-by: Harish Venkatraman <harish_venkatraman@dell.com>
2019-07-23 15:26:58 -07:00
Wirut Getbamrung
0340cf3b8b [device/celestica]: Implement device base APIs for Fan/PSU API based on the new platform API (#3163)
* [platform/cel]: add fan present sysfs

* [device/celestica]: move component device to chassis

* [device/celestica]: add basic device api
2019-07-23 10:00:02 -07:00
Renuka Manavalan
92efe73e48
Enable debug image build for kvm image. (#3203) 2019-07-22 14:30:13 -07:00
Stephen Sun
1d15022df7 [Mellanox] support new platform api, thermal and psu part (#3175)
* support new platform api, thermal and psu part
for psu, all APIs are supported.
for thermal, we support
  get_temperature,
  get_high_threshold
for the thermal sensors of cpu core, cpu pack, psu and sfp module
and get_temperature for the ambient thermal sensors around the asic, port, fan, comex and board.

* 1. address review comments
2. improve the handling of PSU inserting/removal
3. tolerance diverse psu thermal sensor file name conventions

* 1. adjust thermal code according to the latest version of hw-management
2. check power_good_status rather than whether file existing ahead of reading voltage, current and power of PSU
2019-07-22 07:59:48 -07:00
srideepDell
ce5d16f858 [devices]: DellEMC [s5232]: PSU detection and default led state support (#3185)
*   [devices]: Add a new supported device DellEMC s5232f

    * Switch Vendor: DellEMC
    * Switch SKU: s5232F
    * ASIC Vendor: Broadcom
    * Swich ASIC: Trident3
    * Port Configuration: 32x100G
    * SONiC Image: sonic-broadcom.bin

    * LED support for s5232f
    * Changes Include ipmitool implementation for platform_sensors script is inclued in pmon startup
    * Added 100G,25G,10G configruation ( 100G is default).

* s5232[device] PSU detecttion and default led state support
2019-07-19 07:01:02 -07:00
Roy Lee
9c4d23427b [device][accton]: add support for as7312-54xs (#3140)
* Add driver and util for peripherals of as7312-54xs, most are copied from as7312-54s.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Add default port speed and index from 1.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Update i2c addr of psus.
Add system logging for monitor.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Correct syntax of module_dirs.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Validate sfputil after tested.
Signed-off-by: roy_lee <roy_lee@accton.com>

* Correct the index of eeprom mapping.
Signed-off-by: roy_lee <roy_lee@accton.com>
2019-07-18 07:30:22 -07:00
Mykola F
f409e04f17 [Mellanox] update SDK/FW (#3168)
Integrating official Mellanox SDK/FW release as a pre condition for getting new Mellanox SAI release with hash changes (inner field) and 3k VXLAN scale. As well as bug fix for Spectrum LP mode and Spectrum 2 PFC WD

Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
2019-07-17 08:47:10 -07:00
Kebo Liu
89d98640f5 [Mellanox]Update hw-mgmt package to v183 (#3138)
* Update hw-mgmt package to v183

* update sonic-linux-kernel repo to pick up new patches
2019-07-12 13:09:36 +03:00
Renuka Manavalan
a1b91937ca
Extend debug image build ability to all platforms. (#3134) 2019-07-10 12:23:13 -07:00
ArunSaravananBalachandran
e520cbe9e3 DellEMC S6100 : Platform2.0 API implementation for PSU (#3132) 2019-07-10 11:54:14 -07:00
Stephen Sun
cca115de9d [Mellanox] Fix the memory leak in mlnx-sfpd (#3128)
* fix the memory leak in on_pmpe. objects created via sx_api having convention new_<type_name> should be release explicitly via delete_<type_name>.

* avoid duplicate code.
2019-07-09 17:47:44 +03:00
Stepan Blyshchak
e4300b8f76 [sairedis.mk] do not build rpc sairedis when not needed (#3109)
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
2019-07-06 14:55:31 -07:00
brandonchuang
5a89cf5733 [device][platform] add platform as5835-54t, accton. (#3119)
Signed-off-by: brandon_chuang <brandon_chuang@edge-core.com>
2019-07-06 14:53:02 -07:00
Samuel Angebault
ae2e555418 [device/Arista] Update arista driver submodules (#3122)
- Add PSU support for the platform API
 - Complete LED support for the platform API
 - Misc refactoring
2019-07-06 14:50:25 -07:00
Stephen Sun
20e4547dbc [Mellanox] Fix typo "xSFP_VLOT_OFFSET" (#3118)
Variables SFP_VLOT_OFFSET and QSFP_VLOT_OFFSET containing the typo are originally defined in repo sonic-platform-common. The typo has been fixed in PR #33. However, some Mellanox-specific code hasn't updated correspondingly, which results in xcvrd fail to start.
This PR updates the variable name in Mellanox-specific code correspondingly to fix that.
2019-07-05 14:06:18 -07:00
Stephen Sun
82fb3a099d [Mellanox]New platform api -- chassis part (#3082)
* new platform api, chassis part

* Inject mlnx mlx libs to platform monitor

* address the review comments

* remove some confusing naming.

* Adjust the minor cause to a more human-readable way when rebooted by firmware

* address review comments

* expose host dir /host/reboot-cause to pmon docker so that the reboot causing by user command can be identified

* 1. Revert "expose host dir /host/reboot-cause to pmon docker so that the reboot causing by user command can be identified"
Since the only hardware-causing reboot should be handled by get_reboot_cause and the logic of handling reboot cause is about to move to the host side, no need to mount this dir to pmon docker.
This reverts commit 3feb96869d.
2. adjust log output by using sonic_daemon_base.daemon_base.Logger.
3. remove the logic of verifying /host/reboot-cause/ files.
4. fix typo.

* implement get_firmware_version and adjust the interfaces regarding components' version retrieving according to the Azure/sonic-platform-common#34
2019-07-04 14:29:58 +03:00
Jipan Yang
9a8202a39d [database]: Update redis to 5.0.3 (#3066)
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2019-07-03 22:16:09 -07:00
Stepan Blyshchak
211c8cd536 [syncd-rpc] fix syncd rpc build and add cleanup (#3113)
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
2019-07-03 10:37:54 -07:00
sridhar-ravindran
56608bf06b [devices]: DELL Platform 2.0 API Infra and Reboot Reason support in Z9100 & S6100 (#3063) 2019-07-03 06:52:35 -07:00
Stephen Sun
86495a15a2 [Mellanox] Support new platform api sfp part (#3101)
Implement new platform api sfp part, including the following APIs;
- get_reset_status
- get_tx_disable_channel
- get_lpmode
- get_power_override
- reset
- set_lpmode
- tx_disable
- tx_disable_channel
- set_power_override
2019-07-02 14:50:20 -07:00
txj36
22c0f4d877 [devices]: fix SFP initialization in the Chassis for mlnx-platform-api (#3012) 2019-07-02 11:39:24 -07:00
paavaanan
4f737f8b65 [devices]: DellEMC S6100 Watchdog support (#2835) 2019-06-28 23:47:36 -07:00
jostar-yang
9b0d1b74f9 [devices]: Add support as9716 platform (#2993) 2019-06-28 21:53:06 -07:00
sridhar-ravindran
fe45a0d1ea [devices]: DELLEMC: Z9100,S6100 Exporting Device Last PowerOn Reason (#3059) 2019-06-28 21:49:12 -07:00
srideepDell
0695a6449f [devices]: Add a new supported device DellEMC s5232f (#3090)
* Switch Vendor: DellEMC
    * Switch SKU: s5232F
    * ASIC Vendor: Broadcom
    * Swich ASIC: Trident3
    * Port Configuration: 32x100G
    * SONiC Image: sonic-broadcom.bin

    * LED support for s5232f
    * Changes Include ipmitool implementation for platform_sensors script is inclued in pmon startup
    * Added 100G,25G,10G configruation ( 100G is default).
2019-06-28 21:40:50 -07:00
Samuel Angebault
a80baaf8d1 [device/Arista] Update drivers submodules (#3092)
- Add reboot cause support for the platform API
 - Add LED support for the platform API xcvrs and fans
 - Misc fixes
2019-06-28 21:37:36 -07:00
brandonchuang
0b8c1a10e8 [devices]: Add lpmode in sfputil.py for Accton AS6712-32X (#3095)
Signed-off-by: brandon_chuang <brandon_chuang@edge-core.com>
2019-06-28 21:35:27 -07:00
Karthik Gengan
b92d980769 Remapping S6000 platform files under Vendor (DellEmc) specific directory (#3079) 2019-06-25 12:23:24 -07:00
simonJi2018
3f54b58a67 [nephos]: update to support linux-kernel-4.9.0-9-2 (#3058) 2019-06-24 08:14:27 -07:00
Sudharsan D.G
2e40fa5dbe [devices]: Poller to detect Intel Rangely LPC failure for dell z9100/s6100 (#3065)
- What I did
Added Daemon to Log LPC bus degradation in Intel C2000 processor. Intel Rangeley C2000 processors with revision less than or equal to 2 have issue where LPC bus degrades over time in some processors. To identify the problem and to notify the issue, a daemon has been added which will log on encountering the issue.

- How I did it
Added a daemon which validates the CPLD scratch(0x102) and SMF scratch(0x202) registers by writing and reading values on regular polling intervals (300 seconds). If there is a discrepancy between read and write, a critical log will be thrown.

- How to verify it
The infra is verify by simulating the issue where between write and read, the value in register is modified and the log appearance is checked.

- Description for the changelog

Added Daemon to identify LPC bus degradation issue and notify using syslog in Dell S6100 and Z9100 platforms. This daemon will only run on processors with revision less than or equal to 2.
2019-06-24 08:13:40 -07:00
pavel-shirshov
dd0f005b8a
[FRR]: Port some patches from sonic-quagga repo (#3017)
* Update sonic-quagga submodule

* Port some patches from sonic-quagga

* Fix Makefile

* Another patch

* Uncomment bgp test

* Downport Nikos's patch

* Add a patch to alleviate the vendor issue

* use patch instead of stg
2019-06-23 15:26:02 -07:00
sridhar-ravindran
9cf34ec464 Revert "[Dell] [Z9100] Supporting PreEmphasis Settings for Optics (#2501)" (#3060)
This reverts commit ed2d87a710.
2019-06-22 14:45:43 -07:00
Stepan Blyshchak
81cf33231f [build]: Improve dockerfile instructions (#3048)
- create a dockerfile-marcros.j2 file with all common operations
  written as j2 macro
- use single dockerfile instruction for COPY and RUN commands
  when possible to improve build time
- reorganize dockerfile instructions to make more cache friendly
  (in case someday we will remove --no-cache to build docker images)

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
2019-06-22 11:26:23 -07:00
Myron Sosyak
f4d07dc003 fixed BFN target build (#3061)
Signed-off-by: Myron Sosyak <msosyak@barefootnetworks.com>
2019-06-21 13:29:35 -07:00
RAMA CHANDRA REDDY GADDAM
6370d64b3d [broadcom]: Check for broadcom platform sdk init ready during syncd start. (#2931)
- What I did
During boot/reload time, wait in a loop to check for bcm initialization.
Break the loop, once sdk is ready to process the 'bcmcmd' request (or) loop count reached the maximum value.

- How I did it
In the existing implementation during syncd start process will sleep for a fixed time (3 secs)
for sdk initialization to happen. But the time taken for sdk initialization is varying for different platforms.
To fix this issue, the syncd start process wait in a loop and check whether sdk is ready to process 'bcmcmd' command.

- How to verify it
Check for syncd process status and interface status.
Check for syslogs and no failures related to syncd should be present.
2019-06-19 01:25:37 -07:00
Qi Luo
e7b1988638
[submodule] update sonic-linux-kernel (#2985)
* [submodule] update sonic-linux-kernel
* update linux kernel version
* Fix many version strings
* update mellanox components (built with new kernel)
* [mlnx] add make files for SDK WJH libs
* Update arista driver submodule (#8)
Make the debian packaging point to a newer kernel version.
2019-06-18 10:00:16 -07:00
Kebo Liu
c927517355 [Mellanox] Inject SDK libs dependency to pmon on Mellanox platform (#3000)
* inject sdk libs to pmon
* fix wrong code
2019-06-14 17:38:24 -07:00
Shuotian Cheng
a5aa3bb0a5
[Broadcom]: Update SAI version to 3.5.2.3 (#3014)
--Create/remove port fix
--Support SAI_PORT_ATTR_SERDES_IPREDRIVER
--Egress ACL fix for PFC storm restoration
--Memory corruption during warm reboot
--SAI_OBJECT_TYPE_TUNNEL_MAP_ENTRY removal fix
--Segfault/memory corruption fix during switch shutdown
--Directed boardcast fix
--Pre-emphasis value for Dell 6100

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
2019-06-14 15:47:11 -07:00
Renuka Manavalan
cdca062693 [build]: Build sonic-broadcom.bin using debug dockers for all stretch based dockers (#2833)
* Updated Makefile infrastructure to build debug images.
As a sample, platform/broadcom/docker-orchagent-brcm.mk is updated to add a docker-orchagent-brcm-dbg.gz target.

Now "BLDENV=stretch make target/docker-orchagent-brcm-dbg.gz" will build the debug image.

NOTE: If you don't specify NOSTRETcH=1, it implicitly calls "make stretch", which builds all stretch targets and that would include debug dockers too.

This debug image can be used in any linux box to inspect core file. If your module's external dependency can be suitably mocked, you my even manually run it inside.

"docker run -it --entrypoint=/bin/bash e47a8fb8ed38"

You may map the core file path to this docker run.

* Dropped the regular binary using DBG_PACKAGES and a small name change to help readability.

* Tweaked the changes to retain the existing behavior w.r.t INSTALL_DEBUG_TOOLS=y.

When this change ('building debug docker image transparently') is extended to all dockers, this flag would become redundant. Yet, there can be some test based use cases that rely on this flag.

Until after all the dockers gets their debug images by default and we switch all use cases of this flag to use the newly built debug images, we need to maintain the existing behavior.

* 1) slave.mk - Dropped unused Docker build args
2) Debug template builder: renamed build_dbg_j2.sh to build_debug_docker_j2.sh
3) Dropped insignifcant statement CMD from debug Docker file, as base docker has Entrypoint.

* Reverted some changes, per review comments.
"User, uid, guid, frr-uid & frr-guid" are required for all docker images, with exception of debug images.

* Get in sync with the new update that filters out dockers to be built (SONIC_STRETCH_DOCKERS_FOR_INSTALLERS) and build debug-dockers only for those to be built and debug target is available.

* Mkae a template for each target that can be shared by all platforms.
Where needed a platform entry can override the template.
This avoids duplication, hence easier to maintain.

* A small change, that can fit better with other targets too.
Just take the platform code and do the rest in template.

* Extended debug to all stretch based docker images

* 1) Combined all orchagent makefiles into one platform independent make under rules/docker-orchagent.mk
2) Extened debug image to all stretch dockers

* Changes per review comments:
1) Dropped LIBSAIREDIS_DBG from database, teamd, router-advertiser, telemetry, and platform-monitor docker*.mk files from _DBG_DEPENDS list
2) W.r.t docker make for syncd, moved DEPENDS from template to specific makefile and let the template has stuff that is applicable to all.

* 1) Corrected a copy/paste mistake

* Fixed a copy/paste bug

* The base syncd dockers follow a template, which defines the base docker as DOCKER_SYNCD_BASE instead of DOCKER_SYNCD_<platform code>. Fix the docker-syncd-<mlnx, bfn>.mk to use the new one.

[Yet to be tested locally]

* Fixed spelling mistake

* Enable build of dbg-sonic-broadcom.bin, which uses dbg-dockers in place of regular dockers, for dockers that build debug version. For dockers that do not build debug version, it uses the regular docker.

This debug bin is installable and usable in a DUT, just like a regular bin.

* Per review comments:
  1) Share a single rule for final image for normal & debug flavors (e.g. sonic-broadcom.bin & sonic-broadcom-dbg.bin)
  2) Put dbg as suffix in final image name.
  3) Compared target/sonic-broadcom.bin.logs with & w/o fix to verify integrity of sonic-broadcom.bin
  4) Compared target/sonic-broadcom.bin.logs with sonic-broadcom-dbg.bin.log for verification

This fix takes care of ONIE image only. The next PR will cover the rest.
The next PR, will also make debug image conditional with flag.

* Updated per comments.
Now that debug dockers are available, do not need a way to install debug symbols in regular dockers.

With this commit, when INSTALL_DEBUG_TOOLS=y is set, it builds debug dockers (for dockers that enable debug build) and the final image uses debug dockers. For dockers that do not enable debug build, regular dockers get used in the final image.

Note:
The debug dockers are explicitly named as <docker name>-dbg.gz. But there is no "-dbg" suffix for image.
Hence if you make two runs with and w/o INSTALL_DEBUG_TOOLS=y, you have complete set of regular dockers + debug dockers. But the image gets overwritten.
Hence if both regular & debug images are needed, make two runs, as one with INSTALL_DEBUG_TOOLS=y and one w/o. Make sure to copy/rename the final image, before making the second run.
2019-06-12 01:36:21 -07:00
Olivier Singla
708999ad61 [devices]: Add Broadcom XLR/GTS (BCM9COMX2XMC) support for Tomahawk switch (BCM956960K) (#2682)
These patches add support for the Broadcom XMC card (XLR/GTS). At this moment
only Tomahawk switch (BCM956960K) is supported. Add
device/broadcom/x86_64-bcm_xlr-r0 and
platform/broadcom/sonic-platform-modules-brcm-xlr-gts files
2019-06-09 12:09:31 -07:00
lguohan
fa3ea537e7
[docker-saiserver]: upgrade docker saiserver to stretch for brcm/mlnx (#2983) 2019-06-08 16:27:19 -07:00