The tcp resassembly code does not flush the odp_packets which are attached to the tcp_segment while closing the connection and flushing the tcp reassembly list.
In file ofp_tcp_reass.c
void
ofp_tcp_reass_flush(struct tcpcb tp)
{
struct tseg_qent qe;
INP_WLOCK_ASSERT(tp->t_inpcb);
while ((qe = OFP_LIST_FIRST(&tp->t_segq)) != NULL) {
OFP_LIST_REMOVE(qe, tqe_q);
odp_packet_free(qe->tqe_m); // This code is necessary to free the odp packets which are held by the tcp segments as part of re-assembly list.**
uma_zfree(V_tcp_reass_zone, qe);
tp->t_segqlen--;
}
KASSERT((tp->t_segqlen == 0),
("TCP reass queue %p segment count is %d instead of 0 after flush.",
tp, tp->t_segqlen));
}
After having this fix in code, we dont see any packet buffer leaks. Please let me know if its ok , then I can push the changes.
Have submitted changes for review!
The tcp resassembly code does not flush the odp_packets which are attached to the tcp_segment while closing the connection and flushing the tcp reassembly list. In file ofp_tcp_reass.c void ofp_tcp_reass_flush(struct tcpcb tp) { struct tseg_qent qe;
}
After having this fix in code, we dont see any packet buffer leaks. Please let me know if its ok , then I can push the changes. Have submitted changes for review!