WO2023272989A1 - Bandwidth allocation method for ocp network card, and related apparatus - Google Patents

Bandwidth allocation method for ocp network card, and related apparatus Download PDF

Info

Publication number
WO2023272989A1
WO2023272989A1 PCT/CN2021/121425 CN2021121425W WO2023272989A1 WO 2023272989 A1 WO2023272989 A1 WO 2023272989A1 CN 2021121425 W CN2021121425 W CN 2021121425W WO 2023272989 A1 WO2023272989 A1 WO 2023272989A1
Authority
WO
WIPO (PCT)
Prior art keywords
network card
ocp
ocp network
type information
cpus
Prior art date
Application number
PCT/CN2021/121425
Other languages
French (fr)
Chinese (zh)
Inventor
赵现普
Original Assignee
苏州浪潮智能科技有限公司
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 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2023272989A1 publication Critical patent/WO2023272989A1/en

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

Definitions

  • the present application relates to the field of computers, and in particular to an OCP network card bandwidth allocation method, a bandwidth allocation device, a computing device, and a computer-readable storage medium.
  • Open Compute Project Open Compute Project
  • OCP Open Compute Project
  • a Root Port (root port) of a CPU central processing unit, central processing unit directly leads to a PCIe (peripheral component interconnect express, high-speed serial computer expansion bus standard) x16 to OCP NIC3.0, or from Each of the two CPUs is connected to a PCIe x8 to OCP NIC3.0.
  • the connection mode is fixed, it can only support Single Host (stand-alone) or Multi-Host, and it cannot be flexibly switched between the two, and the Root Port used is occupied by OCP NIC3.0 and cannot be used for other purposes. If you need to configure the bandwidth of the OCP network card, you need to modify it manually, which is inefficient.
  • the purpose of this application is to provide a bandwidth allocation method for an OCP network card, a bandwidth allocation device, a computing device, and a computer-readable storage medium, so as to solve the problem of low efficiency of manual bandwidth allocation.
  • the application provides a bandwidth allocation method of an OCP network card, comprising:
  • the PCIe bus connector is controlled according to the working mode to realize the bandwidth allocation of the OCP network card; wherein, the PCIe bus connector is a connector connected with a channel of the OCP network card.
  • obtain the type information of the OCP network card including:
  • the type information is determined according to the PRSNTB[3:0]_N signal.
  • the operating mode of the OCP network card is set to the single CPU mode of the network card type corresponding to the type information
  • the working mode of the OCP network card is set to the multi-CPU mode of the network card type corresponding to the type information.
  • the operating mode of the OCP network card is set to 2x8 configuration mode
  • the working mode is set for the OCP network card.
  • the PCIe bus connector is controlled according to the working mode to realize the allocation of the bandwidth of the OCP network card, including:
  • Control the PCH to control the PCIe bus connector according to the working mode, so as to realize the allocation of the bandwidth of the OCP network card; wherein, the PCIe bus connector is arranged between the OCP network card and the CPU, and the PCH Connect with the PCIe bus connector.
  • the application also provides a bandwidth allocation device for an OCP network card, including:
  • a type acquisition module is used to obtain the type information of the OCP network card
  • a mode setting module configured to set the operating mode of the OCP network card according to the type information and the number of CPUs
  • a connector control module configured to control the PCIe bus connector according to the operating mode, so as to allocate the bandwidth of the OCP network card; wherein, the PCIe bus connector is connected to the channel of the OCP network card Connector.
  • the present application also provides a computing device, comprising:
  • the processor is configured to implement the steps of the above-mentioned bandwidth allocation method when executing the computer program.
  • the present application also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above bandwidth allocation method are implemented.
  • a bandwidth allocation method of an OCP network card comprising: obtaining the type information of the OCP network card; setting the operating mode of the OCP network card according to the type information and the number of CPUs; connecting the PCIe bus according to the operating mode
  • the controller is used to control the bandwidth of the OCP network card; wherein, the PCIe bus connector is a connector connected to the channel of the OCP network card.
  • the present application also provides a bandwidth allocation device for an OCP network card, a computing device, and a computer-readable storage medium, which have the above beneficial effects and will not be repeated here.
  • Fig. 1 is the flowchart of the bandwidth allocation method of a kind of OCP network card provided by the embodiment of the present application;
  • FIG. 2 is a schematic structural diagram of a bandwidth allocation circuit provided by an embodiment of the present application.
  • Fig. 3 is the flowchart of the bandwidth allocation method of another kind of OCP network card provided by the embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an OCP network card bandwidth allocation device provided by an embodiment of the present application.
  • the core of the present application is to provide a bandwidth allocation method for an OCP network card, a bandwidth allocation device, a computing device, and a computer-readable storage medium, so as to solve the problem of low efficiency in manual bandwidth allocation.
  • one PCIe x16 is directly led to OCP NIC3.0 from one Root Port of the CPU, or one PCIe x8 is connected to OCP NIC3.0 from two CPUs respectively.
  • the connection mode is fixed, it can only support Single Host or Multi-Host, and it cannot be flexibly switched between the two, and the Root Port used is occupied by OCP NIC3.0 and cannot be used for other purposes. If you need to configure the bandwidth of the OCP network card, you need to modify it manually, which is inefficient.
  • OCP NIC Network Interface Card, network interface card
  • OCP Mezz mousezanine, intermediate connector
  • the updated OCP NIC 3.0 has a wider application range and better use effect.
  • OCP NIC3.0 can support Multi-host (multi-host) applications, that is, a network card can be flexibly configured as 1x16, 2x8, 4x4 according to needs, and connected to one or more uplinks to improve network configuration flexibility and transmission efficiency.
  • Multi-host multi-host
  • the application provides a bandwidth allocation method of an OCP network card, by first obtaining the type information of the OCP network card, and then combining the CPU quantity on the basis of the type information, setting a suitable working mode for the OCP network card, and finally according to the work
  • the mode controls the PCIe bus connector to realize the bandwidth allocation to the OCP network card, instead of using manual bandwidth configuration to improve the configuration efficiency of the OCP network card.
  • FIG. 1 is a flowchart of a bandwidth allocation method for an OCP network card provided in an embodiment of the present application.
  • the method may include:
  • the purpose of this step is to obtain the type information of the OCP network card, that is, to determine the type of the OCP network card, so as to determine the working mode of the OCP network card suitable for this type. That is to say, in this embodiment, different OCP network cards are connected, and each type of OCP network card has a different number of buses that can be connected and a number of CPUs that can be configured due to differences in hardware or software. Eventually, the bandwidth configuration of the OCP network card will change, for example, the number of buses in the bandwidth will change, or the number of CPUs connected to the bandwidth will change. Therefore, in this step, first determine the type information of the OCP network card.
  • the type information can be determined by the PRSNTB[3:0]_N signal of the OCP network card, or the type information can be determined by BIOS (Basic Input Output System, basic input and output system), or the state of the OCP network card info determines the type of info. It can be seen that the method for determining this type of information in this step is not unique, and is not specifically limited here.
  • this step may include:
  • Step 1 obtain the PRSNTB[3:0]_N signal of the OCP network card
  • Step 2 determine the type information according to the PRSNTB[3:0]_N signal.
  • this optional solution mainly describes how to obtain this type of information.
  • the BIOS can obtain the PRSNTB[3:0]_N signal of the OCP network card
  • the CPLD can obtain the PRSNTB[3:0]_N signal of the OCP network card
  • the controller can obtain the PRSNTB[3:0] of the OCP network card _N signal, which is not specifically limited here.
  • type information is determined from the PRSNTB[3:0]_N signal. Specifically, the type information can be determined according to the OCP specification table and the PRSNTB[3:0]_N signal.
  • this step aims to set the working mode of the OCP network card according to the type information and the number of CPUs. It can be seen that this step aims 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 a multi-machine mode or a single-machine mode.
  • this step may include:
  • the working mode of the OCP network card is set to the multi-CPU mode of the network card type corresponding to the type information.
  • this optional solution mainly describes how to set the working mode.
  • set the working mode of the OCP network card to the single-CPU mode of the network card type corresponding to the type information that is, set the working mode of the OCP network card to the single-machine mode, that is, Single- Host.
  • set the working mode of the OCP network card to the multi-CPU mode of the network card type corresponding to the type information that is, set the working mode of the OCP network card to the multi-machine mode, ie Multi-Host.
  • this step may include:
  • this optional solution mainly describes how to set the working mode.
  • the PRSNTB[3:0]_N signal when the PRSNTB[3:0]_N signal is 0b1101 or 0b0110, set the working mode of the OCP network card to 2x8 configuration mode; when the PRSNTB[3:0]_N signal is 0b1010 or 0b1001 or 0b0011, Set the working mode of the OCP network card to 4x4 configuration mode.
  • the specific content of the PRSNTB[3:0]_N signal is directly used to determine the working mode of the OCP network card.
  • this step may include:
  • Step 1 match the corresponding working mode with the type information and the number of CPUs according to the OCP specification table;
  • Step 2 set the working mode for the OCP network card.
  • this optional solution mainly describes how to set the working mode.
  • the type information and the number of CPUs are matched to the corresponding working mode according to the OCP specification table; wherein, the OCP specification table is the bandwidth list shown in Table 1. Then, set the working mode for the OCP network card.
  • this step can include:
  • Step 1 obtain the CPU_ID Pin signal, and determine the number of CPUs according to the CPU_ID Pin signal;
  • Step 2 setting the working mode of the OCP network card according to the type information and the number of CPUs.
  • this optional solution mainly describes how to set the working mode.
  • the CPU_ID Pin signal is obtained, and the number of CPUs is determined according to the CPU_ID Pin signal.
  • the CPU_ID Pin signal is a signal bit set on the connector of each CPU. For example, there are two CPUs, namely CPU0 and CPU1.
  • the CPU_ID Pin signal corresponding to the CPU0 is obtained, and then the current number of CPUs is determined to be one.
  • the CPU_ID Pin signals of two CPUs are obtained, and then it is determined that the current number of CPUs is multiple.
  • set the working mode of the OCP network card according to the type information and the number of CPUs.
  • this step aims to control the PCIe bus connector according to the working mode, so as to realize the bandwidth allocation of the OCP network card.
  • the PCIe bus connector is a connector connected with the 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, different channels can be closed and opened, thereby allocating bandwidth.
  • this step may include:
  • the control PCH controls the PCIe bus connector according to the working mode to realize the bandwidth allocation of the OCP network card; wherein, the PCIe bus connector is arranged between the OCP network card and the CPU, and the PCH is connected to the PCIe bus connector.
  • PCH Platinum Controller Hub
  • PCIe bus connector may be connected to each CPU separately. Therefore, the PCH can interface with each PCIe bus connector for control.
  • the present embodiment obtains the type information of the OCP network card at first, and then combines the number of CPUs on the basis of the type information to set a suitable working mode for the OCP network card, and finally implements the PCIe bus connector according to the working mode. Control to realize the bandwidth allocation of the OCP network card, instead of using manual bandwidth configuration to improve the configuration efficiency of the OCP network card.
  • the purpose is to provide a kind of OCP NIC3.0 bandwidth allocation method that can support Single-Host and Multi-Host at the same time, and can perform PCIe on OCP network card and CPU Root Port according to whether the actual connection is Single-Host or Multi-Host The method of bandwidth allocation.
  • the following table is a list of SFF OCP network cards listed in the OCP specification. It can be known from the following table that the model of the OCP network card and the supported bandwidth mode can be judged 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.
  • OCP PCIe lane0 ⁇ 7 is connected to CPU0, if OCP PCIe lane8 ⁇ 15 is connected to CPU1, then the BIF[2:0]_N of OCP is controlled by hardware line to 001; If OCP PCIe lanes 8 ⁇ 15 are also connected to lanes 8 ⁇ 15 of the CPU0 Root Port connected to OCP lanes 0 ⁇ 7, the CPLD will judge the type of the OCP NIC3.0 card according to the PRSNTB[3:0]_N of the OCP.
  • OCP_BIF[2:0]_N is 000
  • OCP lanes 8 ⁇ 15 are connected to CPU0 Root Port lanes 8 ⁇ 15 to which OCP lanes 0 ⁇ 7 are connected, configure the two IDs corresponding to lanes 8 ⁇ 15 as 00 , together form a combination of 0010, that is, configure it as x16; if OCP lane 8 ⁇ 15 is connected to CPU1, configure the two IDs corresponding to lane8 ⁇ 15 as 10, that is, configure it as x8.
  • FIG. 2 is a schematic structural diagram of a bandwidth allocation circuit provided by an embodiment of the present application.
  • FIG. 3 is a flow chart of another OCP network card bandwidth allocation method provided by an embodiment of the present application.
  • the method of this embodiment may include:
  • the PCIe bus connector is a connector connected to the channel of the OCP network card.
  • the ID Pin is the CPU0 RPBIF ID or CPU1 RPBIF ID in Figure 2.
  • PCIe bus connectors include OCP Slimline (miniature interface) connector, CPU0 Slimline connector, CPU1 Slimline A, and CPU1 Slimline B.
  • lanes (channels or bus channels) 0-7 of OCP NIC3.0 are connected to a Root Port lane 0-7 of CPU0
  • lanes 8-15 of OCP NIC3.0 are connected to an OCP Slimline connector
  • the above-mentioned Root Port lane 8 of CPU0 ⁇ 15 is connected to a CPU0 Slimline connector
  • Root Port lane0 ⁇ 7 and lane8 ⁇ 15 of CPU1 are connected to CPU1 Slimline A and CPU1 Slimline B respectively.
  • Lanes8 ⁇ 15 of OCP NIC3.0 can be connected to any one of CPU0 Slimline, CPU1 Slimline A, and CPU1 Slimline B through a Slimline cable.
  • CPU_ID Pin on each Slimline, which is used to judge whether the OCP Slimline is connected to the Slimline of CPU0 or the Slimline of CPU1.
  • the CPU_ID Pin is pulled up to 1 by default; on the CPU side, the CPU0 Slimline CPU_ID is 0, and the CPU1 Slimline CPU_ID is Floating. Therefore, when OCP Slimline is connected to CPU0 Slimline, CPU_ID will be pulled down to 0, and when connected to CPU1 Slimline, it will remain at 1.
  • ID Pins There are two ID Pins on each Slimline. If the Slimline of the CPU corresponds to lane0 ⁇ lane7 of the CPU, the ID Pin corresponds to ID1 and ID0; if it corresponds to lane8 ⁇ lane15 of the CPU, the ID Pin corresponds to ID3 and ID2.
  • the ID Pin of the CPU Slimline is pulled up to 1 by default, and connected to the PCH, which is used by the BIOS for CPU Root Port bandwidth allocation.
  • the ID[1:0] corresponding to the Root Port is directly set to 10.
  • the low bits of the two ID Pins on the OCP Slimline (corresponding to ID2 or ID0 on the CPU side) are fixed at 0, and the high bits (corresponding to ID3 or ID1 on the CPU side) are connected to CPU_ID through Logic IC B.
  • Logic IC B is controlled by OCP_BIF0_N: if OCP_BIF0_N is 0, the ID Pin and CPU_ID Pin on OCP Slimline are determined; if OCP BIF0_N is 1, then OCP Slimline gives the ID combination (ID[3:2] or ID [1:0]) is always 10.
  • BIF2_N and BIF1_N of OCP NIC3.0 are directly pulled down to 0, 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 turned on, and OCP_BIF0_N is determined by CPLD_BIF0_N. If CPU_ID is 1, both ends of Logic IC A are disconnected, and OCP_BIF0_N is always 1.
  • OCP PRSNTB[3:0]_N is input to CPLD
  • CPLD judges the state of PRSNTB[3:0]_N
  • CPU_RP_Override_N where CPU_RP_Override_N is connected to PCH, when CPU_RP_Override_N is 0, used for Inform the BIOS that the currently inserted card cannot automatically configure the PCIe Root Port Bifurcation based on the ID Pin, and needs to be manually configured on the BIOS Setup page.
  • the output CPLD_BIF0_N is 1 to ensure that regardless of the OCP Slimline Connected to CPU0 Slimline or CPU1 Slimline, both can ensure that OCP_BIF0_N is 1, and then ensure that the ID Pin used by OCP Slimline for Root Port bandwidth allocation is configured as 10.
  • OCP NIC3.0 network cards that support 1xn (2C+) or both 1xn and 2xm (4C+)
  • CPU0 Root Port ID Pin is 0010, configured as x16
  • OCP network card is configured as 1xn(2C+) or 2xm(4C+)
  • CPU0 Root Port lane0 ⁇ 7 is configured as x8
  • CPU1 Root Port lane0 ⁇ 7 (or lane8 ⁇ 15) is also configured as x8.
  • bandwidth allocation device provided by the embodiment of the present application is introduced below, and the bandwidth allocation device described below and the bandwidth allocation method described above may be referred to in correspondence.
  • FIG. 4 is a schematic structural diagram of an OCP network card bandwidth allocation device provided by an embodiment of the present application.
  • Type obtaining module 100 for obtaining the type information of OCP network card
  • the mode setting module 200 is used to set the operating mode of the OCP network card according to the type information and the number of CPUs;
  • the connector control module 300 is used to control the PCIe bus connector according to the working mode, so as to realize the allocation of the bandwidth of the OCP network card; wherein, the PCIe bus connector is a connector connected with the channel of the OCP network card.
  • the type acquisition module 100 may include:
  • a type information determining unit configured to determine the type information according to the PRSNTB[3:0]_N signal.
  • the mode setting module 200 may include:
  • the stand-alone mode setting unit is used to set the operating mode of the OCP network card to the single-CPU mode of the network card type corresponding to the type information when the number of CPUs is single;
  • the multi-machine mode setting unit is used for setting the working mode of the OCP network card to the multi-CPU mode of the network card type corresponding to the type information when the number of CPUs is multiple.
  • the mode setting module 200 may include:
  • 2-way configuration unit used to set the working mode of the OCP network card to 2x8 configuration mode when the PRSNTB[3:0]_N signal is 0b1101 or 0b0110;
  • 4-way configuration unit used to set the working mode of the OCP network card to 4x4 configuration mode when the PRSNTB[3:0]_N signal is 0b1010 or 0b1001 or 0b0011.
  • the mode setting module 200 may include:
  • the working mode matching unit is used to match the corresponding working mode to the type information and the number of CPUs according to the OCP specification table;
  • the mode setting unit is used for setting the working mode of the OCP network card.
  • the mode setting module 200 may include:
  • CPU quantity determining unit is used for obtaining CPU_ID Pin signal, and determines CPU quantity according to CPU_ID Pin signal;
  • the mode setting unit is used to set the working mode of the OCP network card according to the type information and the number of CPUs.
  • the connector control module 300 is specifically used to control the PCH to control the PCIe bus connector according to the working mode, so as to realize the bandwidth allocation of the OCP network card; wherein, the PCIe bus connector is arranged between the OCP network card and the CPU, The PCH is connected to the PCIe bus connector.
  • the embodiment of the present application also provides a computing device, including:
  • the processor is configured to implement the steps of the bandwidth allocation method as described in the above embodiments when executing the computer program.
  • An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the bandwidth allocation method described in the foregoing embodiments are implemented.
  • each embodiment in the description is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.
  • the description is relatively simple, and for the related part, please refer to the description of the method part.
  • RAM random access memory
  • ROM read-only memory
  • EEPROM electrically programmable ROM
  • EEPROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or any other Any other known storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Small-Scale Networks (AREA)

Abstract

Disclosed in the present application is a bandwidth allocation method for an OCP network card. The method comprises: acquiring type information of an OCP network card; setting a working mode of the OCP network card according to the type information and the number of CPUs; and controlling a PCIe bus connector according to the working mode, so as to allocate a bandwidth of the OCP network card, wherein the PCIe bus connector is a connector connected to a channel of the OCP network card. In the present application, type information of an OCP network card is first acquired, a suitable working mode is then set for the OCP network card on the basis of the type information combined with the number of CPUs, and finally a PCIe bus connector is controlled according to the working mode, such that a bandwidth of the OCP network card is allocated. Bandwidth configuration is not performed manually, thereby improving the configuration efficiency of the OCP network card. Further disclosed in the present application are a bandwidth allocation apparatus for an OCP network card, and a computing device and a computer-readable storage medium, which have the above beneficial effects.

Description

一种OCP网卡的带宽分配方法及相关装置A bandwidth allocation method and related device of OCP network card
本申请要求在2021年6月30日提交中国专利局、申请号为202110744377.8、发明名称为“一种OCP网卡的带宽分配方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110744377.8 and the title of the invention "A Bandwidth Allocation Method for OCP Network Card and Related Devices" submitted to the China Patent Office on June 30, 2021, the entire contents of which are incorporated by reference in this application.
技术领域technical field
本申请涉及计算机领域,特别涉及一种OCP网卡的带宽分配方法、带宽分配装置、计算设备以及计算机可读存储介质。The present application relates to the field of computers, and in particular to an OCP network card bandwidth allocation method, a bandwidth allocation device, a computing device, and a computer-readable storage medium.
背景技术Background technique
随着信息技术的不断发展,为了提高计算设备的可扩展性,出现了开放计算项目(Open Compute Project,简称OCP),提供高效的可扩展服务器,存储和数据中心硬件设计,以减少数据中心的环境影响。With the continuous development of information technology, in order to improve the scalability of computing equipment, the Open Compute Project (Open Compute Project, referred to as OCP) has emerged to provide efficient and scalable server, storage and data center hardware design to reduce the cost of data centers. environmental impact.
相关技术中,从CPU(central processing unit,中央处理器)的一个Root Port(根端口)直接引出一个PCIe(peripheral component interconnect express,高速串行计算机扩展总线标准)x16到OCP NIC3.0,或从两个CPU各接一个PCIe x8到OCP NIC3.0。连接方式固定,只能支持Single Host(单机)或Multi-Host,不能在两者之间进行灵活切换,且被使用的Root Port被OCP NIC3.0占据,不能用作其他用途。如果需要将该OCP网卡的带宽配置,则需要手动修改,效率较低。In related technologies, a Root Port (root port) of a CPU (central processing unit, central processing unit) directly leads to a PCIe (peripheral component interconnect express, high-speed serial computer expansion bus standard) x16 to OCP NIC3.0, or from Each of the two CPUs is connected to a PCIe x8 to OCP NIC3.0. The connection mode is fixed, it can only support Single Host (stand-alone) or Multi-Host, and it cannot be flexibly switched between the two, and the Root Port used is occupied by OCP NIC3.0 and cannot be used for other purposes. If you need to configure the bandwidth of the OCP network card, you need to modify it manually, which is inefficient.
因此,如何使设备可以自动切换不同规格接口,而不是人工进行带宽分配,提高OCP网卡的配置效率的设备是本领域技术人员关注的重点问题。Therefore, how to enable the device to automatically switch between interfaces of different specifications instead of manually allocating bandwidth and improving the configuration efficiency of the OCP network card is a key issue that those skilled in the art pay attention to.
发明内容Contents of the invention
本申请的目的是提供一种OCP网卡的带宽分配方法、带宽分配装置、计算设备以及计算机可读存储介质,以便解决现有人工进行带宽配置效率较低的问题。The purpose of this application is to provide a bandwidth allocation method for an OCP network card, a bandwidth allocation device, a computing device, and a computer-readable storage medium, so as to solve the problem of low efficiency of manual bandwidth allocation.
为解决上述技术问题,本申请提供一种OCP网卡的带宽分配方法,包括:In order to solve the above technical problems, the application provides a bandwidth allocation method of an OCP network card, comprising:
获取OCP网卡的类型信息;Obtain the type information of the OCP network card;
根据所述类型信息和CPU数量设定所述OCP网卡的工作模式;Set the working mode of the OCP network card according to the type information and the number of CPUs;
根据所述工作模式对PCIe总线连接器进行控制,实现对所述OCP网卡的带宽进行分配;其中,所述PCIe总线连接器是与所述OCP网卡的通道进行连接的连接器。The PCIe bus connector is controlled according to the working mode to realize the bandwidth allocation of the OCP network card; wherein, the PCIe bus connector is a connector connected with a channel of the OCP network card.
可选的,获取OCP网卡的类型信息,包括:Optionally, obtain the type information of the OCP network card, including:
获取所述OCP网卡的PRSNTB[3:0]_N信号;Obtain the PRSNTB[3:0]_N signal of the OCP network card;
根据所述PRSNTB[3:0]_N信号确定所述类型信息。The type information is determined according to the PRSNTB[3:0]_N signal.
可选的,根据所述类型信息和CPU数量设定所述OCP网卡的工作模式,包括:Optionally, set the working mode of the OCP network card according to the type information and the number of CPUs, including:
当所述CPU数量为单个时,将所述OCP网卡的工作模式设定为所述类型信息对应的网卡类型的单CPU模式;When the number of CPUs is single, the operating mode of the OCP network card is set to the single CPU mode of the network card type corresponding to the type information;
当所述CPU数量为多个时,将所述OCP网卡的工作模式设定为所述类型信息对应的网卡类型的多CPU模式。When the number of CPUs is multiple, the working mode of the OCP network card is set to the multi-CPU mode of the network card type corresponding to the type information.
可选的,根据所述类型信息和CPU数量设定所述OCP网卡的工作模式,包括:Optionally, set the working mode of the OCP network card according to the type information and the number of CPUs, including:
当所述PRSNTB[3:0]_N信号为0b1101或0b0110时,将所述OCP网卡的工作模式设置为2x8配置模式;When the PRSNTB[3:0]_N signal is 0b1101 or 0b0110, the operating mode of the OCP network card is set to 2x8 configuration mode;
当所述PRSNTB[3:0]_N信号为0b1010或0b1001或0b0011时,将所述OCP网卡的工作模式设置为4x4配置模式。When the PRSNTB[3:0]_N signal is 0b1010 or 0b1001 or 0b0011, set the working mode of the OCP network card to 4x4 configuration mode.
可选的,根据所述类型信息和CPU数量设定所述OCP网卡的工作模式,包括:Optionally, set the working mode of the OCP network card according to the type information and the number of CPUs, including:
根据OCP规范表对所述类型信息和所述CPU数量匹配对应的工作模式;matching the type information and the number of CPUs to a corresponding working mode according to the OCP specification table;
对所述OCP网卡设定所述工作模式。The working mode is set for the OCP network card.
可选的,根据所述类型信息和CPU数量设定所述OCP网卡的工作模式,包括:Optionally, set the working mode of the OCP network card according to the type information and the number of CPUs, including:
获取CPU_ID Pin信号,并根据所述CPU_ID Pin信号确定所述CPU数量;Obtain the CPU_ID Pin signal, and determine the number of CPUs according to the CPU_ID Pin signal;
根据所述类型信息和所述CPU数量设定所述OCP网卡的工作模式。Set the working mode of the OCP network card according to the type information and the number of CPUs.
可选的,根据所述工作模式对PCIe总线连接器进行控制,实现对所述OCP 网卡的带宽进行分配,包括:Optionally, the PCIe bus connector is controlled according to the working mode to realize the allocation of the bandwidth of the OCP network card, including:
控制PCH根据所述工作模式对所述PCIe总线连接器进行控制,实现对所述OCP网卡的带宽进行分配;其中,所述PCIe总线连接器设置于所述OCP网卡与CPU之间,所述PCH与所述PCIe总线连接器连接。Control the PCH to control the PCIe bus connector according to the working mode, so as to realize the allocation of the bandwidth of the OCP network card; wherein, the PCIe bus connector is arranged between the OCP network card and the CPU, and the PCH Connect with the PCIe bus connector.
本申请还提供一种OCP网卡的带宽分配装置,包括:The application also provides a bandwidth allocation device for an OCP network card, including:
类型获取模块,用于获取OCP网卡的类型信息;A type acquisition module is used to obtain the type information of the OCP network card;
模式设定模块,用于根据所述类型信息和CPU数量设定所述OCP网卡的工作模式;A mode setting module, configured to set the operating mode of the OCP network card according to the type information and the number of CPUs;
连接器控制模块,用于根据所述工作模式对PCIe总线连接器进行控制,实现对所述OCP网卡的带宽进行分配;其中,所述PCIe总线连接器是与所述OCP网卡的通道进行连接的连接器。A connector control module, configured to control the PCIe bus connector according to the operating mode, so as to allocate the bandwidth of the OCP network card; wherein, the PCIe bus connector is connected to the channel of the OCP network card Connector.
本申请还提供一种计算设备,包括:The present application also provides a computing device, comprising:
存储器,用于存储计算机程序;memory for storing computer programs;
处理器,用于执行所述计算机程序时实现如上所述的带宽分配方法的步骤。The processor is configured to implement the steps of the above-mentioned bandwidth allocation method when executing the computer program.
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的带宽分配方法的步骤。The present application also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above bandwidth allocation method are implemented.
本申请所提供的一种OCP网卡的带宽分配方法,包括:获取OCP网卡的类型信息;根据所述类型信息和CPU数量设定所述OCP网卡的工作模式;根据所述工作模式对PCIe总线连接器进行控制,实现对所述OCP网卡的带宽进行分配;其中,所述PCIe总线连接器是与所述OCP网卡的通道进行连接的连接器。A bandwidth allocation method of an OCP network card provided by the application, comprising: obtaining the type information of the OCP network card; setting the operating mode of the OCP network card according to the type information and the number of CPUs; connecting the PCIe bus according to the operating mode The controller is used to control the bandwidth of the OCP network card; wherein, the PCIe bus connector is a connector connected to the channel of the OCP network card.
通过首先获取该OCP网卡的类型信息,然后在类型信息的基础上结合CPU数量,对该OCP网卡设定合适的工作模式,最后根据该工作模式对该PCIe总线连接器进行控制,实现对OCP网卡的带宽分配,而不是采用人工的方式进行带宽配置,提高OCP网卡的配置效率。By first obtaining the type information of the OCP network card, and then combining the number of CPUs on the basis of the type information, setting an appropriate working mode for the OCP network card, and finally controlling the PCIe bus connector according to the working mode to realize the OCP network card Bandwidth allocation, instead of manual bandwidth configuration, improves the configuration efficiency of the OCP network card.
本申请还提供一种OCP网卡的带宽分配装置、计算设备以及计算机可读存储介质,具有以上有益效果,在此不做赘述。The present application also provides a bandwidth allocation device for an OCP network card, a computing device, and a computer-readable storage medium, which have the above beneficial effects and will not be repeated here.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present application, and those skilled in the art can also obtain other drawings according to the provided drawings without creative work.
图1为本申请实施例所提供的一种OCP网卡的带宽分配方法的流程图;Fig. 1 is the flowchart of the bandwidth allocation method of a kind of OCP network card provided by the embodiment of the present application;
图2为本申请实施例所提供的一种带宽分配电路的结构示意图;FIG. 2 is a schematic structural diagram of a bandwidth allocation circuit provided by an embodiment of the present application;
图3为本申请实施例所提供的另一种OCP网卡的带宽分配方法的流程图;Fig. 3 is the flowchart of the bandwidth allocation method of another kind of OCP network card provided by the embodiment of the present application;
图4为本申请实施例所提供的一种OCP网卡的带宽分配装置的结构示意图。FIG. 4 is a schematic structural diagram of an OCP network card bandwidth allocation device provided by an embodiment of the present application.
具体实施方式detailed description
本申请的核心是提供一种OCP网卡的带宽分配方法、带宽分配装置、计算设备以及计算机可读存储介质,以便解决现有人工进行带宽配置效率较低的问题。The core of the present application is to provide a bandwidth allocation method for an OCP network card, a bandwidth allocation device, a computing device, and a computer-readable storage medium, so as to solve the problem of low efficiency in manual bandwidth allocation.
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, 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 in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
相关技术中,从CPU的一个Root Port直接引出一个PCIe x16到OCP NIC3.0,或从两个CPU各接一个PCIe x8到OCP NIC3.0。连接方式固定,只能支持Single Host或Multi-Host,不能再两者之间进行灵活切换,且被使用的Root Port被OCP NIC3.0占据,不能用作其他用途。如果需要将该OCP网卡的带宽配置,则需要手动修改,效率较低。In the related technology, one PCIe x16 is directly led to OCP NIC3.0 from one Root Port of the CPU, or one PCIe x8 is connected to OCP NIC3.0 from two CPUs respectively. The connection mode is fixed, it can only support Single Host or Multi-Host, and it cannot be flexibly switched between the two, and the Root Port used is occupied by OCP NIC3.0 and cannot be used for other purposes. If you need to configure the bandwidth of the OCP network card, you need to modify it manually, which is inefficient.
其中,OCP NIC(Network Interface Card,网络接口卡)3.0规范是OCP Mezz(mezzanine,中间层连接器)2.0rev 1.00设计规范的后续版本,与OCP Mezz卡2.0设计规范相比,更新后的OCP NIC 3.0应用范围更广,使用效果更好。其中,OCP NIC3.0可支持Multi-host(多机)应用,即一张网卡可以根据需要灵 活配置成1x16,2x8,4x4,接一个或多个上行,提高网络配置灵活性和传输效率。Among them, the OCP NIC (Network Interface Card, network interface card) 3.0 specification is the follow-up version of the OCP Mezz (mezzanine, intermediate connector) 2.0rev 1.00 design specification. Compared with the OCP Mezz card 2.0 design specification, the updated OCP NIC 3.0 has a wider application range and better use effect. Among them, OCP NIC3.0 can support Multi-host (multi-host) applications, that is, a network card can be flexibly configured as 1x16, 2x8, 4x4 according to needs, and connected to one or more uplinks to improve network configuration flexibility and transmission efficiency.
因此,本申请提供一种OCP网卡的带宽分配方法,通过首先获取该OCP网卡的类型信息,然后在类型信息的基础上结合CPU数量,对该OCP网卡设定合适的工作模式,最后根据该工作模式对该PCIe总线连接器进行控制,实现对OCP网卡的带宽分配,而不是采用人工的方式进行带宽配置,提高OCP网卡的配置效率。Therefore, the application provides a bandwidth allocation method of an OCP network card, by first obtaining the type information of the OCP network card, and then combining the CPU quantity on the basis of the type information, setting a suitable working mode for the OCP network card, and finally according to the work The mode controls the PCIe bus connector to realize the bandwidth allocation to the OCP network card, instead of using manual bandwidth configuration to improve the configuration efficiency of the OCP network card.
以下通过一个实施例,对本申请提供的一种OCP网卡的带宽分配方法进行说明。A method for allocating bandwidth of an OCP network card provided by the present application will be described below through an embodiment.
请参考图1,图1为本申请实施例所提供的一种OCP网卡的带宽分配方法的流程图。Please refer to FIG. 1 . FIG. 1 is a flowchart of a bandwidth allocation method for an OCP network card provided in an embodiment of the present application.
本实施例中,该方法可以包括:In this embodiment, the method may include:
S101,获取OCP网卡的类型信息;S101, acquiring type information of the OCP network card;
可见,本步骤旨在获取到到该OCP网卡的类型信息,也就是确定该OCP网卡的类型,以便确定适合该类型的OCP网卡的工作模式。也就是说,本实施例中会连接不同的OCP网卡,每个类型的OCP网卡由于硬件或软件的不同,使得可以连接的总线数量,以及可以配置的CPU数量均不相同。最终会导致该OCP网卡的带宽配置发生变化,例如,带宽中的总线数量发生变化,或是带宽连接的CPU数量发生变化。因此,本步骤中首先确定OCP网卡的类型信息。It can be seen that the purpose of this step is to obtain the type information of the OCP network card, that is, to determine the type of the OCP network card, so as to determine the working mode of the OCP network card suitable for this type. That is to say, in this embodiment, different OCP network cards are connected, and each type of OCP network card has a different number of buses that can be connected and a number of CPUs that can be configured due to differences in hardware or software. Eventually, the bandwidth configuration of the OCP network card will change, for example, the number of buses in the bandwidth will change, or the number of CPUs connected to the bandwidth will change. Therefore, in this step, first determine the type information of the OCP network card.
进一步的,本步骤中可以通过OCP网卡的PRSNTB[3:0]_N信号确定类型信息,也可以是通过BIOS(Basic Input Output System,基本输入输出系统)确定类型信息,还可以通过OCP网卡的状态信息确定该类型信息。可见,本步骤中确定该类型信息的方式并不唯一,在此不做具体限定。Further, in this step, the type information can be determined by the PRSNTB[3:0]_N signal of the OCP network card, or the type information can be determined by BIOS (Basic Input Output System, basic input and output system), or the state of the OCP network card info determines the type of info. It can be seen that the method for determining this type of information in this step is not unique, and is not specifically limited here.
进一步的,为了提高确定类型信息的效率,本步骤可以包括:Further, in order to improve the efficiency of determining type information, this step may include:
步骤1,获取OCP网卡的PRSNTB[3:0]_N信号;Step 1, obtain the PRSNTB[3:0]_N signal of the OCP network card;
步骤2,根据PRSNTB[3:0]_N信号确定类型信息。Step 2, determine the type information according to the PRSNTB[3:0]_N signal.
可见,本可选方案中主要是对如何获取该类型信息进行说明。本可选方案中,首先获取OCP网卡的PRSNTB[3:0]_N信号。其中,可以是BIOS获取OCP网卡的PRSNTB[3:0]_N信号,也可以是CPLD获取OCP网卡的PRSNTB[3:0]_N 信号,还可以是控制器获取OCP网卡的PRSNTB[3:0]_N信号,在此不做具体限定。然后,根据PRSNTB[3:0]_N信号确定类型信息。具体的,可以根据OCP规范表和PRSNTB[3:0]_N信号确定类型信息。It can be seen that this optional solution mainly describes how to obtain this type of information. In this optional solution, first obtain the PRSNTB[3:0]_N signal of the OCP network card. Among them, the BIOS can obtain the PRSNTB[3:0]_N signal of the OCP network card, or the CPLD can obtain the PRSNTB[3:0]_N signal of the OCP network card, or the controller can obtain the PRSNTB[3:0] of the OCP network card _N signal, which is not specifically limited here. Then, type information is determined from the PRSNTB[3:0]_N signal. Specifically, the type information can be determined according to the OCP specification table and the PRSNTB[3:0]_N signal.
S102,根据类型信息和CPU数量设定OCP网卡的工作模式;S102, setting the working mode of the OCP network card according to the type information and the number of CPUs;
在S101的基础上,本步骤旨在根据类型信息和CPU数量设定OCP网卡的工作模式。可见,本步骤旨在根据该类型信息和CPU数量设定该OCP网卡的工作模式。具体的,CPU数量可以确定该OCP网卡执行在多机模式还是单机模式。On the basis of S101, this step aims to set the working mode of the OCP network card according to the type information and the number of CPUs. It can be seen that this step aims 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 a multi-machine mode or a single-machine mode.
进一步的,为了按照CPU数量确定该OCP网卡的工作模式,本步骤可以包括:Further, in order to determine the working mode of the OCP network card according to the number of CPUs, this step may include:
当CPU数量为单个时,将OCP网卡的工作模式设定为类型信息对应的网卡类型的单CPU模式;When the number of CPUs is single, set the working mode of the OCP network card to the single CPU mode of the network card type corresponding to the type information;
当CPU数量为多个时,将OCP网卡的工作模式设定为类型信息对应的网卡类型的多CPU模式。When there are multiple CPUs, the working mode of the OCP network card is set to the multi-CPU mode of the network card type corresponding to the type information.
可见,本可选方案主要是对如何设定该工作模式进行说明。本可选方案中,当CPU数量为单个时,将OCP网卡的工作模式设定为类型信息对应的网卡类型的单CPU模式,也就是将该OCP网卡的工作模式设置为单机模式,即Single-Host。当CPU数量为多个时,将OCP网卡的工作模式设定为类型信息对应的网卡类型的多CPU模式,也就是将OCP网卡的工作模式设置为多机模式,即Multi-Host。It can be seen that this optional solution mainly describes how to set the working mode. In this optional solution, when the number of CPUs is single, set the working mode of the OCP network card to the single-CPU mode of the network card type corresponding to the type information, that is, set the working mode of the OCP network card to the single-machine mode, that is, Single- Host. When there are multiple CPUs, set the working mode of the OCP network card to the multi-CPU mode of the network card type corresponding to the type information, that is, set the working mode of the OCP network card to the multi-machine mode, ie Multi-Host.
进一步的,为了提高设定该工作模式的精细化程度,本步骤可以包括:Further, in order to improve the refinement of setting the working mode, this step may include:
当PRSNTB[3:0]_N信号为0b1101或0b0110时,将OCP网卡的工作模式设置为2x8配置模式;When the PRSNTB[3:0]_N signal is 0b1101 or 0b0110, set the working mode of the OCP network card to 2x8 configuration mode;
当PRSNTB[3:0]_N信号为0b1010或0b1001或0b0011时,将OCP网卡的工作模式设置为4x4配置模式。When the PRSNTB[3:0]_N signal is 0b1010 or 0b1001 or 0b0011, set the working mode of the OCP network card to 4x4 configuration mode.
可见,本可选方案主要是对如何设定该工作模式进行说明。本可选方案中,当PRSNTB[3:0]_N信号为0b1101或0b0110时,将OCP网卡的工作模式设置为2x8配置模式;当PRSNTB[3:0]_N信号为0b1010或0b1001或0b0011时,将OCP网卡的工作模式设置为4x4配置模式。可见,本可选方案中直接是采用PRSNTB[3:0]_N信号的具体内容,确定该OCP网卡的工作模式。It can be seen that this optional solution mainly describes how to set the working mode. In this option, when the PRSNTB[3:0]_N signal is 0b1101 or 0b0110, set the working mode of the OCP network card to 2x8 configuration mode; when the PRSNTB[3:0]_N signal is 0b1010 or 0b1001 or 0b0011, Set the working mode of the OCP network card to 4x4 configuration mode. It can be seen that in this optional solution, the specific content of the PRSNTB[3:0]_N signal is directly used to determine the working mode of the OCP network card.
进一步的,为了提高确定工作模式的准确性,本步骤可以包括:Further, in order to improve the accuracy of determining the working mode, this step may include:
步骤1,根据OCP规范表对类型信息和CPU数量匹配对应的工作模式;Step 1, match the corresponding working mode with the type information and the number of CPUs according to the OCP specification table;
步骤2,对OCP网卡设定工作模式。Step 2, set the working mode for the OCP network card.
可见,本可选方案主要是对如何设定该工作模式进行说明。本可选方案中,根据OCP规范表对类型信息和CPU数量匹配对应的工作模式;其中,OCP规范表即为表1所示的带宽列表。然后,对OCP网卡设定工作模式。It can be seen that this optional solution mainly describes how to set the working mode. In this optional solution, the type information and the number of CPUs are matched to the corresponding working mode according to the OCP specification table; wherein, the OCP specification table is the bandwidth list shown in Table 1. Then, set the working mode for the OCP network card.
进一步的,在具体的实施例过程中为了确定当前的CPU数量,可以通过CPU_ID Pin信号确定CPU数量。因此,本步骤可以包括:Further, in order to determine the current number of CPUs in the process of a specific embodiment, the number of CPUs can be determined through the CPU_ID Pin signal. Therefore, this step can include:
步骤1,获取CPU_ID Pin信号,并根据CPU_ID Pin信号确定CPU数量;Step 1, obtain the CPU_ID Pin signal, and determine the number of CPUs according to the CPU_ID Pin signal;
步骤2,根据类型信息和CPU数量设定OCP网卡的工作模式。Step 2, setting the working mode of the OCP network card according to the type information and the number of CPUs.
可见,本可选方案主要是对如何设定该工作模式进行说明。本可选方案中,获取CPU_ID Pin信号,并根据CPU_ID Pin信号确定CPU数量。其中,CPU_ID Pin信号为设置在每个CPU的连接器上的信号位。例如,存在两个CPU,分别是CPU0和CPU1。当线缆只与CPU0连接时,则获取到该CPU0对应的CPU_ID Pin信号,进而确定当前的CPU数量为单个。当线缆与多个CPU连接时,则获取到获取到两个CPU的CPU_ID Pin信号,进而确定当前的CPU数量为多个。最后,根据类型信息和CPU数量设定OCP网卡的工作模式。It can be seen that this optional solution mainly describes how to set the working mode. In this optional solution, the CPU_ID Pin signal is obtained, and the number of CPUs is determined according to the CPU_ID Pin signal. Among them, the CPU_ID Pin signal is a signal bit set on the connector of each CPU. For example, there are two CPUs, namely CPU0 and CPU1. When the cable is only connected to CPU0, the CPU_ID Pin signal corresponding to the CPU0 is obtained, and then the current number of CPUs is determined to be one. When the cable is connected to multiple CPUs, the CPU_ID Pin signals of two CPUs are obtained, and then it is determined that the current number of CPUs is multiple. Finally, set the working mode of the OCP network card according to the type information and the number of CPUs.
S103,根据工作模式对PCIe总线连接器进行控制,实现对OCP网卡的带宽进行分配;其中,PCIe总线连接器是与OCP网卡的通道进行连接的连接器。S103. Control the PCIe bus connector according to the working mode, so as to allocate the bandwidth of the OCP network card; wherein, the PCIe bus connector is a connector connected to the channel of the OCP network card.
在S102的基础上,本步骤旨在根据工作模式对PCIe总线连接器进行控制,实现对OCP网卡的带宽进行分配。其中,PCIe总线连接器是与OCP网卡的通道进行连接的连接器。也就是,PCIe总线连接器连接于OCP网卡与CPU之间,通过对该PCIe总线连接器进行控制,可以是实现不同通道的关闭和开启,进而对带宽进行分配。On the basis of S102, this step aims to control the PCIe bus connector according to the working mode, so as to realize the bandwidth allocation of the OCP network card. Wherein, the PCIe bus connector is a connector connected with the 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, different channels can be closed and opened, thereby allocating bandwidth.
进一步的,本步骤可以包括:Further, this step may include:
控制PCH根据工作模式对PCIe总线连接器进行控制,实现对OCP网卡的带宽进行分配;其中,PCIe总线连接器设置于OCP网卡与CPU之间,PCH与PCIe总线连接器连接。The control PCH controls the PCIe bus connector according to the working mode to realize the bandwidth allocation of the OCP network card; wherein, the PCIe bus connector is arranged between the OCP network card and the CPU, and the PCH is connected to the PCIe bus connector.
其中,PCH(Platform Controller Hub)为平台控制器集线器用于控制该PCIe总线连接器。进一步的,可以对每个CPU单独连接一个PCIe总线连接器。因此,该PCH可以与每个PCIe总线连接器进行连接,以便进行控制。Wherein, PCH (Platform Controller Hub) is a platform controller hub used to control the PCIe bus connector. Further, a PCIe bus connector may be connected to each CPU separately. Therefore, the PCH can interface with each PCIe bus connector for control.
综上,本实施例通过首先获取该OCP网卡的类型信息,然后在类型信息的基础上结合CPU数量,对该OCP网卡设定合适的工作模式,最后根据该工作模式对该PCIe总线连接器进行控制,实现对OCP网卡的带宽分配,而不是采用人工的方式进行带宽配置,提高OCP网卡的配置效率。In summary, the present embodiment obtains the type information of the OCP network card at first, and then combines the number of CPUs on the basis of the type information to set a suitable working mode for the OCP network card, and finally implements the PCIe bus connector according to the working mode. Control to realize the bandwidth allocation of the OCP network card, instead of using manual bandwidth configuration to improve the configuration efficiency of the OCP network card.
以下通过一个具体的实施例,对本申请提供的一种OCP网卡的带宽分配方法做进一步说明。A method for allocating bandwidth of an OCP network card provided in this application will be further described below through a specific embodiment.
本实施例中旨在提供一种能够同时支持Single-Host和Multi-Host的OCP NIC3.0带宽分配方法,且能够根据实际连接为Single-Host还是Multi-Host对OCP网卡和CPU Root Port进行PCIe带宽分配的方法。In this embodiment, the purpose is to provide a kind of OCP NIC3.0 bandwidth allocation method that can support Single-Host and Multi-Host at the same time, and can perform PCIe on OCP network card and CPU Root Port according to whether the actual connection is Single-Host or Multi-Host The method of bandwidth allocation.
下表是OCP规范里列出的SFF OCP网卡列表。通过下表可知,可以通过PRSNTB[3:0]_N信号来判断OCP网卡的型号及所支持的带宽模式,可通过配置BIF[2:0]_N信号以便配置OCP网卡的工作模式。The following table is a list of SFF OCP network cards listed in the OCP specification. It can be known from the following table that the model of the OCP network card and the supported bandwidth mode can be judged 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.
表1 OCP网卡PCIe带宽列表Table 1 OCP network card PCIe bandwidth list
Figure PCTCN2021121425-appb-000001
Figure PCTCN2021121425-appb-000001
Figure PCTCN2021121425-appb-000002
Figure PCTCN2021121425-appb-000002
在上一OCP网卡PCIe带宽列表的基础上,可以想到OCP PCIe lane0~7连接到CPU0,如果OCP PCIe lane8~15连接到CPU1,则通过硬件线路控制OCP的BIF[2:0]_N为001;如果OCP PCIe lane8~15同样连接到OCP lane0~7所接CPU0 Root Port的lane8~15,则由CPLD根据OCP的PRSNTB[3:0]_N对OCP NIC3.0卡的类型进行判断,如果是2xn应用的OCP网卡(PRSNTB[3:0]_N是0b1101、0b0110),则保持OCP的BIF[2:0]_N为001,否则控制OCP的BIF[2:0]_N为000。On the basis of the previous OCP network card PCIe bandwidth list, it can be thought that OCP PCIe lane0~7 is connected to CPU0, if OCP PCIe lane8~15 is connected to CPU1, then the BIF[2:0]_N of OCP is controlled by hardware line to 001; If OCP PCIe lanes 8~15 are also connected to lanes 8~15 of the CPU0 Root Port connected to OCP lanes 0~7, the CPLD will judge the type of the OCP NIC3.0 card according to the PRSNTB[3:0]_N of the OCP. If it is 2xn For the applied OCP network card (PRSNTB[3:0]_N is 0b1101, 0b0110), keep OCP BIF[2:0]_N as 001, otherwise control OCP BIF[2:0]_N as 000.
并且通过四个ID Pin(默认为1)连接到PCH对CPU PCIe Root Port进行Bifurcation自动配置,除0010代表整个Root Port要配置成x16外,11、10分别代表将相应的PCIe lane高八位或低八位配置为x4x4、x8。默认将OCP lane 0~7连接到的CPU0 Root Port lane0~7的ID设置为10。如果OCP_BIF[2:0]_N为001,则控制OCP lane 8~15所对应的8个lane对应的两个ID Pin为10,即配置为x8。如果OCP_BIF[2:0]_N为000,则如果OCP lane 8~15连接到上述OCP lane 0~7所连接到的CPU0 Root Port lane8~15,则将lane8~15对应的两个ID配置为00,共同组成0010组合,即配置成x16;如果OCP lane 8~15连接到CPU1,则将lane8~15 对应的两个ID配置为10,即配置为x8。And through four ID Pins (1 by default) connected to the PCH to automatically configure the CPU PCIe Root Port for Bifurcation, except 0010 means that the entire Root Port should be configured as x16, 11 and 10 respectively represent the high eight bits of the corresponding PCIe lane or The lower eight bits are configured as x4x4, x8. By default, the ID of CPU0 Root Port lane 0~7 connected to OCP lane 0~7 is set to 10. If OCP_BIF[2:0]_N is 001, control the two ID Pins corresponding to the 8 lanes corresponding to OCP lanes 8 to 15 to be 10, that is, the configuration is x8. If OCP_BIF[2:0]_N is 000, then if OCP lanes 8~15 are connected to CPU0 Root Port lanes 8~15 to which OCP lanes 0~7 are connected, configure the two IDs corresponding to lanes 8~15 as 00 , together form a combination of 0010, that is, configure it as x16; if OCP lane 8~15 is connected to CPU1, configure the two IDs corresponding to lane8~15 as 10, that is, configure it as x8.
此外,如果CPLD根据RRSNT[3:0]_N判断是4xn的OCP网卡(PRSNTB[3:0]_N是0b1010、0b1001、0b0011),则通过拉低Override_N Pin到PCH,以通知BIOS忽略ID Pin对PCIe Root Port的自动配置。需要对CPU Root Port Bifurcation进行手动配置(默认x4x4x4x4)。In addition, if the CPLD judges according to RRSNT[3:0]_N that it is a 4xn OCP network card (PRSNTB[3:0]_N is 0b1010, 0b1001, 0b0011), then by pulling down the Override_N Pin to the PCH, to notify the BIOS to ignore the ID Pin pair Automatic configuration of PCIe Root Port. CPU Root Port Bifurcation needs to be manually configured (default x4x4x4x4).
在上一OCP网卡PCIe带宽列表的基础上,请参考图2,图2为本申请实施例所提供的一种带宽分配电路的结构示意图。请参考图3,图3为本申请实施例所提供的另一种OCP网卡的带宽分配方法的流程图。On the basis of the previous OCP network card PCIe bandwidth list, please refer to FIG. 2 , which is a schematic structural diagram of a bandwidth allocation circuit provided by an embodiment of the present application. Please refer to FIG. 3 . FIG. 3 is a flow chart of another OCP network card bandwidth allocation method provided by an embodiment of the present application.
基于该电路,本实施例的方法可以包括:Based on this circuit, the method of this embodiment may include:
S201,获取OCP网卡的PRSNTB[3:0]_N信号;S201, obtain the PRSNTB[3:0]_N signal of the OCP network card;
S202,根据PRSNTB[3:0]_N信号和CPU_ID Pin信号设定OCP网卡的工作模式,即设定OCP网卡的BIF[2:0]_N信号;S202, set the operating mode of the OCP network card according to the PRSNTB[3:0]_N signal and the CPU_ID Pin signal, that is, set the BIF[2:0]_N signal of the OCP network card;
S203,根据BIF[2:0]_N信号对PCIe总线连接器的ID Pin进行控制,实现对OCP网卡的带宽进行分配;其中,PCIe总线连接器是与OCP网卡的通道进行连接的连接器。S203, control the ID Pin of the PCIe bus connector according to the BIF[2:0]_N signal, and realize the bandwidth allocation of the OCP network card; wherein, the PCIe bus connector is a connector connected to the channel of the OCP network card.
其中,ID Pin即为图2中的CPU0 RPBIF ID或CPU1 RPBIF ID。PCIe总线连接器包括OCP Slimline(微型接口)连接器、CPU0 Slimline连接器、CPU1 Slimline A以及CPU1 Slimline B。Among them, the ID Pin is the CPU0 RPBIF ID or CPU1 RPBIF ID in Figure 2. PCIe bus connectors include OCP Slimline (miniature interface) connector, CPU0 Slimline connector, CPU1 Slimline A, and CPU1 Slimline B.
其中,OCP NIC3.0的lane(通道或总线通道)0~7连接到CPU0的一个Root Port lane0~7,OCP NIC3.0的lane8~15连接到一个OCP Slimline连接器,CPU0的上述Root Port lane8~15连接到一个CPU0 Slimline连接器,CPU1的Root Port lane0~7、lane8~15分别连接到CPU1 Slimline A和CPU1 Slimline B。OCP NIC3.0的lane8~15可通过Slimline线缆连接到CPU0 Slimline、CPU1 Slimline A、CPU1 Slimline B中的任意一个。Among them, lanes (channels or bus channels) 0-7 of OCP NIC3.0 are connected to a Root Port lane 0-7 of CPU0, lanes 8-15 of OCP NIC3.0 are connected to an OCP Slimline connector, and the above-mentioned Root Port lane 8 of CPU0 ~15 is connected to a CPU0 Slimline connector, and Root Port lane0~7 and lane8~15 of CPU1 are connected to CPU1 Slimline A and CPU1 Slimline B respectively. Lanes8~15 of OCP NIC3.0 can be connected to any one of CPU0 Slimline, CPU1 Slimline A, and CPU1 Slimline B through a Slimline cable.
每个Slimline上有一个CPU_ID Pin,用于判断OCP Slimline连接到了CPU0的Slimline,还是CPU1的Slimline。OCP Slimline侧,CPU_ID Pin默认上拉为1;CPU侧,CPU0 Slimline CPU_ID为0,CPU1 Slimline CPU_ID为Floating。所以,当OCP Slimline连接到CPU0 Slimline时,CPU_ID会被拉低为0,到接CPU1 Slimline时,保持为1。There is a CPU_ID Pin on each Slimline, which is used to judge whether the OCP Slimline is connected to the Slimline of CPU0 or the Slimline of CPU1. On the OCP Slimline side, the CPU_ID Pin is pulled up to 1 by default; on the CPU side, the CPU0 Slimline CPU_ID is 0, and the CPU1 Slimline CPU_ID is Floating. Therefore, when OCP Slimline is connected to CPU0 Slimline, CPU_ID will be pulled down to 0, and when connected to CPU1 Slimline, it will remain at 1.
每个Slimline上还有两个ID Pin,CPU的Slimline如果对应CPU的 lane0~lane7,则ID Pin对应ID1、ID0;如果对应CPU的lane8~lane15,则ID Pin对应ID3、ID2。CPU Slimline的ID Pin默认上拉为1,并连接PCH,用于BIOS进行CPU Root Port带宽分配。There are two ID Pins on each Slimline. If the Slimline of the CPU corresponds to lane0~lane7 of the CPU, the ID Pin corresponds to ID1 and ID0; if it corresponds to lane8~lane15 of the CPU, the ID Pin corresponds to ID3 and ID2. The ID Pin of the CPU Slimline is pulled up to 1 by default, and connected to the PCH, which is used by the BIOS for CPU Root Port bandwidth allocation.
ID[3:0]和PCIe Root Port Bifurcation的对应关系如下表。The corresponding relationship between ID[3:0] and PCIe Root Port Bifurcation is as follows.
表2 PCIe Root Port Bifurcation ID设置表Table 2 PCIe Root Port Bifurcation ID setting table
ID3ID3 ID2ID2 ID1ID1 ID0ID0 PCIe Root Port BifurcationPCIe Root Port Bifurcation
11 11 11 11 x4x4x4x4x4x4x4x4
11 11 11 00 x4x4x8x4x4x8
11 00 11 11 x8x4x4x8x4x4
11 00 11 00 x8x8 x8x8
00 00 11 00 x16x16
由于本实施例中的CPU0lane0~7默认连接到OCP的lane0~7,故其Root Port对应的ID[1:0]被直接设置为10。OCP Slimline上的两个ID Pin低位(对应CPU侧ID2或ID0)固定为0,高位(对应CPU侧ID3或ID1)通过Logic IC B与CPU_ID相连。Logic IC B由OCP_BIF0_N进行控制:如果OCP_BIF0_N为0,则OCP Slimline上的ID Pin与CPU_ID Pin决定;如果OCP BIF0_N为1,则OCP Slimline给到CPU侧的ID组合(ID[3:2]或ID[1:0])恒定为10。Since CPU0lane0~7 in this embodiment are connected to OCP lane0~7 by default, the ID[1:0] corresponding to the Root Port is directly set to 10. The low bits of the two ID Pins on the OCP Slimline (corresponding to ID2 or ID0 on the CPU side) are fixed at 0, and the high bits (corresponding to ID3 or ID1 on the CPU side) are connected to CPU_ID through Logic IC B. Logic IC B is controlled by OCP_BIF0_N: if OCP_BIF0_N is 0, the ID Pin and CPU_ID Pin on OCP Slimline are determined; if OCP BIF0_N is 1, then OCP Slimline gives the ID combination (ID[3:2] or ID [1:0]) is always 10.
因此,OCP NIC3.0的BIF2_N、BIF1_N被直接拉低为0,BIF0_N默认上拉,并通过Logic IC A与CPLD的输出CPLD_BIF0_N相连。Logic IC A由CPU_ID Pin进行控制,如果CPU_ID为0,则Logic IC A导通,OCP_BIF0_N由CPLD_BIF0_N决定。如果CPU_ID为1,Logic IC A两端断开,OCP_BIF0_N恒定为1。Therefore, BIF2_N and BIF1_N of OCP NIC3.0 are directly pulled down to 0, 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 turned on, and OCP_BIF0_N is determined by CPLD_BIF0_N. If CPU_ID is 1, both ends of Logic IC A are disconnected, and OCP_BIF0_N is always 1.
对于CPLD来说,OCP PRSNTB[3:0]_N输入给CPLD,CPLD判断PRSNTB[3:0]_N的状态,控制CPLD_BIF0_N、CPU_RP_Override_N的输出,其中CPU_RP_Override_N连接到PCH,当CPU_RP_Override_N为0时,用于告知BIOS目前插入的卡不能依据ID Pin对PCIe Root Port Bifurcation进行自动配置,需要在BIOS Setup页面下进行手动配置。For CPLD, OCP PRSNTB[3:0]_N is input to CPLD, CPLD judges the state of PRSNTB[3:0]_N, controls the output of CPLD_BIF0_N, CPU_RP_Override_N, where CPU_RP_Override_N is connected to PCH, when CPU_RP_Override_N is 0, used for Inform the BIOS that the currently inserted card cannot automatically configure the PCIe Root Port Bifurcation based on the ID Pin, and needs to be manually configured on the BIOS Setup page.
当CPLD侦测到PRSNTB[3:0]_N是0b1101、0b0110时,由表1及OCP详细规范可知,此两种情况下OCP网卡对应2x8配置模式,故输出CPLD_BIF0_N为1,以保证无论OCP Slimline接CPU0 Slimline还是CPU1 Slimline,均可保证 OCP_BIF0_N为1,进而保证OCP Slimline用于Root Port带宽分配的ID Pin被配置成10。When the CPLD detects that PRSNTB[3:0]_N is 0b1101 or 0b0110, it can be seen from Table 1 and the OCP detailed specification that the OCP network card corresponds to the 2x8 configuration mode in these two cases, so the output CPLD_BIF0_N is 1 to ensure that regardless of the OCP Slimline Connected to CPU0 Slimline or CPU1 Slimline, both can ensure that OCP_BIF0_N is 1, and then ensure that the ID Pin used by OCP Slimline for Root Port bandwidth allocation is configured as 10.
当CPLD侦测到PRSNTB[3:0]_N是0b1010、0b1001、0b0011时,由表1及OCP详细规范可知,此三种情况下Root Port需要配置为4x4,根据上述线路无法通过ID Pin进行配置,故输出CPU_RP_Override_N(连接到PCH)为0,以告知BIOS忽略ID Pin,以BIOS Setup下手动设置为准。When the CPLD detects that PRSNTB[3:0]_N is 0b1010, 0b1001, or 0b0011, it can be seen from Table 1 and the OCP detailed specification that the Root Port needs to be configured as 4x4 in these three cases, and it cannot be configured through the ID Pin according to the above lines. , so the output CPU_RP_Override_N (connected to PCH) is 0 to tell the BIOS to ignore the ID Pin, and the manual setting under BIOS Setup shall prevail.
综上,针对支持1xn(2C+)或同时支持1xn和2xm(4C+)的OCP NIC3.0网卡,当OCP Slimline接CPU0时,OCP BIF[2:0]_N=000,OCP网卡被配置成1xn,CPU0 Root Port ID Pin为0010,配置为x16;当OCP Slimline接CPU1时,OCP BIF[2:0]_N=001,OCP网卡被配置成1xn(2C+)或2xm(4C+),CPU0 Root Port lane0~7配置为x8,CPU1 Root Port lane0~7(或lane8~15)也被配置为x8。In summary, for OCP NIC3.0 network cards that support 1xn (2C+) or both 1xn and 2xm (4C+), when OCP Slimline is connected to CPU0, OCP BIF[2:0]_N=000, the OCP network card is configured as 1xn, CPU0 Root Port ID Pin is 0010, configured as x16; when OCP Slimline is connected to CPU1, OCP BIF[2:0]_N=001, OCP network card is configured as 1xn(2C+) or 2xm(4C+), CPU0 Root Port lane0~ 7 is configured as x8, and CPU1 Root Port lane0~7 (or lane8~15) is also configured as x8.
针对需要Root Port配置为2x8的网卡,无论OCP Slimline接CPU0还是CPU1,OCP BIF[2:0]_N均为001,配置为2 x8 CPU0 Root Port ID为1010,配置为x8x8;当OCP Slimline接CPU1时,OCP BIF[2:0]_N=001,配置为2x8,分别对应CPU0 Root Port lane0~7配置为x8,CPU1 Root Port lane0~7(或lane8~15)也被配置为x8,实现自动化的带宽配置操作。For network cards that require Root Port configuration as 2x8, no matter OCP Slimline is connected to CPU0 or CPU1, OCP BIF[2:0]_N is 001, and the configuration is 2x8 CPU0. Root Port ID is 1010, and the configuration is x8x8; when OCP Slimline is connected to CPU1 When, OCP BIF[2:0]_N=001, the configuration is 2x8, corresponding to CPU0 Root Port lane0~7 is configured as x8, and CPU1 Root Port lane0~7 (or lane8~15) is also configured as x8 to realize automatic Bandwidth configuration operations.
可见,本实施例通过首先获取该OCP网卡的类型信息,然后在类型信息的基础上结合CPU数量,对该OCP网卡设定合适的工作模式,最后根据该工作模式对该PCIe总线连接器进行控制,实现对OCP网卡的带宽分配,而不是采用人工的方式进行带宽配置,提高OCP网卡的配置效率。It can be seen that in this embodiment, by first obtaining the type information of the OCP network card, and then combining the number of CPUs on the basis of the type information, an appropriate working mode is set for the OCP network card, and finally the PCIe bus connector is controlled according to the working mode , to realize the bandwidth allocation to the OCP network card, instead of manually configuring the bandwidth, and improving the configuration efficiency of the OCP network card.
下面对本申请实施例提供的带宽分配装置进行介绍,下文描述的带宽分配装置与上文描述的带宽分配方法可相互对应参照。The bandwidth allocation device provided by the embodiment of the present application is introduced below, and the bandwidth allocation device described below and the bandwidth allocation method described above may be referred to in correspondence.
请参考图4,图4为本申请实施例所提供的一种OCP网卡的带宽分配装置的结构示意图。Please refer to FIG. 4 , which is a schematic structural diagram of an OCP network card bandwidth allocation device provided by an embodiment of the present application.
类型获取模块100,用于获取OCP网卡的类型信息;Type obtaining module 100, for obtaining the type information of OCP network card;
模式设定模块200,用于根据类型信息和CPU数量设定OCP网卡的工作模式;The mode setting module 200 is used to set the operating mode of the OCP network card according to the type information and the number of CPUs;
连接器控制模块300,用于根据工作模式对PCIe总线连接器进行控制,实 现对OCP网卡的带宽进行分配;其中,PCIe总线连接器是与OCP网卡的通道进行连接的连接器。The connector control module 300 is used to control the PCIe bus connector according to the working mode, so as to realize the allocation of the bandwidth of the OCP network card; wherein, the PCIe bus connector is a connector connected with the channel of the OCP network card.
可选的,该类型获取模块100,可以包括:Optionally, the type acquisition module 100 may include:
信号获取单元,用于获取OCP网卡的PRSNTB[3:0]_N信号;A signal acquisition unit for obtaining the PRSNTB[3:0]_N signal of the OCP network card;
类型信息确定单元,用于根据PRSNTB[3:0]_N信号确定类型信息。A type information determining unit, configured to determine the type information according to the PRSNTB[3:0]_N signal.
可选的,该模式设定模块200,可以包括:Optionally, the mode setting module 200 may include:
单机模式设置单元,用于当CPU数量为单个时,将OCP网卡的工作模式设定为类型信息对应的网卡类型的单CPU模式;The stand-alone mode setting unit is used to set the operating mode of the OCP network card to the single-CPU mode of the network card type corresponding to the type information when the number of CPUs is single;
多机模式设置单元,用于当CPU数量为多个时,将OCP网卡的工作模式设定为类型信息对应的网卡类型的多CPU模式。The multi-machine mode setting unit is used for setting the working mode of the OCP network card to the multi-CPU mode of the network card type corresponding to the type information when the number of CPUs is multiple.
可选的,该模式设定模块200,可以包括:Optionally, the mode setting module 200 may include:
2路配置单元,用于当PRSNTB[3:0]_N信号为0b1101或0b0110时,将OCP网卡的工作模式设置为2x8配置模式;2-way configuration unit, used to set the working mode of the OCP network card to 2x8 configuration mode when the PRSNTB[3:0]_N signal is 0b1101 or 0b0110;
4路配置单元,用于当PRSNTB[3:0]_N信号为0b1010或0b1001或0b0011时,将OCP网卡的工作模式设置为4x4配置模式。4-way configuration unit, used to set the working mode of the OCP network card to 4x4 configuration mode when the PRSNTB[3:0]_N signal is 0b1010 or 0b1001 or 0b0011.
可选的,该模式设定模块200,可以包括:Optionally, the mode setting module 200 may include:
工作模式匹配单元,用于根据OCP规范表对类型信息和CPU数量匹配对应的工作模式;The working mode matching unit is used to match the corresponding working mode to the type information and the number of CPUs according to the OCP specification table;
模式设置单元,用于对OCP网卡设定工作模式。The mode setting unit is used for setting the working mode of the OCP network card.
可选的,该模式设定模块200,可以包括:Optionally, the mode setting module 200 may include:
CPU数量确定单元,用于获取CPU_ID Pin信号,并根据CPU_ID Pin信号确定CPU数量;CPU quantity determining unit, is used for obtaining CPU_ID Pin signal, and determines CPU quantity according to CPU_ID Pin signal;
模式设定单元,用于根据类型信息和CPU数量设定OCP网卡的工作模式。The mode setting unit is used to set the working mode of the OCP network card according to the type information and the number of CPUs.
可选的,该连接器控制模块300具体用于控制PCH根据工作模式对PCIe总线连接器进行控制,实现对OCP网卡的带宽进行分配;其中,PCIe总线连接器设置于OCP网卡与CPU之间,PCH与PCIe总线连接器连接。Optionally, the connector control module 300 is specifically used to control the PCH to control the PCIe bus connector according to the working mode, so as to realize the bandwidth allocation of the OCP network card; wherein, the PCIe bus connector is arranged between the OCP network card and the CPU, The PCH is connected to the PCIe bus connector.
本申请实施例还提供一种计算设备,包括:The embodiment of the present application also provides a computing device, including:
存储器,用于存储计算机程序;memory for storing computer programs;
处理器,用于执行所述计算机程序时实现如以上实施例所述的带宽分配 方法的步骤。The processor is configured to implement the steps of the bandwidth allocation method as described in the above embodiments when executing the computer program.
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如以上实施例所述的带宽分配方法的步骤。An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the bandwidth allocation method described in the foregoing embodiments are implemented.
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。Each embodiment in the description is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for the related part, please refer to the description of the method part.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Professionals can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the possible For interchangeability, in the above description, the composition and steps of each example have been generally described according to their functions. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be directly implemented by hardware, software modules executed by a processor, or a combination of both. Software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other Any other known storage medium.
以上对本申请所提供的一种OCP网卡的带宽分配方法、带宽分配装置、计算设备以及计算机可读存储介质进行了详细介绍。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。A bandwidth allocation method for an OCP network card, a bandwidth allocation device, a computing device, and a computer-readable storage medium provided in the present application have been introduced in detail above. In this paper, specific examples are used to illustrate the principles and implementation methods of the present application, and the descriptions of the above embodiments are only used to help understand the methods and core ideas of the present application. It should be pointed out that those skilled in the art can make some improvements and modifications to the application without departing from the principles of the application, and these improvements and modifications also fall within the protection scope of the claims of the application.

Claims (10)

  1. 一种OCP网卡的带宽分配方法,其特征在于,包括:A bandwidth allocation method of OCP network card, is characterized in that, comprises:
    获取OCP网卡的类型信息;Obtain the type information of the OCP network card;
    根据所述类型信息和CPU数量设定所述OCP网卡的工作模式;Set the working mode of the OCP network card according to the type information and the number of CPUs;
    根据所述工作模式对PCIe总线连接器进行控制,实现对所述OCP网卡的带宽进行分配;其中,所述PCIe总线连接器是与所述OCP网卡的通道进行连接的连接器。The PCIe bus connector is controlled according to the working mode to realize the bandwidth allocation of the OCP network card; wherein, the PCIe bus connector is a connector connected with a channel of the OCP network card.
  2. 根据权利要求1所述的带宽分配方法,其特征在于,根据所述类型信息和CPU数量设定所述OCP网卡的工作模式,包括:The bandwidth allocation method according to claim 1, wherein the operating mode of the OCP network card is set according to the type information and the number of CPUs, including:
    根据OCP规范表对所述类型信息和所述CPU数量匹配对应的工作模式;matching the type information and the number of CPUs to a corresponding working mode according to the OCP specification table;
    对所述OCP网卡设定所述工作模式。The working mode is set for the OCP network card.
  3. 根据权利要求1所述的带宽分配方法,其特征在于,根据所述类型信息和CPU数量设定所述OCP网卡的工作模式,包括:The bandwidth allocation method according to claim 1, wherein the operating mode of the OCP network card is set according to the type information and the number of CPUs, including:
    获取CPU_ID Pin信号,并根据所述CPU_ID Pin信号确定所述CPU数量;Obtain the CPU_ID Pin signal, and determine the number of CPUs according to the CPU_ID Pin signal;
    根据所述类型信息和所述CPU数量设定所述OCP网卡的工作模式。Set the working mode of the OCP network card according to the type information and the number of CPUs.
  4. 根据权利要求1所述的带宽分配方法,其特征在于,根据所述类型信息和CPU数量设定所述OCP网卡的工作模式,包括:The bandwidth allocation method according to claim 1, wherein the operating mode of the OCP network card is set according to the type information and the number of CPUs, including:
    当所述CPU数量为单个时,将所述OCP网卡的工作模式设定为所述类型信息对应的网卡类型的单CPU模式;When the number of CPUs is single, the operating mode of the OCP network card is set to the single CPU mode of the network card type corresponding to the type information;
    当所述CPU数量为多个时,将所述OCP网卡的工作模式设定为所述类型信息对应的网卡类型的多CPU模式。When the number of CPUs is multiple, the working mode of the OCP network card is set to the multi-CPU mode of the network card type corresponding to the type information.
  5. 根据权利要求1所述的带宽分配方法,其特征在于,获取OCP网卡的类型信息,包括:The bandwidth allocation method according to claim 1, wherein obtaining the type information of the OCP network card includes:
    获取所述OCP网卡的PRSNTB[3:0]_N信号;Obtain the PRSNTB[3:0]_N signal of the OCP network card;
    根据所述PRSNTB[3:0]_N信号确定所述类型信息。The type information is determined according to the PRSNTB[3:0]_N signal.
  6. 根据权利要求5所述的带宽分配方法,其特征在于,根据所述类型信息和CPU数量设定所述OCP网卡的工作模式,包括:The bandwidth allocation method according to claim 5, wherein, setting the operating mode of the OCP network card according to the type information and the number of CPUs includes:
    当所述PRSNTB[3:0]_N信号为0b1101或0b0110时,将所述OCP网卡的工作模式设置为2x8配置模式;When the PRSNTB[3:0]_N signal is 0b1101 or 0b0110, the operating mode of the OCP network card is set to 2x8 configuration mode;
    当所述PRSNTB[3:0]_N信号为0b1010或0b1001或0b0011时,将所述OCP网卡的工作模式设置为4x4配置模式。When the PRSNTB[3:0]_N signal is 0b1010 or 0b1001 or 0b0011, set the working mode of the OCP network card to 4x4 configuration mode.
  7. 根据权利要求1至6任一项所述的带宽分配方法,其特征在于,根据所述工作模式对PCIe总线连接器进行控制,实现对所述OCP网卡的带宽进行分配,包括:The bandwidth allocation method according to any one of claims 1 to 6, wherein the PCIe bus connector is controlled according to the operating mode to realize the allocation of the bandwidth of the OCP network card, including:
    控制PCH根据所述工作模式对所述PCIe总线连接器进行控制,实现对所述OCP网卡的带宽进行分配;其中,所述PCIe总线连接器设置于所述OCP网卡与CPU之间,所述PCH与所述PCIe总线连接器连接。Control the PCH to control the PCIe bus connector according to the working mode, so as to realize the allocation of the bandwidth of the OCP network card; wherein, the PCIe bus connector is arranged between the OCP network card and the CPU, and the PCH Connect with the PCIe bus connector.
  8. 一种OCP网卡的带宽分配装置,其特征在于,包括:A bandwidth distribution device of an OCP network card, characterized in that, comprising:
    类型获取模块,用于获取OCP网卡的类型信息;A type acquisition module is used to obtain the type information of the OCP network card;
    模式设定模块,用于根据所述类型信息和CPU数量设定所述OCP网卡的工作模式;A mode setting module, configured to set the operating mode of the OCP network card according to the type information and the number of CPUs;
    连接器控制模块,用于根据所述工作模式对PCIe总线连接器进行控制,实现对所述OCP网卡的带宽进行分配;其中,所述PCIe总线连接器是与所述OCP网卡的通道进行连接的连接器。A connector control module, configured to control the PCIe bus connector according to the operating mode, so as to allocate the bandwidth of the OCP network card; wherein, the PCIe bus connector is connected to the channel of the OCP network card Connector.
  9. 一种计算设备,其特征在于,包括:A computing device, comprising:
    存储器,用于存储计算机程序;memory for storing computer programs;
    处理器,用于执行所述计算机程序时实现如权利要求1至7任一项所述的带宽分配方法的步骤。A processor, configured to implement the steps of the bandwidth allocation method according to any one of claims 1 to 7 when executing the computer program.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的带宽分配方法的步骤。A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the bandwidth allocation method according to any one of claims 1 to 7 is implemented A step of.
