Add cavium platform port configuration#22
Conversation
|
|
||
| # Install Cavium Host Interface Driver | ||
| - block: | ||
| - name: Rmmod for driver |
There was a problem hiding this comment.
modprobe should be integrated into xp80PcieEndpoint deb packet, pre-install script
| state=present | ||
| force=yes | ||
|
|
||
| - name: Create a list of module dependencies |
There was a problem hiding this comment.
depmod -a should be integrated into xp80PcieEndpoint, post-install script.
There was a problem hiding this comment.
yes, will change in next commit
|
|
||
| - name: Setup port configuration file | ||
| become: yes | ||
| shell: ln -s -f /etc/ssw/{{ sonic_hwsku }}/port_config_{{ sonic_portsku }}.ini /etc/ssw/{{ sonic_hwsku }}/port_config.ini |
There was a problem hiding this comment.
Who need this? Can it handle the path inside a container? Or just use original path?
#Closed
There was a problem hiding this comment.
We use sonic_portsku in inventory to setup box in coresponding mode( i.e 40G):
switch-1 ansible_host=10.7.2.84 sonic_version=v2 sonic_portsku=32x40 sonic_hwsku=AS7512, and have corresponding port maping files.
In SONic application just port_config.ini is used, so for this purpose symlink is created.
There was a problem hiding this comment.
I don't see sonic_portsku in inventory. Is it true that we can get the unique 'sonic_portsku' from 'sonic_hwsku'? Is it possible to handle all the complexity inside the container?
#Closed
There was a problem hiding this comment.
I did not push changes to inventory yet. Afraid to broke deployment without -l (till all our changes will be integrated). Will test inside container.
There was a problem hiding this comment.
Change orchagent ssw volumes to rw again ( no need 'w' sorry for inconvenience as it was done some time ago). Acconrding to @lguohan comment that it's better to create the symbol link outside the container. It`s really better to create symlink in "source" file system for consistency.
There was a problem hiding this comment.
I just saw that in main.yaml we have the following task - that already copy the folder we needed
- name: Copy SSW files.
copy: directory_mode=0755
src=ssw/{{ sonic_hwsku }}
dest=/etc/ssw
So we just create one more symlink under our platform folder , and do not even change orchagent volumes.
#Closed
There was a problem hiding this comment.
Let me clarify my points. I guess your requirements are:
- In the orchagent container, you will need a file "port_config.ini", and you will never read the files "port_config_*.ini" directly
- The content of the file "port_config.ini" is determined during deployment, and never changed on the switch box.
Since the requirement is different from all other vendors. Suggest not to follow the "Copy SSW files".
To keep it very clean and consistent, suggest you not put source files in ansible/roles/sonicv2/files/ssw/. Instead, create a 'copy' task in sonic-cavm.yml, and the src parameter will be determined based on the port sku variable. So you don't need to copy many files to switch, don't need to create a symlink at all. Below is a sample (please test before using:))
- name: Copy the port config file based on port sku
copy:
src: /etc/ssw_extra/{{ sonic_hwsku }}/port_config_{{ sonic_portsku }}.ini
dest: /etc/ssw/{{ sonic_hwsku }}/port_config.ini
In reply to: 83538433 [](ancestors = 83538433)
ansible/group_vars/sonic/vars
Outdated
|
|
||
| orchagent_docker_volumes_dict: | ||
| "/etc/ssw/:/etc/ssw/:ro": | ||
| "/etc/ssw/:/etc/ssw/:rw": |
There was a problem hiding this comment.
ro is enough. #Closed
#Closed
There was a problem hiding this comment.
rw is used to create symlink mentioned above.
There was a problem hiding this comment.
it's better to create the symbol link outside the container and map to container using ro.
ansible/group_vars/sonic/vars
Outdated
| ## 2. https://groups.google.com/forum/#!msg/ansible-project/M-FNUK9Wz98/gH63Ka4hDAAJ | ||
|
|
||
| syncd_docker_volumes_dict: | ||
| "/etc/ssw/:/etc/ssw/:ro": |
There was a problem hiding this comment.
Who need this? #Closed
#Closed
There was a problem hiding this comment.
syncd use this - /etc/ssw/{{sonic_hwsku}}/profile.ini
There was a problem hiding this comment.
(Sorry, I should reply this thread)
Have you tested moving them inside container instead of in host? https://github.com/Azure/sonic-mgmt/blob/master/ansible/roles/sonicv2/tasks/quagga.yml has an example (see the 'block'). Roughly speaking, ansible can run any task directly in the container.
We try to move ssw directory into specific containers in future. We don't want to add more complexity if we have workaround. In this case, BRCM, MLNX don't need the new mounting point.
Sorry for the inconvenience. #Closed
#Closed
There was a problem hiding this comment.
yes, will change in next commit.
Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com>
Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com>
| # Setup port SKU | ||
| - name: Setup port configuration file | ||
| become: yes | ||
| template: src=etc/ssw/{{ sonic_hwsku }}/profile.ini.j2 |
There was a problem hiding this comment.
Missing this template file in the commit? Is the content static or dynamic? Can we build it into syncd_cavm docker image, so we can keep the syncd_docker_volumes_dict as simple as possible, also platform consistent. #Closed
#Closed
There was a problem hiding this comment.
No, it is already merged in previous commit :) Here 49eee2d.
There was a problem hiding this comment.
Thanks! I saw them. #Closed
#Closed
There was a problem hiding this comment.
By ansible template we can dynamically generate profile for different port speed. Is it so bad to share /etc/ssw to one more container?
There was a problem hiding this comment.
We try to move ssw directory into specific containers in future. We don't want to add more complexity if we have workaround.
In this case, at least BRCM, MLNX don't need the new mounting point. #Closed
#Closed
There was a problem hiding this comment.
Done. Now it built into syncd_cavm docker image.
Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com>
|
@lguohan @qiluo-msft Do I miss sth to correct? |
|
Let me clarify my points. I guess your requirements are:
Since the requirement is different from all other vendors. Suggest not to follow the "Copy SSW files". To keep it very clean and consistent, suggest you not put source files in ansible/roles/sonicv2/files/ssw/. Instead, create a 'copy' task in sonic-cavm.yml, and the src parameter will be determined based on the port sku variable. So you don't need to copy many files to switch, don't need to create a symlink at all. Below is a sample (please test before using:)) #Closed |
Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com>
|
@qiluo-msft please review. |
|
Thanks @NStetskovych! One more question: can we remove ansible/roles/sonicv2/files/ssw/XP-SIM/*? I guess they are not used. |
|
we used it for our 'virtual' SONiC. But here we can remove. Will remove. |
Signed-off-by: Nadiya.Stetskovych <Nadiya.Stetskovych@cavium.com>
Merge sonic-mgmt 202405 25_01_24
Changes: Update submodule branch to 202012 [sonic-linkmgrd][202012] submodule update a8ddff5 Jing Zhang Fri Feb 25 11:38:28 2022 Incrementing tolerance on mux state inconsistency (sonic-net#27) a3f78a3 Jing Zhang Thu Feb 17 17:23:56 2022 Update log level for mux probing and mux state chance (sonic-net#23) 05156fb Jing Zhang Thu Feb 17 17:21:01 2022 Handle xcvrd crashing scenarios (sonic-net#22) 74529ef Longxiang Lyu Mon Feb 14 13:26:07 2022 [make] Enable make extra includes (sonic-net#24) sign-off: Jing Zhang zhangjing@microsoft.com
Why I did it Advance sonic-dhcp-relay submodule head on 202012 branch How I did it Added the following commits: a4b15d8 jcaiMR Thu Dec 29 14:18:28 2022 +0800 fix relay-reply dhcpv6 packet counter issue (sonic-net#29) 677543f jcaiMR Sat Dec 17 00:24:32 2022 +0800 fix handleSwssNotification crash in dhcp6relay (sonic-net#28) ed86546 jcaiMR Wed Dec 14 14:08:58 2022 +0800 Fix multiple vlan issue (sonic-net#27) 5ec1f5b Vivek Thu Dec 8 09:44:15 2022 -0800 Made the Error log informative (sonic-net#22) 063d41b jcaiMR Wed Nov 30 14:41:53 2022 +0800 disable cfg dynamic change (sonic-net#25) d4a51f6 kellyyeh Tue Jan 31 18:09:08 2023 -0800 Add unittest infrastructure (sonic-net#5) (sonic-net#31) How to verify it Ran full dhcpv6 test suite on lab device
* 9d651b9 2019-01-30 | Add debug messages for bgp route advertisement (sonic-net#30) (HEAD, origin/debian/0.99.24.1, origin/HEAD) [pavel-shirshov] * 4b7825c 2018-10-12 | [security] Fix double free of unknown attribute (Quagga-2018-1114) [zhenggen-xu] * 3ede63f 2018-10-10 | [security] debug print of received NOTIFY data can over-read msg array (Quagga-2018-1550) [zhenggen-xu] * 3c64a8c 2018-10-10 | [security] Fix infinite loop on certain invalid OPEN messages (Quagga-2018-1975) [zhenggen-xu] * 3348a33 2018-09-12 | CLI for BGP-GR restart-timer (sonic-net#24) [Rodny Molina] * a0630b7 2018-08-12 | Add support of custom ip dscp value for bgp sessions (sonic-net#22) [pavel-shirshov] Signed-off-by: Guohan Lu <gulv@microsoft.com>
advance dhcp relay for 202211 4bf1868 - (HEAD, origin/master, origin/HEAD, master) fix relay-reply dhcpv6 packet counter issue (add support for a7050 qx32 platform sonic-net#29) (2 weeks ago) [jcaiMR] 9b30690 - fix handleSwssNotification crash in dhcp6relay (Add libnl-nf-3-200 to docker-team sonic-net#28) (4 weeks ago) [jcaiMR] 047afb7 - Fix multiple vlan issue (Failure trying to run: chroot /sonic-buildimage/fsroot mount -t proc proc /proc sonic-net#27) (4 weeks ago) [jcaiMR] ff6bec3 - Made the Error log informative (add python-tenjin as build dependency for p4-switch sonic-net#22) (5 weeks ago) [Vivek] 2fbe729 - disable cfg dynamic change (p4: fix build dependency for python-p4c-bm sonic-net#25) (6 weeks ago) [jcaiMR] 13d0805 - Use github code scanning instead of LGTM (Removed sx-libnl from Mellanox containers dependencies. sonic-net#26) (6 weeks ago) [Liu Shilong] 1e846f6 - Fix packet range check for relay-reply packets (update sonic-swss and p4-switch submodule to fix docker sonic p4 bug sonic-net#21) (7 weeks ago) [kellyyeh] 4d19e13 - Add unittest infrastructure (Cavium customization for docker containers sonic-net#5) (8 weeks ago) [kellyyeh] 7f4fdab - fix packet range check issue (Makefile: add build dependency for python-p4c-bm sonic-net#20) (9 weeks ago) [jcaiMR] 257ecdf - Add client packet UDP header length check (change port_config.ini directory for s6000 sonic-net#19) (2 months ago) [kellyyeh]
* Update to Linux kernel 5.10.218 Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * [202311] [5.10.218] Integrate HW-MGMT 7.0030.4104 Changes (sonic-net#22) * Integrate HW-MGMT 7.0030.4103 Changes ## Patch List * 0098-2-Revert-mlxsw-i2c-Fix-chunk-size-setting.patch : * 0241-DS-mlxsw-core_linecards-Disable-firmware-bundling-ma.patch : * 0244-mlxsw-Use-u16-for-local_port-field-instead-of-u8.patch : torvalds/linux@c934757d9000 * 0245-mlxsw-minimal-Change-type-for-local-port.patch : * 0246-mlxsw-i2c-Fix-chunk-size-setting-in-output-mailbox-b.patch : * 0257-mlxsw-core_hwmon-Align-modules-label-name-assignment.patch : * 0259-mlxsw-i2c-Limit-single-transaction-buffer-size.patch : * 0260-mlxsw-reg-Limit-MTBR-register-records-buffer-by-one-.patch : * 0269-dt-bindings-trivial-devices-Add-infineon-xdpe1a2g7.patch : * 0270-leds-mlxreg-Add-support-for-new-flavour-of-capabilit.patch : * 0271-leds-mlxreg-Remove-code-for-amber-LED-colour.patch : * 0272-platform_data-mlxreg-Add-capability-bit-and-mask-fie.patch : * 0273-hwmon-mlxreg-fan-Add-support-for-new-flavour-of-capa.patch : * 0274-hwmon-mlxreg-fan-Extend-number-of-supporetd-fans.patch : * 0281-platform-mellanox-Introduce-support-for-switches-equ.patch : * 0282-mellanox-Relocate-mlx-platform-driver.patch : * 0290-platform-mellanox-mlxreg-hotplug-Add-support-for-new.patch : * 0291-platform-mellanox-mlx-platform-Change-register-name.patch : * 0292-platform-mellanox-mlx-platform-Add-support-for-new-X.patch : * 0294-mlxsw-i2c-Downstream-Add-retry-mechanism-for-failed-.patch : * 0295-mlxsw-i2c-DBG-Add-debug-output-for-failed-transactio.patch : * 0296-platform-mellanox-indicate-deferred-I2C-bus-creation.patch : * 0298-platform-mellanox-mlx-platform-Fix-FAN-tacho-reading.patch : * Integrate HW-MGMT 7.0030.4104 Changes * [sflow]: Enable linux capabilities on sflow container for kernel 5.10.218 compatibility In 5.10.218, Kernel mandates the process to have SYS_ADMIN/NET_ADMIN capability to join events/packets multicast group respectively PSAMPLE used packets and DROPMON uses events Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> Signed-off-by: Vivek Reddy <vkarri@nvidia.com> Co-authored-by: Vivek <vivekreddykarri98@gmail.com>
Port mapping for cavium sonic deployment