Converged data exchange method and time-sensitive network switch
A converged data exchange method and a time-sensitive network switch are provided in the present disclosure. The network switch device performs sensitivity identification for the data to be forwarded. For the switching transmission of non-time-sensitive data, the push port queue and the pop port queue perform cut-through switching for the data, which reduces the residence time of the data packet in the switch device. For time-sensitive data, the push port queue and pop port queue forward the data according to the corresponding priority scheduling policies.
1 . A converged data exchange method, performed by a time-sensitive network switch, comprising:
receiving a to-be-forwarded data frame from a front-end link device, and identifying priority flag information of the to-be-forwarded data frame;
identifying a data type of the to-be-forwarded data frame based on the priority flag information of the to-be-forwarded data frame, categorizing the to-be-forwarded data frame as time-sensitive data or non-time-sensitive data according to the data type of the to-be-forwarded data frame; and assigning the time-sensitive data or the non-time-sensitive data to a push port queue according to priority;
wherein, when the to-be-forwarded data frame is categorized as the time-sensitive data, the push port queue schedules the time-sensitive data according to priority during a transmission process of the time-sensitive data, and when the to-be-forwarded data frame is categorized as the non-time sensitive data, the push port queue buffers and stores the non-time-sensitive data during a transmission process of the non-time-sensitive data; the push port queue obtains a destination MAC address of the time-sensitive data or a destination MAC address of the non-time-sensitive data by querying a queue mapping relationship table, and forwards the time-sensitive data or the non-time-sensitive data to a corresponding pop port queue through a queue cross matrix based on the destination MAC address of the time-sensitive data or the destination MAC address of the non-time-sensitive data;
the pop port queue forwards the time-sensitive data or the non-time-sensitive data to a back-end link device according to priority;
wherein identifying the data type of the to-be-forwarded data frame based on the priority flag information of the to-be-forwarded data frame comprises:
analyzing a priority flag, Priority Code Point, in an 802.1Q field of the to-be-forwarded data frame, to obtain the priority flag information of the to-be-forwarded data frame;
wherein a length of the priority flag, Priority Code Point, is 3 bits, identifying the data type of the to-be-forwarded data frame based on the priority flag information of the to-be-forwarded data frame, categorizing the to-be-forwarded data frame as the time-sensitive data or the non-time-sensitive data according to the data type of the to-be-forwarded data frame, comprises:
in response to determining that the priority flag of the to-be-forwarded data frame is a reserved empty byte, determining that the to-be-forwarded data frame is the non-time-sensitive data;
in response to determining that the priority flag of the to-be-forwarded data frame is 000, 001, 010, or 011, determining that the to-be-forwarded data frame is the time-sensitive data.
2 . The method according to claim 1 , further comprising:
extracting a VLAN field, a source MAC address filed, and a destination MAC address field of the to-be-forwarded data frame.
3 . The method according to claim 1 , further comprising:
in response to determining that the data type of the to-be-forwarded data frame is the time-sensitive data, the push port queue and the pop port queue perform scheduling based on priority of the time-sensitive data;
in response to determining that the data type of to-be-forwarded data frame is the non-time-sensitive data, the push port queue and the pop port queue perform Ethernet data frame exchange according to QoS mechanism.
4 . The method according to claim 1 , wherein operation modes of the push port queue comprise: a discard mode, a port flow control mode, and a priority-based flow control mode;
in the discard mode, in response to the push port queue failing to identify congestion status, all frames received by the push port queue are evaluated by a congestion control function, wherein copied frames are discarded;
in the port flow control mode, the front-end link device is notified by a pause frame that the push port queue is not able to accept more data; in response to the front-end link device identifying a pause request, the push port queue does not discard any incoming data; in response to the front-end link device not identifying the pause frame, a buffer control function of the push port queue discards data when the data arrives at the push port queue;
in the priority-based flow control mode, in response to the front-end link device being notified of QoS class congestion policy in the push port queue by a pause frame, the front-end link device stops scheduling QoS class data frames; in response to the front-end link device not identifying the pause frame, a buffer control function of the push port queue discards data before the data arrives at the push port queue.
5 . A time-sensitive network switch, comprising:
a storage medium storing computer executable instructions;
a processor capable of executing the computer executable instructions;
a push port;
a pop port;
wherein, when the computer readable instructions are executed by the processor, the processor is configured to perform operations comprising:
receiving to-be-forwarded data frames from a front-end link device, and identifying priority flag information of the to-be-forwarded data frames;
identifying a data type of the to-be-forwarded data frame based on the priority flag information of the to-be-forwarded data frame, categorizing the to-be-forwarded data frame as time-sensitive data or non-time-sensitive data according to the data type of the to-be-forwarded data frame; and assigning the time-sensitive data or the non-time-sensitive data to a push port queue of the push port according to priority;
wherein, when the to-be-forwarded data frame is categorized as the time-sensitive data, the push port queue schedules the time-sensitive data according to priority during a transmission process of the time-sensitive data, and when the to-be-forwarded data frame is categorized as the non-time sensitive data, the push port queue buffers and stores the non-time-sensitive data during a transmission process of the non-time-sensitive data; the push port queue obtains a destination MAC address of the time-sensitive data or a destination MAC address of the non-time-sensitive data by querying a queue mapping relationship table and forwards the time-sensitive data or the non-time-sensitive data to the push port queue of the push port through a queue cross matrix based on the destination MAC address of the time-sensitive data or the destination MAC address of the non-time-sensitive data;
wherein, the pop port queue forwards the time-sensitive data or the non-time-sensitive data to a back-end link device according to priority;
wherein identifying the data type of the to-be-forwarded data frame based on the priority flag information of the to-be-forwarded data frame, comprises:
analyzing a priority flag, Priority Code Point, in an 802.1Q field of the to-be-forwarded data frame, to obtain the priority flag information of the to-be- forwarded data frame;
wherein a length of the priority flag, Priority Code Point, is 3 bits, identifying the data type of the to-be-forwarded data frame based on the priority flag information of the to-be-forwarded data frame, categorizing the to-be-forwarded data frame as the time-sensitive data or the non-time-sensitive data according to the data type of the to-be-forwarded data frame, comprises:
in response to determining that the priority flag of the to-be-forwarded data frame is a reserved empty byte, determining that the to-be-forwarded data frame is the non-time-sensitive data;
in response to determining that the priority flag of the to-be-forwarded data frame is 000, 001, 010, or 011, determining that the to-be-forwarded data frame is the time-sensitive data.
6 . The time-sensitive switch according to claim 5 , the operations further comprise:
extracting a VLAN field, a source MAC address filed, and a destination MAC address field of the to-be-forwarded data frame;
saving the VLAN field, the source MAC address filed, and the destination MAC address field of the to-be-forwarded data frame in the queue mapping relationship table in the storage medium.
7 . The time-sensitive switch according to claim 5 , wherein,
in response to determining that the data type of to-be-forwarded data frame is the time-sensitive data, the push port queue and the pop port queue perform scheduling based on the priority of the time-sensitive data;
in response to determining that the data type of to-be-forwarded data frame is the non-time-sensitive data, the push port queue and the pop port queue do not distinguish priority, and perform Ethernet data frame exchange according to QoS mechanism.
8 . The time-sensitive switch according to claim 5 , wherein operation modes of the push port queue comprise: a discard mode, a port flow control mode, and a priority-based flow control mode;
in the discard mode, in response to the push port queue failing to identify congestion status, all frames received by the push port queue are evaluated by a congestion control function, wherein copied frames are discarded;
in the port flow control mode, the front-end link device is notified by a pause frame that the push port queue is not able to accept more data; in response to the front-end link device identifying a pause request, the push port queue does not discard any incoming data; in response to the front-end link device not identifying the pause frame, a buffer control function of the push port queue discards data when the data arrives at the push port queue;
in the priority-based flow control mode, in response to the front-end link device being notified of QoS class congestion policy in the push port queue by a pause frame, the front-end link device stops scheduling QoS class data frames; in response to the front-end link device not identifying the pause frame, a buffer control function of the push port queue discards data before the data arrives at the push port queue.