fix ipvlan/macvlan link event handing
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | ipvlan: fix NETDEV_UP/NETDEV_DOWN event handlingdrivers/ | +19 | 4 replies | |
| 2/3 | macvlan: fix NETDEV_UP/NETDEV_DOWN event handlingdrivers/ | +20 | 0 replies | |
| 3/3 | selftests/rtnetlink.sh: add vlan/ipvlan/macvlan link state testtools/ | +64 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH net 0/3] fix ipvlan/macvlan link event handing
When setting the lower-layer link up/down, the ipvlan/macvlan device synchronizes its state via netif_stacked_transfer_operstate(), which only checks the carrier state. However, setting the link down does not necessarily change the carrier state for virtual interfaces like bonding. This causes the ipvlan/macvlan state to become out of sync with the lower-layer link state. Fix this by explicitly changing the IFF_UP flag, similar to how VLAN handles it.
Before the patch:
# ./rtnetlink.sh -t "kci_test_vlan kci_test_ipvlan kci_test_macvlan" PASS: vlan link state correct FAIL: ipvlan link state incorrect FAIL: macvlan link state incorrect
After the patch set:
# ./rtnetlink.sh -t "kci_test_vlan kci_test_ipvlan kci_test_macvlan" PASS: vlan link state correct PASS: ipvlan link state correct PASS: macvlan link state correct
Hangbin Liu (3):
ipvlan: fix NETDEV_UP/NETDEV_DOWN event handling
macvlan: fix NETDEV_UP/NETDEV_DOWN event handling selftests/rtnetlink.sh: add vlan/ipvlan/macvlan link state test
drivers/net/ipvlan/ipvlan_main.c | 20 +++++++- drivers/net/macvlan.c | 20 ++++++++ tools/testing/selftests/net/rtnetlink.sh | 64 ++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 1 deletion(-)
Signature · 1 line
2.46.0