Commit Graph

126 Commits

Author SHA1 Message Date
Amr Mokhtar
1ffee690ea examples/bbdev: add sample app
- sample application performing a loop-back over ethernet using
 a bbbdev device
- 'turbo_sw' PMD must be enabled for the app to be functional
- a packet is received on an ethdev port -> enqueued for baseband
 encode operation -> dequeued -> enqueued for baseband decode
 operation-> dequeued -> compared with original signal -> looped-back
 to the ethdev port

Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
2018-01-19 01:44:25 +01:00
Jasvinder Singh
50bdac5916 flow_classify: remove table id parameter from API
This patch removes table id parameter from all the flow
classify apis to reduce the complexity alongwith some code
cleanup.

The validate api is exposed as public api to allow user
to validate the flow before adding it to the classifier.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2018-01-11 19:15:26 +01:00
Rami Rosen
05100f3eef doc: fix typo in KNI sample app guide
This trivial patch fixes a typo in sample apps guide, in
the kernel nic interface (kni) section.
Using "-config", as it is now today in this doc, will not
work and will emit an error; it should be "--config" instead,
and this patch fixes it accordingly.

Fixes: d0dff9ba44 ("doc: sample application user guide")

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-11 18:40:58 +01:00
Thierry Herbelot
8f87ba7015 fix typos
Repeated occurrences of 'the'.

The change was obtained using the following command:

  sed -i "s;the the ;the ;" `git grep -l "the "`

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
2018-01-11 18:26:46 +01:00
Rami Rosen
eae494e7b6 doc: fix a typo in pipeline app guide
This patch fixes a trivial typo in ip pipeline app guide.

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-11-13 06:36:27 +01:00
Ilya V. Matveychikov
4c20622a95 examples/ipv4_multicast: fix segments number type
Fixes: 97cb466d65 ("mbuf: use 2 bytes for port and nb segments")

Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
2017-11-12 04:15:54 +01:00
Bernard Iremonger
fdec9301f5 doc: add flow classify guides
The Flow Classify Library Programmers Guide documents
librte_flow_classify.

The Flow Classify Sample Application Guide documents the
flow_classify sample application which is used to
demonstrate the use of the Flow Classify Library,
librte_flow_classify.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-11-07 23:02:12 +01:00
Ori Kam
4a3ef59a10 examples/flow_filtering: add simple demo of flow API
This application shows a simple usage of the
rte_flow API for hardware filtering offloading.

In this demo we are filtering specific IP to
specific target queue, while sending all the
rest of the packets to other queue.

Signed-off-by: Ori Kam <orika@mellanox.com>
2017-11-07 22:40:55 +01:00
Marko Kovacevic
bef33b0a9d doc: add new introduction to sample app guides
Add new Introduction Section into the sample app guides.

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-10-27 01:24:44 +02:00
Herakliusz Lipiec
7cacb05655 doc: add generic build instructions for sample apps
Moved duplicated, and occasionally outdated, doc sections from each
of the sample app guides chapters to a common chapter at the start.

This reduces the duplication in the docs and provides a single
point of reference for compiling the sample apps.

Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
2017-10-27 01:23:53 +02:00
Akhil Goyal
ec17993a14 examples/ipsec-secgw: support security offload
Ipsec-secgw application is modified so that it can support
following type of actions for crypto operations
1. full protocol offload using crypto devices.
2. inline ipsec using ethernet devices to perform crypto operations
3. full protocol offload using ethernet devices.
4. non protocol offload

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Signed-off-by: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
2017-10-26 03:12:56 +02:00
Radu Nicolau
bbabfe6e4e examples/ipsec_secgw: support jumbo frames
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-10-25 18:11:00 +02:00
Harry van Haaren
cbdd342060 examples/service_cores: add new sample application
This commit adds a new sample app, which showcases the value
of running services. In particular it allows the application
to dynamically schedule services to service-cores.

The sample app itself registers a number of dummy services,
and applies different profiles to them at runtime. Note that
this sample application does not forward any traffic - it
demonstrates advanced usage of the service cores API.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Gage Eads <gage.eads@intel.com>
2017-10-24 23:01:01 +02:00
Zhiyong Yang
c6d6982dc9 doc: update port id type
Since port id has changed from uint8_t to uint16_t in dpdk code,
So update the change in related doc.

