A programmable method and application for flexibly expanding network switching chip associated data

By dividing the XAD DATA into different digits and configured Profile, the existing network exchange chip cannot meet the problem of reposting the new network protocol or special application scenarios, realized the flexible programming of related data, extended the use of chips Life and reduce development costs.

CN115567465BActive Publication Date: 2025-01-24SUZHOU CENTEC COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211328610.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-27
Publication Date
2025-01-24
Estimated Expiration
2042-10-27

AI Technical Summary

Technical Problem

Existing network switching chips cannot flexibly expand associated data, resulting in the inability to meet the forwarding needs of new network protocols or special application scenarios, shortening the service life of the chip and increasing development costs.

Method used

By defining the XAD Data, divide it into multiple parts of different digits, and set the Profile for each part. The configuration mapping rules are used to encode XAD DATA to any position of Pi Data to achieve flexible and programmable for associated data.

Benefits of technology

In the realization of the different needs of the network protocol and application scenarios, the forwarding behavior of the flexible configuration of related data is extended to the service life of the network exchange chip and reduced development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115567465B_ABST
    Figure CN115567465B_ABST
Patent Text Reader

Abstract

The present invention discloses a programmable method and application for flexibly expanding the associated data of a network switching chip, the programmable method comprising the following steps: defining part of the data of ADData as XADData, dividing the XADData into multiple parts of different bit units, for mapping forwarding behaviors of different bit units; setting a Profile for each of the multiple parts, the Profile can configure mapping rules by using the internal parameters of the Profile, thereby mapping the source object to the target object; and using the Profile to configure different mapping rules, encoding data at any position and any length of the XADData to any position of PIData. The programmable method can meet the user's need to define forwarding behaviors according to the forwarding requirements of the network protocol, realize a flexible programmable method for associated data, and extend the service life of the network switching chip.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network switching chips, and in particular to a programmable method and application for flexibly expanding associated data of network switching chips. Background Art

[0002] When a network switching chip forwards a message, it needs to look up the table entry based on the message field to obtain the associated data. The associated data can be used as temporary dependent data for message forwarding, or it can represent the forwarding behavior and editing behavior of the message. The meaning of the associated data table entry field is defined based on the existing network protocol. Therefore, the fields of the associated data table entry are generally fixed with the design of the switching chip. Therefore, each field of the associated data table entry can meet the needs of the existing network protocol forwarding. However, with the increasing development of network protocols, new network protocols need to use new associated data fields for message forwarding or new network application scenarios need to use specific associated data fields to implement specific forwarding behaviors. However, once the chip is produced, it cannot be changed, and it cannot meet the ever-changing network needs.

[0003] Each field of the AD table entry is used to define the behavior of message forwarding. In the prior art, since the Data in the AD table entry is used to define the forwarding behavior of the message, different network protocols or application scenarios have different forwarding requirements. The Data in the AD table generally meets the forwarding requirements of one network protocol. For multiple network protocols, it is necessary to define multiple AD Data with different interpretations. One prior art is to use the table entry field Type, and each Type defines a set of AD Data with different meanings. For example, when Type is 0, it can represent {DataA, DataB,..., DataX}; when Type is 1, it can represent {DataC, DataD,..., DataY}. By configuring different AD DataTypes, different AD Data interpretations are obtained, thereby meeting the forwarding requirements of multiple network protocols.

[0004] AD Data with different interpretations is represented by the pre-defined AD DataType. This is hard-coded in the chip and cannot be changed after the chip is put into use. Therefore, once a new network protocol requires a new forwarding behavior, and each AD Data Type designed by the chip does not define AD Data for the new network protocol message forwarding requirements, the chip will not be able to meet the new network protocol forwarding requirements. At this time, the service life of the chip will be greatly reduced and the chip development cost will be increased.

[0005] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention

[0006] The purpose of the present invention is to provide a programmable method and application for flexibly expanding network switching chip associated data, which can solve the problem that the chip under the existing technology cannot meet the requirements of new network protocols or special application scenarios.

[0007] To achieve the above objectives, an embodiment of the present invention provides a programmable method for flexibly expanding network switch chip associated data.

[0008] In one or more embodiments of the present invention, the programmable method includes: defining part of the AD Data as XAD Data, dividing the XAD Data into multiple parts with different bit units for mapping forwarding behaviors of different bit numbers; setting a Profile for each of the multiple parts, and the Profile can configure mapping rules by using the internal parameters of the Profile to map the source object to the target object; and by using the Profile to configure different mapping rules, encoding data of any position and length of the XAD Data to any position of the PI Data.

[0009] In one or more embodiments of the present invention, the multiple parts with different bit units include: a first part, whose bit unit is Nibble, every 4 bits are a Nibble, used to map forwarding behaviors or index pointers with a small number of bits; a second part, whose bit unit is Byte, every 8 bits are a Byte, used to map forwarding behaviors or index pointers with a medium number of bits; a third part, whose bit unit is Word, every 16 bits are a Word, used to map forwarding behaviors or index pointers with a long number of bits.

[0010] In one or more embodiments of the present invention, the internal parameters of the Profile include Profile.Source[n] and Profile.Dest[n], wherein Profile.Source[n] is used to describe taking data of a certain length from a certain position in XADData, and n represents multiple mapping relationships; Profile.Dest[n] is used to describe copying data of a certain length in XADData to a certain position in PI, and n represents multiple mapping relationships.

[0011] In one or more embodiments of the present invention, configuring different mapping rules includes: applying the bit unit Nibble, Byte or Word to configure the Data field of the XAD table entry according to different forwarding requirements of the network protocol.

[0012] In one or more embodiments of the present invention, the configuration method also includes: configuring Profile.Source[n] according to the Data field of the XAD table item to obtain data of different lengths from different positions of the XAD Data; and configuring Profile.Dest[n] according to the Data field of the XAD table item to copy data of different lengths of the XAD Data to different positions of PIData.

[0013] In one or more embodiments of the present invention, the programmable method further comprises: after completing the mapping, assigning values ​​to different fields of the PI.

[0014] In one or more embodiments of the present invention, the programmable method further includes: reading different pre-configured Profiles according to forwarding requirements of different network protocols or specific application scenarios.

[0015] In another aspect of the present invention, a device for flexibly expanding network switch chip associated data is provided, which includes a definition module, a configuration module and a mapping module.

[0016] The definition module is used to define part of the AD data as XAD data, and divide the XAD data into a plurality of parts with different bit units, so as to map forwarding behaviors with different bit units.

[0017] The configuration module is used to set a Profile for each of the multiple parts. The Profile can configure a mapping rule by using internal parameters of the Profile, so as to map the source object to the target object.

[0018] A mapping module is used to encode data of any position and any length of the XAD Data to any position of the PI Data by using the Profile to configure different mapping rules.

[0019] In one or more embodiments of the present invention, the definition module is also used for: the multiple parts with different bit units include a first part, whose bit unit is Nibble, every 4 bits are a Nibble, used to map forwarding behaviors or index pointers with a small number of bits; a second part, whose bit unit is Byte, every 8 bits are a Byte, used to map forwarding behaviors or index pointers with a medium number of bits; and a third part, whose bit unit is Word, every 16 bits are a Word, used to map forwarding behaviors or index pointers with a long number of bits.

[0020] In one or more embodiments of the present invention, the configuration module is also used for: the internal parameters of the Profile, including Profile.Source[n] and Profile.Dest[n], wherein Profile.Source[n] is used to describe taking data of a certain length from a certain position in XAD Data, and n represents multiple mapping relationships; Profile.Dest[n] is used to describe copying data of a certain length in XAD Data to a certain position in PI, and n represents multiple mapping relationships.

[0021] In one or more embodiments of the present invention, the configuration module is further used to: configure the Data field of the XAD entry using the bit unit Nibble, Byte or Word according to different forwarding requirements of the network protocol.

[0022] In one or more embodiments of the present invention, the configuration module is also used to: configure Profile.Source[n] according to the Data field of the XAD table item to obtain data of different lengths from different positions of the XAD Data; and configure Profile.Dest[n] according to the Data field of the XAD table item to copy data of different lengths of the XAD Data to different positions of PIData.

[0023] In one or more embodiments of the present invention, the mapping module is further used to: assign values ​​to different fields of the PI after completing the mapping.

[0024] In one or more embodiments of the present invention, the mapping module is further configured to read different pre-configured Profiles according to forwarding requirements of different network protocols or specific application scenarios.

[0025] In another aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory, wherein the memory stores instructions, and when the instructions are executed by the at least one processor, the at least one processor executes the programmable method for flexibly extending network switch chip associated data as described above.

[0026] In another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the programmable method for flexibly extending network switch chip associated data are implemented.

[0027] Compared with the prior art, the programmable method and application of flexibly expanding the associated data of the network switching chip according to the embodiment of the present invention can flexibly obtain data of any position and any length of XAD by configuring the Profile; flexibly copy the Profile to any position of the PI data by configuring the Profile to represent the forwarding behavior of the network protocol and meet the needs of specific application scenarios. It can meet the needs of users to define forwarding behavior according to the forwarding requirements of the network protocol, realize the flexible programmable method of associated data, and extend the service life of the network switching chip. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is a flow chart of a programmable method for flexibly extending network switch chip associated data according to an embodiment of the present invention;

[0029] Figure 2 It is a flowchart of a programmable method for flexibly extending network switch chip association data according to an embodiment of the present invention;

[0030] Figure 3 It is a profile structure diagram of a programmable method for flexibly extending network switch chip associated data according to an embodiment of the present invention;

[0031] Figure 4 is a structural diagram of a device for flexibly extending network switch chip associated data according to an embodiment of the present invention;

[0032] Figure 5 It is a hardware structure diagram of a computing device for flexibly expanding network switch chip associated data according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific implementation modes.

[0034] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.

[0035] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0036] Example 1

[0037] like Figures 1 to 3 As shown, a programmable method for flexibly extending network switch chip association data of the present invention is introduced, and the programmable method includes the following steps:

[0038] In step S101, part of the AD Data is defined as XAD Data, and the XAD Data is divided into a plurality of parts of different bit units for mapping forwarding behaviors of different bit units.

[0039] When the network switching chip forwards a message, it needs to look up the table entry based on the message field to obtain the associated data. The associated data can be used as temporary dependent data for message forwarding, or it can represent the forwarding behavior and editing behavior of the message. The meaning of the associated data table entry field is defined based on the existing network protocol. Therefore, the fields of the associated data table entry are generally fixed with the design of the switching chip. Therefore, each field of the associated data table entry can meet the needs of the existing network protocol forwarding.

[0040] When the network switching chip forwards a message, it extracts the field FieldX or FieldY from the message to form a Key, and searches in the forwarding table to obtain the corresponding AD Table entry. Each field of the AD table entry is used to define the behavior of message forwarding, such as the egress (DestPort), the next hop (Nexthop), the service sequence number (ServiceID), etc. In the AD table entry structure, each Data can represent a kind of associated data, which is used to define the existing network protocol forwarding behavior. For example, data_1 can represent the egress of message forwarding, data_2 can represent the pointer to read the message editing behavior table entry, data_n can represent the type of message forwarding, etc. The meaning of Data is defined during chip design and cannot be changed once the chip is manufactured. Therefore, the flexibility of the AD field can enrich the use characteristics and application scenarios of the switch chip and can well extend the service life of the chip.

[0041] For various network protocols, it is necessary to define various AD Data with different interpretations. One of the existing technologies is to use the table entry field Type, and each Type defines a set of AD Data with different meanings. For example, when Type is 0, it can represent {DataA, DataB, ..., DataX}; when Type is 1, it can represent {DataC, DataD, ..., DataY}. By configuring different AD Data Types, different AD Data interpretations are obtained, thereby meeting the forwarding requirements of various network protocols.

[0042] The AD Data with different interpretations is represented by the predefined AD DataType, which is hard-coded in the chip and cannot be changed after the chip is put into use. Therefore, once a new network protocol requires a new forwarding behavior, and each AD DataType designed by the chip does not define the AD Data for the new network protocol message forwarding requirements, the chip will not be able to meet the new network protocol forwarding requirements. Therefore, the defect of the prior art is that it will shorten the service life of the chip and increase the development cost of the chip.

[0043] In this embodiment, a part of the data of the AD Table entry is defined as XAD Data and represented by a Type. The XAD Data is divided into three parts according to the length of the bit number. The first part, whose bit number unit is Nibble, is a Nibble for every 4 bits, and is used to map the forwarding behavior or index pointer with a small number of bits; the second part, whose bit number unit is Byte, is a Byte for every 8 bits, and is used to map the forwarding behavior or index pointer with a medium number of bits; the third part, whose bit number unit is Word, is a Word for every 16 bits, and is used to map the forwarding behavior or index pointer with a long number of bits.

[0044] In step S102, a Profile is set for each of the multiple parts. The Profile can configure a mapping rule by using internal parameters of the Profile, so as to map the source object to the target object.

[0045] like Figure 3 As shown, in this embodiment, Nibble, Byte and Word use one Profile respectively, and the internal parameters of each Profile are divided into two parts: Profile.Source[n] and Profile.Dest[n]. Profile.Source[n] is used to describe where to get the length of data from XAD Data, including two parameters: offset and length, where offset indicates the location to get XAD Data, length indicates the length of XAD Data to get, and the unit is Nibble, Byte or Word, and n indicates multiple mapping relationships; Profile.Dest[n] is used to describe how long XAD Data is copied to where in PI, including two parameters: offset and length, where offset indicates the location to copy to, length indicates the length of copy, and the unit is Nibble, Byte or Word, and n indicates multiple mapping relationships.

[0046] Specifically, the steps of configuring different mapping rules are: according to different forwarding requirements of the network protocol, apply the bit unit Nibble, Byte or Word to configure the Data field of the XAD table item; configure Profile.Source[n] according to the Data field of the XAD table item to obtain data of different lengths from different positions of the XAD Data; and configure Profile.Dest[n] according to the Data field of the XAD table item to copy data of different lengths of the XAD Data to different positions of PIData.

[0047] In step S103, by using the Profile to configure different mapping rules, data at any position and with any length in the XAD Data is encoded to any position in the PI Data.

[0048] In this embodiment, after the mapping is completed, different fields of the PI are assigned values. Different pre-configured Profiles are read for forwarding requirements of different network protocols or specific application scenarios.

[0049] Each data in PI (Packet Information) is not of fixed length. For example, there are 4-bit data, 8-bit data, 16-bit data, and 32-bit data. By configuring the Profile, XAD Data can be mapped to the PI Data position.

[0050] According to this embodiment, a specific application step is provided: 1) Configure AD Data Type to x, indicating that this segment of Data represents XAD Data. 2) According to the forwarding requirements of the network protocol, configure the XAD table item Data field, such as configuring XAD.gNibble[y]=1, which is used to indicate that the route lookup hits the default route. 3) Configure Profile.source[0].offset=y, Profile.source[0].length=1, indicating that 1 Nibble of data is obtained from the y position of the XAD Nibble Data. 4) Configure Profile.dest[0].offset=z, Profile.dest[0].length=1, indicating that it is copied to the z position of the PI, with a length of 1 nibble; The PI.isdefaultroute field is at the z position of the PI data, with a length of 1 nibble. 5) After the above configuration, the PI.isdefaultroute field can be assigned a value of 1, indicating that the current route lookup is the default route table item.

[0051] Specifically, according to the network protocol, the PI.isdefaultroute field can be used by ACL or other modules to meet the forwarding requirements of new network protocols or forwarding requirements of specific application scenarios, such as forwarding type ForwardingType, network protocol number Protocol, etc. For example, for a new network protocol Protocol value of ProtocolID_1, the pre-configured Profile1 can be read; for another new network protocol Protocol value of ProtocolID_2, the pre-configured Profile2 can be read. In this way, AD Data with different interpretations can be obtained based on the Profile file and copied to PI Data, meeting the forwarding requirements of the ever-changing network protocols and achieving the purpose of flexible programmability.

[0052] According to the programmable method and application of flexibly expanding the associated data of the network switching chip according to the embodiment of the present invention, it can flexibly obtain data of any position and any length of XAD by configuring the Profile; by configuring the Profile, it can flexibly copy it to any position of the PI data to represent the forwarding behavior of the network protocol to meet the needs of specific application scenarios. It can meet the needs of users to define forwarding behavior according to the forwarding requirements of the network protocol, realize the flexible programmable method of associated data, and extend the service life of the network switching chip.

