sonic-net / sonic-platform-daemons

Platform module daemons for SONiC
Other
23 stars 152 forks source link

[xcvrd] Modify to support regular expression when parsing the key in media_settings.json #471

Closed DennisChiuEC closed 3 months ago

DennisChiuEC commented 6 months ago

Description

Let media_settings.json can use regular expression to match 'vendor key' or 'media key' when define a set of transceiver to use the same SI value.

Motivation and Context

Make the definition of SI value for a set of vendor or media can be more flexible

How Has This Been Tested?

root@sonic:~# cat /var/log/swss/swss.rec | grep preemphasis 2024-04-17.01:53:10.594465|PORT_TABLE:Ethernet0|SET|preemphasis:0x0c8418,0x0c8418,0x0c8418,0x0c8418 2024-04-17.01:53:11.827324|PORT_TABLE:Ethernet4|SET|preemphasis:0x0c8418,0x0c8418,0x0c8418,0x0c8418

Example of media_settings.json "GLOBAL_MEDIA_SETTINGS": { "1-32": { "VENDOR.*-PN.*": { "preemphasis": { "lane0": "0x0c8418", "lane1": "0x0c8418", "lane2": "0x0c8418", "lane3": "0x0c8418", "lane4": "0x0c8418" } } }

Additional Information (Optional)

prgeor commented 6 months ago

@DennisChiuEC Please add unit test

DennisChiuEC commented 6 months ago

OK, I will add the unit test case.

keboliu commented 5 months ago

@tshalvi would you please review?

longhuan-cisco commented 1 month ago

@prgeor could we add Request for 202405 Branch to cherry-pick this PR?

mihirpat1 commented 1 month ago

@bingwang-ms Can you please help to cherry-pick this to 202405?

mssonicbld commented 1 month ago

Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-platform-daemons/pull/537

longhuan-cisco commented 2 weeks ago

@prgeor

Could we also cherry-pick this PR to 202311?

PR https://github.com/sonic-net/sonic-platform-daemons/pull/533 (which was requested for 202311 cherry-pick) depends on the regular expression support introduced by this PR.

mihirpat1 commented 2 weeks ago

@prgeor

Could we also cherry-pick this PR to 202311?

PR #533 (which was requested for 202311 cherry-pick) depends on the regular expression support introduced by this PR.

@yxieca Can you please help to cherry pick this PR to 202311? MSFT ADO - 28898451

mssonicbld commented 2 weeks ago

Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-platform-daemons/pull/544

mihirpat1 commented 2 weeks ago

@prgeor

Could we also cherry-pick this PR to 202311?

PR #533 (which was requested for 202311 cherry-pick) depends on the regular expression support introduced by this PR.

@longhuan-cisco Can you please help to create a separate 202311 PR for PR#533 since the dependent PR#471 is now cherry-picked to 202311.

longhuan-cisco commented 2 weeks ago

@longhuan-cisco Can you please help to create a separate 202311 PR for PR#533 since the dependent PR#471 is now cherry-picked to 202311.

raised https://github.com/sonic-net/sonic-platform-daemons/pull/545 for it