# US 2024/0256474 A1 · Network interface controller configuration method, apparatus, device, and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0256474 A1
- Document ID: US20240256474A1
- Status: Published application
- Kind: A1
- Application number: 18/630,597
- Filed: 2024-04-09
- Published: 2024-08-01
- Earliest claimed: 2022-02-16
- Assignees: Beijing Volcano Engine Technology Co., Ltd.
- Applicants: Beijing Volcano Engine Technology Co., Ltd.
- Inventors: Yingxin Liang; Zhiyong Ye
- Web page: https://patentgrep.com/patent/US20240256474A1

## CPC

- G06F 13/24: using interrupt (G06F13/32 takes precedence)
- G06F 9/4812: {by interrupt, e.g. masked}
- G06F 9/5027: {the resource being a machine, e.g. CPUs, Servers, Terminals}
- G06F 9/544: {Buffers; Shared memory; Pipes}
- G06F 9/546: {Message passing systems or structures, e.g. queues}
- G06F 15/1735: {Network adapters, e.g. SCI, Myrinet (protocol engines H04L69/12)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of the present disclosure relate to network interface controller configuration. The method comprises: determining a network interface controller queue to be subjected to affinity setting in a target network interface controller; determining a NUMA node corresponding to the target network interface controller and a Die set corresponding to the node; binding a first network interface controller queue to be subjected to affinity setting with a CPU on a first Die in the Die set; and binding the RPS/XPS of a first interrupt request number corresponding to the first network interface controller queue to be subjected to affinity setting with the CPU on the first Die. By binding the RPS/XPS of an interrupt request number corresponding to the network interface controller queue and the network interface controller queue bound with a same Die, the cache hit ratio and thus the network interface controller performance can be improved.

## Claims

### Claim 1

A method for network interface controller configuration, comprising:
determining queues of network interface controllers to be subjected to affinity setting in a target network interface controller, wherein the queues of network interface controllers to be subjected to affinity setting have corresponding relationship with at least one interrupt number, an interrupt number used to identify a type of an interrupt request;
determining a non-uniform memory access (NUMA) node corresponding to the target network interface controller, and a die set corresponding to the NUMA node, wherein the die set comprises at least one die, each die comprising a plurality of central processing units (CPUs) sharing a same cache;
binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set, wherein the first die is any die in the die set;
determining an interrupt number corresponding to the first queue of network interface controllers to be subjected to affinity setting as a first interrupt number; and
binding a receive packet steering (RPS) of the first interrupt number and/or a transmit packet steering (XPS) of the first interrupt number with the CPU on the first die.

### Claim 2 (depends on 1)

The method of claim 1, prior to the binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set, further comprising:
determining a total number of interrupt numbers corresponding to the queue of network interface controllers to be subjected to affinity setting in the target network interface controller, and a number of dies in the die set corresponding to the NUMA node; and
grouping, based on the total number of interrupt numbers and the number of dies, the queues of the network interface controllers to be subjected to affinity setting in the target network interface controller to obtain at least one group;
wherein binding the first queue of network interface controllers to be subjected to affinity setting to the CPU on the first die in the die set comprises:
binding the queue of network interface controllers to be subjected to affinity setting included in a first group of the at least one group with the CPU on the first die in the die set, wherein the first group includes a first queue of network interface controllers to be subjected to affinity setting.

### Claim 3 (depends on 1)

The method of claim 1, prior to the binding a receive packet steering (RPS) of the first interrupt number and/or a transmit packet steering (XPS) of the first interrupt number with the CPU on the first die, further comprising:
determining the CPU bound to the first queue of network interface controllers to be subjected to affinity setting on the first die as a first CPU;
binding the RPS and/or XPS of the first interrupt number to the first CPU.

### Claim 4 (depends on 1)

The method of claim 1, wherein each CPU is divided into at least two hyper-threads (HTs), and the binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set comprises:
binding the first queue of network interface controllers to be subjected to affinity setting to a first HT on the first die in the die set;
and wherein the binding a receive packet steering (RPS) of the first interrupt number and/or a transmit packet steering (XPS) of the first interrupt number with the CPU on the first die comprises:
binding the RPS and/or XPS of the first interrupt number to the CPU where the first HT is located.

### Claim 5 (depends on 1)

The method of claim 1, prior to the binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set, further comprising:
determining, from the die set, a die running an application (APP) corresponding to the first queue of network interface controllers to be subjected to affinity setting, as the first die.

### Claim 6 (depends on 1)

The method of claim 1, prior to the binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set, further comprising:
detecting whether an interrupt request balancing (Irqbalance) service is enabled on the target network interface controller, wherein the Irqbalance service is used for allocation of interrupt requests based on interrupt load balancing on a CPU; and
in response to a determination that the target network interface controller is in a state where the Irqbalance service is enabled, disabling the Irqbalance service.

### Claim 7

An electronic device comprising:
a processor; and
a memory storing instructions thereon, the instructions, when executed by the processor, causing the electronic devices to perform acts comprising:
determining queues of network interface controllers to be subjected to affinity setting in a target network interface controller, wherein the queues of network interface controllers to be subjected to affinity setting have corresponding relationship with at least one interrupt number, an interrupt number used to identify a type of an interrupt request;
determining a non-uniform memory access (NUMA) node corresponding to the target network interface controller, and a die set corresponding to the NUMA node, wherein the die set comprises at least one die, each die comprising a plurality of central processing units (CPUs) sharing a same cache;
binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set, wherein the first die is any die in the die set;
determining an interrupt number corresponding to the first queue of network interface controllers to be subjected to affinity setting as a first interrupt number; and
binding a receive packet steering (RPS) of the first interrupt number and/or a transmit packet steering (XPS) of the first interrupt number with the CPU on the first die.

### Claim 8 (depends on 7)

The electronic device of claim 7, the acts further comprising, prior to the binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set:
determining a total number of interrupt numbers corresponding to the queue of network interface controllers to be subjected to affinity setting in the target network interface controller, and a number of dies in the die set corresponding to the NUMA node; and
grouping, based on the total number of interrupt numbers and the number of dies, the queues of the network interface controllers to be subjected to affinity setting in the target network interface controller to obtain at least one group;
wherein binding the first queue of network interface controllers to be subjected to affinity setting to the CPU on the first die in the die set comprises:
binding the queue of network interface controllers to be subjected to affinity setting included in a first group of the at least one group with the CPU on the first die in the die set, wherein the first group includes a first queue of network interface controllers to be subjected to affinity setting.

### Claim 9 (depends on 7)

The electronic device of claim 7, the acts further comprising, prior to the binding a receive packet steering (RPS) of the first interrupt number and/or a transmit packet steering (XPS) of the first interrupt number with the CPU on the first die:
determining the CPU bound with the first queue of network interface controllers to be subjected to affinity setting on the first die as a first CPU; and
binding the RPS and/or XPS of the first interrupt number to the first CPU.

### Claim 10 (depends on 7)

The electronic device of claim 7, wherein each CPU is divided into at least two hyper-threads (HTs), and the binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set comprises binding the first queue of network interface controllers to be subjected to affinity setting to a first HT on the first die in the die set; and
wherein the binding a receive packet steering (RPS) of the first interrupt number and/or a transmit packet steering (XPS) of the first interrupt number with the CPU on the first die comprises binding the RPS and/or XPS of the first interrupt number to the CPU where the first HT is located.

### Claim 11 (depends on 7)

The electronic device of claim 7, the acts further comprising, prior to the binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set:
determining, from the die set, a die running an application (APP) corresponding to the first queue of network interface controllers to be subjected to affinity setting, as the first die.

### Claim 12 (depends on 7)

The electronic device of claim 7, the acts further comprising, prior to the binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set:
detecting whether an interrupt request balancing (Irqbalance) service is enabled on the target network interface controller, wherein the Irqbalance service is used for allocation of interrupt requests based on interrupt load balancing on a CPU; and
in response to a determination that the target network interface controller is in a state where the Irqbalance service is enabled, disabling the Irqbalance service.

### Claim 13

A non-transitory computer-readable storage medium storing instructions, the instructions, when executed on an apparatus, causing the apparatus to implement a method comprising:
determining queues of network interface controllers to be subjected to affinity setting in a target network interface controller, wherein the queues of network interface controllers to be subjected to affinity setting have corresponding relationship with at least one interrupt number, an interrupt number used to identify a type of an interrupt request;
determining a non-uniform memory access (NUMA) node corresponding to the target network interface controller, and a die set corresponding to the NUMA node, wherein the die set comprises at least one die, each die comprising a plurality of central processing units (CPUs) sharing a same cache;
binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set, wherein the first die is any die in the die set;
determining an interrupt number corresponding to the first queue of network interface controllers to be subjected to affinity setting as a first interrupt number; and
binding a receive packet steering (RPS) of the first interrupt number and/or a transmit packet steering (XPS) of the first interrupt number with the CPU on the first die.

### Claim 14 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, prior to the binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set, the method further comprising:
determining a total number of interrupt numbers corresponding to the queue of network interface controllers to be subjected to affinity setting in the target network interface controller, and a number of dies in the die set corresponding to the NUMA node; and
grouping, based on the total number of interrupt numbers and the number of dies, the queues of the network interface controllers to be subjected to affinity setting in the target network interface controller to obtain at least one group;
wherein binding the first queue of network interface controllers to be subjected to affinity setting to the CPU on the first die in the die set comprises:
binding the queue of network interface controllers to be subjected to affinity setting included in a first group of the at least one group with the CPU on the first die in the die set, wherein the first group includes a first queue of network interface controllers to be subjected to affinity setting.

### Claim 15 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, prior to the binding a receive packet steering (RPS) of the first interrupt number and/or a transmit packet steering (XPS) of the first interrupt number with the CPU on the first die, the method further comprising:
determining the CPU bound with the first queue of network interface controllers to be subjected to affinity setting on the first die as a first CPU;
binding the RPS and/or XPS of the first interrupt number to the first CPU.

### Claim 16 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, wherein each CPU is divided into at least two hyper-threads (HTs), and the binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set comprises:
binding the first queue of network interface controllers to be subjected to affinity setting to a first HT on the first die in the die set; and
wherein the binding a receive packet steering (RPS) of the first interrupt number and/or a transmit packet steering (XPS) of the first interrupt number with the CPU on the first die comprises:
binding the RPS and/or XPS of the first interrupt number to the CPU where the first HT is located.

### Claim 17 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, prior to the binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set, the method further comprising:
determining, from the die set, a die running an application (APP) corresponding to the first queue of network interface controllers to be subjected to affinity setting, as the first die.

### Claim 18 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, prior to the binding a first queue of network interface controllers to be subjected to affinity setting with a CPU on a first die in the die set, the method further comprising:
detecting whether an interrupt request balancing (Irqbalance) service is enabled on the target network interface controller, wherein the Irqbalance service is used for allocation of interrupt requests based on interrupt load balancing on a CPU; and
in response to a determination that the target network interface controller is in a state where the Irqbalance service is enabled, disabling the Irqbalance service.
