WO2017202084A1 - Network processor, network processing method and system, single board, and computer storage medium - Google Patents

Network processor, network processing method and system, single board, and computer storage medium Download PDF

Info

Publication number
WO2017202084A1
WO2017202084A1 PCT/CN2017/074461 CN2017074461W WO2017202084A1 WO 2017202084 A1 WO2017202084 A1 WO 2017202084A1 CN 2017074461 W CN2017074461 W CN 2017074461W WO 2017202084 A1 WO2017202084 A1 WO 2017202084A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
port number
port
network
according
Prior art date
Application number
PCT/CN2017/074461
Other languages
French (fr)
Chinese (zh)
Inventor
姜海明
杨远田
Original Assignee
中兴通讯股份有限公司
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
Priority to CN201610356508.4 priority Critical
Priority to CN201610356508.4A priority patent/CN107438035A/en
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017202084A1 publication Critical patent/WO2017202084A1/en

Links

Images

Abstract

Provided are a network processor, and a network processing system and method. A network-side interface unit receives a message from a network side and sends the message to a port resolution unit; the port resolution unit determines, according to unique identification information about a network-side port in a message header of the message, a logical port number corresponding to the message, and then sends the message and the logical port number to a micro-engine unit; and the micro-engine unit processes the message on this basis, and then sends the message to a switching-side interface unit. Further provided is a computer storage medium.

Description

Network processor, network processing method and system, single board and computer storage medium Technical field

The present invention relates to the field of communications technologies, and in particular, to a network processor, a network processing method and system, a single board, and a computer storage medium.

Background technique

Today's network development is amazing, network traffic growth and the emergence of new services require network equipment to have wire-speed and flexible processing capabilities. With its high-speed processing and flexible programmability, network processors have become an effective solution for data processing in today's networks.

A typical architecture of a network processing system application is shown in FIG. 1, including an interface card 11, a network processor 12, and a switching network 13.

The network processor 12 is responsible for processing the packets received by the interface card 11 to implement service offloading and forwarding. The network side interface unit 121 and the switching side interface unit 123 respectively receive the traffic entering the network processor 12 on the network side and the switching side, and the micro engine unit 122 is the core processing engine of the network processor 12 for message processing; the switching network 13 is responsible for switching access and QOS (Quality of Service) processing.

The interface card 11 is responsible for port access, and usually includes an optical module, an FPGA, or a PHY. For example, access to ports such as E1, STM-1, GE, and XFI.

At present, the external interface provided by the network processor 12 includes multiple SERDES (SERializer/DESerializer) buses, which can be separately configured as SGMII (Serial Gigabit Media Independent Interface). ) (1G), XFI (10G), XLAUI (40G), CAUI (100G), INTERLAKEN And other interface types, in addition, in order to support more outbound interfaces, better use of the high-speed processing capability of the network processor 12, the interface card 11 can output multiple low-speed interfaces such as E1 and SGMII, and the interface card 11 is required to perform packet conversion. By adding the packet header to carry the channel information, the multi-way-to-one-way mapping is implemented. The packet received by the switching side is usually an Interlaken interface. The outgoing port is usually carried to the network processor 12 through the switching header. Contains the port information.

For both scenarios, the network processor needs to perceive the fine-grained channelized port information, that is, the logical port number. At present, the network processor usually uses a large number of instructions to identify and parse the microcode residing in the microengine unit. The microcode resource of the network processor is the most valuable resource, and the length of the microcode instruction determines the forwarding performance of the network processor. Therefore, how to save the performance of the microcode and make the processing power of the network processor stronger becomes an urgent problem to be solved.

Summary of the invention

The embodiment of the invention provides a network processor, a network processing method and system, a single board and a computer storage medium, which solves the problem that the micro-code of the micro-engine in the network processor is used to obtain the logical port number of the packet in the prior art. The resulting microcode performance is wasted, causing the network processor to handle poor performance.

The embodiment of the invention provides a network processing method, including:

Receiving a message from the network side or the switching side;

Determining, according to the unique identifier information of the network side port in the packet header of the packet, a logical port number corresponding to the packet;

The packet is processed according to the packet and a corresponding logical port number.

Optionally, the determining, according to the unique identifier information in the packet header of the packet, the logical port number corresponding to the packet, according to the correspondence between the unique identifier information and the preset unique identifier information and the logical port number Relationship: determining a logical port number corresponding to the packet.

Optionally, when the mode of the network side port is an unchannelized mode, the unique identifier information in the packet header of the packet includes a physical port number; when the network side port is in a channelized mode. The unique identification information in the packet header of the packet includes a physical port number and a channel number.

Optionally, the correspondence between the preset unique identifier information and the logical port number includes: a correspondence between a physical port number and a logical port number, or a physical port number and a channel number and a logical port number. Correspondence relationship

The logical port number corresponding to the determining packet includes:

Determining, according to the correspondence between the physical port number and the preset physical port number and the logical port number, the logical port number corresponding to the packet, when the mode of the network-side port is in the non-channelized mode;

Determining, according to the correspondence between the physical port number and the channel number and the preset physical port number and the channel number and the logical port number, the packet corresponding to the packet is determined. Logical port number.

Optionally, the embodiment of the present invention further provides a network processor, including a network side interface unit, a switching side interface unit, a port parsing unit, and a micro engine unit.

