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-next>] [day] [month] [year] [list]
Message-ID: <ccee0048-9399-3d13-8274-790833b992d9@solarflare.com>
Date:   Mon, 6 Feb 2017 16:50:55 +0000
From:   Bert Kenward <bkenward@...arflare.com>
To:     Dave Miller <davem@...emloft.net>
CC:     netdev <netdev@...r.kernel.org>,
        Solarflare Linux Maintainers <linux-net-drivers@...arflare.com>,
        Eric Dumazet <edumazet@...gle.com>
Subject: [PATCH net-next] sfc: don't rearm interrupts if busy polling

Since commit 364b6055738b ("net: busy-poll: return busypolling status
to drivers"), napi_complete_done() returns a boolean that can be used
by drivers to conditionally rearm interrupts.

Testing with a 7142 shows a small latency improvement of ~100 ns.

Signed-off-by: Bert Kenward <bkenward@...arflare.com>
Cc: Eric Dumazet <edumazet@...gle.com>
---
 drivers/net/ethernet/sfc/efx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index fcd4eeecfef4..c28cd9daf949 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -328,8 +328,8 @@ static int efx_poll(struct napi_struct *napi, int budget)
 		 * since efx_nic_eventq_read_ack() will have no effect if
 		 * interrupts have already been disabled.
 		 */
-		napi_complete_done(napi, spent);
-		efx_nic_eventq_read_ack(channel);
+		if (napi_complete_done(napi, spent))
+			efx_nic_eventq_read_ack(channel);
 	}
 
 	return spent;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