diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-05-08 23:17:36 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-05-12 22:28:00 +0200 |
commit | a3096b4b33dcc5fcc07b229346ef337aa5962019 (patch) | |
tree | ee6e8b527be60629dd8f72b9b65bcd08237617a6 /target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch | |
parent | 066c85321ee0062866259c627ebc1cca71e309b3 (diff) | |
download | upstream-a3096b4b33dcc5fcc07b229346ef337aa5962019.tar.gz upstream-a3096b4b33dcc5fcc07b229346ef337aa5962019.tar.bz2 upstream-a3096b4b33dcc5fcc07b229346ef337aa5962019.zip |
kernel: fix build error in flow offload code with CONFIG_NETFILTER=n
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch')
-rw-r--r-- | target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch index 9565412c00..3331d5956e 100644 --- a/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch +++ b/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch @@ -9,20 +9,23 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c -@@ -56,6 +56,9 @@ +@@ -56,6 +56,11 @@ #include <net/net_namespace.h> #include <net/netns/generic.h> ++#ifdef CONFIG_NF_FLOW_TABLE +#include <linux/netfilter.h> +#include <net/netfilter/nf_flow_table.h> ++#endif + #define PPP_VERSION "2.4.2" /* -@@ -1382,12 +1385,33 @@ static void ppp_dev_priv_destructor(stru +@@ -1382,12 +1387,37 @@ static void ppp_dev_priv_destructor(stru ppp_destroy_interface(ppp); } ++#ifdef CONFIG_NF_FLOW_TABLE +static int ppp_flow_offload_check(struct flow_offload_hw_path *path) +{ + struct ppp *ppp = netdev_priv(path->dev); @@ -42,6 +45,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> + + return chan->ops->flow_offload_check(chan, path); +} ++#endif /* CONFIG_NF_FLOW_TABLE */ + static const struct net_device_ops ppp_netdev_ops = { .ndo_init = ppp_dev_init, @@ -49,25 +53,31 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> .ndo_start_xmit = ppp_start_xmit, .ndo_do_ioctl = ppp_net_ioctl, .ndo_get_stats64 = ppp_get_stats64, ++#ifdef CONFIG_NF_FLOW_TABLE + .ndo_flow_offload_check = ppp_flow_offload_check, ++#endif }; static struct device_type ppp_type = { --- a/drivers/net/ppp/pppoe.c +++ b/drivers/net/ppp/pppoe.c -@@ -77,6 +77,8 @@ - #include <linux/file.h> +@@ -78,6 +78,11 @@ #include <linux/proc_fs.h> #include <linux/seq_file.h> + ++#ifdef CONFIG_NF_FLOW_TABLE +#include <linux/netfilter.h> +#include <net/netfilter/nf_flow_table.h> - ++#endif ++ #include <linux/nsproxy.h> #include <net/net_namespace.h> -@@ -970,8 +972,32 @@ static int pppoe_xmit(struct ppp_channel + #include <net/netns/generic.h> +@@ -970,8 +975,36 @@ static int pppoe_xmit(struct ppp_channel return __pppoe_xmit(sk, skb); } ++#ifdef CONFIG_NF_FLOW_TABLE +static int pppoe_flow_offload_check(struct ppp_channel *chan, + struct flow_offload_hw_path *path) +{ @@ -90,21 +100,26 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> + + return 0; +} ++#endif /* CONFIG_NF_FLOW_TABLE */ + static const struct ppp_channel_ops pppoe_chan_ops = { .start_xmit = pppoe_xmit, ++#ifdef CONFIG_NF_FLOW_TABLE + .flow_offload_check = pppoe_flow_offload_check, ++#endif }; static int pppoe_recvmsg(struct socket *sock, struct msghdr *m, --- a/include/linux/ppp_channel.h +++ b/include/linux/ppp_channel.h -@@ -32,6 +32,8 @@ struct ppp_channel_ops { +@@ -32,6 +32,10 @@ struct ppp_channel_ops { int (*start_xmit)(struct ppp_channel *, struct sk_buff *); /* Handle an ioctl call that has come in via /dev/ppp. */ int (*ioctl)(struct ppp_channel *, unsigned int, unsigned long); + ++#ifdef CONFIG_NF_FLOW_TABLE + int (*flow_offload_check)(struct ppp_channel *, struct flow_offload_hw_path *); ++#endif }; struct ppp_channel { |