The network side interface unit receives the packet from the network side, and sends the packet to the port parsing unit; the port parsing unit determines the newspaper according to the unique identifier information of the network side port in the packet header of the packet. Corresponding logical port number, and sending the packet and the logical port number to the micro engine unit; the micro engine unit processes the packet according to the packet and a logical port number, And sending the processed packet to the switching side interface unit;

The switching side interface unit receives the packet from the switching side, and sends the packet to the port parsing unit; the port parsing unit determines the newspaper according to the unique identifier information of the network side port in the packet header of the packet. Corresponding logical port number, and sending the packet and the logical port number to the micro engine unit; the micro engine unit processes the packet according to the packet and a logical port number, And processing the processed packet to the network side interface unit.

Optionally, the port parsing unit determines, according to the unique identifier information of the network side port in the packet header of the packet, that the logical port number corresponding to the packet includes: the port parsing unit packet The port table is configured to store a correspondence between the unique identifier information and the logical port number, and the port table is searched according to the unique identifier information to determine a logical port number corresponding to the packet.

Optionally, when the mode of the network side port is in the non-channelized mode, the unique identifier information in the packet header of the packet includes a physical port number; when the mode of the network side port is in the channelized mode, The unique identification information in the packet header of the packet includes a physical port number and a channel number.

Optionally, the port table includes a first sub-table and a second sub-table; the first sub-table stores a correspondence between a physical port number and a logical port number, and the second sub-table stores a physical port. The correspondence between the number and the channel number and the logical port number;

When the network side port is in the non-channelized mode, searching for and determining a corresponding logical port number in the first sub-table according to the physical port number;

When the network side port is in the channelized mode, the corresponding logical port number is searched for and determined in the second sub-table according to the physical port number and the channel number.

Optionally, the port parsing unit further includes a selecting subunit; the first subtable determines and sends a routing signal to the selecting subunit according to a mode of the network side port; the selecting subunit is according to the The routing signal determines a logical port number corresponding to the message.

Optionally, the port table further stores a correspondence between the logical port number and the port information, and searches for and determines corresponding port information in the port table according to the unique identifier information.

Optionally, the embodiment of the present invention further provides a network processing system, including an interface card and the foregoing network processor; the receiving card includes at least one interface, and each interface corresponds to at least one network side port, and the interface card The packet is received by the network side port, and the packet is sent to the network side interface unit in the network processor through a corresponding interface.

Optionally, the embodiment of the present invention further provides a single board, including the foregoing network processor.

The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing network processing method.

The embodiment of the invention provides a network processor, a network processing method and system, a board and a computer storage medium, and the network side interface unit receives the packet from the network side, and sends the packet to the port parsing unit, and the port parsing unit Determining the logical port number corresponding to the packet according to the unique identifier information of the network side port in the packet header of the packet, and then sending the packet and the logical port number to the micro engine unit, and the micro engine unit processes the packet accordingly. Then sent to the switch side interface unit. The port resolution unit determines the logical port number of the message, thereby eliminating the micro-engine unit processing, greatly reducing the burden on the micro-engine unit, and significantly improving the processing capability of the network processor.

DRAWINGS

1 is a schematic structural diagram of a network processing system;

2 is a schematic structural diagram of a network processor according to an embodiment of the present invention;

3 is a schematic structural diagram of a network processing system according to an embodiment of the present invention;

4 is a schematic structural diagram of a port parsing unit according to an embodiment of the present invention;

FIG. 5 is a schematic structural diagram of a port parsing unit according to an embodiment of the present invention;

FIG. 6 is a schematic structural diagram of a first sub-table according to an embodiment of the present invention; FIG.

FIG. 7 is a schematic structural diagram of a second sub-table according to an embodiment of the present invention; FIG.

FIG. 8 is a schematic flowchart diagram of a network processing method according to an embodiment of the present invention;

FIG. 9 is a schematic structural diagram of a first sub-table according to an embodiment of the present invention;

FIG. 10 is a schematic structural diagram of a second sub-table according to an embodiment of the present invention.

detailed description

The embodiment of the present invention mainly adds a port parsing unit to the network processor, and the port parsing unit determines the logical port number corresponding to the packet according to the unique identifier information of the network side interface in the packet header of the packet, and then The message and the logical port number are sent to the micro engine unit. The engine unit processes the message accordingly, which saves the microcode resources in the micro-engine unit, and the processing capability of the micro-engine unit is significantly improved.

The specific embodiments of the present invention are further described with reference to the accompanying drawings.

Embodiment 1

This embodiment provides a network processor. Referring to FIG. 2, the method includes:

a network side interface unit 121, a switching side interface unit 123, a port parsing unit 124, and a micro engine unit 122;

The network side interface unit 121 receives the packet from the network side, and sends the packet to the port parsing unit 124. The port parsing unit 124 determines the logic corresponding to the packet according to the unique identifier information of the network side port in the packet header of the packet. The port number is sent to the micro-engine unit 122. The micro-engine unit 122 processes the packet according to the packet and the logical port number, and sends the processed packet to the switching-side interface unit 123. ;

