Skip to content

Feature remove no conntrack#777

Merged
byteocean merged 4 commits into
mainfrom
feature-remove-no-conntrack
Jun 10, 2026
Merged

Feature remove no conntrack#777
byteocean merged 4 commits into
mainfrom
feature-remove-no-conntrack

Conversation

@PlagueCZ

Copy link
Copy Markdown
Contributor

This PR simply removes the option as it has no use anymore.

Fixes #416

@PlagueCZ PlagueCZ requested a review from a team as a code owner April 30, 2026 22:41
@github-actions github-actions Bot added documentation Improvements or additions to documentation size/M labels Apr 30, 2026
@PlagueCZ PlagueCZ marked this pull request as draft April 30, 2026 22:44
Guvenc Gulce added 3 commits May 5, 2026 21:49
Signed-off-by: Guvenc Gulce <guevenc.guelce@external.t-systems.com>
BOOTP (DHCP) packets were taking an unnecessarily long path through the
graph: conntrack → dnat → ipv4_lookup → dhcp. Since BOOTP traffic does
not require NAT or route lookup processing, route it directly from the
conntrack node to the dhcp node, and remove the redundant BOOTP check
in ipv4_lookup_node that forwarded to dhcp from there.

Signed-off-by: Guvenc Gulce <guevenc.guelce@external.t-systems.com>
Connection tracking is now always enabled. The --no-conntrack parameter
was originally provided to allow running without flow tracking, but it
is no longer needed and carrying it adds unnecessary conditional branches
throughout the packet-processing fast path.

Signed-off-by: Guvenc Gulce <guevenc.guelce@external.t-systems.com>
@PlagueCZ PlagueCZ force-pushed the feature-remove-no-conntrack branch from 351870b to 0a31eb2 Compare May 5, 2026 19:50

@PlagueCZ PlagueCZ left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I was first surprised by this change, I tried to explain how I understand the reason behing it.

Comment thread src/nodes/dnat_node.c

if (!cntrack)
goto out;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is were BOOTP traffic would jump to out because it has no conntrack.

if (DP_FAILED(dp_extract_l4_header(df, ipv4_hdr + 1)))
return CONNTRACK_NEXT_DROP;
if (df->l4_type == IPPROTO_UDP && df->l4_info.trans_port.dst_port == htons(DP_BOOTP_SRV_PORT))
return CONNTRACK_NEXT_DNAT;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where BOOTP was jumping to DNAT. As you can see this is before call to dp_cntrack_handle(), therefore this flow would be missing conntrack.

Comment thread src/nodes/dnat_node.c

out:
if (df->l3_type == RTE_ETHER_TYPE_IPV4)
return DNAT_NEXT_IPV4_LOOKUP;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here all BOOTP would go to IPV4_LOOKUP.

// TODO: add broadcast routes when machine is added
if (df->l4_type == IPPROTO_UDP && df->l4_info.trans_port.dst_port == htons(DP_BOOTP_SRV_PORT))
return IPV4_LOOKUP_NEXT_DHCP;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All BOOTP will be now redirected to DHCP.

return CONNTRACK_NEXT_DROP;
if (df->l4_type == IPPROTO_UDP && df->l4_info.trans_port.dst_port == htons(DP_BOOTP_SRV_PORT))
return CONNTRACK_NEXT_DNAT;
return CONNTRACK_NEXT_DHCP;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contrast with the original code - simply jump directly to DHCP.

@PlagueCZ PlagueCZ marked this pull request as ready for review May 5, 2026 19:54
struct dp_flow *df = dp_get_flow_ptr(m);
struct flow_value *cntrack = df->conntrack;

if (!cntrack)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reason why it is ok not to check if cntrack is null will be traced back to the 'routing' logic inside conntrack_node.c, which is a few nodes away from the current one.

maybe still worthy of using a simple assertion like assert(cntrack) here? (same for the other two places)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is actually a good idea, I put it into all five places I found. Please check.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks guys. looks good.

@byteocean byteocean merged commit 6b3aa29 into main Jun 10, 2026
5 of 6 checks passed
@byteocean byteocean deleted the feature-remove-no-conntrack branch June 10, 2026 07:42
@github-project-automation github-project-automation Bot moved this to Done in Roadmap Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/networking documentation Improvements or additions to documentation size/M

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Remove --no-conntrack option

3 participants