Receive processing in communications between computing device(s) and a network interface card
An adapter module executing on a computing device of a computing environment is to be used to transmit packets from a network interface card of the computing environment to a control program executing within the computing environment. The adapter module obtains packet information of a packet received at the network interface card. Based on obtaining the packet information, a packet completion queue entry is generated in a packet completion queue and the packet information is stored in the packet completion queue entry. The packet information is to be used to locate a data buffer into which the packet is stored. The packet completion queue entry is provided to the control program to be used by the control program to retrieve the packet from the data buffer.
1 . A computer-implemented method comprising:
executing an adapter module on a computing device of a computing environment to be used to transmit packets from a network interface card of the computing environment to a control program executing within the computing environment;
obtaining, by the adapter module executing on the computing device, packet information of a packet received at the network interface card;
generating, based on obtaining the packet information, a packet completion queue entry in a packet completion queue, the packet completion queue entry to include the packet information;
storing the packet information in the packet completion queue entry, the packet information to be used to locate a data buffer into which the packet is stored, wherein the packet information includes information to locate an entry of a receive data queue, the entry of the receive data queue including a buffer address of the data buffer into which the packet is stored, the packet completion queue and the receive data queue being part of a queue structure, the queue structure having a queue descriptor record, the queue descriptor record including an address used to locate the packet completion queue and another address used to locate the receive data queue; and
providing the packet completion queue entry to the control program to be used by the control program to retrieve the packet from the data buffer.
2 . The computer-implemented method of claim 1 , wherein the data buffer is owned by the adapter module and is available for packet consumption by the control program, the data buffer being shared by the adapter module and the control program.
3 . The computer-implemented method of claim 1 , wherein the data buffer includes a plurality of strides, and wherein the data buffer continues to have packets stored therein, based on a stride of the plurality of strides being available.
4 . The computer-implemented method of claim 3 , wherein the data buffer is owned by the adapter module and shared by the adapter module and the control program, and wherein based on consumption of the packet in a last stride of the plurality of strides, sharing of the data buffer ceases.
5 . The computer-implemented method of claim 1 , wherein the packet within the data buffer is aligned on a cache line boundary.
6 . The computer-implemented method of claim 1 , wherein the packet completion queue corresponds to the receive data queue, and a receive queue index is used to pass ownership of entries of the receive data queue and the packet completion queue between the control program and the adapter module.
7 . The computer-implemented method of claim 1 , further comprising obtaining, by the adapter module, an indication that additional buffers are to be allocated.
8 . The computer-implemented method of claim 7 , wherein the indication is included in a data structure component accessible to the adapter module.
9 . The computer-implemented method of claim 1 , further comprising obtaining by the adapter module an indication that the control program retrieved the packet from the data buffer.
10 . The computer-implemented method of claim 1 , further comprising signaling by the adapter module to the control program arrival of the packet in the data buffer.
11 . A computer system comprising:
at least one computing device;
a set of one or more computer-readable storage media; and
program instructions, collectively stored in the set of one or more computer-readable storage media, for causing the at least one computing device to perform computer operations including:
executing an adapter module on a computing device, the adapter module to be used to transmit packets from a network interface card to a control program executing within the computer system;
obtaining, by the adapter module executing on the computing device, packet information of a packet received at the network interface card;
generating, based on obtaining the packet information, a packet completion queue entry in a packet completion queue, the packet completion queue entry to include the packet information;
storing the packet information in the packet completion queue entry, the packet information to be used to locate a data buffer into which the packet is stored, wherein the packet information includes information to locate an entry of a receive data queue, the entry of the receive data queue including a buffer address of the data buffer into which the packet is stored, the packet completion queue and the receive data queue being part of a queue structure, the queue structure having a queue descriptor record, the queue descriptor record including an address used to locate the packet completion queue and another address used to locate the receive data queue; and
providing the packet completion queue entry to the control program to be used by the control program to retrieve the packet from the data buffer.
12 . The computer system of claim 11 , wherein the data buffer includes a plurality of strides, and wherein the data buffer continues to have packets stored therein, based on a stride of the plurality of strides being available.
13 . The computer system of claim 12 , wherein the data buffer is owned by the adapter module and shared by the adapter module and the control program, and wherein based on consumption of the packet in a last stride of the plurality of strides, sharing of the data buffer ceases.
14 . The computer system of claim 11 , wherein the packet completion queue corresponds to the receive data queue, and a receive queue index is used to pass ownership of entries of the receive data queue and the packet completion queue between the control program and the adapter module.
15 . The computer system of claim 11 , wherein the computer operations further comprise obtaining by the adapter module an indication that the control program retrieved the packet from the data buffer.
16 . The computer system of claim 11 , wherein the computer operations further comprise signaling by the adapter module to the control program arrival of the packet in the data buffer.
17 . A computer program product comprising:
a set of one or more computer-readable storage media; and
program instructions, collectively stored in the set of one or more computer-readable storage media, for causing at least one computing device to perform computer operations including:
executing an adapter module on a computing device of a computing environment to be used to transmit packets from a network interface card of the computing environment to a control program executing within the computing environment;
obtaining, by the adapter module executing on the computing device, packet information of a packet received at the network interface card;
generating, based on obtaining the packet information, a packet completion queue entry in a packet completion queue, the packet completion queue entry to include the packet information;
storing the packet information in the packet completion queue entry, the packet information to be used to locate a data buffer into which the packet is stored, wherein the packet information includes information to locate an entry of a receive data queue, the entry of the receive data queue including a buffer address of the data buffer into which the packet is stored, the packet completion queue and the receive da ta queue being part of a structure, the queue structure having a queue descriptor record, the queue descriptor record including an address used to locate the packet completion queue and another address used to locate the receive data queue; and
providing the packet completion queue entry to the control program to be used by the control program to retrieve the packet from the data buffer.
18 . The computer-program product of claim 17 , wherein the data buffer includes a plurality of strides, and wherein the data buffer continues to have packets stored therein, based on a stride of the plurality of strides being available.
19 . The computer-program product of claim 18 , wherein the data buffer is owned by the adapter module and shared by the adapter module and the control program, and wherein based on consumption of the packet in a last stride of the plurality of strides, sharing of the data buffer ceases.
20 . The computer-program product of claim 17 , wherein the packet completion queue corresponds to the receive data queue, and a receive queue index is used to pass ownership of entries of the receive data queue and the packet completion queue between the control program and the adapter module.
21 . The computer-program product of claim 17 , wherein the computer operations further comprise obtaining by the adapter module an indication that the control program retrieved the packet from the data buffer.
22 . The computer-program product of claim 17 , wherein the computer operations further comprise signaling by the adapter module to the control program arrival of the packet in the data buffer.
23 . A computer-implemented method comprising:
executing a control program on a computing device of a computing environment, the control program to receive packets transmitted from a network interface card of the computing environment;
obtaining, by the control program, packet information from a packet completion queue entry of a packet completion queue, the packet completion queue entry generated by an adapter module executing within the computing environment and the packet information to be used to locate a data buffer into which the packet is stored by the network interface card, wherein the packet information includes information to locate an entry of a receive data queue, the entry of the receive data queue including a buffer address of the data buffer into which the packet is stored, the packet completion queue and the receive data queue being part of a queue structure, the queue structure having a queue descriptor record, the queue descriptor record including an address used to locate the packet completion queue and another address used to locate the receive data queue; and
receiving, by the control program, the packet transmitted from the network interface card, the receiving including locating the packet in the data buffer using the packet information and consuming the packet from the data buffer.
24 . The computer-implemented method of claim 23 , wherein the packet information includes a starting alignment index and a receive data storage block page entry index, the starting alignment index specifying a starting location within the data buffer corresponding to the receive data storage block page entry index.
25 . A computer program product comprising:
a set of one or more computer-readable storage media; and
program instructions, collectively stored in the set of one or more computer-readable storage media, for causing at least one computing device to perform computer operations including:
executing a control program on a computing device of a computing environment, the control program to receive packets transmitted from a network interface card of the computing environment;
obtaining, by the control program, packet information from a packet completion queue entry of a packet completion queue, the packet completion queue entry generated by an adapter module executing within the computing environment and the packet information to be used to locate a data buffer into which the packet is stored by the network interface card, wherein the packet information includes information to locate an entry of a receive data queue, the entry of the receive data queue including a buffer address of the data buffer into which the packet is stored, the packet completion queue and the receive data queue being part of a queue structure, the queue structure having a queue descriptor record, the queue descriptor record including an address used to locate the packet completion queue and another address used to locate the receive data queue; and
receiving, by the control program, the packet transmitted from the network interface card, the receiving including locating the packet in the data buffer using the packet information and consuming the packet from the data buffer.