Userspace networking with remote direct memory access
A computer system that includes at least one host device comprising at least one processor. The at least one processor is configured to implement, in a host operating system (OS) space, a teamed network interface card (NIC) software program that provides a unified interface to host OS space upper layer protocols including at least a remote direct memory access (RDMA) protocol and an Ethernet protocol. The teamed NIC software program provides multiplexing for at least two data pathways. The at least two data pathways include an RDMA data pathway that transmits communications to and from an RDMA interface of a physical NIC, and an Ethernet data pathway that transmits communications to and from an Ethernet interface of the physical NIC through a virtual switch that is implemented in a host user space and a virtual NIC that is implemented in the host OS space.
1. A host device comprising at least one processor configured to implement, in a host operating system (OS) space, a teamed network interface card (NIC) software program that provides a unified interface to host OS space upper layer protocols that serve applications executing in a host user space, the host OS space upper layer protocols including at least a remote direct memory access (RDMA) protocol and an Ethernet protocol, wherein the teamed NIC software program provides multiplexing for at least two data pathways between a physical NIC and the host OS space upper layer protocols, the at least two data pathways including:
an RDMA data pathway that transmits first communications between an RDMA interface of the physical NIC and the teamed NIC software program through the host OS space and not through the host user space; and
an Ethernet data pathway that transmits second communications between an Ethernet interface of the physical NIC and the teamed NIC software program through both a virtual switch that is implemented in the host user space and a virtual NIC that is implemented in the host OS space.
2. The host device of claim 1 , wherein the at least one processor is configured to implement, in the host user space:
a software interface for a NIC switch of the physical NIC; and
the virtual switch that transmits a data packet to or from the NIC switch using the software interface implemented in the host user space.
3. The host device of claim 2 , wherein the software interface for the NIC switch of the physical NIC includes queues and resources for transmitting the data packet.
4. The host device of claim 2 , wherein the virtual switch transmits the data packet to or from the NIC switch using a shared memory communication between the host user space and the host OS space.
5. The host device of claim 4 , wherein the shared memory communication between the host user space and the host OS space is controlled by a poll mode driver implemented in the host user space.
6. The host device of claim 2 , wherein the Ethernet data pathway transmits the second communications between the Ethernet interface of the physical NIC and the teamed NIC software program through the software interface for the NIC switch of the physical NIC, the virtual switch implemented in the host user space, a shared memory communication between the host user space and the host OS space, and the virtual NIC that is implemented in the host OS space.
7. The host device of claim 1 , wherein the RDMA data pathway uses a media access control (MAC) address and an internet protocol (IP) address assignment for the RDMA interface of the physical NIC.
8. The host device of claim 7 , wherein the teamed NIC software program accesses the RDMA interface of the physical NIC through direct access to a virtual port of the physical NIC using a hardware driver.
9. The host device of claim 1 , wherein the RDMA protocol is used to directly read or write to a memory device without being processed by a host OS of the host device.
10. The host device of claim 1 , wherein the unified interface provided to the host OS space upper layer protocols that serve applications executing in the host user space, by the teamed NIC software program includes a single unified media access control (MAC) address and internet protocol (IP) address that is used to transmit data with the physical NIC.
11. The host device of claim 10 , wherein the teamed NIC software program aggregates data traffic from both the RDMA data pathway and the Ethernet data pathway and provides the data traffic to the host OS space upper layer protocols that serve the applications executing in the host user space through the unified interface such that the data traffic appears to be originating from a same device.
12. The host device of claim 1 , wherein:
the host user space is allocated for execution of programs by authorized and authenticated users; and
the host OS space is allocated for a kernel of a host OS for execution of threads by OS processes.
13. A method comprising:
executing a teamed network interface card (NIC) software program in a host operating system (OS) space, wherein the teamed NIC software program provides a unified interface to host OS space upper layer protocols that serve applications executing in a host user space, the host OS space upper layer protocols including at least a remote direct memory access (RDMA) protocol and an Ethernet protocol;
multiplexing for at least two data pathways between a physical NIC and the host OS space upper layer protocols using the teamed NIC software program, the at least two data pathways including:
an RDMA data pathway implemented in the host OS space that includes:
accessing an RDMA interface of the physical NIC through using a hardware driver; and
transmitting first communications between the RDMA interface of the physical NIC and the teamed NIC software program through the host OS space and not through the host user space;
an Ethernet data pathway that includes transmitting second communications between an Ethernet interface of the physical NIC and the teamed NIC software program through both a virtual switch that is implemented in the host user space and a virtual NIC that is implemented in the host OS space.
14. The method of claim 13 , wherein transmitting the second communications between the Ethernet interface of the physical NIC and the teamed NIC software program through both the virtual switch that is implemented in the host user space and the virtual NIC that is implemented in the host OS space, further includes:
transmitting the second communications between the Ethernet interface of the physical NIC and a software interface implemented in the host user space for the physical NIC; and
transmitting the second communications between the software interface and the virtual switch that is implemented in the host user space.
15. The method of claim 13 , wherein the unified interface provided to the host OS space upper layer protocols that serve the applications executing in the host user space by the teamed NIC software program includes a single unified media access control (MAC) address and internet protocol (IP) address that is used to transmit data packets with the physical NIC.
16. The method of claim 13 , wherein executing the teamed NIC software program includes:
aggregating data traffic from both the RDMA data pathway and the Ethernet data pathway; and
providing the data traffic to the host OS space upper layer protocols that serve the applications executing in the host user space through the unified interface such that the data traffic appears to be originating from a same device.
17. The method of claim 16 , wherein transmitting the first communications between the RDMA interface of the physical NIC and the teamed NIC software program includes directly reading or writing to a memory device without being processed by a host OS.
18. A host device comprising at least one processor and at least one physical network interface card (NIC), the at least one processor being configured to:
execute a virtual switch in a host user space, the virtual switch being configured to transmit data packets to and from the physical NIC through the host user space;
execute a teamed NIC software program in a host operating system (OS) space, wherein the teamed NIC software program is configured to provide a unified interface to host OS space upper layer protocols that serve applications executing in the host user space, the host OS space upper layer protocols including at least a remote direct memory access (RDMA) protocol and an Ethernet protocol;
transmit first communications to and from an RDMA interface of the physical NIC and the teamed NIC software program using an RDMA data pathway that flows between the physical NIC and the host OS space upper layer protocols;
transmit second communications to and from an Ethernet interface of the physical NIC through the virtual switch that is executed in the host user space and a virtual NIC that is executed in the host OS space using an Ethernet data pathway that flows between the physical NIC and the host OS space upper layer protocols;
aggregate data traffic for at least the RDMA data pathway and the Ethernet data pathway; and
provide the data traffic to the RDMA protocol and the Ethernet protocol using the unified interface, wherein the data traffic is provided to the host OS space upper layer protocols that serve the applications executing in the host user space using the unified interface such that the data traffic appears to be originating from a same device.
19. The host device of claim 18 , wherein the unified interface provided to the host OS space upper layer protocols that serve the applications executing in the host user space by the teamed NIC software program includes a single unified media access control (MAC) address and internet protocol (IP) address that is used to transmit data with the physical NIC.