Wheezy kernel E100E module, and VLAN tagging
Hello All!
I'm using Intel D2500 board with Atom processor as home router/media server.
It has Intel Gigabit Network adapter. This is lspci output:
01:00.0 Ethernet controller [0200]: Intel Corporation 82574L Gigabit Network
Connection [8086:10d3]
Subsystem: Intel Corporation Device [8086:2010]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at 40020000 (32-bit, non-prefetchable) [size=128K]
Region 1: Memory at 40000000 (32-bit, non-prefetchable) [size=128K]
Region 2: I/O ports at 1000 [size=32]
Region 3: Memory at 40040000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [c8] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [e0] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns,
L1 <64us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable+ Non-Fatal+ Fatal+
Unsupported+
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+
TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency
L0 <128ns, L1 <64us
ClockPM- Surprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain-
CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
Capabilities: [a0] MSI-X: Enable+ Count=5 Masked-
Vector table: BAR=3 offset=00000000
PBA: BAR=3 offset=00002000
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-
RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-
RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-
RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout-
NonFatalErr+
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout-
NonFatalErr+
AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap-
ChkEn-
Capabilities: [140 v1] Device Serial Number 00-22-4d-ff-ff-6b-eb-8b
Kernel driver in use: e1000e
Some time ago, I bought the D-Link DGS-1100-08/A1A with VLAN support. Then, I
setup a tagged VLAN ports, one connected to the 82574L network adapter.
In the operation system I shared eth0 as eth0.1, eth0.2, and eth0.3 VLANs.
Next time I saw receive errors on tagged port in the DGS-1100 admin interface.
My investigation resulted in conclusion that some small Ethernet packets with
VLAN tag has 64 bytes length. Minimum size for the Ethernet packet is 64 byte,
and 4 byte is VLAN tag. So, smallest packet must be 68 bytes in my case.
It seems that network adapter adds VLAN tag to the small frame, and then
append it to 64 bytes length. It's wrong. I done simple patch to the e1000e
module, and errors gone:
--- a/drivers/net/ethernet/intel/e1000e/netdev.c 2015-02-20
05:57:03.000000000 +0300
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c 2015-01-22
21:32:10.657649583 +0300
@@ -5426,11 +5426,11 @@
/* The minimum packet size with TCTL.PSP set is 17 bytes so
* pad skb in order to meet this minimum size requirement
*/
- if (unlikely(skb->len < 17)) {
- if (skb_pad(skb, 17 - skb->len))
+ if (unlikely(skb->len < ETH_ZLEN)) {
+ if (skb_pad(skb, ETH_ZLEN - skb->len))
return NETDEV_TX_OK;
- skb->len = 17;
- skb_set_tail_pointer(skb, 17);
+ skb->len = ETH_ZLEN;
+ skb_set_tail_pointer(skb, ETH_ZLEN);
}
mss = skb_shinfo(skb)->gso_size;
If any additional information required, please contact me. I have some
background in the Linux drivers development.
With best regards, Sergey.
Reply to: