aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/pending-4.14/642-net-8021q-support-hardware-flow-table-offload.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-05-08 23:17:36 +0200
committerFelix Fietkau <nbd@nbd.name>2018-05-12 22:28:00 +0200
commita3096b4b33dcc5fcc07b229346ef337aa5962019 (patch)
treeee6e8b527be60629dd8f72b9b65bcd08237617a6 /target/linux/generic/pending-4.14/642-net-8021q-support-hardware-flow-table-offload.patch
parent066c85321ee0062866259c627ebc1cca71e309b3 (diff)
downloadupstream-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/642-net-8021q-support-hardware-flow-table-offload.patch')
-rw-r--r--target/linux/generic/pending-4.14/642-net-8021q-support-hardware-flow-table-offload.patch17
1 files changed, 10 insertions, 7 deletions
diff --git a/target/linux/generic/pending-4.14/642-net-8021q-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-4.14/642-net-8021q-support-hardware-flow-table-offload.patch
index ca340fc8e5..c5b3bf35b5 100644
--- a/target/linux/generic/pending-4.14/642-net-8021q-support-hardware-flow-table-offload.patch
+++ b/target/linux/generic/pending-4.14/642-net-8021q-support-hardware-flow-table-offload.patch
@@ -9,22 +9,22 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
-@@ -29,9 +29,11 @@
- #include <linux/net_tstamp.h>
- #include <linux/etherdevice.h>
- #include <linux/ethtool.h>
-+#include <linux/netfilter.h>
+@@ -32,6 +32,10 @@
#include <linux/phy.h>
#include <net/arp.h>
#include <net/switchdev.h>
++#ifdef CONFIG_NF_FLOW_TABLE
++#include <linux/netfilter.h>
+#include <net/netfilter/nf_flow_table.h>
++#endif
#include "vlan.h"
#include "vlanproc.h"
-@@ -766,6 +768,25 @@ static int vlan_dev_get_iflink(const str
+@@ -766,6 +770,27 @@ static int vlan_dev_get_iflink(const str
return real_dev->ifindex;
}
++#ifdef CONFIG_NF_FLOW_TABLE
+static int vlan_dev_flow_offload_check(struct flow_offload_hw_path *path)
+{
+ struct net_device *dev = path->dev;
@@ -43,15 +43,18 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+
+ return 0;
+}
++#endif /* CONFIG_NF_FLOW_TABLE */
+
static const struct ethtool_ops vlan_ethtool_ops = {
.get_link_ksettings = vlan_ethtool_get_link_ksettings,
.get_drvinfo = vlan_ethtool_get_drvinfo,
-@@ -803,6 +824,7 @@ static const struct net_device_ops vlan_
+@@ -803,6 +828,9 @@ static const struct net_device_ops vlan_
.ndo_fix_features = vlan_dev_fix_features,
.ndo_get_lock_subclass = vlan_dev_get_lock_subclass,
.ndo_get_iflink = vlan_dev_get_iflink,
++#ifdef CONFIG_NF_FLOW_TABLE
+ .ndo_flow_offload_check = vlan_dev_flow_offload_check,
++#endif
};
static void vlan_dev_free(struct net_device *dev)