# US 2013/0159568 A1 · Recovering dropped instructions in a network interface controller

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2013/0159568 A1
- Document ID: US20130159568A1
- Status: Published application
- Kind: A1
- Application number: 13/326,354
- Filed: 2011-12-15
- Published: 2013-06-20
- Earliest claimed: 2011-12-15
- Assignees: Mellanox Technologies, Ltd.
- Inventors: Ariel Shahar; Hillel Chapman; Roi Aibester
- Web page: https://patentgrep.com/patent/US20130159568A1

## CPC

- H04L 49/901: using storage descriptor, e.g. read or write pointers
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method for operating a peripheral device includes receiving at the peripheral device service orders, which are identified with respective service instances and are submitted to the peripheral device over the bus by software applications running on a host processor, which write copies of the service orders to a memory. The received service orders are queued for execution by the peripheral device. When one or more of the service orders have been dropped from the queue prior to execution, a recovery of a selected service instance is initiated by submitting a read request from the peripheral device to the memory over the bus to receive a copy of any unexecuted service order associated with the service instance.

## Claims

### Claim 1

A method for operating a peripheral device, which is connected to a host processor and a memory by a bus, the method comprising:
receiving at the peripheral device service orders, which are identified with respective service instances and are submitted to the peripheral device over the bus by software applications running on the host processor, which write copies of the service orders to the memory;
queuing the received service orders in a queue for execution by the peripheral device;
when one or more of the service orders have been dropped from the queue prior to execution, initiating a recovery of a selected service instance by submitting a read request from the peripheral device to the memory over the bus to receive a copy of any unexecuted service order associated with the service instance; and
upon receiving at the peripheral device a new service order that is identified with the selected service instance and reaches the peripheral device before the peripheral device receives a response to the read request, executing the new service order and ignoring the response when it is received.

### Claim 2 (depends on 1)

The method according to claim 1, wherein receiving the service orders comprise receiving entries written by the applications to a doorbell register at an address on the bus that is assigned to the peripheral device.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the software applications submit the service orders by posting a write operation to the bus, and wherein the bus operates in accordance with a protocol that causes posted writes to be flushed from the bus to the peripheral device before delivering read responses.

### Claim 4 (depends on 1)

The method according to claim 1, and comprising executing the service orders on a given service instance by reading into the peripheral device a context of the given service instance from the memory, and applying the context in performing an operation indicated by the service order.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the peripheral device has no dedicated memory for storing the context after the operation has been completed.

### Claim 6 (depends on 1)

The method according to claim 1, and comprising setting a flag in the peripheral device to indicate that the one or more of the service orders have been dropped, and wherein initiating the recovery comprises reading and resetting the flag to initiate the recovery.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the flag is one of an array of flags in the peripheral device, and each flag causes the peripheral device to initiate the recovery of a corresponding set of the service instances.

### Claim 8 (depends on 1)

The method according to claim 1, wherein initiating the recovery comprises making a record of the service instances that are in recovery, and wherein ignoring the response comprises checking the record to determine that the service instance is in recovery, and discarding the response responsively to the record.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the peripheral device comprises an input/output (I/O) device, and wherein the execution of the service orders causes the I/O device to transfer data to and from the memory.

### Claim 10 (depends on 9)

The method according to claim 9, wherein the I/O device comprises a network interface controller (NIC), and wherein the service instances comprise queue pairs, which are respectively assigned to the software applications for use in communicating over a network via the NIC.

### Claim 11 (depends on 9)

The method according to claim 9, wherein the service orders indicate descriptors comprising direct memory access (DMA) instructions for execution by the peripheral device.

### Claim 12 (depends on 9)

The method according to claim 9, wherein the service orders cause the peripheral device to arm a completion queue in the memory in order to trigger an event upon posting of a new completion queue entry to the armed completion queue.

### Claim 13

A computer peripheral device, comprising:
a host interface, which is configured to be connected to a bus, which is coupled to a host processor and a memory, and is configured to receive over the bus service orders, which are identified with respective service instances and are submitted by software applications running on the host processor, which write copies of the service orders to the memory; and
processing circuitry, which is configured to queue the received service orders in a queue for execution, and when one or more of the service orders are dropped from the queue prior to execution, to initiate a recovery of a selected service instance by submitting a read request via the host interface to the memory over the bus to receive a copy of any unexecuted service order associated with the service instance,
wherein the processing circuitry is configured, upon receiving via the host interface a new service order that is identified with the selected service instance and reaches the peripheral device before the processing circuitry receives a response to the read request, to execute the new service order and ignore the response when it is received.

### Claim 14 (depends on 13)

The apparatus according to claim 13, wherein the service orders comprise entries written by the applications to a doorbell register at an address on the bus that is assigned to the peripheral device.

### Claim 15 (depends on 13)

The apparatus according to claim 13, wherein the software applications submit the service orders by posting a write operation to the bus, and wherein the bus operates in accordance with a protocol that causes posted writes to be flushed from the bus to the peripheral device before delivering read responses.

### Claim 16 (depends on 13)

The apparatus according to claim 13, wherein the processing circuitry is configured to execute the service orders on a given service instance by reading into the peripheral device a context of the given service instance from the memory, and applying the context in performing an operation indicated by the service order.

### Claim 17 (depends on 16)

The apparatus according to claim 16, wherein the peripheral device has no dedicated memory for storing the context after the operation has been completed.

### Claim 18 (depends on 13)

The apparatus according to claim 13, wherein the processing circuitry is configured to set a flag in the peripheral device to indicate that the one or more of the service orders have been dropped, and to read and reset the flag in order to initiate the recovery.

### Claim 19 (depends on 18)

The apparatus according to claim 18, wherein the flag is one of an array of flags in the peripheral device, and each flag causes the processing circuitry to initiate the recovery of a corresponding set of the service instances.

### Claim 20 (depends on 13)

The apparatus according to claim 13, wherein the processing circuitry is configured to make a record of the service instances that are in recovery, to check the record to determine that the service instance is in recovery, and to discard the response responsively to the record.

### Claim 21 (depends on 13)

The apparatus according to claim 13, wherein the peripheral device comprises an input/output (I/O) device, and wherein the execution of the service orders causes the processing circuitry to transfer data to and from the memory.

### Claim 22 (depends on 21)

The apparatus according to claim 21, wherein the I/O device comprises a network interface controller (NIC), and wherein the service instances comprise queue pairs, which are respectively assigned to the software applications for use in communicating over a network via the NIC.

### Claim 23 (depends on 22)

The apparatus according to claim 22, wherein the service orders indicate descriptors comprising direct memory access (DMA) instructions for execution by the peripheral device.

### Claim 24 (depends on 22)

The apparatus according to claim 22, wherein the service orders cause the processing circuitry to arm a completion queue in the memory, and to trigger an event upon posting of a new completion queue entry to the armed completion queue.
