linux-stable/include
Tom Parkin 4cf476ced4 ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls
This new ioctl pair allows two ppp channels to be bridged together:
frames arriving in one channel are transmitted in the other channel
and vice versa.

The practical use for this is primarily to support the L2TP Access
Concentrator use-case.  The end-user session is presented as a ppp
channel (typically PPPoE, although it could be e.g. PPPoA, or even PPP
over a serial link) and is switched into a PPPoL2TP session for
transmission to the LNS.  At the LNS the PPP session is terminated in
the ISP's network.

When a PPP channel is bridged to another it takes a reference on the
other's struct ppp_file.  This reference is dropped when the channels
are unbridged, which can occur either explicitly on userspace calling
the PPPIOCUNBRIDGECHAN ioctl, or implicitly when either channel in the
bridge is unregistered.

In order to implement the channel bridge, struct channel is extended
with a new field, 'bridge', which points to the other struct channel
making up the bridge.

This pointer is RCU protected to avoid adding another lock to the data
path.

To guard against concurrent writes to the pointer, the existing struct
channel lock 'upl' coverage is extended rather than adding a new lock.

The 'upl' lock is used to protect the existing unit pointer.  Since the
bridge effectively replaces the unit (they're mutually exclusive for a
channel) it makes coding easier to use the same lock to cover them
both.

Signed-off-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-12-10 13:57:36 -08:00
..
acpi pci-v5.10-changes 2020-10-22 12:41:00 -07:00
asm-generic Merge branch 'for-5.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu 2020-11-15 08:57:19 -08:00
clocksource
crypto
drm drm: drm_print.h: fix kernel-doc markups 2020-10-27 11:21:39 +01:00
dt-bindings dt-bindings: firmware: add IMX_SC_R_CAN(x) macro for CAN 2020-11-20 12:06:45 +01:00
keys rxrpc: Don't leak the service-side session key to userspace 2020-11-23 18:09:29 +00:00
kunit kunit: fix display of failed expectations for strings 2020-11-10 13:45:15 -07:00
kvm ARM: 2020-10-23 11:17:56 -07:00
linux Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux 2020-12-07 18:36:21 -08:00
math-emu
media ARM: SoC platform updates 2020-10-24 10:33:08 -07:00
memory
misc
net mptcp: add port support for ADD_ADDR suboption writing 2020-12-09 19:02:15 -08:00
pcmcia
ras
rdma net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
scsi scsi: libiscsi: Fix NOP race condition 2020-11-16 22:32:50 -05:00
soc soc/fsl/qbman: Add an argument to signal if NAPI processing is required. 2020-11-03 17:41:03 -08:00
sound ASoC: Fixes for v5.11 2020-11-19 19:56:29 +01:00
target
trace Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-12-04 07:48:12 -08:00
uapi ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls 2020-12-10 13:57:36 -08:00
vdso
video gpu: ipu-v3: remove unused functions 2020-10-26 10:42:38 +01:00
xen xen: branch for v5.10-rc1c 2020-10-25 10:55:35 -07:00