Method and device for realizing DCN (Data Communication Network) in-band management

By combining the paths of DCN in-band management channels and IBC channels, and using custom message processing functions, the problem of low resource allocation efficiency of DCN in-band management channels is solved, and efficient transmission and cost reduction is achieved when backplane resources are limited.

CN119520632APending Publication Date: 2025-02-25RAISECOM TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411676353.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The resource allocation efficiency of DCN in-band management channels is low, resulting in high costs and low communication efficiency, especially when backplane resources are limited.

Method used

By combining the paths of DCN in-band management channels and IBC channels, using the custom message processing function pointer and interface forwarding kernel module in the network card driver, efficient forwarding of DCN management messages is achieved, avoiding the need for independent DCN channel transmission paths.

Benefits of technology

It realizes efficient transmission of DCN management packets when the backplane resources are limited, reduces hardware costs and equipment complexity, and is suitable for resource-constrained and cost-sensitive distributed network devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520632A_ABST
    Figure CN119520632A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for realizing DCN in-band management, on one hand, by combining paths of a DCN in-band management channel and an IBC channel, an independent DCN channel transmission path is not needed any more, and backboard resources are effectively saved; and meanwhile, an extra switching chip is not needed to expand the backplane channel requirement, so that the hardware cost is reduced. Through the embodiment of the invention, the efficient transmission of the DCN management message under the condition of limited backplane resources is realized, the equipment cost and complexity are greatly reduced, and the method and the device are suitable for popularization and application in distributed network equipment with limited resources and sensitive cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to but is not limited to network architecture and communication technology, and in particular to a method and device for implementing DCN in-band management. Background Art

[0002] Data Center Network (DCN) is an efficient internal network architecture designed to connect devices and resources within a data center. Its core goal is to ensure high availability, large bandwidth, low latency, and good scalability, thereby supporting large-scale data processing and fast operation of applications. The main control board, single disk, and backplane together constitute the core architecture of DCN. The main control board is the core control unit of the device; the single disk is responsible for specific business processing, such as data packet forwarding, computing tasks or storage management, etc. The single disk usually contains a field programmable gate array (FPGA), CPU or other processing chips for performing data processing and forwarding functions; the backplane is a high-speed data channel inside the device that connects the main control board and the single disk, providing a data transmission path inside the device. There are multiple channels on the backplane, including the DCN management channel, the inter-board communication (IBC) channel, and the business channel, which are used to transmit different types of data and management information.

[0003] In distributed network equipment, DCN management messages need to be sent to the main control board for processing to complete device management in the DCN network. Currently, the main control board of the device communicates with the single disk through the backplane, which can include the following three channels: IBC channel for managing the single disk, DCN in-band management dedicated channel and service channel.

[0004] How to optimize the resource allocation of DCN in-band management channels to reduce costs and improve communication efficiency is the main challenge facing DCN technology. Summary of the invention

[0005] The present application provides a method and device for implementing DCN in-band management, which can achieve efficient transmission under limited resources while reducing costs.

[0006] The embodiment of the present application provides a method for implementing DCN in-band management, including:

[0007] The first network interface of the single disk in the first network device receives a message sent from the main control board in the device via the backplane, and parses the received message;

[0008] The first network interface determines that the received message is a data center network DCN message, and forwards the received message to the second network interface of the single disk in the first network device;

[0009] The second network interface forwards the message to the second network device via the field programmable gate array FPGA chip of the single disk in the first network device.

[0010] In an exemplary embodiment, the first network interface is an inter-board communication IBC port and a DCN port; the second network interface is a DCN port.

[0011] In an exemplary embodiment, when the FPGA chip of a single disk in the first network device receives a message from another network device, the method further includes:

[0012] The FPGA chip forwards the received message to the second network interface, the second network interface directly sends and receives the received message to the first network interface, and the first network interface forwards the message to the main control board via the backplane.

[0013] In an exemplary embodiment, the method further includes: if the first network interface determines that the received message is not a DCN message, processing the message according to relevant techniques.

[0014] In an exemplary embodiment, before the first network interface of the single disk in the first network device receives a message sent from the main control board in the first network device via the backplane, the method further includes:

[0015] A function pointer for pointing to a custom message processing function is added to the structure of the network card driver, and the function pointer is used to determine whether to forward the message received through the first network interface on the network card to the second network interface on the network card.