The switching side interface unit 123 receives the packet from the switching side, and sends the packet to the port parsing unit 124. The port parsing unit 124 determines the logic corresponding to the packet according to the unique identifier information of the network side port in the packet header of the packet. The port number is sent to the micro-engine unit 122. The micro-engine unit 122 processes the packet according to the packet and the logical port number, and sends the processed packet to the network-side interface unit 121. . In the embodiment, the port parsing unit 124 may correspond to a microprocessor or a WeChat processing circuit juxtaposed with the engine unit 122. The microprocessor or the WeChat processing circuit can quickly and quickly extract the corresponding field in the packet to obtain the unique identifier information.

The network side interface unit 121 is a unit that the network processor 12 interacts with the outside world. The various packets sent from the outside enter the network processor 12 through the network side interface unit 121. Similarly, the packets in the network processor 12 pass through. The network side interface unit 121 transmits to the designated location. On the net When the micro-engine unit 122 in the network processor 12 processes the packet, it needs to know the fine-grained port information of the packet, that is, the logical port number of the network-side port of the packet, so that the packet can be processed in the next step. The processing procedure here includes the operation of modifying and forwarding the packet, etc.; therefore, in the case that the packet header includes the unique identifier information, the port parsing unit 124 determines the logic of the packet according to the unique identifier information. The port number, after determining the logical port number of the message, sends the message and the logical port number to the micro-engine unit 122, and the micro-engine unit 122 performs subsequent processing. After processing the message, the micro-engine unit 122 sends the message to the switching-side interface unit 123, and the switching-side interface unit 123 sends the message to the switching network.

On the other hand, the switching network also generates a message and sends it to the outside through the network processor 12; therefore, the switching side interface unit 123 receives the message from the switching side, and after receiving the message on the switching side, The packet is sent out of the network processor 12, and needs to know the fine-grained egress information corresponding to the packet, that is, the logical port number of the network side port of the packet. Therefore, the switching side interface unit 123 sends the packet to the port parsing unit. The port parsing unit 124 determines the logical port number of the network side port corresponding to the packet according to the unique identifier information in the packet header of the packet, and then sends the packet and the logical port number to the micro engine unit 122. The microengine unit 122 accordingly sends the message to the appropriate location.

The transmission of the message has the difference between the network side and the switching side, that is, the message transmitted by the network side, and the message transmitted by the switching side; when the message is transmitted from the network side, the network processor 12 needs Knowing is the logical port number corresponding to the incoming network port of the message, so as to process the message; when the message is transmitted from the switching side, the network processor 12 needs to know that the message is delivered. The logical port number corresponding to the network-side port, that is, the packet that is transmitted from the network side or the packet transmitted from the switching side, all need to know the logical port number corresponding to the network-side port.

In addition, although the message transmitted from the network side interface unit 121 and the message transmitted by the switching side interface unit 123 can be processed through the port before being processed by the micro engine unit 122. The parsing unit 124 processes the packet. However, only the packet transmitted by the network side interface unit 121 may be processed by the port parsing unit 124, or only the packet transmitted by the switching side interface unit 123 may be processed by the port parsing unit 124. Whichever method is adopted, the processing load of the micro-engine unit 122 can be reduced to some extent, and the processing performance of the network processor 12 can be improved.

Optionally, referring to FIG. 4, the port parsing unit 124 includes a port table 20, where the port table 20 stores the correspondence between the unique identifier information and the logical port number. Therefore, the port parsing unit 124 is based on the unique identifier information of the packet. The corresponding logical port number is found and determined in the port table 20, and then the logical port number and the message are sent to the micro-engine unit 122. The correspondence between the unique identification information and the logical port number stored in the port table 20 is a preset correspondence. This relationship is often related to experience, or system inertia, and the logical port number often follows certain rules.

The network side interface unit 121 is often connected to multiple network side ports; the mode of the network side port can be generally divided into two types: one is a non-channelized mode, and the other is a channelized mode. The channelization mode divides a network interface into multiple sub-interfaces. For example, a 2M bandwidth port is divided into 32 64K sub-channels. The 32 sub-channels can be 1, 2, 4, 8, or 16 And all are combined for units, providing multiple sub-channels for users to use and allowing free channels; instead of channelized mode, one network interface cannot be divided into multiple sub-interfaces, but can also be implemented in one interface by other technologies. Multiple communications, such as virtual circuits and multiplexing, are performed because the channelized interface is self-channelized on the hardware, so its cost is higher than that of the non-channelized interface. In addition, the channelized mode interface is characterized in that the divided interfaces have the same physical port number. Similarly, the non-channelized mode interfaces that cannot be divided have their respective physical port numbers fixed. Therefore, when the network-side interface is in the non-channelized mode, the unique identifier information of the packet includes the physical port number. When the network-side interface is in the channelized mode, the unique identifier information of the packet includes the physical port number and the channel number.

Since the network side port has channelization and non-channelization, the port table 20 in the port parsing unit 124 includes the first sub-table 201 and the second sub-table 202; the first sub-table 201 stores the object. For the correspondence between the port number and the logical port number, refer to FIG. 6; the second sub-table 202 stores the correspondence between the physical port number and the channel number and the logical port number, refer to FIG. 7. When the mode of the network side port is the unchannelized mode, the corresponding logical port number is searched and determined in the first sub-table 201 according to the physical port number; when the mode of the network side interface is the channelized mode, according to the physical port number and The channel number is looked up in the second sub-table 202 and the corresponding logical port number is determined. Further, although in most cases, the first sub-table 201 is a lookup for the logical port number of the network side port of the unchannelized mode, the second sub-table 202 is the logical port of the network side port for the channelized mode. Number search, but at some point, for channelized network side ports, we only need to know the logical port number corresponding to its physical port number, and do not need to be more detailed to the combination between the physical port number and the channel number. The logical port number of the packet, the network port of the channelized mode can still find and determine the logical port number corresponding to the packet according to the correspondence between the physical port number and the logical port number stored in the first sub-table 201. This is also allowed in this embodiment.

