Method, equipment and storage medium for controlling flow of switching network

文档序号:1956698 发布日期:2021-12-10 浏览:15次 中文

阅读说明:本技术 一种交换网络流量控制方法、设备及储存介质 (Method, equipment and storage medium for controlling flow of switching network ) 是由 吴博威 于 2020-06-10 设计创作,主要内容包括:本申请公开一种交换网络流量控制方法、设备及储存介质,该方法包括:若预设端口对应的队列的授权请求状态为申请授权,向交换接入芯片本端的拥塞管理模块发送授权请求;通过所述拥塞管理模块按照预设授权策略下发对应的授权;根据所述授权,调度所述队列的数据出队,完成流量下发。本申请的技术方案,可以实现数据出队授权快速下发,减小授权和授权请求间的时延,减少RAM资源的消耗。(The application discloses a method, a device and a storage medium for controlling the flow of a switching network, wherein the method comprises the following steps: if the authorization request state of the queue corresponding to the preset port is application authorization, sending an authorization request to a congestion management module of the local end of the switching access chip; issuing corresponding authorization according to a preset authorization strategy through the congestion management module; and scheduling the data of the queue to be dequeued according to the authorization to finish the flow issuing. According to the technical scheme, the data dequeue authorization can be rapidly issued, the time delay between authorization and an authorization request is reduced, and the consumption of RAM resources is reduced.)

1. A method for controlling traffic in a switching network, comprising:

if the authorization request state of the queue corresponding to the preset port is application authorization, sending an authorization request to a congestion management module of the local end of the switching access chip;

issuing corresponding authorization according to a preset authorization strategy through the congestion management module;

and scheduling the data of the queue to be dequeued according to the authorization to finish the flow issuing.

2. The method according to claim 1, wherein before the sending the authorization request to the congestion management module on the same side through the queue management module if the authorization request status of the queue corresponding to the preset port is application authorization, the method further comprises:

acquiring the current authorization request state of the queue; wherein, the authorization request state comprises an authorization application state and an authorization non-application state;

comparing the authorization surplus of the queue with a preset authorization surplus threshold value to determine an authorization surplus comparison result;

if the current authorization request state and the authorization surplus comparison result accord with the authorization state adjustment condition, updating the authorization request state;

and if the current authorization request state and the authorization surplus comparison result accord with an authorization state holding condition, holding the authorization request state.

3. The method of claim 2, wherein updating the grant request state if the comparison of the current grant request state and the grant surplus match a grant state adjustment condition comprises:

if the current authorization request state is authorization application and the authorization surplus of the queue is more than or equal to the preset authorization surplus threshold, updating the authorization request state as authorization non-application;

and if the current authorization request state is not requesting for authorization and the authorization surplus of the queue is smaller than the preset authorization surplus threshold, updating the authorization request state to be requesting for authorization.

4. The method according to claim 2, wherein the maintaining the authorization request state if the current authorization request state and the authorization surplus comparison result satisfy an authorization state maintaining condition comprises:

if the current authorization request state is application authorization and the authorization surplus of the queue is smaller than the preset authorization surplus threshold, keeping the authorization request state as application authorization;

and if the current authorization request state is not applying for authorization and the authorization surplus of the queue is more than or equal to the preset authorization surplus threshold, keeping the authorization request state as not applying for authorization.

5. The method according to any one of claims 1 to 4, wherein the queues corresponding to the predetermined ports include a unicast queue and a multicast queue.

6. The method of claim 5, wherein the issuing, by the congestion management module, the corresponding authorization according to a preset authorization policy comprises:

and issuing corresponding packet tokens for the unicast queue and the multicast queue through the congestion management module according to a preset circular scheduling algorithm.

7. The method of claim 6, wherein scheduling dequeuing of data from the queue to complete traffic delivery according to the grant comprises:

and if the unicast queue and the multicast queue both obtain the packet token, sequentially scheduling the data dequeuing of the unicast queue and the multicast queue according to a polling principle to finish flow issuing.

8. The method of claim 6, further comprising:

if the unicast queue and/or the multicast queue obtains the packet token, performing packet token adding operation on the queue for obtaining the packet token;

and if the data of the unicast queue and/or the multicast queue is scheduled to be dequeued, performing packet token reduction operation on the dequeued queue of the data.

9. A switching network device, characterized in that it comprises a memory, a processor, a program stored on said memory and executable on said processor, and a data bus for implementing a connection communication between said processor and said memory, said program, when executed by said processor, implementing a switching network flow control method according to any one of claims 1 to 8.

10. A storage medium for computer-readable storage, the storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the method for switching network traffic control of any of claims 1-8.

Technical Field

The present invention relates to the field of data communications, and in particular, to a method, an apparatus, and a storage medium for controlling a flow of a switching network.

Background

Due to the development of 5G and internet of things technologies, the requirement for data processing is higher and higher, and the requirements for power consumption and Random Access Memory (RAM) resources are more and more strict. An authorization mechanism issued by the existing port flow needs to send an authorization request to a downlink exchange access chip of an opposite end through an exchange network, and the downlink exchange access chip of the opposite end feeds back corresponding authorization through the exchange network. The authorization mechanism needs to pass through a switching network, has great processing delay, cannot accurately reflect the current port flow condition, and is easy to cause the abnormity of packet loss or flow control delay and the like. In addition, due to the flow jitter, the RAM needs to be increased for buffering, and more RAM resources are consumed.

