Data transmission method and device

By dynamically adjusting the frame type of data frames, flexible preemption of high-priority data frames for low-priority data frames is achieved, solving the problem of large transmission delay of high-priority data frames in traditional frame preemption mechanisms, and improving the flexibility of data transmission Sex and efficiency.

CN112311496BActive Publication Date: 2025-01-07HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910680722.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-26
Publication Date
2025-01-07
Estimated Expiration
2039-07-26

AI Technical Summary

Technical Problem

The traditional frame preemption mechanism cannot effectively ensure the timely transmission of high-priority data frames, resulting in the problem of large delay in transmission of high-priority data frames.

Method used

By dynamically adjusting the frame type of data frames, the high-priority data frame type is fast frame and the low-priority data frame type is preemptable frame, thereby achieving flexible preemption of high-priority data frames on low-priority data frames. Ensure timely transmission of high-priority data frames.

Benefits of technology

It improves the flexibility and efficiency of data transmission, ensures low latency transmission of high-priority data frames, and solves the problem that high-priority data frames cannot be transmitted in time in traditional frame preemption mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112311496B_ABST
    Figure CN112311496B_ABST
Patent Text Reader

Abstract

The present application discloses a data transmission method and device, which belongs to the field of network technology. If a network device has a second data frame to be transmitted during the process of transmitting a first data frame, and the priority of the second data frame is higher than the priority of the first data frame, the network device determines that the frame type of the second data frame is a fast frame. If the frame type of the first data frame is a fast frame, the network device adjusts the frame type of the first data frame to a preemptible frame; then the network device suspends transmission of the first data frame and starts transmitting the second data frame. The present application realizes flexible preemption of low-priority data frames by high-priority data frames by dynamically adjusting the frame type of the currently transmitted data frame, thereby improving the flexibility of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology, and in particular to a data transmission method and device. Background Art

[0002] Communication is achieved between the sender and the receiver by forwarding data frames, also known as media access control (MAC) frames, through network devices. Network devices generally use a "best effort" forwarding strategy to forward data frames. Under this forwarding strategy, network devices forward data frames in the order in which they are received. However, there are data frames of different priorities in the actual network. When network devices use this forwarding strategy to forward data frames, low-priority data frames will occupy the channel, making it impossible for high-priority data frames to be transmitted in time, which in turn leads to a large transmission delay for high-priority data frames.

[0003] The frame preemption mechanism is introduced in time-sensitive networking (TSN). In the frame preemption mechanism defined by the Institute for Electrical and Electronic Engineers (IEEE) 802.3br and IEEE 802.1Qbu, the frame types of data frames are divided into two categories: express frames and preemptible frames. Among them, the transmission priority of express frames is higher than the transmission priority of preemptible frames. When a network device has another second data frame of the frame type "express frame" to be transmitted during the process of transmitting a first data frame of the frame type "preemptible frame", the network device will suspend the transmission of the first data frame and start transmitting the second data frame; and after the transmission of the second data frame is completed, it will continue to transmit the first data frame, thereby ensuring the low-latency transmission of the "express frame".

[0004] However, in the traditional frame preemption mechanism, data frames are divided into two categories: fast frames and preemptible frames, and only "fast frames" are allowed to preempt "preemptible frames" for transmission priority. If the data frame priority in the network device is more than two, for example, including eight priorities from 0 to 7, it is impossible to truly ensure that the high-priority data frame is transmitted first. Summary of the invention

[0005] The present application provides a data transmission method and device, which can solve the problem that the traditional frame preemption mechanism cannot truly guarantee the priority transmission of high-priority data frames.

[0006] In a first aspect, a data transmission method is provided, the method comprising:

[0007] If there is a second data frame to be transmitted during the transmission of the first data frame, and the priority of the second data frame is higher than the priority of the first data frame, the network device determines that the frame type of the second data frame is a fast frame. If the frame type of the first data frame is a fast frame, the network device adjusts the frame type of the first data frame to a preemptible frame; the network device suspends the transmission of the first data frame and starts to transmit the second data frame.

[0008] In the present application, the network device dynamically adjusts the frame type of the currently transmitted data frame, so that the frame type of the high-priority data frame in the network device is a fast frame, and the frame type of the low-priority data frame is a preemptible frame. Compared with the traditional method of fixedly dividing the frame type of the data frame, the frame type of the data frame can be determined more flexibly, thereby realizing the flexible preemption of the low-priority data frame by the high-priority data frame, thereby improving the flexibility of data transmission.

[0009] In one possible implementation, if the frame type of the first data frame is a fast frame, the frame type of the first data frame is adjusted to a preemptible frame, including: if the frame type of the first data frame is a fast frame, and there is a third data frame whose transmission is preempted by the first data frame, and the frame type mark of the third data frame is a first preemptible frame mark, then the network device adjusts the frame type mark of the first data frame to a second preemptible frame mark, and the second preemptible frame mark is different from the first preemptible frame mark.

[0010] In the present application, an extended preemptible frame mark can be used to distinguish different data frames whose frame types are all preemptible frames, or an indication field can be added to the frame structure of the data segment to distinguish different data frames whose frame types are all preemptible frames.

[0011] In another possible implementation, if the frame type of the first data frame is a fast frame, the frame type of the first data frame is adjusted to a preemptible frame, including: if the frame type of the first data frame is a fast frame, and there is no third data frame whose transmission is preempted by the first data frame, the network device adjusts the frame type of the first data frame to a preemptible frame.

[0012] This implementation method is compatible with existing transmission methods and ensures that there is only one preemptible frame that is preempted for transmission in the network device.

[0013] Optionally, after the transmission of the second data frame is completed, the network device continues to transmit the first data frame.

[0014] Optionally, the network device continues to transmit the first data frame, including:

[0015] After the transmission of the second data frame is completed, if there is a fourth data frame to be transmitted and the priority of the fourth data frame is higher than the priority of the first data frame, the network device determines that the frame type of the fourth data frame is a fast frame and transmits the fourth data frame; after the transmission of the fourth data frame is completed, the network device continues to transmit the first data frame.

[0016] The present application realizes that high-priority data frames are always transmitted preferentially compared to low-priority data frames.

[0017] In a second aspect, another data transmission method is provided, the method comprising:

[0018] If the network device detects whether there is a second data frame to be transmitted during the process of transmitting a first data frame, the frame types of the first data frame and the second data frame are the same, and the priority of the second data frame is higher than the priority of the first data frame, then the network device determines that the frame type of the first data frame is a preemptible frame and the frame type of the second data frame is a fast frame; the network device suspends transmission of the first data frame and starts transmitting the second data frame.

[0019] In the present application, by dynamically adjusting the frame type of the currently transmitted data frame or the data frame in the outbound port queue, the frame type of the high-priority data frame in the network device is made a fast frame, and the frame type of the low-priority data frame is made a preemptible frame. This enables flexible preemption of low-priority data frames by high-priority data frames among data frames of the same frame type, thereby improving the flexibility of data transmission.

[0020] Optionally, determining that the frame type of the first data frame is a preemptible frame and the frame type of the second data frame is a fast frame includes: if the frame types of the first data frame and the second data frame are both fast frames, adjusting the frame type of the first data frame to a preemptible frame; if the frame types of the first data frame and the second data frame are both preemptible frames, adjusting the frame type of the second data frame to a fast frame.

[0021] In one possible implementation, if the frame types of the first data frame and the second data frame are both fast frames, the frame type of the first data frame is adjusted to a preemptible frame, including: if the frame types of the first data frame and the second data frame are both fast frames, and there is a third data frame that is preempted by the first data frame for transmission, and the frame type mark of the third data frame is a first preemptible frame mark, then the frame type mark of the first data frame is adjusted to a second preemptible frame mark, and the second preemptible frame mark is different from the first preemptible frame mark.

[0022] In another possible implementation, if the frame types of the first data frame and the second data frame are both fast frames, the frame type of the first data frame is adjusted to a preemptible frame, including: if the frame types of the first data frame and the second data frame are both fast frames, and there is no third data frame whose transmission is preempted by the first data frame, then the frame type of the first data frame is adjusted to a preemptible frame.

[0023] Optionally, after the transmission of the second data frame is completed, the network device continues to transmit the first data frame.

[0024] Optionally, after the transmission of the second data frame is completed, continuing to transmit the first data frame includes:

[0025] After the transmission of the second data frame is completed, if there is a fourth data frame to be transmitted and the priority of the fourth data frame is higher than the priority of the first data frame, the network device transmits the fourth data frame; after the transmission of the fourth data frame is completed, the network device continues to transmit the first data frame.

[0026] In a third aspect, a device for data transmission is provided, the device comprising a plurality of functional modules: the plurality of functional modules interact with each other to implement the method in the first aspect and its respective embodiments. The plurality of functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the plurality of functional modules can be arbitrarily combined or divided based on specific implementation.

[0027] In a fourth aspect, another device for data transmission is provided, the device comprising a plurality of functional modules: the plurality of functional modules interact with each other to implement the method in the second aspect and its respective embodiments. The plurality of functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the plurality of functional modules can be arbitrarily combined or divided based on specific implementation.

