WO2021004265A1 - 一种微码的升级方法及装置 - Google Patents

一种微码的升级方法及装置 Download PDF

Info

Publication number
WO2021004265A1
WO2021004265A1 PCT/CN2020/097549 CN2020097549W WO2021004265A1 WO 2021004265 A1 WO2021004265 A1 WO 2021004265A1 CN 2020097549 W CN2020097549 W CN 2020097549W WO 2021004265 A1 WO2021004265 A1 WO 2021004265A1
Authority
WO
WIPO (PCT)
Prior art keywords
forwarding
line card
entries
entry
chip
Prior art date
Application number
PCT/CN2020/097549
Other languages
English (en)
French (fr)
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 中兴通讯股份有限公司
Publication of WO2021004265A1 publication Critical patent/WO2021004265A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • the embodiments of the present invention relate to the field of computer technology, in particular to a method and device for upgrading microcode.
  • the microcode upgrade of the line card includes two aspects, one is the upgrade of the microcode version, and the other is the recalculation and issuance of the forwarding entries corresponding to the microcode version.
  • the processing of these two aspects involves the line card forwarding chip and the line card control chip.
  • the line card control chip when the microcode version is upgraded, the line card control chip obtains the microcode version upgrade information, and then sends the microcode version upgrade information to the line card forwarding chip, and the line card forwarding chip performs it in its own command space load.
  • this method deletes the original microcode version information and then loads the microcode version upgrade information. Since the reloading of the information takes time, service forwarding will be interrupted.
  • the embodiment of the present invention provides a microcode upgrade method and device, which at least to a certain extent solves one of the technical problems in related technologies, including avoiding service forwarding interruption caused by loading microcode version upgrade information.
  • the embodiment of the present invention provides a microcode upgrade method, including: a line card forwarding chip receives microcode version upgrade information from a line card control chip; the line card forwarding chip loads the microcode version upgrade in a standby command space Information; the line card forwarding chip is switched from the main instruction space to the backup instruction space; wherein the main instruction space and the backup instruction space are the line card forwarding chip pair itself for loading microcode version information
  • the instruction space is divided in advance.
  • the embodiment of the present invention provides a microcode upgrade method, including: a line card control chip obtains microcode version upgrade information; the line card control chip sends the microcode version upgrade information to the line card forwarding chip, so that The line card forwarding chip loads the microcode version upgrade information in the backup instruction space, and switches from the main instruction space to the backup instruction space; wherein, the main instruction space and the backup instruction space are the line
  • the card forwarding chip is obtained by pre-dividing the instruction space used for loading the microcode version information in the card forwarding chip.
  • the embodiment of the present invention also provides a line card, including: a line card control chip and a line card forwarding chip; wherein the line card control chip is used to obtain microcode version upgrade information, and to update the microcode version upgrade information Sent to the line card forwarding chip; the line card forwarding chip is used to receive the microcode version upgrade information from the line card control chip; load the microcode version upgrade information in the backup command space; switch from the main command space to the backup Instruction space; wherein, the main instruction space and the backup instruction space are obtained by pre-dividing the instruction space used for loading microcode version information in the line card forwarding chip.
  • the embodiment of the present invention also provides a computer storage medium that stores a computer program, and the computer program is used to execute the above-mentioned upgrade method.
  • FIG. 1 is a schematic flowchart of a microcode upgrade method provided by an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of another microcode upgrade method provided by an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a line card forwarding chip provided by an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a line card control chip provided by an embodiment of the present invention.
  • Figure 5 is a schematic structural diagram of a line card provided by an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a storage space for storing forwarding entries in a line card forwarding chip provided by an embodiment of the present invention
  • FIG. 7 is a schematic structural diagram of a storage space for storing forwarding entries in another line card forwarding chip provided by an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a storage space for storing forwarding entries in another line card forwarding chip provided by an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a storage space for storing forwarding entries in another line card forwarding chip provided by an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a structure for performing entry compatibility with reserved fields according to an embodiment of the present invention.
  • the embodiment of the present invention provides a microcode upgrade method, as shown in FIG. 1, including:
  • Step 101 The line card forwarding chip receives the microcode version upgrade information from the line card control chip.
  • Step 102 The line card forwarding chip loads the microcode version upgrade information in the standby command space.
  • Step 103 The line card forwarding chip is switched from the main instruction space to the standby instruction space.
  • the main instruction space and the backup instruction space are obtained by pre-dividing the instruction space used for loading the microcode version information in the line card forwarding chip.
  • interruption time is very short compared to the time required to reload the microcode version upgrade information.
  • the line card forwarding chip divides its own instruction space for loading microcode version information in half to obtain a main instruction space and a backup instruction space of the same size.
  • the line card forwarding chip receives the microcode version upgrade information from the line card control chip, it also includes:
  • the line card forwarding chip receives the target forwarding entry from the line card control chip.
  • the target forwarding entry is a forwarding entry obtained by calculation whose content of the entry is different from the existing forwarding entry.
  • the line card forwarding chip stores the target forwarding entries.
  • the related technology often recalculates all forwarding entries by the line card control chip, and then sends all the calculated forwarding entries to the line card forwarding chip, and the line card forwarding chip refreshes them all (that is, the The calculated forwarding entry replaces all existing forwarding entries).
  • the microcode upgrade method provided by the embodiment of the present invention only saves the forwarding entries whose table entry content has changed, and then when the microcode version information is loaded, only the saved forwarding entries can be refreshed. Not all forwarding entries are refreshed, so the refreshing time of forwarding entries is greatly shortened.
  • the forwarding entries recalculated by the line card control chip correspond to the existing forwarding objects one to one.
  • the line card forwarding chip since the line card forwarding chip receives and stores the target forwarding entry whose content has changed from the line card control chip, it does not delete the target forwarding entry corresponding to the existing forwarding entry, thus making the switch Service forwarding can be performed before the upgraded microcode version, and service forwarding can also be performed after switching to the upgraded microcode version.
  • the line card forwarding chip receives the microcode version upgrade information from the line card control chip, it also includes:
  • the line card forwarding chip receives compatible forwarding entries and forwarding entries that cannot be compatible from the line card control chip.
  • the forwarding entry that has undergone compatibility processing is when the content of the calculated forwarding entry is different from the existing forwarding entry, the existing forwarding entry is obtained after compatibility processing and can be calculated compatible forwarding entry
  • the forwarding entries that cannot be compatible are those whose contents are different from those of the existing forwarding entries, and the forwarding entries that cannot be calculated after compatibility processing is performed on the existing forwarding entries.
  • the first identification information can be used to identify forwarding entries that have undergone compatibility processing
  • the second identification information can identify forwarding entries that cannot be compatible, so that the line card forwarding chip can know which ones that need to be covered are compatible.
  • the processed forwarding entries which ones are incompatible forwarding entries that need to be stored and processed, where the first identification information is used to identify forwarding entries that are compatible with the corresponding existing forwarding entries, and the second identification information is used for Identifies a forwarding entry that cannot be compatible with the corresponding existing forwarding entry.
  • the line card forwarding chip overwrites the corresponding existing forwarding entry with the compatible processing forwarding entry in the first forwarding entry storage space for storing the existing forwarding entry.
  • the forwarding chip stores the incompatible forwarding entry in the storage space of the second forwarding entry that is not compatible with the existing forwarding entry.
  • the storage space of the first forwarding entry and the storage space of the second forwarding entry are obtained by dividing the storage space used for storing forwarding entries in the forwarding chip according to a preset space ratio.
  • the preset space ratio includes: the preset space ratio includes: the space ratio of the storage space of the first forwarding entry to the storage space of the second forwarding entry is 9:1.
  • the microcode version upgrade information is loaded in the backup instruction space of the online card forwarding unit, the microcode version in the main instruction space can be forwarded normally, thus avoiding the loading of microcode.
  • Service forwarding interruption caused by code version upgrade information improves service forwarding efficiency.
  • the embodiment of the present invention provides a microcode upgrade method, as shown in FIG. 2, including:
  • Step 201 The line card control chip obtains the microcode version upgrade information.
  • Step 202 The line card control chip sends the microcode version upgrade information to the line card forwarding chip, so that the line card forwarding chip loads the microcode version upgrade information in the backup instruction space, and switches from the main instruction space to the backup instruction space.
  • the main instruction space and the backup instruction space are obtained by pre-dividing the instruction space used for loading the microcode version information in the line card forwarding chip.
  • the line card control chip obtains the microcode upgrade information, it also includes:
  • the line card control chip obtains service configuration data, and calculates forwarding entries based on the service configuration data.
  • the line card control chip After the line card control chip obtains the microcode upgrade information, it sends the obtained microcode upgrade information to the line card forwarding chip on the one hand, and reacquires the service configuration data on the other hand, and recalculates the forwarding table according to the service configuration data. item.
  • the line card control chip obtains a number of target forwarding entries in the calculated forwarding entries that are different from the corresponding existing forwarding entries.
  • the line card control chip obtains the calculated forwarding entries and the corresponding existing forwarding entries Several different target forwarding entries.
  • the line card control chip when there is no forwarding entry with the same content as the corresponding existing forwarding entry in all the calculated forwarding entries (that is, the content of all existing forwarding entries has changed), the line card control chip All the calculated forwarding entries will be sent to the line card forwarding chip so that the line card forwarding chip will refresh all the forwarding entries.
  • the line card control chip sends the target forwarding entry to the line card forwarding chip.
  • the line card control chip obtains the microcode upgrade information, it also includes:
  • the line card control chip obtains service configuration data, and calculates forwarding entries according to the service configuration data; the line card control chip obtains several target forwarding entries whose contents in the calculated forwarding entries are different from the corresponding existing forwarding entries .
  • the line card control chip obtains from a number of target forwarding entries the forwarding entries to be processed that can be compatible with the corresponding existing forwarding entries that have undergone compatibility processing, and the forwarding entries that cannot be compatible.
  • the forwarding entry to be compatible is a forwarding entry in the target forwarding entry that can be compatible with the corresponding existing forwarding entry after compatibility processing (referring to the forwarding entry to be compatible).
  • a forwarding entry that cannot be compatible refers to a forwarding entry that cannot be compatible with an existing entry to obtain a forwarding entry that is compatible with the forwarding entry.
  • the line card control chip performs compatibility processing on the existing forwarding entries corresponding to the forwarding entries for compatibility processing according to the forwarding entries for compatibility processing to obtain the forwarding entries that have undergone compatibility processing.
  • the obtained forwarding entry that has undergone compatibility processing is obtained by performing compatibility processing on the existing forwarding entry corresponding to the forwarding entry for compatibility processing based on the forwarding entry to be compatible processing. Therefore, the obtained forwarding entry has undergone compatibility processing.
  • the forwarding entry can be compatible with the forwarding entry to be processed compatible, and can also be compatible with the existing forwarding entry corresponding to the forwarding entry to be compatible processed.
  • the line card control chip sends the forwarding entries that have undergone compatibility processing and the forwarding entries that cannot be compatible to the line card forwarding chip.
  • the line card control chip performs compatibility processing on existing forwarding entries corresponding to the forwarding entries for compatible processing according to the forwarding entries for compatible processing, including:
  • the line card control chip performs compatibility processing on existing forwarding entries corresponding to the forwarding entries for compatible processing by way of reserved fields.
  • the line card control chip performs compatibility processing based on the forwarded entries corresponding to the forwarding entries for compatible processing in accordance with the forwarding entries of the forwarding compatibility processing entries by means of other compatible encoding methods other than reserved fields.
  • the line card control chip performs compatibility processing based on the existing forwarding entries corresponding to the forwarding entries for compatible processing by way of reserved fields, including:
  • the line card control chip obtains the different fields between each row of the forwarding entry to be processed and the forwarding entry corresponding to the forwarding entry to be compatible.
  • the line card control chip adds a reserved field after each row field of the existing forwarding entry corresponding to the forwarding entry to be compatible.
  • the line card control chip fills in the reserved fields of the corresponding row with the obtained different fields between each row.
  • TLV Type Length Value
  • JSON literal scripting language object notation
  • XML Extensible Markup Language
  • the microcode version upgrade information is loaded in the backup instruction space of the online card forwarding unit, the microcode version in the main instruction space can be forwarded normally, thus avoiding the loading of microcode.
  • Service forwarding interruption caused by code version upgrade information improves service forwarding efficiency.
  • the embodiment of the present invention also provides a line card forwarding chip.
  • the line card forwarding chip 3 includes:
  • the receiving module 31 is used to receive the microcode version upgrade information from the line card control chip.
  • the first processing module 32 is configured to load the microcode version upgrade information in the standby instruction space.
  • the first processing module 32 is also used to switch from the main instruction space to the backup instruction space; wherein the main instruction space and the backup instruction space are obtained by pre-dividing the instruction space used to load the microcode version information in the line card forwarding chip of.
  • the receiving module 31 is also used to receive the target forwarding entry from the line card control chip; the target forwarding entry is a forwarding entry obtained by calculation whose content of the entry is different from the existing forwarding entry.
  • the first processing module 32 is also used to store target forwarding entries.
  • the receiving module 31 is also used to receive compatible-processed forwarding entries and non-compatible forwarding entries from the line card control chip; among them, the compatible-processed forwarding entries are forwarding entries obtained by calculation.
  • the entry content of the entry is different from the existing forwarding entry.
  • the forwarding entry obtained after the compatibility processing of the existing forwarding entry is compatible with the calculated forwarding entry.
  • the forwarding entry that cannot be compatible is the entry A forwarding entry whose content is different from the existing forwarding entry and cannot be calculated and obtained after compatibility processing on the existing forwarding entry.
  • the first processing module 32 is also used to overwrite the corresponding existing forwarding entry with a compatible-processed forwarding entry in the first forwarding entry storage space for storing the existing forwarding entry;
  • the storage space of the second forwarding entry that has the incompatible forwarding entry is stored in the storage space of the second forwarding entry;
  • the storage space of the first forwarding entry and the storage space of the second forwarding entry are used by the forwarding chip.
  • the storage space used for storing forwarding entries in is divided according to a preset space ratio.
  • the preset space ratio includes: the preset space ratio includes: the space ratio of the storage space of the first forwarding entry to the storage space of the second forwarding entry is 9:1.
  • the microcode version upgrade information is loaded in the backup instruction space of the online card forwarding unit, the microcode version in the main instruction space can be normally forwarded, thus avoiding the need to load microcode.
  • Service forwarding interruption caused by version upgrade information improves service forwarding efficiency.
  • the receiving module 31 and the first processing module 32 are both located in the central processing unit (CPU), microprocessor (MPU), and digital signal processor in the line card forwarding chip.
  • CPU central processing unit
  • MPU microprocessor
  • DSP Digital Signal Processor
  • FPGA Field Programmable Gate Array
  • the embodiment of the present invention also provides a line card control chip.
  • the line card control chip 4 includes:
  • the second processing module 41 is used to obtain microcode version upgrade information
  • the sending module 41 is used to send the microcode version upgrade information to the line card forwarding chip, so that the line card forwarding chip loads the microcode version upgrade information in the backup instruction space and switches from the main instruction space to the backup instruction space; among them, The main instruction space and the backup instruction space are obtained by pre-dividing the instruction space used to load the microcode version information in the line card forwarding chip.
  • the second processing module 41 is also used to obtain service configuration data, and calculate forwarding entries according to the service configuration data; to obtain the content of the calculated forwarding entries that are different from the corresponding existing forwarding entries Several target forwarding entries.
  • the sending module 41 is also used to send the target forwarding entry to the line card forwarding chip.
  • the second processing module 41 is also used to obtain service configuration data and calculate forwarding entries based on the service configuration data; to obtain several forwarding entries whose contents are different from the corresponding existing forwarding entries in the calculated forwarding entries
  • Target forwarding entries Obtain from several target forwarding entries the forwarding entries that can be compatible with the corresponding existing forwarding entries that have undergone compatibility processing, and the forwarding entries that cannot be compatible; according to the compatibility processing The forwarding entry is subjected to compatibility processing on the existing forwarding entry corresponding to the forwarding entry to be compatible with processing, and the forwarding entry after the compatibility processing is obtained.
  • the sending module 41 is also used to send forwarding entries that have undergone compatible processing and forwarding entries that cannot be compatible to the line card forwarding chip.
  • the second processing module 41 is specifically configured to perform compatibility processing on existing forwarding entries corresponding to the forwarding entries to be processed for compatibility by way of reserved fields.
  • the second processing module 41 is specifically configured to perform compatibility processing on the existing forwarding entries corresponding to the forwarding entries for compatible processing according to the forwarding entries for compatibility processing by means of other compatible encoding methods other than reserved fields.
  • the second processing module 41 is specifically configured to:
  • a reserved field is added after each row field of the existing forwarding entry corresponding to the forwarding entry to be compatible processed.
  • other compatible encoding methods other than reserved fields include: TLV encoding, Google Protobuf, JSON, and XML.
  • the microcode version upgrade information is loaded in the backup instruction space of the online card forwarding unit, the microcode version in the main instruction space can be forwarded normally, thus avoiding the loading of microcode.
  • Service forwarding interruption caused by version upgrade information improves service forwarding efficiency.
  • the second processing module 41 and the sending module 42 are implemented by CPU, MPU, DSP or FPGA located in the line card control chip.
  • the embodiment of the present invention also provides a line card, as shown in FIG. 5, including: a line card control chip and a line card forwarding chip.
  • the line card control chip and the line card forwarding chip can be reset independently, that is, the resetting of the line card control chip will not affect the normal forwarding of business packets by the line card forwarding chip.
  • the line card control chip is responsible for generating forwarding entries according to the service configuration data issued by the main control board and sending them to the line card forwarding chip, and the line card forwarding chip forwards business messages according to the forwarding entries. The specific process is as follows:
  • the main control board uploads the microcode version upgrade information to its own version library; the main control board sends an upgrade reset command to the line card control chip.
  • the line card control chip receives the upgrade reset command, it backs up the current business configuration data; the line card control chip triggers the reset, and after power-on, it obtains the microcode version upgrade information from the main control board and sends it to the line card to forward the chip to run ; The line card control chip obtains the business configuration data from the backup and recalculates the forwarding entries.
  • the line card control chip identifies the specific situation of the forwarding entry through the version number, so that the line card forwarding chip can determine how to process the forwarding entry according to the difference in the version number. For example, the line card forwarding chip determines that the microcode version is not compatible through the different identifiers of the major version number, and all the forwarding entries need to be refreshed to load the upgraded microcode version; the different identifiers of the medium version number determine that the forwarding entries are not compatible.
  • the forwarding entry storage space (corresponding to the second forwarding entry storage space in the above-mentioned embodiment) stores forwarding entries; the different identifiers of the minor version numbers determine that the forwarding entries are compatible, and the recalculated forwarding entry data can overwrite the current Forward the entry data.
  • Forwarding table item can obtain a compatible forwarding table item C (version number V 1.1.2) from the existing forwarding table item C (version number V 1.1.1) through compatibility processing (belonging to the compatible forwarding table item C (version number V 1.1.2) in the above embodiment Processed forwarding entry), the recalculated forwarding entry E (belonging to the forwarding entry to be processed in the above embodiment) can be obtained from the existing forwarding entry E (version number V 1.1.1) through compatibility processing Compatible forwarding entry E (version number V 1.1.2) (belonging to the compatible forwarding entry in the above embodiment), recalculated forwarding entry F (version number V 1.2.1) cannot be compatible (It belongs to the forwarding entry that cannot be compatible in the above embodiment), so the line card forwarding chip will overwrite
  • Forwarding table item can be obtained from the existing forwarding table item B (version number V 1.1.1) through compatibility processing to obtain a compatible forwarding table item B (version number V 1.1.2) (belonging to the compatible forwarding table item B in the above embodiment Processed forwarding entry), the recalculated forwarding entry C (belonging to the forwarding entry to be processed in the above embodiment) can be obtained from the existing forwarding entry C (version number V 1.1.2) through compatibility processing Compatible forwarding entry C (version number V 1.1.3) (belonging to the compatible forwarding entry in the above embodiment), recalculated forwarding entry E (version number V1.2.1) cannot be compatible ( It belongs to the forwarding entry that cannot be compatible in the above embodiment), so the line card forwarding chip will overwrite the existing forwarding entry B
  • the line card forwarding chip switches between the main and standby command spaces.
  • the microcode is upgraded from Figure 6 to Figure 7, and the line card forwarding chip switches from the main command space to the standby command space.
  • the code is upgraded from Fig. 7 to Fig. 8, the line card forwarding chip is switched from the standby command space to the main command space, the microcode is upgraded from Fig. 8 to Fig. 9, and the line card forwarding chip is switched from the main command space to the standby command space.
  • the compatibility of forwarding entries can be achieved by reserving fields.
  • the generated compatible forwarding entries need to meet the following requirements: fields cannot be deleted, only the fields can be discarded; new fields can only be added in At the end, no fields can be inserted in the middle; if the field needs to be expanded and modified (for example, BYTE is changed to INT), it needs to be added at the end in the way of adding new fields, but the value of the original field needs to be retained (for the old version).
  • FIG. 10 a schematic diagram of table entry compatibility in a reserved field is shown in FIG. 10. Assuming that the table entry has only one row of fields, and the reserved field is 64 bits, take the different version numbers of this row of fields as an example for illustration. Assume that it contains V 1.1.1, V 1.1.2, V 1.1.3, and V 1.2.1, as shown in the figure As shown in 10, V1.1.2 modifies field B (extended by 1 byte), and V1.1.3 adds field Z.
  • the line card control chip selects the corresponding forwarding table item delivery method according to the three version numbers of the large, medium and small, and delivers the recalculated forwarding table item to the line card forwarding chip.
  • the line card forwarding chip receives the forwarding entry and processes the forwarding entry; loads the microcode version upgrade information into the backup instruction space; and switches the current main instruction space to the backup instruction space.
  • the embodiment of the present invention also provides a line card, including: a line card control chip and a line card forwarding chip.
  • the line card control chip is used to obtain the microcode version upgrade information, and send the microcode version upgrade information to the line card forwarding chip.
  • the line card forwarding chip is used to receive the microcode version upgrade information from the line card control chip; load the microcode version upgrade information in the backup instruction space; switch from the main instruction space to the backup instruction space; where the main instruction space and the backup instruction space are
  • the line card forwarding chip is obtained by pre-dividing the instruction space used for loading the microcode version information in itself.
  • the line card control chip is also used to obtain service configuration data, and calculate forwarding entries based on the service configuration data; to obtain several forwarding entries in the calculated forwarding entries whose contents are different from the corresponding existing forwarding entries Target forwarding entry; sending the target forwarding entry to the line card forwarding chip.
  • the line card forwarding chip is also used to receive the target forwarding entry from the line card control chip; the target forwarding entry is a forwarding entry obtained by calculation whose content is different from the existing forwarding entry; and the target forwarding entry is stored.
  • the line card control chip is also used to obtain service configuration data, and calculate forwarding entries based on the service configuration data; to obtain several forwarding entries in the calculated forwarding entries whose contents are different from the corresponding existing forwarding entries
  • Target forwarding entries Obtain from several target forwarding entries the forwarding entries that can be compatible with the corresponding existing forwarding entries that have undergone compatibility processing, and the forwarding entries that cannot be compatible; according to the compatibility processing The forwarding entries are compatible with the existing forwarding entries corresponding to the forwarding entries for the compatible processing, and the forwarding entries after the compatibility processing are obtained; the forwarding entries that have undergone the compatibility processing and the forwarding entries that cannot be compatible are sent to the line card Forwarding chip.
  • the line card forwarding chip is also used to receive compatible processed forwarding entries and incompatible forwarding entries from the line card control chip;
  • the first forwarding entry storage space used to store existing forwarding entries is The compatible processing forwarding entry covers the corresponding existing forwarding entry;
  • the incompatible forwarding entry is stored in the second forwarding entry storage space for storing the forwarding entry that is incompatible with the existing forwarding entry; where ,
  • the storage space of the first forwarding entry and the storage space of the second forwarding entry are obtained by dividing the storage space used for storing forwarding entries in the forwarding chip according to a preset space ratio.
  • the preset space ratio includes: the space ratio of the storage space of the first forwarding entry to the storage space of the second forwarding entry is 9:1.
  • the line card control chip is specifically configured to perform compatibility processing on existing forwarding entries corresponding to the forwarding entries to be compatible processing by way of reserved fields.
  • the line card control chip is specifically configured to perform compatibility processing on existing forwarding entries corresponding to the forwarding entries to be compatible with the forwarding entries to be compatible processing by means of other compatible encoding methods other than reserved fields.
  • the line card control chip is specifically used to obtain the different fields between each row of the forwarding entry to be processed and the forwarding entry corresponding to the processing to be compatible; A reserved field is added after each row field of the existing forwarding entry; the obtained different fields between each row are filled in the reserved field of the corresponding row.
  • other compatible encoding methods other than reserved fields include: TLV encoding, Google Protobuf, JSON, and XML.
  • the embodiment of the present invention also provides a computer storage medium, which stores a computer program, and the computer program is used to execute the above-mentioned upgrade method.
  • the microcode version upgrade information since the microcode version upgrade information is loaded in the backup instruction space, the microcode version in the main instruction space can be forwarded normally, thus avoiding the business caused by loading the microcode version upgrade information Forwarding interruption improves the forwarding efficiency of the service.
  • the embodiment of the present invention can load microcode version upgrade information in the backup instruction space, and perform service forwarding in the main instruction space, thereby realizing the synchronization of loading of microcode version upgrade information and normal service forwarding, thereby improving service forwarding efficiency .

Abstract

一种微码的升级方法及装置,其中的方法包括:线卡转发芯片接收来自线卡控制芯片的微码版本升级信息(101);线卡转发芯片在备指令空间加载微码版本升级信息(102);线卡转发芯片从主指令空间切换至备指令空间;其中,主指令空间和备指令空间是线卡转发芯片对自身中用于加载微码版本信息的指令空间预先进行划分得到的(103)。

Description

一种微码的升级方法及装置
相关申请的交叉引用
本申请基于申请号为201910611232.3、申请日为2019年07月08日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本发明实施例涉及计算机技术领域,尤指一种微码的升级方法及装置。
背景技术
线卡微码的升级包括两方面,一方面是微码版本的升级,另一方面是微码版本对应的转发表项的重新计算和下发。这两方面的处理都涉及线卡转发芯片和线卡控制芯片。
相关技术中,在进行微码版本的升级时,线卡控制芯片获取微码版本升级信息,然后将微码版本升级信息发送给线卡转发芯片,由线卡转发芯片在自身的指令空间中进行加载。
然而,这种方法是将原有的微码版本信息删除,然后加载微码版本升级信息,由于信息的重新加载需要时间,因此会使得业务转发中断。
发明内容
本发明实施例提供了一种微码的升级方法及装置,至少在一定程度上解决相关技术中的技术问题之一,包括避免因加载微码版本升级信息而引起的业务转发中断。
本发明实施例提供了一种微码的升级方法,包括:线卡转发芯片接收来自线卡控制芯片的微码版本升级信息;所述线卡转发芯片在备指令空间加载所述微码版本升级信息;所述线卡转发芯片从主指令空间切换至所述备指令空间;其中,所述主指令空间和所述备指令空间是所述线卡转发芯片对自身中用于加载微码版本信息的指令空间预先进行划分得到的。
本发明实施例提供了一种微码的升级方法,包括:线卡控制芯片获取微码版本升级信息;所述线卡控制芯片将所述微码版本升级信息发送给线卡转发芯片,以使所述线卡转发芯片在备指令空间中加载所述微码版本升级信息,并从主指令空间切换至所述备指令空间;其中,所述主指令空间和所述备指令空间是所述线卡转发芯片对自身中用于加载微码版本信息的指令空间预先进行划分得到的。
本发明实施例还提供了一种线卡,包括:线卡控制芯片以及线卡转发芯片;其中,所述线卡控制芯片用于获取微码版本升级信息,并将所述微码版本升级信息发送给线卡转发 芯片;所述线卡转发芯片用于接收来自线卡控制芯片的微码版本升级信息;在备指令空间加载所述微码版本升级信息;从主指令空间切换至所述备指令空间;其中,所述主指令空间和所述备指令空间是所述线卡转发芯片对自身中用于加载微码版本信息的指令空间预先进行划分得到的。
本发明实施例还提供一种计算机存储介质,其存储有计算机程序,所述计算机程序用于执行上述的升级方法。
本发明实施例的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明实施例而了解。本发明实施例的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。
附图说明
附图用来提供对本发明实施例技术方案的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明实施例的技术方案,并不构成对本发明实施例技术方案的限制。
图1为本发明实施例提供的一种微码的升级方法的流程示意图;
图2为本发明实施例提供的另一种微码的升级方法的流程示意图;
图3为本发明实施例提供的一种线卡转发芯片的结构示意图;
图4为本发明实施例提供的一种线卡控制芯片的结构示意图;
图5为本发明实施例提供的一种线卡的结构示意图;
图6为本发明实施例提供的一种线卡转发芯片中用于存储转发表项的存储空间的结构示意图;
图7为本发明实施例提供的另一种线卡转发芯片中用于存储转发表项的存储空间的结构示意图;
图8为本发明实施例提供的又一种线卡转发芯片中用于存储转发表项的存储空间的结构示意图;
图9为本发明实施例提供的又一种线卡转发芯片中用于存储转发表项的存储空间的结构示意图;
图10为本发明实施例提供的一种以预留字段进行表项兼容的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互任意组合。
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
本发明实施例提供一种微码的升级方法,如图1所示,包括:
步骤101、线卡转发芯片接收来自线卡控制芯片的微码版本升级信息。
步骤102、线卡转发芯片在备指令空间加载微码版本升级信息。
步骤103、线卡转发芯片从主指令空间切换至备指令空间。
其中,主指令空间和备指令空间是线卡转发芯片对自身中用于加载微码版本信息的指令空间预先进行划分得到的。
在一些实例中,在切换指令空间时会有业务瞬断,但中断时间相较于重新加载微码版本升级信息所需的时间非常短。
在一些实例中,线卡转发芯片将自身中用于加载微码版本信息的指令空间进行对半划分,得到空间大小相同的主指令空间和备指令空间。
在一些实例中,线卡转发芯片接收来自线卡控制芯片的微码版本升级信息之后,还包括:
首先、线卡转发芯片接收来自线卡控制芯片的目标转发表项。
其中,目标转发表项是表项内容与已有转发表项不同的计算得到的转发表项。
其次、线卡转发芯片存储目标转发表项。
在一些实例中,相关技术往往是由线卡控制芯片重新计算所有转发表项,然后将计算得到的所有转发表项下发给线卡转发芯片,由线卡转发芯片进行全部刷新(即由重新计算得到的转发表项替换所有已有转发表项)。然而大多数情况下,只有个别转发表项发生了改变,因此全部重新刷新转表项会造成资源的浪费,且使得刷新过程中业务中断。相比之下,本发明实施例提供的微码的升级方法,只保存表项内容发生了变化的转发表项,然后当微码版本信息加载完成后,可以只刷新保存的转发表项,而不是刷新所有的转发表项,因此极大程度地缩短了转发表项的刷新时间。
在一些实例中,由线卡控制芯片重新计算的转发表项和已有转发对象是一一对应的。
在一些实例中,由于线卡转发芯片接收来自线卡控制芯片的内容发生变化的目标转发表项并予以存储,而并未对目标转发表项对应已有转发表项进行删除,从而使得在切换至升级的微码版本前可以进行业务转发,在切换至升级的微码版本后也可以进行进行业务转发。
在一些实例中,线卡转发芯片接收来自线卡控制芯片的微码版本升级信息之后,还包 括:
首先、线卡转发芯片接收来自线卡控制芯片的经过兼容处理的转发表项和无法被兼容的转发表项。
其中,经过兼容处理的转发表项是当计算得到的转发表项的表项内容与已有转发表项不同,由已有转发表项经过兼容性处理后得到的能够兼容计算得到的转发表项的转发表项,无法被兼容的转发表项是表项内容与已有转发表项不同,且无法由已有转发表项进行兼容性处理后兼容的计算得到的转发表项。
在一些实例中,可以用第一标识信息标识经过兼容处理的转发表项,第二标识信息标识无法被兼容的转发表项,从而让线卡转发芯片能够知晓哪些是需要做覆盖处理的经过兼容处理的转发表项,哪些是需要做存储处理的无法被兼容的转发表项,其中,第一标识信息用于标识能够兼容对应的已有转发表项的转发表项,第二标识信息用于标识无法兼容对应的已有转发表项的转发表项。
然后、线卡转发芯片在用于存储已有转发表项的第一转发表项存储空间中以经过兼容处理的转发表项覆盖对应的已有转发表项。
最后、转发芯片在用于存储与已有转发表项无法兼容的转发表项的第二转发表项存储空间中存储无法被兼容的转发表项。
其中,第一转发表项存储空间和第二转发表项存储空间是转发芯片将自身中用于存储转发表项的存储空间按照预设空间比例进行划分得到的。
在一些实例中,预设空间比例包括:预设空间比例包括:第一转发表项存储空间与第二转发表项存储空间的空间比例为9:1。
本发明实施例提供的微码的升级方法,由于微码版本升级信息在线卡转发单元的备指令空间中进行加载,主指令空间中的微码版本可以正常进行业务转发,因此避免了因加载微码版本升级信息而引起的业务转发中断,提高了业务的转发效率。
本发明实施例提供一种微码的升级方法,如图2所示,包括:
步骤201、线卡控制芯片获取微码版本升级信息。
步骤202、线卡控制芯片将微码版本升级信息发送给线卡转发芯片,以使线卡转发芯片在备指令空间中加载微码版本升级信息,并从主指令空间切换至备指令空间。
其中,主指令空间和备指令空间是线卡转发芯片对自身中用于加载微码版本信息的指令空间预先进行划分得到的。
在一些实例中,线卡控制芯片获取微码升级信息之后,还包括:
首先、线卡控制芯片获取业务配置数据,并根据业务配置数据计算转发表项。
在一些实例中,线卡控制芯片获取微码升级信息后一方面要将获得的微码升级信息发送给线卡转发芯片,一方面要重新获取业务配置数据,并根据业务配置数据重新计算转发表项。
然后、线卡控制芯片获取计算得到的转发表项中表项内容与对应的已有转发表项不同的若干个目标转发表项。
在一些实例中,当所有计算得到的转发表项中存在内容与对应的已有转发表项相同的转发表项,线卡控制芯片获取计算得到的转发表项中内容与对应的已有转发表项不同的若干个目标转发表项。
在一些实例中,当所有计算得到的转发表项中不存在内容与对应的已有转发表项相同的转发表项(即所有已有转发表项的内容都发生了变化),线卡控制芯片会向线卡转发芯片发送所有计算得到的转发表项以使线卡转发芯片进行转发表项的全部刷新。
最后、线卡控制芯片将目标转发表项发送给线卡转发芯片。
在一些实例中,线卡控制芯片获取微码升级信息之后,还包括:
首先、线卡控制芯片获取业务配置数据,并根据业务配置数据计算转发表项;线卡控制芯片获取计算得到的转发表项中内容与对应的已有转发表项不同的若干个目标转发表项。
其次、线卡控制芯片从若干个目标转发表项中获取能够由经过兼容性处理的对应的已有转发表项兼容的待兼容处理转发表项,以及无法被兼容的转发表项。
在一些实例中,待兼容处理转发表项是目标转发表项中能够由对应的已有转表项经过兼容性处理后对其(指待兼容处理转发表项)进行兼容的转发表项。
在一些实例中,无法被兼容的转发表项是指取无法由已有表项进行兼容性处理以得到能够兼容该转发表项的转发表项。
然后、线卡控制芯片根据待兼容处理转发表项对待兼容处理转发表项对应的已有转发表项进行兼容性处理,得到经过兼容处理的转发表项。
在一些实例中,获得的经过兼容处理的转发表项由于是根据待兼容处理转发表项对待兼容处理转发表项对应的已有转发表项进行兼容性处理得到的,因此获得的经过兼容处理的转发表项既能够兼容待兼容处理转发表项,又能够兼容待兼容处理转发表项对应的已有转发表项。
最后、线卡控制芯片将经过兼容处理的转发表项和无法被兼容的转发表项发送给线卡转发芯片。
在一些实例中,线卡控制芯片根据待兼容处理转发表项对待兼容处理转发表项对应的 已有转发表项进行兼容性处理,包括:
线卡控制芯片通过预留字段的方式根据待兼容处理转发表项对待兼容处理转发表项对应的已有转发表项进行兼容性处理。
或者,线卡控制芯片通过除预留字段以外的其他兼容编码的方式根据待兼容处理转发表项对待兼容处理转发表项对应的已转发有表项进行兼容性处理。
在一些实例中,线卡控制芯片通过预留字段的方式根据待兼容处理转发表项对待兼容处理转发表项对应的已有转发表项进行兼容性处理,包括:
首先、线卡控制芯片获取待兼容处理转发表项和待兼容处理转发表项对应的已有转发表项每一行之间的不同字段。
然后、线卡控制芯片在待兼容处理转发表项对应的已有转发表项的每一行字段后面增加预留字段。
最后、线卡控制芯片用获得的每一行之间的不同字段填充在对应行的预留字段中。
在一些实例中,除预留字段以外的其他兼容编码的方式包括:类型长度值(Type Length Value,TLV)编码、编解码框架Google Protobuf、直译式脚本语言对象标记(JavaScript Object Notation,JSON)、可扩展标记语言(Extensible Markup Language,XML)。
本发明实施例提供的微码的升级方法,由于微码版本升级信息在线卡转发单元的备指令空间中进行加载,主指令空间中的微码版本可以正常进行业务转发,因此避免了因加载微码版本升级信息而引起的业务转发中断,提高了业务的转发效率。
本发明实施例还提供一种线卡转发芯片,如图3所示,该线卡转发芯片3包括:
接收模块31,用于接收来自线卡控制芯片的微码版本升级信息。
第一处理模块32,用于将微码版本升级信息在备指令空间中进行加载。
第一处理模块32,还用于从主指令空间切换至备指令空间;其中,主指令空间和备指令空间是线卡转发芯片对自身中用于加载微码版本信息的指令空间预先进行划分得到的。
在一些实例中,接收模块31,还用于接收来自线卡控制芯片的目标转发表项;其中,目标转发表项是表项内容与已有转发表项不同的计算得到的转发表项。
第一处理模块32,还用于存储目标转发表项。
在一些实例中,接收模块31,还用于接收来自线卡控制芯片的经过兼容处理的转发表项和无法被兼容的转发表项;其中,经过兼容处理的转发表项是当计算得到的转发表项的表项内容与已有转发表项不同,由已有转发表项经过兼容性处理后得到的能够兼容计算得到的转发表项的转发表项,无法被兼容的转发表项是表项内容与已有转发表项不同,且无法由已有转发表项进行兼容性处理后兼容的计算得到的转发表项。
第一处理模块32,还用于在用于存储已有转发表项的第一转发表项存储空间中以经过兼容处理的转发表项覆盖对应的已有转发表项;在用于存储与已有转发表项无法兼容的转发表项的第二转发表项存储空间中存储无法被兼容的转发表项;其中,第一转发表项存储空间和第二转发表项存储空间是转发芯片将自身中用于存储转发表项的存储空间按照预设空间比例进行划分得到的。
在一些实例中,预设空间比例包括:预设空间比例包括:第一转发表项存储空间与第二转发表项存储空间的空间比例为9:1。
本发明实施例提供的线卡转发芯片,由于微码版本升级信息在线卡转发单元的备指令空间中进行加载,主指令空间中的微码版本可以正常进行业务转发,因此避免了因加载微码版本升级信息而引起的业务转发中断,提高了业务的转发效率。
在实际应用中,所述接收模块31和第一处理模块32均位于线卡转发芯片中的中央处理器(Central Processing Unit,CPU)、微处理器(Micro Processor Unit,MPU)、数字信号处理器(Digital Signal Processor,DSP)或现场可编程门阵列(Field Programmable Gate Array,FPGA)等实现。
本发明实施例还提供一种线卡控制芯片,如图4所示,该线卡控制芯片4包括:
第二处理模块41,用于获取微码版本升级信息;
发送模块41,用于将微码版本升级信息发送给线卡转发芯片,以使线卡转发芯片在备指令空间中加载微码版本升级信息,并从主指令空间切换至备指令空间;其中,主指令空间和备指令空间是线卡转发芯片对自身中用于加载微码版本信息的指令空间预先进行划分得到的。
在一些实例中,第二处理模块41,还用于获取业务配置数据,并根据业务配置数据计算转发表项;获取计算得到的转发表项中表项内容与对应的已有转发表项不同的若干个目标转发表项。
发送模块41,还用于将目标转发表项发送给线卡转发芯片。
在一些实例中,第二处理模块41,还用于获取业务配置数据,并根据业务配置数据计算转发表项;获取计算得到的转发表项中内容与对应的已有转发表项不同的若干个目标转发表项;从若干个目标转发表项中获取能够由经过兼容性处理的对应的已有转发表项兼容的待兼容处理转发表项,以及无法被兼容的转发表项;根据待兼容处理转发表项对待兼容处理转发表项对应的已有转发表项进行兼容性处理,得到经过兼容处理的转发表项。
发送模块41,还用于将经过兼容处理的转发表项和无法被兼容的转发表项发送给线卡转发芯片。
在一些实例中,第二处理模块41具体用于通过预留字段的方式根据待兼容处理转发表项对待兼容处理转发表项对应的已有转发表项进行兼容性处理。
在一些实例中,第二处理模块41具体用于通过除预留字段以外的其他兼容编码的方式根据待兼容处理转发表项对待兼容处理转发表项对应的已有转发表项进行兼容性处理。
在一些实例中,第二处理模块41具体用于:
获取待兼容处理转发表项和待兼容处理转发表项对应的已有转发表项每一行之间的不同字段。
在待兼容处理转发表项对应的已有转发表项的每一行字段后面增加预留字段。
用获得的每一行之间的的不同字段填充在对应行的预留字段中。
在一一些实例中,除预留字段以外的其他兼容编码的方式包括:TLV编码、Google Protobuf、JSON和XML。
本发明实施例提供的线卡控制芯片,由于微码版本升级信息在线卡转发单元的备指令空间中进行加载,主指令空间中的微码版本可以正常进行业务转发,因此避免了因加载微码版本升级信息而引起的业务转发中断,提高了业务的转发效率。
在实际应用中,所述第二处理模块41和发送模块42均位于线卡控制芯片中的CPU、MPU、DSP或FPGA等实现。
本发明实施例还提供一种线卡,如图5所示,包括:线卡控制芯片和线卡转发芯片。其中,线卡控制芯片和线卡转发芯片可以独立复位,也即线卡控制芯片复位不会影响线卡转发芯片正常转发业务报文。线卡控制芯片负责根据主控板下发的业务配置数据生成转发表项下发给线卡转发芯片,线卡转发芯片根据转发表项进行业务报文转发。具体过程如下:
首先、主控板上传微码版本升级信息到自身的版本库;主控板向线卡控制芯片发送升级复位命令。
其次、线卡控制芯片接收到升级复位命令后,进行当前业务配置数据的备份;线卡控制芯片触发复位,重新上电后向主控板获取微码版本升级信息并发送给线卡转发芯片运行;线卡控制芯片从备份中获取业务配置数据,重新计算转发表项。
在一些实例中,线卡控制芯片通过版本号标识转发表项的具体情况,以使线卡转发芯片能够根据版本号的不同确定该如何处理转发表项。例如,线卡转发芯片通过大版本号的不同标识确定微码版本无法兼容,加载升级的微码版本需要刷新全部转发表项;通过中版本号的不同标识确定转发表项无法兼容,在预留的转发表项存储空间(对应上述实施例中的第二转发表项存储空间)存储转发表项;通过小版本号的不同标识确定转发表项能够兼容,重新计算的转发表项数据可以覆盖当前转发表项数据。
在一些实例中,假设未升级时用于存储转发表项的存储空间的结构如图6所示,已有转发表项存储在第一转发表项存储空间中,此时第二转发表项存储空间为空。当进行第一次微码升级,假设重新计算的转发表项C、转发表项E、和转发表项F发生了变化,其中重新计算的转发表项C(属于上述实施例中的待兼容处理转发表项)能够由已有转发表项C(版本号为V 1.1.1)经过兼容性处理得到兼容的转发表项C(版本号为V 1.1.2)(属于上述实施例中的经过兼容处理的转发表项),重新计算的转发表项E(属于上述实施例中的待兼容处理转发表项)能够由已有转发表项E(版本号为V 1.1.1)经过兼容性处理得到兼容的转发表项E(版本号为V 1.1.2)(属于上述实施例中的经过兼容处理的转发表项),重新计算的转发表项F(版本号为V 1.2.1)无法被兼容(属于上述实施例中的无法被兼容的转发表项),因此线卡转发芯片在第一转发表项存储空间中将转发表项C(版本号为V 1.1.2)覆盖已有转发表项C(版本号为V 1.1.1),将转发表项E(版本号为V 1.1.2)覆盖已有转发表项E(版本号为V 1.1.1),将转发表项F(版本号为V 1.2.1)存储在第二转发表项存储空间中,存储空间的结构如图7所示。当进行第二次微码升级,假设重新计算的转发表项B、转发表项C、和转发表项E发生了变化,其中重新计算的转发表项B(属于上述实施例中的待兼容处理转发表项)能够由已有转发表项B(版本号为V 1.1.1)经过兼容性处理得到兼容的转发表项B(版本号为V 1.1.2)(属于上述实施例中的经过兼容处理的转发表项),重新计算的转发表项C(属于上述实施例中的待兼容处理转发表项)能够由已有转发表项C(版本号为V 1.1.2)经过兼容性处理得到兼容的转发表项C(版本号为V 1.1.3)(属于上述实施例中的经过兼容处理的转发表项),重新计算的转发表项E(版本号为V1.2.1)无法被兼容(属于上述实施例中的无法被兼容的转发表项),因此线卡转发芯片在第一转发表项存储空间中将转发表项B(版本号为V 1.1.2)覆盖已有转发表项B(版本号为V 1.1.1),将转发表项C(版本号为V 1.1.3)覆盖已有转发表项C(版本号为V 1.1.2),将转发表项E(版本号为V 1.2.1)存储在第二转发表项存储空间中,存储空间的结构如图8所示。当进行第三次微码升级,假设重新计算的转发表项与已有的转发表项都不同,因此所有转发表项的大版本号发生改变,线卡转发芯片进行全部刷新,存储空间的结构如图9所示。因此对转发表项的处理方式与不同版本号的对应关系可以如图如下表1所示:
Figure PCTCN2020097549-appb-000001
Figure PCTCN2020097549-appb-000002
表1
在一些实例中,微码的每一次升级,线卡转发芯片都进行主备指令空间的切换,微码从图6升级到图7,线卡转发芯片从主指令空间切换至备指令空间,微码从图7升级到图8,线卡转发芯片从备指令空间切换至主指令空间,微码从图8升级到图9,线卡转发芯片从主指令空间切换至备指令空间。
在一些实例中,转发表项的兼容可以通过预留字段的方式实现,所生成的兼容的转发表项需要满足一下要求:不能删除字段,只能将该字段废弃;新增字段只能增加在末尾,中间不能插入字段;如果需要对字段进行扩充修改(比如BYTE修改为INT),需要按照新增字段的方式在尾部增加,但是需要保留原字段的值(给老版本使用)。
在一些实例中,以预留字段的方式进行表项兼容的示意图如图10所示。假设表项只有一行字段,预留字段为64bit,以这行字段的不同版本号为例进行说明,假设包含V 1.1.1、V 1.1.2和V 1.1.3和V 1.2.1,如图10所示,V1.1.2修改字段B(扩充1个字节),V1.1.3增加字段Z。
然后、线卡控制芯片根据大中小三个版本号选择对应的转发表项下发方式,将重新计算的转发表项下发到线卡转发芯片。
最后、线卡转发芯片接收转发表项,并对转发表项进行处理;将微码版本升级信息加载到备指令空间;当前的主指令空间切换至所述备指令空间。
本发明实施例还提供一种线卡,包括:线卡控制芯片以及线卡转发芯片。其中,线卡控制芯片用于获取微码版本升级信息,并将微码版本升级信息发送给线卡转发芯片。
线卡转发芯片用于接收来自线卡控制芯片的微码版本升级信息;在备指令空间加载微码版本升级信息;从主指令空间切换至备指令空间;其中,主指令空间和备指令空间是线卡转发芯片对自身中用于加载微码版本信息的指令空间预先进行划分得到的。
在一些实例中,线卡控制芯片还用于获取业务配置数据,并根据业务配置数据计算转发表项;获取计算得到的转发表项中表项内容与对应的已有转发表项不同的若干个目标转发表项;将目标转发表项发送给线卡转发芯片。
线卡转发芯片还用于接收来自线卡控制芯片的目标转发表项;其中,目标转发表项是表项内容与已有转发表项不同的计算得到的转发表项;存储目标转发表项。
在一些实例中,线卡控制芯片还用于获取业务配置数据,并根据业务配置数据计算转发表项;获取计算得到的转发表项中表项内容与对应的已有转发表项不同的若干个目标转 发表项;从若干个目标转发表项中获取能够由经过兼容性处理的对应的已有转发表项兼容的待兼容处理转发表项,以及无法被兼容的转发表项;根据待兼容处理转发表项对待兼容处理转发表项对应的已有转发表项进行兼容性处理,得到经过兼容处理的转发表项;将经过兼容处理的转发表项和无法被兼容的转发表项发送给线卡转发芯片。
线卡转发芯片还用于接收来自线卡控制芯片的经过兼容处理的转发表项和无法被兼容的转发表项;在用于存储已有转发表项的第一转发表项存储空间中以经过兼容处理的转发表项覆盖对应的已有转发表项;在用于存储与已有转发表项无法兼容的转发表项的第二转发表项存储空间中存储无法被兼容的转发表项;其中,第一转发表项存储空间和第二转发表项存储空间是转发芯片将自身中用于存储转发表项的存储空间按照预设空间比例进行划分得到的。
在一些实例中,预设空间比例包括:第一转发表项存储空间与第二转发表项存储空间的空间比例为9:1。
在一些实例中,线卡控制芯片具体用于通过预留字段的方式根据待兼容处理转发表项对待兼容处理转发表项对应的已有转发表项进行兼容性处理。
在一些实例中,线卡控制芯片具体用于通过除预留字段以外的其他兼容编码的方式根据待兼容处理转发表项对待兼容处理转发表项对应的已有转发表项进行兼容性处理。
在一些实例中,线卡控制芯片具体用于获取待兼容处理转发表项和待兼容处理转发表项对应的已有转发表项每一行之间的不同字段;在待兼容处理转发表项对应的已有转发表项的每一行字段后面增加预留字段;用获得的每一行之间的的不同字段填充在对应行的预留字段中。
在一些实例中,除预留字段以外的其他兼容编码的方式包括:TLV编码、Google Protobuf、JSON和XML。
本发明实施例还提供一种计算机存储介质,其存储有计算机程序,该计算机程序用于执行上述的升级方法。
在本发明的实施例中,由于微码版本升级信息在备指令空间中进行加载,主指令空间中的微码版本可以正常进行业务转发,因此避免了因加载微码版本升级信息而引起的业务转发中断,提高了业务的转发效率。
本发明的实施例能够在备指令空间中加载微码版本升级信息,在主指令空间进行业务转发,因此实现了微码版本升级信息加载和正常业务转发的同步进行,从而提高了业务的转发效率。
虽然本发明实施例所揭露的实施方式如上,但所述的内容仅为便于理解本发明实施例 而采用的实施方式,并非用以限定本发明实施例。任何本发明实施例所属领域内的技术人员,在不脱离本发明实施例所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本发明实施例的专利保护范围,仍须以所附的权利要求书所界定的范围为准。

Claims (12)

  1. 一种微码的升级方法,包括:
    线卡转发芯片接收来自线卡控制芯片的微码版本升级信息;
    所述线卡转发芯片在备指令空间加载所述微码版本升级信息;
    所述线卡转发芯片从主指令空间切换至所述备指令空间;其中,所述主指令空间和所述备指令空间是所述线卡转发芯片对自身中用于加载微码版本信息的指令空间预先进行划分得到的。
  2. 根据权利要求1所述的升级方法,其中,所述线卡转发芯片接收来自线卡控制芯片的微码版本升级信息之后,还包括:
    所述线卡转发芯片接收来自所述线卡控制芯片的目标转发表项;其中,所述目标转发表项是表项内容与已有转发表项不同的计算得到的转发表项;
    所述线卡转发芯片存储所述目标转发表项。
  3. 根据权利要求1所述的升级方法,其中,所述线卡转发芯片接收来自线卡控制芯片的微码版本升级信息之后,还包括:
    所述线卡转发芯片接收来自线卡控制芯片的经过兼容处理的转发表项和无法被兼容的转发表项;其中,所述经过兼容处理的转发表项是当计算得到的转发表项的表项内容与已有转发表项不同,由已有转发表项经过兼容性处理后得到的能够兼容计算得到的转发表项的转发表项,所述无法被兼容的转发表项是表项内容与已有转发表项不同,且无法由已有转发表项进行兼容性处理后兼容的计算得到的转发表项;
    所述线卡转发芯片在用于存储已有转发表项的第一转发表项存储空间中以所述经过兼容处理的转发表项覆盖对应的已有转发表项;
    所述转发芯片在用于存储与已有转发表项无法兼容的转发表项的第二转发表项存储空间中存储所述无法被兼容的转发表项;其中,所述第一转发表项存储空间和所述第二转发表项存储空间是所述转发芯片将自身中用于存储转发表项的存储空间按照预设空间比例进行划分得到的。
  4. 根据权利要求3所述的升级方法,其中,所述预设空间比例包括:所述第一转发表项存储空间与所述第二转发表项存储空间的空间比例为9:1。
  5. 一种微码的升级方法,包括:
    线卡控制芯片获取微码版本升级信息;
    所述线卡控制芯片将所述微码版本升级信息发送给线卡转发芯片,以使所述线卡转发芯片在备指令空间中加载所述微码版本升级信息,并从主指令空间切换至所述备指令空间; 其中,所述主指令空间和所述备指令空间是所述线卡转发芯片对自身中用于加载微码版本信息的指令空间预先进行划分得到的。
  6. 根据权利要求5所述的升级方法,其中,所述线卡控制芯片获取版本升级信息之后,还包括:
    所述线卡控制芯片获取业务配置数据,并根据所述业务配置数据计算转发表项;
    所述线卡控制芯片获取计算得到的转发表项中表项内容与对应的已有转发表项不同的若干个目标转发表项;
    所述线卡控制芯片将所述目标转发表项发送给所述线卡转发芯片。
  7. 根据权利要求5所述的升级方法,其中,所述线卡控制芯片获取版本升级信息之后,还包括:
    所述线卡控制芯片获取业务配置数据,并根据所述业务配置数据计算转发表项;
    所述线卡控制芯片获取计算得到的转发表项中表项内容与对应的已有转发表项不同的若干个目标转发表项;
    所述线卡控制芯片从若干个目标转发表项中获取能够由经过兼容性处理的对应的已有转发表项兼容的待兼容处理转发表项,以及无法被兼容的转发表项;
    所述线卡控制芯片根据所述待兼容处理转发表项对所述待兼容处理转发表项对应的已有转发表项进行兼容性处理,得到经过兼容处理的转发表项;
    所述线卡控制芯片将经过兼容处理的转发表项和无法被兼容的转发表项发送给所述线卡转发芯片。
  8. 根据权利要求7所述的升级方法,其中,所述线卡控制芯片根据待兼容处理转发表项对待兼容处理转发表项对应的已有转发表项进行兼容性处理,包括:
    所述线卡控制芯片通过预留字段的方式根据所述待兼容处理转发表项对所述待兼容处理转发表项对应的已有转发表项进行兼容性处理;
    或者,
    所述线卡控制芯片通过除预留字段以外的其他兼容编码的方式根据所述待兼容处理转发表项对所述待兼容处理转发表项对应的已有转发表项进行兼容性处理。
  9. 根据权利要求8所述的升级方法,其中,所述线卡控制芯片通过预留字段的方式根据待兼容处理转发表项对待兼容处理转发表项对应的已有转发表项进行兼容性处理,包括:
    所述线卡控制芯片获取所述待兼容处理转发表项和所述待兼容处理转发表项对应的已有转发表项每一行之间的不同字段;
    所述线卡控制芯片在所述待兼容处理转发表项对应的已有转发表项的每一行字段后 面增加所述预留字段;
    所述线卡控制芯片用获得的每一行之间的不同字段填充在对应行的所述预留字段中。
  10. 根据权利要求8所述的升级方法,其中,所述除预留字段以外的其他兼容编码的方式包括:类型长度值TLV编码、编解码框架Google Protobuf、直译式脚本语言对象标记JSON和可扩展标记语言XML。
  11. 一种线卡,包括:线卡控制芯片以及线卡转发芯片;
    其中,所述线卡控制芯片用于获取微码版本升级信息,并将所述微码版本升级信息发送给线卡转发芯片;
    所述线卡转发芯片用于接收来自线卡控制芯片的微码版本升级信息;在备指令空间加载所述微码版本升级信息;从主指令空间切换至所述备指令空间;其中,所述主指令空间和所述备指令空间是所述线卡转发芯片对自身中用于加载微码版本信息的指令空间预先进行划分得到的。
  12. 一种计算机存储介质,其存储有计算机程序,所述计算机程序用于执行权利要求1-10任一项所述的升级方法。
