From: Sridhar S. <sr...@us...> - 2003-11-10 18:29:30
|
Yes, This is bug and we are incrementing checksum errors twice. Currently we don't have a counter to count errors other than checksum errors. So looks like we used the same counter even for other errors which is wrong. The correct solution is to remove SCTP_INC_STATS(SctpChecksumErrors) from sctp_rcv(). sctp_rcv() will be called only in BH context. So SCTP_INC_STATS_BH is the right macro to use. Thanks Sridhar On Mon, 10 Nov 2003, Chandrasekhar V wrote: > Greetings!! > > I am confused to see the below code while going through sctp_rcv() > function. Could someone please explain if I am missing some thing here? > > ----------------------------- > Code from function sctp_rcv_checksum(): > > sctp_rcv_checksum() function increments checksum stats using the code > SCTP_INC_STATS_BH(SctpChecksumErrors); > --------------------------------------------- > > Code from function sctp_rcv(): > > if (sctp_rcv_checksum(skb) < 0) > goto bad_packet; > > There is again code present in this function as below: > bad_packet: > SCTP_INC_STATS(SctpChecksumErrors); > ---------------------------------- > > Are the checksum stats for SctpChecksumErrors being incremented twice? > Can in_softirq() value be different each time sctp_rcv() is executed? > > Thanks for your time, > Chandu > > > > > > |