700-skbuff-add-DSA-specific-data-to-struct-skb_shared_in.patch 1.5 KB

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