Message ID | 1312906987.2371.51.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
>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
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 --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;