[0028] In a fifth aspect, a processing chip is provided, wherein the processing chip includes a programmable logic circuit and / or program instructions, and the processing chip runs the programmable logic circuit and / or program instructions to implement the data transmission method as described in any one of the first aspect or the second aspect.

[0029] Optionally, the processing chip includes a processing unit and a scheduling unit;

[0030] The processing unit is used for caching the data frames to be transmitted into the corresponding outbound port queue according to the priority of the data frames to be transmitted;

[0031] The scheduling unit is used to schedule the data frames to be transmitted in the egress port queue to implement the data transmission method as described in any one of the first aspect or the second aspect.

[0032] Optionally, the scheduling unit includes data egress scheduling logic and media access control MAC encapsulation logic;

[0033] The data egress scheduling logic is used to schedule the data frames to be transmitted in the egress port queue, and provide the MAC encapsulation logic with a frame type indication corresponding to the data frames to be transmitted, wherein the frame type indication is used to indicate the frame type of the data frames to be transmitted;

[0034] The MAC encapsulation logic is used to perform MAC encapsulation on the data frame to be transmitted according to the frame type indication corresponding to the data frame to be transmitted.

[0035] Optionally, the processing chip further includes a memory; the memory is used to cache data frames to be transmitted, and specifically, the memory includes a storage space allocated to an egress port queue.

[0036] Optionally, the processing unit includes at least one of a network processor and a central processing unit, and the scheduling unit includes at least one of a dedicated integrated circuit and a programmable logic device. Optionally, the memory is also used to store computer program instructions, and the processing unit calls the computer program instructions stored in the memory to execute one or more steps in the data transmission method described in the first aspect or the second aspect.

[0037] In a sixth aspect, a data transmission device is provided, comprising: a communication interface, and the processing chip described in the fifth aspect.

[0038] The communication interface and the processing chip may be connected via a communication bus.

[0039] The data transmission device further comprises a memory, wherein the memory stores a computer program, wherein the computer program comprises program instructions. The processing chip calls the computer program stored in the memory to execute one or more steps of the data transmission method described in the first aspect or the second aspect.

[0040] In the seventh aspect, a computer storage medium is provided, on which instructions are stored. When the instructions are executed by a processor, the data transmission method as described in the first aspect and any implementation thereof is implemented, or the data transmission method as described in the second aspect and any implementation thereof is implemented.

[0041] The beneficial effects of the technical solution provided by this application include at least:

[0042] By dynamically adjusting the frame types of the currently transmitted data frames and / or the data frames to be transmitted, the frame types of the higher priority data frames among the currently transmitted data frames and the data frames to be transmitted are made fast frames, and the frame types of the lower priority data frames are made preemptible frames, thereby achieving flexible preemption of low priority data frames by high priority data frames, thereby improving the flexibility of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a flow chart of a data transmission method provided in an embodiment of the present application;

[0044] Figure 2 It is a schematic diagram of a frame structure of a data frame provided in an embodiment of the present application;

[0045] Figure 3 is a schematic diagram of a frame structure of another data frame provided in an embodiment of the present application;

[0046] Figure 4 It is a schematic diagram of a frame structure of another data frame provided in an embodiment of the present application;

[0047] Figure 5 It is a schematic diagram of preemptive transmission of a data frame provided in an embodiment of the present application;

[0048] Figure 6 This is another schematic diagram of preemptive transmission of data frames provided in an embodiment of the present application;

[0049] Figure 7 This is another schematic diagram of preemptive transmission of a data frame provided in an embodiment of the present application;

[0050] Figure 8 is a flow chart of another data transmission method provided by an embodiment of the present application;

[0051] Fig. 9 It is a structural schematic diagram of a data transmission device provided in an embodiment of the present application;

[0052] Fig.10 is a structural schematic diagram of another data transmission device provided in an embodiment of the present application;

[0053] Fig.11 is a block diagram of a data transmission device provided in an embodiment of the present application;

[0054] Fig.12 is a schematic diagram of the structure of a processing chip provided in an embodiment of the present application;

[0055] Fig.13 It is a structural diagram of a scheduling unit provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0057] The data transmission method provided in the embodiment of the present application can be applied to network devices in a communication network. Optionally, the communication network can be an industrial network, an in-vehicle network, a data center network (DCN), a metropolitan area network, a wide area network or a campus network, etc. The embodiment of the present application does not limit the application scenario of the data transmission method. The network device can be a router, a switch or a server, etc. The network device caches all data frames to be sent in each outbound port queue, and then transmits the data frames in the outbound port queue to the outside through the corresponding port.

[0058] Currently, network devices can divide data frames into multiple priorities, such as 8 priorities or 16 priorities, which is not limited in the embodiments of the present application. In the following embodiments of the present application, the network device divides the data frames into 8 priorities, including priorities 0 to 7, as an example for explanation. Among them, the larger the priority value, the higher the priority. The network device may include 8 egress port queues, each of which is used to cache data frames of one priority. In some scenarios, the egress port queue may also be referred to as a service category queue (class of service queue, COSQ) or a priority queue. In some scenarios, there may be multiple mapping relationships between the egress port queue and the priority queue. In this application, the one-to-one correspondence between the priority of the egress port queue and the priority of the data frame it caches is taken as an example.

[0059] When forwarding data frames, the network device forwards the data frames in the outbound port queues in order from high to low priority. For example, assuming that the network device includes three outbound port queues with data frames cached, including a first outbound port queue with a priority of 2, a second outbound port queue with a priority of 5, and a third outbound port queue with a priority of 6, the first outbound port queue caches data frames with a priority of 2, the second outbound port queue caches data frames with a priority of 5, and the third outbound port queue caches data frames with a priority of 6, then when forwarding data frames, the network device first transmits the data frames in the third outbound port queue, then transmits the data frames in the second outbound port queue, and finally transmits the data frames in the first outbound port queue.

[0060] Furthermore, when the network device is transmitting the first data frame with a priority of 5 in the second egress port queue, if the third egress port queue receives the second data frame to be transmitted, according to the traditional frame preemption mechanism:

[0061] If the frame type of the second output port queue is set to a preemptible frame, that is, the frame type of the first data frame with a priority of 5 is a preemptible frame, and the frame type of the third output port queue is set to a fast frame, that is, the frame type of the second data frame with a priority of 6 is a fast frame, the network device suspends transmission of the first data frame in the second output port queue, and starts transmission of the second data frame in the third output port queue. After the transmission of the second data frame in the third output port queue is completed, the network device continues to transmit the first data frame in the second output port queue, that is, the second data frame with a priority of 6 can interrupt the transmission of the first data frame with a priority of 5 and perform preemptive transmission.

[0062] If the frame type of the second egress port queue is the same as the frame type of the third egress port queue, for example, both are fast frames or both are preemptible frames, the network device transmits the second data frame in the third egress port queue after completing the transmission of the first data frame in the second egress port queue.

[0063] In the traditional frame preemption mechanism, the frame type of the data frame stored in the egress port queue is set to the frame type set by the egress port queue. The frame type of the data frame can be marked by the value of a specific field in the data frame. For example, the data frame includes a start MAC-merge-packet delimiter (SMD) field, and the frame type of the data frame can be represented by the value of the SMD field.

[0064] Because in the traditional frame type division mechanism, the frame type of the data frame is pre-set and fixed, for example, the frame type of the data frames with priorities 0 to 3 are all set to preemptible frames, and the frame type of the data frames with priorities 4 to 7 are all set to fast frames. Therefore, there will be a phenomenon that high-priority data frames with the same frame type cannot interrupt low-priority data frames for preemptive transmission, resulting in low data transmission flexibility in traditional implementations. In the data transmission method provided in the embodiment of the present application, by dynamically adjusting the frame type of the data frame, the frame type of the data frame with a higher priority among the currently transmitted data frame and the data frame to be transmitted is a fast frame, and the frame type of the data frame with a lower priority is a preemptible frame. Compared with the traditional method of fixedly dividing the frame type of the data frame, the frame type of the data frame can be flexibly adjusted to achieve flexible preemption of the high-priority data frame for the low-priority data frame, thereby achieving multi-level preemptive transmission of the data frame, thereby improving the flexibility of data transmission.

[0065] Figure 1 is a flow chart of a data transmission method provided by an embodiment of the present application. Figure 1 As shown, the method includes:

[0066] Step 101: If there is a second data frame to be transmitted during the transmission of a first data frame, the network device determines that the frame type of the second data frame is a fast frame, and the priority of the second data frame is higher than the priority of the first data frame.

[0067] Since the network device transmits data frames in order from high to low priority, when the network device is transmitting the first data frame, the data frame with a priority lower than or equal to the priority of the first data frame in the network device will not preempt the transmission of the first data frame, that is, it will not affect the transmission of the first data frame. Therefore, when the network device is transmitting the first data frame, it only needs to determine whether there is a second data frame with a higher priority than the first data frame in the network device. If there is a second data frame to be transmitted during the transmission of the first data frame, and the priority of the second data frame is higher than the priority of the first data frame, indicating that the second data frame needs to preempt the transmission of the first data frame, the network device can determine the frame type of the second data frame as a fast frame.

[0068] The second data frame to be transmitted in the network device may be received from other devices (such as a sending end), or may be generated by the network device itself.

