netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Eli Cohen <eli@dev.mellanox.co.il>
Cc: netdev@vger.kernel.org, themann@de.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: LRO num of frags limit
Date: Tue, 16 Sep 2008 11:40:17 +0100	[thread overview]
Message-ID: <1221561617.3244.78.camel@achroite> (raw)
In-Reply-To: <20080916073632.GA25226@mtls03>

On Tue, 2008-09-16 at 10:36 +0300, Eli Cohen wrote:
> Hi,
> 
> looking at the LRO code, at __lro_proc_segment(), it seems that the
> network driver can configure lro_mgr->max_aggr to any value it wants
> while the number of fragments aggregated must not exceed MAX_SKB_FRAGS

Correct.

> (since we only use a single SKB to aggregate fragments, allocated by
> lro_gen_skb()). Moreover, even if the driver does limit
> lro_mgr->max_aggr to MAX_SKB_FRAGS, it might still cause overflow
> since subsequent aggregations are done at lro_add_frags() which is
> called before checking whether we overflow.

So you must set max_aggr to
MAX_SKB_FRAGS - max number of frags added at once + 1.

> If the above observation is correct, I can send a patch.

I would be interested to see that, anyway.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


  reply	other threads:[~2008-09-16 10:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16  7:36 LRO num of frags limit Eli Cohen
2008-09-16 10:40 ` Ben Hutchings [this message]
2008-09-16 15:25   ` Eli Cohen

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=1221561617.3244.78.camel@achroite \
    --to=bhutchings@solarflare.com \
    --cc=eli@dev.mellanox.co.il \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=themann@de.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).