aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/net_driver.h
diff options
context:
space:
mode:
authorBert Kenward <bkenward@solarflare.com>2016-09-06 17:50:00 +0100
committerDavid S. Miller <davem@davemloft.net>2016-09-06 16:54:18 -0700
commit72a31d85a56581f0369f881c453d9c212a2bad38 (patch)
treed8dde8397bef83dbe01bd364fbff9cec71ee6364 /drivers/net/ethernet/sfc/net_driver.h
parentperf, bpf: fix conditional call to bpf_overflow_handler (diff)
downloadlinux-dev-72a31d85a56581f0369f881c453d9c212a2bad38.tar.xz
linux-dev-72a31d85a56581f0369f881c453d9c212a2bad38.zip
sfc: check MTU against minimum threshold
Reported-by: Ma Yuying <yuma@redhat.com> Suggested-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Bert Kenward <bkenward@solarflare.com> Reviewed-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/net_driver.h')
-rw-r--r--drivers/net/ethernet/sfc/net_driver.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index 0a2504b5dad5..99d8c82124bb 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -76,6 +76,9 @@
/* Maximum possible MTU the driver supports */
#define EFX_MAX_MTU (9 * 1024)
+/* Minimum MTU, from RFC791 (IP) */
+#define EFX_MIN_MTU 68
+
/* Size of an RX scatter buffer. Small enough to pack 2 into a 4K page,
* and should be a multiple of the cache line size.
*/