PCBGROUP + RSS: problem establishing an outgoing TCP connection
Andriy Gapon
avg at FreeBSD.org
Tue Sep 10 09:14:46 UTC 2019
This happens on an EC2 instance with ixv driver.
When I try to establish an outgoing TCP connection I see the following exchange.
Local side sends SYN, it receives SYN+ACK and immediately sends RST.
I tracked this down to in_pcblookup_mbuf() failing to find the corresponding inpcb.
I dug a bit deeper and this is my understanding of the issue.
When tcp_connect() calls in_pcbrehash() the inpcb gets placed into a group
determined by in_pcbgroup_bytuple() [see in_pcbgroup_update and
in_pcbgroup_byinpcb]. The inpcb does not have INP_RSS_BUCKET_SET. Both
addresses and ports are populated at that time.
When the reply packet is received, in_pcblookup_mbuf() uses in_pcbgroup_byhash()
to look up the group because the packet has M_HASHTYPE_RSS_TCP_IPV4.
The problem is that in_pcbgroup_byhash() returns a different group and the inpcb
cannot be found.
I am very new to this code, so I would appreciate any help with further
debugging and root causing the problem.
Thank you!
--
Andriy Gapon
More information about the freebsd-net
mailing list