WO2016095090A1 - Procédé et appareil de stockage de microcode - Google Patents

Procédé et appareil de stockage de microcode Download PDF

Info

Publication number
WO2016095090A1
WO2016095090A1 PCT/CN2014/093862 CN2014093862W WO2016095090A1 WO 2016095090 A1 WO2016095090 A1 WO 2016095090A1 CN 2014093862 W CN2014093862 W CN 2014093862W WO 2016095090 A1 WO2016095090 A1 WO 2016095090A1
Authority
WO
WIPO (PCT)
Prior art keywords
microcode
instruction
forwarding
plane
forwarding plane
Prior art date
Application number
PCT/CN2014/093862
Other languages
English (en)
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
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2014/093862 priority Critical patent/WO2016095090A1/fr
Publication of WO2016095090A1 publication Critical patent/WO2016095090A1/fr

Links

Images

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and apparatus for storing microcode.
  • network devices such as routers
  • the control plane can be used to execute a routing protocol.
  • the instruction space of the forwarding plane is used to store the microcode.
  • the forwarding plane can be used to execute the above microcode to implement the corresponding service.
  • the service may be route forwarding. Therefore, in order to enable the forwarding plane of the network device to support new services, it is necessary to update the microcode stored in the forwarding plane. Specifically, the microcode being executed on the forwarding plane needs to be deleted first, and then the forwarding plane saves and executes the new microcode. In the above process, the forwarding plane needs to stop working. For example, the forwarding plane needs to stop processing the received message.
  • the embodiment of the invention provides a method and a device for storing microcode, which can avoid the situation that the forwarding plane needs to stop working.
  • a method of storing microcode comprising:
  • the forwarding plane of the device storing the microcode stores the first microcode and the second microcode
  • the control plane of the device storing the microcode stores a third microcode into the forwarding plane storing the first microcode and the second microcode, each microcode starting with a first instruction and The last instruction ends, the last instruction of the first microcode is a jump instruction, and the operand of the last instruction of the first microcode is equal to the first strip of the second microcode An instruction is stored at an address of the forwarding plane;
  • the first microcode is Processing microcode of the first forwarding table
  • the second microcode is a processing microcode of the second forwarding table
  • the third microcode is a processing microcode of the third forwarding table.
  • the first microcode is a processing microcode of a first forwarding table
  • the second microcode is a processing microcode of a second forwarding table
  • the three microcode is a processing microcode of the second forwarding table.
  • the operand of the last instruction of the first microcode is modified to the third
  • the first instruction of the microcode is stored after the address of the forwarding plane, the method further comprising:
  • the control plane deletes the second microcode stored in the forwarding plane.
  • the control plane After the operand of the last instruction of the first microcode is modified, the first instruction of the third microcode is stored after the address of the forwarding plane, the method further includes:
  • the forwarding plane executes the third microcode according to an indication of the last instruction of the first microcode.
  • an apparatus for storing microcode comprising: a forwarding plane and a control plane;
  • the forwarding plane is configured to store a first microcode and a second microcode
  • the control plane is used to:
  • the last instruction of the code is a jump instruction, and an operand of the last instruction of the first microcode is equal to an address of the first instruction of the second microcode stored in the forwarding plane ;
  • the control plane storing the third microcode in the forwarding plane is further configured to modify an operand of the last instruction of the first microcode to the first of the third microcode
  • a slice instruction is stored at the address of the forwarding plane.
  • the first microcode is a processing microcode of a first forwarding table
  • the second microcode is a processing microcode of a second forwarding table
  • the three microcode is the processing microcode of the third forwarding table.
  • the first microcode is a processing microcode of a first forwarding table
  • the second microcode is a processing microcode of a second forwarding table
  • the three microcode is a processing microcode of the second forwarding table.
  • control plane is further configured to:
  • Deleting the forwarding plane after modifying the operand of the last instruction of the first microcode to the first instruction of the third microcode is stored in an address of the forwarding plane
  • the second microcode stored in the medium is stored in the medium.
  • the forwarding plane is further configured to:
  • control plane modifies an operand of the last instruction of the first microcode to a first instruction of the third microcode to be stored in an address of the forwarding plane, according to the The indication of the last instruction of the first microcode executes the third microcode.
  • a control plane of the device storing the microcode first stores the third microcode into the first microcode and the second microcode. The forwarding plane. Then, the control plane modifies the operand of the last instruction of the first microcode to the address of the forwarding plane in which the first instruction of the third microcode is stored.
  • the forwarding plane executes the last instruction of the first microcode, if the control plane has modified the operand of the last instruction of the first microcode to the third microcode
  • the first instruction is stored at an address of the forwarding plane, and the forwarding plane may perform the third microcode according to an indication of the last instruction of the first microcode that has been modified.
  • the forwarding plane executes the last instruction of the first microcode, if the control plane has not modified the operand of the last instruction of the first microcode to the
  • the first instruction of the third microcode is stored at an address of the forwarding plane, and the forwarding plane may perform the foregoing according to an indication of the last instruction of the first microcode to be modified. Two microcode. Therefore, the forwarding plane does not need to stop working regardless of whether the operand of the last instruction of the first microcode has been modified.
  • FIG. 1 is a schematic flowchart of a method for storing microcode according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart diagram of another method for storing microcode according to an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart diagram of still another method for storing microcode according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of an apparatus for storing microcode according to an embodiment of the present invention.
  • the microcode in the embodiments below may be a binary code.
  • the binary code can be compiled by the compiler to code described in assembly language.
  • the compiler can be an application running on top of the operating system.
  • the microcode includes a plurality of computer instructions. The plurality of computer instructions form a sequence of instructions.
  • FIG. 1 is a schematic flowchart diagram of a method for storing microcode according to an embodiment of the present invention. Referring to Figure 1, the method includes:
  • a forwarding plane of the device storing the microcode stores the first microcode and the second microcode.
  • the means for storing microcode may be a network device.
  • the network device may be a router, a network switch, a packet transport network (PTN) device, a firewall, a load balancer, a data center, or a wavelength-division multiplexing (WDM) device.
  • PDN packet transport network
  • WDM wavelength-division multiplexing
  • the device for storing microcode includes a forwarding plane and a control plane.
  • the forwarding plane of the device storing the microcode may include a network processor (NP), and the forwarding plane may be implemented by an interface board of the device storing the microcode.
  • the control plane of the device storing the microcode may comprise a central processing unit (CPU), and the control plane may be implemented by a control board of the device storing the microcode.
  • the instruction space of the forwarding plane of the device storing the microcode stores the first microcode and the second microcode.
  • the instruction space of the forwarding plane may be a storage space in the instruction memory of the NP.
  • the instruction memory can be a component in the NP.
  • the forwarding plane executes the first microcode and the second microcode to implement a service.
  • the service may be a layer 3 virtual private network (L3VPN) forwarding service, or a layer 2 virtual private network (L2VPN) forwarding service, or a virtual private LAN service (virtual private LAN service). , VPLS), or multiprotocol label switching (MPLS) forwarding service, or internet protocol (IP) forwarding service.
  • L3VPN layer 3 virtual private network
  • L2VPN layer 2 virtual private network
  • IP internet protocol
  • the control plane of the device storing the microcode stores the third microcode in the forwarding plane storing the first microcode and the second microcode, and each microcode starts with a first instruction. And ending with the last instruction, the last instruction of the first microcode is a jump instruction, and the operand of the last instruction of the first microcode is equal to the first of the second microcode An instruction is stored at the address of the forwarding plane.
  • the jump may be performed to the second according to the indication of the last instruction of the first microcode.
  • the first instruction of the microcode executes the second microcode.
  • the CPU of the control plane may compile the first code to generate the first microcode.
  • the CPU of the control plane compiles the second code to generate the second microcode.
  • the first code and the second code are described by assembly language.
  • the CPU of the control plane may compile the third code to generate the third microcode.
  • the third code is described by assembly language.
  • the third microcode is a function.
  • the engineer inputs a first command line to the control plane through the console.
  • the parameters of the first command line include the name of the function.
  • the first command line instructs the NP to access the control plane through the driver of the NP to acquire the third microcode, and save the third microcode in an instruction space of the NP.
  • the control plane storing the third microcode in the forwarding plane modifies an operand of the last instruction of the first microcode to the first strip of the third microcode.
  • the instruction is stored at the address of the forwarding plane.
  • the engineer may input a second command line to the control plane through the console.
  • the second command line includes the first instruction of the third microcode being stored at an address of the forwarding plane.
  • the second command line instructs the NP to modify an operand of the last instruction of the first microcode to the first instruction of the third microcode to be stored by a driver of the NP The address of the forwarding plane.
  • the first microcode is a processing microcode of a first forwarding table
  • the second microcode is a second forwarding table.
  • the microcode is processed
  • the third microcode is a processing microcode of the third forwarding table.
  • the first forwarding table may be a routing table.
  • the second forwarding table may be a next hop table.
  • the matching field of the routing table includes an IP address.
  • the action field of the routing table includes an index of the next hop.
  • the matching field of the next hop table includes the index.
  • the action field of the next hop table includes an IP address of the next hop.
  • the first microcode is used for Instructing the NP to use the destination IP address of the IP packet as a lookup key, and searching the routing table for a routing entry that matches the destination IP address, thereby obtaining the first index.
  • the matching field of the routing entry includes the destination IP address.
  • the action field of the routing entry includes the first index.
  • the second microcode is used to indicate that the NP uses the first index as a search key, and searches for a next hop entry that matches the first index in the next hop table, thereby obtaining the first IP address of the next hop.
  • the matching field of the next hop entry includes the first index.
  • the action field of the next hop entry includes an IP address of the first next hop.
  • the first microcode is a processing microcode of a first forwarding table
  • the second microcode is a second forwarding table.
  • the microcode is processed
  • the third microcode is a processing microcode of the second forwarding table.
  • the method for storing the microcode provided by the embodiment of the present invention can implement the modification of the first service by storing a new processing microcode to the forwarding plane.
  • the operand of the last instruction of the first microcode is modified to the third in the control plane.
  • the first instruction of the microcode is stored after the address of the forwarding plane (S103), and may further include:
  • the control plane deletes the second microcode stored in the forwarding plane.
  • control plane modifies an operand of the last instruction of the first microcode to that the first instruction of the third microcode is stored in an address of the forwarding plane
  • deleting the The second microcode stored in the forwarding plane can reduce the occupation of the instruction space of the forwarding plane.
  • the operand of the last instruction of the first microcode is modified to the third in the control plane.
  • the first instruction of the microcode is stored after the address of the forwarding plane (S103), and may further include:
  • the forwarding plane executes the third microcode according to the indication of the last instruction of the first microcode.
  • the control plane has modified the operand of the last instruction of the first microcode to the address of the forwarding plane in which the first instruction of the third microcode is stored. Accordingly, the forwarding plane may perform the third microcode in accordance with an indication of the last instruction of the first microcode.
  • the forwarding plane when the forwarding plane performs the last instruction to the first microcode, if the control plane has not modified the operand of the last instruction of the first microcode to the The first instruction of the third microcode is stored at an address of the forwarding plane, and the operand of the last instruction of the first microcode is still the first of the second microcode A slice instruction is stored at the address of the forwarding plane.
  • the forwarding plane executes the second microcode according to the indication of the last instruction of the first microcode.
  • a control plane of the apparatus for storing a microcode first stores the third microcode in a location where the first microcode and the second microcode are stored. Said forwarding plane. Then, the control plane modifies the operand of the last instruction of the first microcode to the address of the forwarding plane in which the first instruction of the third microcode is stored.
  • the forwarding plane executes the last instruction of the first microcode, if the control plane has modified the operand of the last instruction of the first microcode to the third microcode
  • the first instruction is stored at an address of the forwarding plane, and the forwarding plane may perform the third microcode according to an indication of the last instruction of the first microcode that has been modified.
  • the forwarding plane executes the last instruction of the first microcode, if the control plane has not modified the operand of the last instruction of the first microcode to the third microcode
  • the first instruction is stored at an address of the forwarding plane, and the forwarding plane may perform the second microcode according to an indication of the last instruction of the first microcode to be modified. Therefore, the forwarding plane does not need to stop working regardless of whether the operand of the last instruction of the first microcode has been modified.
  • FIG. 4 is a schematic structural diagram of an apparatus 400 for storing microcode according to an embodiment of the present invention.
  • the apparatus 400 for storing microcodes can be used to perform the method illustrated in FIG.
  • the device 400 that stores microcode can be a network device.
  • the net The network device may specifically be a router, a network switch, a PTN device, a firewall, a load balancer, a data center, or a WDM device.
  • the apparatus 400 for storing microcode specifically includes a forwarding plane 410 and a control plane 420.
  • the forwarding plane 410 can include an NP, and the forwarding plane 410 can be implemented by the interface board of the device 400 storing the microcode.
  • the control plane 420 can include a CPU, and the control plane 420 can be implemented by the control board of the device 400 that stores the microcode.
  • the forwarding plane 410 is configured to store the first microcode and the second microcode.
  • the control plane 420 is configured to:
  • the control plane 420 storing the third microcode in the forwarding plane is further configured to modify an operand of the last instruction of the first microcode to the first of the third microcode An instruction is stored at the address of the forwarding plane 410.
  • the instruction space of the processor of the forwarding plane 410 stores the first microcode and the second microcode.
  • the forwarding plane 410 executes the first microcode and the second microcode to implement a service.
  • the service may be an L3VPN forwarding service, an L2VPN forwarding service, a VPLS, an MPLS forwarding service, or an IP forwarding service.
  • the first microcode is a processing microcode of a first forwarding table
  • the second microcode is a processing microcode of a second forwarding table
  • the third microcode is a third rotation. Published processing microcode.
  • the first microcode is a processing microcode of a first forwarding table
  • the second microcode is a processing microcode of a second forwarding table
  • the third microcode is the first The processing microcode of the second forwarding table.
  • control plane 420 may be further configured to:
  • Modifying, by the control plane 420, the operand of the last instruction of the first microcode to the first instruction of the third microcode is stored after the address of the forwarding plane 410, deleting The second microcode stored in the forwarding plane 410 can reduce the occupation of the instruction space.
  • the forwarding plane 410 is further configured to:
  • control plane 420 modifies the operand of the last instruction of the first microcode to the first instruction of the third microcode is stored after the address of the forwarding plane 410, according to The indication of the last instruction of the first microcode executes the third microcode.
  • a control plane of the apparatus for storing a microcode first stores the third microcode in a location where the first microcode and the second microcode are stored. Said forwarding plane. Then, the control plane modifies the operand of the last instruction of the first microcode to the address of the forwarding plane in which the first instruction of the third microcode is stored.
  • the forwarding plane executes the last instruction of the first microcode, if the control plane has modified the operand of the last instruction of the first microcode to the third microcode
  • the first instruction is stored at an address of the forwarding plane, and the forwarding plane may perform the third microcode according to an indication of the last instruction of the first microcode that has been modified.
  • the forwarding plane executes the last instruction of the first microcode, if the control plane has not modified the operand of the last instruction of the first microcode to the third microcode
  • the first instruction is stored at an address of the forwarding plane, and the forwarding plane may perform the second microcode according to an indication of the last instruction of the first microcode to be modified. Therefore, the forwarding plane does not need to stop working regardless of whether the operand of the last instruction of the first microcode has been modified.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit may be only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined. Or it can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described 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, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including Several instructions to make a meter
  • the computer device (which may be a personal computer, server, or network device, etc.) performs all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

