Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wol] Extend wol to support sending magic pattern in udp payload #20523

Merged
merged 7 commits into from
Oct 18, 2024

Conversation

w1nda
Copy link
Member

@w1nda w1nda commented Oct 16, 2024

Why I did it

Although the magic pattern is fixed, we can send the magic pattern in UDP payload to leverage the benefits of UDP.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Add code to support sending payload in udp and provide CLI parameters for it.

How to verify it

Unit test and run tests in sonic-mgmt

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@w1nda w1nda requested a review from lguohan as a code owner October 16, 2024 11:40
@w1nda w1nda requested review from Blueve and lizhijianrd and removed request for lguohan October 16, 2024 11:40
@w1nda
Copy link
Member Author

w1nda commented Oct 16, 2024

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

const BROADCAST_MAC: [u8; 6] = [0xff, 0xff, 0xff, 0xff, 0xff, 0xff];

pub static VERBOSE_OUTPUT: Mutex<bool> = Mutex::new(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why using Mutex instead of a bool variable? Any race condition may happen?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using mutex is safer although there is no race condition may happen

src/sonic-nettools/wol/src/wol.rs Outdated Show resolved Hide resolved
src/sonic-nettools/wol/src/wol.rs Show resolved Hide resolved
@w1nda w1nda requested a review from lizhijianrd October 17, 2024 08:28
@w1nda
Copy link
Member Author

w1nda commented Oct 17, 2024

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@w1nda
Copy link
Member Author

w1nda commented Oct 17, 2024

Hi @yxieca, cloud you help merge this PR? thanks

@yxieca yxieca merged commit 846b4b2 into sonic-net:master Oct 18, 2024
10 of 22 checks passed
wangxin pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Nov 6, 2024
We extended wol tool to support sending magic pattern in udp paylod, and we need to add related tests into test plan.
Related PRs: sonic-net/SONiC#1827, sonic-net/sonic-buildimage#20523

What is the motivation for this PR?
We extended wol tool to support sending magic pattern in udp paylod, and we need to add related tests into test plan.

How did you do it?
Add udp related tests and give some demo commands.
veronica-arista pushed a commit to veronica-arista/sonic-mgmt that referenced this pull request Nov 7, 2024
We extended wol tool to support sending magic pattern in udp paylod, and we need to add related tests into test plan.
Related PRs: sonic-net/SONiC#1827, sonic-net/sonic-buildimage#20523

What is the motivation for this PR?
We extended wol tool to support sending magic pattern in udp paylod, and we need to add related tests into test plan.

How did you do it?
Add udp related tests and give some demo commands.
sreejithsreekumaran pushed a commit to sreejithsreekumaran/sonic-mgmt that referenced this pull request Nov 15, 2024
We extended wol tool to support sending magic pattern in udp paylod, and we need to add related tests into test plan.
Related PRs: sonic-net/SONiC#1827, sonic-net/sonic-buildimage#20523

What is the motivation for this PR?
We extended wol tool to support sending magic pattern in udp paylod, and we need to add related tests into test plan.

How did you do it?
Add udp related tests and give some demo commands.
aidan-gallagher pushed a commit to aidan-gallagher/sonic-buildimage that referenced this pull request Nov 16, 2024
…ic-net#20523)

Why I did it
Although the magic pattern is fixed, we can send the magic pattern in UDP payload to leverage the benefits of UDP.

How I did it
Add code to support sending payload in udp and provide CLI parameters for it.

How to verify it
Unit test and run tests in sonic-mgmt
yutongzhang-microsoft pushed a commit to yutongzhang-microsoft/sonic-mgmt that referenced this pull request Nov 21, 2024
We extended wol tool to support sending magic pattern in udp paylod, and we need to add related tests into test plan.
Related PRs: sonic-net/SONiC#1827, sonic-net/sonic-buildimage#20523

What is the motivation for this PR?
We extended wol tool to support sending magic pattern in udp paylod, and we need to add related tests into test plan.

How did you do it?
Add udp related tests and give some demo commands.
@w1nda
Copy link
Member Author

w1nda commented Dec 12, 2024

This cherry-pick depends on PR #21136
which is merged,
So, I try remove the conflict tag and add approval tag to retry

mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Dec 12, 2024
…ic-net#20523)

Why I did it
Although the magic pattern is fixed, we can send the magic pattern in UDP payload to leverage the benefits of UDP.

How I did it
Add code to support sending payload in udp and provide CLI parameters for it.

How to verify it
Unit test and run tests in sonic-mgmt
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #21147

mssonicbld pushed a commit that referenced this pull request Dec 13, 2024
)

Why I did it
Although the magic pattern is fixed, we can send the magic pattern in UDP payload to leverage the benefits of UDP.

How I did it
Add code to support sending payload in udp and provide CLI parameters for it.

How to verify it
Unit test and run tests in sonic-mgmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants