Skip to content

Pass IPv6 TCP packets to tcp6 gro_receive in homa_hijack_gro_receive - #138

Open
randomizedcoder wants to merge 1 commit into
PlatformLab:mainfrom
randomizedcoder:fix/hijack-gro-ipv6-tcp
Open

randomizedcoder wants to merge 1 commit into
PlatformLab:mainfrom
randomizedcoder:fix/hijack-gro-ipv6-tcp

Conversation

@randomizedcoder

Copy link
Copy Markdown
Contributor

homa_hijack_gro_receive is installed in both inet_offloads and inet6_offloads, but always passed non-Homa packets to the IPv4 TCP gro_receive; tcp6_net_offload was saved and never used. IPv6 TCP packets therefore went through tcp4_gro_receive, which treats the IPv6 header as an iphdr. homa_hijack_init runs at module load, so this affects all IPv6 TCP traffic on a host with Homa loaded.

  • Fix: choose tcp6_net_offload for IPv6 packets.
  • Test: homa_hijack_gro_receive__pass_to_tcp_ipv6 (the fixture already installs unit_tcp6_gro_receive, which nothing expected). The existing pass-through test relied on the default address family; it is pinned to IPv4 and renamed __pass_to_tcp_ipv4 to match __pass_to_homa_ipv4/ipv6.
  • Found by reading the code.

Verified: the new test fails before the fix and passes after; full unit suite 885/885 in both IPv6 and --ipv4 modes; homa.ko compiles warning-free on 7.3, normal and __STRIP__=1; checkpatch clean.

🤖 Generated with Claude Code

* homa_hijack_gro_receive is installed for both inet_offloads and
  inet6_offloads, but always passed non-Homa packets to the IPv4 TCP
  gro_receive, so IPv6 TCP packets went through tcp4_gro_receive
  (which treats the IPv6 header as an iphdr). homa_hijack_init runs
  at module load, so this affects all IPv6 TCP traffic.
* Use the saved tcp6_net_offload for IPv6 packets.
* Pin the existing pass-through test to IPv4 (it relied on the
  default) and add an IPv6 one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant