DPDK service gateway command control method, device, equipment and storage medium
By building a command line interface and building a serialization decoding module in the user space, the problem of the DPDK service gateway lacking a control plane command line operation portal is solved, and remote control and functional reuse of the DPDK service gateway control plane is realized.
Patent Information
- Application Number
- CN202211205580.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2042-09-29
AI Technical Summary
The existing DPDK service gateway lacks a command line operation portal with control surface functions, which makes it difficult for development and operation personnel to effectively manage and regulate the control surface functions of the DPDK service gateway.
Build a command line interface in the user space, receive the user's remote command line, and convert it into serialized interface data through the interface configuration file, and transmit it to the DPDK service gateway. At the same time, a serialization decoding module is built, and the serialized interface data is restored to the remote command line based on the interface configuration file to realize remote control of the DPDK service gateway control plane.
By providing a command line interface and serialization decoding module, users can control the control surface function of the DPDK service gateway through the command line within the authorization scope of the interface configuration file, realizing the technical effect of function reuse, and solving the problem of lack of control surface command line operation portal.
Smart Images

Figure CN115580508B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of network communications, and in particular to a DPDK service gateway command control method, apparatus, device, medium and program product. Background Art
[0002] Existing network communication systems all adopt an architecture with a separate control plane and forwarding plane. The control plane is responsible for configuration management, data collection, alarm reporting and other functions of communication equipment; the data plane is responsible for specific protocol message processing and business traffic forwarding. In the context of cloud computing network applications, gateway servers need to process a large amount of business traffic data, and the traffic data is very flexible and strongly related to business configuration. The Data Plane Development Kit (DPDK) is a set of function libraries and drivers for fast data packet processing, which can greatly improve data processing performance and throughput, and improve the work efficiency of data plane applications.
[0003] Most of the existing command line operation entries are based on the kernel protocol stack and are mostly used in embedded devices. The gateway server implements high-performance and flexibly configurable data plane functions based on the DPDK features. Although the control plane functions can be operated, the command line operation entry of the DPDK user-mode protocol stack is highly customizable and can only be applied to service gateways that use DPDK technology. It lacks a command line operation entry for control plane functions. Therefore, in actual applications, developers often use low-level local command lines combined with logs to locate faults, and operation and maintenance personnel and testers use more business upper-layer alarms and performance indicators to view gateway service anomalies, lacking intermediate-level command line operation entries. Or there is a command line operation entry that is implemented, but a general remote command line framework has not been established, the implemented DPDK functions cannot be reused, and the command operation coverage function is not perfect. Summary of the invention
[0004] In view of the above problems, the present disclosure provides a DPDK service gateway command control method, apparatus, device, medium and program product.
[0005] According to a first aspect of the present disclosure, a DPDK service gateway command control method is provided, comprising: constructing a command line interface in user space, the command line interface receiving a remote command line for a user to operate a function of a DPDK service gateway on a control plane, and converting the remote control command line into serialized interface data based on an interface configuration file, and then transmitting the serialized interface data to the DPDK service gateway; constructing a serialization decoding module of the DPDK service gateway, the serialization decoding module restoring the serialized interface data to the remote command line based on the interface configuration file; and operating the functional configuration of the DPDK service gateway based on the remote command line to perform remote control of the control plane of the DPDK service gateway.
[0006] According to an embodiment of the present disclosure, before executing the method, it also includes: obtaining interface data of the DPDK service gateway, the interface data including parameters, structure, and configuration of the control plane function interface of each functional module in the DPDK service gateway; serializing the interface data, and generating an interface configuration file in the DPDK service gateway based on the serialized interface data and data format, the interface configuration file is used to limit the content, format, permissions and execution configuration of the remote command line.
[0007] According to an embodiment of the present disclosure, the method also includes: constructing a communication channel between the command line interface and the DPDK service gateway, wherein the communication channel is used to transmit the serialized interface data and the return data generated by executing the remote command line between the command line interface and the DPDK service gateway.
[0008] According to an embodiment of the present disclosure, constructing a command line interface in the user space includes: setting a standard input block in the foreground process of the interactive window to wait for the user to input the remote command line through the interactive window.
[0009] According to an embodiment of the present disclosure, constructing a command line interface in the user space also includes: setting a timer in the background process of the interactive window, and starting the timer when the user enters the remote command line; when the return data generated by executing the remote command line arrives before the timing duration of the timer, displaying the return data to the user through the interactive window; when the duration of the return data generated by executing the remote command line exceeds the timing duration of the timer, notifying the user of a timeout error through the interactive window.
[0010] According to an embodiment of the present disclosure, the method also includes: recording the return data generated by executing the remote command line; analyzing the working status of the DPDK service gateway based on the return data, and detecting abnormal states in the working status; and locating the functional module in the DPDK service gateway that generates the abnormal state.
[0011] The second aspect of the present disclosure provides a DPDK service gateway command control device, including: a command line interface construction module, used to construct a command line interface in user space, the command line interface receives a remote command line for a user to operate a function of a DPDK service gateway on a control plane, and after converting the remote control command line into serialized interface data based on an interface configuration file, transmits the serialized interface data to the DPDK service gateway; a gateway decoding construction module, used to construct a serialized decoding module of the DPDK service gateway, the serialized decoding module restores the serialized interface data to the remote command line based on the interface configuration file; a command line execution module, used to operate the functional configuration of the DPDK service gateway based on the remote command line to perform remote control of the control plane of the DPDK service gateway.
[0012] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above method.
[0013] The fourth aspect of the present disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above method.
[0014] The fifth aspect of the present disclosure also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0015] According to the DPDK service gateway command control method, apparatus, device, medium and program product provided by the present disclosure, by providing a command line interface for users in user space, the channel between the command line interface and the DPDK gateway is opened through the interface configuration file, so that users can control the DPDK gateway through the command line within the authorization scope of the interface configuration file, so that the control plane of the DPDK has a user-operable entrance. Therefore, the present application at least partially solves the problem of lack of command lines for the control plane, and achieves the technical effect of multiplexing the functions of the DPDK gateway. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0017] Figure 1 The application scenario diagram of the DPDK service gateway command control method, apparatus, device, medium and program product according to the embodiment of the present disclosure is schematically shown;
[0018] Figure 2A flowchart of a DPDK service gateway command control method according to an embodiment of the present disclosure is schematically shown;
[0019] Figure 3 A schematic diagram of DPDK service gateway command control according to an embodiment of the present disclosure is schematically shown;
[0020] Figure 4 A flowchart of a DPDK service gateway command control method according to an embodiment of the present disclosure is schematically shown;
[0021] Figure 5 A structural block diagram of a DPDK service gateway command control device according to an embodiment of the present disclosure is schematically shown; and
[0022] Figure 6 A block diagram of an electronic device suitable for implementing a DPDK service gateway command control method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0023] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0024] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0025] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0026] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0027] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.
[0028] In the technical solution disclosed in the present invention, the acquisition, collection, storage, use, processing, transmission, provision, disclosure and application of data are in compliance with the provisions of relevant laws and regulations, necessary confidentiality measures are taken, and do not violate public order and good morals.
[0029] An embodiment of the present disclosure provides a DPDK service gateway command control method, including: constructing a command line interface in user space, the command line interface receiving a remote command line for a user to operate a function of a DPDK service gateway on a control plane, and converting the remote control command line into serialized interface data based on an interface configuration file, and then transmitting the serialized interface data to the DPDK service gateway; constructing a serialization decoding module of the DPDK service gateway, the serialization decoding module restores the serialized interface data to a remote command line based on the interface configuration file; and operating the function configuration of the DPDK service gateway based on the remote command line to perform remote control of the control plane of the DPDK service gateway.
[0030] Figure 1 The application scenario diagram of the DPDK service gateway command control method and device according to an embodiment of the present disclosure is schematically shown.
[0031] like Figure 1 As shown, the application scenario 100 according to this embodiment may include the application and maintenance scenario of the DPDK service gateway. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0032] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0033] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0034] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0035] It should be noted that the DPDK service gateway command control method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the DPDK service gateway command control device provided in the embodiment of the present disclosure can generally be set in the server 105. The DPDK service gateway command control method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Correspondingly, the DPDK service gateway command control device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.
[0036] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0037] The following will be based on Figure 1 The scene described by Figure 2 The DPDK service gateway command control method of the disclosed embodiment is described in detail.
[0038] Figure 2 The flowchart of the DPDK service gateway command control method according to an embodiment of the present disclosure is schematically shown.
[0039] like Figure 2 As shown, the DPDK service gateway command control method of this embodiment includes operations S210 to S230.
[0040] In operation S210, a command line interface is constructed in the user space, the command line interface receives a remote command line for a user to operate a function of the DPDK service gateway on the control plane, and after converting the remote control command line into serialized interface data based on an interface configuration file, transmits the serialized interface data to the DPDK service gateway.
[0041] In operation S220, a serialization decoding module of the DPDK service gateway is constructed. The serialization decoding module restores the serialization interface data to a remote command line based on the interface configuration file.
[0042] In operation S230 , the function configuration of the DPDK service gateway is operated based on the remote command line to perform remote control of the control plane of the DPDK service gateway.
[0043] According to the embodiments of the present disclosure, by providing a command line interface for users in user space, the channel between the command line interface and the DPDK gateway is opened through the interface configuration file, so that users can control the DPDK gateway through the command line within the authorization scope of the interface configuration file, so that the control plane of the DPDK has a user-operable entrance. Among them, the interface configuration file is generated based on the parameter interface and configuration requirements of each functional module of the DPDK itself, forming a communication protocol between the user and the DPDK gateway, so that the command line input by the user can be received by the DPDK gateway, and the data returned by the DPDK can also be directly obtained by the user. For users, not only can they modify the configuration of the DPDK service gateway on the control plane through the command line, but they can also rely on the high performance and flexibly configurable data plane functions of the DPDK service gateway itself, obtain data in the DPDK service gateway through the command line, and further use the data for applications such as fault location and function maintenance, thereby improving operation and maintenance efficiency.
[0044] Preferably, the command line interface can be implemented based on CLI technology. Compared with the traditional command line implementation method, the CLI method is a customized function embedded in the communication equipment, which can well isolate user operation permissions, but requires customized parameter structures for different functions, and for complex functions, the type and valid range of each parameter need to be described in detail, and a large number of functional interfaces need to be explicitly registered. From the code level, the correlation is strong and the maintenance cost is high.
[0045] In this embodiment, in order to reduce the development and operation and maintenance costs of the command line interface, the command line interface and the DPDK service gateway are connected based on the interface configuration file. The acquisition of the interface configuration file includes operations S201-S202.
[0046] In operation S201, interface data of the DPDK service gateway is obtained, where the interface data includes parameters, structure, and configuration of the control plane function interface of each function module in the DPDK service gateway.
[0047] In operation S202, the interface data is serialized, and an interface configuration file is generated in the DPDK service gateway based on the serialized interface data and the data format. The interface configuration file is used to define the content, format, permission, and execution configuration of the remote command line.
[0048] Figure 3 A schematic diagram of DPDK service gateway command control according to an embodiment of the present disclosure is schematically shown.
[0049] like Figure 3As shown, in this embodiment, the cli-client command line interface provides a client for remote CLI command operations on the control plane, and dpdk-ctrl provides a server for the control plane functions of the DPDK service gateway, and the two interact through serialized data defined by serializable-buffer. Among them, dpdk-ctrl and serializable-buffer are general implementation methods based on the DPDK service gateway, included in the functional implementation of the DPDK service gateway, and for the universality of the interface, serializable-buffer usually defines an interface file and describes the interface parameter structure in detail. The cli-client is implemented based on CLI technology, reuses the interface defined by serializable-buffer, provides a command line interface for user interaction, and responds to user input. Among them, serializable-buffer belongs to a general serialization technology, and will define the operations that DPDK already supports in the form of an interface configuration file, and reuses this part of the interface file in the cli-client module to achieve full coverage of the functions of the command line operations.
[0050] In this embodiment, the DPDK service gateway command control method further includes operation S203.
[0051] In operation S203, a communication channel is established between the command line interface and the DPDK service gateway, where the communication channel is used to transmit serialized interface data and return data generated by executing the remote command line between the command line interface and the DPDK service gateway.
[0052] Optionally, the communication channel can be a TCP communication mode or a socket creation mode. Since the socket is a function of the kernel protocol stack, after the DPDK technology is applied, the network card is taken over by the DPDK and may not be able to create a socket connection. It is more appropriate to modify it to create a TCP connection.
[0053] Figure 4 The communication flow chart of the DPDK service gateway command control method according to an embodiment of the present disclosure is schematically shown.
[0054] like Figure 4 As shown in the figure, cli-client and dpdk-ctrl establish a TCP connection after initialization, and then cli-client provides a command line interface for interaction with the user, sends the CLI command entered by the user to the server dpdk-ctrl for execution, and then receives the execution result of dpdk-ctrl and displays it to the user on the command line interface.
[0055] In the cli-client command line interface, the standard input blocking is set in the foreground process of the interactive window to wait for the user to enter the remote command line through the interactive window. Process blocking can set the foreground process of the command line section to a waiting state, saving process resource usage.
[0056] In this embodiment, a timer can also be set in the background process of the interactive window. When the user enters a remote command line, the timer is started. When the return data generated by executing the remote command line arrives before the timer's timing duration, the return data is displayed to the user through the interactive window. When the duration of the return data generated by executing the remote command line exceeds the timer's timing duration, the user is notified of a timeout error through the interactive window. The background process of the command line interface can also store the return data or response results in a local file, wherein the interface configuration file serializable-buffer translates the business data into binary data in the middle.
[0057] According to the DPDK service gateway command control method provided by the embodiment of the present disclosure, the internal configuration of the DPDK service gateway can be regulated by using the command line, the control plane functions that have been implemented by the DPDK service gateway can be reused, the control plane functions can be adjusted, and the DPDK service gateway can be used to capture data.
[0058] After grabbing the gateway data, the method may include S205-207.
[0059] In operation S205, the return data generated by executing the remote command line is recorded.
[0060] In operation S206, the working state of the DPDK service gateway is analyzed based on the returned data, and an abnormal state in the working state is detected.
[0061] In operation S207 , the function module generating the abnormal state in the DPDK service gateway is located.
[0062] This method implements a remote command line operation portal for the control plane function of the DPDK service gateway, providing convenient fault location and function maintenance means for development, testing, and operation and maintenance personnel.
[0063] The DPDK service gateway command control method provided by the embodiment of the present disclosure is applied to the service gateway implemented based on DPDK, provides users with a control plane function operation entry, reuses the control plane functions implemented by the DPDK service gateway, and can cover configuration management, data collection, alarm reporting and other functions through command lines, and can support remote deployment. The problem of lack of control plane command lines is solved.
[0064] Based on the above DPDK service gateway command control method, the present disclosure also provides a DPDK service gateway command control device. Figure 4 The device is described in detail.
[0065] Figure 5 The structural block diagram of the DPDK service gateway command control device according to an embodiment of the present disclosure is schematically shown.
[0066] like Figure 5 As shown, the DPDK service gateway command control device 500 of this embodiment includes a command line interface construction module 510, a gateway decoding construction module 520 and a command line execution module 530.
[0067] The command line interface construction module 510 is used to construct a command line interface in the user space, and the command line interface receives the remote command line of the user operating the function of the DPDK service gateway in the control plane, and converts the remote control command line into serialized interface data based on the interface configuration file, and transmits the serialized interface data to the DPDK service gateway. In one embodiment, the command line interface construction module 510 can be used to perform the operation S210 described above, which will not be repeated here.
[0068] The gateway decoding construction module 520 is used to construct a serialized decoding module of the DPDK service gateway, and the serialized decoding module restores the serialized interface data to a remote command line based on the interface configuration file. In one embodiment, the gateway decoding construction module 520 can be used to perform the operation S220 described above, which will not be repeated here.
[0069] The command line execution module 530 is used to operate the functional configuration of the DPDK service gateway based on the remote command line to perform remote control of the DPDK service gateway control plane. In one embodiment, the command line execution module 530 can be used to perform the operation S230 described above, which will not be repeated here.
[0070] According to an embodiment of the present disclosure, any multiple modules of the command line interface construction module 510, the gateway decoding construction module 520 and the command line execution module 530 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the command line interface construction module 510, the gateway decoding construction module 520 and the command line execution module 530 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the command line interface construction module 510, the gateway decoding construction module 520 and the command line execution module 530 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0071] Figure 6 A block diagram of an electronic device suitable for implementing a DPDK service gateway command control method according to an embodiment of the present disclosure is schematically shown.
[0072] like Figure 6 As shown, the electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0073] In RAM603, various programs and data required for the operation of electronic device 600 are stored. Processor 601, ROM602 and RAM603 are connected to each other via bus 604. Processor 601 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM602 and / or RAM603. It should be noted that the program can also be stored in one or more memories other than ROM602 and RAM603. Processor 601 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0074] According to an embodiment of the present disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the I / O interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage portion 608 as needed.
[0075] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0076] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM602 and / or RAM603 described above and / or one or more memories other than ROM602 and RAM603.
[0077] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program includes a program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the DPDK service gateway command control method provided by the embodiment of the present disclosure.
[0078] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 601. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0079] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0080] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by a computer program module.
[0081] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0082] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0083] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0084] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A DPDK service gateway command control method, comprising: Constructing a command line interface in the user space, the command line interface receives a remote command line for a user to operate a function of a data plane development kit (DPDK) service gateway on a control plane, converts the remote control command line into serialized interface data based on an interface configuration file, and transmits the serialized interface data to the DPDK service gateway; Constructing a serialization decoding module of the DPDK service gateway, wherein the serialization decoding module restores the serialization interface data to the remote command line based on the interface configuration file; Operating the functional configuration of the DPDK service gateway based on the remote command line to perform remote control of the DPDK service gateway control plane; The acquisition of the interface configuration file includes: acquiring interface data of the DPDK service gateway, wherein the interface data includes parameters, structure, and configuration of the control plane function interface of each functional module in the DPDK service gateway; Serialize the interface data, and generate an interface configuration file in the DPDK service gateway based on the serialized interface data and data format, wherein the interface configuration file is used to define the content, format, permissions, and execution configuration of the remote command line; A communication channel is constructed between the command line interface and the DPDK service gateway, wherein the communication channel is used to transmit the serialized interface data and the return data generated by executing the remote command line between the command line interface and the DPDK service gateway.
2. According to the method of claim 1, constructing a command line interface in the user space comprises: A standard input block is set in the foreground process of the interactive window to wait for the user to input the remote command line through the interactive window.
3. The method according to claim 2, wherein constructing a command line interface in user space further comprises: Setting a timer in the background process of the interactive window, and starting the timer when the user inputs the remote command line; When the return data generated by executing the remote command line arrives before the timing duration of the timer, displaying the return data to the user through the interactive window; When the duration of the returned data generated by executing the remote command line exceeds the timing duration of the timer, a timeout error is notified to the user through the interactive window.
4. The method according to claim 1, further comprising: Recording the return data generated by executing the remote command line; Analyze the working status of the DPDK service gateway based on the returned data, and detect abnormal status in the working status; Locate the functional module in the DPDK service gateway that generates the abnormal state.
5. A DPDK service gateway command control device, comprising: A command line interface construction module is used to construct a command line interface in the user space, wherein the command line interface receives a remote command line for a user to operate a function of the DPDK service gateway on the control plane, and converts the remote control command line into serialized interface data based on an interface configuration file, and then transmits the serialized interface data to the DPDK service gateway; A gateway decoding construction module, used to construct a serialization decoding module of the DPDK service gateway, wherein the serialization decoding module restores the serialization interface data to the remote command line based on the interface configuration file; A command line execution module, used to operate the functional configuration of the DPDK service gateway based on the remote command line to perform remote control of the DPDK service gateway control plane; The acquisition of the interface configuration file includes: acquiring interface data of the DPDK service gateway, wherein the interface data includes parameters, structure, and configuration of the control plane function interface of each functional module in the DPDK service gateway; Serialize the interface data, and generate an interface configuration file in the DPDK service gateway based on the serialized interface data and data format, wherein the interface configuration file is used to define the content, format, permissions, and execution configuration of the remote command line; A communication channel is constructed between the command line interface and the DPDK service gateway, wherein the communication channel is used to transmit the serialized interface data and the return data generated by executing the remote command line between the command line interface and the DPDK service gateway.
6. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Network resource access method and device, computer equipment and storage medium
CN111756729A
Remote calling method and device, computer equipment and storage medium
CN112181681A