All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: raghavendra.koushik@wipro.com
Cc: leonid.grossman@s2io.com, netdev@oss.sgi.com,
	raghavendra.koushik@s2io.com, ravinandan.arakali@s2io.com
Subject: Re: Submission for S2io 10GbE driver
Date: Thu, 26 Feb 2004 02:40:48 -0500	[thread overview]
Message-ID: <403DA300.1010005@pobox.com> (raw)
In-Reply-To: <4223A04BF7D1B941A25246ADD0462FF50115A824@blr-m3-msg.wipro.com>

raghavendra.koushik@wipro.com wrote:
> Jeff,
> 	some questions on few of your comments.
> 
> 
>>>30) do not call netif_stop_queue() and netif_wake_queue() on link
>>>events, in s2io_link.  Simply call netif_carrier_{on,off}.
> 
> 
> When link goes down and I just call netif_carrier_off the upper layer
> still continues to send packets to the s2io_xmit routine. In order to
> avoid this, I stop the queue and a corresponding wake when link returns.
> Is there any particular reason why this should be avoided?

Ignore me on this one, I am incorrect.


>>>28) are you aware that all of s2io_tx_watchdog is inside the
>>>dev->tx_lock spinlock?  I am concern s2io_tx_watchdog execution time may
>>>be quite excessive a duration to hold a spinlock.
> 
> 
> Actually no. The intention is to reset the NIC and re-initialize it in the
> tx_watchdog function and I'am not sure how else to do this.
> Do you foresee a problem with the current method, because for most part of
> the function the queue would be in a stopped state (the netif_stop_queue is
> called right on top of s2io_close and the queue is woken up at almost
> the end of s2io_open).

It is incorrect to perform any slow operation inside spin_lock_bh().

You can schedule_work() to perform the actual reset, for example, to get 
around this.


>>>29) never call netif_wake_queue() unconditionally.  only call it if you
>>>are 100% certain that the net stack is allowed to add another packet to
>>>your hardware's TX queue(s).
> 
> 
> I wake the queue in txIntrHandler without checking anything because at this
> point I'am certain that some free transmit descriptors are available for
> new xmit. The tx Interrupt arrives only after one or more Tx descriptor and
> buffer were successfully DMA'ed to the NIC and the ownership of these
> descriptor(s) is returned to the host.

OK, all good then.

	Jeff

  reply	other threads:[~2004-02-26  7:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-25  6:03 Submission for S2io 10GbE driver raghavendra.koushik
2004-02-26  7:40 ` Jeff Garzik [this message]
     [not found] <403573B5.4050100@pobox.com>
2004-02-20  2:59 ` ravinandan arakali
2004-02-20  3:30   ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2004-02-19  7:16 raghavendra.koushik
2004-02-19  8:14 ` Jeff Garzik
2004-02-20  2:33   ` ravinandan arakali
2004-02-05  0:49 FW: " Grant Grundler
2004-02-16 21:16 ` Leonid Grossman
2004-02-16 22:12   ` Jeff Garzik
2004-02-16 23:53     ` Leonid Grossman
2004-02-17  0:11   ` Christoph Hellwig
2004-02-17  0:16     ` Stephen Hemminger
2004-01-23 21:22 FW: " Leonid Grossman
2004-01-23 21:54 ` Stephen Hemminger
2004-01-23 21:58   ` Leonid Grossman
2004-01-23 22:22 ` FW: " Andi Kleen
2004-01-24  0:21   ` Stephen Hemminger
2004-01-27  5:32     ` Leonid Grossman
2004-01-27  6:08       ` Jeff Garzik
2004-01-27  6:19         ` Leonid Grossman

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=403DA300.1010005@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=leonid.grossman@s2io.com \
    --cc=netdev@oss.sgi.com \
    --cc=raghavendra.koushik@s2io.com \
    --cc=raghavendra.koushik@wipro.com \
    --cc=ravinandan.arakali@s2io.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.