Port isolation method, device, equipment and storage medium based on virtual channel switching
Through the port isolation method based on virtual channel switching, the problem of queue head blocking between sub-ports after switch port splitting is solved, traffic isolation and load balancing are achieved, and bandwidth and performance are improved.
Patent Information
- Application Number
- CN202410595938.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-05-14
AI Technical Summary
In the prior art, after the switch port is split into sub-ports, the traffic between the sub-ports is prone to head-of-line blocking, resulting in congestion in one sub-port and affecting the traffic of the other sub-port.
Through the port isolation method based on virtual channel switching, the division status of the source port and destination port corresponding to the incoming packet of the switch is queried, the virtual channel mapping table is determined, and the packet is sent to the corresponding virtual channel according to the congestion status of the target virtual channel. , to achieve traffic isolation between sub-ports.
It achieves traffic isolation between sub-ports, avoids head-of-line blocking problems, increases bandwidth after port splitting, reduces switching delays caused by congestion, and achieves load balancing.
Smart Images

Figure CN118540292B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of network transmission, and in particular relates to a port isolation method, device, equipment and storage medium based on virtual channel switching. Background Art
[0002] With the development of high bandwidth and low latency in data centers, the port performance of switches has been greatly doubled. Currently, the switching performance of mainstream switches has reached 400 / 800G, such as NVIDIA quantum / specturm series, Brodcom's tomahawk / trident series, etc. However, for network cards, due to the limitations of PCIe bandwidth or RDMA / ROCE performance, the bandwidth of mainstream network cards is usually only 40G / 100G / 200G. At the same time, the demand for the number of switching ports (ports) of TOR (Top of Rack) layer switches is also increasing. Therefore, it is generally necessary to split the switch port into two or more sub-ports (subports) to connect the network card to support more users and various changing scenarios.
[0003] In the related art, when a switch port is split into two subports, the traffic will affect each other, that is, congestion of one subport will affect the other subport, resulting in head-of-line blocking. Figure 1 The data center TOR layer Switch Port0 is split into two sub-ports connected to HCA0 and HCA1, which are used to connect to the user's network card HCA. Port1 is split into two sub-ports connected to HCA2 and HCA3. Because the traffic converged on one port by the two HCAs is mixed together, when the traffic in one direction is congested, the traffic in the other direction will inevitably be blocked. When the traffic sent from HCA0 to HCA2 is congested, the traffic sent from HCA1 to HCA3 will be blocked, causing its traffic to decrease or even be interrupted.
[0004] Head-of-line blocking can be divided into the following two cases. Figure 2 shows that the input port is blocked, Figure 3 The output port is blocked. In both cases, different packets are mixed in the same channel in the switch input or output port, and the packet exits subport1. _ After congestion blocking, the message will be blocked at the head of the queue and cannot be discharged. Although the exit of another message is not congested, it is blocked by the current message and cannot reach its destination port subport1_1 smoothly. Summary of the invention
[0005] The purpose of the present application is to provide a port isolation method, device, electronic device and storage medium based on virtual channel switching, aiming to achieve traffic isolation of different sub-ports and avoid message blocking.
[0006] According to a first aspect of the present application, a port isolation method based on virtual channel switching is provided, comprising:
[0007] Query the source port and the destination port corresponding to the ingress message of the switch, and read the mode enabling information of the source port and the destination port to determine the port division status of the source port and the destination port;
[0008] Determine a virtual channel mapping table to be queried according to the port division status of the source port and the destination port, wherein the virtual channel mapping table pre-stores a virtual channel mapping relationship between the source port or its subport and the destination port or its subport;
[0009] The target virtual channel is obtained by querying the virtual channel mapping table through the source port, and based on the congestion status of the target virtual channel, the ingress message is sent to the target virtual channel to be output to the destination port through the target virtual channel.
[0010] Optionally, the determining the virtual channel mapping table to be queried according to the port division status of the source port and the destination port further comprises:
[0011] When the source port and the destination port are both divided into two sub-ports, all messages of the second sub-port of the destination port are mapped to the first virtual channel through the first sub-port of the source port, all messages of the first sub-port of the destination port are mapped to the second virtual channel, all messages of the second sub-port of the destination port are mapped to the third virtual channel through the second sub-port of the source port, and all messages of the first sub-port of the destination port are mapped to the fourth virtual channel.
[0012] Optionally, the determining the virtual channel mapping table to be queried according to the port division status of the source port and the destination port further comprises:
[0013] When the source port is divided into two sub-ports and the destination port is not divided into sub-ports, the message is arbitrarily mapped to the first virtual channel or the second virtual channel through the first sub-port of the source port, and the message is arbitrarily mapped to the third virtual channel or the fourth virtual channel through the second sub-port of the source port.
[0014] Preferably, the step of determining the virtual channel mapping table to be queried according to the port division status of the source port and the destination port further comprises:
[0015] When the destination port is divided into two sub-ports and the source port is not divided into sub-ports, the message is arbitrarily mapped to the first virtual channel or the second virtual channel through the first sub-port of the destination port, and the message is arbitrarily mapped to the third virtual channel or the fourth virtual channel through the second sub-port of the destination port.
[0016] Preferably, the step of determining the virtual channel mapping table to be queried according to the port division status of the source port and the destination port further comprises:
[0017] When neither the source port nor the destination port is divided into sub-ports, the message is arbitrarily mapped to one of the multiple virtual channels.
[0018] According to a second aspect of the present application, a port isolation device based on virtual channel switching is provided, comprising:
[0019] A mode determination unit, used to query the source port and the destination port corresponding to the ingress message of the switch, read the mode enable information of the source port and the destination port, so as to determine the port division status of the source port and the destination port;
[0020] A mapping table determination unit, used to determine a virtual channel mapping table to be queried according to the port division status of the source port and the destination port, wherein the virtual channel mapping table pre-stores a virtual channel mapping relationship between the source port or its subport and the destination port or its subport;
[0021] The sending unit is used to query the virtual channel mapping table through the source port to obtain a target virtual channel, and based on the congestion state of the target virtual channel, send the ingress message to the target virtual channel to output to the destination port through the target virtual channel.
[0022] Another aspect of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores a plurality of instructions, and the processor is used to read the instructions and execute the aforementioned port isolation method based on virtual channel switching.
[0023] Another aspect of the present invention provides a storage medium, wherein the storage medium stores a plurality of instructions, and the plurality of instructions can be read by a processor to execute the aforementioned port isolation method based on virtual channel switching.
[0024] Compared with the related art, the technical solution of this application has the following advantages:
[0025] Different mapping tables are configured according to different scenarios to achieve different application scenario requirements through flexible mapping methods. Traffic isolation is achieved after the main port is split into sub-port applications, so that the Switch can expand more ports for mainstream applications in the market. The bandwidth after port splitting is significantly improved, the head resistance problem between sub-ports is solved, the switching delay caused by congestion is reduced, and load balancing is achieved. The Switch internally solves the problem through negotiation of virtual channels, which does not involve changes to the Ethernet or Infiniband protocol used by the Switch, and does not involve interactions between upstream and downstream users, making it easy to use. The networking method is more flexible, and the split mode can be used for both TOR upper and lower connections to adapt to various and changing networking needs of the data center, improve performance and save costs.
[0026] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained through the structures and processes indicated in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. It is obvious that the drawings described below are certain embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0028] Figure 1 It is a schematic diagram of the port splitting principle according to the relevant technology.
[0029] Figure 2 is a schematic diagram of input port blocking according to the related art.
[0030] Figure 3 2 is a schematic diagram of output port blocking according to the related art.
[0031] Figure 4 It is a flow chart of a port isolation method based on virtual channel switching according to the present application.
[0032] Figure 5-Figure 8 It is a flow chart of an optional embodiment of a process for determining a virtual channel mapping table to be queried according to the present application.
[0033] Fig. 9 This is a split mode port isolation flow chart according to the present application.
[0034] Fig.10 This is a schematic diagram of traffic isolation and forwarding in split mode according to the present application.
[0035] Figure 11-13 It is a schematic diagram of different networking modes of switches in different split modes according to the present application. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution 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 are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0037] The traditional solution realizes arbitrary mapping of input traffic to virtual channels, and cannot realize traffic isolation of subports. Based on the above analysis, the present application proposes a port isolation method, device, electronic device and storage medium based on virtual channel switching. By defining a new port isolation mode (hereinafter referred to as split mode), each port of the Switch adopts independent register and table configuration to perform different mapping configurations. Users perform different configurations according to different usage scenarios of the product to adapt to the flexible and changeable scenarios of data center networking. Multiple independent virtual channels VC are defined inside the Switch. When the configuration is enabled, the port is split into two subports, so that the two subports after the split are completely isolated in the internal exchange of the Switch and will not affect each other, thereby realizing that the two external physical ports are completely independent, the exchange traffic between VCs does not interfere with each other, and is exchanged independently, realizing traffic isolation between subports. According to the split mode configuration enablement of the source port and the destination port of the Switch, for the subport input traffic, different mapping tables are queried according to the virtual user service priority VL, so as to map to different internal switching virtual channels VC, and the mapping of the subport input traffic VL to VC can be flexibly configured.
[0038] For example, see Figure 4 The flow chart of the present invention is as follows. The port isolation method based on virtual channel switching provided in the embodiment of the present application includes:
[0039] Step 101: query the source port and the destination port corresponding to the ingress message of the switch, read the mode enabling information of the source port and the destination port to determine the port division status of the source port and the destination port.
[0040] The program flow chart is as follows Figure 6 First, add the split register mode configuration for each port, and send the configuration through software so that each port can obtain the split mode configuration of the opposite port.
[0041] The subport ingress message queries the destination port, and queries the corresponding mapping table according to whether the source port and the destination port are configured in split mode, so as to map them to independent VC switching channels. The specific mapping scheme is as follows. Different mapping tables can be flexibly configured according to different scenarios.
[0042] Step 102: Determine a virtual channel mapping table to be queried according to the port division status of the source port and the destination port, wherein the virtual channel mapping table pre-stores a virtual channel mapping relationship between the source port or its subport and the destination port or its subport.
[0043] Specifically, see Figure 5-Figure 8 , depending on whether the source port and the destination port are divided into two sub-ports respectively, there are four ways to determine the virtual channel mapping table to be queried:
[0044] Case 121: When the source port and the destination port are both divided into two sub-ports, all messages of the second sub-port of the destination port are mapped to the first virtual channel through the first sub-port of the source port, and all messages of the first sub-port of the destination port are mapped to the second virtual channel, all messages of the second sub-port of the destination port are mapped to the third virtual channel through the second sub-port of the source port, and all messages of the first sub-port of the destination port are mapped to the fourth virtual channel.
[0045] A specific example is described as follows: when the number of subports in split mode is 2, subport input traffic VL->VC mapping is flexibly configurable, and is generally divided into four cases, corresponding to four different mapping configuration methods.
[0046] That is, when the split mode of the source port and the destination port are both enabled, the destination even-numbered port ( Fig.10 In the example, all VLs of the destination subport 0 are mapped to VC0, and all VLs of the destination odd-numbered ports are mapped to VC1 ( Fig.10 In the example, the destination is subport1). All VLs of the destination even port (destination subport0) are mapped to VC2 through source subport1, and all VLs of the destination odd port are mapped to VC3 (destination subport1), forming query mapping table 1.
[0047] Case 122: When the source port is divided into two sub-ports and the destination port is not divided into sub-ports, the message is arbitrarily mapped to the first virtual channel or the second virtual channel through the first sub-port of the source port, and the message is arbitrarily mapped to the third virtual channel or the fourth virtual channel through the second sub-port of the source port.
[0048] That is, when the source port split mode is enabled and the destination port split mode is disabled, the VL is arbitrarily mapped to VC0 or VC1 through the source subport0, and the VL is arbitrarily mapped to VC2 or VC3 through the source subport1, forming the query mapping table 2.
[0049] Case 123: When the destination port is divided into two sub-ports and the source port is not divided into sub-ports, the message is arbitrarily mapped to the first virtual channel or the second virtual channel through the first sub-port of the destination port, and the message is arbitrarily mapped to the third virtual channel or the fourth virtual channel through the second sub-port of the destination port.
[0050] That is, when the source port split mode is disabled and the destination port split mode is enabled, the VL is arbitrarily mapped to VC0 / VC2 through the destination even port, and the VL is arbitrarily mapped to VC1 / VC3 through the destination odd port, forming query mapping table 3.
[0051] Case 124: When neither the source port nor the destination port is divided into sub-ports, the message is arbitrarily mapped to one of the multiple virtual channels.
[0052] That is, when the split mode of the source port and the destination port is not enabled, VL is arbitrarily mapped to VC0-3 to form query mapping table 4.
[0053] Step 103: query the virtual channel mapping table through the source port to obtain a target virtual channel, and based on the congestion status of the target virtual channel, send the ingress message to the target virtual channel to output to the destination port through the target virtual channel.
[0054] Fig.10 An example of traffic isolation forwarding is shown. First, enable the split mode for the source port Port0 and the destination port Port1 respectively. The mapping table is configured through software, that is, the above-mentioned configuration method of enabling the split mode of the source port and the destination port at the same time is adopted. Four independent VC virtual channels are set up inside the Switch for independent switching. In this example, subport1_0 is a congested port, and subport1_1 is a lightly loaded port. An independent mapping table is configured for each source port. For each message input by the source port, the destination port field destport carried in the message header is used to query the VL->VC mapping table.
[0055] The embodiment of the present application maps the message sent from subport0_0 to the congested port subport1_0 to VC0, the message sent from subport0_1 to the congested port subport1_0 to VC2, the message sent from subport0_0 to the lightly loaded port subport1_1 to VC1, and the message sent from subport0_1 to the lightly loaded port subport1_1 to VC3. After the query is completed, the ingress message will enter different VC channels for switching.
[0056] Since VC1 and VC3 are switched independently, even if VC0 and VC2 are congested, packets 1 and 3 destined for subport1_1 can be switched independently to the destination port and will not be blocked by packets 2 and 0.
[0057] The load balancing arbitration module first counts the cumulative number of path messages of each VC channel in real time, that is, the congestion situation, and dynamically switches to select the mapping of VL to VC. This allows the ingress message to be exchanged to the egress as quickly as possible, thereby improving performance. At the same time, an enable switch is added. Only when the number of VCs is greater than the number of VLs, that is, when a VL can choose to map multiple VCs, the load balancing mode is turned on, further improving the switching performance after the port is split.
[0058] When the VC channel number obtained by table lookup is a channel with a higher load, that is, when a large number of path messages are accumulated, dynamic switching can be selected to map to another VC channel with a lower load.
[0059] The specific statistical process is as follows:
[0060] When a message enters the VC queue, update VC_Qlen[x]=VC_Qlen[x]+PKT_len;
[0061] When a VC queue sends a message, update VC_Qlen[x]=VC_Qlen[x]-PKT_len;
[0062] [x] represents the VC number, VC_Qlen is the VC virtual channel queue length, and PKT_len is the packet length.
[0063] The specific process of the arbitration stage includes:
[0064] (1) Use the destination port of the current message to query the VC channel number of the current message.
[0065] (2) Use the current VC channel number to enter the load balancing module arbitration
[0066] (3) Perform load balancing comparison among all VCs that can be mapped to the destination port of the current message and select the VC channel number with the smallest load.
[0067] (4) Use the updated VC channel number to send it to the subsequent switching queue for enqueuing.
[0068] Through the above process, the packets of different subports enter different VC virtual channels of the switch. Since the VC channels can be exchanged to the destination port without affecting each other, when the traffic of a VC channel is congested, that is, when the traffic of a subport is congested, it will not affect other subports, and the port separation of the split mode can be realized. From the user's perspective, two independent ports that do not affect each other can be obtained, which improves the switching performance of the data center and reduces latency.
[0069] Take a 4-port switch as an example. When all ports are not in split mode, you can do the following: Fig.11 The interconnection shown in the figure. H represents a HCA network card connected to the user side of the switch. S represents the port of the switch connected to another switch. 0-3 is the number of the HCA network card or switch. When all ports are enabled in split mode, the following can be performed: Fig.12 As shown in the figure. Fig.13 As shown in the figure, when some ports enable split mode, the following operations can be performed: Fig.13 The interconnection shown. The port split mode of the present application can make the networking mode of the switch more flexible, adapt to the various changing networking needs of the data center, increase the external connection ports of the switch, expand the connection scale, and enable the data center to achieve more flexible interconnection. Since the split ports do not affect each other, after the split mode is enabled, the performance of the HCA network card connected to it or the switch port on the opposite end will not be affected, thereby improving the performance of the switch, enhancing product competitiveness, and supporting product forms that meet the needs of various users.
[0070] It can be seen that the port isolation method based on virtual channel switching proposed in the embodiment of the present application has the following advantages compared with the related art:
[0071] Different mapping tables are configured according to different scenarios to achieve different application scenario requirements through flexible mapping methods. Traffic isolation is achieved after the main port is split into sub-port applications, so that the Switch can expand more ports for mainstream applications in the market. The bandwidth after port splitting is significantly improved, the head resistance problem between sub-ports is solved, the switching delay caused by congestion is reduced, and load balancing is achieved. The Switch internally solves the problem through negotiation of virtual channels, which does not involve changes to the Ethernet or Infiniband protocol used by the Switch, and does not involve interactions between upstream and downstream users, making it easy to use. The networking method is more flexible, and the split mode can be used for both TOR upper and lower connections to adapt to various and changing networking needs of the data center, improve performance and save costs.
[0072] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method steps. It is understandable that, in order to realize the above functions, the computer includes a hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the modules and algorithm steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of a combination of hardware and computer software. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0073] The embodiment of the present application can divide the computer into functional modules according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0074] In the case of dividing each functional module according to each function, a port isolation device based on virtual channel switching in an embodiment of the present application includes:
[0075] A mode determination unit, used to query the source port and the destination port corresponding to the ingress message of the switch, read the mode enable information of the source port and the destination port, so as to determine the port division status of the source port and the destination port;
[0076] A mapping table determination unit, used to determine a virtual channel mapping table to be queried according to the port division status of the source port and the destination port, wherein the virtual channel mapping table pre-stores a virtual channel mapping relationship between the source port or its subport and the destination port or its subport;
[0077] The sending unit is used to query the virtual channel mapping table through the source port to obtain a target virtual channel, and based on the congestion state of the target virtual channel, send the ingress message to the target virtual channel to output to the destination port through the target virtual channel.
[0078] The above-mentioned device can be implemented by the port isolation method based on virtual channel switching provided by the embodiment of the first aspect above. The specific implementation method can refer to the description in the embodiment of the first aspect, which will not be repeated here.
[0079] The embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to call the computer program so that the electronic device executes Figures 4 to 6 The port isolation method based on virtual channel switching
[0080] The present application also provides a computer storage medium, wherein the storage medium stores a computer program or instruction, and when the computer program or instruction is executed by a computer, Figures 4 to 6 A port isolation method based on virtual channel switching.
[0081] It should be understood that each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0082] It should also be understood that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (digitalsignal processor, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media in the field. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0083] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0084] The terms "unit", "module", etc. used in this specification can be used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. In this application, "unit" and "module" can be used interchangeably.
[0085] In the above embodiments, the functions of each functional unit can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0086] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0087] Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that he or she may still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A port isolation method based on virtual channel switching, characterized in that: include: Query the source port and the destination port corresponding to the ingress message of the switch, and read the mode enabling information of the source port and the destination port to determine the port division status of the source port and the destination port; The port division status includes the source port and the destination port are respectively divided into two sub-ports, the source port is divided into two sub-ports and the destination port is not divided into sub-ports, the destination port is divided into two sub-ports and the source port is not divided into sub-ports, and the source port and the destination port are not divided into sub-ports; Determine a virtual channel mapping table to be queried according to the port division status of the source port and the destination port, wherein the virtual channel mapping table pre-stores a virtual channel mapping relationship between the source port or its subport and the destination port or its subport; The target virtual channel is obtained by querying the virtual channel mapping table through the source port, and based on the congestion status of the target virtual channel, the ingress message is sent to the target virtual channel to be output to the destination port through the target virtual channel.
2. The port isolation method based on virtual channel switching according to claim 1 is characterized in that: The step of determining the virtual channel mapping table to be queried according to the port division status of the source port and the destination port further comprises: When the source port and the destination port are both divided into two sub-ports, all messages of the second sub-port of the destination port are mapped to the first virtual channel through the first sub-port of the source port, all messages of the first sub-port of the destination port are mapped to the second virtual channel, all messages of the second sub-port of the destination port are mapped to the third virtual channel through the second sub-port of the source port, and all messages of the first sub-port of the destination port are mapped to the fourth virtual channel.
3. The port isolation method based on virtual channel switching according to claim 1 is characterized in that: The step of determining the virtual channel mapping table to be queried according to the port division status of the source port and the destination port further comprises: When the source port is divided into two sub-ports and the destination port is not divided into sub-ports, the message is arbitrarily mapped to the first virtual channel or the second virtual channel through the first sub-port of the source port, and the message is arbitrarily mapped to the third virtual channel or the fourth virtual channel through the second sub-port of the source port.
4. The port isolation method based on virtual channel switching according to claim 1 is characterized in that: The step of determining the virtual channel mapping table to be queried according to the port division status of the source port and the destination port further comprises: When the destination port is divided into two sub-ports and the source port is not divided into sub-ports, the message is arbitrarily mapped to the first virtual channel or the second virtual channel through the first sub-port of the destination port, and the message is arbitrarily mapped to the third virtual channel or the fourth virtual channel through the second sub-port of the destination port.
5. The port isolation method based on virtual channel switching according to claim 1 is characterized in that: The step of determining the virtual channel mapping table to be queried according to the port division status of the source port and the destination port further comprises: When neither the source port nor the destination port is divided into sub-ports, the message is arbitrarily mapped to one of the multiple virtual channels.
6. A port isolation device based on virtual channel switching, characterized in that: include: A mode determination unit, used to query the source port and the destination port corresponding to the ingress message of the switch, read the mode enable information of the source port and the destination port, so as to determine the port division status of the source port and the destination port; The port division status includes the source port and the destination port are respectively divided into two sub-ports, the source port is divided into two sub-ports and the destination port is not divided into sub-ports, the destination port is divided into two sub-ports and the source port is not divided into sub-ports, and the source port and the destination port are not divided into sub-ports; A mapping table determination unit, used to determine a virtual channel mapping table to be queried according to the port division status of the source port and the destination port, wherein the virtual channel mapping table pre-stores a virtual channel mapping relationship between the source port or its subport and the destination port or its subport; The sending unit is used to query the virtual channel mapping table through the source port to obtain a target virtual channel, and based on the congestion state of the target virtual channel, send the ingress message to the target virtual channel to output to the destination port through the target virtual channel.
7. The port isolation device based on virtual channel switching according to claim 6, characterized in that: The mapping table determination unit is further used to: When the source port and the destination port are both divided into two sub-ports, all messages of the second sub-port of the destination port are mapped to the first virtual channel through the first sub-port of the source port, all messages of the first sub-port of the destination port are mapped to the second virtual channel, all messages of the second sub-port of the destination port are mapped to the third virtual channel through the second sub-port of the source port, and all messages of the first sub-port of the destination port are mapped to the fourth virtual channel.
8. The port isolation device based on virtual channel switching according to claim 6, characterized in that: The mapping table determination unit is further used to: When the source port is divided into two sub-ports and the destination port is not divided into sub-ports, the message is arbitrarily mapped to the first virtual channel or the second virtual channel through the first sub-port of the source port, and the message is arbitrarily mapped to the third virtual channel or the fourth virtual channel through the second sub-port of the source port.
9. The port isolation device based on virtual channel switching according to claim 6, characterized in that: The mapping table determination unit is further used to: When the destination port is divided into two sub-ports and the source port is not divided into sub-ports, the message is arbitrarily mapped to the first virtual channel or the second virtual channel through the first sub-port of the destination port, and the message is arbitrarily mapped to the third virtual channel or the fourth virtual channel through the second sub-port of the destination port.
10. The port isolation device based on virtual channel switching according to claim 6, characterized in that: The mapping table determination unit is further used to: When neither the source port nor the destination port is divided into sub-ports, the message is arbitrarily mapped to one of the multiple virtual channels.
11. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used to call the computer program so that the electronic device executes the port isolation method based on virtual channel switching as described in any one of claims 1 to 5.
12. A computer storage medium, characterized in that: The storage medium stores a computer program or instruction. When the computer program or instruction is executed by a computer, the port isolation method based on virtual channel switching as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method for performing flow control on FCoE port by utilizing fiber channel port flow control information
CN103888365A
Method for transmitting message through network-on-chip route and network-on-chip route
CN105721355A