[0069] Optionally, before transmitting the first data frame, the network device will also cache the first data frame in a corresponding egress port queue, such as a first egress port queue, according to the priority of the first data frame. Before step 101, the network device will also cache the second data frame in a corresponding egress port queue, such as a second egress port queue, according to the priority of the second data frame to be transmitted.

[0070] Step 102: If the frame type of the first data frame is a fast frame, the network device adjusts the frame type of the first data frame to a preemptible frame.

[0071] The network device can determine the frame type of the first data frame according to the value of the SMD field in the first data frame. If the frame type of the first data frame is a fast frame, the network device adjusts the frame type of the first data frame to a preemptible frame, so that the second data frame with a higher priority can preempt the transmission of the first data frame with a lower priority, thereby ensuring the low-latency transmission of the high-priority data frame. If the frame type of the first data frame is a preemptible frame, there is no need to execute step 102, and the network device can directly execute the subsequent step 103.

[0072] Step 103: The network device suspends transmission of the first data frame and starts transmission of the second data frame.

[0073] Since the frame type of the first data frame is a preemptible frame and the frame type of the second data frame is a fast frame, based on the frame preemption mechanism, the second data frame can preempt the transmission of the first data frame, that is, the network device can suspend the transmission of the first data frame and give priority to the transmission of the second data frame.

[0074] Step 104: After the transmission of the second data frame is completed, the network device continues to transmit the first data frame.

[0075] Optionally, the frame type of the first data frame transmitted after the network device is powered on is a fast frame. Or alternatively, after the network device is powered on, it is determined whether the priority of the first data frame to be transmitted is the lowest priority supported by the network device. If the priority of the first data frame is not the lowest priority supported by the network device, the frame type of the first data frame is determined to be a fast frame. If the priority of the first data frame is the lowest priority supported by the network device, the frame type of the first data frame is determined to be a preemptible frame. Since the data frame with the lowest priority does not need to preempt the transmission of other data frames, in an embodiment of the present application, the network device can determine the frame type of the data frame with the lowest priority as a preemptible frame. The first data frame can be the first data frame transmitted after the network device is powered on, or it can be a data frame transmitted subsequently, and the embodiment of the present application does not limit this.

[0076] In the embodiment of the present application, data frames with the same priority will not preempt transmission.

[0077] In an embodiment of the present application, when a network device obtains a second data frame with a higher priority during the process of transmitting a first data frame, the frame type of the second data frame is determined to be a fast frame. For example, when a network device has a data frame with a priority of 1 to be transmitted during the process of transmitting a data frame with a priority of 0, the frame type of the data frame with a priority of 1 can be determined to be a fast frame; for another example, when a network device has a data frame with a priority of 7 to be transmitted during the process of transmitting a data frame with a priority of 6, the frame type of the data frame with a priority of 7 can be determined to be a fast frame. Compared with the current frame type classification mechanism, the flexibility of determining the frame type of the data frame is improved.

[0078] Specifically, a first possible implementation of step 102 includes: if the frame type of the first data frame is a fast frame, and there is a third data frame in the network device that is preempted by the first data frame for transmission, and the frame type mark of the third data frame is a first preemptible frame mark, then the network device adjusts the frame type mark of the first data frame to a second preemptible frame mark, and the second preemptible frame mark is different from the first preemptible frame mark.

[0079] Optionally, if there are 8 outbound port queues (priority queues) in the network device, corresponding to priorities 0 to 7 respectively, then there are at most 7 data frames that are preempted for transmission in the process of transmitting data frames by the network device. For example, in the process of transmitting data frames with priority 0, the network device has data frames with priority 1 to be transmitted, and the data frames with priority 1 preempt the data frames with priority 0 for transmission; in the process of transmitting data frames with priority 1, the network device has data frames with priority 2 to be transmitted, and the data frames with priority 2 preempt the data frames with priority 1 for transmission, and so on, high-priority data frames preempt the transmission of low-priority data frames in turn, and there are at most 7 data frames that are preempted for transmission in the network device. In the embodiment of the present application, different preemptible frame marks can be used, for example, preemptible frame mark 1, preemptible frame mark 2, ..., preemptible frame mark 7, to distinguish different data frames whose frame type is preemptible frame.

[0080] Figure 2 This is a schematic diagram of the frame structure of a data frame defined in IEEE 802.3br. Figure 2 As shown in FIG. 1 , the data frame includes a preamble, an SMD field, a payload field, and a cyclic redundancy check (CRC) field. Figure 2 In the data frame shown, the length of the preamble is 7 octets, the length of the SMD field is 1 octet, the length of the payload field is greater than or equal to 60 octets, and the length of the CRC field is 4 octets.

[0081] Figure 3 This is a schematic diagram of the frame structure of another data frame defined in IEEE 802.3br. Figure 3 As shown in FIG. 1 , the data frame includes a preamble, an SMD field, a continue transmission (FRAG_COUNT) field, a payload field, and a CRC field. Figure 3 In the data frame shown, the length of the preamble is 6 octets, the length of the FRAG_COUNT field is 1 octet, the length of the SMD field is 1 octet, the length of the payload field is greater than or equal to 60 octets, and the length of the CRC field is 4 octets.

[0082] In the IEEE 802.3br standard, the frame structure of a fast frame, a complete preemptible frame, or the first data fragment of a preemptible frame that is preempted for transmission (hereinafter referred to as the "preemptible frame first fragment") is as follows: Figure 2As shown; the frame structure of the other data fragments (hereinafter referred to as "subsequent fragments of the preemptible frame") in the preemptible frame whose transmission is preempted except the first data fragment is as shown Figure 3 As shown, the FRAG_COUNT field is used to indicate that the data fragment belongs to the same data frame as the previous data fragment. Each data fragment of the data frame that is preempted for transmission can be regarded as a data subframe. The receiving end determines whether the frame type of the data frame is a fast frame or a preemptible frame based on the value of the SMD field in the data frame, and determines whether the data frame belongs to the same data frame as the previously transmitted data frame based on whether the FRAG_COUNT field exists in the data frame.

[0083] In the standard defined by IEEE 802.3br, the fast frame mark is SMD-E, the preemptible frame mark of the first data fragment of the preemptible frame (hereinafter referred to as the "first preemptible frame mark") includes SMD-S0, SMD-S1, SMD-S2 and SMD-S3, and the preemptible frame marks other than the first data fragment in the preemptible frame (hereinafter referred to as the "subsequent preemptible frame mark") include SMD-C0, SMD-C1, SMD-C2 and SMD-C3. In the IEEE 802.3br standard, the frame type mark SMD-E, SMD-S0 to SMD-S3, and SMD-C0 to SMD-C3 are identified by different values. For example, the value corresponding to the frame type mark SMD-E is 0xD5. The values ​​of other frame type marks can be found in the standard and are not listed here one by one.

[0084] In a first possible implementation of step 102, the frame structure of the fast frame follows the definition in IEEE 802.3br as follows: Figure 2 The frame structure shown in FIG. 1 is different from the frame structure shown in FIG. 1 , but the fast frame tag needs to be extended, and the total number of the extended fast frame tags is the same as the number of priority queues in the network device.

[0085] Taking 8 priority queues (outgoing port queues) included in the network device as an example, according to the frame preemption mechanism provided in the embodiment of the present application, the network device has at most 7 data frames that are preempted in the process of transmitting data frames, that is, the network device may have 7 data frames in the process of transmitting data frames. The frame type is adjusted from the fast frame to the preemptible frame. Therefore, the embodiment of the present application extends the fast frame mark on the basis of the fast frame mark SMD-E defined by the IEEE 802.3br standard, uses the defined fast frame mark SMD-E as SMD-E0, and extends the new fast frame mark SMD-E1 to SMD-E7, so that the extended fast frame mark includes SMD-E0 to SMD-E7, a total of 8. In the embodiment of the present application, when the frame type of the data frame is a fast frame, the fast frame mark of the data frame can be determined according to the priority of the data frame, so that the priority corresponds to the fast frame mark one by one. For example, if the frame type of a data frame with a priority of 7 is a fast frame, the fast frame mark of the data frame with a priority of 7 is SMD-E7; if the frame type of a data frame with a priority of 6 is a fast frame, the fast frame mark of the data frame with a priority of 6 is SMD-E6, and so on. Of course, the fast frame mark of the data frame with a priority of 7 can also be SMD-E0, the fast frame mark of the data frame with a priority of 6 can be SMD-E1, and so on.

[0086] Furthermore, the embodiments of the present application provide two methods to distinguish which data frame the subsequent slice of the preemptible frame belongs to.

[0087] Method 1: The frame structure of the subsequent slices of the preemptible frame follows the definition in IEEE 802.3br as follows: Figure 3 The frame structure shown in FIG. 1 is used to extend the subsequent preemptible frame flags. The total number of subsequent preemptible frame flags after extension is four times the number of priority queues in the network device. The FRAG-COUNT field in the subsequent fragments of the preemptible frame follows the definition in IEEE 802.3br and does not need to be extended. The FRAG-COUNT field is used cyclically with 4 subsequent fragments as one cycle. That is, the FRAG-COUNT field of the first preemptible frame subsequent slice of a data frame is FRAG-COUNT0, and its value is 0xE6; the FRAG-COUNT field of the second preemptible frame subsequent slice of the data frame is FRAG-COUNT1, and its value is 0x4C; the FRAG-COUNT field of the third preemptible frame subsequent slice of the data frame is FRAG-COUNT2, and its value is 0x7F; the FRAG-COUNT field of the fourth preemptible frame subsequent slice of the data frame is FRAG-COUNT0, and its value is 0xB3; the FRAG-COUNT field of the fifth preemptible frame subsequent slice of the data frame is FRAG-COUNT0, and its value is 0xE6, and so on.

[0088] Similarly, taking the network device including 8 priority queues as an example, the embodiment of the present application can expand the subsequent preemptible frame marks SMD-C0 to SMD-C3 defined in IEEE 802.3br to SMD-C0 to SMD-C31, and the values ​​of the subsequent preemptible frame marks SMD-C0 to SMD-C31 are different from each other. Among them, every four subsequent preemptible frame marks are a group, for example, SMD-C0 to SMD-C3 are a group, SMD-C4 to SMD-C7 are a group, SMD-C24 to SMD-C27, and each group of subsequent preemptible frame marks corresponds to a fast frame mark, for example, SMD-E0 corresponds to SMD-C0 to SMDC3, SMD-E1 corresponds to SMD-C4 to SMDC7, and so on, SMD-E7 corresponds to SMD-C28 to SMD-C31. Of course, SMD-C0 to SMD-C31 can also be grouped in other ways, and this application does not limit this. For example, if a data frame with a frame type marked as a fast frame mark SMD-E0 is adjusted to a preemptible frame, the frame type mark of the subsequent preemptible frame of the data frame can use the subsequent preemptible frame mark SMD-C0 to SMD-C3, and the corresponding FRAG-COUNT field continues to use IEEE The definition in 802.3br includes FRAG-COUNT0 (value is 0xE6) to FRAG-COUNT3 (value is 0xB3); if the data frame with the frame type marked as the fast frame mark SMD-E1 is adjusted to a preemptible frame, the frame type mark of the subsequent fragment of the preemptible frame of the data frame can adopt the subsequent preemptible frame mark SMD-C4 to SMD-C7, and the corresponding FRAG-COUNT field follows the definition in IEEE802.3br, which is also FRAG-COUNT0 (value is 0xE6) to FRAG-COUNT3 (value is 0xB3), and the following is the same and will not be repeated; by analogy, if the data frame with the frame type marked as the fast frame mark SMD-E6 is adjusted to a preemptible frame, the frame type mark of the subsequent fragment of the preemptible frame of the data frame can adopt the subsequent preemptible frame mark SMD-C24 to SMD-C27. The data frame whose frame type is marked as the fast frame mark SMD-E7 is adjusted to a preemptible frame, and the frame type mark of the subsequent slice of the preemptible frame can adopt the subsequent preemptible frame mark SMD-C28 to SMD-C31.Of course, the data frame whose frame type is marked as the fast frame mark SMD-E7 can also be adjusted to a preemptible frame, and the frame type mark of the subsequent piece of the preemptible frame of the data frame adopts the subsequent preemptible frame mark SMD-C0 to SMD-C3, and the corresponding FRAG-COUNT field follows the definition in IEEE802.3br, which is also FRAG-COUNT0 (value is 0xE6) to FRAG-COUNT3 (value is 0xB3), and the following is the same and will not be repeated; the data frame whose frame type is marked as the fast frame mark SMD-E6 is adjusted to a preemptible frame, and the frame type mark of the subsequent piece of the preemptible frame of the data frame adopts the subsequent preemptible frame mark SMD-C4 to SMD-C7; and so on, the data frame whose frame type is marked as the fast frame mark SMD-E0 is adjusted to a preemptible frame, and the frame type mark of the subsequent piece of the preemptible frame of the data frame adopts the subsequent preemptible frame mark SMD-C28 to SMD-C31.

[0089] After receiving a data frame, the receiving end can determine whether the data frame is a data fragment in a data frame whose transmission is preempted based on the frame structure. If the data frame is a data fragment in a data frame whose transmission is preempted, the receiving end can determine which data fragment or fragments of previously received data belong to the same data frame based on the value of the SMD field in the data frame.

[0090] Method 2: Define a new frame structure that can preempt subsequent frames, for example, Figure 4 The frame structure is shown. Figure 4 The frame structure of the subsequent fragment of the preemptible frame shown in FIG. 1 adds an indication field based on the frame structure of the subsequent fragment of the preemptible frame defined in IEEE 802.3br. The indication field is used to indicate which data fragment and the previously transmitted data fragment belong to the same data frame. Figure 4 As shown, the subsequent fragment of the preemptible frame includes a preamble, an SMD field, a FRAG_COUNT field, an indication field, a payload field, and a CRC field. The value of the indication field can be the same as the value of the SMD field in the target data fragment, and the target data fragment is the first data fragment belonging to the same data frame as the subsequent fragment of the preemptible frame. For example, if the value of the SMD field in the first data fragment of the first data frame to be preempted is 0xD5, then the value of the indication field in the second data fragment and subsequent data fragments of the first data frame is 0xD5. In this optional implementation, Figure 4 The setting method of the value of the SMD field of the subsequent slice of the preemptible frame can follow SMD-C0 to SMD-C3 defined in IEEE 802.3br, and the embodiment of the present application will not be described in detail here.

[0091] A second possible implementation of step 102 includes: if the frame type of the first data frame is a fast frame, and there is no third data frame in the network device whose transmission is preempted by the first data frame, the network device adjusts the frame type of the first data frame to a preemptible frame.

[0092] If the frame type of the first data frame is a fast frame, and there is a third data frame in the network device that is preempted by the first data frame for transmission, the network device does not adjust the frame type of the first data frame. The frame type of the first data frame is not adjusted, that is, the first data frame continues to be transmitted, and the second data frame cannot preempt the first data frame for transmission. This implementation method is compatible with existing transmission methods, ensuring that there is only one preemptible frame in the network device that is preempted for transmission.

[0093] In a second possible implementation of step 102, the frame structure and frame type tag defined in IEEE 802.3br may be used without extension. That is, the frame structure that can preempt the first slice of the frame is as follows: Figure 2 As shown, the frame structure of the subsequent slice that can be preempted is as follows Figure 3 The network device can determine whether there is a third data frame whose transmission is preempted by the first data frame in the network device by detecting the frame structure of the data frame to be transmitted in the network device.

[0094] For example, Figure 5 Schematic diagram of preemptive transmission of a data frame provided in an embodiment of the present application. Figure 5 As shown, when the network device is transmitting a first data frame, if it obtains a second data frame with a higher priority than the first data frame, the network device suspends transmission of the first data frame and starts transmitting the second data frame; after the transmission of the second data frame is completed, the network device continues to transmit the first data frame.

[0095] Optionally, if there is a third data frame in the network device whose transmission is preempted by the first data frame, referring to step 102, the preemptive transmission mode of the data frame includes two possible implementations.

[0096] Figure 6 and Figure 7 FIG. 1 is a schematic diagram of using the first possible implementation in step 102 to preempt transmission. Figure 6 and Figure 7As shown, during the process of transmitting the third data frame, the network device obtains a first data frame with a higher priority than the third data frame, the network device suspends transmission of the third data frame, and starts to transmit the first data frame; during the process of transmitting the first data frame, the network device obtains a second data frame with a higher priority than the first data frame, the network device suspends transmission of the first data frame, and starts to transmit the second data frame; after the transmission of the second data frame is completed, the network device continues to transmit the first data frame; after the transmission of the first data frame is completed, the network device continues to transmit the third data frame. Among them, Figure 6 The data frame preemptive transmission using mode 1 is shown. Figure 7 The data frame preemptive transmission using the second method is shown. Figures 5 to 7 The arrows in the figure indicate the transmission direction of the data frames.

[0097] Figure 6 and Figure 7 In the embodiment, the frame structures of the first data fragment of the first data frame, the second data frame, and the first data fragment of the third data frame are all as follows: Figure 2 For the sake of illustration, Figure 6 and Figure 7 Only part of the frame structure of each data frame is shown in FIG. For example, it is assumed that the priority of the third data frame is 3, the priority of the first data frame is 5, the priority of the second data frame is 6, and the initial frame type of the third data frame is a fast frame. Figure 6 and Figure 7 The value of the SMD field in the first data fragment of the third data frame is the value corresponding to SMD-E3 (expressed by SMD-E3), the value of the SMD field in the first data fragment of the first data frame is the value corresponding to SMD-E5, and the value of the SMD field in the second data frame is the value corresponding to SMD-E6.

