CN113472576A - Bandwidth allocation method of OCP network card and related device - Google Patents

Bandwidth allocation method of OCP network card and related device Download PDF

Info

Publication number
CN113472576A
CN113472576A CN202110744377.8A CN202110744377A CN113472576A CN 113472576 A CN113472576 A CN 113472576A CN 202110744377 A CN202110744377 A CN 202110744377A CN 113472576 A CN113472576 A CN 113472576A
Authority
CN
China
Prior art keywords
network card
ocp
ocp network
working mode
type information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110744377.8A
Other languages
Chinese (zh)
Inventor
赵现普
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110744377.8A priority Critical patent/CN113472576A/en
Priority to PCT/CN2021/121425 priority patent/WO2023272989A1/en
Publication of CN113472576A publication Critical patent/CN113472576A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0026PCI express

Abstract

The application discloses a bandwidth allocation method of an OCP network card, which comprises the following steps: obtaining the type information of an OCP network card; setting the working mode of the OCP network card according to the type information and the number of the CPUs; controlling the PCIe bus connector according to the working mode to realize the distribution of the bandwidth of the OCP network card; the PCIe bus connector is a connector connected with a channel of the OCP network card. The method comprises the steps of firstly obtaining type information of the OCP network card, then setting a proper working mode for the OCP network card by combining the number of CPUs on the basis of the type information, and finally controlling the PCIe bus connector according to the working mode to realize bandwidth allocation of the OCP network card instead of manually performing bandwidth allocation, thereby improving the allocation efficiency of the OCP network card. The application also discloses a bandwidth allocation device of the OCP network card, a computing device and a computer readable storage medium, which have the beneficial effects.

Description

Bandwidth allocation method of OCP network card and related device
Technical Field
The present application relates to the field of computers, and in particular, to a bandwidth allocation method for an OCP network card, a bandwidth allocation apparatus, a computing device, and a computer-readable storage medium.
Background
With the continuous development of information technology, in order to improve the expandability of computing devices, Open Computer Project (OCP) appears, and efficient extensible servers, storage and data center hardware designs are provided to reduce the environmental impact of data centers.
In the related art, a PCIe (peripheral component interconnect express) x16 is directly led from a Root Port of a CPU (central processing unit) to an OCP NIC3.0, or PCIe x8 is led from two CPUs to an OCP NIC 3.0. The connection mode is fixed, only Single Host or Multi-Host can be supported, flexible switching between the Single Host and the Multi-Host cannot be carried out, and the used Root Port is occupied by OCP NIC3.0 and cannot be used for other purposes. If the bandwidth of the OCP network card needs to be configured, manual modification is needed, and the efficiency is low.
Therefore, how to enable the device to automatically switch interfaces with different specifications instead of manually allocating bandwidth is a major problem to be paid attention to by those skilled in the art.
Disclosure of Invention
The application aims to provide a bandwidth allocation method, a bandwidth allocation device, a computing device and a computer readable storage medium of an OCP network card, so as to solve the problem that the bandwidth allocation efficiency is low in the existing manual operation.
In order to solve the above technical problem, the present application provides a bandwidth allocation method for an OCP network card, including:
obtaining the type information of an OCP network card;
setting the working mode of the OCP network card according to the type information and the number of the CPUs;
controlling a PCIe bus connector according to the working mode to realize the distribution of the bandwidth of the OCP network card; the PCIe bus connector is a connector connected with a channel of the OCP network card.
Optionally, the obtaining of the type information of the OCP network card includes:
obtaining a PRSNTB [3:0] _ N signal of the OCP network card;
determining the type information according to the PRSNTB [3:0] _ N signal.
Optionally, the setting of the working mode of the OCP network card according to the type information and the number of CPUs includes:
when the number of the CPUs is single, setting the working mode of the OCP network card to be a single CPU mode of the network card type corresponding to the type information;
and when the number of the CPUs is multiple, setting the working mode of the OCP network card to be a multi-CPU mode of the network card type corresponding to the type information.
Optionally, the setting of the working mode of the OCP network card according to the type information and the number of CPUs includes:
when the PRSNTB [3:0] _ N signal is 0b1101 or 0b0110, setting the working mode of the OCP network card to be a 2x8 configuration mode;
and when the PRSNTB [3:0] _ N signal is 0b1010, 0b1001 or 0b0011, setting the working mode of the OCP network card to be a 4x4 configuration mode.
Optionally, the setting of the working mode of the OCP network card according to the type information and the number of CPUs includes:
matching corresponding working modes of the type information and the CPU quantity according to an OCP specification table;
and setting the working mode for the OCP network card.
Optionally, the setting of the working mode of the OCP network card according to the type information and the number of CPUs includes:
acquiring a CPU _ ID Pin signal, and determining the number of CPUs according to the CPU _ ID Pin signal;
and setting the working mode of the OCP network card according to the type information and the number of the CPUs.
Optionally, controlling a PCIe bus connector according to the working mode, to implement allocating the bandwidth of the OCP network card, including:
controlling the PCH to control the PCIe bus connector according to the working mode, and realizing the distribution of the bandwidth of the OCP network card; the PCIe bus connector is arranged between the OCP network card and the CPU, and the PCH is connected with the PCIe bus connector.
The application also provides a bandwidth allocation device of the OCP network card, which comprises:
the type acquisition module is used for acquiring the type information of the OCP network card;
the mode setting module is used for setting the working mode of the OCP network card according to the type information and the number of the CPUs;
the connector control module is used for controlling a PCIe bus connector according to the working mode and realizing the distribution of the bandwidth of the OCP network card; the PCIe bus connector is a connector connected with a channel of the OCP network card.
The present application further provides a computing device comprising:
a memory for storing a computer program;
a processor for implementing the steps of the bandwidth allocation method as described above when executing the computer program.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the bandwidth allocation method as described above.
The application provides a bandwidth allocation method of an OCP network card, which comprises the following steps: obtaining the type information of an OCP network card; setting the working mode of the OCP network card according to the type information and the number of the CPUs; controlling a PCIe bus connector according to the working mode to realize the distribution of the bandwidth of the OCP network card; the PCIe bus connector is a connector connected with a channel of the OCP network card.
The method comprises the steps of firstly obtaining type information of the OCP network card, then setting a proper working mode for the OCP network card by combining the number of CPUs on the basis of the type information, and finally controlling the PCIe bus connector according to the working mode to realize bandwidth allocation of the OCP network card instead of manually performing bandwidth allocation, thereby improving the allocation efficiency of the OCP network card.
The application further provides a bandwidth allocation device of the OCP network card, a computing device and a computer readable storage medium, which have the above beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a bandwidth allocation method for an OCP network card according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a bandwidth allocation circuit according to an embodiment of the present disclosure;
fig. 3 is a flowchart of another bandwidth allocation method for an OCP network card according to the embodiment of the present application;
fig. 4 is a schematic structural diagram of a bandwidth allocation apparatus of an OCP network card according to an embodiment of the present application.
Detailed Description
The core of the application is to provide a bandwidth allocation method, a bandwidth allocation device, a computing device and a computer readable storage medium for an OCP network card, so as to solve the problem that the bandwidth allocation efficiency is low in the existing manual operation.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related art, one PCIe x16 is directly led from one Root Port of the CPU to the OCP NIC3.0, or two CPUs are led one PCIe x8 to the OCP NIC3.0 each. The connection mode is fixed, only Single Host or Multi-Host can be supported, flexible switching between the Single Host and the Multi-Host can not be carried out, and the used Root Port is occupied by OCP NIC3.0 and can not be used for other purposes. If the bandwidth of the OCP network card needs to be configured, manual modification is needed, and the efficiency is low.
The OCP NIC (Network Interface Card) 3.0 specification is a subsequent version of the OCP Mezz (middle layer connector) 2.0rev 1.00 design specification, and compared with the OCP Mezz Card 2.0 design specification, the updated OCP NIC3.0 has a wider application range and a better use effect. The OCP NIC3.0 may support Multi-host (Multi-machine) applications, that is, one network card may be flexibly configured to be 1x16, 2x8, 4x4 as required, and connected to one or more uplinks, thereby improving network configuration flexibility and transmission efficiency.
Therefore, the application provides a bandwidth allocation method of an OCP network card, which includes the steps of firstly obtaining type information of the OCP network card, then setting a proper working mode for the OCP network card by combining the number of CPUs (central processing units) on the basis of the type information, and finally controlling the PCIe bus connector according to the working mode, so that bandwidth allocation of the OCP network card is realized, bandwidth allocation is not performed in a manual mode, and allocation efficiency of the OCP network card is improved.
The following describes a bandwidth allocation method of an OCP network card provided in the present application by an embodiment.
Referring to fig. 1, fig. 1 is a flowchart of a bandwidth allocation method of an OCP network card according to an embodiment of the present disclosure.
In this embodiment, the method may include:
s101, obtaining the type information of the OCP network card;
as can be seen, in this step, the type information of the OCP network card is obtained, that is, the type of the OCP network card is determined, so as to determine the working mode suitable for the type of the OCP network card. That is to say, different OCP network cards may be connected in this embodiment, and the number of buses that can be connected and the number of CPUs that can be configured are different for each type of OCP network card due to different hardware or software. Eventually, the bandwidth configuration of the OCP network card changes, for example, the number of buses in the bandwidth changes, or the number of CPUs connected to the bandwidth changes. Therefore, in this step, the type information of the OCP network card is determined first.
Further, in this step, the type information may be determined by a PRSNTB [3:0] _ N signal of the OCP network card, may be determined by a BIOS (Basic Input Output System), or may be determined by the state information of the OCP network card. It is to be understood that the manner of determining the type information in this step is not exclusive, and is not limited herein.
Further, in order to improve the efficiency of determining the type information, the step may include:
step 1, acquiring a PRSNTB [3:0] _ N signal of an OCP network card;
and step 2, determining type information according to the PRSNTB [3:0] _ N signal.
It can be seen that the present alternative scheme mainly explains how to obtain this type of information. In the alternative, the PRSNTB [3:0] _ N signal of the OCP network card is obtained first. The BIOS may obtain the PRSNTB [3:0] _ N signal of the OCP network card, the CPLD may obtain the PRSNTB [3:0] _ N signal of the OCP network card, and the controller may obtain the PRSNTB [3:0] _ N signal of the OCP network card, which is not limited specifically herein. Then, type information is determined from the PRSNTB [3:0] _ N signal. Specifically, the type information may be determined from the OCP specification table and the PRSNTB [3:0] _ N signal.
S102, setting the working mode of the OCP network card according to the type information and the number of the CPUs;
on the basis of S101, this step is intended to set the operation mode of the OCP network card according to the type information and the number of CPUs. It can be seen that this step is intended to set the working mode of the OCP network card according to the type information and the number of CPUs. Specifically, the number of CPUs may determine whether the OCP network card is executed in the multi-machine mode or the single-machine mode.
Further, in order to determine the working mode of the OCP network card according to the number of CPUs, the step may include:
when the number of the CPUs is single, setting the working mode of the OCP network card to be a single CPU mode of the network card type corresponding to the type information;
and when the number of the CPUs is multiple, setting the working mode of the OCP network card to be a multi-CPU mode of the network card type corresponding to the type information.
It can be seen that the present alternative is mainly illustrative of how this operating mode is set. In this alternative, when the number of the CPUs is Single, the working mode of the OCP network card is set to the Single CPU mode of the network card type corresponding to the type information, that is, the working mode of the OCP network card is set to the Single mode, that is, the Single-Host. And when the number of the CPUs is multiple, setting the working mode of the OCP network card to be a Multi-CPU mode of the network card type corresponding to the type information, namely setting the working mode of the OCP network card to be a Multi-machine mode, namely Multi-Host.
Further, in order to improve the refinement degree of the setting of the working mode, the step may include:
when the PRSNTB [3:0] _ N signal is 0b1101 or 0b0110, the working mode of the OCP network card is set to be a 2x8 configuration mode;
when the PRSNTB [3:0] _ N signal is 0b1010 or 0b1001 or 0b0011, the working mode of the OCP network card is set to be 4x4 configuration mode.
It can be seen that the present alternative is mainly illustrative of how this operating mode is set. In the alternative, when a PRSNTB [3:0] _ N signal is 0b1101 or 0b0110, the working mode of the OCP network card is set to be a 2x8 configuration mode; when the PRSNTB [3:0] _ N signal is 0b1010 or 0b1001 or 0b0011, the working mode of the OCP network card is set to be 4x4 configuration mode. It can be seen that in this alternative, the specific content of the PRSNTB [3:0] _ N signal is directly used to determine the operating mode of the OCP network card.
Further, in order to improve the accuracy of determining the operation mode, the step may include:
step 1, matching corresponding working modes of type information and CPU quantity according to an OCP specification table;
and 2, setting a working mode for the OCP network card.
It can be seen that the present alternative is mainly illustrative of how this operating mode is set. In the alternative scheme, the corresponding working modes are matched for the type information and the number of CPUs according to the OCP specification table; wherein, the OCP specification table is a bandwidth list shown in table 1. Then, the working mode is set for the OCP network card.
Further, to determine the current number of CPUs during a particular embodiment, the number of CPUs may be determined via the CPU _ ID Pin signal. Thus, the step may comprise:
step 1, acquiring a CPU _ ID Pin signal, and determining the number of CPUs according to the CPU _ ID Pin signal;
and 2, setting the working mode of the OCP network card according to the type information and the number of the CPUs.
It can be seen that the present alternative is mainly illustrative of how this operating mode is set. In this alternative, the CPU _ ID Pin signal is acquired, and the number of CPUs is determined based on the CPU _ ID Pin signal. Wherein the CPU _ ID Pin signal is a signal bit provided on a connector of each CPU. For example, there are two CPUs, CPU0 and CPU 1. When the cable is connected to only the CPU0, the CPU _ ID Pin signal corresponding to the CPU0 is acquired, and the current number of CPUs is determined to be one. When the cable is connected with a plurality of CPUs, the CPU _ ID Pin signals of the two CPUs are acquired, and the number of the current CPUs is determined to be multiple. And finally, setting the working mode of the OCP network card according to the type information and the number of the CPUs.
S103, controlling the PCIe bus connector according to the working mode to realize the distribution of the bandwidth of the OCP network card; the PCIe bus connector is a connector connected with a channel of the OCP network card.
On the basis of S102, this step aims to control the PCIe bus connector according to the working mode, and implement allocation of the bandwidth of the OCP network card. The PCIe bus connector is a connector connected with a channel of the OCP network card. That is, the PCIe bus connector is connected between the OCP network card and the CPU, and by controlling the PCIe bus connector, the PCIe bus connector can be closed and opened in different channels, so as to allocate a bandwidth.
Further, the step may include:
the PCH is controlled to control the PCIe bus connector according to the working mode, and the bandwidth of the OCP network card is distributed; wherein, PCIe bus connector sets up between OCP network card and CPU, and PCH is connected with PCIe bus connector.
Among them, pch (platform Controller hub) is a platform Controller hub for controlling the PCIe bus connector. Further, a PCIe bus connector may be separately connected to each CPU. Thus, the PCH may be connected to each PCIe bus connector for control.
In summary, in this embodiment, the type information of the OCP network card is first obtained, then an appropriate working mode is set for the OCP network card by combining the number of CPUs on the basis of the type information, and finally the PCIe bus connector is controlled according to the working mode, so that bandwidth allocation to the OCP network card is realized, instead of performing bandwidth configuration in a manual manner, and the configuration efficiency of the OCP network card is improved.
The following further describes a bandwidth allocation method of an OCP network card provided in the present application by a specific embodiment.
The embodiment aims to provide a method for allocating bandwidth of an OCP NIC3.0 capable of simultaneously supporting a Single-Host and a Multi-Host, and a method for allocating PCIe bandwidth to an OCP network card and a CPU Root Port according to whether the actual connection is the Single-Host or the Multi-Host.
The following table is a list of SFF OCP network cards listed in the OCP specification. As can be seen from the following table, the model of the OCP network card and the supported bandwidth mode can be determined by the PRSNTB [3:0] _ N signal, and the working mode of the OCP network card can be configured by configuring the BIF [2:0] _ N signal.
TABLE 1 OCP network card PCIe Bandwidth List
Figure BDA0003142325100000081
Figure BDA0003142325100000091
On the basis of the PCIe bandwidth list of the last OCP network card, OCP PCIe lanes 0-7 are considered to be connected to the CPU0, if OCP PCIe lanes 8-15 are connected to the CPU1, the BIF [2:0] _ N of the OCP is controlled to be 001 through a hardware circuit; if the OCP PCIe lanes 8-15 are also connected to lanes 8-15 of the CPU0Root Port connected to the OCP lanes 0-7, the CPLD judges the type of the OCP NIC3.0 card according to the PRSNTB [3:0] _ N of the OCP, if the OCP network card is a 2xn applied OCP network card (PRSNTB [3:0] _ N is 0b1101 and 0b0110), the BIF [2:0] _ N of the OCP is kept as 001, otherwise, the BIF [2:0] _ N of the OCP is controlled as 000.
And Bifurization auto-configuration of CPU PCIe Root ports by connecting four ID pins (default to 1) to the PCH, 11, 10 represent configuring the corresponding PCIe lane eight high or low bits as x4x4, x8, respectively, except 0010 represents that the entire Root Port is to be configured as x 16. The IDs of the CPUs 0Root Port lanes 0-7 to which OCP lanes 0-7 are connected are set to 10 by default. If OCP _ BIF [2:0] _ N is 001, two IDs Pin corresponding to 8 lanes corresponding to OCP lanes 8-15 are controlled to be 10, namely x8 is configured. If OCP _ BIF [2:0] _ N is 000, if OCP lanes 8-15 are connected to CPU0Root Port lanes 8-15 to which the OCP lanes 0-7 are connected, configuring two IDs corresponding to lanes 8-15 as 00, and jointly forming 0010 combination, namely configuring x 16; if the OCP lanes 8-15 are connected to the CPU1, the two IDs corresponding to lanes 8-15 are configured as 10, i.e., as x 8.
In addition, if the CPLD judges that it is a 4xn OCP network card according to RRSNT [3:0] _ N (PRSNTB [3:0] _ N is 0b1010, 0b1001, 0b0011), the BIOS is informed to ignore the automatic configuration of PCIe Root Port by ID Pin by pulling down Override _ N Pin to PCH. The CPU Root Port Bifurration needs to be manually configured (default x4x4x 4).
On the basis of the PCIe bandwidth list of the last OCP network card, please refer to fig. 2, and fig. 2 is a schematic structural diagram of a bandwidth allocation circuit provided in the embodiment of the present application. Referring to fig. 3, fig. 3 is a flowchart of another bandwidth allocation method for an OCP network card according to an embodiment of the present application.
Based on the circuit, the method of the embodiment may include:
s201, obtaining a PRSNTB [3:0] _ N signal of the OCP network card;
s202, setting the working mode of the OCP network card according to the PRSNTB [3:0] _ N signal and the CPU _ ID Pin signal, namely setting a BIF [2:0] _ N signal of the OCP network card;
s203, controlling the ID Pin of the PCIe bus connector according to the BIF [2:0] _ N signal to realize the distribution of the bandwidth of the OCP network card; the PCIe bus connector is a connector connected with a channel of the OCP network card.
Wherein, the ID Pin is the CPU0 RPBIF ID or the CPU1 RPBIF ID in FIG. 2. The PCIe bus connectors include an OCP Slim (micro-interface) connector, a CPU0 Slim connector, a CPU1Slim A, and a CPU1Slim B.
The lanes (channels or bus channels) 0-7 of the OCP NIC3.0 are connected to a Root Port lane 0-7 of the CPU0, the lanes 8-15 of the OCP NIC3.0 are connected to an OCP Slim line connector, the Root Port lanes 8-15 of the CPU0 are connected to a CPU0 Slim line connector, and the Root Port lanes 0-7 and the lanes 8-15 of the CPU1 are respectively connected to a CPU1Slim line A and a CPU1Slim line B. Lanes 8-15 of the OCP NIC3.0 can be connected to any one of the CPU0 Slimline, the CPU1Slimline A and the CPU1Slimline B by Slimline cables.
Each Slim line has a CPU _ ID Pin for determining whether the OCP Slim line is connected to the Slim line of the CPU0 or the Slim line of the CPU 1. On the OCP Slimline side, the CPU _ ID Pin is pulled up to 1 by default; on the CPU side, the CPU0 Slim CPU _ ID is 0, and the CPU1Slim CPU _ ID is Floating. Therefore, when the OCP Slim line is connected to the CPU0 Slim line, the CPU _ ID will be pulled low to 0 and will remain at 1 when connected to the CPU1Slim line.
Each Slimline is also provided with two ID pins, and if the Slimline of the CPU corresponds to Lane 0-Lane 7 of the CPU, the ID pins correspond to ID1 and ID 0; if the LANE 8-LANE 15 corresponds to the CPU, the ID Pin corresponds to ID3 and ID 2. The ID Pin of the CPU Slimline is pulled up to be 1 by default and is connected with the PCH for the BIOS to carry out the CPU Root Port bandwidth allocation.
The correspondence between ID [3:0] and PCIe Root Port Bifurization is as follows.
TABLE 2 PCIe Root Port Bifurization ID setup Table
ID3 ID2 ID1 ID0 PCIe Root Port Bifurcation
1 1 1 1 x4x4x4x4
1 1 1 0 x4x4x8
1 0 1 1 x8x4x4
1 0 1 0 x8x8
0 0 1 0 x16
Since the CPUs 0 lane 0-7 in this embodiment are connected to OCP's lane 0-7 by default, the IDs [1:0] corresponding to Root ports are directly set to 10. The two IDs Pin on the OCP Slime are fixed at 0 at the lower position (corresponding to the CPU side ID2 or ID0) and connected with the CPU _ ID at the upper position (corresponding to the CPU side ID3 or ID1) through Logic IC B. The Logic IC B is controlled by OCP _ BIF0_ N, if OCP _ BIF0_ N is 0, the ID Pin on OCP Slimline and CPU _ ID Pin are determined; if OCP BIF0_ N is 1, the ID combination (ID [3:2] or ID [1:0]) given to the CPU side by OCP Slime is constantly 10.
Thus, BIF2_ N, BIF1_ N of OCP NIC3.0 is pulled down to 0 directly, BIF0_ N is pulled up by default and connected to the output CPLD _ BIF0_ N of CPLD through Logic IC A. Logic IC A is controlled by CPU _ ID Pin, if CPU _ ID is 0, Logic IC A is conducted, and OCP _ BIF0_ N is determined by CPLD _ BIF0_ N. If CPU _ ID is 1, Logic IC A is disconnected and OCP _ BIF0_ N is always 1.
For CPLD, OCP PRSNTB [3:0] _ N is input to CPLD, CPLD judges PRSNTB [3:0] _ N state, controls CPLD _ BIF0_ N, CPU _ RP _ Override _ N output, wherein CPU _ RP _ Override _ N is connected to PCH, when CPU _ RP _ Override _ N is 0, it is used to inform BIOS that the currently inserted card can not automatically configure PCIe Root Port Bifurcity according to ID Pin, and needs to be manually configured under BIOS Setup page.
When the CPLD detects that PRSNTB [3:0] _ N is 0b1101 and 0b0110, as can be seen from table 1 and the OCP detailed specification, in both cases, the OCP network card corresponds to the 2x8 configuration mode, so the output CPLD _ BIF0_ N is 1, so as to ensure that OCP _ BIF0_ N is 1 no matter whether the OCP slim is connected to the CPU0 slim or the CPU1slim, and further ensure that the ID Pin used by the OCP slim for Root Port bandwidth allocation is configured to be 10.
When the CPLD detects that PRSNTB [3:0] _ N is 0b1010, 0b1001, 0b0011, as can be seen from Table 1 and the detailed specification of OCP, Root Port needs to be configured to 4x4 in these three cases, and the configuration cannot be performed through ID Pin according to the above-mentioned line, so output CPU _ RP _ Override _ N (connected to PCH) is 0 to inform BIOS to ignore ID Pin, based on manual setting under BIOS Setup.
In summary, for an OCP NIC3.0 network card supporting 1xn (2C +) or both 1xn and 2xm (4C +), when the OCP slave is connected to the CPU0, the OCP BIF [2:0] _ N is 000, the OCP network card is configured as 1xn, the CPU0Root Port ID Pin is 0010, and is configured as x 16; when the OCP Slimline is connected with the CPU1, the OCP BIF [2:0] _ N is 001, the OCP network card is configured to be 1xn (2C +) or 2xm (4C +), the CPU0Root Port lanes 0-7 are configured to be x8, and the CPU1 Root Port lanes 0-7 (or lanes 8-15) are also configured to be x 8.
For a network card requiring Root ports to be configured as 2x8, no matter the OCP Slimline is connected with CPU0 or CPU1, OCP BIF [2:0] _ N is 001, the configuration is that 2x8 CPU0Root ports ID is 1010, and the configuration is that x8x 8; when the OCP Slimline is connected with the CPU1, the OCP BIF [2:0] _ N is 001 which is configured to be 2x8, the OCP BIF [2:0] _ N is configured to be x8 corresponding to the CPUs 0Root Port lanes 0-7 respectively, and the CPUs 1 Root Port lanes 0-7 (or lanes 8-15) are also configured to be x8, so that the automatic bandwidth configuration operation is realized.
As can be seen, in this embodiment, the type information of the OCP network card is first obtained, then, an appropriate working mode is set for the OCP network card in combination with the number of CPUs on the basis of the type information, and finally, the PCIe bus connector is controlled according to the working mode, so that bandwidth allocation to the OCP network card is realized, instead of performing bandwidth allocation in a manual manner, and the allocation efficiency of the OCP network card is improved.
The following describes a bandwidth allocation apparatus provided in an embodiment of the present application, and the bandwidth allocation apparatus described below and the bandwidth allocation method described above may be referred to correspondingly.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a bandwidth allocation apparatus of an OCP network card according to an embodiment of the present application.
The type obtaining module 100 is configured to obtain type information of the OCP network card;
the mode setting module 200 is used for setting the working mode of the OCP network card according to the type information and the number of the CPUs;
the connector control module 300 is configured to control the PCIe bus connector according to a working mode, so as to allocate a bandwidth of the OCP network card; the PCIe bus connector is a connector connected with a channel of the OCP network card.
Optionally, the type obtaining module 100 may include:
the signal acquisition unit is used for acquiring a PRSNTB [3:0] _ N signal of the OCP network card;
a type information determining unit for determining type information according to the PRSNTB [3:0] _ N signal.
Optionally, the mode setting module 200 may include:
the single-machine mode setting unit is used for setting the working mode of the OCP network card to be a single CPU mode of the network card type corresponding to the type information when the number of the CPUs is single;
and the multi-machine mode setting unit is used for setting the working mode of the OCP network card to a multi-CPU mode of the network card type corresponding to the type information when the number of the CPUs is multiple.
Optionally, the mode setting module 200 may include:
the 2-path configuration unit is used for setting the working mode of the OCP network card to be a 2x8 configuration mode when the PRSNTB [3:0] _ N signal is 0b1101 or 0b 0110;
and the 4-way configuration unit is used for setting the working mode of the OCP network card to be a 4x4 configuration mode when the PRSNTB [3:0] _ N signal is 0b1010 or 0b1001 or 0b 0011.
Optionally, the mode setting module 200 may include:
the working mode matching unit is used for matching the corresponding working modes for the type information and the number of the CPUs according to the OCP specification table;
and the mode setting unit is used for setting a working mode for the OCP network card.
Optionally, the mode setting module 200 may include:
the CPU quantity determining unit is used for acquiring a CPU _ ID Pin signal and determining the quantity of the CPUs according to the CPU _ ID Pin signal;
and the mode setting unit is used for setting the working mode of the OCP network card according to the type information and the number of the CPUs.
Optionally, the connector control module 300 is specifically configured to control the PCH to control the PCIe bus connector according to a working mode, so as to implement allocating a bandwidth of the OCP network card; wherein, PCIe bus connector sets up between OCP network card and CPU, and PCH is connected with PCIe bus connector.
An embodiment of the present application further provides a computing device, including:
a memory for storing a computer program;
a processor for implementing the steps of the bandwidth allocation method as described in the above embodiments when executing the computer program.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the bandwidth allocation method according to the above embodiments.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The bandwidth allocation method, the bandwidth allocation apparatus, the computing device, and the computer-readable storage medium of the OCP network card provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. A bandwidth allocation method of an OCP network card is characterized by comprising the following steps:
obtaining the type information of an OCP network card;
setting the working mode of the OCP network card according to the type information and the number of the CPUs;
controlling a PCIe bus connector according to the working mode to realize the distribution of the bandwidth of the OCP network card; the PCIe bus connector is a connector connected with a channel of the OCP network card.
2. The method for allocating bandwidth according to claim 1, wherein setting the working mode of the OCP network card according to the type information and the number of CPUs includes:
matching corresponding working modes of the type information and the CPU quantity according to an OCP specification table;
and setting the working mode for the OCP network card.
3. The method for allocating bandwidth according to claim 1, wherein setting the working mode of the OCP network card according to the type information and the number of CPUs includes:
acquiring a CPU _ ID Pin signal, and determining the number of CPUs according to the CPU _ ID Pin signal;
and setting the working mode of the OCP network card according to the type information and the number of the CPUs.
4. The method for allocating bandwidth according to claim 1, wherein setting the working mode of the OCP network card according to the type information and the number of CPUs includes:
when the number of the CPUs is single, setting the working mode of the OCP network card to be a single CPU mode of the network card type corresponding to the type information;
and when the number of the CPUs is multiple, setting the working mode of the OCP network card to be a multi-CPU mode of the network card type corresponding to the type information.
5. The method of claim 1, wherein obtaining the type information of the OCP network card comprises:
obtaining a PRSNTB [3:0] _ N signal of the OCP network card;
determining the type information according to the PRSNTB [3:0] _ N signal.
6. The method for allocating bandwidth according to claim 5, wherein setting the working mode of the OCP network card according to the type information and the number of CPUs comprises:
when the PRSNTB [3:0] _ N signal is 0b1101 or 0b0110, setting the working mode of the OCP network card to be a 2x8 configuration mode;
and when the PRSNTB [3:0] _ N signal is 0b1010, 0b1001 or 0b0011, setting the working mode of the OCP network card to be a 4x4 configuration mode.
7. The method according to any one of claims 1 to 6, wherein controlling a PCIe bus connector according to the working mode to implement allocating the bandwidth of the OCP network card comprises:
controlling the PCH to control the PCIe bus connector according to the working mode, and realizing the distribution of the bandwidth of the OCP network card; the PCIe bus connector is arranged between the OCP network card and the CPU, and the PCH is connected with the PCIe bus connector.
8. A bandwidth allocation device of an OCP network card is characterized by comprising:
the type acquisition module is used for acquiring the type information of the OCP network card;
the mode setting module is used for setting the working mode of the OCP network card according to the type information and the number of the CPUs;
the connector control module is used for controlling a PCIe bus connector according to the working mode and realizing the distribution of the bandwidth of the OCP network card; the PCIe bus connector is a connector connected with a channel of the OCP network card.
9. A computing device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the bandwidth allocation method according to any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the bandwidth allocation method according to any one of claims 1 to 7.
CN202110744377.8A 2021-06-30 2021-06-30 Bandwidth allocation method of OCP network card and related device Pending CN113472576A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110744377.8A CN113472576A (en) 2021-06-30 2021-06-30 Bandwidth allocation method of OCP network card and related device
PCT/CN2021/121425 WO2023272989A1 (en) 2021-06-30 2021-09-28 Bandwidth allocation method for ocp network card, and related apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110744377.8A CN113472576A (en) 2021-06-30 2021-06-30 Bandwidth allocation method of OCP network card and related device

Publications (1)

Publication Number Publication Date
CN113472576A true CN113472576A (en) 2021-10-01

Family

ID=77877090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110744377.8A Pending CN113472576A (en) 2021-06-30 2021-06-30 Bandwidth allocation method of OCP network card and related device

Country Status (2)

Country Link
CN (1) CN113472576A (en)
WO (1) WO2023272989A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115442239A (en) * 2022-08-01 2022-12-06 超聚变数字技术有限公司 Bandwidth resource allocation method, PCIe channel switcher and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200394076A1 (en) * 2019-06-11 2020-12-17 Dell Products L.P. Information Handling System And Method To Allocate Peripheral Component Interconnect Express (PCIE) Bus Resources
CN112202600A (en) * 2020-09-11 2021-01-08 苏州浪潮智能科技有限公司 Multi-node single-host and multi-host communication automatic switching device and method
CN112532430A (en) * 2020-11-13 2021-03-19 苏州浪潮智能科技有限公司 PCIe bandwidth allocation method, device and storage medium
CN112615739A (en) * 2020-12-10 2021-04-06 苏州浪潮智能科技有限公司 Method and system for adapting OCP3.0 network card in multi-host application environment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901164B (en) * 2020-07-17 2023-04-28 浪潮电子信息产业股份有限公司 Adaptive control method, device, equipment and system of OCP NIC network card

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200394076A1 (en) * 2019-06-11 2020-12-17 Dell Products L.P. Information Handling System And Method To Allocate Peripheral Component Interconnect Express (PCIE) Bus Resources
CN112202600A (en) * 2020-09-11 2021-01-08 苏州浪潮智能科技有限公司 Multi-node single-host and multi-host communication automatic switching device and method
CN112532430A (en) * 2020-11-13 2021-03-19 苏州浪潮智能科技有限公司 PCIe bandwidth allocation method, device and storage medium
CN112615739A (en) * 2020-12-10 2021-04-06 苏州浪潮智能科技有限公司 Method and system for adapting OCP3.0 network card in multi-host application environment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115442239A (en) * 2022-08-01 2022-12-06 超聚变数字技术有限公司 Bandwidth resource allocation method, PCIe channel switcher and electronic equipment
CN115442239B (en) * 2022-08-01 2024-02-09 河南昆仑技术有限公司 Bandwidth resource allocation method, PCIe channel switcher and electronic device

