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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <4B69AAA9.20505@majjas.com>
Date:	Wed, 03 Feb 2010 11:56:09 -0500
From:	Michael Breuer <mbreuer@...jas.com>
To:	netdev@...r.kernel.org
Cc:	Stephen Hemminger <shemminger@...ux-foundation.org>
Subject: [PATCH] sky2: Flow control frames recorded as dropped packets

When a flow control packet is received, sky2_receive resubmits the i/o. 
Upon exit, sky2_status_intr counts these as dropped packets.

This fix just skips the rx_dropped accounting in this one case. It 
didn't seem worthwhile to change sky2_receive to deal differently.

This is my first patch submission - comments more than welcome.

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 95fd10f..bcb035c 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2525,7 +2517,8 @@ static int sky2_status_intr(struct sky2_hw *hw, 
int to_do, u16 idx)
                         total_bytes[port] += length;
                         skb = sky2_receive(dev, length, status);
                         if (unlikely(!skb)) {
-                               dev->stats.rx_dropped++;
+                               if (!(status & GMR_FS_GOOD_FC) )
+                                       dev->stats.rx_dropped++;
                                 break;
                         }

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