I think that tcp_collapse does this kind of aggregation when we have memory
pressure: will create a new skb and move the data from the old skbs in the
new one, freeing the old skb. Right?
Hmm, I didn't thought about this, but you are right, we could have other
consumer sneaking in.
If the consumer didn't consume data, the seq number will not be updated, and
seq-1 will correspond to a previous skb, which was already dequeued and
processed. Thus tcp_recv_skb(seq-1) will return NULL.
If the skb was partially consumed then tcp_recv_skb(seq-1) will return the
same skb and the offset +1 != skb->len, thus we will not free it.
I didn't get this part, shouldn't the entity which dequeues the packet also
free it?
Anyways, I am a newbie in this area, so if my logic doesn't make any sense
please be patient with me :)
Thanks,
tavi
--
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