CN111970276B - Method and device for issuing message by CPU port of network chip - Google Patents

Method and device for issuing message by CPU port of network chip Download PDF

Info

Publication number
CN111970276B
CN111970276B CN202010827193.3A CN202010827193A CN111970276B CN 111970276 B CN111970276 B CN 111970276B CN 202010827193 A CN202010827193 A CN 202010827193A CN 111970276 B CN111970276 B CN 111970276B
Authority
CN
China
Prior art keywords
message
chip
service
service message
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010827193.3A
Other languages
Chinese (zh)
Other versions
CN111970276A (en
Inventor
杨曙军
龚海东
王子晗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Sheng Ke Science And Technology Co ltd
Original Assignee
Suzhou Sheng Ke Science And Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Sheng Ke Science And Technology Co ltd filed Critical Suzhou Sheng Ke Science And Technology Co ltd
Priority to CN202010827193.3A priority Critical patent/CN111970276B/en
Publication of CN111970276A publication Critical patent/CN111970276A/en
Application granted granted Critical
Publication of CN111970276B publication Critical patent/CN111970276B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The invention discloses a method and a device for issuing messages by a CPU port of a network chip, which can increase the effective load of the CPU port of the network chip on the one hand and save the cost of chip design and improve the usability of the chip on the other hand for the second type of service messages under the condition of not increasing the width of a BUS bit by adding an indication bit to the service messages issued by the CPU for marking and removing the originally carried chip forwarding information header information for the issued second type of service messages.

Description

Method and device for issuing message by CPU port of network chip
Technical Field
The present invention relates to the field of network chip message forwarding technologies, and in particular, to a method and an apparatus for issuing a message through a CPU port of a network chip.
Background
As shown in fig. 1, a network chip architecture generally includes an Ingress processing engine, an Egress processing engine, a message cache, and a forwarding management module, where the Ingress processing engine mainly completes search of various forwarding tables to obtain a destination port and an editing behavior for forwarding a message; the Egress processing engine mainly implements the editing behavior of the message; the message caching and forwarding management module is mainly responsible for storing, copying and forwarding messages to a destination port.
The information is transmitted between the modules by forwarding information headers through the chip. With the increase of the functions of the network chip, the length of the chip forwarding information header is increased. When a CPU port sends a packet, it needs to have the capability of completely controlling the packet forwarding behavior, so that it needs to directly carry a chip forwarding information header to carry enough information for forwarding.
The message sent by the CPU port can be divided into two types of messages from a service layer, wherein the first type is that the forwarding destination and the editing behavior of the message are specified by the CPU. In the second category, the forwarding destination and the editing behavior of the message are obtained by searching a forwarding table by an Ingress processing engine. When the existing CPU port sends a message, the first type or the second type of service message is not distinguished, but chip forwarding information heads with equal length are carried in a unified way. If the first type of service message is the first type of service message, the processing of an Ingress processing engine is skipped, a chip forwarding information head appointed by a CPU is directly copied, and the message is transmitted to a message caching and forwarding management module. If the service message is the second type service message, a new chip forwarding information head is obtained through searching and processing by the Ingress processing engine to replace the chip forwarding information head issued by the CPU, and the new chip forwarding information head is transmitted to the message caching and forwarding management module.
In the above scheme for sending messages at the CPU port, the second type of service messages use chips with the same length to forward information headers, which has the following disadvantages: 1. for the second type of service message, the chip forwarding information header issued by the CPU is an invalid load, so that the load of the CPU port is increased. The effective BUS bit width processed by the Ingress processing engine is certain, and because the second type of service message needs to complete the same function as the service end, the chip issued by the CPU forwards the information header, which increases the consumption of the BUS bit width and increases the cost for implementing the chip.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method and a device for sending a message by a CPU port of a network chip.
In order to achieve the purpose, the invention provides the following technical scheme: a method for issuing message by a network chip CPU port, wherein the network chip comprises an incoming direction processing engine and a message caching and forwarding management module, the method comprises the following steps:
s100, a CPU (central processing unit) sends a service message to a network chip, wherein the service message comprises a first class service message or a second class service message, the first class service message comprises an indicating bit for identifying the type of the service message, a first chip forwarding information header and message content, and the second class service message comprises an indicating bit for identifying the type of the service message and message content;
s200, an incoming direction processing engine of the network chip receives the service message, obtains the type of the service message according to the indicating bit of the service message, directly copies the forwarding information header of the first chip if the service message is the first type of service message, and searches for the forwarding information header of the second chip according to the message content if the service message is the second type of service message;
s300, the incoming direction processing engine outputs a chip forwarding information header and message contents to the message caching and forwarding management module, wherein the chip forwarding information header is the first chip forwarding information header or the second chip forwarding information header.
Preferably, the indication bit is located at a head end of a service message, and in the first type of service message, the first chip forwarding information header is located between the indication bit and a message content.
Preferably, in S200, if the service packet is the first type service packet, the processing of the direction processing engine is skipped, and the first chip forwarding information header sent by the CPU is directly copied.
Preferably, in S200, if the service packet is a second-class service packet, the packet content is taken out, and the packet content is sent to an incoming direction processing engine for analysis and lookup processing, so as to obtain the second chip forwarding information header.
Preferably, in S100, the CPU issues the service packet to a CPU port of the network chip.
The invention also discloses another technical scheme: a device for sending messages by a CPU port of a network chip comprises:
the CPU sending module is used for sending a service message, wherein the service message comprises a first class service message or a second class service message, the first class service message comprises an indicating bit for identifying the type of the service message, a first chip forwarding information header and message content, and the second class service message comprises the indicating bit for identifying the type of the service message and the message content;
a network chip, the network chip comprises an incoming direction processing engine and a message caching and forwarding management module, the incoming direction processing engine comprises a CPU port receiving module,
the CPU port receiving module is used for receiving the service message, acquiring the type of the service message according to the indicating bit of the service message, directly copying the first chip forwarding information head if the service message is the first type of service message, searching and acquiring the second chip forwarding information head according to the message content if the service message is the second type of service message, and outputting the chip forwarding information head and the message content to the message caching and forwarding management module, wherein the chip forwarding information head is the first chip forwarding information head or the second chip forwarding information head.
Preferably, if the received service packet is the first type service packet, the CPU port receiving module skips processing by the direction processing engine and directly copies the first chip forwarding information header sent by the CPU.
Preferably, if the received message is a second-class service message, the CPU port receiving module takes out the message content, and sends the message content to an incoming direction processing engine for analysis and lookup processing, so as to obtain the second chip forwarding information header.
Preferably, the CPU sending module issues a service packet to a CPU port of a network chip, and the CPU port receiving module is connected to the CPU port.
The invention has the beneficial effects that:
1. the CPU can select whether to carry the chip forwarding information header or not according to the type of the service message, and the effective load of the CPU port of the network chip is increased.
2. For the second type of service message, the message of the CPU port of the network chip and the message of the service port complete equivalent functions under the condition of not increasing the BUS bit width, thereby saving the cost of chip design and improving the usability of the chip.
Drawings
FIG. 1 is a schematic diagram of a conventional network chip architecture;
FIG. 2 is a schematic flow diagram of the process of the present invention;
FIG. 3 is a schematic diagram of step S100 of the present invention;
fig. 4 is a schematic diagram of the steps S200 and S300 of the present invention.
Detailed Description
The technical solution of the embodiment of the present invention will be clearly and completely described below with reference to the accompanying drawings of the present invention.
The method and the device for sending the message to the CPU port of the network chip disclosed by the invention select whether to carry the chip forwarding information header or not according to the type of the service message, thereby increasing the effective load of the CPU port of the network chip.
As shown in fig. 2, the method for sending a message by a network chip CPU port disclosed by the present invention includes the following steps:
s100, a CPU sends a service message to a network chip, wherein the service message comprises a first class service message or a second class service message, the first class service message comprises an indicating bit for identifying the type of the service message, a first chip forwarding information header and message content, and the second class service message comprises an indicating bit for identifying the type of the service message and message content.
Specifically, as shown in fig. 3, a message sending module of the CPU issues a service message to the network chip, in this embodiment, the service message is divided into a first type service message and a second type service message, and for the first type service message, the service message specifically includes an indication bit, a first chip forwarding information header and a message content, where the indication bit is located at a head end of the first type service message and is used to indicate a type of the service message, that is, whether the service message is the first type service message or the second type service message, the first chip forwarding information header is located between the indication bit and the message content, and the first chip forwarding information header is issued by the CPU and designates a forwarding destination and an editing behavior of the message therein.
The second type of service packet specifically includes an indication bit and a packet content, and similarly, the indication bit is located at the head end of the first type of service packet. In this embodiment, when the indicator bit is 0, it indicates that the service packet sent by the CPU is the first type of service packet, and when the indicator bit is 1, it indicates that the service packet sent by the CPU is the second type of service packet. Of course, the specific representation form of the indication bit is not limited in the invention, and can be set according to the requirement.
Compared with the second type of service message issued by the existing CPU, the invention does not carry a chip forwarding information header in the second type of service message, but indicates the message type through the indicating bit. As for the second type of service message, the chip forwarding information head issued by the CPU is an invalid load, the invention removes the chip forwarding information head from the second type of service message, and can reduce the load of the CPU port of the network chip.
S200, the incoming direction processing engine of the network chip receives the service message, obtains the type of the service message according to the indicating bit of the service message, directly copies the forwarding information header of the first chip if the service message is the first type of service message, and searches for the forwarding information header of the second chip according to the message content if the service message is the second type of service message.
Specifically, as shown in fig. 1 and fig. 4, in this embodiment, the network chip is a switch chip, and includes an ingress direction processing engine, a message cache and forwarding management module, and an egress direction processing engine. The incoming direction processing engine of the switch chip is provided with a CPU port and a service port, wherein the service message sent by the CPU is sent to the CPU port of the switch chip.
The incoming direction processing engine comprises a CPU port receiving module connected with a CPU port of the incoming direction processing engine, the CPU port receiving module identifies the type of a service message according to an indicating bit of the service message after receiving the service message issued by a CPU, if the indicating bit is 0, the received service message is represented as a first type of service message, and if the indicating bit is 0, the received service message is represented as a second type of service message.
For the first type of service message, because the forwarding destination and the editing behavior of the message are specified by the CPU, that is, the forwarding destination and the editing behavior are in the first chip forwarding information header, the first type of service message does not need to be processed by the direction entering engine of the switch chip, that is, the first type of service message skips the processing of the direction entering engine, directly copies the first chip forwarding information header issued by the CPU, and then sends the copied first chip forwarding information header and the message content to the message caching and forwarding management module.
For the second type of service message, the forwarding destination and the editing behavior of the message are obtained by searching a forwarding table by an incoming direction processing engine of the network chip. Therefore, the second type of service packet needs to be analyzed and searched by the ingress engine of the switch chip. Specifically, a CPU port receiving module of the network chip takes out a message content part in the second-class service message, sends the taken-out message content to an incoming direction processing engine for analysis, lookup, and other processing, to obtain a second chip forwarding information header, and then sends the second chip forwarding information header and the message content to a message caching and forwarding management module.
In addition, the service port of the incoming direction processing engine receives the message content of the service message, and in the invention, as the second type of service message does not carry a chip forwarding information header, but comprises an indication bit and the message content, the length of the message received by the CPU port of the incoming direction processing engine is almost the same as that of the message received by the service port. Compared with the prior art, because the second type of service message carries the chip forwarding information header, the length of the message received by the CPU port of the incoming direction processing engine is much longer than that of the message received by the service port, and the length can be obtained: under the condition of not increasing the BUS bit width, the message of the CPU port of the network chip and the message of the service port can complete equivalent functions, thereby saving the cost of chip design and improving the usability of the chip.
S300, the incoming direction processing engine outputs a chip forwarding information header and message contents to the message caching and forwarding management module, wherein the chip forwarding information header is the first chip forwarding information header or the second chip forwarding information header.
Specifically, for a first type of service message, the incoming direction processing engine sends a copied first chip forwarding information header and message content to the message caching and forwarding management module, and the message caching and forwarding management module sends the first chip forwarding information header and the message content to the incoming direction processing engine; for the second type of service message, the incoming direction processing engine sends the searched second chip forwarding information head and message content to the message caching and forwarding management module, and the message caching and forwarding management module sends the second chip forwarding information head and message content to the incoming direction processing engine.
And the outgoing direction processing engine correspondingly edits the message and then forwards the message to a corresponding destination according to the forwarding destination and the editing behavior of the message in the first chip forwarding information header or the second chip forwarding information header. The outgoing direction processing engine also comprises a CPU port and a service port, the CPU port of the outgoing direction processing engine sends the first chip forwarding information header and the message content or the second chip forwarding information header and the message content, and the service port of the outgoing direction processing engine sends the message content.
The invention discloses a device for sending messages by a CPU port of a network chip, which comprises:
the CPU sending module is used for sending a service message, wherein the service message comprises a first class service message or a second class service message, the first class service message comprises an indicating bit for identifying the type of the service message, a first chip forwarding information header and message content, and the second class service message comprises an indicating bit for identifying the type of the service message and message content.
A network chip, the network chip comprises an incoming direction processing engine, a message buffer and forwarding management module and an outgoing direction processing engine, the incoming direction processing engine comprises a CPU port receiving module,
the CPU port receiving module is used for receiving the service message, acquiring the type of the service message according to the indicating bit of the service message, directly copying the first chip forwarding information head if the service message is the first type of service message, searching and acquiring the second chip forwarding information head according to the message content if the service message is the second type of service message, and outputting the chip forwarding information head and the message content to the message caching and forwarding management module, wherein the chip forwarding information head is the first chip forwarding information head or the second chip forwarding information head.
For the format of the first type of service packet or the second type of service packet, the description in step S100 may be referred to, and for the specific processing principle of the incoming direction processing engine on the service packet, the descriptions in steps S200 and S300 may be referred to, which is not described herein again.
Therefore, the scope of the present invention should not be limited to the disclosure of the embodiments, but includes various alternatives and modifications without departing from the scope of the present invention, which is defined by the claims of the present patent application.

Claims (10)

1. A method for issuing message by a network chip CPU port, the network chip includes an incoming direction processing engine and a message buffer and forwarding management module, characterized in that the method includes:
s100, a CPU (central processing unit) sends a service message to a network chip, wherein the service message comprises a first class service message or a second class service message, the first class service message comprises an indicating bit for identifying the type of the service message, a first chip forwarding information header and message content, and the second class service message comprises an indicating bit for identifying the type of the service message and message content;
s200, an incoming direction processing engine of the network chip receives the service message, obtains the type of the service message according to the indicating bit of the service message, directly copies the forwarding information header of the first chip if the service message is the first type of service message, and searches for the forwarding information header of the second chip according to the message content if the service message is the second type of service message;
s300, the incoming direction processing engine outputs a chip forwarding information header and message contents to the message caching and forwarding management module, wherein the chip forwarding information header is the first chip forwarding information header or the second chip forwarding information header.
2. The method according to claim 1, wherein the indicator bit is located at a head end of a service packet, and in the first type of service packet, the first chip forwarding information header is located between the indicator bit and a packet content.
3. The method according to claim 1, wherein in S200, if the service packet is a first type service packet, the service packet skips processing by a direction processing engine, and directly copies the first chip forwarding header sent by the CPU.
4. The method according to claim 1, wherein in S200, if the service packet is a second-type service packet, the packet content is taken out, and the packet content is sent to an ingress direction processing engine for parsing and searching to obtain the forwarding information header of the second chip.
5. The method according to claim 1, wherein in S100, the CPU issues the service packet to the CPU port of the network chip.
6. A device for sending messages by a CPU port of a network chip is characterized by comprising:
the CPU sending module is used for sending a service message, wherein the service message comprises a first class service message or a second class service message, the first class service message comprises an indicating bit for identifying the type of the service message, a first chip forwarding information header and message content, and the second class service message comprises the indicating bit for identifying the type of the service message and the message content;
a network chip, the network chip comprises an incoming direction processing engine and a message caching and forwarding management module, the incoming direction processing engine comprises a CPU port receiving module,
the CPU port receiving module is used for receiving the service message, acquiring the type of the service message according to the indicating bit of the service message, directly copying the first chip forwarding information head if the service message is the first type of service message, searching and acquiring the second chip forwarding information head according to the message content if the service message is the second type of service message, and outputting the chip forwarding information head and the message content to the message caching and forwarding management module, wherein the chip forwarding information head is the first chip forwarding information head or the second chip forwarding information head.
7. The apparatus according to claim 6, wherein the indicator bit is located at a head end of a service packet, and in the first type of service packet, the first chip forwarding information header is located between the indicator bit and a packet content.
8. The device according to claim 6, wherein if the received service packet is the first type service packet, the CPU port receiving module skips processing by the direction processing engine and directly copies the first chip forwarding header sent by the CPU.
9. The device according to claim 6, wherein if the received message is a second-type service message, the CPU port receiving module takes out the message content, and sends the message content to an ingress direction processing engine for parsing and searching to obtain the second chip forwarding header.
10. The device according to claim 6, wherein the CPU sending module sends the service packet to the CPU port of the network chip, and the CPU port receiving module is connected to the CPU port.
CN202010827193.3A 2020-08-17 2020-08-17 Method and device for issuing message by CPU port of network chip Active CN111970276B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010827193.3A CN111970276B (en) 2020-08-17 2020-08-17 Method and device for issuing message by CPU port of network chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010827193.3A CN111970276B (en) 2020-08-17 2020-08-17 Method and device for issuing message by CPU port of network chip

Publications (2)

Publication Number Publication Date
CN111970276A CN111970276A (en) 2020-11-20
CN111970276B true CN111970276B (en) 2022-03-29

Family

ID=73388176

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010827193.3A Active CN111970276B (en) 2020-08-17 2020-08-17 Method and device for issuing message by CPU port of network chip

Country Status (1)

Country Link
CN (1) CN111970276B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116016713A (en) * 2022-12-13 2023-04-25 苏州盛科通信股份有限公司 Message transmission method, device, network equipment and readable storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166874A (en) * 2013-03-25 2013-06-19 杭州华三通信技术有限公司 Message forwarding method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9667442B2 (en) * 2007-06-11 2017-05-30 International Business Machines Corporation Tag-based interface between a switching device and servers for use in frame processing and forwarding

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166874A (en) * 2013-03-25 2013-06-19 杭州华三通信技术有限公司 Message forwarding method and device

Also Published As

Publication number Publication date
CN111970276A (en) 2020-11-20

Similar Documents

Publication Publication Date Title
EP2019360B1 (en) Data processing apparatus and data transfer method
US20020110122A1 (en) Dynamic packet processor architecture
US6987762B2 (en) Packet exchange and router and input packet processing method thereof
CN106992915B (en) Message de-encapsulation processing and data writing method and device
EP2604006B1 (en) Method and apparatus for packet processing and a preprocessor
CN111970276B (en) Method and device for issuing message by CPU port of network chip
KR100798926B1 (en) Apparatus and method for forwarding packet in packet switch system
RU2012122625A (en) METHOD AND DEVICE FOR PROTECTION IN VIRTUAL PRIVATE LOCAL NETWORK
CN108737278A (en) A kind of look-up method and device
CN106209640B (en) Down MEP message processing method and system
CN112751788B (en) Double-plane switching method supporting multi-type frame mixed transmission
US20100002703A1 (en) Packet Relay Device And Method For Transferring Packet Therein
CN105933231B (en) UP MEP message processing method and system
CN101014048A (en) Distributed firewall system and method for realizing content diction of firewall
CN107995117B (en) Message forwarding method and board card
CN112532731B (en) Automatic optimization method and device for multiple market data sources
CN112866139A (en) Method, equipment and storage medium for realizing multi-rule flow classification
CN115344620B (en) Method for realizing data on-demand synchronization after front-end and back-end separation by user-defined data pool
CN116032837A (en) Flow table unloading method and device
US8625619B2 (en) Domain gateway control system and method thereof
CN115914142A (en) Message processing method, message forwarding method, device and equipment
JP3355530B2 (en) Self-propagating network system
US20090185561A1 (en) Packet forwarding device and forwarding method
CN116886605B (en) Stream table unloading system, method, equipment and storage medium
JP2655466B2 (en) Packet switching equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant