2013-04-19 12:34:40 +02:00
|
|
|
API {#index}
|
|
|
|
===
|
|
|
|
|
|
|
|
<!--
|
|
|
|
BSD LICENSE
|
|
|
|
|
2017-03-30 22:00:57 +01:00
|
|
|
Copyright 2013-2017 6WIND S.A.
|
2013-04-19 12:34:40 +02:00
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
|
modification, are permitted provided that the following conditions
|
|
|
|
are met:
|
|
|
|
|
|
|
|
* Redistributions of source code must retain the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
* Redistributions in binary form must reproduce the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer in
|
|
|
|
the documentation and/or other materials provided with the
|
|
|
|
distribution.
|
|
|
|
* Neither the name of 6WIND S.A. nor the names of its
|
|
|
|
contributors may be used to endorse or promote products derived
|
|
|
|
from this software without specific prior written permission.
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
-->
|
|
|
|
|
2017-07-14 16:45:25 +02:00
|
|
|
The public API headers are grouped by topics:
|
2013-04-19 12:34:40 +02:00
|
|
|
|
|
|
|
- **device**:
|
2015-08-11 18:09:44 +02:00
|
|
|
[dev] (@ref rte_dev.h),
|
2013-04-19 12:34:40 +02:00
|
|
|
[ethdev] (@ref rte_ethdev.h),
|
2015-08-11 18:09:44 +02:00
|
|
|
[ethctrl] (@ref rte_eth_ctrl.h),
|
2016-12-21 15:51:17 +01:00
|
|
|
[rte_flow] (@ref rte_flow.h),
|
ethdev: add traffic management API
This patch introduces the generic ethdev API for the traffic manager
capability, which includes: hierarchical scheduling, traffic shaping,
congestion management, packet marking.
Main features:
- Exposed as ethdev plugin capability (similar to rte_flow)
- Capability query API per port, per level and per node
- Scheduling algorithms: Strict Priority (SP), Weighed Fair Queuing (WFQ)
- Traffic shaping: single/dual rate, private (per node) and shared (by
multiple nodes) shapers
- Congestion management for hierarchy leaf nodes: algorithms of tail drop,
head drop, WRED; private (per node) and shared (by multiple nodes) WRED
contexts
- Packet marking: IEEE 802.1q (VLAN DEI), IETF RFC 3168 (IPv4/IPv6 ECN for
TCP and SCTP), IETF RFC 2597 (IPv4 / IPv6 DSCP)
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Balasubramanian Manoharan <balasubramanian.manoharan@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 14:35:39 +01:00
|
|
|
[rte_tm] (@ref rte_tm.h),
|
2017-10-13 13:22:16 +01:00
|
|
|
[rte_mtr] (@ref rte_mtr.h),
|
2018-01-11 19:23:18 +00:00
|
|
|
[bbdev] (@ref rte_bbdev.h),
|
2015-11-25 13:25:12 +00:00
|
|
|
[cryptodev] (@ref rte_cryptodev.h),
|
2017-10-25 20:37:23 +05:30
|
|
|
[security] (@ref rte_security.h),
|
2016-11-18 07:30:38 +05:30
|
|
|
[eventdev] (@ref rte_eventdev.h),
|
2017-10-11 03:51:34 +05:30
|
|
|
[event_eth_rx_adapter] (@ref rte_event_eth_rx_adapter.h),
|
2017-07-16 20:10:56 +02:00
|
|
|
[metrics] (@ref rte_metrics.h),
|
|
|
|
[bitrate] (@ref rte_bitrate.h),
|
|
|
|
[latency] (@ref rte_latencystats.h),
|
2014-04-10 16:15:28 +02:00
|
|
|
[devargs] (@ref rte_devargs.h),
|
2017-01-30 18:27:25 +00:00
|
|
|
[PCI] (@ref rte_pci.h)
|
|
|
|
|
|
|
|
- **device specific**:
|
2017-10-10 11:18:14 +01:00
|
|
|
[softnic] (@ref rte_eth_softnic.h),
|
2014-06-25 21:07:43 +01:00
|
|
|
[bond] (@ref rte_eth_bond.h),
|
2017-04-01 15:22:57 +08:00
|
|
|
[vhost] (@ref rte_vhost.h),
|
2013-04-19 12:34:40 +02:00
|
|
|
[KNI] (@ref rte_kni.h),
|
2017-01-30 18:27:25 +00:00
|
|
|
[ixgbe] (@ref rte_pmd_ixgbe.h),
|
2017-04-18 12:33:15 +01:00
|
|
|
[i40e] (@ref rte_pmd_i40e.h),
|
2017-09-11 17:33:35 +01:00
|
|
|
[bnxt] (@ref rte_pmd_bnxt.h),
|
2018-01-10 16:16:37 +05:30
|
|
|
[dpaa] (@ref rte_pmd_dpaa.h),
|
2017-04-18 12:33:15 +01:00
|
|
|
[crypto_scheduler] (@ref rte_cryptodev_scheduler.h)
|
2013-04-19 12:34:40 +02:00
|
|
|
|
|
|
|
- **memory**:
|
|
|
|
[memseg] (@ref rte_memory.h),
|
|
|
|
[memzone] (@ref rte_memzone.h),
|
|
|
|
[mempool] (@ref rte_mempool.h),
|
|
|
|
[malloc] (@ref rte_malloc.h),
|
|
|
|
[memcpy] (@ref rte_memcpy.h)
|
|
|
|
|
|
|
|
- **timers**:
|
|
|
|
[cycles] (@ref rte_cycles.h),
|
|
|
|
[timer] (@ref rte_timer.h),
|
|
|
|
[alarm] (@ref rte_alarm.h)
|
|
|
|
|
|
|
|
- **locks**:
|
|
|
|
[atomic] (@ref rte_atomic.h),
|
|
|
|
[rwlock] (@ref rte_rwlock.h),
|
|
|
|
[spinlock] (@ref rte_spinlock.h)
|
|
|
|
|
|
|
|
- **CPU arch**:
|
|
|
|
[branch prediction] (@ref rte_branch_prediction.h),
|
|
|
|
[cache prefetch] (@ref rte_prefetch.h),
|
2016-11-16 16:20:38 +01:00
|
|
|
[SIMD] (@ref rte_vect.h),
|
2013-04-19 12:34:40 +02:00
|
|
|
[byte order] (@ref rte_byteorder.h),
|
2017-01-18 06:51:23 +05:30
|
|
|
[CPU flags] (@ref rte_cpuflags.h),
|
2017-06-05 14:28:38 +05:30
|
|
|
[CPU pause] (@ref rte_pause.h),
|
2017-01-18 06:51:23 +05:30
|
|
|
[I/O access] (@ref rte_io.h)
|
2013-04-19 12:34:40 +02:00
|
|
|
|
|
|
|
- **CPU multicore**:
|
|
|
|
[interrupts] (@ref rte_interrupts.h),
|
|
|
|
[launch] (@ref rte_launch.h),
|
|
|
|
[lcore] (@ref rte_lcore.h),
|
|
|
|
[per-lcore] (@ref rte_per_lcore.h),
|
2017-07-11 15:19:27 +01:00
|
|
|
[service cores] (@ref rte_service.h),
|
2017-07-16 19:57:07 +02:00
|
|
|
[keepalive] (@ref rte_keepalive.h),
|
2013-04-19 12:34:40 +02:00
|
|
|
[power/freq] (@ref rte_power.h)
|
|
|
|
|
|
|
|
- **layers**:
|
|
|
|
[ethernet] (@ref rte_ether.h),
|
2015-08-11 18:09:44 +02:00
|
|
|
[ARP] (@ref rte_arp.h),
|
|
|
|
[ICMP] (@ref rte_icmp.h),
|
2017-10-25 20:37:19 +05:30
|
|
|
[ESP] (@ref rte_esp.h),
|
2013-04-19 12:34:40 +02:00
|
|
|
[IP] (@ref rte_ip.h),
|
|
|
|
[SCTP] (@ref rte_sctp.h),
|
|
|
|
[TCP] (@ref rte_tcp.h),
|
|
|
|
[UDP] (@ref rte_udp.h),
|
lib/gro: add Generic Receive Offload API framework
Generic Receive Offload (GRO) is a widely used SW-based offloading
technique to reduce per-packet processing overhead. It gains
performance by reassembling small packets into large ones. This
patchset is to support GRO in DPDK. To support GRO, this patch
implements a GRO API framework.
To enable more flexibility to applications, DPDK GRO is implemented as
a user library. Applications explicitly use the GRO library to merge
small packets into large ones. DPDK GRO provides two reassembly modes.
One is called lightweight mode, the other is called heavyweight mode.
If applications want to merge packets in a simple way and the number
of packets is relatively small, they can use the lightweight mode.
If applications need more fine-grained controls, they can choose the
heavyweight mode.
rte_gro_reassemble_burst is the main reassembly API which is used in
lightweight mode and processes N packets at a time. For applications,
performing GRO in lightweight mode is simple. They just need to invoke
rte_gro_reassemble_burst. Applications can get GROed packets as soon as
rte_gro_reassemble_burst returns.
rte_gro_reassemble is the main reassembly API which is used in
heavyweight mode and tries to merge N inputted packets with the packets
in GRO reassembly tables. For applications, performing GRO in heavyweight
mode is relatively complicated. Before performing GRO, applications need
to create a GRO context object, which keeps reassembly tables of
desired GRO types, by rte_gro_ctx_create. Then applications can use
rte_gro_reassemble to merge packets. The GROed packets are in the
reassembly tables of the GRO context object. If applications want to get
them, applications need to manually flush them by flush API.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
2017-07-09 13:46:44 +08:00
|
|
|
[GRO] (@ref rte_gro.h),
|
gso: add Generic Segmentation Offload API framework
Generic Segmentation Offload (GSO) is a SW technique to split large
packets into small ones. Akin to TSO, GSO enables applications to
operate on large packets, thus reducing per-packet processing overhead.
To enable more flexibility to applications, DPDK GSO is implemented
as a standalone library. Applications explicitly use the GSO library
to segment packets. To segment a packet requires two steps. The first
is to set proper flags to mbuf->ol_flags, where the flags are the same
as that of TSO. The second is to call the segmentation API,
rte_gso_segment(). This patch introduces the GSO API framework to DPDK.
rte_gso_segment() splits an input packet into small ones in each
invocation. The GSO library refers to these small packets generated
by rte_gso_segment() as GSO segments. Each of the newly-created GSO
segments is organized as a two-segment MBUF, where the first segment is a
standard MBUF, which stores a copy of packet header, and the second is an
indirect MBUF which points to a section of data in the input packet.
rte_gso_segment() reduces the refcnt of the input packet by 1. Therefore,
when all GSO segments are freed, the input packet is freed automatically.
Additionally, since each GSO segment has multiple MBUFs (i.e. 2 MBUFs),
the driver of the interface which the GSO segments are sent to should
support to transmit multi-segment packets.
The GSO framework clears the PKT_TX_TCP_SEG flag for both the input
packet, and all produced GSO segments in the event of success, since
segmentation in hardware is no longer required at that point.
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-10-07 22:56:39 +08:00
|
|
|
[GSO] (@ref rte_gso.h),
|
2014-05-28 18:32:36 +01:00
|
|
|
[frag/reass] (@ref rte_ip_frag.h),
|
2015-08-11 18:09:44 +02:00
|
|
|
[LPM IPv4 route] (@ref rte_lpm.h),
|
2017-10-25 17:18:52 +02:00
|
|
|
[LPM IPv6 route] (@ref rte_lpm6.h)
|
2013-04-19 12:34:40 +02:00
|
|
|
|
|
|
|
- **QoS**:
|
|
|
|
[metering] (@ref rte_meter.h),
|
|
|
|
[scheduler] (@ref rte_sched.h),
|
|
|
|
[RED congestion] (@ref rte_red.h)
|
|
|
|
|
|
|
|
- **hashes**:
|
|
|
|
[hash] (@ref rte_hash.h),
|
|
|
|
[jhash] (@ref rte_jhash.h),
|
2015-08-11 18:09:44 +02:00
|
|
|
[thash] (@ref rte_thash.h),
|
2013-04-19 12:34:40 +02:00
|
|
|
[FBK hash] (@ref rte_fbk_hash.h),
|
2017-10-25 17:18:52 +02:00
|
|
|
[CRC hash] (@ref rte_hash_crc.h)
|
2017-10-20 12:26:30 +02:00
|
|
|
|
|
|
|
- **classification**
|
|
|
|
[reorder] (@ref rte_reorder.h),
|
|
|
|
[distributor] (@ref rte_distributor.h),
|
|
|
|
[EFD] (@ref rte_efd.h),
|
|
|
|
[ACL] (@ref rte_acl.h),
|
2017-10-24 18:28:00 +01:00
|
|
|
[member] (@ref rte_member.h),
|
|
|
|
[flow classify] (@ref rte_flow_classify.h)
|
2013-04-19 12:34:40 +02:00
|
|
|
|
|
|
|
- **containers**:
|
|
|
|
[mbuf] (@ref rte_mbuf.h),
|
|
|
|
[ring] (@ref rte_ring.h),
|
|
|
|
[tailq] (@ref rte_tailq.h),
|
2017-10-25 17:18:52 +02:00
|
|
|
[bitmap] (@ref rte_bitmap.h)
|
2013-04-19 12:34:40 +02:00
|
|
|
|
2014-06-04 19:08:19 +01:00
|
|
|
- **packet framework**:
|
|
|
|
* [port] (@ref rte_port.h):
|
2014-06-04 19:08:20 +01:00
|
|
|
[ethdev] (@ref rte_port_ethdev.h),
|
2014-06-04 19:08:21 +01:00
|
|
|
[ring] (@ref rte_port_ring.h),
|
2014-06-04 19:08:22 +01:00
|
|
|
[frag] (@ref rte_port_frag.h),
|
2014-06-04 19:08:23 +01:00
|
|
|
[reass] (@ref rte_port_ras.h),
|
2014-06-04 19:08:24 +01:00
|
|
|
[sched] (@ref rte_port_sched.h),
|
2016-06-21 18:55:52 +08:00
|
|
|
[kni] (@ref rte_port_kni.h),
|
2014-06-04 19:08:25 +01:00
|
|
|
[src/sink] (@ref rte_port_source_sink.h)
|
2014-06-04 19:08:27 +01:00
|
|
|
* [table] (@ref rte_table.h):
|
2014-06-04 19:08:28 +01:00
|
|
|
[lpm IPv4] (@ref rte_table_lpm.h),
|
2014-06-04 19:08:29 +01:00
|
|
|
[lpm IPv6] (@ref rte_table_lpm_ipv6.h),
|
2014-06-04 19:08:30 +01:00
|
|
|
[ACL] (@ref rte_table_acl.h),
|
2014-06-04 19:08:31 +01:00
|
|
|
[hash] (@ref rte_table_hash.h),
|
2014-06-04 19:08:32 +01:00
|
|
|
[array] (@ref rte_table_array.h),
|
2014-06-04 19:08:33 +01:00
|
|
|
[stub] (@ref rte_table_stub.h)
|
2014-06-04 19:08:35 +01:00
|
|
|
* [pipeline] (@ref rte_pipeline.h)
|
2014-06-04 19:08:19 +01:00
|
|
|
|
2014-02-04 16:11:12 +01:00
|
|
|
- **basic**:
|
|
|
|
[approx fraction] (@ref rte_approx.h),
|
|
|
|
[random] (@ref rte_random.h),
|
2015-08-11 18:09:44 +02:00
|
|
|
[config file] (@ref rte_cfgfile.h),
|
2014-02-04 16:11:12 +01:00
|
|
|
[key/value args] (@ref rte_kvargs.h),
|
2014-07-04 11:12:31 +02:00
|
|
|
[string] (@ref rte_string_fns.h)
|
2014-02-04 16:11:12 +01:00
|
|
|
|
2013-04-19 12:34:40 +02:00
|
|
|
- **debug**:
|
2015-08-11 18:09:44 +02:00
|
|
|
[jobstats] (@ref rte_jobstats.h),
|
2016-12-01 11:02:10 +00:00
|
|
|
[pdump] (@ref rte_pdump.h),
|
2015-08-11 18:09:44 +02:00
|
|
|
[hexdump] (@ref rte_hexdump.h),
|
2013-04-19 12:34:40 +02:00
|
|
|
[debug] (@ref rte_debug.h),
|
|
|
|
[log] (@ref rte_log.h),
|
|
|
|
[errno] (@ref rte_errno.h)
|
|
|
|
|
|
|
|
- **misc**:
|
|
|
|
[EAL config] (@ref rte_eal.h),
|
|
|
|
[common] (@ref rte_common.h),
|
2015-08-11 18:09:44 +02:00
|
|
|
[ABI compat] (@ref rte_compat.h),
|
2013-04-19 12:34:40 +02:00
|
|
|
[version] (@ref rte_version.h)
|