WO2021121203A1 - 业务表的配置方法、装置、网络设备和存储介质 - Google Patents
业务表的配置方法、装置、网络设备和存储介质 Download PDFInfo
- Publication number
- WO2021121203A1 WO2021121203A1 PCT/CN2020/136386 CN2020136386W WO2021121203A1 WO 2021121203 A1 WO2021121203 A1 WO 2021121203A1 CN 2020136386 W CN2020136386 W CN 2020136386W WO 2021121203 A1 WO2021121203 A1 WO 2021121203A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- memory
- write
- cache queue
- writing data
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000015654 memory Effects 0.000 claims abstract description 69
- 230000006870 function Effects 0.000 claims description 24
- 238000006243 chemical reaction Methods 0.000 claims description 7
- 238000012217 deletion Methods 0.000 claims description 3
- 230000037430 deletion Effects 0.000 claims description 3
- 230000003287 optical effect Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 238000003491 array Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/565—Conversion or adaptation of application format or content
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
- H04L49/9084—Reactions to storage capacity overflow
- H04L49/9089—Reactions to storage capacity overflow replacing packets in a storage arrangement, e.g. pushout
- H04L49/9094—Arrangements for simultaneous transmit and receive, e.g. simultaneous reading/writing from/to the storage element
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
Definitions
- This application relates to the field of communications technology, for example, to a method, device, network device, and storage medium for configuring a service table.
- the method for generating multiple service tables in the memory is: receiving the service data transmitted by the upper platform through a forwarding table management unit (FTM), and then transmitting the service data to the forwarding chip management unit (FCM), Then, the service data is written into the memory through the forwarding chip management unit to generate a variety of service tables in the memory.
- FTM forwarding table management unit
- FCM forwarding chip management unit
- the foregoing business table generation method has low generation efficiency.
- the generation speed of the business table cannot meet the processing capacity of the network chip, resulting in a greatly reduced communication efficiency of the entire network.
- This application provides a method, device, network device and storage medium for configuring a service table, so as to improve the configuration efficiency of the service table.
- a configuration method for business tables including:
- the table write data is obtained, and the table write data is written into the cache queue; the table write data is read from the cache queue through an asynchronous thread, and the table write data is read through the chip bus
- the writing table data is written into the memory, wherein the writing table data includes information for performing configuration operations on the service table in the memory.
- a device for configuring a business table including:
- the table writing data acquisition module is set to convert the obtained target data format to obtain the table writing data, and write the table writing data into the cache queue;
- the table writing data execution module is set to receive the data from the table via an asynchronous thread
- the table writing data is read from the cache queue, and the table writing data is written into the memory through the chip bus, where the table writing data includes information for performing configuration operations on the service table in the memory.
- a network device is also provided, and the network device includes:
- One or more processors a storage device configured to store one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors can realize the above The configuration method of the business table.
- a storage medium containing computer-executable instructions is also provided, and the computer-executable instructions implement the above-mentioned configuration method of the business table when executed by a computer processor.
- FIG. 1A is a flowchart of a method for configuring a service table according to Embodiment 1 of this application;
- FIG. 1B is a flowchart of a method for configuring a service table provided by the application scenario of this application;
- Figure 1C is a data flow chart of a business table provided by the application scenario of this application.
- FIG. 2 is a structural block diagram of an apparatus for configuring a service table provided in Embodiment 2 of this application;
- FIG. 3 is a schematic structural diagram of a network device provided in Embodiment 3 of this application.
- FIG. 1A is a flowchart of a method for configuring a service table provided in Embodiment 1 of this application. This embodiment is applicable to the case of configuring a service table in a memory.
- the method can be implemented by the apparatus for configuring a service table in the embodiment of the present application.
- the device can be implemented by software and/or hardware, and can generally be integrated in a network device. The method includes the following steps:
- Network devices manage multiple network protocols (for example, spanning tree protocol, virtual local area network (VLAN) protocol, address resolution protocol protocol (Address) through the control layer. Resolution Protocol (ARP), routing protocol, multicast protocol, etc.) operation, so that network equipment can understand the equipment, links and interaction protocols in the entire network environment.
- the network equipment also processes and forwards multiple types of data on different ports through the data forwarding layer, and the control layer provides the data forwarding layer with various network information and business tables necessary for data forwarding.
- the service table is also forwarding query entries (for example, port table, medium access control (MAC) table, routing table, etc.).
- the data layer sends data according to these forwarding query entries, and the control layer forwards these
- the lookup table entries are stored in a variety of memories (for example, Static RAM (SRAM), Ternary Content Addressable Memory (TCAM), and Synchronous Dynamic Random Access Memory (SDRAM), etc. )in.
- SRAM Static RAM
- TCAM Ternary Content Addressable Memory
- SDRAM Synchronous Dynamic Random Access Memory
- the acquired target data is integrated according to the preset format to obtain table writing data that meets the preset format, so that the table writing data is suitable for table writing operations.
- the cache queue adopts the producer/consumer model and is set to store table write data and write table write data into the cache queue, that is, as a producer, perform enqueue operations, and asynchronous table write threads act as consumers to perform dequeue operations.
- the buffer queue may have a ring structure. The circular structure of the buffer queue makes the enqueue and dequeue operations of writing table data separate from each other and can be carried out at the same time, which improves the efficiency of data flow.
- the method before format conversion of the acquired target data, the method further includes: creating a cache queue set according to the memory type and/or the chip bus type; wherein the cache queue set includes at least A cache queue.
- different types of memory correspond to different chip buses (for example, Peripheral Component Interconnect-Express (PCI-E) bus and local bus (Local Bus)), for example, the routing table exists In the tri-state content-addressable memory, it is written through the PCI-E bus; while the business table existing in the Double Data Rate (DDR) memory is written through the Network Processor (NP) bus Into.
- PCI-E Peripheral Component Interconnect-Express
- Local Bus Local Bus
- one or more cache queues can be created according to the memory type and/or the chip bus type, and correspondingly, writing the table write data to the cache queue includes: writing the table write data to the matching cache queue set Target cache queue.
- the table write data can be written into the corresponding cache queue according to the data type of the table write data.
- the type of network device there is no limitation on the type of network device, the type of memory, the type of chip bus, and the type of service table.
- the function of the asynchronous thread is to read the table writing data from the cache queue; after reading the table writing data through the asynchronous thread, the table writing interface is mobilized, and the table writing data is written into the memory through the chip bus.
- the method further includes: creating an asynchronous thread set according to the cache queue set; wherein, the asynchronous thread set includes At least one asynchronous thread, the at least one asynchronous thread matches the at least one cache queue one by one, and correspondingly, reading the write table data from the cache queue through the asynchronous thread includes: obtaining from the asynchronous thread set The target asynchronous thread that matches the target cache queue reads the write table data from the target cache queue through the target asynchronous thread.
- the table writing data includes all the information for performing the operation of the business table; wherein, if the business table type is not preset, the table writing data includes processing functions and processing parameters; wherein, the processing functions include table writing functions or table deletion functions,
- writing table write data into the memory through the chip bus includes: adding or deleting the service table to the memory through the chip bus. If the business table type is not preset, then the processing function used in writing the table data needs to be explicitly used, and the business table is added or deleted in the memory by calling the processing function.
- the table writing data includes operation types and processing parameters; wherein, the operation types include adding or deleting, and correspondingly, writing table writing data to the memory via the chip bus includes: via the chip bus Add or delete the business table on the storage.
- the corresponding processing function has been fixed. At this time, there is no need to include the corresponding processing function in the table writing data. You only need to clarify whether the operation type of the business table is to add or delete. Operation type, add a business table or delete a business table in the storage.
- the technical solution provided by the embodiment of the present application writes table write data into the cache queue, reads the table write data from the cache queue through an asynchronous thread, and writes the table write data into the memory through the chip bus, so that the writing of the table write data
- the input operation is separated from the read operation.
- different chip buses work in parallel to write the table write data into the corresponding memory, so that the business table configuration operations in multiple memories can be performed at the same time, which greatly improves the performance of the business table. Configuration efficiency.
- FIG. 1B is a flowchart of a method for configuring a service table provided by the application scenario of this application, and the method is as follows:
- the forwarding table management unit assembles the data transmitted by the upper platform into table writing data.
- the upper platform is a module configured to send and receive network protocol messages and calculation protocols in the network equipment.
- the network equipment When the network equipment is running, it obtains the business table data information transmitted by the upper platform through the forwarding table management unit in the control layer, and performs data integration.
- the forwarding table management unit executes the enqueue operation.
- the forwarding table management unit applies for memory space in the cache queue, and stores the write table data (that is, the business table data information after data integration) in the cache queue.
- the forwarding chip management unit executes the dequeue operation through the asynchronous thread.
- the forwarding chip management unit reads the write table data from the cache queue through an asynchronous thread, and releases the memory space.
- the forwarding chip management unit writes the table writing data into the memory.
- the forwarding table management unit writes table-writing data into the cache queue
- the forwarding chip management unit reads the table-written data from the cache queue through an asynchronous thread, and writes the table-written data into the memory, Separate the write operation and read operation of the write table data, which greatly improves the configuration efficiency of the business table.
- the device includes: a table writing data acquisition module 210 and a table writing data execution module 220.
- the table writing data acquisition module 210 is set to convert the obtained target data format to obtain the table writing data, and write the table writing data into the cache queue; the table writing data execution module 220 is set to receive data from The table writing data is read from the cache queue, and the table writing data is written into the memory through the chip bus.
- the technical solution provided by the embodiment of the present application writes table write data into the cache queue, reads the table write data from the cache queue through an asynchronous thread, and writes the table write data into the memory through the chip bus, so that the writing of the table write data
- the input operation is separated from the read operation.
- different chip buses work in parallel to write the table write data into the corresponding memory, so that the business table configuration operations in multiple memories can be performed at the same time, which greatly improves the performance of the business table. Configuration efficiency.
- the table data execution module 220 includes:
- the cache queue set creation unit is configured to create a cache queue set according to the memory type and/or the chip bus type; wherein the cache queue set includes at least one cache queue.
- the table writing data acquisition module 210 is set to:
- the write table data is written into the matched target cache queue in the cache queue set.
- the table data execution module 220 further includes:
- the asynchronous thread set creation unit is configured to create an asynchronous thread set according to the cache queue set; wherein the asynchronous thread set includes at least one asynchronous thread, and the at least one asynchronous thread matches the at least one cache queue one by one.
- the table data execution module 220 is set to:
- the table writing data acquisition module 210 is set to:
- the acquired target data is integrated according to the preset format to obtain table writing data that meets the preset format.
- the buffer queue has a ring structure.
- the table writing data includes a processing function and processing parameters; wherein the processing function includes a table writing function or a table deleting function.
- the table data execution module 220 is set to:
- the table writing data includes operation type and processing parameters; wherein, the operation type includes adding or deleting.
- the table data execution module 220 is set to:
- the above-mentioned device can execute the configuration method of the service table provided by any embodiment of the present application, and has the functional modules and effects corresponding to the execution method.
- the functional modules and effects corresponding to the execution method For technical details not described in this embodiment, please refer to the method provided in any embodiment of this application.
- FIG. 3 is a schematic structural diagram of a network device provided in Embodiment 3 of this application.
- Figure 3 shows a block diagram of an exemplary device 12 suitable for implementing embodiments of the present application.
- the device 12 shown in FIG. 3 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present application.
- the device 12 is represented in the form of a general-purpose computing device.
- the components of the device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
- the bus 18 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any bus structure among multiple bus structures.
- these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (Video Electronics Standards) Association, VESA) local bus and PCI bus.
- the device 12 includes a variety of computer system readable media. These media can be any available media that can be accessed by the device 12, including volatile and non-volatile media, removable and non-removable media.
- the system memory 28 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) 30 and/or a cache memory 32.
- the device 12 may include other removable/non-removable, volatile/non-volatile computer system storage media.
- the storage system 34 may be configured to read and write a non-removable, non-volatile magnetic medium (not shown in FIG. 3, usually referred to as a "hard drive").
- a disk drive configured to read and write to a removable non-volatile disk (such as a "floppy disk") and a removable non-volatile optical disk (such as a compact disk-read only memory (Compact Disk)) can be provided.
- the system memory 28 may include at least one program product.
- the program product has a set of (for example, at least one) program modules that are configured to perform the functions of the embodiments of the present application.
- a program/utility tool 40 having a set of (at least one) program module 42 may be stored in, for example, the system memory 28.
- Such program module 42 includes but is not limited to an operating system, one or more application programs, other program modules, and programs Data, each of these examples or a combination may include the realization of a network environment.
- the program module 42 usually executes the functions and/or methods in the embodiments described in this application.
- the device 12 may also communicate with one or more external devices 14 (such as keyboards, pointing devices, displays 24, etc.), and may also communicate with one or more devices that enable a user to interact with the device 12, and/or communicate with
- the device 12 can communicate with any device (such as a network card, modem, etc.) that can communicate with one or more other computing devices. This communication can be performed through an input/output (Input/Output, I/O) interface 22.
- the device 12 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 20. As shown in the figure, the network adapter 20 communicates with other modules of the device 12 through the bus 18.
- LAN local area network
- WAN wide area network
- public network such as the Internet
- the processing unit 16 executes a variety of functional applications and data processing by running programs stored in the system memory 28, for example, implements the configuration method of the service table provided in the embodiment of the present application. That is, after format conversion of the acquired target data, the table write data is obtained, and the table write data is written into the cache queue; the table write data is read from the cache queue through an asynchronous thread, and passed The chip bus writes the table write data into the memory.
- the fourth embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored.
- the program is executed by a processor, the method for configuring a business table as described in any of the embodiments of the present application is implemented; the method includes:
- the table write data is obtained, and the table write data is written into the cache queue; the table write data is read from the cache queue through an asynchronous thread, and the table write data is read through the chip bus The writing table data is written into the memory.
- the computer storage medium of the embodiment of the present application may adopt any combination of one or more computer-readable media.
- the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
- the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above.
- Examples of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, RAM, ROM, Erasable Programmable Read Only Memory , EPROM or flash memory), optical fiber, CD-ROM, optical storage device, magnetic storage device, or any suitable combination of the above.
- the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
- the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
- the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
- the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
- suitable medium including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
- the computer program code used to perform the operations of this application can be written in one or more programming languages or a combination thereof.
- the programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language.
- the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
- the remote computer can be connected to the user's computer through any kind of network, including LAN or WAN, or it can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
本文公开一种业务表的配置方法、装置、网络设备和存储介质。该业务表的配置方法包括:将获取到的目标数据进行格式转换后,得到写表数据,并将所述写表数据写入缓存队列;通过异步线程从所述缓存队列中读取所述写表数据,并通过芯片总线将所述写表数据写入存储器,其中,所述写表数据包括对所述存储器中的业务表进行配置操作的信息。
Description
本申请要求在2019年12月17日提交中国专利局、申请号为201911305153.6的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
本申请涉及通信技术领域,例如涉及一种业务表的配置方法、装置、网络设备和存储介质。
随着网络流量的快速增长以及新型网络业务的频繁出现,需要网络设备具有更加快速且灵活的处理能力,这对网络设备的性能提出了更高要求。
网络设备在运行过程中,控制层软件会频繁地与网络芯片进行交互以将多种业务表写入存储器中。存储器中的多种业务表的生成方法为:通过转发表管理单元(Forwarding Table Management,FTM)接收上层平台传递的业务数据,然后将业务数据传输给转发芯片管理单元(Forwarding Chip Management,FCM),再通过转发芯片管理单元将业务数据写入存储器中以生成存储器中的多种业务表。
上述业务表的生成方法,生成效率较低,在与网络芯片交互时,业务表的生成速度无法满足网络芯片的处理能力,导致整个网络的通信效率大大降低。
发明内容
本申请提供了一种业务表的配置方法、装置、网络设备和存储介质,以提高业务表的配置效率。
提供了一种业务表的配置方法,包括:
将获取到的目标数据进行格式转换后,得到写表数据,并将所述写表数据写入缓存队列;通过异步线程从所述缓存队列中读取所述写表数据,并通过芯片总线将所述写表数据写入存储器,其中,所述写表数据包括对所述存储器中的业务表进行配置操作的信息。
还提供了一种业务表的配置装置,包括:
写表数据获取模块,设置为将获取到的目标数据进行格式转换后,得到写表数据,并将所述写表数据写入缓存队列;写表数据执行模块,设置为通过异 步线程从所述缓存队列中读取所述写表数据,并通过芯片总线将所述写表数据写入存储器,其中,所述写表数据包括对所述存储器中的业务表进行配置操作的信息。
还提供了一种网络设备,所述网络设备包括:
一个或多个处理器;存储装置,设置为存储一个或多个程序;当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现上述的业务表的配置方法。
还提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时实现上述的业务表的配置方法。
图1A为本申请实施例一提供的一种业务表的配置方法的流程图;
图1B为本申请应用场景提供的一种业务表的配置方法的流程图;
图1C为本申请应用场景提供的一种业务表的数据流程图;
图2为本申请实施例二提供的一种业务表的配置装置的结构框图;
图3为本申请实施例三提供的一种网络设备的结构示意图。
下文中将结合附图对本申请的实施例进行说明。
实施例一
图1A为本申请实施例一提供的一种业务表的配置方法的流程图,本实施例可适用于配置存储器中的业务表的情况,该方法可以由本申请实施例中的业务表的配置装置来执行,该装置可以通过软件和/或硬件实现,并一般可以集成在网络设备中,该方法包括如下步骤:
S110、将获取到的目标数据进行格式转换后,得到写表数据,并将所述写表数据写入缓存队列。
网络设备(例如,交换机、网桥、路由器和光纤收发器等)通过控制层管理多种网络协议(例如,生成树协议、虚拟局域网(Virtual Local Area Network,VLAN)协议、地址解析协议协议(Address Resolution Protocol,ARP)、路由协议和组播协议等)的运行,使得网络设备能够了解整个网络环境中的设备、链路和交互协议。网络设备还通过数据转发层处理和转发不同端口上多种类型的数据,控制层则为数据转发层提供了数据转发时所必须的多种网络信息和业 务表。其中,业务表也即转发查询表项(例如,端口表、介质访问控制(Medium Access Control,MAC)表和路由表等),数据层根据这些转发查询表项发送数据,控制层则将这些转发查询表项存储于多种存储器(例如,静态随机存储器(Static RAM,SRAM)、三态内容寻址存储器(Ternary Content Addressable Memory,TCAM)和同步动态随机存储器(Synchronous Dynamic Random Access Memory,SDRAM)等)中。
根据预设格式对获取到的目标数据进行整合,得到符合所述预设格式的写表数据,以使写表数据适用于写表操作。
缓存队列,采用生产者/消费者模型,设置为存储写表数据,将写表数据写入缓存队列,即作为生产者,执行入队操作,异步写表线程作为消费者,执行出队操作。可选的,在本申请实施例中,缓存队列可以为环形结构。环形结构的缓存队列,使得写表数据的入队操作和出队操作彼此分开,可以同时进行,提高了数据流转效率。
可选的,在本申请实施例中,在将获取到的目标数据进行格式转换前,还包括:根据存储器类型和/或芯片总线类型,创建缓存队列集合;其中,所述缓存队列集合包括至少一个缓存队列。由于在网络设备中,不同类型的存储器对应不同的芯片总线(例如,外围组件互连-高速(Peripheral Component Interconnect-Express,PCI-E)总线和局部总线(Local Bus)),例如,路由表存在于三态内容寻址存储器中,通过PCI-E总线写入;而存在于双倍数据速率(Double Data Rate,DDR)存储器中的业务表,则通过网络处理器(Network Processor,NP)总线写入。因此,可以根据存储器类型和/或芯片总线类型创建一个或多个缓存队列,相应的,将所述写表数据写入缓存队列,包括:将所述写表数据写入缓存队列集合中匹配的目标缓存队列。一实施例中,可以根据写表数据的数据类型将写表数据写入对应的缓存队列中。
可选的,在本申请实施例中,对网络设备的类型、存储器的类型、芯片总线的类型以及业务表的类型均不作限定。
S120、通过异步线程从所述缓存队列中读取所述写表数据,并通过芯片总线将所述写表数据写入存储器。
异步线程的作用是从缓存队列中读取写表数据;通过异步线程读取写表数据后,调动写表接口,并通过芯片总线将写表数据写入存储器。
可选的,在本申请实施例中,在根据存储器类型和/或芯片总线类型,创建缓存队列集合后,还包括:根据所述缓存队列集合创建异步线程集合;其中,所述异步线程集合包括至少一个异步线程,所述至少一个异步线程与所述至少 一个缓存队列一一匹配,相应的,通过异步线程从所述缓存队列中读取所述写表数据,包括:在异步线程集合中获取与所述目标缓存队列匹配的目标异步线程,并通过所述目标异步线程从所述目标缓存队列中读取所述写表数据。
写表数据包括执行业务表操作的所有信息;其中,若未预设业务表类型,则所述写表数据包括处理函数和处理参数;其中,所述处理函数包括写表函数或删表函数,相应的,通过芯片总线将写表数据写入存储器,包括:通过芯片总线对存储器进行业务表的添加或删除操作。如果未预设业务表类型,那么需要在写表数据中明确使用的处理函数,通过调用该处理函数,在存储器中添加业务表或者删除业务表。若已预设业务表类型,所述写表数据包括操作类型和处理参数;其中,所述操作类型包括添加或删除,相应的,通过芯片总线将写表数据写入存储器,包括:通过芯片总线对存储器进行业务表的添加或删除操作。如果已预设业务表类型,那么对应的处理函数已经固定,此时在写表数据中不需要再包括对应的处理函数,只需要明确业务表的操作类型是添加还是删除即可,可以根据该操作类型,在存储器中添加业务表或者删除业务表。
本申请实施例提供的技术方案,将写表数据写入缓存队列,通过异步线程从缓存队列中读取该写表数据,通过芯片总线将写表数据写入存储器中,使得写表数据的写入操作与读取操作分开,同时,不同的芯片总线并行工作,分别将写表数据写入对应的存储器中,使得多个存储器中的业务表配置操作可以同时进行,极大地提高了业务表的配置效率。
应用场景
图1B是本申请应用场景提供的一种业务表的配置方法的流程图,该方法如下:
S210、转发表管理单元将上层平台传递的数据组装成写表数据。
上层平台是网络设备中设置为收发网络协议的报文以及计算协议的模块,网络设备运行时,通过控制层中的转发表管理单元获取上层平台传递的业务表数据信息,并进行数据整合。
S220、转发表管理单元执行入队操作。
如图1C所示,转发表管理单元在缓存队列中申请内存空间,并将写表数据(即数据整合后的业务表数据信息)存储于缓存队列中。
S230、转发芯片管理单元通过异步线程执行出队操作。
如图1C所示,转发芯片管理单元通过异步线程从缓存队列中读取写表数据, 并释放内存空间。
S240、转发芯片管理单元将写表数据写入存储器中。
本申请应用场景提供的技术方案,转发表管理单元将写表数据写入缓存队列,转发芯片管理单元通过异步线程从缓存队列中读取该写表数据,并将写表数据写入存储器中,使得写表数据的写入操作与读取操作分开,极大地提高了业务表的配置效率。
实施例二
图2是本申请实施例二提供的一种业务表的配置装置的结构框图,该装置包括:写表数据获取模块210和写表数据执行模块220。
写表数据获取模块210,设置为将获取到的目标数据进行格式转换后,得到写表数据,并将所述写表数据写入缓存队列;写表数据执行模块220,设置为通过异步线程从所述缓存队列中读取所述写表数据,并通过芯片总线将所述写表数据写入存储器。
本申请实施例提供的技术方案,将写表数据写入缓存队列,通过异步线程从缓存队列中读取该写表数据,通过芯片总线将写表数据写入存储器中,使得写表数据的写入操作与读取操作分开,同时,不同的芯片总线并行工作,分别将写表数据写入对应的存储器中,使得多个存储器中的业务表配置操作可以同时进行,极大地提高了业务表的配置效率。
可选的,在上述技术方案的基础上,写表数据执行模块220,包括:
缓存队列集合创建单元,设置为根据存储器类型和/或芯片总线类型,创建缓存队列集合;其中,所述缓存队列集合包括至少一个缓存队列。
可选的,在上述技术方案的基础上,写表数据获取模块210,是设置为:
将所述写表数据写入缓存队列集合中匹配的目标缓存队列。
可选的,在上述技术方案的基础上,写表数据执行模块220,还包括:
异步线程集合创建单元,设置为根据所述缓存队列集合创建异步线程集合;其中,所述异步线程集合包括至少一个异步线程,所述至少一个异步线程与所述至少一个缓存队列一一匹配。
可选的,在上述技术方案的基础上,写表数据执行模块220,是设置为:
在异步线程集合获取与所述目标缓存队列匹配的目标异步线程,并通过所述目标异步线程从所述目标缓存队列中读取所述写表数据。
可选的,在上述技术方案的基础上,写表数据获取模块210,是设置为:
根据预设格式对获取到的目标数据进行整合,得到符合所述预设格式的写表数据。
可选的,在上述技术方案的基础上,所述缓存队列为环形结构。
可选的,在上述技术方案的基础上,若未预设业务表类型,则所述写表数据包括处理函数和处理参数;其中,所述处理函数包括写表函数或删表函数。
可选的,在上述技术方案的基础上,写表数据执行模块220,是设置为:
通过芯片总线对存储器进行业务表的添加或删除操作。
可选的,在上述技术方案的基础上,若已预设业务表类型,所述写表数据包括操作类型和处理参数;其中,所述操作类型包括添加或删除。
可选的,在上述技术方案的基础上,写表数据执行模块220,是设置为:
通过芯片总线对存储器进行业务表的添加或删除操作。
上述装置可执行本申请任意实施例所提供的业务表的配置方法,具备执行方法相应的功能模块和效果。未在本实施例中描述的技术细节,可参见本申请任意实施例提供的方法。
实施例三
图3为本申请实施例三提供的一种网络设备的结构示意图。图3示出了适于用来实现本申请实施方式的示例性设备12的框图。图3显示的设备12仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图3所示,设备12以通用计算设备的形式表现。设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(Industry Standard Architecture,ISA)总线,微通道体系结构(Micro Channel Architecture,MAC)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association,VESA)局域总线以及PCI总线。
设备12包括多种计算机系统可读介质。这些介质可以是任何能够被设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
系统存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory,RAM)30和/或高速缓存存储器32。设备12可以包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以设置为读写不可移动的、非易失性磁介质(图3未显示,通常称为“硬盘驱动器”)。尽管图3中未示出,可以提供设置为对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如光盘-只读存储器(Compact Disc-Read Only Memory,CD-ROM),数字视频光盘-只读存储器(Digital Video Disc-ROM,DVD-ROM)或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。系统存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本申请实施例的功能。
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如系统存储器28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或一种组合中可能包括网络环境的实现。程序模块42通常执行本申请所描述的实施例中的功能和/或方法。
设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该设备12交互的设备通信,和/或与使得该设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(Input/Output,I/O)接口22进行。并且,设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器20通过总线18与设备12的其它模块通信。尽管图中未示出,可以结合设备12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、独立磁盘冗余阵列(Redundant Arrays of Independent Disks,RAID)系统、磁带驱动器以及数据备份存储系统等。
处理单元16通过运行存储在系统存储器28中的程序,从而执行多种功能应用以及数据处理,例如实现本申请实施例所提供的业务表的配置方法。也即:将获取到的目标数据进行格式转换后,得到写表数据,并将所述写表数据写入缓存队列;通过异步线程从所述缓存队列中读取所述写表数据,并通过芯片总线将所述写表数据写入存储器。
实施例四
本申请实施例四还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本申请任意实施例所述的业务表的配置方法;该方法包括:
将获取到的目标数据进行格式转换后,得到写表数据,并将所述写表数据写入缓存队列;通过异步线程从所述缓存队列中读取所述写表数据,并通过芯片总线将所述写表数据写入存储器。
本申请实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、RAM、ROM、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM或闪存)、光纤、CD-ROM、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于无线、电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括LAN或WAN—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因 特网连接)。
Claims (10)
- 一种业务表的配置方法,包括:将获取到的目标数据进行格式转换后,得到写表数据,并将所述写表数据写入缓存队列;通过异步线程从所述缓存队列中读取所述写表数据,并通过芯片总线将所述写表数据写入存储器,其中,所述写表数据包括对所述存储器中的业务表进行配置操作的信息。
- 根据权利要求1所述的方法,在所述将获取到的目标数据进行格式转换之前,还包括:根据存储器类型和芯片总线类型中的至少之一,创建缓存队列集合;其中,所述缓存队列集合包括至少一个缓存队列;所述将所述写表数据写入缓存队列,包括:将所述写表数据写入所述缓存队列集合中与所述写表数据匹配的目标缓存队列。
- 根据权利要求2所述的方法,在所述根据存储器类型和芯片总线类型中的至少之一,创建缓存队列集合之后,还包括:根据所述缓存队列集合创建异步线程集合;其中,所述异步线程集合包括至少一个异步线程,所述至少一个异步线程与所述至少一个缓存队列一一匹配;所述通过异步线程从所述缓存队列中读取所述写表数据,包括:在所述异步线程集合中获取与所述目标缓存队列匹配的目标异步线程,并通过所述目标异步线程从所述目标缓存队列中读取所述写表数据。
- 根据权利要求1所述的方法,其中,所述将获取到的目标数据进行格式转换后,得到写表数据,包括:根据预设格式对所述获取到的目标数据进行整合,得到符合所述预设格式的写表数据。
- 根据权利要求1所述的方法,其中,所述缓存队列为环形结构。
- 根据权利要求1所述的方法,其中,在未预设业务表类型的情况下,所述写表数据包括处理函数;其中,所述处理函数包括写表函数或删表函数;所述通过芯片总线将所述写表数据写入存储器,包括:在所述处理函数包括写表函数的情况下,通过所述芯片总线对所述存储器中的业务表进行添加操作;在所述处理函数包括删表函数的情况下,通过所述芯片总线对所述存储器中的业务表进行删除操作。
- 根据权利要求1所述的方法,其中,在已预设业务表类型的情况下,所述写表数据包括操作类型;其中,所述操作类型包括添加或删除;所述通过芯片总线将所述写表数据写入存储器,包括:在所述操作类型包括添加的情况下,通过所述芯片总线对所述存储器中的业务表进行添加操作;在所述操作类型包括删除的情况下,通过所述芯片总线对所述存储器中的业务表进行删除操作。
- 一种业务表的配置装置,包括:写表数据获取模块,设置为将获取到的目标数据进行格式转换后,得到写表数据,并将所述写表数据写入缓存队列;写表数据执行模块,设置为通过异步线程从所述缓存队列中读取所述写表数据,并通过芯片总线将所述写表数据写入存储器,其中,所述写表数据包括对所述存储器中的业务表进行配置操作的信息。
- 一种网络设备,包括:至少一个处理器;存储装置,设置为存储至少一个程序;当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-7中任一项所述的业务表的配置方法。
- 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-7中任一项所述的业务表的配置方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911305153.6 | 2019-12-17 | ||
CN201911305153.6A CN112995261A (zh) | 2019-12-17 | 2019-12-17 | 业务表的配置方法、装置、网络设备和存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021121203A1 true WO2021121203A1 (zh) | 2021-06-24 |
Family
ID=76343721
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/136386 WO2021121203A1 (zh) | 2019-12-17 | 2020-12-15 | 业务表的配置方法、装置、网络设备和存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112995261A (zh) |
WO (1) | WO2021121203A1 (zh) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113992509A (zh) * | 2021-09-23 | 2022-01-28 | 新华三大数据技术有限公司 | Sdn网络业务配置下发方法、装置及存储介质 |
CN114254037A (zh) * | 2021-12-02 | 2022-03-29 | 北京人大金仓信息技术股份有限公司 | 数据处理方法、装置、电子设备和计算机可读存储介质 |
CN114500052A (zh) * | 2022-01-24 | 2022-05-13 | 南京南瑞信息通信科技有限公司 | 一种基于事件驱动的高效数据加密转发方法及装置 |
CN117453422A (zh) * | 2023-12-22 | 2024-01-26 | 南京研利科技有限公司 | 数据处理方法、装置、电子设备及计算机可读存储介质 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114629860B (zh) * | 2022-03-17 | 2024-01-30 | 北京恒安嘉新安全技术有限公司 | 数据传输方法、装置、业务线卡和存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090217030A1 (en) * | 2008-02-26 | 2009-08-27 | Premkumar J | Adaptive server performance adjustment |
US20140181409A1 (en) * | 2012-12-20 | 2014-06-26 | Oracle International Corporation | Method and system for queue descriptor cache management for a host channel adapter |
CN105446660A (zh) * | 2015-11-13 | 2016-03-30 | 东软集团股份有限公司 | 一种数据读写方法及装置 |
CN106161110A (zh) * | 2016-08-31 | 2016-11-23 | 东软集团股份有限公司 | 一种网络设备中的数据处理方法及系统 |
CN107122457A (zh) * | 2017-04-26 | 2017-09-01 | 努比亚技术有限公司 | 记录网络用户行为数据的方法及其装置、计算机可读介质 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103186438A (zh) * | 2013-04-02 | 2013-07-03 | 浪潮电子信息产业股份有限公司 | 一种提高磁盘阵列数据重构效率的方法 |
CN110362348A (zh) * | 2018-04-09 | 2019-10-22 | 武汉斗鱼网络科技有限公司 | 一种队列存取数据的方法、装置及电子设备 |
-
2019
- 2019-12-17 CN CN201911305153.6A patent/CN112995261A/zh active Pending
-
2020
- 2020-12-15 WO PCT/CN2020/136386 patent/WO2021121203A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090217030A1 (en) * | 2008-02-26 | 2009-08-27 | Premkumar J | Adaptive server performance adjustment |
US20140181409A1 (en) * | 2012-12-20 | 2014-06-26 | Oracle International Corporation | Method and system for queue descriptor cache management for a host channel adapter |
CN105446660A (zh) * | 2015-11-13 | 2016-03-30 | 东软集团股份有限公司 | 一种数据读写方法及装置 |
CN106161110A (zh) * | 2016-08-31 | 2016-11-23 | 东软集团股份有限公司 | 一种网络设备中的数据处理方法及系统 |
CN107122457A (zh) * | 2017-04-26 | 2017-09-01 | 努比亚技术有限公司 | 记录网络用户行为数据的方法及其装置、计算机可读介质 |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113992509A (zh) * | 2021-09-23 | 2022-01-28 | 新华三大数据技术有限公司 | Sdn网络业务配置下发方法、装置及存储介质 |
CN113992509B (zh) * | 2021-09-23 | 2023-11-07 | 新华三大数据技术有限公司 | Sdn网络业务配置下发方法、装置及存储介质 |
CN114254037A (zh) * | 2021-12-02 | 2022-03-29 | 北京人大金仓信息技术股份有限公司 | 数据处理方法、装置、电子设备和计算机可读存储介质 |
CN114500052A (zh) * | 2022-01-24 | 2022-05-13 | 南京南瑞信息通信科技有限公司 | 一种基于事件驱动的高效数据加密转发方法及装置 |
CN114500052B (zh) * | 2022-01-24 | 2023-12-19 | 南京南瑞信息通信科技有限公司 | 一种基于事件驱动的高效数据加密转发方法及装置 |
CN117453422A (zh) * | 2023-12-22 | 2024-01-26 | 南京研利科技有限公司 | 数据处理方法、装置、电子设备及计算机可读存储介质 |
CN117453422B (zh) * | 2023-12-22 | 2024-03-01 | 南京研利科技有限公司 | 数据处理方法、装置、电子设备及计算机可读存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN112995261A (zh) | 2021-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021121203A1 (zh) | 业务表的配置方法、装置、网络设备和存储介质 | |
US11842216B2 (en) | Data processing unit for stream processing | |
WO2021036228A1 (zh) | 文件上传方法、装置、终端、服务器、系统及存储介质 | |
CN110708393B (zh) | 用于传输数据的方法、装置和系统 | |
US9448957B2 (en) | Unified system area network and switch | |
US9571300B2 (en) | Reducing encapsulation overhead in overlay-based networks | |
WO2015197027A1 (zh) | 一种访问NVMe存储设备的方法和NVMe存储设备 | |
CN115486046B (zh) | 基于开放虚拟软交换机ovs的数据包处理方法及设备 | |
JP2018509674A (ja) | ネットワーク・マップド・ストレージを用いたホスト・ベースの不揮発性メモリのクラスタ化 | |
US8281050B2 (en) | Method and apparatus of storage array with frame forwarding capability | |
WO2015180538A1 (zh) | 一种读、写数据的方法及设备、存储系统 | |
US11784946B2 (en) | Method for improving data flow and access for a neural network processor | |
CN112243045A (zh) | 服务数据处理方法、装置、节点结构及电子设备 | |
WO2024066757A1 (zh) | 数据帧传输方法、装置及可读存储介质 | |
US9344376B2 (en) | Quality of service in multi-tenant network | |
JP2022058737A (ja) | データアクセス方法、装置、電子機器、記憶媒体およびコンピュータプログラム | |
CN113849449A (zh) | 一种通信系统和信息交互方法、设备和介质 | |
CN113691466B (zh) | 一种数据的传输方法、智能网卡、计算设备及存储介质 | |
CN108829646A (zh) | 数据存储及解析方法、装置、系统及存储介质 | |
US11038798B2 (en) | Storing data in association with a key within a hash table and retrieving the data from the hash table using the key | |
WO2015055008A1 (zh) | 一种存储控制芯片及磁盘报文传输方法 | |
CN116032837A (zh) | 一种流表卸载方法及装置 | |
CN103036815B (zh) | 一种信息技术和通信技术ict融合系统 | |
US20230081696A1 (en) | Methods for Shunting Clustered Gateways | |
WO2021254162A1 (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: 20903721 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20903721 Country of ref document: EP Kind code of ref document: A1 |