2021-11-01 11:32:34 +00:00
|
|
|
From da75807ac41175e9db8c95f7a172b4133763b744 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Gabor Juhos <j4g8y7@gmail.com>
|
|
|
|
Date: Mon, 11 Jan 2021 17:49:36 +0100
|
|
|
|
Subject: [PATCH] skbuff: add DSA specific data to struct skb_shared_info
|
|
|
|
|
|
|
|
All of the already existing DSA tagging protocol drivers
|
|
|
|
are storing the tagging data directly into the skb. In most
|
|
|
|
cases that is the only way to send the required information
|
|
|
|
to the underlying ethernet switch.
|
|
|
|
|
|
|
|
However on certain platforms (like the Qualcomm IPQ40xx
|
|
|
|
SoCs) the built-in ethernet switch is connected directly
|
|
|
|
to an ethernet MAC, and the tagging information must be
|
|
|
|
sent out-of-band which is done directly via the hardware
|
|
|
|
TX descriptors of the ethernet MAC.
|
|
|
|
|
|
|
|
In such cases, putting the information into the skb causes
|
|
|
|
unneccesary overhead, because the ethernet driver must
|
|
|
|
remove that before sending the ethernet frame towards to
|
|
|
|
the hardware.
|
|
|
|
|
|
|
|
This change adds two new DSA specific fields to struct
|
|
|
|
skb_shared_info which makes it possible to send the
|
|
|
|
tagging information via skb->shinfo. With this approach,
|
|
|
|
the twofold modifications of the skb data can be avoided.
|
|
|
|
|
|
|
|
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
|
|
|
|
---
|
|
|
|
include/linux/skbuff.h | 3 +++
|
|
|
|
1 file changed, 3 insertions(+)
|
|
|
|
|
|
|
|
--- a/include/linux/skbuff.h
|
|
|
|
+++ b/include/linux/skbuff.h
|
2023-04-29 11:22:29 +00:00
|
|
|
@@ -564,6 +564,9 @@ struct skb_shared_info {
|
2021-11-01 11:32:34 +00:00
|
|
|
unsigned int gso_type;
|
|
|
|
u32 tskey;
|
|
|
|
|
|
|
|
+ unsigned int dsa_tag_proto;
|
|
|
|
+ unsigned char dsa_tag_data[8];
|
|
|
|
+
|
|
|
|
/*
|
|
|
|
* Warning : all fields before dataref are cleared in __alloc_skb()
|
|
|
|
*/
|