diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-03-08 17:20:20 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-03-12 20:23:52 +0100 |
commit | 0d5bf53197481d291f9a541eefa03b11a34033f9 (patch) | |
tree | aa1f2523ef12bd5e13469b148e0bec7528126777 /target/linux/generic/pending-5.10/640-12-net-dsa-resolve-forwarding-path-for-dsa-slave-ports.patch | |
parent | e90e75b12c818c49704755b9e530491aee2d554c (diff) | |
download | upstream-0d5bf53197481d291f9a541eefa03b11a34033f9.tar.gz upstream-0d5bf53197481d291f9a541eefa03b11a34033f9.tar.bz2 upstream-0d5bf53197481d291f9a541eefa03b11a34033f9.zip |
kernel: update 5.10 flow offload patches
Includes PPPoE support and VLAN related fixes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/generic/pending-5.10/640-12-net-dsa-resolve-forwarding-path-for-dsa-slave-ports.patch')
-rw-r--r-- | target/linux/generic/pending-5.10/640-12-net-dsa-resolve-forwarding-path-for-dsa-slave-ports.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/target/linux/generic/pending-5.10/640-12-net-dsa-resolve-forwarding-path-for-dsa-slave-ports.patch b/target/linux/generic/pending-5.10/640-12-net-dsa-resolve-forwarding-path-for-dsa-slave-ports.patch new file mode 100644 index 0000000000..3e7a9eaef9 --- /dev/null +++ b/target/linux/generic/pending-5.10/640-12-net-dsa-resolve-forwarding-path-for-dsa-slave-ports.patch @@ -0,0 +1,60 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Thu, 4 Mar 2021 23:19:06 +0100 +Subject: [PATCH] net: dsa: resolve forwarding path for dsa slave ports + +Add .ndo_fill_forward_path for dsa slave port devices +--- + +--- a/include/linux/netdevice.h ++++ b/include/linux/netdevice.h +@@ -838,6 +838,7 @@ enum net_device_path_type { + DEV_PATH_VLAN, + DEV_PATH_BRIDGE, + DEV_PATH_PPPOE, ++ DEV_PATH_DSA, + }; + + struct net_device_path { +@@ -857,6 +858,10 @@ struct net_device_path { + u16 vlan_id; + __be16 vlan_proto; + } bridge; ++ struct { ++ int port; ++ u16 proto; ++ } dsa; + }; + }; + +--- a/net/dsa/slave.c ++++ b/net/dsa/slave.c +@@ -1582,6 +1582,21 @@ static struct devlink_port *dsa_slave_ge + return dp->ds->devlink ? &dp->devlink_port : NULL; + } + ++static int dsa_slave_fill_forward_path(struct net_device_path_ctx *ctx, ++ struct net_device_path *path) ++{ ++ struct dsa_port *dp = dsa_slave_to_port(ctx->dev); ++ struct dsa_port *cpu_dp = dp->cpu_dp; ++ ++ path->dev = ctx->dev; ++ path->type = DEV_PATH_DSA; ++ path->dsa.proto = cpu_dp->tag_ops->proto; ++ path->dsa.port = dp->index; ++ ctx->dev = cpu_dp->master; ++ ++ return 0; ++} ++ + static const struct net_device_ops dsa_slave_netdev_ops = { + .ndo_open = dsa_slave_open, + .ndo_stop = dsa_slave_close, +@@ -1607,6 +1622,7 @@ static const struct net_device_ops dsa_s + .ndo_vlan_rx_kill_vid = dsa_slave_vlan_rx_kill_vid, + .ndo_get_devlink_port = dsa_slave_get_devlink_port, + .ndo_change_mtu = dsa_slave_change_mtu, ++ .ndo_fill_forward_path = dsa_slave_fill_forward_path, + }; + + static struct device_type dsa_type = { |