CN112685197B - Interface data interactive system - Google Patents

Interface data interactive system Download PDF

Info

Publication number
CN112685197B
CN112685197B CN202011580807.9A CN202011580807A CN112685197B CN 112685197 B CN112685197 B CN 112685197B CN 202011580807 A CN202011580807 A CN 202011580807A CN 112685197 B CN112685197 B CN 112685197B
Authority
CN
China
Prior art keywords
shared memory
data
sub
access control
medium access
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.)
Active
Application number
CN202011580807.9A
Other languages
Chinese (zh)
Other versions
CN112685197A (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.)
Inspur Software Technology Co Ltd
Original Assignee
Inspur Software Technology Co 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 Inspur Software Technology Co Ltd filed Critical Inspur Software Technology Co Ltd
Priority to CN202011580807.9A priority Critical patent/CN112685197B/en
Publication of CN112685197A publication Critical patent/CN112685197A/en
Application granted granted Critical
Publication of CN112685197B publication Critical patent/CN112685197B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention provides an interactive system of interface data, comprising: the data plane development module comprises a shared memory; the wireless subsystem is used for acquiring the shared memory and sending the shared memory to the medium access control layer; the medium access control layer is used for dividing the shared memory received from the wireless subsystem into at least one sub-shared memory block according to the size of the interface data; storing the interface data to the sub-shared memory block, and sending the sub-shared memory block stored with the interface data to the wireless subsystem; the wireless subsystem is also used for receiving and storing the sub shared memory block in which the interface data is stored; the physical layer is used for acquiring the sub shared memory block storing the interface data from the wireless subsystem and processing the interface data; and sending the return data after processing the interface data to the medium access control layer through the wireless subsystem. According to the scheme, data interaction can be realized without providing a shared memory through a CPU (central processing unit), so that the execution efficiency of the system is improved.

Description

Interface data interactive system
Technical Field
The present invention relates to the field of wireless communication technologies, and in particular, to an interface data interaction system.
Background
With the development of scientific technology, fifth generation mobile communication (5) th generation, 5G) network technology is increasingly being applied.
At present, Application Program Interface (API) communication between a Media Access Control (MAC) layer and a Physical layer (PHY) mainly uses a process communication shared memory to perform data exchange. In the prior art, before the MAC and PHY processes use the shared memory space, a connection needs to be established between the geological space and the shared memory space, and the system needs to make restrictions on the shared memory, such as creating the shared memory, controlling the shared memory, mapping the shared memory object, and separating the shared memory object, which greatly increases the complexity of message interaction between the MAC and the PHY and also reduces the execution efficiency of the system.
Therefore, it is desirable to provide an interactive scheme for interfacing data.
Disclosure of Invention
The invention provides an interface data interaction system, which can realize data interaction between a medium access control layer and a physical layer without providing a shared memory through a CPU (central processing unit), thereby improving the execution efficiency of the system.
The embodiment of the invention provides an interactive system of interface data, which comprises: the system comprises a medium access control layer, a wireless subsystem, a data plane development module and a physical layer;
the data plane development module comprises a shared memory; the shared memory is a public memory for storing data of the medium access control layer and the physical layer;
the wireless subsystem is used for acquiring the shared memory and sending the shared memory to the medium access control layer;
the medium access control layer is configured to divide the shared memory received from the wireless subsystem into at least one sub-shared memory block according to a size of interface data; storing the interface data to the sub-shared memory block, and sending the sub-shared memory block stored with the interface data to the wireless subsystem; wherein the interface data is used to access the physical layer;
the wireless subsystem is further configured to receive and store the sub-shared memory block in which the interface data is stored;
the physical layer is configured to acquire the sub-shared memory block in which the interface data is stored from the wireless subsystem, and process the interface data; and sending the return data after processing the interface data to the medium access control layer through the wireless subsystem.
In a possible implementation manner, the data plane development module is configured to set a shared identifier for the shared memory, and send the shared identifier to the wireless subsystem; the shared identifier is used for uniquely pointing to the shared memory;
the radio subsystem is further configured to receive the shared identifier and send the shared identifier to the mac layer and the phy layer, respectively.
In one possible implementation form of the method,
the medium access control layer is also used for setting master-slave identification parameters; the master-slave identification parameter is used for distinguishing the current master-slave state of the medium access control layer;
the physical layer is further configured to initialize the wireless subsystem before the medium access control layer is started when the data plane development module determines that the medium access control layer is a slave device according to the master-slave identification parameter;
the medium access control layer is further configured to, when the data plane development module determines that the medium access control layer is a master device according to the master-slave identification parameter, divide the shared memory, and send at least one divided sub-shared memory block to the physical layer, so as to provide a memory space for the physical layer to perform data return.
In one possible implementation form of the method,
the medium access control layer is further configured to, when the data plane development module determines that the medium access control layer is a master device according to the master-slave identification parameter, sort the sub-shared memory blocks according to a sending order of the interface data stored in each sub-shared memory block, so as to obtain a first order; and sending each of the sub-shared memory blocks to the physical layer in the first order;
the physical layer is further configured to process interface data stored in each sub-shared memory block sent by the medium access control layer, and store each piece of return data obtained after processing into each sub-shared memory block correspondingly; and returning each sub-shared memory block storing the returned data to the medium access control layer according to the first sequence.
In one possible implementation of the method according to the invention,
the medium access control layer is further configured to create a first identifier for the currently-to-be-transmitted sub shared memory block, create a second identifier for the next-to-be-transmitted sub shared memory block, and create a third identifier for the sub shared memory block corresponding to the interface data being processed; sending the currently sent sub-shared memory block carrying the first identifier, the second identifier and the third identifier to the physical layer;
and/or the presence of a gas in the gas,
the physical layer is further configured to create a fourth identifier for the currently-to-be-transmitted sub shared memory block, create a fifth identifier for the next-to-be-transmitted sub shared memory block, and create a sixth identifier for the sub shared memory block corresponding to the returned data being processed; and sending the currently sent sub-shared memory block carrying the fourth identifier, the fifth identifier and the sixth identifier to the medium access control layer.
In one possible implementation form of the method,
the physical layer is further configured to create a first dedicated receive thread for the wireless subsystem interface;
the medium access control layer is further configured to wake up the first dedicated receiving thread by using the wireless subsystem, so that the first dedicated receiving thread processes the interface data;
and/or the presence of a gas in the gas,
the medium access control layer is also used for creating a second special receiving thread for the wireless subsystem interface;
the physical layer is further configured to wake up the second dedicated receive thread using the wireless subsystem, so that the second dedicated receive thread processes the return data.
In one possible implementation form of the method,
the data plane development module is further configured to poll the wireless subsystem interface to query the interface data or the return data.
In one possible implementation form of the method,
the medium access control layer is also used for constructing a first virtual shared memory according to the shared memory; the first virtual shared memory is used for processing the interface data, and the first virtual shared memory and the shared memory have the same physical address;
and/or the presence of a gas in the gas,
the physical layer is further used for constructing a second virtual shared memory according to the shared memory; the second virtual shared memory is used for processing the return data, and the second virtual shared memory and the shared memory have the same physical address.
In one possible implementation form of the method,
the physical layer is further configured to determine whether the interface data is sent in a position in the mac layer corresponding to the current position; when the interface data is inquired to be sent, the interface data is received, and when the interface data is inquired not to be sent, a prompt of sending error of the interface data is made;
and/or the presence of a gas in the gas,
the medium access control layer is further configured to determine whether the return data is sent in a location corresponding to the current location in the physical layer; and receiving the return data when the return data is inquired to be sent, and making a prompt of a return data sending error when the return data is not inquired to be sent.
In one possible implementation form of the method,
the wireless subsystem is further configured to merge the sub shared memory blocks into the shared memory after the physical layer obtains the interface data in the sub shared memory blocks;
and/or the presence of a gas in the gas,
the wireless subsystem is further configured to merge the sub shared memory blocks into the shared memory after the medium access control layer obtains the return data in the sub shared memory blocks.
According to the technical scheme, when interface data interaction is carried out between the medium access control layer and the physical layer, the data plane development module can be adopted to provide a shared memory for the data interaction between the medium access control layer and the physical layer. When data interaction is needed, the media access control layer divides the shared memory according to the size of the interface data, so that the party sending the data stores the data to be sent into the divided sub-shared memory blocks and uploads the data to the wireless subsystem, and the receiving party acquires the data in the sub-shared memory blocks from the wireless subsystem, thereby realizing the data interaction. Therefore, when data interaction is carried out, the CPU is not required to provide a shared memory for data access between the medium access control layer and the physical layer, and the wireless subsystem acquires the shared memory from the data plane development module, so that the CPU can be liberated, and the execution efficiency and performance of the data interaction in the system can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an interactive system for interfacing data according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a sub-shared memory block partition according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of binding a medium access control layer and a physical layer according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a master-slave device control according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides an interactive system for interface data, where the system may include: a medium access control layer 101, a wireless subsystem 102, a data plane development module 103, and a physical layer 104;
the data plane development module 103 includes a shared memory; the shared memory is a common memory for storing data in the medium access control layer 101 and the physical layer 104;
a wireless subsystem 102, configured to obtain a shared memory and send the shared memory to the mac layer 101;
a medium access control layer 101, configured to divide the shared memory received from the wireless subsystem 102 into at least one sub-shared memory block according to the size of the interface data; storing the interface data to the sub-shared memory block, and sending the sub-shared memory block stored with the interface data to the wireless subsystem 102; wherein the interface data is used to access the physical layer 104;
the wireless subsystem 102 is further configured to receive and store the sub-shared memory block in which the interface data is stored;
a physical layer 104, configured to obtain the sub-shared memory block in which the interface data is stored from the wireless subsystem 102, and process the interface data; and sends the return data after processing the interface data to the mac layer 101 via the radio subsystem 102.
In the embodiment of the present invention, when interface data interaction is performed between the mac layer and the physical layer, a data plane development module may be used to provide a shared memory for data interaction between the mac layer and the physical layer. When data interaction is needed, the medium access control layer divides the shared memory according to the size of the interface data, so that the party sending the data stores the data to be sent into the divided sub-shared memory blocks and uploads the data to the wireless subsystem, and the receiving party obtains the data in the sub-shared memory blocks from the wireless subsystem, thereby realizing the data interaction. Therefore, when data interaction is carried out, the CPU is not required to provide a shared memory for data access between the medium access control layer and the physical layer, and the wireless subsystem acquires the shared memory from the data plane development module, so that the CPU can be liberated, and the execution efficiency and performance of the data interaction in the system can be improved.
In a possible implementation manner, the interface data interaction system shown in fig. 1 may further consider binding the mac layer 101 and the phy layer 104, which is specifically as follows:
a data plane development module 103, configured to set a shared identifier for the shared memory, and send the shared identifier to the wireless subsystem 102; the shared identifier is used for uniquely pointing to the shared memory;
the wireless subsystem 102 is further configured to receive the shared identifier and send the shared identifier to the mac layer 101 and the phy layer 104, respectively.
In the embodiment of the invention, the shared identifier used for uniquely pointing to the shared memory is set, and the shared identifier is provided to the medium access control layer and the physical layer. In this way, the physical layer and the mac layer may be bound such that the shared memory may be retrieved from the radio subsystem based on the identifier. That is to say, the wireless subsystem provides the shared identifier for the medium access control layer and the physical layer, and the medium access control layer and the physical layer do not need to provide a memory through the CPU during communication, and only need to obtain the shared memory provided by the data plane development module through the identifier, so that the storage space of the CPU can be freed, and the execution efficiency of the system can be further improved.
In a possible implementation manner, the interface data interaction system shown in fig. 1 considers that the device performs operations in different situations by setting a master-slave identification parameter for a medium access control layer, which is specifically as follows:
the medium access control layer 101 is further configured to set a master-slave identification parameter; the master-slave identification parameter is used for distinguishing the current master-slave state of the media access control layer 101;
the physical layer 104 is further configured to initialize the wireless subsystem 102 before the medium access control layer 101 is started when the data plane development module 103 determines that the medium access control layer 101 is a slave device according to the master-slave identification parameter;
the medium access control layer 101 is further configured to, when the data plane development module 103 determines that the medium access control layer 101 is a master device according to the master-slave identification parameter, partition the shared memory, and send at least one partitioned sub-shared memory block to the physical layer 104, so as to provide a memory space for the physical layer 104 to perform data return.
In the embodiment of the invention, the master-slave identification parameter used for distinguishing the current master-slave state is set on the medium access control layer, so that when the medium access control layer is slave equipment, the wireless subsystem is initialized before the medium access control layer is started, so as to clear the memory in the wireless subsystem, and guarantee is provided for subsequent data interaction. In addition, when the medium access control layer is a master device, the medium access control layer may partition the shared memory, and send the partitioned sub-shared memory block to the physical layer, so that the physical layer may use the sub-shared memory block to perform data return, that is, a guarantee is provided for bidirectional interaction between the medium access control layer and the physical layer.
In a possible implementation manner, the interface data interaction system shown in fig. 1 may further consider that the sub-shared memory blocks are sorted according to the transmission order of the stored data, and data is returned according to the data, which is specifically as follows:
the medium access control layer 101 is further configured to, when the data plane development module 103 determines that the medium access control layer 101 is a master device according to the master-slave identification parameter, sort the sub-shared memory blocks according to a sending order of the interface data stored in each sub-shared memory block, so as to obtain a first order; and sending each sub-shared memory block to the physical layer 104 in a first order;
the physical layer 104 is further configured to process interface data stored in each sub-shared memory block sent by the mac layer 101, and correspondingly store each processed return data into each sub-shared memory block; and returning each sub-shared memory block storing the return data to the medium access control layer 101 according to the first order.
In this embodiment of the present invention, when the mac layer is a master device, the sub-shared memory blocks may be sorted according to a transmission order of the interface data stored in each sub-shared memory block, so that each sub-shared memory block may be transmitted according to the order. And simultaneously, after processing the received interface data, the physical layer respectively stores the interface data into the corresponding sub-shared memory blocks and returns the interface data to the medium access control layer according to the sequence sent by the medium access control layer. Therefore, the data interaction is carried out orderly in the interface data interaction process in a queue mode, and the data blocking probability and the data packet loss probability are reduced.
In a possible implementation manner, when the sending party sends data, identifiers are respectively set for currently sent data, next sent data and data being processed, and the identifiers are sent to the receiving party together when the current data is sent, specifically as follows:
the mac layer 101 is further configured to create a first identifier for the currently-to-be-transmitted sub shared memory block, create a second identifier for the next-to-be-transmitted sub shared memory block, and create a third identifier for the sub shared memory block corresponding to the interface data being processed; sending the currently sent sub-shared memory block carrying the first identifier, the second identifier and the third identifier to the physical layer 104;
and/or the presence of a gas in the gas,
the physical layer 104 is further configured to create a fourth identifier for the currently-to-be-transmitted sub shared memory block, create a fifth identifier for the next-to-be-transmitted sub shared memory block, and create a sixth identifier for the sub shared memory block corresponding to the returned data being processed; and sending the currently sent sub-shared memory block carrying the fourth identifier, the fifth identifier and the sixth identifier to the medium access control layer 101.
In the embodiment of the invention, when a sender sends data, identifiers are respectively set for currently sent data, next sent data and data being processed, and when the current data is sent to a receiver, the identifiers are carried in the currently sent data and sent to the receiver, so that the receiver can know the current state of the sender in real time, and accordingly, corresponding preparation operation is carried out, such as preparation for receiving the next to-be-sent data, and the like, and therefore, the efficiency of data interaction can be improved, and guarantee can be provided for accurate interaction of the data.
In a possible implementation manner, the interactive system for interface data shown in fig. 1 considers the manner of creating a receiving thread by a receiving party to perform thread design, specifically as follows:
a physical layer 104, further configured to create a first proprietary receive thread for the wireless subsystem 102 interface;
the medium access control layer 101 is further configured to wake up the first special receiving thread by using the wireless subsystem 102, so that the first special receiving thread processes the interface data;
and/or the presence of a gas in the gas,
the medium access control layer 101 is further configured to create a second dedicated receiving thread for the interface of the wireless subsystem 102;
the physical layer 104 is further configured to wake up the second dedicated receive thread using the wireless subsystem 102, so that the second dedicated receive thread processes the return data.
In the embodiment of the invention, by creating a receiving thread by a receiving party (a physical layer or a medium access control layer), a sending party (the medium access control layer or the physical layer) can wake up the created receiving thread when sending data, so that the created receiving thread can realize the processing and interaction of the data. Therefore, the interface function of the wireless subsystem can be operated and can be shared with other tasks, and the execution efficiency of the system is improved.
In a possible implementation manner, the interactive system for interface data shown in fig. 1 may further consider thread design by using a polling manner, which is specifically as follows:
the data plane development module 103 is further configured to poll the interface of the wireless subsystem 102 to query the interface data or the return data.
In the embodiment of the invention, when the creation of the proprietary thread is not carried out, the wireless subsystem interface can be polled from other threads except the proprietary receiving thread from time to time, so that the resource of one core can be saved, and the aim of improving the execution efficiency and performance of the system is fulfilled.
In a possible implementation manner, the interface data interaction system shown in fig. 1 considers that the medium access control layer and the physical layer respectively perform virtual memory mapping according to the shared memory, so as to process data in the virtual memory. The concrete steps are as follows:
the medium access control layer 101 is further configured to construct a first virtual shared memory according to the shared memory; the first virtual shared memory is used for processing interface data, and the first virtual shared memory and the shared memory have the same physical address;
and/or the presence of a gas in the gas,
the physical layer 104 is further configured to construct a second virtual shared memory according to the shared memory; the second virtual shared memory is used for processing the return data, and the second virtual shared memory and the shared memory have the same physical address.
In the embodiment of the invention, the medium access control layer and the physical layer respectively form the virtual shared memory according to the mapping of one end of each shared memory, so that the data processing can be carried out in the virtual shared memory, and when the data processing is finished, the data is mapped into the shared memory in the wireless subsystem, and the receiver acquires the data from the shared memory through the identifier of the corresponding position, thereby realizing the data interaction.
In a possible implementation manner, the interactive system for interface data shown in fig. 1 considers that a receiving side (a physical layer or a medium access control layer) determines whether there is data to be sent at a position corresponding to a sending side (the medium access control layer or the physical layer) by means of querying. The concrete steps are as follows:
the physical layer 104 is further configured to determine whether interface data is sent in a position corresponding to the current position in the mac layer 101; when the interface data is inquired to be sent, the interface data is received, and when the interface data is inquired not to be sent, a prompt of sending error of the interface data is given;
and/or the presence of a gas in the gas,
the mac layer 101 is further configured to determine whether return data is sent in a location corresponding to the current location in the physical layer 104; and receiving the return data when the return data is inquired to be sent, and making a prompt of a return data sending error when the return data is not inquired to be sent.
In the embodiment of the invention, the receiver judges whether the sender has data to send or not by inquiring the peer-to-peer position of the sender, so that the condition that whether the sender has data sending errors or not can be verified, and the accuracy of data interaction can be improved.
In a possible implementation manner, after the receiving side finishes acquiring the data, the partitioned sub-shared memory blocks are considered to be released, as in the interface data interaction system shown in fig. 1. Specifically, the following are:
the wireless subsystem 102 is further configured to merge the sub shared memory blocks into the shared memory after the physical layer 104 obtains the interface data in the sub shared memory blocks;
and/or the presence of a gas in the gas,
the wireless subsystem 102 is further configured to merge the sub shared memory blocks into the shared memory after the medium access control layer 101 obtains the return data in the sub shared memory blocks.
In the embodiment of the present invention, after the receiving side acquires the data sent by the sending side, the wireless subsystem releases the sub shared memory block that was used for storing the data, that is, returns and merges the sub shared memory block into the shared memory. Therefore, sufficient shared memory can be provided for other data interaction, and the processing efficiency of the system is improved.
It should be noted that any of the above-mentioned senders may be a medium access control layer or a physical layer; any of the receivers mentioned above may be the physical layer or the mac layer. When the medium access control layer is a sender, the physical layer is a receiver; conversely, when the physical layer is the sender, the medium access control layer is the receiver.
The following describes the interface data interaction system provided in the embodiment of the present invention in further detail:
the invention mainly realizes a low-overhead wireless subsystem interface API exchange scheme between a medium access control layer and a physical layer. The physical layer and the medium access control layer run in different cores of the same CPU, and the wireless subsystem interface mainly plays a role of sharing a memory interface. Specifically, there may be mainly:
1. as shown in fig. 2, the shared memory between the physical layer PHY and the MAC is provided by a Data Plane Development module, such as a Data Plane Development Kit (DPDK) for a function library and a driver set for fast packet processing, and is described as DPDK below. The shared memory is typically provided at 1GB to maintain multi-cell and peak throughput of the API between the physical layer and the medium access control layer. The shared memory is not maintained by the wireless subsystem, but is provided by a jumbo buffer of a jumbo page of the data plane development module, and is distributed by the wireless subsystem interface to the application program transferred to the physical layer and the medium access control layer. Then, the MAC of the MAC layer obtains the buffer, and divides the buffer into sub-shared memory blocks (which may be 8K,16K, or other sizes, and may be specifically divided according to the data size) of various sizes aligned with 64 byte boundaries, and applies the memory to send and receive API messages of the physical layer.
2. As shown in fig. 3, a DPDK driver may be used to set a unique identifier for a shared memory in the wireless subsystem, so as to bind the MAC and the PHY together using the same unique identifier, for example, using a unique identifier, file-prefix.
3. As shown in fig. 4, a master-slave relationship identifier is set to the medium access control layer. When the PHY is the master of the wireless subsystem and the MAC is the slave. The PHY's applications need to start first and initialize the radio subsystem interface before the MAC starts. For a DPDK based on the wireless subsystem interface, the MAC needs to add an identification parameter (e.g., -proc-type auto) so that the DPDK knows that the MAC is a secondary application to the primary application at this time. For memory management, PHY is a slave, MAC is a master sharing memory, and the master MAC manages the memory partition completely. The MAC gives the PHY memory block over the radio subsystem interface for the PHY to return data to the MAC.
4. Thread design of the radio subsystem interface. In the data interaction process, the PHY may be a receiver or a sender, and the corresponding MAC is the sender or the receiver. That is, when the MAC is the sender, the PHY is the receiver, and when the PHY is the sender, the MAC is the receiver. The sending party does not have a separate thread to send data, but generally sends the data from the kernel of the baseband processing unit or the DPDK overhead kernel, and during multi-thread protection, a mode that data is sent by an application program from two threads at different times is adopted. Specifically, the thread design of the receiving party may be:
1) a kernel is used to create a proprietary receive thread for the radio subsystem interface. Some data in the wireless subsystem may relinquish control of the thread to the operating system (so that other threads on the same kernel may be scheduled) and the sender may then use the wireless subsystem to wake up the thread, in which way the core may not only run the wireless subsystem interface functions, but also share with other task contexts.
2) The method does not create a special receiving thread, and only polls the wireless subsystem interface from other threads (such as a kernel of DPDK overhead) from time to time, so that the resource of one kernel can be saved.
3) In the communication process of the MAC and PHY, a hybrid method is also considered. That is, a receiving thread is created to process the non-real-time API, which is placed on the kernel of the operating system, thus saving resources of one kernel. The real-time API adopts a polling mode and is transmitted to the kernel of the baseband processing unit from a DPDK polling thread.
5. The MAC and PHY may stop the interaction process for the data. And the opening function of the wireless subsystem interface enables the control part of the shared memory to be mapped to the memory part of the MAC or PHY, and a pointer of the wireless subsystem interface is returned for subsequent calling. The MAC determines whether the receiver has established a one-to-one peer connection by invoking a prepare function of the wireless subsystem. Specifically, the method comprises the following steps:
1) the MAC and PHY may call the API to obtain the sub-shared memory blocks during initialization or shutdown, such that the MAC and PHY may store virtual address spaces (the first virtual shared memory and the second virtual shared memory) corresponding to a common physical address. Both sides can call the wireless subsystem interface allocation function to allocate the memory blocks of the shared memory for data exchange, and can also call the release function to release the sub-shared memory blocks for data exchange, i.e. to merge the sub-shared memory blocks into the shared memory.
2) Since the MAC is the master of these sub-shared memory blocks and the PHY is the slave, the MAC needs to queue these sub-shared memory blocks into a queue so that the PHY returns to the MAC in the order of data transmission.
3) Each party needs to get a queue of buffers from the buffers that the other party puts into the queue, and a flag field (i.e. first to sixth identifiers) associated with each block sent/received. Indicating that the sender is sending the first block, the next block, and the block being processed in the block list, respectively. The wireless subsystem interface also defines the function that both MAC and PHY can call, put the sub-shared memory block (or a group of memory blocks) allocated in the shared memory into the interface, in order to transmit to the peer position of the receiver, can receive the sub-shared memory block from the peer position, if there is no memory block, return NULL; if no receive thread is created at the recipient, it can be checked at the recipient via interface data or return data whether a message block was sent from the other end.
4) If the receiver creates a dedicated receive thread, it is used to give control of the thread to the system and the receiver thread is awakened by the sender. The receiving party waits for a new memory block from the sending party and returns the number of the received blocks by calling a waiting function of the wireless subsystem interface. The sender may also invoke a wireless subsystem interface wakeup function to notify the recipient of the readiness to receive the message.
5) The MAC and PHY transmit or receive sub-shared memory blocks are always within the physical address range and the application needs to convert them into virtual address spaces (first virtual shared memory and second virtual shared memory) to start processing. The wireless subsystem interface designs a calling function that the physical address and the virtual address can be mutually converted.
6. The wireless subsystem interface also envisages lock-free allocation: to protect the code of the PHY from multiple threads on multiple cores, the allocation of radio subsystem interface buffers requires the design of some mutual exclusion locks. In this case, the radio subsystem interface is designed as a lock-free assignment. Specifically, the sub-shared memory block may be designed to be 12 queues, and each queue is implemented by a pool with a depth of 48 blocks, and when a kernel of any baseband processing unit needs a buffer, a queue symbol is transmitted and the sub-shared memory block of one wireless subsystem interface is acquired, without using a lock. It should be noted that the specific queue and the depth of each queue can be set according to specific situations, and here, only 12 queues and 48 blocks are illustrated by way of example, and no specific value is limited.
It is to be understood that the illustrated structure of the embodiments of the present specification does not constitute a specific limitation on any device in the interactive system of interface data. In other embodiments of the specification, any of the devices in the interactive system that interface data may include more or fewer components than shown, or some of the components may be combined, some of the components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: ROM, RAM, magnetic or optical disks, etc. that can store program codes.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (7)

1. An interactive system for interfacing data, comprising: the system comprises a medium access control layer, a wireless subsystem, a data plane development module and a physical layer;
the data plane development module comprises a shared memory; the shared memory is a public memory for storing data of the medium access control layer and the physical layer;
the wireless subsystem is used for acquiring the shared memory and sending the shared memory to the medium access control layer;
the medium access control layer is configured to divide the shared memory received from the wireless subsystem into at least one sub-shared memory block according to the size of interface data; storing the interface data to the sub-shared memory block, and sending the sub-shared memory block stored with the interface data to the wireless subsystem; wherein the interface data is used to access the physical layer;
the wireless subsystem is also used for receiving and storing the sub-shared memory block storing the interface data;
the physical layer is configured to acquire the sub-shared memory block in which the interface data is stored from the wireless subsystem, and process the interface data; and sending return data after processing the interface data to the medium access control layer through the wireless subsystem;
the data plane development module is used for setting a shared identifier for the shared memory and sending the shared identifier to the wireless subsystem; the shared identifier is used for uniquely pointing to the shared memory;
the wireless subsystem is further configured to receive the shared identifier and send the shared identifier to the medium access control layer and the physical layer, respectively;
the medium access control layer is also used for setting master-slave identification parameters; the master-slave identification parameter is used for distinguishing the current master-slave state of the medium access control layer;
the physical layer is further configured to initialize the wireless subsystem before the medium access control layer is started when the data plane development module determines that the medium access control layer is a slave device according to the master-slave identification parameter;
the media access control layer is further configured to, when the data plane development module determines that the media access control layer is a master device according to the master-slave identification parameter, divide the shared memory, and send at least one divided sub-shared memory block to the physical layer, so as to provide a memory space for the physical layer to perform data return;
the medium access control layer is further configured to, when the data plane development module determines that the medium access control layer is a master device according to the master-slave identification parameter, sort the sub-shared memory blocks according to a sending order of the interface data stored in each sub-shared memory block, so as to obtain a first order; and sending each of the sub-shared memory blocks to the physical layer in the first order;
the physical layer is further configured to process interface data stored in each sub-shared memory block sent by the medium access control layer, and store each piece of return data obtained after processing into each sub-shared memory block correspondingly; and returning each sub-shared memory block storing the returned data to the medium access control layer according to the first sequence.
2. The system of claim 1,
the medium access control layer is further configured to create a first identifier for the currently-to-be-transmitted sub shared memory block, create a second identifier for the next-to-be-transmitted sub shared memory block, and create a third identifier for the sub shared memory block corresponding to the interface data being processed; sending the currently sent sub-shared memory block carrying the first identifier, the second identifier and the third identifier to the physical layer;
and/or the presence of a gas in the atmosphere,
the physical layer is further configured to create a fourth identifier for the currently-to-be-transmitted sub shared memory block, create a fifth identifier for the next-to-be-transmitted sub shared memory block, and create a sixth identifier for the sub shared memory block corresponding to the returned data being processed; and sending the currently sent sub-shared memory block carrying the fourth identifier, the fifth identifier and the sixth identifier to the medium access control layer.
3. The system of claim 1,
the physical layer is further configured to create a first dedicated receive thread for the wireless subsystem interface;
the medium access control layer is further configured to wake up the first dedicated receiving thread by using the wireless subsystem, so that the first dedicated receiving thread processes the interface data;
and/or the presence of a gas in the gas,
the medium access control layer is also used for creating a second special receiving thread for the wireless subsystem interface;
the physical layer is further configured to wake up the second dedicated receive thread using the wireless subsystem, so that the second dedicated receive thread processes the return data.
4. The system of claim 3,
the data plane development module is further configured to poll the wireless subsystem interface to query the interface data or the return data.
5. The system of claim 1,
the medium access control layer is also used for constructing a first virtual shared memory according to the shared memory; the first virtual shared memory is used for processing the interface data, and the first virtual shared memory and the shared memory have the same physical address;
and/or the presence of a gas in the gas,
the physical layer is further used for constructing a second virtual shared memory according to the shared memory; the second virtual shared memory is used for processing the return data, and the second virtual shared memory and the shared memory have the same physical address.
6. The system of claim 1,
the physical layer is further configured to determine whether the interface data is sent in a position in the mac layer corresponding to the current position; when the interface data is inquired to be sent, the interface data is received, and when the interface data is inquired not to be sent, a prompt of sending error of the interface data is made;
and/or the presence of a gas in the gas,
the medium access control layer is further configured to determine whether the return data is sent in a location corresponding to the current location in the physical layer; and receiving the return data when the return data is inquired to be sent, and making a prompt of a return data sending error when the return data is inquired not to be sent.
7. The system of claim 1,
the wireless subsystem is further configured to merge the sub shared memory blocks into the shared memory after the physical layer obtains the interface data in the sub shared memory blocks;
and/or the presence of a gas in the gas,
the wireless subsystem is further configured to merge the sub shared memory blocks into the shared memory after the medium access control layer obtains the return data in the sub shared memory blocks.
CN202011580807.9A 2020-12-28 2020-12-28 Interface data interactive system Active CN112685197B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011580807.9A CN112685197B (en) 2020-12-28 2020-12-28 Interface data interactive system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011580807.9A CN112685197B (en) 2020-12-28 2020-12-28 Interface data interactive system

Publications (2)

Publication Number Publication Date
CN112685197A CN112685197A (en) 2021-04-20
CN112685197B true CN112685197B (en) 2022-08-23

Family

ID=75453465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011580807.9A Active CN112685197B (en) 2020-12-28 2020-12-28 Interface data interactive system

Country Status (1)

Country Link
CN (1) CN112685197B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391876A (en) * 2014-10-30 2015-03-04 北京思特奇信息技术股份有限公司 Static data storing and querying method and system
WO2018072445A1 (en) * 2016-10-20 2018-04-26 南京南瑞继保电气有限公司 Running method for embedded type virtual device and system

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100343779B1 (en) * 1999-12-21 2002-07-20 한국전자통신연구원 Medium access control processor device of wireless mobile terminal
JP4214865B2 (en) * 2003-08-27 2009-01-28 日本電気株式会社 Packet communication system and packet communication method used therefor
EP2187400B1 (en) * 2008-11-14 2012-01-04 Telefonaktiebolaget L M Ericsson (publ) Network access device with shared memory
US20100131679A1 (en) * 2008-11-24 2010-05-27 Jian-Bang Lin Apparatus for performing a downlink or uplink processing in a wireless communication system to maintain the efficiency of system bandwidth, and associated methods
CN101437033B (en) * 2008-12-16 2012-07-11 杭州华三通信技术有限公司 Method and network appliance for supporting variable velocity
CN105302765A (en) * 2014-07-22 2016-02-03 电信科学技术研究院 System on chip and memory access management method thereof
CN104618335B (en) * 2014-12-30 2017-10-24 京信通信系统(中国)有限公司 The method and interface processing platform of a kind of interacting message
WO2018119952A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Device virtualization method, apparatus, system, and electronic device, and computer program product
US10659540B2 (en) * 2017-03-27 2020-05-19 Intel IP Corporation [5G next generation Wi-Fi] on the fly traffic steering for collocated multi-band aggregation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391876A (en) * 2014-10-30 2015-03-04 北京思特奇信息技术股份有限公司 Static data storing and querying method and system
WO2018072445A1 (en) * 2016-10-20 2018-04-26 南京南瑞继保电气有限公司 Running method for embedded type virtual device and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种高效RTAI共享内存管理层的研究与实现;王煜等;《组合机床与自动化加工技术》;20130120(第01期);全文 *

Also Published As

Publication number Publication date
CN112685197A (en) 2021-04-20

Similar Documents

Publication Publication Date Title
US5815678A (en) Method and apparatus for implementing an application programming interface for a communications bus
WO2021042840A1 (en) Data processing method and apparatus, server, and computer-readable storage medium
CN105511954A (en) Method and device for message processing
WO2006134373A3 (en) Reception according to a data transfer protocol of data directed to any of a plurality of destination entities
US11500666B2 (en) Container isolation method and apparatus for netlink resource
CN103297395A (en) Achievement method, system and device of internet business
CN108319509B (en) Event management method, system and master control equipment
CN112698959A (en) Multi-core communication method and device
CN110971533B (en) Method, server apparatus, client apparatus, and medium for data communication
CN112685197B (en) Interface data interactive system
CN114911632B (en) Method and system for controlling interprocess communication
CN104683353A (en) Security information adaptive communication system for internet of vehicles
CN109639599B (en) Network resource scheduling method and system, storage medium and scheduling device
CN111294220B (en) Nginx-based network isolation configuration method and device
CN102117261B (en) Communication method between inner processors of chip
CN111124716A (en) Multi-priority queue message transmission method in unmanned aerial vehicle
WO2023030178A1 (en) Communication method based on user-mode protocol stack, and corresponding apparatus
CN107911317B (en) Message scheduling method and device
CN109582481B (en) Transmission method, device and equipment of call result and storage medium
CN116684074B (en) Method and device for driving multi-core scheduling algorithm of hardware password module and electronic equipment
CN107205033B (en) Method for sharing RDMA connection in lock-free mode
CN107634916B (en) Data communication method and device
CN111049761B (en) Data processing method of wireless water controller communication module
CN115412502B (en) Network port expansion and message rapid equalization processing method
CN115174501A (en) Service system and service method for intra-network aggregation transmission

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
GR01 Patent grant
GR01 Patent grant