diff options
author | Stephen Hemminger <stephen@networkplumber.org> | 2017-12-07 15:40:20 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-08 14:22:59 -0500 |
commit | 72d24955b44a4039db54a1c252b5031969eeaac3 (patch) | |
tree | fd5c58a47be81e46ab6cedfef32e59b612df49b7 /drivers/net/veth.c | |
parent | 46e6b992c2502b094e61da6994f1363f3b7c1413 (diff) | |
download | talos-op-linux-72d24955b44a4039db54a1c252b5031969eeaac3.tar.gz talos-op-linux-72d24955b44a4039db54a1c252b5031969eeaac3.zip |
veth: set peer GSO values
When new veth is created, and GSO values have been configured
on one device, clone those values to the peer.
For example:
# ip link add dev vm1 gso_max_size 65530 type veth peer name vm2
This should create vm1 <--> vm2 with both having GSO maximum
size set to 65530.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/veth.c')
-rw-r--r-- | drivers/net/veth.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index f5438d0978ca..a69ad39ee57e 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c @@ -410,6 +410,9 @@ static int veth_newlink(struct net *src_net, struct net_device *dev, if (ifmp && (dev->ifindex != 0)) peer->ifindex = ifmp->ifi_index; + peer->gso_max_size = dev->gso_max_size; + peer->gso_max_segs = dev->gso_max_segs; + err = register_netdevice(peer); put_net(net); net = NULL; |