[0098] Figure 6 The method of extending the subsequent preemptible frame mark is adopted to distinguish which data frame the subsequent fragment of the preemptible frame belongs to. Figure 6 The frame structures of the second data fragment of the first data frame and the second data fragment of the third data frame are as follows: Figure 3 See Figure 6, the value of the SMD field in the second data fragment of the first data frame is the value corresponding to SMD-C20, and the value of the SMD field in the second data fragment of the third data frame is the value corresponding to SMD-C12. Among them, the value of the FRAG_COUNT field is set using the setting method in the standard defined by IEEE 802.3br, and the embodiment of the present application will not be repeated here. According to the corresponding relationship between the preemptible frame mark and the fast frame mark, it can be known that the subsequent preemptible frame mark SMD-C20 corresponds to the fast frame mark SMD-E5, and the subsequent preemptible frame mark SMD-C12 corresponds to the fast frame mark SMD-E3. Therefore, according to the subsequent preemptible frame mark, it can be known to which data frame the subsequent piece of the preemptible frame belongs. The receiving end will combine the data fragment with the value of the SMD field SMD-E5 and the data fragment with the value of the SMD field SMD-C20 (possibly SMD-C21, etc.) to obtain the first data frame. The receiving end combines the data segment whose SMD field value is SMD-E3 with the data segment whose SMD field value is SMD-C12 (and possibly SMD-C13, etc.) to obtain a third data frame.

[0099] Figure 7 The method of adding an indication field in the frame structure of the subsequent piece of the preemptible frame is adopted to distinguish which data frame the subsequent piece of the preemptible frame belongs to. Figure 7 The frame structures of the second data fragment of the first data frame and the second data fragment of the third data frame are as follows: Figure 4 See Figure 7 , the value of the SMD field in the second data fragment of the first data frame is the value corresponding to SMD-C0, and the value of the indicator field is the value corresponding to SMD-E5 (the same as the value of the SMD field of the first data fragment in the first data frame); the value of the SMD field in the second data fragment of the third data frame is the value corresponding to SMD-C0, and the value of the indicator field is the value corresponding to SMD-E3 (the same as the value of the SMD field of the first data fragment in the third data frame). Among them, the value of the FRAG_COUNT field is set using the setting method in the standard defined by IEEE 802.3br, and the embodiments of the present application are not repeated here. It can be understood that according to the value of the indicator field, it is directly possible to know which data frame the subsequent fragment of the preemptible frame belongs to. The receiving end will combine the data fragment whose SMD field value is SMD-E5 with all the data fragments whose indicator field value is SMD-E5 to obtain the third data frame. The receiving end will combine the data fragment whose SMD field value is SMD-E3 with all the data fragments whose indicator field value is SMD-E3 to obtain the third data frame.

[0100] If the preemptive transmission method of the data frame adopts the second possible implementation in step 102, the network device obtains a first data frame whose priority is higher than that of the third data frame during the process of transmitting the third data frame, and the network device suspends the transmission of the third data frame and starts to transmit the first data frame; during the process of transmitting the first data frame, the network device obtains a second data frame whose priority is higher than that of the first data frame. Since the third data frame whose transmission is preempted by the first data frame already exists in the network device, the first data frame cannot be preempted for transmission, and the network device continues to transmit the first data frame; after the transmission of the first data frame is completed, the network device transmits the second data frame; after the transmission of the second data frame is completed, the network device continues to transmit the third data frame.

[0101] Optionally, after the transmission of the second data frame is completed, if the network device has a fourth data frame to be transmitted, and the priority of the fourth data frame is higher than the priority of the first data frame, the network device determines that the frame type of the fourth data frame is a fast frame, and transmits the fourth data frame; after the transmission of the fourth data frame is completed, the network device continues to transmit the first data frame. The priority of the fourth data frame is lower than or equal to the priority of the second data frame.

[0102] In summary, in the data transmission method provided by the embodiment of the present application, when the network device has a second data frame with a higher priority than the first data frame during the transmission of the first data frame, the frame type of the second data frame is determined to be a fast frame. If the frame type of the first data frame is a fast frame, the network device adjusts the frame type of the first data frame to a preemptible frame. The embodiment of the present application dynamically adjusts the frame type of the currently transmitted data frame so that the frame type of the high-priority data frame in the network device is a fast frame, and the frame type of the low-priority data frame is a preemptible frame. Compared with the traditional method of fixedly dividing the frame type of the data frame, the frame type of the data frame can be flexibly adjusted to achieve multi-level preemption, thereby achieving flexible preemption of the low-priority data frame by the high-priority data frame, thereby improving the flexibility of data transmission.

[0103] Figure 8 FIG. 1 is a flow chart of another data transmission method provided by an embodiment of the present application. Figure 8 As shown, the method includes:

[0104] Step 801: If there is a second data frame to be transmitted during the process of transmitting a first data frame, the frame type of the first data frame is the same as the frame type of the second data frame, and the priority of the second data frame is higher than the priority of the first data frame, then the network device determines that the frame type of the first data frame is a preemptible frame, and the frame type of the second data frame is a fast frame.

[0105] Among them, the relevant explanation of the first data frame can refer to the above step 101, and the embodiment of the present application will not be repeated here.

[0106] The egress port queue in the embodiment of the present application may be provided with a queue identifier, which is used to indicate the queue type of the egress port queue, and the queue type includes a fast queue or a preemptible queue. For example, the queue identifier of the egress port queue with a priority of 0 to 3 is a preemptible identifier, indicating that the egress port queue with a priority of 0 to 3 is a preemptible queue; and the queue identifier of the egress port queue with a priority of 4 to 7 is a fast identifier, indicating that the egress port queue with a priority of 4 to 7 is a fast queue. The frame type of the data frame in the fast queue is a fast frame, and the frame type of the data frame in the preemptible queue is a preemptible frame. The preemptible identifier and the fast identifier may be numbers or characters, etc. For example, the preemptible identifier is 1 and the fast identifier is 0. For another example, the preemptible identifier is P and the fast identifier is E.

[0107] Before transmitting a data frame, the network device will cache the data frame to be transmitted in the corresponding output port queue according to the priority of the data frame. Since the frame type of the data frame in each output port queue is determined, the network device can actively detect whether there is a second data frame to be transmitted in the output port queue with a higher priority than the first data frame and the same queue identifier as the output port queue where the first data frame is located by the module or chip that controls the transmission of the data frame during the process of transmitting the first data frame. For example, if the frame type of the first data frame is a fast frame and the priority is 6, the network device detects whether there is a second data frame to be transmitted in the fast queue with a priority of 7 during the process of transmitting the first data frame. For another example, if the frame type of the first data frame is a preemptible frame and the priority is 1, the network device detects whether there is a second data frame to be transmitted in the preemptible queues with priorities of 2 and 3 during the process of transmitting the first data frame.

[0108] Of course, the egress port queue can also send an indication to the module or chip that controls data frame transmission in the network device, where the indication includes the frame type and priority of the egress port queue, notifying the module or chip that controls data frame transmission that there is a second data frame to be transmitted, where the frame type of the second data frame is the same as the frame type of the first data frame being transmitted, and the priority of the second data frame is higher than the priority of the first data frame.

[0109] The network device determines that the frame type of the first data frame is a preemptible frame and the frame type of the second data frame is a fast frame, including: if the frame types of the first data frame and the second data frame are both fast frames, the network device adjusts the frame type of the first data frame to a preemptible frame and does not perform any operation on the frame type of the second data frame.

[0110] Optionally, the network device adjusts the frame type of the first data frame to a preemptible frame, including: if the frame type of the first data frame is a fast frame, and there is a third data frame in the network device that is preempted by the first data frame for transmission, and the frame type mark of the third data frame is a first preemptible frame mark, then the network device adjusts the frame type mark of the first data frame to a second preemptible frame mark, and the second preemptible frame mark is different from the first preemptible frame mark. This process can refer to the detailed description of the first possible implementation method of the above step 102, and will not be repeated here.

[0111] Alternatively, the network device adjusts the frame type of the first data frame to a preemptible frame, including: if the frame type of the first data frame is a fast frame, and there is no third data frame in the network device whose transmission is preempted by the first data frame, the network device adjusts the frame type of the first data frame to a preemptible frame. If the frame type of the first data frame is a fast frame, and there is a third data frame in the network device whose transmission is preempted by the first data frame, the network device does not adjust the frame type of the first data frame. The explanation of this process can refer to the detailed description in the second possible implementation method of the above step 102, which is not repeated here.

[0112] The network device determines that the frame type of the first data frame is a preemptible frame and the frame type of the second data frame is a fast frame, and also includes: if the frame types of the first data frame and the second data frame are both preemptible frames, the network device adjusts the frame type of the second data frame to a fast frame and does not perform any operation on the frame type of the first data frame.

[0113] Step 802: The network device suspends transmission of the first data frame and starts transmission of the second data frame.

[0114] For the specific details of this step, please refer to the relevant description in the above step 103, which will not be repeated here.

[0115] Step 803: After the transmission of the second data frame is completed, the network device continues to transmit the first data frame.

[0116] For the specific details of this step, please refer to the relevant description in the above step 104, which will not be repeated here.

[0117] In summary, in the data transmission method provided by the embodiment of the present application, if the network device has a second data frame to be transmitted during the transmission of the first data frame, which has the same frame type as the first data frame and a higher priority than the first data frame, the network device determines that the frame type of the first data frame is a preemptible frame, and the frame type of the second data frame is a fast frame. The embodiment of the present application dynamically adjusts the frame type of the currently transmitted data frame or the frame type of the data frame in the outbound port queue, so that the frame type of the high-priority data frame in the network device is a fast frame, and the frame type of the low-priority data frame is a preemptible frame, thereby realizing flexible preemption of the high-priority data frame from the low-priority data frame between data frames of the same frame type, thereby improving the flexibility of data transmission.

[0118] In the present application embodiment, Figure 1 The data transmission method shown and Figure 8 The data transmission method shown is proposed based on the same inventive concept. The order of steps of each of the above data transmission methods can be appropriately adjusted, and the steps can be increased or decreased accordingly according to the situation. Any technician familiar with the technical field can easily think of a change within the technical scope disclosed in this application, and all of them should be covered by the protection scope of this application.

[0119] Fig. 9 Schematic diagram of a data transmission device provided in an embodiment of the present application. Fig. 9 As shown, the device 90 includes:

[0120] The determination module 901 is used to determine that if there is a second data frame to be transmitted during the transmission of the first data frame, the frame type of the second data frame is a fast frame, and the priority of the second data frame is higher than the priority of the first data frame.

[0121] The adjustment module 902 is configured to adjust the frame type of the first data frame to a preemptible frame if the frame type of the first data frame is a fast frame.

[0122] The transmission module 903 is used to suspend the transmission of the first data frame and start the transmission of the second data frame.

[0123] Optionally, the adjustment module is used to: if the frame type of the first data frame is a fast frame, and there is a third data frame that is preempted by the first data frame for transmission, and the frame type mark of the third data frame is the first preemptible frame mark, then adjust the frame type mark of the first data frame to a second preemptible frame mark, and the second preemptible frame mark is different from the first preemptible frame mark. For specific details, please refer to Figure 1 The detailed description of the data transmission method shown is not repeated here.

[0124] Optionally, the adjustment module is used to: if the frame type of the first data frame is a fast frame and there is no third data frame whose transmission is preempted by the first data frame, adjust the frame type of the first data frame to a preemptible frame.

[0125] Optionally, the transmission module is further used to continue transmitting the first data frame after the transmission of the second data frame is completed. Optionally, the transmission module is specifically used to: after the transmission of the second data frame is completed, if there is a fourth data frame to be transmitted and the priority of the fourth data frame is higher than the priority of the first data frame, determine the frame type of the fourth data frame as a fast frame and transmit the fourth data frame; after the transmission of the fourth data frame is completed, continue transmitting the first data frame.

[0126] Optionally, the device 90 further includes a cache module, which is used to cache the first data frame in a corresponding output port queue, such as a first output port queue, according to the priority of the first data frame before transmitting the first data frame. It is also used to cache the second data frame in a corresponding output port queue, such as a second output port queue, according to the priority of the second data frame to be transmitted.

[0127] Optionally, the device 90 further includes an enabling / disabling control module, which is used to control whether the device 90 enables the data transmission method provided in the embodiment of the present application. When enabled, the device 90 executes the following steps: Figure 1 When disabled, the device 110 performs a conventional frame preemption mechanism.

[0128] For details not included here, please refer to Figure 1 A detailed description of the data transmission method shown.

[0129] In summary, in the data transmission device provided by the embodiment of the present application, when the network device has a second data frame with a higher priority than the first data frame during the transmission of the first data frame through the determination module, the frame type of the second data frame is determined as a fast frame. If the frame type of the first data frame is a fast frame, the network device adjusts the frame type of the first data frame to a preemptible frame through the adjustment module. The embodiment of the present application dynamically adjusts the frame type of the currently transmitted data frame so that the frame type of the high-priority data frame in the network device is a fast frame, and the frame type of the low-priority data frame is a preemptible frame. Compared with the traditional method of fixedly dividing the frame type of the data frame, the frame type of the data group can be flexibly adjusted to realize multi-level preemption, thereby realizing the flexible preemption of the high-priority data frame for the low-priority data frame, and improving the flexibility of data transmission.

[0130] Fig.10 is a schematic diagram of the structure of another data transmission device provided in an embodiment of the present application. Fig.10 As shown, the device 100 includes:

[0131] Determination module 1001 is used to determine that if there is a second data frame to be transmitted during the process of transmitting a first data frame, the frame type of the first data frame and the second data frame are the same, and the priority of the second data frame is higher than the priority of the first data frame, then the frame type of the first data frame is determined to be a preemptible frame, and the frame type of the second data frame is determined to be a fast frame.

[0132] The transmission module 1002 is used to suspend the transmission of the first data frame and start the transmission of the second data frame.

[0133] Optionally, the determination module is used to: if the frame types of the first data frame and the second data frame are both fast frames, adjust the frame type of the first data frame to a preemptible frame; if the frame types of the first data frame and the second data frame are both preemptible frames, adjust the frame type of the second data frame to a fast frame.

[0134] Optionally, the determination module is used to: if the frame types of the first data frame and the second data frame are both fast frames, and there is a third data frame that is preempted by the first data frame for transmission, and the frame type mark of the third data frame is the first preemptible frame mark, then adjust the frame type mark of the first data frame to the second preemptible frame mark, and the second preemptible frame mark is different from the first preemptible frame mark. The specific implementation details of the preemptible frame mark can be referred to Figure 1 The detailed description of the data transmission method shown is not repeated here.

[0135] Optionally, the determination module is used to: if the frame types of the first data frame and the second data frame are both fast frames, and there is no third data frame whose transmission is preempted by the first data frame, adjust the frame type of the first data frame to a preemptible frame.

[0136] Optionally, the transmission module is further used to continue transmitting the first data frame after the transmission of the second data frame is completed.

[0137] Optionally, the transmission module is specifically configured to:

[0138] After the transmission of the second data frame is completed, if there is a fourth data frame to be transmitted and the priority of the fourth data frame is higher than the priority of the first data frame, the fourth data frame is transmitted; after the transmission of the fourth data frame is completed, the first data frame continues to be transmitted.

[0139] Optionally, the device 100 further includes a cache module, which is used to cache the first data frame in a corresponding output port queue, such as a first output port queue, according to the priority of the first data frame before transmitting the first data frame. It is also used to cache the second data frame in a corresponding output port queue, such as a second output port queue, according to the priority of the second data frame to be transmitted.

[0140] Optionally, the device 100 further includes an enabling / disabling control module, which is used to control whether the device 100 enables the data transmission method provided in the embodiment of the present application. When enabled, the device 100 performs the following steps: Figure 8 When disabled, the device 100 executes a conventional frame preemption mechanism.

[0141] For details not included here, please refer to Figure 1 and Figure 8 A detailed description of the data transmission method shown.

[0142] In summary, in the data transmission device provided by the embodiment of the present application, if the network device has a second data frame to be transmitted that has the same frame type as the first data frame and has a higher priority than the first data frame during the transmission of the first data frame, the network device determines through a determination module that the frame type of the first data frame is a preemptible frame and the frame type of the second data frame is a fast frame. The embodiment of the present application dynamically adjusts the frame type of the currently transmitted data frame or the frame type of the data frame in the outbound port queue, so that the frame type of the high-priority data frame in the network device is a fast frame, and the frame type of the low-priority data frame is a preemptible frame, thereby achieving flexible preemption of the low-priority data frame by the high-priority data frame and improving the flexibility of data transmission.

[0143] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0144] Fig.11 is a block diagram of a data transmission device provided in an embodiment of the present application. The data transmission device may be a network device, such as a switch or a router. Fig.11 As shown, the device 110 includes: a processing chip 1101. Fig.11 The device 110 may further include a memory 1102 , a communication bus 1103 , and a communication interface 1104 . The processing chip 1101 , the memory 1102 , and the communication interface 1104 are interconnected via the communication bus 1103 .

[0145] The processing chip 1101 includes a programmable logic circuit and / or a program instruction. When the processing chip 1101 runs the programmable logic circuit and / or the program instruction, the following is achieved: Figure 1 or Figure 8 The data transmission method shown.

[0146] Fig.12 1 is a schematic diagram of the structure of the processing chip 1101 provided in the embodiment of the present application. Fig.12 As shown, the processing chip 1101 includes a processing unit 1101A and a scheduling unit 1101B.

[0147] The processing unit 1101A may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.

[0148] Optionally, the memory 1102 is used to store a computer program, which includes program instructions. The processing unit 1101A calls the computer program stored in the memory 1102, and runs the program instructions in the computer program to cache the data frames to be transmitted into the corresponding egress port queue according to the priority of the data frames to be transmitted. In the present application, the data frames to be transmitted in the egress port queue can be understood as messages that are not MAC encapsulated.

[0149] The scheduling unit 1101B can be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (CPLD), a field programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The scheduling unit 1101B runs the programmable logic circuit in the processing chip to schedule the data frames to be transmitted in the outbound port queue, so as to realize Figure 1 or Figure 8 Specifically, the scheduling unit is used to Figure 1 or Figure 8 The method for preempting the transmission of low-priority data frames by high-priority data frames as described in the above method is to schedule data frames in the port queue and adjust or determine the frame type of the data frames; then set the value corresponding to the frame type in the SMD field during MAC encapsulation; finally, the data frame carrying the frame type (the value of the SMD field) reaches the communication interface 1104 after passing through the physical layer (PHY), and is transmitted to the receiving end from the communication interface 1104. The receiving end can determine whether the received data frame is a fast frame or a preemptible frame that is preempted for transmission based on the value of the SMD field in the data frame.

