Date: Tue, 10 Sep 2019 12:14:40 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: PCBGROUP + RSS: problem establishing an outgoing TCP connection Message-ID: <db5f87ba-990c-cf22-97e5-10ada01df529@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?db5f87ba-990c-cf22-97e5-10ada01df529>