Since the port table 20 includes the first sub-table 201 and the second sub-table 202, the first sub-table 201 stores the correspondence between the physical port number and the logical port number, and the second sub-table 202 stores the physical port. The correspondence between the number and the channel number and the logical port number, then the first sub-table 201 or the second sub-table 202 needs to be selected. Alternatively, from the first sub-table 201 or the second sub-table 202, select the required table, and find and determine the logical port number corresponding to the message from the table. In addition, since the first sub-table 201 and the second sub-table 202 are often selected by the mode of the network-side interface, the port parsing unit 124 includes a selecting sub-unit 30 for selecting the first sub-table according to the mode of the network-side interface. 201 or the second sub-table 202 finds and delimits the logical port number corresponding to the message. Specifically, the selection process may be multiple. First, the selection sub-unit 30 first determines whether to select the first sub-table 201 or the second sub-table 202 according to the mode of the network-side interface, and then, to determine the first sub-sub The table 201 or the second sub-table 202 performs a search to send the found result to the micro-engine; secondly, directly searches the first sub-table 201 and the second sub-table 202 according to the unique identification information, generally speaking, The search process will produce two results, one is based on the The logical port number of the packet determined by the correspondence between the physical port number and the logical port number in a sub-table 201 is based on the physical port number in the second sub-table 202 and the logical port number between the channel number and the logical port number. Corresponding relationship determines the logical port number of the message, and the two port numbers are often different; then, in the first sub-table 201 or the second sub-table 202, the routing signal is determined and sent according to the mode of the network-side port. The subunit 30 is selected, and the subunit 30 is selected to determine the logical port number corresponding to the message according to the routing signal. That is, taking the first sub-table 201 as an example, the first sub-table 201 determines and sends a routing signal to the selection sub-unit 30 according to the mode of the network-side port, and then the selection sub-unit 30 determines the corresponding message according to the routing signal. Logical port number.

In addition, optionally, the port table 20 stores the correspondence between the logical port number and the port information, in addition to the correspondence between the unique identifier information and the logical port number, and the unique identifier information of the packet. Corresponding relationship between the logical port number and the port information stored in the port table 20 can also be regarded as the correspondence between the unique identification information and the port information, or even the unique identification information. The logical port number and port information have corresponding correspondences. When the port resolution unit 124 determines the logical port number according to the unique identifier information, the corresponding port information may also be determined according to the unique identifier information; the specific content of the port information herein may be flexibly defined, for example, port mirroring, port default priority, etc. may be stored. information.

In addition, this embodiment further provides a single board, including the network processor 12 described above.

The network processor 12 in this embodiment extracts the fine-grained port information and the logical port number of the packet in advance before the packet enters the micro-engine unit 122 for processing. For the micro-engine, the received message is received. The text already carries the logical port number, so the microcode is not required to spend instructions for parsing and logical operations, which greatly reduces the load of the microengine unit 122 and improves the processing performance of the network processor 12.

Embodiment 2

This embodiment provides a network processing system. Referring to FIG. 3, the interface card 11 and the network processor 12 in the embodiment are included. The interface card 11 includes at least one interface, and each interface corresponds to at least one network side port. The card 11 receives the message through the network side port, and delivers the message to the network side interface unit 121 in the network processor 12 through the corresponding interface.

The function of the interface card 11 is to provide an interface for transmitting messages. It is easy to know that the interface card 11 should have at least two ends, one end receives the external message, and the other end sends the received message to the network side interface unit 121 in the network processor 12. The end that sends the received packet to the network processor 12 is the interface. The physical port number of each interface in the interface card 11 is different. The end that receives the external packet is the network side port and the network side port. According to the type of the channel, it is divided into a non-channelized mode and a channelized mode. The unchannelized mode is an interface corresponding to the one network side port, and the channelized mode is one interface corresponding to multiple network side ports; The physical port number of the port is the same. The difference is that the channel number is different. Therefore, for the packets transmitted from the network-side port in the unchannelized mode, the unique identifier information in the packet header should include the physical port number. For a packet transmitted from a network-side port in channelized mode, the unique identifier information in the packet header should include the physical port number and channel number.

In addition, the protocol between the interface of the interface card 11 and the network-side port is not necessarily the same; therefore, the interface card 11 can implement protocol conversion between the network-side port and the interface, in addition to transmitting the packet, so that the packet can be The network side interface unit 121 in the network processor 12 is smoothly passed through the interface card 11.

The network processor 12 in this embodiment is similar to that in the first embodiment, and details are not described herein again.

In addition, at the other end of the network processor 12, that is, the end that interacts with the switching side interface unit 123, a switching network is also included; the switching network is responsible for switching access and QOS processing. The switching network receives the message through the switching side interface unit 123, and also sends the message to the network processor 12 through the switching side interface unit 123, thereby achieving its function.

Embodiment 3

This embodiment provides a network processing method. Referring to FIG. 8, the method includes:

Receiving a message from the network side or the switching side;

