Commit Graph

960 Commits

Author SHA1 Message Date
Shahaf Shuler
973a864174 examples/load_balancer: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
312967c341 examples/link_status_interrupt: convert to new offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
6b85f708f4 examples/ipv4_multicast: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
6162b8b376 examples/ipsec-secgw: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
9df56e69ee examples/ip_reassembly: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
eab919d001 examples/ip_pipeline: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
fdb9eff67f examples/ip_fragmentation: convert to new offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
fc9ee41b70 examples/kni: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
8374e445fc examples/exception_path: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
c1b7778886 examples/bond: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Radu Nicolau <radu.nicolau@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
43fc038262 examples/l3fwd-vf: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
40df1d7a69 examples/l3fwd-power: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
ba8c103d24 examples/l3fwd-acl: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
1ef9600b2d examples/l3fwd: convert to ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
563e239b45 examples/l2fwd-keepalive: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
0cdee2357a examples/l2fwd-jobstats: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
f2b713e3f5 examples/l2fwd-crypto: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Shahaf Shuler
75d7f266e9 examples/l2fwd: convert to new ethdev offloads API
Ethdev offloads API has changed since:

commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")

This commit support the new API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-16 18:47:49 +01:00
Zhiyong Yang
61e99293f6 examples/vhost: fix startup check
For vhost sample, the operation if (dev_info.max_rx_queues >
MAX_QUEUES) in the function port_init causes startup failure
when using X710(i40e driver). X710 requires that MAX_QUEUES
should be defined no less than 320, however it is defined as
128 currently.

Such checking is overkill and Removal don't affect any
functionality (have already validated ixgbe and i40e).

The removal can avoid similar issue when introduing new physical NIC.

Fixes: 8bd6c395a5 ("examples/vhost: increase maximum queue number")
Cc: stable@dpdk.org

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
2018-01-16 18:47:49 +01:00
Junjie Chen
a3fdb53270 examples/vhost: fix sending ARP packet to self
ARP packets are not dropped when dest vdev is itself, which breaks
RX ring inconspicuously.

Fixes: 9c5ef51207 ("examples/vhost: handle broadcast packet")
Cc: stable@dpdk.org

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
2018-01-16 18:47:49 +01:00
Stefan Hajnoczi
6c299bb732 vhost: introduce vring call API
Users of librte_vhost currently implement the vring call operation
themselves.  Each caller performs the operation slightly differently.

This patch introduces a new librte_vhost API called
rte_vhost_vring_call() that performs the operation so that vhost-user
applications don't have to duplicate it.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
2018-01-16 18:47:49 +01:00
Wei Zhao
feca6c428a examples/flow_filtering: add Tx queues setup process
This example does not have the process to set up the Tx queues,
which is required by Intel NICs. So this patch adds that Tx setup
to the application.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
2018-01-16 18:47:49 +01:00
Nikhil Agarwal
39799e861b examples/l3fwd-power: disable link status interrupt
This application does not need Link Status Interrupt.
It will cause failure for the platforms not supporting LSC.

Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>
Acked-by: David Hunt <david.hunt@intel.com>
2018-01-15 18:41:16 +01:00
Nikhil Agarwal
47d834ba1a examples/l3fwd-power: replace desc done with Rx queue count
HW queue based platforms may not support descriptor done API.
This patch changes the usages to rx_queue_count API, which
is more generic.

Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>
Acked-by: David Hunt <david.hunt@intel.com>
2018-01-15 18:40:16 +01:00
Nikhil Agarwal
63de7e6e4f examples/l3fwd-power: fix frequency detection
The code assumes that the platform frequency is 2GHz.
This patch add support for dynamically detecting platform frequence.

Fixes: d7937e2e3d ("power: initial import")
Cc: stable@dpdk.org

Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>
Acked-by: David Hunt <david.hunt@intel.com>
2018-01-15 18:40:11 +01:00
Nikhil Agarwal
4ffc0a883b examples/l3fwd-power: fix Rx without interrupt
This existing code cause the platform to start receiving packet
immediately irrespective of interrupts available or not.
If the platform does not support Rx interrupt, it shall not start
receiving packets immediately. It shall let the timer management work.

Fixes: aee3bc79cc ("examples/l3fwd-power: enable one-shot Rx interrupt and polling switch")
Cc: stable@dpdk.org

Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>
Acked-by: David Hunt <david.hunt@intel.com>
2018-01-15 18:40:10 +01:00
Stephen Hemminger
c53a5faf7e examples/l3fwd: set CLI back to Unix style
The l3fwd program became chatty, and the code looks cluttered in
recent versions. DPDK programs should try for Unix (not VMS) style
and not print messages for the options user selected. Also, errors should
be printed on stderr. To make it easier to find code matching error
messages; error strings should be placed in situ rather than saved
as string vaiables.

Fixes: 268888b5b0 ("examples/l3fwd: modularize")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-15 18:40:09 +01:00
Pavan Nikhilesh
0b0ceb98db examples/l2fwd: increase pktmbuf pool size
Make pktmbuf pool size a function of ports and lcores detected instead
of using constant 8192.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-01-15 18:40:08 +01:00
Prashant Bhole
bacbf5ac50 examples: remove unnecessary dev info queries
Removed rte_eth_dev_info_get() calls and declaration of
struct rte_eth_dev_info where info is not used anymore.

Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-15 12:15:09 +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
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
Jerin Jacob
08d3cb28e3 examples: use SPDX tag for Cavium copyright files
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-09 16:19:01 +01:00
Stephen Hemminger
e6227d1eda examples/load_balancer: remove unnecessary parenthesis
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-05 22:08:31 +01:00
Bruce Richardson
3998e2a072 examples: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for files
with only an Intel copyright on them.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-04 22:41:39 +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
Radu Nicolau
376ee1dee8 examples/ipsec-secgw: fix build with gcc 4.5.1
On SUSE11 with gcc 4.5.1 the following build error occurred,
most likely because of improper handling of annonymous unions:

examples/ipsec-secgw/ipsec.c:87:4 error:
	unknown field ‘ipsec’ specified in initializer

Fixes: ec17993a14 ("examples/ipsec-secgw: support security offload")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-11-10 02:48:33 +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
Bruce Richardson
015f9489c4 examples: remove dependency on PCI
All PCI functionality should be hidden from apps via the PCI bus driver,
the EAL and individual device drivers. Therefore remove the inclusion of
rte_pci.h from sample apps.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-11-07 21:55:36 +01:00
Bernard Iremonger
c044ffaa37 examples/flow_classify: fix fseek error handling
Check return value of fseek and exit if non zero.

Coverity issue: 143435
Fixes: bab16ddaf2 ("examples/flow_classify: add sample application")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
2017-11-07 09:13:44 +00:00
Guduri Prathyusha
01ac23460c examples/l3fwd: fix aliasing in port grouping
With -f-strict-aliasing enabled by default from -O2, gcc > 5.x gives
undefined behavior in port_groupx4 in ARM. 'pn' and 'pnum' are
two different pointers pointing to same chunk of memory and
with -f-strict-aliasing the pointers are assumed to be pointing to
different memory and compiler reorders instructions that depend on
pnum and pn. This breaks port grouping algorithm.

This patch eliminates the above problem by introducing a compiler
barrier between the instructions that depend on pnum, pn and lp.

Fixes: 569b290cdb ("examples/l3fwd: add NEON implementation")
Cc: stable@dpdk.org

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
2017-11-07 09:04:42 +00:00
Guduri Prathyusha
3a4475e51d examples/l3fwd: fix NEON instructions
To group consecutive packets with same destination port in bursts of 4
neon intrinsic data types dp1 and dp2 are calculated such that if
dst_port[]={a,b,c,d,e,f,g,h,i...} dp1 should contain: <a,b,c,d> and
dp2 should contain: <b,c,d,e> in the first iteration. dp1 should
be <e,f,g,h> and dp2 should be <f,g,h,i> in the next iteration.

Whereas the existing code incorrectly calculates dp1 as <d,e,f,g> from
second iteration.

This patch fixes the incorrect ARM NEON instructions on dp1.

Fixes: 569b290cdb ("examples/l3fwd: add NEON implementation")
Cc: stable@dpdk.org

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-11-07 08:50:57 +00:00
Jianbo Liu
9f8f40f795 examples/ip_pipeline: use crc32 in hash functions for arm64
Implement the same hash functions with crc32 on arm platform.

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-11-07 08:44:31 +00:00
Jianbo Liu
c5bc416be3 examples/ip_pipeline: avoid hash table create failure
Hash table function will check if the input bucket size is power of 2,
so the parameter should be rounded up before sending to the creating
function.

Signed-off-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-11-07 08:41:32 +00:00
Harry van Haaren
8d39d3e237 service: fix race in service on app lcore function
This commit fixes a possible race condition if an application
uses the service-cores infrastructure and the function to run
a service on an application lcore at the same time.

The fix is to change the num_mapped_cores variable to be an
atomic variable. This causes concurrent accesses by multiple
threads to a service using rte_service_run_iter_on_app_lcore()
to detect if another core is currently mapped to the service,
and refuses to run if it is not multi-thread safe.

The run iteration on app lcore function has two arguments, the
service id to run, and if atomics should be used to serialize access
to multi-thread unsafe services. This allows applications to choose
if they wish to use use the service-cores feature, or if they
take responsibility themselves for serializing invoking a service.
See doxygen documentation for more details.

Two unit tests were added to verify the behaviour of the
function to run a service on an application core, testing both
a multi-thread safe service, and a multi-thread unsafe service.

The doxygen API documentation for the function has been updated
to reflect the current and correct behaviour.

Fixes: e9139a32f6 ("service: add function to run on app lcore")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-11-07 01:42:04 +01:00
Santosh Shukla
c450937306 cryptodev: rename physical address type to IOVA
Renamed data type from phys_addr_t to rte_iova_t.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2017-11-06 22:44:26 +01:00
Thomas Monjalon
bfa9a8a460 mbuf: rename data address helpers to IOVA
The following inline functions and macros have been renamed to be
consistent with the IOVA wording:

rte_mbuf_data_dma_addr         -> rte_mbuf_data_iova
rte_mbuf_data_dma_addr_default -> rte_mbuf_data_iova_default
rte_pktmbuf_mtophys            -> rte_pktmbuf_iova
rte_pktmbuf_mtophys_offset     -> rte_pktmbuf_iova_offset

The deprecated functions and macros are kept to avoid breaking the API.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2017-11-06 22:44:26 +01:00
Thomas Monjalon
87cf4c6cca malloc: rename address mapping function to IOVA
The function rte_malloc_virt2phy() is renamed to rte_malloc_virt2iova().
The deprecated name is kept as an alias to avoid breaking the API.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2017-11-06 22:24:25 +01:00
Thomas Monjalon
4c00cfdc0e remove useless memzone includes
The memzone header is often included without good reason.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-11-06 22:12:08 +01:00
Thomas Monjalon
17715a5339 use macro to declare constructor functions
It is easier to find all constructor functions when they use
the same macros RTE_INIT or RTE_INIT_PRIO.

The macro definitions are moved from rte_eal.h to rte_common.h.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2017-11-06 21:56:07 +01:00
Xueming Li
0acd8ed333 examples/multi_process: fix received message length
Simple_mp example receives message size less than 64 chars while send
side accepts chars less than 128, this leads to different result when
sending text length larger than 64.
This patch uses same buffer length on both message pool and command
line.

Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
2017-10-27 01:23:48 +02:00
Pavan Nikhilesh
9773742710 examples/eventdev: use service library
Update the sample app eventdev_pipeline_sw_pmd to use service run iter for
event scheduling in case of sw eventdev.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-10-27 00:53:07 +02:00
Pavan Nikhilesh
13370a3877 eventdev: fix inconsistency in queue config
With the current scheme of event queue configuration the cfg schedule
type macros (RTE_EVENT_QUEUE_CFG_*_ONLY) are inconsistent with the
event schedule type (RTE_SCHED_TYPE_*) this requires unnecessary
conversion between the fastpath and slowpath API's while scheduling
events or configuring event queues.

This patch aims to fix such inconsistency by using event schedule
types (RTE_SCHED_TYPE_*) for event queue configuration.

This patch also fixes example/eventdev_pipeline_sw_pmd as it doesn't
convert RTE_EVENT_QUEUE_CFG_*_ONLY to RTE_SCHED_TYPE_* which leads to
improper events being enqueued to the eventdev.

Fixes: adb5d5486c ("examples/eventdev_pipeline_sw_pmd: add sample app")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-10-27 00:52:57 +02:00
Gaetan Rivet
c752998b5e pci: introduce library and driver
The PCI lib defines the types and methods allowing to use PCI elements.

The PCI bus implements a bus driver for PCI devices by constructing
rte_bus elements using the PCI lib.

Move the relevant code out of the EAL to its expected place.

Libraries, drivers, unit tests and applications are updated to use the
new rte_bus_pci.h header when necessary.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-10-26 23:17:31 +02:00
Radu Nicolau
1b028d5e81 examples/ipsec-secgw: fix build without security lib
Build fails when rte_security is disabled; make rte_security mandatory

Fixes: ec17993a14 ("examples/ipsec-secgw: support security offload")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Tested-by: David Marchand <david.marchand@6wind.com>
2017-10-26 22:33:22 +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
Pablo de Lara
f12a5b5b27 examples/l2fwd-crypto: fix physical address setting
For AEAD algorithms, the physical address for the digest
was being set incorrectly.

Fixes: 2661f4fbe9 ("examples/l2fwd-crypto: add AEAD parameters")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-10-25 18:11:01 +02:00
Aviad Yehezkel
2a41fb7c65 examples/ipsec-secgw: convert IV to big endian
According to rfc4106 the IV should be unique and can be implemented
as counter.
The changed was created because putting an analyzer on wire and
comparing packets generated by this application and Linux kernel.
Linux kernel sets IV as BE, so it is worth to do the same for
future debug / comparison.

Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
2017-10-25 18:11:01 +02:00
Aviad Yehezkel
4040126053 examples/ipsec-secgw: fix AAD length setting
Fixes: 501e9c226a ("examples/ipsec-secgw: add AEAD parameters")
Cc: stable@dpdk.org

Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-10-25 18:11:00 +02:00
Aviad Yehezkel
d00f38905c examples/ipsec-secgw: fix session creation
Search for session also with AEAD algorithms.

Fixes: 501e9c226a ("examples/ipsec-secgw: add AEAD parameters")
Cc: stable@dpdk.org

Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-10-25 18:11:00 +02:00
Aviad Yehezkel
15f81cbf65 examples/ipsec-secgw: fix crypto device mapping
AEAD algorithms were not being added in the mapping
between algorithms and crypto devices, only cipher and
authentication chained algorithms.

Fixes: 501e9c226a ("examples/ipsec-secgw: add AEAD parameters")
Cc: stable@dpdk.org

Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-10-25 18:11:00 +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
Radu Nicolau
065179e483 examples/ipsec_secgw: switch to new offload API
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-10-25 18:11:00 +02:00
Tomasz Duszynski
b43a81319b examples/ipsec-secgw: fix IPv6 payload length
IPv6 payload length header field should contain only the number of bytes
following the IPv6 header and not the entire packet size.

Fixes: f159e70b09 ("examples/ipsec-secgw: support transport mode")
Fixes: 906257e965 ("examples/ipsec-secgw: support IPv6")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-10-25 18:10:42 +02:00
Zhiyong Yang
e2cdfbd07c examples/l2fwd-crypto: fix port id type
Fix port id issues and keep variables related to port ids in
consistent data type definition "uint16_t".

Remove unnecessary cast in the meanwhile.

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

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-10-25 18:10:40 +02:00
Tomasz Duszynski
3417350e7f examples/ipsec-secgw: fix IP version check
Since new_ip and ip4 are overlapping buffers copying ip4 over new_ip
using memmove() might overwrite memory at ip4. This could happen if
following condition holds:

ip_hdr_len > sizeof(struct esp_hdr) + sa->iv_len

Thus using ip4 to check ip version is wrong as it might not contain
proper value.

Fixes: f159e70b09 ("examples/ipsec-secgw: support transport mode")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Reviewed-by: Aviad Yehezkel <aviadye@mellanox.com>
2017-10-25 18:10:32 +02:00
Jacek Piasecki
681459bf9c examples/vhost_scsi: fix product id string termination
Use snprintf instead strncpy to get safe null string termination.
There was possible to get not terminated string after strncpy operation.

Coverity issue: 158631
Fixes: db75c7af19 ("examples/vhost_scsi: introduce a new sample app")
Cc: stable@dpdk.org

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2017-10-25 12:16:51 +02:00
Tomasz Duszynski
1e02d735c1 examples/kni: check PCI info not NULL before reading
Since virtual devices, i.e mrvl net pmd, do not touch pci_dev
dereferencing it will cause segmentation fault as by default
it's set to NULL in rte_eth_dev_info_get().

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-25 00:03:20 +02:00
Jasvinder Singh
96b5077cfa examples/qos_sched: fix uninitialized config
Fix problem with uninitialized rx/tx deferred_start flags of the struct
rte_eth_rxconf/txconf by initializing with 0 value (deferred start of
the rx/tx queues is turned off). This setting allows device rx/tx
queues to start with rte_eth_dev_start().

Coverity issue: 194999, 195009
Fixes: de3cfa2c98 ("sched: initial import")
Cc: stable@dpdk.org

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2017-10-24 23:58:14 +02:00
David Hunt
4c897d23d0 examples/vm_power_manager: add turbo commands to help text
Fixes: d191f08533 ("examples/vm_power_manager: add per-core turbo CLI")

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
2017-10-24 23:50:55 +02:00
David Hunt
e4f66da347 examples/vm_power_manager: fix response time
A delay in the loop waiting for the virtio-serial commands in the
vm_power_manager app was causing a lag in the response time. This was
set to 1 second, and has now been changed to 1ms.

Fixes: f14791a812 ("examples/vm_power_mgr: add policy to channels")

Signed-off-by: David Hunt <david.hunt@intel.com>
2017-10-24 23:48:27 +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
Bernard Iremonger
bab16ddaf2 examples/flow_classify: add sample application
The flow_classify sample application exercises the following
librte_flow_classify API's:

rte_flow_classifier_create
rte_flow_classifier_query
rte_flow_classify_table_create
rte_flow_classify_table_entry_add
rte_flow_classify_table_entry_delete

It sets up the IPv4 ACL field definitions.
It creates table_acl and adds and deletes rules using the
librte_table API.

It uses a file of IPv4 five tuple rules for input.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
2017-10-24 22:26:54 +02:00
Cristian Dumitrescu
71afef2c14 apps: add mask-based hash functions
Introduce mask-based hash functions in hash_func.h.

Propagate their usage in test/test, test/test-pipeline and
examples/ip_pipeline.

Remove the non-mask-based hash function prototype from API (which
was previously used as build workaround).

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-10-24 13:10:08 +02:00
Cristian Dumitrescu
fc972a1305 table: rework 16-byte key hash tables
Rework for the 16-byte key hash tables (both the extendible
bucket and LRU)to use the mask-based hash function and the
unified parameter structure.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-10-24 13:09:12 +02:00
Cristian Dumitrescu
36842d0aee table: rework 8-byte key hash tables
Rework for the 8-byte key hash tables (both the extendible
bucket and LRU)to use the mask-based hash function and the
unified parameter structure.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-10-24 13:08:54 +02:00
Cristian Dumitrescu
6907931413 table: rework variable size key ext hash tables
Rework for the variable size key extendible bucket (EXT) hash
table to use the mask-based hash function and the unified
parameter structure.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-10-24 13:08:08 +02:00
Cristian Dumitrescu
2dc5198907 table: add unified params struct and mask-based hash func
Add unified parameter structure for all hash tables in librte_table.

Add mask-based hash function prototype, which is input parameter for
all hash tables.

Renamed the non-mask-based hash function prototype and all the calls
to it (to be removed later).

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-10-24 13:07:43 +02:00
Cristian Dumitrescu
14c1477ca6 table: remove deprecated variable size key ext hash tables
The non-dosig version of the variable size key extendible bucket
hash tables are removed. The remaining hash tables are renamed to
eliminate the dosig particle from their name.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-10-24 13:06:42 +02:00
Cristian Dumitrescu
092cbc3de6 table: remove deprecated 16-byte key hash tables
The non-dosig version of the 16-byte key hash tables (both extendable
bucket and LRU) are removed. The remaining hash tables are renamed to
eliminate the dosig particle from their name.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-10-24 13:06:25 +02:00
Cristian Dumitrescu
4f1c1fa142 table: remove deprecated 8-byte key hash tables
The non-dosig version of the 8-byte key hash tables (both extendable
bucket and LRU) are removed. The remaining hash tables are renamed to
eliminate the dosig particle from their name.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-10-24 13:05:51 +02:00
Cristian Dumitrescu
8524dcb91c apps: remove calls to deprecated hash tables
Removing calls to hash tables that are going to be removed later.

The calls are removed from test/test, test/test-pipeline,
examples/ip_pipeline.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-10-24 13:04:40 +02:00
Olivier Matz
cbc12b0a96 mk: do not generate LDLIBS from directory dependencies
The list of libraries in LDLIBS was generated from the DEPDIRS-xyz
variable. This is valid when the subdirectory name match the library
name, but it's not always the case, especially for PMDs.

The patches removes this feature and explicitly adds the proper
libraries in LDLIBS.

Some DEPDIRS-xyz variables become useless, remove them.

Reported-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
2017-10-24 02:14:57 +02:00
Slawomir Mrozowicz
c874523dc9 examples/performance-thread: fix out-of-bounds tls array
Overrunning array per_lcore_this_sched->current_lthread->tls->data of
1024 8-byte elements at element index 1024 using index k.
Fixed by correct check k condition.

Coverity issue: 143462, 143463
Fixes: 116819b9ed ("examples/performance-thread: add lthread subsystem")

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
2017-10-14 01:22:29 +02:00
Slawomir Mrozowicz
72481c87ec examples/performance-thread: fix out-of-bounds sched array
Overrunning array schedcore of 128 8-byte elements at element index 128
using index core id.
Fixed by correct check index lcoreid condition and
change type of lcoreid to unsigned.

Coverity issue: 143459, 143461
Fixes: 116819b9ed ("examples/performance-thread: add lthread subsystem")

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
2017-10-14 01:22:24 +02:00
Jacek Piasecki
842ee032e4 examples/performance-thread: check thread creation
There was a call for thread create function without result check.
Added result check and message printout after failure.

Coverity issue: 143441
Fixes: 433ba6228f ("examples/performance-thread: add pthread_shim app")

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
2017-10-14 01:22:23 +02:00
Ashish Jain
b325a66a46 examples/ip_reassembly: use pktmbuf to create mempool
Use 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 else
it may not work on implementation using the HW buffer pool

Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-10-14 01:03:20 +02:00
Gowrishankar Muthukrishnan
2193b7467f examples/l3fwd: optimize packet processing on powerpc
This patch adds altivec support for lpm packet processing in powerpc.

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
2017-10-14 00:51:19 +02:00
Tonghao Zhang
0671e432d7 examples/l3fwd-power: remove dead code
Signed-off-by: Tonghao Zhang <nic@opencloud.tech>
2017-10-14 00:47:36 +02:00
Kuba Kozak
ab9cfe43c2 examples/l3fwd-acl: check fseek return
Add return value check and error handling for fseek call.

Coverity issue: 143435
Fixes: 361b2e9559 ("acl: new sample l3fwd-acl")

Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
2017-10-14 00:38:35 +02:00
Xueming Li
9b85b871cc examples/l2fwd_fork: fix message pool init
Some invalid callback functions are provided to rte_pktmbuf_pool_init()
without their associated data causing a segmentation fault when the
function tries to use it. In this example, those callbacks are not
necessary, they can be safely replaced by NULL pointers.

Fixes: 95e8005a56 ("examples/l2fwd_fork: new app")
Cc: stable@dpdk.org

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
2017-10-14 00:36:12 +02:00
Vladimir Kuramshin
7a08b1d860 examples/l2fwd-cat: fix build with PQOS 1.4
Current version is compatible with PQOS version 1.3
but not compatible with higher versions. This change
makes l2fwd-cat example compatible with versions since 1.4

Signed-off-by: Vladimir Kuramshin <v.kuramshin@samsung.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-10-14 00:26:34 +02:00
Zhiyong Yang
47523597ff examples: fix port id type
Fixes: f8244c6399 ("ethdev: increase port id range")

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2017-10-13 21:57:49 +02:00
David Hunt
7abd801fbb examples/vm_power_manager: fix build
Remove variable declaration from within for loop.

Fixes: f14791a812 ("examples/vm_power_mgr: add policy to channels")

Signed-off-by: David Hunt <david.hunt@intel.com>
2017-10-13 15:35:18 +02:00
Luca Boccassi
f642036f3a mk: sort headers before wildcard inclusion
In order to achieve fully reproducible builds, always use the same
inclusion order for headers in the Makefiles.

Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-10-12 22:31:33 +02:00
Pablo de Lara
ff5d5b01f8 examples/l2fwd-crypto: support AES-CCM
According to the API, AES-CCM has special requirements
when setting IV and AAD fields.
The L2fwd-crypto app is updated to set the nonce (IV)
and AAD in the right positions in these two fields
(1 byte after start of IV field and 18 bytes after start
of AAD).

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2017-10-12 15:14:55 +01:00
Hemant Agrawal
4554462764 examples/l2fwd-crypto: fix uninitialized errno value
errno should be initialized to 0 before calling strtol

Fixes: 1df9c0109f ("examples/l2fwd-crypto: parse key parameters")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
2017-10-12 08:21:24 +01:00
David Hunt
c9a4779135 examples/vm_power_mgr: set MAC address of VF
We need to set vf mac from the host, so that they will be in sync on the
guest and the host. Otherwise, we'll have a random mac on the guest, and
a 00:00:00:00:00:00 mac on the host.

Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-10-12 00:47:07 +01:00
Rory Sexton
88a81aa43b examples/guest_cli: add send policy to host
Here we're adding an example of setting up a policy, and allowing the
vm_cli_guest app to send it to the host using the cli command
"send_policy now"

Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-10-12 00:46:50 +01:00
David Hunt
20c78ac9ee examples/vm_power_mgr: add port initialisation
We need to initialise the port's we're monitoring to be able to see
the throughput.

Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-10-12 00:45:32 +01:00
Rory Sexton
f14791a812 examples/vm_power_mgr: add policy to channels
Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-10-12 00:45:18 +01:00
David Hunt
7f472f7486 examples/vm_power_mgr: add scale to medium freq fn
Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-10-12 00:44:48 +01:00
David Hunt
dff22404aa examples/vm_power_mgr: add VCPU to PCPU mapping
Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-10-12 00:44:33 +01:00
Gage Eads
381acec2b1 eventdev: ease single-link queue config requirements
Events sent through single-link queues are naturally in-order and
atomic, without reordering or atomic scheduling. Logically the
nb_atomic_flows and nb_atomic_order_sequences arguments don't apply to a
single link queue, but applications must set these (depending on the queue
config type) to bypass the is_valid_{ordered, atomic}_queue_conf() checks
in the eventdev layer.

This commit updates those is_valid_* functions to ignore queues with the
SINGLE_LINK flag, to simplify their configuration.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-10-10 18:30:24 +02:00
Jianfeng Tan
a641f1f9d5 xen: remove dependency in applications
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-10-09 01:51:58 +02:00
Jianfeng Tan
1125122ca4 examples/vhost_xen: remove
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-10-09 01:06:39 +02:00
Zhiyong Yang
f8244c6399 ethdev: increase port id range
Extend port_id definition from uint8_t to uint16_t in lib and drivers
data structures, specifically rte_eth_dev_data. Modify the APIs,
drivers and app using port_id at the same time.

Fix some checkpatch issues from the original code and remove some
unnecessary cast operations.

release_17_11 and deprecation docs have been updated in this patch.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06 18:23:25 +02:00
David Hunt
d191f08533 examples/vm_power_manager: add per-core turbo CLI
Add extra commands to guest cli to allow enable/disable of
per-core turbo. Includes messages to vm_power_mgr in host.

Signed-off-by: David Hunt <david.hunt@intel.com>
2017-09-22 16:35:13 +02:00
David Hunt
567997b977 examples/vm_power_manager: add per-core turbo
Add extra commands to command line to allow enable/disable of
per-core turbo.

When a core has turbo enabled, calling for max frequency will allow it to
go to a turbo frequency (P0n).

When a core has turbo disabled, calling for max frequency will allow it to
go to the maximum non-turbo frequency (P1), but not beyond.

Signed-off-by: David Hunt <david.hunt@intel.com>
2017-09-22 16:35:12 +02:00
Harry van Haaren
0de21567d2 examples/eventdev: fix run forever with -n option
During the refactoring of the sample app to be more generic, the
option to set -n0 and process a huge number of packets was lost.
This commit re-adds -n0, and will process INT64_MAX number of packets.

Fixes: adb5d5486c ("examples/eventdev_pipeline_sw_pmd: add sample app")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-08-05 01:38:01 +02:00
Qi Zhang
5b9b65b14e examples/l3fwd: fix IPv6 packet type parse
Fix a typo that cause IPv6 packet type not be parsed.

Fixes: 71a7e2424e ("examples/l3fwd: fix using packet type blindly")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-08-05 01:38:01 +02:00
Pablo de Lara
8dbc9bbfe3 examples/l2fwd-crypto: fix possible out-of-bounds
rte_cryptodev_socket_id() returns the socket id of
a crypto device, unless the device id is not valid,
in which case, it returns -1.
This should not happen, as the device id is controlled
by the application, but just for safety, a check is added.

Coverity issue: 158628, 158638, 158656, 158662
Fixes: b3bbd9e5f2 ("cryptodev: support device independent sessions")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-07-31 22:46:36 +02:00
Hemant Agrawal
e481ebfd62 examples/qos_sched: fix build for less lcores
APP_MAX_LCORES is hardcoded as 64.
This will cause build err when RTE_MAX_LCORE is less then 64.

"args.c:127:22: error: iteration 8 invokes undefined behavior
	[-Werror=aggressive-loop-optimizations]
   if (cfg->lcore_role[i] == ROLE_RTE)
       ~~~~~~~~~~~~~~~^~~
args.c:126:2: note: within this loop
  for (i = 0; i < APP_MAX_LCORE; i++) {"

Fixes: d52b5e735a ("examples/qos_sched: fix lcore limit")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-21 17:36:29 +03:00
Hemant Agrawal
af35e12191 examples/load_balancer: fix build for less lcores
load_balancer app can also work for lower number of cores.
Limit the cores Worker and IO cores to 16 as defined in original
App. Otherwise use the actual number of lcores as MAX.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-07-21 17:36:20 +03: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
459369fc95 examples/l2fwd-crypto: fix AEAD key setting
AEAD key was being set using the cipher key parameters,
instead of the AEAD key parameters.

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

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-07-19 14:10:41 +03:00
Pablo de Lara
ef896e9217 examples/l2fwd-crypto: fix AEAD IV setting
IV was not being set for AEAD algorithms.

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

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-07-19 14:10:41 +03:00
Pablo de Lara
2c023071f6 examples/l2fwd-crypto: fix digest length
Digest length was not being set when using authentication
algorithms.

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

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-07-19 14:10:41 +03:00
Pablo de Lara
46a0547f9f cryptodev: rename ADD field
Additional Authenticated Data (AAD) is called "aad" in most
places of cryptodev, but it was called "add_auth_data"
in the AEAD transform transform (aead_xform).

This field is renamed to "aad_length" in order to keep
consistency.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-07-19 14:10:41 +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
Thomas Monjalon
b59069278b examples: remove duplicate includes
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2017-07-16 17:30:25 +02:00
Thomas Monjalon
17fd714e80 examples/ethtool: include PCI header directly
In devargs rework, rte_pci.h won't be included by rte_ethdev.h
(via rte_devargs.h) anymore.

rte_ethtool_get_drvinfo() could use rte_devargs.name instead of
creating equivalent bus specific name.
For now, it is workarounded by just including rte_pci.h.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2017-07-09 00:05:42 +02:00
Roman Zhukov
60efb44f73 examples: adjust Rx and Tx descriptors to device limits
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-07-08 18:47:00 +02:00
Jerin Jacob
3abcd29f2d update Cavium Inc copyright headers
Replace the incorrect reference to "Cavium Networks", "Cavium Ltd"
company name with correct the "Cavium, Inc" company name in
copyright headers.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-07-08 17:43:49 +02:00
Harry van Haaren
adb5d5486c examples/eventdev_pipeline_sw_pmd: add sample app
This commit adds a sample app for the eventdev library.
The app has been tested with DPDK 17.05-rc2, hence this
release (or later) is recommended.

The sample app showcases a pipeline processing use-case,
with event scheduling and processing defined per stage.
The application receives traffic as normal, with each
packet traversing the pipeline. Once the packet has
been processed by each of the pipeline stages, it is
transmitted again.

The app provides a framework to utilize cores for a single
role or multiple roles. Examples of roles are the RX core,
TX core, Scheduling core (in the case of the event/sw PMD),
and worker cores.

Various flags are available to configure numbers of stages,
cycles of work at each stage, type of scheduling, number of
worker cores, queue depths etc. For a full explaination,
please refer to the documentation.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-07-07 09:30:12 +02:00
Pablo de Lara
f7db6f821e cryptodev: add mempool pointer in queue pair setup
The session mempool pointer is needed in each queue pair,
if session-less operations are being handled.
Therefore, the API is changed to accept this parameter,
as the session mempool is created outside the
device configuration function, similar to what ethdev
does with the rx queues.

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>
2017-07-06 22:34:55 +02:00
Slawomir Mrozowicz
b3bbd9e5f2 cryptodev: support device independent sessions
Change crypto device's session management to make it
device independent and simplify architecture when session
is intended to be used on more than one device.

Sessions private data is agnostic to underlying device
by adding an indirection in the sessions private data
using the crypto driver identifier.
A single session can contain indirections to multiple device types.

New function rte_cryptodev_sym_session_init has been created,
to initialize the driver private session data per driver to be
used on a same session, and rte_cryptodev_sym_session_clear
to clear this data before calling rte_cryptodev_sym_session_free.

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
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>
2017-07-06 22:34:55 +02:00
Slawomir Mrozowicz
cdeaf42ad2 cryptodev: change attach session to queue pair API
Device id is going to be removed from session,
as the session will be device independent.
Therefore, the functions that attach/dettach a session
to a queue pair need to be updated, to accept the device id
as a parameter, apart from the queue pair id and the session.

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
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>
2017-07-06 22:34:55 +02:00
Slawomir Mrozowicz
2c59bd32b7 cryptodev: do not create session mempool internally
Instead of creating the session mempool while configuring
the crypto device, apps will create the mempool themselves.
This way, it gives flexibility to the user to have a single
mempool for all devices (as long as the objects are big
enough to contain the biggest private session size) or
separate mempools for different drivers.

Also, since the mempool is now created outside the
device configuration function, now it needs to be passed
through this function, which will be eventually passed
when setting up the queue pairs, as ethernet devices do.

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
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>
2017-07-06 22:34:55 +02:00
Pablo de Lara
c3e3f5cf0b cryptodev: remove unused cryptodev session structure
Cryptodev session structure was a duplication of the
cryptodev symmetric structure.
It was used by some PMDs that should use the symmetric
structure instead.

Since this structure was internal, there is no deprecation
notice required.

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>
2017-07-06 22:34:54 +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
4baea68dcc examples/l2fwd-crypto: avoid too many tabs
Some extra functions have been created to avoid
too many nested conditionals.

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
7f0034275a cryptodev: remove digest length from crypto op
Digest length was duplicated in the authentication transform
and the crypto operation structures.

Since digest length is not expected to change in a same
session, it is removed from the crypto operation.

Also, the length has been shrunk to 16 bits,
which should be sufficient for any digest.

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
12a4aaf1df cryptodev: remove AAD length from crypto op
Additional authenticated data (AAD) information was duplicated
in the authentication transform and in the crypto
operation structures.

Since AAD length is not meant to be changed in a same session,
it is removed from the crypto operation structure.

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
Pablo de Lara
0fbd75a99f cryptodev: move IV parameters to session
Since IV parameters (offset and length) should not
change for operations in the same session, these parameters
are moved to the crypto transform structure, so they will
be stored in the sessions.

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
Pablo de Lara
5082f991f6 cryptodev: pass IV as offset
Since IV now is copied after the crypto operation, in
its private size, IV can be passed only with offset
and length.

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
Pablo de Lara
dad71e9958 examples/ipsec-secgw: move IV to crypto op private data
Usually, IV will change for each crypto operation.
Therefore, instead of pointing at the same location,
IV is copied after each crypto operation.

This will let the IV to be passed as an offset from
the beginning of the crypto operation, instead of
a pointer.

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
Pablo de Lara
e636243e4d examples/l2fwd-crypto: move IV to crypto op private data
Usually, IV will change for each crypto operation.
Therefore, instead of pointing at the same location,
IV is copied after each crypto operation.

This will let the IV to be passed as an offset from
the beginning of the crypto operation, instead of
a pointer.

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
Pablo de Lara
d2a4223c4c cryptodev: do not store pointer to op specific params
Instead of storing a pointer to operation specific parameters,
such as symmetric crypto parameters, use a zero-length array,
to mark that these parameters will be stored after the
generic crypto operation structure, which was already assumed
in the code, reducing the memory footprint of the crypto operation.

Besides, it is always expected to have rte_crypto_op
and rte_crypto_sym_op (the only operation specific parameters
structure right now) to be together, as they are initialized
as a single object in the crypto operation pool.

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
Jianbo Liu
5df1c51033 examples/l3fwd: add loop count for hash multi-lookup
New macro to define how many times of hash lookup in one time, and this
makes the code more concise.

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-07-04 17:41:53 +02:00
Jianbo Liu
569b290cdb examples/l3fwd: add NEON implementation
Use ARM NEON intrinsics to accelerate l3 fowarding.

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-07-04 17:41:53 +02:00
Jianbo Liu
3a6827ed19 examples/l3fwd: rearrange LPM code
Some common code can be used by other ARCHs, move to l3fwd_lpm.c

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-07-04 17:41:53 +02:00
Jianbo Liu
66d8bc009c examples/l3fwd: extract common code from multi packet send
Keep x86 related code in l3fwd_sse.h, and move common code to
l3fwd_common.h, which will be used by other Archs.

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-07-04 17:41:53 +02:00
Jianbo Liu
677311d270 examples/l3fwd: rename file for sequential hash lookup
The l3fwd_em_sse.h is enabled by NO_HASH_LOOKUP_MULTI.
Renaming it because it's only for sequential hash lookup,
and doesn't include any x86 SSE instructions.

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-07-04 17:41:53 +02:00
Jianbo Liu
8ec858abe4 examples/l3fwd: reorganise multi hash lookup
Extract common code from l3fwd_em_hlm_sse.h, and add to the new file
l3fwd_em_hlm.h.

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-07-04 17:25:01 +02:00
Ashwin Sekhar T K
f9599fa054 examples/performance-thread: support ARM64
Updated Makefile to allow compilation for arm64 architecture.

Added necessary arm64 support for lthread.

Fixed minor compilation errors for arm64 compilation.

Tested the apps l3fwd-thread and lthread_pthread_shim on thunderx
and x86_64.

Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
2017-07-04 15:19:42 +02:00
Ashwin Sekhar T K
de88718f63 examples/performance-thread: reorganise arch code
Moved the architecture dependent stack set code to architecture
specific directory.

Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
2017-07-04 15:19:22 +02:00
Bruce Richardson
8152e00dce examples/performance-thread: remove non-SSE4 fallbacks
Since this example is for x86_64 platforms only, and since SSE4 is now a
mandatory requirement, we can remove the ifdefs checking for that
instruction set level, and the fallbacks if it is not present.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-07-04 14:39:18 +02:00
Bruce Richardson
193f9ec5c0 examples/l3fwd: remove checks for SSE4
Since SSE4 is now part of the minimum requirements for DPDK, we don't need
to check for its presence any more.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-07-04 14:39:18 +02:00
Bruce Richardson
a113713835 examples/ip_pipeline: remove macro check for SSE4
Since SSE4 is now part of the minimum requirements for DPDK, we don't need
to check for its presence any more.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-07-04 14:39:18 +02:00
Jerin Jacob
577329e66b eal: switch to architecture specific pause function
Remove rte_pause() definition from rte_common.h and
switchover to architecture specific rte_pause.h

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-07-03 23:58:51 +02:00
Bernard Iremonger
d6af1a13d7 ethdev: add return values to callback process API
Change the rte_eth_dev_callback_process function to return int,
and add a void *ret_param parameter.
The new parameter is used by ixgbe and i40e instead of abusing
the user data of the callback.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
2017-07-01 17:19:55 +02:00
Pablo de Lara
4eb45d2d4a examples/l2fwd-crypto: fix auth info display
Fixes: 4790f99d2d ("examples/l2fwd-crypto: use cryptodev algorithm parser")
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
Pablo de Lara
a3c2e34b7f examples/l2fwd-crypto: fix application help
Chain parameter can be CIPHER_HASH, HASH_CIPHER,
CIPHER_ONLY or HASH_ONLY, but only the first two
were shown in the application help.

Fixes: 1a75e9f3fa ("examples/l2fwd-crypto: add cipher/hash only cases")
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
Pablo de Lara
f1ae15bac8 examples/l2fwd-crypto: fix option parsing
Statistics period time option is parsed with -T argument,
but -t was accepted by mistake, instead.

Fixes: 387259bd6c ("examples/l2fwd-crypto: add sample application")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-06-28 19:59:22 +02:00
Jerin Jacob
98a7ea332b fix typos using codespell utility
Fixing typos across dpdk source code using codespell utility.
Skipped the ethdev driver's base code fixes to keep the base
code intact.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-06-14 23:54:13 +02:00
Jerin Jacob
c0583d98a9 eal: introduce macro for always inline
Different drivers use internal macros like force_inline for compiler
always inline feature.
Standardizing it through __rte_always_inline macro.

Verified the change by comparing the output binary file.
No difference found in the output binary file with this change.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-06-06 17:21:55 +02:00
Tiwei Bie
67064d6795 examples/exception_path: support FreeBSD
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-06-05 17:55:40 +02:00
Andrew Rybchenko
d432af7b5b examples/multi_process: remove unused variable
Fix broken build with -Werror=unused-but-set-variable

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-05 17:54:30 +02:00
Jerin Jacob
62a0e941b5 examples/vhost: fix uninitialized descriptor indexes
Fixing the below error by returning from the function early
when count == 0.

Issue flagged by GCC 7.1.1

examples/vhost/virtio_net.c:370:38: error: ‘desc_indexes[0]’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
  rte_prefetch0(&vr->desc[desc_indexes[0]]);

Fixes: ca059fa5e2 ("examples/vhost: demonstrate the new generic APIs")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2017-06-05 14:28:32 +02:00
Jerin Jacob
35f30466d6 examples/qos_sched: suppress gcc 7.1.1 warning
This one is more of a compiler issue as application
checks the app_parse_opt_vals() return value.

Since this code is in slow path, adding a memset
to fix following "maybe-uninitialized" warning.

qos_sched/args.c: In function ‘app_parse_args’:
examples/qos_sched/args.c:254:32: error: ‘vals[0]’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
pconf->rx_port = (uint8_t)vals[0];
                            ~~~~^~~

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-06-05 14:27:01 +02:00
Jerin Jacob
1122ba9aa1 examples/performance-thread: add fall-through comments
This fixes compiler warnings with GCC 7.1.1

Fixes: d48415e1fe ("examples/performance-thread: add l3fwd-thread app")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-06-05 14:26:57 +02:00
Jerin Jacob
663d3bc6d6 examples/l3fwd: add switch fall-through comments
This fixes compiler warnings with GCC 7.1.1

Fixes: 268888b5b0 ("examples/l3fwd: modularize")
Fixes: 94c54b4158 ("examples/l3fwd: rework exact-match")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-06-05 14:26:51 +02:00
Gang Jiang
fa81d3b970 examples/vhost: fix socket path parsing
The return value of strnlen(s, maxlen) is never bigger than maxlen.

Fixes: 4796ad63ba ("examples/vhost: import userspace vhost application")

Signed-off-by: Gang Jiang <jiangg@mail.ustc.edu.cn>
2017-05-10 19:05:59 +02:00
Wei Dai
232dc830f2 examples/performance-thread: remove useless include
There is no function to refer any part of execinfo.h, so remove the
reference to it.
And there is no this file in musl. So need to remove it to support musl.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-05-05 15:03:39 +02:00
Markos Chandras
939abaf96a examples/ethtool: fix link with ixgbe shared lib
When RTE_DEVEL_BUILD is unset, -rpath is unset.
So the ethtool app cannot link with ixgbe shared library
which is required by ethtool lib:

warning: librte_pmd_ixgbe.so.1, needed by
examples/ethtool/lib/x86_64-native-linuxapp-gcc/lib/librte_ethtool.so,
not found (try using -rpath or -rpath-link)

It is fixed by adding the library in the application link.

The library link is also improved to specify that this explicit link
to ixgbe is needed only in the shared lib mode.

Fixes: 077d223e25 ("examples/ethtool: use ixgbe public function")

Signed-off-by: Markos Chandras <mchandras@suse.de>
Acked-by: Remy Horton <remy.horton@intel.com>
Acked-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2017-05-01 22:03:37 +02:00
Andriy Berestovskyy
509f35d4c4 examples/load_balancer: fix Tx flush
Port ID is not an index from 0 to n_nic_ports, but rather a value
of nic_ports array.

Fixes: af75078fec ("first public release")

Signed-off-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
2017-05-01 18:18:29 +02:00
Pablo de Lara
4175729d01 examples/l3fwd-power: fix Rx descriptor size
L3fwd power app monitors the RX queues to see if the polling frequency
should be adjusted (the busier the queue, the higher the frequency).
The app uses several thresholds in the ring to determine the frequency,
being 96 the highest one, when frequency should be highest.

The problem is that the difference between this value and the ring size
is not big enough (128 - 96 = 32 descriptors), which means that
if the descriptors are not replenished quick enough, queue might
not be busy, but the app would think that it is, because 96th descriptor
is set.

Therefore, by increasing this gap (increasing the RX ring size),
we make sure that this false measurement will not happen.

Fixes: b451aa39db ("examples/l3fwd-power: use DD bit rather than RX queue count")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
2017-05-01 17:58:51 +02:00
Jingjing Wu
ddc554ad28 examples/l3fwd-power: fix handling no Rx queue
If the number of rx queues is zero, it is meaningless to enable
rx interrupt. This patch fixes it.

Fixes: aee3bc79cc ("examples/l3fwd-power: enable one-shot Rx interrupt and polling switch")
Cc: stable@dpdk.org

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-05-01 17:52:49 +02:00
Remy Horton
935439234b examples/l2fwd-keepalive: clean up shared mem on exit
This patch adds the unlinking/unmapping of shared host memory
on termination of l2fwd-keepalive. Previously it was only
cleaned on re-running of the example application.

Fixes: e64833f227 ("examples/l2fwd-keepalive: add sample application")

Signed-off-by: Remy Horton <remy.horton@intel.com>
Tested-by: Roman Korynkevych <romanx.korynkevych@intel.com>
2017-05-01 16:42:07 +02:00
Remy Horton
91e89e477e examples/l2fwd-keepalive: add graceful exit
The l2fwd-keepalive example has infinite processing loops and as a
result the only way to exit it is via SIGINT/SIGTERM (e.g. Control-C).
The resulting shutdown is unclean, which is fixed by adding a signal
handler that causes the processing loops to break.

Fixes: e64833f227 ("examples/l2fwd-keepalive: add sample application")

Signed-off-by: Remy Horton <remy.horton@intel.com>
Tested-by: Roman Korynkevych <romanx.korynkevych@intel.com>
2017-05-01 16:42:07 +02:00
Zhiyong Yang
ab69581b74 examples/multi_process: fix timer update
To miss updating the variable prev_tsc in function l2fwd_main_loop()
The patch fixes it.

Fixes: e2366e74e0 ("examples: use buffered Tx")
Cc: stable@dpdk.org

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2017-05-01 16:39:28 +02:00
Bruce Richardson
b7162fee88 examples/performance-thread: fix build on FreeBSD 10.0
While later releases in the FreeBSD 10 series have a CPU_COUNT macro
defined, FreeBSD 10.0 and 10.1 do not have this macro. Therefore we provide
a basic fallback implementation of the macro for platforms where it is not
defined.

Fixes: 433ba6228f ("examples/performance-thread: add pthread_shim app")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-05-01 16:10:03 +02:00
Pablo de Lara
d7acf6ba43 examples/l2fwd-crypto: fix packets array index
Fixes: c0f87eb525 ("cryptodev: change burst API to be crypto op oriented")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-28 17:46:19 +02:00
Bruce Richardson
1e6d5a9608 examples/performance-thread: fix compilation on Suse 11 SP2
Fixes following compilation error, using uint64_t type,
instead of int128_t unnecessarily:

In file included from ./common/lthread.c:82:0:
./common/lthread_timer.h: In function ‘_ns_to_clks’:
./common/lthread_timer.h:49:20: error: expected ‘=’, ‘,’, ‘;’,
 ‘asm’ or ‘__attribute__’ before ‘clkns’
compilation terminated due to -Wfatal-errors.

Fixes: 116819b9ed ("examples/performance-thread: add lthread subsystem")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-24 16:02:20 +02:00
Bruce Richardson
9aba2a3f3d examples/performance-thread: use a single build dir
When building any of the perf-thread examples, the output .o files were
placed in two separate directories for each app: the regular build dir and
a "common" build directory. This was due to the way the files to be built
were specified, using a relative path. Switching to use VPATH to find the
files causes Make to put all .o's into the one build directory.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-04-21 16:20:33 +02:00
Bruce Richardson
4cde45f36f examples/performance-thread: fix build on FreeBSD
This set of sample apps did not compile on FreeBSD due to use of a number
of Linux/glibc-specific APIs, or APIs which existed in different headers
on FreeBSD. Specifically, the following APIs has problems:
  * sched_getcpu() is a glibc extension, so use rte_lcore_id() on BSD
  * pthread_yield() returns int on Linux, but void on FreeBSD, so
    we have to create two slightly different copies of the function.
  * the type for managing cpu sets is cpuset_t on FreeBSD rather than
    cpu_set_t as on Linux, so use rte_cpuset_t from rte_lcore.h.
  * APIs for managing cpu affinity are in pthread_np.h on FreeBSD, rather
    than in pthread.h, also fixed by including rte_lcore.h

Fixes: 433ba6228f ("examples/performance-thread: add pthread_shim app")
Fixes: d48415e1fe ("examples/performance-thread: add l3fwd-thread app")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-04-21 16:20:16 +02:00
Bruce Richardson
b2f4f2e2a6 examples: fix build clean on FreeBSD
The "examples_clean" top-level build target calls "make clean" for each
individual example. However, for a number of those which were linux-only
examples, the "if" condition only had a dummy "all" target i.e. no "clean"
target, causing an error with examples_clean.

Fixes: 3417cd687e ("examples: ignore linux apps on bsd")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-04-21 16:19:54 +02:00
Hiroki Shirokura
4ae49092fb examples/performance-thread: support C++
Lthread is awesome but it doesn't support C++.
So I write patch to support lthread to support C++.
Added "extern C {}" to lthread-headers

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-21 02:39:05 +02:00
Qi Zhang
6fed57a3f4 examples/ethtool: disable promiscuous mode by default
Disable promiscuous mode by default since VLAN filter
does not work when promiscuous mode is enabled.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
2017-04-21 02:24:31 +02:00
Andriy Berestovskyy
5e470a6654 examples: limit max frame size
Some PMDs do not support 9,5K jumbo frames, so the example fails.
Limit the frame size to the maximum supported by the underlying NIC.

Signed-off-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
2017-04-21 02:21:29 +02:00
Andriy Berestovskyy
0469250961 examples/ip_pipeline: avoid panic if link up/down not supported
Some PMDs (mostly VFs) do not provide link up/down functionality.

Signed-off-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-04-21 02:15:12 +02:00
Andriy Berestovskyy
b58c9c3677 examples/ip_pipeline: support more than 32 CPUs
At the moment ip_pipeline example uses 32 during the initialization,
which leads to an error on systems with more than 32 CPUs.

Signed-off-by: Andriy Berestovskyy <andriy.berestovskyy@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-04-21 02:15:03 +02:00
Shyam Kumar Shrivastav
d5faec799c examples/ip_pipeline: fix port range filtering
Firewall ACL definition need to use same input index for source and
destination ports as these are 16 bits and would fit in one ACL
field of 32 bits. This is required as per librte_acl API. Without this
UDP/TCP source and destination ports filtering (and for that
matter ICMP type/code filtering) does not work.

Signed-off-by: Shyam Kumar Shrivastav <shrivastav.shyam@gmail.com>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-04-21 02:10:20 +02:00
Pablo de Lara
c64457cb11 examples/l2fwd-crypto: fix padding calculation
For padding calculation, it is necessary to know if algorithm
is a block cipher or stream cipher algorithm, and know the
block size for the algorithm.

In the application, this block size should be only the
cipher block size, but if authentication was used too,
it was being overwritten by the authentication block size,
which is not needed.

Fixes: 27cf2d1b18 ("examples/l2fwd-crypto: discover capabilities")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2017-04-20 11:32:45 +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
18f421f65b examples/l2fwd-crypto: fix AEAD tests when AAD is zero
For AEAD algorithms, additional authenticated data (AAD)
can be passed, but it is optional, so its size can be zero.
However, it is required to set this length to zero in the crypto
operation to avoid undefined behaviour.

Fixes: 617a7949c9 ("examples/l2fwd-crypto: parse AAD parameter")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2017-04-20 11:32:45 +02:00
Jeff Guo
60da774e6e examples: enable HW CRC strip by default
Since VF can not disable/enable HW CRC strip for non-DPDK PF drivers,
and kernel driver almost default enable that feature, if disable it in
example app's rxmode, VF driver will report the VF launch failure. So
this patch default to enable HW CRC strip to let VF launch successful.

Cc: stable@dpdk.org

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-10 22:36:37 +02:00
Bruce Richardson
a894e13ede examples: enable build of performance-thread
The performance-thread example was not build by default in the make
examples build target. It will compile ok for x86_64 targets so add it to
the examples makefile list for that platform.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-04-06 21:37:19 +02:00
Akhil Goyal
c5aa9617c0 examples/ipsec-secgw: attach session-qp
adding support for attaching session to queue pairs.
This is required as underlying crypto driver may only
support limited number of sessions per queue pair
if max_nb_sessions_per_qp > 0, session should be
attached to a particular qp.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-04-06 00:17:44 +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
Olivier Matz
4f0981e6ec eal: deprecate log functions
Deprecate the following functions:
- rte_set_log_level(), replaced by rte_log_set_global_level()
- rte_get_log_level(), replaced by rte_log_get_global_level()
- rte_set_log_type(), replaced by rte_log_set_level()
- rte_get_log_type(), replaced by rte_log_get_level()

The new functions provide a better control of the per-type log level,
and have a better name prefix (rte_log_).

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-05 13:48:40 +02:00
Yuanhan Liu
ca059fa5e2 examples/vhost: demonstrate the new generic APIs
Now DPDK vhost lib has been generic enough, that it can be used to
implement any vhost-user drivers.

For example, this patch implements a very simple vhost-user net driver,
mainly for demonstrating how to use those generic vhost APIs.

And when the --builtin-net-driver option is used, the example virtio-net
driver code will be invoked, instead of the one provided from the vhost
library.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-04-01 10:49:47 +02:00
Yuanhan Liu
a798beb47c vhost: rename header file
Rename "rte_virtio_net.h" to "rte_vhost.h", to not let it be virtio
net specific.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2017-04-01 10:42:44 +02:00
Yuanhan Liu
af14759181 vhost: introduce API to start a specific driver
We used to use rte_vhost_driver_session_start() to trigger the vhost-user
session. It takes no argument, thus it's a global trigger. And it could
be problematic.

The issue is, currently, rte_vhost_driver_register(path, flags) actually
tries to put it into the session loop (by fdset_add). However, it needs
a set of APIs to set a vhost-user driver properly:
  * rte_vhost_driver_register(path, flags);
  * rte_vhost_driver_set_features(path, features);
  * rte_vhost_driver_callback_register(path, vhost_device_ops);

If a new vhost-user driver is registered after the trigger (think OVS-DPDK
that could add a port dynamically from cmdline), the current code will
effectively starts the session for the new driver just after the first
API rte_vhost_driver_register() is invoked, leaving later calls taking
no effect at all.

To handle the case properly, this patch introduce a new API,
rte_vhost_driver_start(path), to trigger a specific vhost-user driver.
To do that, the rte_vhost_driver_register(path, flags) is simplified
to create the socket only and let rte_vhost_driver_start(path) to
actually put it into the session loop.

Meanwhile, the rte_vhost_driver_session_start is removed: we could hide
the session thread internally (create the thread if it has not been
created). This would also simplify the application.

NOTE: the API order in prog guide is slightly adjusted for showing the
correct invoke order.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2017-04-01 10:42:44 +02:00
Yuanhan Liu
7c12903746 vhost: rename device ops struct
rename "virtio_net_device_ops" to "vhost_device_ops", to not let it
be virtio-net specific.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2017-04-01 10:42:44 +02:00
Yuanhan Liu
aca49772f6 vhost: do not include net specific headers
Include it internally, at vhost.h.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2017-04-01 10:42:44 +02:00