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: <1429043126-10829-1-git-send-email-ennoerlangen@gmail.com>
Date:	Tue, 14 Apr 2015 22:25:26 +0200
From:	Andreas Oetken <ennoerlangen@...glemail.com>
To:	Vince Bridgers <vbridger@...nsource.altera.com>,
	netdev@...r.kernel.org, nios2-dev@...ts.rocketboards.org
Cc:	Andreas Oetken <ennoerlangen@...il.com>,
	Andreas Oetken <andreas@...ken.name>
Subject: [PATCH 1/1] altera tse: Fix network-delays and -retransmissions after high throughput.

From: Andreas Oetken <andreas@...ken.name>

Fix bug which occurs when more than <limit> packets are available during napi-poll,
leading to "delays" and retransmissions on the network.

Check for (count < limit) before checking the get_rx_status in tse_rx-function. get_rx_status is reading from the response-fifo.
If there is currently a response in the fifo, reading the last byte of the response pops the value from the fifo.
If the limit is check as second condition and the limit is reached the fifo is popped but the packet is not processed.

Signed-off-by: Andreas Oetken <ennoerlangen@...il.com>
---
 drivers/net/ethernet/altera/altera_tse_main.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
index 6725dc0..b927b8b 100644
--- a/drivers/net/ethernet/altera/altera_tse_main.c
+++ b/drivers/net/ethernet/altera/altera_tse_main.c
@@ -376,8 +376,12 @@ static int tse_rx(struct altera_tse_private *priv, int limit)
 	u16 pktlength;
 	u16 pktstatus;
 
-	while (((rxstatus = priv->dmaops->get_rx_status(priv)) != 0) &&
-	       (count < limit))  {
+	/* Check for limit first. get_rx_status is reading the from the
+	* response-fifo. If there is a currently a response in the fifo,
+	* reading the last byte of the response pops the value from the fifo.
+	*/
+	while ((count < limit) &&
+		((rxstatus = priv->dmaops->get_rx_status(priv)) != 0)) {
 		pktstatus = rxstatus >> 16;
 		pktlength = rxstatus & 0xffff;
 
-- 
2.1.4

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