Message field extraction and transmission method, device and equipment
Through the combination of inverse butterfly network and twin conveyor belt, the problem of high parallel complexity of multiple selectors and waste resources on ultra-wide buses in the existing message field extraction scheme is solved, and efficient field extraction and transmission is achieved, supporting any depth Processing of messages.
Patent Information
- Application Number
- CN202311434140.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2043-10-31
AI Technical Summary
In the existing message field extraction scheme, multiple multi-selectronics have high parallel complexity and complex routing. The ultra-wide PHV bus supports more fields but increases complexity and wastes resources, resulting in area and performance. There is a mismatch problem on it.
Use the inverse butterfly network for field extraction, and realize field transmission of narrower buses through twin conveyor belts and field extraction decoders. The bandwidth of packet input and result output is matched through a single bus multi-period manner, simplifying trace connections and reducing resources Consumption.
It effectively reduces the width of the configuration bus, simplifies trace connections, improves the efficiency of message field extraction and transmission, realizes efficient field extraction and transmission, and supports the extraction and transmission of any depth packets.
Smart Images

Figure CN117376453B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of message processing, and in particular to a message field extraction and transmission method, device and equipment. Background Art
[0002] In devices such as network cards, smart network cards, and data processors (DPUs), the message processing process generally includes stages such as packet parsing (Packet Parser), flow table matching and execution, and message reconstruction. Among them, the extraction (Fields Extractor) and transmission of message fields have a direct impact on the overall message processing performance. In the message parsing stage, efficiently extracting the fields required for subsequent processing can significantly improve the performance of subsequent processing. In the message parsing stage, the message can be converted into an operable data structure, and field information can be extracted for flow table matching and execution operations. If the performance of field extraction and transmission is low, it may increase the time consumption of each stage of message processing and affect the overall processing performance. In addition, when designing field extraction and transmission schemes, it is necessary to balance performance and area. Design an efficient field extraction and transmission circuit scheme under limited resources to improve the overall performance. Existing field extraction schemes generally use multiple multiplexers in parallel to implement, and then transmit the results through an ultra-wide bus. This scheme achieves higher performance, but occupies a large circuit area.
[0003] However, in the existing field extraction scheme, the parallel complexity of multiple selectors is high, the routing is complex, and it is limited by the capacity boundaries of modules and buses. Although the use of an ultra-wide packet header vector PHV (Packet Header Vector) bus can support more field vectors, it will increase complexity and waste resources. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a message field extraction and transmission method, apparatus and device to eliminate or improve one or more defects existing in the prior art.
[0005] One aspect of the present application provides a message field extraction and transmission method, comprising:
[0006] Based on the pre-acquired field extraction indication, configuring the switch state of the inverse butterfly network in units of bits;
[0007] Selecting a message corresponding to a target layered protocol from among the messages in a message data conveyor currently input into a preset twin conveyor, and extracting a tag field from the header layered protocol data in the message corresponding to the target layered protocol according to the configured inverse butterfly network;
[0008] Each of the tag fields is placed on a message result conveyor belt in the twin conveyor belts for transmission.
[0009] In some embodiments of the present application, before configuring the switch state of the inverse butterfly network in units of bits based on the pre-acquired field extraction indication, the method further includes:
[0010] Each message is input into a message data conveyor belt in a preset twin conveyor belt for transmission, wherein the number of cycles of the message data conveyor belt corresponds to that of the message result conveyor belt.
[0011] In some embodiments of the present application, the configuring the switch state of the inverse butterfly network in bits based on the pre-acquired field extraction indication includes:
[0012] According to the preset header layer protocol configuration information, converting the pre-acquired field extraction indication into the inverse butterfly network configuration information;
[0013] Based on the inverse butterfly network configuration information, the switch state of the inverse butterfly network is configured in bits.
[0014] In some embodiments of the present application, it also includes:
[0015] Collect the respective tag fields corresponding to the preset current stage output by the message result conveyor, and output the respective tag fields to the target device or the processing unit of the next stage.
[0016] Another aspect of the present application provides a message field extraction and transmission device, including: a hierarchical field extraction module and a field transmission module;
[0017] The hierarchical field extraction module is used to configure the switch state of the inverse butterfly network in bits based on the pre-acquired field extraction indication;
[0018] The hierarchical field extraction module is also used to select a message corresponding to a target hierarchical protocol from each message in a message data conveyor belt currently input into a preset twin conveyor belt, and extract a tag field from the header hierarchical protocol data in the message corresponding to the target hierarchical protocol according to the configured inverse butterfly network;
[0019] The field transmission module is used to place the tag field on a message result conveyor belt in the twin conveyor belts for transmission.
[0020] In some embodiments of the present application, the field transmission module is also used to input each message into a message data conveyor belt in a preset twin conveyor belt for transmission, wherein the number of cycles of the message data conveyor belt corresponds to that of the message result conveyor belt.
[0021] In some embodiments of the present application, the hierarchical field extraction module includes: a field extraction decoder;
[0022] The field extraction decoder is used to convert the pre-acquired field extraction indication into the inverse butterfly network configuration information according to the preset header layer protocol configuration information;
[0023] The field extraction decoder is further used to configure the switch state of the inverse butterfly network in units of bits based on the inverse butterfly network configuration information.
[0024] In some embodiments of the present application, the message field extraction and transmission device further includes:
[0025] The stage output module is used to collect each of the tag fields corresponding to the preset current stage output by the message result conveyor belt, and output each of the tag fields to the target device or the processing unit of the next stage.
[0026] In some embodiments of the present application, there are multiple hierarchical field extraction modules;
[0027] Each of the hierarchical field extraction modules is respectively arranged between the message data conveyor belt and the message result conveyor belt in the twin conveyor belts;
[0028] Wherein, each of the hierarchical field extraction modules is respectively targeted at a different target hierarchical protocol;
[0029] The message data conveyor is used to receive and transmit each of the messages, and output each of the messages;
[0030] The message result conveyor belt is used to receive and transmit each of the tag fields, and output each of the tag fields.
[0031] The third aspect of the present application provides an electronic device, including a network card, an intelligent network card or a DPU, wherein the electronic device is provided with the message field extraction and transmission device.
[0032] The fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the message field extraction and transmission method when executed by a processor.
[0033] The message field extraction and transmission method provided by the present application configures the switch state of the inverse butterfly network in units of bits based on the pre-acquired field extraction indication; selects the message corresponding to the target layered protocol from each message in a message data conveyor belt currently input to the preset twin conveyor belt, and extracts the tag field from the header layer protocol data in the message corresponding to the target layered protocol according to the configured inverse butterfly network; and places each of the tag fields on a message result conveyor belt in the twin conveyor belt for transmission. The present application uses an inverse butterfly network for field extraction and uses a narrower bus for transmission of the extracted fields. The field extraction of one byte is configured by one bit, which greatly reduces the width of the configuration bus. At the same time, the use of an inverse butterfly network realizes the bit arrangement by byte and realizes the field extraction of the entire field range, simplifying the routing connection. In addition, the single-bus multi-cycle field transmission bus of the twin conveyor belt is used to match the bandwidth of the message input and the result output, so as to realize the same number of cycles as the message input to support the transmission of the extracted fields of any depth message. It can effectively reduce the width of the configuration bus and simplify the wiring connection, and effectively simplify the message field extraction and transmission process, reduce resource consumption and extraction and transmission complexity, and can effectively improve the efficiency of message field extraction and transmission.
[0034] Additional advantages, purposes, and features of the present application will be partially described in the following description, and will become partially apparent to those skilled in the art after studying the following, or may be learned from the practice of the present application. The purposes and other advantages of the present application can be achieved and obtained by the structures specifically pointed out in the specification and the drawings.
[0035] Those skilled in the art will understand that the purposes and advantages that can be achieved by the present application are not limited to the above specific description, and the above and other purposes that can be achieved by the present application will be more clearly understood based on the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings described herein are used to provide a further understanding of the present application, constitute a part of the present application, and do not constitute a limitation of the present application. The components in the drawings are not drawn to scale, but are only for the purpose of illustrating the principles of the present application. In order to facilitate the illustration and description of some parts of the present application, the corresponding parts in the drawings may be enlarged, that is, they may become larger relative to other components in the exemplary device actually manufactured according to the present application. In the drawings:
[0037] Figure 1 Schematic diagram of the existing field extraction and PHV transmission architecture.
[0038] Figure 2 Schematic diagram of the existing pipeline PHV transmission architecture.
[0039] Figure 3 The first flowchart of the message field extraction and transmission method in one embodiment of the present application is shown.
[0040] Figure 4 The figure is a schematic diagram showing an example of an inverse butterfly network structure in an embodiment of the present application.
[0041] Figure 5 The second flowchart of the message field extraction and transmission method in one embodiment of the present application is shown.
[0042] Figure 6 This is a first structural diagram of a message field extraction and transmission device in an embodiment of the present application.
[0043] Figure 7 This is a second structural diagram of the message field extraction and transmission device in one embodiment of the present application.
[0044] Figure 8 This is a functional block diagram of a hierarchical field extraction module in one embodiment of the present application.
[0045] Fig. 9 The present invention is a schematic diagram of an example of IPv4 field extraction configuration in an embodiment of the present application.
[0046] Fig.10 This is a schematic diagram showing an example of a high-performance field transmission mechanism in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the implementation modes and the accompanying drawings. Here, the illustrative implementation modes and descriptions of the present application are used to explain the present application, but are not intended to limit the present application.
[0048] It should also be noted here that in order to avoid obscuring the present application due to unnecessary details, only the structures and / or processing steps closely related to the scheme according to the present application are shown in the accompanying drawings, while other details that are not very relevant to the present application are omitted.
[0049] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0050] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0051] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0052] Existing field extraction solutions are as follows Figure 1 As shown in the figure. This scheme extracts the fields to be extracted from each layer layer by layer according to the layered protocol, and combines it with the message parsing scheme. The hardware structure usually uses multiple field extractors to extract different fields from the same message layer data source in parallel and write them into the ultra-wide message header vector (PHV) bus.
[0053] In order to cover the full range of fields of the data source, existing designs usually use multiple field extractors to perform parallel full-field extraction and write the results to the PHV implementation. This requires a huge circuit area both in terms of functional implementation and routing. To solve this problem, existing solutions divide the fields into 2B, 4B, 6B and other units to reduce the overall complexity. However, this also increases the complexity of extractor design and bus configuration. In short, existing field extraction solutions pursue performance at the expense of area.
[0054] In addition, the transmission after field extraction varies according to the architecture of the message parsing solution, such as pipeline architecture (such as Figure 2 As shown in the figure), it implements parsing of different layers and extracting fields of each layer through different pipeline stages. This pipeline method requires multi-level PHV registers. Since PHV is too wide, the maximum depth of the supported message layering protocol will be limited by resources.
[0055] The transmission of the field can also be based on the message parsing solution architecture, such as the multi-cycle parsing method, and the field is extracted and written into the PHV through multiple cycles. However, this method causes the PHV to take effect once in multiple cycles, wasting the overall bandwidth of the ultra-wide bus.
[0056] That is to say, the existing field extraction solutions have the following disadvantages:
[0057] 1. Multiple selectors make it difficult to control the scale; too many selectors waste area, while too few selectors cannot cover the entire range of extraction.
[0058] 2. The configuration of multiple selectors requires more configuration bits to represent fixed field extraction in each layer.
[0059] 3. Because the PHV is too wide, the range to be operated when the extracted field is updated is too large, resulting in a large routing area for the field to be written into the PHV.
[0060] 4. The pipeline PHV transmission structure will occupy a large number of registers and affect the timing as the number of pipeline stages increases. It basically does not meet the requirements of projects with too deep message parsing depth (many pipelines, many registers occupied, leading to resource and timing issues).
[0061] 5. The multi-cycle PHV transmission structure uses an ultra-wide bus, which greatly wastes bandwidth.
[0062] Therefore, existing solutions cannot balance resource overhead and capability boundaries.
[0063] Based on this, in order to solve the problems such as the mismatch in area and performance of the existing message field extraction and transmission mechanism, the embodiments of the present application respectively provide a message field extraction and transmission method, a message field extraction and transmission device for executing the message field extraction and transmission method, an electronic device and a computer-readable storage medium, which have excellent area and timing performance, can customize and transmit full field data, and provide a more efficient and simplified field extraction and transmission method and architecture by optimizing the field extraction algorithm and field transmission means.
[0064] The details are described in detail through the following examples.
[0065] Based on this, the embodiment of the present application provides a message field extraction and transmission method that can be implemented by a message field extraction and transmission device, see Figure 3 The message field extraction and transmission method specifically includes the following contents:
[0066] Step 100: Based on the pre-acquired field extraction indication, configure the switch state of the inverse butterfly network in units of bits.
[0067] In one or more embodiments of the present application, the inverse butterfly network is an IBF (Inverse Butterfly) network. The inverse butterfly network is a multi-stage cross switch network, which can realize data shifting and bit collection functions by configuring the state of the switch. In this way, the marked field can be extracted from the header layer protocol data through the following step 200.
[0068] Step 200: Select a message corresponding to a target layered protocol from among the messages in a message data conveyor belt currently input into a preset twin conveyor belt, and extract a tag field from the header layered protocol data in the message corresponding to the target layered protocol according to the configured inverse butterfly network.
[0069] In step 200, the structure of the IBF network is as follows: Figure 4As shown in the figure. It consists of multiple levels of 2-input and 2-output cross switches. Each cross switch is configured by 1. When configured as 0, data is passed directly; when configured as 1, data is crossed. Through multiple levels of 2-input and 2-output switches and different exchange positions implemented in each level, the IBF network can realize the functions of shifting and bit collection. It consists of a total of log2(N) levels, with N / 2 2-input and 2-output switches in each level; Figure 4 As shown, it is an IBF network with 8 input and output size, with a total of log2(8)*8 / 2=12 cross switches requiring 12 bits of configuration; assuming that the hierarchical field extraction provides a 32B range, a 32-input and output IBF network is required for implementation, requiring a total of log2(32)*32 / 2=80 bits; the inverse butterfly network has excellent timing performance and circuit area, and is suitable for the ability of array parallel extraction of fields. The timing performance combinational logic depth is equivalent to that of the shift register circuit, and the circuit area is excellent (the optimized 32-byte field extraction IBF network only requires 640 LUTs (Xilinx) after actual measurement. Among them, i0 to i7 are 8 inputs, and o0 to 07 are 8 outputs.
[0070] Step 300: Place each of the tag fields on a message result conveyor belt in the twin conveyor belts for transmission.
[0071] Through the design of twin conveyors, the field transmission mechanism of the present application realizes efficient transmission of field results. Through parallel data conveyors and result conveyors, bandwidth matching of data and results is achieved, which meets bandwidth requirements while simplifying the complexity of hardware wiring by reducing bus width through single bus multi-cycle. The header of the message can occupy any number of cycles on the data conveyor, and at the same time, the output transmission of message results of any depth is realized through the result conveyor with the same number of cycles. This design can flexibly adapt to the length and processing requirements of different messages, and realizes support for messages of arbitrary depth.
[0072] From the above description, it can be seen that the message field extraction and transmission method provided in the embodiment of the present application provides an extraction and transmission method that supports full-field customized extraction and supports arbitrary depth message extraction capacity transmission, which can effectively reduce the width of the configuration bus and simplify the routing connection, and effectively simplify the message field extraction and transmission process, reduce resource consumption and extraction and transmission complexity, and can effectively improve the efficiency of message field extraction and transmission.
[0073] In order to further solve the problems of mismatch between area and performance of the existing message field extraction and transmission mechanism, in a message field extraction and transmission method provided in an embodiment of the present application, see Figure 5 , the message field extraction and transmission method further specifically includes the following contents before step 100:
[0074] Step 010: Input each message into the message data conveyor belt in the preset twin conveyor belt for transmission, wherein the number of cycles of the message data conveyor belt corresponds to that of the message result conveyor belt.
[0075] The present application utilizes the twin conveyor belt concept to implement field transmission, which achieves optimal circuit area and performance through a single bus multi-cycle approach.
[0076] The twin conveyor belt design has two parallel conveyor belts, namely the message data conveyor belt and the message result conveyor belt. The message data conveyor belt is used to transmit the messages to be processed, and the message result conveyor belt is used to transmit the field extraction results.
[0077] Specifically, step 010 transmits each message to a message data conveyor (bus), each message contains data of multiple layered protocols, and occupies different numbers of bus cycles. The messages on the message data conveyor are transmitted in order.
[0078] In order to further improve the efficiency and reliability of configuring the switch state of the inverse butterfly network, in a message field extraction and transmission method provided in an embodiment of the present application, see Figure 5 , step 100 in the message field extraction and transmission method specifically includes the following contents:
[0079] Step 110: According to the preset header layer protocol configuration information, the pre-acquired field extraction indication is converted into the inverse butterfly network configuration information.
[0080] Step 120: Based on the inverse butterfly network configuration information, configure the switch state of the inverse butterfly network in units of bits.
[0081] Specifically, a field extraction decoder can be used to convert the field extraction indication into the configuration information of the inverse butterfly network according to the configuration information. The field extraction decoder can dynamically decode into ibf_cfg_bits (configuration of all crossbar switches of the IBF network) according to the field extraction configuration byte_vld_bits (1 bit represents 1 byte) of the current layer and the field transmission indication extracted in the previous layer.
[0082] Among them, the field extraction decoder provides the following advantages:
[0083] a) Reduce the configuration bus width; the bit arrangement function of the IBF network is realized by dynamically configuring all 2-input and 2-output crossbar switches. Taking 32B extraction capability as an example, 80 bits are required for configuration. Decoding only requires 32 bits, which is 48 bits less;
[0084] b) Optimize the field transmission hardware design through dynamic shifting. The extraction of fields requires the transmission of fields extracted from different layered protocols to the result bus. The inverse butterfly network has a shifting function, which can perform shift operations based on the results extracted by the previous layered field extraction module, simplifying the hardware structure of the result aggregation.
[0085] In order to further improve the transmission effectiveness and reliability after the message field is extracted, in a message field extraction and transmission method provided in an embodiment of the present application, see Figure 5 , the message field extraction and transmission method further specifically includes the following contents after step 300:
[0086] Step 400: Collect the respective tag fields corresponding to the preset current stage output by the message result conveyor, and output the respective tag fields to the target device or the processing unit of the next stage.
[0087] Furthermore, based on the above-mentioned embodiment of the message field extraction and transmission method, the present application also provides an embodiment of a message field extraction and transmission device, see Figure 6 , the message field extraction and transmission device specifically includes the following contents:
[0088] Hierarchical field extraction module 10 and field transmission module 20;
[0089] The hierarchical field extraction module 10 is used to configure the switch state of the inverse butterfly network 12 in bits based on the pre-acquired field extraction indication.
[0090] The layered field extraction module 10 is also used to select a message corresponding to a target layered protocol from among the messages in a message data conveyor belt 21 currently input into a preset twin conveyor belt, and to extract a tag field (extracted_fields) from the header layered protocol data (header_layer_data) in the message corresponding to the target layered protocol according to the configured inverse butterfly network 12.
[0091] The field transmission module 20 is used to place the tag field on a message result conveyor belt 22 in the twin conveyor belts for transmission.
[0092] The embodiment of the message field extraction and transmission device provided in the present application can be specifically used to execute the processing flow of the embodiment of the message field extraction and transmission method in the above-mentioned embodiment. Its functions will not be repeated here, and the detailed description of the above-mentioned message field extraction and transmission method embodiment can be referred to.
[0093] In order to further solve the problems such as the mismatch in area and performance of the existing message field extraction and transmission mechanism, in a message field extraction and transmission device provided in an embodiment of the present application, the field transmission module 20 in the message field extraction and transmission device is also used to input each message into the message data conveyor belt 21 in the preset twin conveyor belt for transmission, wherein the message data conveyor belt 21 corresponds to the number of cycles of the message result conveyor belt 22.
[0094] In order to further improve the efficiency and reliability of configuring the switch state of the inverse butterfly network, in a message field extraction and transmission device provided in an embodiment of the present application, see Figure 7 The hierarchical field extraction module 10 in the message field extraction and transmission device specifically includes the following contents:
[0095] The field extraction decoder 11 is used to convert the pre-acquired field extraction indication into the inverse butterfly network configuration information according to the preset header layer protocol configuration information.
[0096] The field extraction decoder 11 is further used to configure the switch state of the inverse butterfly network 12 in units of bits based on the inverse butterfly network configuration information.
[0097] Specifically, the hierarchical field extraction module 10 performs field extraction according to the hierarchical field extraction configuration. Figure 8 As shown in FIG. 1 , its main modules include a field extraction decoder and an inverse butterfly network (IBF). The field extraction decoder converts the field extraction indication into the configuration information of the inverse butterfly network according to the configuration information. The inverse butterfly network is a multi-level cross switch network. By configuring the state of the switch, the data shift and bit collection functions can be realized. In this way, the hierarchical field extraction module can extract the marked fields from the hierarchical header data.
[0098] The field extraction decoder dynamically decodes the byte_vld_bits (1 bit represents 1 byte) of the field extraction configuration of this layer and the transmission indication of the extracted field of the previous layer into ibf_cfg_bits (the configuration of all cross switches of the IBF network).
[0099] See also Fig. 9 , taking IPv4 field extraction as an example to illustrate the field extraction function. The hierarchical field extraction module supports field extraction with byte precision.
[0100] a) Fig. 9 The arrow on the left is the IPv4 header format, and the arrow on the right is an illustration of the compression after field extraction.
[0101] b) Fig. 9The grayscale filled box to the left of the arrow is the field to be extracted. Divide it by byte and mark the bits accordingly, and finally get byte_vld_bits: 0xFF342.
[0102] c) After extraction by the hierarchical field extraction module, we will get Fig. 9 The result is the result of the arrow to the right. (The result will be shifted according to the state of the field extracted in the previous stage to simplify the hardware design of field transfer)
[0103] Through the above steps, the fields of various protocols can be flexibly extracted to realize customized bit arrangement function and field extraction function.
[0104] In order to further improve the transmission effectiveness and reliability after the message field is extracted, in a message field extraction and transmission device provided in an embodiment of the present application, see Figure 7 The message field extraction and transmission device further specifically includes the following contents:
[0105] The stage output module 30 is used to collect the respective tag fields corresponding to the preset current stage output by the message result conveyor belt 22, and output the respective tag fields to the target device or the processing unit of the next stage.
[0106] According to needs, the results can be output from the result conveyor belt to the target device or the next stage of processing unit after certain collection.
[0107] In addition, there may be multiple hierarchical field extraction modules 10;
[0108] Each of the hierarchical field extraction modules 10 is respectively arranged between the message data conveyor belt 21 and the message result conveyor belt 22 in the twin conveyor belts;
[0109] Wherein, each of the hierarchical field extraction modules is respectively targeted at a different target hierarchical protocol;
[0110] The message data conveyor 21 is used to receive and transmit each of the messages, and output each of the messages;
[0111] The message result conveyor belt 22 is used to receive and transmit each of the tag fields, and output each of the tag fields.
[0112] After the field extraction is completed, the result needs to be transmitted. This application uses the twin conveyor belt idea to realize the field transmission. It uses a single bus multi-cycle method to achieve the best circuit area and performance. One of the high-performance field transmission mechanisms is as follows Fig.10 As shown in the figure, the application of the twin conveyor belt idea to achieve result transmission can be achieved through the following design:
[0113] 1. Twin conveyor belt design: Design two parallel conveyor belts, one for message data and the other for message result. The data conveyor belt is used to transmit messages to be processed, and the result conveyor belt is used to transmit field extraction results.
[0114] 2. Data conveyor (bus): Messages are transferred one by one to the message data conveyor. Each message contains data of multiple layered protocols and occupies different numbers of bus cycles. Messages on the conveyor are transferred in order.
[0115] 3. Data processing: Between the two conveyor belts, multiple hierarchical field extraction modules 10 are arranged in a pipeline. Each hierarchical field extraction module 10 only extracts fields for the target hierarchical protocol of interest. The hierarchical field extraction module 10 performs field extraction operations on the message according to the hierarchical protocol it can process, and does not process the unknown layers. The hierarchical field extraction module of the multi-stage pipeline realizes the field extraction capability of the entire message.
[0116] Result conveyor (bus): The hierarchical field extraction module 10 places the processing results on the message result conveyor and transmits them at a rhythm corresponding to the message data bus. Since the number of cycles that the results occupy on the message result conveyor corresponds to the number of cycles that the data occupy on the message data conveyor, the timing consistency of the results is guaranteed.
[0117] In other words, the purpose of this application is to solve the problem of mismatch between area and performance of existing message field extraction and transmission mechanisms. In the existing solution, the parallel complexity of multiple selectors is high, the routing is complex, and it is limited by the capacity boundaries of modules and buses. Although the use of an ultra-wide PHV bus can support more fields, it will increase complexity and waste resources. Therefore, there is a trade-off between resource overhead and capacity boundaries in the existing solution.
[0118] In order to solve this problem, the embodiment of the present application proposes a high-performance architecture for message field extraction and transmission. The architecture uses a combination of a decoder and an inverse butterfly network for field extraction, and uses a narrower bus for transmission of the extracted field. By configuring the field extraction of one byte by one bit, the width of the configuration bus is greatly reduced. At the same time, the use of an inverse butterfly network realizes the bit arrangement by byte and realizes the field extraction of the entire field range, simplifying the wiring connection. In addition, a single-bus multi-cycle field transmission bus is used to match the bandwidth of the message input and result output, and the same number of cycles as the message input is achieved to support the transmission of the extracted field of any depth message.
[0119] Based on this, through the customization and full field extraction capabilities of the hierarchical field extraction module, as well as the bandwidth matching and support for arbitrary depth message field extraction capabilities of the twin conveyor belt idea, the high-performance message field extraction and transmission capabilities of this application are realized.
[0120] In addition, the twin conveyor belt idea realizes a method of using a single narrower bus to transmit more content through multiple cycles. The core idea is to process the data at the same rhythm as the input data to achieve the corresponding processing result output. This method can be applied to different application fields and specific implementation methods, especially in the DPU field, but its basic principle remains unchanged. Therefore, the application of the twin conveyor belt optimization idea also falls within the scope of protection of this application. For example, other parsing results output by layer-by-layer parsing according to the layered protocol in message parsing, or the result transmission method during message matching and execution, etc., which are optimized from the original ultra-wide bus to a narrow bus with multiple cycles, can be regarded as inspiration for this application.
[0121] Furthermore, based on the above-mentioned embodiments of the message field extraction and transmission method and / or the message field extraction and transmission device, the present application also provides an embodiment of an electronic device. The electronic device is provided with the message field extraction and transmission device mentioned in the above-mentioned embodiments.
[0122] The electronic device can also refer in particular to a network processing device, in particular to a network card, an intelligent network card, and a DPU, etc., so that the electronic device can solve the problem of area and performance mismatch in field extraction and transmission implementation of existing network cards, intelligent network cards or DPUs. By optimizing the field extraction algorithm and field transmission means, an extraction and transmission architecture that supports full-field custom extraction and supports arbitrary depth message extraction capacity transmission is provided. With an efficient field extraction and transmission circuit solution, fewer resources are used to achieve fully programmable field extraction according to the layered protocol, and deeper message header field extraction results are transmitted through a narrower transmission bus to achieve high-performance message processing. Such a design can minimize the use of circuit area while meeting performance requirements.
[0123] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned message field extraction and transmission method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0124] In order to further illustrate the difference between the present application and the prior art, a detailed comparison is now made, see Table 1, specifically:
[0125] 1) According to the present application, a full field extraction capability is realized with one module, and smaller area and wiring resources are obtained to realize field extraction and update to the transmission bus, which solves the problem that the existing solution requires multiple multiplexers and complex wiring.
[0126] 2) According to the present application, one bit is used to represent the extraction configuration of one byte precision, thereby obtaining a very small configuration bus, solving the problem of the existing solution that multiple multiplexers require a large number of control signals to form ultra-wide instructions.
[0127] 3) According to the twin conveyor belt idea proposed in this application, the field results are updated to a narrower transmission bus, which solves the complex routing problem when the existing solution updates the field to the PHV ultra-wide bus.
[0128] 4) According to the twin conveyor belt idea proposed in this application, a narrow bus multi-cycle transmission field result is obtained and a one-to-one matching of the message header input rhythm is achieved, which solves the hardware architecture design defect problem caused by the mismatch of the existing solution's narrow input (multi-cycle header input) and wide output (PHV is the entire message result) (the pipeline occupies a large number of register resources, and multiple cycles waste bus bandwidth utilization).
[0129] 5) Based on the full-field extraction capability of the present application and the full-field transmission capability of the twin conveyor belt, the possibility of arbitrary custom field extraction is obtained, which solves the problem that the existing solution needs to consider the limitations of field extraction and transmission capabilities when implementing field extraction.
[0130] a) If Figure 1 Existing solutions shown:
[0131] i. The number of multiplexers and the size of PHV are designed according to the needs of the downstream, and the fields are divided into more accurate unit sizes according to business needs to optimize the area, which leads to the need to consider the capacity boundary issue when the business changes.
[0132] ii. The choice of PHV width limits the support for messages that exceed the capability range, such as messages with extra-deep headers.
[0133] b) This application:
[0134] i. Full-field extraction and transmission capabilities; the back-end business can freely define the extraction of fields: including but not limited to the KEY used for table lookup, the fields used for Action operations, etc.
[0135] ii. The transmission bus matches the message input multiple cycles one by one. No matter how long the message header is, the transmission after field extraction is satisfied through multiple cycles.
[0136] Table 1
[0137]
[0138]
[0139] That is to say, the message field extraction and transmission method, message field extraction and transmission device, and electronic device provided by the present application, by adopting the twin conveyor belt idea, can realize field transmission in a single bus multi-cycle mode, and realize an efficient transmission mode with full field range extraction performance, small area, and high utilization rate; by adopting the twin conveyor belt idea, the number of cycles of the transmission bus matches the number of message input cycles one-to-one, and the field extraction support of the message header of any depth can be realized; by adopting the inverse butterfly network + self-developed field extraction decoder: a single hierarchical field extraction module can be realized to realize the extraction of the entire field of the message; by adopting the inverse butterfly network + field extraction decoder: the configuration of field extraction adopts 1 bit corresponding to 1 byte extraction; decoding is realized by the field extraction decoder, which can greatly save the configuration bus width. The field extraction decoder can realize dynamic decoding to the inverse butterfly network configuration bit according to the field extraction configuration and the actual bus transmission situation indication.
[0140] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is specifically performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit ASIC, appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0141] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0142] In the present application, features described and / or illustrated for one embodiment may be used in the same manner or in a similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0143] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the embodiments of the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A message field extraction and transmission method, characterized in that: include: Input each message into a single message data conveyor belt in a preset twin conveyor belt for transmission, wherein the twin conveyor belt is provided with a parallel message data conveyor belt and a message result conveyor belt, and the number of cycles of the message data conveyor belt and the message result conveyor belt corresponds to each other; Based on the pre-acquired field extraction indication, configuring the switch state of the inverse butterfly network in units of bits; Selecting a message corresponding to a target layered protocol from among the messages in a message data conveyor currently input into a preset twin conveyor, and extracting a tag field from the header layered protocol data in the message corresponding to the target layered protocol according to the configured inverse butterfly network; Each of the tag fields is placed on a message result conveyor belt in the twin conveyor belts for transmission.
2. The message field extraction and transmission method according to claim 1, characterized in that: The configuration of the switch state of the inverse butterfly network in units of bits based on the pre-acquired field extraction indication includes: According to the preset header layer protocol configuration information, converting the pre-acquired field extraction indication into the inverse butterfly network configuration information; Based on the inverse butterfly network configuration information, the switch state of the inverse butterfly network is configured in bits.
3. The message field extraction and transmission method according to claim 1, characterized in that: Also includes: Collect the respective tag fields corresponding to the preset current stage output by the message result conveyor, and output the respective tag fields to the target device or the processing unit of the next stage.
4. A message field extraction and transmission device, characterized in that: include: Hierarchical field extraction module and field transfer module; The hierarchical field extraction module is used to configure the switch state of the inverse butterfly network in bits based on the pre-acquired field extraction indication; The hierarchical field extraction module is also used to select a message corresponding to a target hierarchical protocol from each message in a message data conveyor belt currently input into a preset twin conveyor belt, and extract a tag field from the header hierarchical protocol data in the message corresponding to the target hierarchical protocol according to the configured inverse butterfly network; The field transmission module is used to place the tag field on a message result conveyor belt in the twin conveyor belts for transmission; The field transmission module is also used to input each message into a single message data conveyor belt in a preset twin conveyor belt for transmission, wherein the twin conveyor belt is provided with a parallel message data conveyor belt and a message result conveyor belt, and the number of cycles of the message data conveyor belt corresponds to that of the message result conveyor belt.
5. The message field extraction and transmission device according to claim 4, characterized in that: The hierarchical field extraction module includes: a field extraction decoder; The field extraction decoder is used to convert the pre-acquired field extraction indication into the inverse butterfly network configuration information according to the preset header layer protocol configuration information; The field extraction decoder is further used to configure the switch state of the inverse butterfly network in units of bits based on the inverse butterfly network configuration information.
6. The message field extraction and transmission device according to claim 4, characterized in that: Also includes: The stage output module is used to collect each of the tag fields corresponding to the preset current stage output by the message result conveyor belt, and output each of the tag fields to the target device or the processing unit of the next stage.
7. The message field extraction and transmission device according to any one of claims 4 to 6, characterized in that: There are multiple hierarchical field extraction modules; Each of the hierarchical field extraction modules is respectively arranged between the message data conveyor belt and the message result conveyor belt in the twin conveyor belts; Wherein, each of the hierarchical field extraction modules is respectively targeted at a different target hierarchical protocol; The message data conveyor is used to receive and transmit each of the messages, and output each of the messages; The message result conveyor belt is used to receive and transmit each of the tag fields, and output each of the tag fields.
8. An electronic device, comprising a network card, a smart network card or a DPU, characterized in that: The electronic device is provided with the message field extraction and transmission device as described in any one of claims 4 to 7.
