Time-sensitive network gating list implementation method and gating list entry generation method

文档序号:1834623 发布日期:2021-11-12 浏览:11次 中文

阅读说明:本技术 时间敏感网络门控列表实现方法及门控列表条目生成方法 (Time-sensitive network gating list implementation method and gating list entry generation method ) 是由 詹双平 冯景斌 崔春来 成剑 于 2021-10-15 设计创作,主要内容包括:本发明公开了时间敏感网络门控列表实现方法及门控列表条目生成方法,所述时间敏感网络门控列表实现方法包括:接收门控列表配置指令,其中,门控列表配置指令中包括目标门控列表的数量N和目标端口,N为正整数,且N≥0;若N≥1,查找门控列表池中的空闲门控列表,其中,多个端口对应一个所述门控列表池;若空闲门控列表的数量不小于N,则读取每个目标门控列表的列表条目和循环周期,将各个目标门控列表的列表条目和循环周期分别写入至N个空闲门控列表,生成N个目标门控列表;配置目标端口和N个目标门控列表的映射关系。本发明能实现门控列表和端口之间灵活的映射,最大化利用硬件资源,使得单个端口最多能够承担的业务流的数量增大。(The invention discloses a method for realizing a time-sensitive network gating list and a method for generating entries of the gating list, wherein the method for realizing the time-sensitive network gating list comprises the following steps: receiving a gating list configuration instruction, wherein the gating list configuration instruction comprises the number N of target gating lists and target ports, N is a positive integer and is more than or equal to 0; if N is larger than or equal to 1, searching a free gating list in a gating list pool, wherein a plurality of ports correspond to one gating list pool; if the number of the idle gating lists is not less than N, reading list items and cycle periods of each target gating list, respectively writing the list items and cycle periods of each target gating list into the N idle gating lists, and generating N target gating lists; and configuring the mapping relation between the target port and the N target gating lists. The invention can realize flexible mapping between the gating list and the port, and maximally utilize hardware resources, so that the number of service flows which can be borne by a single port at most is increased.)

1. A method for implementing a time-sensitive network gated list, the method comprising:

receiving a gating list configuration instruction, wherein the gating list configuration instruction comprises the number N of target gating lists and target ports, N is a positive integer and is more than or equal to 0;

if N is larger than or equal to 1, searching a free gating list in a gating list pool, wherein a plurality of ports correspond to one gating list pool;

if the number of the idle gating lists is not less than N, reading list entries and cycle periods of each target gating list, respectively writing the list entries and cycle periods of each target gating list into N idle gating lists, and generating N target gating lists;

and configuring the mapping relation between the target port and the N target gating lists.

2. The method of claim 1, wherein after receiving the gated list configuration instruction, the method further comprises:

and if N =0, removing the current mapping relation of the target port.

3. The method according to claim 1, wherein the configuring the mapping relationship between the target port and the N target gated lists comprises:

obtaining the effective time of each target gating list;

and controlling each target gating list to take effect at the corresponding effective moment.

4. The method according to claim 1, wherein the configuring the mapping relationship between the target port and the N target gated lists comprises:

obtaining the effective time of all list items in the effective gating list in the target gating list mapped by the target port;

and when the effective moment of the target list item is reached, switching the currently effective list item into the target list item.

5. A switch, comprising a processor, a computer readable storage medium communicatively coupled to the processor, the computer readable storage medium adapted to store a plurality of instructions, the processor adapted to invoke the instructions in the computer readable storage medium to perform the steps of implementing the time sensitive network gated list implementation method of any of claims 1-4.

6. An apparatus for time-sensitive network gated list configuration, the apparatus comprising:

the system comprises an instruction receiving module, a processing module and a processing module, wherein the instruction receiving module is used for receiving a gating list configuration instruction, the gating list configuration instruction comprises the number N of target gating lists and target ports, N is a positive integer and is more than or equal to 0;

the resource searching module is used for searching an idle gating list in a gating list pool if N is more than or equal to 1, wherein a plurality of ports correspond to one gating list pool;

a list entry reading module, configured to read a list entry and a cycle period of each target gating list when the number of the free gating lists is not less than N, and write the list entry and the cycle period of each target gating list into N free gating lists, respectively, to generate N target gating lists;

a mapping module, configured to configure a mapping relationship between the target port and the N target gating lists.

7. A method for time-sensitive network-gated list entry generation, the method comprising:

acquiring network topology information in a time-sensitive network and service flow information of a target service flow;

determining a forwarding path of each target service flow according to the network topology information and the service flow information of the target service flow, and allocating time slots to each target service flow on the forwarding path to realize time slot scheduling of all the target service flows;

determining an original gating list of a target port according to the time slot scheduling results of all the target service streams;

the method comprises the steps of obtaining the number N of target gating lists corresponding to a target port, splitting list items in an original gating list of the target port into N item sets, wherein each item set comprises at least one list item, and obtaining the list items of each target gating list, wherein N is a positive integer and is more than or equal to 1.

8. The method according to claim 7, wherein the splitting gating list entries in the original gating list of the target port into N sets of entries to obtain list entries of each target gating list comprises:

taking list items in the nth item set as gating list items in the nth target gating list, wherein N is a positive integer and is not more than N;

and setting the effective time and the cycle period of each target gating list to be the same as those of the original gating list.

9. A method for time-sensitive network-gated list entry generation, the method comprising:

acquiring network topology information in a time-sensitive network and service flow information of a target service flow;

acquiring the number N of target gating lists corresponding to a target port, and dividing all the target service flows into N groups according to the service period of each target service flow, wherein N is a positive integer and is not less than 1;

allocating time slots to all the target service streams according to preset scheduling constraint conditions, and generating list items in each target gating list corresponding to a target port according to time slot allocation results;

wherein the scheduling constraint condition is: the time slots of the target traffic streams belonging to the same group are not allowed to overlap, and the time slots of the target traffic streams belonging to different groups are not allowed to overlap and are not allowed to be adjacent.

10. The method according to claim 9, wherein said dividing all the target traffic flows into N groups according to the traffic cycle of each target traffic flow comprises:

and dividing all the target service flows into N groups according to the principle that the ratio of the least common multiple to the greatest common divisor of the service periods of the target service flows belonging to the same group meets a preset condition.

11. The method according to claim 9, wherein the generating list entries in each target gating list corresponding to a target port according to a slot allocation result comprises:

obtaining the starting time of the first time slot in the scheduling result of the target portDetermining a target group to which the target service flow corresponding to the starting time of the first time slot belongs, and determining a cycle period of the nth target gating list according to service periods of all the target service flows in the target group

Is provided withExtracting the scheduling result of the target port for the effective moment of the nth target gating listAll time slot positions belonging to the target grouping in the range and the door opening and closing event corresponding to each time slot position;

to be provided withThe door opening and closing event corresponding to the moment is used as the first list item in the nth target gating list, other door opening and closing events are sequentially used as the subsequent items in the nth target gating list according to the time slot position sequence, and the execution moments of the subsequent items are thatObtaining all list items corresponding to the nth target gating list for the relative time obtained by the reference;

deleting all the time slot information belonging to the target group in the scheduling result of the target port, updating the scheduling result of the target port, and then re-executing the step of obtaining the starting time of the first time slot in the scheduling result of the target port until all list items respectively corresponding to all the target gating lists are obtained.

12. A network controller, characterized in that the network controller comprises: a processor, a computer readable storage medium communicatively connected to the processor, the computer readable storage medium adapted to store a plurality of instructions, the processor adapted to invoke the instructions in the computer readable storage medium to perform the steps of implementing the time sensitive network gated list entry generation method of any of the above claims 7-8 and/or the steps of the time sensitive network gated list entry generation method of any of the above claims 9-11.

13. A computer readable storage medium, characterized in that the computer readable storage medium stores one or more programs which are executable by one or more processors to implement the steps of the time sensitive network gating list implementation method according to any one of claims 1 to 4 and/or the steps of the time sensitive network gating list entry generation method according to any one of claims 7 to 8 and/or the steps of the time sensitive network gating list entry generation method according to any one of claims 9 to 11.

Technical Field

The invention relates to the technical field of time-sensitive networks, in particular to a time-sensitive network gating list implementation method and a gating list entry generation method.

Background

The information technology brings deep innovation of industrial automation, many new services need deterministic network communication guarantee, such as high-quality audio and video transmission, telemedicine, unmanned aerial vehicle group control and the like, the TSN (Time-Sensitive network) is widely applied, and the key for realizing the TSN technology is to guarantee low-delay reliable transmission of service data streams.

Ieee802.1qbv, also known as Time Aware Shaping (TAS) is a core protocol of TSN, and it is its application that provides deterministic latency guarantees for Time sensitive data. The TAS time perception scheduling controller divides data flow into different types, allocates specific time slots for time sensitive key data and ensures that the forwarding of the data is not interfered and blocked by other data services. The TAS implements accurate time scheduling through a gate Control list GCL (gate Control list), controls the gate opening and closing state of each queue at a certain time through the gate Control list GCL, data can be sent only when the gate is opened, and before and during sending of critical data, we can close sending of other data to ensure that the critical data is not affected, which is also the key for the TAS to ensure certainty. The gating list is cyclic periodically, which indicates that the TAS is suitable for providing a delay guarantee for periodic data.

In the prior art, each port of the switch is bound with two GCL lists, one is a currently running list, and the other is a configuration list for receiving new data.

Thus, there is a need for improvements and enhancements in the art.

Disclosure of Invention

Aiming at the defects in the prior art, the invention provides a method, a device, a switch and a storage medium for realizing a time-sensitive network gating list, and aims to solve the problem that the number of service flows which can be borne by a single port at most is small in the prior art.

In order to solve the technical problems, the technical scheme adopted by the invention is as follows:

in a first aspect of the present invention, a method for implementing a time-sensitive network gated list is provided, where the method includes:

receiving a gating list configuration instruction, wherein the gating list configuration instruction comprises the number N of target gating lists and target ports, N is a positive integer and is more than or equal to 0;

if N is larger than or equal to 1, searching a free gating list in a gating list pool, wherein a plurality of ports correspond to one gating list pool;

if the number of the idle gating lists is not less than N, reading list entries and cycle periods of each target gating list, respectively writing the list entries and cycle periods of each target gating list into N idle gating lists, and generating N target gating lists;

and configuring the mapping relation between the target port and the N target gating lists.

In a second aspect of the present invention, there is provided a switch, including a processor, and a computer-readable storage medium communicatively connected to the processor, the computer-readable storage medium being adapted to store a plurality of instructions, and the processor being adapted to call the instructions in the computer-readable storage medium to execute the steps of implementing any one of the above-mentioned time-sensitive network gating list implementation methods.

In a third aspect of the present invention, an apparatus for configuring a time-sensitive network gating list is provided, including:

the system comprises an instruction receiving module, a processing module and a processing module, wherein the instruction receiving module is used for receiving a gating list configuration instruction, the gating list configuration instruction comprises the number N of target gating lists and target ports, N is a positive integer and is more than or equal to 0;

the resource searching module is used for searching an idle gating list in a gating list pool if N is more than or equal to 1, wherein a plurality of ports correspond to one gating list pool;

a list entry reading module, configured to read a list entry and a cycle period of each target gating list when the number of the free gating lists is not less than N, and write the list entry and the cycle period of each target gating list into N free gating lists, respectively, to generate N target gating lists;

a mapping module, configured to configure a mapping relationship between the target port and the N target gating lists.

The fourth aspect of the present invention provides a method for generating time-sensitive network gated list entries, comprising:

acquiring network topology information in a time-sensitive network and service flow information of a target service flow;

