diff mbox

hso: add missing last_rx setting

Message ID 20090604155019.6660.33231.stgit@Programuotojas
State Rejected, archived
Delegated to: David Miller
Headers show

Commit Message

Paulius Zaleckas June 4, 2009, 3:50 p.m. UTC
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
---

 drivers/net/usb/hso.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller June 4, 2009, 10:42 p.m. UTC | #1
From: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Date: Thu, 04 Jun 2009 18:50:23 +0300

> Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>

The core networking does this now for the drivers, they
don't need to do it themselves any longer.

Your patch is not correct.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paulius Zaleckas June 9, 2009, 2:05 p.m. UTC | #2
David Miller wrote:
> From: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
> Date: Thu, 04 Jun 2009 18:50:23 +0300
> 
>> Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
> 
> The core networking does this now for the drivers, they
> don't need to do it themselves any longer.

Where? I couldn't find it even in net-next...

> Your patch is not correct.
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Eric Dumazet June 9, 2009, 2:37 p.m. UTC | #3
Paulius Zaleckas a écrit :
> David Miller wrote:
>> From: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
>> Date: Thu, 04 Jun 2009 18:50:23 +0300
>>
>>> Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
>> The core networking does this now for the drivers, they
>> don't need to do it themselves any longer.
> 
> Where? I couldn't find it even in net-next...

vi +1937 include/linux/netdevice.h

/* On bonding slaves other than the currently active slave, suppress
 * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and
 * ARP on active-backup slaves with arp_validate enabled.
 */
static inline int skb_bond_should_drop(struct sk_buff *skb)
{
        struct net_device *dev = skb->dev;
        struct net_device *master = dev->master;

        if (master) {
                if (master->priv_flags & IFF_MASTER_ARPMON)
                        dev->last_rx = jiffies;

...



commit 6cf3f41e6c08bca6641a695449791c38a25f35ff
Author: Jay Vosburgh <fubar@us.ibm.com>
Date:   Mon Nov 3 18:16:50 2008 -0800

    bonding, net: Move last_rx update into bonding recv logic

        The only user of the net_device->last_rx field is bonding.
    This patch adds a conditional update of last_rx to the bonding special
    logic in skb_bond_should_drop, causing last_rx to only be updated when
    the ARP monitor is running.

        This frees network device drivers from the necessity of
    updating last_rx, which can have cache line thrash issues.

    Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index f84b78d..1064dda 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -958,8 +958,8 @@  static void packetizeRx(struct hso_net *odev, unsigned char *ip_pkt,
 
 				/* update out statistics */
 				odev->net->stats.rx_packets++;
-
 				odev->net->stats.rx_bytes += odev->rx_buf_size;
+				odev->net->last_rx = jiffies;
 
 				odev->rx_buf_size = 0;
 				odev->rx_buf_missing = sizeof(struct iphdr);