Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recirc pkt perform flow's state changing to fix lb offload #362

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/dp_cntrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,9 @@ static __rte_always_inline void dp_set_flow_offload_flag(struct rte_mbuf *m, str
dp_cntrack_change_flow_offload_flags(m, flow_val, df);
} else {

// recirc pkt shall not change flow's state because its ancestor has already done
if (dp_get_pkt_mark(m)->flags.is_recirc)
// after introducing vnf_type as part of the flow key, recirc pkt shall perform offload state changing
// instead of its ancestor pkt. Its ancestor pkt's flow still resides as before, but its state is not changing
if (df->vnf_type == DP_VNF_TYPE_LB)
return;

// when to offload reply pkt of a tcp flow is determined in dp_cntrack_set_timeout_tcp_flow
Expand Down Expand Up @@ -292,7 +293,7 @@ int dp_cntrack_handle(struct rte_node *node, struct rte_mbuf *m, struct dp_flow
flow_val->timestamp = pkt_timestamp;
last_fast_path_timestamp = pkt_timestamp;

if (df->l4_type == IPPROTO_TCP && !dp_get_pkt_mark(m)->flags.is_recirc) {
if (df->l4_type == IPPROTO_TCP && df->vnf_type != DP_VNF_TYPE_LB) {
tcp_hdr = (struct rte_tcp_hdr *) (ipv4_hdr + 1);
dp_cntrack_tcp_state(flow_val, tcp_hdr);
dp_cntrack_set_timeout_tcp_flow(m, flow_val, df);
Expand Down
Loading