determining a forwarding path of each target service flow according to the network topology information and the service flow information of the target service flow, and allocating time slots to each target service flow on the forwarding path to realize time slot scheduling of all the target service flows;

determining an original gating list of a target port according to the time slot scheduling results of all the target service streams;

the method comprises the steps of obtaining the number N of target gating lists corresponding to a target port, splitting list items in an original gating list of the target port into N item sets, wherein each item set comprises at least one list item, and obtaining the list items of each target gating list, wherein N is a positive integer and is more than or equal to 1.

In a fifth aspect of the present invention, a method for generating a time-sensitive network gated list entry is provided, including:

acquiring network topology information in a time-sensitive network and service flow information of a target service flow;

acquiring the number N of target gating lists corresponding to a target port, and dividing all the target service flows into N groups according to the service period of each target service flow, wherein N is a positive integer and is not less than 1;

allocating time slots to all the target service streams according to preset scheduling constraint conditions, and generating list items in each target gating list corresponding to a target port according to time slot allocation results;

wherein the scheduling constraint condition is: the time slots of the target traffic streams belonging to the same group are not allowed to overlap, and the time slots of the target traffic streams belonging to different groups are not allowed to overlap and are not allowed to be adjacent.

In a sixth aspect of the present invention, a network controller is provided, which includes a processor, and a computer-readable storage medium communicatively connected to the processor, and the computer-readable storage medium is adapted to store a plurality of instructions, and the processor is adapted to call the instructions in the computer-readable storage medium to execute the steps of implementing the time-sensitive network gating list implementation method provided in the fourth aspect and/or the fifth aspect.

A seventh aspect of the present invention provides a computer readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the method for implementing a time-sensitive network-gated list provided by the first aspect of the present invention and/or the steps of the method for generating a time-sensitive network-gated list entry provided by the fourth aspect of the present invention and/or the steps of the method for generating a time-sensitive network-gated list entry provided by the fifth aspect of the present invention.

Compared with the prior art, the invention provides a time-sensitive network gating list implementation method and a gating list item generation method. Under the condition that the number of entries of a single gating list is limited, the gating list entries can be configured by using free gating list resources in a gating list pool, so that under the constraint of storage resources of the same switch, ports bearing more service flows can occupy more gating list resources, ports bearing less service flows can release unneeded gating list resources, the gating list resources and the ports can be flexibly mapped according to needs, hardware resources are utilized to the maximum extent, and the number of service flows which can be borne by the single port at most is increased. And when a plurality of gating lists are mapped on one port, two gating list generation methods are supported. The first method can load a large number of gating list entries into different gating lists to be sequentially executed, which is equivalent to combining a plurality of small gating lists into a large gating list, and realizes flexible expansion of the sizes of the entries. The second method supports a plurality of gating lists to be executed in parallel and in a staggered mode in different cycles, can avoid a large number of repeated redundant entries generated due to service cycle difference, and saves entry resources.

Drawings

FIG. 1 is a flow chart of an embodiment of a method for implementing a time-sensitive network gated list provided by the present invention;

FIG. 2 is a schematic diagram of the gate open and close states controlled by the GCL list;

FIG. 3 is a diagram illustrating a fixed one-to-one mapping relationship between gated lists and ports;

FIG. 4 is a diagram illustrating a gated list pool in an embodiment of a method for implementing a time-sensitive network gated list provided by the present invention;

FIG. 5 is a diagram illustrating implementation of a gated list pool in an embodiment of a method for implementing a time-sensitive network gated list provided by the present invention;

FIG. 6 is a logic diagram of a mapping relationship configured in an embodiment of a method for implementing a time-sensitive network gated list provided by the present invention;

fig. 7 is a schematic diagram of a mapping structure of a target port and a target gating list in an embodiment of a method for implementing a time-sensitive network gating list provided by the present invention;

FIG. 8 is a schematic diagram of an embodiment of a time-sensitive network gated list configuration apparatus according to the present invention;

FIG. 9 is a schematic diagram of an embodiment of a switch provided by the present invention;

FIG. 10 is a flowchart of a first method for generating a time-sensitive network-gated list entry according to an embodiment of the present invention;

FIG. 11 is a logic diagram of a first method for generating time-sensitive network-gated list entries according to an embodiment of the present invention;

fig. 12 is a schematic diagram illustrating splitting of an original gated list entry in an embodiment of a first method for generating a gated list entry in a time-sensitive network according to the present invention;

FIG. 13 is a flowchart of a second method for generating time-sensitive network-gated list entries according to an embodiment of the present invention;

FIG. 14 is a logic diagram of a second embodiment of a method for generating a gated list entry in a time-sensitive network according to the present invention;

FIG. 15 is a first schematic diagram illustrating constraints in an embodiment of a second method for generating a time-sensitive network gated list entry according to the present invention;

FIG. 16 is a second diagram illustrating constraints in an embodiment of a second method for generating a gated list entry in a time-sensitive network according to the present invention;

FIG. 17 is a diagram illustrating the effect of a second method for generating time-sensitive network-gated list entries according to the present invention;

fig. 18 is a schematic diagram of a network controller according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

In the time-sensitive network, the gate state of each queue at a certain time is controlled by a gate list GCL, specifically, each entry in the gate list specifies a queue state and an execution time of the entry, since all traffic flows have a certain traffic period, the list entries in the gate list are executed circularly, the gate list also includes a circular period, as shown in fig. 2, taking the time T1 as an example, the gate states of the switch from the queue 7 to the queue 0 at the time are 10000000 (1 indicates open and 0 indicates closed), and data can be sent only when the door is open, that is, only the queue 7 can send data at the time. The inventors have found that, when the ports in the switch and the gating list are in a fixed, one-to-one mapping relationship, as shown in fig. 3, the switch will bind two gating lists, a and b, per port, one currently running, another configuration list for receiving new data, when the gate control list entry needs to be updated by adding or deleting service, in order to avoid interrupting the running service, new entries need to be issued to the configuration list, then switching the configuration list into the running list, switching the original running list into the configuration list, for a switch supporting 16 ports, 32 gating lists are required, and if the number of entries supported by each gating list is 256, each entry has a bit width of 32bits (where 8 bits corresponds to the switch state of 8 queues, and 24 bits corresponds to the duration of the entry), a total of 32 x 256 x 32bit =256Kbit of storage resources is required. The storage is a relatively scarce resource in the switch, and under the condition of insufficient storage resources, the number of entries in each gating list is limited, and the number of entries of the gating list bound to the port determines the number of TSN streams supported by the switch.

In order to solve at least one of the above problems, the present invention provides a method for implementing a time-sensitive network gating list and a method for generating entries of the gating list.

Example one

As shown in fig. 1, in an embodiment of the method for implementing a time-sensitive network gated list, the method includes the steps of:

s100, receiving a gating list configuration instruction, wherein the gating list configuration instruction comprises the number N of target gating lists and target ports, N is a positive integer and is more than or equal to 0.

Specifically, the gating list configuration instruction may be issued to the switch by the network controller, and the network controller first obtains the number of target gating lists corresponding to the target port, may set the number of target gating lists by receiving the instruction, or may adopt a default value, or the like.

S200, if N is larger than or equal to 1, searching a free gating list in a gating list pool, wherein a plurality of ports correspond to one gating list pool.

Specifically, in this embodiment, as shown in fig. 4, a gating list pool is provided, each switch device has multiple ports, the multiple ports share one gating list pool, multiple independent gating lists are provided in the gating list pool, a free gating list in the gating list pool is a gating list that does not currently establish a mapping relationship with any port, and the free gating list in the gating list pool may be used to write a gating list entry, so as to generate the target gating list. If the number N of the target gating lists in the gating list configuration instruction issued by the network controller is greater than or equal to 1, it indicates that the target port needs to establish mapping with N gating lists. If N =0, it indicates that the target port does not need to establish mapping with the gating list, then the current mapping relationship of the target port may be released, and after the mapping relationship between the port and the gating list is released, the gating list without the mapping relationship is cleared, and is converted into an idle gating list, which may be used to write in the gating list entries corresponding to other ports. Specifically, the gating list configuration instruction further includes an effective time, and if N =0, the current mapping relationship of the target port is released at the effective time.

S300, if the number of the idle gating lists is not less than N, reading list entries and cycle periods of each target gating list, writing the list entries and cycle periods of each target gating list into the N idle gating lists respectively, and generating the N target gating lists.

Specifically, the list entry, the cycle period, the effective time, and the like of each target gating list are issued to the switch device by the network controller, and may be issued together with the number N of the target gating lists and the target ports, or issued by the network controller after the switch device reports that the number of the idle gating lists in the gating list pool is not less than N.

S400, configuring the mapping relation between the target port and the N target gating lists.

The configuring the mapping relationship between the target port and the N target gating lists includes:

obtaining the effective time of each target gating list;

and controlling each target gating list to take effect at the corresponding effective moment.

Specifically, the queue time gating state (GCL _ Status) of each port is output in the gating list pool as a condition for opening and closing the output queue of each port. As shown in fig. 5, each gating list in the gating list pool is independent, and after the validation time of each gating list after being written into a list entry, the contents GCL _ Out of the time gating list entry and the pulse signal GCL _ Change for which GCL _ Out starts validation can be output in an independent loop at the same time.

When the mapping relation between the target port and the N target gating lists is established and the target gating list corresponding to the target port takes effect, the gating list pool outputs GCL _ Status according to each entry in the target gating list to control the opening or closing of each queue of the target port. Specifically, the time-gated output of each port may be correspondingly controlled by a plurality of independent GCL multiplexers GCL _ Mux, the GCL multiplexer of the target port selects 1 or a plurality of target gating lists as input sources in a gating list pool according to the mapping relationship of the target port, and the GCL multiplexer of the target port uses GCL _ Change of a plurality of input sources as a latch flag to respectively latch GCL _ Out output of the corresponding gating list as the output of the target port time-gated state GCL _ Status. That is, after the configuring the mapping relationship between the target port and the N target gating lists, the method further includes:

obtaining the effective time of all list items in the effective gating list in the target gating list mapped by the target port;

and when the effective moment of the target list item is reached, switching the currently effective list item into the target list item.

Each target gating list corresponding to the target port can independently output gating list entries after the target gating list takes effect, and at the same time, two effective list entries do not exist in the list entries of all the target gating lists of the target port at the same time, namely, the list entries in all the target gating lists corresponding to the target port do not conflict with each other. Specifically, a GCL management module may be disposed in the switch for receiving a configuration command from the network controller, completing configuration and query of the gated lists of the gated list pool, and completing configuration and query of the GCL multiplexer.

A logic block diagram of an embodiment of the method for implementing a time-sensitive network gated list provided in this embodiment may be as shown in fig. 6:

s01: the GCL management module receives a command from the TSN controller, needs to configure x GCLs and map and bind the GCLs to a port y, and jumps to S02;

s02: the GCL management module inquires the use condition of the gating list in the current gating list pool;

s03: if more than or equal to x idle GCLs are available in the current gating list pool, jumping to S4; otherwise, directly ending, and reporting the current GCL resource shortage to the network controller;

s04: the GCL management module selects x idle GCLs (GCL 1, GCL2 … GCLx), configures list entries, cycle time and effective time (GCL _ BaseTime) according to the command of the network controller, and jumps to S5;

s05: and the GCL management module configures a GCL _ Mux multiplexer corresponding to the port y, and configures the effective time and the input source of the GCL _ Mux according to the effective time of the GCL. Different GCLs may take effect at the same time or at different times.

a) In effect at the same time:

if the effective time of GCL1 and GCL2 … GCLx is t0, GCL _ MUX adds GCL1 and GCL2 … GCLx to the input source at the time of t 0;

b) in effect at different times:

if GCL1 takes effect at time t1, GCL _ MUX adds GCL1 to the input source at time t 1;

if GCL2 takes effect at time t2, GCL _ MUX adds GCL2 to the input source at time t2, and GCL _ MUX has two input sources of GCL1 and GCL 2;

if the GCLx effective time is tx, adding GCLx into the input source at the tx time by the GCL _ MUX, wherein the GCL _ MUX has x input sources of GCL1 and GCL2 … GCLx;

s06: whether the GCL effective time arrives (the input PTP whole network synchronization time is compared with the effective time) is respectively checked, if the effective time arrives, S7 is skipped to, otherwise, the waiting is continued, and at the moment, the port y continues to normally output according to the last configuration.

S07: and enabling the GCL and the GCL _ MUX corresponding to the port y to take effect at the same time, and starting to carry out normal output according to the configuration.

As can be seen from the above description, the time-sensitive network gating list implementation method provided in this embodiment can implement flexible mapping between gating lists and ports, that is, mapping between any gating list and any port can be set, as shown in fig. 7, fig. 7 is a final mapping structure for binding GCL1, GCL2, and GCL3 to port 1, each list of GCL1, GCL2, and GCL3 can independently output control information of 8 queues, and when any GCL list entry is executed, the multiplexer updates the state of the queue switch by taking the currently executed GCL entry as an output, and maintains the state until the next GCL entry is executed. By the method provided by the embodiment, the idle port can release gating list resources, the busy port can obtain more gating list resources, all ports do not need special backup gating lists for table item updating, any gating list can be used as a configuration list of any other port, and when the configuration is updated, the configuration of the GCL multiplexer only needs to be changed, so that the low cost and the easy implementation can be realized from the engineering implementation perspective.

In summary, this embodiment provides a method for implementing a time-sensitive network gated list, where a gated list pool is provided, each port may map multiple gated lists, and when the number of entries in a single gated list is limited, idle gated list resources in the gated list pool may be used to configure gated list entries, so that, under the constraint of storage resources of the same switch, ports that bear more traffic flows may occupy more gated list resources, ports that bear fewer traffic flows may release unnecessary gated list resources, and gated list resources and ports may be flexibly mapped according to needs, thereby maximizing the use of hardware resources, and increasing the number of traffic flows that can be borne by the single port at most.

It should be understood that, although the steps in the flowcharts shown in the figures of the present specification are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

Example two

Based on the first embodiment, the present invention further provides a time-sensitive network gating list configuration apparatus, as shown in fig. 8, where the time-sensitive network gating list configuration apparatus includes:

the system comprises an instruction receiving module, a first processing module and a second processing module, wherein the instruction receiving module is used for receiving a gating list configuration instruction, wherein the gating list configuration instruction comprises the number N of target gating lists and target ports, N is a positive integer, and N is more than or equal to 0;

the resource searching module is used for searching the idle gating list in the gating list pool if N is more than or equal to 1, and the searching is specifically as described in the first embodiment;

a list entry reading module, configured to read a list entry and a cycle period of each target gating list when the number of the free gating lists is not less than N, write the list entry and the cycle period of each target gating list into N free gating lists, and generate N target gating lists, as described in embodiment one;

a mapping module, configured to configure a mapping relationship between the target port and the N target gating lists, as described in embodiment one.

EXAMPLE III

Based on the first embodiment, the present invention further provides a switch, as shown in fig. 9, where the switch includes a processor 110 and a memory 120. Fig. 9 shows only some of the components of the switch, but it should be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.

The memory 120 may in some embodiments be an internal storage unit of the switch, such as a hard disk or a memory of the switch. The memory 120 may also be an external storage device of the switch in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the switch. Further, the memory 120 may also include both an internal storage unit and an external storage device of the switch. The memory 120 is used for storing application software installed in the switch and various types of data. The memory 120 may also be used to temporarily store data that has been output or is to be output. In an embodiment, the memory 120 stores a time-sensitive network gating list configuration program 130, and the time-sensitive network gating list configuration program 130 is executable by the processor 110 to implement the time-sensitive network gating list implementation method of the present application.

The processor 110 may be a Central Processing Unit (CPU), a microprocessor or other chip in some embodiments, and is used to run program codes stored in the memory 120 or process data, such as executing the time-sensitive network gating list implementation method.

Based on the implementation method of the time-sensitive network gating list provided in the first embodiment, the invention further provides a method for generating entries of the time-sensitive network gating list, so as to generate entries of each target gating list corresponding to the target port. As explained above, the gating events corresponding to all list entries in each of the target gating lists corresponding to the target port cannot collide.

Example four

In an embodiment of the method for generating time-sensitive network gated list entries provided by the present invention, as shown in fig. 10, the method includes the steps of:

s110, network topology information in the time-sensitive network and service flow information of the target service flow are obtained.

Specifically, the target traffic flow may be all traffic flows or a part of traffic flows in the time-sensitive network.

S120, determining a forwarding path of each target service flow according to the network topology information and the service flow information of the target service flow, and allocating time slots to each target service flow on the forwarding path to realize time slot scheduling of all the target service flows.

Specifically, the network topology information includes each node and link delay in the time-sensitive network, and the service flow information of the target service flow includes a service source node, a destination node, a period, a packet length, a delay requirement, and the like of the target service flow. And according to the network topology information and the service flow information of the target service flows, allocating time slots for each target service flow on a forwarding path based on the constraint that the time delay and jitter of each target service flow from a source node to a destination node after forwarding through a forwarding node are as small as possible, wherein the time slots of all the target service flows are not overlapped. After scheduling the time slots of all the target service flows, the time at which the queue switch needs to be turned on or off in each node is obtained, so that the corresponding message of the target service flow is forwarded. The time slot scheduling can be realized by adopting any time slot scheduling method.

S130, determining an original gating list of the target port according to the time slot scheduling results of all the target service streams.

The time slot scheduling result comprises the time of opening or closing a switch in a node, an original gating list of a target port can be obtained according to the time slot scheduling result, the original gating list of the target port comprises list entries recording the execution time of a queue door opening event and a queue door closing event of the target port and the cycle period of the list entries of the original gating list, and the cycle period of the original gating list is the least common multiple of the service periods of all the target service flows.

S140, obtaining the number N of target gating lists corresponding to a target port, splitting list items in an original gating list of the target port into N item sets, wherein each item set comprises at least one list item, and obtaining the list items of each target gating list, N is a positive integer and is not less than 1.

The number N of target gating lists corresponding to the target port may be specified by a person or a default value or obtained according to the number of traffic streams forwarded through the target port.

Splitting the gating list entry in the original gating list of the target port into N entry sets to obtain a list entry of each target gating list, including:

taking list items in the nth item set as gating list items in the nth target gating list, wherein N is a positive integer and is not more than N;

and setting the effective time and the cycle period of each target gating list to be the same as those of the original gating list.

In particular, k entries included in the original gating list may be noted as.... For the ith entry thereinThe execution time (i.e. the effective time of the item) isThen the duration of the ith entry may be expressed asThe sum of the durations of all entries in the original gated list isThe cycle period T of the original gating list is:

splitting k entries in the original gated list into N parts to obtain N entry sets, where the number of entries in each entry set is not less than 1, and the number of entries in each entry set can be represented as...Then, there are:

in the method for generating entry of time-sensitive network gating list provided in this embodiment, the validation time and the cycle period of each target gating list corresponding to the target port are the same as those of the original gating list of the target port.

Specifically, after splitting the list entry of the original gating list of the target port into N entry sets, respectively taking the entry in each entry set as a list entry in the target gating list, that is, taking the list entry in the nth entry set as the gating list entry in the nth target gating list. In another possible implementation manner, the list entries in each entry set are consecutive, the first entry of each target gating list may be the first entry of the original gating list, and the remaining entries are entries in the corresponding entry sets, that is, the step of generating the entries of each target gating list may be as follows:

to set up the first itemItem adaptation to first target gating listIn, comprising:

is provided withThe first item ofExecution time is

Is provided withThe second item ofExecution time is

In turn until the last entry isExecution time isAnd this entry needs to last until the end of the cycle, i.e.

In the second item setAdaptation of an entry to a second target gating listIn, comprising:

is provided withThe first item ofExecution time is

Is provided withThe second item ofExecution time is

In turn until the last entry isExecution time isAnd this entry needs to last until the end of the cycle, i.e.

Set the ith entryItem adaptation to ith target gating listIn, comprising:

is provided withThe first item ofExecution time is

Is provided withThe second item ofWith execution time of

In turn until the last entryExecution time isAnd this entry needs to last until the end of the cycle, i.e.

Until the adaptation of all N target gating list entries is completed.

For example: the scheduler outputs an original gating list with 30 entries, which exceeds the entry capacity of the gating list in the switch, and can be split and adapted to 3 different gating lists to establish a mapping relation with a target port. The method comprises the following steps:

dividing 30 entries into 3 consecutive disjoint portions, each portion containing 10 entries;

is provided withWith the same validation time and cycle period equal to that of the original gating list.

As shown in FIG. 12, items 1-10 are filled inFilling in the items 1 and 11-20Filling in the items 1 and 21-30Resulting in 3 entries in the gated list.

It can be seen that 3 gated lists have the same effective time and cycle period, and other entries are different except that the first entry is the same, and the respective lists are executed in the order of execution time of the entries, and actually, a plurality of physical GCL lists are logically spliced into a large GCL list. The method has the advantages that the size of the GCL table entry can be conveniently expanded, no extra requirement is required on the scheduler, the method can be compatible with any scheduler, and only the table entry output by the scheduler needs to be simply split.

Of course, those skilled in the art will appreciate that the above description is only an example, and in practice, the first entry of each target gating list may not be the first entry in the original gating list, but may be the first entry in the corresponding entry set, and the entries in each entry set may also be discontinuous entries in the original gating list. After generating the list entry corresponding to each target gating list, the list entry is issued to the switch device, and a logic block diagram may be as shown in fig. 11.

EXAMPLE five

Scheduling the traffic Flow via the destination port as a whole may result in a large number of redundant entries in the gating list, for example, the periods of two flows are 2 and 3, respectively, in order to avoid collision, time slots need to be reserved in the whole scheduling period, the length of the scheduling period is equal to the least common multiple of the traffic periods of two flows, in this example, LCM (2,3) =6, Flow1 occupies 3 time slots in the whole scheduling period, and Flow2 occupies 2 time slots in the scheduling period, so 10 GCL entries are needed for a total of 5 time slots (the start and end of a time slot correspond to the queue being opened and closed, respectively, and two entries are occupied in the GCL list), and these redundant time slots consume a large amount of entry resources. As the number of streams increases and the traffic cycle difference increases, the resources consumed by repeating redundant entries become more severe. Taking the intelligent plant scenario defined by IEEE/IEC 60802 as an example, in a network formed by 16 switches, traffic flows of various periods such as {100us, 1ms, 2ms, 3ms, 4ms, 10ms, 15ms, and 20ms } exist, and simulations show that when 645 flows are deployed in the entire network, 14676 GCL entries are consumed by the maximum port, which is converted into actual physical resources, and the port needs about 1Mbit RAM (2 × 14676 × 32bits =939264 bits) to store the GCL entries. The reason for such multiple purposes is that the cycle difference of different service flows is too large, so that the repeated redundant time slots are too many; for example, a 100us stream is repeated 600 times in a scheduling period (60 ms), which occupies 600 slots, and these repeated redundant entries consume a large amount of entry resources.

In the method for generating a time-sensitive network gating list provided in the fourth embodiment, an original gating list is generated according to all target traffic streams, a cycle of the generated original gating list is a least common multiple of traffic cycles of all the target traffic streams, and a cycle of each generated target gating list is equal to a cycle of the original gating list, so that repeated entries, that is, redundant entries cannot be avoided in the gating list. In order to further solve the problem, the present invention further provides another time-sensitive network gated list generation method for generating list entries in respective target gated lists corresponding to target ports, as shown in fig. 13, in an embodiment of the method, the method includes the steps of:

s210, network topology information in the time-sensitive network and service flow information of the target service flow are obtained.

Specifically, the target traffic flow may be all traffic flows or a part of traffic flows in the time-sensitive network.

Specifically, the network topology information includes each node and link delay in the time-sensitive network, and the service flow information of the target service flow includes a service source node, a destination node, a period, a packet length, a delay requirement, and the like of the target service flow. And determining a forwarding path of each target service flow according to the network topology information and the service flow information of the target service flow.

S220, obtaining the number N of target gating lists corresponding to target ports, and dividing all the target service flows into N groups according to the service period of each target service flow, wherein N is a positive integer and is not less than 1.

The number N of target gating lists corresponding to the target port may be specified by a person or a default value or obtained according to the number of traffic streams forwarded through the target port.

In order to reduce redundant entries in a target gating list corresponding to a target port, in this embodiment, all the target traffic flows are divided into N groups according to a traffic cycle of each target traffic flow, and time slot gate switching events of the target traffic flows belonging to different groups are divided into different target gating lists. All service flow sets are represented by F, and if N groups of GCLs exist, F is divided into N groups according to service periodsAnd N groups are obtained. Specifically, the dividing all the target service flows into N groups according to the service period of each target service flow includes:

and dividing all the target service flows into N groups according to the principle that the ratio of the least common multiple to the greatest common divisor of the service periods of the target service flows belonging to the same group meets a preset condition.

In this embodiment, the preset condition may be that a ratio of a least common multiple to a greatest common divisor of all the target traffic flows in the same group is minimum, or that a ratio of a least common multiple to a greatest common divisor of all the target traffic flows in the same group is lower than a preset threshold. Reducing the ratio of the least common multiple to the greatest common divisor of all the target service flows in the same group can reduce the number of times of repetition of all the target service flows in the same group in the gating list corresponding to the group, thereby reducing the consumption of the redundant list items.

Taking the grouping principle as an example that the ratio of the least common multiple and the greatest common divisor of all stream service periods in the same group is minimum, in a scene with 4 service periods {2ms, 4ms, 5ms and 10ms }, if 2 gating lists are used for parallel interleaving control, the service streams can be divided into periods according to the periods= 2ms, 4ms andtwo sets of {5ms, 10ms } indicate a set of streams having a period of {2ms, 4ms } and a period of {5ms, 10ms }, respectively.

S230, distributing time slots to all the target service flows according to preset scheduling constraint conditions, and generating list items in each target gating list corresponding to a target port according to time slot distribution results.

The scheduling constraint conditions are as follows: the time slots of the target traffic streams belonging to the same group are not allowed to overlap, and the time slots of the target traffic streams belonging to different groups are not allowed to overlap and are not allowed to be adjacent.

Specifically, the scheduling period of all the target traffic flows is the least common multiple of the periods of all the target traffic flows, and the purpose of allocating time slots to all the target traffic flows is to ensure that all the flows do not collide in the scheduling period. The scheduling period is represented as: HP.

When scheduling, for any target service flowThe service period isWhich needs to be repeated within a scheduling periodNext, willTo (1) aThe time of the sub-repetition time slot is marked asBy usingTo representThe offset of the first slot from the start of the scheduling period is:

accordingly, willTo (1) aThe end time of the sub-repeat time slot is recorded asBy usingTo representThe length of the transmission time of (c),andis related to the link rate, then:

as shown in fig. 15, the ordinary time slot scheduling only needs to ensure that any two time slots do not overlap, and two time slots are allowed to be close together, that is, the starting time of the next time slot may be equal to the ending time of the previous time slot, in this case, the streamEnd events and streams ofMay be merged into one gated list entry. However, in the implementation that one port corresponds to multiple gating lists, if two slots belong to different gating lists for control, and these two events occur simultaneously, a gating list entry collision may be generated, so in this embodiment, as shown in fig. 16, in addition to the constraint that the slots of the target traffic flows belonging to the same group are not allowed to overlap (adjacent is allowed), the slots of the target traffic flows belonging to different groups are also allowed to overlap and adjacent constraints are not allowed. The time slots belonging to different groups are separated by at least a certain safety distance to ensure that the entries executed in different gating lists respectivelyHas definite sequence, avoids conflict and can use safe distanceAnd (4) showing.

The constraint that the time slots of the target traffic streams belonging to the same group do not allow overlapping (allow adjacency) can be expressed as:

the constraint that the time slots of the target traffic streams belonging to different groups are not allowed to overlap and are not allowed to be adjacent can be expressed as:

solving the constraint, calculating the time slot scheduling scheme of all the target service flows meeting the constraint, and obtaining the starting time and the ending time of each time slot of each target service flow, namelyTo obtainAnd

and scheduling and synthesizing the time slots on the target port into N different gating lists to obtain N items of the target gating lists corresponding to the target port.

Specifically, the generating a list entry in each target gating list corresponding to a target port according to a time slot allocation result includes:

obtaining the starting time of the first time slot in the scheduling result of the target portDetermining a target group to which the target service flow corresponding to the starting time of the first time slot belongs, and determining a cycle period of the nth target gating list according to service periods of all the target service flows in the target group

Is provided withExtracting the scheduling result of the target port for the effective moment of the nth target gating listAll time slot positions belonging to the target grouping in the range and the door opening and closing event corresponding to each time slot position;

to be provided withThe door opening and closing event corresponding to the moment is used as the first list item in the nth target gating list, other door opening and closing events are sequentially used as the subsequent items in the nth target gating list according to the time slot position sequence, and the execution moments of the subsequent items are thatObtaining all list items corresponding to the nth target gating list for the relative time obtained by the reference;