Disclosure of Invention

The main purpose of the embodiments of the present application is to provide a method, a device, and a storage medium for controlling network traffic, which are used to implement fast issuing of dequeue authorization of data, reduce delay traffic between authorization and authorization requests, and reduce consumption of RAM resources.

An embodiment of the present application provides a method for controlling a flow of a switching network, including:

if the authorization request state of the queue corresponding to the preset port is application authorization, sending an authorization request to a congestion management module of the local end of the switching access chip;

issuing corresponding authorization according to a preset authorization strategy through the congestion management module;

and scheduling the data of the queue to be dequeued according to the authorization to finish the flow issuing.

The embodiment of the present application further provides a switching network device, where the device includes a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for implementing connection communication between the processor and the memory, and when the program is executed by the processor, the switching network traffic control method provided in the embodiment is implemented.

The present embodiments also provide a storage medium for a computer-readable storage, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the method for controlling network traffic provided by the embodiments.

The method, the device and the storage medium for controlling the flow of the switching network provided by the embodiment of the application provide corresponding authorization by responding to an authorization request issued by data through a congestion management module of a local end of a switching access chip, so that data dequeuing of a scheduling queue is scheduled, flow issue is completed, the problems of large time delay between authorization and authorization requests and high RAM resource consumption are solved, quick issue of data dequeuing authorization is realized, time delay between authorization and authorization requests is reduced, and RAM resource consumption is reduced.

Drawings

Fig. 1 is a flowchart of a method for controlling flow in a switching network according to an embodiment of the present application.

Fig. 2 is a flowchart of an authorization request generation state machine provided in an embodiment of the present application to refresh an authorization request state.

Fig. 3 is a schematic diagram of a traffic issuing authorization mechanism in the related art.

Detailed Description

To make the objects, technical solutions and advantages of the present application more apparent, embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.

It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no peculiar meaning by themselves. Thus, "module", "component" or "unit" may be used mixedly.

As shown in fig. 3, in the existing authorization mechanism issued by port traffic, a queue management module of an uplink switch access chip is required to generate an authorization request signal according to a queue, and the authorization request signal is encapsulated into a cell by a switch interface module, then sent to a switch network, and sent to a congestion management module of a downlink switch access chip to generate an authorization signal. The generated authorization signal is encapsulated into cells by the exchange interface module of the downlink exchange access chip, sent to the exchange network and then sent back to the queue management module of the uplink exchange access chip to send a flow system. The authorization request and the feedback authorization of the existing authorization mechanism need to pass through a switching network, so that great processing delay exists, the current port flow condition cannot be accurately reflected, and the exceptions of packet loss or flow control delay and the like are easily caused. In addition, due to the flow jitter, the number of data to be sent that need to be cached by the RAM of the local terminal increases, and further the RAM needs to be increased to cache the data, which results in more RAM resource consumption.

As shown in fig. 1, this embodiment provides a method for controlling network traffic, where the method includes:

s110, if the authorization request state of the queue corresponding to the preset port is authorization application, sending an authorization request to a congestion management module of the local end of the exchange access chip;

s120, issuing corresponding authorization according to a preset authorization strategy through the congestion management module;

and S130, scheduling the data of the queue to be dequeued according to the authorization, and finishing the flow issuing.

At the downstream traffic output of the switch access chip, data needs to be sent to different ports, and usually needs to enter different queues for maintenance after the message is reassembled. The preset port is a port for issuing downlink traffic, and the queue corresponding to the preset port is a queue into which data enters after message reassembly. The authorization request state of the queue comprises an authorization application and an authorization non-application. If the authorization request state of the queue is application authorization, the queue needs to schedule the data on the queue to dequeue, and the flow is issued. Conversely, if the grant request status of the queue is not applying for grant, it indicates that the queue now does not need to schedule dequeues of data thereon. In the embodiment, a congestion management module at the local end of the switching access chip is selected to apply for authorization issue, the congestion management module responds to an authorization request of the queue management module, issues corresponding authorization according to a preset strategy, and directly dequeues flow after authorization is obtained. The congestion management module issues the authorized preset policy, and different queues corresponding to the preset ports can be scheduled to dequeue data in a polling mode. Compared with the prior art that authorization needs to be requested to the congestion management module on the opposite side, the technical scheme of the embodiment does not need to send the authorization request through a switching network, reduces the time delay between authorization and the authorization request, and can realize the fast issuing of data dequeue authorization, thereby reducing the consumption of RAM resources.

In one implementation, the queues corresponding to the preset ports include a unicast queue and a multicast queue.

The data unicast and the data multicast of the same preset port can enter different queues, apply for issuing authorization to the congestion management module respectively, and generate respective authorization request states.

In one implementation manner, before the sending, by the queue management module, the authorization request to the congestion management module on the same side if the authorization request state of the queue corresponding to the preset port is an authorization application state, the method further includes:

