From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev <netdev@vger.kernel.org>, SH-Linux <linux-sh@vger.kernel.org>
Subject: Re: [PATCH v4 6/6] net: sh_eth: use NAPI
Date: Fri, 18 May 2012 01:44:43 +0000 [thread overview]
Message-ID: <4FB5A98B.501@renesas.com> (raw)
In-Reply-To: <20120517103308.GA15830@electric-eye.fr.zoreil.com>
2012/05/17 19:33, Francois Romieu wrote:
> Shimoda, Yoshihiro <yoshihiro.shimoda.uh@renesas.com> :
> [...]
>> diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
>> index c64a31c..edc7dfe 100644
>> --- a/drivers/net/ethernet/renesas/sh_eth.c
>> +++ b/drivers/net/ethernet/renesas/sh_eth.c
> [...]
< snip >
>> @@ -1678,19 +1710,15 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
>> struct sh_eth_private *mdp = netdev_priv(ndev);
>> struct sh_eth_txdesc *txdesc;
>> u32 entry;
>> - unsigned long flags;
>>
>> - spin_lock_irqsave(&mdp->lock, flags);
>> if ((mdp->cur_tx - mdp->dirty_tx) >= (mdp->num_tx_ring - 4)) {
>> if (!sh_eth_txfree(ndev)) {
>
> There are now two racing sh_eth_txfree and there is no [PATCH v4 7/6].
>
> If I may suggest a slightly different approach, I would apply the patch
> below before anything NAPI related:
Thank you very much for the suggestion. I will modify the NAPI patch to fix
the racing using your suggestion.
(Because the original driver (before NAPI) was already locked by mdp->lock
in sh_eth_interrupt(), I think that the original driver doesn't have the
racing issue.)
Best regards,
Yoshihiro Shimoda
WARNING: multiple messages have this Message-ID (diff)
From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev <netdev@vger.kernel.org>, SH-Linux <linux-sh@vger.kernel.org>
Subject: Re: [PATCH v4 6/6] net: sh_eth: use NAPI
Date: Fri, 18 May 2012 10:44:43 +0900 [thread overview]
Message-ID: <4FB5A98B.501@renesas.com> (raw)
In-Reply-To: <20120517103308.GA15830@electric-eye.fr.zoreil.com>
2012/05/17 19:33, Francois Romieu wrote:
> Shimoda, Yoshihiro <yoshihiro.shimoda.uh@renesas.com> :
> [...]
>> diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
>> index c64a31c..edc7dfe 100644
>> --- a/drivers/net/ethernet/renesas/sh_eth.c
>> +++ b/drivers/net/ethernet/renesas/sh_eth.c
> [...]
< snip >
>> @@ -1678,19 +1710,15 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
>> struct sh_eth_private *mdp = netdev_priv(ndev);
>> struct sh_eth_txdesc *txdesc;
>> u32 entry;
>> - unsigned long flags;
>>
>> - spin_lock_irqsave(&mdp->lock, flags);
>> if ((mdp->cur_tx - mdp->dirty_tx) >= (mdp->num_tx_ring - 4)) {
>> if (!sh_eth_txfree(ndev)) {
>
> There are now two racing sh_eth_txfree and there is no [PATCH v4 7/6].
>
> If I may suggest a slightly different approach, I would apply the patch
> below before anything NAPI related:
Thank you very much for the suggestion. I will modify the NAPI patch to fix
the racing using your suggestion.
(Because the original driver (before NAPI) was already locked by mdp->lock
in sh_eth_interrupt(), I think that the original driver doesn't have the
racing issue.)
Best regards,
Yoshihiro Shimoda
next prev parent reply other threads:[~2012-05-18 1:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 4:29 [PATCH v4 6/6] net: sh_eth: use NAPI Shimoda, Yoshihiro
2012-05-16 4:29 ` Shimoda, Yoshihiro
2012-05-17 10:33 ` Francois Romieu
2012-05-17 10:33 ` Francois Romieu
2012-05-18 1:44 ` Shimoda, Yoshihiro [this message]
2012-05-18 1:44 ` Shimoda, Yoshihiro
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=4FB5A98B.501@renesas.com \
--to=yoshihiro.shimoda.uh@renesas.com \
--cc=linux-sh@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.