Determining a logical port number corresponding to the packet according to the unique identifier information of the network side port in the packet header of the packet;

The packet is processed according to the packet and the corresponding logical port number.

The packet on the network side is the packet that enters the network processor 12 from the outside. The packet on the switching side is the packet that enters the network processor 12 by the switching network. When the packet is processed in the network processor 12, the packet needs to be processed. Knowing the fine-grained port information of the packet, that is, the logical port number of the network-side port of the packet, can perform the next processing on the packet. The processing here includes modifying and forwarding the packet, etc.; If the packet header includes a unique identifier, the logical port number of the packet is determined according to the unique identifier information, and then the packet can be processed according to the packet and the logical port number.

The transmission of the message has the difference between the network side and the switching side, that is, the message transmitted from the network side and the incoming message are transmitted; when the message is transmitted from the network side, the network processor 12 needs to Knowing is the logical port number corresponding to the incoming network port of the message, so as to process the message; when the message is transmitted from the switching side, the network processor 12 needs to know that the message is delivered. The logical port number corresponding to the network-side port, that is, the packet that is transmitted from the network side or the packet transmitted from the switching side, all need to know the logical port number of the network-side port.

Optionally, the network processor 12 presets a correspondence between the unique identifier information and the logical port number, that is, the step S102 includes: correspondingly, the correspondence between the unique identifier information and the preset unique identifier information and the logical port number. , determine the logical port number corresponding to the message. This preset correspondence may be stored in the port table 20 as in the first embodiment, and then In the process, the corresponding logical port number is searched in the port table 20 directly according to the unique identification information. The correspondence between the unique identification information and the logical port number stored in the port table 20 is a preset correspondence. This relationship is often related to experience, or system inertia, and the logical port number often follows certain rules.

Network-side ports, in general, can be divided into two modes of network ports: one is a non-channelized mode port, and the other is a channelized mode port. The channelization mode divides the interface into multiple sub-interfaces. For example, a port of 2M bandwidth is divided into 32 64K sub-channels, and the 32 sub-channels can be 1, 2, 4, 8, and 16 All are combined for units, providing multiple sub-channels for users to use and allowing free channels; instead of channelized mode, the interface cannot be divided into multiple sub-interfaces, but other technologies can be used to implement multiple interfaces in one interface. Communication, such as virtual circuits and multiplexing, is more expensive than non-channelized interfaces because channelized interfaces are self-channelized on hardware. In addition, the channelized mode interface is characterized in that the divided interfaces have the same physical port number. Similarly, the non-channelized mode interfaces that cannot be divided have their respective physical port numbers fixed. Therefore, when the network-side interface is in the non-channelized mode, the unique identifier information of the packet includes the physical port number. When the network-side interface is in the channelized mode, the unique identifier information of the packet includes the physical port number and the channel number.

The mapping between the preset unique identifier information and the logical port number may include the correspondence between the physical port number and the logical port number, or Corresponding relationship between the physical port number and the channel number and the logical port number. Then, S102 includes: when the network side port is in the non-channelized mode, according to the physical port number and the preset physical port number and the logical port number. Corresponding relationship, determining the logical port number corresponding to the packet; when the mode of the network side port is channelized mode, the correspondence between the physical port number and the channel number and the preset physical port number and the channel number and the logical port number , determine the logical port number corresponding to the message. That is, in the case of including the port table 20, the port table 20 may include a first sub-table 201 and a second sub-table 202; the first sub-table 201 stores the physical port number and logic The correspondence between the port numbers, the second sub-table 202 stores the correspondence between the physical port number and the channel number and the logical port number. When the mode of the network side port is the unchannelized mode, the corresponding logical port number is searched and determined in the first sub-table 201 according to the physical port number; when the network side interface is in the channelized mode, the physical port number and the channel number are used according to the physical port number and the channel number. The corresponding logical port number is looked up and determined in the second sub-table 202. Further, although in most cases, the first sub-table 201 is a lookup for the logical port number of the network side port of the unchannelized mode, the second sub-table 202 is the logical port of the network side port for the channelized mode. Number search, but at some point, for channelized network side ports, we only need to know the logical port number corresponding to its physical port number, and do not need to be more detailed to the combination between the physical port number and the channel number. The logical port number of the packet, the network port of the channelized mode can still find and determine the logical port number corresponding to the packet according to the correspondence between the physical port number and the logical port number stored in the first sub-table 201. This is also allowed in this embodiment.

