diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2020-02-23 13:20:11 +0100 |
---|---|---|
committer | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2020-02-28 17:50:45 +0100 |
commit | c16517d26de30c90dabce1e456615fd7fbdce07c (patch) | |
tree | e7371ee12a3c413a064885b634ee4c975ad7f96a /target/linux/generic/pending-5.4/643-net-bridge-support-hardware-flow-table-offload.patch | |
parent | 955634b473284847e3c8281a6ac85655329d8b06 (diff) | |
download | upstream-c16517d26de30c90dabce1e456615fd7fbdce07c.tar.gz upstream-c16517d26de30c90dabce1e456615fd7fbdce07c.tar.bz2 upstream-c16517d26de30c90dabce1e456615fd7fbdce07c.zip |
kernel: copy kernel 4.19 code to 5.4
No changes were done to the patches while coping them. Currently they do
not apply on top of kernel 5.4.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/generic/pending-5.4/643-net-bridge-support-hardware-flow-table-offload.patch')
-rw-r--r-- | target/linux/generic/pending-5.4/643-net-bridge-support-hardware-flow-table-offload.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/target/linux/generic/pending-5.4/643-net-bridge-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-5.4/643-net-bridge-support-hardware-flow-table-offload.patch new file mode 100644 index 0000000000..8b09fabf12 --- /dev/null +++ b/target/linux/generic/pending-5.4/643-net-bridge-support-hardware-flow-table-offload.patch @@ -0,0 +1,61 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Thu, 15 Mar 2018 20:50:37 +0100 +Subject: [PATCH] net: bridge: support hardware flow table offload + +Look up the real device and pass it on + +Signed-off-by: Felix Fietkau <nbd@nbd.name> +--- + +--- a/net/bridge/br_device.c ++++ b/net/bridge/br_device.c +@@ -18,6 +18,10 @@ + #include <linux/ethtool.h> + #include <linux/list.h> + #include <linux/netfilter_bridge.h> ++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE) ++#include <linux/netfilter.h> ++#include <net/netfilter/nf_flow_table.h> ++#endif + + #include <linux/uaccess.h> + #include "br_private.h" +@@ -376,6 +380,28 @@ static const struct ethtool_ops br_ethto + .get_link = ethtool_op_get_link, + }; + ++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE) ++static int br_flow_offload_check(struct flow_offload_hw_path *path) ++{ ++ struct net_device *dev = path->dev; ++ struct net_bridge *br = netdev_priv(dev); ++ struct net_bridge_fdb_entry *dst; ++ ++ if (!(path->flags & FLOW_OFFLOAD_PATH_ETHERNET)) ++ return -EINVAL; ++ ++ dst = br_fdb_find_rcu(br, path->eth_dest, path->vlan_id); ++ if (!dst || !dst->dst) ++ return -ENOENT; ++ ++ path->dev = dst->dst->dev; ++ if (path->dev->netdev_ops->ndo_flow_offload_check) ++ return path->dev->netdev_ops->ndo_flow_offload_check(path); ++ ++ return 0; ++} ++#endif /* CONFIG_NF_FLOW_TABLE */ ++ + static const struct net_device_ops br_netdev_ops = { + .ndo_open = br_dev_open, + .ndo_stop = br_dev_stop, +@@ -403,6 +429,9 @@ static const struct net_device_ops br_ne + .ndo_bridge_setlink = br_setlink, + .ndo_bridge_dellink = br_dellink, + .ndo_features_check = passthru_features_check, ++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE) ++ .ndo_flow_offload_check = br_flow_offload_check, ++#endif + }; + + static struct device_type br_type = { |