PCT/CN2020/097549 2019-07-08 2020-06-22 一种微码的升级方法及装置 WO2021004265A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910611232.3 2019-07-08
CN201910611232.3A CN112199100A (zh) 2019-07-08 2019-07-08 一种微码的升级方法及装置

Publications (1)

Publication Number Publication Date
WO2021004265A1 true WO2021004265A1 (zh) 2021-01-14

Family

ID=74004280

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/097549 WO2021004265A1 (zh) 2019-07-08 2020-06-22 一种微码的升级方法及装置

Country Status (2)

Country Link
CN (1) CN112199100A (zh)
WO (1) WO2021004265A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185587B (zh) * 2021-12-13 2023-08-25 平安壹账通云科技(深圳)有限公司 微码升级方法、装置、设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040209587A1 (en) * 2000-06-12 2004-10-21 Broadcom Corporation Wireless data communications using FIFO for synchronization memory
CN1968153A (zh) * 2006-10-25 2007-05-23 华为技术有限公司 一种热升级网络处理器的方法及装置
CN101561760A (zh) * 2008-04-14 2009-10-21 环隆电气股份有限公司 接口卡固件升级方法
CN101729428A (zh) * 2010-01-07 2010-06-09 中兴通讯股份有限公司 微码切换方法和装置
CN102104546A (zh) * 2011-02-23 2011-06-22 中兴通讯股份有限公司 一种转发表的同步方法及系统
CN103986660A (zh) * 2014-05-30 2014-08-13 华为技术有限公司 加载微码的装置以及加载微码的方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040209587A1 (en) * 2000-06-12 2004-10-21 Broadcom Corporation Wireless data communications using FIFO for synchronization memory
CN1968153A (zh) * 2006-10-25 2007-05-23 华为技术有限公司 一种热升级网络处理器的方法及装置
CN101561760A (zh) * 2008-04-14 2009-10-21 环隆电气股份有限公司 接口卡固件升级方法
CN101729428A (zh) * 2010-01-07 2010-06-09 中兴通讯股份有限公司 微码切换方法和装置
CN102104546A (zh) * 2011-02-23 2011-06-22 中兴通讯股份有限公司 一种转发表的同步方法及系统
CN103986660A (zh) * 2014-05-30 2014-08-13 华为技术有限公司 加载微码的装置以及加载微码的方法