[0016] In an exemplary embodiment, adding a function pointer for pointing to a custom message processing function to the structure of the network card driver includes:

[0017] The function pointer rcv_func is added to the net_device structure to specify the custom message processing function. When the function pointer rcv_func is empty, the received message is processed according to the original process in the relevant technology. When the function pointer rcv_func is not empty, the custom message processing function is called to forward the message received through the first network interface to the second network interface and further send it to the second network device; wherein the net_device structure is a core structure in the Linux kernel network subsystem.

[0018] In an exemplary embodiment, it also includes: creating an interface function rc_register_if_rx, wherein the interface function rc_register_if_rx is used to register the customized message processing function to the function pointer rcv_func of the specified network interface.

[0019] In an exemplary embodiment, before the first network interface determines that the received message is a data center network DCN message, the method further includes:

[0020] When the network card receives a message, it checks whether the function pointer rcv_func is empty to determine whether to use the user-defined message processing function or to process the received message according to the original process.

[0021] In an exemplary embodiment, after adding a function pointer for pointing to a custom message processing function in the structure of the network card driver, before the first network interface of the single disk in the first network device receives a message sent from the main control board in itself via the backplane, it also includes:

[0022] An interface forwarding kernel module is created to register and implement the customized message forwarding function.

[0023] In an exemplary embodiment, the step of creating an interface forwarding kernel module includes:

[0024] When the interface forwarding kernel module is loaded, the first network interface and the second network interface are found through the probe function, and the message receiving processing function rcv_func of these network interfaces is set to realize the customized message forwarding function;

[0025] The custom message processing function _if_rcv parses the format of the received message, and if the message is a DCN message, it is forwarded to the second network interface; if the message is not a DCN message, it is processed according to the original process.

[0026] In an exemplary embodiment, it also includes:

[0027] The names of the first network interface and the second network interface are configured through the device tree and passed to the interface forwarding kernel module, so that the interface forwarding kernel module can find the corresponding network device according to the name.

[0028] The embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute any one of the above methods for implementing DCN in-band management.

[0029] An embodiment of the present application further provides a computer device, including a memory and a processor, wherein the memory stores the following instructions executable by the processor: used to execute the steps of any of the above-mentioned methods for implementing DCN in-band management.

[0030] The embodiment of the present application also provides a device for implementing DCN in-band management, comprising: a first interface module, a processing module, an FPGA chip. And a second interface module; wherein,

[0031] The first interface module is used to receive the message sent from the main control board in itself via the backplane;

[0032] A processing module, used for parsing a received message, determining that the received message is a DCN message, and forwarding the received message to the second interface module;

[0033] The second interface module is used to forward the message to other network devices via the FPGA chip.

[0034] In an exemplary embodiment, the first network interface is an inter-board communication IBC port and a DCN port; the second network interface is a DCN port.

[0035] In an exemplary embodiment, the first network interface / the second network interface is an Ethernet interface or a wireless interface.

[0036] In an exemplary embodiment, the second interface module is also used to: receive a message from the FPGA chip, and forward the received message to the first interface module; the first interface module is also used to: forward the message to the main control board via the backplane.

[0037] In an exemplary embodiment, the device for implementing DCN in-band management is arranged in a single disk of a network device.

[0038] In an exemplary instance, the first interface module and the second interface module are arranged on a network card, and a function pointer for pointing to a custom message processing function is arranged in the structure of the network card driver, and the function pointer is used to determine whether to forward the message received through the first interface module to the second interface module.

[0039] In an exemplary embodiment, the network card is created with an interface forwarding kernel module for registering and implementing the customized message forwarding function.

[0040] The method for implementing DCN in-band management message processing provided by the embodiment of the present application, on the one hand, by merging the paths of the DCN in-band management channel and the IBC channel, no independent DCN channel transmission path is required, which effectively saves backplane resources; at the same time, there is no need to use additional switching chips to expand the backplane channel requirements, reducing hardware costs. The method for implementing DCN in-band management message processing provided by the embodiment of the present application is applicable to different CPU architectures and has good scalability. At the same time, there is no need to change the underlying hardware, and only adjustments are made at the driver level, thereby retaining the compatibility of the equipment. In other words, the method for implementing DCN in-band management message processing provided by the embodiment of the present application realizes the efficient transmission of DCN management messages under the condition of limited backplane resources, greatly reduces equipment cost and complexity, and is suitable for promotion and application in resource-constrained and cost-sensitive distributed network devices.

[0041] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0043] Figure 1 A schematic diagram of implementing DCN in-band management of a dedicated channel for DCN in-band management in the related art;

[0044] Figure 2 A schematic diagram of implementing DCN in-band management using a switching chip in the related art;

[0045] Figure 3 A flowchart of a method for implementing DCN in-band management in an embodiment of the present application;

[0046] Figure 4 A schematic diagram of implementing DCN in-band management in an embodiment of the present application;

[0047] Figure 5 A schematic diagram of an embodiment flow of an interface forwarding kernel module implementing a customized message forwarding function in an embodiment of the present application;

[0048] Figure 6 This is a schematic diagram of the processing flow of the network card receiving and sending packets in the embodiment of the present application;

[0049] Figure 7The present invention is a schematic diagram of the structure of a device for implementing DCN in-band management in an embodiment of the present application. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present application more clear, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.

[0051] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0053] It is understood that the terms "first" and "second" used in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0054] It can be understood that the “connection” in the following embodiments should be understood as “electrical connection”, “communication connection”, etc. if the connected circuits, modules, units, etc. have electrical signals or data transmission between each other.

[0055] When used herein, the singular forms "a", "an", and "said / the" may also include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" and the like specify the presence of stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. At the same time, the term "and / or" used in this specification includes any and all combinations of the relevant listed items.

[0056] Figure 1The schematic diagram of the implementation of the DCN in-band management dedicated channel in the related art is shown. When the DCN in-band management dedicated channel is used for in-band management, the DCN management message is first sent to the FPGA chip of the single disk through the backplane, and then forwarded to the next network device. The scheme of using the DCN in-band management dedicated channel for in-band management in the related art relies on the FPGA chip of the single disk to directly process the forwarding of the DCN management message. The entire process communicates through an independent DCN dedicated channel, which occupies less resources. However, when the backplane resources are insufficient, the DCN in-band management dedicated channel must be merged with the IBC channel, that is, the DCN in-band management dedicated channel and the IBC channel will share the same physical transmission path, resulting in the DCN in-band management dedicated channel and the IBC channel competing for resources, which may cause conflicts between the DCN in-band management channel and the IBC channel, increasing the transmission delay and the complexity of network management, and affecting the communication efficiency of the DCN.

[0057] Figure 2 The schematic diagram of implementing DCN in-band management using a switching chip in the related art is as follows: Figure 2 As shown in the figure, when the backplane resources are insufficient and the DCN in-band management dedicated channel and IBC channel need to be merged, a switch chip can be introduced to expand the network. At this time, the DCN management message is sent from the main control card to the single disk CPU through the backplane IBC channel, and then the CPU forwards the message to the FPGA chip to realize communication with the next network device, such as Figure 2 As shown in the figure, the CPU and FPGA use the switching chip to achieve inter-port forwarding. In this DCN in-band management solution using the switching chip, the introduction of the switching chip improves the communication efficiency while also increasing the overall cost of the device.

[0058] The embodiment of the present application provides a method for implementing DCN in-band management in a distributed network device, which can achieve efficient transmission when backplane resources are limited and reduce the overall cost of the device. Figure 3 As shown, this may include:

[0059] Step 300: The first network interface of a single disk in the first network device receives a message sent from the main control board in itself via the backplane, and parses the received message.

[0060] In an exemplary embodiment, the first network interface is an IBC port and a DCN port.

[0061] Step 301: The first network interface determines that the received message is a DCN message, and forwards the received message to the second network interface of the single disk in the first network device.

[0062] In an exemplary embodiment, the second network interface is a DCN port.

[0063] Step 302: The second network interface forwards the message to the second network device via the FPGA chip of the single disk in the first network device.

[0064] In an exemplary embodiment, the first network interface / the second network interface may be, but is not limited to, an Ethernet interface, a wireless interface, etc. In an embodiment, the first network interface and the second network interface may be an Ethernet interface, such as Figure 4 The first Ethernet interface eth0 and the second Ethernet interface eth1 are shown in FIG.

[0065] In an exemplary instance, the first network interface determines that the received message is not a DCN message, for example, it is an IBC message, and it can be processed according to relevant technical methods, which generally include: after determining that it is not a DCN message, sending the message to the protocol stack, the protocol stack sends the IBC message to the corresponding socket, and then it is processed by the upper-layer software.

[0066] The method for implementing DCN in-band management provided by the embodiment of the present application, on the one hand, by merging the paths of the DCN in-band management channel and the IBC channel, no longer requires an independent DCN channel transmission path, effectively saving backplane resources; at the same time, there is no need to use additional switching chips to expand the backplane channel requirements, reducing hardware costs. The method for implementing DCN in-band management provided by the embodiment of the present application is applicable to different CPU architectures and has good scalability. At the same time, there is no need to change the underlying hardware, and only adjustments are made at the driver level, thereby retaining the compatibility of the equipment. In other words, the method for implementing DCN in-band management provided by the embodiment of the present application realizes the efficient transmission of DCN management messages under the condition of limited backplane resources, greatly reducing equipment cost and complexity, and is suitable for promotion and application in resource-constrained and cost-sensitive distributed network devices.

[0067] In one embodiment, the method for implementing DCN in-band management provided by the embodiment of the present application does not change the original network card sending process, still retains the stability of the original driver, and improves system flexibility through the newly added receiving process pointer, reusing existing hardware resources.

[0068] The method for implementing DCN in-band management provided by the embodiment of the present application may further include: when the FPGA chip of a single disk in the first network device receives a message from other network devices:

[0069] The FPGA chip of the single disk in the first network device forwards the received message to the second network interface of the single disk in the first network device. The second network interface does not need to judge the format of the received message, and directly sends it to the first network interface of the single disk in the first network device. The first network interface then forwards the message to the main control board via the backplane in the first network device.

[0070] In the embodiment of the present application, the first network interface and the second network interface are two network ports on the network card, each network port is responsible for a different data transmission path, the first network interface is connected to the main control board via the backplane, and the second network interface is connected to the FPGA chip. The code in the network card driver is responsible for controlling the receiving and sending processes of each network port, thereby realizing specific data forwarding between the first network interface and the second network interface. In an exemplary embodiment, in order to realize the forwarding of DCN in-band management messages between two network interfaces of a single disk in a distributed network device, step 300 may also include:

[0071] Modify the network card driver and add a function pointer to the custom message processing function in the structure of the network card driver. The function pointer is used to determine whether to forward the message received through the first network interface to the second network interface and further send it to the second network device.

[0072] In one embodiment, a function pointer rcv_func can be added (i.e., customized) in the net_device structure to specify a customized message processing function. When the function pointer rcv_func is empty, the system processes the received message according to the original process in the relevant technology; if the function pointer rcv_func is not empty, the customized message processing function is called to process the message, that is, the message received through the first network interface is forwarded to the second network interface and further sent to the second network device. In one embodiment, the program can be as follows:

[0073]

[0074] In an embodiment of the present application, by adding a function pointer rcv_func to the net_device structure, the network card driver can selectively use the function pointer rcv_func to process the received message, and decide whether to call a custom message processing function to process the received message based on whether the function pointer rcv_func is empty.

[0075] The net_device structure is a core structure in the Linux kernel network subsystem, representing the abstraction of a network interface (network port). It contains various information and operation methods of a network device (such as an Ethernet interface, a wireless interface, etc.). Each network interface (such as the first Ethernet interface eth0, the first wireless interface wlan0) has a corresponding net_device structure instance in the Linux kernel. Through the extended field of the net_device structure, function pointers and structures can be customized to extend functions, such as the function pointer rcv_func added in the embodiment of the present application to point to a customized receive message processing function.

[0076] In an exemplary embodiment, in order to conveniently set or register the function pointer rcv_func in the driver, the following may also be included:

[0077] Create an interface function rc_register_if_rx, which is used to register the custom message processing function to the function pointer rcv_func of the specified network interface. In this way, through the interface function rc_register_if_rx, the driver can assign the custom message processing function (such as if_rcv) to the function pointer rcv_func, thereby defining a specific custom processing method, which ensures that the value of the function pointer rcv_func can be flexibly set or changed, and provides convenience for configuring different message processing functions for different network interfaces. In one embodiment, the program can be as follows:

[0078]

[0079]

[0080] In an exemplary embodiment, it also includes:

[0081] When the network card receives a message, it checks whether the function pointer rcv_func is empty to decide whether to use a custom message processing function or to process the received message according to the original process. In this way, the driver has the ability to dynamically call the function pointer rcv_func for message processing. That is to say, in the process of the network card receiving the message, it is added to determine whether the function pointer rcv_func is empty. If the function pointer rcv_func is empty, the function pointer rcv_func is called to process the message; if the function pointer rcv_func is not empty, it is processed according to the original process. In one embodiment, the program can be as follows:

[0082]

[0083] In the embodiment of the present application, the underlying modification of the network card driver is to support the custom message processing function. That is, by adding a function pointer rcv_func and providing an interface function rc_register_if_rx, the necessary structure and interface are pre-set for the custom message forwarding processing function. The underlying modification of the network card driver itself does not implement any specific message processing logic, but only provides an extension mechanism. A mechanism for dynamically registering and calling custom processing functions is established in the network card driver, so that the network card driver can call a custom processing function, that is, the function pointer rcv_func in this article, to receive and process messages, and provide preparation for the forwarding requirements of specific messages (such as DCN messages).

[0084] In an exemplary embodiment, after modifying the network card driver and before step 300, the following may also be included:

[0085] Create an interface forwarding kernel module to register and implement custom packet forwarding functions.

[0086] In one embodiment, an interface forwarding kernel module is created to register and implement a custom message forwarding function, which may include: registering a network interface in a probe function; implementing a message processing function _if_rcv: the custom message processing function _if_rcv parses the received message format, and if the message is a DCN message, forwards it to the second network interface; if the message is not a DCN message, processes it according to the original process.

[0087] In one embodiment, registering a network interface in a probe function may include:

[0088] When the interface forwarding kernel module is loaded, the corresponding network interface (i.e., the first network interface and the second network interface) is found through the probe function, and then the message receiving processing function rcv_func of these network interfaces is set to realize the customized message forwarding function. In one embodiment, the program can be as follows:

[0089]

[0090]

