All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Kietzmann <peter.kietzmann@haw-hamburg.de>
To: Alexander Aring <alex.aring@gmail.com>,
	Michael Richardson <mcr@sandelman.ca>
Cc: linux-wpan@vger.kernel.org
Subject: Re: UDP stress-testing
Date: Thu, 14 Apr 2016 10:53:02 +0200	[thread overview]
Message-ID: <570F5A6E.3010009@haw-hamburg.de> (raw)
In-Reply-To: <20160413203440.GA4044@omega>

Hi,

thanks for giving this topic some informational background! As it was me 
triggering that discussion, I just wanted to give my linux-network-newie 
opinion back to you.

IMO "avoiding invalid fragments" has higher priority than "avoiding 
latency" for the reason that dropping one fragment means dropping all 
fragments of an IPv6 packet. Processing 1280B IPv6 packets leads to 14 
6LoWPAN fragments which we'd have processed for nothing when dropping 
one of them fragments. Therefore I like Alex's proposal about queuing 
6Lowpan fragments and checking space in the actual xmit queue. However, 
I currently don't know much about IPv6 fragmentation but probably one 
thing to be careful about is interaction between 6lo and IPv6 
fragmentation and possible amplification effects which could affect the 
needed txqueue size.

A simple solution for my test cases would have been an easy way to check 
the status of the transmit queue.

Best regards and thanks again for your feedback
Peter


Am 13.04.2016 um 22:34 schrieb Alexander Aring:
> Hi Michael,
>
> On Wed, Apr 13, 2016 at 08:50:22AM -0400, Michael Richardson wrote:
>>
>> Alexander Aring <alex.aring@gmail.com> wrote:
>>      > _All_ current supported transceivers have on hardware side _one_
>>      > framebuffer only.
>>
>>      > I would agree 3-4 frames should keep the transmitter buffer, because
>>      > only one framebuffer, 250kBit (even slower on sub 1-GHz) and holding
>>      > 3-4 skb's in background.
>>
>> If we are counting frames rather than packets, then I agree that 3-4 is too
>> low; we should accomodate 2-3 full-sized IPv6 packets worth of fragments.
>> 1280 / 88 = 14 * 3 = 42.
>> So I suggest somewhere between 32 and 48 as a good default.
>>
>> Well, we really ought to use the BQL to get the right number!
>>          https://lwn.net/Articles/469652/
>>
>
> ok, I looked into one example to provide BQL for some ethernet driver
> [0]. For SoftMAC we have for the flow-label stuff some helper
> functions [1].
>
> Maybe some point to start there and look what happens. :-)
>
>>      > On most systems the qdisc default is pfifo (but I remember something
>>      > that systemd changed to fq_codel as default).
>>
>> yes, fq_codel is often the default now.
>>
>>      > This will getting the queue full and with payload of 352 bytes it makes
>>      > fragments invalid because pfifo will drop some which is part of the
>>      > whole fragment.
>>
>> I had assumed that the fragmentation happened after the qdisc.
>>
>>      > What I know is, when we drop one fragment, then we could drop every
>>      > fragment inside the queue which comes from the whole fragmented 6lowpan
>>      > packet. it seems this will not be handled currently.
>>
>> This is very important, and why I had assumed that fragmentation was
>> afterwards.
>>
>
> We could implement the following:
>
> 1. Splitting fragments
> 2. While splitting don't call dev_queue_xmit directly.
>     Instead we have an own small queue where we first collect all fragments.
> 3. After all fragments are inside the queue we check if qdisc has the
>     "free slots" to store all fragments then, e.g.
>      if ((dev->tx_queue_len - qdisc_qlen(dev->qdisc) >= $FRAGMENTS)
>      then
>         for_each_skb_fragment
>            dev_queue_xmit...
>      else
>         drop;
>
> Something like that, but maybe I should look at first inside IPv6
> fragmentation deeper. I think they handled such case somehow, too. If
> not then IPv6 should handle it as well.
>
> It should be a similar issue there and we can hopefully grab some code
> from there.
>
> - Alex
>
> [0] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4a89ba04ecc6377696e4e26c1abc1cb5764decb9
> [1] http://lxr.free-electrons.com/source/net/mac802154/util.c#L22
>

-- 
Peter Kietzmann

Hamburg University of Applied Sciences
Dept. Informatik, Internet Technologies Group
Berliner Tor 7, 20099 Hamburg, Germany
Fon: +49-40-42875-8426
Web: http://www.haw-hamburg.de/inet

  reply	other threads:[~2016-04-14  8:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 20:19 UDP stress-testing Peter Kietzmann
2016-04-07 20:41 ` Alexander Aring
2016-04-08  7:22   ` Peter Kietzmann
2016-04-08 12:58     ` Alexander Aring
2016-04-13  0:00     ` Michael Richardson
2016-04-13  8:28       ` Alexander Aring
2016-04-13 12:50         ` Michael Richardson
2016-04-13 20:34           ` Alexander Aring
2016-04-14  8:53             ` Peter Kietzmann [this message]
2016-04-14 14:59               ` Alexander Aring

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=570F5A6E.3010009@haw-hamburg.de \
    --to=peter.kietzmann@haw-hamburg.de \
    --cc=alex.aring@gmail.com \
    --cc=linux-wpan@vger.kernel.org \
    --cc=mcr@sandelman.ca \
    /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.