diff mbox

[net-next,0/6] be2net: fixes

Message ID 1312906987.2371.51.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet Aug. 9, 2011, 4:23 p.m. UTC
Le mardi 09 août 2011 à 17:47 +0200, Eric Dumazet a écrit :
> Le mercredi 03 août 2011 à 11:27 +0530, Sathya Perla a écrit :
> 
> > Pls apply.
> > 
> > Sathya Perla (6):
> >   be2net: remove wrong and unnecessary calls to netif_carrier_off()
> >   be2net: no need to query link status
> >   be2net: non-member vlan pkts not received in promiscous mode
> >   be2net: use RX_FILTER cmd to program multicast addresses
> >   be2net: add support for flashing Teranetics PHY firmware
> >   be2net: drop pkts that do not belong to the port
> > 
> >  drivers/net/benet/be.h         |    8 ++-
> >  drivers/net/benet/be_cmds.c    |  140 +++++++++++++-----------------------
> >  drivers/net/benet/be_cmds.h    |   38 ++++------
> >  drivers/net/benet/be_ethtool.c |   32 ++-------
> >  drivers/net/benet/be_hw.h      |   21 ++++--
> >  drivers/net/benet/be_main.c    |  155 ++++++++++++++++++++++++----------------
> >  6 files changed, 185 insertions(+), 209 deletions(-)
> > 
> 
> Not sure which recent be2net patch is problematic on 32bit arches :
> 
> Kernel: arch/x86/boot/bzImage is ready  (#280)
>   Building modules, stage 2.
>   MODPOST 1854 modules
> ERROR: "__udivdi3" [drivers/net/benet/be2net.ko] undefined!
> make[1]: *** [__modpost] Erreur 1
> make: *** [modules] Erreur 2
> 
> Please fix this, thanks.
> 
> 

Comes from commit ac124ff973e27802797
(be2net: cleanup and refactor stats code)

be_rx_eqd_update() now performs u64 divides.

Following patch should be enough, there is no way packet count can
overwrap a long anyway between two samples...



[PATCH] benet: fix build error on 32bit arch

Error comes from commit ac124ff973e27802797
(be2net: cleanup and refactor stats code)

ERROR: "__udivdi3" [drivers/net/benet/be2net.ko] undefined!

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Sathya Perla <sathya.perla@emulex.com>
---
 drivers/net/benet/be_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



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

Sathya Perla Aug. 10, 2011, 10:15 a.m. UTC | #1
>From: Eric Dumazet [mailto:eric.dumazet@gmail.com]

>Sent: Tuesday, August 09, 2011 9:53 PM

>> >

>>

>> Not sure which recent be2net patch is problematic on 32bit arches :

>>

>> Kernel: arch/x86/boot/bzImage is ready  (#280)

>>   Building modules, stage 2.

>>   MODPOST 1854 modules

>> ERROR: "__udivdi3" [drivers/net/benet/be2net.ko] undefined!

>> make[1]: *** [__modpost] Erreur 1

>> make: *** [modules] Erreur 2

>>

>> Please fix this, thanks.

>>

>>

>

>Comes from commit ac124ff973e27802797

>(be2net: cleanup and refactor stats code)

>

>be_rx_eqd_update() now performs u64 divides.

>

>Following patch should be enough, there is no way packet count can

>overwrap a long anyway between two samples...

>

>

>

>[PATCH] benet: fix build error on 32bit arch

>

Thanks for the quick patch.

-Sathya
David Miller Aug. 12, 2011, 9:56 a.m. UTC | #2
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 09 Aug 2011 18:23:07 +0200

> [PATCH] benet: fix build error on 32bit arch
> 
> Error comes from commit ac124ff973e27802797
> (be2net: cleanup and refactor stats code)
> 
> ERROR: "__udivdi3" [drivers/net/benet/be2net.ko] undefined!
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: Sathya Perla <sathya.perla@emulex.com>

Applied.
--
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/benet/be_main.c b/drivers/net/benet/be_main.c
index 1a3acca..7c98d8e 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -936,7 +936,7 @@  static void be_rx_eqd_update(struct be_adapter *adapter, struct be_rx_obj *rxo)
 		pkts = stats->rx_pkts;
 	} while (u64_stats_fetch_retry_bh(&stats->sync, start));
 
-	stats->rx_pps = (pkts - stats->rx_pkts_prev) / (delta / HZ);
+	stats->rx_pps = (unsigned long)(pkts - stats->rx_pkts_prev) / (delta / HZ);
 	stats->rx_pkts_prev = pkts;
 	stats->rx_jiffies = now;
 	eqd = stats->rx_pps / 110000;