From: Sascha Hauer <s.hauer@pengutronix.de>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, anantgole@ti.com, srk@ti.com
Subject: Re: [PATCH] net/davinci: do not use all descriptors for tx packets
Date: Wed, 4 Jan 2012 09:50:01 +0100 [thread overview]
Message-ID: <20120104085001.GM5446@pengutronix.de> (raw)
In-Reply-To: <20120103.135141.1199352202815384466.davem@davemloft.net>
On Tue, Jan 03, 2012 at 01:51:41PM -0500, David Miller wrote:
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Date: Tue, 3 Jan 2012 16:27:47 +0100
>
> > The driver uses a shared pool for both rx and tx descriptors.
> > During open it queues fixed number of 128 descriptors for receive
> > packets. For each received packet it tries to queue another
> > descriptor. If this fails the descriptor is lost for rx.
> > The driver has no limitation on tx descriptors to use, so it
> > can happen during a nmap / ping -f attack that the driver
> > allocates all descriptors for tx and looses all rx descriptors.
> > The driver stops working then.
> > To fix this limit the number of tx descriptors used to half of
> > the descriptors available, the rx path uses the other half.
> >
> > Tested on a custom board using nmap / ping -f to the board from
> > two different hosts.
> >
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
>
> Applied to net-next, thanks.
>
> Well, at this point there is not logical reason to have a shared
> descriptor pool unless the hardware requires it. Does it?
I don't have enough knowledge of the hardware to give an answer, but to
me it would appear like a very strange piece of hardware if it can
only receive *or* transmit depending on the type of the next descriptor.
I think the driver needs some cleanup in this area, but this is out of
skope for me at the moment.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2012-01-04 8:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-03 15:27 [PATCH] net/davinci: do not use all descriptors for tx packets Sascha Hauer
2012-01-03 18:51 ` David Miller
2012-01-04 8:50 ` Sascha Hauer [this message]
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=20120104085001.GM5446@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=anantgole@ti.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=srk@ti.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).