From: jamal <hadi@cyberus.ca>
To: Mandeep Singh Baines <mandeep.baines@gmail.com>
Cc: davem@davemloft.net, rick.jones2@hp.com, msb@google.com,
netdev@vger.kernel.org, grundler@google.com,
robert.olsson@its.uu.se, venza@brownhat.org
Subject: Re: pktgen terminating condition
Date: Wed, 29 Aug 2007 09:46:23 -0400 [thread overview]
Message-ID: <1188395183.4274.19.camel@localhost> (raw)
In-Reply-To: <20070829044352.GA4133@ludhiana>
On Tue, 2007-28-08 at 21:43 -0700, Mandeep Singh Baines wrote:
> I interpret this to mean that the interrupt gets generates after a packet
> is transferred to the TFIFO on the NIC and the next packet in the ring is
> NULL.
iow, when tx transits to idle ..
> This interrupt gets generates less often then TxOK which gets generated
> after every completed packet transmit. So I'm thinking that maybe the
> driver was written to use this interrupt instead of TxOK for this reason.
> Really just my speculation.
It does make sense if you are trying to cut down on tx interupts. It's a
little extreme - and if you dont have much memory it may not be the best
scheme. OTOH, you have moved to the other extreme imo ;-> You are
generating an interupt per tx packet. This may not matter on modern
hardware because that NIC seems to be Fast Ethernet.
You may wanna heed Dave's advice and just always set the idle on a
per-descriptor basis as well as txcomplete on every Xth packet (4 was
suggested).
Looking at sis900_start_xmit() at the spot where OWN is set
on the descriptor, theres possibly another bit in tx_ring[entry].cmdsts
you may could set that will ask for tx complete; which makes me wonder:
is that "outl(TxENA | inl(ioaddr + cr), ioaddr + cr)" really needed on a
per-packet basis? Should it not be sufficient to turn it on once at
open()?
> Anyway, if I rewrite the driver to use TxOK instead of TxIdle, pktgen
> works fine.
I think its a good thing pktgen caught this; i am unsure however if it
is doing the right thing. Hoping Robert would respond.
One thing pktgen could do is restrict the amount of outstanding buffers
by using accounting the way sockets do - this at least wont stop
progress as it did in your case.
> I'm attaching the patch.
Looks good to me given the desire. I would bounce it by whoever the
maintainer is - they may have some insights on the lazy tx prune habit.
cheers,
jamal
next parent reply other threads:[~2007-08-29 13:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1188347327.4305.27.camel@localhost>
[not found] ` <20070829044352.GA4133@ludhiana>
2007-08-29 13:46 ` jamal [this message]
2007-08-29 16:32 ` pktgen terminating condition Robert Olsson
2007-08-30 12:08 ` jamal
2007-08-31 5:19 ` David Miller
2007-08-31 13:46 ` jamal
2007-08-29 16:59 ` Mandeep Baines
2007-08-30 11:33 ` jamal
2007-08-31 12:17 ` Daniele Venzano
2007-08-31 13:50 ` jamal
[not found] ` <20070828.220402.15268351.davem@davemloft.net>
[not found] ` <535ddc6b0708290914k21d0b71fs21ea3b96c6fd7f4d@mail.gmail.com>
2007-08-29 16:26 ` Grant Grundler
2007-09-01 10:47 Daniele Venzano
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=1188395183.4274.19.camel@localhost \
--to=hadi@cyberus.ca \
--cc=davem@davemloft.net \
--cc=grundler@google.com \
--cc=mandeep.baines@gmail.com \
--cc=msb@google.com \
--cc=netdev@vger.kernel.org \
--cc=rick.jones2@hp.com \
--cc=robert.olsson@its.uu.se \
--cc=venza@brownhat.org \
/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).