hottub.patents
US 12,238,162 B2#3601578 Most CitedActiveUnited States (USPTO)Utility

Method and non-transitory computer-readable storage medium and apparatus for load balancing of network processing unit

0Forward Citations (#3601578 Global)
0.0/yrCitation Velocity (#3601578 Global)
0.00Citation PageRank (#3601578 Global)
15Prior Art Cited
17Claims (3 Indep. · 14 Dep.)
9Drawings / Sheets

Abstract

The invention relates to a method, a non-transitory computer-readable storage medium, and an apparatus for load balancing of a network processing unit (NPU). A central processing unit (CPU) is coupled to the NPU and the NPU has multiple cores. The method, which is performed by the CPU, includes: reassigning a data stream processed by a first core in the NPU, which is under a high load, to a second core in the NPU, which is under a low load, where the low load is lower than the high load. The data stream is distinguished from other data streams by at least its quintuple, and the quintuple is composed of a source Internet Protocol (IP) address, a source port, a destination IP address, a destination port and a protocol type.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 15 · Forward citations: 0.

Claims (17 — 3 Independent, 14 Dependent)

  1. Claim 1Independent Claim

    A method for load balancing of a network processing unit (NPU), performed by a central processing unit (CPU), wherein the CPU is coupled to the NPU and the NPU comprises a plurality of cores, the method comprising: reassigning a data stream processed by a first core in the NPU, which is under a high load, to a second core in the NPU, which is under a low load, wherein the low load is lower than the high load, wherein the data stream is defined by a quintuple, and the quintuple is composed of a source Internet Protocol (IP) address, a source port, a destination IP address, a destination port and a protocol type, wherein an NPU cost of the data stream is lower than a sharable load of the second core, wherein the NPU cost of the data stream is calculated based on a data rate of the data stream.

  2. Claim 2Depends on #1

    The method of claim 1, comprising: selecting the second core from a plurality of cores in a low-load core pool, wherein a loading of each core in the low-load core pool is lower than a load threshold, and the load threshold is set to 50% or a loading average of all cores in the NPU.

  3. Claim 3Depends on #2

    The method of claim 2, wherein the NPU cost of the data stream is calculated by a formula as follows: C=Fr/MAXp C indicates the NPU cost of the data stream; Fr indicates the data rate of the data stream; MAXp indicates maximum capacity for processing packets with a protocol type corresponding to the data stream, wherein the sharable load of the second core is calculated by a formula as follows: S=TH − L S indicates the sharable load of the second core; TH indicates the load threshold; L indicates a loading of the second core.

  4. Claim 4Depends on #3

    The method of claim 3, wherein the data rate of the data stream is calculated by a formula as follows: Fr =(Cnt t(j) − Cnt t(j − 1))/ TI Fr indicates the data rate of the data stream; Cnt t(j) indicates a quantity of packets of the data stream that have been forwarded at a current time point; Cnt t(j − 1) indicates a quantity of packets of the data stream that have been forwarded at a previous time point; TI indicates a time interval from the previous time point to the current time point.

  5. Claim 5Depends on #2

    The method of claim 2, wherein the loading of each core is obtained by querying the NPU.

  6. Claim 6Depends on #1

    The method of claim 1, comprising: updating an entry in a stream-forward table to change an assignment of the data stream from the first core to the second core, thereby enabling forthcoming packets with the same source IP address, source port, destination IP address, destination port and protocol type as that of the data stream to be forwarded to the second core to process.

  7. Claim 7Independent Claim

    A non-transitory computer-readable storage medium having stored therein program code that, when loaded and executed by a central processing unit (CPU) being coupled to a network processing unit (NPU) comprising a plurality of cores, causes the CPU to: reassign a data stream processed by a first core in the NPU, which is under a high load, to a second core in the NPU, which is under a low load, wherein the low load is lower than the high load, wherein the data stream is defined by a quintuple, and the quintuple is composed of a source Internet Protocol (IP) address, a source port, a destination IP address, a destination port and a protocol type, wherein an NPU cost of the data stream is lower than a sharable load of the second core, wherein the NPU cost of the data stream is calculated based on a data rate of the data stream.

  8. Claim 8Depends on #7

    The non-transitory computer-readable storage medium of claim 7, wherein the program code that, when loaded and executed by the CPU, causes the CPU to: select the second core from a plurality of cores in a low-load core pool, wherein a loading of each core in the low-load core pool is lower than a load threshold, and the load threshold is set to 50% or a loading average of all cores in the NPU.

  9. Claim 9Depends on #8

    The non-transitory computer-readable storage medium of claim 8, wherein the NPU cost of the data stream is calculated by a formula as follows: C=Fr/MAXp C indicates the NPU cost of the data stream; Fr indicates the data rate of the data stream; MAXp indicates maximum capacity for processing packets with a protocol type corresponding to the data stream, wherein the sharable load of the second core is calculated by a formula as follows: S=TH − L S indicates the sharable load of the second core; TH indicates the load threshold; L indicates a loading of the second core.

  10. Claim 10Depends on #9

    The non-transitory computer-readable storage medium of claim 9, wherein the data rate of the data stream is calculated by a formula as follows: Fr =(Cnt t(j) − Cnt t(j − 1))/ TI Fr indicates the data rate of the data stream; Cnt t(j) indicates a quantity of packets of the data stream that have been forwarded at a current time point; Cnt t(j − 1) indicates a quantity of packets of the data stream that have been forwarded at a previous time point; TI indicates a time interval from the previous time point to the current time point.

  11. Claim 11Depends on #7

    The non-transitory computer-readable storage medium of claim 7, wherein the program code that, when loaded and executed by the CPU, causes the CPU to: update an entry in a stream-forward table to change an assignment of the data stream from the first core to the second core, thereby enabling forthcoming packets with the same source IP address, source port, destination IP address, destination port and protocol type as that of the data stream to be forwarded to the second core to process.

  12. Claim 12Independent Claim

    An apparatus for load balancing of a network processing unit (NPU), comprising: the NPU, comprising a plurality of cores; and a central processing unit (CPU), coupled to the NPU, arranged operably to: reassign a data stream processed by a first core in the NPU, which is under a high load, to a second core in the NPU, which is under a low load, wherein the low load is lower than the high load, wherein the data stream is defined by a quintuple, and the quintuple is composed of a source Internet Protocol (IP) address, a source port, a destination IP address, a destination port and a protocol type, wherein an NPU cost of the data stream is lower than a sharable load of the second core, wherein the NPU cost of the data stream is calculated based on a data rate of the data stream.

  13. Claim 13Depends on #12

    The apparatus of claim 12, wherein the CPU is arranged operably to select the second core from a plurality of cores in a low-load core pool, wherein a loading of each core in the low-load core pool is lower than a load threshold, and the load threshold is set to 50% or a loading average of all cores in the NPU.

  14. Claim 14Depends on #13

    The apparatus of claim 13, wherein the CPU is arranged operably to obtain the loading of each core by querying the NPU.

  15. Claim 15Depends on #12

    The apparatus of claim 12, wherein the NPU cost of the data stream is calculated by a formula as follows: C=Fr/MAXp C indicates the NPU cost of the data stream; Fr indicates the data rate of the data stream; MAXp indicates maximum capacity for processing packets with a protocol type corresponding to the data stream, wherein the sharable load of the second core is calculated by a formula as follows: S=TH − L S indicates the sharable load of the second core; TH indicates the load threshold; L indicates a loading of the second core.

  16. Claim 16Depends on #15

    The apparatus of claim 15, wherein the data rate of the data stream is calculated by a formula as follows: Fr =(Cnt t(j) − Cnt t(j − 1))/ TI Fr indicates the data rate of the data stream; Cnt t(j) indicates a quantity of packets of the data stream that have been forwarded at a current time point; Cnt t(j − 1) indicates a quantity of packets of the data stream that have been forwarded at a previous time point; TI indicates a time interval from the previous time point to the current time point.

  17. Claim 17Depends on #12

    The apparatus of claim 12, wherein the CPU is arranged operably to update an entry in a stream-forward table to change an assignment of the data stream from the first core to the second core, thereby enabling forthcoming packets with the same source IP address, source port, destination IP address, destination port and protocol type as that of the data stream to be forwarded to the second core to process.

Technical Overview & Description

CROSS-REFERENCE TO RELATED APPLICATIONS This application claims the benefit of priority to Patent Application No. 202211215701.8, filed in China on Sep. 30, 2022; the entirety of which is incorporated herein by reference for all purposes. BACKGROUND The disclosure generally relates to load balancing and, more particularly, to a method, a non-transitory computer-readable storage medium and an apparatus for load balancing of a network processing unit (NPU). The NPU is an integrated circuit, which can be programmed by software, and is dedicated in the networking equipment. An algorithm which runs on the NPU mainly includes varies functions of data packet processing for repeatedly receiving packets through one port, decapsulating packets in conformity to the reception protocol, processing data from the decapsulated ones, encapsulating the processed data into packets in conformity to the transmission protocol, and transmitting the data packets out through another port. With the rapid development of network applications, the performance requirements of NPU are higher, therefore improving the performance of NPU is the primarily task at present. SUMMARY The disclosure relates to an embodiment of a method for load balancing of a network processing unit (NPU). A central processing unit (CPU) is coupled to the NPU and the NPU has multiple cores. The method, which is performed by the CPU, includes: reassigning a data stream processed by a first core in the NPU, which is under a high load, to a second core in the NPU, which is under a low load, where the low load is lower than the high load. The disclosure further relates to an embodiment of a non-transitory computer-readable storage medium having stored therein program code that, when loaded and executed by a CPU, causes the CPU to perform the above method for load balancing of an NPU. The disclosure further relates to an embodiment of an apparatus for load balancing of an NPU to include the NPU and a CPU. The NPU includes mult

Cited By — Indexed Forward Citations (0 of 0 total)

No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.