Igor Ryzhov [Mon, 15 Jan 2018 08:32:18 +0000 (11:32 +0300)]
net/i40e: fix flag for MAC address write
Current flag is in wrong byte order for i40e_aq_mac_address_write,
and just uses the well defined macro instead.
Fixes:
e18e01e92c29 ("i40e: support default MAC address setting")
Cc: stable@dpdk.org
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Ferruh Yigit [Wed, 17 Jan 2018 18:30:39 +0000 (18:30 +0000)]
doc: update pcap guide
Add note about PMD expects the network interfaces provided to be up,
documented behavior to set expectations right.
Also added minor fix.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Moti Haimovsky [Wed, 17 Jan 2018 14:30:13 +0000 (16:30 +0200)]
net/failsafe: use new Rx offloads API
Ethdev Rx offloads API has changed since:
commit
ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
This commit adds support for the new Rx offloads API.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Moti Haimovsky [Wed, 17 Jan 2018 14:30:12 +0000 (16:30 +0200)]
net/failsafe: use new Tx offloads API
Ethdev Tx offloads API has changed since:
commit
cba7f53b717d ("ethdev: introduce Tx queue offloads API")
This commit adds support for the new Tx offloads API.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Hemant Agrawal [Mon, 15 Jan 2018 11:38:06 +0000 (17:08 +0530)]
bus/fslmc: adjust to dpaa2 eventdev disabling
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Nipun Gupta [Mon, 15 Jan 2018 11:38:05 +0000 (17:08 +0530)]
net/dpaa2: use hash FLCTYPE only for LX2
Enabling hash results in FD requires setting DPNI_FLCTYPE_HASH in
dpni_set_offload API. Setting this FLCTYPE for DPNI sets the FD[SC]
to 0 for LS2 in the hardware thus disabling data/annotation stashing.
For LX2 this is fixed in hardware and thus hash result and parse
results can be received in FD using this option.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Mon, 15 Jan 2018 11:38:04 +0000 (17:08 +0530)]
net/dpaa2: change VLAN filter rule to be called on config
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Mon, 15 Jan 2018 11:38:03 +0000 (17:08 +0530)]
net/dpaa2: optimize Rx/Tx path
Merge the offload with parse function to save on instructions.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Mon, 15 Jan 2018 11:38:02 +0000 (17:08 +0530)]
net/dpaa2: support more than 16 burst size in Rx
This patch enhances the Rx function to support more than
16 burst size.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Rasesh Mody [Fri, 12 Jan 2018 21:50:01 +0000 (13:50 -0800)]
net/qede: replace config option with run-time arg
This patch adds support for handling run-time driver arguments.
We have removed config option for per VF Tx switching and added
a run-time argument vf_txswitch. By default, the VF Tx switching is
enabled however it can be disabled using run-time argument.
Sample usage to disable per port VF Tx switching is something like...
-w 05:00.0,vf_txswitch=0 -w 05:00.1,vf_txswitch=0
Fixes:
1282943aa05b ("net/qede: fix default config option")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Thomas Monjalon [Sun, 21 Jan 2018 22:08:58 +0000 (23:08 +0100)]
examples/eventdev: fix build with GCC < 5
Some errors were seen with GCC 4.8 and 4.9.
It looks to be a bug fixed in GCC 5.
examples/eventdev_pipeline/pipeline_worker_generic.c:474:4: error:
missing initializer for field 'queue_id' of 'struct <anonymous>'
examples/eventdev_pipeline/pipeline_worker_generic.c:475:3: error:
missing initializer for field 'priority' of 'struct <anonymous>'
examples/eventdev_pipeline/pipeline_worker_tx.c:630:2: error:
missing initializer for field 'queue_id' of 'struct <anonymous>'
The workaround is to not use initializer statement,
but to use memset and standard assignment.
Fixes:
84dde5de10a2 ("examples/eventdev: support Rx adapter")
Fixes:
fa8054c8c889 ("examples/eventdev: add thread safe Tx worker pipeline")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Andrew Rybchenko [Sun, 21 Jan 2018 09:48:39 +0000 (09:48 +0000)]
event/opdl: fix build using C99 mode
RHEL 7.4 gcc (GCC) 4.8.5
20150623 (Red Hat 4.8.5-16)
‘for’ loop initial declarations are only allowed in C99 mode
Fixes:
4236ce9bf5bf ("event/opdl: add OPDL ring infrastructure library")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Radu Nicolau [Thu, 18 Jan 2018 16:07:38 +0000 (16:07 +0000)]
examples/ipsec-secgw: try end in flow actions before fail
After trying RSS and Queue also try End for flow action
to allow for HW that don't support flow features with
inline crypto.
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
Pablo de Lara [Wed, 13 Dec 2017 15:54:08 +0000 (15:54 +0000)]
cryptodev: remove duplicated device name length
Two macros were defined in cryptodev, to serve the same
purpose: RTE_CRYPTODEV_NAME_LEN (in the config file) and
RTE_CRYPTODEV_NAME_MAX_LEN (in the rte_cryptodev.h file).
Since the second one is part of the external API,
the first one has been removed, avoiding duplications.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Tomasz Duszynski <tdu@semihalf.com>
Nélio Laranjeiro [Thu, 11 Jan 2018 09:15:59 +0000 (10:15 +0100)]
examples/ipsec-secgw: fix SPI byte order in flow item
SPI field is defined in the RFC2406 [1] as a big endian field it should be
provided in its final form to the drivers through RTE flow.
[1] https://tools.ietf.org/html/rfc2406
Fixes:
ec17993a145a ("examples/ipsec-secgw: support security offload")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Nélio Laranjeiro [Thu, 11 Jan 2018 09:15:58 +0000 (10:15 +0100)]
net: fix ESP header byte ordering definition
ESP header is defined in the RFC2406 [1] as Big Endian fields it should use
the corresponding types in DPDK as well.
[1] https://tools.ietf.org/html/rfc2406
Fixes:
d4b684f7197a ("net: add ESP header to generic flow steering")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Radu Nicolau [Thu, 18 Jan 2018 15:41:43 +0000 (15:41 +0000)]
examples/ipsec_secgw: create session mempools for ethdevs
Also moved offloaded packets from cryptodev queues
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
Radu Nicolau [Thu, 18 Jan 2018 15:41:42 +0000 (15:41 +0000)]
net/ixgbe: get security session size
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Radu Nicolau [Thu, 18 Jan 2018 15:41:41 +0000 (15:41 +0000)]
security: get session size
Add function to get security session size.
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Nélio Laranjeiro [Mon, 18 Dec 2017 10:24:37 +0000 (11:24 +0100)]
examples/ipsec-secgw: add egress flow actions
Add egress flow create for devices supporting
RTE_SECURITY_TX_HW_TRAILER_OFFLOAD.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Nélio Laranjeiro [Mon, 18 Dec 2017 10:24:36 +0000 (11:24 +0100)]
examples/ipsec-secgw: add target queues in flow actions
Mellanox INNOVA NIC needs to have final target queue actions to perform
inline crypto.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Nélio Laranjeiro [Mon, 18 Dec 2017 10:24:35 +0000 (11:24 +0100)]
examples/ipsec-secgw: fix missing ingress flow attribute
Generic flow API have both direction bits, ingress and egress for rules
which may work on both sides.
Fixes:
ec17993a145a ("examples/ipsec-secgw: support security offload")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Akhil Goyal [Thu, 11 Jan 2018 11:55:36 +0000 (17:25 +0530)]
examples/ipsec-secgw: fix corner case for SPI value
IPSec application is using index 0 of SA table as error,
with current value of IPSEC_SA_MAX_ENTRIES(128) it can
not support SA with spi = 128, as it uses sa_idx = 0
in the SA table.
With this patch, sa_idx = 0 can also be used.
PS: spi = 0 is an invalid SPI and application throws error
for it.
Fixes:
d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")
Cc: stable@dpdk.org
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Akhil Goyal [Thu, 14 Dec 2017 07:19:23 +0000 (12:49 +0530)]
examples/ipsec-secgw: improve IPsec dequeue logic
Since the processing of crypto operations may take time
due to hardware offload, all the packets may not be available
in the single dequeue command.
So it may happen that there is leakage of cops, and there is
nobody to dequeue the packets because dequeue of crypto ops is
done only once for a particular queue pair even if it has more
packets in flight.
This patch dequeue the packets again if the inflight packets are
more than the max packet burst.
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Akhil Goyal [Thu, 11 Jan 2018 11:44:06 +0000 (17:14 +0530)]
crypto/dpaa_sec: rewrite Rx/Tx path
Rx and Tx patch are rewritten with improved internal APIs
to improve performance.
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Alok Makhariya [Tue, 16 Jan 2018 11:08:17 +0000 (16:38 +0530)]
crypto/dpaa_sec: retire fq while detaching with session
Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Akhil Goyal [Mon, 15 Jan 2018 12:42:12 +0000 (18:12 +0530)]
examples/ipsec-secgw: update incremental checksum
When TTL is decremented or ecn is updated in IP header
before forwarding the packet, checksum needs to be updated.
In this patch an incremental checksum is added for ipv4 case.
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Akhil Goyal [Thu, 14 Dec 2017 07:05:30 +0000 (12:35 +0530)]
examples/ipsec-secgw: update mbuf packet type
Packet_type should be updated to remove/add L4 type for
encrypted/decrypted packet
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Akhil Goyal [Mon, 15 Jan 2018 06:35:53 +0000 (12:05 +0530)]
crypto/dpaa_sec: support IPsec protocol offload
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Hemant Agrawal [Mon, 15 Jan 2018 06:35:52 +0000 (12:05 +0530)]
crypto/dpaa_sec: support multiple sessions per queue pair
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Hemant Agrawal [Mon, 15 Jan 2018 06:35:51 +0000 (12:05 +0530)]
crypto/dpaa_sec: optimize virtual address conversion
Context memory is allocated from mempool. Ideally
it will get all memory from single segment, so simple offset
calculation is used for address conversion for such addresses
from context memory.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Akhil Goyal [Thu, 14 Dec 2017 06:52:02 +0000 (12:22 +0530)]
examples/ipsec-secgw: add cryptodev mask option
Previously, ipsec-secgw application did not give user the
flexibility to decide which crypto device(s) will be used.
In this patch, a new cryptodev_mask option is added to the
application. Same as portmask, the cryptodev_mask avails the
user to mask out the unwanted crypto devices in the system.
This patch is similar to the support added in l2fwd-crypto
(
d2797f51cc63: examples/l2fwd-crypto: add cryptodev mask option)
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Anoob Joseph [Mon, 18 Dec 2017 07:15:05 +0000 (07:15 +0000)]
examples/ipsec-secgw: support inline protocol
Adding support for inline protocol processing
In ingress side, application will receive regular IP packets, without
any IPsec related info. Application will do a selector check (SP-SA
check) by making use of the metadata from the packet. The
device-specific metadata in mbuf would aid in determing the security
session which processed the packet.
In egress side, the plain packet would be submitted to the driver. The
packet will have optional metadata, which could be used to identify the
security session associated with the packet.
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
Anoob Joseph [Mon, 18 Dec 2017 07:15:04 +0000 (07:15 +0000)]
security: support user data retrieval
In case of inline protocol processed ingress traffic, the packet may not
have enough information to determine the security parameters with which
the packet was processed. In such cases, application could get metadata
from the packet which could be used to identify the security parameters
with which the packet was processed.
Application could register "userdata" with the security session, and
this could be retrieved from the metadata of inline processed packets.
The metadata returned by "rte_security_get_pkt_metadata()" will be
device specific. Also the driver is expected to return the application
registered "userdata" as is, without any modifications.
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Pablo de Lara [Wed, 13 Dec 2017 13:14:08 +0000 (13:14 +0000)]
app/crypto-perf: support IMIX
Add support for IMIX performance tests, where a distribution
of various packet sizes can be submitted to a crypto
device, testing a closer to a real world scenario.
A sequence of packet sizes, selected randomly from a list of packet
sizes (with "buffer-sz" parameter) with a list of the weights
per packet size (using "imix" parameter), is generated
(the length of this sequence is the same length as the pool,
set with "pool-sz" parameter).
This sequence is used repeteadly for all the crypto
operations submitted to the crypto device (with "--total-ops" parameter).
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Pablo de Lara [Wed, 13 Dec 2017 15:55:00 +0000 (15:55 +0000)]
cryptodev: fix function prototype
qp_detach_session function was using the attach_session_t
function prototype, instead of detach_session_t.
Since both of them have the same parameters, there were
no compilation issues, but it is not consistent.
Fixes:
d816fdea557c ("cryptodev: add API to associate session with queue pair")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Wed, 13 Dec 2017 15:54:38 +0000 (15:54 +0000)]
cryptodev: add missing CPU flag string
CPU flag AVX512 was added in a previous release,
but it was not added in the list of strings.
Fixes:
84d796586604 ("crypto/aesni_mb: support AVX512")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tomasz Duszynski [Tue, 9 Jan 2018 09:08:48 +0000 (10:08 +0100)]
doc: update mrvl crypto guide
Update MRVL CRYPTO PMD documentation.
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Fan Zhang [Tue, 19 Dec 2017 15:34:30 +0000 (15:34 +0000)]
crypto/aesni_mb: support AES-CCM
Add support to AES-CCM, for 128-bit keys.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Akhil Goyal [Wed, 13 Dec 2017 07:15:08 +0000 (12:45 +0530)]
security: fix enum start value
enum should be initialized with 1 so that unitialized(memset)
memory may not be treated as a valid enum value.
Fixes:
c261d1431bd8 ("security: introduce security API and framework")
Cc: stable@dpdk.org
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Nélio Laranjeiro [Thu, 23 Nov 2017 10:02:39 +0000 (11:02 +0100)]
security: fix pedantic compilation
/x86_64-native-linuxapp-gcc/include/rte_security.h:229:8:
error: struct has no members [-Werror=pedantic]
struct rte_security_macsec_xform {
^~~~~~~~~~~~~~~~~~~~~~~~~
/x86_64-native-linuxapp-gcc/include/rte_security.h:453:3:
error: struct has no members [-Werror=pedantic]
struct {
^~~~~~
Fixes:
c261d1431bd8 ("security: introduce security API and framework")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Nélio Laranjeiro [Thu, 23 Nov 2017 10:02:38 +0000 (11:02 +0100)]
crypto: fix pedantic compilation
/x86_64-native-linuxapp-gcc/include/rte_crypto.h:126:28:
error: ISO C forbids zero-size array ‘sym’ [-Werror=pedantic]
struct rte_crypto_sym_op sym[0];
^~~
Zero-size array is an extension to the language it cannot be replaced by a
empty size array i.e. [] because structure is inside a union.
Fixes:
d2a4223c4c6d ("cryptodev: do not store pointer to op specific params")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Nélio Laranjeiro [Thu, 23 Nov 2017 10:02:37 +0000 (11:02 +0100)]
security: fix device operation type
Device operation pointers should be constant to avoid any modification
while it is in use.
Fixes:
c261d1431bd8 ("security: introduce security API and framework")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Pablo de Lara [Tue, 19 Dec 2017 09:27:55 +0000 (09:27 +0000)]
doc: update IPSec Multi-buffer lib versioning
IPSec Multi-buffer library v0.48 has been released,
which includes, among other features, support for AES-CCM.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
Anoob Joseph [Tue, 12 Dec 2017 08:32:25 +0000 (08:32 +0000)]
examples/ipsec-secgw: fix usage of incorrect port
When security offload is enabled, the packet should be forwarded on the
port configured in the SA. Security session will be configured on that
port only, and sending the packet on other ports could result in
unencrypted packets being sent out.
This would have performance improvements too, as the per packet LPM
lookup would be avoided for IPsec packets, in inline mode.
Fixes:
ec17993a145a ("examples/ipsec-secgw: support security offload")
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Jerin Jacob [Tue, 28 Nov 2017 12:50:59 +0000 (18:20 +0530)]
test/crypto: fix missing include
time() is defined in time.h
Fixes:
ffbe3be0d4 ("app/test: add libcrypto")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Billy O'Mahony [Mon, 27 Nov 2017 11:40:28 +0000 (11:40 +0000)]
cryptodev: extend sym session doxygen info
Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Billy O'Mahony [Mon, 27 Nov 2017 11:13:36 +0000 (11:13 +0000)]
doc: fix typo in QAT quide
Fixes:
1703e94ac5ce ("qat: add driver for QuickAssist devices")
Cc: stable@dpdk.org
Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Andrea Grandi [Wed, 22 Nov 2017 18:03:12 +0000 (10:03 -0800)]
doc: fix format in OpenSSL installation guide
List of supported OpenSSL versions and code block with dependencies were
not properly formatted.
Fixes:
d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Cc: stable@dpdk.org
Signed-off-by: Andrea Grandi <andrea.grandi@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Andrea Grandi [Wed, 22 Nov 2017 18:03:11 +0000 (10:03 -0800)]
doc: fix lists of supported crypto algorithms
Add a missing space must before the first item of the list to display it
correctly in the User Guide.
Fixes:
d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Fixes:
b79e4c00af0e ("cryptodev: use AES-GCM/CCM as AEAD algorithms")
Cc: stable@dpdk.org
Signed-off-by: Andrea Grandi <andrea.grandi@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Aleksey Baulin [Sun, 19 Nov 2017 22:16:04 +0000 (01:16 +0300)]
eal: improve likely and unlikely macros
A warning is issued when using an argument to likely() or unlikely()
builtins which is evaluated to a pointer value, as __builtin_expect()
expects a 'long int' type for its first argument. With this fix
a pointer value is converted to an integer with the value of 0 or 1.
Signed-off-by: Aleksey Baulin <aleksey.baulin@gmail.com>
Herbert Guan [Fri, 19 Jan 2018 06:10:36 +0000 (14:10 +0800)]
eal/arm64: optimize memcpy
This patch provides an option to do rte_memcpy() using 'restrict'
qualifier, which can induce GCC to do optimizations by using more
efficient instructions, providing some performance gain over memcpy()
on some ARM64 platforms/enviroments.
The memory copy performance differs between different ARM64
platforms. And a more recent glibc (e.g. 2.23 or later)
can provide a better memcpy() performance compared to old glibc
versions. It's always suggested to use a more recent glibc if
possible, from which the entire system can get benefit. If for some
reason an old glibc has to be used, this patch is provided for an
alternative.
This implementation can improve memory copy on some ARM64
platforms, when an old glibc (e.g. 2.19, 2.17...) is being used.
It is disabled by default and needs "RTE_ARCH_ARM64_MEMCPY"
defined to activate. It's not always proving better performance
than memcpy() so users need to run DPDK unit test
"memcpy_perf_autotest" and customize parameters in "customization
section" in rte_memcpy_64.h for best performance.
Compiler version will also impact the rte_memcpy() performance.
It's observed on some platforms and with the same code, GCC 7.2.0
compiled binary can provide better performance than GCC 4.8.5. It's
suggested to use GCC 5.4.0 or later.
Signed-off-by: Herbert Guan <herbert.guan@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Maxime Coquelin [Fri, 12 Jan 2018 10:22:20 +0000 (11:22 +0100)]
bus/pci: forbid IOVA mode if IOMMU address width too small
Intel VT-d supports different address widths for the IOVAs, from
39 bits to 56 bits.
While recent processors support at least 48 bits, VT-d emulation
currently only supports 39 bits. It makes DMA mapping to fail in this
case when using VA as IOVA mode, as user-space virtual addresses uses
up to 47 bits (see kernel's Documentation/x86/x86_64/mm.txt).
This patch parses VT-d CAP register value available in sysfs, and
forbid VA as IOVA mode if the GAW is 39 bits or unknown.
Fixes:
f37dfab21c98 ("drivers/net: enable IOVA mode for Intel PMDs")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Chas Williams <chas3@att.com>
Jonas Pfefferle [Tue, 31 Oct 2017 15:59:46 +0000 (16:59 +0100)]
vfio: improve noiommu check error handling
Kernels v4.4 and earlier does have vfio, but not
the noiommu mode, so the file does not exist.
Check and report errors on open/read in noiommu check.
Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Elza Mathew [Mon, 6 Nov 2017 18:04:49 +0000 (10:04 -0800)]
hash: select fbk function at run-time
Compile-time function selection can potentially lead to
lower performance on generic builds done by distros.
Replaced compile time flag checks with run-time function
selection.
Signed-off-by: Elza Mathew <elza.mathew@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Elza Mathew [Mon, 6 Nov 2017 18:04:02 +0000 (10:04 -0800)]
hash: select cuckoo function at run-time
Compile-time function selection can potentially lead to
lower performance on generic builds done by distros.
Replaced compile time flag checks with run-time function
selection.
Signed-off-by: Elza Mathew <elza.mathew@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Akhil Goyal [Thu, 18 Jan 2018 11:20:47 +0000 (16:50 +0530)]
maintainers: update for ipsec-secgw
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Nipun Gupta [Wed, 3 Jan 2018 16:44:19 +0000 (22:14 +0530)]
event/dpaa2: return correct number of event ports
In the info get API we were returning number of event
ports as MAX number of LCORE's. After this change actual
number of event ports (i.e. number of DPIO's) is provided
in the info get API.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Sunil Kumar Kori [Tue, 16 Jan 2018 20:44:03 +0000 (02:14 +0530)]
doc: add DPAA eventdev guide
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Sunil Kumar Kori [Tue, 16 Jan 2018 20:44:02 +0000 (02:14 +0530)]
event/dpaa: add enqueue/dequeue
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Sunil Kumar Kori [Tue, 16 Jan 2018 20:44:01 +0000 (02:14 +0530)]
event/dpaa: add eth Rx adapter queue config
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Sunil Kumar Kori [Tue, 16 Jan 2018 20:44:00 +0000 (02:14 +0530)]
event/dpaa: add port config get/set
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Sunil Kumar Kori [Tue, 16 Jan 2018 20:43:59 +0000 (02:13 +0530)]
event/dpaa: add queue config get/set
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Sunil Kumar Kori [Tue, 16 Jan 2018 20:43:58 +0000 (02:13 +0530)]
event/dpaa: introduce PMD
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Sunil Kumar Kori [Tue, 16 Jan 2018 20:43:57 +0000 (02:13 +0530)]
net/dpaa: support Rx queue configurations with eventdev
Given ethernet Rx queues can be attached with event queue in
parallel or atomic mode. Patch imlmplements Rx queue
configuration, attachment/detachment with given event queue and their
corresponding callbacks to handle events from respective queues.
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Sunil Kumar Kori [Tue, 16 Jan 2018 20:43:56 +0000 (02:13 +0530)]
bus/dpaa: support dynamic logging
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Sunil Kumar Kori [Tue, 16 Jan 2018 20:43:55 +0000 (02:13 +0530)]
bus/dpaa: support event dequeue and consumption
To receive events from given event port, corresponding
function needs to be added which receives events
from portal. Also added function to consume received
events based on entry index.
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Sunil Kumar Kori [Tue, 16 Jan 2018 20:43:54 +0000 (02:13 +0530)]
config: enable compilation of DPAA eventdev PMD
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Nipun Gupta [Wed, 17 Jan 2018 11:39:14 +0000 (17:09 +0530)]
net/dpaa2: support atomic queues
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Nipun Gupta [Wed, 17 Jan 2018 11:39:13 +0000 (17:09 +0530)]
bus/fslmc: add flag to configure DCA in QBMAN multi Tx
With the current QBMAN multi-tx API, we need to create separate
enqueue descriptors for each of the packet which is required to
be enqueued to the hardware, once we support Atomic Queues
(with DCA) in dpaa2 drivers. Creating enqueue descriptor for
each packet is costly and have significant performance impact.
This patch introduces a flag parameter in the QBMAN multi-tx API,
so that DCA configuration (and later on ORP/ODP for ordered queues)
can be passed using flags and be updated in the EQCR using this flag.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Nipun Gupta [Wed, 17 Jan 2018 11:39:12 +0000 (17:09 +0530)]
event/dpaa2: have separate structure to hold dqrr entries
This patch provides cleaner approach to store the DQRR entries,
which are yet to be consumed in case of atomic queues.
Also, this patch changes the storage of the DQRR entry index
into the mbuf->seqn instead of ev->opaque
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Nipun Gupta [Wed, 17 Jan 2018 11:39:11 +0000 (17:09 +0530)]
event/dpaa2: use dqrr index to consume the DQRR entry
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Nipun Gupta [Wed, 17 Jan 2018 11:39:10 +0000 (17:09 +0530)]
bus/fslmc: introduce API to consume dqrr using index
A new API qbman_swp_dqrr_idx_consume is defined which takes
input as DQRR index to consume corresponding DQRR entry.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Nipun Gupta [Wed, 17 Jan 2018 11:39:09 +0000 (17:09 +0530)]
event/dpaa2: replace static with dynamic logging
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:07 +0000 (23:16 +0530)]
doc: add eventdev apps changes in release notes
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:06 +0000 (23:16 +0530)]
doc: add pipeline atq test in testeventdev guide
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:05 +0000 (23:16 +0530)]
doc: add pipeline queue test in testeventdev guide
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:04 +0000 (23:16 +0530)]
app/eventdev: add pipeline atq worker functions
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:03 +0000 (23:16 +0530)]
app/eventdev: add pipeline atq test
This is a pipeline test case that aims at testing the following with
``all types queue`` eventdev scheme.
1. Measure the end-to-end performance of an event dev with a ethernet dev.
2. Maintain packet ordering from Rx to Tx.
The atq queue test functions as same as ``pipeline_queue`` test.
The difference is, It uses, ``all type queue scheme`` instead of separate
queues for each stage and thus reduces the number of queues required to
realize the use case.
Note: The --prod_type_ethdev is mandatory for running the application.
Example command to run pipeline atq test:
sudo build/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \
--test=pipeline_atq --wlcore=1 --prod_type_ethdev --stlist=ao
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:02 +0000 (23:16 +0530)]
app/eventdev: add pipeline queue worker functions
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:01 +0000 (23:16 +0530)]
app/eventdev: add pipeline queue test
This is a pipeline queue test case that aims at testing the following:
1. Measure the end-to-end performance of an event dev with a ethernet dev.
2. Maintain packet ordering from Rx to Tx.
The pipeline queue test configures the eventdev with Q queues and P ports,
where Q is (nb_ethdev * nb_stages) + nb_ethdev and P is nb_workers.
The user can choose the number of workers and number of stages through the
--wlcores and the --stlist application command line arguments respectively.
The probed ethernet devices act as producer(s) for this application.
The ethdevs are configured as event Rx adapters that enables them to
injects events to eventdev based the first stage schedule type list
requested by the user through --stlist the command line argument.
Based on the number of stages to process(selected through --stlist),
the application forwards the event to next upstream queue and when it
reaches last stage in the pipeline if the event type is ATOMIC it is
enqueued onto ethdev Tx queue else to maintain ordering the event type is
set to ATOMIC and enqueued onto the last stage queue.
On packet Tx, application increments the number events processed and print
periodically in one second to get the number of events processed in one
second.
Note: The --prod_type_ethdev is mandatory for running the application.
Example command to run pipeline queue test:
sudo build/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \
--test=pipeline_queue --wlcore=1 --prod_type_ethdev --stlist=ao
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:46:00 +0000 (23:16 +0530)]
app/eventdev: launch pipeline lcores
The event master lcore's test termination and the logic to print the mpps
are common for the queue and all types queue test.
Move them as the common function.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:59 +0000 (23:15 +0530)]
app/eventdev: add Tx service setup
Setup one port event port for Tx and link the respective event queue.
Register the Tx function as a service to be called from a service core.
The Tx function dequeues the events from the event queue and transmits
the packet to its respective ethernet port.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:58 +0000 (23:15 +0530)]
app/eventdev: add event port and Rx adapter setup
Setup one port per worker and link to all queues and setup producer port
based on Rx adapter capabilities.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:57 +0000 (23:15 +0530)]
app/eventdev: add pipeline ethport setup and destroy
Add common ethdev port setup and destroy along with event dev destroy.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:56 +0000 (23:15 +0530)]
app/eventdev: add pipeline opt dump and check functions
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:55 +0000 (23:15 +0530)]
app/eventdev: add mempool setup and destroy
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:54 +0000 (23:15 +0530)]
app/eventdev: add pipeline test setup and destroy
Pipeline test has the queue and all types queue variants.
Introduce test_pipeline_common* to share the common code between those
tests.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pavan Nikhilesh [Tue, 16 Jan 2018 17:45:53 +0000 (23:15 +0530)]
app/eventdev: add packet distribution logs
Add logs for packet distribution across worker cores to be printed
along with the test results.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:12 +0000 (16:40 +0530)]
examples/eventdev: rename example
Rename eventdev_pipeline_sw_pmd to eventdev_pipeline as it is no longer
specific underlying event device.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:11 +0000 (16:40 +0530)]
examples/eventdev: add mempool size configuration
Add option to configure the mempool size at run time instead of
hardcoding it to 16384 * num_ports.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:10 +0000 (16:40 +0530)]
examples/eventdev: add atq single stage pipeline worker
Add optimized eventdev pipeline when ethdev supports thread safe Tx,
number of configured stages is one and all type queue option is enabled.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:09 +0000 (16:40 +0530)]
examples/eventdev: add single stage pipeline worker
Add optimized eventdev pipeline when ethdev supports thread safe Tx
and number of configured stages is one.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:08 +0000 (16:40 +0530)]
examples/eventdev: add all type queue option
Added configurable option to make queue type as all type queues i.e.
RTE_EVENT_QUEUE_CFG_ALL_TYPES based on event dev capability
RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES.
This can be enabled by supplying '-a' as a cmdline argument.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:07 +0000 (16:40 +0530)]
examples/eventdev: add burst for thread safe pipeline
Add burst mode worker pipeline when Tx is multi thread safe.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:06 +0000 (16:40 +0530)]
examples/eventdev: add thread safe Tx worker pipeline
Add worker pipeline when Tx is multi thread safe.
Probe Ethernet dev capabilities and select it it is supported.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:05 +0000 (16:40 +0530)]
examples/eventdev: modify work cycles
The current work cycles function exchanges source and destination mac
address and also pauses the core for the given cycles.
This patch splits the function into two parts i.e. exchange mac and
pause the cores. The pause cores function is invoked at every stage
where as exchange mac is invoked when packet is transmitted.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:04 +0000 (16:40 +0530)]
examples/eventdev: add non burst mode generic worker
Currently, worker uses burst dequeue and burst enqueue to forward events.
Add a non burst mode based on the event dev capabilities.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:03 +0000 (16:40 +0530)]
examples/eventdev: add ops to check cmdline args
Each eventdev pipeline needs to allow different cmdline args combination
based on pipeline type.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Pavan Nikhilesh [Wed, 10 Jan 2018 11:10:02 +0000 (16:40 +0530)]
examples/eventdev: add generic worker pipeline
Rename existing pipeline as generic worker pipeline.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>