[0053] like Figure 4 As shown, a device for flexibly expanding network switch chip associated data according to a specific embodiment of the present invention is introduced.

[0054] In the implementation manner of the present invention, the device for flexibly extending network switch chip associated data includes a definition module 401 , a configuration module 402 and a mapping module 403 .

[0055] The definition module 401 is used to define part of the AD data as XAD data, and divide the XAD data into multiple parts of different bit units for mapping forwarding behaviors of different bit units.

[0056] The configuration module 402 is used to set a Profile for each of the multiple parts. The Profile can configure a mapping rule by using internal parameters of the Profile, so as to map the source object to the target object.

[0057] The mapping module 403 is used to encode data of any position and any length of the XAD Data to any position of the PI Data by using the Profile to configure different mapping rules.

[0058] The definition module 401 is also used for: the multiple parts with different bit units include a first part, whose bit unit is Nibble, every 4 bits are a Nibble, which is used to map forwarding behaviors or index pointers with a small number of bits; a second part, whose bit unit is Byte, every 8 bits are a Byte, which is used to map forwarding behaviors or index pointers with a medium number of bits; and a third part, whose bit unit is Word, every 16 bits are a Word, which is used to map forwarding behaviors or index pointers with a long number of bits.

[0059] The configuration module 402 is also used for: the internal parameters of the Profile, including Profile.Source[n] and Profile.Dest[n], wherein Profile.Source[n] is used to describe taking data of a certain length from a certain position in XAD Data, and n represents multiple mapping relationships; Profile.Dest[n] is used to describe copying data of a certain length in XAD Data to a certain position in PI, and n represents multiple mapping relationships.

[0060] The configuration module 402 is further used to: configure the Data field of the XAD table entry using the bit unit Nibble, Byte or Word according to different forwarding requirements of the network protocol.

[0061] The configuration module 402 is also used to: configure Profile.Source[n] according to the Data field of the XAD table entry to obtain data of different lengths from different positions of the XAD Data; and configure Profile.Dest[n] according to the Data field of the XAD table entry to copy data of different lengths of the XAD Data to different positions of the PI Data.

[0062] The mapping module 403 is also used to assign values ​​to different fields of the PI after completing the mapping.

[0063] The mapping module 403 is further used to read different pre-configured Profiles according to forwarding requirements of different network protocols or specific application scenarios.

[0064] Figure 5 FIG. 5 shows a hardware structure diagram of a computing device 50 for flexibly expanding network switch chip associated data according to an embodiment of the present specification. Figure 5As shown, the computing device 50 may include at least one processor 501, a memory 502 (e.g., a non-volatile memory), a memory 503, and a communication interface 504, and the at least one processor 501, the memory 502, the memory 503, and the communication interface 504 are connected together via a bus 505. At least one processor 501 executes at least one computer-readable instruction stored or encoded in the memory 502.

[0065] It should be understood that the computer executable instructions stored in the memory 502, when executed, cause at least one processor 501 to perform the above combined operations in various embodiments of this specification. Figure 1-5 Describes the various operations and functions.

[0066] In the embodiments of the present specification, the computing device 50 may include, but is not limited to, a personal computer, a server computer, a workstation, a desktop computer, a laptop computer, a notebook computer, a mobile computing device, a smart phone, a tablet computer, a cellular phone, a personal digital assistant (PDA), a handheld device, a messaging device, a wearable computing device, a consumer electronic device, and the like.

[0067] According to one embodiment, a program product such as a machine-readable medium is provided. The machine-readable medium may have instructions (i.e., the above-mentioned elements implemented in the form of software), which, when executed by a machine, causes the machine to perform the above-mentioned combination of various embodiments of this specification. Figure 1-5 Specifically, a system or device equipped with a readable storage medium may be provided, on which a software program code implementing the functions of any of the above-mentioned embodiments is stored, and a computer or processor of the system or device reads and executes the instructions stored in the readable storage medium.

