Skip to content

Commit

Permalink
Merge pull request snabbco#943 from Igalia/merge-intel-mp-to-lwaftr
Browse files Browse the repository at this point in the history
Merge intel_mp to lwaftr
  • Loading branch information
wingo committed Sep 18, 2017
2 parents 68694df + 9650697 commit a5bd0b0
Show file tree
Hide file tree
Showing 38 changed files with 1,560 additions and 155 deletions.
108 changes: 106 additions & 2 deletions src/apps/intel_mp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,37 @@ be attached to separate instances of the app on different processes.

The links are named `input` and `output`.

DIAGRAM: Intel
+-------+
| |
input ---->* Intel *----> output
| |
+-------+

## Caveats

If attaching multiple processes to a single NIC, performance appears
better with `engine.busywait = false`.

The `intel_mp.Intel` app can drive an Intel 82599 NIC at 14 million pps.

— Method **Intel:get_rxstats**

Returns a table with the following keys:

* `counter_id` - Counter id
* `packets` - Number of packets received
* `dropped` - Number of packets dropped
* `bytes` - Total bytes received

— Method **Intel:get_txstats**

Returns a table with the following keys:

* `counter_id` - Counter id
* `packets` - Number of packets sent
* `bytes` - Total bytes sent

## Configuration

— Key **pciaddr**
Expand All @@ -27,11 +51,87 @@ specified but assumed to be broadly applicable.

— Key **rxq**

*Optional*. The receive queue to attach to, numbered from 0.
*Optional*. The receive queue to attach to, numbered from 0. The default is 0.
When VMDq is enabled, this number is used to index a queue (0 or 1)
for the selected pool. Passing `"off"` will disable the receive queue.

— Key **txq**

*Optional*. The transmit queue to attach to, numbered from 0.
*Optional*. The transmit queue to attach to, numbered from 0. The default is 0.
Passing `"off"` will disable the transmit queue.

— Key **vmdq**

*Optional*. A boolean parameter that specifies whether VMDq (Virtual Machine
Device Queues) is enabled. When VMDq is enabled, each instance of the driver
is associated with a *pool* that can be assigned a MAC address or VLAN tag.
Packets are delivered to pools that match the corresponding MACs or VLAN tags.
Each pool may be associated with several receive and transmit queues.

For a given NIC, all driver instances should have this parameter either
enabled or disabled uniformly. If this is enabled, *macaddr* must be
specified.

— Key **poolnum**

*Optional*. The VMDq pool to associate with, numbered from 0. The default
is to select a pool number automatically.

— Key **macaddr**

*Optional*. The MAC address to use as a string. The default is a wild-card
(i.e., accept all packets).

— Key **vlan**
*Optional*. A twelve-bit integer (0-4095). If set, incoming packets from
other VLANs are dropped and outgoing packets are tagged with a VLAN header.

— Key **mirror**

*Optional*. A table. If set, this app will receive copies of all selected
packets on the physical port. The selection is configured by setting keys
of the *mirror* table. Either *mirror.pool* or *mirror.port* may be set.

If *mirror.pool* is `true` all pools defined on this physical port are
mirrored. If *mirror.pool* is an array of pool numbers then the specified
pools are mirrored.

If *mirror.port* is one of "in", "out" or "inout" all incoming and/or
outgoing packets on the port are mirrored respectively. Note that this
does not include internal traffic which does not enter or exit through
the physical port.

— Key **rxcounter**

— Key **txcounter**

*Optional*. Four bit integers (0-15). If set, incoming/outgoing packets
will be counted in the selected statistics counter respectively. Multiple
apps can share a counter. To retrieve counter statistics use
`Intel:get_rxstats()` and `Intel:get_txstats()`.

— Key **rate_limit**

*Optional*. Number. Limits the maximum Mbit/s to transmit. Default is 0
which means no limit. Only applies to outgoing traffic.

— Key **priority**

*Optional*. Floating point number. Weight for the *round-robin* algorithm
used to arbitrate transmission when *rate_limit* is not set or adds up to
more than the line rate of the physical port. Default is 1.0 (scaled to
the geometric middle of the scale which goes from 1/128 to 128). The
absolute value is not relevant, instead only the ratio between competing
apps controls their respective bandwidths. Only applies to outgoing
traffic.

For example, if two apps without *rate_limit* set have the same
*priority*, both get the same output bandwidth. If the priorities are
3.0/1.0, the output bandwidth is split 75%/25%. Likewise, 1.0/0.333 or
1.5/0.5 yield the same result.

Note that even a low-priority app can use the whole line rate unless other
(higher priority) apps are using up the available bandwidth.

— Key **rsskey**

Expand Down Expand Up @@ -92,3 +192,7 @@ Each chipset supports a differing number of receive / transmit queues:
* Intel82599 supports 16 receive and 16 transmit queues, 0-15
* Intel1g i350 supports 8 receive and 8 transmit queues, 0-7
* Intel1g i210 supports 4 receive and 4 transmit queues, 0-3

The Intel82599 supports both VMDq and RSS with 32/64 pools and 4/2 RSS queues for
each pool. This driver only supports configurations with 64 pools/2 queues.
While the i350 supports VMDq, this driver does not currently support it.

0 comments on commit a5bd0b0

Please sign in to comment.