netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 net-next 00/13] ipvlan: support mac-nat mode
@ 2025-11-18 10:00 Dmitry Skorodumov
  2025-11-18 10:00 ` [PATCH net-next 01/13] ipvlan: Support MACNAT mode Dmitry Skorodumov
                   ` (13 more replies)
  0 siblings, 14 replies; 22+ messages in thread
From: Dmitry Skorodumov @ 2025-11-18 10:00 UTC (permalink / raw)
  To: netdev; +Cc: andrey.bokhanko, edumazet, Dmitry Skorodumov

pvlan: support mac-nat mode

ipvlan: Add support of MAC-NAT translation in L2-bridge

Make it is possible to create link in L2_MACNAT mode: learnable
bridge with MAC Address Translation. The IPs and MAC addresses will be learned
from TX-packets of child interfaces.

Also, dev_add_pack() protocol is attached to the main port
to support communication from main to child interfaces.

This mode is intended for the desktop virtual machines, for
bridging to Wireless interfaces.

The mode should be specified while creating first child interface.
It is not possible to change it after this.

This functionality is quite often requested by users.

diff from v3:
- Restructured code, to place all new functionality under
if (ipvlan_is_macnat(port) condition and minimize refactoring
of existing code.
- Added kselftest for the new functionality
- Removed patch with unnecessary gso_segment() call
- Patches 1-3 were merged into 1
- Fixed compilation warnings about __be16/__be32 conversions

diff from v2:
- forgotten patches (10..14) added

diff from v1:

- changed name of the mode to be L2_MACNAT
- Fixed use of uninitialized variable, found by Intel CI/CD
- Fixed style problems with lines more then 80 chars
- Try to use xmastree style of vars declarations
- Fixed broken intermediate compilation
- Added check, that child-ip doesn't use IP of the main port
- Added patch to ignore PACKET_LOOPBACK in handle_mode_l2()
- Some patches with style-refactoring of addr-event notifications

Dmitry Skorodumov (13):
  ipvlan: Support MACNAT mode
  ipvlan: macnat: Handle rx mcast-ip and unicast eth
  ipvlan: Forget all IP when device goes down
  ipvlan: Support IPv6 in macnat mode.
  ipvlan: Fix compilation warning about __be32 -> u32
  ipvlan: Make the addrs_lock be per port
  ipvlan: Take addr_lock in ipvlan_open()
  ipvlan: Don't allow children to use IPs of main
  ipvlan: const-specifier for functions that use iaddr
  ipvlan: Common code from v6/v4 validator_event
  ipvlan: common code to handle ipv6/ipv4 address events
  ipvlan: Ignore PACKET_LOOPBACK in handle_mode_l2()
  selftests: drv-net: selftest for ipvlan-macnat mode

 Documentation/networking/ipvlan.rst           |  20 +
 drivers/net/ipvlan/ipvlan.h                   |  45 +-
 drivers/net/ipvlan/ipvlan_core.c              | 486 ++++++++++++++++-
 drivers/net/ipvlan/ipvlan_main.c              | 506 ++++++++++++++----
 include/uapi/linux/if_link.h                  |   1 +
 tools/testing/selftests/net/Makefile          |   3 +
 .../selftests/net/ipvtap_macnat_bridge.py     | 174 ++++++
 .../selftests/net/ipvtap_macnat_test.sh       | 332 ++++++++++++
 8 files changed, 1426 insertions(+), 141 deletions(-)
 create mode 100755 tools/testing/selftests/net/ipvtap_macnat_bridge.py
 create mode 100755 tools/testing/selftests/net/ipvtap_macnat_test.sh

-- 
2.25.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2025-11-20 15:21 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-18 10:00 [PATCH v4 net-next 00/13] ipvlan: support mac-nat mode Dmitry Skorodumov
2025-11-18 10:00 ` [PATCH net-next 01/13] ipvlan: Support MACNAT mode Dmitry Skorodumov
2025-11-18 10:00 ` [PATCH net-next 02/13] ipvlan: macnat: Handle rx mcast-ip and unicast eth Dmitry Skorodumov
2025-11-18 10:00 ` [PATCH net-next 03/13] ipvlan: Forget all IP when device goes down Dmitry Skorodumov
2025-11-18 10:00 ` [PATCH net-next 04/13] ipvlan: Support IPv6 in macnat mode Dmitry Skorodumov
2025-11-19  1:23   ` Jakub Kicinski
2025-11-19  3:25   ` kernel test robot
2025-11-18 10:00 ` [PATCH net-next 05/13] ipvlan: Fix compilation warning about __be32 -> u32 Dmitry Skorodumov
2025-11-18 12:47   ` Eric Dumazet
2025-11-19  1:26     ` Jakub Kicinski
2025-11-20 11:15       ` Dmitry Skorodumov
2025-11-20 15:21         ` Jakub Kicinski
2025-11-18 10:00 ` [PATCH net-next 06/13] ipvlan: Make the addrs_lock be per port Dmitry Skorodumov
2025-11-18 10:00 ` [PATCH net-next 07/13] ipvlan: Take addr_lock in ipvlan_open() Dmitry Skorodumov
2025-11-18 10:00 ` [PATCH net-next 08/13] ipvlan: Don't allow children to use IPs of main Dmitry Skorodumov
2025-11-18 10:00 ` [PATCH net-next 09/13] ipvlan: const-specifier for functions that use iaddr Dmitry Skorodumov
2025-11-18 10:00 ` [PATCH net-next 10/13] ipvlan: Common code from v6/v4 validator_event Dmitry Skorodumov
2025-11-18 10:00 ` [PATCH net-next 11/13] ipvlan: common code to handle ipv6/ipv4 address events Dmitry Skorodumov
2025-11-18 10:00 ` [PATCH net-next 12/13] ipvlan: Ignore PACKET_LOOPBACK in handle_mode_l2() Dmitry Skorodumov
2025-11-18 10:00 ` [PATCH net-next 13/13] selftests: drv-net: selftest for ipvlan-macnat mode Dmitry Skorodumov
2025-11-19  1:25   ` Jakub Kicinski
2025-11-18 14:57 ` [syzbot ci] Re: ipvlan: support mac-nat mode syzbot ci

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).