Imix traffic sending method, electronic equipment and computer readable medium
By generating a package length set that meets the mixed frame length ratio and determining the packet order, the problem of mixed frame length traffic testing in the performance test of network storage and forwarding equipment is solved, and the accurate performance evaluation and system design verification of network storage and forwarding equipment are achieved.
Patent Information
- Application Number
- CN202310490252.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2024-11-05
AI Technical Summary
In the performance test of network storage and forwarding devices, it is difficult to accurately evaluate forwarding performance and cache design for mixed frame long traffic tests, especially in fullmesh and backbone networking scenarios, and the existing technology is difficult to effectively assist system design and verification.
By generating a packet length set that meets the mixed frame length ratio, the packet transmission order of the source port is determined, and data packets are generated and sent according to this order, so that the data flow ratio between the source port and the destination port of the network storage and forwarding device meets the imix traffic. Mixed requirements.
The test of mixed-ratio network storage and forwarding devices with any number of ports and any imix traffic is realized, effectively assisting system design and benchmarking, ensuring the accuracy and performance evaluation of cache design.
Smart Images

Figure CN118900256A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to an imix traffic sending method, an electronic device, and a computer-readable medium. Background Art
[0002] As the network develops, network services have an increasing demand for storage and forwarding equipment resources. In forwarding performance testing, mixed frame length (imix) traffic is more in line with the current network traffic characteristics, and imix traffic testing has become a must-test item for network storage and forwarding equipment performance testing.
[0003] Imix traffic is composed of messages of different frame lengths mixed in a certain proportion, and each port needs to forward messages of different frame lengths. Messages of different frame lengths require different forwarding delays, so when a port of a network storage and forwarding device forwards long byte messages, messages of other lengths may accumulate at the port, causing short-term congestion. Usually, a larger cache is required to absorb the accumulation to avoid packet loss. Therefore, cache design becomes the key to the design of storage and forwarding chips. Especially in fullmesh and backbone networking scenarios, multiple ports send mixed frame length traffic to each other at the same time, the source port traffic will be sent to multiple destination ports, and the destination port will receive traffic from multiple source ports. After the traffic is superimposed, the burst will be further increased, which puts higher requirements on the cache design of the storage and forwarding chip. In the fullmesh and backbone networking scenarios, when performing Imix traffic testing on the storage and forwarding chip design, the ratio of the source port traffic, the destination port traffic, and the packet length in the unit sequence must meet the ratio requirements of the mixed frame length, and traffic anomalies will make it impossible to correctly evaluate the forwarding performance and cache design of the chip under test.
[0004] Therefore, constructing an accurate IMX traffic model is crucial to completing the IMX traffic test of the store-and-forward chip. Summary of the invention
[0005] The embodiments of the present disclosure provide an imix traffic sending method, an electronic device, and a computer-readable medium.
[0006] In a first aspect, an embodiment of the present disclosure provides an imix traffic sending method, comprising: determining a packet length set consisting of multiple packet lengths according to a packet length ratio, wherein the proportion of the number of identical packet lengths in the packet length set satisfies the packet length ratio; determining a packet sending order of multiple source ports according to the packet length set, wherein the packet sending order represents a flow sending order of multiple data streams of the source port and an order of packet lengths of data packets of the data streams, and one data stream corresponds to one destination port; generating and sending data packets of each of the data streams according to the packet sending order of each of the source ports and the packet length set.
[0007] In a second aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a memory on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the imix traffic sending method described in the first aspect of the embodiment of the present disclosure.
[0008] In a third aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the imix traffic sending method described in the first aspect of the embodiment of the present disclosure is implemented.
[0009] The imix traffic sending method provided by the embodiment of the present disclosure generates a packet length set consisting of multiple packet lengths according to the packet length ratio, then determines the packet sending order of multiple source ports, and generates data packets of data streams of each source port according to the packet sending order of each source port. After the generated data packets are sent to the corresponding source port in the network storage and forwarding device, the source port and the destination port of the network storage and forwarding device can send data streams according to the packet sending order of each source port, so that the ratio of data packets with different packet lengths of the source port, the destination port, and the data stream of the network storage and forwarding device meets the mixed ratio requirement of the imix traffic; the imix traffic sending method provided by the embodiment of the present disclosure can be used to test network storage and forwarding devices with any number of ports, any port type, and any mixed ratio of imix traffic, thereby effectively assisting system verification in the system design stage. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 is a flow chart of an imix traffic sending method in an embodiment of the present disclosure;
[0011] Figure 2 It is a flowchart of some steps in another imix traffic sending method in an embodiment of the present disclosure;
[0012] Figure 3 It is a flowchart of some steps in another imix traffic sending method in an embodiment of the present disclosure;
[0013] Figure 4 is a schematic diagram of the composition of an electronic device in an embodiment of the present disclosure;
[0014] Figure 5 is a schematic diagram of the composition of a computer-readable medium in an embodiment of the present disclosure;
[0015] Figure 6 This is a schematic diagram of the connection between an imix traffic model generator and a device or chip in this embodiment;
[0016] Figure 7It is a schematic diagram of the composition of an imix traffic sending device in an embodiment of the present disclosure;
[0017] Figure 8 It is a schematic diagram of determining a starting position in a packet length set in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0018] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the imix traffic sending method, electronic device, and computer-readable medium provided by the present disclosure are described in detail below with reference to the accompanying drawings.
[0019] Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.
[0020] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0021] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0022] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded.
[0023] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.
[0024] First, refer to Figure 1 , the present disclosure embodiment provides an imix traffic sending method, including:
[0025] S1. Determine a packet length set consisting of multiple packet lengths according to the packet length ratio, wherein the proportion of the number of identical packet lengths in the packet length set satisfies the packet length ratio;
[0026] S2. Determine the packet sending order of multiple source ports according to the packet length set, wherein the packet sending order represents the sending order of multiple data flows of the source port and the order of the packet lengths of the data packets of the data flows, and one data flow corresponds to one destination port;
[0027] S3. Generate and send data packets of each of the data flows according to the packet sending sequence of each of the source ports and the packet length set.
[0028] The disclosed embodiment does not impose any special limitation on the packet length ratio. The packet length ratio determines the mixing ratio of data packets with different packet lengths in the imix traffic and can be configured as needed. By configuring different packet length ratios, imix traffic with different mixing ratios can be obtained.
[0029] In the disclosed embodiment, a packet length set is a data set consisting of packet lengths, where one packet length corresponds to one data packet, and is used to represent a set consisting of data packets of different packet lengths.
[0030] In the embodiments of the present disclosure, the network storage forwarding device is usually composed of dozens to hundreds of ports, wherein the source port is the input direction of the network storage forwarding device and the destination port is the output direction of the network storage forwarding device; the data flow is a collection of data packets from a source port to a destination port.
[0031] In the embodiments of the present disclosure, the transmission sequence of multiple data streams of multiple source ports includes both the transmission sequence of multiple data streams of one source port and the relationship between the transmission sequences of data streams of multiple source ports. The sequence of packet lengths of data packets of a data stream indicates the packet lengths of each data packet sequentially sent when sending a data stream.
[0032] In the embodiments of the present disclosure, data packets of each data stream are generated according to the packet sending order of each source port, so that the generated data packets can be sent to the corresponding source port in the network storage and forwarding device, so that the data stream is sent between the source port and the destination port of the network storage and forwarding device according to the packet sending order of each source port, so that the ratio of data packets of different packet lengths of the source port, destination port, and data stream of the network storage and forwarding device meets the mixed ratio requirement of imix traffic.
[0033] The imix traffic sending method provided in the embodiments of the present disclosure can be used to test network storage and forwarding devices with any number of ports, any port type (such as 10G, 100G, 200G, etc.), and any mixed ratio of imix traffic, thereby effectively assisting system verification in the system design phase, and is also suitable for benchmarking storage and forwarding chips.
[0034] The disclosed embodiment does not specifically limit how to generate a packet length set.
[0035] In some embodiments, reference Figure 2 , a packet length set consisting of multiple packet lengths is generated according to the packet length ratio, including:
[0036] S11, generating multiple packet lengths according to the packet length ratio;
[0037] S12: Determine the order of multiple packet lengths to obtain the packet length set.
[0038] For example, the mixing ratio of the imix traffic with an average packet length of 424 bytes is 78 bytes: 192 bytes: 436 bytes: 720 bytes: 1500 bytes: 9000 bytes, which is equal to 4:41:51:2:1:1. Then the generated packet length set including 100 packet lengths includes: 4 packet lengths representing 78 bytes, 41 packet lengths representing 192 bytes, 51 packet lengths representing 436 bytes, 2 packet lengths representing 720 bytes, 1 packet length representing 1500 bytes, and 1 packet length representing 9000 bytes. In some embodiments, the packet lengths in the packet length set can be represented as values such as 78, 192, 436, 720, 1500, and 9000.
[0039] The disclosed embodiment does not specifically limit how to arrange multiple packet lengths in a packet length set.
[0040] In some embodiments, the ordering of the multiple packet lengths in the packet length set makes the sum of the first half packet lengths and the sum of the second half packet lengths in the sequence composed of the multiple packet lengths as balanced as possible, thereby achieving a flow balancing effect.
[0041] In some embodiments, multiple packet lengths in the packet length set are randomly arranged, and the resulting arrangement can make the sum of the first half packet lengths and the sum of the second half packet lengths in the sequence composed of the multiple packet lengths as balanced as possible.
[0042] Accordingly, in some embodiments, multiple packet lengths are sorted to obtain the packet length set, including:
[0043] A random index is assigned to each packet length, wherein the random index represents the order of the corresponding packet length in the packet length set.
[0044] In the disclosed embodiment, the random index assigned to each packet length is unique, and the random indexes assigned to different packet lengths are different. For example, the number of packet lengths in the packet length set is m, and the random index is an integer from 0 to m-1.
[0045] In some embodiments, after generating multiple packet lengths according to the packet length ratio, generating a packet length set consisting of multiple packet lengths according to the packet length ratio further includes:
[0046] Perform data validity checks on multiple packet lengths.
[0047] The embodiments of the present disclosure do not impose any special limitation on the data validity detection. For example, the data validity detection includes detecting whether the value of the packet length is between 64 bytes and 9600 bytes.
[0048] In some embodiments, reference Figure 2 , determining the packet sending order of multiple source ports according to the packet length set, including:
[0049] S21, determining a flow sending order of multiple data flows of each of the source ports, wherein, according to the flow sending order, the data flows sent by each of the source ports at the same packet sending time correspond to different destination ports respectively;
[0050] S22: Determine the packet length of each data packet of the data flow according to the transmission order of the multiple data flows of the source port and the sorting of the multiple packet lengths in the packet length set.
[0051] In the embodiment of the present disclosure, by determining the transmission order of multiple data streams of each source port, the data streams sent by each source port at the same packet transmission moment correspond to different destination ports, thereby avoiding process abnormalities caused by sending data streams of multiple source ports to the same destination port at the same time.
[0052] The disclosed embodiment does not specifically limit how to make the data streams sent by each source port at the same packet sending moment correspond to different destination ports. For example, when the source port sends the first message of each data stream, the data stream corresponding to each source port is expressed as: source 1->destination 2, source 2->destination 3, source 3->destination 4, ...; when the source port sends the second message of each data stream, the data stream corresponding to each source port is expressed as: source 1->destination 3, source 2->destination 4, source 3->destination 5, ...; and so on. After the source port sends the message corresponding to the last destination port, it re-circulates the stream from the first source port, thereby ensuring that the destination port basically receives the data stream of one source port at the same packet sending moment.
[0053] The embodiments of the present disclosure do not specifically limit how to determine the packet length of the data packets of each data stream.
[0054] In some embodiments, determining the packet length of each data packet of the data stream according to the transmission order of the multiple data streams of the source port and the sorting of the multiple packet lengths in the packet length set includes:
[0055] For any one of the source ports, according to the transmission order of the multiple data flows of the source port, determine the starting packet length in the packet length set corresponding to each of the data flows;
[0056] The packet lengths of the data packets of each of the data flows are determined respectively according to the starting packet length corresponding to each of the data flows and the order of the multiple packet lengths in the packet length set.
[0057] In some embodiments, determining the starting packet length in the packet length set corresponding to each of the data flows according to the transmission order of the multiple data flows of the source port includes:
[0058] According to the order in which the flow numbers of the multiple data flows of the source port increase and the sequence numbers of the data packets constituting the data flows increase, the multiple packet lengths in the packet length set are sequentially determined as the starting packet lengths corresponding to the respective data flows according to the sorting;
[0059] Determining the packet length of each data stream according to the starting packet length corresponding to each data stream and the order of multiple packet lengths in the packet length set, respectively, comprises:
[0060] For any of the data flows, the packet lengths of the data packets of the data flow are determined in sequence starting from the starting packet length corresponding to the data flow according to the order of the multiple packet lengths in the packet length set.
[0061] In some embodiments, when performing at least one round of flow transmission, the first number of data packets corresponding to the source port in each round of flow transmission is a common multiple of the second number and the third number, the second number is the number of the destination ports, and the third number is the number of packet lengths in the packet length set.
[0062] In the embodiment of the present disclosure, making the first number a common multiple of the second number and the third number can ensure that the ratio of any third number of data packets of the source port, the destination port, and the data flow meets the packet length ratio.
[0063] In some embodiments, determining the starting packet length in the packet length set corresponding to each of the data flows according to the transmission order of the multiple data flows of the source port includes:
[0064] Determine a random index of a starting packet length corresponding to the data flow according to a transmission order of the plurality of data flows of the source port, wherein each packet length in the packet length set corresponds to a random index, and the random index represents the order of the corresponding packet length in the packet length set;
[0065] Determining the packet length of each data stream according to the starting packet length corresponding to each data stream and the order of multiple packet lengths in the packet length set, respectively, comprises:
[0066] The packet lengths of the data packets of the respective data flows are determined respectively according to the random index of the starting packet length corresponding to the respective data flows and the random index of each packet length in the packet length set.
[0067] In some embodiments, in the case of multiple rounds of flow transmission, determining the packet length of each data packet of the data flow according to the flow transmission order of the multiple data flows of the source port and the sorting of the multiple packet lengths in the packet length set, further comprising:
[0068] Corresponding to any round-trip flow, determining the starting position in the packet length set, where the starting positions corresponding to different round-trip flows are different;
[0069] The packet length of each data packet of the data flow is determined according to the transmission order of the multiple data flows of the source port, the order of the multiple packet lengths in the packet length set and the starting position.
[0070] For example, source port i sends K data packets in each round of traffic transmission, which requires three rounds of traffic transmission.
[0071] In the first round of traffic transmission, starting from the packet length with random index 0 in the packet length set, the packet lengths in the packet length set are selected in turn as the packet lengths of the corresponding data packets;
[0072] In the second round of traffic transmission, starting from the packet length with random index 1 in the packet length set, the packet lengths in the packet length set are selected in turn as the packet lengths of the corresponding data packets;
[0073] In the third round of traffic transmission, starting from the packet length with a random index of 2 in the packet length set, the packet lengths in the packet length set are selected in sequence as the packet lengths of the corresponding data packets.
[0074] In some embodiments, determining the packet length of each data packet of the data stream according to the transmission order of the multiple data streams of the source port and the sorting of the multiple packet lengths in the packet length set further includes:
[0075] A stream packet length set of the data stream is generated according to the selected packet lengths of the data packets of the data stream, wherein the packet lengths of the data packets of the data stream in the stream packet length set are arranged according to a selection order.
[0076] The embodiments of the present disclosure do not specifically limit how to generate data packets of each data flow according to the packet sending sequence of each source port.
[0077] In some embodiments, reference Figure 2 , generating data packets of each of the data flows according to the packet sending order of each of the source ports and the packet length set, including:
[0078] S31, determining a packet sending interval between data packets of the data stream according to the rate of the data stream and the packet length of the data packets constituting the data stream;
[0079] S32: Generate a data packet of the data stream according to the packet sending sequence of the source port and the packet sending interval.
[0080] In the disclosed embodiment, the packet sending interval is determined, and data packets of the data stream are generated according to the packet sending interval, so that the data stream can satisfy the mixed ratio of the imix traffic and also meet the traffic bandwidth of the network storage and forwarding device port.
[0081] The embodiments of the present disclosure do not specifically limit how to determine the packet sending interval.
[0082] In some embodiments, determining the packet sending interval between data packets of the data stream according to the rate of the data stream and the packet length of the data packets constituting the data stream includes:
[0083] Adding tokens to a token bucket according to the rate of the data stream, wherein the tokens represent information about the packet length that can be sent;
[0084] The packet sending interval is calculated according to the packet length of the data packet of the data flow and the tokens in the token bucket.
[0085] For example, the rate of a single stream is initialized, and tokens are added to the token bucket at a constant rate converted from the clock beat. The token represents the length of the packet that can be sent. According to the current length of the packet to be sent and the length of the packet that can be sent in the token bucket, the interval between data packets is calculated. If the current length of the packet to be sent is less than or equal to the length of the packet in the token bucket, the data packet can be sent, and the length of the packet in the token bucket minus the length of the packet to be sent. If the length of the packet to be sent is greater than the length of the packet in the token bucket, no operation is performed and the judgment is made again in the next clock cycle. The interval between packets of different lengths under each stream is controlled by the cycle waiting judgment method to ensure the rate requirement. Among them, suppose the rate of a single port is R, and there are n-1 streams from a single port to n destination ports, then the rate of a single stream under the port is R / (n-1). From the outbound statistics, the number of streams gathered to the same outbound port is n-1, then the rate of the destination port = (R / (n-1))*(n-1) = R.
[0086] In some embodiments, generating a data packet of the data stream according to the packet sending order of the source port and the packet sending interval includes:
[0087] According to the packet sending order of the source port, the packet length of the data packet is obtained from the flow packet length set of each data flow of the source port, wherein the arrangement order of the packet lengths of the data packets of the data flow in the flow packet length set represents the sending order of the data packets;
[0088] The data packet is generated by framing according to the packet length of the data packet and the packet sending interval.
[0089] In some embodiments, reference Figure 2 , sending data packets of each of the data streams, including:
[0090] S33, sending the data packet to a chip simulation model or a test chip.
[0091] In some embodiments, reference Figure 3 , the imix traffic sending method further includes:
[0092] S4. Configure the packet length ratio.
[0093] The embodiment of the present disclosure does not specifically limit the form of the packet length ratio. For example, as shown in Table 1, the packet length ratio can be expressed in the form of multiple (packet length, weight) tuples.
[0094] Table 1
[0095]
[0096] In some embodiments, the packet length ratio is configured into a corresponding configuration space for subsequent reading to generate a packet length set.
[0097] Second, refer to Figure 4 , an embodiment of the present disclosure provides an electronic device, comprising:
[0098] One or more processors 101;
[0099] A memory 102, on which one or more programs are stored. When the one or more programs are executed by one or more processors, the one or more processors implement the imix traffic sending method described in the first aspect of the embodiment of the present disclosure;
[0100] One or more I / O interfaces 103 are connected between the processor and the memory and are configured to implement information exchange between the processor and the memory.
[0101] Among them, the processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU) and the like; the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus) and the like.
[0102] In some embodiments, the processor 101 , the memory 102 , and the I / O interface 103 are connected to each other via a bus 104 , and further connected to other components of the computing device.
[0103] Fourthly, refer to Figure 5The embodiment of the present disclosure provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the imix traffic sending method described in the first aspect of the embodiment of the present disclosure is implemented.
[0104] In order to enable those skilled in the art to more clearly understand the technical solutions provided by the embodiments of the present disclosure, the technical solutions provided by the embodiments of the present disclosure are described in detail below through specific embodiments:
[0105] Embodiment 1
[0106] This embodiment is applied to chip simulation modeling verification and chip benchmark testing. Figure 6 A schematic diagram of the connection between the fullmesh / backbone networking imix traffic model generator and the fullmesh / backbone networking device or chip provided in this embodiment.
[0107] This embodiment controls the imix traffic model of the message from three aspects. First, the packet length of the data packet of the imix traffic is controlled so that the packet length of the data packet in the traffic meets the imix ratio requirement; second, the packet sending order of the traffic is controlled so that each sub-flow under each port sends the data packet in a pre-set order; third, the sending interval of the data packet in each flow is controlled so that the sending interval of each packet under each sub-flow is mixed in the same proportion when the different frame length messages of each port and each flow converge at the egress port. By controlling the packet length, packet sending order, and packet sending interval, a more accurate imix traffic model can be generated, which can provide reliable data support for the performance test of the imix traffic model for the simulation modeling of the storage and forwarding chip and for the design and verification of the chip cache.
[0108] This embodiment coordinates the flow sequence from multiple source ports to the destination port through an allocation algorithm: first, the packet length control module is used to control the message length sending order of the imix flow, and the purpose of traffic balancing is achieved by allocating random indexes; second, the starting flow port of each port is specified through the starting packet control module to avoid traffic abnormalities caused by multiple ports simultaneously sending packets to one port; third, on the basis of the packet length control module and the starting packet control module, the packet sequence control module is overall planned and the packet sequence of each flow is pre-allocated to ensure that the messages of different frame lengths to each port, each port and each flow are mixed in a certain proportion to meet the flow ratio requirements of the imix flow unit sequence.
[0109] Embodiment 2
[0110] This embodiment is based on the concept of the first embodiment.
[0111] like Figure 7As shown, the imix traffic sending device provided in this embodiment includes six modules: imix data source, imix packet length control module, start packet control module, packet sequence control module, flow control module and encapsulation packet module. Through these six modules, an accurate imix packet sending device is realized.
[0112] imix data source
[0113] The imix data source model describes the ratio composition of the imix unit sequence, and describes the imix traffic ratio composition in the form of multiple (packet length, weight) tuples. As shown in the example, the tuple information is recorded in the corresponding configuration space of the module for subsequent modules to read to generate a complete flow sequence.
[0114] Imix packet length control module
[0115] The imix traffic is composed of packets of different lengths mixed in a certain proportion. The packet length control module controls the data length according to the ratio of each packet length described by the tuple in the imix data source. First, the packet length control module generates a complete sequence of packet length set length_suit according to the ratio of the imix data source. The message sequence in the packet length set is arranged in length order; secondly, in order to control the interval sending of packets of different lengths, a random index is assigned to each packet length in the set. The index specifies the actual order of message sending and also plays a role in traffic balancing, so that the total length of the messages in the first half and the second half of a packet sending sequence is as balanced as possible.
[0116] Initial packet control module
[0117] In the fullmesh / backbone networking scenario, multiple source ports send packets, and the destination port receives traffic from multiple source ports. In order to make the ratio of messages in the destination port unit sequence conform to the imix traffic ratio after the traffic distributed by multiple source ports is superimposed, it is necessary to control the start of the flow from multiple source ports to avoid the situation where multiple source port traffic is sent to the same destination port at the same time, causing traffic anomalies. When the source port sends the flow, the destination port to which the start message flows is controlled. Each source port sends the flow to each destination port except itself in turn, ensuring that the destination port basically receives the data flow of one source port within a certain period of time.
[0118] Packet sending sequence control module
[0119] A data flow of a device is defined as a set of data packets from a source port to a destination port. The source port is the inbound direction of the device, and the outbound port is the outbound direction of the device. Since network forwarding devices usually consist of dozens to hundreds of ports, it is necessary to achieve overall planning to ensure that all ports meet the imix traffic requirements, that is, to meet both the imix traffic packet length ratio and the port traffic bandwidth.
[0120] This embodiment ensures that the packet length ratio of each flow meets the imix ratio from the two dimensions of the inlet and outlet of the entire device. This module pre-plans the packet sending order of all flows from the source to the destination port based on the information of the imix packet length control module and the initial packet sending control module, thereby ensuring that all flows in the device meet the imix requirements. Among them, the packet sending order is the order of data packets sent from the source port to each destination port respectively.
[0121] Flow Control Module
[0122] This module controls the interval between data packets to achieve the purpose of controlling traffic bandwidth. In order to effectively control the interval between packets, this module uses a token bucket. First, this module initializes the rate of a single stream (such as Gbps), and adds tokens to the token bucket at a constant rate converted from the clock beat. The token represents the sendable packet length; then, based on the comparison between the current packet length to be sent and the sendable packet length in the token bucket, the interval between packets is calculated. If the current packet length to be sent is less than or equal to the packet length in the token bucket, the message can be sent, and the length of the packet to be sent in the token bucket is subtracted from the length of the message to be sent. If the packet length to be sent is greater than the packet length in the token bucket, no operation is performed, and the next clock cycle is judged again. The packet sending interval of different packet lengths under each stream is controlled by the cycle waiting judgment method to ensure the rate requirement.
[0123] Packaging module
[0124] The encapsulation and packet sending module determines the packet length and timing according to the above control module, and then generates a data packet. After completing the frame interval and preamble filling, it sends the data packet to the chip simulation model or test chip to complete the output of imix traffic and generate a data stream that meets the imix requirements for the chip simulation model or test chip.
[0125] Embodiment 3
[0126] The process of generating imix traffic in this embodiment includes:
[0127] 1. First, configure the imix data source. The imix data source describes the ratio of the imix unit sequence. The imix data source module uses multiple (packet length, weight) tuples to describe the imix traffic ratio. After completing the data source configuration, perform a data source validity check, such as the output length of the ETH message should be between 64 bytes and 9600 bytes, and the weight should not be negative.
[0128] 2. The packet length control module generates an imix packet length set, and generates a packet length set length_suit according to the ratio of each packet length of the aforementioned imix data source. For example, the imix traffic ratio of the average packet length of 424 is 78 bytes: 192 bytes: 436 bytes: 720 bytes: 1500 bytes: 9000 bytes, which is equal to 4:41:51:2:1:1. Then the following number of m packet length sets are generated, and the ratio of 78 bytes: 192 bytes: 436 bytes: 720 bytes: 1500 bytes: 9000 bytes in the set is 4:41:51:2:1:1. The message sequence in the packet length set is arranged in order of length, which can be ascending or descending;
[0129] 3. The packet length control module assigns indexes to each set element. Assuming the number of elements in the packet length set generated above is m, the packet length control module assigns a random index [0, m-1] to each packet length in the packet length set, and each packet length index is unique and has no conflict, so that different packet lengths are arranged crosswise, and the initial packet length set pkt_len_suit = [l0,l1,l2,...,l m-1 ]. This index specifies the actual packet length sequence of message transmission and also plays a role in traffic balancing, making the total length of the first and second halves of a packet transmission sequence as balanced as possible.
[0130] 4. The initial packet control module is mainly used to generate the initial packet mode in the fullmesh / backbone networking multi-port scenario to avoid the situation where multiple source port traffic is simultaneously sent to the same destination port, causing traffic anomalies.
[0131] For example, in the commonly used control mode, when the source port sends traffic, it controls the destination port to which the starting message flows, and each source port sends traffic to each destination port except itself in turn. For example, when sending the first message, source 1->destination 2, source 2->destination 3, source 3->destination 4..., the source port sends the second message, source 1->destination 3, source 2->destination 4, source 3->destination 5..., when the source port sends the last destination port, it starts again from the beginning to circulate and send traffic, and ensures that the destination port basically receives the data flow of one source port within a certain period of time.
[0132] 5. The packet sending sequence control module plans and controls the sending sequence of all flows from the source to the destination port. Define a data flow as a set of data packets from a source port to a destination port. Suppose the number of ports of the storage and forwarding chip is n. In the fullmesh network, each port sends flows to other ports except the current port. Then the number of data flows of each port is n-1, and the total number of flows of the chip is n*(n-1).
[0133] Define flow_id as the data flow number, and define the flow_id of source port i as i j, where subscript j is the destination port. The value range of i is [0,1,...,n-1]. According to the packet sending mode generated by the initial packet sending control module, the value sequence of the destination port j is (i+1,i+2,...,n-1,0,...,i-1). In the fullemsh network, each port does not send traffic to this port, so the source port number and the destination port number are different, and j is not equal to i.
[0134] Let pkt_suit be the set of packets set for each flow, and its packet length is the packet length set pkt_len_suit[l0,l1,...,l m-1 ]. The packet sending sequence control module controls each flow to set pkt_suit according to the following rules.
[0135] Suppose the first packet of each flow is pkt_0, the second packet is pkt_1, and the tth packet is pkt_t-1. The number of packets sent from source port i to n-1 output ports (not sent to the current port) is K. Among them, the source port i sends a flow in one round if it satisfies the packet length set pkt_len_suit to complete X rounds of selection, and the output port completes Y rounds of selection. Then, K is the least common multiple of the number of ports n-1 and the number of packet lengths in the pkt_len_suit set m. The packet length set pkt_len_suit completes a round of selection, which is [l0,l1,...,l m-1 ] The set from l0 to l m-1 The egress port completes a round of selection, from port i+1, i+2... to port n-1, 0... i-1, and selects once in sequence.
[0136] The settings of the first round of K packets from source port i are shown in Table 2 below. The packet length index of the first round of K packets starts from 0, that is, the packet length starts from l0. The packet length of the first packet pkt_0 of the flow from source port i to destination port i+1 is selected as l0, and the packet length of the first packet pkt_0 of the flow to port i+2 is selected as l1. The packet length of the first packet pkt_0 of the flow from source port i to all destination ports is set in sequence. Since the number of pkt_len_suit elements is m, flow_id is i n-1 The packet length of the stream is selected as l in pkt_len_suit (n-1-(i+1))%m .
[0137] According to this rule, continue to set the second packet pkt_1 from source port i to all outbound ports, and select the packet length in pkt_len_suit in sequence. For example, the flow_id in the third column is i i+1 The length of pkt_1 packet is selected as l (n-1)%m. Set the tth packet pkt_t from source port i to all outbound ports in sequence until the length of the first round of K packets is set. Then the number of packets distributed on each outbound port for the first round of K packets is K / (n-1). i-1 The length of the K / (n-1)th packet must be l m-1 , satisfying the package length pkt_len_suit to complete the Xth round of selection.
[0138] The second round of K packets of source port i have a packet length index starting from 1, that is, the packet length starts from l1, and the above steps are repeated until the second round of K packets are set.
[0139] The third round of K packets from source port i has a packet length index starting from 2, that is, the packet length starts from l2, such as Figure 8 shown.
[0140] According to the above rules, set the packet length for all flows from source port to destination port in turn, and put the packets of each flow into the flow_pkt_len_suit set of the flow in turn. i+1 The flow_pkt_len_suit set is (l0, l (n-1)%m , l (t*(n-1))%m ......), which is the second row in Table 2 below.
[0141] The packet sending order from source port i to each destination port is shown in Table 2. The packet sending order control module controls the packet sending order of source port i as follows: i+1 The first packet pkt_0 of stream i i+2 The first packet pkt_0, all the way to stream i i-1 The first packet pkt_0, and then the second packet, the third packet of all flows are arranged in sequence...
[0142] Table 2
[0143] flow_id pkt_0 pkt_1 . pkt_t . pkt_(k / (n-1)) <![CDATA[i i+1 ]]> <![CDATA[l0]]> <![CDATA[l (n-1)%m ]]> . <![CDATA[l (t*(n-1))%m ]]> . <![CDATA[l1]]> <![CDATA[i i+2 ]]> <![CDATA[l1]]> <![CDATA[l n%m ]]> . <![CDATA[l (t*(n-1)+1)%m ]]> . <![CDATA[l2]]> . . . . . . . . . . . <![CDATA[l m-1 ]]> . . . . . . <![CDATA[l0]]> . . . . . . . . . <![CDATA[i n-1 ]]> <![CDATA[l (n-1-(i+1))%m ]]> <![CDATA[l (2*(n-1)-(i+1))%m ]]> . <![CDATA[l ((t+1)*(n-1)-(i+1))%m ]]> . <![CDATA[l (n-1-(i+1)+1)%m ]]> <![CDATA[i0]]> <![CDATA[l (n-1-i)%m ]]> <![CDATA[l (2*(n-1)-i)%m ]]> . <![CDATA[l ((t+1)*(n-1)-i)%m ]]> . <![CDATA[l (n-1-i+1)%m ]]> . . . . . . . <![CDATA[i i-1 ]]> <![CDATA[l (n-1-1)%m ]]> <![CDATA[l (2*(n-1)-1)%m ]]> . <![CDATA[l ((t+1)*(n-1)-1)%m ]]> <![CDATA[l m-1 ]]> <![CDATA[l (n-1)%m ]]>
[0144] According to the above source port flow rules, the packets flowing to the destination port i are shown in Table 3:
[0145] Table 3
[0146] flow_id pkt_0 pkt_1 . pkt_t . pkt_(k / (n-1)) <![CDATA[(i-1) i ]]> <![CDATA[l0]]> <![CDATA[l (n-1)%m ]]> . <![CDATA[l t*(n-1)%m ]]> . <![CDATA[l1]]> <![CDATA[(i-2) i ]]> <![CDATA[l1]]> <![CDATA[l n%m ]]> . <![CDATA[l (t*(n-1)+1)%m ]]> . <![CDATA[l2]]> . . . . . . . . . . . . . . <![CDATA[0 i ]]> <![CDATA[l (i-1)%m ]]> <![CDATA[l ((n-1)+(i-1))%m ]]> . <![CDATA[l (t*(n-1)+(i-1))%m ]]> . <![CDATA[l i%m ]]> <![CDATA[l i ]]> <![CDATA[l i%m ]]> <![CDATA[l (n-1+i)%m ]]> . <![CDATA[l (t*(n-1)+i)%m ]]> . <![CDATA[l (i+1)%m ]]> . . . . . . . <![CDATA[(i+1) i ]]> <![CDATA[l (n-1-1)%m ]]> <![CDATA[l (2*(n-1)-1)%m ]]> . <![CDATA[l ((t+1)*(n-1)-1)%m ]]> <![CDATA[l m-1 ]]> <![CDATA[l (n-1)%m ]]>
[0147] The packet sending order and packet length set according to the above rules ensure that each m packets in the horizontal and vertical directions of the source port meet the mixed ratio of imix different packet lengths. Among them, the vertical direction is the flow from source port i to destination port j, and the horizontal direction is the packet sequence sent by each flow of the source port, that is, the inbound direction meets the imix ratio).
[0148] Each flow j Every m packets of (source port i, destination port j) satisfy the imix different packet length mixing ratio, and every m packets of all flows converged to the same destination port also satisfy the same mixing ratio, that is, the outbound direction satisfies the imix ratio).
[0149] 6. The above steps complete the packet length setting and packet sending sequence setting. The flow control module controls the time interval between packets. The flow control module calculates the packet interval based on the packet length and the flow rate, and determines the timing of packet sending by periodic waiting to ensure that the flow of each port and each flow under each port meets the requirements.
[0150] First, this module initializes the rate of a single flow (such as Gbps), and adds tokens to the token bucket at a constant rate converted by the clock beat. The token represents the length of the packet that can be sent. Then, according to the current length of the packet to be sent and the length of the packet that can be sent in the token bucket, the interval between packets is calculated. If the current length of the packet to be sent is less than or equal to the length of the packet in the token bucket, the message can be sent. At the same time, the length of the packet to be sent in the token bucket is subtracted from the length of the message to be sent. If the length of the packet to be sent is greater than the length of the packet in the token bucket, no operation is performed and the judgment is made again in the next clock cycle. The packet sending interval of different packet lengths under each flow is controlled by periodic waiting judgment to ensure the rate requirement.
[0151] Assume that the rate of a single port is R, and there are n-1 flows from a single port to n destination ports, then the rate of a single flow under the port is R / (n-1). From the outbound statistics, the number of flows gathered to the same outbound port is n-1, then the rate of the destination port = (R / (n-1))*(n-1) = R.
[0152] 7. The encapsulation and packet sending module completes the packet encapsulation and sends it. The encapsulation and packet sending module takes pkt_len from the flow_pkt_len_set of each flow under the port according to the packet sending order of the source port, completes the frame interval and preamble filling, and sends the data packet to the chip simulation model or test chip to complete the output of imix traffic.
[0153] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0154] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. An imix traffic sending method, comprising: Determine a packet length set consisting of multiple packet lengths according to the packet length ratio, wherein the proportion of the number of the same packet lengths in the packet length set satisfies the packet length ratio; Determine a packet sending order of multiple source ports according to the packet length set, wherein the packet sending order represents a flow sending order of multiple data flows of the source port and an order of packet lengths of data packets of the data flows, and one data flow corresponds to one destination port; The data packets of each of the data flows are generated and sent according to the packet sending sequence of each of the source ports and the packet length set.
2. The imix traffic sending method according to claim 1, wherein: A packet length set consisting of multiple packet lengths is determined according to the packet length ratio, including: Generate multiple packet lengths according to the packet length ratio; Determine the order of multiple packet lengths to obtain the packet length set.
3. The imix traffic sending method according to claim 2, wherein: Sorting multiple packet lengths to obtain the packet length set includes: A random index is assigned to each packet length, wherein the random index represents the order of the corresponding packet length in the packet length set.
4. The imix traffic sending method according to claim 2, wherein: After generating a plurality of packet lengths according to the packet length ratio, generating a packet length set consisting of a plurality of packet lengths according to the packet length ratio further includes: Perform data validity checks on multiple packet lengths.
5. The imix traffic sending method according to claim 1, wherein: Determining a packet sending order of multiple source ports according to the packet length set includes: Determine a flow sending order of the multiple data flows of each of the source ports, wherein, according to the flow sending order, the data flows sent by each of the source ports at the same packet sending time correspond to different destination ports respectively; The packet length of each data packet of the data flow is determined according to the transmission order of the multiple data flows of the source port and the sorting of the multiple packet lengths in the packet length set.
6. The imix traffic sending method according to claim 5, wherein: Determining the packet length of each data packet of the data stream according to the transmission sequence of the multiple data streams of the source port and the sorting of the multiple packet lengths in the packet length set includes: For any one of the source ports, according to the transmission order of the multiple data flows of the source port, determine the starting packet length in the packet length set corresponding to each of the data flows; The packet lengths of the data packets of each of the data flows are determined respectively according to the starting packet length corresponding to each of the data flows and the order of the multiple packet lengths in the packet length set.
7. The imix traffic sending method according to claim 6, wherein: Determining, according to the transmission order of the plurality of data flows of the source port, a starting packet length in the packet length set corresponding to each of the data flows, comprising: According to the order in which the flow numbers of the multiple data flows of the source port increase and the sequence numbers of the data packets constituting the data flows increase, the multiple packet lengths in the packet length set are sequentially determined as the starting packet lengths corresponding to the respective data flows according to the sorting; Determining the packet length of each data stream according to the starting packet length corresponding to each data stream and the order of multiple packet lengths in the packet length set, respectively, comprises: For any of the data flows, the packet lengths of the data packets of the data flow are determined in sequence starting from the starting packet length corresponding to the data flow according to the order of the multiple packet lengths in the packet length set.
8. The imix traffic sending method according to claim 6, wherein: Determining, according to the transmission order of the plurality of data flows of the source port, a starting packet length in the packet length set corresponding to each of the data flows, comprising: Determine a random index of a starting packet length corresponding to the data flow according to a transmission order of the plurality of data flows of the source port, wherein each packet length in the packet length set corresponds to a random index, and the random index represents the order of the corresponding packet length in the packet length set; Determining the packet length of each data stream according to the starting packet length corresponding to each data stream and the order of multiple packet lengths in the packet length set, respectively, comprises: The packet lengths of the data packets of the respective data flows are determined respectively according to the random index of the starting packet length corresponding to the respective data flows and the random index of each packet length in the packet length set.
9. The imix traffic sending method according to any one of claims 6 to 8, wherein: In the case of performing at least one round of flow transmission, the first number of data packets corresponding to the source port in each round of flow transmission is a common multiple of the second number and the third number, the second number is the number of the destination ports, and the third number is the number of packet lengths in the packet length set.
10. The imix traffic sending method according to claim 9, wherein: In the case of multiple rounds of flow transmission, determining the packet length of each data packet of the data flow according to the flow transmission order of the multiple data flows of the source port and the sorting of the multiple packet lengths in the packet length set, further comprising: Corresponding to any round-trip flow, determining the starting position in the packet length set, where the starting positions corresponding to different round-trip flows are different; The packet length of each data packet of the data flow is determined according to the transmission order of the multiple data flows of the source port, the order of the multiple packet lengths in the packet length set and the starting position.
11. The imix traffic sending method according to any one of claims 6 to 8, wherein: Determining the packet length of each data packet of the data stream according to the transmission sequence of the multiple data streams of the source port and the sorting of the multiple packet lengths in the packet length set, further comprising: A stream packet length set of the data stream is generated according to the selected packet lengths of the data packets of the data stream, wherein the packet lengths of the data packets of the data stream in the stream packet length set are arranged according to a selection order.
12. The imix traffic sending method according to any one of claims 1 to 8, wherein: Generating data packets of each of the data flows according to the packet sending sequence of each of the source ports and the packet length set, including: Determine a packet sending interval between data packets of the data stream according to the rate of the data stream and the packet length of the data packets constituting the data stream; The data packets of the data stream are generated according to the packet sending sequence of the source port and the packet sending interval.
13. The imix traffic sending method according to claim 12, wherein: Generating a data packet of the data stream according to the packet sending sequence of the source port and the packet sending interval, including: According to the packet sending order of the source port, the packet length of the data packet is obtained from the flow packet length set of each data flow of the source port, wherein the arrangement order of the packet lengths of the data packets of the data flow in the flow packet length set represents the sending order of the data packets; The data packet is generated by framing according to the packet length of the data packet and the packet sending interval.
14. The imix traffic sending method according to claim 12, wherein: Sending data packets of each of the data streams, including: The data packet is sent to a chip simulation model or a test chip.
15. The imix traffic sending method according to any one of claims 1 to 8, wherein: The imix traffic sending method also includes: Configure the packet length ratio.
16. An electronic device, comprising: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the imix traffic sending method according to any one of claims 1 to 15.
17. A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the imix traffic sending method according to any one of claims 1 to 15 is implemented.
Citation Information
Patent Citations
Data transmitting method and transmitting equipment suitable for high speed mobile terminal
CN101136722A
Data processing method and device, computer equipment and storage medium
CN113835902A
