Data processing method, device and equipment applied to switch and medium

CN122601616APending Publication Date: 2026-08-18HEFEI SISI NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610882823.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-17
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0003]目前,现有FC交换机要实现zone功能需要借助额外三态内容可寻址存储器(Ternary Content-Addressable Memory,TCAM)进行查表,会需要额外的硬件资源

Benefits of technology

[0015] This embodiment of the present disclosure receives partition configuration data from the switch, generates a partition configuration table representing the association between source port identifiers and member port identifiers, writes the partition configuration table into the storage space configured in the processing chip of the switch, and when forwarding data is received, extracts the target source port identifier and target member port identifier that match the forwarding data based on the partition configuration table, and forwards the forwarding data to the second interaction port corresponding to the target member port identifier. This can realize the partitioning function based on the on-chip RAM resources of the FPGA, reduce hardware resource consumption, and improve the accuracy and reliability of the switch data forwarding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122601616A_ABST
    Figure CN122601616A_ABST
Patent Text Reader

Abstract

This disclosure relates to a data processing method, apparatus, device, and medium applied to a switch, belonging to the technical field of switches. The method includes: receiving partition configuration data from the switch; generating a partition configuration table representing the association between source port identifiers and member port identifiers based on the partition configuration data; writing the partition configuration table into a storage space configured in the processing chip of the switch; upon receiving forwarded data output from a first interactive port of the switch, extracting a target source port identifier and a target member port identifier matching the forwarded data based on the partition configuration table; and forwarding the forwarded data to a second interactive port corresponding to the target member port identifier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the technical field of switches, and more specifically, to data processing methods, apparatus, devices, and media applied to switches. Background Technology

[0002] In Fibre Channel (FC) networks, a Zone is a core concept. In a large SAN switching network, an FC Zone controls whether an Initiator and Target are allowed to establish a SCSI session, implementing logical isolation and access control mechanisms within the FC SAN network. Essentially, an FC Zone can be understood as a set of FC ports that are allowed to communicate with each other. It logically divides the devices (hosts and storage) connected to the SAN network into different areas, preventing devices in different areas from directly accessing each other through the FC network, thus achieving isolation between devices in the network.

[0003] Currently, existing FC switches require additional ternary content-addressable memory (TCAM) for table lookups to implement zone functionality, which necessitates additional hardware resources. Summary of the Invention

[0004] One objective of this disclosure is to provide a technical solution for data processing applied to a switch, so as to realize data forwarding through the built-in storage space of the switch and reduce hardware resource consumption.

[0005] According to a first aspect of this disclosure, a data processing method for a switch is provided, the method comprising: Receive partition configuration data from the switch; Based on the partition configuration data, generate a partition configuration table representing the association between source port identifiers and member port identifiers; Write the partition configuration table to the storage space configured in the switch's processing chip; Upon receiving forwarded data output from the first interactive port of the switch, the target source port identifier and target member port identifier that match the forwarded data are extracted based on the partition configuration table. Forward the data to the second interaction port corresponding to the target member port identifier.

[0006] Optionally, the partition configuration table includes a first set number of configuration items, and the number of member port identifiers in each configuration item is less than or equal to a second set number; the storage space includes a third set number of storage partitions, and the storage partitions include source port partitions and multiple member port partitions. The source port partitions are used to store the source port identifiers in each configuration item, and the target member port partitions are used to store the member port identifiers in each configuration item corresponding to the target storage location; wherein, the member port partitions include the target member port partitions.

[0007] Optionally, multiple member port partitions are configured as a fourth set number, and each member port partition stores member port identifiers within a fifth set number. The product of the fourth set number and the fifth set number is equal to the product of the second set number and the number of configuration items in the partition configuration table.

[0008] Optionally, the partition configuration table is written to the storage space configured in the switch's processing chip, including: For the target member port partition in the storage space, the member port identifier corresponding to the target storage location in each configuration item in the partition configuration table is written to the target member port partition through the target true dual port configured for the target member port partition on the switch.

[0009] Optionally, before extracting the target source port identifier and target member port identifier that match the forwarding data based on the partition configuration table, the method further includes: Generate an index identifier for each configuration item based on the configuration items in the partition configuration table; Output the index identifier to the switch's data processor; Based on the partition configuration table, extract the target source port identifier and target member port identifier that match the forwarded data, including: Using the index identifier in the data processor, the target source port identifier and target member port identifier that match the forwarded data are extracted from the partition configuration table in the storage space.

[0010] Optionally, the data processor that outputs the index identifier to the switch includes: When the storage space is in a stable state of use, based on the system clock domain configured by the switch, the partition configuration table in the storage space is read in the configuration order set by each configuration item in the partition configuration table and then spliced ​​to obtain the spliced ​​configuration table. Output the splicing configuration table to the switch's data processor.

[0011] Optionally, the forwarding data includes a forwarding port identifier and a forwarding packet; using the index identifier in the data processor, the target source port identifier and target member port identifier matching the forwarding data are extracted from the partition configuration table in the storage space, including: By using the index identifier in the data processor, it is determined in the partition configuration table of the storage space whether the forwarding port identifier corresponds to the target source port identifier and the target member port identifier; If the forwarding port identifier corresponds to both the target source port identifier and the target member port identifier, set all interactive ports on the switch to the interactive state; or, If the forwarding port identifier does not correspond to the target source port identifier and the target member port identifier, set all interactive ports of the switch to a disabled interactive state.

[0012] According to a second aspect of this disclosure, a data processing apparatus for a switch is also provided, the apparatus comprising: The receiving module is used to receive the switch's partition configuration data; The generation module is used to generate a partition configuration table representing the association between source port identifiers and member port identifiers based on the partition configuration data; The write module is used to write the partition configuration table to the storage space configured in the switch's processing chip; The extraction module is used to extract the target source port identifier and target member port identifier that match the forwarded data based on the partition configuration table when forwarded data is received from the first interactive port of the switch. The forwarding module is used to forward forwarded data to the second interaction port corresponding to the target member port identifier.

[0013] According to a third aspect of the present disclosure, an electronic device is also provided, including a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the method described according to the first aspect of the present disclosure.

[0014] According to a fourth aspect of the present disclosure, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the method described according to the first aspect of the present disclosure.

[0015] This embodiment of the present disclosure receives partition configuration data from the switch, generates a partition configuration table representing the association between source port identifiers and member port identifiers, writes the partition configuration table into the storage space configured in the processing chip of the switch, and when forwarding data is received, extracts the target source port identifier and target member port identifier that match the forwarding data based on the partition configuration table, and forwards the forwarding data to the second interaction port corresponding to the target member port identifier. This can realize the partitioning function based on the on-chip RAM resources of the FPGA, reduce hardware resource consumption, and improve the accuracy and reliability of the switch data forwarding.

[0016] Other features and advantages of the embodiments of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the disclosure.

[0018] Figure 1 This is a schematic diagram of an application scenario for a switch to which the methods of the embodiments of this disclosure can be applied.

[0019] Figure 2 This is a flowchart illustrating a data processing method applied to a switch according to some embodiments.

[0020] Figure 3 This is a schematic diagram of the storage space structure according to some embodiments.

[0021] Figure 4 This is a schematic diagram illustrating the system clock domain according to some embodiments.

[0022] Figure 5 This is a block schematic diagram of an electronic device according to one embodiment. Detailed Implementation

[0023] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.

[0024] The following description of at least one exemplary embodiment is merely illustrative and is not intended to limit the scope of this disclosure or its application or use.

[0025] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0026] In all the examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.

[0027] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0028] It should be noted that all data acquisition actions in this disclosure were carried out in compliance with the relevant data protection laws and policies of the country where the data is located, and with the authorization of the relevant equipment owner.

[0029] This disclosure relates to a data processing scheme for use in switches. Figure 1 This is a schematic diagram of an application scenario for a switch, in which the data processing method for a switch, as described in the embodiments of this disclosure, can be applied. For example... Figure 1 As shown, this application scenario includes transmitting devices a1-an, switch 100, and receiving devices b1-bn. Transmitting devices a1-an can be servers or storage devices, without limitation. Receiving devices b1-bn can also be servers or storage devices, without limitation. Here, n is a positive integer greater than 1.

