A DPDK-based SDN network data forwarding method and device
By creating a static scheduling graph and using BitMap and a depth-first search algorithm to determine node locations, the problem of low vector feature utilization under the DPDK scheduling strategy is solved, achieving more efficient packet processing and forwarding performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CLOUD TECH CO LTD
- Filing Date
- 2022-12-07
- Publication Date
- 2026-04-21
AI Technical Summary
Under the existing DPDK scheduling strategy, it is difficult to guarantee the utilization rate of the vector characteristics of data packets, which makes it difficult to maximize performance in complex business scenarios.
Create a scheduling static graph, including multiple nodes with fixed positions. Determine the node positions using a Bitmap and a depth-first search algorithm, construct the data scheduling static graph, and send network data according to the strategy of the static graph.
By using a scheduling strategy with fixed node locations, the vector characteristics that do not depend on packet order are maximized, thereby improving data processing and forwarding performance.
Smart Images

Figure CN116319628B_ABST
Abstract
Description
Technical Field
[0001] This application relates to network communication technology, and more particularly to an SDN network data forwarding method and apparatus based on DPDK. Background Technology
[0002] The Data Plane Development Kit (DPDK) is a Linux-based suite of libraries and drivers for fast packet processing, which can greatly improve data processing performance and throughput, and increase the efficiency of data plane applications.
[0003] Among related technologies, the open-source data plane development kit DPDK has been used by major Internet companies. Cloud companies also conduct secondary development based on DPDK for the data forwarding plane. The graph architecture provided by DPDK is the basic architecture for cloud companies as the data forwarding plane. This architecture mainly provides vector characteristics and makes good use of the CPU locality principle. It further improves the performance of data forwarding based on DPDK. However, its scheduling algorithm still has certain defects, which leads to the vector characteristics not being better utilized, that is, the CPU locality principle is not maximized.
[0004] The existing DPDK scheduling strategy is relatively simple, starting from the source node and scheduling the corresponding node for processing based on the processing result of each packet. Therefore, the next node to be scheduled is highly dependent on the order of the packets. However, in real-world applications, due to the complexity of business processes, the variety of packet types, and the uncontrollable order, the existing scheduling strategy cannot guarantee the utilization rate of the vector characteristics of data packets. Summary of the Invention
[0005] This application provides an SDN network data forwarding method based on DPDK, which can maximize vector characteristics when processing multiple packets without relying on packet order, thereby solving the problem that the utilization rate of data packet vector characteristics is difficult to guarantee under existing scheduling strategies.
[0006] A first aspect of this application provides a data forwarding method for an SDN network based on DPDK, the method comprising:
[0007] Create a scheduling static graph, which includes multiple nodes with fixed positions. The multiple nodes include a source node, a common node, and a general node, with the general node located between the source node and the common node.
[0008] Node positions are set in the scheduling static graph to construct the data scheduling static graph;
[0009] Network data is scheduled using BitMap and sent according to the strategy of the data scheduling static graph.
[0010] Optionally, setting node positions in the scheduling static graph to construct the data scheduling static graph includes:
[0011] The location of each node in the scheduling static graph is determined using a doubly linked list and an array of pointers, in order to construct the data scheduling static graph.
[0012] Optionally, the above method of determining the position of each node in the scheduling static graph using a doubly linked list and a pointer array with a depth-first search algorithm is as follows:
[0013] The graph is traversed using a depth-first search algorithm, and each node encountered is searched in f_list.
[0014] If the node is not found, insert the node at the end of c_list;
[0015] If the node is found, the c_list linked list is inserted before the node in f_list;
[0016] When traversing to the last node, the c_list linked list is inserted at the end of the f_list linked list, thus completing the creation of the f_list linked list.
[0017] Optionally, after the f_list linked list is created as described above, the method further includes:
[0018] Starting from the head of the f_list linked list, the nodes are traversed sequentially, and the addresses of the traversed nodes are recorded in node_buf. The position of the node in node_buf is also recorded on the node to complete the construction of the data scheduling static graph.
[0019] Optionally, setting node positions in the scheduling static graph to construct the data scheduling static graph includes:
[0020] The position of each graph node in the scheduling static graph is set according to the graph node relationships input by the user.
[0021] A second aspect of this application provides a DPDK-based SDN network data forwarding apparatus, comprising:
[0022] A static graph creation module is used to create a scheduling static graph, which includes multiple nodes with fixed positions. The multiple nodes include a source node, a common node, and a general node, with the general node located between the source node and the common node.
[0023] The node setting module is used to set the node positions in the scheduling static graph to construct the data scheduling static graph;
[0024] The scheduling module is used to schedule network data through BitMap and send the network data according to the strategy of the data scheduling static graph.
[0025] According to an embodiment of the present invention, the SDN network data forwarding device based on DPDK is characterized in that the node setting module includes:
[0026] The node position determination submodule is used to determine the position of each node in the scheduling static graph using a depth-first search algorithm through a doubly linked list and a pointer array, so as to construct the data scheduling static graph.
[0027] Optionally, the above node position determination submodule is specifically used for:
[0028] The graph is traversed using a depth-first search algorithm, and each node encountered is searched in f_list.
[0029] If the node is not found, insert the node at the end of c_list;
[0030] If the node is found, the c_list linked list is inserted before the node in f_list;
[0031] When traversing to the last node, the c_list linked list is inserted at the end of the f_list linked list, thus completing the creation of the f_list linked list.
[0032] Optionally, the above node position determination submodule is also used for:
[0033] Starting from the head of the f_list linked list, the nodes are traversed sequentially, and the addresses of the traversed nodes are recorded in node_buf. The position of the node in node_buf is also recorded on the node to complete the construction of the data scheduling static graph.
[0034] Optionally, the above node setting module also includes:
[0035] The node position input submodule is used to set the position of each graph node in the scheduling static graph based on the graph node relationships input by the user.
[0036] This application's embodiments create a static scheduling graph, placing nodes preceding common nodes in the graph before the common node while maintaining their original scheduling order. The order of multiple parallel scheduling paths preceding the common node can be arbitrary, and data scheduling and transmission are then performed based on the static scheduling graph. This application improves upon the shortcomings of current DPDK graph architecture scheduling algorithms in vector utilization, enabling the graph architecture to better accumulate data packets and better utilize the CPU's locality of reference, further improving data processing and forwarding performance. Attached Figure Description
[0037] Figure 1 A flowchart illustrating a DPDK-based SDN network data forwarding method provided in this application embodiment;
[0038] Figure 2 A schematic diagram of the structure of an SDN network data forwarding device based on DPDK provided in this application embodiment;
[0039] Figure 3 This is a schematic diagram of the graph structure corresponding to the scheduling results of existing scheduling techniques;
[0040] Figure 4 Example diagram of a scheduling static diagram provided in the embodiments of this application;
[0041] Figure 5 This is a schematic diagram of BitMap management and scheduling provided in an embodiment of this application;
[0042] Figure 6 This application provides an example diagram structure for creating a scheduling static diagram in an embodiment.
[0043] Figure 7 Example of creating a scheduling static graph provided for embodiments of this application - first round;
[0044] Figure 8 Example of creating a scheduling static graph provided for embodiments of this application - second round;
[0045] Figure 9 Example of creating a scheduling static graph provided for embodiments of this application - third round;
[0046] Figure 10 An example of creating a scheduling static graph provided in this application embodiment;
[0047] Figure 11 This is a schematic diagram of the data forwarding graph structure provided in an embodiment of this application;
[0048] Figure 12 A scheduling static diagram provided for embodiments of this application;
[0049] Figure 13 A comparative schematic diagram of the scheduling process provided in the embodiments of this application;
[0050] Figure 14 For existing scheduling technologies Figure 3 A schematic diagram showing the scheduling results of different packet sequences. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0052] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein.
[0053] It should be understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0054] It should be understood that in this application, "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product or device.
[0055] The technical solutions of this application will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0056] Figure 1 The following is an exemplary flowchart illustrating a DPDK-based SDN network data forwarding method according to an embodiment of this application. Figure 1 As shown, the method includes:
[0057] S101: Create a scheduling static graph, which includes multiple nodes with fixed positions. The multiple nodes include a source node, a common node, and a general node. The general node is located between the source node and the common node.
[0058] Scheduling refers to the invocation of graph node processing functions. In existing technologies, such as... Figure 3 The graph structure shown illustrates that DPDK's scheduling strategy is a dynamic scheduling graph. Initially, the scheduling graph (or scheduling array; existing DPDK uses a circular array for scheduling) is empty. The next scheduling node is dynamically added to the next position in the scheduling graph based on the result of processing each packet. In other words, the position of each graph node is dynamically changing. Under this scheduling strategy, different packet orders lead to different scheduling results. Ultimately, the vector characteristics of the processed packets are maximized and minimized, respectively, corresponding to the scheduling results as follows: Figure 14 As shown on the left and right sides; because in actual application scenarios, the business is complex, there are many types of packets and the order is uncontrollable, so under the existing scheduling strategy, it is difficult to guarantee the utilization rate of the vector characteristics of packets.
[0059] The scheduling static diagram provided in this application embodiment is a static scheduling diagram relative to this change, in which the position of each node except the source node in the scheduling static diagram is fixed. The following is based on... Figure 3-10 The scheduling static diagram provided in the embodiments of this application will be explained in detail.
[0060] In the scheduling diagram, nodes include source nodes, common nodes, and general nodes. A source node is the starting point for data transmission in the network; a common node is a node with multiple neighboring nodes; and all other nodes besides the source and common nodes are called general nodes.
[0061] To better utilize the characteristics of vectors, that is, to ensure that the vector characteristics are maximized when processing n packets regardless of the order of the packets (e.g.) Figure 14 The scheduling results on the left require accumulating as many packets as possible to the same node (or packets of the same type). Based on this requirement, all nodes preceding the common node need to be placed in the static scheduling graph before the common node, while maintaining their original scheduling order. The order of scheduling multiple parallel paths preceding the common node can be arbitrary.
[0062] S102: Set the node positions in the scheduling static diagram to construct the data scheduling static diagram;
[0063] In the diagram (as shown) Figure 3 Only after the creation is complete can this scheduling static graph (such as...) be created. Figure 4 , Figure 5Optionally, the scheduling static graph can be created manually or automatically. Manual creation refers to business developers manually setting the position of each graph node in the scheduling static graph according to their own graph node relationships. The advantage of manual creation is that the creation method is more flexible and can be set according to the needs of business developers; the disadvantage is that when the graph node relationships are more complex, the workload required by business developers is greater.
[0064] Optionally, the scheduling static graph can be created automatically. Specifically, the automatic creation algorithm uses the following data structures: a doubly linked list (a formal doubly linked list f_list and a cached doubly linked list c_list), a pointer array (to record node addresses, hereinafter referred to as node_buf), and a structure array (to record the traversal status of each node, including: whether it has been visited (marked as visited), whether it has been enqueued in f_list (marked as inserted), and the node's position in f_list (list_pos). The algorithm used is Depth-First Search (DFS). Depth-First Search is a graph algorithm that, in short, delves into every possible branch path until it cannot be explored further, and each node can only be visited once.
[0065] The automatic creation process involves the following steps:
[0066] Step a. Use the Depth-First Search (DFS) algorithm to traverse the graph. For each node traversed (except the source node), if it is not enqueued in f_list and has not been traversed, insert the node at the end of c_list and set the visited bit to indicate that the node has been traversed. If it is not enqueued in f_list but has been traversed (becoming a node), start dequeuing nodes from the end of c_list and insert the dequeued node in front of the currently traversed node in c_list. Subsequent nodes are then inserted in front of the previously inserted node, and so on, until the node to be dequeued is the currently traversed node or has more than one neighbor node. Then proceed to step b. If it is already enqueued in f_list or has no neighbor node (the node is inserted at the end of c_list), then proceed to step b.
[0067] Step b. Starting from the tail of the c_list linked list where the node is inserted, dequeue nodes. If a node has no neighboring nodes, insert it at the tail of the f_list linked list. If all neighboring nodes of a node have been traversed, insert the node before the first neighboring node in f_list (if none of the neighboring nodes are enqueued, insert it at the tail of f_list). Otherwise, return to step a if c_list is empty. During this process, record the position list_pos of the inserted node in the f_list, update the positions of subsequent nodes in the f_list, and set the inserted flag to indicate that the node has been enqueued in f_list.
[0068] Step c. After the graph node traversal is completed, the linked list f_list is also established accordingly; then, starting from the head of the f_list linked list, the nodes are traversed in turn, the node (node address) is recorded in node_buf, and the position of the node in node_buf (array index, corresponding bit position of bitmap) is recorded on the node, thus completing the construction of the scheduling static graph.
[0069] Please refer to Figure 5 This is a schematic diagram of BitMap management and scheduling provided in an embodiment of this application. The following provides a more detailed explanation of the above steps, after calling `rte_graph_create` to create the graph (e.g.) Figure 6 To begin performing the following operations, please refer to [link / reference]. Figure 7-10 .
[0070] Round 1 (see below) Figure 7 ):
[0071] Step a: Use the Depth-First Search (DFS) algorithm to traverse the graph, recursively traversing from the source node s. First, traverse the first neighbor node 1 of the source node s and insert it at the end of c_list. Then, traverse to the neighbor node 4 of node 1 and insert it at the end of c_list. 4 has two neighbors, 6 and 7. The order of these neighbors is specified by the user when creating the nodes. Therefore, during traversal, it is possible to traverse 7 first or 6 first. Assuming 7 is traversed first (traversing 6 first yields the same result), 7 is inserted at the end of c_list. 7's neighbor is 4. 4 has not yet been enqueued but has already been traversed. Therefore, dequeue 7 from c_list and insert it before 4. Then proceed to step b.
[0072] Step b: Since node 4 still has an unvisited neighbor node 6, proceed to step a;
[0073] Step a: Traverse to 6, insert 6 at the end of c_list. 6 has no neighboring nodes, proceed to step b;
[0074] Step b: 6 has no neighboring nodes, so insert it at the end of f_list. All neighboring nodes of 4 have been traversed, so insert them before 6. Insert 7 before neighboring node 4, insert 1 before neighboring node 4, and c_list is empty. Proceed to step a.
[0075] Round 2 (see below) Figure 8 ):
[0076] Step a: Traverse node 2 and insert node 2 at the end of c_list. Similarly, node 2 has two neighboring nodes. Assume that we first traverse node 5 (traversing node 4 first will have the same result), insert node 5 at the end of c_list, traverse node 6, node 6 has been enqueued, proceed to step b.
[0077] Step b: Insert node 5 before its neighbor node 6. Node 2's neighbors 4 and 5 have already been traversed. Insert node 2 before its foremost neighbor node 4. c_list is empty. Proceed to step a.
[0078] Round 3 (see below) Figure 9 ):
[0079] Step a: Traverse node 3 and insert node 3 at the end of c_list. Traverse node 5. Node 5 has been enqueued. Proceed to step b.
[0080] Step b: Node 3's neighbor node 5 has been traversed and inserted before neighbor node 5. c_list is empty, proceed to step a.
[0081] After three rounds, the f_list linked list is complete, as shown in the attached figure. Figure 8 Finally, proceed to step c;
[0082] Step c: Starting from the head of the f_list linked list, create node_buf and bitmap sequentially to complete the construction of the scheduling static graph, as follows. Figure 10 As shown.
[0083] After successfully constructing the scheduling static graph, the following steps can be used to check the construction result of the scheduling static graph:
[0084] 1. The order of nodes in all paths of the graph cannot be changed in the scheduling static graph, such as path 2->4->6;
[0085] 2. The order of nodes before and after a common node (a node with multiple parent nodes) in a graph cannot be changed in a static scheduling graph. For example, the nodes before common node 4 are 1 and 2, and the node after it is 6.
[0086] 3. Irrelevant nodes (referring to nodes that do not exchange data packets or are not on the same path, such as 1, 2, 3, 4 and 5) can be placed in any order in the scheduling static graph (determined by the traversal order).
[0087] 4. For loop nodes, the in-loop branch (e.g., the 4->7 branch) should precede all non-loop branches (e.g., the 4->6 branch) after the in-loop branch fork node (e.g., node 4) in the scheduling static graph;
[0088] S103: Schedule network data using BitMap and send the network data according to the strategy of the data scheduling static graph.
[0089] After the graph-based forwarding architecture is running, it enters the graph node scheduling phase. Unlike the existing DPDK scheduling loop array, the scheduling algorithm in this application stores the nodes to be scheduled in fixed locations, i.e., the array indices corresponding to the nodes. For performance considerations, a BitMap is used for scheduling management. The BitMap code implementation can be found in the Linux kernel's BitMap. (See attached image) Figure 5 The diagram shown is a schematic of BitMap management and scheduling provided in an embodiment of this application. During this scheduling process, when storing a node, only the corresponding bit position needs to be set to 1; after scheduling is complete, only the corresponding bit position needs to be set to 0. Each scheduling operation starts from the nearest 1 in the BitMap, that is, scheduling the node corresponding to that bit position.
[0090] The following uses a simplified practical application scenario as an example to explain in detail the scheduling process of the scheduling static graph provided in the embodiments of this application, such as... Figure 11 The data forwarding diagram shown illustrates that the source node (rcv) is responsible for receiving packets from the network interface card (NIC), the ip_rcv node performs health checks on the packets, the ip_rcv_finish node performs route lookups and forwards the packets, the drop node drops packets, and the xmit node sends packets to the NIC. The static scheduling diagram created by this diagram is as follows: Figure 12 As mentioned above, the positions of xmit and drop differ depending on the traversal order. These two are unrelated nodes, and their different positions in the scheduling static graph do not affect the processing effect.
[0091] Suppose the source node rv receives three packets at once. The first packet is dropped during a health check, the second packet is dropped during a route query, and the third packet is sent out via xmit:
[0092] a. The source node sequentially transfers the three received packets to the ip_rcv node, sets bit 0 to 1, and begins the scheduling loop of the static scheduling graph;
[0093] b. The first bit that is 1 is bit0. The node corresponding to bit0, ip_rcv, is called. When ip_rcv processes the first packet, the health check fails and the packet is transferred to the drop node. Bit2 is set to 1. When processing the second and third packets, the health checks pass and the packets are transferred to the ip_rcv_finish node in sequence. Bit1 is set to 1. After the ip_rcv node processes all packets, bit0 is set to 0 and the next loop begins.
[0094] c. The first bit that is 1 is bit1. The node corresponding to bit1, ip_rcv_finish, is called. When ip_rcv_finish processes the second packet, the route query fails, so the packet is transferred to the drop node, and bit2 is set to 1. When processing the third packet, the route query succeeds, so the packet is transferred to the xmit node, and bit3 is set to 1. After the ip_rcv_finish node has processed all the packets, bit1 is set to 0, and the next loop begins.
[0095] d. The first bit that is 1 is bit2. The node corresponding to bit2 is called drop. After drop discards two packets, bit2 is set to 0 and the next loop begins.
[0096] e. The first bit that is 1 is bit3. The node corresponding to bit3 is called xmit. After xmit sends out the third packet, it sets bit3 to 0 and enters the next loop.
[0097] There are no more 1 bits in f.bitmap, so the current scheduling loop of the static graph ends and we return to step a.
[0098] The final scheduling process is as follows: Figure 13 This is a comparative schematic diagram of the scheduling process provided in the embodiments of this application. It can be seen that, through the scheduling static diagram provided in the embodiments of this application, the drop node accumulated two packets, and the drop node was only scheduled once. However, if the existing scheduling strategy is used, the final scheduling process is as follows: Figure 11 As shown, the drop node did not accumulate packets, and the drop node was scheduled twice, which undoubtedly affected the forwarding performance compared to the scheduling strategy of this invention.
[0099] This application embodiment creates a static scheduling graph, placing nodes preceding common nodes in the graph while maintaining their original scheduling order. The order of multiple parallel scheduling paths preceding common nodes is arbitrary, and data scheduling and transmission are then performed based on the static scheduling graph. The DPDK-based SDN network data forwarding provided in this application embodiment allows for both manual and automatic scheduling policy settings. Vector characteristics are no longer dependent on packet order, effectively leveraging vector characteristics under various orders, and better utilizing the CPU's locality principle, further improving packet processing and forwarding performance.
[0100] This application embodiment also provides a DPDK-based SDN network data forwarding device 20, which includes:
[0101] The static graph creation module 201 is used to create a scheduling static graph. The scheduling static graph includes multiple nodes with fixed positions. The multiple nodes include a source node, a common node, and a general node. The general node is located between the source node and the common node.
[0102] The node setting module 202 is used to set the node positions in the scheduling static diagram to construct the data scheduling static diagram;
[0103] The scheduling module 203 is used to schedule network data through BitMap and send network data according to the strategy of the data scheduling static graph.
[0104] Specifically, the node setting module 202 includes a node position determination submodule 2021 and a node position input submodule 2022.
[0105] The node position determination submodule 2021 is used to determine the position of each node in the scheduling static graph using a depth-first search algorithm through a doubly linked list and a pointer array, in order to construct the data scheduling static graph. Specifically, the node position determination submodule uses the depth-first search algorithm to traverse the graph, searching for each node encountered in f_list; if no node is found, the node is inserted at the end of c_list; if a node is found, the c_list linked list is inserted before the node in f_list; when the last node is reached, the c_list linked list is inserted at the end of f_list, completing the construction of f_list.
[0106] In addition, the node location determination submodule 2021 is also used to traverse the nodes sequentially starting from the head of the f_list linked list, record the addresses of the traversed nodes in node_buf, and record the position of the node in node_buf on the node to complete the construction of the data scheduling static graph.
[0107] The node position input submodule 2022 is used to set the position of each graph node in the scheduling static graph based on the graph node relationship input by the user.
[0108] The DPDK-based SDN network data forwarding device 20 provided in this application embodiment can implement the various processes implemented in the above-described DPDK-based SDN network data forwarding method embodiment. To avoid repetition, it will not be described again here.
[0109] The DPDK-based SDN network data forwarding device provided in this application embodiment, by setting up a static graph creation module 201, a node setting module 202, and a scheduling module 203, creates a scheduling static graph. This graph places nodes preceding common nodes in positions preceding the common node's scheduling order while maintaining the original scheduling order. The order of multiple parallel scheduling paths preceding the common node can be arbitrary. Data scheduling and transmission are then performed according to the scheduling static graph. The DPDK-based SDN network data forwarding device provided in this application embodiment makes the packet vector characteristics independent of packet order, effectively utilizing the CPU's locality of reference principle, and further improving packet processing and forwarding performance.
[0110] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0111] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0112] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0113] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.
[0114] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0115] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0116] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0117] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0118] Note that, unless otherwise explicitly stated, all features disclosed in this specification (including any appended claims, abstract, and drawings) may be replaced by alternative features for achieving the same, equivalent, or similar purpose. Therefore, unless explicitly stated otherwise, each claimed feature is merely one example of a set of equivalent or similar features. Where used, "further," "preferably," "even further," and "more preferably" are simple starting points for describing another embodiment based on the foregoing embodiments, the combination of which with the foregoing embodiments constitutes the complete configuration of another embodiment. Any combination of several "further," "preferably," "even further," or "more preferably" settings following the same embodiment constitutes yet another embodiment.
[0119] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are merely examples and do not limit the present invention. The objectives of the present invention have been fully and effectively achieved. The functions and structural principles of the present invention have been shown and explained in the embodiments, and any modifications or variations of the embodiments of the present invention may be made without departing from the stated principles.
[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A data forwarding method for SDN networks based on DPDK, characterized in that, The method includes: Create a scheduling static graph, which includes multiple nodes with fixed positions. The multiple nodes include a source node, a common node, and a general node, with the general node located between the source node and the common node. Node positions are set in the scheduling static graph to construct the data scheduling static graph; Network data is scheduled using BitMap and sent according to the strategy of the data scheduling static graph; The step of setting node positions in the scheduling static graph to construct the data scheduling static graph includes: The position of each node in the scheduling static graph is determined using a doubly linked list and an array of pointers, in order to construct the data scheduling static graph; Specifically, determining the position of each node in the scheduling static graph using a doubly linked list and a pointer array with a depth-first search algorithm involves: The graph is traversed using a depth-first search algorithm, and each node encountered is searched in f_list. If the node is not found, insert the node at the end of c_list; If the node is found, the c_list linked list is inserted before the node in f_list; When traversing to the last node, the c_list linked list is inserted into the tail of the f_list linked list, thus completing the creation of the f_list linked list; The process involves dequeuing nodes starting from the tail of the c_list linked list. If a node has no neighboring nodes, it is inserted at the tail of the f_list linked list. If all of a node's neighboring nodes have been traversed, the node is inserted before the first neighboring node in f_list. After the f_list linked list is established, the method further includes: Starting from the head of the f_list linked list, the nodes are traversed sequentially, and the addresses of the traversed nodes are recorded in node_buf. The position of the node in node_buf is also recorded on the node to complete the construction of the data scheduling static graph.
2. The SDN network data forwarding method based on DPDK according to claim 1, characterized in that, Setting node positions in the scheduling static graph to construct the data scheduling static graph includes: The position of each graph node in the scheduling static graph is set according to the graph node relationships input by the user.
3. A data forwarding device for SDN networks based on DPDK, characterized in that, The device includes: A static graph creation module is used to create a scheduling static graph, which includes multiple nodes with fixed positions. The multiple nodes include a source node, a common node, and a general node, with the general node located between the source node and the common node. The node setting module is used to set the node positions in the scheduling static graph to construct the data scheduling static graph; The scheduling module is used to schedule network data through BitMap and send the network data according to the strategy of the data scheduling static graph. The node setting module includes: The node position determination submodule is used to determine the position of each node in the scheduling static graph using a depth-first search algorithm through a doubly linked list and a pointer array, so as to construct the data scheduling static graph; Specifically, the node position determination submodule is used for: The graph is traversed using a depth-first search algorithm, and each node encountered is searched in f_list. If the node is not found, insert the node at the end of c_list; If the node is found, the c_list linked list is inserted before the node in f_list; When traversing to the last node, the c_list linked list is inserted into the tail of the f_list linked list, thus completing the creation of the f_list linked list; The process involves dequeuing nodes starting from the tail of the c_list linked list. If a node has no neighboring nodes, it is inserted at the tail of the f_list linked list. If all of a node's neighboring nodes have been traversed, the node is inserted before the first neighboring node in f_list. After the f_list linked list is established, the nodes are traversed sequentially starting from the head of the f_list linked list. The addresses of the traversed nodes are recorded in node_buf, and the position of the node in node_buf is recorded on the node to complete the construction of the data scheduling static graph.
4. The SDN network data forwarding device based on DPDK according to claim 3, characterized in that, The node setting module also includes: The node position input submodule is used to set the position of each graph node in the scheduling static graph based on the graph node relationships input by the user.
Citation Information
Patent Citations
Future scheduling by direct representation of possible dependencies
US20090235273A1