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

[nrf fromtree] net: arp: Add support for gratuitous ARP transmission #1665

Merged
merged 3 commits into from
May 13, 2024

Conversation

rlubos
Copy link
Contributor

@rlubos rlubos commented Apr 24, 2024

Add support for gratuitous ARP transmission by Zephyr network stack. This allows to prematurely fill the peer ARP table, so there's no need to send an explicit request when peer needs to send an actual packet.

The gratuitous ARP is send when the network interface is brought up (joins the network) or a new IP address is added. The gratuitous ARP request is also sent periodically, with a configurable interval time. The gratuitous ARP should also be sent whenever MAC address of the interface is changed, but as Zephyr only allows to do this when interface is down, this is already covered by the first case (interface brought up).

@rlubos rlubos force-pushed the ncs/net/gratuitous-arp-tx branch 2 times, most recently from 58f5041 to 5248eab Compare May 8, 2024 12:19
@rlubos
Copy link
Contributor Author

rlubos commented May 8, 2024

Extra cherry-picks to get net_eth_is_vlan_interface() cleanly.

jukkar and others added 3 commits May 9, 2024 09:30
… interface

The network interface parameter for net_eth_get_vlan_tag() should
be the VLAN interface so use the search loop properly.
Earlier the main interface could be checked.

Add also test cases for this so that we can catch that the func
works properly.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit d40abe8)
Signed-off-by: Robert Lubos <[email protected]>
…N one

We were missing a helper function that can be used to check
whether the given function is the virtual VLAN interface.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 07599e3)
Signed-off-by: Robert Lubos <[email protected]>
Add support for gratuitous ARP transmission by Zephyr network stack.
This allows to prematurely fill the peer ARP table, so there's no need
to send an explicit request when peer needs to send an actual packet.

The gratuitous ARP is send when the network interface is brought up
(joins the network) or a new IP address is added. The gratuitous ARP
request is also sent periodically, with a configurable interval time.
The gratuitous ARP should also be sent whenever MAC address of the
interface is changed, but as Zephyr only allows to do this when
interface is down, this is already covered by the first case (interface
brought up).

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit 6551e6f)
@rlubos rlubos force-pushed the ncs/net/gratuitous-arp-tx branch from 5248eab to 4193164 Compare May 9, 2024 07:30
@rlubos rlubos marked this pull request as ready for review May 9, 2024 07:32
@NordicBuilder NordicBuilder requested a review from jukkar May 9, 2024 07:33
@rlubos rlubos changed the title [nrf fromlist] net: arp: Add support for gratuitous ARP transmission [nrf fromtree] net: arp: Add support for gratuitous ARP transmission May 9, 2024
@jukkar jukkar merged commit 7c0c899 into nrfconnect:main May 13, 2024
18 checks passed
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.

4 participants