public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls•msk.ru>
To: Eric Dumazet <eric.dumazet@gmail•com>
Cc: David Lamparter <equinox@diac24•net>,
	jeffrey.t.kirsher@intel•com, netdev <netdev@vger•kernel.org>
Subject: Re: e100 + VLANs?
Date: Tue, 11 Oct 2011 15:59:06 +0400	[thread overview]
Message-ID: <4E942F8A.90205@msgid.tls.msk.ru> (raw)
In-Reply-To: <CAL4WiiphpyizVaNkvOdJp1+UK53TkGw9RXnC-vzH7fTNpBAAEA@mail.gmail.com>

11.10.2011 15:25, Eric Dumazet wrote:
>> So, is that a hardware limitation?
> 
> Its a driver bug
> 
> This comes from fact that sizeof(struct rfd) = 16
> 
> and VLAN_ETH_FRAME_LEN is 1518
> 
> driver mixes VLAN_ETH_FRAME_LEN and 1500+4+sizeof(struct rfd)   (1520, not 1518)
> 
> It therefore misses 2 bytes for large frames (VLAN tagged)
> 
> Fix is to remove VLAN_ETH_FRAME_LEN references for good...
> 
> diff --git a/drivers/net/e100.c b/drivers/net/e100.c
> index c1352c6..3287d31 100644

Hmm.  This does not _exactly_ work.

I applied it on top of 2.6.32, patch applied but with some fuzz - I checked
manually and it appears to be ok.

Now, with this patch applied, I see on the e100 side:

00:1f:c6:ef:e5:1b > 00:90:27:30:6d:1c, ethertype 802.1Q (0x8100), length 1504: vlan 6, p 0, ethertype IPv4, truncated-ip - 1 bytes missing! (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 1487)
    10.48.6.1 > 10.48.6.2: ICMP echo request, id 27613, seq 6, length 1467

when pinging it with -s 1459 (1487 total size).

I added extra +40 for RFD_BUF_LEN define and recompiled
(this resulted in RFD_BUF_LEN=1560, - I've added a printk
just to be sure).

Now I see the same effect as before the patch:  maximum
packet size that goes and can be seen on the e100 side
is 1468(1496) (ping), which results in this on e100 side:

15:54:44.830941 00:1f:c6:ef:e5:1b > 00:90:27:30:6d:1c, ethertype 802.1Q (0x8100), length 1514: vlan 6, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 1496)
    10.48.6.1 > 10.48.6.2: ICMP echo request, id 28735, seq 4, length 1476
15:54:44.831025 00:90:27:30:6d:1c > 00:1f:c6:ef:e5:1b, ethertype 802.1Q (0x8100), length 1514: vlan 6, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 12010, offset 0, flags [none], proto ICMP (1), length 1496)
    10.48.6.2 > 10.48.6.1: ICMP echo reply, id 28735, seq 4, length 1476

(and it works).  With -s 1469, no ICMP packets can be seen
on e100 side.

So it still may be the hardware... :)

Thank you!

/mjt

  reply	other threads:[~2011-10-11 11:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-08 10:08 e100 + VLANs? Michael Tokarev
2011-10-08 16:24 ` Eric Dumazet
2011-10-08 18:34   ` Jeff Kirsher
2011-10-10 10:19     ` David Lamparter
2011-10-10 14:57       ` Michael Tokarev
2011-10-10 15:05         ` Eric Dumazet
2011-10-10 15:13           ` David Lamparter
2011-10-10 15:23             ` Eric Dumazet
2011-10-10 15:28               ` David Lamparter
2011-10-10 15:50                 ` Eric Dumazet
2011-10-10 16:51             ` Michael Tokarev
     [not found]             ` <4E932278.8010802@tls.msk.ru>
2011-10-11  9:51               ` Michael Tokarev
2011-10-11 11:25                 ` Eric Dumazet
2011-10-11 11:59                   ` Michael Tokarev [this message]
2011-10-11 12:04                     ` Eric Dumazet
2011-10-11 12:56                       ` Michael Tokarev
2011-10-11 15:29                         ` David Lamparter
2011-10-11 23:38                           ` Jesse Brandeburg
2011-10-13  9:22                             ` Michael Tokarev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E942F8A.90205@msgid.tls.msk.ru \
    --to=mjt@tls$(echo .)msk.ru \
    --cc=equinox@diac24$(echo .)net \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=jeffrey.t.kirsher@intel$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox