Skip to content

Commit

Permalink
duplicate decap flow rules on both PFs to mitigate route inconsistenc…
Browse files Browse the repository at this point in the history
…e issue
  • Loading branch information
byteocean committed Aug 1, 2023
1 parent 41c06ee commit f7b43be
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/rte_flow/dp_rte_flow_traffic_forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ static __rte_always_inline int dp_offload_handle_tunnel_encap_traffic(struct rte
return 1;
}

static __rte_always_inline int dp_offload_handle_tunnel_decap_traffic(struct rte_mbuf *m, struct dp_flow *df)
static __rte_always_inline int dp_offload_handle_tunnel_decap_traffic(struct rte_mbuf *m, struct dp_flow *df, bool cross_pf_port)
{
bool cross_pf_port = m->port == dp_port_get_pf0_id() ? false : true;
m->port = cross_pf_port ? dp_port_get_pf1_id() : dp_port_get_pf0_id();

struct rte_flow_attr attr;
int hairpin_pattern_cnt = 0;
Expand Down Expand Up @@ -934,8 +934,10 @@ int dp_offload_handler(struct rte_mbuf *m, struct dp_flow *df)
if (df->flags.flow_type == DP_FLOW_TYPE_LOCAL)
return dp_offload_handle_local_traffic(m, df);

if (df->flags.flow_type == DP_FLOW_TYPE_INCOMING)
return dp_offload_handle_tunnel_decap_traffic(m, df);
if (df->flags.flow_type == DP_FLOW_TYPE_INCOMING) {
dp_offload_handle_tunnel_decap_traffic(m, df, false);
dp_offload_handle_tunnel_decap_traffic(m, df, true);
}

if (df->flags.flow_type == DP_FLOW_TYPE_OUTGOING) {
if (df->conntrack->nf_info.nat_type == DP_FLOW_NAT_TYPE_NETWORK_NEIGH
Expand Down

0 comments on commit f7b43be

Please sign in to comment.