Also Published As

Publication number Publication date
CN112199100A (zh) 2021-01-08

Similar Documents

Publication Publication Date Title
US11868785B2 (en) Application program page processing method and device
US10929942B2 (en) Screen capture method, terminal, and storage medium employing both parent application program and sub-application program
US10592135B2 (en) Peer to peer volume extension in a shared storage environment
EP3951595A1 (en) Method and apparatus for graphics rendering
CN106874328B (zh) 一种数据处理方法和设备
CN109213462B (zh) Android横竖屏数据同步方法、装置、终端及可读介质
US20130138934A1 (en) Loading configuration information
US20220231926A1 (en) Standardized format for containerized applications
US20160246516A1 (en) Data Operation Method and Device
CN108509215B (zh) 一种系统软件的更换方法、装置、终端设备及存储介质
US9804878B2 (en) Using a status indicator for a merge operation for writing data associated with a virtual machine
CN103747080A (zh) 一种文件上传方法及系统
WO2021004265A1 (zh) 一种微码的升级方法及装置
CN104461404A (zh) 元数据存储方法、装置以及系统
WO2017045410A1 (zh) 一种在分页模型中动态加载数据的方法及装置
CN113467719A (zh) 数据写入方法及装置
CN111506388A (zh) 容器性能探测方法、容器管理平台及计算机存储介质
CN111309424A (zh) 一种页面还原方法及相关设备
US20160182605A1 (en) Dynamic Content Aggregation
US10678453B2 (en) Method and device for checking false sharing in data block deletion using a mapping pointer and weight bits
US20180373512A1 (en) Method and device for simulating synchronous blocking in asynchronous environment, storage medium, server and terminal
CN113191136B (zh) 数据处理方法及装置
CN112783982B (zh) 数据处理方法、装置、系统、计算机设备和存储介质
CN111090701B (zh) 业务请求处理方法、装置、可读存储介质和计算机设备
CN114816482A (zh) 块存储服务的升级方法、装置、计算机设备及存储介质

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: 20837617

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 14/06/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20837617

Country of ref document: EP

Kind code of ref document: A1