Netdev List
 help / color / mirror / Atom feed
From: Solio Sarabia <solio.sarabia@intel.com>
To: davem@davemloft.net, stephen@networkplumber.org
Cc: netdev@vger.kernel.org, sthemmin@microsoft.com,
	shiny.sebastian@intel.com, solio.sarabia@intel.com
Subject: [PATCH net-next] veth: fix setting peer gso values
Date: Sat,  9 Dec 2017 11:11:33 -0800	[thread overview]
Message-ID: <1512846693-19983-1-git-send-email-solio.sarabia@intel.com> (raw)

GSO values are not correctly set for peer and dev. When creating
the veth link, GSO attributes are set for peer device, propagate
these values from peer to dev.

Signed-off-by: Solio Sarabia <solio.sarabia@intel.com>
---
 drivers/net/veth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index a69ad39..d936c8a 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -410,8 +410,8 @@ 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;
+	dev->gso_max_size = peer->gso_max_size;
+	dev->gso_max_segs = peer->gso_max_segs;
 
 	err = register_netdevice(peer);
 	put_net(net);
-- 
2.7.4

             reply	other threads:[~2017-12-09 19:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-09 19:11 Solio Sarabia [this message]
2017-12-10  1:16 ` [PATCH net-next] veth: fix setting peer gso values Solio Sarabia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1512846693-19983-1-git-send-email-solio.sarabia@intel.com \
    --to=solio.sarabia@intel.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shiny.sebastian@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox