[csl-tx-scheduler] simplify HandleSentFrame() implementation - #13390
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request simplifies the CslTxScheduler class by removing the overloaded HandleSentFrame helper method and merging its logic directly into the main HandleSentFrame method. It also refactors the state management of mCslTxNeighbor to be cleared at the end of the operation rather than at the beginning. There are no review comments, and I have no feedback to provide.
Library files
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13390 +/- ##
==========================================
+ Coverage 68.82% 73.73% +4.91%
==========================================
Files 711 712 +1
Lines 98565 97385 -1180
==========================================
+ Hits 67835 71808 +3973
+ Misses 30730 25577 -5153
🚀 New features to boost your workflow:
|
1905dc6 to
acc8d32
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the CslTxScheduler class to simplify frame transmission handling. Specifically, it merges the two overloaded HandleSentFrame methods into a single method, directly utilizing mCslTxNeighbor and moving the cleanup and rescheduling logic to the exit block. Additionally, it updates CslTxScheduler::Update to exit early when there is no active CSL TX message and improves code readability with additional comments and simplified checks. There are no review comments to evaluate, and I have no additional feedback to provide on these changes.
This commit simplifies `CslTxScheduler::HandleSentFrame()` by inlining the helper method directly into the main callback. Since `mCslTxNeighbor` is already a member variable, passing it as a reference parameter to a helper method was unnecessary. Additionally, clearing of `mCslTxMessage` and `mCslTxNeighbor` is moved to the `exit:` block after calling `HandleSentFrameToCslNeighbor()`. Keeping `mCslTxMessage` non-null while `HandleSentFrameToCslNeighbor()` runs ensures that nested calls to `CslTxScheduler::Update()` do not trigger a premature `RescheduleCslTx()` while the TX done callback is in progress. All state cleanup and rescheduling now occur cleanly at `exit:`.
acc8d32 to
cb2baf0
Compare
This commit simplifies
CslTxScheduler::HandleSentFrame()by inlining the helper method directly into the main callback. SincemCslTxNeighboris already a member variable, passing it as a reference parameter to a helper method was unnecessary.Additionally, clearing of
mCslTxMessageandmCslTxNeighboris moved to theexit:block after callingHandleSentFrameToCslNeighbor(). KeepingmCslTxMessagenon-null whileHandleSentFrameToCslNeighbor()runs ensures that nested calls toCslTxScheduler::Update()do not trigger a prematureRescheduleCslTx()while the TX done callback is in progress. All state cleanup and rescheduling now occur cleanly atexit:.