PCT/CN2021/121425 2021-06-30 2021-09-28 Bandwidth allocation method for ocp network card, and related apparatus WO2023272989A1 (en)

Applications Claiming Priority (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
CN202110744377.8 2021-06-30

Publications (1)

Publication Number Publication Date
WO2023272989A1 true WO2023272989A1 (en) 2023-01-05

Family

ID=77877090

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/121425 WO2023272989A1 (en) 2021-06-30 2021-09-28 Bandwidth allocation method for ocp network card, and related apparatus

Country Status (2)

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

Families Citing this family (1)

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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901164A (en) * 2020-07-17 2020-11-06 浪潮电子信息产业股份有限公司 Adaptive control method, device, equipment and system for OCP NIC network card
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
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
CN112532430B (en) * 2020-11-13 2022-11-04 苏州浪潮智能科技有限公司 PCIe bandwidth allocation method, device and storage medium

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
CN111901164A (en) * 2020-07-17 2020-11-06 浪潮电子信息产业股份有限公司 Adaptive control method, device, equipment and system for OCP NIC network card
CN112202600A (en) * 2020-09-11 2021-01-08 苏州浪潮智能科技有限公司 Multi-node single-host and multi-host communication automatic switching device and method
CN112615739A (en) * 2020-12-10 2021-04-06 苏州浪潮智能科技有限公司 Method and system for adapting OCP3.0 network card in multi-host application environment

Also Published As

Publication number Publication date
CN113472576A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
US8711153B2 (en) Methods and apparatuses for configuring and operating graphics processing units
US7069347B1 (en) Device and method for adapting speed of a USB device based on available power
US20150347345A1 (en) Gen3 pci-express riser
CN111901164B (en) Adaptive control method, device, equipment and system of OCP NIC network card
US20140280960A1 (en) Methods and apparatus for dynamically allocating devices between multiple controllers
CN108153686B (en) Multi-interface CPU module
CN109324991A (en) A kind of hot plug device of PCIE device, method, medium and system
CN107704413A (en) A kind of reinforcement type parallel information processing platform based on VPX frameworks
CN113849045B (en) Backboard and computer equipment
WO2023272989A1 (en) Bandwidth allocation method for ocp network card, and related apparatus
CN107070548A (en) A kind of device and method for automatically adjusting QSFP+ optical module power grades
DE102021121490A1 (en) APPROXIMATE DATA BUS INVERSION TECHNOLOGY FOR LATENT-SENSITIVE APPLICATIONS
TWI616759B (en) Apparatus assigning controller and apparatus assigning method
CN112202600B (en) Multi-node single-host and multi-host communication automatic switching device and method
US10176133B2 (en) Smart device with no AP
CN104460857A (en) Peripheral component interconnect-express card and method and device for using same
CN209821699U (en) Force calculation board based on edge calculation application
CN204374865U (en) Reinforce server
CN107329863B (en) General hardware platform of measuring instrument based on COMe
CN105046638A (en) Processor system and image data processing method thereof
CN112306938B (en) Hot plug method and device for OCP card and multi-host card
CN107908581A (en) A kind of double north bridge mainboards of dual processor based on Loongson processor
CN107145213A (en) A kind of device and method being multiplexed for PCH MEdebug and USB port
CN208126383U (en) A kind of COMe module based on PowerPC T2080
CN112631979A (en) Server and method for automatically distributing PCIE signals

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21947917

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21947917

Country of ref document: EP

Kind code of ref document: A1