Skip to content

Commit 49da7e6

Browse files
kot-begemot-ukrichardweinberger
authored andcommitted
High Performance UML Vector Network Driver
1. Provides infrastructure for vector IO using recvmmsg/sendmmsg. 1.1. Multi-message read. 1.2. Multi-message write. 1.3. Optimized queue support for multi-packet enqueue/dequeue. 1.4. BQL/DQL support. 2. Implements transports for several transports as well support for direct wiring of PWEs to NIC. Allows direct connection of VMs to host, other VMs and network devices with no switch in use. 2.1. Raw socket >4 times higher PPS and 10 times higher tcp RX than existing pcap based transport (> 4Gbit) 2.2. New tap transport using socket RX and tap xmit. Similar performance improvements (>4Gbit) 2.3. GRE transport - direct wiring to GRE PWE 2.4. L2TPv3 transport - direct wiring to L2TPv3 PWE 3. Tuning, performance and offload related setting support via ethtool. 4. Initial BPF support - used in tap/raw to avoid software looping 5. Scatter Gather support. 6. VNET and checksum offload support for raw socket transport. 7. TSO/GSO support where applicable or available 8. Migrates all error messages to netdevice_*() and rate limits them where needed. Signed-off-by: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent ff6a179 commit 49da7e6

File tree

10 files changed

+2932
-3
lines changed

10 files changed

+2932
-3
lines changed

arch/um/Kconfig.net

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,17 @@ config UML_NET_DAEMON
109109
more than one without conflict. If you don't need UML networking,
110110
say N.
111111

112+
config UML_NET_VECTOR
113+
bool "Vector I/O high performance network devices"
114+
depends on UML_NET
115+
help
116+
This User-Mode Linux network driver uses multi-message send
117+
and receive functions. The host running the UML guest must have
118+
a linux kernel version above 3.0 and a libc version > 2.13.
119+
This driver provides tap, raw, gre and l2tpv3 network transports
120+
with up to 4 times higher network throughput than the UML network
121+
drivers.
122+
112123
config UML_NET_VDE
113124
bool "VDE transport"
114125
depends on UML_NET

arch/um/drivers/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
slip-objs := slip_kern.o slip_user.o
1010
slirp-objs := slirp_kern.o slirp_user.o
1111
daemon-objs := daemon_kern.o daemon_user.o
12+
vector-objs := vector_kern.o vector_user.o vector_transports.o
1213
umcast-objs := umcast_kern.o umcast_user.o
1314
net-objs := net_kern.o net_user.o
1415
mconsole-objs := mconsole_kern.o mconsole_user.o
@@ -43,6 +44,7 @@ obj-$(CONFIG_STDERR_CONSOLE) += stderr_console.o
4344
obj-$(CONFIG_UML_NET_SLIP) += slip.o slip_common.o
4445
obj-$(CONFIG_UML_NET_SLIRP) += slirp.o slip_common.o
4546
obj-$(CONFIG_UML_NET_DAEMON) += daemon.o
47+
obj-$(CONFIG_UML_NET_VECTOR) += vector.o
4648
obj-$(CONFIG_UML_NET_VDE) += vde.o
4749
obj-$(CONFIG_UML_NET_MCAST) += umcast.o
4850
obj-$(CONFIG_UML_NET_PCAP) += pcap.o
@@ -61,7 +63,7 @@ obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o
6163
obj-$(CONFIG_UML_RANDOM) += random.o
6264

6365
# pcap_user.o must be added explicitly.
64-
USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o pcap_user.o vde_user.o
66+
USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o pcap_user.o vde_user.o vector_user.o
6567
CFLAGS_null.o = -DDEV_NULL=$(DEV_NULL_PATH)
6668

6769
include arch/um/scripts/Makefile.rules

arch/um/drivers/net_kern.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ static void uml_net_user_timer_expire(struct timer_list *t)
288288
#endif
289289
}
290290

291-
static void setup_etheraddr(struct net_device *dev, char *str)
291+
void uml_net_setup_etheraddr(struct net_device *dev, char *str)
292292
{
293293
unsigned char *addr = dev->dev_addr;
294294
char *end;
@@ -412,7 +412,7 @@ static void eth_configure(int n, void *init, char *mac,
412412
*/
413413
snprintf(dev->name, sizeof(dev->name), "eth%d", n);
414414

415-
setup_etheraddr(dev, mac);
415+
uml_net_setup_etheraddr(dev, mac);
416416

417417
printk(KERN_INFO "Netdevice %d (%pM) : ", n, dev->dev_addr);
418418

0 commit comments

Comments
 (0)