[0030] The aforementioned transmitting devices a1-an communicate with switch 100 through corresponding interactive ports configured in switch 100, and the aforementioned receiving devices b1-bn communicate with switch 100 through corresponding interactive ports configured in switch 100. Switch 100 includes a processing chip and a data processor. The storage space configured in the processing chip can store a partition configuration table representing the association between source port identifiers and member port identifiers. The data processor can, based on the partition configuration table and the forwarding data output by transmitting device ax, decide which forwarding packets in the forwarding data to output to receiving device by.

[0031] exist Figure 1 In the application scenario shown, switch 100 uses an additional ternary content-addressable memory (TCAM) for table lookups, which requires additional hardware resources for switch 100.

[0032] To this end, this embodiment of the present disclosure receives partition configuration data from the switch, generates a partition configuration table representing the association between source port identifiers and member port identifiers, writes the partition configuration table into the storage space configured in the processing chip of the switch, and when forwarding data is received, extracts the target source port identifier and target member port identifier that match the forwarding data based on the partition configuration table, and forwards the forwarding data to the second interaction port corresponding to the target member port identifier. This can realize the partitioning function based on the on-chip RAM resources of the FPGA, reduce hardware resource consumption, and improve the accuracy and reliability of the switch data forwarding.

[0033] The following combination Figure 1 The system / application scenarios described herein illustrate various embodiments of this disclosure.

[0034] <First Embodiment> Figure 2 This is a flowchart illustrating a data processing method applied to a switch according to some embodiments. For example, Figure 1 100 medium-sized switches. (e.g., [unclear text - possibly a typo]) Figure 2 As shown, the data processing method applied to the switch in this embodiment may include the following steps S210 to S250.

[0035] Step S210: Receive the partition configuration data of the switch.

[0036] In this embodiment, partition configuration data refers to the zone rule data configured by the user for the switch. This partition configuration data may include information such as zoneset configuration, zone configuration, and zone member configuration. When the user needs to activate a new zone rule, a zoneset active command will be issued, triggering the reception of new partition configuration data.

[0037] Partition configuration data is used to define which ports in an FC network are allowed to communicate with each other and which are not allowed to communicate with each other. By receiving partition configuration data, the switch can obtain user-defined access control policies, providing a data foundation for the subsequent generation of partition configuration tables.

[0038] For example, partition configuration data can adopt an FCID-based zone configuration method. In an FCID-based zone configuration, each zone member consists of a source port identifier (SID) and several member port identifiers (IDs) that are allowed to communicate with it. For example, a zone can be configured such that the port with SID 0x010100 is allowed to communicate with ports with IDs 0x010200, 0x010300, and 0x010400. This configuration method, based directly on the port's FCID address, offers higher lookup efficiency compared to the WWN (World Wide Name)-based configuration method.

[0039] For example, partition configuration data can be received by the switch's management interface. This management interface can be a command-line interface (CLI), a graphical user interface (GUI), or configuration information received via a network management protocol such as SNMP. The received partition configuration data will first undergo format validation and validity checks to ensure that the configuration data conforms to the switch's configuration specifications before proceeding to subsequent processing steps.

[0040] Step S220: Generate a partition configuration table representing the association between source port identifiers and member port identifiers based on the partition configuration data.

[0041] In this embodiment, the zone member table is used to store the mapping relationship between source port identifiers (SIDs) and member port identifiers (IDs). This zone member table adopts a configuration item structure, with each configuration item recording a source port identifier (SID) and its corresponding multiple member port identifiers (IDs), as detailed in the table below:

[0042] Table 1. Structure of the zone member table In Table 1, ID0_15-ID0_0 and SID0 are the first configuration items in the zone member table, with the index identifier Addr0; ID1_15-ID1_0 and SID1 are the second configuration items in the zone member table, with the index identifier Addr1; ..., ID383_15-ID383_0 and SID383 are the last configuration items in the zone member table, with the index identifier Addr383. By configuring the zone member table, access control is provided for the switch's data forwarding. When the switch receives forwarded data (FC data frame), it extracts the SID and DID from the FC data frame, then searches the zone configuration table for all member port identifiers in the configuration item corresponding to the SID, and determines whether the DID corresponds to any member port identifier in the configuration item, thereby deciding whether to allow the forwarding of the FC data frame.

[0043] For example, the specific steps for generating a partition configuration table include: obtaining the zone rule and issuing activation zonesetactive; zonesetactive calculating and scanning to generate a new partition configuration table; writing each configuration item of the partition configuration table to the corresponding register. It is then determined whether the last register has been written; if so, proceed to the next step; otherwise, continue writing registers. After writing the last register of a zone member, a partition configuration table read operation is triggered, and the read configuration items are output. Each read operation reads from address 0 to 383, meaning that triggering a read operation will read and update the entire partition configuration table to the data processor. Finally, it is determined whether the last configuration item has been read; if so, the partition configuration table configuration process ends; otherwise, continue reading.

[0044] In these examples, triggering configuration item generation via `zoneset active` enables batch updates of zone rules, avoiding inconsistencies caused by updating rules one by one. By writing configuration item data to a register first and then triggering a full table read update, it can be ensured that all ports synchronously obtain the latest zone configuration, improving the atomicity and consistency of configuration updates.

[0045] For example, the partition configuration table can also be generated using an incremental update method. When a zone rule undergoes a partial change, it is not necessary to regenerate the entire partition configuration table; instead, only the changed configuration items are updated. For instance, when a member port identifier ID is added or deleted from a configuration item in the partition configuration table, only that configuration item needs to be modified, while other configuration items remain unchanged. This incremental update method can reduce the time overhead of configuration updates and improve the system's configuration response speed.

[0046] In some embodiments, the partition configuration table includes a first predetermined number of configuration items, and the number of member port identifiers in each configuration item is less than or equal to a second predetermined number; the storage space includes a third predetermined number of storage partitions, each storage partition including a source port partition and multiple member port partitions, the source port partition being used to store the source port identifier in each configuration item, and the target member port partition being used to store the member port identifier in each configuration item corresponding to the target storage location; wherein, the member port partition includes the target member port partition.

[0047] In this embodiment, as Figure 3 As shown, the first set quantity can be 384, the second set quantity can be 16, the third set quantity can be 5, the source port partition is one with a bit width of 24, and the multiple member port partitions are a total of 4 with each bit width of 96. The source port partition SIDtable can store source port identifiers from SID0 to SID383. The member port partition zonetable0 can store member port identifiers from ID0_15 to ID0_12, ID1_15 to ID1_12, ..., ID383_15 to ID383_12. The member port partition zonetable1 can store member port identifiers from ID0_11 to ID0_8, ID1_11 to ID1_8, ..., ID383_11 to ID383_8. The member port partition zonetable2 can store member port identifiers from ID0_7 to ID0_4, ID1_7 to ID1_4, ..., ID383_7 to ID383_4. The member port partition zonetable3 can store member port identifiers from ID0_3 to ID0_0, ID1_3 to ID1_0, ..., ID383_3 to ID383_0.

[0048] In these examples, by distributing member port identifiers across multiple member port partitions, parallel reading can be achieved, improving the efficiency of zone matching. Conversely, by storing the source port identifier separately in the source port partition, the location of the configuration item corresponding to a specific SID can be easily and quickly determined.

[0049] In some embodiments, the plurality of member port partitions is a fourth predetermined number, and each member port partition stores a member port identifier within a fifth predetermined number. The product of the fourth predetermined number and the fifth predetermined number is equal to the product of the second predetermined number and the number of items in the configuration item in the partition configuration table.

[0050] In this example, the fourth setting quantity is 4, indicating that there are 4 member port partitions. The fifth setting quantity is 4 × 384. The fourth setting quantity multiplied by the fifth setting quantity equals 16 × 384, and the number of configuration items is 384. The second setting quantity multiplied by 384 is also 16 × 384, which is equal to the first, satisfying the storage requirements.

[0051] In these examples, by properly setting the number of member port partitions and the number of IDs stored in each partition, the utilization of RAM resources can be optimized while meeting storage capacity requirements, thus avoiding resource waste.

[0052] Step S230: Write the partition configuration table into the storage space configured in the processing chip of the switch.

[0053] In this embodiment, the storage space refers to the storage area configured on the switch's processing chip (such as an FPGA chip) for storing the partition configuration table. This storage space is implemented using on-chip RAM resources of the FPGA, which reduces hardware costs and design complexity compared to an external TCAM chip.

[0054] The process of writing the partition configuration table to storage involves writing the generated partition configuration table data from registers or temporary caches to the FPGA's on-chip RAM. This process requires writing the configuration item data to the correct storage location according to the RAM's address mapping rules to ensure that the configuration item content can be correctly retrieved during subsequent reads.

[0055] The role of the storage space in the overall solution is to persistently store the partition configuration table, providing a data source for zone matching during data forwarding. Implemented using on-chip RAM on the FPGA, this storage space features fast read / write speeds and low latency, meeting the performance requirements of high-speed data forwarding.

[0056] In some embodiments, step S230 may include the following step S310: Step S310: For the target member port partition in the storage space, the member port identifier corresponding to the target storage location in each configuration item in the partition configuration table is written into the target member port partition through the target true dual port configured by the switch for the target member port partition.

[0057] In this example, the target member port partition can be any one of member port partitions zonetable0-zonetable3. The target true dual-port refers to the true dual-port interface configured for this RAM block, where port a and port b can perform read and write operations simultaneously, but when the read and write addresses are the same, the write operation takes precedence.

[0058] In these examples, by using true dual-port RAM, write and read operations can be executed in parallel, improving storage access efficiency. By writing IDs from different locations to different member port partitions, parallel data writing can be achieved, shortening write time.

[0059] For example, the write process may also include a verification step after the write is completed. After the partition configuration table is written to the storage space, the newly written configuration item data is read and compared with the original partition configuration table data to verify whether the write is correct. If a write error is found, the write operation can be re-executed to ensure that the data in the storage space is accurate.

[0060] Step S240: Upon receiving forwarded data output from the first interactive port of the switch, extract the target source port identifier and target member port identifier that match the forwarded data based on the partition configuration table.

[0061] In this embodiment, the first interaction port refers to the switch port that receives the FC data frame, also known as the ingress port. Forwarded data refers to the FC data frame received by this port, which includes a frame header and a frame body. The frame header contains the forwarding port identifier, namely the SID and DID.

[0062] In this embodiment, the forwarding port identifier, namely SID and DID, is extracted from the frame header of the forwarded data; the configuration item corresponding to the SID is searched in the partition configuration table; all member port identifiers are extracted from the configuration item; it is determined whether the DID is among all member port identifiers; if so, the SID and DID are assigned to the target source port identifier and the target member port identifier.

[0063] In this embodiment, the target source port identifier and the target member port identifier are used as the basis for forwarding decisions. Forwarding data is only allowed when the SID and DID correspond to the same configuration item; otherwise, forwarding data is prohibited, thereby realizing the access control function of the zone.

[0064] In some embodiments, prior to step S240, the method further includes the following steps S410 and S420: Step S410: Generate an index identifier for each configuration item according to each configuration item in the partition configuration table.

[0065] In this example, as shown in Table 1 above, the index identifier is Addr. For example, the index identifier corresponding to configuration items ID0_15-ID0_0 and SID0 is Addr0.

[0066] Step S420: Output the index identifier to the data processor of the switch.

[0067] In this embodiment, the partition configuration table read operation can be as follows: write the address of the zone member to be read to the zone_id_addr register; read the registers corresponding to the zone member configuration items at the current address in sequence, including sid and id0-id15; determine whether the last configuration item has been read, and if so, end the operation; otherwise, continue reading the next configuration item.

[0068] Outputting the index identifier to the switch's data processor refers to the process of transmitting the address of the read index identifier to the data processor.

[0069] Based on this, step S240 may include the following step S430: Step S430: Using the index identifier in the data processor, extract the target source port identifier and target member port identifier that match the forwarded data from the partition configuration table in the storage space.

[0070] In this embodiment, the data processor extracts the target source port identifier and target member port identifier that match the forwarded data from the partition configuration table in the storage space using the index identifier in the data processor. That is, the data processor extracts the SID and DID of the forwarded data. The data processor looks up the address of the corresponding configuration item in the index identifier according to the SID. The data processor reads all member port identifiers of the configuration item from the storage space according to the address of the configuration item. The data processor determines whether the DID corresponds to one or more member port identifiers among all member port identifiers. If they correspond, the interaction interface corresponding to the corresponding member port identifier can be set to the interaction allowed state.

[0071] In these examples, by pre-generating index identifiers and outputting them to the data processor, the lookup speed for zone matching can be accelerated, the number of times storage space is accessed during each forwarding can be reduced, and the throughput of data forwarding can be improved.

[0072] In some embodiments, step S420 may include the following steps S510 and S520: Step S510: When the storage space is in a stable state of use, based on the system clock domain configured by the switch, the partition configuration table in the storage space is read in the configuration order set by each configuration item in the partition configuration table and then spliced ​​to obtain a spliced ​​configuration table.

[0073] In this example, "stable state" of storage space usage means that the partition configuration table has been written, there are no ongoing write operations, and the storage space is ready for read operations. The system clock domain refers to the system clock cycle configured on the switch, used for synchronizing read operations. For example... Figure 4 As shown, the system clock domain is Clock. When the valid signal is high, the memory space is in a stable state of use. The index identifier Addr is incremented sequentially. The configuration items are read from each member port partition and concatenated into a 408-bit concatenation configuration table according to sid-id15 from low to high. The table is output in parallel. When the data processor receives the valid signal as high, it latches the concatenation configuration table.

[0074] Step S520: Output the splicing configuration table to the data processor of the switch.

[0075] Outputting the splicing configuration table to the switch's data processor means that in each system clock cycle, the valid signal, addr signal, and zone signal are output. The data processor latches the splicing configuration table according to the valid signal, thus completing the transmission of the splicing configuration table.

[0076] In these examples, reading and concatenation are performed in sync with the system clock, ensuring the correct timing of data transmission. By concatenating data scattered across multiple RAM blocks into a complete configuration item, the data processor can easily perform zone matching, avoiding the need for the data processor to access multiple RAM blocks separately.

[0077] In some embodiments, the forwarding data includes a forwarding port identifier and a forwarding packet; step S430 may include the following steps S610 to S630: Step S610: Using the index identifier in the data processor, determine in the partition configuration table of the storage space whether the forwarding port identifier corresponds to the target source port identifier and the target member port identifier.

[0078] In this example, the forwarding port identifier refers to the DID in the forwarded message frame header, and the forwarded message refers to the frame body of the FC data frame. Determining whether the forwarding port identifier corresponds to the target source port identifier and the target member port identifier is essentially the process of determining whether the SID and DID are in the same configuration item.

[0079] Step S620: If the forwarding port identifier corresponds to the target source port identifier and the target member port identifier, set all interactive ports of the switch to the interactive state.

[0080] In this embodiment, the SID and DID of the FC data frame are extracted; the SID and DID are then matched with all member port identifiers in the configuration item corresponding to the SID; it is determined whether the DID corresponds to all member port identifiers in the configuration item corresponding to the SID. If they correspond, the forwarding variables of all interactive ports are set, meaning all interactive ports are in an allowed interactive state. If they do not match, the forwarding variables of all interactive ports are set to zero, meaning all interactive ports are in a prohibited interactive state.

[0081] When the forwarding port identifier corresponds to the target source port identifier and the target member port identifier, setting all interactive ports of the switch to the interactive state means that when the SID and DID are in the same configuration item, it indicates that the FC data frame conforms to the zone rule and is allowed to be forwarded. At this time, the forwarding variables of all interactive ports are set, indicating that forwarding to all interactive ports is allowed (in actual forwarding, the forwarding table query results will also be combined to determine the specific target port).

[0082] Step S630: If the forwarding port identifier does not correspond to the target source port identifier and the target member port identifier, set all interactive ports of the switch to a disabled interactive state.

[0083] When the forwarding port identifier does not correspond to the target source port identifier and the target member port identifier, setting all interactive ports of the switch to a prohibited interactive state means that when the SID and DID are not in the same configuration item, it indicates that the forwarded data does not conform to the zone rules and is prohibited from forwarding; at this time, the forwarding variables of all interactive ports are set to zero, indicating that forwarding to any interactive port is prohibited, and the FC data frame will be discarded.

[0084] In these examples, by setting the interaction state of the ports based on whether the forwarding port identifier corresponds to the target source port identifier and the target member port identifier, the access control function of the zone can be implemented, ensuring that only FC data frames that conform to the zone rules can be forwarded in the FC network, thereby improving the security and isolation of the network.

[0085] For example, the extraction of the target source port identifier and target member port identifier that match the forwarded data can also employ a parallel matching method. For each ingress port, multiple SIDs can be configured (e.g., eight SIDs, SID0-SID7), each corresponding to a configuration item. When forwarded data is received, the data processor can match the DID with all member port identifiers of these eight configuration items in parallel. If any configuration item matches successfully, the zone matching is considered successful. This parallel matching method supports a port belonging to multiple zones simultaneously, improving the flexibility of zone configuration.

[0086] Step S250: Forward the forwarded data to the second interaction port corresponding to the target member port identifier.

[0087] In this embodiment, the second interaction port refers to the target port for forwarding data, also known as the outgoing port. This outgoing port is determined by the target member port identifier ID; that is, the forwarded data will be forwarded to the port that the ID points to.

[0088] In this embodiment, the data processor can be a switching matrix that forwards data to a second interactive port. The switching matrix executes the forwarding of data according to a forwarding decision and receives the forwarded data. Based on the target member port identifier in the forwarded data, the switching matrix routes the forwarded data to the output port corresponding to the target member port identifier, thus enabling communication between interactive ports in the FC network. Only FC data frames that match the zone rules can be forwarded; FC data frames that do not conform to the zone rules are discarded, thereby achieving access control.

[0089] As can be seen from steps S210 to S250 above, this embodiment generates a partition configuration table representing the association between source port identifiers and member port identifiers by receiving partition configuration data from the switch. The partition configuration table is written into the storage space configured in the processing chip of the switch. When forwarding data is received, the target source port identifier and target member port identifier that match the forwarding data are extracted based on the partition configuration table, and the forwarding data is forwarded to the second interaction port corresponding to the target member port identifier. The zone function can be implemented based on the on-chip RAM resources of the FPGA, making full use of the on-chip RAM resources and register resources. Compared with the traditional TCAM-based solution, there is no need to connect an external dedicated TCAM chip, reducing hardware resource consumption and design complexity. The SID / DID extracted from each switching port is directly matched with the user-configured FCID table without the need for algorithms such as HASH. The entire design process is simple and reliable, improving the accuracy and reliability of switch data forwarding and realizing the autonomous controllability of the zone function.

[0090] <Second Embodiment> This embodiment provides an electronic device. Figure 5 A schematic diagram of the hardware structure of the electronic device is shown.

[0091] like Figure 5 As shown, the electronic device 500 includes a processor 510 and a memory 520. The memory can be used to store computer programs, and the processor can be used to retrieve the computer programs from the memory to execute any method embodiment of this disclosure. The processor can be one or more, and these processors can execute instructions individually or jointly. Similarly, the memory can be one or more, and these memories can store the aforementioned computer programs individually or jointly.

[0092] The electronic device 500 may be Figure 1 Switch 100 in the middle.

[0093] This disclosure also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the data processing applied to a switch in any embodiment of this disclosure. Optionally, the computer-readable storage medium may be a non-transitory storage medium, but is not limited thereto; it may also be a temporary storage medium.

[0094] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0095] This disclosure may be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having a computer-readable program loaded thereon for causing a processor to implement any of the methods in the foregoing embodiments of this disclosure.

[0096] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media may include, for example, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), compact disc-read-only memory (CD-ROM), digital versatile disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any combination thereof. The computer-readable storage medium used herein is not to be interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0097] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include one or more of copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to computer-readable storage media in the respective computing / processing device.

[0098] The computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source or object programs written in any combination of one or more programming languages, including object-oriented programming languages ​​(such as Smalltalk, C++, etc.) and conventional procedural programming languages ​​(such as the "C" language or similar programming languages). The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network (e.g., a local area network or a wide area network), or it may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays, or programmable logic arrays, can execute computer-readable program instructions to implement various aspects of the embodiments of this disclosure by utilizing state information from the computer-readable program instructions.

