diff mbox series

[net-next,RFC] net: dlci: Deprecate the DLCI driver (aka the Frame Relay layer)

Message ID 20201021104928.599621-1-xie.he.0141@gmail.com
State RFC
Delegated to: David Miller
Headers show
Series [net-next,RFC] net: dlci: Deprecate the DLCI driver (aka the Frame Relay layer) | expand

Checks

Context Check Description
jkicinski/cover_letter success Link
jkicinski/fixes_present success Link
jkicinski/patch_count success Link
jkicinski/tree_selection success Clearly marked for net-next
jkicinski/subject_prefix success Link
jkicinski/source_inline success Was 0 now: 0
jkicinski/verify_signedoff success Link
jkicinski/module_param success Was 0 now: 0
jkicinski/build_32bit success Errors and warnings before: 1 this patch: 1
jkicinski/kdoc success Errors and warnings before: 0 this patch: 0
jkicinski/verify_fixes success Link
jkicinski/checkpatch success total: 0 errors, 0 warnings, 0 checks, 26 lines checked
jkicinski/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
jkicinski/header_inline success Link
jkicinski/stable success Stable not CCed
jkicinski/cover_letter success Link
jkicinski/fixes_present success Link
jkicinski/patch_count success Link
jkicinski/tree_selection success Clearly marked for net-next
jkicinski/subject_prefix success Link
jkicinski/source_inline success Was 0 now: 0
jkicinski/verify_signedoff success Link
jkicinski/module_param success Was 0 now: 0
jkicinski/build_32bit success Errors and warnings before: 1 this patch: 1
jkicinski/kdoc success Errors and warnings before: 0 this patch: 0
jkicinski/verify_fixes success Link
jkicinski/checkpatch success total: 0 errors, 0 warnings, 0 checks, 26 lines checked
jkicinski/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
jkicinski/header_inline success Link
jkicinski/stable success Stable not CCed

Commit Message

Xie He Oct. 21, 2020, 10:49 a.m. UTC
I wish to deprecate the Frame Relay layer (dlci.c) in the kernel because
we already have a newer and better "HDLC Frame Relay" layer (hdlc_fr.c).

Reasons why hdlc_fr.c is better than dlci.c include:

1.
dlci.c is dated 1997, while hdlc_fr.c is dated 1999 - 2006, so the later
is newer than the former.

2.
hdlc_fr.c is working well (tested by me). For dlci.c, I cannot even find
the user space problem needed to use it. The link provided in
Documentation/networking/framerelay.rst (in the last paragraph) is no
longer valid.

3.
dlci.c supports only one hardware driver - sdla.c, while hdlc_fr.c
supports many hardware drivers through the generic HDLC layer (hdlc.c).

WAN hardware devices are usually able to support several L2 protocols
at the same time, so the HDLC layer is more suitable for these devices.

The hardware devices that sdla.c supports are also multi-protocol
(according to drivers/net/wan/Kconfig), so the HDLC layer is more
suitable for these devices, too.

4.
hdlc_fr.c supports LMI and supports Ethernet emulation. dlci.c supports
neither according to its code.

5.
include/uapi/linux/if_frad.h, which comes with dlci.c, contains two
structs for ioctl configs (dlci_conf and frad_conf). According to the
comments, these two structs are specially crafted for sdla.c (the only
hardware driver dlci.c supports). I think this makes dlci.c not generic
enough to support other hardware drivers.

Cc: Lee Jones <lee.jones@linaro.org>
Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Xie He <xie.he.0141@gmail.com>
---
 Documentation/networking/framerelay.rst | 3 +++
 drivers/net/wan/dlci.c                  | 2 ++
 drivers/net/wan/sdla.c                  | 3 +++
 3 files changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/Documentation/networking/framerelay.rst b/Documentation/networking/framerelay.rst
index 6d904399ec6d..bfbbaa531d8b 100644
--- a/Documentation/networking/framerelay.rst
+++ b/Documentation/networking/framerelay.rst
@@ -4,6 +4,9 @@ 
 Frame Relay (FR)
 ================
 
+Note that the Frame Relay layer is deprecated. New drivers should use the HDLC
+Frame Relay layer instead.
+
 Frame Relay (FR) support for linux is built into a two tiered system of device
 drivers.  The upper layer implements RFC1490 FR specification, and uses the
 Data Link Connection Identifier (DLCI) as its hardware address.  Usually these
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c
index 3ca4daf63389..98cb023f08ac 100644
--- a/drivers/net/wan/dlci.c
+++ b/drivers/net/wan/dlci.c
@@ -514,6 +514,8 @@  static int __init init_dlci(void)
 	register_netdevice_notifier(&dlci_notifier);
 
 	printk("%s.\n", version);
+	pr_warn("The DLCI driver (the Frame Relay layer) is deprecated.\n"
+		"Please move your driver to using the HDLC Frame Relay instead.\n");
 
 	return 0;
 }
diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c
index bc2c1c7fb1a4..21d4cf06d6af 100644
--- a/drivers/net/wan/sdla.c
+++ b/drivers/net/wan/sdla.c
@@ -1623,6 +1623,9 @@  static int __init init_sdla(void)
 	int err;
 
 	printk("%s.\n", version);
+	pr_warn("The SDLA driver is deprecated.\n"
+		"If you are still using the hardware,\n"
+		"please help move this driver to using the HDLC Frame Relay layer.\n");
 
 	sdla = alloc_netdev(sizeof(struct frad_local), "sdla0",
 			    NET_NAME_UNKNOWN, setup_sdla);