[0068] According to the programmable method and application of flexibly expanding the associated data of the network switching chip according to the embodiment of the present invention, it can flexibly obtain data of any position and any length of XAD by configuring the Profile; by configuring the Profile, it can flexibly copy it to any position of the PI data to represent the forwarding behavior of the network protocol to meet the needs of specific application scenarios. It can meet the needs of users to define forwarding behavior according to the forwarding requirements of the network protocol, realize the flexible programmable method of associated data, and extend the service life of the network switching chip.

[0069] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0070] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0071] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0072] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0073] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.

Claims

1. A programmable method for flexibly expanding network switch chip associated data, characterized in that: The programmable method comprises: Define part of the associated data AD Data as XAD Data, and divide the XAD Data into multiple parts of different bit units according to the length of the bit, so as to map forwarding behaviors of different bit units; A Profile is set for each of the multiple parts, and the Profile can configure a mapping rule by using internal parameters of the Profile, so as to map a source object to a target object, wherein the internal parameters of the Profile include Profile.Source[n] and Profile.Dest[n], Profile.Source[n] is used to describe taking data of a certain length from a certain position of the XAD Data, and Profile.Dest[n] is used to describe copying data of a certain length of the XAD Data to a certain position of the data packet information PI, and n represents multiple mapping relationships; and By using the Profile to configure different mapping rules, data at any position and with any length in the XAD Data can be encoded to any position in the PIData.

2. The programmable method for flexibly expanding network switch chip associated data as claimed in claim 1, characterized in that: The multiple parts of the different digit units include: The first part, whose bit unit is Nibble, has 4 bits as one Nibble, which is used to map forwarding behaviors or index pointers with a small number of bits. The second part, whose unit is Byte, has 8 bits per Byte and is used to map medium-sized forwarding behaviors or index pointers; The third part has a unit of word, where every 16 bits is a word, and is used to map forwarding behaviors or index pointers with a length of bits.

3. The programmable method for flexibly expanding network switch chip associated data as claimed in claim 1, characterized in that: The configuration of different mapping rules includes: According to different forwarding requirements of the network protocol, the bit unit Nibble, Byte or Word is used to configure the Data field of the XAD table entry.

4. The programmable method for flexibly expanding network switch chip associated data as claimed in claim 3, characterized in that: The configuration method further includes: Configure Profile.Source[n] according to the Data field of the XAD table entry, and obtain data of different lengths from different positions of the XAD Data; and Profile.Dest[n] is configured according to the Data field of the XAD table entry, and data of different lengths of the XAD Data are copied to different positions of PIData.

5. The programmable method for flexibly expanding network switch chip associated data as claimed in claim 1, characterized in that: The programmable method further comprises: After completing the mapping, values ​​are assigned to different fields of PI.

6. The programmable method for flexibly extending network switch chip associated data as claimed in claim 1, characterized in that: The programmable method further comprises: To meet the forwarding requirements of different network protocols or specific application scenarios, read different pre-configured profiles.

7. A programmable device for flexibly expanding network switching chip associated data, characterized in that: The device comprises: A definition module, used for defining part of the associated data AD Data as XAD Data, dividing the XAD Data into a plurality of parts with different bit numbers according to the length of the bit numbers, for mapping forwarding behaviors with different bit numbers; A configuration module, used to set a Profile for each of the multiple parts, wherein the Profile can configure a mapping rule by using internal parameters, so as to map a source object to a target object, wherein the internal parameters of the Profile include Profile.Source[n] and Profile.Dest[n], Profile.Source[n] is used to describe taking data of a certain length from a certain position of the XAD Data, and Profile.Dest[n] is used to describe copying data of a certain length of the XAD Data to a certain position of the data packet information PI, and n represents multiple mapping relationships; A mapping module is used to encode data of any position and any length of the XAD Data to any position of the PIData by using the Profile to configure different mapping rules.

8. An electronic device, characterized in that: include: at least one processor; as well as A memory storing instructions, which, when executed by the at least one processor, enable the at least one processor to execute the programmable method for associating data with a flexible extended network switch chip according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a programmable method for flexibly extending network switch chip association data as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Network address conversion method and chip

    CN109218467A

  • Programmable switch supporting domain name resolution and network message processing method

    CN115022283A