Commit Graph

668 Commits

Author SHA1 Message Date
Bernard Iremonger
d76c19309a app/testpmd: stop forwarding on exit
Stop forwarding on exit whether all ports are started or not.

Fixes: ce8d561418 ("app/testpmd: add port configuration settings")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-16 10:20:29 +02:00
Bernard Iremonger
1e1d6bdd6d app/testpmd: check for valid mbuf pool
Fixes: b6ea6408fb ("ethdev: store numa_node per device")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-16 10:20:29 +02:00
Bernard Iremonger
931126baaf app/testpmd: check for valid socket id when attaching port
Fixes: edab33b1c0 ("app/testpmd: support port hotplug")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
2016-06-16 10:20:28 +02:00
Bernard Iremonger
edf87b4ad0 app/testpmd: move forward streams initialisation
Move call to init_fwd_streams from start_port function
to start_packet_forwarding function.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-16 10:20:28 +02:00
Bernard Iremonger
0c0db76f42 app/testpmd: separate forward config setup from display
Add call to fwd_config_setup to init_config.
Add call to fwd_config_setup for corelist, coremask and nbcore setup.
Add call to fwd_config_setup for portlist, portmask and nbport setup.
Add call to fwd_config_setup for rxq, txq, rxd and txd setup.
Remove fwd_config_setup from fwd_config_display.
Call the pkt_fwd_config_display function directly,
and remove the fwd_config_display wrapper function.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-16 10:19:29 +02:00
Bernard Iremonger
0e545d3047 app/testpmd: check stopping port is not in bonding
Add new function port_is_bonding_slave
Use this function in stop_port and close_port functions.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-16 10:19:29 +02:00
Bernard Iremonger
a8ef3e3a98 app/testpmd: check stopping port is not forwarding
Add calls to port_is_forwarding function in stop_port and
close_port functions to check that port is not forwarding.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-16 10:10:06 +02:00
Bernard Iremonger
ebf5e9b715 app/testpmd: do not update forwarding config
Do not update forwarding configuration when attaching or detaching a port
Remove checks on test_done variable.
Remove code to update forwarding configuration.

Fixes: edab33b1c0 ("app/testpmd: support port hotplug")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-16 10:10:06 +02:00
Olivier Matz
b37b528d95 mbuf: add new Rx flags for stripped VLAN
The behavior of PKT_RX_VLAN_PKT was not very well defined, resulting in
PMDs not advertising the same flags in similar conditions.

Following discussion in [1], introduce 2 new flags PKT_RX_VLAN_STRIPPED
and PKT_RX_QINQ_STRIPPED that are better defined:

  PKT_RX_VLAN_STRIPPED: a vlan has been stripped by the hardware and its
  tci is saved in mbuf->vlan_tci. This can only happen if vlan stripping
  is enabled in the RX configuration of the PMD.

For now, the old flag PKT_RX_VLAN_PKT is kept but marked as deprecated.
It should be removed from applications and PMDs in a future revision.

This patch also updates the drivers. For PKT_RX_VLAN_PKT:

- e1000, enic, i40e, mlx5, nfp, vmxnet3: done, PKT_RX_VLAN_PKT already
  had the same meaning than PKT_RX_VLAN_STRIPPED, minor update is
  required.
- fm10k: done, PKT_RX_VLAN_PKT already had the same meaning than
  PKT_RX_VLAN_STRIPPED, and vlan stripping is always enabled on fm10k.
- ixgbe: modification done (vector and normal), the old flag was set
  when a vlan was recognized, even if vlan stripping was disabled.
- the other drivers do not support vlan stripping.

For PKT_RX_QINQ_PKT, it was only supported on i40e, and the behavior was
already correct, so we can reuse the same bit value for
PKT_RX_QINQ_STRIPPED.

[1] http://dpdk.org/ml/archives/dev/2016-April/037837.html,

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2016-06-15 17:18:57 +02:00
Jan Viktorin
1dbba1650c app/test: remove real PCI ids
There are 2 new fake devices for testing PCI infra. All the fake devices
are now identified by non-existing vendor and device IDs so there is no
real driver to bind to them. The testing drivers match those IDs.

Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-15 15:54:44 +02:00
Thomas Monjalon
18aa32725e config: make libarchive optional
The commit 66819e6 has introduced a dependency on libarchive to be able
to use some tar resources in the unit tests.
It is now an optional dependency because some systems do not have it
installed.

If CONFIG_RTE_APP_TEST_RESOURCE_TAR is disabled, the PCI test will not
be run. When a "configure" script will be integrated, the libarchive
availability could be checked to automatically enable the option.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-14 15:31:26 +02:00
David Hunt
3a4c1dc58b app/test: fix wraparound of mempool performance rate
Recent CPU's can easily wrap around a 32-bit unsigned int in
the mempool perf test. Increase to a 64-bit uint.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-06-13 22:22:15 +02:00
Michal Jastrzebski
0920029bd7 app/test: fix bond device name too long
Bond device name was too long (grather than 32 signs) that
cause mempool allocation to fail.

Fixes: 92073ef961 ("bond: unit tests")

Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Tested-by: Huilong Xu <huilongx.xu@intel.com>
2016-06-13 22:14:10 +02:00
Tomasz Kulasek
393c891ff1 app/test: fix array overflow warning with gcc 4.5
app/test/test_cryptodev.c:
In function ‘create_snow3g_cipher_operation_oop.clone.15’:
x86_64-native-linuxapp-gcc/include/rte_memcpy.h:796:14
error: array subscript is above array bounds.

In test_cryptodev.c:
2429	rte_memcpy(sym_op->cipher.iv.data, iv, iv_len);

When iv_len is declared as 'unsigned int', rte_memcpy evaluates code for
buffer size bigger than 255, but while 'iv' array is 64 bytes long, it
causes 'above array bounds' warning in gcc 4.5 and breaks compilation.

Using uint8_t as a size of copied block prevents to evaluate in rte_memcpy
code for length bigger than 255, causing the problem.

The root of this issue and solution is the same as for commit 2c007ea106
("app/test: fix array overflow warning with gcc 4.5")

Fixes: 9727af14b0 ("app/test: add out-of-place symmetric crypto operations")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
2016-06-13 21:57:36 +02:00
Tomasz Kantecki
517b81d164 app/test: reduce duration of red functional test
'red_autotest' changed to run only functional tests without test #4 which was
taking ~53 seconds. 'red_autotest' takes ~2[s] now.
'red_perf' has been added to run performance tests only).
'red_all' has been added to run all functional tests (including #4) and
perfromance tests. This reflects current 'red_autotest' behavior.

Other changes:
- machine TSC clock frequency detection takes place only once now.
- timeouts and number of iterations in functional tests have been reduced
  in order to shorten test duration.

Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
2016-06-13 21:29:15 +02:00
Jan Viktorin
4beab17005 app/test: do not dump devices in PCI blacklist test
Dumping of devices in a unittest is useless. Instead, test whether
the test has been set up well - i.e. there are no devices.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-13 21:08:48 +02:00
Jan Viktorin
53c3c30c11 pci: allow to override sysfs path
The SYSFS_PCI_DEVICES is a constant that makes the PCI testing
difficult as it points to an absolute path. We remove using this
constant and introducing a function pci_get_sysfs_path that gives
the same value. However, the user can pass a SYSFS_PCI_DEVICES env
variable to override the path. It is now possible to create a fake
sysfs hierarchy for testing.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-13 21:08:48 +02:00
Jan Viktorin
ceabf73721 app/test: rename PCI blacklist test case
The current test_pci is just a single test case that tests the
blacklisting of devices. Rename it to test_pci_blacklist and call it
from the test_pci. The setup and cleanup are moved out of the
test_pci_blacklist entirely to cover all other tests.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-13 20:58:03 +02:00
Jan Viktorin
4090205953 app/test: extract PCI setup and cleanup functions
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-13 20:57:28 +02:00
Jan Viktorin
56a6e9c457 app/test: use linked list to store PCI drivers
The test unregisters all drivers before start. The drivers were stored
into a fixed-sized array. This is inflexible. This patch change this to
utilize a linked list for the same purpose.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-13 20:57:15 +02:00
Jan Viktorin
66819e6c11 app/test: support resources archived by tar
When a more complex resource (a file hierarchy) is needed, packing
every single file as a single resource would be very ineffective. For
that purpose, it is possible to pack the files into a tar archive,
extract it before test from the resource and finally clean up all the
created files.

This patch introduces functions resource_untar and resource_rm_by_tar
to perform those tasks. An example of using those functions is included
as a test.

A new dependency is required to build the app/test: libarchive.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-13 20:57:06 +02:00
Jan Viktorin
115cc1150d app/test: create files from resources
A resource can be written into the target filesystem by calling
resource_fwrite or resource_fwrite_file. Such file can be created
before a test is started and removed after the test finishes.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-13 20:56:53 +02:00
Jan Viktorin
ab64f5df80 app/test: support resources externally linked
To include resources from other source that the C source code we
can take advantage of the objcopy behaviour, i.e. packing of an
arbitrary file as an object file that is linked to the target program.

A linked object file is always accessible as a pair

extern const char beg_<name>;
extern const char end_<name>;
(extern const char siz_<name>;)

A unit test that packs the resource.c source file is included.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-13 20:56:48 +02:00
Jan Viktorin
fe6923cbfd app/test: introduce resources for tests
Certain internal mechanisms of DPDK access different file system
structures (e.g. /sys/bus/pci/devices). It is difficult to test
those cases automatically by a unit test when such path is not
hard-coded and there is no simple way how to distribute fake ones
with the current testing environment.

This patch adds a possibility to declare a resource embedded in
the test binary itself. The structure resource cover the generic
situation - it provides a name for lookup and pointers to the
embedded data blob. A resource is registered in a constructor by
the macro REGISTER_RESOURCE.

Some initial tests of simple resources is included and added into
the group_1.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
2016-06-13 20:56:42 +02:00
Thomas Monjalon
a3f34a98b7 log: deprecate history dump
The log history uses rte_mempool. In order to remove the mempool
dependency in EAL (and improve the build), this feature is deprecated.
The ABI is kept but the behaviour is now voided because it seems this
function was not used. The history can be read from syslog.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2016-06-10 15:08:57 +02:00
Pablo de Lara
b38bb262a4 app/testpmd: fix typo when closing port
Fixes: ce8d561418 ("app/testpmd: add port configuration settings")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-08 22:38:53 +02:00
Jerin Jacob
7fdb263bbb app/testpmd: prefetch data in the forwarding loop
prefetch the next packet data address in advance in forwarding loop
for performance improvement.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-08 22:38:53 +02:00
Olivier Matz
d1eb542e05 app/testpmd: log mbuf pool creation
Enhance the logs related to mbuf pool creation. Display an info level
log when creating the mbuf, and display the error as a string on failure.

After the patch, we have:

  [...]
  EAL:   probe driver: 8086:10fb rte_ixgbe_pmd
  USER1: create a new mbuf pool <mbuf_pool_socket_0>: n=331456, \
      size=2176, socket=0
  EAL: Error - exiting with code: 1
    Cause: Creation of mbuf pool for socket 0 failed: Cannot allocate \
      memory

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-08 22:38:53 +02:00
Maciej Czekaj
faac4bff87 app/testpmd: add Tx flags in config command
"port config all txqflags <value>" allows for
specifying txq_flags value in command line.

Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-08 22:38:53 +02:00
Maciej Czekaj
7903072cac app/testpmd: add scatter enabling in config command
"port config all scatter on|off" allows for
controlling rxmode.enable_scatter in command line.

Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-08 22:38:52 +02:00
Maciej Czekaj
0499793854 app/testpmd: add scatter enabling option
This parameter allows for controlling rxmode.enable_scatter
which in turn allow for multi-segment packet receive tests.

Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-08 22:38:52 +02:00
Fan Zhang
ac61e23393 aesni_mb: add AES-CTR
This patch provides counter mode support to AES-NI multi-buffer library.

The following cipher algorithm is enabled:
- RTE_CRYPTO_CIPHER_AES_CTR

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-06-07 21:46:55 +02:00
Arek Kusztal
c11f708cd7 app/test: add AES-CTR
Added tests cases for AES working in counter mode.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2016-06-07 21:36:08 +02:00
Jerin Jacob
52b50e8a6b mk: fix cross-compilation
Removed comparison against $CC in Makefiles as
in cross-compiling mode CC can be a different string
instead of string "gcc"

Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2016-06-07 10:02:39 +02:00
Jan Viktorin
c8c33ad7f9 app/test: fix buffer overflow
A bug has been detected by valgrind:

Invalid write of size 1
   by 0x86ECC76: sprintf (in /usr/lib/libc-2.23.so)
   by 0x430B0A: commands_init (in build/app/test)
   by 0x42F215: main (in build/app/test)
 Address 0x9d72ff2 is 0 bytes after a block of size 1,346 alloc'd
   at 0x78C1BD0: malloc (in vgpreload_memcheck-amd64-linux.so)
   by 0x430AE4: commands_init (in build/app/test)
   by 0x42F215: main (in build/app/test)

The commands buffer is exactly 1346 B long so there is an access just
after the buffer. The sprintf always writes '\0' at the end of the string.
The '#' separator adds 1 B more to each string. This is correct until the
last string is sprinted there. The last one is 1 B longer then expected,
i.e.:
      strlen(t->command) + strlen("#") + ONE_FOR_ZERO

Fixes: 727909c592 ("app/test: introduce dynamic commands list")

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Acked-by: David Marchand <david.marchand@6wind.com>
2016-05-25 10:34:58 +02:00
Thomas Monjalon
d198f18b14 app/test: move cycles autotest to first group
The cycles test was wrongly in the group of mempool perf test.
It is moved in parallel test group 1 with timer test.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-05-24 17:00:56 +02:00
Thomas Monjalon
837b33a4c0 app/test: remove unused constants
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-05-24 17:00:56 +02:00
Thomas Monjalon
6e2ba6dd4b app/test: reduce memory needs
Adjust memory parameter (--socket-mem) of the autotests
to be able to make fast_test in a constrained environment (e.g. a VM).

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-05-24 17:00:56 +02:00
Thomas Monjalon
775a8cfc46 app/test: shorten execution time
The autotests are too long to be run often.
This patch reduces the needed time of some tests in fast_test.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-05-24 17:00:55 +02:00
Thomas Monjalon
62dac65a32 app/test: isolate lpm performance cases
The LPM performance tests should not be mixed with
functional tests: they are long and show some statistics.

LPM6 functional tests are added to parallel tests.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-05-24 17:00:55 +02:00
Thomas Monjalon
fb847267ba app/test: fix log check when default level is high
The log unit test was checking display of low priority messages.
It was not working if RTE_LOG_LEVEL is not RTE_LOG_DEBUG.
It is even easier to see since the default level is INFO (9b9d7ca).

Now the test use ERR and CRIT levels which should be always enabled
while not trigerring syslog output on the console.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-05-24 17:00:55 +02:00
Olivier Matz
8ef772aee0 app/test: rework mempool test
Rework the mempool test to better indicate where it failed,
and, now that this feature is available, add the freeing of the
mempool after the test is done.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-05-19 14:40:14 +02:00
Olivier Matz
85cf00791c mem: avoid memzone/mempool/ring name truncation
Check the return value of snprintf to ensure that the name of
the object is not truncated.

By the way, update the test to avoid to trigger an error in
that case.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-05-19 14:40:14 +02:00
Olivier Matz
b19a0c75a0 app/testpmd: remove anonymous mempool code
Now that mempool library provide functions to populate with anonymous
mmap'd memory, we can remove this specific code from test-pmd.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-05-19 14:40:14 +02:00
Olivier Matz
84121f1971 mempool: store memory chunks in a list
Do not use paddr table to store the mempool memory chunks.
This will allow to have several chunks with different virtual addresses.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-05-19 14:40:13 +02:00
Olivier Matz
a2ccd6b742 mempool: remove macro to check if contiguous
This commit removes MEMPOOL_IS_CONTIG().

The next commits will change the behavior of the mempool library so that
the objects will never be allocated in the same memzone than the mempool
header. Therefore, there is no reason to keep this macro that would
always return 0.

This macro was only used in app/test.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-05-19 14:40:13 +02:00
Olivier Matz
f49e858580 mempool: rename object constructor typedef
This commit renames mempool_obj_ctor_t as mempool_obj_cb_t.

In next commits, we will add the ability to populate the
mempool and iterate through objects using the same function.
We will use the same callback type for that. As the callback is
not a constructor anymore, rename it into rte_mempool_obj_cb_t.

The rte_mempool_obj_iter_t that was used to iterate over objects
will be removed in next commits.

No functional change.
In this commit, the API is preserved through a compat typedef.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-05-19 14:40:12 +02:00
Hiroyuki Mikita
49e29ac2cb mbuf: decrease reference counter when detaching
The rte_pktmbuf_detach() function should decrease refcnt on a direct
buffer as stated in doc/guides/prog_guide/mbuf_lib.rst:
"whenever the indirect buffer is detached, the reference counter on the
direct buffer is decremented."

Signed-off-by: Hiroyuki Mikita <h.mikita89@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-05-19 14:40:12 +02:00
Keith Wiles
213af31e09 mempool: reduce structure size if no cache needed
The rte_mempool structure is changed, which will cause an ABI change
for this structure. Providing backward compat is not reasonable
here as this structure is used in multiple defines/inlines.

Allow mempool cache support to be dynamic depending on if the
mempool being created needs cache support. Saves about 1.5M of
memory used by the rte_mempool structure.

Allocating small mempools which do not require cache can consume
larges amounts of memory if you have a number of these mempools.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-05-17 08:31:33 +02:00
Olivier Matz
fbfd99551c mbuf: add raw allocation function
Many drivers provide their own implementation of rte_mbuf_raw_alloc(),
duplicating the code. Introduce a new public function in rte_mbuf to
allocate a raw mbuf (uninitialized).

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-05-17 08:31:33 +02:00
Mauricio Vasquez B
b4e0f64ff2 examples: remove useless check of port count
The rte_eth_dev_count() function will never return a value greater
than RTE_MAX_ETHPORTS, so that checking is useless.

Signed-off-by: Mauricio Vasquez B <mauricio.vasquezbernal@studenti.polito.it>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2016-05-16 21:01:51 +02:00
Piotr Azarewicz
5230903b72 cmdline: add any multi string mode to token string
While parsing token string there may be several modes:
- fixed single string
- multi-choice single string
- any single string

This patch add one more mode - any multi string.

Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-05-02 15:31:16 +02:00
Tomasz Kulasek
331c617bfb app/testpmd: fix string overrun in engines listing
CID 13307 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)
fixed_size_dest: You might overrun the 128 byte fixed-size string fwd_modes
by copying fwd_eng->fwd_mode_name without checking the length.

Fixes: 769ce6b178 ("app/testpmd: list forwarding engines")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
2016-04-27 17:41:47 +02:00
Daniel Mrzyglod
1ef6012ec1 acl: fix division by float zero in test app
Fix issue reported by Coverity.
Coverity ID 13240

This could cause an immediate crash or incorrect computation.

In search_ip5tuples: An expression which may be zero is used
as a divisor in floating-point arithmetic.

divide_by_zero: In expression (long double)tm / pkt,
division by expression pkt which may be zero has undefined behavior.

Fixes: 26c057ab6c ("acl: new test-acl application")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2016-04-27 17:41:46 +02:00
Thomas Monjalon
656ecbe93c hash: remove aliases for bulk lookup
The function rte_hash_lookup_multi() was renamed rte_hash_lookup_bulk()
in DPDK 1.4 and was kept as an undocumented alias.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-20 13:49:36 +02:00
Christian Ehrhardt
bece7b6cf6 app/testpmd: fix running without Xen whereas enabled
With LIBRTE_PMD_XENVIRT enabled testpmd is built in a way to ONLY work
in XEN environments.
It will surface as:
   PMD: gntalloc: ioctl error
   EAL: Error - exiting with code: 1
     Cause: Creation of mbuf pool for socket 0 failed

With LIBRTE_PMD_XENVIRT enabled this now tries the xen style grant
table allocation, but falls back gracefully for the normal allocation.

The only thing left in the log will be the
   PMD: gntalloc: ioctl error

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2016-04-11 16:44:15 +02:00
Olivier Matz
411c22d4e0 app/test: fix memory corruption in reentrancy autotest
The mempool element size is set to 0, but 4 bytes are written in
my_obj_init():

  uint32_t *objnum = obj;
  memset(obj, 0, mp->elt_size);
  *objnum = i;

Change the MEMPOOL_ELT_SIZE constant to sizeof(uint32_t). This fixes
memory corruptions since we were writing outside of the object
boundaries.

Fixes: 104a92bd02 ("app: add reentrancy tests")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-04-11 12:13:16 +02:00
Tomasz Kulasek
2c007ea106 app/test: fix array overflow warning with gcc 4.5
DPDK/app/test/test_cryptodev.c:
	In function 'test_snow3g_encrypted_authentication.clone.3':
DPDK/x86_64-ivshmem-linuxapp-gcc/include/rte_memcpy.h:796:14: error:
	array subscript is above array bounds

In lines like:
    rte_memcpy(sym_op->cipher.iv.data, iv, iv_len);
when "iv" is 64 bytes long array, and "iv_len" is "unsigned int",
compiler tries to evaluate also a code for array size larger than 255 bytes
long and reports error "array subscript is above array bounds" in line:
	rte_memcpy.h:796
    rte_mov128((uint8_t *)dst + 128, (const uint8_t *)src + 128);
caused by evaluation to:
    rte_mov128((uint8_t *)sym_op->cipher.iv.data + 128, (const uint8_t *)iv
			+ 128);
where "iv" is 64 bytes long buffer and "iv + 128" point out of it, gcc 4.5.

Using uint8_t as a size of copied block prevents to evaluate in rte_memcpy
code for length bigger than 255, causing the problem.

Fixes: 8bdf665fe6 ("app/test: add SNOW 3G")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-04-07 19:52:07 +02:00
Olivier Matz
a7e88f1782 app/test: fix reentrancy autotest
The previous code in func_reentrancy autotest was doing in parallel
something close to:

  name = "common_name";
  do several times {
      obj = allocate_an_object(name)   // obj = ring, mempool, hash, lpm, ...
      if (obj == NULL && lookup(name) == NULL)
          return TEST_FAIL;
  }

This code is not safe. For instance:

   mempool_create() is called on core 0, it creates a ring. At the same
   time on core 1, mempool_create() is called too and the creation of the
   ring fails (EEXIST). But the mempool lookup can fail on core 1 if
   the mempool is not added in the list by core 0.

This commit fixes the func_reentrancy autotest that now works with all
tested class of objects.

Fixes: 104a92bd02 ("app: add reentrancy tests")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-04-06 17:30:51 +02:00
Olivier Matz
1aadacb5b0 hash: fix allocation of an existing object
Change rte_hash*_create() functions to return NULL and set rte_errno to
EEXIST when the object name already exists. This is the behavior
described in the API documentation in the header file.

These functions were returning a pointer to the existing object in that
case, but it is a problem as the caller did not know if the object had
to be freed or not.

Doing this change also makes the hash API more consistent with the other
APIs (mempool, rings, ...).

Fixes: 916e4f4f4e ("memory: fix for multi process support")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-04-06 17:30:48 +02:00
Olivier Matz
f82f705b63 lpm: fix allocation of an existing object
Change rte_lpm*_create() functions to return NULL and set rte_errno to
EEXIST when the object name already exists. This is the behavior
described in the API documentation in the header file.

These functions were returning a pointer to the existing object in that
case, but it is a problem as the caller did not know if the object had
to be freed or not.

Doing this change also makes the lpm API more consistent with the other
APIs (mempool, rings, ...).

Fixes: 916e4f4f4e ("memory: fix for multi process support")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-04-06 17:30:06 +02:00
Olivier Matz
62a6588f2a app/test: increase memory for group 2
The hash test (located in group_2) may require more than 64MB of memory,
especially if the memory is physically fragmented, making the test to
fail. So increase the memory to 128MB to avoid this issue.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-04-06 12:10:05 +02:00
Olivier Matz
61017c01e4 app/test: fix EAL flags check
Since commit a88ba49e51, values larger than 4 are allowed,
the autotests need to be updated accordingly.

Fixes: a88ba49e51 ("config: fix CPU and memory parameters on IBM POWER8")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-04-06 12:02:09 +02:00
Thomas Monjalon
b2feed01d6 ethdev: add 100G link speed
The link speed configuration is now done with bitmaps so 100G speed
requires only a new bit flag.
The actual link speed is a number so its size must be increased from
16-bit to 32-bit.

Signed-off-by: Marc Sune <marcdevel@gmail.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Tested-by: Matej Vido <vido@cesnet.cz>
2016-04-01 21:38:34 +02:00
Marc Sune
82113036e4 ethdev: redesign link speed config
This patch redesigns the API to set the link speed/s configuration
of an ethernet port. Specifically:

- it allows to define a set of advertised speeds for
  auto-negociation.
- it allows to disable link auto-negociation (single fixed speed).
- default: auto-negociate all supported speeds.

A flag autoneg in struct rte_eth_link indicates if link speed was a
result of auto-negociation or was fixed by configuration.

Signed-off-by: Marc Sune <marcdevel@gmail.com>
Tested-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Tested-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2016-04-01 21:38:34 +02:00
Marc Sune
39fd068a27 ethdev: rename link speed constants
The speed numbers ETH_LINK_SPEED_ are renamed ETH_SPEED_NUM_.
The prefix ETH_LINK_SPEED_ is kept for AUTONEG and will be used
for bit flags in next patch.

Signed-off-by: Marc Sune <marcdevel@gmail.com>
2016-04-01 21:38:34 +02:00
Marc Sune
88fbedcd5e app/testpmd: move speed and duplex parsing in a function
The code for checking and parsing speed/duplex was duplicated.
The new function is also checking the speed/duplex combination.

Signed-off-by: Marc Sune <marcdevel@gmail.com>
2016-04-01 21:38:34 +02:00
Thomas Monjalon
09419f235e ethdev: use constants for link state
Define and use ETH_LINK_UP and ETH_LINK_DOWN where appropriate.

Signed-off-by: Marc Sune <marcdevel@gmail.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-04-01 21:38:34 +02:00
Arek Kusztal
9727af14b0 app/test: add out-of-place symmetric crypto operations
Added AES and snow3g Authenticated encryption and decryption tests
for out-of-place operations.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: John Griffin <john.griffin@intel.com>
2016-03-31 21:49:26 +02:00
Aaron Conole
29815f5a23 app/test: fix missing brackets
The test application calls printf(...) with the suite->suite_name argument.
The intent (based on whitespace) in the printf is to check suite->suite_name
first and then apply the printf. This doesn't happen due to missing brackets.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2016-03-31 17:09:23 +02:00
Marvin Liu
edc845bd53 app/testpmd: fix build on FreeBSD
Build log:
/root/dpdk/app/test-pmd/cmdline.c:6687:45: error: no member named
's6_addr32' in 'struct in6_addr'
    rte_be_to_cpu_32(res->ip_value.addr.ipv6.s6_addr32[i]);

This is caused by macro "s6_addr32" not defined on FreeBSD and testpmd
swap big endian parameter to host endian. Move the swap action to i40e
ethdev will fix this issue.

Fixes: 7b1312891b ("ethdev: add IP in GRE tunnel")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
2016-03-25 19:52:59 +01:00
Jingjing Wu
01c5e0044f app/testpmd: add VLAN in flow director input set
This patch extends the commands for changing flow director filter's input
set. It adds vlan as a possible filter input field.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2016-03-25 19:01:38 +01:00
Jingjing Wu
28d62131a1 app/testpmd: extend flow director input set commands
This patch extends commands for changing a flow director filter's input
set. It adds tos, protocol and ttl as filter's input fields, and removes
the words selection from flex payloads.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
2016-03-25 19:01:38 +01:00
Olivier Matz
a690da8df4 app/test: fix check for virtual ring device
This test expects that a vdev is instanciated on the command
line. If it's not the case, just skip this part.

Fixes: 4ea3801b32 ("app/test: fix ring unit test")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-03-24 21:12:45 +01:00
Olivier Matz
f632ff17a6 app/test: display command line when starting
It's useful for debug purposes to see the command line used by
autotest.py.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-03-24 21:12:45 +01:00
Daniel Mrzyglod
281948b475 mk: fix missing librt dependencies
For GLIBC < 2.17 it is necessery to add -lrt for linker
from glibc > 2.17 The `clock_*' suite of functions (declared in <time.h>) is now
available directly in the main C library. This affect Ubuntu 12.04 in i686
and other older Linux Distros).

Fixes: 4758404a30 ("mk: fix eal shared library dependencies")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
2016-03-22 20:46:53 +01:00
Tomasz Kulasek
a85ad367ac app/testpmd: fix build with icc
This patch fixes error #188: enumerated type mixed with another type,
when uint32_t is casted on enum type in icc.

Fixes: 05f1b9c82e ("app/testpmd: add commands for L2 tunnel config")

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
2016-03-22 18:12:33 +01:00
Igor Ryzhov
86057c9992 ethdev: remove missed packets from error counter
Comment for "ierrors" counter says that it counts erroneous received
packets. But for some reason "imissed" counter is added to "ierrors"
counter in most drivers.
It is a mistake, because missed packets are obviously not received.
This patch fixes it.

Fixes: 70bdb18657 ("ethdev: add Rx error counters for missed, badcrc and badlen packets")
Fixes: 6bfe648406 ("i40e: add Rx error statistics")
Fixes: 856505d303 ("cxgbe: add port statistics")

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-03-22 11:07:28 +01:00
Michal Kobylinski
53efd8ecad lpm: fix pipeline apps
Updated ip_pipeline app is using new changes from LPM library
(Increased number of next hops and added new config structure
for LPM IPv4).

Fixes: f1f7261838 ("lpm: add a new config structure for IPv4")

Signed-off-by: Michal Kobylinski <michalx.kobylinski@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2016-03-18 11:53:42 +01:00
Eric Kinzie
6698820b5f bonding: do not ignore multicast in mode 4
The bonding PMD in mode 4 puts all enslaved interfaces into promiscuous
mode in order to receive LACPDUs and must filter unwanted packets
after the traffic has been "collected".  Allow broadcast and multicast
through so that ARP and IPv6 neighbor discovery continue to work.

Fixes: 46fb436836 ("bond: add mode 4")

Signed-off-by: Eric Kinzie <ekinzie@brocade.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2016-03-16 19:05:47 +01:00
Panu Matilainen
e86a699cf6 mk: fix shared library dependencies on libm and librt
There are two places that need -lm (test app and librte_sched) and
exactly one that needs -lrt (librte_sched). Add the relevant
DT_NEEDED entries to both, and eliminate the bogus discrepancy
between Linux and BSD EXECENV_LDLIBS wrt these libs.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2016-03-13 20:27:07 +01:00
Reshma Pattan
5a8fb55c48 app/testpmd: support unidirectional configuration
Added testpmd support to validate zero nb_rxq/nb_txq
changes of ethdev (d505ba8).

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-03-13 16:22:55 +01:00
Xutao Sun
7b1312891b ethdev: add IP in GRE tunnel
Signed-off-by: Xutao Sun <xutao.sun@intel.com>
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
2016-03-13 15:27:20 +01:00
Xutao Sun
dd76f93c2d ethdev: rework tunnel filtering structure
Change the fields of outer_mac and inner_mac in struct
rte_eth_tunnel_filter_conf from pointer to struct in order to
keep the code's readability.

Signed-off-by: Xutao Sun <xutao.sun@intel.com>
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-03-13 15:26:55 +01:00
Wenzhuo Lu
1cbe755fef ethdev: rename UDP tunnel port functions
The names of function for tunnel port configuration are not
accurate. They're tunnel_add/del, better change them to
tunnel_port_add/del.
The old functions are directly replaced because the API and ABI
compatibility of ethdev are already broken in 16.04.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2016-03-13 11:44:33 +01:00
Wenzhuo Lu
0eec728ec9 app/testpmd: add commands for E-tag operation
Add the CLIs to support the E-tag operation.
1, Offloading of E-tag insertion and stripping.
2, Forwarding the E-tag packets to pools based on the GRP and E-CID_base.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
2016-03-11 23:25:58 +01:00
Wenzhuo Lu
05f1b9c82e app/testpmd: add commands for L2 tunnel config
Add CLIs to config ether type of l2 tunnel, and to enable/disable
a type of l2 tunnel.
Now only e-tag tunnel is supported.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
2016-03-11 23:25:58 +01:00
Helin Zhang
19b16e2f64 ethdev: add vlan type when setting ether type
In order to set ether type of VLAN for single VLAN, inner
and outer VLAN, the VLAN type as an input parameter is added
to 'rte_eth_dev_set_vlan_ether_type()'.
In addition, corresponding changes in e1000, ixgbe and i40e
are also added.

It is an ABI break but ethdev library is already bumped for 16.04.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-03-11 22:21:06 +01:00
Jerin Jacob
cbc2f1dccf lpm/arm: support NEON
Enabled CONFIG_RTE_LIBRTE_LPM, CONFIG_RTE_LIBRTE_TABLE,
CONFIG_RTE_LIBRTE_PIPELINE libraries for arm and arm64

TABLE, PIPELINE libraries were disabled due to LPM library dependency.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
2016-03-11 15:56:07 +01:00
Jerin Jacob
15d8dfc05b lpm/x86: move SSE implementation to be architecture agnostic
-Used architecture agnostic xmm_t to represent 128 bit SIMD variable

-Introduced vect_* API abstraction in app/test to test rte_lpm_lookupx4
API in  architecture agnostic way

-Moved rte_lpm_lookupx4 SSE implementation to architecture specific
rte_lpm_sse.h file to accommodate new rte_lpm_lookupx4 implementation
for a different architecture.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2016-03-11 15:50:11 +01:00
Declan Doherty
94b0ad8e0a null_crypto: add driver for null crypto operations
This patch provides the implementation of a NULL crypto PMD, which supports
NULL cipher and NULL authentication operations, which can be chained together
as follows:

- Authentication Only
- Cipher Only
- Authentication then Cipher
- Cipher then Authentication

As this is a NULL operation device the crypto operations which are submitted for
processing are not actually modified and are stored in a queue pairs processed
packets ring ready for collection when rte_cryptodev_burst_dequeue() is called.

The patch also contains the related unit tests function to test the PMDs
supported operations.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2016-03-11 02:16:18 +01:00
John Griffin
18027f99ac app/test: add AES-GCM tests for QAT
Signed-off-by: John Griffin <john.griffin@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-03-11 01:31:55 +01:00
Declan Doherty
eec136f3c5 aesni_gcm: add driver for AES-GCM crypto operations
This patch provides the implementation of an AES-NI accelerated crypto PMD
which is dependent on Intel's multi-buffer library, see the white paper
"Fast Multi-buffer IPsec Implementations on Intel®  Architecture  Processors"

This PMD supports AES_GCM authenticated encryption and authenticated
decryption using 128-bit AES keys

The patch also contains the related unit tests functions

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John Griffin <john.griffin@intel.com>
2016-03-11 01:01:42 +01:00
Deepak Kumar Jain
a59ffe7eb9 cryptodev: add bit-wise handling for SNOW 3G
Wireless algorithms like Snow3G needs input in bits.
In this patch, changes have been made to incorporate this requirement
in both QAT and SW PMD.

Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-03-11 00:18:01 +01:00
Pablo de Lara
3aafc423cf snow3g: add driver for SNOW 3G library
Added new SW PMD which makes use of the libsso SW library,
which provides wireless algorithms SNOW 3G UEA2 and UIA2
in software.

This PMD supports cipher-only, hash-only and chained operations
("cipher then hash" and "hash then cipher") of the following
algorithms:
- RTE_CRYPTO_SYM_CIPHER_SNOW3G_UEA2
- RTE_CRYPTO_SYM_AUTH_SNOW3G_UIA2

The SNOW 3G hash and cipher algorithms, which are enabled
by this crypto PMD are implemented by Intel's libsso software
library. For library download and build instructions,
see the documentation included (doc/guides/cryptodevs/snow3g.rst)

The patch also contains the related unit tests function to test the PMD
supported operations.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2016-03-11 00:14:47 +01:00
Deepak Kumar Jain
8bdf665fe6 app/test: add SNOW 3G
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-03-10 23:05:36 +01:00
Deepak Kumar Jain
1b9cb73ece app/test: fix qat autotest failure
This patch fix the QAT autotest failure when run for multiple times.
it was caused as mbuf was not freed.

Fixes: 202d375c60 (app/test: add cryptodev unit and performance tests)

Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2016-03-10 22:50:48 +01:00
Declan Doherty
67f64f2e12 mbuf_offload: remove library
As cryptodev library does not depend on mbuf_offload library
any longer, this patch removes it.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2016-03-10 21:08:28 +01:00
Declan Doherty
c0f87eb525 cryptodev: change burst API to be crypto op oriented
This patch modifies the crypto burst enqueue/dequeue APIs to operate on bursts
rte_crypto_op's rather than the current implementation which operates on
rte_mbuf bursts, this simplifies the burst processing in the crypto PMDs and the
use of crypto operations in general, including new functions for managing
rte_crypto_op pools.

These changes continues the separation of the symmetric operation parameters
from the more general operation parameters, which will simplify the integration
of asymmetric crypto operations in the future.

PMDs, unit tests and sample applications are also modified to work with the
modified and new API.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2016-03-10 17:12:45 +01:00
Fiona Trahe
1bd407fac8 cryptodev: extract symmetric operations
This patch splits symmetric specific definitions and
functions away from the common crypto APIs to facilitate the future extension
and expansion of the cryptodev framework, in order to allow asymmetric
crypto operations to be introduced at a later date, as well as to clean the
logical structure of the public includes. The patch also introduces the _sym
prefix to symmetric specific structure and functions to improve clarity in
the API.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2016-03-10 17:12:41 +01:00