Skip to content

Commit

Permalink
net: flow_offload: Add original direction flag to ct_metadata
Browse files Browse the repository at this point in the history
Give offloading drivers the direction of the offloaded ct flow,
this will be used for matches on direction (ct_state +/-rpl).

Signed-off-by: Paul Blakey <paulb@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Paul Blakey authored and kuba-moo committed Jan 30, 2021
1 parent 8c85d18 commit 941eff5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/net/flow_offload.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ struct flow_action_entry {
unsigned long cookie;
u32 mark;
u32 labels[4];
bool orig_dir;
} ct_metadata;
struct { /* FLOW_ACTION_MPLS_PUSH */
u32 label;
Expand Down
1 change: 1 addition & 0 deletions net/sched/act_ct.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ static void tcf_ct_flow_table_add_action_meta(struct nf_conn *ct,
IP_CT_ESTABLISHED_REPLY;
/* aligns with the CT reference on the SKB nf_ct_set */
entry->ct_metadata.cookie = (unsigned long)ct | ctinfo;
entry->ct_metadata.orig_dir = dir == IP_CT_DIR_ORIGINAL;

act_ct_labels = entry->ct_metadata.labels;
ct_labels = nf_ct_labels_find(ct);
Expand Down

0 comments on commit 941eff5

Please sign in to comment.