Rebased from upstream / out of band repository.
[librecmc/librecmc.git] / target / linux / generic / pending-4.19 / 646-netfilter-nf_flow_table-rework-private-driver-data.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Fri, 27 Apr 2018 14:42:14 +0200
3 Subject: [PATCH] netfilter: nf_flow_table: rework private driver data
4
5 Move the timeout out of the union, since it can be shared between the
6 driver and the stack. Add a private pointer that the driver can use to
7 point to its own data structures
8
9 Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 ---
11
12 --- a/include/net/netfilter/nf_flow_table.h
13 +++ b/include/net/netfilter/nf_flow_table.h
14 @@ -81,9 +81,10 @@ struct flow_offload_tuple_rhash {
15  struct flow_offload {
16         struct flow_offload_tuple_rhash         tuplehash[FLOW_OFFLOAD_DIR_MAX];
17         u32                                     flags;
18 +       u32                                     timeout;
19         union {
20                 /* Your private driver data here. */
21 -               u32             timeout;
22 +               void *priv;
23         };
24  };
25