[Mellanox] Re-initialize SFP object when detecting a new SFP insertion#31
Closed
Junchao-Mellanox wants to merge 1 commit intomasterfrom
Closed
[Mellanox] Re-initialize SFP object when detecting a new SFP insertion#31Junchao-Mellanox wants to merge 1 commit intomasterfrom
Junchao-Mellanox wants to merge 1 commit intomasterfrom
Conversation
keboliu
reviewed
Oct 16, 2020
| CPU_MASK = PORT_TYPE_MASK & (PORT_TYPE_CPU << PORT_TYPE_OFFSET) | ||
|
|
||
| # parameters for SFP presence | ||
| SFP_STATUS_INSERTED = '1' |
Collaborator
There was a problem hiding this comment.
is it possible to reuse the "presence" status?
Owner
Author
There was a problem hiding this comment.
could u share more detail? Do u mean use the get_presence method?
Owner
Author
There was a problem hiding this comment.
In get_presence, it uses ethtool to get the SFP presence status which is another process. Not sure how ethtool is implemented, but I suppose there might be risks that:
- We get the port insert event from select, but ethtool still "think" the port is absence. (Not sure what the flow is)
- As we tested before, ethtool has a performance issue
Based on that, I suppose we should directly use the status returned by the select, xcvrd also use it this way. Any suggestion?
keboliu
approved these changes
Oct 22, 2020
Owner
Author
Junchao-Mellanox
pushed a commit
that referenced
this pull request
Dec 14, 2020
This update brings in the following commits. 86c1108 Enable arm architecture to build in addition to amd64 (#37) 4acb2c3 fix bugs and enhance Transformer (#35) 49e5a22 ygot related enhancements and fixes (#34) 51224de Fix ietf yang search path for cvl schema builds (#32) 3c6cdb3 CVL Changes #8: 'must' and 'when' expression evaluation (#31) dabf231 CVL Changes #7: 'leafref' evaluation (#28) 6f9535f CVL Changes #6: Customized Xpath Engine integration (#27) 5e2466b DB-Layer fixes/enhancements (#26) 9a27302 CVL Changes #4: Implementation of new CVL APIs (#22) dbf1093 Translib support for authorization, yang versioning and Delete flag (#21) 80f369e CVL Changes #5: YParser enhancement (#23) 904ce18 CVL Changes #3: Multi-db instance support (#20) 9d24a34 CVL Changes #2: YValidator infra changes for evaluating xpath expression (#19) f3fc40f CVL Changes #1: Initial CVL code reorganization and common infra changes (#18) 4922601 Bulk and RPC API support in translib (#16) 1d730df RFC7895 yang module library implementation (#15)
Junchao-Mellanox
pushed a commit
that referenced
this pull request
Mar 29, 2022
f00efef Longxiang Lyu Wed Mar 16 09:12:46 2022 +0800 Add a command line option to store logs into a separate file (#41) ff2e67d Longxiang Lyu Tue Mar 15 09:10:59 2022 +0800 Add default port cable type (#39) ebbb4d8 Jing Zhang Mon Mar 14 15:41:11 2022 -0700 Prevent switching MUX to "Unknown" (#36) c779b8f Longxiang Lyu Thu Mar 10 21:35:11 2022 +0800 [nonfunctional] Use LinkProberStateMachineBase (#38) b9fedd0 Longxiang Lyu Wed Mar 9 13:03:58 2022 +0800 [NONFUNCTIONAL] Add LinkProberStateMachineBase (#37) bedd42b Longxiang Lyu Wed Mar 9 10:03:00 2022 +0800 Add .clang-format file to format code (#28) 9fe4fc6 Guohan Lu Thu Mar 3 17:51:43 2022 -0800 [doc]: add lgtm badge in README.md c1249d9 Longxiang Lyu Wed Mar 2 18:05:18 2022 +0800 Enable lgtm (#33) b8514c6 Longxiang Lyu Wed Mar 2 13:34:39 2022 +0800 Collect port cable type to use corresponding state machine (#31) 9b59ef9 Longxiang Lyu Wed Mar 2 07:19:33 2022 +0800 Improve make clean (#32)
Junchao-Mellanox
pushed a commit
that referenced
this pull request
Oct 18, 2022
* [BFN] Canceling PSU platform API calls on SIGTERM Signed-off-by: Andriy Kokhan <andriyx.kokhan@intel.com> * [BFN] Fixed SONiC fwutil exec time (#31) Signed-off-by: Taras Keryk <tarasx.keryk@intel.com> Signed-off-by: Andriy Kokhan <andriyx.kokhan@intel.com> Signed-off-by: Taras Keryk <tarasx.keryk@intel.com> Co-authored-by: Taras Keryk <tarasx.keryk@intel.com>
Junchao-Mellanox
pushed a commit
that referenced
this pull request
Mar 5, 2025
…sonic-net#21818) #### Why I did it src/dhcpmon ``` * 2519a88 - (HEAD -> 202411, origin/202411) Merge pull request #34 from yaqiangz/202411_dhcpmon_bootp (2 days ago) [Kumaresh Perumal] * 3e58f23 - Fix counting bootp packets by mistake (#31) (3 days ago) [Yaqiang Zhu] ``` #### How I did it #### How to verify it #### Description for the changelog
Junchao-Mellanox
pushed a commit
that referenced
this pull request
Mar 25, 2025
…tomatically (sonic-net#827) #### Why I did it src/sonic-linux-kernel ``` * ad3a9e0 - (HEAD -> 202412, origin/HEAD, origin/202412) [code sync] Merge code from sonic-net/sonic-linux-kernel:202411 to 202412 (#31) (23 hours ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
Junchao-Mellanox
pushed a commit
that referenced
this pull request
Mar 25, 2025
…omatically (sonic-net#844) #### Why I did it src/sonic-swss-common ``` * bdc743f - (HEAD -> 202412, origin/HEAD, origin/202412) [FC] remove FLEX_COUNTER_DELAY_STATUS_FIELD (sonic-net#982) (#31) (21 hours ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
Junchao-Mellanox
pushed a commit
that referenced
this pull request
May 7, 2025
…sonic-net#21780) #### Why I did it src/dhcpmon ``` * f6dfbe9 - (HEAD -> master, origin/master, origin/HEAD) Fix counting bootp packets by mistake (#31) (19 hours ago) [Yaqiang Zhu] ``` #### How I did it #### How to verify it #### Description for the changelog
Junchao-Mellanox
pushed a commit
that referenced
this pull request
Feb 25, 2026
…ly (sonic-net#25511) #### Why I did it src/sonic-bmp ``` * c4eeaeb - (HEAD -> master, origin/master, origin/HEAD) Merge pull request #31 from rustiqly/add-copilot-instructions (7 hours ago) [Lihua Yuan] * 95dcd1e - Add .github/copilot-instructions.md for AI-assisted development (4 days ago) [Rustiqly] ``` #### How I did it #### How to verify it #### Description for the changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- Why I did it
SFP object will be initialized to a certain type even if no SFP present. A case could be:
This PR fixes this issue.
- How I did it
When detecting a new SFP insertion, read its SFP type and DOM capability from EEPROM again.
- How to verify it
Manual test
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)