acquiring the current authorization request state of the queue; wherein, the authorization request state comprises an authorization application state and an authorization non-application state;

comparing the authorization surplus of the queue with a preset authorization surplus threshold value to determine an authorization surplus comparison result;

if the current authorization request state and the authorization surplus comparison result accord with the authorization state adjustment condition, updating the authorization request state;

and if the current authorization request state and the authorization surplus comparison result accord with an authorization state holding condition, holding the authorization request state.

As shown in fig. 2, the magnitude of the authorization surplus is determined in the authorization request generation state machine, when the authorization surplus is greater than the preset authorization surplus threshold, authorization is not applied any more, and when the preset authorization surplus threshold, authorization is applied for issuing. The preset authorization surplus threshold is mainly generated according to the time of the authorization request state reaching the congestion management module and the corresponding time of the authorization reaching the queue. The preset authorization surplus threshold needs to be larger than the maximum byte number in the total delay. For example, in the project, 0x4000 may be taken as a preset authorization surplus threshold. Therefore, the quantity of the issued packet tokens can be ensured to be relatively reasonable, the flow is more accurate, and the burst of the port bandwidth can be reduced. The generated authorization request state can directly reach the local terminal congestion management module without passing through a switching network, so that jitter and cache caused by time delay are reduced, and the current port congestion condition can be reflected in time.

In one implementation, the updating the authorization request state if the current authorization request state and the authorization surplus comparison result meet an authorization state adjustment condition includes:

if the current authorization request state is authorization application and the authorization surplus of the queue is more than or equal to the preset authorization surplus threshold, updating the authorization request state as authorization non-application;

and if the current authorization request state is not requesting for authorization and the authorization surplus of the queue is smaller than the preset authorization surplus threshold, updating the authorization request state to be requesting for authorization.

In one implementation, if the current comparison result between the authorization request status and the authorization surplus meets an authorization status holding condition, holding the authorization request status includes:

if the current authorization request state is application authorization and the authorization surplus of the queue is smaller than the preset authorization surplus threshold, keeping the authorization request state as application authorization;

and if the current authorization request state is not applying for authorization and the authorization surplus of the queue is more than or equal to the preset authorization surplus threshold, keeping the authorization request state as not applying for authorization.

In an implementation manner, the issuing, by the congestion management module, a corresponding authorization according to a preset authorization policy includes:

and issuing corresponding packet tokens for the unicast queue and the multicast queue through the congestion management module according to a preset circular scheduling algorithm.

After the authorization requests of the data unicast queue and the data multicast queue corresponding to the same preset port reach the congestion management module, the congestion management module may issue corresponding authorization according to preset weighting cycle principles according to preset unicast and multicast weights, that is, corresponding packet tokens are provided for the unicast queue and the multicast queue respectively. For example, the corresponding authorization is issued according to a Dynamic Weighted Round-Robin (DWRR), and the implementation method is as follows: if the unicast and multicast ratio is configured to be 2:1, a unicast authorization is issued in the first period, a multicast authorization is issued in the next period, and a unicast authorization is issued in the next period, so that one round of issuing is completed. And then, continuing to circulate according to the mode to achieve the aim of equal distribution proportion and configuration.

In an implementation manner, the scheduling, according to the authorization, dequeuing the data in the queue to complete traffic delivery includes:

and if the unicast queue and the multicast queue both obtain the packet token, sequentially scheduling the data dequeuing of the unicast queue and the multicast queue according to a polling principle to finish flow issuing. After the unicast queue and the multicast queue respectively obtain the packet tokens of the unicast queue and the multicast queue, the data of the unicast queue and the multicast queue can be scheduled to be dequeued, so that the flow is issued.

In one implementation, the method for controlling the flow of the switching network further includes:

if the unicast queue and/or the multicast queue obtains the packet token, performing packet token adding operation on the queue for obtaining the packet token;

and if the data of the unicast queue and/or the multicast queue is scheduled to be dequeued, performing packet token reduction operation on the dequeued queue of the data.

Wherein, the packet token information of each queue is maintained and managed. When the packet token reaches the corresponding queue, adding the packet token; and performing the subtraction operation of the packet token when the queue schedules the dequeue of the data. Therefore, the relation between the current queue depth and the number of the packet tokens can be judged in real time. When the unicast queue and the multicast queue are authorized at the same time, the unicast data are scheduled to be dequeued firstly, then the multicast data are scheduled to be dequeued, and finally the flow is issued.

The embodiment of the present application provides a switching network device, where the device includes a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for implementing connection communication between the processor and the memory, where the program, when executed by the processor, implements any one of the switching network traffic control methods in the embodiments of the present application.

The present application provides a storage medium for a computer-readable storage, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement any one of the methods for controlling network traffic in the present application.

One of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.

In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.

The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, and are not to be construed as limiting the scope of the invention. Any modifications, equivalents and improvements which may occur to those skilled in the art without departing from the scope and spirit of the present invention are intended to be within the scope of the claims.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于云边协同的非实时数据传输方法及装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!