All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: David Brownell <david-b@pacbell.net>
Cc: greearb@candelatech.com, jgarzik@pobox.com,
	scott.feldman@intel.com, netdev@oss.sgi.com
Subject: Re: e100 "Ferguson" release
Date: Sun, 3 Aug 2003 20:08:51 -0700	[thread overview]
Message-ID: <20030803200851.7d46a605.davem@redhat.com> (raw)
In-Reply-To: <3F2DCE56.6030601@pacbell.net>

On Sun, 03 Aug 2003 20:09:10 -0700
David Brownell <david-b@pacbell.net> wrote:

> David S. Miller wrote:
> >>Although I have not tried this latest patch, the existing e100 and e1000 in
> >>2.4.21 seldom seem to return true to this method:  netif_queue_stopped(odev),
> >>even when the next hard_start_xmit() call fails.
> > 
> > 
> > Returning an error from hard_start_xmit() from normal ethernet
> > drivers is, frankly, a driver bug and should never happen.
> 
> What's "normal" mean?

One that can manage it's own TX resources.

> With the current USB stack, network adapters tend to need
> memory allocations there.  Those can fail, though it seems
> that's not very common.  Doesn't seem like a bug, for all
> that I'd rather see the those paths be zero-alloc in 2.7.

Any particular reason why the SKB data itself can't be
mapped directly?  We created all of these DMA mapping
abstractions remember? :-)

Another option is to pre-allocate, such that while the TX
queue is awake we know we have enough resources to send any
given packet.  Then in ->hard_start_xmit() after using a buffer
we allocate a replacement buffer, if this fails in such a way
that a subsequent ->hard_start_xmit() could possibly fail, we
do netif_stop_queue().

Look to tg3 to see what I'm talking about in general.
netif_stop_queue() is done at the moment at which it may be possible
that we cannot accept the queueing of a TX packet.  This means that
when TX entries available <= MAX_SKB_FRAGS + 1, we stop the queue.
This guarentees that we will always be able to handle any packet given
to us via ->hard_start_xmit().

  reply	other threads:[~2003-08-04  3:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-03  4:34 e100 "Ferguson" release Feldman, Scott
2003-08-03  6:06 ` Jeff Garzik
2003-08-03  6:12   ` Jeff Garzik
2003-08-03  7:32   ` Ben Greear
2003-08-03  7:32     ` David S. Miller
2003-08-04  3:09       ` David Brownell
2003-08-04  3:08         ` David S. Miller [this message]
2003-08-04  3:45           ` David Brownell
2003-08-04  3:46             ` David S. Miller
2003-08-04  4:08               ` David Brownell
2003-08-04  4:13                 ` David S. Miller
2003-08-04 17:38                   ` David Brownell
2003-08-05  8:23     ` Felix Radensky
  -- strict thread matches above, loose matches on Subject: below --
2003-08-05  3:45 Feldman, Scott
2003-08-05  5:29 ` Jeff Garzik
2003-08-05  7:16 ` David S. Miller
2003-08-05 14:28 Feldman, Scott
2003-08-05 15:19 Feldman, Scott
2003-08-05 15:24 ` Jeff Garzik
2003-08-10  9:00   ` Felix Radensky
2003-08-05 15:44 ` Felix Radensky

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=20030803200851.7d46a605.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=david-b@pacbell.net \
    --cc=greearb@candelatech.com \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    --cc=scott.feldman@intel.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 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.