CN115914142B - Message processing method, message forwarding method, device and equipment - Google Patents
Message processing method, message forwarding method, device and equipment Download PDFInfo
- Publication number
- CN115914142B CN115914142B CN202110931712.5A CN202110931712A CN115914142B CN 115914142 B CN115914142 B CN 115914142B CN 202110931712 A CN202110931712 A CN 202110931712A CN 115914142 B CN115914142 B CN 115914142B
- Authority
- CN
- China
- Prior art keywords
- message
- chip
- editing
- port
- information
- 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
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请涉及一种报文处理方法、报文转发方法、装置及设备,报文处理方法应用于入口芯片,通过接收第一报文,根据第一报文的目的MAC地址,确定用于转发第一报文的出口端的端口号及用于编辑第一报文的编辑信息;根据出口端的端口号,获取出口端的属性信息;根据属性信息及编辑信息,编辑第一报文的包头得到第二报文;其中,第二报文由入口芯片通过出口端转发到入口芯片所在的设备外。本申请能够使得报文的所有编辑动作都可以在报文的入口芯片上完成,而无需在报文的出口芯片上对报文进行编辑,这样就不需要将入口芯片上获取出的报文编辑信息携带到出口芯片上,从而降低了编辑资源管理的复杂度,同时也可以大大地节省芯片互联端口的带宽。
The present application relates to a message processing method, a message forwarding method, a device and an apparatus. The message processing method is applied to an inlet chip, and receives a first message, and determines the port number of the outlet for forwarding the first message and the editing information for editing the first message according to the destination MAC address of the first message; obtains the attribute information of the outlet according to the port number of the outlet; edits the packet header of the first message according to the attribute information and the editing information to obtain a second message; wherein the second message is forwarded by the inlet chip through the outlet to the outside of the device where the inlet chip is located. The present application enables all editing actions of the message to be completed on the inlet chip of the message, without the need to edit the message on the outlet chip of the message, so that there is no need to carry the message editing information obtained on the inlet chip to the outlet chip, thereby reducing the complexity of editing resource management, and can also greatly save the bandwidth of the chip interconnection port.
Description
技术领域Technical Field
本申请涉及网络通信技术领域,尤其涉及一种报文处理方法、报文转发方法、装置及设备。The present application relates to the field of network communication technology, and in particular to a message processing method, a message forwarding method, a device and equipment.
背景技术Background Art
以太网有不同的协议报文,以太网交换芯片需要在报文处理流程中对原始报文进行编辑以产生新的报文。Ethernet has different protocol messages, and the Ethernet switching chip needs to edit the original message to generate a new message during the message processing process.
在报文处理流程中,交换芯片首先通过IPE(Ingress Process Engine,入方向处理引擎)模块对报文进行转发表的查找得到转发目的地和报文编辑信息,然后通过BSR(Buffer Store Retrieve,存储转发模块)模块对报文进行存储和转发,再通过EPE(EgressProcess Engine,出方向处理引擎)模块根据IPE模块得到的编辑信息对原始报文进行编辑,并且在报文编辑的流程中需要根据出口端上配置的属性对报文进行编辑或者其他动作。In the message processing process, the switching chip first searches the message forwarding table through the IPE (Ingress Process Engine) module to obtain the forwarding destination and message editing information, and then stores and forwards the message through the BSR (Buffer Store Retrieve) module, and then edits the original message through the EPE (Egress Process Engine) module according to the editing information obtained by the IPE module. In the message editing process, the message needs to be edited or other actions need to be performed according to the attributes configured on the egress end.
在单芯片应用中,交换芯片非常容易地获取到出口端上配置的属性报文,报文编辑容易实现。In a single-chip application, the switching chip can easily obtain the attribute message configured on the egress end, and message editing is easy to implement.
在多芯片场景的应用中,例如堆叠系统中,多台堆叠成员设备虚拟成一台网络设备,报文需要从入口芯片(即报文的入口端所在芯片)进入,将报文通过芯片间的互联端口发送到报文的出口芯片(即报文的出口端所在芯片),同时将入口芯片上获取出的报文编辑信息携带到出口芯片上,在出口芯片上获取出口端上配置的属性以及携带过来的编辑信息对报文进行编辑。这种场景应用中,在出口芯片上必须全局分配和管理编辑资源,但这将会导致编辑资源管理比较复杂;另外,由于在出口芯片上进行报文编辑时需要将编辑信息携带到出口芯片上,这也会导致浪费芯片互联端口的带宽,甚至会造成网络堵塞的风险。In multi-chip scenario applications, such as stacking systems, multiple stacking member devices are virtualized into one network device, and the message needs to enter from the entry chip (that is, the chip where the message entry end is located), and send the message to the message exit chip (that is, the chip where the message exit end is located) through the interconnection port between chips. At the same time, the message editing information obtained from the entry chip is carried to the exit chip, and the attributes configured on the exit end and the edit information carried are obtained on the exit chip to edit the message. In this scenario application, editing resources must be globally allocated and managed on the exit chip, but this will make editing resource management more complicated; in addition, since the editing information needs to be carried to the exit chip when editing the message on the exit chip, this will also waste the bandwidth of the chip interconnection port and even cause the risk of network congestion.
发明内容Summary of the invention
本申请实施例提供一种报文处理方法、报文转发方法、装置及设备。The embodiments of the present application provide a message processing method, a message forwarding method, an apparatus and a device.
本申请的技术方案是这样实现的:The technical solution of this application is implemented as follows:
第一方面,提供了一种报文处理方法,应用于入口芯片,所述方法包括:In a first aspect, a message processing method is provided, which is applied to an ingress chip, and the method includes:
接收第一报文;receiving a first message;
根据所述第一报文的目的MAC地址,确定用于转发所述第一报文的出口端的端口号及用于编辑所述第一报文的编辑信息;Determine, according to the destination MAC address of the first message, a port number of an egress port for forwarding the first message and editing information for editing the first message;
根据所述出口端的端口号,获取所述出口端的属性信息;According to the port number of the export port, acquiring the attribute information of the export port;
根据所述属性信息及所述编辑信息,编辑所述第一报文的包头得到第二报文;其中,所述第二报文由所述入口芯片通过所述出口端转发到所述入口芯片所在的设备外。According to the attribute information and the editing information, the header of the first message is edited to obtain a second message; wherein the second message is forwarded by the ingress chip through the egress port to the outside of the device where the ingress chip is located.
上述技术方案中,所述方法还包括:In the above technical solution, the method further comprises:
标记所述第二报文;marking the second message;
将标记后的所述第二报文发送给所述入口芯片所在设备包含的出口芯片,其中,标记后的所述第二报文,用于所述出口芯片在不编辑报文的情况下从所述出口端向外转发。The marked second message is sent to the egress chip included in the device where the ingress chip is located, wherein the marked second message is used for the egress chip to forward outward from the egress end without editing the message.
上述技术方案中,所述根据所述出口端的端口号,获取所述出口端的属性信息,包括:In the above technical solution, obtaining the attribute information of the outlet port according to the port number of the outlet port includes:
根据所述出口端的端口号查询端口属性表,得到所述出口端的属性信息。The port attribute table is queried according to the port number of the egress port to obtain the attribute information of the egress port.
上述技术方案中,所述根据所述出口端的端口号,获取所述出口端的属性信息,包括:In the above technical solution, obtaining the attribute information of the outlet port according to the port number of the outlet port includes:
根据预设索引映射表中的芯片标识与索引区间信息之间的映射关系,获取所述出口端所在的出口芯片的芯片标识对应的索引区间信息;According to the mapping relationship between the chip identifier and the index interval information in the preset index mapping table, the index interval information corresponding to the chip identifier of the egress chip where the egress end is located is obtained;
根据所述索引区间信息,获取所述出口端对应的端口属性表的索引值;According to the index interval information, obtaining the index value of the port attribute table corresponding to the egress port;
从所述索引值对应的端口属性表中读取所述出口端的属性信息。The attribute information of the egress port is read from the port attribute table corresponding to the index value.
上述技术方案中,所述出口芯片的芯片标识对应的索引区间信息包括:所述出口芯片的芯片标识对应的端口属性表的基地址、所述出口芯片的最小端口号以及最大端口号。In the above technical solution, the index interval information corresponding to the chip identification of the egress chip includes: the base address of the port attribute table corresponding to the chip identification of the egress chip, the minimum port number and the maximum port number of the egress chip.
上述技术方案中,所述根据所述索引区间信息,获取所述出口端对应的端口属性表的索引值,包括:In the above technical solution, obtaining the index value of the port attribute table corresponding to the egress port according to the index interval information includes:
将所述出口端的端口号与所述最小端口号之间的差值确定为偏移量;Determine the difference between the port number of the egress port and the minimum port number as an offset;
根据所述偏移量以及所述端口属性表的基地址,确定所述出口端对应的端口属性表的索引值。An index value of the port attribute table corresponding to the egress port is determined according to the offset and a base address of the port attribute table.
上述技术方案中,所述根据所述属性信息及所述编辑信息,编辑所述第一报文的包头得到第二报文,包括:In the above technical solution, the step of editing the header of the first message to obtain the second message according to the attribute information and the editing information includes:
根据所述编辑信息编辑所述第一报文的三层包头;Editing the layer-3 header of the first message according to the editing information;
根据所述属性信息编辑所述第一报文的二层包头和/或三层包头。Edit the layer 2 header and/or layer 3 header of the first message according to the attribute information.
上述技术方案中,所述方法还包括:In the above technical solution, the method further comprises:
当所述属性信息和所述编辑信息对所述第一报文的三层包头的编辑操作冲突时,确定所述属性信息的优先级;When the attribute information and the editing information conflict in editing operations on the layer-3 header of the first message, determining the priority of the attribute information;
当所述属性信息的优先级高于所述编辑信息的优先级时,根据所述属性信息编辑所述第一报文的三层包头,否则根据所述编辑信息编辑所述三层包头。When the priority of the attribute information is higher than the priority of the editing information, the layer-3 header of the first message is edited according to the attribute information; otherwise, the layer-3 header is edited according to the editing information.
第二方面,提供了一种报文转发方法,应用于出口芯片,所述方法包括:In a second aspect, a message forwarding method is provided, which is applied to an egress chip, and the method includes:
从入口芯片接收报文;Receive messages from the ingress chip;
确定从所述入口芯片接收的报文是否为第二报文,其中,所述第二报文是:所述入口芯片编辑第一报文的包头得到的报文;Determine whether the message received from the entry chip is a second message, wherein the second message is: a message obtained by the entry chip editing a packet header of the first message;
当从所述入口芯片接收的报文是所述第二报文时,在不编辑所述第二报文的情况下通过所述出口端向外转发所述第二报文。When the message received from the ingress chip is the second message, the second message is forwarded outward through the egress port without editing the second message.
上述技术方案中,所述确定所述报文是否为编辑第一报文得到的第二报文,包括:In the above technical solution, the step of determining whether the message is a second message obtained by editing the first message includes:
确定从所述入口芯片接收的报文是否携带有已编辑标记;Determining whether the message received from the ingress chip carries an edited flag;
当所述从所述入口芯片接收的报文携带有已编辑标记时,确定从所述入口芯片接收的报文为所述第二报文。When the message received from the entry chip carries an edited mark, it is determined that the message received from the entry chip is the second message.
上述技术方案中,所述方法还包括:In the above technical solution, the method further comprises:
当从所述入口芯片接收的报文不是所述第二报文时,从所述入口芯片接收所述报文的编辑信息和从所述入口芯片接收的所述报文的出口端的属性信息;When the message received from the entry chip is not the second message, receiving editing information of the message from the entry chip and attribute information of the egress end of the message received from the entry chip;
根据所述编辑信息和所述属性信息,编辑从所述入口芯片接收的报文的包头;Editing a packet header of a message received from the ingress chip according to the editing information and the attribute information;
将包头被编辑后的所述报文通过所述出口端转发到所述出口芯片所在的设备外。The message with the edited packet header is forwarded through the egress port to the outside of the device where the egress chip is located.
第三方面,提供了一种报文处理装置,应用于入口芯片,所述装置包括:In a third aspect, a message processing device is provided, which is applied to an ingress chip, and the device includes:
接收模块,用于接收第一报文;A receiving module, used for receiving a first message;
确定模块,用于根据所述第一报文的目的MAC地址,确定用于转发所述第一报文的出口端的端口号及用于编辑所述第一报文的编辑信息;A determination module, used to determine the port number of the egress port for forwarding the first message and the editing information for editing the first message according to the destination MAC address of the first message;
获取模块,用于根据所述出口端的端口号,获取所述出口端的属性信息;An acquisition module, used for acquiring attribute information of the export port according to the port number of the export port;
编辑模块,用于根据所述属性信息及所述编辑信息,编辑所述第一报文的包头得到第二报文;其中,所述第二报文由所述入口芯片通过所述出口端转发到所述入口芯片所在的设备外。An editing module is used to edit the packet header of the first message to obtain a second message according to the attribute information and the editing information; wherein the second message is forwarded by the ingress chip through the egress port to the outside of the device where the ingress chip is located.
第四方面,提供了一种报文转发装置,应用于出口芯片,所述装置包括:In a fourth aspect, a message forwarding device is provided, which is applied to an egress chip, and the device includes:
接收模块,用于从入口芯片接收报文;A receiving module, used for receiving messages from an ingress chip;
确定模块,用于确定从所述入口芯片接收的报文是否为第二报文,其中,所述第二报文是:所述入口芯片编辑第一报文的包头得到的报文;A determination module, used to determine whether the message received from the entry chip is a second message, wherein the second message is: a message obtained by the entry chip editing the packet header of the first message;
发送模块,用于当从所述入口芯片接收的报文是所述第二报文时,在不编辑所述第二报文的情况下通过所述出口端向外转发所述第二报文。A sending module is used for forwarding the second message outward through the egress port without editing the second message when the message received from the ingress chip is the second message.
第五方面,提供了一种电子装置,包括存储器和处理器,其特征在于,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行第一方面所述的报文处理方法;或者,所述处理器被设置为运行所述计算机程序以执行第二方面所述的报文转发方法。In the fifth aspect, an electronic device is provided, comprising a memory and a processor, characterized in that a computer program is stored in the memory, and the processor is configured to run the computer program to execute the message processing method described in the first aspect; or, the processor is configured to run the computer program to execute the message forwarding method described in the second aspect.
第六方面,提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行第一方面所述的报文处理方法;或者,所述处理器被设置为运行所述计算机程序以执行第二方面所述的报文转发方法。In a sixth aspect, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the message processing method described in the first aspect when running; or, the processor is configured to run the computer program to execute the message forwarding method described in the second aspect.
本申请实施例所提供的一种报文处理方法、报文转发方法、装置及设备,报文处理方法应用于入口芯片,通过接收第一报文,根据第一报文的目的MAC地址,确定用于转发第一报文的出口端的端口号及用于编辑第一报文的编辑信息;根据出口端的端口号,获取出口端的属性信息;根据属性信息及编辑信息,编辑第一报文的包头得到第二报文;其中,第二报文由入口芯片通过出口端转发到入口芯片所在的设备外。由此,使得报文的所有编辑动作都可以在报文的入口芯片上完成,而无需在报文的出口芯片上对报文进行编辑,这样就不需要将入口芯片上获取出的报文编辑信息携带到出口芯片上,从而解决了相关技术中在出口芯片上实现报文编辑而导致管理编辑资源复杂的问题以及浪费芯片互联端口的带宽的问题,降低了编辑资源管理的复杂度,同时也可以大大地节省芯片互联端口的带宽。The embodiment of the present application provides a message processing method, a message forwarding method, a device and an apparatus. The message processing method is applied to an inlet chip. By receiving a first message, the port number of the outlet for forwarding the first message and the editing information for editing the first message are determined according to the destination MAC address of the first message; the attribute information of the outlet is obtained according to the port number of the outlet; the packet header of the first message is edited according to the attribute information and the editing information to obtain a second message; wherein the second message is forwarded by the inlet chip through the outlet to the outside of the device where the inlet chip is located. As a result, all editing actions of the message can be completed on the inlet chip of the message without editing the message on the outlet chip of the message. In this way, it is not necessary to carry the message editing information obtained on the inlet chip to the outlet chip, thereby solving the problem of complex management of editing resources and wasting the bandwidth of the chip interconnection port caused by implementing message editing on the outlet chip in the related technology, reducing the complexity of editing resource management, and also greatly saving the bandwidth of the chip interconnection port.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请实施例提供的报文处理方法的一个流程图;FIG1 is a flow chart of a message processing method provided in an embodiment of the present application;
图2是本申请实施例提供的报文处理方法的另一个流程图;FIG2 is another flow chart of the message processing method provided in an embodiment of the present application;
图3是本申请实施例提供的获取出口端的属性信息的流程图;3 is a flow chart of obtaining attribute information of an export terminal provided in an embodiment of the present application;
图4是本申请实施例提供的报文转发方法的一个流程图;FIG4 is a flow chart of a message forwarding method provided in an embodiment of the present application;
图5是本申请实施例提供的报文转发方法的另一个流程图;FIG5 is another flow chart of the message forwarding method provided in an embodiment of the present application;
图6是本申请实施例提供的报文处理以及报文转发方法的流程图;FIG6 is a flow chart of a method for message processing and message forwarding provided in an embodiment of the present application;
图7是本申请实施例提供的全局端口索引映射表及出口属性表的示意图;7 is a schematic diagram of a global port index mapping table and an egress attribute table provided in an embodiment of the present application;
图8是本申请实施例提供的报文处理装置的一个结构示意图;FIG8 is a schematic diagram of the structure of a message processing device provided in an embodiment of the present application;
图9是本申请实施例提供的报文转发装置的一个结构示意图;FIG9 is a schematic diagram of the structure of a message forwarding device provided in an embodiment of the present application;
图10是本申请实施例提供的电子装置的结构示意图。FIG. 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
为使本申请的目的、技术方案和优点更加清楚明白,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily. The steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. In addition, although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
需要说明的是,除非上下文明确要求,否则整个说明书和权利要求书中的“包括”、“包含”等类似词语应当解释为包含的含义而不是排他或穷举的含义;也就是说,是“包括但不限于”的含义。It should be noted that, unless the context clearly requires otherwise, words such as “include”, “including” and similar words throughout the specification and claims should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is “including but not limited to”.
此外,在本申请的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。此外,在本申请的描述中,除非另有说明,“多个”的含义是两个或两个以上。In addition, in the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise specified, the meaning of "plurality" is two or more.
本申请实施例提供一种报文处理方法,该报文处理方法可以应用于报文的入口芯片,该芯片可以是特定用途集成电路(Application Specific Integrated Circuit,简称为ASIC)芯片,或现场可编程门阵列(Field Programmable Gata Array,简称为FPGA)芯片,或NP等,可以根据实际情况进行相应的调整。其中,入口芯片包括:入方向处理引擎IPE、存储转发模块BSR和出方向处理引擎EPE。The embodiment of the present application provides a message processing method, which can be applied to the inlet chip of the message, and the chip can be an application-specific integrated circuit (ASIC) chip, or a field programmable gate array (FPGA) chip, or NP, etc., and can be adjusted accordingly according to actual conditions. Among them, the inlet chip includes: an inbound processing engine IPE, a storage and forwarding module BSR, and an outbound processing engine EPE.
如图1所示,本申请实施例提供一种报文处理方法,应用于入口芯片,该方法可以包括步骤:As shown in FIG1 , an embodiment of the present application provides a message processing method, which is applied to an ingress chip. The method may include the following steps:
S11、接收第一报文。S11. Receive a first message.
这里,第一报文是泛指接收到的任一报文。Here, the first message refers to any received message.
具体地,第一报文经入口端口进入入口芯片后,通过入口芯片的入方向处理引擎模块接收第一报文。Specifically, after the first message enters the ingress chip through the ingress port, the first message is received by the ingress processing engine module of the ingress chip.
S12、根据第一报文的目的MAC地址,确定用于转发第一报文的出口端的端口号及用于编辑第一报文的编辑信息。S12: Determine, according to the destination MAC address of the first message, the port number of the egress port for forwarding the first message and the editing information for editing the first message.
其中,出口端用于将报文转发到入口芯片所在的设备外,报文的编辑信息包括对报文的编辑操作,编辑操作包括但不限于:删除、添加、修改和/或替换等。The egress port is used to forward the message to a device outside the ingress chip. The message editing information includes editing operations on the message. The editing operations include but are not limited to: deletion, addition, modification and/or replacement.
具体地,可以通过入口芯片的IPE根据第一报文中的目的MAC地址,在转发表进行查找该目的MAC地址对应的出端口的端口号,获得转发第一报文的出口端的端口号、出口芯片的芯片标识及第一报文的编辑信息索引值,得到查找结果,并将查找结果与第一报文通过入口芯片的BSR转发至入口芯片的EPE。Specifically, the IPE of the ingress chip can search the port number of the egress port corresponding to the destination MAC address in the forwarding table according to the destination MAC address in the first message, obtain the port number of the egress end for forwarding the first message, the chip identifier of the egress chip and the editing information index value of the first message, obtain the search result, and forward the search result and the first message to the EPE of the ingress chip through the BSR of the ingress chip.
其中,转发表中包含两个重要的信息:编辑信息索引值和出口信息,编辑信息索引值用于索引到对应的转发下一跳,得到第一报文的编辑信息,编辑信息索引值可以使用nexthopPtr(即,下一跳索引值)来表示,nexthopPtr用来索引DsNextHop进行获取报文编辑信息。出口信息包括目的MAC地址对应的出端口的端口号以及出口端所在的出口芯片的芯片标识,这里,芯片的芯片标识是一个全局标识,可以唯一标识一个芯片。Among them, the forwarding table contains two important information: the editing information index value and the export information. The editing information index value is used to index the corresponding forwarding next hop to obtain the editing information of the first message. The editing information index value can be represented by nexthopPtr (i.e., the next hop index value). NexthopPtr is used to index DsNextHop to obtain the message editing information. The export information includes the port number of the export port corresponding to the destination MAC address and the chip identifier of the export chip where the export port is located. Here, the chip identifier of the chip is a global identifier that can uniquely identify a chip.
其中,编辑信息可以包括二层头部编辑信息和/或三层头部编辑信息。The editing information may include layer 2 header editing information and/or layer 3 header editing information.
二层头部编辑信息包括:目的MAC地址、源MAC地址、内层VLAN(Virtual LocalArea Network,虚拟局域网)头部、外层VLAN头部中的至少一个的编辑信息。The layer 2 header editing information includes: editing information of at least one of a destination MAC address, a source MAC address, an inner VLAN (Virtual Local Area Network) header, and an outer VLAN header.
三层头部编辑信息包括但不限于:IPv4(Internet Protocol Version 4,因特网协议第四版)、IPv6(Internet Protocol Version 6,因特网协议第六版)及ARP(AddressResolution Protocol,地址解析协议)报文的编辑信息。The layer 3 header editing information includes, but is not limited to, editing information of IPv4 (Internet Protocol Version 4), IPv6 (Internet Protocol Version 6) and ARP (Address Resolution Protocol) messages.
IPv4报文的编辑信息包括但不限于:IPv4报文的协议字段、TTL(Time To Live,生存时间)、ECN(Explicit Congestion Notification,显式拥塞通知协议)、DSCP(Differentiated Services Code Point,差分服务代码点)、目的IP地址和源IP地址的编辑信息。The edited information of the IPv4 message includes, but is not limited to: the edited information of the protocol field, TTL (Time To Live), ECN (Explicit Congestion Notification), DSCP (Differentiated Services Code Point), destination IP address and source IP address of the IPv4 message.
IPv6报文的编辑信息包括但不限于:IPv6报文的流标签、协议字段、TTL、ECN、DSCP、目的IP地址和源IP地址的编辑信息。The edited information of the IPv6 message includes, but is not limited to, the edited information of the flow label, protocol field, TTL, ECN, DSCP, destination IP address, and source IP address of the IPv6 message.
ARP报文的编辑信息包括但不限于:ARP报文的目的端协议地址、目的端硬件地址、发送端协议地址、发送端硬件地址、协议类型和硬件类型。The edited information of the ARP message includes, but is not limited to: the destination protocol address of the ARP message, the destination hardware address, the sender protocol address, the sender hardware address, the protocol type, and the hardware type.
S13、根据出口端的端口号,获取出口端的属性信息。S13. Obtain attribute information of the exit port according to the port number of the exit port.
其中,出口端的属性信息包括二层头部编辑信息和/或三层头部编辑信息,二层头部编辑信息例如为:内层VLAN头部、外层VLAN头部中的vlan标签的处理规则,用于对第一报文携带的vlan标签进行相应的编辑,这里,虚拟局域网标签处理规则包括插入、删除,更改或替换;例如,是否剥掉报文携带的虚拟局域网vlan标签、端口上默认vlan值等等;三层头部编辑信息例如为:DSCP、目的IP地址和源IP地址的编辑信息等等。Among them, the attribute information at the exit end includes layer 2 header editing information and/or layer 3 header editing information. The layer 2 header editing information is, for example: processing rules for vlan tags in the inner VLAN header and the outer VLAN header, which are used to edit the vlan tag carried by the first message accordingly. Here, the virtual LAN tag processing rules include insertion, deletion, change or replacement; for example, whether to strip off the virtual LAN vlan tag carried by the message, the default vlan value on the port, etc.; the layer 3 header editing information is, for example: editing information of DSCP, destination IP address and source IP address, etc.
具体地,通过入口芯片的EPE接收BSR转发的第一报文的查找结果,根据查找结果中的编辑信息索引值索引到对应的转发下一跳,得到第一报文的编辑信息。Specifically, the EPE of the ingress chip receives the search result of the first message forwarded by the BSR, and indexes to the corresponding forwarding next hop according to the editing information index value in the search result to obtain the editing information of the first message.
S14、根据属性信息及编辑信息,编辑第一报文的包头得到第二报文;其中,第二报文由入口芯片通过出口端转发到入口芯片所在的设备外。S14. Edit the header of the first message to obtain a second message according to the attribute information and the editing information; wherein the second message is forwarded by the ingress chip through the egress port to the outside of the device where the ingress chip is located.
具体地,通过入口芯片的EPE根据属性信息及编辑信息,编辑第一报文的包头得到第二报文。Specifically, the EPE of the ingress chip edits the header of the first message according to the attribute information and the editing information to obtain the second message.
上述报文处理方法应用于入口芯片,通过接收第一报文,根据第一报文的目的MAC地址,确定用于转发第一报文的出口端的端口号及用于编辑第一报文的编辑信息;根据出口端的端口号,获取出口端的属性信息;根据属性信息及编辑信息,编辑第一报文的包头得到第二报文;其中,第二报文由入口芯片通过出口端转发到入口芯片所在的设备外。由此,使得报文的所有编辑动作都可以在报文的入口芯片上完成,而无需在报文的出口芯片上对报文进行编辑,这样就不需要将入口芯片上获取出的报文编辑信息携带到出口芯片上,从而解决了相关技术中在出口芯片上实现报文编辑而导致管理编辑资源复杂的问题以及浪费芯片互联端口的带宽的问题,降低了编辑资源管理的复杂度,同时也可以大大地节省芯片互联端口的带宽。The above-mentioned message processing method is applied to the inlet chip, by receiving the first message, and determining the port number of the outlet for forwarding the first message and the editing information for editing the first message according to the destination MAC address of the first message; obtaining the attribute information of the outlet according to the port number of the outlet; editing the packet header of the first message to obtain the second message according to the attribute information and the editing information; wherein the second message is forwarded by the inlet chip through the outlet to the outside of the device where the inlet chip is located. As a result, all editing actions of the message can be completed on the inlet chip of the message, without the need to edit the message on the outlet chip of the message, so that there is no need to carry the message editing information obtained on the inlet chip to the outlet chip, thereby solving the problem of complex management of editing resources and wasting the bandwidth of the chip interconnection port caused by implementing message editing on the outlet chip in the related technology, reducing the complexity of editing resource management, and at the same time can greatly save the bandwidth of the chip interconnection port.
在一个实施例中,如图2所示,基于图1,方法还可以包括:In one embodiment, as shown in FIG. 2 , based on FIG. 1 , the method may further include:
S15、标记第二报文。S15. Mark the second message.
具体地,通过入口芯片的EPE对第二报文标记出已编辑标记,该已编辑标记可以是一个bypass的nexthhopPtr(带有跳过标记的下一跳索引值),以指示第二报文的出口芯片对第二报文跳过执行索引到对应的转发下一跳,即跳过读取报文编辑信息。Specifically, the EPE of the ingress chip marks the second message with an edited mark, which can be a bypass nexthopPtr (next hop index value with a skip mark) to instruct the egress chip of the second message to skip executing the index to the corresponding forwarding next hop for the second message, that is, skip reading the message editing information.
S16、将标记后的第二报文发送给入口芯片所在设备包含的出口芯片,其中,标记后的第二报文,用于出口芯片在不编辑报文的情况下从出口端向外转发。S16. Send the marked second message to the egress chip included in the device where the ingress chip is located, wherein the marked second message is used for the egress chip to forward outward from the egress end without editing the message.
这里,报文的入口芯片与报文的出口芯片互联可以虚拟成一台网络设备,出口芯片与入口芯片之间具有互联端口。Here, the ingress chip of the message and the egress chip of the message are interconnected and can be virtually formed into a network device, and there is an interconnection port between the egress chip and the ingress chip.
具体地,入口芯片的EPE通过芯片互联端口将携带已编辑标记的第二报文发送至出口端所在的出口芯片上。Specifically, the EPE of the ingress chip sends the second message carrying the edited mark to the egress chip where the egress port is located through the chip interconnection port.
本实施例中,通过将标记后的第二报文发送给出口芯片,由于标记后的第二报文,用于出口芯片在不编辑报文的情况下从出口端向外转发,这样就不需要出口芯片对第二报文进行编辑而直接将第二报文从出口端向外转发,从而也无需将入口芯片上获取出的报文编辑信息携带到出口芯片上,从而能够降低出口芯片对编辑资源管理的复杂度,同时也可以大大地节省芯片互联端口的带宽。In this embodiment, the marked second message is sent to the egress chip. Since the marked second message is used for the egress chip to forward it outward from the egress end without editing the message, there is no need for the egress chip to edit the second message and the second message can be directly forwarded outward from the egress end. There is no need to carry the message editing information obtained from the ingress chip to the egress chip, thereby reducing the complexity of the egress chip's management of editing resources and greatly saving the bandwidth of the chip interconnection port.
在一个实施例中,步骤S13中,根据出口端的端口号,获取出口端的属性信息,该过程可以包括:In one embodiment, in step S13, the attribute information of the egress port is obtained according to the port number of the egress port. The process may include:
根据出口端的端口号查询端口属性表,得到出口端的属性信息。The port attribute table is queried according to the port number of the egress port to obtain the attribute information of the egress port.
其中,端口属性表预先存储在入口芯片上,且记录有不同端口的属性信息。The port attribute table is pre-stored on the ingress chip and records the attribute information of different ports.
在一个示例中,出口端的端口号可以是一个全局标识,全局标识能够唯一标识一个端口,例如,对于分别有10个端口的芯片A和芯片B,芯片A的端口可以标识为端口1至端口10,芯片B的端口可以标识为端口11至端口20。In one example, the port number of the egress port may be a global identifier that can uniquely identify a port. For example, for chip A and chip B each having 10 ports, the ports of chip A may be identified as port 1 to port 10, and the ports of chip B may be identified as port 11 to port 20.
具体实施中,可以根据出口端的全局标识查询端口属性表,得到出口端的属性信息。In a specific implementation, the port attribute table may be queried according to the global identifier of the egress port to obtain the attribute information of the egress port.
在另一个示例中,出口端的端口号用于唯一标识一个芯片上的端口。In another example, the port number of the egress port is used to uniquely identify the port on a chip.
具体实施中,可以通过根据出口端的端口号以及出口端所在的出口芯片的芯片标识,在出口芯片的端口属性表中进行查询,得到出口端的属性信息。In a specific implementation, the attribute information of the egress port can be obtained by querying the port attribute table of the egress chip according to the port number of the egress port and the chip identifier of the egress chip where the egress port is located.
在一个实施例中,如图3所示,步骤S13中,根据出口端的端口号,获取出口端的属性信息,该过程可以包括:In one embodiment, as shown in FIG3 , in step S13, the attribute information of the egress port is obtained according to the port number of the egress port. The process may include:
S131、根据预设索引映射表中的芯片标识与索引区间信息之间的映射关系,获取出口端所在的出口芯片的芯片标识对应的索引区间信息。S131. According to the mapping relationship between the chip identifier and the index interval information in the preset index mapping table, obtain the index interval information corresponding to the chip identifier of the egress chip where the egress end is located.
其中,预设索引映射表可以为预先存储在第一芯片内的全局端口索引映射表,预设索引映射表中的不同芯片标识对应的索引区间信息不同。The preset index mapping table may be a global port index mapping table pre-stored in the first chip, and different chip identifiers in the preset index mapping table may correspond to different index interval information.
具体地,可以基于出口芯片的芯片标识对预设索引映射表进行索引,得到出口芯片的芯片标识对应的索引区间信息。Specifically, the preset index mapping table may be indexed based on the chip identifier of the egress chip to obtain index interval information corresponding to the chip identifier of the egress chip.
S132、根据索引区间信息,获取出口端对应的端口属性表的索引值。S132: Obtain an index value of the port attribute table corresponding to the egress port according to the index interval information.
其中,出口芯片的芯片标识对应的索引区间信息可以包括:出口芯片的芯片标识对应的端口属性表的基地址、出口芯片的最小端口号以及最大端口号。这里,端口属性表可以为预先存储在入口芯片内的全局端口属性表,端口属性表存放有与报文编辑相关的端口信息,例如是否剥掉vlan标签、默认vlan标签值,等等。The index interval information corresponding to the chip identifier of the egress chip may include: the base address of the port attribute table corresponding to the chip identifier of the egress chip, the minimum port number of the egress chip, and the maximum port number. Here, the port attribute table may be a global port attribute table pre-stored in the ingress chip, and the port attribute table stores port information related to message editing, such as whether to strip off the vlan tag, the default vlan tag value, and so on.
可以理解的是,出口芯片的芯片标识对应的索引区间信息还可以包括出口芯片的不同端口对应的索引值,端口的索引值可以用于获取端口的属性信息。It can be understood that the index interval information corresponding to the chip identifier of the egress chip may also include index values corresponding to different ports of the egress chip, and the index value of the port may be used to obtain attribute information of the port.
在一个示例中,该过程可以包括:In one example, the process may include:
将出口端的端口号与最小端口号之间的差值确定为偏移量,根据偏移量以及端口属性表的基地址,确定出口端对应的端口属性表的索引值。The difference between the port number of the egress port and the minimum port number is determined as an offset, and the index value of the port attribute table corresponding to the egress port is determined according to the offset and the base address of the port attribute table.
具体地,可以按照公式计算得到出端口对应的全局端口属性表的索引值,该公式为:索引值=全局端口属性表的基地址+出端口号-最小端口号。Specifically, the index value of the global port attribute table corresponding to the egress port can be calculated according to the formula: index value=base address of the global port attribute table+egress port number-minimum port number.
在计算得到索引值后,可以基于索引值获取出端口的属性信息。After the index value is calculated, the attribute information of the egress port can be obtained based on the index value.
可选地,在步骤S132之前,方法还可以包括:Optionally, before step S132, the method may further include:
根据索引区间信息中的最大端口号和最小端口号,判断出口端的端口号是否有效,如果端口号有效,则执行步骤S132,如果端口号无效则丢弃第一报文,其中,有效的端口号介于最小端口号和最大端口号之间。According to the maximum port number and the minimum port number in the index interval information, determine whether the port number of the exit port is valid. If the port number is valid, execute step S132. If the port number is invalid, discard the first message, wherein the valid port number is between the minimum port number and the maximum port number.
S133、从索引值对应的端口属性表中读取出口端的属性信息。S133. Read the attribute information of the egress port from the port attribute table corresponding to the index value.
本实施例中,通过预设索引映射表获取出口芯片的芯片标识对应的索引区间信息,并根据索引区间信息,获取出口端对应的端口属性表的索引值,从索引值对应的端口属性表中读取出口端的属性信息,实现了在入口芯片获取到出口端的属性信息,且能够快速获取到出口端属性信息;另外,由于出口属性表并不是固定分配的,而是以全局芯片ID作为索引,得到出口属性表的范围,因此可以实现每个芯片动态灵活分配。In this embodiment, the index interval information corresponding to the chip identifier of the egress chip is obtained through a preset index mapping table, and based on the index interval information, the index value of the port attribute table corresponding to the egress port is obtained, and the attribute information of the egress port is read from the port attribute table corresponding to the index value, thereby achieving the acquisition of the attribute information of the egress port at the ingress chip, and being able to quickly acquire the attribute information of the egress port; in addition, since the egress attribute table is not fixedly allocated, but uses the global chip ID as an index to obtain the range of the egress attribute table, dynamic and flexible allocation of each chip can be achieved.
在一个实施例中,上述步骤S14中,根据属性信息及编辑信息,编辑第一报文的包头得到第二报文,可以包括:In one embodiment, in the above step S14, editing the header of the first message to obtain the second message according to the attribute information and the editing information may include:
根据编辑信息编辑第一报文的三层包头,根据属性信息编辑第一报文的二层包头和/或三层包头。The layer-3 header of the first message is edited according to the editing information, and the layer-2 header and/or layer-3 header of the first message is edited according to the attribute information.
具体地,根据编辑信息中的二层头部编辑信息编辑第一报文的二层包头,根据编辑信息中的三层头部编辑信息编辑第一报文的三层包头,根据属性信息编辑第一报文的二层包头,将编辑后的第一报文确定为第二报文。Specifically, edit the layer 2 header of the first message according to the layer 2 header editing information in the editing information, edit the layer 3 header of the first message according to the layer 3 header editing information in the editing information, edit the layer 2 header of the first message according to the attribute information, and determine the edited first message as the second message.
具体实施时,可以根据目的MAC地址、源MAC地址、内层VLAN头部、外层VLAN头部中的至少一个的编辑信息,编辑第一报文的二层包头;根据IPv4、IPv6及ARP报文中的一个的编辑信息,编辑第一报文的三层包头;根据属性信息包括的虚拟局域网vlan标签处理规则,编辑第一报文的二层包头,使编辑后的第一报文具备出端口的虚拟局域网标签。In specific implementation, the layer 2 header of the first message can be edited according to the editing information of at least one of the destination MAC address, the source MAC address, the inner VLAN header, and the outer VLAN header; the layer 3 header of the first message can be edited according to the editing information of one of the IPv4, IPv6 and ARP messages; the layer 2 header of the first message can be edited according to the virtual LAN VLAN tag processing rules included in the attribute information, so that the edited first message has the virtual LAN tag of the outgoing port.
在一个实施例中,方法还可以包括:In one embodiment, the method may further include:
当属性信息和编辑信息对第一报文的三层包头的编辑操作冲突时,确定属性信息的优先级,当属性信息的优先级高于编辑信息的优先级时,根据属性信息编辑第一报文的三层包头,否则根据编辑信息编辑三层包头。When the editing operations of the three-layer header of the first message by the attribute information and the editing information conflict, the priority of the attribute information is determined. When the priority of the attribute information is higher than the priority of the editing information, the three-layer header of the first message is edited according to the attribute information; otherwise, the three-layer header is edited according to the editing information.
其中,可以根据实际应用需求对属性信息与编辑信息对报文的编辑操作分别设置对应的优先级,例如,设置属性信息的优先级高于编辑信息的优先级,此时,根据属性信息编辑第一报文的二层包头,但本申请实施例不限于此。Among them, corresponding priorities can be set for the editing operations of the attribute information and the editing information on the message according to actual application requirements. For example, the priority of the attribute information is set higher than the priority of the editing information. At this time, the second layer header of the first message is edited according to the attribute information, but the embodiments of the present application are not limited to this.
本实施例中,可以存在属性信息和编辑信息均对第一报文的三层包头进行编辑操作的情形,通过确定属性信息的优先级高于编辑信息的优先级时,根据属性信息的优先级编辑第一报文的二层包头,从而能够确保第一报文能够被正常编辑。In this embodiment, there may be a situation where both the attribute information and the editing information perform editing operations on the third-layer header of the first message. By determining that the priority of the attribute information is higher than the priority of the editing information, the second-layer header of the first message is edited according to the priority of the attribute information, thereby ensuring that the first message can be edited normally.
基于上述实施例提供的报文处理方法,本申请实施例还提供一种报文转发方法,该方法应用于报文的出口芯片,该芯片可以是特定用途集成电路(Application SpecificIntegrated Circuit,简称为ASIC)芯片,或现场可编程门阵列(Field Programmable GataArray,简称为FPGA)芯片,或NP等,可以根据实际情况进行相应的调整。其中,出口芯片包括:入方向处理引擎IPE、存储转发模块BSR和出方向处理引擎EPE。Based on the message processing method provided in the above embodiment, the embodiment of the present application also provides a message forwarding method, which is applied to the egress chip of the message, which can be an application-specific integrated circuit (ASIC) chip, or a field programmable gate array (FPGA) chip, or NP, etc., which can be adjusted accordingly according to actual conditions. Among them, the egress chip includes: an inbound processing engine IPE, a storage and forwarding module BSR, and an outbound processing engine EPE.
如图4所示,本申请实施例提供一种报文转发方法,应用于出口芯片,该方法可以包括步骤:As shown in FIG4 , an embodiment of the present application provides a message forwarding method, which is applied to an egress chip. The method may include the following steps:
S21、从入口芯片接收报文。S21. Receive a message from an ingress chip.
具体地,通过入口芯片与出口芯片之间的芯片互联端口将报文从入口芯片发送至出口芯片,入口报文在到达出口芯片后,通过出口芯片的入方向处理引擎IPE接收报文,并将报文通过出口芯片的BSR转发至出口芯片的EPE。Specifically, the message is sent from the ingress chip to the egress chip through the chip interconnection port between the ingress chip and the egress chip. After the ingress message reaches the egress chip, the message is received by the ingress processing engine IPE of the egress chip and forwarded to the EPE of the egress chip through the BSR of the egress chip.
S22、确定从入口芯片接收的报文是否为第二报文,其中,第二报文是:入口芯片编辑第一报文的包头得到的报文。S22. Determine whether the message received from the ingress chip is a second message, wherein the second message is: a message obtained by the ingress chip editing the packet header of the first message.
具体地,通过出口芯片的EPE确定从入口芯片接收的报文是否为第二报文。Specifically, the EPE of the egress chip determines whether the message received from the ingress chip is the second message.
在一个示例中,该过程可以包括:In one example, the process may include:
可以确定从入口芯片接收的报文是否携带有已编辑标记,当从入口芯片接收的报文携带有已编辑标记时,确定从入口芯片接收的报文为第二报文。It may be determined whether the message received from the ingress chip carries an edited mark. When the message received from the ingress chip carries the edited mark, it is determined that the message received from the ingress chip is the second message.
S23、当从入口芯片接收的报文是第二报文时,在不编辑第二报文的情况下通过出口端向外转发第二报文。S23: When the message received from the ingress chip is the second message, forward the second message outward through the egress port without editing the second message.
具体地,通过出口芯片的EPE确定到报文为第二报文时,将报文直接通过出口端向外转发。Specifically, when the EPE of the egress chip determines that the message is the second message, the message is directly forwarded outward through the egress port.
上述报文转发方法应用于出口芯片,通过从入口芯片接收报文,确定从入口芯片接收的报文是否为第二报文,其中,第二报文是:入口芯片编辑第一报文的包头得到的报文;当从入口芯片接收的报文是第二报文时,在不编辑第二报文的情况下通过出口端向外转发第二报文。由于报文的所有编辑动作都可以在报文的入口芯片上完成,当出口芯片确定出从入口芯片接收的报文是入口芯片编辑第一报文的包头得到的第二报文后,出口芯片无需再通过从入口芯片获取编辑信息对报文进行编辑,而将报文通过出口端转发到出口芯片所在的设备外即可,解决了相关技术中在出口芯片上实现报文编辑而导致管理编辑资源复杂的问题以及浪费芯片互联端口的带宽的问题,从而降低了编辑资源管理的复杂度,同时也可以大大地节省芯片互联端口的带宽。The above-mentioned message forwarding method is applied to the egress chip, and by receiving a message from the ingress chip, it is determined whether the message received from the ingress chip is a second message, wherein the second message is: a message obtained by editing the header of the first message by the ingress chip; when the message received from the ingress chip is the second message, the second message is forwarded outward through the egress port without editing the second message. Since all editing actions of the message can be completed on the ingress chip of the message, when the egress chip determines that the message received from the ingress chip is the second message obtained by editing the header of the first message by the ingress chip, the egress chip no longer needs to edit the message by obtaining the editing information from the ingress chip, but forwards the message to the outside of the device where the egress chip is located through the egress port, which solves the problem of complex management of editing resources and waste of bandwidth of chip interconnection ports caused by implementing message editing on the egress chip in the related technology, thereby reducing the complexity of editing resource management, and can also greatly save the bandwidth of chip interconnection ports.
在一个实施例中,如图5所示,基于图4,方法还可以包括:In one embodiment, as shown in FIG5 , based on FIG4 , the method may further include:
S24、当从入口芯片接收的报文不是第二报文时,从入口芯片接收报文的编辑信息和从入口芯片接收的报文的出口端的属性信息。S24. When the message received from the ingress chip is not the second message, edit information of the message received from the ingress chip and attribute information of the egress end of the message received from the ingress chip.
具体地,通过出口芯片的入方向处理引擎IPE接收报文的编辑信息以及出口端的属性信息,并将编辑信息及属性信息通过出口芯片的BSR转发至出口芯片的EPE。Specifically, the inbound processing engine IPE of the egress chip receives the editing information of the message and the attribute information of the egress end, and forwards the editing information and the attribute information to the EPE of the egress chip through the BSR of the egress chip.
S25、根据编辑信息和属性信息,编辑从入口芯片接收的报文的包头。S25. Edit the packet header of the message received from the ingress chip according to the editing information and the attribute information.
具体地,通过出口芯片的EPE根据编辑信息和属性信息,编辑从入口芯片接收的报文的包头。Specifically, the EPE of the egress chip edits the packet header of the message received from the ingress chip according to the editing information and the attribute information.
其中,该步骤的实现过程可参照上述实施例中的步骤S14,此处不再赘述。The implementation process of this step may refer to step S14 in the above embodiment, which will not be described in detail here.
S26、将包头被编辑后的报文通过出口端转发到出口芯片所在的设备外。S26. Forward the message with the edited packet header through the egress port to the outside of the device where the egress chip is located.
本实施例中,当从入口芯片接收的报文不是编辑后的报文时,可以根据从入口芯片接收的报文的编辑信息以及报文的出口端的属性信息,在出口芯片上进行报文的编辑操作。In this embodiment, when the message received from the ingress chip is not an edited message, the message editing operation can be performed on the egress chip according to the editing information of the message received from the ingress chip and the attribute information of the egress end of the message.
下面结合图6,以堆叠系统为例,对入口芯片的报文处理流程以及出口芯片的报文转发流程进行示例说明。其中,堆叠系统包括堆叠的入口芯片和出口芯片,相堆叠的两个芯片中其中一个定义为入口芯片,则与之相连的位于其下游的芯片则对应定义为出口芯片。In conjunction with Figure 6, the stacking system is used as an example to illustrate the message processing process of the ingress chip and the message forwarding process of the egress chip. The stacking system includes stacked ingress chips and egress chips, and one of the two stacked chips is defined as an ingress chip, and the chip connected to it and located downstream thereof is correspondingly defined as an egress chip.
如图6所示,入口芯片的报文处理流程如下:As shown in Figure 6, the message processing flow of the ingress chip is as follows:
1、报文从网络端口进入入口芯片后,入口芯片的IPE模块通过查找转发表得到destPort和nexthopPtr,其中,destPort表示目的出口信息,目的出口信息包括出口芯片的CHIP ID以及出口端口号,nexthopPtr用来索引DsNextHop获取报文编辑信息;1. After the message enters the ingress chip from the network port, the IPE module of the ingress chip obtains destPort and nexthopPtr by searching the forwarding table. Among them, destPort represents the destination egress information, which includes the CHIP ID and egress port number of the egress chip. NexthopPtr is used to index DsNextHop to obtain the message editing information.
2、报文通过BSR模块进行存储,并将报文、destPort和nexthopPtr送到EPE模块进行报文的编辑;2. The message is stored by the BSR module, and the message, destPort and nexthopPtr are sent to the EPE module for editing;
3、在EPE模块,通过nexthopPtr读取DsNexthop表,获取报文的编辑信息,当检测到出口端所在的芯片不是本地芯片(即出口的CHIP ID和本地CHIP ID不相等)时,根据destPort中CHIP ID进行索引得到全局端口索引映射表,全局端口索引映射表中保存有全局出口属性表的基地址以及最大端口号和最小端口号;其中,全局端口索引映射表以及出口属性表可以参照图7所示。3. In the EPE module, the DsNexthop table is read through nexthopPtr to obtain the editing information of the message. When it is detected that the chip where the export port is located is not a local chip (that is, the export CHIP ID and the local CHIP ID are not equal), the global port index mapping table is obtained by indexing according to the CHIP ID in destPort. The global port index mapping table stores the base address of the global export attribute table as well as the maximum port number and the minimum port number; among them, the global port index mapping table and the export attribute table can be shown in reference to Figure 7.
4、根据出口端口号和全局端口索引映射表中存放的最大端口号和最小端口号,判断端口号是否有效,如果端口号有效,则执行步骤5,如果端口号无效则丢弃报文;其中,有效的端口号应当在最小端口号和最大端口号之间;4. Determine whether the port number is valid based on the egress port number and the maximum and minimum port numbers stored in the global port index mapping table. If the port number is valid, execute step 5. If the port number is invalid, discard the message. The valid port number should be between the minimum and maximum port numbers.
5、根据全局端口索引映射表中的全局出口属性表的基地址、出口端口号以及最小端口号,按照如下公式计算出全局端口属性表的索引值:5. According to the base address, export port number and minimum port number of the global export attribute table in the global port index mapping table, the index value of the global port attribute table is calculated according to the following formula:
索引值=全局端口属性表的基地址+出端口号-最小端口号;Index value = base address of global port attribute table + outgoing port number - minimum port number;
6、根据索引值索引,得到全局端口属性表;6. Get the global port attribute table according to the index value;
7、根据报文的编辑信息以及全局端口属性表中的端口属性对报文进行相应的编辑,完成报文的所有编辑行为。7. Edit the message accordingly according to the message editing information and the port attributes in the global port attribute table to complete all editing actions of the message.
8、对编辑后的报文标记出一个bypass的nexthhopPtr,并将编辑后的报文携带bypass nexthopPtr以及destPort发送到出口芯片。8. Mark the edited message with a bypass nexthopPtr, and send the edited message carrying bypass nexthopPtr and destPort to the egress chip.
如图6所示,出口芯片的报文转发流程如下:As shown in Figure 6, the message forwarding process of the egress chip is as follows:
1、编辑后的报文进入出口芯片后,在出口芯片的IPE模块跳过转发表查找;1. After the edited message enters the egress chip, the IPE module of the egress chip skips the forwarding table search;
2、报文通过BSR模块转发到EPE模块;2. The message is forwarded to the EPE module through the BSR module;
3、EPE模块读取DsNexthop表,发现是bypass的Nexthop,则跳过读取DsDestPort,并不对报文做任何编辑,只将报文转发到对应的端口上。3. The EPE module reads the DsNexthop table and finds that it is a bypass Nexthop. It skips reading DsDestPort and does not edit the message. It only forwards the message to the corresponding port.
由上可知,本申请实施例提供的方法在堆叠系统中报文的编辑方式可用集中式的CPU下降到单个芯片,即报文的入口芯片上进行,管理非常简单,同时可以大大地节省互联端口的带宽。From the above, it can be seen that the method provided in the embodiment of the present application can use the centralized CPU to reduce the message editing mode in the stacking system to a single chip, that is, the message entry chip, which is very simple to manage and can greatly save the bandwidth of the interconnection port.
如图8所示,本申请实施例提供一种报文处理装置,应用于入口芯片,该装置可以包括:As shown in FIG8 , an embodiment of the present application provides a message processing device, which is applied to an ingress chip. The device may include:
接收模块801,用于接收第一报文;The receiving module 801 is used to receive a first message;
确定模块802,用于根据第一报文的目的MAC地址,确定用于转发第一报文的出口端的端口号及用于编辑第一报文的编辑信息;A determination module 802, configured to determine, according to a destination MAC address of the first message, a port number of an egress port for forwarding the first message and editing information for editing the first message;
获取模块803,用于根据出口端的端口号,获取出口端的属性信息;The acquisition module 803 is used to acquire the attribute information of the export port according to the port number of the export port;
编辑模块804,用于根据属性信息及编辑信息,编辑第一报文的包头得到第二报文;其中,第二报文由入口芯片通过出口端转发到入口芯片所在的设备外。The editing module 804 is used to edit the header of the first message to obtain a second message according to the attribute information and the editing information; wherein the second message is forwarded by the ingress chip through the egress port to the outside of the device where the ingress chip is located.
在一个实施例中,装置还包括:In one embodiment, the apparatus further comprises:
标记模块,用于标记第二报文;A marking module, used for marking the second message;
发送模块,用于将标记后的第二报文发送给入口芯片所在设备包含的出口芯片,其中,标记后的第二报文,用于出口芯片在不编辑报文的情况下从出口端向外转发。The sending module is used to send the marked second message to the egress chip included in the device where the ingress chip is located, wherein the marked second message is used for the egress chip to forward outward from the egress end without editing the message.
在一个实施例中,获取模块具体用于:In one embodiment, the acquisition module is specifically used for:
根据出口端的端口号查询端口属性表,得到出口端的属性信息。The port attribute table is queried according to the port number of the egress port to obtain the attribute information of the egress port.
在一个实施例中,获取模块具体用于:In one embodiment, the acquisition module is specifically used for:
根据预设索引映射表中的芯片标识与索引区间信息之间的映射关系,获取出口端所在的出口芯片的芯片标识对应的索引区间信息;According to the mapping relationship between the chip identifier and the index interval information in the preset index mapping table, the index interval information corresponding to the chip identifier of the egress chip where the egress end is located is obtained;
根据索引区间信息,获取出口端对应的端口属性表的索引值;According to the index interval information, obtain the index value of the port attribute table corresponding to the egress port;
从索引值对应的端口属性表中读取出口端的属性信息。Read the attribute information of the egress port from the port attribute table corresponding to the index value.
在一个实施例中,出口芯片的芯片标识对应的索引区间信息包括:出口芯片的芯片标识对应的端口属性表的基地址、出口芯片的最小端口号以及最大端口号。In one embodiment, the index interval information corresponding to the chip identification of the egress chip includes: a base address of the port attribute table corresponding to the chip identification of the egress chip, a minimum port number of the egress chip, and a maximum port number.
在一个实施例中,获取模块用于根据索引区间信息,获取出口端对应的端口属性表的索引值,包括:In one embodiment, the acquisition module is used to acquire the index value of the port attribute table corresponding to the egress port according to the index interval information, including:
将出口端的端口号与最小端口号之间的差值确定为偏移量;The difference between the port number of the egress port and the minimum port number is determined as an offset;
根据偏移量以及端口属性表的基地址,确定出口端对应的端口属性表的索引值。According to the offset and the base address of the port attribute table, the index value of the port attribute table corresponding to the egress port is determined.
在一个实施例中,编辑模块具体用于:In one embodiment, the editing module is specifically used to:
根据编辑信息编辑第一报文的三层包头;Editing the layer 3 header of the first message according to the editing information;
根据属性信息编辑第一报文的二层包头和/或三层包头。The layer 2 header and/or layer 3 header of the first message is edited according to the attribute information.
在一个实施例中,编辑模块具体还用于:In one embodiment, the editing module is further configured to:
当属性信息和编辑信息对第一报文的三层包头的编辑操作冲突时,确定属性信息的优先级;When the attribute information and the editing information conflict in editing operations on the layer 3 header of the first message, determining the priority of the attribute information;
当属性信息的优先级高于编辑信息的优先级时,根据属性信息编辑第一报文的三层包头,否则根据编辑信息编辑三层包头。When the priority of the attribute information is higher than the priority of the editing information, the layer-3 header of the first message is edited according to the attribute information; otherwise, the layer-3 header is edited according to the editing information.
需要说明的是:上述实施例提供的报文处理装置在执行报文处理方法时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的报文处理装置与报文处理方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the message processing device provided in the above embodiment executes the message processing method, only the division of the above program modules is used as an example. In actual application, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the message processing device provided in the above embodiment and the message processing method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
如图9所示,本申请实施例提供一种报文转发装置,应用于出口芯片,该装置可以包括:As shown in FIG9 , an embodiment of the present application provides a message forwarding device, which is applied to an egress chip. The device may include:
接收模块901,用于从入口芯片接收报文;Receiving module 901, used to receive messages from the ingress chip;
确定模块902,用于确定从入口芯片接收的报文是否为第二报文,其中,第二报文是:入口芯片编辑第一报文的包头得到的报文;The determination module 902 is used to determine whether the message received from the ingress chip is a second message, wherein the second message is: a message obtained by the ingress chip editing the packet header of the first message;
发送模块903,用于当从入口芯片接收的报文是第二报文时,在不编辑第二报文的情况下通过出口端向外转发第二报文。The sending module 903 is configured to forward the second message outward through the egress port without editing the second message when the message received from the ingress chip is the second message.
在一个实施例中,确定模块具体用于:In one embodiment, the determination module is specifically used to:
确定从入口芯片接收的报文是否携带有已编辑标记;Determine whether the message received from the ingress chip carries an edited flag;
当从入口芯片接收的报文携带有已编辑标记时,确定从入口芯片接收的报文为第二报文。When the message received from the ingress chip carries the edited mark, it is determined that the message received from the ingress chip is the second message.
在一个实施例中,装置还包括编辑模块:In one embodiment, the apparatus further comprises an editing module:
接收模块,还用于当从入口芯片接收的报文不是第二报文时,从入口芯片接收报文的编辑信息和从入口芯片接收的报文的出口端的属性信息;The receiving module is further used for receiving the editing information of the message received from the inlet chip and the attribute information of the egress end of the message received from the inlet chip when the message received from the inlet chip is not the second message;
编辑模块,用于根据编辑信息和属性信息,编辑从入口芯片接收的报文的包头;An editing module, used for editing a packet header of a message received from an ingress chip according to the editing information and the attribute information;
发送模块,还用于将包头被编辑后的报文通过出口端转发到出口芯片所在的设备外。The sending module is also used to forward the message with the edited packet header through the egress port to the outside of the device where the egress chip is located.
需要说明的是:上述实施例提供的报文转发装置在执行报文转发方法时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的报文转发装置与报文转发方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the message forwarding device provided in the above embodiment executes the message forwarding method, only the division of the above program modules is used as an example. In actual application, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the message forwarding device provided in the above embodiment and the message forwarding method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
本申请实施例还提供一种电子装置,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中:The present application also provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein:
电子装置应用于报文处理方法时,处理器执行计算机程序时实现本申请实施例任一的报文处理方法的步骤;When the electronic device is applied to the message processing method, the processor implements the steps of any message processing method of the embodiment of the present application when executing the computer program;
电子装置应用于报文转发方法时,处理器执行计算机程序时实现本申请实施例任一的报文转发方法的步骤。When the electronic device is applied to the message forwarding method, the processor implements the steps of the message forwarding method of any embodiment of the present application when executing the computer program.
图10给出了本申请实施例的电子装置的硬件结构示意图,图10所示的电子装置1000包括:至少一个处理器1001、存储器1002、至少一个网络接口1003。电子装置1000中的各个组件通过总线系统1004耦合在一起。可理解,总线系统1004用于实现这些组件之间的连接通信。总线系统1004除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图10中将各种总线都标为总线系统1004。FIG10 shows a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. The electronic device 1000 shown in FIG10 includes: at least one processor 1001, a memory 1002, and at least one network interface 1003. The various components in the electronic device 1000 are coupled together via a bus system 1004. It is understandable that the bus system 1004 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1004 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as bus systems 1004 in FIG10.
可以理解,存储器1002可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。It can be understood that the memory 1002 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories.
本申请实施例中的存储器1002用于存储各种类型的数据以支持电子装置900的操作。这些数据的示例包括:用于在电子装置1000上操作的任何计算机程序,如可执行程序10021,实现本申请实施例方法的程序可以包含在可执行程序10021中。The memory 1002 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device 900. Examples of such data include: any computer program for operating on the electronic device 1000, such as the executable program 10021, and the program implementing the method of the embodiment of the present application may be included in the executable program 10021.
本申请实施例还提供一种计算机可读存储介质,存储介质上存储有计算机程序,计算机可读存储介质应用于报文处理方法时,计算机程序被处理器执行时,实现本申请实施例任一报文处理方法中的步骤;The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer-readable storage medium is applied to the message processing method, when the computer program is executed by the processor, the steps in any message processing method of the embodiment of the present application are implemented;
计算机可读存储介质应用于报文转发方法时,计算机程序被处理器运行时,实现上述实施例任一的报文转发方法的步骤。When the computer-readable storage medium is applied to the message forwarding method, when the computer program is executed by the processor, the steps of the message forwarding method in any of the above embodiments are implemented.
需要说明的是,本申请实施例的存储介质可以由任何类型的易失性或非易失性存储设备、或者它们的组合来实现。其中,非易失性存储器可以是只读存储器(ROM,Read OnlyMemory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,Ferromagnetic Random Access Memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random AccessMemory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,SynchronousDynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本申请实施例描述的存储介质旨在包括但不限于这些和任意其它适合类型的存储器。It should be noted that the storage medium of the embodiment of the present application can be implemented by any type of volatile or non-volatile storage device, or a combination thereof. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), direct memory bus random access memory (DRRAM). The storage medium described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memory.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
另外,在本申请各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, etc. Various media that can store program codes.
或者,本申请上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台电子装置(可以是个人计算机、服务器、或者网络设备等)执行本申请各个实施例方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for an electronic device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods of each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, disks, or optical disks.
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
以上,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110931712.5A CN115914142B (en) | 2021-08-13 | 2021-08-13 | Message processing method, message forwarding method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110931712.5A CN115914142B (en) | 2021-08-13 | 2021-08-13 | Message processing method, message forwarding method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115914142A CN115914142A (en) | 2023-04-04 |
CN115914142B true CN115914142B (en) | 2024-11-08 |
Family
ID=86474832
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110931712.5A Active CN115914142B (en) | 2021-08-13 | 2021-08-13 | Message processing method, message forwarding method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115914142B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116346746B (en) * | 2023-05-12 | 2023-08-15 | 之江实验室 | A Message Processing Method for Multi-level Programmable Editing |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101945040A (en) * | 2010-08-31 | 2011-01-12 | 北京星网锐捷网络技术有限公司 | Method and device for processing message and network device |
CN105429882A (en) * | 2015-10-21 | 2016-03-23 | 盛科网络(苏州)有限公司 | Message editing realization method and apparatus based on conventional switching chip search mode |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7778245B2 (en) * | 2003-11-10 | 2010-08-17 | Broadcom Corporation | Method and apparatus for remapping module identifiers and substituting ports in network devices |
CN100461732C (en) * | 2006-06-16 | 2009-02-11 | 华为技术有限公司 | Ethernet technology switching and forwarding method, system and equipment |
US7796594B2 (en) * | 2007-02-14 | 2010-09-14 | Marvell Semiconductor, Inc. | Logical bridging system and method |
CN101902397B (en) * | 2010-06-23 | 2015-06-10 | 中兴通讯股份有限公司 | Message forwarding method and switching chip |
CN106330704B (en) * | 2015-06-26 | 2019-12-06 | 新华三技术有限公司 | Message forwarding method and device |
CN106850441B (en) * | 2017-01-17 | 2019-11-29 | 盛科网络(苏州)有限公司 | Stacking system network chip NextHop resource allocation methods |
CN112003876B (en) * | 2020-09-03 | 2023-04-18 | 苏州盛科科技有限公司 | Method and device for realizing programmable information transmission among stacked chips |
-
2021
- 2021-08-13 CN CN202110931712.5A patent/CN115914142B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101945040A (en) * | 2010-08-31 | 2011-01-12 | 北京星网锐捷网络技术有限公司 | Method and device for processing message and network device |
CN105429882A (en) * | 2015-10-21 | 2016-03-23 | 盛科网络(苏州)有限公司 | Message editing realization method and apparatus based on conventional switching chip search mode |
Also Published As
Publication number | Publication date |
---|---|
CN115914142A (en) | 2023-04-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7860028B2 (en) | Flexible ethernet bridge | |
US8199753B2 (en) | Forwarding frames in a computer network using shortest path bridging | |
KR100927126B1 (en) | The entry and exit nodes of the MPS network with improved packet transmission speed, and the packet transmission speed improvement method of the MPS network system | |
US20140119370A1 (en) | Switching apparatus and method based on virtual interfaces | |
CN112583711B (en) | Message processing method and device | |
CN108933756B (en) | A data packet processing method, access network device and computer-readable storage medium | |
US20070097972A1 (en) | Automatic VLAN ID discovery for ethernet ports | |
WO2022184169A1 (en) | Packet forwarding method and system, storage medium, and electronic device | |
US20240048479A1 (en) | Packet Forwarding Method and Apparatus, Network Device, and Storage Medium | |
CN115914142B (en) | Message processing method, message forwarding method, device and equipment | |
US20230254246A1 (en) | Mechanisms for packet path tracing and per-hop delay measurement in segment routing with multiprotocol label switching (sr-mpls) networks | |
EP4395253A1 (en) | Routing method and apparatus, cloud resource registration method and apparatus, storage medium, and electronic apparatus | |
CN115348202B (en) | Data transmission method, device, equipment and storage medium based on network slicing | |
WO2022170944A1 (en) | Packet forwarding method, apparatus and system | |
CN115604183B (en) | A message processing method, device, network equipment and storage medium | |
US6754213B2 (en) | Flexible and high-speed network packet classifying method | |
CN108366024A (en) | Message forwarding method and device | |
WO2024083219A1 (en) | Message processing method and apparatus, and device and storage medium | |
CN118827500A (en) | Traffic scheduling method, electronic device, storage medium and computer program product | |
CN118827826A (en) | Method, device, electronic device and storage medium for determining SRv6 message processing instance | |
WO2022257798A1 (en) | Forwarding method, forwarding system, electronic device and computer-readable storage medium | |
CN113949662B (en) | Message forwarding method, device, network equipment and storage medium | |
WO2024094082A1 (en) | Information transmission method and apparatus, node, and storage medium | |
WO2025001122A1 (en) | Packet forwarding method, electronic device, and storage medium | |
CN117135067A (en) | Method, device, system and storage medium for predicting flow rate |
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 |