macvlan: allow source mode devices along with passthru
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest1 patch 2 repliesIn review
- v51 patch 3 repliesSuperseded
- v41 patch 1 replySuperseded
Earlier versions · 5
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 posting 2/2 | 1 patch | 0 replies | Superseded | |
| v3 posting 1/2 | 0 of 1 patch | 0 replies | Superseded | |
| v2 posting 2/2 | 1 patch | 0 replies | Superseded | |
| v2 posting 1/2 | 1 patch | 0 replies | Superseded | |
| v1 RFC | 0 of 1 patch | 0 replies | Superseded |
Changes in v6 from the cover letter
- Prevent passthru and source mac from having the same MAC (if both are UP)
- Fix unbalanced promiscuity
- Really prevent changing anything to passthru
- Fix restoration of lowerdev MAC address
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | macvlan: allow source mode devices along with passthrudrivers/ | +93 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.
Cover letter [PATCH v6 0/1] macvlan: allow source mode devices along with passthru
Hello,
we're trying to solve a use case on our devices where two SoC are connected on the same board, using the only available high-speed interface.
One SoC runs the main Linux system including the full routing stack (FRITZ!OS) and the other SoC implements most of the GPON ONT side.
The high-speed interface is of course also used for the user traffic. Therefore we must tell the inter-SoC traffic apart from the user traffic.
We achieve this by matching the well-known MAC address of the ONT SoC. The user traffic passes through the ONT SoC without modifying MAC headers. Now we would like to use macvlan (with source mode devices) on the main SoC side for this but our routing stack requires the rx_handler to be available. Therefore macvlan is currently not an option.
With this patch macvlan becomes an option because the current limitation of either "one passthru device" or "any other configuration" is relaxed for the combination of passthru and any number of source mode devices.
This allows us to configure a source mode device for the other SoC and register an rx_handler for further processing on the passthru device.
Thanks in advance!
---
Changes in v6
- Prevent passthru and source mac from having the same MAC (if both are UP)
- Fix unbalanced promiscuity
- Really prevent changing anything to passthru
- Fix restoration of lowerdev MAC address
Changes in v5
- Properly respect "macvlan_addr_busy()" again for non-passthru interfaces (and avoid calling anymore for passthru interfaces)
- Guard NETDEV_CHANGEADDR from messing with the lower device
address during passthru interface removal
- restore unicast address (dev_add_uc/_del_uc) handling> Changes in v4
Changes in v4
- Prevent macvlan_restore_mac() from changing the MAC address of remaining source mode interfaces.
- Set MACVLAN_F_PASSTHRU on the macvlan_port only after adding the passthru interface truly succeeds.
- Changing existing interfaces to passthru mode shouldn't become allowed.
Changes in v3
- fix passthru port removal caused by passing the wrong
device to macvlan_port_release_mac(). This was also
detected by syzbot.
- macvlan_port_release_mac() is now named macvlan_restore_mac()
and gets passed a "struct macvlan_port" directly.
- Link to v2: https://lore.kernel.org/netdev/[email protected]/
Changes in v2:
- changed several port-wide checks (macvlan_passthru()) to
per-interface checks (vlan->mode == vlan->mode == MACVLAN_MODE_PASSTHRU)
- correctly handle removing the passthru interface when there are still
source interfaces
- Link to initial posting: https://lore.kernel.org/netdev/[email protected]/
---
Thomas Martitz (1):
macvlan: allow source mode devices along with passthru
drivers/net/macvlan.c | 107 ++++++++++++++++++++++++++++-------------- 1 file changed, 73 insertions(+), 34 deletions(-)
Signature · 1 line
2.54.0