-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[platform]: update mitac platform drivers to support stretch. #1983
Conversation
Signed-off-by: Stane Shieh <[email protected]>
retest this please |
eval sonic_version=$(cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" ") | ||
if [ -f /host/image-$sonic_version/platform/firsttime ]; then | ||
update-rc.d xcvr_servd defaults >/dev/null | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be moved into postinst script, it should not be in the init script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will move this to postinst.
what are those deb files? are they vanilla debian packages? what are they used for? we need either download from the debian repo directly, or build from source. We cannot directly check-in the binary. |
what is sys-servd? we do not accept binary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as comments
@@ -188,6 +204,7 @@ load_i2c_dev_modules () { | |||
case "$1" in | |||
start) | |||
echo -n "Setting up board... " | |||
depmod -a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depmod -a should not be in init script, it should be postinst for package installation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
postinst will automatically add depmod -a
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We create an environment to test reboot 1000 times. If we don't add "depmod -a" here, we will get a "libkmod: ERROR" message.
According to "https://books.google.com.tw/books?id=hG_bhCL4tQ8C&pg=PA417&lpg=PA417&dq=why+depmod+everytime&source=bl&ots=DPSB8IGh3M&sig=CU8KApYOLwEeTXYGYpI5LtDIQtY&hl=zh-TW&sa=X&ved=2ahUKEwjXhcuh9pjbAhXBU7wKHee9BQoQ6AEwBXoECAEQZg#v=onepage&q=why%20depmod%20everytime&f=false", "depmod -a" should run every boot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot see the book. depmod should not be in init script, it should be only run during package installation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please go to the directory in ${sonic}/platform/broadcom/ and execute following command
grep -nri --exclude-dir=debian --exclude=*.[ch] "depmod -a" *
You can see not every vendor runs "depmod -a" once during package installation. Some vendors run "depmod -a" during every boot via *.py which is executed by *.service of systemd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modeles.dep does not need to be re-created every boot. we need to re-build them when we introduce new kernel moduels into the image. essentially the package installation time. As you can see, not all vendors are doing the right thing, we will correct them one-by-one, and we can discuss this in the coming community meeting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove "depmod -a" from init script.
@@ -21,7 +21,7 @@ | |||
#test-binary = | |||
#test-timeout = | |||
|
|||
watchdog-device = /dev/watchdog | |||
watchdog-device = /dev/watchdog5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain what does the watchdog provides you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for watchdog service, you can add watchdog into pmon docker and do something similiar as fancontrol service, if the platform device has a watchdog configuration file, then we can start the watchdog service inside the pmon docker. will this work for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may work for everyone, but we have no plan to modify any existed docker in SONiC.
For watchdog service, the general watchdog of the Linux operating system can meet our requirement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the right place to add watchdog service is pmon docker, we do not have plan to add it in the base image.
|
||
override_dh_auto_build: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using override semantic is better, this is a standard Debian rules file.
check example here.
https://github.com/Azure/sonic-platform-modules-s6000/blob/master/debian/rules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will keep using override semantic as you said.
@@ -13,6 +13,11 @@ | |||
|
|||
case "$1" in | |||
start) | |||
eval sonic_version=$(cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" ") | |||
if [ -f /host/image-$sonic_version/platform/firsttime ]; then | |||
update-rc.d xcvr_servd defaults >/dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see xcvr_servd in the repository. what does it do? Is it same as sonic xrcvd? https://github.com/Azure/sonic-platform-daemons/tree/master/sonic-xcvrd/scripts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a binary daemon and different from SONiC's xrcvd. The xcvr_servd will execute several initial processes whenever transceiver plug-in, otherwise the transceiver cannot work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is open source project, we cannot have binaries to be checked-in. xrcvd does what you say, it detect the transceiver plug-in plug-out event and does something. if it miss functions you plan to add to you platform, it is the right place to add. Not submitting binary.
The acpi-support-base_0.142-8_all.deb, acpi_1.7-1+b1_amd64.deb and acpid_2.0.28-1+b1_amd64.deb are used for receiving the interrupt signal that comes from transceiver. We have a daemon which is called "xcvr_servd" who executes several initial processes whenever transceiver plug-in, otherwise the transceiver cannot work. These debian packages were committed to SONiC via the submodule of MiTAC since this February, but it seems that SONiC cannot accept them after you incorporate the submodule of MiTAC into the repo of SONiC. |
can you help to explain why acpi is related to transceiver interrupt. We can put bc into pmon docker, but you need to put the fan control script into pmon docker as well. for watchdog, please see my comments above, it needs to be in pmon docker. it is the right place. acpi, bc, watchdog is not vendor-specific debian packages, we can install them into, but we need to use right mechanism. feel free to drop me email [email protected], we can follow-up. |
Signed-off-by: Stane Shieh <[email protected]>
… of i2c modules. Signed-off-by: Stane Shieh <[email protected]>
Signed-off-by: Stane Shieh <[email protected]>
The submodule update includes the following commits ac3103a Add missing neighbor resolution for MPLS route programming (sonic-net#1968) bfba0ad [vlanmgr]Fix for STATE_DB port check logic (sonic-net#1980) 9ef2ba4 Update VLAN removal code to work with 5.10 kernel and new 41fb26c Handle setting unknown mux state (sonic-net#1984) ac09bde Increase timeout for VS tests (sonic-net#1988) da8a43e Check if appl DB exists before deleting (sonic-net#1983) 553d75a Change tunnel orch order (sonic-net#1977) 7444e96 Add rekey period in macsec mgr (sonic-net#1958) d95823d [Buffermgr]Graceful handling of buffer model change (sonic-net#1956) b0aa6a0 EVPN VxLAN enhancement to support P2MP tunnel based programming for L 85bdf54 Fix the option missing in kernel config issue (sonic-net#1973) 6b15584 Orchagent validates mirror session queue parameter against maximum va fc9ffb9 [copp] Add ISIS, LDP and micro-BFD trap types to CoPP manager (sonic-net#1890) 452cbc1 [macsecorch]: Add IPG adjusting for MACsec gearbox model (sonic-net#1925) Signed-off-by: Sudharsan Dhamal Gopalarathnam <[email protected]>
The submodule update includes the following commits ac3103a Add missing neighbor resolution for MPLS route programming (#1968) bfba0ad [vlanmgr]Fix for STATE_DB port check logic (#1980) 9ef2ba4 Update VLAN removal code to work with 5.10 kernel and new 41fb26c Handle setting unknown mux state (#1984) ac09bde Increase timeout for VS tests (#1988) da8a43e Check if appl DB exists before deleting (#1983) 553d75a Change tunnel orch order (#1977) 7444e96 Add rekey period in macsec mgr (#1958) d95823d [Buffermgr]Graceful handling of buffer model change (#1956) b0aa6a0 EVPN VxLAN enhancement to support P2MP tunnel based programming for L 85bdf54 Fix the option missing in kernel config issue (#1973) 6b15584 Orchagent validates mirror session queue parameter against maximum va fc9ffb9 [copp] Add ISIS, LDP and micro-BFD trap types to CoPP manager (#1890) 452cbc1 [macsecorch]: Add IPG adjusting for MACsec gearbox model (#1925) Signed-off-by: Sudharsan Dhamal Gopalarathnam <[email protected]>
``` 5f8ebfa (HEAD, origin/master, origin/HEAD, master) [AclOrch] move ACL counters to flex counter infrastructure (sonic-net#1943) 8119ec0 [bfdorch] Orchagent support hardware BFD (sonic-net#1883) 15074ac [sonic-swss]:enable unconfiguring PFC on last TC on a port (sonic-net#1962) 05c7c05 [Mux orch] set default as standby, change mux orch priority (sonic-net#2010) fe5b2a9 [pytest]: Ignore errors deleting host ifs (sonic-net#2005) 70da9af [ci]: use native arm64 and armhf pool (sonic-net#2013) e14a071 [qos] Add EXP to TC map support (sonic-net#1954) c91a7f2 [switchorch] Implement VXLAN src port range feature (sonic-net#1959) b20f0f4 Gcov for swss daemon (sonic-net#1737) 01c243a [CRM][MPLS] Fix the mpls nexthop CRM attribute (sonic-net#2008) 8448a60 [vs tests]Migrating sonic-swss tests to use hwsku instead of fakeplatform (sonic-net#1978) faa26db Fix random failure in PR/CI build. (sonic-net#2006) e03edb6 Allow interface type value none (sonic-net#1991) 71b9650 [orchagent] Fix group name of port-buffer-drop in flexcounterorch.cpp (sonic-net#1967) facdef5 [VS test] Skip flaky virtual chassis test (sonic-net#2004) 8261c1f [pytest]: Increase timeout when checking services (sonic-net#2000) 67278be [teammgrd]: Handle LAGs cleanup gracefully on Warm/Fast reboot. (sonic-net#1934) e92c1df Enable FEC statistics collection for Ethernet ports (sonic-net#1994) 9f30ca1 VxLAN Tunnel Counters and Rates implementation (sonic-net#1859) ac3103a Add missing neighbor resolution for MPLS route programming (sonic-net#1968) bfba0ad [vlanmgr]Fix for STATE_DB port check logic (sonic-net#1980) 9ef2ba4 [vlanmgr]: Update VLAN removal code to work with 5.10 kernel and newer iproute2 versions (sonic-net#1970) 41fb26c [Mux orch] Handle setting unknown mux state (sonic-net#1984) ac09bde [azp]: Increase timeout for VS tests (sonic-net#1988) da8a43e [pytest]: Check if appl DB exists before deleting (sonic-net#1983) 553d75a [tunnel decap] Change tunnel orch order (sonic-net#1977) 7444e96 [macsecmgr]: Add rekey period in macsec mgr (sonic-net#1958) d95823d [Buffermgr]Graceful handling of buffer model change (sonic-net#1956) b0aa6a0 EVPN VxLAN enhancement to support P2MP tunnel based programming for Layer2 extension (sonic-net#1858) 85bdf54 Fix the option missing in kernel config issue (sonic-net#1973) 6b15584 Orchagent validates mirror session queue parameter against maximum value from SAI (sonic-net#1957) fc9ffb9 [copp] Add ISIS, LDP and micro-BFD trap types to CoPP manager (sonic-net#1890) 452cbc1 [macsecorch]: Add IPG adjusting for MACsec gearbox model (sonic-net#1925) ``` Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Vivek Reddy Karri <[email protected]> 30f5dd6 Update the example for pfcwd start command (sonic-net#1984) 9e30871 [Auto Techsupport] Event driven Techsupport Bug Fixes (sonic-net#1986) fbd565d Fix wrong help message for cable length setting (sonic-net#1978) b3a5052 [GCU] Using simulated config instead of target config when validating replace operation in NoDependencyMoveValidator (sonic-net#1987) 35cb524 [GCU] Copying config_db before callding sonic_yang.loadData (sonic-net#1983) a98858d [GCU] Different apply-patch runs should produce same sorted steps (sonic-net#1988) 8c81ae3 [breakout] Fix the check when port is not present in BREAKOUT_CFG table (sonic-net#1765) bc8fe7c [doc][DPB] Update DPB related interface breakout command Info (sonic-net#1438) 1a2a9a3 [config] Fix 'config reload -l' command to get filename by default (sonic-net#1611) ed2fa69 [debug dump util] FDB debug dump util changes (sonic-net#1968) 3b642c9 [GCU] Loading yang-models only once (sonic-net#1981) bb56fc2 Update swss_ready check to check per namespace swss service (sonic-net#1974) 4f39f9f [GCU] Moving PatchSorter unit-test to json file to make it easier to read/maintain (sonic-net#1977) 1a75870 [CLI][Help string] Changed the show command help text to be more consistent with each other. 818dcbf [GCU] Implementing DryRun by printing patch-sorter steps/imitating config_db (sonic-net#1973)
4236bc4 [config reload] Fixing config reload when timer based delayed services are disabled (#1967) d2514e4 [GCU] Different apply-patch runs should produce same sorted steps (#1988) 2878adb [GCU] Using simulated config instead of target config when validating replace operation in NoDependencyMoveValidator (#1987) fb8ca98 [GCU] Loading yang-models only once (#1981) f88ee92 [GCU] Copying config_db before callding sonic_yang.loadData (#1983) 9ed0e91 [GCU] Implementing DryRun by printing patch-sorter steps/imitating config_db (#1973) b36b5e3 [GCU] Moving PatchSorter unit-test to json file to make it easier to read/maintain (#1977) c0fa28b [generic-config-updater] Improving CreateOnly validator and marking /LOOPBACK_INTERFACE/LOOPBACK#/vrf_name as create-only (#1969) 0559d04 [generic-config-updater] Adding non-strict mode (#1929) b07f477 [debug dump util] FDB debug dump util changes (#1968) 6d8757a [warm/fast-reboot] Fix kexec portion to support platforms based on Device Tree (#1966) cc1409e [Auto Techsupport] Event driven Techsupport Bug Fixes (#1986) 6c48bd5 Fix wrong help message for cable length setting (#1978) c0bbbe3 [breakout] Fix the check when port is not present in BREAKOUT_CFG table (#1765) 5bb8cad [doc][DPB] Update DPB related interface breakout command Info (#1438) e6fd990 [config] Fix 'config reload -l' command to get filename by default (#1611) bd8f7bb Update swss_ready check to check per namespace swss service (#1974) 5439f94 [soft-reboot] Add support for platforms based on Device Tree (#1963) 7c5810a [config] Add portchannel support for static route (#1857) 7cb6a1b preserve old order for config reload (#1964) 20bddbd [Auto-Techsupport] Issues related to Multiple Cores crashing handled (#1948)
*Add a new helper method for deleting appl DBs, and use it anytime appl DB needs to be deleted Signed-off-by: Lawrence Lee <[email protected]>
…t#1983) #### What I did Adding unit-test for cases where `PatchSorter.sort` is called to update config that has tables without YANG. This would sometimes throw the error ``` KeyError: 'NameOfTableWithoutYang' ``` This error happened because `find_ref_paths` would remove tables without yang as a side-effect. Earlier this was fixed by cropping tables without yang models from current and target configs. That fix had 2 issues: - It is not addressing the real problem which is cropping the config as a side effect to `find_ref_paths` - If the move generated by the inner logic of `PatchSorter` was to replace whole config, it would result in replacing whole config with the config with cropped non-yang tables #### How I did it - Fixing `find_ref_paths` to not crop the given config as a side-effect - Added a unit-test for that - Revert the change to crop current config and target config in `PatchSorter.sort` - Added a unit-test to verify replace whole config move does not result unintentionally in removing tables without yang - Added unit-test to verify calling `PatchSorter.sort` on a config with non-yang tables does not result in the exception: ``` KeyError: 'NameOfTableWithoutYang' ``` #### How to verify it unit-tests #### Previous command output (if the output of a command-line utility has changed) #### New command output (if the output of a command-line utility has changed)
Signed-off-by: Stane Shieh [email protected]
- What I did
Update ly1200 to support stretch
- How I did it
Modify driver code.
- How to verify it
Upload DUT to make sure all modules are running correctly.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)