From: Gerrit Renker <[EMAIL PROTECTED]> Date: Mon, 12 Jun 2006 07:02:45 +0100
> This is clearly preferable - would it look like this: > > csum_copy_err: > UDP_INC_STATS_BH(UDP_MIB_INERRORS); > UDP_DEC_STATS_BH(UDP_MIB_INDATAGRAMS); /* requires new macro */ > > skb_kill_datagram(sk, skb, flags); > /* ... */ > > in udp_recvmsg? Here I must pass - there is no xxx_DEC_BH macro in > include/net/snmp.h and I don't know whether the following guess is correct: > > #define SNMP_DEC_STATS_BH(mib, field) \ > (per_cpu_ptr(mib[0], raw_smp_processor_id())->mibs[field]--) > > If this is correct, then it seems done; one could use this macro or add > a corresponding UDP_DEC_STATS_BH to include/net/udp.h . The index of mib[] in those macros is always "!in_softirq()", the *_BH() variants use zero for the index because they are called in contexts where we know that "!in_sortirq()" evaluates to false. So your SNMP_DEC_STATS_BH() macro is correct. Can you cook up the patch, which adds your SNMP_DEC_STATS_BH() macro, the UDP_DEC_STATS_BH counterpart, and the change that uses it in net/ipv4/udp.c? I'd appreciate this, thanks a lot. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html