Skip to content

Commit a0c2ccd

Browse files
jk-ozlabsdavem330
authored andcommitted
mctp: Add MCTP-over-serial transport binding
This change adds a MCTP Serial transport binding, as defined by DMTF specificiation DSP0253 - "MCTP Serial Transport Binding". This is implemented as a new serial line discipline, and can be attached to arbitrary tty devices. From the Kconfig description: This driver provides an MCTP-over-serial interface, through a serial line-discipline, as defined by DMTF specification "DSP0253 - MCTP Serial Transport Binding". By attaching the ldisc to a serial device, we get a new net device to transport MCTP packets. This allows communication with external MCTP endpoints which use serial as their transport. It can also be used as an easy way to provide MCTP connectivity between virtual machines, by forwarding data between simple virtual serial devices. Say y here if you need to connect to MCTP endpoints over serial. To compile as a module, use m; the module will be called mctp-serial. Once the N_MCTP line discipline is set [using ioctl(TCIOSETD)], we get a new netdev suitable for MCTP communication. The 'mctp' utility[1] provides a simple wrapper for this ioctl, using 'link serial <device>': # mctp link serial /dev/ttyS0 & # mctp link dev lo index 1 address 0x00:00:00:00:00:00 net 1 mtu 65536 up dev mctpserial0 index 5 address 0x(no-addr) net 1 mtu 68 down [1]: https://github.com/CodeConstruct/mctp Signed-off-by: Jeremy Kerr <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 25e2735 commit a0c2ccd

File tree

4 files changed

+530
-0
lines changed

4 files changed

+530
-0
lines changed

drivers/net/mctp/Kconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@ if MCTP
33

44
menu "MCTP Device Drivers"
55

6+
config MCTP_SERIAL
7+
tristate "MCTP serial transport"
8+
depends on TTY
9+
select CRC_CCITT
10+
help
11+
This driver provides an MCTP-over-serial interface, through a
12+
serial line-discipline, as defined by DMTF specification "DSP0253 -
13+
MCTP Serial Transport Binding". By attaching the ldisc to a serial
14+
device, we get a new net device to transport MCTP packets.
15+
16+
This allows communication with external MCTP endpoints which use
17+
serial as their transport. It can also be used as an easy way to
18+
provide MCTP connectivity between virtual machines, by forwarding
19+
data between simple virtual serial devices.
20+
21+
Say y here if you need to connect to MCTP endpoints over serial. To
22+
compile as a module, use m; the module will be called mctp-serial.
23+
624
endmenu
725

826
endif

drivers/net/mctp/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
obj-$(CONFIG_MCTP_SERIAL) += mctp-serial.o

0 commit comments

Comments
 (0)