Since the port table 20 includes the first sub-table 201 and the second sub-table 202, the first sub-table 201 stores the correspondence between the physical port number and the logical port number, and the second sub-table 202 stores the physical port. The correspondence between the number and the channel number and the logical port number, then the first sub-table 201 or the second sub-table 202 needs to be selected. Alternatively, from the first sub-table 201 or the second sub-table 202, select the required table, and find and determine the logical port number corresponding to the message from the table. In addition, since the first sub-table 201 and the second sub-table 202 are often selected by the mode of the network-side interface, the port parsing unit 124 includes a selecting sub-unit 30 for selecting the first sub-table according to the mode of the network-side interface. 201 or the second sub-table 202 finds and delimits the logical port number corresponding to the message. Specifically, the selection process may be multiple. First, the selection sub-unit 30 first determines whether to select the first sub-table 201 or the second sub-table 202 according to the mode of the network-side interface, and then, to determine the first sub-sub The table 201 or the second sub-table 202 performs a search to send the found result to the micro-engine; secondly, directly searches the first sub-table 201 and the second sub-table 202 according to the unique identification information, generally speaking, The search process will produce two results, one is based on the The logical port number of the packet determined by the correspondence between the physical port number and the logical port number in a sub-table 201 is based on the physical port number in the second sub-table 202 and the logical port number between the channel number and the logical port number. Corresponding relationship determines the logical port number of the message, and the two port numbers are often different; then, in the first sub-table 201 or the second sub-table 202, the routing signal is determined and sent according to the mode of the network-side port. The subunit 30 is selected, and the subunit 30 is selected to determine the logical port number corresponding to the message according to the routing signal. That is, taking the first sub-table 201 as an example, the first sub-table 201 determines and sends a routing signal to the selection sub-unit 30 according to the mode of the network-side port, and then the selection sub-unit 30 determines the corresponding message according to the routing signal. Logical port number.

In addition, optionally, the port table 20 stores a correspondence between the unique identifier information and the logical port number and the port information, in addition to the correspondence between the unique identifier information and the logical port number; When the unit 124 determines the logical port number according to the unique identification information, the corresponding port information may be determined according to the unique identification information; the specific content of the port information may be flexibly defined, for example, information such as port mirroring and port default priority may be stored.

The network processing method in this embodiment receives the packet from the network side and/or the switching side, and then determines the logical port number corresponding to the packet according to the unique identification information of the network side port in the packet header of the packet, thereby The process of processing by the micro-engine unit 122 in the network processor 12 is omitted. For the micro-engine, the received message already carries the logical port number, so there is no need to spend instructions for parsing and logic operations. The compliance of the microengine unit 122 is greatly reduced, and the processing performance of the network processor 12 is improved.

Embodiment 4

This embodiment provides a network processing system. Referring to FIG. 3, the method includes:

Interface card 11, network processor 12, switching network;

The interface card 11 includes at least one interface, and each interface corresponds to at least one network side port. The interface card 11 receives the packet through the network side port, and transmits the packet to the network through the corresponding interface. A network interface unit in processor 12.

The function of the interface card 11 is to provide an interface for transmitting messages. It is easy to know that the interface card 11 should have at least two ends, one end receives the external message, and the other end sends the received message to the network side interface unit 121 in the network processor 12. The end that sends the received packet to the network processor 12 is the interface. The physical port number of each interface in the interface card 11 is different. The end that receives the external packet is the network side port and the network side port. According to the mode type, it is divided into non-channelized mode and channelized mode. The unchannelized mode is an interface corresponding to this network side port, and the channelized mode is one interface corresponding to multiple network side ports; one interface of multiple networks The physical port number of the side port is the same. The difference is the channel number. Therefore, the unique identifier information in the packet header should include the physical port number for the packets transmitted from the network-side port in the unchannelized mode. For the packet transmitted from the network side port of the channelized mode, the unique identifier information in the packet header should include the physical port number and the channel number.

The network processor 12 includes a network side interface unit 121, a switching side interface unit 123, a port parsing unit 124, and a microengine unit 122;

The network side interface unit 121 receives the packet from the network side, and sends the packet to the port parsing unit 124. The port parsing unit 124 determines the logic corresponding to the packet according to the unique identifier information of the network side port in the packet header of the packet. The port number is sent to the micro-engine unit 122. The micro-engine unit 122 processes the packet according to the packet and the logical port number, and sends the processed packet to the switching-side interface unit 123. ;

The switching side interface unit 123 receives the packet from the switching side, and sends the packet to the port parsing unit 124. The port parsing unit 124 determines the logic corresponding to the packet according to the unique identifier information of the network side port in the packet header of the packet. The port number is sent to the micro-engine unit 122. The micro-engine unit 122 processes the packet according to the packet and the logical port number, and sends the processed packet to the network-side interface unit 121. .

The single SERDES bus of the network processor 12 and the interface card 11 is configured in a channelized mode, For example, HIGIG/HIGIG+, introduced by BROADCOM, transmits channelized port information via the HIGIG header. At this time, one SERDES of the network processor 12 corresponds to 10 SGMII ports on the panel side, and the interface card 11 usually implements conversion of SGMII and HIGIG by using an FPGA (Field-Programmable Gate Array). The packet header of the packet entering the network processor 12 carries the channel channel information.

For the packets that enter the switch, the switch carries the outbound port information of the packets. The microcode needs to know the fine-grained outbound port information carried by the switch and send it to the corresponding egress port. For the channelized port, The outgoing port needs to be converted into a corresponding channelized header containing channelized information, and the interface card 11 passes the channelized hair to the final outgoing port.

FIG. 9 is a schematic diagram of the first sub-table 201 of the port table 20 in the port parsing unit 124 of the embodiment:

Key value: PhyPort (physical port number)

Table contents: Valid (effective bit) + Lport (logical port number) + PortInfo (port information).

10 is a schematic diagram of a second sub-table 202 of the port table 20 in the port parsing unit 124 of the present embodiment:

TCAM (ternary content addressable memory): PhyPort+Channel (channel number);

SRAM (Static Random Access Memory): Lport+PortInfo.

The first sub-table 201 passes the PhyPort index, and PhyPort is a physical number of all the port types supported by the interface card 11. For the channelized port, the HIGHI port in the example is the same value of the PhyPort.