Fixes: f8244c6399 ("ethdev: increase port id range")

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-10-13 21:57:49 +02:00
Pablo de Lara
9959fbd546 doc: fix l2fwd-crypto sample code
L2fwd-crypto app was modified with various changes
in its code. The application user guide contains
some code snippets that needed to be updated.

Fixes: 2661f4fbe9 ("examples/l2fwd-crypto: add AEAD parameters")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-07-27 17:41:48 +02:00
Kuba Kozak
acdfecba45 examples/l2fwd-crypto: add option to update MAC address
This patch adds a new option to enable/disable the
MAC addresses updating done at forwarding time: --[no-]mac-updating

By default, MAC address updating remains enabled, to keep consistency
with previous usage.

Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-07-19 17:33:07 +03:00
Pablo de Lara
30883f3e1d doc: use new crypto driver names
Crypto driver names were changed in 16.11,
but some guides were still using the old ones
(which are still valid, only kept for compatibility
reasons).

To keep consistency and avoid confusion, all guides
should be using the same driver names.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-07-19 14:10:40 +03:00
Changpeng Liu
db75c7af19 examples/vhost_scsi: introduce a new sample app
vhost-user protocol is common to many virtio devices, such as
virtio_net/virtio_scsi/virtio_blk. Since DPDK vhost library
removed the NET specific data structures, the vhost library
is common to other virtio devices, such as virtio-scsi.

Here we introduce a simple memory based block device that
can be presented to Guest VM through vhost-user-scsi-pci
controller. Similar with vhost-net, the sample application
will process the I/Os sent via virt rings.

Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-07-19 22:49:47 +03:00
Hemant Agrawal
7c8f4eedeb doc: add note for IPv4 multicast application
Add a note to indicate that only first four ports can be
tested with this application.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-07-10 00:46:38 +02:00
Harry van Haaren
1094ca9668 doc: add SW eventdev pipeline to sample app guide
Add a new entry in the sample app user-guides,
which details the working of the eventdev_pipeline_sw.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-07-07 09:30:24 +02:00
Pablo de Lara
b79e4c00af cryptodev: use AES-GCM/CCM as AEAD algorithms
Now that all the structures/functions for AEAD algorithms
are in place, migrate the two supported algorithms
AES-GCM and AES-CCM to these, instead of using
cipher and authentication parameters.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06 22:26:49 +02:00
Pablo de Lara
2661f4fbe9 examples/l2fwd-crypto: add AEAD parameters
Since there is a new operation type (AEAD), add parameters
for this in the application.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06 22:26:49 +02:00
Pablo de Lara
501e9c226a examples/ipsec-secgw: add AEAD parameters
Since there is a new operation type (AEAD), add parameters
for this in the application.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06 22:26:49 +02:00
Pablo de Lara
acf8616901 cryptodev: add auth IV
Authentication algorithms, such as AES-GMAC or the wireless
algorithms (like SNOW3G) use IV, like cipher algorithms.
So far, AES-GMAC has used the IV from the cipher structure,
and the wireless algorithms have used the AAD field,
which is not technically correct.

Therefore, authentication IV parameters have been added,
so API is more correct. Like cipher IV, auth IV is expected
to be copied after the crypto operation.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-06 22:26:48 +02:00
Rami Rosen
da8e7a3086 doc: fix a typo in sample apps guide
This patch fixes a trivial typo in the sample apps guide.
commit 35b09d76f8 ("doc: use corelist instead of coremask") replaced
the usage of coremask (-c) with corelist (-l).
As a result of this patch, we have
./build/ipv4_multicast -l 0-3 -n 3 -- -p 0x3 -q 1
in the sample app guide, while the explanation immediately following
says:
In this command:
• The -c option enables cores 0, 1, 2 and 3

This patch fixes the
explanation to have "-l" instead of "-c".

