Ethernet network card drive multicast-to-unicast realization method based on protocol stack unloading
By offloading the Ethernet network card driver from the protocol stack, multicast to unicast is achieved, which solves the problem that airborne high-speed Ethernet does not have the function of receiving multicast messages within the node. This improves the compatibility and portability of network applications and supports multicast message reception for multi-partition and multi-container applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-04-10
AI Technical Summary
Airborne high-speed Ethernet lacks intra-node message multicast reception capabilities, resulting in poor compatibility and portability of network application functions, making it difficult to achieve a smooth transition from traditional networks to Ethernet.
By using an Ethernet NIC driver based on protocol stack offloading, multicast to unicast conversion is achieved, a multicast table is configured, and received multicast Ethernet packets are copied and distributed to multiple socket connection multicast members, supporting multicast message reception for multi-partition and multi-container applications.
It achieves compatibility between airborne high-speed Ethernet and traditional networks, improves the portability and functional compatibility of network applications, and supports the multicast message reception requirements of multi-partition and multi-container applications.
Smart Images

Figure CN121841874A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of airborne network of avionics system, and particularly relates to a multicast-to-unicast implementation method of Ethernet network card driver based on protocol stack offloading. BACKGROUND
[0002] With the development of airborne network technology in the field of aviation and the improvement of integration, the traffic of application subsystems is rapidly expanding, and the demand for bandwidth and throughput of airborne network is also increasing. Airborne network gradually shifts from traditional dedicated network to optimized general-purpose Ethernet. During the transition period from traditional dedicated network to commercial general-purpose Ethernet, the airborne network of avionics system of a type aircraft realizes message communication and interaction between devices of each subsystem by using high-speed Ethernet. However, the following shortcomings exist: It does not have partial customization functions of the type project, and the network application function compatibility and portability are not good. Because the airborne high-speed Ethernet is improved based on commercial high-speed Ethernet, the network function and use mode still follow the commercial high-speed Ethernet, so it cannot support part of the functions of the airborne network of the historical type project. For example, the type project FC network communication node supports the node internal message multicast receiving function, and the multi-partition application and multi-container application can subscribe to the same message through this function to realize multicast receiving of unicast message. However, the airborne high-speed Ethernet does not have the capability of node internal message multicast receiving function. SUMMARY
[0003] In view of the multicast message subscription and receiving required by the network applications such as multi-partition and multi-container of the existing airborne high-speed Ethernet, the present application provides a multicast-to-unicast implementation method of Ethernet network card driver based on protocol stack offloading. Through the present application, the application software of the protocol stack offloaded Ethernet communication node can receive both unicast message and multicast message, realizes the compatibility of the use mode of the airborne system high-speed Ethernet and the traditional network (such as FC network) application, better realizes the smooth process from the traditional network to Ethernet, and effectively improves the portability of network application.
[0004] The present application embodiment provides the following technical scheme: a multicast-to-unicast implementation method of Ethernet network card driver based on protocol stack offloading, comprising: configuring a multicast table according to the multicast configuration information input by a user, wherein the multicast table comprises a device multicast table, a socket connection multicast table and a socket multicast group table; copying and distributing the received multicast Ethernet message to multiple socket connection multicast members according to the multicast table, to realize multicast-to-unicast; receiving the receiving information input by a user and releasing the multicast message resource, and determining whether to release the receiving buffer according to the use count of the connection receiving buffer.
[0005] According to an embodiment of the present application, the process of configuring the multicast table comprises: obtaining multicast configuration information, the multicast configuration information comprising at least multicast group IP, multicast group port number, local IP, local port number and socket descriptor; judging whether the multicast group port number is valid, and configuring the socket receiving destination port number of joining the multicast group according to the judgment result; querying the device multicast table, and judging whether the local multicast group corresponding to the multicast configuration information exists; if not, creating a multicast socket and binding the local multicast group in the device multicast table; querying the device multicast table, and judging whether the network multicast group corresponding to the multicast IP exists; if not, performing a joining multicast group operation; adding the local multicast group to the device multicast table; adding the socket member of joining the multicast group to the socket connection multicast table; and adding the local multicast group to the socket multicast group table.
[0006] According to an embodiment of the present application, the device multicast table is used for recording the multicast group information of the Ethernet device joining, and is managed by a singly linked list; the multicast member information in the device multicast table comprises multicast socket descriptor, multicast IP, local IP, multicast group port number and the number of sockets of joining the multicast group.
[0007] According to an embodiment of the present application, the socket connection multicast table is used for recording the socket members of joining the same multicast group, and is managed by a singly linked list; the socket multicast group table is used for recording the multicast group information of a single socket joining, and is managed by a singly linked list.
[0008] According to an embodiment of the present application, the received multicast Ethernet message is copied and distributed to a plurality of socket connection multicast members according to the multicast table, comprising: updating a receiving buffer, applying a storage area and updating to a receiving address queue; reading the tail of a receiving completion queue, and obtaining the receiving completion descriptor information of the receiving completion queue; judging whether data arrives according to the data identification bit in the receiving completion descriptor information; if data arrives, obtaining socket connection information; judging whether it is a multicast connection according to the socket connection information; if it is a multicast connection, obtaining the next socket connection multicast member from the socket connection multicast table, copying the received data to the connection receiving queue of each member; updating the tail of the receiving address queue to the tail of the receiving completion queue, and writing into a receiving doorbell register.
[0009] According to an embodiment of the present application, the socket connection information comprises connection receiving queue, socket connection multicast table and multicast member number; when the multicast member number is 0, it indicates that the socket connection only receives unicast message; when the multicast member number is greater than 0, it indicates that the socket connection can receive unicast message or multicast message.
[0010] According to an embodiment of the present application, whether data arrives is judged according to a data identification bit in the received completion descriptor information; if no data arrives, idle receiving processing is performed; the idle receiving processing includes: receiving count is incremented by 1, whether the receiving count is greater than a receiving threshold value is judged, if yes, the receiving count is cleared, and a delay operation is performed.
[0011] According to an embodiment of the present application, receiving user inputted receiving information and releasing multicast message resources include: obtaining user inputted receiving information, the receiving information including a socket descriptor and a user data buffer; performing out-of-queue of a connection receiving queue of the socket, obtaining a connection receiving buffer; parsing the connection receiving buffer, obtaining user data; judging whether the received user datagram is a multicast message and whether a use count of the connection receiving buffer is greater than 0; if it is a multicast message and the use count is greater than 0, performing a use count decrementing operation; otherwise, inserting the connection receiving buffer into a receiving address free linked list and releasing.
[0012] According to an embodiment of the present application, the connection receiving buffer includes a receiving data buffer, an Ethernet message packet length, a data length, an Ethernet message packet fragment number, a fragment count, a multicast member number and a multicast type.
[0013] According to an embodiment of the present application, when the multicast type takes a value of 1, it represents a multicast message; when the multicast type takes a value of 0, it represents a unicast message.
[0014] The present application provides an implementation method of multicast to unicast of an Ethernet driver based on a protocol stack offload mode, which includes an implementation method of configuring a multicast table, an implementation method of processing a multicast Ethernet message, and an implementation method of receiving user datagrams and multicast message release. The implementation method of configuring a multicast table, the implementation method of processing a multicast Ethernet message, and the implementation method of receiving user datagrams and multicast message release organically constitute a unified whole. Configuring a multicast table is a basic prerequisite and necessary condition for processing a multicast Ethernet message and receiving user datagrams and multicast message release. A multicast table and a multicast group table are generated by configuring a multicast table. The implementation method of processing a multicast Ethernet message is based on the multicast table and the multicast group table to realize multicast message to unicast message. Receiving user datagrams and multicast message release provides receiving data service for network application and completes recovery of multicast message resources.
[0015] The present application enables the multi-partition and multi-container socket application of a high-speed Ethernet communication node to receive unicast messages and subscribe and receive multicast, meets the network application message receiving requirement of a model project, is beneficial to functional compatibility and portability of network application, and is beneficial to smooth switching of network application to an airborne high-speed Ethernet. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram illustrating an implementation method for configuring a multicast table according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating an implementation method for processing multicast Ethernet packets according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating an implementation method for receiving user datagrams and releasing multicast messages according to an embodiment of the present invention. Detailed Implementation
[0018] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0019] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] An embodiment of the present invention provides a method for implementing multicast-to-unicast conversion of an Ethernet network card driver based on protocol stack offloading, comprising: Configure multicast table: Configure the multicast table according to the multicast configuration information input by the user. The multicast table includes the device multicast table, the socket connection multicast table, and the socket multicast group table. Processing multicast Ethernet packets: Based on the multicast table, the received multicast Ethernet packets are copied and distributed to multiple socket connection multicast members to realize multicast to unicast conversion; Receive user datagrams and release multicast messages: Receive user input and release multicast message resources. Determine whether to release the receive buffer based on the usage count of the connection receive buffer.
[0021] In some embodiments, the process of configuring the multicast table comprises: Step one, obtaining user input multicast configuration information.
[0022] Step two, configuring multicast port number according to the multicast configuration information.
[0023] Step three, querying the local multicast group from the device multicast table.
[0024] Step four, judging whether the local multicast group exists. If not, creating and binding the multicast socket; otherwise, going to step eight.
[0025] Step five, querying the network multicast group from the device multicast table.
[0026] Step six, judging whether the network multicast group exists. If not, performing the operation of joining the multicast group.
[0027] Step seven, adding the local multicast group to the device multicast table.
[0028] Step eight, adding the socket member of joining the multicast group to the multicast socket connection multicast table.
[0029] Step nine, adding the local multicast group to the socket multicast group table.
[0030] In the implementation, in step one, the multicast configuration information at least includes the multicast group IP, the multicast group port number, the local IP, the local port number, and the socket descriptor.
[0031] In step two, configuring the multicast port number refers to configuring the receiving destination port number of the socket of joining the multicast group. If the multicast group port number of the multicast configuration information is invalid, the receiving destination port number of the socket of joining the multicast group is the local port number, that is, the destination port numbers of the socket receiving the unicast message and the multicast message reuse the local port number. If the multicast group port number of the multicast configuration information is valid, the receiving destination port number of the socket of joining the multicast group is the multicast group port number, that is, the destination port of the socket receiving the unicast message is the local port number, and the destination port number of the socket receiving the multicast message is the multicast group port number.
[0032] In step three, the device multicast table is used to describe that the Ethernet device joins multiple multicast groups and is implemented by using the unidirectional linked list management mode. The device multicast table multicast member (each multicast group) includes the multicast socket descriptor, the multicast IP, the local IP, the multicast group port number, and the number of sockets of joining the multicast group.
[0033] In step three, the local multicast group includes the multicast IP and the multicast group port number.
[0034] In the fourth step, if the device multicast table does not exist the local multicast group, the socket of the multicast group needs to be created, the resource initialization is completed, the local multicast group is bound, and the multicast group socket is configured to receive the message multicast IP and the multicast group port number.
[0035] In the fifth step, the network multicast group includes the multicast IP.
[0036] In the sixth step, if the device multicast table does not exist the network multicast group, it indicates that the device is not joined in the multicast group on the network, and the joining operation of the multicast group needs to be performed.
[0037] In the eighth step, the multicast socket connects the multicast table to describe how many socket members join the multicast group, and is realized in the form of a singly linked list.
[0038] In the eighth step, the socket connection multicast member includes the socket descriptor.
[0039] In the ninth step, the socket multicast group table is used to describe how many multicast groups the socket joins, and is realized in the form of a singly linked list. The socket multicast group member is consistent with the information of the device multicast table multicast member.
[0040] In some embodiments, the process of processing the multicast Ethernet message includes: Step 1: Update the receiving buffer.
[0041] Step 2: Read the tail of the receiving completion queue.
[0042] Step 3: According to the tail of the completion queue, the receiving completion descriptor information of the receiving completion queue is obtained.
[0043] Step 4: According to the data identification bit of the receiving completion descriptor information, it is judged whether there is data arrival. If there is data arrival, the socket connection information is obtained. Otherwise, the idle receiving processing is performed, and step 1 is turned to.
[0044] Step 5: According to the socket connection information, it is judged whether the socket connection is a multicast connection. If the socket connection is a multicast connection (multicast channel or port multiplexing), the next socket connection multicast member is obtained from the socket connection multicast table.
[0045] Step 6: The receiving address queue tail is set to the receiving completion queue tail.
[0046] Step 7: The buffer of receiving data is obtained from the receiving address ready linked list.
[0047] Step 8: Perform connection receive queue enqueue to store the received data buffer to the connection receive queue.
[0048] Step 9: Receive completion queue tail plus 1 modulo.
[0049] Step 10: Determine whether the socket connection is a multicast connection and the last multicast member. If the socket connection is a multicast connection and not the last multicast member, go to step 5; otherwise, write the receive completion queue tail to the receive doorbell register and go to step 1.
[0050] In a specific implementation, in step 1, the receive buffer is used to describe a storage area for receiving Ethernet messages. Updating the receive buffer means calling a system interface to apply for a storage area for receiving Ethernet messages and updating the receive address queue.
[0051] In step 3, the receive completion descriptor information includes data identification, receive completion queue tail, data packet length, and socket connection number.
[0052] In step 4, the socket connection information is used to describe resource information for receiving messages by using a socket, including a connection receive queue, a socket connection multicast table, and a number of socket multicast members in a multicast group. The connection receive queue is used for socket message reception. If the number of multicast members is 0, the socket connection receives unicast messages; otherwise, the socket connection receives unicast messages or multicast messages.
[0053] In step 4, the idle receive processing is as follows: receive count plus 1. Determine whether the receive count is greater than a receive threshold value. If the receive count is greater than the receive threshold value, clear the receive count and perform a delay operation.
[0054] In steps 3, 5, and 7, the receive completion queue, the receive address queue, and the connection receive queue are enqueued and dequeued according to the first-in, first-out principle.
[0055] In some embodiments, the process of releasing the received user datagram and multicast message includes: Step 1: Obtain received information input by a user.
[0056] Step 2: Obtain a socket connection receive queue.
[0057] Step 3: Perform socket connection receive queue dequeue to obtain a connection receive buffer.
[0058] Step 4: Analyze the connection receive buffer to obtain output information and user data.
[0059] Step 5: Based on the connection receive buffer, determine whether the received user datagram is a multicast message and whether the receive buffer usage count is greater than 0. If the received user datagram is a multicast message and the receive buffer usage count is greater than 0, proceed to step 6; otherwise, proceed to step 7.
[0060] Step 6: Perform a count decrement operation on the receive buffer and proceed to the end.
[0061] Step 7: Insert into the free list of the receive address, release the receive buffer, and proceed to the end.
[0062] In specific implementation, in step 1, the received information includes a socket descriptor and a user data buffer.
[0063] In step 2, the connection receiving queue adopts the first-in-first-out principle for enqueue and dequeue operations.
[0064] In step 3, the connection receive buffer includes a receive data buffer, Ethernet packet length, data length, number of Ethernet packet fragments, fragment count, number of multicast members, and multicast type. The multicast type has a value of 1 indicating multicast and a value of 0 indicating unicast.
[0065] like Figure 1 As shown, this embodiment provides a method for configuring a multicast table, the method including: Step 100: Obtain multicast configuration information input by the user.
[0066] Step 101: Configure the multicast port number based on the multicast configuration information.
[0067] Step 102: Query the local multicast group from the device multicast table.
[0068] Step 103: Determine if a local multicast group exists. If no local multicast group exists, create and bind the multicast socket; otherwise, proceed to step 107.
[0069] Step 104: Query the network multicast group from the device multicast table.
[0070] Step 105: Determine if a network multicast group exists. If no network multicast group exists, perform the join operation.
[0071] Step 106: Add the local multicast group to the device multicast table.
[0072] Step 107: Add the socket members that have joined the multicast group to the multicast socket connection multicast table.
[0073] Step 108: Add the local multicast group to the socket multicast group table.
[0074] The step 100, the multicast group configuration information at least includes multicast group IP, multicast group port number, local IP, local port number, socket descriptor.
[0075] The step 101, the configuration multicast port number refers to the configuration of the socket receiving destination port number of joining the multicast group. If the multicast group port number of the multicast configuration information is invalid, the socket receiving destination port number of joining the multicast group is the local port number, that is, the multicast message and the unicast message received by the socket multiplex the local port number. If the multicast group port number of the multicast configuration information is valid, the socket receiving destination port number of joining the multicast group is the multicast group port number, that is, the destination port of the unicast message received by the socket is the local port number, and the destination port number of the multicast message is the multicast group port number.
[0076] The step 102, the device multicast table is used for describing that the Ethernet device joins multiple multicast groups and is realized by using a unidirectional linked list management mode. The device multicast table multicast member (each multicast group) includes multicast socket descriptor, multicast IP, local IP, multicast group port number, and the number of sockets joining the multicast group. The specific implementation of the device multicast table is shown in Table 1.
[0077] Table 1 Device multicast table
[0078] The step 102, the local multicast group includes multicast IP and multicast group port number.
[0079] The step 103, if the device multicast table does not exist the local multicast group, the socket of the multicast group needs to be created, the resource initialization is completed, the local multicast group is bound, that is, the configuration multicast group socket receives the message multicast IP, multicast group port number.
[0080] The step 104, the network multicast group includes multicast IP.
[0081] The step 105, if the device multicast table does not exist the network multicast group, it indicates that the device does not join the multicast group on the network, and the joining multicast group operation needs to be performed.
[0082] The step 107, the multicast socket connection multicast table is used for describing how many socket members join the multicast group and is realized by using a unidirectional linked list mode.
[0083] The step 107, the socket connection multicast member includes socket descriptor.
[0084] The step 108, socket multicast group table is used to describe how many multicast groups the socket joins, and is realized by using single-item chain table. The socket multicast group member is consistent with the information of the device multicast table group member.
[0085] As shown in the figure, the implementation method of the embodiment for processing multicast Ethernet message includes: Figure 2 Step 200: update the receiving buffer.
[0086] Step 201: read the receiving completion queue tail.
[0087] Step 202: according to the receiving completion queue tail, obtain the receiving completion descriptor information of the receiving completion queue.
[0088] Step 203: according to the data identification bit of the receiving completion descriptor information, judge whether there is data arrival. If there is data arrival, go to step 204. Otherwise, execute idle receiving processing, and go to step 200.
[0089] Step 204: obtain the socket connection information.
[0090] Step 205: according to the socket connection information, judge whether the socket connection is multicast connection. If the socket connection is multicast connection (multicast channel or port multiplexing), obtain the next socket connection multicast member from the socket connection multicast table.
[0091] Step 206: set the receiving address queue tail to the receiving completion queue tail.
[0092] Step 207: obtain the buffer of receiving data from the receiving address ready chain table.
[0093] Step 208: execute connection receiving queue enqueue, and store the received data buffer to the connection receiving queue.
[0094] Step 209: add 1 to the receiving completion queue tail and take the modulus.
[0095] Step 210: judge whether the socket connection is multicast connection and the last multicast member. If the socket connection is multicast connection and is not the last multicast member, go to step 5; otherwise, write the receiving completion queue tail to the receiving doorbell register, and go to step 200.
[0096] In the step 200, the receiving buffer is used to describe the storage area of receiving Ethernet message. Updating the receiving buffer means calling the system interface to apply the storage area of receiving Ethernet message and updating to the receiving address queue.
[0097] In step 202, the received completion descriptor information includes a data identifier, the tail of the received completion queue, the datagram length, and the socket connection number.
[0098] In step 203, the socket connection information describes the resource information used by the socket receiving messages, including the connection receive queue, the socket connection multicast table, and the number of socket multicast members added to the multicast group. The connection receive queue is used for the socket to receive messages. A multicast member count of 0 indicates that the socket connection receives unicast messages; otherwise, the socket connection receives either unicast or multicast messages.
[0099] Step 204, the idle reception process, is as follows: Increment the reception count by 1. Determine if the reception count is greater than the reception threshold. If the reception count is greater than the reception threshold, reset the reception count to zero and perform a delay operation.
[0100] In steps 202, 204, and 206, the receive completion queue, receive address queue, and connection receive queue are enqueued and dequeued according to the first-in-first-out principle.
[0101] like Figure 3 As shown, this embodiment provides a method for receiving user datagrams and releasing multicast messages, the method including: Step 300: Obtain the received information input by the user.
[0102] Step 301: Obtain the socket connection receive queue.
[0103] Step 302: Dequeue the socket connection receive queue and obtain the connection receive buffer.
[0104] Step 303: Parse the connection receive buffer to obtain output information and user data.
[0105] Step 304: Copy the user data to the user buffer.
[0106] Step 305: Based on the connection receive buffer, determine whether the received user datagram is a multicast message and whether the receive buffer usage count is greater than 0. If the received user datagram is a multicast message and the receive buffer usage count is greater than 0, proceed to step 306; otherwise, proceed to step 307.
[0107] Step 306 performs a count decrement operation on the receive buffer and proceeds to the end.
[0108] Step 307: Insert into the free list of the receive address, release the receive buffer, and proceed to the end.
[0109] The step 300, the received information includes socket descriptor, user data buffer.
[0110] The step 301, the connection receiving queue adopts the first-in first-out principle to carry out the enqueuing and dequeuing operation.
[0111] The step 302, the connection receiving buffer includes the received data buffer, the Ethernet message packet length, the data length, the Ethernet message packet fragment number, the fragment count, the multicast member number and the multicast type.
[0112] The application makes the multi-partition and multi-container socket application of the Ethernet communication node can receive the unicast message, can also subscribe and receive the multicast, meets the network application message receiving requirement of the type project, is favorable for the functional compatibility and portability of the network application, is favorable for the network application to be switched to the airborne high-speed Ethernet smoothly.
[0113] The above is only the specific embodiment of the application, but the protection scope of the application is not limited to this, any person skilled in the art in the technical range disclosed in the application can easily think of the change or replacement, which should be covered in the protection scope of the application. Therefore, the protection scope of the application should be the protection scope of the claims.
Claims
1. A method for implementing multicast-to-unicast conversion of an Ethernet network card driver based on protocol stack offloading, characterized in that, include: Configure a multicast table based on the multicast configuration information input by the user. The multicast table includes a device multicast table, a socket connection multicast table, and a socket multicast group table. Based on the multicast table, the received multicast Ethernet packets are copied and distributed to multiple socket connection multicast members to achieve multicast to unicast conversion; It receives user input and releases multicast message resources, and determines whether to release the receive buffer based on the usage count of the connection receive buffer.
2. The method for implementing multicast-to-unicast conversion of Ethernet network card drivers based on protocol stack offloading according to claim 1, characterized in that, The process of configuring the multicast table includes: obtaining multicast configuration information, which at least includes a multicast group IP, a multicast group port number, a local IP, a local port number, and a socket descriptor; determining whether the multicast group port number is valid, and configuring the destination port number of the socket to be added to the multicast group based on the determination result; querying the device multicast table to determine whether a local multicast group corresponding to the multicast configuration information exists; if not, creating a multicast socket in the device multicast table and binding it to the local multicast group; querying the device multicast table to determine whether a network multicast group corresponding to the multicast IP exists; if not, performing the multicast group addition operation; adding the local multicast group to the device multicast table; adding the socket members added to the multicast group to the socket connection multicast table; and adding the local multicast group to the socket multicast group table.
3. The method for implementing multicast-to-unicast conversion of Ethernet network card drivers based on protocol stack offloading according to claim 2, characterized in that, The device multicast table is used to record multicast group information that Ethernet devices have joined, and is managed using a unidirectional linked list. The multicast member information in the device multicast table includes multicast socket descriptor, multicast IP, local IP, multicast group port number, and the number of sockets that have joined the multicast group.
4. The method for implementing Ethernet network card driver multicast to unicast based on protocol stack offloading according to claim 2, characterized in that, The socket connection multicast table is used to record socket members that have joined the same multicast group and is managed using a singly linked list; the socket multicast group table is used to record multicast group information that a single socket has joined and is managed using a singly linked list.
5. The method for implementing multicast-to-unicast conversion of Ethernet network card drivers based on protocol stack offloading according to claim 1, characterized in that, The received multicast Ethernet packets are copied and distributed to multiple socket connection multicast members according to the multicast table, including: updating the receive buffer, allocating storage area and updating it to the receive address queue; reading the tail of the receive completion queue and obtaining the receive completion descriptor information of the receive completion queue; determining whether data has arrived based on the data identifier bit in the receive completion descriptor information; if data has arrived, obtaining the socket connection information; determining whether it is a multicast connection based on the socket connection information; if it is a multicast connection, obtaining the next socket connection multicast member from the socket connection multicast table, copying the received data to the connection receive queue of each member; updating the tail of the receive address queue to the tail of the receive completion queue, and writing it to the receive doorbell register.
6. The method for implementing multicast-to-unicast conversion of Ethernet network card drivers based on protocol stack offloading according to claim 5, characterized in that, The socket connection information includes a connection receive queue, a socket connection multicast table, and the number of multicast members. When the number of multicast members is 0, it means that the socket connection only receives unicast messages. When the number of multicast members is greater than 0, it means that the socket connection can receive either unicast or multicast messages.
7. The method for implementing multicast-to-unicast conversion of Ethernet network card drivers based on protocol stack offloading according to claim 5, characterized in that, Determine whether data has arrived based on the data flag bit in the received completion descriptor information; If no data arrives, perform idle receive processing; The idle reception process includes: incrementing the reception count by 1, determining whether the reception count is greater than the reception threshold, and if so, clearing the reception count to zero and performing a delay operation.
8. The method for implementing multicast-to-unicast conversion of Ethernet network card drivers based on protocol stack offloading according to claim 1, characterized in that, Receiving user-inputted reception information and releasing multicast message resources includes: obtaining user-inputted reception information, which includes a socket descriptor and a user data buffer; dequeuing the socket's connection receive queue and obtaining the connection receive buffer; parsing the connection receive buffer to obtain user data; determining whether the received user datagram is a multicast message and whether the usage count of the connection receive buffer is greater than 0; if it is a multicast message and the usage count is greater than 0, then performing a usage count decrement operation; otherwise, inserting the connection receive buffer into the receive address free list and releasing it.
9. The method for implementing multicast-to-unicast conversion of Ethernet network card driver based on protocol stack offloading according to claim 8, characterized in that, The connection receive buffer includes a receive data buffer, Ethernet packet length, data length, number of Ethernet packet fragments, fragment count, number of multicast members, and multicast type.
10. The method for implementing multicast-to-unicast conversion of Ethernet network card driver based on protocol stack offloading according to claim 9, characterized in that, When the multicast type is set to 1, it indicates a multicast message; When the multicast type is 0, it indicates a unicast message.