From: Jeff Garzik <jgarzik@pobox.com>
To: ravinandan.arakali@s2io.com
Cc: "'Francois Romieu'" <romieu@fr.zoreil.com>,
netdev@oss.sgi.com, leonid.grossman@s2io.com,
raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com
Subject: Re: [PATCH 2.6.9-rc2 6/8] S2io: new txd allocation
Date: Thu, 14 Oct 2004 10:58:18 -0400 [thread overview]
Message-ID: <416E940A.5010501@pobox.com> (raw)
In-Reply-To: <005201c4b18b$538b5ff0$6c10100a@S2IOtech.com>
Ravinandan Arakali wrote:
> Hi,
> The attached patch contains a modified scheme for allocating Tx descriptor
> blocks.
> More description follows.
>
> In the old scheme, the entire Tx descriptor space was allocated in one go.
> This could cause driver load to fail on systems with low(or scattered)
> memory. The Tx descriptor blocks are now allocated on per-page basis. A new
> structure (list_info) has been introduced in nic_t structure to keep track
> of the physical and virtual addresses of every TxD allocated this way.
>
> Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>
Comments:
1) spinlock in s2io_close looks questionable. at best you want to
minimize the area covered by it.
you are guaranteed that netif_running() will be false if the net stack
is calling, or has called, dev->stop() hook.
2) netif_queue_stopped() will never be false when your
dev->hard_start_xmit() hook is called
> + if ((netif_queue_stopped(dev)) || (!netif_carrier_ok(dev))) {
> + DBG_PRINT(TX_DBG, "%s:s2io_xmit: Tx Queue stopped\n",
> + dev->name);
> + dev_kfree_skb(skb);
> + spin_unlock_irqrestore(&sp->tx_lock, flags);
> + return 0;
> + }
> +
3) referencing the code above, you should (a) not free the package and
(b) return from the following codes listed in include/linux/netdevice.h:
#define NETDEV_TX_OK 0 /* driver took care of packet */
#define NETDEV_TX_BUSY 1 /* driver tx path was busy*/
#define NETDEV_TX_LOCKED -1 /* driver tx lock was already taken */
prev parent reply other threads:[~2004-10-14 14:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-14 1:15 [PATCH 2.6.9-rc2 6/8] S2io: new txd allocation Ravinandan Arakali
2004-10-14 14:58 ` Jeff Garzik [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=416E940A.5010501@pobox.com \
--to=jgarzik@pobox.com \
--cc=leonid.grossman@s2io.com \
--cc=netdev@oss.sgi.com \
--cc=raghavendra.koushik@s2io.com \
--cc=rapuru.sriram@s2io.com \
--cc=ravinandan.arakali@s2io.com \
--cc=romieu@fr.zoreil.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).