All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 net-next 00/12] ipvlan: support mac-nat mode
@ 2025-11-20 17:49 Dmitry Skorodumov
  2025-11-20 17:49 ` [PATCH net-next 01/12] ipvlan: Support MACNAT mode Dmitry Skorodumov
                   ` (11 more replies)
  0 siblings, 12 replies; 23+ messages in thread
From: Dmitry Skorodumov @ 2025-11-20 17:49 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 v4
- Patch "Fix compilation warning about __be32 -> u32"
was sent as a separate patch, out of this series
- Fixed unused-variable "orig_skb" in "Support IPv6 in macnat mode."
patch
- Fixed shellcheck and pylint warnings in "selftests: net" patch
- Fixed conflict with Makefile in selftests/net
- Fixed "suspicious RCU usage" warning in ipvlan_addr_event() func:
need to use ipvlan_port_get_rcu_rtnl(), since this function can
be called with either rtnl or just with rcu for some ipv6 events

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

*** BLURB HERE ***

Dmitry Skorodumov (12):
  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: 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: net: selftest for ipvlan-macnat mode

 Documentation/networking/ipvlan.rst           |  22 +-
 drivers/net/ipvlan/ipvlan.h                   |  51 +-
 drivers/net/ipvlan/ipvlan_core.c              | 479 ++++++++++++++++-
 drivers/net/ipvlan/ipvlan_main.c              | 506 ++++++++++++++----
 include/uapi/linux/if_link.h                  |   1 +
 tools/testing/selftests/net/Makefile          |   2 +
 .../selftests/net/ipvtap_macnat_bridge.py     | 168 ++++++
 .../selftests/net/ipvtap_macnat_test.sh       | 333 ++++++++++++
 8 files changed, 1422 insertions(+), 140 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] 23+ messages in thread

end of thread, other threads:[~2025-12-02 10:08 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-20 17:49 [PATCH v5 net-next 00/12] ipvlan: support mac-nat mode Dmitry Skorodumov
2025-11-20 17:49 ` [PATCH net-next 01/12] ipvlan: Support MACNAT mode Dmitry Skorodumov
2025-11-25 12:58   ` Paolo Abeni
2025-11-27  8:13     ` Dmitry Skorodumov
2025-11-27  8:24       ` Paolo Abeni
2025-11-20 17:49 ` [PATCH net-next 02/12] ipvlan: macnat: Handle rx mcast-ip and unicast eth Dmitry Skorodumov
2025-11-20 17:49 ` [PATCH net-next 03/12] ipvlan: Forget all IP when device goes down Dmitry Skorodumov
2025-11-20 17:49 ` [PATCH net-next 04/12] ipvlan: Support IPv6 in macnat mode Dmitry Skorodumov
2025-11-20 17:49 ` [PATCH net-next 05/12] ipvlan: Make the addrs_lock be per port Dmitry Skorodumov
2025-11-25 14:16   ` Paolo Abeni
2025-11-20 17:49 ` [PATCH net-next 06/12] ipvlan: Take addr_lock in ipvlan_open() Dmitry Skorodumov
2025-11-25 14:17   ` Paolo Abeni
2025-11-20 17:49 ` [PATCH net-next 07/12] ipvlan: Don't allow children to use IPs of main Dmitry Skorodumov
2025-11-25 14:26   ` Paolo Abeni
2025-11-27 11:42     ` Dmitry Skorodumov
2025-11-20 17:49 ` [PATCH net-next 08/12] ipvlan: const-specifier for functions that use iaddr Dmitry Skorodumov
2025-11-20 17:49 ` [PATCH net-next 09/12] ipvlan: Common code from v6/v4 validator_event Dmitry Skorodumov
2025-11-20 17:49 ` [PATCH net-next 10/12] ipvlan: common code to handle ipv6/ipv4 address events Dmitry Skorodumov
2025-11-20 17:49 ` [PATCH net-next 11/12] ipvlan: Ignore PACKET_LOOPBACK in handle_mode_l2() Dmitry Skorodumov
2025-11-25 14:30   ` Paolo Abeni
2025-12-02 10:08     ` Dmitry Skorodumov
2025-11-20 17:49 ` [PATCH net-next 12/12] selftests: net: selftest for ipvlan-macnat mode Dmitry Skorodumov
2025-11-25 14:40   ` Paolo Abeni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.