Des modes de réalisation de l'invention concernent un procédé et un appareil de stockage de microcode, de façon à éviter la situation dans laquelle un plan de réacheminement doit arrêter de fonctionner. Le procédé comprend les étapes suivantes : un plan de réacheminement stocke un premier microcode et un deuxième microcode ; un plan de commande stocke un troisième microcode dans le plan de réacheminement, où chaque microcode commence avec une première instruction et se termine avec une dernière instruction, la dernière instruction du premier microcode est une instruction de saut, et un opérande de la dernière instruction du premier microcode est égal à l'adresse de stockage de la première instruction du deuxième microcode dans le plan de réacheminement ; et le plan de commande modifie l'opérande de la dernière instruction du premier microcode.
PCT/CN2014/093862 2014-12-15 2014-12-15 Procédé et appareil de stockage de microcode WO2016095090A1 (fr)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/093862 WO2016095090A1 (fr) 2014-12-15 2014-12-15 Procédé et appareil de stockage de microcode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/093862 WO2016095090A1 (fr) 2014-12-15 2014-12-15 Procédé et appareil de stockage de microcode

Publications (1)

Publication Number Publication Date
WO2016095090A1 true WO2016095090A1 (fr) 2016-06-23

Family

ID=56125557

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/093862 WO2016095090A1 (fr) 2014-12-15 2014-12-15 Procédé et appareil de stockage de microcode

