* [PATCH] 8139too: The maximum MTU should allow for VLAN headers
@ 2014-11-23 12:07 Alban Bedel
2014-11-24 20:27 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Alban Bedel @ 2014-11-23 12:07 UTC (permalink / raw)
To: netdev
Cc: Ben Hutchings, Alban Bedel, David S. Miller, Eric W. Biederman,
Bjorn Helgaas, Benoit Taine, linux-kernel
As pointed out by Ben Hutchings drivers that allow using VLAN have to
provide enough headroom for the VLAN tags.
Signed-off-by: Alban Bedel <albeu@free.fr>
---
drivers/net/ethernet/realtek/8139too.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c
index e157541..63dc0f9 100644
--- a/drivers/net/ethernet/realtek/8139too.c
+++ b/drivers/net/ethernet/realtek/8139too.c
@@ -112,6 +112,7 @@
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/gfp.h>
+#include <linux/if_vlan.h>
#include <asm/irq.h>
#define RTL8139_DRIVER_NAME DRV_NAME " Fast Ethernet driver " DRV_VERSION
@@ -182,13 +183,13 @@ static int debug = -1;
/* Number of Tx descriptor registers. */
#define NUM_TX_DESC 4
-/* max supported ethernet frame size -- must be at least (dev->mtu+14+4).*/
+/* max supported ethernet frame size -- must be at least (dev->mtu+18+4).*/
#define MAX_ETH_FRAME_SIZE 1792
/* max supported payload size */
-#define MAX_ETH_DATA_SIZE (MAX_ETH_FRAME_SIZE - ETH_HLEN - ETH_FCS_LEN)
+#define MAX_ETH_DATA_SIZE (MAX_ETH_FRAME_SIZE - VLAN_ETH_HLEN - ETH_FCS_LEN)
-/* Size of the Tx bounce buffers -- must be at least (dev->mtu+14+4). */
+/* Size of the Tx bounce buffers -- must be at least (dev->mtu+18+4). */
#define TX_BUF_SIZE MAX_ETH_FRAME_SIZE
#define TX_BUF_TOT_LEN (TX_BUF_SIZE * NUM_TX_DESC)
--
2.0.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] 8139too: The maximum MTU should allow for VLAN headers
2014-11-23 12:07 [PATCH] 8139too: The maximum MTU should allow for VLAN headers Alban Bedel
@ 2014-11-24 20:27 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-11-24 20:27 UTC (permalink / raw)
To: albeu; +Cc: netdev, ben, ebiederm, bhelgaas, benoit.taine, linux-kernel
From: Alban Bedel <albeu@free.fr>
Date: Sun, 23 Nov 2014 13:07:54 +0100
> As pointed out by Ben Hutchings drivers that allow using VLAN have to
> provide enough headroom for the VLAN tags.
>
> Signed-off-by: Alban Bedel <albeu@free.fr>
Applied to net-next, but I shouldn't have to guess around about what
tree your patch is for.
In the future you must specify explicitly what tree your patch is
targetted at by saying either "[PATCH net] " or "[PATCH net-next] "
in your subject line.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-24 20:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-23 12:07 [PATCH] 8139too: The maximum MTU should allow for VLAN headers Alban Bedel
2014-11-24 20:27 ` 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).