[0150] Please continue to see Fig.12The processing chip 1101 further includes a storage unit 1101C, which includes a storage space set for the egress port queue for caching the data frames to be transmitted. Optionally, the storage unit 1101C can also be used to store computer program instructions, and the processing unit 1101A calls the computer program instructions stored in the storage unit 1101C to cache the data frames to be transmitted into the corresponding egress port queue according to the priority of the data frames to be transmitted.

[0151] Optionally, the memory 1102 may also be used to cache data frames to be transmitted.

[0152] The communication interface 1104 includes a wired communication interface, wherein the wired communication interface includes an Ethernet interface, and the Ethernet interface may be an optical interface, an electrical interface or a combination thereof.

[0153] Further, Fig.13 1 is a schematic diagram of the structure of a scheduling unit 1101B provided in an embodiment of the present application. Fig.13 As shown, the scheduling unit 1101B includes data egress scheduling logic 1101B- 1 and MAC encapsulation logic 1101B- 2 .

[0154] The data egress scheduling logic 1101B-1 is used to schedule the data frames to be transmitted in the egress port queue, and provide the MAC encapsulation logic with a frame type indication corresponding to the data frames to be transmitted, where the frame type indication is used to indicate the frame type of the data frames to be transmitted. The MAC encapsulation logic 1101B-2 is used to perform MAC encapsulation on the data frames to be transmitted according to the data frames to be transmitted provided by the data egress scheduling logic 1101B-1 and the frame type indication corresponding to the data frames to be transmitted.

[0155] In a possible implementation, when the data egress scheduling logic 1101B-1 provides the MAC encapsulation logic 1101B-2 with a data frame to be transmitted, the data egress scheduling logic 1101B-1 provides the MAC encapsulation logic 1101B-2 with a frame type indication corresponding to the data frame out-of-band and in parallel. The frame type indication includes: a start of packet (SOP), an end of packet (EOP), a start of MAC-merge (SOM) and an end of MAC-merge (EOM). SOP is 1 for a message header, EOP is 1 for a message tail, and SOP and EOP are both 0 for a message middle segment. SOM is 1 for the first subsequent segment of the preemptible frame, EOM is 1 for the last subsequent segment of the preemptible frame, and SOM and EOM are both 0 for a preemptible middle segment of a frame. For example, when the data egress scheduling logic 1101B-1 provides the first data frame of the frame type of the fast frame to the MAC encapsulation logic 1101B-2, it sends an indication of the SOP value of 1 and the EOP value of 0 to the MAC encapsulation logic 1101B-2 out-of-band and in parallel, and then sends an indication of the SOP value of 0 and the EOP value of 0, and then sends an indication of the SOP value of 0 and the EOP value of 1; in this way, the first data frame is transmitted once and is not preempted for transmission, and the SMD value encapsulated by the MAC encapsulation logic 1101B-2 for the first data frame is SMD-E0. For another example, when the data egress scheduling logic 1101B-1 provides the first data frame of the frame type of the preemptible frame to the MAC encapsulation logic 1101B-2, it sends an indication of the SOP value of 1 and the EOP value of 0 to the MAC encapsulation logic 1101B-2 out-of-band and in parallel, and the SMD value encapsulated by the MAC encapsulation logic 1101B-2 for the first data frame is SMD-S0. Then, the data export scheduling logic 1101B-1 schedules the second data frame to preempt the transmission of the first data frame. Therefore, while providing the second data frame to the MAC encapsulation logic 1101B-2, it sends an out-of-band and parallel indication to the MAC encapsulation logic 1101B-2 that the SOP value is 1 and the EOP is 0. The SMD value encapsulated by the MAC encapsulation logic 1101B-2 for the second data frame is SMD-E1.Then, the data egress scheduling logic 1101B-1 schedules the preemptive transmission of the second data frame by the third data frame. Therefore, while providing the third data frame to the MAC encapsulation logic 1101B-2, it sends an out-of-band and parallel indication to the MAC encapsulation logic 1101B-2 that the SOP value is 1 and the EOP value is 0. The SMD value encapsulated by the MAC encapsulation logic 1101B-2 for the third data frame is SMD-E2. Next, the data egress scheduling logic 1101B-1 continues to transmit the third data frame, and sends an indication that the SOP value is 0 and the EOP value is 0, and then sends an indication that the SOP value is 0 and the EOP value is 1. The MAC encapsulation logic 1101B-2 encapsulates the subsequent fragments of the third data frame with SMD-E2. Next, the data export scheduling logic 1101B-1 continues to transmit the second data frame and sends an indication that the SOP value is 0, EOP is 0, SOM is 1, and EOM is 0, and the MAC encapsulation logic 1101B-2 encapsulates the subsequent slice of the preemptible frame of the second data frame with SMD-C4; then sends an indication that the SOP value is 0, EOP is 0, SOM is 0, and EOM is 0, and the MAC encapsulation logic 1101B-2 encapsulates the subsequent slice of the preemptible frame of the second data frame with SMD-C5; then sends an indication that the SOP value is 0, EOP is 1, SOM is 0, and EOM is 1, and the MAC encapsulation logic 1101B-2 encapsulates the subsequent slice of the preemptible frame of the second data frame with SMD-C6. Next, the data egress scheduling logic 1101B-1 continues to transmit the first data frame, and sends an indication that the SOP value is 0, the EOP value is 0, the SOM value is 1, and the EOM value is 0, and the MAC encapsulation logic 1101B-2 encapsulates the subsequent slice of the preemptible frame of the first data frame with SMD-C0; then sends an indication that the SOP value is 0, the EOP value is 0, the SOM value is 0, and the EOM value is 0, and the MAC encapsulation logic 1101B-2 encapsulates the subsequent slice of the preemptible frame of the first data frame with SMD-C1; then sends an indication that the SOP value is 0, the EOP value is 1, the SOM value is 0, and the EOM value is 1, and the MAC encapsulation logic 1101B-2 encapsulates the subsequent slice of the preemptible frame of the first data frame with SMD-C2. When the MAC encapsulation logic 1101B-2 finds that it did not receive an indication of an EOP value of 1 after the previous indication of an SOP value of 1, but instead received another indication of an SOP value of 1, it can be known that a preemptive transmission has occurred. And every time the MAC encapsulation logic 1101B-2 receives a data frame with an SOP value of 1, it selects one from SMD-S0 or SMD-E0, SMD-E1, SMD-E2, ..., SMD-E7 in turn. The MAC encapsulation logic 1101B-2 receives the first data frame with an SOP value of 1, and encapsulates the data frame with SMD-S0 or SMD-E0 according to the frame type of the data frame.

[0156] In another possible implementation, the data frame provided by the data export scheduling logic 1101B-1 to the MAC encapsulation logic 1101B-2 carries a frame type indication. The frame type indication of the fast frame includes: SOP and EOP. Similarly, SOP is 1 to indicate the message header, and EOP is 1 to indicate the message tail. SOP and EOP are both 0 to indicate the middle fragment of the message. The frame type indication of the preemptible frame includes: SOP, EOP, SOM and EOM. SOM is 1 to indicate the first subsequent fragment of the preemptible frame, EOM is 1 to indicate the last subsequent fragment of the preemptible frame, and SOM and EOM are both 0 to indicate the middle fragment of the subsequent fragment of the preemptible frame. Furthermore, the frame type indication can also include priority information, so that the MAC encapsulation logic 1101B-2 can distinguish between each intermediate subsequent fragment. The MAC encapsulation logic 1101B-2 can set the value of the SMD field in the MAC encapsulation header according to the frame type indication carried in the data frame to obtain a data frame of the corresponding frame type.

[0157] There may be multiple communication interfaces 1104, and the communication interfaces 1104 are used to communicate with other devices. For example, in the embodiment of the present application, the communication interface 1104 may be used to receive data frames and / or send data frames.

[0158] Optionally, the processing chip 1101 further includes a register, and the register includes an enable / disable flag. When the enable / disable flag position is a first value (e.g., 1), it indicates that the device 110 enables the data transmission method provided in the embodiment of the present application. When the enable / disable flag position is a second value (e.g., 0), it indicates that the device 110 disables the data transmission method provided in the embodiment of the present application, and at this time, the device 110 executes a traditional frame preemption mechanism.

[0159] When the enable / disable flag is set in the device 110, the processing chip 1101 includes a chip for implementing Figure 1 or Figure 8 The programmable logic circuit and / or program instructions of the data transmission method shown also include programmable logic circuits and / or program instructions for implementing a traditional frame preemption mechanism.

[0160] The communication interface 1104 may also include a wireless communication interface, which may be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof.

[0161] Optionally, see Fig.11 The device 110 may also include a processor 1105 for implementing other services or functions other than the data transmission method provided in the present application. The processor may be single-core or multi-core.

[0162] The embodiment of the present application further provides a computer storage medium, wherein instructions are stored on the computer storage medium, and when the instructions are executed by a processor, the following is implemented: Figure 1 or Figure 8 The data transmission method shown.

[0163] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0164] In the embodiments of the present application, the terms "first", "second" and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance. The term "at least one" means one or more, and the term "plurality" means two or more, unless otherwise expressly defined.