Country Status (1)

Country Link
WO (1) WO2016095090A1 (fr)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103560957A (zh) * 2013-10-15 2014-02-05 华为技术有限公司 查表键值构造方法、微码下发方法、装置及系统
CN103986660A (zh) * 2014-05-30 2014-08-13 华为技术有限公司 加载微码的装置以及加载微码的方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103560957A (zh) * 2013-10-15 2014-02-05 华为技术有限公司 查表键值构造方法、微码下发方法、装置及系统
CN103986660A (zh) * 2014-05-30 2014-08-13 华为技术有限公司 加载微码的装置以及加载微码的方法

Similar Documents

Publication Publication Date Title
US10791066B2 (en) Virtual network
EP3070895B1 (fr) Procédé et système d'encapsulation d'identifiant de flux
US20170163530A1 (en) Signaling aliasing capability in data centers
JP5671022B2 (ja) 少なくとも1つの仮想ネットワークをオンザフライかつオンデマンドでデプロイする方法及びシステム
US10491464B2 (en) Network topology assisted device provisioning
JP6308601B2 (ja) パケット処理方法およびデバイス
US10313154B2 (en) Packet forwarding
JP6365306B2 (ja) クラウド環境提供システム、サービス管理装置、経路制御方法及びプログラム
US8346899B2 (en) Method and system for NIC-centric hyper-channel distributed network management
US9009782B2 (en) Steering traffic among multiple network services using a centralized dispatcher
US10313275B2 (en) Packet forwarding
CN103634423A (zh) 一种基于三层接口的mpls-tp配置方法及装置
EP3349402B1 (fr) Procédé et dispositif de traitement de message
EP3018866A1 (fr) Capacité d'aliasing de signalisation dans des centres de données
CN106911549B (zh) 一种数据报文处理方法及装置
WO2015149367A1 (fr) Procédé et dispositif pour le traitement de paquets
US9749262B2 (en) Packet processing method and forwarding element
EP3292660B1 (fr) Transfert de paquets dans un commutateur vxlan
WO2016138813A1 (fr) Procédé et appareil de traitement de conflit de routage de commutation
CN103986660A (zh) 加载微码的装置以及加载微码的方法
WO2016173196A1 (fr) Procédé et appareil d'apprentissage de relation de mappage d'adresses
WO2016095090A1 (fr) Procédé et appareil de stockage de microcode
US10742570B1 (en) Utilizing virtual routing and forwarding (VRF) interfaces to manage packet transmission through an internal interface
US20160210128A1 (en) Code Loading Method and Network Apparatus

Legal Events

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

Ref document number: 14908125

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14908125

Country of ref document: EP

Kind code of ref document: A1