netfilter: fix hardware offload regression (FS#1551)
The relevant code needs to be enabled even if flow table support is only compiled as module Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
75ed56a08a
commit
e9cb1b720d
3 changed files with 13 additions and 13 deletions
|
@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
#include <linux/phy.h>
|
#include <linux/phy.h>
|
||||||
#include <net/arp.h>
|
#include <net/arp.h>
|
||||||
#include <net/switchdev.h>
|
#include <net/switchdev.h>
|
||||||
+#ifdef CONFIG_NF_FLOW_TABLE
|
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||||
+#include <linux/netfilter.h>
|
+#include <linux/netfilter.h>
|
||||||
+#include <net/netfilter/nf_flow_table.h>
|
+#include <net/netfilter/nf_flow_table.h>
|
||||||
+#endif
|
+#endif
|
||||||
|
@ -24,7 +24,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
return real_dev->ifindex;
|
return real_dev->ifindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
+#ifdef CONFIG_NF_FLOW_TABLE
|
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||||
+static int vlan_dev_flow_offload_check(struct flow_offload_hw_path *path)
|
+static int vlan_dev_flow_offload_check(struct flow_offload_hw_path *path)
|
||||||
+{
|
+{
|
||||||
+ struct net_device *dev = path->dev;
|
+ struct net_device *dev = path->dev;
|
||||||
|
@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
.ndo_fix_features = vlan_dev_fix_features,
|
.ndo_fix_features = vlan_dev_fix_features,
|
||||||
.ndo_get_lock_subclass = vlan_dev_get_lock_subclass,
|
.ndo_get_lock_subclass = vlan_dev_get_lock_subclass,
|
||||||
.ndo_get_iflink = vlan_dev_get_iflink,
|
.ndo_get_iflink = vlan_dev_get_iflink,
|
||||||
+#ifdef CONFIG_NF_FLOW_TABLE
|
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||||
+ .ndo_flow_offload_check = vlan_dev_flow_offload_check,
|
+ .ndo_flow_offload_check = vlan_dev_flow_offload_check,
|
||||||
+#endif
|
+#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
#include <linux/ethtool.h>
|
#include <linux/ethtool.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#include <linux/netfilter_bridge.h>
|
#include <linux/netfilter_bridge.h>
|
||||||
+#ifdef CONFIG_NF_FLOW_TABLE
|
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||||
+#include <linux/netfilter.h>
|
+#include <linux/netfilter.h>
|
||||||
+#include <net/netfilter/nf_flow_table.h>
|
+#include <net/netfilter/nf_flow_table.h>
|
||||||
+#endif
|
+#endif
|
||||||
|
@ -24,7 +24,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
.get_link = ethtool_op_get_link,
|
.get_link = ethtool_op_get_link,
|
||||||
};
|
};
|
||||||
|
|
||||||
+#ifdef CONFIG_NF_FLOW_TABLE
|
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||||
+static int br_flow_offload_check(struct flow_offload_hw_path *path)
|
+static int br_flow_offload_check(struct flow_offload_hw_path *path)
|
||||||
+{
|
+{
|
||||||
+ struct net_device *dev = path->dev;
|
+ struct net_device *dev = path->dev;
|
||||||
|
@ -53,7 +53,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
.ndo_bridge_setlink = br_setlink,
|
.ndo_bridge_setlink = br_setlink,
|
||||||
.ndo_bridge_dellink = br_dellink,
|
.ndo_bridge_dellink = br_dellink,
|
||||||
.ndo_features_check = passthru_features_check,
|
.ndo_features_check = passthru_features_check,
|
||||||
+#ifdef CONFIG_NF_FLOW_TABLE
|
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||||
+ .ndo_flow_offload_check = br_flow_offload_check,
|
+ .ndo_flow_offload_check = br_flow_offload_check,
|
||||||
+#endif
|
+#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
#include <net/net_namespace.h>
|
#include <net/net_namespace.h>
|
||||||
#include <net/netns/generic.h>
|
#include <net/netns/generic.h>
|
||||||
|
|
||||||
+#ifdef CONFIG_NF_FLOW_TABLE
|
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||||
+#include <linux/netfilter.h>
|
+#include <linux/netfilter.h>
|
||||||
+#include <net/netfilter/nf_flow_table.h>
|
+#include <net/netfilter/nf_flow_table.h>
|
||||||
+#endif
|
+#endif
|
||||||
|
@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
ppp_destroy_interface(ppp);
|
ppp_destroy_interface(ppp);
|
||||||
}
|
}
|
||||||
|
|
||||||
+#ifdef CONFIG_NF_FLOW_TABLE
|
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||||
+static int ppp_flow_offload_check(struct flow_offload_hw_path *path)
|
+static int ppp_flow_offload_check(struct flow_offload_hw_path *path)
|
||||||
+{
|
+{
|
||||||
+ struct ppp *ppp = netdev_priv(path->dev);
|
+ struct ppp *ppp = netdev_priv(path->dev);
|
||||||
|
@ -53,7 +53,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
.ndo_start_xmit = ppp_start_xmit,
|
.ndo_start_xmit = ppp_start_xmit,
|
||||||
.ndo_do_ioctl = ppp_net_ioctl,
|
.ndo_do_ioctl = ppp_net_ioctl,
|
||||||
.ndo_get_stats64 = ppp_get_stats64,
|
.ndo_get_stats64 = ppp_get_stats64,
|
||||||
+#ifdef CONFIG_NF_FLOW_TABLE
|
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||||
+ .ndo_flow_offload_check = ppp_flow_offload_check,
|
+ .ndo_flow_offload_check = ppp_flow_offload_check,
|
||||||
+#endif
|
+#endif
|
||||||
};
|
};
|
||||||
|
@ -65,7 +65,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
#include <linux/proc_fs.h>
|
#include <linux/proc_fs.h>
|
||||||
#include <linux/seq_file.h>
|
#include <linux/seq_file.h>
|
||||||
|
|
||||||
+#ifdef CONFIG_NF_FLOW_TABLE
|
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||||
+#include <linux/netfilter.h>
|
+#include <linux/netfilter.h>
|
||||||
+#include <net/netfilter/nf_flow_table.h>
|
+#include <net/netfilter/nf_flow_table.h>
|
||||||
+#endif
|
+#endif
|
||||||
|
@ -77,7 +77,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
return __pppoe_xmit(sk, skb);
|
return __pppoe_xmit(sk, skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
+#ifdef CONFIG_NF_FLOW_TABLE
|
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||||
+static int pppoe_flow_offload_check(struct ppp_channel *chan,
|
+static int pppoe_flow_offload_check(struct ppp_channel *chan,
|
||||||
+ struct flow_offload_hw_path *path)
|
+ struct flow_offload_hw_path *path)
|
||||||
+{
|
+{
|
||||||
|
@ -104,7 +104,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
+
|
+
|
||||||
static const struct ppp_channel_ops pppoe_chan_ops = {
|
static const struct ppp_channel_ops pppoe_chan_ops = {
|
||||||
.start_xmit = pppoe_xmit,
|
.start_xmit = pppoe_xmit,
|
||||||
+#ifdef CONFIG_NF_FLOW_TABLE
|
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||||
+ .flow_offload_check = pppoe_flow_offload_check,
|
+ .flow_offload_check = pppoe_flow_offload_check,
|
||||||
+#endif
|
+#endif
|
||||||
};
|
};
|
||||||
|
@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
/* Handle an ioctl call that has come in via /dev/ppp. */
|
/* Handle an ioctl call that has come in via /dev/ppp. */
|
||||||
int (*ioctl)(struct ppp_channel *, unsigned int, unsigned long);
|
int (*ioctl)(struct ppp_channel *, unsigned int, unsigned long);
|
||||||
+
|
+
|
||||||
+#ifdef CONFIG_NF_FLOW_TABLE
|
+#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
|
||||||
+ int (*flow_offload_check)(struct ppp_channel *, struct flow_offload_hw_path *);
|
+ int (*flow_offload_check)(struct ppp_channel *, struct flow_offload_hw_path *);
|
||||||
+#endif
|
+#endif
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue