lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1359035768.12374.2083.camel@edumazet-glaptop>
Date:	Thu, 24 Jan 2013 05:56:08 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Frank Li <Frank.Li@...escale.com>
Cc:	lznuaa@...il.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

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

> +			/* 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()



--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