kernel: bump 4.19 to 4.19.51

Refreshed all patches.

Altered patches:
- 370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch
- 220-optimize_inlining.patch
- 640-netfilter-nf_flow_table-add-hardware-offload-support.patch

This patch also restores the initial implementation
of the ath79 perfcount IRQ issue. (78ee6b1a40)
It was wrongfully backported upstream initially and got reverted now.

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
This commit is contained in:
Koen Vandeputte 2019-06-17 13:31:05 +02:00
parent de5105febe
commit cf65262492
11 changed files with 142 additions and 60 deletions

View File

@ -8,11 +8,11 @@ endif
LINUX_VERSION-4.9 = .181 LINUX_VERSION-4.9 = .181
LINUX_VERSION-4.14 = .126 LINUX_VERSION-4.14 = .126
LINUX_VERSION-4.19 = .50 LINUX_VERSION-4.19 = .51
LINUX_KERNEL_HASH-4.9.181 = 8fcd223e11cba322801bc38cdb8b581d64c0115f585dcb6604de8561b574fced LINUX_KERNEL_HASH-4.9.181 = 8fcd223e11cba322801bc38cdb8b581d64c0115f585dcb6604de8561b574fced
LINUX_KERNEL_HASH-4.14.126 = 6a2e89504d8560b132ab743a0206ffce026bff2697b705819421c5f125633970 LINUX_KERNEL_HASH-4.14.126 = 6a2e89504d8560b132ab743a0206ffce026bff2697b705819421c5f125633970
LINUX_KERNEL_HASH-4.19.50 = a9987423918abd20ee68d6e9b14b7225eaca8a586bf75fb56c49f6e1e47ce01e LINUX_KERNEL_HASH-4.19.51 = 7afa920d776f8ca3fc3ced5026cc02c5ccc960c58314050982c307589b5a8d70
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

View File

@ -10,7 +10,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
--- a/net/netfilter/nf_flow_table_core.c --- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c
@@ -520,5 +520,35 @@ void nf_flow_table_free(struct nf_flowta @@ -531,5 +531,35 @@ void nf_flow_table_free(struct nf_flowta
} }
EXPORT_SYMBOL_GPL(nf_flow_table_free); EXPORT_SYMBOL_GPL(nf_flow_table_free);
@ -48,7 +48,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
MODULE_AUTHOR("Pablo Neira Ayuso <pablo@netfilter.org>"); MODULE_AUTHOR("Pablo Neira Ayuso <pablo@netfilter.org>");
--- a/net/netfilter/nft_flow_offload.c --- a/net/netfilter/nft_flow_offload.c
+++ b/net/netfilter/nft_flow_offload.c +++ b/net/netfilter/nft_flow_offload.c
@@ -196,47 +196,14 @@ static struct nft_expr_type nft_flow_off @@ -197,47 +197,14 @@ static struct nft_expr_type nft_flow_off
.owner = THIS_MODULE, .owner = THIS_MODULE,
}; };

View File

@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/netfilter/nf_flow_table_ip.c --- a/net/netfilter/nf_flow_table_ip.c
+++ b/net/netfilter/nf_flow_table_ip.c +++ b/net/netfilter/nf_flow_table_ip.c
@@ -241,7 +241,7 @@ nf_flow_offload_ip_hook(void *priv, stru @@ -244,7 +244,7 @@ nf_flow_offload_ip_hook(void *priv, stru
dir = tuplehash->tuple.dir; dir = tuplehash->tuple.dir;
flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]); flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]);
@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (unlikely(nf_flow_exceeds_mtu(skb, flow->tuplehash[dir].tuple.mtu)) && if (unlikely(nf_flow_exceeds_mtu(skb, flow->tuplehash[dir].tuple.mtu)) &&
(ip_hdr(skb)->frag_off & htons(IP_DF)) != 0) (ip_hdr(skb)->frag_off & htons(IP_DF)) != 0)
@@ -459,7 +459,7 @@ nf_flow_offload_ipv6_hook(void *priv, st @@ -465,7 +465,7 @@ nf_flow_offload_ipv6_hook(void *priv, st
dir = tuplehash->tuple.dir; dir = tuplehash->tuple.dir;
flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]); flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]);

View File

@ -54,11 +54,11 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
nf_ct_gc_expired(tmp); nf_ct_gc_expired(tmp);
--- a/net/netfilter/nf_flow_table_core.c --- a/net/netfilter/nf_flow_table_core.c
+++ b/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, .automatic_shrinking = true,
}; };
+#define DAY (86400 * HZ) +#define DAY (86400 * HZ)
+ +
+/* Set an arbitrary timeout large enough not to ever expire, this save +/* 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 + * us a check for the IPS_OFFLOAD_BIT from the packet path via
@ -78,11 +78,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ +
int flow_offload_add(struct nf_flowtable *flow_table, struct flow_offload *flow) 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); + nf_ct_offload_timeout(flow);
flow->timeout = (u32)jiffies; flow->timeout = (u32)jiffies;
return 0;
rhashtable_insert_fast(&flow_table->rhashtable, }
@@ -305,6 +324,8 @@ static int nf_flow_offload_gc_step(struc @@ -316,6 +335,8 @@ static int nf_flow_offload_gc_step(struc
rhashtable_walk_start(&hti); rhashtable_walk_start(&hti);
while ((tuplehash = rhashtable_walk_next(&hti))) { while ((tuplehash = rhashtable_walk_next(&hti))) {
@ -91,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (IS_ERR(tuplehash)) { if (IS_ERR(tuplehash)) {
err = PTR_ERR(tuplehash); err = PTR_ERR(tuplehash);
if (err != -EAGAIN) 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]); flow = container_of(tuplehash, struct flow_offload, tuplehash[0]);

View File

@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/netfilter/nf_flow_table_core.c --- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c
@@ -231,6 +231,9 @@ static void flow_offload_del(struct nf_f @@ -242,6 +242,9 @@ static void flow_offload_del(struct nf_f
e = container_of(flow, struct flow_offload_entry, flow); e = container_of(flow, struct flow_offload_entry, flow);
clear_bit(IPS_OFFLOAD_BIT, &e->ct->status); clear_bit(IPS_OFFLOAD_BIT, &e->ct->status);

View File

@ -52,7 +52,7 @@
/* For layer 4 checksum field offset. */ /* For layer 4 checksum field offset. */
#include <linux/tcp.h> #include <linux/tcp.h>
#include <linux/udp.h> #include <linux/udp.h>
@@ -265,6 +266,7 @@ nf_flow_offload_ip_hook(void *priv, stru @@ -268,6 +269,7 @@ nf_flow_offload_ip_hook(void *priv, stru
skb->dev = outdev; skb->dev = outdev;
nexthop = rt_nexthop(rt, flow->tuplehash[!dir].tuple.src_v4.s_addr); nexthop = rt_nexthop(rt, flow->tuplehash[!dir].tuple.src_v4.s_addr);
skb_dst_set_noref(skb, &rt->dst); skb_dst_set_noref(skb, &rt->dst);
@ -60,7 +60,7 @@
neigh_xmit(NEIGH_ARP_TABLE, outdev, &nexthop, skb); neigh_xmit(NEIGH_ARP_TABLE, outdev, &nexthop, skb);
return NF_STOLEN; return NF_STOLEN;
@@ -482,6 +484,7 @@ nf_flow_offload_ipv6_hook(void *priv, st @@ -488,6 +490,7 @@ nf_flow_offload_ipv6_hook(void *priv, st
skb->dev = outdev; skb->dev = outdev;
nexthop = rt6_nexthop(rt, &flow->tuplehash[!dir].tuple.src_v6); nexthop = rt6_nexthop(rt, &flow->tuplehash[!dir].tuple.src_v6);
skb_dst_set_noref(skb, &rt->dst); skb_dst_set_noref(skb, &rt->dst);

View File

@ -0,0 +1,110 @@
From 852a88f35f4b7e5ebb717fed3c3a3330d5ad4336 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
Date: Wed, 10 Apr 2019 16:43:27 +0200
Subject: [PATCH v2] MIPS: perf: ath79: Fix perfcount IRQ assignment
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Currently it's not possible to use perf on ath79 due to genirq flags
mismatch happening on static virtual IRQ 13 which is used for
performance counters hardware IRQ 5.
On TP-Link Archer C7v5:
CPU0
2: 0 MIPS 2 ath9k
4: 318 MIPS 4 19000000.eth
7: 55034 MIPS 7 timer
8: 1236 MISC 3 ttyS0
12: 0 INTC 1 ehci_hcd:usb1
13: 0 gpio-ath79 2 keys
14: 0 gpio-ath79 5 keys
15: 31 AR724X PCI 1 ath10k_pci
$ perf top
genirq: Flags mismatch irq 13. 00014c83 (mips_perf_pmu) vs. 00002003 (keys)
On TP-Link Archer C7v4:
CPU0
4: 0 MIPS 4 19000000.eth
5: 7135 MIPS 5 1a000000.eth
7: 98379 MIPS 7 timer
8: 30 MISC 3 ttyS0
12: 90028 INTC 0 ath9k
13: 5520 INTC 1 ehci_hcd:usb1
14: 4623 INTC 2 ehci_hcd:usb2
15: 32844 AR724X PCI 1 ath10k_pci
16: 0 gpio-ath79 16 keys
23: 0 gpio-ath79 23 keys
$ perf top
genirq: Flags mismatch irq 13. 00014c80 (mips_perf_pmu) vs. 00000080 (ehci_hcd:usb1)
This problem is happening, because currently statically assigned virtual
IRQ 13 for performance counters is not claimed during the initialization
of MIPS PMU during the bootup, so the IRQ subsystem doesn't know, that
this interrupt isn't available for further use.
So this patch fixes the issue by simply booking hardware IRQ 5 for MIPS PMU.
Tested-by: Kevin 'ldir' Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
Changes since v1:
I've incorporated two comments which I've received on IRC from blogic and
I've also reworded the commit message to match the changes in v2 of this
patch.
* use actual hardware perfcount IRQ 5 instead of the virtual IRQ 13
* dropped the CONFIG_PERF_EVENTS ifdef around irq_create_mapping
arch/mips/ath79/setup.c | 6 ------
drivers/irqchip/irq-ath79-misc.c | 11 +++++++++++
2 files changed, 11 insertions(+), 6 deletions(-)
--- a/arch/mips/ath79/setup.c
+++ b/arch/mips/ath79/setup.c
@@ -211,12 +211,6 @@ const char *get_system_type(void)
return ath79_sys_type;
}
-int get_c0_perfcount_int(void)
-{
- return ATH79_MISC_IRQ(5);
-}
-EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
-
unsigned int get_c0_compare_int(void)
{
return CP0_LEGACY_COMPARE_IRQ;
--- a/drivers/irqchip/irq-ath79-misc.c
+++ b/drivers/irqchip/irq-ath79-misc.c
@@ -22,6 +22,15 @@
#define AR71XX_RESET_REG_MISC_INT_ENABLE 4
#define ATH79_MISC_IRQ_COUNT 32
+#define ATH79_MISC_PERF_IRQ 5
+
+static int ath79_perfcount_irq;
+
+int get_c0_perfcount_int(void)
+{
+ return ath79_perfcount_irq;
+}
+EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
static void ath79_misc_irq_handler(struct irq_desc *desc)
{
@@ -113,6 +122,8 @@ static void __init ath79_misc_intc_domai
{
void __iomem *base = domain->host_data;
+ ath79_perfcount_irq = irq_create_mapping(domain, ATH79_MISC_PERF_IRQ);
+
/* Disable and clear all interrupts */
__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_ENABLE);
__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS);

View File

@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
--- a/mm/page_alloc.c --- a/mm/page_alloc.c
+++ b/mm/page_alloc.c +++ b/mm/page_alloc.c
@@ -6393,7 +6393,7 @@ static void __ref alloc_node_mem_map(str @@ -6395,7 +6395,7 @@ static void __ref alloc_node_mem_map(str
mem_map = NODE_DATA(0)->node_mem_map; mem_map = NODE_DATA(0)->node_mem_map;
#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM) #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
if (page_to_pfn(mem_map) != pgdat->node_start_pfn) if (page_to_pfn(mem_map) != pgdat->node_start_pfn)

View File

@ -1,13 +1,3 @@
--- a/arch/arm/include/asm/hardirq.h
+++ b/arch/arm/include/asm/hardirq.h
@@ -6,6 +6,7 @@
#include <linux/threads.h>
#include <asm/irq.h>
+/* number of IPIS _not_ including IPI_CPU_BACKTRACE */
#define NR_IPI 7
typedef struct {
--- a/arch/arm/kernel/atags.h --- a/arch/arm/kernel/atags.h
+++ b/arch/arm/kernel/atags.h +++ b/arch/arm/kernel/atags.h
@@ -5,7 +5,7 @@ void convert_to_tag_list(struct tag *tag @@ -5,7 +5,7 @@ void convert_to_tag_list(struct tag *tag
@ -19,28 +9,6 @@
setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr) setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr)
{ {
early_print("no ATAGS support: can't continue\n"); early_print("no ATAGS support: can't continue\n");
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -76,6 +76,10 @@ enum ipi_msg_type {
IPI_CPU_STOP,
IPI_IRQ_WORK,
IPI_COMPLETION,
+ /*
+ * CPU_BACKTRACE is special and not included in NR_IPI
+ * or tracable with trace_ipi_*
+ */
IPI_CPU_BACKTRACE,
/*
* SGI8-15 can be reserved by secure firmware, and thus may
@@ -803,7 +807,7 @@ core_initcall(register_cpufreq_notifier)
static void raise_nmi(cpumask_t *mask)
{
- smp_cross_call(mask, IPI_CPU_BACKTRACE);
+ __smp_cross_call(mask, IPI_CPU_BACKTRACE);
}
void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self)
--- a/arch/arm64/include/asm/cpufeature.h --- a/arch/arm64/include/asm/cpufeature.h
+++ b/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h
@@ -365,7 +365,7 @@ static inline bool cpu_have_feature(unsi @@ -365,7 +365,7 @@ static inline bool cpu_have_feature(unsi

View File

@ -156,7 +156,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
obj-$(CONFIG_NETFILTER_XTABLES) += x_tables.o xt_tcpudp.o obj-$(CONFIG_NETFILTER_XTABLES) += x_tables.o xt_tcpudp.o
--- a/net/netfilter/nf_flow_table_core.c --- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c
@@ -216,10 +216,16 @@ int flow_offload_add(struct nf_flowtable @@ -227,10 +227,16 @@ int flow_offload_add(struct nf_flowtable
} }
EXPORT_SYMBOL_GPL(flow_offload_add); EXPORT_SYMBOL_GPL(flow_offload_add);
@ -173,7 +173,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
rhashtable_remove_fast(&flow_table->rhashtable, rhashtable_remove_fast(&flow_table->rhashtable,
&flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].node, &flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].node,
@@ -234,6 +240,9 @@ static void flow_offload_del(struct nf_f @@ -245,6 +251,9 @@ static void flow_offload_del(struct nf_f
if (!(flow->flags & FLOW_OFFLOAD_TEARDOWN)) if (!(flow->flags & FLOW_OFFLOAD_TEARDOWN))
flow_offload_fixup_ct_state(e->ct); flow_offload_fixup_ct_state(e->ct);
@ -183,7 +183,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
flow_offload_free(flow); flow_offload_free(flow);
} }
@@ -347,6 +356,9 @@ static int nf_flow_offload_gc_step(struc @@ -358,6 +367,9 @@ static int nf_flow_offload_gc_step(struc
if (!teardown) if (!teardown)
nf_ct_offload_timeout(flow); nf_ct_offload_timeout(flow);
@ -193,7 +193,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
if (nf_flow_has_expired(flow) || teardown) if (nf_flow_has_expired(flow) || teardown)
flow_offload_del(flow_table, flow); flow_offload_del(flow_table, flow);
} }
@@ -482,10 +494,43 @@ int nf_flow_dnat_port(const struct flow_ @@ -493,10 +505,43 @@ int nf_flow_dnat_port(const struct flow_
} }
EXPORT_SYMBOL_GPL(nf_flow_dnat_port); EXPORT_SYMBOL_GPL(nf_flow_dnat_port);
@ -237,7 +237,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
INIT_DEFERRABLE_WORK(&flowtable->gc_work, nf_flow_offload_work_gc); INIT_DEFERRABLE_WORK(&flowtable->gc_work, nf_flow_offload_work_gc);
err = rhashtable_init(&flowtable->rhashtable, err = rhashtable_init(&flowtable->rhashtable,
@@ -523,6 +568,8 @@ static void nf_flow_table_iterate_cleanu @@ -534,6 +579,8 @@ static void nf_flow_table_iterate_cleanu
{ {
nf_flow_table_iterate(flowtable, nf_flow_table_do_cleanup, dev); nf_flow_table_iterate(flowtable, nf_flow_table_do_cleanup, dev);
flush_delayed_work(&flowtable->gc_work); flush_delayed_work(&flowtable->gc_work);
@ -246,7 +246,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
} }
void nf_flow_table_cleanup(struct net *net, struct net_device *dev) void nf_flow_table_cleanup(struct net *net, struct net_device *dev)
@@ -536,6 +583,26 @@ void nf_flow_table_cleanup(struct net *n @@ -547,6 +594,26 @@ void nf_flow_table_cleanup(struct net *n
} }
EXPORT_SYMBOL_GPL(nf_flow_table_cleanup); EXPORT_SYMBOL_GPL(nf_flow_table_cleanup);
@ -273,7 +273,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
void nf_flow_table_free(struct nf_flowtable *flow_table) void nf_flow_table_free(struct nf_flowtable *flow_table)
{ {
mutex_lock(&flowtable_lock); mutex_lock(&flowtable_lock);
@@ -545,9 +612,58 @@ void nf_flow_table_free(struct nf_flowta @@ -556,9 +623,58 @@ void nf_flow_table_free(struct nf_flowta
nf_flow_table_iterate(flow_table, nf_flow_table_do_cleanup, NULL); nf_flow_table_iterate(flow_table, nf_flow_table_do_cleanup, NULL);
WARN_ON(!nf_flow_offload_gc_step(flow_table)); WARN_ON(!nf_flow_offload_gc_step(flow_table));
rhashtable_destroy(&flow_table->rhashtable); rhashtable_destroy(&flow_table->rhashtable);
@ -506,7 +506,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+MODULE_ALIAS("nf-flow-table-hw"); +MODULE_ALIAS("nf-flow-table-hw");
--- a/net/netfilter/nf_tables_api.c --- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c
@@ -5458,6 +5458,13 @@ static int nf_tables_flowtable_parse_hoo @@ -5463,6 +5463,13 @@ static int nf_tables_flowtable_parse_hoo
if (err < 0) if (err < 0)
return err; return err;
@ -520,7 +520,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
ops = kcalloc(n, sizeof(struct nf_hook_ops), GFP_KERNEL); ops = kcalloc(n, sizeof(struct nf_hook_ops), GFP_KERNEL);
if (!ops) if (!ops)
return -ENOMEM; return -ENOMEM;
@@ -5589,10 +5596,19 @@ static int nf_tables_newflowtable(struct @@ -5594,10 +5601,19 @@ static int nf_tables_newflowtable(struct
} }
flowtable->data.type = type; flowtable->data.type = type;
@ -540,7 +540,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK], err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK],
flowtable); flowtable);
if (err < 0) if (err < 0)
@@ -5718,7 +5734,8 @@ static int nf_tables_fill_flowtable_info @@ -5723,7 +5739,8 @@ static int nf_tables_fill_flowtable_info
nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) || nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) ||
nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) || nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) ||
nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle), nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle),
@ -559,6 +559,6 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+ if (flowtable->flags & NF_FLOWTABLE_F_HW) + if (flowtable->flags & NF_FLOWTABLE_F_HW)
+ nf_flow_offload_hw_add(nft_net(pkt), flow, ct); + nf_flow_offload_hw_add(nft_net(pkt), flow, ct);
+ +
dst_release(route.tuple[!dir].dst);
return; return;
err_flow_add:

View File

@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct flow_offload_tuple_rhash tuplehash[FLOW_OFFLOAD_DIR_MAX]; struct flow_offload_tuple_rhash tuplehash[FLOW_OFFLOAD_DIR_MAX];
--- a/net/netfilter/nf_flow_table_core.c --- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c
@@ -356,7 +356,7 @@ static int nf_flow_offload_gc_step(struc @@ -367,7 +367,7 @@ static int nf_flow_offload_gc_step(struc
if (!teardown) if (!teardown)
nf_ct_offload_timeout(flow); nf_ct_offload_timeout(flow);