as needed by SAI 3.7 and above. Without this change
Warmboot fails from 3.5 to 3.7 as Braodcoam Datastructure
gets corrupted after warm-boot.
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
As part of consolidating all common Python-based functionality into the new sonic-py-common package, this pull request:
1. Redirects all Python applications/scripts in sonic-buildimage repo which previously imported sonic_device_util or sonic_daemon_base to instead import sonic-py-common, which was added in https://github.com/Azure/sonic-buildimage/pull/5003
2. Replaces all calls to `sonic_device_util.get_platform_info()` to instead call `sonic_py_common.get_platform()` and removes any calls to `sonic_device_util.get_machine_info()` which are no longer necessary (i.e., those which were only used to pass the results to `sonic_device_util.get_platform_info()`.
3. Removes unused imports to the now-deprecated sonic-daemon-base package and sonic_device_util.py module
This is the next step toward resolving https://github.com/Azure/sonic-buildimage/issues/4999
Also reverted my previous change in which device_info.get_platform() would first try obtaining the platform ID string from Config DB and fall back to gathering it from machine.conf upon failure because this function is called by sonic-cfggen before the data is in the DB, in which case, the db_connect() call will hang indefinitely, which was not the behavior I expected. As of now, the function will always reference machine.conf.
Align SFP key names with new standard defined in https://github.com/Azure/sonic-platform-common/pull/97
- hardwarerev -> hardware_rev
- serialnum -> serial
- manufacturename -> manufacturer
- modelname -> model
- Connector -> connector
Update AS7312-54X,AS7312-54XS,AS7315-27XB config.bcm file to make sure there is no the following error message.
configuration: format error in /usr/share/sonic/hwsku/th-as7312-48x25G+6x100G.config.bcm on line 110 (ignored)#15
* [device][accton]: Update for AS5835-54T
* [device][accton]: Update for AS5835-54T to delete its config.bcm off-loading to the self-brought up of the Broadcom SAI version, 3.5.2.3 due to SONiC not supported.
* [device][accton]: Add config.bcm for AS5835-54T
* Ran config_checker passed on our config.bcm, however, we off-loaded the needed MV2 SDK config setting to our self-brought up SAI libraries due to the compatibility of config_check among SONiC different branches.
[-] help_cli_enable=1
[-] ifp_inports_support_enable=1
[-] memlist_enable=1
[-] port_flex_enable=1
[-] reglist_enable=1
* [device][accton]: Update config.bcm for AS5835-54T based on the latest config_checker
Co-authored-by: Polly Hsu <pollyhsu2git@gmail.com>
- What I did
1. Rename the config.bcm to th2-as7816-64x25G-48x100G_row1.config.bcm,
due to that it just allow 1st row of TH2 to be breakout
2. Add port_flex_enable to support dynamic port breakout.
3. Remove the loopback port due to it would make syncd terminate.
=> The port_config.ini doesn't include the loopback ports.
When portsorch start, it would compare the ports in SDK and port_config.ini.
Portsorch would remove the loopback ports due to the loopback ports didn't been defined in port_config.ini
But the broadcom SAI doesn't support remove port for th2.
So it would return fail and syncd would terminate.
- How I did it
- How to verify it
Run with the new SONiC image and syncd would not terminate
Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
Modify get_psu_presence(). Move read() and close() to "try: ... except IOError:" To avoid when read
port present sysfs fail. This exception will let sfputil.py to exit. So "sfputil show eeprom" can't show other port status.
* [device][accton]: Update for AS7326-56X complying the Broadcom SAI latest version 3.5.3.1m-26
* Update Accton-AS7326-56X to adapt xxx.config.bcm based on the latest update of Device-Specific File Directory Structure.
* Update Accton-AS7326-56X LED BIN complying the Broadcom SAI latest version 3.5.3.1m-26
Signed-off-by: polly_hsu@edge-core.com
* [device][accton]: Merge the SDK config with #3103 (Fix Accton as7326 port breakouk)
Signed-off-by: Polly Hsu <pollyhsu2git@gmail.com>
This switch has 27 fiber ports, 4x25G, 20x10G , and 3x100G ports ports.
CPU: Intel ® Atom™ Processor C3508,1.6GHz
BMC: None
MAC: Broadcom BCM88470 (Qumran AX).
MISC: Support IEEE1588v2, hot-swappable PSU, hot-swappable fan tray.
But notice here, BCM88470 is not supported for SAI now.
So the syncd container is not running so far.
Signed-off-by: roy_lee <roy_lee@accton.com>
Add fan control for as7116-54x
Modify sfputil.py to support sfp insert and remove events for as7116-54x
Modify port_config.nps to set port default admin down
Modify port_config.ini for add speed attr
Code format optimization like remove newline
Modify buffers_defaults_t0 and t1, change ingress_lossless_pool mode from dynamic to static
Add nephos_dac.nps and nephos_opt.nps for support difference dac and fiber module
* [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>
* 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>
* Add new device accton_as5812_54x.
Signed-off-by: roy_lee <roy_lee@accton.com>
* Rename 5812's config.bcm.
Signed-off-by: roy_lee <roy_lee@accton.com>
* Change fan module to support lm-sensors.
Validate for thermal policy.
Signed-off-by: roy_lee <roy_lee@accton.com>
* Add bask reset and lpmode control of 6 QSFP ports.
Signed-off-by: roy_lee <roy_lee@accton.com>
* Get currect duty of fan for comparing. Instead of by stored duty from previous iteration.
Signed-off-by: roy_lee <roy_lee@accton.com>
* Roll back the mistakes to update mellanox submodules.
Signed-off-by: roy_lee <roy_lee@accton.com>
* Rollback for misoperation on submodule platform/p4/SAI-P4-BM.
Signed-off-by: roy_lee <roy_lee@accton.com>
* Change indexes of ports to start from 1, as them on the front panel.
Add low-power mode control of the transciever's eeprom, follows SFF-8436.
Signed-off-by: roy_lee <roy_lee@accton.com>
[devices] add new accton platform minipack.
Add support for new platform, minipack.
It has
CPU: Broadwell DE – D1527
MAC: Tomahawk3(BCM56980).
PHY:Broadcom BCM81724, 4 pcs, Gearbox for PIM-16Q
BMC:AST2520
8 hot-swappable Port-Interface-Modules, each of them has 16*100G QSFP.
- What I did
Add device and platform files for minipack.
- How I did it
Add as SONiC Porting Guide.
- How to verify it
decode-syseeprom
sensors
psuutil
sfputil
thermal monitor
bcmsh on port status
(port LEDs may not working)
- Also initialized the number of cos queues in AS5712 to 8.
Else the interfaces are not coming up due to a lower default value of cos queues in AS5712.
Fix:
- Enable alpm settings in the platform config file for AS5712.
- With the current values of l2_mem_entries (163840) and l3_mem_entries (81920), the memory is not sufficient. Scale them down to the
values that work for ALPM in as5712 [l2_mem_entries = 32768, l3_mem_entries = 16384].
Signed-off-by: kiran.kella@broadcom.com
* Upgrade SAI to v1.2.4
* Add a new supported device accton as7116
* Add maintainer info for deb
* Add mk file for accton 7116
* fix some bug for sai 1.2.4
* fix git commit error for sdk and sai
* change sai and sdk deb name
* add config file for qos support
* initial commit
* Delete qos.json
* Delete buffers.json.j2
* Delete qos.json
* Delete buffers.json.j2
* Delete buffers.json.j2
* Delete qos.json
* add support for sai 1.3.0
* add qos and buffer file for device and add sensor driver for 7116
* change buffer template
* fix fan led bug
* add support for linux-4.9
* update device driver and update sdk and sai for support kernel 4.9
* Add kernel cmdline, tg3.short_preamble=1 tg3.bcm5718s_reset=1, to validate mdio to external PHY.
Signed-off-by: roy_lee <roy_lee@accton.com>
* Push submodule, sonic-linux-kernel, to patch of tg3 short_preamble.
Signed-off-by: roy_lee <roy_lee@accton.com>
* Restore to former version, for this platform is not maintained by Accton.
Signed-off-by: roy_lee <roy_lee@accton.com>
* Unify qos config with qos_config.j2 template
Signed-off-by: Wenda <wenni@microsoft.com>
* Change 7050 to use qos config template
Signed-off-by: Wenda <wenni@microsoft.com>
modified: device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/qos.json.j2
modified: device/arista/x86_64-arista_7050_qx32s/Arista-7050-QX-32S/qos.json.j2
* Change a7060, a7260, s6000, s6100, z9100 to use qos config template
Signed-off-by: Wenda <wenni@microsoft.com>
* Change mlnx devices to use qos config template
Signed-off-by: Wenda <wenni@microsoft.com>
modified: ../../../mellanox/x86_64-mlnx_msn2100-r0/ACS-MSN2100/qos.json.j2
modified: ../../../mellanox/x86_64-mlnx_msn2410-r0/ACS-MSN2410/qos.json.j2
modified: ../../../mellanox/x86_64-mlnx_msn2700-r0/ACS-MSN2700/qos.json.j2
modified: ../../../mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/qos.json.j2
* Change barefoot devices to use qos config template
Signed-off-by: Wenda <wenni@microsoft.com>
modified: barefoot/x86_64-accton_wedge100bf_32x-r0/montara/qos.json.j2
modified: barefoot/x86_64-accton_wedge100bf_65x-r0/mavericks/qos.json.j2
* Change accton as7212 to use qos config template
Signed-off-by: Wenda <wenni@microsoft.com>
modified: accton/x86_64-accton_as7212_54x-r0/AS7212-54x/qos.json.j2
* Apply PORT_QOS_MAP to active ports only
Signed-off-by: Wenda <wenni@microsoft.com>
* Update qos config test with qos_config.j2 template
Signed-off-by: Wenda <wenni@microsoft.com>
* Update sample output of qos-dell6100.json
Signed-off-by: Wenda <wenni@microsoft.com>
* Remove generating the default port name and index list, i.e., remove the generate_port_lists macro, because PORT is always defined
Signed-off-by: Wenda <wenni@microsoft.com>
* Include pfc_to_pg_map according to platform asic type obtained from
/etc/sonic/sonic_version.yml rather than specifying per hwsku
Signed-off-by: Wenda Ni <wenni@microsoft.com>
* Customize TC_TO_PRIORITY_GROUP_MAP and
PFC_PRIORITY_TO_PRIORITY_GROUP_MAP for barefoot
Signed-off-by: Wenda <wenni@microsoft.com>
* Unify PFC_PRIORITY_TO_PRIORITY_GROUP_MAP: remove "0":"0", "1":"1" as
these two pgs do not generate PFC frames.
Signed-off-by: Wenda <wenni@microsoft.com>
* [updategraph] add support to use preset config instead of default minigraph
* Fix variable case
* Remove default minigraph case
* Remove default minigraphs and add default_sku files
* Upgrade SAI to v1.2.4
* Add a new supported device accton as7116
* Add maintainer info for deb
* Add mk file for accton 7116
* fix some bug for sai 1.2.4
* fix git commit error for sdk and sai
* change sai and sdk deb name
* add config file for qos support
* initial commit
* Delete qos.json
* Delete buffers.json.j2
* Delete qos.json
* Delete buffers.json.j2
* Delete buffers.json.j2
* Delete qos.json
* add support for sai 1.3.0
* add qos and buffer file for device and add sensor driver for 7116
* change buffer template
* Upgrade SAI to v1.2.4
* Add a new supported device accton as7116
* Add maintainer info for deb
* Add mk file for accton 7116
* fix some bug for sai 1.2.4
* fix git commit error for sdk and sai
* change sai and sdk deb name
* add config file for qos support
* initial commit
* Delete qos.json
* Delete buffers.json.j2
* Delete qos.json
* Delete buffers.json.j2
* Delete buffers.json.j2
* Delete qos.json
* add support for sai 1.3.0
* First part of skipping not used port for qos configuration
* Use active ports only to set QoS parameters for 6100
* Add a test for qos.json.j2
* Add a test for Dell S6100 buffers.json template
* Update submodulre
Revise kernel driver to duplicate nodes for support of lm-sensors, at fan and PSU.
Update sfputil.py to to fit new SfpUtil prototype.
Signed-off-by: roylee123 <roy_lee@accton.com>