4 ms·
Another interesting thing is how stewardship of this logic and the comment right above it have diverged. Original: /* we drop only if the receive buf is ful
by jeffbee 7y ago
Another interesting thing is how stewardship of this logic and the comment right above it have diverged.
Original:
/* we drop only if the receive buf is full and the receive
* queue contains some other skb
*/
rmem = atomic_add_return(size, &sk->sk_rmem_alloc);
if ((rmem > sk->sk_rcvbuf) && (rmem > size))
goto uncharge_drop;
Later:
/* we drop only if the receive buf is full and the receive
* queue contains some other skb
*/
rmem = atomic_add_return(size, &sk->sk_rmem_alloc);
if (rmem > (size + sk->sk_rcvbuf))
goto uncharge_drop;
How does the comment correspond to each block?