From 52a82ce3dd901a1536c7d7d9d963e9c2d761c816 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 1 Nov 2018 17:57:55 +0100 Subject: kernel: Copy patches from kernel 4.14 to 4.19 This just copies the files from the kernel 4.14 specific folders into the kernel 4.19 specific folder, no changes are done to the files in this commit. Signed-off-by: Hauke Mehrtens --- ...ridge-support-hardware-flow-table-offload.patch | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 target/linux/generic/pending-4.19/643-net-bridge-support-hardware-flow-table-offload.patch (limited to 'target/linux/generic/pending-4.19/643-net-bridge-support-hardware-flow-table-offload.patch') diff --git a/target/linux/generic/pending-4.19/643-net-bridge-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-4.19/643-net-bridge-support-hardware-flow-table-offload.patch new file mode 100644 index 0000000000..a070fe1636 --- /dev/null +++ b/target/linux/generic/pending-4.19/643-net-bridge-support-hardware-flow-table-offload.patch @@ -0,0 +1,61 @@ +From: Felix Fietkau +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 +--- + +--- a/net/bridge/br_device.c ++++ b/net/bridge/br_device.c +@@ -18,6 +18,10 @@ + #include + #include + #include ++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE) ++#include ++#include ++#endif + + #include + #include "br_private.h" +@@ -340,6 +344,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, +@@ -367,6 +393,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 = { -- cgit v1.2.3