]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: x25: Queue received packets in the drivers instead of per-CPU queues
authorXie He <xie.he.0141@gmail.com>
Fri, 2 Apr 2021 09:30:00 +0000 (02:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Apr 2021 18:42:12 +0000 (11:42 -0700)
commit514e1150da9cd8d7978d990a353636cf1a7a87c2
tree64715b8f2fbe5cb42256ba74c1974f6db3f008e0
parent7d42e84eb99daf9b7feef37e8f2ea1eaf975346b
net: x25: Queue received packets in the drivers instead of per-CPU queues

X.25 Layer 3 (the Packet Layer) expects layer 2 to provide a reliable
datalink service such that no packets are reordered or dropped. And
X.25 Layer 2 (the LAPB layer) is indeed designed to provide such service.

However, this reliability is not preserved when a driver calls "netif_rx"
to deliver the received packets to layer 3, because "netif_rx" will put
the packets into per-CPU queues before they are delivered to layer 3.
If there are multiple CPUs, the order of the packets may not be preserved.
The per-CPU queues may also drop packets if there are too many.

Therefore, we should not call "netif_rx" to let it queue the packets.
Instead, we should use our own queue that won't reorder or drop packets.

This patch changes all X.25 drivers to use their own queues instead of
calling "netif_rx". The patch also documents this requirement in the
"x25-iface" documentation.

Cc: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: Xie He <xie.he.0141@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/x25-iface.rst
drivers/net/wan/hdlc_x25.c
drivers/net/wan/lapbether.c