# US 2021/0081236 A1 · Task completion system

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

- Number: US 2021/0081236 A1
- Document ID: US20210081236A1
- Status: Published application
- Kind: A1
- Application number: 16/571,122
- Filed: 2019-09-15
- Published: 2021-03-18
- Earliest claimed: 2019-09-15
- Assignees: Mellanox Technologies, Ltd.
- Applicants: Mellanox Technologies, Ltd.
- Inventors: Ariel Shahar; Roee Moyal
- Web page: https://patentgrep.com/patent/US20210081236A1

## CPC

- G06F 9/4843: {by program, e.g. task dispatcher, supervisor, operating system}
- G06F 9/546: {Message passing systems or structures, e.g. queues}
- G06F 2209/548: Queue
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method including accessing a work control structure (WCS) configured “first-in-first-out” holding work control records (WCRs) each including a field defining work to be carried out and a completion indicator indicating whether the work has completed, and initially set to indicate that the work has not completed: upon fetching a work request (WR) for execution, pushing a WCR corresponding to the WR to the WCS, and: A) inspecting the WCR at a head of the WCS, B) when the completion indicator of the WCR at the head of the WCS indicates that the unit of work associated with the WCR at the head of the WCS has been completed, popping the WCR at the head of the WCS from the WCS, and reporting completion of the WCR at the head of the WCS to a host processor, and C) iteratively performing A, B, and C. Related apparatus and methods are also provided.

## Claims

### Claim 1

A system comprising:
queue handling logic, the queue handling logic comprising communication hardware for communicating with a memory,
wherein the memory is configured to hold a work control structure (WCS) having a plurality of work control records (WCRs) the WCS being configured in a first-in-first-out manner having a head and a tail, each WCR comprising:
a work specifying field defining a unit of work to be carried out; and
a completion indicator indicating whether the unit of work to be carried out has been completed, and being initially set to indicate that the unit of work to be carried out has not been completed, and
the queue handling logic is configured, upon fetching a work request (WR) for execution, to push a WCR corresponding to said WR to the WCS via the communication hardware, and further configured to perform the following via the communication hardware:
A) to inspect the WCR at the head of the WCS;
B) when the completion indicator of the WCR at the head of the WCS indicates that the unit of work associated with the WCR at the head of the WCS has been completed:
to pop the WCR at the head of the WCS from the WCS; and
to report completion of the WCR at the head of the WCS to a host processor external to the system; and
C) to iteratively perform A, B, and C.

### Claim 2 (depends on 1)

The system according to claim 1 and wherein the queue handling logic is also configured to insert a WCR at the tail of the WCS.

### Claim 3 (depends on 2)

The system according to claim 2 and wherein the queue handling logic is configured to insert a WCR at the tail of the WCS based, at least in part, on a request originating at the host processor.

### Claim 4 (depends on 1)

The system according to claim 1 and wherein at least one of said plurality of WCRs is allocated by the WCS from a global pool of WCRs.

### Claim 5 (depends on 1)

The system according to claim 1 and wherein the memory is external to the system,

### Claim 6 (depends on 1)

The system according to claim 1 and wherein the system comprises the memory.

### Claim 7 (depends on 1)

The system according to claim 1 and wherein the communication hardware comprises a bus.

### Claim 8 (depends on 1)

The system according to claim 1, and wherein completion of the WCR at the head of the work queue is reported to an application running on the host processor.

### Claim 9 (depends on 1)

The system according to claim 1, and also comprising work processing logic comprising work execution logic and completion indication logic, and
the work execution logic is configured to carry out a unit of work associated with a given WCR, and
the completion indication logic is configured, when the unit of work associated with the given WCR has been completed by the work execution logic, to set the completion indicator in the given WCR to indicate that the unit of work associated with the given WCR has been completed.

### Claim 10 (depends on 1)

The system according to claim 1, and wherein the system is comprised in one of the following: a network element; a disk controller; and an accelerator device.

### Claim 11 (depends on 10)

The system according to claim 10, and wherein the system is comprised in a network element, and the network element comprises a network interface card (MC).

### Claim 12 (depends on 11)

