Skip to content

Commit 6008889

Browse files
committed
Merge branch 'amt-driver'
Taehee Yoo says: ==================== amt: add initial driver for Automatic Multicast Tunneling (AMT) This is an implementation of AMT(Automatic Multicast Tunneling), RFC 7450. https://datatracker.ietf.org/doc/html/rfc7450 This implementation supports IGMPv2, IGMPv3, MLDv1, MLDv2, and IPv4 underlay. Summary of RFC 7450 The purpose of this protocol is to provide multicast tunneling. The main use-case of this protocol is to provide delivery multicast traffic from a multicast-enabled network to sites that lack multicast connectivity to the source network. There are two roles in AMT protocol, Gateway, and Relay. The main purpose of Gateway mode is to forward multicast listening information(IGMP, MLD) to the source. The main purpose of Relay mode is to forward multicast data to listeners. These multicast traffics(IGMP, MLD, multicast data packets) are tunneled. Listeners are located behind Gateway endpoint. But gateway itself can be a listener too. Senders are located behind Relay endpoint. ___________ _________ _______ ________ | | | | | | | | | Listeners <-----> Gateway <-----> Relay <-----> Source | |___________| |_________| |_______| |________| IGMP/MLD---------(encap)-----------> <-------------(decap)--------(encap)------Multicast Data Usage of AMT interface 1. Create gateway interface ip link add amtg type amt mode gateway local 10.0.0.1 discovery 10.0.0.2 \ dev gw1_rt gateway_port 2268 relay_port 2268 2. Create Relay interface ip link add amtr type amt mode relay local 10.0.0.2 dev relay_rt \ relay_port 2268 max_tunnels 4 v1 -> v2: - Eliminate sparse warnings. - Use bool type instead of __be16 for identifying v4/v6 protocol. v2 -> v3: - Fix compile warning due to unsed variable. - Add missing spinlock comment. - Update help message of amt in Kconfig. v3 -> v4: - Split patch. - Use CHECKSUM_NONE instead of CHECKSUM_UNNECESSARY. - Fix compile error. v4 -> v5: - Remove unnecessary rcu_read_lock(). - Remove unnecessary amt_change_mtu(). - Change netlink error message. - Add validation for IFLA_AMT_LOCAL_IP and IFLA_AMT_DISCOVERY_IP. - Add comments in amt.h. - Add missing dev_put() in error path of amt_newlink(). - Fix typo. - Add BUILD_BUG_ON() in amt_smb_cb(). - Use macro instead of magic values. - Use kzalloc() instead of kmalloc(). - Add selftest script. v5 -> v6: - Reset remote_ip in amt_dev_stop(). v6 -> v7: - Fix compile error. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 741948f + c08e8ba commit 6008889

File tree

9 files changed

+4054
-0
lines changed

9 files changed

+4054
-0
lines changed

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,14 @@ S: Maintained
10201020
F: Documentation/devicetree/bindings/iio/light/ams,as73211.yaml
10211021
F: drivers/iio/light/as73211.c
10221022

1023+
AMT (Automatic Multicast Tunneling)
1024+
M: Taehee Yoo <[email protected]>
1025+
1026+
S: Maintained
1027+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
1028+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
1029+
F: drivers/net/amt.c
1030+
10231031
ANALOG DEVICES INC AD7192 DRIVER
10241032
M: Alexandru Tachici <[email protected]>
10251033

drivers/net/Kconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,22 @@ config GTP
291291
To compile this drivers as a module, choose M here: the module
292292
will be called gtp.
293293

294+
config AMT
295+
tristate "Automatic Multicast Tunneling (AMT)"
296+
depends on INET && IP_MULTICAST
297+
select NET_UDP_TUNNEL
298+
help
299+
This allows one to create AMT(Automatic Multicast Tunneling)
300+
virtual interfaces that provide multicast tunneling.
301+
There are two roles, Gateway, and Relay.
302+
Gateway Encapsulates IGMP/MLD traffic from listeners to the Relay.
303+
Gateway Decapsulates multicast traffic from the Relay to Listeners.
304+
Relay Encapsulates multicast traffic from Sources to Gateway.
305+
Relay Decapsulates IGMP/MLD traffic from Gateway.
306+
307+
To compile this drivers as a module, choose M here: the module
308+
will be called amt.
309+
294310
config MACSEC
295311
tristate "IEEE 802.1AE MAC-level encryption (MACsec)"
296312
select CRYPTO

drivers/net/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ obj-$(CONFIG_WIREGUARD) += wireguard/
1414
obj-$(CONFIG_EQUALIZER) += eql.o
1515
obj-$(CONFIG_IFB) += ifb.o
1616
obj-$(CONFIG_MACSEC) += macsec.o
17+
obj-$(CONFIG_AMT) += amt.o
1718
obj-$(CONFIG_MACVLAN) += macvlan.o
1819
obj-$(CONFIG_MACVTAP) += macvtap.o
1920
obj-$(CONFIG_MII) += mii.o

0 commit comments

Comments
 (0)