aboutsummaryrefslogtreecommitdiff
path: root/arch/um/drivers/vector_user.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-11um: vector: Add dynamic tap interfaces and scriptingAnton Ivanov1-9/+47
Provide functionality roughly compatible with the existing qemu ifup scripting: * invocation of an ifup script. The interface name is passed as the first and only argument * allocating tap interfaces on the fly if they are not explicitly specified Signed-off-by: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2020-10-11um: Remove redundant NULL checkLi Heng1-2/+1
Fix below warnings reported by coccicheck: ./arch/um/drivers/vector_user.c:403:2-7: WARNING: NULL check before some freeing functions is not needed. Fixes: bc8f8e4e6e7a ("um: Add a generic "fd" vector transport") Signed-off-by: Li Heng <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2020-10-11um: Some fixes to build UML with muslIgnat Korchagin1-3/+1
musl toolchain and headers are a bit more strict. These fixes enable building UML with musl as well as seem not to break on glibc. Signed-off-by: Ignat Korchagin <[email protected]> Tested-by: Brendan Higgins <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2020-10-11um: Fix null pointer dereference in vector_user_bpfGaurav Singh1-3/+5
The bpf_prog is being checked for !NULL after uml_kmalloc but later its used directly for example: bpf_prog->filter = bpf and is also later returned upon success. Fix this, do a NULL check and return right away. Signed-off-by: Gaurav Singh <[email protected]> Acked-By: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2020-06-02um: Add a generic "fd" vector transportMarc-André Lureau1-0/+59
Learn to take a pre-opened file-descriptor for vector IO. Instead of teaching the driver to open a FD in multiple ways, it can rely on management layer to do it on its behalf. For example, this allows inheriting a preconfigured device fd or a simple socketpair() setup, without further arguments, privileges or system access by UML. Signed-off-by: Marc-AndrĂ© Lureau <[email protected]> Acked-By: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2020-03-29um: Remove some unnecessary NULL checks in vector_user.cAlex Dewar1-10/+5
kfree() already checks for null pointers, so additional checking is unnecessary. Signed-off-by: Alex Dewar <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2019-11-25um: Loadable BPF "Firmware" for vector driversAnton Ivanov1-18/+76
All vector drivers now allow a BPF program to be loaded and associated with the RX socket in the host kernel. 1. The program can be loaded as an extra kernel command line option to any of the vector drivers. 2. The program can also be loaded as "firmware", using the ethtool flash option. It is possible to turn this facility on or off using a command line option. A simplistic wrapper for generating the BPF firmware for the raw socket driver out of a tcpdump/libpcap filter expression can be found at: https://github.com/kot-begemot-uk/uml_vector_utilities/ Signed-off-by: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2019-09-15um: Add SPDX headers for files in arch/um/driversAlex Dewar1-1/+1
Convert files to use SPDX header. All files are licensed under the GPLv2. Signed-off-by: Alex Dewar <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2019-09-15um: Error handling fixes in vector driversAnton Ivanov1-2/+2
With the addition of bess support which uses connection oriented SEQPACKET sockets the vector routines can now encounter a "remote end closed the connection" scenario. This adds handling code to detect it in the TX path and the legacy RX path. There is no way to detect it in the vector RX path because that can legitimately return 0 even if the remote end has not closed the connection. As a result the detection is delayed until the first TX event after the close. Signed-off-by: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2019-09-15um: Added support for unix socket transports and bess transportAnton Ivanov1-1/+87
This adds support for the UNIX domain socket transports in general and implements a Netsys::BESS compatible transport interface. For details on Netsys::BESS see https://github.com/NetSys/bess Signed-off-by: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2019-09-15um: Add legacy tap support and rename existing vector to hybridAnton Ivanov1-84/+119
1. Adds legacy tap support 2. Renames tap+raw as hybrid Signed-off-by: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2019-03-06um: Remove duplicated include from vector_user.cYueHaibing1-3/+0
Remove duplicated include. Signed-off-by: YueHaibing <[email protected]> Reviewed-by: Anton Ivanov <[email protected]> Acked-by: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2018-12-27um: writev needs <sys/uio.h>Christoph Hellwig1-0/+1
vector_user.c doesn't compile without this for me. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2018-12-27um: Include sys/uio.h to have writev()Richard Weinberger1-0/+1
sys/uio.h gives us writev(), otherwise the build might fail on some systems. Fixes: 49da7e64f33e ("High Performance UML Vector Network Driver") Signed-off-by: Richard Weinberger <[email protected]>
2018-10-29um: NULL check before kfree is not neededYueHaibing1-4/+2
kfree(NULL) is safe,so this removes NULL check before freeing the mem Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2018-03-29Fix vector raw inintialization logicAnton Ivanov1-9/+13
Vector RAW in UML needs to BPF filter its own MAC only if QDISC_BYPASS has failed. If QDISC_BYPASS is successful, the frames originated locally are not visible to readers on the raw socket. Signed-off-by: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2018-02-19High Performance UML Vector Network DriverAnton Ivanov1-0/+586
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]>