[0099] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0100] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0101] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0102] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It should be noted that implementation in hardware, implementation in software, and implementation using a combination of software and hardware are all equivalent.

[0103] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of this disclosure is defined by the appended claims.

Claims

1. A data processing method applied to a switch, characterized in that, The method includes: Receive the partition configuration data of the switch; Based on the partition configuration data, a partition configuration table representing the association between source port identifiers and member port identifiers is generated; The partition configuration table is written to the storage space configured in the processing chip of the switch; Upon receiving forwarded data output from the first interactive port of the switch, the target source port identifier and target member port identifier that match the forwarded data are extracted based on the partition configuration table. The forwarded data is forwarded to the second interaction port corresponding to the target member port identifier.

2. The data processing method applied to a switch according to claim 1, characterized in that, The partition configuration table includes a first set number of configuration items, and the number of member port identifiers in each configuration item is less than or equal to a second set number; the storage space includes a third set number of storage partitions, each storage partition including a source port partition and multiple member port partitions, the source port partition being used to store the source port identifier in each configuration item, and the target member port partition being used to store the member port identifier in each configuration item corresponding to the target storage location; wherein, the member port partition includes the target member port partition.

3. The data processing method applied to a switch according to claim 2, characterized in that, The number of member port partitions is a fourth set number, and each member port partition stores a number of member port identifiers within a fifth set number. The product of the fourth set number and the fifth set number is equal to the product of the second set number and the number of configuration items in the partition configuration table.

4. The data processing method applied to a switch according to claim 2, characterized in that, The step of writing the partition configuration table into the storage space configured in the processing chip of the switch includes: For the target member port partition in the storage space, the member port identifier corresponding to the target storage location in each configuration item in the partition configuration table is written to the target member port partition through the target true dual port configured by the switch for the target member port partition.

5. The data processing method applied to a switch according to claim 2, characterized in that, Before extracting the target source port identifier and target member port identifier that match the forwarding data based on the partition configuration table, the method further includes: Based on each configuration item in the partition configuration table, generate an index identifier for each configuration item; The index identifier is output to the data processor of the switch; The step of extracting the target source port identifier and target member port identifier that match the forwarding data based on the partition configuration table includes: Using the index identifier in the data processor, the target source port identifier and target member port identifier that match the forwarded data are extracted from the partition configuration table in the storage space.

6. The data processing method applied to a switch according to claim 5, characterized in that, The data processor that outputs the index identifier and the partition configuration table to the switch includes: When the storage space is in a stable state of use, based on the system clock domain configured by the switch, the partition configuration table in the storage space is read in the configuration order set by each configuration item in the partition configuration table and then spliced ​​to obtain a spliced ​​configuration table. The splicing configuration table is output to the data processor of the switch.

7. The data processing method applied to a switch according to claim 5, wherein the forwarding data includes a forwarding port identifier and a forwarding message; characterized in that, The step of retrieving the target source port identifier and target member port identifier that match the forwarded data from the partition configuration table in the storage space using the index identifier in the data processor includes: Using the index identifier in the data processor, determine in the partition configuration table of the storage space whether the forwarding port identifier corresponds to the target source port identifier and the target member port identifier; If the forwarding port identifier corresponds to the target source port identifier and the target member port identifier, set all interaction ports of the switch to the interaction-enabled state; or, If the forwarding port identifier does not correspond to the target source port identifier and the target member port identifier, all interactive ports of the switch shall be set to a disabled interactive state.

8. A data processing device for use in a switch, characterized in that, include: A receiving module is used to receive the partition configuration data of the switch; The generation module is used to generate a partition configuration table representing the association between source port identifiers and member port identifiers based on the partition configuration data. The write module is used to write the partition configuration table to the storage space configured in the processing chip of the switch; The extraction module is used to extract the target source port identifier and target member port identifier that match the forwarding data based on the partition configuration table when forwarding data is received from the first interactive port of the switch. The forwarding module is used to forward the forwarded data to the second interaction port corresponding to the target member port identifier.

9. An electronic device, characterized in that, It includes a memory and a processor, the memory being used to store a computer program; the processor being used to execute the computer program to implement the method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the method according to any one of claims 1-7.