nf_ct_gc_expired(tmp);
--- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c
-@@ -183,8 +183,27 @@ static const struct rhashtable_params nf
+@@ -183,6 +183,24 @@ static const struct rhashtable_params nf
.automatic_shrinking = true,
};
-+#define DAY (86400 * HZ)
++#define DAY (86400 * HZ)
+
+/* Set an arbitrary timeout large enough not to ever expire, this save
+ * us a check for the IPS_OFFLOAD_BIT from the packet path via
+
int flow_offload_add(struct nf_flowtable *flow_table, struct flow_offload *flow)
{
+ int err;
+@@ -203,6 +221,7 @@ int flow_offload_add(struct nf_flowtable
+ return err;
+ }
+ nf_ct_offload_timeout(flow);
flow->timeout = (u32)jiffies;
-
- rhashtable_insert_fast(&flow_table->rhashtable,
-@@ -305,6 +324,8 @@ static int nf_flow_offload_gc_step(struc
+ return 0;
+ }
+@@ -316,6 +335,8 @@ static int nf_flow_offload_gc_step(struc
rhashtable_walk_start(&hti);
while ((tuplehash = rhashtable_walk_next(&hti))) {
if (IS_ERR(tuplehash)) {
err = PTR_ERR(tuplehash);
if (err != -EAGAIN)
-@@ -317,9 +338,13 @@ static int nf_flow_offload_gc_step(struc
+@@ -328,9 +349,13 @@ static int nf_flow_offload_gc_step(struc
flow = container_of(tuplehash, struct flow_offload, tuplehash[0]);