Thread (53 messages) 53 messages, 9 authors, 2012-04-05

Re: [PATCH v4] Ethernet driver for the WIZnet W5300 chip

flat view

From: Mike Sinkovsky <hidden>
Date: 2012-03-28 05:52:56

28.03.2012 8:35, David Miller wrote:
quoted
+/*
+ * Frame size is hardwired to 1514 bytes (including header),
+ *  =>  MTU for 802.1Q frames must be set to 1500-4 = 1496
+ */
+#define W5300_HARD_MTU		1500
I've told you that you must set the VLAN challenged feature flag
(NETIF_F_VLAN_CHALLENGED) for devices which have this restriction.

Just set that, and remove this comment, since the feature bit setting
documents this restriction fully and perfectly.
From Documentation/netdev-features.txt:
NETIF_F_VLAN_CHALLENGED should be set for devices which can't cope with VLAN
headers. Some drivers set this because the cards can't handle the bigger MTU.
[FIXME: Those cases could be fixed in VLAN code by allowing only reduced-MTU
VLANs. This may be not useful, though.]
My case is exactly what is here in FIXME comment - yes, this chip cannot handle full size MTU for VLANs, and TCP/IP traffic don't work well over this VLAN. But we actually use it for traffic where frame size is known to be less than 1500 - TDMoE to Asterisk in our case - and it works perfectly.
So as ideal we'll like to disable TCP/IP over this sort of VLANs, but still enable TDMoE traffic. If it is possible.

But if you want - ok, I'll disable VLAN support entirely for this chip in mainline version.

(Now working on similar driver for W5100 chip, hopefully will post both soon.)

-- 
Mike
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help