ipq40xx: copy 5.15 patches and config to 6.1
[openwrt/staging/jow.git] / target / linux / ipq40xx / patches-6.1 / 700-skbuff-add-DSA-specific-data-to-struct-skb_shared_in.patch
1 From da75807ac41175e9db8c95f7a172b4133763b744 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <j4g8y7@gmail.com>
3 Date: Mon, 11 Jan 2021 17:49:36 +0100
4 Subject: [PATCH] skbuff: add DSA specific data to struct skb_shared_info
5
6 All of the already existing DSA tagging protocol drivers
7 are storing the tagging data directly into the skb. In most
8 cases that is the only way to send the required information
9 to the underlying ethernet switch.
10
11 However on certain platforms (like the Qualcomm IPQ40xx
12 SoCs) the built-in ethernet switch is connected directly
13 to an ethernet MAC, and the tagging information must be
14 sent out-of-band which is done directly via the hardware
15 TX descriptors of the ethernet MAC.
16
17 In such cases, putting the information into the skb causes
18 unneccesary overhead, because the ethernet driver must
19 remove that before sending the ethernet frame towards to
20 the hardware.
21
22 This change adds two new DSA specific fields to struct
23 skb_shared_info which makes it possible to send the
24 tagging information via skb->shinfo. With this approach,
25 the twofold modifications of the skb data can be avoided.
26
27 Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
28 ---
29 include/linux/skbuff.h | 3 +++
30 1 file changed, 3 insertions(+)
31
32 --- a/include/linux/skbuff.h
33 +++ b/include/linux/skbuff.h
34 @@ -564,6 +564,9 @@ struct skb_shared_info {
35 unsigned int gso_type;
36 u32 tskey;
37
38 + unsigned int dsa_tag_proto;
39 + unsigned char dsa_tag_data[8];
40 +
41 /*
42 * Warning : all fields before dataref are cleared in __alloc_skb()
43 */