From: David Miller <davem@davemloft.net>
To: jon.mason@exar.com
Cc: netdev@vger.kernel.org, sreenivasa.honnur@exar.com, ram.vepa@exar.com
Subject: Re: [PATCH 2/6 net-next-2.6] vxge: Use fifo based trans_start time
Date: Thu, 08 Jul 2010 23:34:14 -0700 (PDT) [thread overview]
Message-ID: <20100708.233414.116369101.davem@davemloft.net> (raw)
In-Reply-To: <20100708192125.GB15167@exar.com>
From: Jon Mason <jon.mason@exar.com>
Date: Thu, 8 Jul 2010 14:21:26 -0500
> @@ -968,8 +969,10 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev)
> VXGE_HW_FIFO_TXD_TX_CKO_UDP_EN);
>
> vxge_hw_fifo_txdl_post(fifo_hw, dtr);
> +
> #ifdef NETIF_F_LLTX
> - dev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */
> + txq = netdev_get_tx_queue(dev, vpath_no);
> + txq->trans_start = jiffies;
> #endif
This comment was placed there not just for it's artistic value,
you should heed what it's saying when making changes like this.
NETIF_F_LLTX drivers cannot use the per-txq trans_start mechanism,
because doing so is racy.
The dev_watchdog() timer, which checks these ->trans_start values,
can only synchornize with the driver by the traditional means,
which is by taking the spinlock on the TX queue. This is bypassed
by NETIF_F_LLTX drivers, so the driver can be in it's TX handler
while the watchdog timer is trying to evaluate the trans_start
state.
This is one of a many reasons why NETIF_F_LLTX is a bad idea and you
should convert your driver away from it.
prev parent reply other threads:[~2010-07-09 6:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-08 19:21 [PATCH 2/6 net-next-2.6] vxge: Use fifo based trans_start time Jon Mason
2010-07-09 6:34 ` David Miller [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=20100708.233414.116369101.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jon.mason@exar.com \
--cc=netdev@vger.kernel.org \
--cc=ram.vepa@exar.com \
--cc=sreenivasa.honnur@exar.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).