Fixes: 35b09d76f8 ("doc: use corelist instead of coremask")
Cc: stable@dpdk.org

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-07-01 17:33:59 +02:00
Pablo de Lara
5949e30dae doc: fix typo in l2fwd-crypto usage
Fixes: ba7b86b141 ("doc: add l2fwd-crypto sample app guide")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-06-28 19:59:22 +02:00
Thomas Monjalon
3dcfe0390c pci: remove eal prefix
The PCI code will move to the bus drivers directory.
Rename functions from rte_eal_pci_ to rte_pci_
to prepare the move of the driver out of EAL.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-05-05 14:38:17 +02:00
Fan Zhang
d2797f51cc examples/l2fwd-crypto: add cryptodev mask option
Previously, l2fwd-crypto application did not give user the
flexibility to decide which crypto device(s) will be used.

In this patch, a new cryptodev_mask option is added to the
application. Same as portmask, the cryptodev_mask avails the
user to mask out the unwanted crypto devices in the system.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
2017-04-20 11:32:45 +02:00
Pablo de Lara
59c51be41c examples/dpdk-qat: remove app
Remove DPDK QAT sample app, in favour of the newer applications
that use the cryptodev library: ipsec-gw and l2fwd-crypto,
which has support for Intel QuickAssist devices.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-04-06 00:17:44 +02:00
Pablo de Lara
4790f99d2d examples/l2fwd-crypto: use cryptodev algorithm parser
L2fwd-crypto app was creating an array of strings for the
supported algorithms, which was different from the strings
that are now in cryptodev.

Use the new API in cryptodev to parse the string from the user,
to get the algorithm enum, instead, so it is not necessary to add
a new supported algorithm in the cryptodev library and this app.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-06 00:17:44 +02:00
Bruce Richardson
eb4562714f examples/quota_watermark: use ring space for watermarks
Now that the enqueue function returns the amount of space in the ring,
we can use that to replace the old watermark functionality. Update the
example app to do so, and re-enable it in the examples Makefile.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-29 22:32:20 +02:00
Bruce Richardson
14fbffb0aa ring: return free space when enqueuing
Add an extra parameter to the ring enqueue burst/bulk functions so that
those functions can optionally return the amount of free space in the
ring. This information can be used by applications in a number of ways,
for instance, with single-producer queues, it provides a max
enqueue size which is guaranteed to work. It can also be used to
implement watermark functionality in apps, replacing the older
functionality with a more flexible version, which enables apps to
implement multiple watermark thresholds, rather than just one.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-29 22:32:04 +02:00
Bruce Richardson
cfa7c9e6fc ring: make bulk and burst return values consistent
The bulk fns for rings returns 0 for all elements enqueued and negative
for no space. Change that to make them consistent with the burst functions
in returning the number of elements enqueued/dequeued, i.e. 0 or N.
This change also allows the return value from enq/deq to be used directly
without a branch for error checking.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-29 22:25:37 +02:00
David Hunt
89107b559d doc: update distributor app guide for new burst API
Changes in the thread layout described, with an updated diagram.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-03-29 16:46:58 +02:00
Hemant Agrawal
5a11168d9b mbuf: use pktmbuf helper to create the pool
When possible, replace the uses of rte_mempool_create() with
the helper provided in librte_mbuf: rte_pktmbuf_pool_create().

This is the preferred way to create a mbuf pool.

This also updates the documentation.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-03-15 13:48:02 +01:00
Keith Wiles
35b09d76f8 doc: use corelist instead of coremask
The coremask option in DPDK is difficult to use and we should be
promoting the use of the corelist (-l) option. The patch
adjusts the docs to use -l EAL option instead of the -c option.

The patch only changes the docs and not the code as the -c option
will continue to exist unless it is removed in the future. The -c
option should be kept to maintain backward compatibility.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-03-01 20:39:58 +01:00
Pablo de Lara
ed2a80fdf6 examples/server_node_efd: renamed from flow_distributor
To avoid confusion with distributor app, this commit
renames the flow-distributor sample app to server_node_efd,
since it shows how to use the EFD library and it is based
on a server/nodes model.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-01-30 17:26:11 +01:00
Pablo de Lara
eb21185d6f doc: add flow distributor example guide
Signed-off-by: Sameh Gobriel <sameh.gobriel@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Christian Maciocco <christian.maciocco@intel.com>
2017-01-18 20:55:40 +01:00
Tomasz Kulasek
faf08c8b0f examples/performance-thread: add packet type parsing
Last changes in Niantic and Fortville NIC drivers causes that
vector Rx path is chosen by default in l3fwd-thread application.
This path doesn't support propagation of hw packet type recognition
to the packet_type field in mbuf, and packets cannot be classified
properly.

The approach to solve this problem is similar to the commit:
71a7e2424e ("examples/l3fwd: fix using packet type blindly").

To use sw packet analyzer, new command line option "--parse-ptype" is
introduced.

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
2017-01-17 18:40:17 +01:00
Pablo de Lara
e0ef2aecde doc: simplify l3fwd example guide
L3 Forwarding sample app user guides have some inconsistencies
between the example command line and the configuration table.
Also, they were showing too complicated configuration, using two
different NUMA nodes for two ports, which will probably lead
to performance drop due to use cross-socket channel.

This patch simplifies the configuration of these examples,
by using a single NUMA node and a single queue per port.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-01-17 17:04:47 +01:00
Thomas Monjalon
c6dab2a873 tools: move to usertools
Rename tools/ into usertools/ to differentiate from buildtools/
and devtools/ while making clear these scripts are part of
DPDK runtime.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-04 21:17:32 +01:00
Baruch Siach
b8b01a4633 doc: fix typo in sample app guide
Fixes: bda68ab9d1 ("examples/ethtool: add user-space ethtool sample application")

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Remy Horton <remy.horton@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-12-20 14:12:30 +01:00
John McNamara
8ccc927962 doc: rearrange the high level index
Rearrange the order of the high level documenation index into
a more logical sequence for a new user.

Also, improve some of the high-level document names.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
2016-11-13 15:25:12 +01:00
Reshma Pattan
9a998f2dda doc: fix l3fwd mode selection
The l3fwd application route lookup mode can be selected at run time
but not at compile time. This patch corrects the statement in the doc.

Fixes: d0dff9ba ("doc: sample application user guide")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-11-11 00:33:20 +01:00
Yuanhan Liu
a971c509a5 doc: update vhost sample guide
For vhost-switch sample, the old guide takes too many words on
vhost-cuse, which is mainly due to vhost-cuse is invented before
vhost-user.

Now vhost-cuse is removed, meaning the best part of the doc is useless.
Instead of amending one piece here and there, this patch simply removes
the most part of the doc and replace it with a simple test guide.

For tep_term sample, mainly for removing the part has "vhost-cuse".

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-11-07 15:58:51 +01:00
Christian Ehrhardt
d644886398 doc: move tool guides in their own subdirectory
This is to clarify the scope of these documents that are more tools than
sample applications.
Also this is a preparation step to add more tools and generate man pages
off of their rst files.

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Luca Boccassi <lboccass@brocade.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-10-26 23:45:42 +02:00
Reshma Pattan
bf97a83b13 doc: add pdump limitation note
The note i.e. "The dpdk-pdump tool can only be used in
conjunction with a primary process which has the packet
capture framework initialized already" is added to
doc/guides/sample_app_ug/pdump.rst to facilitate
easy understanding on the usage of the tool.

Suggested-by: Jianfeng Tan <jianfeng.tan@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2016-10-26 21:58:43 +02:00
Mark Kavanagh
33a0d8e77e doc: fix typo in pdump guide
- Fix copy/paste error in description of how to capture both rx
  & tx traffic in a single pcap file
- Replace duplicate word with what original author presumably
  intended, such that description now makes sense

Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-10-13 18:18:37 +02:00
Maxime Coquelin
cf435a07c0 examples/l2fwd: add option --[no-]mac-updating
l2fwd could be useful for testing virtual devices without the need
of physical ones.

To achieve this, this patch adds a new option to enable/disable the
MAC addresses updating done at forwarding time: --[no-]mac-updating

It enables the use of l2fwd for basic VM to VM communication.

By default, MAC address updating remains enabled, to keep consistency
with previous usage.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2016-10-13 14:37:48 +02:00
Sergio Gonzalez Monroy
4470c22de2 examples/ipsec-secgw: add AES-CTR
RFC3686: Using AES Counter (CTR) Mode With IPsec ESP.`

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-10-08 17:54:38 +02:00