[0165] The term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0166] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the concept and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A data transmission method, characterized in that: The method comprises: If there is a second data frame to be transmitted during the transmission of the first data frame, and the priority of the second data frame is higher than the priority of the first data frame, determining that the frame type of the second data frame is a fast frame, the first data frame includes a reassembled frame start descriptor SMD field, and the value of the SMD field is used to indicate the frame type of the first data frame; If the frame type of the first data frame is a fast frame, adjusting the frame type of the first data frame to a preemptible frame; The transmission of the first data frame is suspended, and the transmission of the second data frame is started.

2. The method according to claim 1, characterized in that If the frame type of the first data frame is a fast frame, adjusting the frame type of the first data frame to a preemptible frame includes: If the frame type of the first data frame is a fast frame, and there is a third data frame whose transmission is preempted by the first data frame, and the frame type mark of the third data frame is the first preemptible frame mark, then the frame type mark of the first data frame is adjusted to the second preemptible frame mark, and the second preemptible frame mark is different from the first preemptible frame mark.

3. The method according to claim 1, characterized in that If the frame type of the first data frame is a fast frame, adjusting the frame type of the first data frame to a preemptible frame includes: If the frame type of the first data frame is a fast frame and there is no third data frame whose transmission is preempted by the first data frame, the frame type of the first data frame is adjusted to a preemptible frame.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: After the transmission of the second data frame is completed, the transmission of the first data frame continues.

5. The method according to claim 4, characterized in that The step of continuing to transmit the first data frame after the transmission of the second data frame is completed includes: After the transmission of the second data frame is completed, if there is a fourth data frame to be transmitted, and the priority of the fourth data frame is higher than the priority of the first data frame, determining that the frame type of the fourth data frame is a fast frame, and transmitting the fourth data frame; After the transmission of the fourth data frame is completed, the first data frame continues to be transmitted.

6. A data transmission method, characterized in that: The method comprises: If there is a second data frame to be transmitted during the transmission of a first data frame, the frame types of the first data frame and the second data frame are the same, and the priority of the second data frame is higher than the priority of the first data frame, then determining that the frame type of the first data frame is a preemptible frame, and the frame type of the second data frame is a fast frame, wherein the first data frame includes a first reconfigurable frame start symbol SMD field, and the value of the first SMD field is used to indicate the frame type of the first data frame, and the second data frame includes a second reconfigurable frame start symbol SMD field, and the value of the second SMD field is used to indicate the frame type of the second data frame; The transmission of the first data frame is suspended, and the transmission of the second data frame is started.

7. The method according to claim 6, characterized in that The determining that the frame type of the first data frame is a preemptible frame and the frame type of the second data frame is a fast frame includes: If the frame types of the first data frame and the second data frame are both fast frames, adjusting the frame type of the first data frame to a preemptible frame; If the frame types of the first data frame and the second data frame are both preemptible frames, the frame type of the second data frame is adjusted to a fast frame.

8. The method according to claim 7, characterized in that If the frame types of the first data frame and the second data frame are both fast frames, adjusting the frame type of the first data frame to a preemptible frame includes: If the frame types of the first data frame and the second data frame are both fast frames, and there is a third data frame whose transmission is preempted by the first data frame, and the frame type mark of the third data frame is the first preemptible frame mark, then the frame type mark of the first data frame is adjusted to the second preemptible frame mark, and the second preemptible frame mark is different from the first preemptible frame mark.

9. The method according to claim 7, characterized in that: If the frame types of the first data frame and the second data frame are both fast frames, adjusting the frame type of the first data frame to a preemptible frame includes: If the frame types of the first data frame and the second data frame are both fast frames, and there is no third data frame whose transmission is preempted by the first data frame, the frame type of the first data frame is adjusted to a preemptible frame.

10. The method according to any one of claims 6 to 9, characterized in that: The method further comprises: After the transmission of the second data frame is completed, the transmission of the first data frame continues.

11. The method according to claim 10, characterized in that The step of continuing to transmit the first data frame after the transmission of the second data frame is completed includes: After the transmission of the second data frame is completed, if there is a fourth data frame to be transmitted, and the priority of the fourth data frame is higher than the priority of the first data frame, transmitting the fourth data frame; After the transmission of the fourth data frame is completed, the first data frame continues to be transmitted.

12. A data transmission device, characterized in that: The device comprises: a determination module, configured to determine that if there is a second data frame to be transmitted during the transmission of the first data frame, and the priority of the second data frame is higher than the priority of the first data frame, the frame type of the second data frame is a fast frame, the first data frame includes a reconfigurable frame start symbol SMD field, and the value of the SMD field is used to indicate the frame type of the first data frame; an adjusting module, configured to adjust the frame type of the first data frame to a preemptible frame if the frame type of the first data frame is a fast frame; The transmission module is used to suspend the transmission of the first data frame and start the transmission of the second data frame.

13. The device according to claim 12, characterized in that The adjustment module is used for: If the frame type of the first data frame is a fast frame, and there is a third data frame whose transmission is preempted by the first data frame, and the frame type mark of the third data frame is the first preemptible frame mark, then the frame type mark of the first data frame is adjusted to the second preemptible frame mark, and the second preemptible frame mark is different from the first preemptible frame mark.

14. The device according to claim 12, characterized in that The adjustment module is used for: If the frame type of the first data frame is a fast frame and there is no third data frame whose transmission is preempted by the first data frame, the frame type of the first data frame is adjusted to a preemptible frame.

15. The device according to any one of claims 12 to 14, characterized in that: The transmission module is further used to continue transmitting the first data frame after the transmission of the second data frame is completed.

16. The device according to claim 15, characterized in that The transmission module is used for: After the transmission of the second data frame is completed, if there is a fourth data frame to be transmitted, and the priority of the fourth data frame is higher than the priority of the first data frame, determining that the frame type of the fourth data frame is a fast frame, and transmitting the fourth data frame; After the transmission of the fourth data frame is completed, the first data frame continues to be transmitted.

17. A data transmission device, characterized in that: The device comprises: a determination module, configured to determine that if there is a second data frame to be transmitted during the transmission of a first data frame, the frame type of the first data frame and the second data frame are the same, and the priority of the second data frame is higher than the priority of the first data frame, the frame type of the first data frame is determined to be a preemptible frame, and the frame type of the second data frame is determined to be a fast frame, wherein the first data frame includes a first reconfigurable frame start symbol SMD field, and the value of the first SMD field is used to indicate the frame type of the first data frame, and the second data frame includes a second reconfigurable frame start symbol SMD field, and the value of the second SMD field is used to indicate the frame type of the second data frame; The transmission module is used to suspend the transmission of the first data frame and start the transmission of the second data frame.

18. The device according to claim 17, characterized in that The determining module is used to: If the frame types of the first data frame and the second data frame are both fast frames, adjusting the frame type of the first data frame to a preemptible frame; If the frame types of the first data frame and the second data frame are both preemptible frames, the frame type of the second data frame is adjusted to a fast frame.

19. The device according to claim 18, characterized in that The determining module is used to: If the frame types of the first data frame and the second data frame are both fast frames, and there is a third data frame whose transmission is preempted by the first data frame, and the frame type mark of the third data frame is the first preemptible frame mark, then the frame type mark of the first data frame is adjusted to the second preemptible frame mark, and the second preemptible frame mark is different from the first preemptible frame mark.

20. The device according to claim 18, characterized in that The determining module is used to: If the frame types of the first data frame and the second data frame are both fast frames, and there is no third data frame whose transmission is preempted by the first data frame, the frame type of the first data frame is adjusted to a preemptible frame.

21. The device according to any one of claims 17 to 20, characterized in that The transmission module is further used to continue transmitting the first data frame after the transmission of the second data frame is completed.

22. The device according to claim 21, characterized in that The transmission module is used for: After the transmission of the second data frame is completed, if there is a fourth data frame to be transmitted, and the priority of the fourth data frame is higher than the priority of the first data frame, transmitting the fourth data frame; After the transmission of the fourth data frame is completed, the first data frame continues to be transmitted.

23. A processing chip, characterized in that: The processing chip includes a programmable logic circuit and / or program instructions, and the processing chip runs the programmable logic circuit and / or program instructions to implement the data transmission method according to any one of claims 1 to 11.

24. The processing chip according to claim 23, characterized in that: The processing chip includes a processing unit and a scheduling unit; The processing unit is used for caching the data frames to be transmitted into the corresponding outbound port queue according to the priority of the data frames to be transmitted; The scheduling unit is used to schedule the data frames to be transmitted in the egress port queue to implement the data transmission method according to any one of claims 1 to 11.

25. The processing chip according to claim 24, characterized in that: The scheduling unit includes data egress scheduling logic and media access control MAC encapsulation logic; The data egress scheduling logic is used to schedule the data frames to be transmitted in the egress port queue, and provide the MAC encapsulation logic with a frame type indication corresponding to the data frames to be transmitted, wherein the frame type indication is used to indicate the frame type of the data frames to be transmitted; The MAC encapsulation logic is used to perform MAC encapsulation on the data frame to be transmitted according to the frame type indication corresponding to the data frame to be transmitted.

26. A data transmission device, characterized in that: include: A communication interface and a processing chip as claimed in any one of claims 23 to 25.

Citation Information

Patent Citations

  • Method for managing traffic in a network based upon ethernet switches, vehicle, communication interface, and corresponding computer program product

    CN109962863A

  • Relay device and data transfer method

    US20170041243A1