IP Library Granted Patent US 12705119
Granted Patent B2
US 12705119 · App. 17/411,564 · Granted Aug 11, 2026

Coordinating data packet processing between kernel space and user space

Inventors: Flavio Leitner (Maringa, BR); Aaron Conole (Brookline, NH); Mark Gray (Ennis, IE); Ilya Maximets (Prague, CZ)
Assignee: Red Hat, Inc.
G06F9/545G06F9/546H04L45/02
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12705119
App. No.
17/411,564
Granted
Aug 11, 2026
Kind
B2
Abstract

A system may comprise a group of processor cores configured to generate kernel-space threads in a kernel space and user-space threads in a user space of a Linux operating system. Each kernel-space thread may be executable by one of the processor cores to perform operations. For example, a kernel-space thread may receive a data packet transmitted from a client device via a network. The kernel-space thread may determine a particular communication channel assigned to a processor core that is executing the kernel-space thread. The kernel-space thread may determine if the data packet satisfies a condition based on information extracted from the data packet. In response to determining that the data packet does not satisfy the condition, the kernel-space thread may transmit data from the data packet via the particular communication channel to a user-space thread. The user-space thread may be configured to receive and process the data.

Claims (55)

1 . A non-transitory computer-readable medium comprising program code that is executable by a processor core for generating a kernel-space thread configured to:

receive a data packet transmitted from a client device via a network;

determine, based on a mapping between a plurality of communication channels and a plurality of processor cores, a particular communication channel assigned to the processor core that includes the kernel-space thread, wherein the mapping comprises a plurality of processor core identifiers correlated to a plurality of communication channel identifiers, wherein each processor core of the plurality of processor cores is configured to execute a single kernel-space thread of a plurality of kernel-space threads and corresponds, via the mapping, to a single communication channel of the plurality of communication channels and a single user-space thread of a plurality of user-space threads;

determine if the data packet satisfies a condition based on information extracted from the data packet; and

in response to determining that the data packet does not satisfy the condition, transmit data from the data packet via the particular communication channel to a user-space thread of the plurality of user-space threads, the user-space thread being configured to receive and process the data.

2 . The non-transitory computer-readable medium of claim 1 , further comprising program code that is executable by the processor core for causing the kernel-space thread to:

access the mapping of the plurality of processor cores to the plurality of communication channels, each processor core in the plurality of processor cores being correlated in the mapping to a respective communication channel of the plurality of communication channels, wherein each communication channel in the plurality of communication channels is for transmitting data packets to a corresponding user-space thread of the plurality of user-space threads; and

determine the particular communication channel based on the mapping.

3 . The non-transitory computer-readable medium of claim 1 , wherein the condition involves the data packet having a corresponding flow path in a flow table, and further comprising program code that is executable by the processor core for causing the kernel-space thread to:

determine if the data packet satisfies the condition by checking whether a flow path for the data packet exists in the flow table; and

in response to determining that the flow path does not exist in the flow table, transmit the data via the particular communication channel to the user-space thread, the user-space thread being configured to:

receive the data via the particular communication channel;

in response to receiving the data, determine the flow path for the data packet; and

in response to determining the flow path, cause the flow path for the data packet to be added to the flow table.

4 . The non-transitory computer-readable medium of claim 1 , wherein the kernel-space thread is executed by the same processor core as the user-space thread that corresponds, via the mapping, to the kernel-space thread.

5 . A system comprising:

a plurality of processor cores configured to generate a plurality of kernel-space threads in a kernel space of a Linux operating system and generate a plurality of user-space threads in a user space of the Linux operating system, each kernel-space thread of the plurality of kernel-space threads being executable by a particular processor core of the plurality of processor cores to:

receive a data packet transmitted from a client device via a network;

determine, based on a mapping between a plurality of communication channels and the plurality of processor cores, a particular communication channel assigned to the particular processor core that includes the kernel-space thread, wherein the mapping comprises a plurality of processor core identifiers correlated to a plurality of communication channel identifiers, wherein each processor core of the plurality of processor cores is configured to execute a single kernel-space thread of the plurality of kernel-space threads and corresponds, via the mapping, to a single communication channel of the plurality of communication channels and a single user-space thread of the plurality of user-space threads;

determine if the data packet satisfies a condition based on information extracted from the data packet; and

in response to determining that the data packet does not satisfy the condition, transmit data from the data packet via the particular communication channel to a user-space thread of the plurality of user-space threads, the user-space thread being configured to receive and process the data.

6 . The system of claim 5 , wherein the condition involves the data packet having a corresponding flow path in a flow table, and wherein the kernel-space thread is configured to determine if the data packet satisfies the condition by checking whether a flow path for the data packet exists in the flow table.

7 . The system of claim 6 , wherein the user-space thread is configured to determine the flow path for the data packet and execute one or more actions associated with the flow path on the data packet.

8 . The system of claim 7 , wherein the user-space thread is configured to cause the flow path for the data packet to be added to the flow table.

9 . The system of claim 6 , wherein each kernel-space thread of the plurality of kernel-space threads is configured to, in response to determining that the flow path for the data packet exists in the flow table, execute one or more actions associated with the flow path on the data packet.

10 . The system of claim 5 , wherein the plurality of communication channels include a plurality of netlink sockets for communicating data between the kernel space and the user space.

11 . The system of claim 5 , wherein the plurality of communication channels include a plurality of shared memory locations between the kernel space and the user space, the plurality of shared memory locations being for communicating data between the kernel space and the user space.

12 . The system of claim 5 , wherein the kernel space includes at least one processing thread that is configured to:

receive a plurality of data packets over the network from one or more client devices; and

distribute the plurality of data packets among the plurality of kernel-space threads according to one or more predefined distribution schemes.

13 . The system of claim 12 , wherein the plurality of data packets include a sequence of data packets, and wherein the one or more predefined distributed schemes are configured for causing each data packet in the sequence of data packets to be transmitted to a same kernel-space thread of the plurality of kernel-space threads for processing by the same kernel-space thread.

14 . The system of claim 5 , wherein kernel-space thread is further configured to:

access the mapping of the plurality of processor cores to the plurality of communication channels, each processor core in the plurality of processor cores being correlated in the mapping to a respective communication channel of the plurality of communication channels, wherein each communication channel in the plurality of communication channels is for transmitting data packets to a corresponding user-space thread of the plurality of user-space threads; and

determine the particular communication channel based on the mapping.

15 . The system of claim 14 , wherein the kernel space includes at least one processing thread configured to receive a plurality of identifiers of the plurality of communication channels from the plurality of user-space threads and generate the mapping based on the plurality of identifiers, each user-space thread of the plurality of user-space threads being configured to establish a respective communication channel of the plurality of communication channels and transmit a respective identifier of the respective communication channel to the at least one processing thread for use in generating the mapping.

16 . A method comprising:

receiving, by a kernel-space thread executing on a processor core, a data packet transmitted from a client device via a network;

determining, by the kernel-space thread and based on a mapping between a plurality of communication channels and a plurality of processor cores, a particular communication channel assigned to the processor core that includes the kernel-space thread, wherein the mapping comprises a plurality of processor core identifiers correlated to a plurality of communication channel identifiers, wherein each processor core of the plurality of processor cores is configured to execute a single kernel-space thread of a plurality of kernel-space threads and corresponds, via the mapping, to a single communication channel of the plurality of communication channels and a single user-space thread of a plurality of user-space threads;

determining, by the kernel-space thread and based on information extracted from the data packet, that the data packet does not satisfy a condition; and

in response to determining that the data packet does not satisfy the condition, transmitting, by the kernel-space thread, data from the data packet via the particular communication channel to a user-space thread of the plurality of user-space threads that receives and processes the data.

17 . The method of claim 16 , wherein the condition involves the data packet having a corresponding flow path in a flow table, and further comprising:

determining, by the kernel-space thread, that the data packet does not satisfy the condition by checking whether a flow path for the data packet exists in the flow table;

in response to determining that the flow path does not exist in the flow table, transmitting, by the kernel-space thread, the data via the particular communication channel to the user-space thread;

receiving, by the user-space thread, the data via the particular communication channel;

in response to receiving the data, determining, by the user-space thread, the flow path for the data packet; and

in response to determining the flow path, causing, by the user-space thread, the flow path for the data packet to be added to the flow table.

18 . The method of claim 16 , further comprising:

receiving, by at least one processor core of the plurality of processor cores, a sequence of data packets over the network from one or more client devices; and

providing, by the at least one processor core, the sequence of data packets to a same kernel-space thread of the plurality of kernel-space threads based on one or more distribution schemes for causing the sequence of data packets to be processed by the same kernel-space thread.

19 . The method of claim 16 , further comprising:

accessing, by the kernel-space thread, the mapping of the plurality of processor cores to the plurality of communication channels, each processor core in the plurality of processor cores being correlated in the mapping to a respective communication channel of the plurality of communication channels, wherein each communication channel in the plurality of communication channels is for transmitting data packets to a corresponding user-space thread of the plurality of user-space threads; and

determining, by the kernel-space thread, the particular communication channel based on the mapping.

20 . The method of claim 19 , further comprising:

receiving, by at least one processing thread, the plurality of communication channel identifiers of the plurality of communication channels from the plurality of user-space threads, each user-space thread of the plurality of user-space threads being configured to establish a respective communication channel of the plurality of communication channels and transmit a respective communication channel identifier of the respective communication channel to the at least one processing thread for use in generating the mapping; and

generating, by the at least one processing thread, the mapping based on the plurality of communication channel identifiers and the plurality of processor core identifiers.