From c16517d26de30c90dabce1e456615fd7fbdce07c Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 23 Feb 2020 13:20:11 +0100 Subject: 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 --- ...8021q-support-hardware-flow-table-offload.patch | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 target/linux/generic/pending-5.4/642-net-8021q-support-hardware-flow-table-offload.patch (limited to 'target/linux/generic/pending-5.4/642-net-8021q-support-hardware-flow-table-offload.patch') diff --git a/target/linux/generic/pending-5.4/642-net-8021q-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-5.4/642-net-8021q-support-hardware-flow-table-offload.patch new file mode 100644 index 0000000000..7547c14bed --- /dev/null +++ b/target/linux/generic/pending-5.4/642-net-8021q-support-hardware-flow-table-offload.patch @@ -0,0 +1,60 @@ +From: Felix Fietkau +Date: Thu, 15 Mar 2018 20:49:58 +0100 +Subject: [PATCH] net: 8021q: support hardware flow table offload + +Add the VLAN ID and protocol information + +Signed-off-by: Felix Fietkau +--- + +--- a/net/8021q/vlan_dev.c ++++ b/net/8021q/vlan_dev.c +@@ -32,6 +32,10 @@ + #include + #include + #include ++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE) ++#include ++#include ++#endif + + #include "vlan.h" + #include "vlanproc.h" +@@ -771,6 +775,27 @@ static int vlan_dev_get_iflink(const str + return real_dev->ifindex; + } + ++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE) ++static int vlan_dev_flow_offload_check(struct flow_offload_hw_path *path) ++{ ++ struct net_device *dev = path->dev; ++ struct vlan_dev_priv *vlan = vlan_dev_priv(dev); ++ ++ if (path->flags & FLOW_OFFLOAD_PATH_VLAN) ++ return -EEXIST; ++ ++ path->flags |= FLOW_OFFLOAD_PATH_VLAN; ++ path->vlan_proto = vlan->vlan_proto; ++ path->vlan_id = vlan->vlan_id; ++ path->dev = vlan->real_dev; ++ ++ if (vlan->real_dev->netdev_ops->ndo_flow_offload_check) ++ return vlan->real_dev->netdev_ops->ndo_flow_offload_check(path); ++ ++ 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, +@@ -808,6 +833,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, ++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE) ++ .ndo_flow_offload_check = vlan_dev_flow_offload_check, ++#endif + }; + + static void vlan_dev_free(struct net_device *dev) -- cgit v1.2.3