patch-2.3.41 linux/net/ipv4/ip_input.c
Next file: linux/net/ipv4/ip_output.c
Previous file: linux/net/ipv4/arp.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Sat Jan 22 11:54:57 2000
- Orig file:
v2.3.40/linux/net/ipv4/ip_input.c
- Orig date:
Tue Jan 11 22:31:46 2000
diff -u --recursive --new-file v2.3.40/linux/net/ipv4/ip_input.c linux/net/ipv4/ip_input.c
@@ -5,7 +5,7 @@
*
* The Internet Protocol (IP) module.
*
- * Version: $Id: ip_input.c,v 1.44 2000/01/09 02:19:30 davem Exp $
+ * Version: $Id: ip_input.c,v 1.45 2000/01/16 05:11:22 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -317,13 +317,12 @@
#ifdef CONFIG_NET_CLS_ROUTE
if (skb->dst->tclassid) {
+ struct ip_rt_acct *st = ip_rt_acct + 256*smp_processor_id();
u32 idx = skb->dst->tclassid;
- write_lock(&ip_rt_acct_lock);
- ip_rt_acct[idx&0xFF].o_packets++;
- ip_rt_acct[idx&0xFF].o_bytes+=skb->len;
- ip_rt_acct[(idx>>16)&0xFF].i_packets++;
- ip_rt_acct[(idx>>16)&0xFF].i_bytes+=skb->len;
- write_unlock(&ip_rt_acct_lock);
+ st[idx&0xFF].o_packets++;
+ st[idx&0xFF].o_bytes+=skb->len;
+ st[(idx>>16)&0xFF].i_packets++;
+ st[(idx>>16)&0xFF].i_bytes+=skb->len;
}
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)