Jakub Palider [Tue, 24 Jan 2017 14:22:53 +0000 (15:22 +0100)]
net/ena: prepare TSO offload calculation
While ENA can handle checksum calculations in almost all cases,
it cannot do so when DF bit in IPv4 header is not set,
that is DF=0, and TSO is requested. For that situation pseudo
header must be prepared manually.
Signed-off-by: Jakub Palider <jpa@semihalf.com>
Tiwei Bie [Tue, 24 Jan 2017 09:00:49 +0000 (17:00 +0800)]
net/ixgbe: fix API parameter checking
Add checks to rte_pmd_ixgbe_macsec_* APIs to ensure that the
port is an ixgbe port.
Fixes:
b35d309710fe ("net/ixgbe: add MACsec offload")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Wei Dai [Tue, 24 Jan 2017 08:14:20 +0000 (16:14 +0800)]
net/ixgbe: return success when SFP is not present
Ignore the error=IXGBE_ERR_SFP_NOT_PRESENT when SFP is not present.
If it is not ignored, testpmd will fail during the NIC initialization
process.
Ixgbe kernel driver ignores this error and works well. So DPDK
does same thing.
Signed-off-by: Wei Dai <wei.dai@intel.com>
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Rasesh Mody [Tue, 24 Jan 2017 05:38:33 +0000 (21:38 -0800)]
net/bnx2x: fix Rx mode configuration
Check if promisc mode was set when setting allmulti mode and vice-versa.
Introduced BNX2X_RX_MODE_ALLMULTI_PROMISC for the same. If check is
absent the filter configuration gets over written.
Fixes:
540a211084a7 ("bnx2x: driver core")
Fixes:
5dbc53d7e5a2 ("net/bnx2x: restrict Rx mask flags sent to the PF")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Matej Vido [Tue, 24 Jan 2017 10:49:52 +0000 (11:49 +0100)]
net/szedata2: fix device memory access
Fixes:
8acba705b119 ("net/szedata2: localize handling of PCI resources")
Signed-off-by: Matej Vido <vido@cesnet.cz>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jingjing Wu [Mon, 23 Jan 2017 09:42:45 +0000 (17:42 +0800)]
net/i40e: fix deletion of all macvlan filters
filter_type is not set when removing all macvlan filters. It will
cause error when send AQ command to HW.
This patch fixes this issue.
Fixes:
4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Jingjing Wu [Mon, 23 Jan 2017 09:42:44 +0000 (17:42 +0800)]
net/i40e: fix validation when deleting MAC address
When VF sends request to remove MAC address, PF host will check
if it is a non-zero or unicast address. When VF remove a multicast
address, it will report error.
This patch fixes this issue.
Fixes:
ec852c94af39 ("net/i40e: enhance sanity check of MAC")
Cc: stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Rasesh Mody [Mon, 23 Jan 2017 05:02:38 +0000 (21:02 -0800)]
net/qede/base: fix FreeBSD build
This patch addresses compilation errors on FreeBSD with clang 3.8.0.
drivers/net/qede/base/ecore_cxt.c:1257:2: error:
shifting a negative signed value is undefined
SET_FIELD(cdu_params, CDUC_NCIB, elems_per_page);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/qede/base/ecore.h:82:27: note: expanded from macro 'SET_FIELD'
(value) &= ~(name##_MASK << name##_SHIFT);
~~~~~~~~~~~ ^
Fixes:
ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>
Shahaf Shuler [Sun, 22 Jan 2017 08:24:47 +0000 (10:24 +0200)]
net/mlx5: fix memory leak when parsing device params
in case of an error argument list is not freed.
Fixes:
e72dd09b614e ("net/mlx5: add support for configuration through kvargs")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Jeff Guo [Sun, 22 Jan 2017 02:03:41 +0000 (10:03 +0800)]
doc: add known uio_pci_generic issue for i40e
When bind the "uio_pci_generic" module in X710/XL710/XXV710,
the result is failed. The "uio_pci_generic" module is not
supported by X710/XL710/XXV710.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Ivan Malov [Mon, 23 Jan 2017 11:06:15 +0000 (11:06 +0000)]
net/sfc: fix TSO limits imposed to the number of Tx queues
The number of Tx queues requested by the user must not be overridden;
instead, the limits imposed by TSO must be applied to the advertised
maximum
Fixes:
fec33d5bb3eb ("net/sfc: support firmware-assisted TSO")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Andrew Rybchenko [Fri, 20 Jan 2017 13:53:51 +0000 (13:53 +0000)]
net/sfc: use eal I/O device memory barriers API
The previous version relied on the fact that DMA sync for device and
PIO write barrier in pair. Now each does its job.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Fri, 20 Jan 2017 13:53:50 +0000 (13:53 +0000)]
net/sfc: use eal I/O device memory read/write API
Use relaxed version of these functions to guarantee no changes on
the step.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Fri, 20 Jan 2017 15:22:56 +0000 (15:22 +0000)]
net/sfc: enable TSO by default
Remove RTE_LIBRTE_SFC_EFX_TSO config option since it is not
required any more:
- unreasonable limit on number of Tx queues when TSO is not
actually required should be solved using per-device parameter
- performance difference with and without TSO compiled in is small
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Andrew Rybchenko [Thu, 19 Jan 2017 11:12:20 +0000 (11:12 +0000)]
net/sfc: do not panic if alarms are not supported
Alarms are not supported on the FreeBSD.
Application must poll link status periodically itself using
rte_eth_link_get_nowait() to avoid management event queue overflow.
Fixes:
2de39f4e1310 ("net/sfc: periodic management EVQ polling using alarm")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Nélio Laranjeiro [Fri, 20 Jan 2017 15:27:29 +0000 (16:27 +0100)]
net/mlx5: fix Rx packet validation and type
Rx checksum validation and packet type offloads are read from the wrong
location.
Fixes:
501505c5608a ("net/mlx: fix IPv4 and IPv6 packet type")
Fixes:
350f4c482e46 ("net/mlx5: fix Rx checksum macros")
Fixes:
6218063b39a6 ("net/mlx5: refactor Rx data path")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Nélio Laranjeiro [Fri, 20 Jan 2017 15:27:28 +0000 (16:27 +0100)]
net/mlx5: fix flow API mark combined with drop
Fixes:
ea3bc3b1df94 ("net/mlx5: support mark flow action")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Yongseok Koh [Wed, 18 Jan 2017 00:51:55 +0000 (16:51 -0800)]
net/mlx5: fix queue wrap-around of multi-packet send
When the WQ is wrapped around, it wrongly checks the condition when
resetting the pointer. It should be compared against the end of the queue,
not the beginning of the queue. And this isn't even needed when the length
of the copying data crosses the boundary.
Fixes:
fdcb0f53053b ("net/mlx5: use work queue buffer as a raw buffer")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Yongseok Koh [Wed, 18 Jan 2017 00:39:29 +0000 (16:39 -0800)]
net/mlx5: increase RSS indirection table size limit
The size of Rx RSS indirection table was limited by 256, but it is not
required anymore for all Mellanox NICs. However, the librte_ether still
limits the size by 512.
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Yongseok Koh [Tue, 17 Jan 2017 02:09:40 +0000 (18:09 -0800)]
net/mlx5: add prefetching Rx completion queue
On receiving a compressed session of Rx completion, prefetch every entries
to be invalidated. Also, invalidate consumed completions per every 8
mini-completions, not to wait until the last entry is consumed. This helps
to reduce jitter in rx_burst.
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Xiao Wang [Thu, 19 Jan 2017 05:39:23 +0000 (21:39 -0800)]
net/i40e: fix Rx checksum flag
When no error reported in Rx descriptor, we should set CKSUM_GOOD flag
before return.
Fixes:
b704f9071b09 ("net/i40e: implement new Rx checksum flag")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Qi Zhang [Mon, 16 Jan 2017 19:23:52 +0000 (14:23 -0500)]
net/ixgbe: fix blocked interrupts
While handling link status change (LSC) interrupt, all interrupts are
blocked until delayed interrupt handler finishes.
The wait duration is at least one second and this may cause timeouts in
VF to PF mailbox.
Make sure only LSC interrupt is blocked while waiting for delayed
interrupt handler to finish.
Fixes:
0a45657a6794 ("pci: rework interrupt handling")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Andrew Rybchenko [Thu, 12 Jan 2017 09:03:23 +0000 (09:03 +0000)]
net/sfc: fix flow control settings on port start
efx_phy_adv_cap_set() sets all advertised phy capabilities including
pause capabilities which are also configured using efx_mac_fcntl_set().
If we set speed and autonegotiation capabilities only, we should
preserve already configured pause capabilities.
Fixes:
d23f3a89ab54 ("net/sfc: support link speed and duplex settings")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Andrew Rybchenko [Thu, 12 Jan 2017 09:03:22 +0000 (09:03 +0000)]
net/sfc: fix link status when port is not started
Fixes:
886f8d8a05bf ("net/sfc: retrieve link info")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Andrew Rybchenko [Thu, 12 Jan 2017 09:03:21 +0000 (09:03 +0000)]
net/sfc: synchronize link status with HW on start
Fixes:
886f8d8a05bf ("net/sfc: retrieve link info")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Andrew Rybchenko [Thu, 12 Jan 2017 09:03:20 +0000 (09:03 +0000)]
net/sfc: avoid usage of possibly uninitialized link mode
In fact efx_port_poll() always initializes it, but it isn't
explicitly documented feature of the API. Moreover, the API
annocation suggests that return code should be checked.
Fixes:
886f8d8a05bf ("net/sfc: retrieve link info")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Yuanhan Liu [Wed, 11 Jan 2017 04:27:12 +0000 (12:27 +0800)]
net/virtio: optimize header reset on any layout
When any layout is used, the header is stored in the head room of mbuf.
mbuf is allocated and filled by user, means there is no gurateen the
header is all zero for non TSO case. Therefore, we have to do the reset
by ourself:
memest(hdr, 0, head_size);
The memset has two impacts on performance:
- memset could not be inlined, which is a bit costly.
- more importantly, it touches the mbuf, which could introduce severe
cache issues as described by former patch.
Similiary, we could do the same trick: reset just when necessary, when
the corresponding field is already 0, which is likely true for a simple
l2 forward case. It could boost the performance up to 20+% in micro
benchmarking.
Cc: stable@dpdk.org
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Yuanhan Liu [Wed, 11 Jan 2017 04:27:11 +0000 (12:27 +0800)]
net/virtio: fix performance regression due to TSO
TSO is now enabled, but it's not actually being used by default in a
simple L2 forward mode. In such case, we have to zero the virtio net
headers, to inform the vhost backend that no offload is being used:
hdr->csum_start = 0;
hdr->csum_offset = 0;
hdr->flags = 0;
hdr->gso_type = 0;
hdr->gso_size = 0;
hdr->hdr_len = 0;
Such writes could be very costly; it introduces severe cache issues:
The above operations introduce cache write for each packet, which
stalls the read operation from the vhost backend.
The fact that virtio net header is initiated to zero in PMD driver
init stage means that these costly writes are unnecessary and could
be avoided:
if (hdr->csum_start != 0)
hdr->csum_start = 0;
And that's what the macro ASSIGN_UNLESS_EQUAL does. With this, the
performance drop introduced by TSO enabling is recovered: it could
be up to 20% in micro benchmarking.
Fixes:
58169a9c8153 ("net/virtio: support Tx checksum offload")
Fixes:
696573046e9e ("net/virtio: support TSO")
Cc: stable@dpdk.org
Cc: Olivier Matz <olivier.matz@6wind.com>
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Jianfeng Tan [Tue, 24 Jan 2017 08:37:38 +0000 (08:37 +0000)]
net/vhost: fix unix socket not removed as closing
The commit
aed0b12930b3 ("net/vhost: fix socket file deleted on stop")
moves rte_vhost_driver_register and rte_vhost_driver_unregister from
dev_start() and dev_stop() into driver's probe() and remove().
Apps, like testpmd, using vhost pmd in server mode, usually calls
dev_stop() and dev_close() as quitting, instead of driver-specific
remove(). Then those unix socket files have no chance to get removed.
Semantically, device-specific things should be put into device-specific
APIs. Fix this issue by moving rte_vhost_driver_unregister, plus other
structure free into dev_close().
Fixes:
aed0b12930b3 ("net/vhost: fix socket file deleted on stop")
Cc: stable@dpdk.org
Reported-by: Lei Yao <lei.a.yao@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Emmanuel Roullit [Tue, 24 Jan 2017 20:31:29 +0000 (21:31 +0100)]
vhost: remove unneeded variable assignment
Found with clang static analysis:
lib/librte_vhost/vhost_user.c:996:3: warning:
Value stored to 'ret' is never read
ret = vhost_user_get_vring_base(dev, &msg.payload.state);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Emmanuel Roullit [Tue, 24 Jan 2017 20:36:03 +0000 (21:36 +0100)]
vhost: do not GSO when no header is present
Found with clang static analysis:
lib/librte_vhost/virtio_net.c:723:17: warning:
Access to field 'data_off' results in a dereference of a null pointer
(loaded from variable 'tcp_hdr')
m->l4_len = (tcp_hdr->data_off & 0xf0) >> 2;
^~~~~~~~~~~~~~~~~
Fixes:
d0cf91303d73 ("vhost: add Tx offload capabilities")
Cc: stable@dpdk.org
Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Jianfeng Tan [Thu, 26 Jan 2017 03:05:42 +0000 (03:05 +0000)]
net/virtio-user: check value returned from malloc
Value returned from malloc is not checked for errors before being used.
This patch fixes following coverity issue.
static struct vhost_memory_kernel *
prepare_vhost_memory_kernel(void)
{
...
vm = malloc(sizeof(struct vhost_memory_kernel) +
max_regions *
sizeof(struct vhost_memory_region));
...
>>> CID 140744: (NULL_RETURNS)
>>> Dereferencing a null pointer "vm".
mr = &vm->regions[k++];
Coverity issue: 140744
Fixes:
e3b434818bbb ("net/virtio-user: support kernel vhost")
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Yuanhan Liu [Sun, 22 Jan 2017 08:47:00 +0000 (16:47 +0800)]
net/virtio: fix crash when number of virtio devices > 1
The vtpci_ops assignment needs the 'hw->port_id' as an input parameter.
That said, we should set 'hw->port_id' firstly, then do the vtpci_ops
assignment, while the code does reversely. That would result to a crash
when more than one virtio devices are used, because we keep assigning
proper vtpci_ops to virtio_hw_internal[0]->vtpci_ops, leaving the pointer
for other ports being NULL.
Reverse the order fixes this issue.
Fixes:
9470427c88e1 ("net/virtio: do not store PCI device pointer at shared memory")
Cc: stable@dpdk.org
Reported-by: Lei Yao <lei.a.yao@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Yuanhan Liu [Sun, 22 Jan 2017 08:46:59 +0000 (16:46 +0800)]
vhost: fix long stall of negotiation
Setting up the mapping from GPA (guest physical address) to HPA (guest
physical address) could be very time consuming when the guest memory is
backened with small pages (4K). The bigger the guest memory, the longer
it takes. This could lead a very long vhost-user negotiation.
Since the mapping is only needed in zero copy mode so far, we could
avoid such time consuming settup when zero copy is turned off (which is
the default case).
It's actually a workaround, a right fix might be to start a new thread,
and hide the big latency there.
Fixes:
e246896178e6 ("vhost: get guest/host physical address mappings")
Cc: stable@dpdk.org
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Yuanhan Liu [Sun, 22 Jan 2017 08:46:58 +0000 (16:46 +0800)]
vhost: fix dead loop in enqueue path
If a malicious guest forges a dead loop desc chain (let desc->next point
to itself) and desc->len is zero, this could lead to a dead loop in
copy_mbuf_to_desc(following is a simplified code to show this issue
clearly):
while (mbuf_is_not_totally_consumed) {
if (desc_avail == 0) {
desc = &descs[desc->next];
desc_avail = desc->len;
}
COPY(desc, mbuf, desc_avail);
}
I have actually fixed a same issue before: commit
a436f53ebfeb ("vhost:
avoid dead loop chain"); it fixes the dequeue path though, leaving the
enqueue path still vulnerable.
The fix is the same. Add a var nr_desc to avoid the dead loop.
Fixes:
f1a519ad981c ("vhost: fix enqueue/dequeue to handle chained vring descriptors")
Cc: stable@dpdk.org
Reported-by: Xieming Katty <katty.xieming@huawei.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Ferruh Yigit [Thu, 26 Jan 2017 14:07:42 +0000 (14:07 +0000)]
crypto/qat: make PCI device id struct const
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Slawomir Mrozowicz [Wed, 25 Jan 2017 16:27:35 +0000 (17:27 +0100)]
doc: describe new performance test application
Add documentation to describe using the new performance test application.
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Slawomir Mrozowicz [Wed, 25 Jan 2017 16:27:34 +0000 (17:27 +0100)]
app/crypto-perf: add test vectors files
Add test vectors example files to the performance test application.
Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
Slawomir Mrozowicz [Wed, 25 Jan 2017 16:27:33 +0000 (17:27 +0100)]
app/crypto-perf: introduce performance test application
This patchset introduce new application which allows measuring
performance parameters of PMDs available in crypto tree. The goal of
this application is to replace existing performance tests in app/test.
Parameters available are: throughput (--ptest throughput) and latency
(--ptest latency). User can use multiply cores to run tests on but only
one type of crypto PMD can be measured during single application
execution. Cipher parameters, type of device, type of operation and
chain mode have to be specified in the command line as application
parameters. These parameters are checked using device capabilities
structure.
Couple of new library functions in librte_cryptodev are introduced for
application use.
To build the application a CONFIG_RTE_APP_CRYPTO_PERF flag has to be set
(it is set by default).
Example of usage: -c 0xc0 --vdev crypto_aesni_mb_pmd -w 0000:00:00.0 --
--ptest throughput --devtype crypto_aesni_mb --optype cipher-then-auth
--cipher-algo aes-cbc --cipher-op encrypt --cipher-key-sz 16 --auth-algo
sha1-hmac --auth-op generate --auth-key-sz 64 --auth-digest-sz 12
--total-ops
10000000 --burst-sz 32 --buffer-sz 64
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
Signed-off-by: Michal Kobylinski <michalx.kobylinski@intel.com>
Slawomir Mrozowicz [Wed, 25 Jan 2017 16:27:32 +0000 (17:27 +0100)]
cryptodev: retrieve device info
This patch adds helper functions for new performance application which
provide identifiers and number of crypto device and
provide and check capabilities available for defined device and algorithm.
The performance application can be used to measure throughput and latency
of cryptography operation performed by crypto device.
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fan Zhang [Tue, 24 Jan 2017 16:24:01 +0000 (16:24 +0000)]
crypto/scheduler: add documentation
Adds the description of the cryptodev scheduler PMD overview,
limitations, build, instructions, modes, etc.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fan Zhang [Tue, 24 Jan 2017 16:24:00 +0000 (16:24 +0000)]
crypto/scheduler: add unit test
Same as other cryptodev PMDs, it is necessary to carry out the unit
test for scheduler PMD. Currently the test is designed to attach 2
AESNI-MB cryptodev PMDs as slaves, sets the scheduling mode as round-
robin, and runs almost all AESNI-MB test items (except for sessionless
tests). In the end, the slaves are detached.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fan Zhang [Tue, 24 Jan 2017 16:23:58 +0000 (16:23 +0000)]
crypto/scheduler: enable compilation
Adds Makefile for scheduler cryptodev PMD, and updates existing
Makefiles. Different than other cryptodev PMDs, scheduler PMD
is required to be built as shared libraries.
Adds scheduler PMD enable and debug flags to config/common_base.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fan Zhang [Tue, 24 Jan 2017 16:23:57 +0000 (16:23 +0000)]
crypto/scheduler: register operation functions
Implements all standard operations required for cryptodev,
and register them to cryptodev operation function pointer table.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fan Zhang [Tue, 24 Jan 2017 16:23:56 +0000 (16:23 +0000)]
crypto/scheduler: register as vdev driver
Adds crypto scheduler's PMD's probe and remove function and the device's
enqueue and dequeue burst functions. A cryptodev scheduler PMD is
then registered in the end.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fan Zhang [Tue, 24 Jan 2017 16:23:55 +0000 (16:23 +0000)]
crypto/scheduler: add round-robin mode
Implements round-robin scheduling mode and register into cryptodev
scheduler ops structure. This mode enqueues a burst of operation
to one of its slaves, and iterates the next burst to the other
slave. Same procedure is done on dequeueing operations.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fan Zhang [Tue, 24 Jan 2017 16:23:54 +0000 (16:23 +0000)]
crypto/scheduler: add API implementations
Adds the implementations of the APIs for scheduler cryptodev PMD.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fan Zhang [Tue, 24 Jan 2017 16:23:53 +0000 (16:23 +0000)]
crypto/scheduler: add internal structures
Adds a number of internal structures for the cryptodev scheduler PMD. The
structures include the scheduler context, slave, queue pair context,
and session.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fan Zhang [Tue, 24 Jan 2017 16:23:52 +0000 (16:23 +0000)]
crypto/scheduler: add API
Adds APIs and function prototypes for the scheduler PMD to perform extra
operations other than standard cryptodev APIs.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Fan Zhang [Tue, 24 Jan 2017 16:23:51 +0000 (16:23 +0000)]
cryptodev: add scheduler PMD name and type
This patch adds the cryptodev scheduler PMD name and type identifier to
librte_cryptodev.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Hemant Agrawal [Wed, 18 Jan 2017 09:16:10 +0000 (14:46 +0530)]
cryptodev: decouple from PCI device
This makes struct rte_cryptodev independent of struct rte_pci_device by
replacing it with a pointer to the generic struct rte_device.
This is inline with the recent changes in ethdev
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: John Griffin <john.griffin@intel.com>
Reviewed-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Declan Doherty [Mon, 23 Jan 2017 12:18:35 +0000 (12:18 +0000)]
cryptodev: uninline some functions
rte_cryptodev_pmd_get_dev, rte_cryptodev_pmd_get_named_dev,
rte_cryptodev_pmd_is_valid_dev were incorrectly marked as inline and
therefore not useable from crypto PMDs when built as shared
libraries as they accessed the global rte_cryptodev_globals device
structure.
Fixes:
d11b0f30 ("cryptodev: introduce API and framework for crypto devices")
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Ferruh Yigit [Mon, 30 Jan 2017 10:21:15 +0000 (10:21 +0000)]
mk: parallelize make config
make config dependency resolving was always running serial,
parallelize it for better performance.
$ time make T=x86_64-native-linuxapp-gcc config
real 0m12.633s
$ time make -j8 T=x86_64-native-linuxapp-gcc config
real 0m1.826s
When config creation done under a single make target, using a for loop,
make has no control on the action, and it needs to run as implemented in
the rule. But if for loop converted into multiple targets, make can
detect independent targets and run them parallel based on -j parameter.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Jerin Jacob [Thu, 19 Jan 2017 05:43:21 +0000 (11:13 +0530)]
doc: add I/O device memory access API to release notes
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Yoni Gilad [Tue, 10 Jan 2017 17:14:21 +0000 (17:14 +0000)]
usertools: fix active interface detection when binding
When adding crypto devices, the "Active" and "Ssh_if" attributes of
existing network devices were reset. This causes the following issues:
- Network interfaces aren't marked as "*Active*" in the --status output.
- Active network interfaces can be unbound without the --force option,
causing loss of network connection.
The reset was caused by the call to devices[d].update in
get_crypto_details.
This patch prevents the update on non-crypto devices.
Fixes:
cb4a1d14bf3e ("tools: bind crypto devices")
Cc: stable@dpdk.org
Signed-off-by: Yoni Gilad <yonig@radcom.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Tue, 24 Jan 2017 09:06:14 +0000 (09:06 +0000)]
examples/server_node_efd: renamed from flow_distributor
To avoid confusion with distributor app, this commit
renames the flow-distributor sample app to server_node_efd,
since it shows how to use the EFD library and it is based
on a server/nodes model.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Wed, 25 Jan 2017 11:29:18 +0000 (11:29 +0000)]
app/test: fix build with overflowed EFD value
When RTE_EFD_VALUE_NUM_BITS is 32, there was a compilation issue
because of an overflow:
app/test/test_efd.c:157:55: error: overflow in expression;
result is
2147483647 with type 'int' [-Werror,-Winteger-overflow]
data[0] = mrand48() & ((1 << RTE_EFD_VALUE_NUM_BITS) - 1);
This commit fixes the issue by using a setting a different
macro VALUE_BITMASK with a conditional
Fixes:
0e925aef2779 ("app/test: add EFD functional and perf tests")
Reported-by: Yong Liu <yong.liu@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Ferruh Yigit [Fri, 27 Jan 2017 09:53:03 +0000 (09:53 +0000)]
app/test: make PCI device id struct const
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Wed, 18 Jan 2017 07:26:08 +0000 (07:26 +0000)]
pdump: fix coverage warning
Fix GCC 4.8.2
20140120 (Red Hat 4.8.2-16) (RHEL 7.0) false warning
when build with EXTRA_CFLAGS='--coverage'.
Fixes:
278f945402c5 ("pdump: add new library for packet capture")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Qiming Yang [Mon, 16 Jan 2017 02:31:26 +0000 (10:31 +0800)]
app/testpmd: add offload capabilities query
Add two new commands "show port cap <port>" and "show
port cap all" to display what offload capabilities supported
in ports. It will not only display all the capabilities of
the port, but also the enabling condition for each capability
in the running time.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Michał Mirosław [Tue, 13 Dec 2016 01:08:16 +0000 (02:08 +0100)]
acl: fix flow data comments
Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Michał Mirosław [Wed, 18 Jan 2017 19:32:51 +0000 (20:32 +0100)]
acl: allow zero verdict
This enables ACL matches to return 0 where the distinction
from no-match case is not needed.
Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Michał Mirosław [Wed, 18 Jan 2017 19:32:51 +0000 (20:32 +0100)]
acl: remove invalid test
rte_acl_add_rules() has no way of checking rule size.
This was hidden because the test effectively checked that
adding a rule with userdata == 0 failed.
Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Olivier Matz [Fri, 27 Jan 2017 14:23:17 +0000 (15:23 +0100)]
efd: fix build by removing dependency to libmath
When we compile the dpdk with:
CONFIG_RTE_LIBRTE_EFD=y
CONFIG_RTE_LIBRTE_NFP_PMD=n
CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n
CONFIG_RTE_LIBRTE_SCHED=n
CONFIG_RTE_LIBRTE_METER=n
The linker gives the following error:
lib/librte_efd.a(rte_efd.o): In function `rte_efd_create':
lib/librte_efd/rte_efd.c:560: undefined reference to `log2'
collect2: error: ld returned 1 exit status
This is because the '-lm' is missing in mk/rte.app.mk.
An alternative, which is proposed by this patch, is to use the compiler
builtin rte_bsf32() to process log2 instead of the libmath log2() that
requires to include math.h and link with -lm.
Fixes:
56b6ef874f80 ("efd: new Elastic Flow Distributor library")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Emmanuel Roullit [Tue, 24 Jan 2017 20:28:35 +0000 (21:28 +0100)]
ethdev: remove useless pointer initialization
Found with clang static analysis:
lib/librte_ether/rte_ethdev.c:2467:22:
warning: Value stored to 'dev' during its initialization is never read
struct rte_eth_dev *dev = &rte_eth_devices[port_id];
^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes:
88ac4396ad29 ("ethdev: add VMDq support")
Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Steve Shin [Fri, 27 Jan 2017 17:57:29 +0000 (09:57 -0800)]
ethdev: fix MAC address replay
This patch fixes a bug in replaying MAC address to the hardware
in rte_eth_dev_config_restore() routine. Added default MAC replay as well.
Fixes:
4bdefaade6d1 ("ethdev: VMDQ enhancements")
Signed-off-by: Steve Shin <jonshin@cisco.com>
Reviewed-by: Igor Ryzhov <iryzhov@nfware.com>
Ilya V. Matveychikov [Fri, 20 Jan 2017 00:19:23 +0000 (04:19 +0400)]
mbuf: remove redundant assignment when attaching
mi->next will be assigned to NULL few lines later, trivial patch
Fixes:
ea672a8b1655 ("mbuf: remove the rte_pktmbuf structure")
Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 23 Jan 2017 17:11:03 +0000 (18:11 +0100)]
mempool: fix stack handler dequeue
The return value of the stack handler is wrong: it should be 0 on
success, not the number of objects dequeued.
This could lead to memory leaks depending on how the caller checks the
return value (ret < 0 or ret != 0). This was also breaking autotests
with debug enabled, because the debug cookies are only updated when the
function returns 0, so the cookies were not updated, leading to
an abort().
Fixes:
295a530b0844 ("mempool: add stack mempool handler")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Emmanuel Roullit [Tue, 24 Jan 2017 20:26:56 +0000 (21:26 +0100)]
devargs: reset driver name pointer on parsing failure
The pointer set by strdup() needs to be cleared on failure to avoid a
potential double-free from the caller.
Found with clang static analysis:
lib/librte_eal/common/eal_common_devargs.c:123:2:
warning: Attempt to free released memory
free(buf);
^~~~~~~~~
Fixes:
0fe11ec592b2 ("eal: add vdev init and uninit")
Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Olivier Matz [Tue, 24 Jan 2017 16:21:12 +0000 (17:21 +0100)]
eal: fix warning about debug log at startup
The log "Debug logs available - lower performance" should
now only be displayed when dataplane debug logs are enabled.
The issue occurs only if the default log level (CONFIG_RTE_LOG_LEVEL) is
set to DEBUG in the configuration, which is not the case by default.
Fixes:
5d8f0baf69ea ("log: do not drop debug logs at compile time")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Michał Mirosław [Tue, 13 Dec 2016 01:08:19 +0000 (02:08 +0100)]
kni: guard against unterminated name oops
If the name is too long, it triggers BUG in alloc_netdev().
Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Michał Mirosław [Tue, 13 Dec 2016 01:08:18 +0000 (02:08 +0100)]
kni: set interface name source as user-space
Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ferruh Yigit [Tue, 17 Jan 2017 18:01:47 +0000 (18:01 +0000)]
config: disable KNI ethtool by default
KNI ethtool support (KNI control path) is not commonly used,
and it tends to break the build with new version of the Linux kernel.
KNI ethtool feature is disabled by default. KNI datapath is not effected
from this update.
It is possible to enable feature explicitly with config option:
"CONFIG_RTE_KNI_KMOD_ETHTOOL=y"
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Ferruh Yigit [Tue, 17 Jan 2017 18:01:46 +0000 (18:01 +0000)]
kni: add build option for ethtool support
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Bruce Richardson [Mon, 23 Jan 2017 12:11:28 +0000 (12:11 +0000)]
buildtools: allow symlinks within a source directory
When creating the symlinks for header files to the include folder, the
relpath script dereferenced all symlinks. This made it impossible to
have file A.h renamed to B.h and then symlinked back to its original
name. This is useful to be able to do when refactoring or reworking
a library. Change this so that we just use the dirname of the path from
readlink, we can use the basename as it was originally, even if it was a
symlink.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Thomas Monjalon [Mon, 23 Jan 2017 09:10:12 +0000 (10:10 +0100)]
mk: remove default toolchain prefix for ThunderX
The environment variable CROSS must be set when using a cross-toolchain.
However it is counter intuitive to set a default value, considering
the toolchain required to build this architecture is well known.
It is especially weird when using a native toolchain and requiring to
unset this variable on the command line.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Ferruh Yigit [Thu, 26 Jan 2017 14:16:47 +0000 (14:16 +0000)]
devtools: add more git headline checks for acronyms
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ferruh Yigit [Thu, 26 Jan 2017 14:07:43 +0000 (14:07 +0000)]
devtools: update git headline prefix check for drivers
For the patches that touch multiple drivers in same driver group,
script forces headline prefix start with drv group.
Like for net/a net/b net/c, patch title should be "net: x y z"
Update rule to let "driver" prefix in headline,
for above sample patch title becomes: "drivers/net: x y z"
This prevents patch confused with library with same name.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Yuanhan Liu [Fri, 20 Jan 2017 08:04:53 +0000 (16:04 +0800)]
ethdev: fix data reset when allocating port
Fix an silly error by auto-complete while managing the merge conflicts.
It's the eth_dev_data (but not eth_dev) entry should be memset.
Fixes:
d948f596fee2 ("ethdev: fix port data mismatched in multiple process model")
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Keith Wiles [Fri, 20 Jan 2017 14:30:25 +0000 (08:30 -0600)]
net/tap: fix build with old kernels
IFF_MULTI_QUEUE does not exist in older kernels:
drivers/net/tap/rte_eth_tap.c:143:19: error: ‘IFF_MULTI_QUEUE’ undeclared
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Pablo de Lara [Thu, 19 Jan 2017 14:21:35 +0000 (14:21 +0000)]
eal: fix FreeBSD build
rte_bus_scan() and rte_bus_probe() have been introduced
in eal.c, but it is missing the rte_bus.h header file,
for BSD systems.
Fixes:
f44abbc12fa0 ("bus: add scanning")
Fixes:
c3cec1d80708 ("bus: add probing")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Thomas Monjalon [Thu, 19 Jan 2017 04:54:41 +0000 (05:54 +0100)]
version: 17.02-rc1
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Shreyansh Jain [Wed, 18 Jan 2017 14:05:22 +0000 (19:35 +0530)]
bus: add probing
Bus implementations can implement a probe handler to match the devices
scanned against the drivers registered.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Shreyansh Jain [Wed, 18 Jan 2017 14:05:21 +0000 (19:35 +0530)]
bus: add scanning
Scan for bus discovers the devices available on the bus and adds them
to a bus specific device list. Each bus mandatorily implements this
method.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Shreyansh Jain [Wed, 18 Jan 2017 14:05:17 +0000 (19:35 +0530)]
bus: introduce bus abstraction
This patch introduces the rte_bus abstraction for EAL.
The model is:
- One or more devices are connected to a Bus
- Drivers are running instances which manage one or more devices
- Bus is responsible for identifying devices (and interrupt propogation)
- Driver is responsible for initializing the device
This patch adds a 'rte_bus' base class which would be extended for
specific implementations. It also introduces Bus registration and
deregistration functions.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Zbigniew Bodek [Wed, 18 Jan 2017 20:01:58 +0000 (21:01 +0100)]
crypto/armv8: add documentation
Add documentation about the driver and update
release notes.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@caviumnetworks.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Zbigniew Bodek [Wed, 18 Jan 2017 20:02:01 +0000 (21:02 +0100)]
app/test: add ARMv8 crypto tests and test vectors
Introduce unit tests for ARMv8 crypto PMD.
Add test vectors for short cases such as 160 bytes.
These test cases are ARMv8 specific since the code provides
different processing paths for different input data sizes.
User can validate correctness of algorithms' implementation using:
* cryptodev_sw_armv8_autotest
For performance test one can use:
* cryptodev_sw_armv8_perftest
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@caviumnetworks.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Zbigniew Bodek [Wed, 18 Jan 2017 20:01:57 +0000 (21:01 +0100)]
cryptodev: introduce ARM-specific feature flags
Add two new feature flags:
* RTE_CRYPTODEV_FF_CPU_NEON
represents ARM NEON (TM) instructions
* RTE_CRYPTODEV_FF_CPU_ARM_CE
represents ARM crypto extensions
Add them to both cryptodev library, documentation and relevant
PMD driver for ARMv8.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@caviumnetworks.com>
Zbigniew Bodek [Wed, 18 Jan 2017 20:01:54 +0000 (21:01 +0100)]
crypto/armv8: add PMD optimized for ARMv8 processors
This patch introduces crypto poll mode driver
using ARMv8 cryptographic extensions.
CPU compatibility with this driver is detected in
run-time and virtual crypto device will not be
created if CPU doesn't provide:
AES, SHA1, SHA2 and NEON.
This PMD is optimized to provide performance boost
for chained crypto operations processing,
such as encryption + HMAC generation,
decryption + HMAC validation. In particular,
cipher only or hash only operations are
not provided.
The driver currently supports AES-128-CBC
in combination with: SHA256 HMAC and SHA1 HMAC
and relies on the external armv8_crypto library:
https://github.com/caviumnetworks/armv8_crypto
Build ARMv8 crypto PMD if compiling for ARM64
and CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO option
is enable in the configuration file.
ARMV8_CRYPTO_LIB_PATH environment variable will
point to the appropriate library directory.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@caviumnetworks.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pablo de Lara [Wed, 18 Jan 2017 17:31:00 +0000 (17:31 +0000)]
doc: add ZUC to crypto matrices
When ZUC PMD was added, it was not added in the
Crypto Device Supported Functionality Matrices.
This commit adds a column in all the matrices, plus
the ZUC EEA3/EIA3 algorithms.
Fixes:
cf7685d68f00 ("crypto/zuc: add driver for ZUC library")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Piotr Azarewicz [Tue, 17 Jan 2017 11:19:19 +0000 (12:19 +0100)]
crypto/aesni_gcm: test new features
Added new unit tests for AES-NI GCM PMD to verify new functionalities.
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Piotr Azarewicz [Tue, 17 Jan 2017 11:19:18 +0000 (12:19 +0100)]
crypto/aesni_gcm: migrate from MB library to ISA-L
Current Cryptodev AES-NI GCM PMD is implemented using Multi Buffer
Crypto library.This patch reimplement the device using ISA-L Crypto
library: https://github.com/01org/isa-l_crypto.
The migration entailed the following additional support for:
* GMAC algorithm.
* 256-bit cipher key.
* Session-less mode.
* Out-of place processing
* Scatter-gatter support for chained mbufs (only out-of place and
destination mbuf must be contiguous)
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Arek Kusztal [Tue, 17 Jan 2017 13:33:07 +0000 (13:33 +0000)]
app/test: fix symmetric session free in crypto perf tests
This commit fixes problem with deallocation of symmetric
session entries in cryptodev performance tests.
Fixes:
390919829fdb ("app/test: update AES SHA performance test")
Fixes:
79521c438363 ("app/test: add AES GCM performance test")
Fixes:
ffbe3be0d4b5 ("app/test: add libcrypto")
Fixes:
97fe6461c7cb ("app/test: add SNOW 3G performance test")
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Fan Zhang [Mon, 16 Jan 2017 14:14:54 +0000 (14:14 +0000)]
cryptodev: add user defined name for vdev
This patch adds a user defined name initializing parameter to cryptodev
library.
Originally, for software cryptodev PMD, the vdev name parameter is
treated as the driver identifier, and will create an unique name for each
device automatically, which is not necessarily as same as the vdev
parameter.
This patch allows the user to either create a unique name for his software
cryptodev, or by default, let the system creates a unique one. This should
help the user managing the created cryptodevs easily.
Examples:
CLI command fragment 1: --vdev "crypto_aesni_gcm_pmd"
The above command will result in creating a AESNI-GCM PMD with name of
"crypto_aesni_gcm_X", where postfix X is the number assigned by the system,
starting from 0. This fragment can be placed in the same CLI command
multiple times, resulting the postfixs incremented by one for each new
device.
CLI command fragment 2: --vdev "crypto_aesni_gcm_pmd,name=gcm1"
The above command will result in creating a AESNI-GCM PMD with name of
"gcm1". This fragment can be placed in the same CLI command multiple
times, as long as each having a unique name value.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Arek Kusztal [Wed, 4 Jan 2017 08:37:32 +0000 (08:37 +0000)]
crypto/qat: add scatter gather to feature flags
This commit adds scatter gather option to Intel(R) QuickAssist
Technology driver feature flags.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Zbigniew Bodek [Thu, 12 Jan 2017 14:52:37 +0000 (15:52 +0100)]
examples/ipsec-secgw: support SHA256 HMAC
Add minor adjustments to support SHA256 HMAC:
- extend maximum key length to match SHA256 HMAC
- add SHA256 HMAC parameters and configuration string
- add SHA256 HMAC to inbound and outbound cases
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@caviumnetworks.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Tomasz Kulasek [Fri, 13 Jan 2017 15:23:17 +0000 (16:23 +0100)]
app/test: check scatter-gather for crypto drivers
This patch provides unit tests for set of cipher/hash combinations covering
currently implemented crypto PMD's and allowing to verify scatter gather
support.
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Tomasz Kulasek [Fri, 13 Jan 2017 15:23:16 +0000 (16:23 +0100)]
crypto/openssl: support scatter-gather
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Tomasz Kulasek [Fri, 13 Jan 2017 15:23:15 +0000 (16:23 +0100)]
crypto: support scatter-gather in software drivers
This patch introduces RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER feature flag
informing that selected crypto device supports segmented mbufs natively
and doesn't need to be coalesced before crypto operation.
While using segmented buffers in crypto devices may have unpredictable
results, for PMDs which doesn't support it natively, additional check is
made for debug compilation.
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Daniel Mrzyglod [Tue, 10 Jan 2017 14:44:25 +0000 (15:44 +0100)]
crypto/openssl: fix indentation in guide
The code section was lacking indentation to be be correctly formatted.
Fixes:
d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>