I see the media_settings tuning in APPL_DB:
root@cmp206-4:~# sonic-db-cli -n asic0 APPL_DB hgetall "PORT_TABLE:Ethernet96"
{'admin_status': 'up', 'alias': 'Ethernet13/1', 'asic_port_name': 'Eth96', 'core_id': '0', 'core_port_id': '13', 'description': 'ARISTA13T3:Ethernet1', 'fec': 'rs', 'index': '13', 'lanes': '40,41,42,43', 'mtu': '9100', 'num_voq': '8', 'pfc_asym': 'off', 'role': 'Ext', 'speed': '100000', 'tpid': '0x8100', 'oper_status': 'up', 'flap_count': '1', 'main': '0x4e,0x4e,0x53,0x4b', 'post1': '0xffffffea,0xffffffea,0xffffffea,0xffffffec', 'post2': '0x0,0x0,0x0,0x0', 'post3': '0x0,0x0,0x0,0x0', 'pre1':'0xfffffffb,0xfffffffb,0xfffffffb,0xfffffffb', 'pre2': '0x0,0x0,0x0,0x0', 'last_up_time': 'Fri Feb 28 23:16:47 2025'}
Now I no longer see the media_settings tuning on the ports:
root@cmp206-4:~# sonic-db-cli -n asic0 APPL_DB hgetall "PORT_TABLE:Ethernet96"
{'admin_status': 'up', 'alias': 'Ethernet13/1', 'asic_port_name': 'Eth96', 'core_id': '0', 'core_port_id': '13', 'description': 'ARISTA13T3:Ethernet1', 'fec': 'rs', 'index': '13', 'lanes': '40,41,42,43', 'mtu': '9100', 'num_voq': '8', 'pfc_asym': 'off', 'role': 'Ext', 'speed': '100000', 'tpid': '0x8100', 'oper_status': 'up', 'flap_count': '1', 'last_up_time': 'Fri Feb 28 23:56:34 2025'}
The
media_settings.jsontuning file is used on certain SKUs to apply L1 tuning to ports.E.G. https://github.com/sonic-net/sonic-buildimage/blob/master/device/arista/x86_64-arista_7800r3a_36d2_lc/media_settings.json
However that tuning seems to go away if the swss container is restarted.
Steps to reproduce:
I see the media_settings tuning in APPL_DB:
root@cmp206-4:~# sonic-db-cli -n asic0 APPL_DB hgetall "PORT_TABLE:Ethernet96"
{'admin_status': 'up', 'alias': 'Ethernet13/1', 'asic_port_name': 'Eth96', 'core_id': '0', 'core_port_id': '13', 'description': 'ARISTA13T3:Ethernet1', 'fec': 'rs', 'index': '13', 'lanes': '40,41,42,43', 'mtu': '9100', 'num_voq': '8', 'pfc_asym': 'off', 'role': 'Ext', 'speed': '100000', 'tpid': '0x8100', 'oper_status': 'up', 'flap_count': '1', 'main': '0x4e,0x4e,0x53,0x4b', 'post1': '0xffffffea,0xffffffea,0xffffffea,0xffffffec', 'post2': '0x0,0x0,0x0,0x0', 'post3': '0x0,0x0,0x0,0x0', 'pre1':'0xfffffffb,0xfffffffb,0xfffffffb,0xfffffffb', 'pre2': '0x0,0x0,0x0,0x0', 'last_up_time': 'Fri Feb 28 23:16:47 2025'}
Then I restarted the swss service or the swss0 docker:
systemctl restart swss@0.service
docker restart swss0
Now I no longer see the media_settings tuning on the ports:
root@cmp206-4:~# sonic-db-cli -n asic0 APPL_DB hgetall "PORT_TABLE:Ethernet96"
{'admin_status': 'up', 'alias': 'Ethernet13/1', 'asic_port_name': 'Eth96', 'core_id': '0', 'core_port_id': '13', 'description': 'ARISTA13T3:Ethernet1', 'fec': 'rs', 'index': '13', 'lanes': '40,41,42,43', 'mtu': '9100', 'num_voq': '8', 'pfc_asym': 'off', 'role': 'Ext', 'speed': '100000', 'tpid': '0x8100', 'oper_status': 'up', 'flap_count': '1', 'last_up_time': 'Fri Feb 28 23:56:34 2025'}
Note 1: Bringing the port down and up doesn't bring back the tuning values, however, restarting the pmon service will bring back the tuning values
systemctl restart pmon.serviceNote 2: If
auto_restart=enabledforswssthen an OA crash will be enough to reproduce this issue