[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHrpEqQKSs801pAb-Hdh1G2uGS9oYqxsV-uwUMevyzHTry729w@mail.gmail.com>
Date: Fri, 25 Jan 2013 10:02:09 +0800
From: Frank Li <lznuaa@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Frank Li <Frank.Li@...escale.com>, shawn.guo@...aro.org,
B38611@...escale.com, davem@...emloft.net,
linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org,
s.hauer@...gutronix.de
Subject: Re: [PATCH v2 1/1 net-next] net: fec: add napi support to improve proformance
2013/1/24 Eric Dumazet <eric.dumazet@...il.com>:
> On Thu, 2013-01-24 at 15:58 +0800, Frank Li wrote:
>>
>> static irqreturn_t
>> @@ -805,6 +823,7 @@ fec_enet_interrupt(int irq, void *dev_id)
>> struct net_device *ndev = dev_id;
>> struct fec_enet_private *fep = netdev_priv(ndev);
>> uint int_events;
>> + ulong flags;
>> irqreturn_t ret = IRQ_NONE;
>>
>> do {
>> @@ -813,7 +832,14 @@ fec_enet_interrupt(int irq, void *dev_id)
>>
>> if (int_events & FEC_ENET_RXF) {
>> ret = IRQ_HANDLED;
>> - fec_enet_rx(ndev);
>> +
>> + spin_lock_irqsave(&fep->hw_lock, flags);
>
> You already are in a irq safe context, spin_lock() should be ok
Okay, I will fix it.
>
>> + /* Disable the RX interrupt */
>> + if (napi_schedule_prep(&fep->napi)) {
>> + fec_enet_rx_int_is_enabled(ndev, false);
>> + __napi_schedule(&fep->napi);
>> + }
>> + spin_unlock_irqrestore(&fep->hw_lock, flags);
>
> spin_unlock();
>
>> }
>>
>
>
> Same remark for the spin_lock_irqsave(&fep->tmreg_lock, flags) in
> fec_enet_tx()
>
Okay, but it is not related with NAPI support.
Need new patch for that.
>
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists