]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net: flow_offload: Add original direction flag to ct_metadata
authorPaul Blakey <paulb@nvidia.com>
Wed, 27 Jan 2021 14:32:46 +0000 (16:32 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 30 Jan 2021 02:05:30 +0000 (18:05 -0800)
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>
include/net/flow_offload.h
net/sched/act_ct.c

index 123b1e9ea304a190f89409e5c3619835200635a1..e6bd8ebf9ac333c7d6cecc1809c6c4adef857d7f 100644 (file)
@@ -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;
index b3442078aabcd83b9c37930e56d2b0d9f3cca100..f0a0aa125b00ad9e34725daf0ce4457d2d2ec32c 100644 (file)
@@ -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);