Also Published As

Publication number Publication date
WO2023272989A1 (en) 2023-01-05

Similar Documents

Publication Publication Date Title
US8756360B1 (en) PCI-E compatible chassis having multi-host capability
CN110543404B (en) Server, hard disk lighting method, system and computer readable storage medium
MX2012014354A (en) Systems and methods for dynamic multi-link compilation partitioning.
CN111752871A (en) PCIE equipment, device and method for realizing compatibility of same PCIE slot position with different PCIE bandwidths
US10445279B1 (en) Automatic PCIe operating mode configuration
US20190079890A1 (en) Adapters, Systems And Methods For Adapting PCIe Expansion Cards To PCIe Component Bays
US20140280960A1 (en) Methods and apparatus for dynamically allocating devices between multiple controllers
CN109947682B (en) Server mainboard and server
JP2503183B2 (en) Bus adapter system
CN103098039A (en) High-speed peripheral-device interconnected-bus port configuration method and apparatus
CN104115138B (en) The configurable apolegamy plate interface of electricity
CN112685347A (en) Compatible method and device for PCIE (peripheral component interface express) equipment with different bandwidths and server
CN113190084B (en) Method and device for connecting hard disk backboard supporting multiple-bit-width hard disks
CN113472576A (en) Bandwidth allocation method of OCP network card and related device
CN104460857A (en) Peripheral component interconnect-express card and method and device for using same
CN112202600A (en) Multi-node single-host and multi-host communication automatic switching device and method
CN109815169A (en) A method of storage equipment and its storage link circuit self-adapting
CN114003528A (en) OCP switching card, switching system and switching method
CN107145213A (en) A kind of device and method being multiplexed for PCH MEdebug and USB port
CN112069108A (en) Flexible server configuration system and method based on PCIE Switch
KR101854805B1 (en) mainboard and computer improved I/O performance
CN112631979A (en) Server and method for automatically distributing PCIE signals
CN216014148U (en) Server and server backboard
CN112732627B (en) OCP device and server
CN115834369A (en) Server network configuration method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20211001

RJ01 Rejection of invention patent application after publication