linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] team: use ETH_MAX_MTU as max mtu
@ 2017-03-06 13:48 Jarod Wilson
  2017-03-06 13:54 ` Jiri Pirko
  2017-03-09  6:20 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Jarod Wilson @ 2017-03-06 13:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jarod Wilson, Cong Wang, Jiri Pirko, netdev

This restores the ability to set a team device's mtu to anything higher
than 1500. Similar to the reported issue with bonding, the team driver
calls ether_setup(), which sets an initial max_mtu of 1500, while the
underlying hardware can handle something much larger. Just set it to
ETH_MAX_MTU to support all possible values, and the limitations of the
underlying devices will prevent setting anything too large.

Fixes: 91572088e3fd ("net: use core MTU range checking in core net infra")
CC: Cong Wang <xiyou.wangcong@gmail.com>
CC: Jiri Pirko <jiri@resnulli.us>
CC: netdev@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
---
 drivers/net/team/team.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 4a24b5d15f5a..1b52520715ae 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -2072,6 +2072,7 @@ static int team_dev_type_check_change(struct net_device *dev,
 static void team_setup(struct net_device *dev)
 {
 	ether_setup(dev);
+	dev->max_mtu = ETH_MAX_MTU;
 
 	dev->netdev_ops = &team_netdev_ops;
 	dev->ethtool_ops = &team_ethtool_ops;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] team: use ETH_MAX_MTU as max mtu
  2017-03-06 13:48 [PATCH net] team: use ETH_MAX_MTU as max mtu Jarod Wilson
@ 2017-03-06 13:54 ` Jiri Pirko
  2017-03-09  6:20 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2017-03-06 13:54 UTC (permalink / raw)
  To: Jarod Wilson; +Cc: linux-kernel, Cong Wang, netdev

Mon, Mar 06, 2017 at 02:48:58PM CET, jarod@redhat.com wrote:
>This restores the ability to set a team device's mtu to anything higher
>than 1500. Similar to the reported issue with bonding, the team driver
>calls ether_setup(), which sets an initial max_mtu of 1500, while the
>underlying hardware can handle something much larger. Just set it to
>ETH_MAX_MTU to support all possible values, and the limitations of the
>underlying devices will prevent setting anything too large.
>
>Fixes: 91572088e3fd ("net: use core MTU range checking in core net infra")
>CC: Cong Wang <xiyou.wangcong@gmail.com>
>CC: Jiri Pirko <jiri@resnulli.us>
>CC: netdev@vger.kernel.org
>Signed-off-by: Jarod Wilson <jarod@redhat.com>

Acked-by: Jiri Pirko <jiri@mellanox.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] team: use ETH_MAX_MTU as max mtu
  2017-03-06 13:48 [PATCH net] team: use ETH_MAX_MTU as max mtu Jarod Wilson
  2017-03-06 13:54 ` Jiri Pirko
@ 2017-03-09  6:20 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-03-09  6:20 UTC (permalink / raw)
  To: jarod; +Cc: linux-kernel, xiyou.wangcong, jiri, netdev

From: Jarod Wilson <jarod@redhat.com>
Date: Mon,  6 Mar 2017 08:48:58 -0500

> This restores the ability to set a team device's mtu to anything higher
> than 1500. Similar to the reported issue with bonding, the team driver
> calls ether_setup(), which sets an initial max_mtu of 1500, while the
> underlying hardware can handle something much larger. Just set it to
> ETH_MAX_MTU to support all possible values, and the limitations of the
> underlying devices will prevent setting anything too large.
> 
> Fixes: 91572088e3fd ("net: use core MTU range checking in core net infra")
> CC: Cong Wang <xiyou.wangcong@gmail.com>
> CC: Jiri Pirko <jiri@resnulli.us>
> CC: netdev@vger.kernel.org
> Signed-off-by: Jarod Wilson <jarod@redhat.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-09  6:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-06 13:48 [PATCH net] team: use ETH_MAX_MTU as max mtu Jarod Wilson
2017-03-06 13:54 ` Jiri Pirko
2017-03-09  6:20 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).