* [PATCH net-next] ethernet/sfc: use core min/max MTU checking
@ 2016-10-18 16:47 Bert Kenward
2016-10-18 17:21 ` Sergei Shtylyov
2016-10-18 17:54 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Bert Kenward @ 2016-10-18 16:47 UTC (permalink / raw)
To: Dave Miller; +Cc: Solarflare Linux Maintainers, netdev, Jarod Wilson
Fixes: 61e84623 ("net: centralize net_device min/max MTU checking")
Signed-off-by: Bert Kenward <bkenward@solarflare.com>
---
drivers/net/ethernet/sfc/efx.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 3cf3557..b626da6 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -2263,18 +2263,6 @@ static int efx_change_mtu(struct net_device *net_dev, int new_mtu)
rc = efx_check_disabled(efx);
if (rc)
return rc;
- if (new_mtu > EFX_MAX_MTU) {
- netif_err(efx, drv, efx->net_dev,
- "Requested MTU of %d too big (max: %d)\n",
- new_mtu, EFX_MAX_MTU);
- return -EINVAL;
- }
- if (new_mtu < EFX_MIN_MTU) {
- netif_err(efx, drv, efx->net_dev,
- "Requested MTU of %d too small (min: %d)\n",
- new_mtu, EFX_MIN_MTU);
- return -EINVAL;
- }
netif_dbg(efx, drv, efx->net_dev, "changing MTU to %d\n", new_mtu);
@@ -2478,6 +2466,8 @@ static int efx_register_netdev(struct efx_nic *efx)
net_dev->priv_flags |= IFF_UNICAST_FLT;
net_dev->ethtool_ops = &efx_ethtool_ops;
net_dev->gso_max_segs = EFX_TSO_MAX_SEGS;
+ net_dev->min_mtu = EFX_MIN_MTU;
+ net_dev->max_mtu = EFX_MAX_MTU;
rtnl_lock();
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ethernet/sfc: use core min/max MTU checking
2016-10-18 16:47 [PATCH net-next] ethernet/sfc: use core min/max MTU checking Bert Kenward
@ 2016-10-18 17:21 ` Sergei Shtylyov
2016-10-18 17:54 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2016-10-18 17:21 UTC (permalink / raw)
To: Bert Kenward, Dave Miller
Cc: Solarflare Linux Maintainers, netdev, Jarod Wilson
On 10/18/2016 07:47 PM, Bert Kenward wrote:
> Fixes: 61e84623 ("net: centralize net_device min/max MTU checking")
The commit SHA1 should be at least 12 digits here.
> Signed-off-by: Bert Kenward <bkenward@solarflare.com>
[...]
MBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ethernet/sfc: use core min/max MTU checking
2016-10-18 16:47 [PATCH net-next] ethernet/sfc: use core min/max MTU checking Bert Kenward
2016-10-18 17:21 ` Sergei Shtylyov
@ 2016-10-18 17:54 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-10-18 17:54 UTC (permalink / raw)
To: bkenward; +Cc: linux-net-drivers, netdev, jarod
From: Bert Kenward <bkenward@solarflare.com>
Date: Tue, 18 Oct 2016 17:47:45 +0100
> Fixes: 61e84623 ("net: centralize net_device min/max MTU checking")
> Signed-off-by: Bert Kenward <bkenward@solarflare.com>
Applied with Fixes tag fixed up to use a 12 character SHA1-ID.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-18 17:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 16:47 [PATCH net-next] ethernet/sfc: use core min/max MTU checking Bert Kenward
2016-10-18 17:21 ` Sergei Shtylyov
2016-10-18 17:54 ` 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).