The system according to claim 11 and wherein the unit of work to be carried out comprises a data transfer by the NTC over a hardware networking medium

### Claim 13 (depends on 1)

The system according to claim 1, and wherein the system also comprises timeout logic configured, upon expiration of a timeout, to set the completion indicator of the WCR at the head of the WCS to indicate that the unit of work associated with the WCR at the head of the WCS has completed, even if the unit of work associated with the WCR at the head of the WCS has not completed.

### Claim 14 (depends on 13)

The system according to claim 13, and wherein, when the completion indicator of the WCR at the head of the WCS is set to indicate that the unit of work associated with the WCR at the head of the WCS has completed upon expiration of the timeout, the completion indicator of the WCR at the head of the WCS is set to include an error indication.

### Claim 15

A method comprising:
in queue handling logic,
the queue handling logic comprising communication hardware for communicating with a memory, wherein the memory is configured to hold a work control structure (WCS) having a plurality of work control records (WCRs), the WCS being configured in a first-in-first-out manner having a head and a tail, each WCR comprising: a work specifying field defining a unit of work to be carried out; and a completion indicator indicating whether the unit of work to be carried out has been completed, and being initially set to indicate that the unit of work to be carried out has not been completed,
performing the following:
upon fetching a work request (WR) for execution, pushing a WCR corresponding to said WR to the WCS via the communication hardware; and
performing the following via the communication hardware:
A) inspecting the WCR at the head of the WCS;
B) when the completion indicator of the WCR at the head of the WCS indicates that the unit of work associated with the WCR at the head of the WCS has been completed: popping the WCR at the head of the WCS from the WCS; and reporting completion of the WCR at the head of the WCS to a host processor external to the queue handling logic; and
C) iteratively performing A, B, and C.

### Claim 16 (depends on 15)

The method according to claim 15 and also comprising inserting a WCR at the tail of the WCS.

### Claim 17 (depends on 16)

The method according to claim 16 and wherein the inserting a WCR at the tail of the WCS is based, at least in part, on a request originating at the host processor.

### Claim 18 (depends on 15)

The method according to claim 15 and wherein at least one of said plurality of WCRs is allocated by the WCS from a global pool of WCRs.

### Claim 19 (depends on 15)

The method according to claim 15 and wherein the memory is external to the queue handling logic.

### Claim 20 (depends on 15)

The method according to claim 15 and wherein the queue handling logic comprises the memory.

### Claim 21 (depends on 15)

The method according to claim 15 and wherein the communication hardware comprises a bus.

### Claim 22 (depends on 15)

The method according to claim 15, and also comprising reporting completion of the WCR at the head of the work queue to an application running on the host processor.

### Claim 23 (depends on 15)

The method according to claim 15, and wherein the following is carried out by work processing logic comprising work execution logic and completion indication logic:
the work execution logic carrying out a unit of work associated with a given WCR; and
the completion indication logic setting, when the unit of work associated with the given WCR has been completed by the work processing logic, the completion indicator in the given WCR to indicate that the unit of work associated with the given WCR has been completed.

### Claim 24 (depends on 15)

The method according to claim 15, and wherein the queue handling logic is comprised in one of the following: a network element; a disk controller; and an accelerator device.

### Claim 25 (depends on 24)

The method according to claim 24, and wherein the queue handling logic is comprised in a network element, and the network element comprises a network interface card (NIC).

### Claim 26 (depends on 25)

The method according to claim 25 and wherein the unit of work to be carried out comprises a data transfer by the NIC over a hardware networking medium.

### Claim 27 (depends on 15)

The method according to claim 15, and wherein the following is carried out by timeout logic:
upon expiration of a timeout, setting the completion indicator of the WCR at the head of the WCS to indicate that the unit of work associated with the WCR at the head of the WCS has completed, even if the unit of work associated with the WCR at the head of the WCS has not completed.

### Claim 28 (depends on 27)

The method according to claim 27, and wherein, when the completion indicator of the WCR at the head of the WCS is set to indicate that the unit of work associated with the WCR at the head of the WCS has completed upon expiration of the timeout, the completion indicator of the WCR at the head of the WCS is set to include an error indication.
