--- v6
+++ v7
@@ -98,15 +98,18 @@
v5 -> v6:
- No change.
+v6 -> v7:
+ - No change.
+
drivers/net/amt.c | 1242 ++++++++++++++++++++++++++++++++++++++++++++-
include/net/amt.h | 47 ++
2 files changed, 1288 insertions(+), 1 deletion(-)
diff --git a/drivers/net/amt.c b/drivers/net/amt.c
-index 89468027066e..17569e660ef8 100644
+index addab3b1de0a..b4aff24ef271 100644
--- a/drivers/net/amt.c
+++ b/drivers/net/amt.c
-@@ -31,6 +31,1218 @@
+@@ -32,6 +32,1218 @@
static struct workqueue_struct *amt_wq;
@@ -1325,7 +1328,7 @@
static struct socket *amt_create_sock(struct net *net, __be16 port)
{
struct udp_port_cfg udp_conf;
-@@ -63,6 +1275,8 @@ static int amt_socket_create(struct amt_dev *amt)
+@@ -64,6 +1276,8 @@ static int amt_socket_create(struct amt_dev *amt)
memset(&tunnel_cfg, 0, sizeof(tunnel_cfg));
tunnel_cfg.sk_user_data = amt;
tunnel_cfg.encap_type = 1;
@@ -1334,7 +1337,7 @@
tunnel_cfg.encap_destroy = NULL;
setup_udp_tunnel_sock(amt->net, sock, &tunnel_cfg);
-@@ -87,14 +1301,26 @@ static int amt_dev_open(struct net_device *dev)
+@@ -88,14 +1302,26 @@ static int amt_dev_open(struct net_device *dev)
get_random_bytes(&amt->key, sizeof(siphash_key_t));
amt->status = AMT_STATUS_INIT;
@@ -1361,7 +1364,7 @@
/* shutdown */
sock = rtnl_dereference(amt->sock);
RCU_INIT_POINTER(amt->sock, NULL);
-@@ -107,6 +1333,13 @@ static int amt_dev_stop(struct net_device *dev)
+@@ -108,6 +1334,13 @@ static int amt_dev_stop(struct net_device *dev)
amt->req_cnt = 0;
amt->remote_ip = 0;
@@ -1375,7 +1378,7 @@
return 0;
}
-@@ -146,6 +1379,7 @@ static const struct net_device_ops amt_netdev_ops = {
+@@ -147,6 +1380,7 @@ static const struct net_device_ops amt_netdev_ops = {
.ndo_uninit = amt_dev_uninit,
.ndo_open = amt_dev_open,
.ndo_stop = amt_dev_stop,
@@ -1383,7 +1386,7 @@
.ndo_get_stats64 = dev_get_tstats64,
};
-@@ -233,7 +1467,8 @@ static int amt_newlink(struct net *net, struct net_device *dev,
+@@ -234,7 +1468,8 @@ static int amt_newlink(struct net *net, struct net_device *dev,
amt->net = net;
amt->mode = nla_get_u32(data[IFLA_AMT_MODE]);
@@ -1393,7 +1396,7 @@
amt->max_tunnels = nla_get_u32(data[IFLA_AMT_MAX_TUNNELS]);
else
amt->max_tunnels = AMT_MAX_TUNNELS;
-@@ -331,6 +1566,11 @@ static int amt_newlink(struct net *net, struct net_device *dev,
+@@ -332,6 +1567,11 @@ static int amt_newlink(struct net *net, struct net_device *dev,
goto err;
}
@@ -1406,10 +1409,10 @@
err:
dev_put(amt->stream_dev);
diff --git a/include/net/amt.h b/include/net/amt.h
-index 6dcfe5b61346..efa8ec98c72d 100644
+index ce24ff823555..31b0cf17044b 100644
--- a/include/net/amt.h
+++ b/include/net/amt.h
-@@ -39,6 +39,18 @@ enum amt_status {
+@@ -38,6 +38,18 @@ enum amt_status {
#define AMT_STATUS_MAX (__AMT_STATUS_MAX - 1)
@@ -1428,7 +1431,7 @@
struct amt_header_discovery {
#if defined(__LITTLE_ENDIAN_BITFIELD)
u32 type:4,
-@@ -157,6 +169,29 @@ struct amt_relay_headers {
+@@ -156,6 +168,29 @@ struct amt_relay_headers {
};
} __packed;
@@ -1458,7 +1461,7 @@
struct amt_dev {
struct net_device *dev;
struct net_device *stream_dev;
-@@ -212,12 +247,19 @@ struct amt_dev {
+@@ -211,12 +246,19 @@ struct amt_dev {
reserved:16;
};
@@ -1478,7 +1481,7 @@
#define IANA_AMT_UDP_PORT 2268
#define AMT_MAX_TUNNELS 128
#define AMT_MAX_REQS 128
-@@ -233,4 +275,9 @@ static inline bool netif_is_amt(const struct net_device *dev)
+@@ -232,4 +274,9 @@ static inline bool netif_is_amt(const struct net_device *dev)
return dev->rtnl_link_ops && !strcmp(dev->rtnl_link_ops->kind, "amt");
}