Skip to content

Commit

Permalink
veth: set peer GSO values
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Dec 8, 2017
1 parent 46e6b99 commit 72d2495
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/veth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 72d2495

Please sign in to comment.