From: Florian Westphal <fw@strlen.de>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: Florian Westphal <fw@strlen.de>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Jay Cliburn <jcliburn@gmail.com>,
Chris Snook <chris.snook@gmail.com>
Subject: Re: [PATCH net-next 2/6] atl1c: remove private tx lock
Date: Mon, 25 Apr 2016 17:43:39 +0200 [thread overview]
Message-ID: <20160425154339.GA17538@breakpoint.cc> (raw)
In-Reply-To: <20160424220529.GA29377@electric-eye.fr.zoreil.com>
Francois Romieu <romieu@fr.zoreil.com> wrote:
> Florian Westphal <fw@strlen.de> :
> [...]
> > diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
> > index d0084d4..a3200ea 100644
> > --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
> > +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
> [...]
> > @@ -2217,16 +2215,10 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb,
> > }
> >
> > tpd_req = atl1c_cal_tpd_req(skb);
> > - if (!spin_trylock_irqsave(&adapter->tx_lock, flags)) {
> > - if (netif_msg_pktdata(adapter))
> > - dev_info(&adapter->pdev->dev, "tx locked\n");
> > - return NETDEV_TX_LOCKED;
> > - }
> >
> > if (atl1c_tpd_avail(adapter, type) < tpd_req) {
> > /* no enough descriptor, just stop queue */
> > netif_stop_queue(netdev);
> > - spin_unlock_irqrestore(&adapter->tx_lock, flags);
> > return NETDEV_TX_BUSY;
> > }
> >
>
> Play it safe and keep the implicit local_irq_{save / restore} call ?
>
> It may not be needed but it will help avoiding any unexpected regression
> report pointing at the NETDEV_TX_LOCKED removal change.
I thought about that but it doesn't prevent the irq handler from
running on another CPU, so leaving it around seemed like cargo culting
to me...
I don't have an atl1c, but the atl1e in my laptop seems to work fine
with the (similar) change.
If you disagree I can respin with local_irq_save of course, but, if
'playing it safe' is main goal then its simpler to convert
spin_trylock_irqsave to spin_lock_irqsave.
next prev parent reply other threads:[~2016-04-25 15:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-24 19:38 [PATCH net-next 0/6] net: core: remove TX_LOCKED support Florian Westphal
2016-04-24 19:38 ` [PATCH net-next 1/6] RDMA/nes: remove use of NETDEV_TX_LOCKED Florian Westphal
2016-04-24 19:38 ` Florian Westphal
2016-04-24 19:38 ` [PATCH net-next 2/6] atl1c: remove private tx lock Florian Westphal
2016-04-24 22:03 ` Francois Romieu
2016-04-24 22:05 ` Francois Romieu
2016-04-25 15:43 ` Florian Westphal [this message]
2016-04-25 23:16 ` Francois Romieu
2016-04-24 19:38 ` [PATCH net-next 3/6] atle1: remove LLTX support and TX_UNLOCKED Florian Westphal
2016-04-24 19:38 ` [PATCH net-next 4/6] drivers: net: use NETDEV_TX_OK instead of NETDEV_TX_LOCKED Florian Westphal
2016-04-24 19:38 ` Florian Westphal
2016-04-24 19:38 ` [PATCH net-next 5/6] drivers: net: remove NETDEV_TX_LOCKED Florian Westphal
2016-04-24 19:38 ` [PATCH net-next 6/6] net: remove NETDEV_TX_LOCKED support Florian Westphal
2016-04-26 19:53 ` [PATCH net-next 0/6] net: core: remove TX_LOCKED support David Miller
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=20160425154339.GA17538@breakpoint.cc \
--to=fw@strlen.de \
--cc=chris.snook@gmail.com \
--cc=jcliburn@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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 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.