# US 2012/0253780 A1 · Systems and methods for emulating a nic for packet transmission on hardware rss unaware nics in a multi-core system

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

- Number: US 2012/0253780 A1
- Document ID: US20120253780A1
- Status: Published application
- Kind: A1
- Application number: 13/371,862
- Filed: 2012-02-13
- Published: 2012-10-04
- Earliest claimed: 2011-03-28
- Assignees: Citrix Systems, Inc.
- Inventors: Ramanjaneyulu Talla; Narendra Kumar Kataria
- Web page: https://patentgrep.com/patent/US20120253780A1

## CPC

- H04L 47/122: by diverting traffic away from congested entities
- G06F 1/00: Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00 (architectures of general purpose stored program computers G06F15/76)
- H04L 12/46: Interconnection of networks
- H04L 43/0894: Packet rate
- H04L 47/00: Traffic control in data switching networks (arrangements for detecting or preventing errors in the information received H04L1/00)
- H04L 47/11: Identifying congestion
- H04L 47/621: {Individual queue per connection or flow, e.g. per VC}
- H04L 49/00: Packet switching elements
- 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)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Emulating a NIC for packet transmission on hardware RSS unaware NICs in a multi-core system enables each of a plurality of slave packet engines to emulate a NIC for packet transmissions locally even though the actual NIC transmissions from the queue are handled by a master packet engine only. Each slave packet engine treats a local software-implemented transmission queue as a device queue and uses the local queue to keep track of status of data from the packet engine in the device output queue, handled by the master packet engine on behalf of the slave packet engines. As the master packet engine transmits the data from the queue and the status of the queue changes, the master packet engine and the slave packet engines may use pointers to keep track of which data packets are transmitted, which data packets are drained and which data packets are still in the queue.

## Claims

### Claim 1

A method for emulating a network interface card (NIC) by a core in a multi-core system, comprising:
processing, by a slave packet engine executed by a first core of a plurality of cores of a device, a first packet for transmission from the device;
writing, by the slave packet engine, the processed first packet to a local queue of the slave packet engine;
incrementing, by the slave packet engine, a write pointer of the local queue of the slave packet engine, responsive to writing the processed first packet to the local queue of the slave packet engine;
reading, by a master packet engine executed by a second core of the plurality of cores of the device, the processed first packet from the local queue of the slave packet engine;
incrementing, by the master packet engine, a read pointer of the local queue of the slave packet engine, responsive to reading the processed first packet from the local queue of the slave packet engine;
transmitting, by the master packet engine, the processed first packet from the device; and
incrementing, by the master packet engine, a transmission pointer of the local queue of the slave packet engine, responsive to transmitting the processed first packet from the device.

### Claim 2 (depends on 1)

The method of claim 1, wherein writing the processed first packet to the local queue of the slave packet engine further comprises writing information about the first packet, by the slave packet engine, to a data structure shared by the slave packet engine and the master packet engine.

### Claim 3 (depends on 2)

The method of claim 2, wherein reading the processed first packet from the local queue of the slave packet engine further comprises reading the information about the first packet, by the master packet engine, from the shared data structure.

### Claim 4 (depends on 2)

The method of claim 2, further comprising deleting the information about the first packet, by the slave packet engine, from the shared data structure, responsive to the master packet engine incrementing the transmission pointer of the local queue of the slave packet engine.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
processing a second packet for transmission from the device, by the slave packet engine;
writing, by the slave packet engine, the processed second packet to the local queue of the slave packet engine; and
incrementing, by the slave packet engine, the write pointer of the local queue of the slave packet engine, responsive to writing the processed second packet to the local queue of the slave packet engine, and prior to the master packet engine reading the processed first packet from the local queue of the slave packet engine.

### Claim 6 (depends on 5)

The method of claim 5 further comprising:
reading, by the master packet engine, the processed second packet from the local queue of the slave packet engine; and
incrementing, by the master packet engine, the read pointer of the local queue of the slave packet engine, responsive to reading the processed second packet from the local queue of the slave packet engine, and prior to transmitting the processed first packet from the device.

### Claim 7 (depends on 1)

