Skip to content

Commit 72d2495

Browse files
shemmingerdavem330
authored andcommitted
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>
1 parent 46e6b99 commit 72d2495

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/veth.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,9 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
410410
if (ifmp && (dev->ifindex != 0))
411411
peer->ifindex = ifmp->ifi_index;
412412

413+
peer->gso_max_size = dev->gso_max_size;
414+
peer->gso_max_segs = dev->gso_max_segs;
415+
413416
err = register_netdevice(peer);
414417
put_net(net);
415418
net = NULL;

0 commit comments

Comments
 (0)