All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: hdlc: Increase maximum HDLC MTU
@ 2023-01-04 12:57 Harald Welte
  2023-01-04 17:52 ` Andrew Lunn
  2023-01-05  7:06 ` Krzysztof Hałasa
  0 siblings, 2 replies; 5+ messages in thread
From: Harald Welte @ 2023-01-04 12:57 UTC (permalink / raw)
  To: netdev; +Cc: khc, Harald Welte

The FRF 1.2 specification clearly states:

> A maximum frame relay information field size of 1600 octets shall be
> supported by the network and the user.

The linux kernel hdlc/fr code has so far had a maximum MTU of 1500
octets.  This may have been sufficient to transport "regular" Ethernet
frames of MTU 1500 via frame relay net-devices, but there are other
use cases than Ethernet.

One such use case is the 3GPP Gb interface (TS 48.014, 48.016, 48.018)
operated over Frame Relay.  There is open source software [2]
implementing those interfaces by means of AF_PACKET sockets over
Linux kernel hdlcX devices.

And before anyone asks: Even in 2023 there are real-world deployments of
those interfaces over Frame Relay in production use.

This patch doesn't change the default hdlcX netdev MTU, but permits
userspace to configure a higher MTU, in those cases needed.

[1] https://www.broadband-forum.org/technical/download/FRF.1.2.pdf
[2] https://osmocom.org/projects/osmo-gbproxy/wiki
[3] https://gitea.osmocom.org/osmocom/libosmocore/src/branch/master/src/gb/gprs_ns2_fr.c

Signed-off-by: Harald Welte <laforge@osmocom.org>
---
 include/uapi/linux/hdlc.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/hdlc.h b/include/uapi/linux/hdlc.h
index d89cb3ee7c70..f6b01e883cb5 100644
--- a/include/uapi/linux/hdlc.h
+++ b/include/uapi/linux/hdlc.h
@@ -13,7 +13,9 @@
 #define _UAPI__HDLC_H
 
 
-#define HDLC_MAX_MTU 1500	/* Ethernet 1500 bytes */
+/* FRF 1.2 states the information field should be 1600 bytes. So in case of
+ * a 4-byte header of Q.922, this results in a MTU of 1604 bytes */
+#define HDLC_MAX_MTU 1604	/* as required for FR network (e.g. carrying GPRS-NS) */
 #if 0
 #define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4) /* for ETH+VLAN over FR */
 #else
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-01-05 13:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04 12:57 [PATCH] net: hdlc: Increase maximum HDLC MTU Harald Welte
2023-01-04 17:52 ` Andrew Lunn
2023-01-04 21:48   ` Harald Welte
2023-01-05  7:06 ` Krzysztof Hałasa
2023-01-05 13:18   ` Harald Welte

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.