[go: up one dir, main page]

CN116155706A - Method, device, equipment and medium for managing table operation information of forwarding chip - Google Patents

Method, device, equipment and medium for managing table operation information of forwarding chip Download PDF

Info

Publication number
CN116155706A
CN116155706A CN202310176917.6A CN202310176917A CN116155706A CN 116155706 A CN116155706 A CN 116155706A CN 202310176917 A CN202310176917 A CN 202310176917A CN 116155706 A CN116155706 A CN 116155706A
Authority
CN
China
Prior art keywords
operation information
entry
forwarding chip
container
table item
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.)
Granted
Application number
CN202310176917.6A
Other languages
Chinese (zh)
Other versions
CN116155706B (en
Inventor
邢家茂
李贯中
陈清华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Clounix Technology Ltd
Original Assignee
Hangzhou Clounix Technology Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Clounix Technology Ltd filed Critical Hangzhou Clounix Technology Ltd
Priority to CN202310176917.6A priority Critical patent/CN116155706B/en
Publication of CN116155706A publication Critical patent/CN116155706A/en
Application granted granted Critical
Publication of CN116155706B publication Critical patent/CN116155706B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • G06F16/24578Query processing with adaptation to user needs using ranking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9005Buffering arrangements using dynamic buffer space allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/901Buffering arrangements using storage descriptor, e.g. read or write pointers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9063Intermediate storage in different physical parts of a node or terminal

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Fuzzy Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例提供一种转发芯片的表项操作信息管理方法、装置、设备及介质,方法包括:接收网络操作系统下发的表项操作信息,由表项下发线程将表项操作信息记录到当前活动的操作信息容器;其中,所述表项操作信息以层次化的方式进行存储,且包含操作类型、表项数目、转发芯片ID、表项ID、操作结果、各个表项内容、各个表项结果、操作开始时间、操作结束时间以及操作效率等;在当前操作信息容器记录满后,切换当前活动的操作信息容器,由消费者将记录满的操作信息容器中的内容以约定格式输出;清除所述操作信息容器中的内容。本发明可对转发芯片的表项操作信息进行高效的管理,可用于网络设备的功能问题和性能问题的定位分析,具有较强的实际应用意义。

Figure 202310176917

An embodiment of the present invention provides a method, device, device, and medium for managing entry operation information of a forwarding chip. The method includes: receiving entry operation information issued by a network operating system, and recording the entry operation information by an entry delivery thread To the currently active operation information container; wherein, the entry operation information is stored in a hierarchical manner, and includes the operation type, the number of entries, the forwarding chip ID, the entry ID, the operation result, the content of each entry, each Table item results, operation start time, operation end time, and operation efficiency, etc.; after the current operation information container is full, switch the currently active operation information container, and the consumer will output the contents of the full operation information container in the agreed format ; Clear the contents of the operation information container. The invention can efficiently manage the table item operation information of the forwarding chip, can be used for the positioning and analysis of the functional problems and performance problems of the network equipment, and has strong practical application significance.

Figure 202310176917

Description

转发芯片的表项操作信息管理方法、装置、设备及介质Table item operation information management method, device, equipment and medium of forwarding chip

技术领域technical field

本发明涉及计算机技术领域,具体而言,涉及一种转发芯片的表项操作信息管理方法、装置、设备及介质。The present invention relates to the field of computer technology, in particular, to a method, device, device and medium for managing information on table entry operation of a forwarding chip.

背景技术Background technique

随着5G、物联网、大数据、云计算和AI等创新应用的演进发展,网络传输的数据流量迅猛增长,数据中心网络也面临着越来越大的挑战。如图1所示,数据中心网络连接着通用计算区、存储区和高性能计算区,是数据中心算力持续稳定输出的重要保证。网络设备作为数据中心网络的核心部件,其功能和性能直接关系到数据中心网络的质量。数据中心网络要求具有智能高效的运维能力,即在网络发生故障后,尽快恢复网络业务传输,同时快速定位到故障根因;在网络传输性能下降时,可通过便捷的手段排查网络性能劣化原因,及时精准的进行网络性能优化。With the evolution and development of innovative applications such as 5G, the Internet of Things, big data, cloud computing, and AI, the data traffic transmitted by the network is increasing rapidly, and the data center network is also facing increasing challenges. As shown in Figure 1, the data center network connects the general-purpose computing area, storage area, and high-performance computing area, which is an important guarantee for the continuous and stable output of data center computing power. Network equipment is the core component of the data center network, and its function and performance are directly related to the quality of the data center network. The data center network requires intelligent and efficient operation and maintenance capabilities, that is, after a network failure occurs, the network service transmission can be restored as soon as possible, and the root cause of the failure can be quickly located; when the network transmission performance declines, the cause of network performance degradation can be checked through convenient means , timely and accurately optimize network performance.

在网络故障发生后,开发维护人员拿到的往往只是一个故障现场,而很多故障现象是次生故障,只有追寻到第一个故障产生的原因,方可进行问题的定位解决。产生故障前的操作过程和操作结果,对问题的复现、定位、解决尤为重要。网络设备的操作效率直接影响着网络传输的功能和性能,也是开发和维护人重点关注的方面。在网络传输性能劣化时,需要有一种分析网络设备承载性能下降原因的便捷手段,进而给出网络传输性能优化的解决方案。After a network failure occurs, development and maintenance personnel often get only a failure site, and many failure phenomena are secondary failures. Only by tracing the cause of the first failure can they locate and solve the problem. The operation process and operation results before the fault occurs are particularly important for the recurrence, location, and resolution of the problem. The operating efficiency of network equipment directly affects the function and performance of network transmission, and it is also an aspect that developers and maintainers focus on. When the network transmission performance is degraded, it is necessary to have a convenient means to analyze the reasons for the degradation of network equipment bearer performance, and then provide a solution to optimize the network transmission performance.

如图2所示,网络设备通常包含以下几类器件:负责转发数据的转发芯片,负责管控系统运行的CPU,提供CPU侧管理功能的网卡,内存和硬盘等存储器件,风扇和电源等外围硬件。转发芯片负责网络设备底层数据报文的交换转发,是网络设备最核心的部件。网络设备的所有业务操作,都转换为转发芯片的表项操作。转发芯片的各种表项操作的功能和性能,与网络设备的功能和性能息息相关。As shown in Figure 2, network devices usually include the following types of devices: a forwarding chip responsible for forwarding data, a CPU responsible for controlling the operation of the system, a network card providing CPU-side management functions, storage devices such as memory and hard disks, and peripheral hardware such as fans and power supplies . The forwarding chip is responsible for the exchange and forwarding of the underlying data packets of the network equipment, and is the core component of the network equipment. All business operations of network devices are converted into table entry operations of forwarding chips. The functions and performances of various table entry operations of the forwarding chip are closely related to the functions and performances of network devices.

数据中心网络设备的转发芯片,ACL、MAC、等表项资源均具有较大的规格。定位网络设备的功能问题或性能问题时,均需要对转发芯片的各类表项操作进行记录和细致分析。然而当前网络设备的实现中,缺少专门对转发芯片的表项操作进行记录和分析的方案,导致对问题的定位不够快速准确。The forwarding chip of the data center network equipment, ACL, MAC, and other table item resources have relatively large specifications. When locating functional problems or performance problems of network devices, it is necessary to record and analyze the operations of various entries of the forwarding chip. However, in the implementation of the current network equipment, there is a lack of a solution for recording and analyzing the table entry operations of the forwarding chip, which leads to insufficient fast and accurate positioning of the problem.

发明内容Contents of the invention

有鉴于此,本发明的目的在于提供一种转发芯片的表项操作信息管理法、装置、设备及介质,以改善上述问题。In view of this, the object of the present invention is to provide a method, device, equipment and medium for managing information on table entry operation of a forwarding chip, so as to improve the above problems.

本发明实施例提供了一种转发芯片的表项操作信息管理方法,其包括:An embodiment of the present invention provides a method for managing information on entry operation of a forwarding chip, which includes:

接收网络操作系统下发的表项操作信息,由表项下发线程将表项操作信息记录到当前活动的操作信息容器;其中,所述表项操作信息以层次化的方式进行存储,且包含操作类型、表项数目、转发芯片ID、表项ID、操作结果、各个表项内容、各个表项结果、操作开始时间、操作结束时间以及操作效率;Receive entry operation information issued by the network operating system, and record the entry operation information into the currently active operation information container by the entry delivery thread; wherein, the entry operation information is stored in a hierarchical manner, and includes Operation type, number of entries, forwarding chip ID, entry ID, operation result, content of each entry, result of each entry, operation start time, operation end time, and operation efficiency;

在当前操作信息容器记录满后,切换当前活动的操作信息容器,由消费者将记录满的操作信息容器中的内容以约定格式输出;After the current operation information container is full, switch the currently active operation information container, and the consumer will output the contents of the full operation information container in the agreed format;

清除所述操作信息容器中的内容。Clear the contents of the operation information container.

优选地,所述消费者包括表项操作信息写文件线程以及命令行查看表项操作信息线程。Preferably, the consumer includes a file thread for writing entry operation information and a command line thread for viewing entry operation information.

优选地,表项操作信息管理的存储架构包括四个级别:Preferably, the storage architecture of entry operation information management includes four levels:

第一级包括TableOperLogSys,其是整个表项操作信息系统;The first level includes TableOperLogSys, which is the entire table entry operation information system;

第二级包括SubSys1_OperLogBase,其是转发芯片的某个具体功能子系统的表项操作信息库;The second level includes SubSys1_OperLogBase, which is the entry operation information base of a specific functional subsystem of the forwarding chip;

第三级包括Table1_OperLogContainer,其是具体表项的操作信息容器,第三级还有子系统的表项操作属性信息;The third level includes Table1_OperLogContainer, which is the operation information container of specific table items, and the third level also includes the table item operation attribute information of the subsystem;

第四级包括OperRecordArray,用来以数值的方式存储具体的表项操作信息,数组的大小M根据转发芯片的具体表项规格、网络设备的实际定义表项规格、以及系统当前可用内存资源设定。The fourth level includes OperRecordArray, which is used to store specific entry operation information in a numerical manner. The size M of the array is set according to the specific entry specification of the forwarding chip, the actual definition entry specification of the network device, and the current available memory resources of the system. .

优选地,在第三级的Route_OperLogContainer中,定义了主用和备用两个操作信息容器。主用操作信息容器记录满了之后,进行主备切换;Preferably, in the third-level Route_OperLogContainer, two operational information containers, the active one and the standby one, are defined. After the records of the active operation information container are full, perform active-standby switchover;

若备用操作信息容器未写文件完成,则不执行主备切换,直接复用原来的当前活动容器继续记录;待备用操作信息容器写文件完成后,继续进行主备容器的切换。If the standby operation information container has not finished writing the file, the master-standby switchover will not be performed, and the original current active container will be directly reused to continue recording; after the standby operation information container has finished writing the file, continue the switchover of the master-standby container.

优选地,在第四级的OperRecordPool中,预先创建N个表项内容空间的内存池表项操作信息的表项内容字段指向从资源池分配的内存块,从而将转发芯片表项内容对应内存的申请释放转换为内存池单元的申请释放。Preferably, in the OperRecordPool of the fourth level, the entry content field of the memory pool entry operation information of N table entry content spaces is pre-created to point to the memory block allocated from the resource pool, so that the content of the forwarding chip entry corresponds to the memory block The application release is converted to the application release of the memory pool unit.

优选地,在第四级还包含表项操作记录的当前索引属性信息。Preferably, the fourth level also includes the current index attribute information of the entry operation record.

优选地,对于表项操作信息中字符串记录的数据,采用枚举定义格式;对字符串的转化输出操作,放到对操作效率关注低的表项操作信息输出流程中实现。Preferably, the enumeration definition format is used for the data recorded in the string records in the entry operation information; the conversion and output operation of the strings is implemented in the entry operation information output process that pays little attention to operation efficiency.

本发明实施例还提供了一种转发芯片的表项操作信息管理装置,其包括:The embodiment of the present invention also provides an entry operation information management device of a forwarding chip, which includes:

记录单元,用于接收网络操作系统下发的表项操作信息,由表项下发线程将表项操作信息记录到当前活动的操作信息容器;其中,所述表项操作信息以层次化的方式进行存储,且包含操作类型、表项数目、转发芯片ID、表项ID、操作结果、各个表项内容、各个表项结果、操作开始时间、操作结束时间以及操作效率;The recording unit is configured to receive entry operation information issued by the network operating system, and the entry delivery thread records the entry operation information into the currently active operation information container; wherein, the entry operation information is in a hierarchical manner Store, and include operation type, number of entries, forwarding chip ID, entry ID, operation result, content of each entry, result of each entry, operation start time, operation end time, and operation efficiency;

输出单元,用于在当前操作信息容器记录满后,切换当前活动的操作信息容器,由消费者将记录满的操作信息容器中的内容以约定格式输出;The output unit is used to switch the currently active operation information container after the current operation information container is full, and the consumer outputs the contents of the full operation information container in the agreed format;

清除单元,用于清除所述操作信息容器中的内容。A clearing unit, configured to clear the content in the operation information container.

本发明实施例还提供了一种转发芯片的表项操作信息管理设备,其特征在于,包括存储器以及处理器,所述存储器内存储有计算机程序,所述计算机程序能够被所述处理器执行,以实现如上述的转发芯片的表项操作信息管理方法。The embodiment of the present invention also provides a forwarding chip entry operation information management device, which is characterized in that it includes a memory and a processor, and a computer program is stored in the memory, and the computer program can be executed by the processor. In order to realize the above-mentioned method for managing table entry operation information of the forwarding chip.

本发明实施例还提供了一种计算机可读存储介质,其储有计算机程序,所述计算机程序能够被所述计算机可读存储介质所在设备的处理器执行,以实现如上述的转发芯片的表项操作信息管理方法。The embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program, and the computer program can be executed by the processor of the device where the computer-readable storage medium is located, so as to realize the expression of the above-mentioned forwarding chip Item operation information management method.

综上所述,本实施例通过定义了转发芯片的表项操作信息的记录格式,用于对转发芯片的各种表项操作功能和性能信息进行全过程记录;同时设计了一种表项操作信息存储管理的方案,用于对各种芯片表项的操作信息进行格式化存储,如此可快速获取指定格式的表项操作序列文件,便捷用于网络故障的过程分析和复现定位。To sum up, this embodiment defines the record format of the table entry operation information of the forwarding chip, which is used to record the various table entry operation functions and performance information of the forwarding chip in the whole process; at the same time, a table entry operation is designed The information storage management solution is used to format and store the operation information of various chip table items, so that the table item operation sequence file in the specified format can be quickly obtained, which is convenient for process analysis and recurring positioning of network faults.

本实施例可用于故障的定位分析场景,抓取到故障设备的转发芯片表项操作信息后,可用于直接的故障分析和定位。本实施例同时也可用于疑难故障的复现定位分析,因实验室环境通常与网络系统的实际部署环境存在差异,准确的转发芯片表项操作序列,对疑难故障的便捷准确复现,以及进一步的定位解决尤为重要。转发芯片的表项操作信息中包含操作效率信息,可非常迅速找到性能瓶颈,本实施例同样可用于网络设备的性能优化场景。This embodiment can be used in a fault location analysis scenario, and can be used for direct fault analysis and location after capturing the forwarding chip entry operation information of the faulty device. This embodiment can also be used for the recurrence and location analysis of difficult faults, because the laboratory environment is usually different from the actual deployment environment of the network system, the accurate forwarding chip table item operation sequence, the convenient and accurate recurrence of difficult faults, and further The positioning solution is particularly important. The entry operation information of the forwarding chip includes operation efficiency information, which can quickly find performance bottlenecks. This embodiment can also be used in performance optimization scenarios of network devices.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention, and thus It should be regarded as a limitation on the scope, and those skilled in the art can also obtain other related drawings based on these drawings without creative work.

图1是现有的数据中心网络架构图。FIG. 1 is an architecture diagram of an existing data center network.

图2是现有的网络设备架构框图。FIG. 2 is a block diagram of an existing network device architecture.

图3是本发明第一实施例提供的转发芯片的表项操作信息管理方法的流程示意图。Fig. 3 is a schematic flowchart of a method for managing operation information of an entry of a forwarding chip according to the first embodiment of the present invention.

图4是本发明实施例提供的转发芯片的表项操作信息管理架构图。Fig. 4 is an architecture diagram of table item operation information management of a forwarding chip provided by an embodiment of the present invention.

图5是本发明实施例提供的路由表项操作信息具体管理架构图。FIG. 5 is a specific management architecture diagram of routing entry operation information provided by an embodiment of the present invention.

图6是本发明第二实施例提供的转发芯片的表项操作信息管理装置的结构示意图。FIG. 6 is a schematic structural diagram of an apparatus for managing entry operation information of a forwarding chip according to a second embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

为了更好的理解本发明的技术方案,下面结合附图对本发明实施例进行详细描述。In order to better understand the technical solutions of the present invention, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

应当明确,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。It should be clear that the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。Terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. As used in the embodiments of the present invention and the appended claims, the singular forms "a", "said" and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.

下面结合附图与具体实施方式对本发明作进一步详细描述:Below in conjunction with accompanying drawing and specific embodiment the present invention is described in further detail:

请参阅图3,本发明第一实施例提供了一种转发芯片的表项操作信息管理方法,其可由转发芯片的表项操作信息管理设备(以下简称管理设备)来执行,特别的,由所述管理设备内的一个或者多个处理器来执行,以至少实现如下步骤:Please refer to FIG. 3 , the first embodiment of the present invention provides a method for managing table entry operation information of a forwarding chip, which can be executed by a table entry operation information management device (hereinafter referred to as the management device) of the forwarding chip, in particular, by the Executed by one or more processors in the management device, so as to at least implement the following steps:

S101,接收网络操作系统下发的表项操作信息,由表项下发线程将表项操作信息记录到当前活动的操作信息容器;其中,所述表项操作信息以层次化的方式进行存储,且包含操作类型、表项数目、转发芯片ID、表项ID、操作结果、各个表项内容、各个表项结果、操作开始时间、操作结束时间以及操作效率。S101. Receive entry operation information issued by the network operating system, and record the entry operation information into the currently active operation information container by the entry delivery thread; wherein, the entry operation information is stored in a hierarchical manner, And includes operation type, number of entries, forwarding chip ID, entry ID, operation result, content of each entry, result of each entry, operation start time, operation end time and operation efficiency.

在本实施例中,所述管理设备可为网络设备,基于此,本实施例的方法可在网络设备的驱动平台层实现,也可在网络设备的转发芯片SDK层中实现。In this embodiment, the management device may be a network device. Based on this, the method of this embodiment may be implemented at the driver platform layer of the network device, or at the forwarding chip SDK layer of the network device.

在本实施例中,转发芯片的表项下发线程是操作信息的生产者,其用于接收网络操作系统下发的表项操作信息,将表项操作信息记录到当前活动的操作信息容器中。In this embodiment, the entry sending thread of the forwarding chip is the producer of operation information, which is used to receive the entry operation information issued by the network operating system, and record the entry operation information into the currently active operation information container .

其中,在本实施例中,为便于表项操作信息的组织管理,采用层次化的管理架构,具体如图4所示。Wherein, in this embodiment, in order to facilitate the organization and management of entry operation information, a hierarchical management structure is adopted, as shown in FIG. 4 .

图4中,表项操作信息的管理架构主要有四个级别。第一级的TableOperLogSys是整个表项操作信息系统。第二级的SubSys1_OperLogBase是转发芯片的某个具体功能子系统的表项操作信息库。第三级的Table1_OperLogContainer是具体表项的操作信息容器,第三级还有子系统的表项操作属性信息。第四级的OperRecordArray,用来存储具体的表项操作信息,数组的大小M根据转发芯片的具体表项规格、网络设备的实际定义表项规格、以及系统当前可用内存资源设定。In Fig. 4, the management structure of entry operation information mainly has four levels. The first-level TableOperLogSys is the entire table item operation information system. The second-level SubSys1_OperLogBase is an entry operation information base of a specific functional subsystem of the forwarding chip. The Table1_OperLogContainer of the third level is the operation information container of the specific table item, and the third level also has the table item operation attribute information of the subsystem. The fourth-level OperRecordArray is used to store specific entry operation information. The size M of the array is set according to the specific entry specification of the forwarding chip, the actual definition entry specification of the network device, and the current available memory resources of the system.

其中,第四级的OperRecordPool预先创建N个表项内容空间的内存池,N参照数组大小M和系统当前可用内存大小设定。表项操作信息的表项内容字段指向从资源池分配的内存块,将转发芯片表项内容对应内存的申请释放转换为内存池单元的申请释放,以减少表项内容存储空间频繁申请释放的耗时,提高表项操作信息记录的效率。Among them, the OperRecordPool of the fourth level pre-creates a memory pool of N table item content spaces, and N refers to the size of the array M and the current available memory size of the system. The entry content field of the entry operation information points to the memory block allocated from the resource pool, and the application release of the corresponding memory of the forwarding chip entry content is converted into the application release of the memory pool unit, so as to reduce the consumption of frequent application release of the storage space of the entry content. , improve the efficiency of entry operation information recording.

在本实施例中,如表1所示,表项操作信息具体包含操作类型、表项数目、转发芯片ID、表项ID、操作结果、各个表项内容、各个表项结果、操作开始时间、操作结束时间、以及操作效率等,可根据需要进行操作信息字段的增删。In this embodiment, as shown in Table 1, the entry operation information specifically includes the operation type, the number of entries, the forwarding chip ID, the entry ID, the operation result, the content of each entry, the result of each entry, the operation start time, Operation end time, operation efficiency, etc., can be added or deleted according to the needs of the operation information field.

转发芯片的各个表项对外提供的接口有——create、remove、set、get、bulk_create、bulk_remove、bulk_set、bulk_get等,对应着各种不同的操作类型。表项数目用于指示该项操作管理的转发芯片表项的数目。转发芯片ID用于多芯片的解决方案中。表项ID用于指定表项索引的操作,多表项的bulk操作中表项ID指向ID数组。操作结果一般定义为枚举类型,指示整个操作的结果。表项内容用于指向转发芯片表项数组。各个表项结果也是一个枚举类型,用于指示各个具体表项的操作执行结果。开始时间、结束时间和操作效率是表项操作的性能信息字段,可用于分析具体操作的性能,可增加一些时间点用于记录重要操作的耗时信息。The interfaces provided by each entry of the forwarding chip include - create, remove, set, get, bulk_create, bulk_remove, bulk_set, bulk_get, etc., corresponding to various types of operations. The number of entries is used to indicate the number of forwarding chip entries managed by this operation. Forwarding chip ID is used in multi-chip solutions. The entry ID is used to specify the index of the entry. In the bulk operation of multiple entries, the entry ID points to the ID array. The operation result is generally defined as an enumeration type, indicating the result of the entire operation. The entry content is used to point to the forwarding chip entry array. The result of each table item is also an enumeration type, which is used to indicate the operation execution result of each specific table item. The start time, end time, and operation efficiency are the performance information fields of table item operations, which can be used to analyze the performance of specific operations, and some time points can be added to record time-consuming information of important operations.

表1表项操作信息格式定义Table 1 Table item operation information format definition

Figure BDA0004101248180000081
Figure BDA0004101248180000081

其中,为提高数据存储的效率,减少表项操作信息的记录对表项操作效率的影响,表项操作信息的记录格式尽量采用数字格式,尽量减少或避免字符串的记录。字符串的记录可考虑采用枚举定义格式,字符串的转化输出操作,可以放到对操作效率关注较低的表项操作信息输出流程中实现。Among them, in order to improve the efficiency of data storage and reduce the impact of the record of table item operation information on the efficiency of table item operation, the record format of table item operation information should be in digital format as much as possible, and the records of character strings should be reduced or avoided as much as possible. The enumeration definition format can be considered for string records, and the conversion output operation of strings can be implemented in the entry operation information output process that pays less attention to operation efficiency.

为便于对本发明的理解,下面以路由表项操作信息为例,展开阐述转发芯片的路由表项操作信息的存储架构。In order to facilitate the understanding of the present invention, the following takes the operation information of the routing table entry as an example to expand and describe the storage structure of the operation information of the routing table entry of the forwarding chip.

如图5所示,路由表项关联的第二级结构为L3_OperLogBase,管理转发芯片的Layer3相关的表项操作信息;路由表项关联的第三级结构为Route_OperLogContainer,是用于管理路由表项操作信息的容器;路由表项操作管理信息存储在Route_OperRecordArray中,是表1结构的数组。路由表项操作信息单元对应表1中的“各个表项内容”字段,具体指向转发芯片的路由表结构。为提高表项操作信息记录的效率,按路由表项结构为单元,预先申请N个路由表项单元的内存池Route_OperRecordPool。As shown in Figure 5, the second-level structure associated with the routing table item is L3_OperLogBase, which manages the Layer 3 related table item operation information of the forwarding chip; the third-level structure associated with the routing table item is Route_OperLogContainer, which is used to manage the operation of the routing table item Container of information; routing entry operation management information is stored in Route_OperRecordArray, which is an array of Table 1 structure. The routing table entry operation information unit corresponds to the "content of each table entry" field in Table 1, specifically pointing to the routing table structure of the forwarding chip. In order to improve the efficiency of table entry operation information recording, a memory pool Route_OperRecordPool of N routing table entry units is pre-applied according to the routing table entry structure.

S102,在当前操作信息容器记录满后,切换当前活动的操作信息容器,由消费者将记录满的操作信息容器中的内容以约定格式输出。S102, after the current operation information container is full, switch the currently active operation information container, and the consumer outputs the content in the full operation information container in an agreed format.

S103,清除所述操作信息容器中的内容。S103. Clear the content in the operation information container.

在本实施例中,特别的,在记录时,为保证路由表项操作信息的数据一致性,以及提高写文件线程的效率,在Route_OperLogContainer层级,定义了主用和备用两个操作信息容器。主用容器记录满了之后,进行容器的主备切换。In this embodiment, in particular, when recording, in order to ensure the data consistency of the routing entry operation information and improve the efficiency of the file writing thread, at the Route_OperLogContainer level, two operation information containers are defined: primary and backup. After the record of the active container is full, the active/standby switchover of the container is performed.

此外,主备容器的切换还需考虑容错性。若备用操作信息容器未写文件完成,则不执行主备轮转,直接复用原来的当前活动容器继续记录;待备用容器写文件完成后,方继续进行主备容器的切换。In addition, fault tolerance needs to be considered when switching between the active and standby containers. If the standby operation information container has not finished writing the file, the master-standby rotation will not be executed, and the original current active container will be directly reused to continue recording; the standby container will continue to switch after the file is written.

在本实施例中,消费者包括表项操作信息写文件线程、命令行查看表项操作信息线程。以表项操作信息写文件线程为例,其常态化处于阻塞状态,在当前活动的操作信息容器记满之后触发执行,将记录满的容器内容以约定格式输出到文件中,约定的格式可为RAW、XML、JSON等通用文件格式。写文件完成后,同时将已输出到文件的容器内容清空。In this embodiment, the consumer includes a thread for writing table item operation information to a file, and a command line thread for viewing table item operation information. Taking the thread for writing table item operation information as an example, its normalization is in a blocked state, and execution is triggered after the current active operation information container is full, and the content of the full container is output to the file in the agreed format. The agreed format can be Common file formats such as RAW, XML, JSON, etc. After writing the file, the contents of the container that has been output to the file will be emptied at the same time.

同理,对于命令行查看表项操作信息线程,其也是表项操作信息的消费者,支持将当前活动的操作信息容器的表项操作信息以指定的格式向命令行或文件输出。Similarly, for the command line to view the entry operation information thread, it is also a consumer of the entry operation information, and supports outputting the entry operation information of the currently active operation information container to the command line or a file in a specified format.

在本实施例中,在输出文件后,若网络设备发生故障时,开发维护人员可通过该输出的文件获取该网络设备的转发芯片的表项操作信息,从而及时准确定位到故障发生的第一现场,快速进行问题的分析定位。In this embodiment, after the file is output, if the network device fails, the development and maintenance personnel can obtain the entry operation information of the forwarding chip of the network device through the output file, so as to timely and accurately locate the first place where the fault occurs. On-site, quickly analyze and locate problems.

若属于疑难问题,则可根据记录的操作过程精准复现问题,便于开发人员进一步搜集信息,实现高效的问题定位和解决。若有些疑难问题与多个系统的交互相关,当前的表项操作信息文件,记录了表项操作的开始时间和结束时间,可基于该时间对操作序列进行排序,以用于复杂问题的定位复现。If it is a difficult problem, the problem can be accurately reproduced according to the recorded operation process, which is convenient for developers to further collect information and achieve efficient problem location and resolution. If some difficult problems are related to the interaction of multiple systems, the current table item operation information file records the start time and end time of table item operations, and the operation sequence can be sorted based on this time to locate complex problems. now.

转发表项的操作效率与网络设备的性能直接相关,在网络功能优化时,获知表项的操作效率尤为重要。本实施例中,由于表项操作记录中,记录了表项操作的耗时和性能,可非常直观的找到性能瓶颈,进行针对性的分析优化。The operation efficiency of the forwarding entry is directly related to the performance of the network device. When optimizing the network function, it is particularly important to know the operation efficiency of the entry. In this embodiment, since the entry operation record records the time-consuming and performance of the entry operation, performance bottlenecks can be found very intuitively, and targeted analysis and optimization can be performed.

此外,在得到了各个表项的操作信息的文件后,可使用Python等处理语言,将表项操作信息转换为实验室环境设备可接收的格式,用于问题的快速定位复现。可采用CLING环境、THRIFT环境、PYTEST环境等,也可采用定制的环境,实现问题的自动化快速复现。In addition, after obtaining the operation information files of each table item, a processing language such as Python can be used to convert the table item operation information into a format acceptable to the laboratory environment equipment, which can be used for rapid location and reproduction of problems. The CLING environment, THRIFT environment, PYTEST environment, etc. can be used, and a customized environment can also be used to realize automatic and rapid recurrence of problems.

综上所述,本实施例通过定义了转发芯片的表项操作信息的记录格式,用于对转发芯片的各种表项操作功能和性能信息进行全过程记录;同时设计了一种表项操作信息存储管理的方案,用于对各种芯片表项的操作信息进行格式化存储,如此可快速获取指定格式的表项操作序列文件,便捷用于网络故障的过程分析和复现定位。To sum up, this embodiment defines the record format of the table entry operation information of the forwarding chip, which is used to record the various table entry operation functions and performance information of the forwarding chip in the whole process; at the same time, a table entry operation is designed The information storage management solution is used to format and store the operation information of various chip table items, so that the table item operation sequence file in the specified format can be quickly obtained, which is convenient for process analysis and recurring positioning of network faults.

本实施例可用于故障的定位分析场景,抓取到故障设备的转发芯片表项操作信息后,可用于直接的故障分析和定位。本实施例同时也可用于疑难故障的复现定位分析,因实验室环境通常与网络系统的实际部署环境存在差异,准确的转发芯片表项操作序列,对疑难故障的便捷准确复现,以及进一步的定位解决尤为重要。转发芯片的表项操作信息中包含操作效率信息,可非常迅速找到性能瓶颈,本实施例同样可用于网络设备的性能优化场景。This embodiment can be used in a fault location analysis scenario, and can be used for direct fault analysis and location after capturing the forwarding chip entry operation information of the faulty device. This embodiment can also be used for the recurrence and location analysis of difficult faults, because the laboratory environment is usually different from the actual deployment environment of the network system, the accurate forwarding chip table item operation sequence, the convenient and accurate recurrence of difficult faults, and further The positioning solution is particularly important. The entry operation information of the forwarding chip includes operation efficiency information, which can quickly find performance bottlenecks. This embodiment can also be used in performance optimization scenarios of network devices.

请参阅图6,本发明第二实施例还提供了一种转发芯片的表项操作信息管理装置,其包括:Please refer to FIG. 6 , the second embodiment of the present invention also provides a device for managing entry operation information of a forwarding chip, which includes:

记录单元210,用于接收网络操作系统下发的表项操作信息,由表项下发线程将表项操作信息记录到当前活动的操作信息容器;其中,所述表项操作信息以层次化的方式进行存储,且包含操作类型、表项数目、转发芯片ID、表项ID、操作结果、各个表项内容、各个表项结果、操作开始时间、操作结束时间以及操作效率;The recording unit 210 is configured to receive entry operation information issued by the network operating system, and the entry delivery thread records the entry operation information into the currently active operation information container; wherein, the entry operation information is in a hierarchical format It is stored in a specific way, and includes operation type, number of entries, forwarding chip ID, entry ID, operation result, content of each entry, result of each entry, operation start time, operation end time, and operation efficiency;

输出单元220,用于在当前操作信息容器记录满后,切换当前活动的操作信息容器,由消费者将记录满的操作信息容器中的内容以约定格式输出;The output unit 220 is configured to switch the currently active operation information container after the current operation information container is full, and the consumer outputs the contents of the full operation information container in an agreed format;

清除单元230,用于清除所述操作信息容器中的内容。The clearing unit 230 is configured to clear the content in the operation information container.

本发明第三实施例还提供了一种对寄存器地址进行动态映射的设备,其包括存储器以及处理器,所述存储器内存储有计算机程序,所述计算机程序能够被所述处理器执行,以实现如上述的转发芯片的表项操作信息管理方法。The third embodiment of the present invention also provides a device for dynamically mapping register addresses, which includes a memory and a processor, and a computer program is stored in the memory, and the computer program can be executed by the processor to realize Such as the above-mentioned method for managing the operation information of the entry of the forwarding chip.

本发明第四实施例还提供了一种计算机可读存储介质,其存储有计算机程序,所述计算机程序能够被所述计算机可读存储介质所在设备的处理器执行,以实现如上述的转发芯片的表项操作信息管理方法。The fourth embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program, and the computer program can be executed by the processor of the device where the computer-readable storage medium is located, so as to realize the above-mentioned forwarding chip The table entry operation information management method.

在本发明实施例所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置和方法实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本发明的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided by the embodiments of the present invention, it should be understood that the disclosed devices and methods may also be implemented in other ways. The device and method embodiments described above are only illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show possible implementation architectures of devices, methods and computer program products according to multiple embodiments of the present invention, function and operation. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of code that includes one or more Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.

另外,在本发明各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,电子设备,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, an electronic device, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes. . It should be noted that, in this document, the terms "comprising", "comprising" or any other variation thereof are intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (10)

1.一种转发芯片的表项操作信息管理方法,其特征在于,包括:1. A table item operation information management method of a forwarding chip, characterized in that, comprising: 接收网络操作系统下发的表项操作信息,由表项下发线程将表项操作信息记录到当前活动的操作信息容器;其中,所述表项操作信息以层次化的方式进行存储,且包含操作类型、表项数目、转发芯片ID、表项ID、操作结果、各个表项内容、各个表项结果、操作开始时间、操作结束时间以及操作效率;Receive entry operation information issued by the network operating system, and record the entry operation information into the currently active operation information container by the entry delivery thread; wherein, the entry operation information is stored in a hierarchical manner, and includes Operation type, number of entries, forwarding chip ID, entry ID, operation result, content of each entry, result of each entry, operation start time, operation end time, and operation efficiency; 在当前操作信息容器记录满后,切换当前活动的操作信息容器,由消费者将记录满的操作信息容器中的内容以约定格式输出;After the current operation information container is full, switch the currently active operation information container, and the consumer will output the contents of the full operation information container in the agreed format; 清除所述操作信息容器中的内容。Clear the contents of the operation information container. 2.根据权利要求1所述的转发芯片的表项操作信息管理方法,其特征在于,2. The entry operation information management method of the forwarding chip according to claim 1, characterized in that, 所述消费者包括表项操作信息写文件线程以及命令行查看表项操作信息线程。The consumer includes a thread for writing table item operation information to a file and a command line thread for viewing table item operation information. 3.根据权利要求1所述的转发芯片的表项操作信息管理方法,其特征在于,3. The entry operation information management method of the forwarding chip according to claim 1, characterized in that, 表项操作信息管理的存储架构包括四个级别:The storage architecture of entry operation information management includes four levels: 第一级包括TableOperLogSys,其是整个表项操作信息系统;The first level includes TableOperLogSys, which is the entire table entry operation information system; 第二级包括SubSys1_OperLogBase,其是转发芯片的某个具体功能子系统的表项操作信息库;The second level includes SubSys1_OperLogBase, which is the entry operation information base of a specific functional subsystem of the forwarding chip; 第三级包括Table1_OperLogContainer,其是具体表项的操作信息容器,第三级还有子系统的表项操作属性信息;The third level includes Table1_OperLogContainer, which is the operation information container of specific table items, and the third level also includes the table item operation attribute information of the subsystem; 第四级包括OperRecordArray,用来以数组的方式存储具体的表项操作信息,数组的大小M根据转发芯片的具体表项规格、网络设备的实际定义表项规格、以及系统当前可用内存资源设定。The fourth level includes OperRecordArray, which is used to store specific entry operation information in the form of an array. The size M of the array is set according to the specific entry specification of the forwarding chip, the actual definition entry specification of the network device, and the current available memory resources of the system. . 4.根据权利要求3所述的转发芯片的表项操作信息管理方法,其特征在于,4. The entry operation information management method of the forwarding chip according to claim 3, characterized in that, 在第三级的Route_OperLogContainer中,定义了主用和备用两个操作信息容器。主用操作信息容器记录满了之后,进行主备切换;In the third-level Route_OperLogContainer, two operational information containers, the active one and the standby one, are defined. After the records of the active operation information container are full, perform active-standby switchover; 若备用操作信息容器未写文件完成,则不执行主备切换,直接复用原来的当前活动容器继续记录;待备用操作信息容器写文件完成后,继续进行主备容器的切换。If the standby operation information container has not finished writing the file, the master-standby switchover will not be performed, and the original current active container will be directly reused to continue recording; after the standby operation information container has finished writing the file, continue the switchover of the master-standby container. 5.根据权利要求3所述的转发芯片的表项操作信息管理方法,其特征在于,5. The table item operation information management method of the forwarding chip according to claim 3, characterized in that, 在第四级的OperRecordPool中,预先创建N个表项内容空间的内存池表项操作信息的表项内容字段指向从资源池分配的内存块,从而将转发芯片表项内容对应内存的申请释放转换为内存池单元的申请释放。In the fourth-level OperRecordPool, the entry content field of the memory pool entry operation information of N entry content spaces is pre-created to point to the memory block allocated from the resource pool, so that the application for memory corresponding to the content of the forwarding chip entry is released and converted Released for the application of the memory pool unit. 6.根据权利要求3所述的转发芯片的表项操作信息管理方法,其特征在于,在第四级还包含表项操作记录的当前索引属性信息。6. The entry operation information management method of the forwarding chip according to claim 3, wherein the fourth level further includes current index attribute information of entry operation records. 7.根据权利要求3所述的转发芯片的表项操作信息管理方法,其特征在于,对于表项操作信息中字符串记录的数据,采用枚举定义格式;对字符串的转化输出操作,放到对操作效率关注低的表项操作信息输出流程中实现。7. the table item operation information management method of forwarding chip according to claim 3, it is characterized in that, for the data of character string record in table item operation information, adopt enumeration definition format; To the conversion output operation of character string, put It is implemented in the output process of table item operation information that pays little attention to operation efficiency. 8.一种转发芯片的表项操作信息管理装置,其特征在于,包括:8. An entry operation information management device of a forwarding chip, characterized in that it comprises: 记录单元,用于接收网络操作系统下发的表项操作信息,由表项下发线程将表项操作信息记录到当前活动的操作信息容器;其中,所述表项操作信息以层次化的方式进行存储,且包含操作类型、表项数目、转发芯片ID、表项ID、操作结果、各个表项内容、各个表项结果、操作开始时间、操作结束时间以及操作效率;The recording unit is configured to receive entry operation information issued by the network operating system, and the entry delivery thread records the entry operation information into the currently active operation information container; wherein, the entry operation information is in a hierarchical manner Store, and include operation type, number of entries, forwarding chip ID, entry ID, operation result, content of each entry, result of each entry, operation start time, operation end time, and operation efficiency; 输出单元,用于在当前操作信息容器记录满后,切换当前活动的操作信息容器,由消费者将记录满的操作信息容器中的内容以约定格式输出;The output unit is used to switch the currently active operation information container after the current operation information container is full, and the consumer outputs the contents of the full operation information container in the agreed format; 清除单元,用于清除所述操作信息容器中的内容。A clearing unit, configured to clear the content in the operation information container. 9.一种转发芯片的表项操作信息管理设备,其特征在于,包括存储器以及处理器,所述存储器内存储有计算机程序,所述计算机程序能够被所述处理器执行,以实现如权利要求1至7任意一项所述的转发芯片的表项操作信息管理方法。9. An entry operation information management device of a forwarding chip, characterized in that it includes a memory and a processor, wherein a computer program is stored in the memory, and the computer program can be executed by the processor, so as to realize the The entry operation information management method of the forwarding chip described in any one of 1 to 7. 10.一种计算机可读存储介质,其特征在于,存储有计算机程序,所述计算机程序能够被所述计算机可读存储介质所在设备的处理器执行,以实现如权利要求1至7任意一项所述的转发芯片的表项操作信息管理方法。10. A computer-readable storage medium, characterized in that it stores a computer program, and the computer program can be executed by a processor of the device where the computer-readable storage medium is located, so as to implement any one of claims 1 to 7. The table item operation information management method of the forwarding chip.
CN202310176917.6A 2023-02-15 2023-02-15 Method, device, equipment and medium for managing table operation information of forwarding chip Active CN116155706B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310176917.6A CN116155706B (en) 2023-02-15 2023-02-15 Method, device, equipment and medium for managing table operation information of forwarding chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310176917.6A CN116155706B (en) 2023-02-15 2023-02-15 Method, device, equipment and medium for managing table operation information of forwarding chip

Publications (2)

Publication Number Publication Date
CN116155706A true CN116155706A (en) 2023-05-23
CN116155706B CN116155706B (en) 2024-11-05

Family

ID=86361686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310176917.6A Active CN116155706B (en) 2023-02-15 2023-02-15 Method, device, equipment and medium for managing table operation information of forwarding chip

Country Status (1)

Country Link
CN (1) CN116155706B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070127502A1 (en) * 2003-07-31 2007-06-07 Wei Zhu Method of multi-port virtual local area network (vlan) supported by multi-protocol label switch (mpls)_
CN103188105A (en) * 2011-12-31 2013-07-03 中国航天科工集团第二研究院七〇六所 Safety enhancing system and method thereof of NAS equipment
CN109324908A (en) * 2017-07-31 2019-02-12 华为技术有限公司 Container isolation method and device for Netlink resources
CN110764985A (en) * 2019-10-11 2020-02-07 苏州浪潮智能科技有限公司 Method, system, equipment and readable storage medium for recording command line
KR20200052798A (en) * 2018-11-07 2020-05-15 숭실대학교산학협력단 Log analysis framework device of docker container
CN114490005A (en) * 2022-04-18 2022-05-13 北京锐融天下科技股份有限公司 Log processing method and device, electronic equipment and storage medium
CN115484203A (en) * 2022-09-14 2022-12-16 杭州云合智网技术有限公司 Method, device and equipment for operating routing table entry and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070127502A1 (en) * 2003-07-31 2007-06-07 Wei Zhu Method of multi-port virtual local area network (vlan) supported by multi-protocol label switch (mpls)_
CN103188105A (en) * 2011-12-31 2013-07-03 中国航天科工集团第二研究院七〇六所 Safety enhancing system and method thereof of NAS equipment
CN109324908A (en) * 2017-07-31 2019-02-12 华为技术有限公司 Container isolation method and device for Netlink resources
KR20200052798A (en) * 2018-11-07 2020-05-15 숭실대학교산학협력단 Log analysis framework device of docker container
CN110764985A (en) * 2019-10-11 2020-02-07 苏州浪潮智能科技有限公司 Method, system, equipment and readable storage medium for recording command line
CN114490005A (en) * 2022-04-18 2022-05-13 北京锐融天下科技股份有限公司 Log processing method and device, electronic equipment and storage medium
CN115484203A (en) * 2022-09-14 2022-12-16 杭州云合智网技术有限公司 Method, device and equipment for operating routing table entry and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
翟雅荣;于金刚;: "基于Filebeat自动收集Kubernetes日志的分析系统", 计算机系统应用, no. 09, 15 September 2018 (2018-09-15) *

Also Published As

Publication number Publication date
CN116155706B (en) 2024-11-05

Similar Documents

Publication Publication Date Title
US9590915B2 (en) Transmission of Map/Reduce data in a data center
CN104537076B (en) A kind of file read/write method and device
US20170147254A1 (en) Optimizing fine grained context addressability in highly dimensional environments using tcam hybrid memory and storage architectures
CN113094166B (en) Link tracking method, device, medium and computing equipment
CN113448938A (en) Data processing method and device, electronic equipment and storage medium
CN110147203B (en) File management method and device, electronic equipment and storage medium
US11960870B2 (en) Container image management
US20170212930A1 (en) Hybrid architecture for processing graph-based queries
CN102521014A (en) Deploying method and deploying device for virtual machine
US11372549B2 (en) Reclaiming free space in a storage system
CN112000574B (en) Pressure testing method, device, equipment and storage medium
CN113835693B (en) Code generation method, device, electronic equipment and storage medium
EP4492236A1 (en) Data processing method and apparatus for fusion system, device and system
CN110555064A (en) data service system and method for insurance business
US11169728B2 (en) Replication configuration for multiple heterogeneous data stores
CN102055779B (en) Method, device and system for generating HA (High Availability) group
CN105824279A (en) Method for establishing flexible and effective CMDB (Configuration Management Database) of machine room monitoring system
CN116155706A (en) Method, device, equipment and medium for managing table operation information of forwarding chip
CN116088874A (en) Data tracing method and device
El Kafrawy et al. HDFSx: an enhanced model to handle small files in hadoop with a simulating toolkit
CN110134662A (en) SDN distributed storage system, data processing method and storage medium
CN120104593A (en) A method and device for hot migration of object storage index metadata
Jia Design and Implementation of Distributed Archives Management System Based on Microservice Architecture
CN119883748A (en) Disaster recovery method and device and disaster recovery platform
CN115550458A (en) A log processing method and related device

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
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: 3 / F, 665 Zhangjiang Road, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai

Applicant after: Yunhe Zhiwang (Shanghai) Technology Co.,Ltd.

Address before: 310016 room 107, building D, integrated circuit design Industrial Park, No. 858, Jianshe Second Road, Xiaoshan Economic and Technological Development Zone, Xiaoshan District, Hangzhou City, Zhejiang Province

Applicant before: Hangzhou yunhezhi Network Technology Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant