Message processing method and network equipment

文档序号:1616978 发布日期:2020-01-10 浏览:14次 中文

阅读说明:本技术 一种报文处理方法及一种网络设备 (Message processing method and network equipment ) 是由 任红军 阎鑫淼 于 2019-09-25 设计创作,主要内容包括:本申请提供一种报文处理方法及一种网络设备。所述方法应用于网络设备,所述网络设备包括网络控制器、CPU和至少两个通信接口,每个通信接口均配置有独立的发包队列,所述方法包括:CPU根据已处理报文的信息,将所述已处理报文添加到一条或多条发包队列中;网络控制器监控各发包队列中是否存在已处理报文;当存在已处理报文时,网络控制器提取发包队列中的已处理报文,并通过所述发包队列对应的通信接口将所述已处理报文发送。通过使每个通信接口和CPU之间都使用单独的一发包队列进行报文传输,以解决当一个通信接口出现堵塞时,影响所有通信接口和CPU的报文传输,提高了网络的稳定性。(The application provides a message processing method and network equipment. The method is applied to network equipment, the network equipment comprises a network controller, a CPU and at least two communication interfaces, each communication interface is configured with an independent packet sending queue, and the method comprises the following steps: the CPU adds the processed message to one or more packet sending queues according to the information of the processed message; the network controller monitors whether processed messages exist in each packet sending queue or not; when the processed message exists, the network controller extracts the processed message in the packet sending queue and sends the processed message through the communication interface corresponding to the packet sending queue. The message transmission is carried out between each communication interface and the CPU by using the independent packet sending queue, so that the problem that the message transmission of all the communication interfaces and the CPU is influenced when one communication interface is blocked is solved, and the stability of the network is improved.)

1. A method for processing a message is applied to a network device, the network device comprises a network controller, a CPU and at least two communication interfaces, each communication interface is configured with an independent packet sending queue, and the method comprises the following steps:

the CPU adds the processed message to one or more packet sending queues according to the information of the processed message;

the network controller monitors whether processed messages exist in each packet sending queue or not;

when the processed message exists, the network controller extracts the processed message in the packet sending queue and sends the processed message through the communication interface corresponding to the packet sending queue.

2. The method of claim 1,

the CPU comprises at least two virtual processors VCPU;

each communication interface is configured with an independent packet sending queue, and the method comprises the following steps: each communication interface is provided with independent packet sending queues corresponding to the number of VCPUs;

the CPU adds the processed message to one or more packet sending queues according to the information of the processed message, and the method comprises the following steps: and any VCPU in the CPU adds the processed message to one or more packet sending queues corresponding to the VCPU according to the information of the processed message of the VCPU.

3. The method of claim 1, wherein the step of adding the processed packet to one or more packet queues by the CPU according to the information of the processed packet comprises:

and the CPU determines a communication interface for sending the processed message according to the information of the processed message, and adds the processed message to a packet sending queue corresponding to the determined communication interface.

4. The method of claim 1, wherein the step of adding the processed packet to one or more packet queues by the CPU according to the information of the processed packet comprises:

and the CPU adds the processed messages into one or more packet sending queues according to a preset rule.

5. The method of claim 4,

the preset rules include: random selection rules, round robin selection rules or rules selected based on interface load conditions.

6. A network device, characterized in that the network device comprises:

each communication interface is provided with an independent packet sending queue;

the CPU is used for adding the processed messages into one or more packet sending queues according to the information of the processed messages;

the network controller is used for monitoring whether processed messages exist in each packet sending queue; and when the processed message exists, extracting the processed message in a packet sending queue, and sending the processed message through a communication interface corresponding to the packet sending queue.

7. The network device of claim 6,

the CPU comprises at least two virtual processors VCPU;

each communication interface is configured with an independent packet sending queue, and the method is specifically realized as follows: each communication interface is provided with independent packet sending queues corresponding to the number of VCPUs;

and any VCPU in the CPU adds the processed message to one or more packet sending queues corresponding to the VCPU according to the information of the processed message of the VCPU.

8. The network device of claim 6,

the CPU is specifically configured to: and determining a communication interface for sending the processed message according to the information of the processed message, and adding the processed message to a packet sending queue corresponding to the determined communication interface.

9. The network device of claim 6,

the CPU is specifically configured to: and adding the processed messages into one or more queues according to a preset rule.

10. The network device of claim 9,

the preset rules include: random selection rules, round robin selection rules or rules selected based on interface load conditions.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:正交时频空系统的信号接收方法、接收装置及存储介质

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!