summaryrefslogtreecommitdiff
path: root/include/net.h
diff options
context:
space:
mode:
authorClaudiu Manoil <[email protected]>2021-01-25 14:23:53 +0200
committerTom Rini <[email protected]>2021-02-16 11:48:20 -0500
commitfc054d563bfb676f808f26204dfe17c690eed1ba (patch)
tree8ce6b59c99c0821434c7eda2d4add41f1d46493a /include/net.h
parentd0781c95bc448a211546404c779e78b29ada1214 (diff)
net: Introduce DSA class for Ethernet switches
DSA stands for Distributed Switch Architecture and it covers switches that are connected to the CPU through an Ethernet link and generally use frame tags to pass information about the source/destination ports to/from CPU. Front panel ports are presented as regular ethernet devices in U-Boot and they are expected to support the typical networking commands. DSA switches may be cascaded, DSA class code does not currently support this. Signed-off-by: Alex Marginean <[email protected]> Signed-off-by: Claudiu Manoil <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Vladimir Oltean <[email protected]>
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h
index 13da69b7c14..b95d6a6f60e 100644
--- a/include/net.h
+++ b/include/net.h
@@ -499,7 +499,13 @@ struct icmp_hdr {
* maximum packet size and multiple of 32 bytes = 1536
*/
#define PKTSIZE 1522
+#ifndef CONFIG_DM_DSA
#define PKTSIZE_ALIGN 1536
+#else
+/* Maximum DSA tagging overhead (headroom and/or tailroom) */
+#define DSA_MAX_OVR 256
+#define PKTSIZE_ALIGN (1536 + DSA_MAX_OVR)
+#endif
/*
* Maximum receive ring size; that is, the number of packets