tcp: Improve the management on RX/TX buffers (based on a patch from G. Bosilca).