The method of claim 1, wherein transmitting the processed first packet from the device comprises:
writing, by the master packet engine, the processed first packet to a transmission queue of the device; and
transmitting, by the device, the processed first packet from the transmission queue of the device; and
wherein incrementing the transmission pointer of the local queue of the slave packet engine is performed responsive to transmitting the processed first packet from the transmission queue of the device.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
processing a third packet for transmission from the device, by a second slave packet engine executed by a third core of the plurality of cores of the device;
writing, by the second slave packet engine, the processed third packet to a local queue of the second slave packet engine;
incrementing, by the second slave packet engine, a write pointer of the local queue of the second slave packet engine, responsive to writing the processed third packet to the local queue of the second slave packet engine;
reading, by the master packet engine, the processed third packet from the local queue of the second slave packet engine after reading the processed first packet from the local queue of the first slave packet engine and prior to transmitting the first slave packet engine from the device; and
incrementing, by the master packet engine, a read pointer of the local queue of the second slave packet engine, responsive to reading the processed third packet from the local queue of the second slave packet engine.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
compiling packet engine-specific transmission statistics, by the slave packet engine, based on the write pointer, read pointer, and transmission pointer of the local queue of the slave packet engine.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
performing a congestion handling protocol, by the slave packet engine, based on a detecting a difference exists between a value of the write pointer and a value of one of the read pointer or transmission pointer of the local queue of the slave packet engine.

### Claim 11

A system for emulating a network interface card (NIC) by a core in a multi-core system, comprising:
a device comprising a plurality of cores;
a slave packet engine executed by a first core of the plurality of cores and comprising a local queue, the slave packet engine configured for:
processing a first packet for transmission from the device,
writing the processed first packet to the local queue of the slave packet engine, and
incrementing a write pointer of the local queue of the slave packet engine, responsive to writing the processed first packet to the local queue of the slave packet engine; and
a master packet engine executed by a second core of the plurality of cores, configured for:
reading the processed first packet from the local queue of the slave packet engine,
incrementing a read pointer of the local queue of the slave packet engine, responsive to reading the processed first packet from the local queue of the slave packet engine,
transmitting the processed first packet from the device, and
incrementing a transmission pointer of the local queue of the slave packet engine, responsive to transmitting the processed first packet from the device.

### Claim 12 (depends on 11)

The system of claim 11, wherein the slave packet engine is further configured for writing information about the first packet to a data structure shared by the slave packet engine and the master packet engine.

### Claim 13 (depends on 12)

The system of claim 12, wherein the master packet engine is further configured for reading the information about the first packet from the shared data structure.

### Claim 14 (depends on 12)

The system of claim 12, wherein the slave packet engine is further configured for deleting the information about the first packet from the shared data structure, responsive to the master packet engine incrementing the transmission pointer of the local queue of the slave packet engine.

### Claim 15 (depends on 11)

The system of claim 11, wherein the slave packet engine is further configured for:
processing a second packet for transmission from the device,
writing the processed second packet to the local queue of the slave packet engine, and
incrementing the read pointer of the local queue of the slave packet engine, responsive to writing the processed second packet to the local queue of the slave packet engine, and prior to the master packet engine reading the processed first packet from the local queue of the slave packet engine.

### Claim 16 (depends on 15)

The system of claim 15, wherein the master packet engine is further configured for:
reading the processed second packet from the local queue of the slave packet engine, and
incrementing the write pointer of the local queue of the slave packet engine, responsive to reading the processed second packet from the local queue of the slave packet engine, and prior to transmitting the processed first packet from the device.

### Claim 17 (depends on 11)

The system of claim 11, wherein the device further comprises a transmission queue, and the master packet engine is further configured for:
writing the processed first packet to the transmission queue of the device, and
transmitting the processed first packet from the transmission queue of the device; and
wherein incrementing the transmission pointer of the local queue of the slave packet engine is performed responsive to transmitting the processed first packet from the transmission queue of the device.

### Claim 18 (depends on 11)

The system of claim 11, further comprising:
a second slave packet engine executed by a third core of the plurality of cores of the device, configured for:
processing a third packet for transmission from the device,
writing the processed third packet to a local queue of the second slave packet engine, and
incrementing a write pointer of the local queue of the second slave packet engine, responsive to writing the processed third packet to the local queue of the second slave packet engine; and
wherein the master packet engine is further configured for:
reading the processed third packet from the local queue of the second slave packet engine after reading the processed first packet from the local queue of the first slave packet engine and prior to transmitting the first slave packet engine from the device, and
incrementing, by the master packet engine, a read pointer of the descriptor of the local queue of the second slave packet engine, responsive to reading the processed third packet from the local queue of the second slave packet engine.

### Claim 19 (depends on 11)

The system of claim 11, wherein the slave packet engine is further configured for compiling packet engine-specific transmission statistics based on the write pointer, read pointer, and transmission pointer of the local queue of the slave packet engine.

### Claim 20 (depends on 11)

The system of claim 11, wherein the slave packet engine is further configured for performing a congestion handling protocol based on a detecting a difference exists between a value of the write pointer and a value of one of the read pointer or transmission pointer of the local queue of the slave packet engine.
