public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: paul bilke <fsmail@conspiracy•net>
To: netdev@vger•kernel.org
Cc: gerrit@erg•abdn.ac.uk
Subject: Re: Udp packets received with improper length
Date: Mon, 28 Nov 2011 15:23:52 -0600	[thread overview]
Message-ID: <4ED3FBE8.2010006@conspiracy.net> (raw)
In-Reply-To: <4ECD540C.60108@conspiracy.net>

On 11/23/2011 2:14 PM, paul bilke wrote:
> We recently updated an embedded powerpc platform from 2.6.32 to 2.6.37.  When deployed in the field devices with the new kernel have started receiving truncated UDP packets from their mates across noisy links.  To test we wrote a simple client and
> server.  The client sends 512 byte packets with a sequence number to the server listening on a UDP socket.  On the client box we use netem to corrupt 100% of the packets sent(after transferring some data so arp cache is populated).  The server then
> dumps the length received and the serial number from any packets that are received.   Netem sometimes corrupts bits in the source MAC address so these packets arrive with valid UDP checksums and are delivered to the user application.   With the
> server running on the 2.6.32 box we send a few million packets to it and only receive packets that are exactly 512 bytes long.  When we do the same on the box running 2.6.37 we receive hundred of short packets, zero length and also 504 byte packets.
> When I use TCPdump on the box running 2.6.37 the truncate packets have valid checksums (Source MAC was corrupted by NETEM) and are of proper length (554 byte ethernet frame, 540 Byte IP portion and 520 byte UDP length) but the userland receives 504
> or 0 length in recvfrom. To see if this was just a powerpc related issue I repeated the test on x86 virtual machines.  A vm running 2.6.18 (Centos 5) receives only 512 byte packets.  On a vm running 2.6.40 (Fedora 15) I receive 512, 504 and 0 length
> packets.
<clip>

Reverting commit 81d54ec8479a2c695760da81f05b5a9fb2dbe40a makes this problem disappear. The patch looks sane, the results are problematic.
Paul Bilke

  reply	other threads:[~2011-11-28 21:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23 20:14 Udp packets received with improper length paul bilke
2011-11-28 21:23 ` paul bilke [this message]
2011-12-01 19:11   ` David Miller
2011-12-03  2:32     ` Gerrit Renker
2011-12-03  2:54       ` David Miller

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=4ED3FBE8.2010006@conspiracy.net \
    --to=fsmail@conspiracy$(echo .)net \
    --cc=gerrit@erg$(echo .)abdn.ac.uk \
    --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