netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 00/14] ipvlan: support mac-nat mode
@ 2025-11-05 16:14 Dmitry Skorodumov
  2025-11-05 16:14 ` [PATCH net-next 01/14] ipvlan: Preparation to support mac-nat Dmitry Skorodumov
                   ` (14 more replies)
  0 siblings, 15 replies; 26+ messages in thread
From: Dmitry Skorodumov @ 2025-11-05 16:14 UTC (permalink / raw)
  To: netdev; +Cc: andrey.bokhanko, Dmitry Skorodumov

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 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 (14):
  ipvlan: Preparation to support mac-nat
  ipvlan: Send mcasts out directly in ipvlan_xmit_mode_l2()
  ipvlan: Handle rx mcast-ip and unicast eth
  ipvlan: Added some kind of MAC NAT
  ipvlan: Forget all IP when device goes down
  ipvlan: Support GSO for port -> ipvlan
  ipvlan: Support IPv6 for learnable l2-bridge
  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()

 Documentation/networking/ipvlan.rst |  11 +
 drivers/net/ipvlan/ipvlan.h         |  45 ++-
 drivers/net/ipvlan/ipvlan_core.c    | 516 ++++++++++++++++++++++++---
 drivers/net/ipvlan/ipvlan_main.c    | 521 ++++++++++++++++++++++------
 include/uapi/linux/if_link.h        |   1 +
 5 files changed, 925 insertions(+), 169 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 26+ messages in thread
* [PATCH net-next v2 00/14] ipvlan: support mac-nat mode
@ 2025-11-05 16:07 Dmitry Skorodumov
  2025-11-05 16:07 ` [PATCH net-next 01/14] ipvlan: Preparation to support mac-nat Dmitry Skorodumov
  0 siblings, 1 reply; 26+ messages in thread
From: Dmitry Skorodumov @ 2025-11-05 16:07 UTC (permalink / raw)
  To: netdev; +Cc: andrey.bokhanko, Dmitry Skorodumov

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 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 (14):
  ipvlan: Preparation to support mac-nat
  ipvlan: Send mcasts out directly in ipvlan_xmit_mode_l2()
  ipvlan: Handle rx mcast-ip and unicast eth
  ipvlan: Added some kind of MAC NAT
  ipvlan: Forget all IP when device goes down
  ipvlan: Support GSO for port -> ipvlan
  ipvlan: Support IPv6 for learnable l2-bridge
  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()

 Documentation/networking/ipvlan.rst |  11 +
 drivers/net/ipvlan/ipvlan.h         |  45 ++-
 drivers/net/ipvlan/ipvlan_core.c    | 516 ++++++++++++++++++++++++---
 drivers/net/ipvlan/ipvlan_main.c    | 521 ++++++++++++++++++++++------
 include/uapi/linux/if_link.h        |   1 +
 5 files changed, 925 insertions(+), 169 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2025-11-11  0:34 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 16:14 [PATCH net-next v3 00/14] ipvlan: support mac-nat mode Dmitry Skorodumov
2025-11-05 16:14 ` [PATCH net-next 01/14] ipvlan: Preparation to support mac-nat Dmitry Skorodumov
2025-11-05 23:32   ` Bagas Sanjaya
2025-11-06 23:30   ` kernel test robot
2025-11-05 16:14 ` [PATCH net-next 02/14] ipvlan: Send mcasts out directly in ipvlan_xmit_mode_l2() Dmitry Skorodumov
2025-11-05 16:14 ` [PATCH net-next 03/14] ipvlan: Handle rx mcast-ip and unicast eth Dmitry Skorodumov
2025-11-05 16:14 ` [PATCH net-next 04/14] ipvlan: Added some kind of MAC NAT Dmitry Skorodumov
2025-11-05 16:14 ` [PATCH net-next 05/14] ipvlan: Forget all IP when device goes down Dmitry Skorodumov
2025-11-05 16:14 ` [PATCH net-next 06/14] ipvlan: Support GSO for port -> ipvlan Dmitry Skorodumov
2025-11-05 16:29   ` Eric Dumazet
2025-11-05 16:58     ` Dmitry Skorodumov
2025-11-06 15:41       ` Dmitry Skorodumov
2025-11-06 15:56         ` Eric Dumazet
2025-11-07 11:26           ` Dmitry Skorodumov
2025-11-06 16:19         ` Dmitry Skorodumov
2025-11-05 16:14 ` [PATCH net-next 07/14] ipvlan: Support IPv6 for learnable l2-bridge Dmitry Skorodumov
2025-11-11  0:33   ` kernel test robot
2025-11-05 16:14 ` [PATCH net-next 08/14] ipvlan: Make the addrs_lock be per port Dmitry Skorodumov
2025-11-05 16:14 ` [PATCH net-next 09/14] ipvlan: Take addr_lock in ipvlan_open() Dmitry Skorodumov
2025-11-05 16:14 ` [PATCH net-next 10/14] ipvlan: Don't allow children to use IPs of main Dmitry Skorodumov
2025-11-05 16:14 ` [PATCH net-next 11/14] ipvlan: const-specifier for functions that use iaddr Dmitry Skorodumov
2025-11-05 16:14 ` [PATCH net-next 12/14] ipvlan: Common code from v6/v4 validator_event Dmitry Skorodumov
2025-11-05 16:14 ` [PATCH net-next 13/14] ipvlan: common code to handle ipv6/ipv4 address events Dmitry Skorodumov
2025-11-05 16:14 ` [PATCH net-next 14/14] ipvlan: Ignore PACKET_LOOPBACK in handle_mode_l2() Dmitry Skorodumov
2025-11-06  9:03 ` [syzbot ci] Re: ipvlan: support mac-nat mode syzbot ci
  -- strict thread matches above, loose matches on Subject: below --
2025-11-05 16:07 [PATCH net-next v2 00/14] " Dmitry Skorodumov
2025-11-05 16:07 ` [PATCH net-next 01/14] ipvlan: Preparation to support mac-nat Dmitry Skorodumov

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).