All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Krzysztof Oledzki <olel@ans.pl>
Cc: netdev@vger.kernel.org, greearb@candelatech.com
Subject: Re: Wrong padding of short packets send by a tagged-vlan interface?
Date: Mon, 07 Jul 2008 23:06:20 +0200	[thread overview]
Message-ID: <4872854C.201@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0807072210470.15459@bizon.gios.gov.pl>

Krzysztof Oledzki wrote:
> Hello,
> 
> I have a problem that I'm not able to connect from selected linux hosts 
> to a newly installed Netware 6.5 server. After two days of debugging I 
> discovered that the problem seems to be caused by an insufficient 
> padding of a .1q tagged packets.
> 
> Currently, if a packet is too short, it is extended to 60(+4) octets for 
> both untagged and tagged ones. Unfortunately, when a .1Q tag is removed 
> on a receive side, such packet is likely to be dropped as it may become 
> too short (56 bytes):
> 
> This is a normal (working) ping with 84B (IP) + 14B (eth hdr) = 98B octets:
> # ping -c 2 192.168.0.194
> PING 192.168.0.194 (192.168.0.194) 56(84) bytes of data.
> 64 bytes from 192.168.0.194: icmp_seq=1 ttl=128 time=0.137 ms
> 64 bytes from 192.168.0.194: icmp_seq=2 ttl=128 time=0.141 ms
> 
> This is a shorter (working) ping with 46 (IP) + 14B (eth hdr) = 60B octets:
> # ping -c 2 192.168.0.194 -s 18
> PING 192.168.0.194 (192.168.0.194) 18(46) bytes of data.
> 26 bytes from 192.168.0.194: icmp_seq=1 ttl=128 time=0.137 ms
> 26 bytes from 192.168.0.194: icmp_seq=2 ttl=128 time=0.144 ms
> 
> This one does not work (45+14 = 59): # ping -c 2 192.168.0.194 -s 17
> PING 192.168.0.194 (192.168.0.194) 17(45) bytes of data.
> 
> --- 192.168.0.194 ping statistics ---
> 2 packets transmitted, 0 received, 100% packet loss, time 999ms
> 
> I believe that my problem can be solved if we start padding .1Q packets 
> with 4 more octets but I'm not able to find a proper place where to fix it.

Nice catch, if this really is the problem :) For a fix I'd suggest to
add a skb_ether_pad() function that performs the necessary padding
depending on skb->protocol and change the ethernet drivers to use it
instead of skb_padto().




  reply	other threads:[~2008-07-07 21:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-07 21:01 Wrong padding of short packets send by a tagged-vlan interface? Krzysztof Oledzki
2008-07-07 21:06 ` Patrick McHardy [this message]
2008-07-07 21:40   ` Krzysztof Oledzki
2008-07-07 21:54     ` David Miller
2008-07-07 21:06 ` Ben Greear
2008-07-07 21:12   ` Patrick McHardy
2008-07-07 21:29   ` Krzysztof Oledzki

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=4872854C.201@trash.net \
    --to=kaber@trash.net \
    --cc=greearb@candelatech.com \
    --cc=netdev@vger.kernel.org \
    --cc=olel@ans.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.