The field in the first sub-table 201, valid is whether to adopt the flag bit of the port table 201, and this flag is used as the routing signal of the selection sub-unit 30 on the hardware. If it is 1, then Lport and PortInfo is obtained from the first sub-list 201; otherwise, it is obtained according to the TCAM; Lport is the logical port number used by the microcode, and corresponds one-to-one with the network side panel port, which is the finest-grained port number, and the microcode needs this port number to check each PortInfo is the port content. The specific content can be flexibly defined. For example, port mirroring and port default priority can be stored.

The second sub-table 202 includes a TCAM and an SRAM. The index returned by the TCAM directly indexes the SARM, and the SARM content is substantially the same as the content of the first sub-table 201, and mainly includes Lport and PortInfo. The TCAM stores matching rules, including PhyPort and Channel. For the incoming packets of the channelized port, after searching in TCAM and SARM, Lport and PortInfo will be output.

Referring to FIG. 5, the selection subunit 30 performs path selection according to the routing signal in the first sub-table 201, and outputs the final Lport and PortInfo.

More specifically, for the network side port of the unchannelized mode, the value of the port table 201 is valid=1, the selection subunit 30 selects the result in the first sub-table 201 as the output; for the network side port of the channelized mode, Valid=0, the selection sub-unit 30 will select the result from the second sub-table 202 as an output.

In addition, the first sub-table 201 and the second sub-table 202 are substantially identical, and the actual application can be stored in the same memory, and the contents in the table can also be flexibly defined, which are all within the content of the patent.

The embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the network processing method provided by any one of the foregoing solutions, as shown in FIG. method. The computer storage medium provided in this embodiment may be various types of storage media, such as a random storage medium, a read-only storage medium, a flash memory, etc., and may be a non-transitory storage medium.

The above is a further detailed description of the present invention in connection with the specific embodiments, and the specific embodiments of the present invention are not limited to the description. Modifications made in accordance with the principles of the invention are understood to fall within the scope of the invention.

Claims (13)

  1. A network processing method includes:
    Receiving a message from the network side or the switching side;
    Determining, according to the unique identifier information of the network side port in the packet header of the packet, a logical port number corresponding to the packet;
    The packet is processed according to the packet and a corresponding logical port number.
  2. The network processing method according to claim 1, wherein the determining, according to the unique identification information in the packet header of the packet, the logical port number corresponding to the packet comprises: according to the unique identifier information and a preset unique identifier The correspondence between the information and the logical port number determines the logical port number corresponding to the packet.
  3. The network processing method according to claim 2, wherein when the mode of the network side port is an unchannelized mode, the unique identification information in the packet header of the packet includes a physical port number; when the network When the mode of the side port is the channelized mode, the unique identifier information in the packet header of the packet includes the physical port number and the channel number.
  4. The network processing method according to claim 3, wherein the correspondence between the preset unique identification information and the logical port number comprises: a correspondence between a physical port number and a logical port number, or a physical port number and The correspondence between the channel number and the logical port number;
    The logical port number corresponding to the determining packet includes:
    Determining, according to the correspondence between the physical port number and the preset physical port number and the logical port number, the logical port number corresponding to the packet, when the mode of the network-side port is in the non-channelized mode;
    Determining, according to the correspondence between the physical port number and the channel number and the preset physical port number and the channel number and the logical port number, the packet corresponding to the packet is determined. Logical port number.
  5. A network processor, comprising: a network side interface unit, a switching side interface unit, a port parsing unit, and a micro engine unit;
    The network side interface unit receives the packet from the network side, and sends the packet to the port parsing unit; the port parsing unit determines, according to the unique identifier information of the network side port in the packet header of the packet. Transmitting the logical port number corresponding to the packet, and sending the packet and the logical port number to the micro-engine unit; the micro-engine unit performs the packet according to the packet and the logical port number Processing, and sending the processed packet to the switching side interface unit;
    The switching side interface unit receives the packet from the switching side, and sends the packet to the port parsing unit; the port parsing unit determines the location according to the unique identifier information of the network side port in the packet header of the packet. Transmitting the logical port number corresponding to the packet, and sending the packet and the logical port number to the micro-engine unit; the micro-engine unit performs the packet according to the packet and the logical port number Processing, and sending the processed packet to the network side interface unit.
  6. The network processor according to claim 5, wherein the port parsing unit determines, according to the unique identification information of the network side port in the packet header of the packet, the logical port number corresponding to the packet, the: The port parsing unit includes a port table, and the port table stores a correspondence between the unique identifier information and the logical port number, searches the port table according to the unique identifier information, and determines a logical port number corresponding to the packet.
  7. The network processor according to claim 6, wherein when the mode of the network side port is an unchannelized mode, the unique identification information in the packet header of the packet includes a physical port number; when the network When the mode of the side port is the channelized mode, the unique identifier information in the packet header of the packet includes the physical port number and the channel number.
  8. The network processor according to claim 7, wherein the port table comprises a first sub-table and a second sub-table; the first sub-table stores a correspondence between a physical port number and a logical port number, The second sub-table stores the correspondence between the physical port number and the channel number and the logical port number;
    When the mode of the network side port is an unchannelized mode, searching for and determining a corresponding logical port number in the first sub-table according to the physical port number;
    When the mode of the network side port is the channelized mode, the corresponding logical port number is searched for and determined in the second sub-table according to the physical port number and the channel number.
  9. The network processor according to claim 8, wherein said port parsing unit further comprises a selecting subunit; said first subtable determines and transmits a routing signal to said selecting subunit according to a mode of said network side port The selection subunit determines a logical port number corresponding to the message according to the routing signal.
  10. The network processor according to any one of claims 6 to 9, wherein the port table further stores a correspondence between a logical port number and port information, and searches for the port table according to the unique identification information. And determine the corresponding port information.
  11. A network processing system, comprising: an interface card and the network processor according to any one of claims 5 to 10; the receiving card comprises at least one interface, each interface corresponding to at least one network side port, the interface The card receives the packet through the network side port, and sends the packet to the network side interface unit in the network processor through a corresponding interface.
  12. A single board, comprising the network processor according to any one of claims 5 to 10.
  13. A computer storage medium having stored therein computer executable instructions for performing the network processing method of any one of claims 1 to 4.
