tmp_suning_uos_patched/net/dsa
Vladimir Oltean 162c423e60 net: dsa: implement a central TX reallocation procedure
[ Upstream commit a3b0b6479700a5b0af2c631cb2ec0fb7a0d978f2 ]

At the moment, taggers are left with the task of ensuring that the skb
headers are writable (which they aren't, if the frames were cloned for
TX timestamping, for flooding by the bridge, etc), and that there is
enough space in the skb data area for the DSA tag to be pushed.

Moreover, the life of tail taggers is even harder, because they need to
ensure that short frames have enough padding, a problem that normal
taggers don't have.

The principle of the DSA framework is that everything except for the
most intimate hardware specifics (like in this case, the actual packing
of the DSA tag bits) should be done inside the core, to avoid having
code paths that are very rarely tested.

So provide a TX reallocation procedure that should cover the known needs
of DSA today.

Note that this patch also gives the network stack a good hint about the
headroom/tailroom it's going to need. Up till now it wasn't doing that.
So the reallocation procedure should really be there only for the
exceptional cases, and for cloned packets which need to be unshared.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Christian Eggers <ceggers@arri.de> # For tail taggers only
Tested-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-17 17:06:21 +01:00
..
dsa_priv.h net: dsa: Utilize __vlan_find_dev_deep_rcu() 2020-10-02 13:36:07 -07:00
dsa.c net: dsa: Add devlink port regions support to DSA 2020-10-04 14:38:53 -07:00
dsa2.c net: dsa: call teardown method on probe failure 2021-02-17 11:02:28 +01:00
Kconfig net: dsa: tag_rtl4_a: Implement Realtek 4 byte A tag 2020-07-08 15:36:19 -07:00
Makefile net: dsa: tag_rtl4_a: Implement Realtek 4 byte A tag 2020-07-08 15:36:19 -07:00
master.c net: dsa: unbind all switches from tree when DSA master unbinds 2021-01-23 16:04:05 +01:00
port.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
slave.c net: dsa: implement a central TX reallocation procedure 2021-03-17 17:06:21 +01:00
switch.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
tag_8021q.c net: dsa: tag_8021q: add VLANs to the master interface too 2020-09-20 19:01:34 -07:00
tag_ar9331.c net: dsa: tag_ar9331: Make sure there is headroom for tag 2020-02-14 07:34:51 -08:00
tag_brcm.c net: dsa: b53: Set untag_bridge_pvid 2020-10-02 13:36:07 -07:00
tag_dsa.c net: dsa: tag_dsa: use the generic flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_edsa.c net: dsa: tag_edsa: use the generic flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_gswip.c net: dsa: tag_gswip: fix typo in tagger name 2020-01-16 13:58:26 +01:00
tag_ksz.c net: dsa: tag_ksz: KSZ8795 and KSZ9477 also use tail tags 2020-10-19 17:32:50 -07:00
tag_lan9303.c net: dsa: tag_lan9303: Fix __be16 warnings 2020-07-05 15:31:58 -07:00
tag_mtk.c net: dsa: tag_mtk: use the generic flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_ocelot.c net: dsa: tag_ocelot: use VLAN information from tagging header when available 2020-10-11 11:19:04 -07:00
tag_qca.c net: dsa: tag_qca: use the generic flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_rtl4_a.c net: dsa: tag_rtl4_a: fix egress tags 2021-03-17 17:06:13 +01:00
tag_sja1105.c net: dsa: tag_sja1105: use a custom flow dissector procedure 2020-09-26 14:17:59 -07:00
tag_trailer.c net: dsa: point out the tail taggers 2020-09-26 14:17:59 -07:00