netdev
[Top] [All Lists]

Re: [PATCH] pktgen handle netdev device getting full.

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Re: [PATCH] pktgen handle netdev device getting full.
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Thu, 16 Sep 2004 16:20:51 -0700
Cc: Ben Greear <greearb@xxxxxxxxxxxxxxx>, Robert.Olsson@xxxxxxxxxxx, davem@xxxxxxxxxx, netdev@xxxxxxxxxxx, hadi@xxxxxxxx
In-reply-to: <20040916155913.577b878b.davem@xxxxxxxxxxxxx>
Organization: Open Source Development Lab
References: <20040916144332.37f19fcb@xxxxxxxxxxxxxxxxxxxxx> <414A1AD2.1090109@xxxxxxxxxxxxxxx> <20040916155913.577b878b.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Thu, 16 Sep 2004 15:59:13 -0700
"David S. Miller" <davem@xxxxxxxxxxxxx> wrote:

> On Thu, 16 Sep 2004 15:59:30 -0700
> Ben Greear <greearb@xxxxxxxxxxxxxxx> wrote:
> 
> > Stephen Hemminger wrote:
> > > I was trying out pktgen on a NIC with an undersized ring, so 
> > > hard_start_xmit would always return non-zero when full.  This caused a 
> > > slew
> > > of console messages.  Better to just have pktgen retry in this case.
> > 
> > My understanding is that if the queue is not stopped, then you
> > should not get the hard xmit errors.  So, in a proper driver,
> > you should not see these printks.

Well the E1000 fill's it Tx ring and returns TX_BUSY, and on
SMP can also get TX_LOCKED now.  If that happens, the message shows up.
Several other drivers don't set stopped when ring is almost full, but
rely on scheduler to do it for them.


> That is absolutely correct, that is why Stephen's patch is
> not correct (aside from the do_div() part which I'll happily
> apply if submitted by itself).
> 
> > By the way, is there any interest in adding my patch that also allows
> > pktgen to receive packets (and count the statistics, etc)?  I know
> > DaveM objected to the hook in the skb-receive logic some time back,
> > but maybe he has a different opinion now?
> 
> I still object to this, it will be abused.

Robert also has a new version of pktgen but he wanted to hold off till
2.7, but now that 2.7 is delayed maybe it should come sooner.

<Prev in Thread] Current Thread [Next in Thread>