deleting all the time slot information belonging to the target group in the scheduling result of the target port, updating the scheduling result of the target port, and then re-executing the step of obtaining the starting time of the first time slot in the scheduling result of the target port until all list items respectively corresponding to all the target gating lists are obtained.

Specifically, a target gating list is obtainedThe item of (1), comprising:

find the starting position of the first time slot in the scheduling result, and record as

Find outThe time corresponds to the packet to which the flow belongs, assumed to be

Is provided withCycle ofEqualing packetsThe least common multiple of all stream periods in;

extraction from time slot scheduling resultsAll belonging to a group within rangeThe slot position of (a);

the position information of the time slot is based on the starting time of the scheduling cycle and needs to be changed to be based on the starting time of the scheduling cycleOn the basis of subtracting the above-mentioned slot position informationObtaining andthe relative position of (a).

To be provided withEvent corresponding to time asThe other events in turn asAnd the execution time of the entries isThe phase position obtained for the reference.

Is provided withTime of effect ofIs composed of

Removing belonging packets from scheduling resultsAnd obtaining a new scheduling result according to all the time slot information.

Get target gated listThe item of (1), comprising:

finding the starting position of the first time slot from the new scheduling result obtained in the previous step, and recording the starting position as

Find outThe time corresponds to the packet to which the flow belongs, assumed to be

Is provided withCycle ofEqualing packetsThe least common multiple of all stream periods in;

extraction from scheduling resultsAll belonging to a group within rangeThe slot position of (a);

the position information of the time slot is based on the starting time of the scheduling cycle and needs to be changed to be based on the starting time of the scheduling cycleOn the basis of subtracting the above-mentioned slot position informationObtaining andthe relative position of (a).

To be provided withEvent corresponding to time asThe other events in turn asAnd the execution time of the entries isThe phase position obtained for the reference.

Is provided withTime of effect ofIs composed of

Removing belonging packets from scheduling resultsAnd obtaining a new scheduling result according to all the time slot information.

And repeating the steps until all N items in the target gating list are obtained. After obtaining all the entries in the N target gating lists, the entries are issued to the switch device corresponding to the target port, and a logic block diagram may be as shown in fig. 14.

For example, there are two streamsAndwith periods respectively ofAnd. The result of the scheduling is shown in FIG. 17, the scheduling period is. In the scheduling period of the time period,the process is repeated for three times,repeated 2 times for a total of 5 slots, with the start and end times of each slot as shown in fig. 17. This scheduling result is synthesized into 2 gated lists.

In the synthesis ofWhen the temperature of the water is higher than the set temperature,

with the start time of the first slot in the scheduling resultAsIs provided withHas an effective time of

DeterminingThe flow to whichAnd grouping thereof

Is provided withIs equal to a packetLeast common multiple of all stream periods in (i.e. of)

Is found inWithin range of a groupAll time slot positions of, i.e.And. Treat these two events asTwo entries of (2).

In the synthesis ofWhen, withThe associated time slot has been deleted and the first time slot becomesOf the time slot of (2), its start timeAsIs provided withHas an effective time ofAnd found inAll slot positions within the range belonging to group 2, onlyAnd. Treat these two events asTwo entries of (2).

It can be seen from fig. 17 that if one gated list is used to synthesize the scheduling result, 10 entries are needed, and if 2 gated lists are used to synthesize the scheduling result, each table only needs 2 entries, 4 entries are needed in total, the two gated lists are executed independently in respective effective time and cycle period, all the entries will not conflict when executed, and the final execution effect is the same as that of executing all the entries sequentially using one gated list.

In order to verify the effect of the method for generating time-sensitive network gating list entries provided by this embodiment, simulation evaluation is performed on a larger-scale network, taking an intelligent plant scenario as an example, in a network formed by 16 switches, there are traffic flows with different periods, such as {100us, 1ms, 2ms, 3ms, 4ms, 10ms, 15ms, and 20ms }, and if one GCL list is used, in the case that 645 flows are deployed in the entire network, 14676 GCL entries are required to be consumed by the maximum port (but this port only carries 89 flows). If the service flow is divided into three groups of {100us }, {1ms, 2ms, 3ms, 4ms }, {10ms, 15ms, 20ms }, etc., and controlled by using 3 GCL lists, each GCL of the port only needs 22, 234, and 306 entries, respectively, the total number of entries consumed by the 3 GCLs is 562, which is 96% lower than the original 14676, which indicates that the time-sensitive network gating list entry generation method provided by the embodiment has a significant effect on eliminating redundant duplicate entries.

EXAMPLE six

The present invention also provides a network controller, as shown in fig. 18, the network controller includes a processor 210 and a memory 220. Fig. 18 shows only some of the components of the switch, but it should be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.

The memory 220 may be an internal storage unit of the switch in some embodiments, such as a hard disk or a memory of the switch. The memory 220 may also be an external storage device of the switch in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the switch. Further, the memory 220 may also include both an internal storage unit and an external storage device of the switch. The memory 220 is used for storing application software installed in the switch and various types of data. The memory 220 may also be used to temporarily store data that has been output or is to be output. In an embodiment, the memory 220 stores a time-sensitive network gating list entry generating program 230, and the time-sensitive network gating list configuration program 230 can be executed by the processor 210, so as to implement the time-sensitive network gating list implementation method in the present application.

The processor 210 may be a Central Processing Unit (CPU), a microprocessor or other chip in some embodiments, and is configured to run a program code stored in the memory 220 or process data, for example, execute the time-sensitive network gating list implementation method provided in embodiment four and/or embodiment five, and the like.

EXAMPLE seven

The present invention also provides a computer readable storage medium, in which one or more programs are stored, which are executable by one or more processors to implement the steps of the time sensitive network gated list implementation method and/or the steps of the time sensitive network gated list entry generation method as described above.

Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

27页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:传输速率控制方法、装置、电子设备和可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!