[0091] This program shows: First, load the interface forwarding kernel module: When the interface forwarding kernel module (such as rc_if_fw.ko) is loaded into the kernel, the system automatically calls the module's probe function. The probe function is used in the Linux kernel to initialize the device, set the device's parameters and processing logic. Then, find the corresponding network device: The probe function will use the name of the network interface (such as Figure 4The first Ethernet interface eth0 and the second Ethernet interface eth1 in the network interface find the corresponding network device object net_device; through the dev_get_by_name function (this is a function in the Linux kernel, which is used to obtain the corresponding network device structure net_device according to the name of the network interface (such as the first Ethernet interface eth0)), the corresponding net_device structure can be obtained in the system according to the name of the network interface (such as the first Ethernet interface eth0). After that, the interface function rc_register_if_rx() is called to set the receiving processing function: after finding the net_device of the first Ethernet interface eth0 and the second Ethernet interface eth1, the interface function rc_register_if_rx() function is called to register the custom message receiving processing function (such as _if_rcv) to the function pointer rcv_func. In this way, when these network interfaces receive messages, they will check whether the function pointer rcv_func is empty. If it is not empty, the message will be processed by the custom message receiving processing function pointed to by the function pointer rcv_func, such as _if_rcv.

[0092] In this way, when the interface forwarding kernel module is loaded, the probe function will automatically find the first Ethernet interface eth0 and the second Ethernet interface eth1, and point their function pointers rcv_func to the custom received message processing function (such as _if_rcv). In this way, these network interfaces can implement custom message forwarding logic, such as forwarding qualified DCN messages from the first Ethernet interface eth0 to the second Ethernet interface eth1, or vice versa.

[0093] In one embodiment, implementing the message processing function _if_rcv may include:

[0094] The custom message processing function _if_rcv parses the received message format, and if the message is a DCN message, it is forwarded to the second network interface; if the message is not a DCN message, it is processed according to the original process. In one embodiment, the program can be as follows:

[0095]

[0096]

[0097] In the embodiment of the present application, based on the interface provided after the underlying modification of the network card driver, a kernel module rc_if_fw.ko is loaded, and the custom message processing function _if_rcv is registered as the function pointer rcv_func through the interface function rc_register_if_rx. The specific message forwarding logic is implemented in the message processing function if_rcv. When the received message meets the DCN condition, the message processing function if_rcv forwards it to another network port, otherwise it is processed according to the original process. The creation of the kernel module is the actual application of the extension mechanism in the underlying modification of the network card driver, so as to complete the specific DCN message forwarding through the custom interface. In this way, the extension capability is utilized to load the custom module and realize the specific DCN message forwarding logic.

[0098] In an exemplary embodiment, the name of the network interface can be configured through the device tree. By defining the names of the first network interface eth0 and the second network interface eth1 in the device tree node, and passing them to the interface forwarding kernel module, the interface forwarding kernel module can find the corresponding network devices according to these names. Configuring the name of the network interface through the device tree facilitates customization in different products, so that different network interface names can be specified as needed without modifying the kernel code. In one embodiment, the program can be as follows:

[0099]

[0100] The device tree is used to describe the hardware layout and device properties in Linux. By defining the network interface name in the device tree, the interface forwarding kernel module can read these properties and easily identify and bind the specified network interface. In this embodiment, the network interface names of IBC and DCN are defined through the device tree node rc_if_fw.

[0101] When the interface forwarding kernel module rc_if_fw.ko is loaded, the probe function reads the network interface names in the device tree and finds the corresponding network devices (i.e., net_device structures) based on these names.

[0102] Implement the kernel module network port receiving message processing function to determine whether the received message is a message within a specific TPID and VLAN range. If not, return to the network card for further processing; if so, obtain the network device information of another network port based on the network port name of the current message and forward the message to another network port.

[0103] Figure 5 The following is a flow chart of an embodiment of the interface forwarding kernel module implementing a customized message forwarding function in an embodiment of the present application. Figure 5 As shown, this may include:

[0104] Step 500: When the network device receives a message through the first network interface, it enters the processing process of the forwarding interface.

[0105] Step 501: Check whether the received message meets the specific TPID and VLAN ID. If it meets (ie, yes), it means that the received message needs to be forwarded specifically, and go to step 502; if it does not meet (ie, no), the received message continues to be processed according to the original process, and goes to step 504 to return to the default processing function of the network card.

[0106] In this step, TPID (Tag Protocol Identifier) ​​is a field that identifies the VLAN message, usually 0x8100, indicating that the message is an Ethernet frame with a VLAN tag. For the virtual local area network (VLAN, Virtual Local Area Network) identifier, the VLAN ID can be used to segment the network, limit the broadcast domain, and improve the flexibility of network management. A specific VLAN identifier refers to a specific VLAN ID, such as 100 or 200. To determine whether a message meets a specific TPID and VLAN identifier, it is to check whether the received message carries a specified VLAN identifier (such as TPID is 0x8100 and VLAN ID is a specific value). This judgment is used to identify specific types of messages, and only messages that meet these conditions need to perform the special forwarding processing operations in the embodiments of the present application.

[0107] Step 502: If the message meets certain conditions (such as a message in a specific TPID and VLAN range), the system will search for the second network interface (combined with Figure 4 , such as forwarding from the first Ethernet interface eth0 to the second Ethernet interface eth1 or vice versa) corresponding to the net_device device structure.

[0108] Step 503: forward the received message to the second network interface. For example, if the current message is received through the first Ethernet interface eth0, the second network interface is the second Ethernet interface eth1; for another example, if the current message is received through the second Ethernet interface eth1, the second network interface is the first Ethernet interface eth0.

[0109] Step 504: After the forwarding is completed, the data is returned to the network card for the next step of processing.

[0110] In one embodiment, if the message meets the conditions and is forwarded to the second network interface, after the forwarding function is completed, it continues to return to the receiving process of the network card, completes operations such as resource release, and prepares for the processing of the next message. If the message does not meet the forwarding conditions (such as TPID and VLAN do not meet), then returning to the network card to continue processing means that the message continues to be processed according to the original process, such as being passed to the IP layer, TCP layer, etc. in the network protocol stack, or being received by the user space application, etc.

[0111] Figure 6 FIG. 1 is a schematic diagram of a processing flow of a network card receiving and sending packets in an embodiment of the present application. Figure 6 As shown, this may include:

[0112] Step 600: When the network card of the network device receives a data packet, the processing process begins.

[0113] Step 601: Check whether the forwarding interface, i.e., the function pointer rcv_func, is registered. If the forwarding interface is not registered, it means that no special forwarding processing is required, and the normal processing flow of step 604 is entered; if the forwarding interface is registered, the forwarding interface processing flow of step 602 is entered.

[0114] Step 602: When the forwarding interface has been registered, the data packet will enter the processing logic of the forwarding interface, where the data packet will determine whether it needs to be forwarded to another network interface based on specific conditions (such as TPID and VLAN, etc.).

[0115] Step 603: Determine whether the forwarding is successful. If the forwarding is successful, end this process; if the forwarding is unsuccessful, proceed to step 604.

[0116] Step 604: If the forwarding process is not entered or the forwarding is unsuccessful, the data packet enters the normal processing process of the network card, which means that the data packet will be processed according to the default network protocol stack and may be passed to the upper layer protocol (such as the IP layer or the application layer) for further processing.

[0117] Figure 6 The processing logic of the network card when receiving a data packet in the embodiment of the present application is shown, and whether to enter the customized forwarding processing logic in the embodiment of the present application is determined by judging whether the function pointer rcv_func is empty. If the function pointer rcv_func is not registered or the forwarding fails, the data packet will enter the normal processing flow.

[0118] The method for implementing DCN in-band management provided by the embodiment of the present application is applicable to the DCN in-band management message forwarding drive between two network interfaces of a single disk in a distributed network device. When the backplane resources of the network device are insufficient, the DCN dedicated channel and the IBC channel can be used together, and the DCN management message will be sent from the main control board to the CPU of the single disk through the IBC inter-board communication channel, thereby saving backplane resources. After the message is forwarded between the two network interfaces, it is forwarded to the FPGA chip in the single disk, and then forwarded to the next network device, thereby saving backplane resources or switching chips, achieving efficient transmission when the backplane resources are limited, and greatly reducing the total cost of the equipment.

[0119] In the embodiment of the present application, various CPUs can be used, with strong scalability, high efficiency, and good software and hardware reusability. At the same time, there is no need to expand / add switching chips, which effectively reduces the total cost of the equipment.

[0120] The present application also provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute any of the above methods for implementing DCN in-band management.

[0121] The present application further provides a computer device, including a memory and a processor, wherein the memory stores the following instructions executable by the processor: used to execute the steps of any one of the above-mentioned methods for implementing DCN in-band management.

[0122] Figure 7 FIG. 1 is a schematic diagram of the structure of a device for implementing DCN in-band management in an embodiment of the present application. Figure 7 As shown, it may include: a first interface module, a processing module, an FPGA chip. And a second interface module; wherein,

[0123] The first interface module is used to receive the message sent from the main control board in itself via the backplane;

[0124] A processing module, used for parsing a received message, determining that the received message is a DCN message, and forwarding the received message to the second interface module;

[0125] The second interface module is used to forward the message to other network devices via the FPGA chip.

[0126] In an exemplary embodiment, the processing module is further configured to:

[0127] If it is determined that the received message is not a DCN message, for example, an IBC message, then the relevant technology is used for processing.

[0128] In an exemplary embodiment, the first interface module / the second interface module may be, but is not limited to, an Ethernet interface, a wireless interface, etc. In an embodiment, the first interface module and the second interface module may be an Ethernet interface, such as Figure 4 The first Ethernet interface eth0 and the second Ethernet interface eth1 are shown in FIG.

[0129] In an exemplary embodiment, the second interface module is further used to: receive a message from the FPGA chip, and forward the received message to the first interface module; the first interface module is further used to: forward the message to the main control board via the backplane.

[0130] In an exemplary embodiment, the apparatus for implementing DCN in-band management is arranged in a single disk of a network device.

[0131] In an exemplary instance, the first interface module and the second interface module are arranged on a network card, and a function pointer for pointing to a custom message processing function is provided in the structure of the network card driver. The function pointer is used to determine whether to forward the message received through the first interface module to the second interface module and further send it to other network devices.

[0132] In an exemplary embodiment, the network card creates an interface forwarding kernel module for registering and implementing a customized message forwarding function. Specifically, it may include: registering a network interface in a probe function; implementing a message processing function _if_rcv: the customized message processing function _if_rcv parses the received message format, and if the message is a DCN message, forwards it to the second network interface; if the message is not a DCN message, processes it according to the original process.

[0133] The device for implementing DCN in-band management provided by the embodiment of the present application is suitable for driving the DCN in-band management message forwarding between two network interfaces of a single disk in a distributed network device. When the backplane resources of the network device are insufficient, the DCN dedicated channel and the IBC channel can be used together, and the DCN management message will be sent from the main control board to the CPU of the single disk through the IBC inter-board communication channel, thereby saving backplane resources. After the message is forwarded between the two network interfaces, it is forwarded to the FPGA chip in the single disk, and then forwarded to the next network device, thereby saving backplane resources or switching chips, achieving efficient transmission when the backplane resources are limited, and greatly reducing the total cost of the equipment.

[0134] Although the embodiments disclosed in this application are as above, the contents described are only embodiments adopted to facilitate understanding of this application and are not intended to limit this application. Any technician in the field to which this application belongs can make any modifications and changes in the form and details of implementation without departing from the spirit and scope disclosed in this application, but the scope of patent protection of this application shall still be based on the scope defined in the attached claims.

Claims

1. A method for implementing DCN in-band management, characterized in that: include: The first network interface of the single disk in the first network device receives a message sent from the main control board in the device via the backplane, and parses the received message; The first network interface determines that the received message is a data center network DCN message, and forwards the received message to the second network interface of the single disk in the first network device; The second network interface forwards the message to the second network device via the field programmable gate array FPGA chip of the single disk in the first network device.

2. The method according to claim 1, wherein the FPGA chip of the single disk in the first network device receives a message from other network devices, further comprising: The FPGA chip forwards the received message to the second network interface, the second network interface directly sends and receives the received message to the first network interface, and the first network interface forwards the message to the main control board via the backplane.

3. The method according to claim 1 or 2, before the first network interface of the single disk in the first network device receives the message sent from the main control board in itself via the backplane, further comprising: A function pointer for pointing to a custom message processing function is added to the structure of the network card driver, and the function pointer is used to determine whether to forward the message received through the first network interface on the network card to the second network interface on the network card.

4. The method according to claim 3, wherein: A function pointer for pointing to a custom message processing function is added to the structure of the network card driver, including: The function pointer rcv_func is added to the net_device structure to specify the custom message processing function. When the function pointer rcv_func is empty, the received message is processed according to the original process in the relevant technology. When the function pointer rcv_func is not empty, the custom message processing function is called to forward the message received through the first network interface to the second network interface and further send it to the second network device; wherein the net_device structure is a core structure in the Linux kernel network subsystem.

5. The method according to claim 4, further comprising: An interface function rc_register_if_rx is created, wherein the interface function rc_register_if_rx is used to register the user-defined message processing function into the function pointer rcv_func of the specified network interface.

6. The method according to claim 5, before the first network interface determines that the received message is a data center network (DCN) message, further comprising: When the network card receives a message, it checks whether the function pointer rcv_func is empty to determine whether to use the user-defined message processing function or to process the received message according to the original process.

7. The method according to claim 3, after adding a function pointer for pointing to a custom message processing function in the structure of the network card driver, before the first network interface of the single disk in the first network device receives a message sent from the main control board in itself via the backplane, further comprising: An interface forwarding kernel module is created to register and implement the customized message forwarding function.

8. The method according to claim 7, wherein: The step of creating an interface forwarding kernel module comprises: When the interface forwarding kernel module is loaded, the first network interface and the second network interface are found through the probe function, and the message receiving processing function rcv_func of these network interfaces is set to realize the customized message forwarding function; The custom message processing function _if_rcv parses the format of the received message, and if the message is a DCN message, it is forwarded to the second network interface; if the message is not a DCN message, it is processed according to the original process.

9. The method according to claim 8, further comprising: The names of the first network interface and the second network interface are configured through the device tree and passed to the interface forwarding kernel module, so that the interface forwarding kernel module can find the corresponding network device according to the name.

10. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the method for implementing DCN in-band management according to any one of claims 1 to 9.

11. A computer device comprising a memory and a processor, wherein: The memory stores the following instructions executable by the processor: used to execute the steps of the method for implementing DCN in-band management as described in any one of claims 1 to 9.

12. A device for implementing DCN in-band management, wherein: include: A first interface module, a processing module, an FPGA chip, and a second interface module; wherein, The first interface module is used to receive the message sent from the main control board in itself via the backplane; A processing module, used for parsing a received message, determining that the received message is a DCN message, and forwarding the received message to the second interface module; The second interface module is used to forward the message to other network devices via the FPGA chip.

13. The method according to claim 12, wherein: The first network interface is an inter-board communication IBC port and a DCN port; the second network interface is a DCN port.

14. According to the device of claim 12, the second interface module is also used to: receive messages from the FPGA chip, and forward the received messages to the first interface module; the first interface module is also used to: forward the messages to the main control board via the backplane.

15. The device according to claim 12 or 14, wherein: The device for implementing DCN in-band management is arranged in a single disk of a network device.