PCT/CN2017/074461 2016-05-25 2017-02-22 Network processor, network processing method and system, single board, and computer storage medium WO2017202084A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610356508.4 2016-05-25
CN201610356508.4A CN107438035A (en) 2016-05-25 2016-05-25 A kind of network processing unit, network processing method and system, veneer

Publications (1)

Publication Number Publication Date
WO2017202084A1 true WO2017202084A1 (en) 2017-11-30

Family

ID=60412133

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/074461 WO2017202084A1 (en) 2016-05-25 2017-02-22 Network processor, network processing method and system, single board, and computer storage medium

Country Status (2)

Country Link
CN (1) CN107438035A (en)
WO (1) WO2017202084A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110213170A (en) * 2018-02-28 2019-09-06 华为技术有限公司 A kind of method and device of message transmissions

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040032873A1 (en) * 2002-08-15 2004-02-19 International Business Machines Corporation Database management system and method of using it to transmit packets
CN101242284A (en) * 2008-03-20 2008-08-13 杭州华三通信技术有限公司 Communication method and network device based on SPI bus
CN102347955A (en) * 2011-11-01 2012-02-08 杭州依赛通信有限公司 Reliable data transmission protocol based on virtual channels
CN105337884A (en) * 2015-09-25 2016-02-17 盛科网络(苏州)有限公司 Method and device for achieving multistage message editing service control on the basis of logic port

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040032873A1 (en) * 2002-08-15 2004-02-19 International Business Machines Corporation Database management system and method of using it to transmit packets
CN101242284A (en) * 2008-03-20 2008-08-13 杭州华三通信技术有限公司 Communication method and network device based on SPI bus
CN102347955A (en) * 2011-11-01 2012-02-08 杭州依赛通信有限公司 Reliable data transmission protocol based on virtual channels
CN105337884A (en) * 2015-09-25 2016-02-17 盛科网络(苏州)有限公司 Method and device for achieving multistage message editing service control on the basis of logic port

Also Published As

Publication number Publication date
CN107438035A (en) 2017-12-05

Similar Documents

Publication Publication Date Title
EP2904745B1 (en) Method and apparatus for accelerating forwarding in software-defined networks
US9130774B2 (en) Data mirroring in a service
DE69935608T2 (en) Method and system for multiprotocol conversion assistance for a network accessor
US6049546A (en) System and method for performing switching in multipoint-to-multipoint multicasting
US8634308B2 (en) Path detection in trill networks
JP3612626B2 (en) Computer communication network
EP1393192B1 (en) Method and system for connecting virtual circuits across an ethernet switch
US6718379B1 (en) System and method for network management of local area networks having non-blocking network switches configured for switching data packets between subnetworks based on management policies
US7369561B2 (en) Apparatus and method for route summarization and distribution in a massively parallel router
CN100490417C (en) Arrangements for connection-oriented transport in a packet switched communications network
EP1109363B1 (en) Routing engine
US7430210B2 (en) Application of an Ethernet/MPLS “half bridge” to provide emulated Ethernet LAN functions in SONET networks
US10003530B2 (en) Service chain header and metadata transport
US6172980B1 (en) Multiple protocol support
US7447204B2 (en) Method and device for the classification and redirection of data packets in a heterogeneous network
US10038567B2 (en) Scalable IP-services enabled multicast forwarding with efficient resource utilization
CN100481810C (en) Network system having a plurality of switches capable of improving transmission efficiency and method thereof
JP2005086820A (en) VIRTUAL PRIVATE NETWORK (VPN) WITH CHANNELIZED ETHERNET (R) OVER SONET (EoS) INTERFACE, EDGE ROUTER AND METHOD
US6571291B1 (en) Apparatus and method for validating and updating an IP checksum in a network switching system
US6952397B2 (en) Communication in a bidirectional ring network with single-direction receiving
JP4335009B2 (en) Method and apparatus for encapsulating frames for transmission within a storage area network
US8553552B2 (en) Stateless load balancer in a multi-node system for transparent processing with packet preservation
US6650639B2 (en) Secure fast packet switch having improved memory utilization
EP2412129B1 (en) Redundant host connection in a routed network
US20030063611A1 (en) Flexible application of mapping algorithms within a packet distributor

Legal Events

Date Code Title Description
NENP Non-entry into the national phase in:

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17801938

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17801938

Country of ref document: EP

Kind code of ref document: A1