Olivier Matz [Mon, 3 Oct 2016 08:38:57 +0000 (10:38 +0200)]
app/testpmd: display software packet type
In addition to the packet type returned by the PMD, also display the
packet type calculated by parsing the packet in software. This is
particularly useful to compare the 2 values.
Note: it does not mean that both hw and sw always have to provide the
same value, since it depends on what hardware supports.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:56 +0000 (10:38 +0200)]
app/testpmd: dump packet type with new function
Use the function introduced in previous commit to dump the packet type
of the received packet.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:55 +0000 (10:38 +0200)]
mbuf: clarify definition of fragment packet types
An IPv4 packet is considered as a fragment if:
- MF (more fragment) bit is set
- or Fragment_Offset field is non-zero
Update the API documentation of packet types to reflect this.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:54 +0000 (10:38 +0200)]
mbuf: add functions to dump packet type
Dumping the packet type is useful for debug purposes. Instead
of having each application providing its function to do that,
introduce functions to do it.
It factorizes the code and reduces the risk of desynchronization between
the new packet types and the dump function.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:53 +0000 (10:38 +0200)]
net: get packet type for the first layers only
Add a parameter to rte_net_get_ptype() to select which
layers should be parsed. This avoids to parse all layers if
only the first ones are required.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:52 +0000 (10:38 +0200)]
net: support NVGRE in software packet type parser
Add support of Nvgre tunnels in rte_net_get_ptype(). At the same
time, as Nvgre transports Ethernet, we need to add the support for inner
Vlan, QinQ, and Mpls.
Signed-off-by: Jean Dao <jean.dao@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:51 +0000 (10:38 +0200)]
net: support GRE in software packet type parser
Add support of Gre tunnels in rte_net_get_ptype().
Signed-off-by: Jean Dao <jean.dao@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:50 +0000 (10:38 +0200)]
net: add GRE header structure
Add the Gre header structure in librte_net. It will be used by next
patches that adds the support of Gre tunnels in the software packet type
parser.
The extended headers (checksum, key or sequence number) are not defined.
Signed-off-by: Jean Dao <jean.dao@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:49 +0000 (10:38 +0200)]
net: support IP tunnels in software packet type parser
Add support of IP and IP6 tunnels in rte_net_get_ptype().
We need to duplicate some code because the packet types do not have the
same value for a given protocol between inner and outer.
Signed-off-by: Jean Dao <jean.dao@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:48 +0000 (10:38 +0200)]
net: support QinQ in software packet type parser
Add a new RTE_PTYPE_L2_ETHER_QINQ packet type, and its support in
rte_net_get_ptype().
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:47 +0000 (10:38 +0200)]
net: support VLAN in software packet type parser
Add a new RTE_PTYPE_L2_ETHER_VLAN packet type, and its support in
rte_net_get_ptype().
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:46 +0000 (10:38 +0200)]
net: add function to get packet type from data
Introduce the function rte_net_get_ptype() that parses a mbuf and
returns its packet type. For now, the following packet types are parsed:
L2: Ether
L3: IPv4, IPv6
L4: TCP, UDP, SCTP
The goal here is to provide a reference implementation for packet type
parsing. This function will be used by testpmd in next commits, allowing
to compare its result with the value given by the hardware.
This function will also be useful when implementing Rx offload support
in virtio pmd. Indeed, the virtio protocol gives the csum start and
offset, but it does not give the L4 protocol nor it tells if the
checksum is relevant for inner or outer. This information has to be
known to properly set the ol_flags in mbuf.
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: Jean Dao <jean.dao@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:45 +0000 (10:38 +0200)]
net: introduce net library
Previously, librte_net only contained header files. Add a C file
(empty for now) and generate a library. It will contain network helpers
like checksum calculation, software packet type parser, ...
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:44 +0000 (10:38 +0200)]
mbuf: move packet type definitions in a new file
The file rte_mbuf.h starts to be quite big, and next commits
will introduce more functions related to packet types. Let's
move them in a new file.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:43 +0000 (10:38 +0200)]
net: move ethernet definitions to the net library
The proper place for rte_ether.h is in librte_net because it defines
network headers.
Moving it will also prevent to have circular references in the following
patches that will require the Ethernet header definition in rte_mbuf.c.
By the way, fix minor checkpatch issues.
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Olivier Matz [Mon, 3 Oct 2016 08:38:42 +0000 (10:38 +0200)]
mbuf: add function to read packet data
Introduce a new function to read the packet data from an mbuf chain. It
linearizes the data if required, and also ensures that the mbuf is large
enough.
This function is used in next commits that add a software parser to
retrieve the packet type.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
David Marchand [Fri, 7 Oct 2016 13:01:16 +0000 (15:01 +0200)]
ethdev: fix vendor id in debug message
Fixes:
af75078fece3 ("first public release")
Signed-off-by: David Marchand <david.marchand@6wind.com>
David Marchand [Fri, 7 Oct 2016 13:01:15 +0000 (15:01 +0200)]
ethdev: fix hotplug attach
If a pci probe operation creates a port but, for any reason, fails to
finish this operation and decides to delete the newly created port, then
the last created port id can not be trusted anymore and any subsequent
attach operations will fail.
This problem was noticed while working on a vm that had a virtio-net
management interface bound to the virtio-net kernel driver and no port
whitelisted in the commandline:
root@ubuntu1404:~/dpdk# ./build/app/testpmd -c 0x6 --
-i --total-num-mbufs=2049
EAL: Detected 3 lcore(s)
EAL: Probing VFIO support...
EAL: Debug logs available - lower performance
EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using
unreliable clock cycles !
EAL: PCI device 0000:00:03.0 on NUMA socket -1
EAL: probe driver: 1af4:1000 (null)
rte_eth_dev_pci_probe: driver (null): eth_dev_init(vendor_id=0x6900
device_id=0x1000) failed
EAL: No probed ethernet devices
^
|
Here, rte_eth_dev_pci_probe() fails since vtpci_init() reports an
error. This results in a rte_eth_dev_release_port() right after a
rte_eth_dev_allocate().
Then, if we try to attach a port using rte_eth_dev_attach:
testpmd> port attach net_ring0
Attaching a new port...
PMD: Initializing pmd_ring for net_ring0
PMD: Creating rings-backed ethdev on numa socket 0
Two solutions:
- either update the last created port index to something invalid
(when freeing a ethdev port),
- or rely on the port count, before and after the eal attach.
The latter solution seems (well not really more robust but at least)
less fragile than the former.
We still have some issues with drivers that create multiple ethdev
ports with a single probe operation, but this was already the case.
Fixes:
b0fb26685570 ("ethdev: convert to EAL hotplug")
Reported-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Jianfeng Tan [Mon, 26 Sep 2016 13:48:34 +0000 (13:48 +0000)]
app/testpmd: support tunneled TSO in checksum engine
Add a new command "tunnel_tso set <tso_segsz> <port>" to enable
segmentation offload and set MSS to tso_segsz. Another command,
"tunnel_tso show <port>" is added to show tunneled packet MSS.
Result 0 means tunnel_tso is disabled.
The original commands, "tso set <tso_segsz> <port>" and "tso show
<port>" are only reponsible for non-tunneled packets. And the new
commands are for tunneled packets.
Below conditions are needed to make it work:
a. tunnel TSO is supported by the NIC;
b. "csum parse_tunnel" must be set so that tunneled pkts are
recognized;
c. for tunneled pkts with outer L3 is IPv4, "csum set outer-ip"
must be set to hw, because after tso, total_len of outer IP
header is changed, and the checksum of outer IP header calculated
by sw should be wrong; that is not necessary for IPv6 tunneled
pkts because there's no checksum field to be filled anymore.
Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jianfeng Tan [Mon, 1 Aug 2016 03:56:54 +0000 (03:56 +0000)]
net/i40e: support TSO on tunneling packet
To enable Tx side offload on tunneling packet, driver should set
correct tunneling parameters: (1) EIPT, External IP header type;
(2) EIPLEN, External IP; (3) L4TUNT; (4) L4TUNLEN. This parsing
behavior is based on (ol_flag & PKT_TX_TUNNEL_MASK). And when
it's a tunneling packet, MACLEN defines the outer L2 header.
Also, we define TSO on each kind of tunneling type as a capabilities.
Now only i40e declares to support them.
Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Jianfeng Tan [Mon, 1 Aug 2016 03:56:53 +0000 (03:56 +0000)]
mbuf: add Tx side tunneling type
To support tunneling packet offload capabilities on Tx side, PMDs
(e.g., i40e) need to know what kind of tunneling type of this packet.
Instead of analyzing the packet itself, we depend on applications to
correctly set the tunneling type. These flags are defined inside
rte_mbuf.ol_flags.
Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Fiona Trahe [Thu, 6 Oct 2016 17:34:29 +0000 (18:34 +0100)]
app/test: remove crypto queue number hard-coding
ts_params->conf.nb_queue_pairs should not be hard coded with device
specific number. It should be retrieved from the device info.
Any test which changes it should restore it to orig value.
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Fiona Trahe [Thu, 6 Oct 2016 17:34:28 +0000 (18:34 +0100)]
app/test: cleanup unnecessary crypto ring size setup
Removed obsolete comments re inability to free and re-allocate
queue memory and obsolete workaround for it
which used to create maximum size queues first, then later
create smaller queues.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Fiona Trahe [Thu, 6 Oct 2016 17:34:27 +0000 (18:34 +0100)]
app/test: remove useless loop for crypto
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Fiona Trahe [Thu, 6 Oct 2016 17:34:26 +0000 (18:34 +0100)]
crypto/aesni_mb: free ring memory on queue release
Free ring memory on queue_pair release, else
releasing and setting up queue-pair of a different size fails.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Pablo de Lara [Thu, 6 Oct 2016 20:54:59 +0000 (21:54 +0100)]
doc: fix typo in SNOW 3G guide
Fixes:
1d0c90e6cf0b ("doc: update build instructions for libsso_snow3g")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Pablo de Lara [Wed, 5 Oct 2016 02:45:51 +0000 (03:45 +0100)]
cryptodev: fix build on Suse 11 SP2
This commit fixes following build error, which happens in SUSE 11 SP2,
with gcc 4.5.1:
In file included from lib/librte_cryptodev/rte_cryptodev.c:70:0:
lib/librte_cryptodev/rte_cryptodev.h:772:7:
error: flexible array member in otherwise empty struct
Fixes:
347a1e037fd3 ("lib: use C99 syntax for zero-size arrays")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Sergio Gonzalez Monroy [Thu, 29 Sep 2016 15:44:13 +0000 (16:44 +0100)]
examples/ipsec-secgw: initialize SA salt
This patch initializes the salt value used by the following cipher
algorithms:
- CBC: random salt
- GCM/CTR: the key required is 20B, and the last 4B are used as salt.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Sergio Gonzalez Monroy [Thu, 29 Sep 2016 15:44:12 +0000 (16:44 +0100)]
examples/ipsec-secgw: add cryptodev queue size constant
Introduce a specific cryptodev queue size macro.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Sergio Gonzalez Monroy [Thu, 29 Sep 2016 15:44:11 +0000 (16:44 +0100)]
examples/ipsec-secgw: check SP only when setup
Application will segfault if there is IPv4 or IPv6 and no SP/ACL rules
for IPv4 or IPv6 respectively.
Avoid checking the ACL/SP in such cases.
Fixes:
906257e965b7 ("examples/ipsec-secgw: support IPv6")
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Sergio Gonzalez Monroy [Thu, 29 Sep 2016 15:44:10 +0000 (16:44 +0100)]
examples/ipsec-secgw: add AES-CTR
RFC3686: Using AES Counter (CTR) Mode With IPsec ESP.`
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Sergio Gonzalez Monroy [Thu, 29 Sep 2016 15:44:09 +0000 (16:44 +0100)]
examples/ipsec-secgw: add AES-GCM
Add support for AES-GCM (Galois-Counter Mode).
RFC4106: The Use of Galois-Counter Mode (GCM) in IPSec ESP.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Sergio Gonzalez Monroy [Thu, 29 Sep 2016 15:44:08 +0000 (16:44 +0100)]
examples/ipsec-secgw: reset crypto operation status
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Sergio Gonzalez Monroy [Thu, 29 Sep 2016 15:44:07 +0000 (16:44 +0100)]
examples/ipsec-secgw: change CBC IV generation
NIST SP800-38A recommends two methods to generate unpredictable IVs
(Initilisation Vector) for CBC mode:
1) Apply the forward function to a nonce (ie. counter)
2) Use a FIPS-approved random number generator
This patch implements the first recommended method by using the forward
function to generate the IV.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Slawomir Mrozowicz [Tue, 4 Oct 2016 15:11:22 +0000 (17:11 +0200)]
examples/l2fwd-crypto: update for libcrypto
Libcrypto PMD has support for:
Supported cipher algorithms:
RTE_CRYPTO_CIPHER_3DES_CBC
RTE_CRYPTO_CIPHER_AES_CBC
RTE_CRYPTO_CIPHER_AES_CTR
RTE_CRYPTO_CIPHER_3DES_CTR
RTE_CRYPTO_CIPHER_AES_GCM
Supported authentication algorithms:
RTE_CRYPTO_AUTH_AES_GMAC
RTE_CRYPTO_AUTH_MD5
RTE_CRYPTO_AUTH_SHA1
RTE_CRYPTO_AUTH_SHA224
RTE_CRYPTO_AUTH_SHA256
RTE_CRYPTO_AUTH_SHA384
RTE_CRYPTO_AUTH_SHA512
RTE_CRYPTO_AUTH_MD5_HMAC
RTE_CRYPTO_AUTH_SHA1_HMAC
RTE_CRYPTO_AUTH_SHA224_HMAC
RTE_CRYPTO_AUTH_SHA256_HMAC
RTE_CRYPTO_AUTH_SHA384_HMAC
RTE_CRYPTO_AUTH_SHA512_HMAC
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Slawomir Mrozowicz [Tue, 4 Oct 2016 15:11:21 +0000 (17:11 +0200)]
app/test: add libcrypto
This patch contains unit tests for libcrypto PMD. User can
use app/test application to check how to use this pmd and to
verify crypto processing.
Test name is cryptodev_libcrypto_autotest.
For performance test cryptodev_libcrypto_perftest can be used.
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Slawomir Mrozowicz [Tue, 4 Oct 2016 15:11:20 +0000 (17:11 +0200)]
app/test: rework AES
This patch rework AES tests .
In general - rename AES-named functions to blockcipher functions pattern.
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Slawomir Mrozowicz [Tue, 4 Oct 2016 15:11:19 +0000 (17:11 +0200)]
crypto/libcrypto: add driver for OpenSSL library
This code provides the initial implementation of the libcrypto
poll mode driver. All cryptography operations are using Openssl
library crypto API. Each algorithm uses EVP_ interface from
openssl API - which is recommended by Openssl maintainers.
This patch adds libcrypto poll mode driver support to librte_cryptodev
library.
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Michal Kobylinski <michalx.kobylinski@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pablo de Lara [Thu, 29 Sep 2016 02:59:50 +0000 (03:59 +0100)]
examples/l2fwd-crypto: enable ZUC EEA3 and EIA3
This patch enables ZUC EEA3 cipher algorithm and
ZUC EIA3 authentication algorithm support to
l2fwd-crypto sample application.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Pablo de Lara [Thu, 29 Sep 2016 02:59:49 +0000 (03:59 +0100)]
app/test: add ZUC
Add cipher and authentication ZUC algorithm tests.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Pablo de Lara [Thu, 29 Sep 2016 02:59:48 +0000 (03:59 +0100)]
app/test: rename some SNOW 3G functions
Before adding the new ZUC tests, since they will use
the existing common functions for SNOW3G and KASUMI,
these functions are renamed to *_wireless_algo_*,
instead of *_snow3g_kasumi_*, as they are common
functions for all the three wireless algorithms.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Pablo de Lara [Thu, 29 Sep 2016 02:59:47 +0000 (03:59 +0100)]
crypto/zuc: add driver for ZUC library
Added new SW PMD which makes use of the libsso SW library,
which provides wireless algorithms ZUC EEA3 and EIA3
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_ZUC_EEA3
- RTE_CRYPTO_SYM_AUTH_ZUC_EIA3
The ZUC hash and cipher algorithms, which are enabled
by this crypto PMD are implemented by Intel's libsso software
library.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Fiona Trahe [Mon, 26 Sep 2016 12:57:20 +0000 (13:57 +0100)]
app/test: improve error message for disabled crypto
Improve error message if crypto PMD build is not enabled in config file
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Arek Kusztal [Wed, 28 Sep 2016 11:54:03 +0000 (12:54 +0100)]
app/test: add AES GCM performance test
This patch adds AES Galois Counter Mode performance test case
for cryptodev QAT and AESNI GCM. Test is performed with different
buffer sizes, burst size of 32 and 128b key. Test vectors
are placed in app/test/test_cryptodev_perf_vectors.h file.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Pablo de Lara [Wed, 28 Sep 2016 00:31:27 +0000 (01:31 +0100)]
crypto: fix build with icc
This commit fixes a compilation error on icc,
due to unallowed conversion from int to enum:
drivers/crypto/snow3g/rte_snow3g_pmd.c(155):
error #188: enumerated type mixed with another type
sess->op = mode;
^
drivers/crypto/kasumi/rte_kasumi_pmd.c(155):
error #188: enumerated type mixed with another type
sess->op = mode;
^
Fixes:
3aafc423cf4d ("snow3g: add driver for SNOW 3G library")
Fixes:
2773c86d061a ("crypto/kasumi: add driver for KASUMI library")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Pablo de Lara [Mon, 26 Sep 2016 22:13:20 +0000 (23:13 +0100)]
app/test: remove unnecessary conditional for crypto
Regardless the result of the conditional, the true and false
statements were the same, so the conditional can be removed.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Fan Zhang [Wed, 21 Sep 2016 12:05:19 +0000 (13:05 +0100)]
examples/ipsec-secgw: add sample configuration files
This patch adds two sample configuration files to ipsec-secgw sample
application. The sample configuration files show how to setup
back-to-back systems that would forward traffic through an IPsec
tunnel.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Fan Zhang [Wed, 21 Sep 2016 12:05:18 +0000 (13:05 +0100)]
examples/ipsec-secgw: support configuration file
This patch adds the configuration file support to ipsec_secgw
sample application. Instead of hard-coded rules, the users can
specify their own SP, SA, and routing rules in the configuration
file. A command line option "-f" is added to pass the
configuration file location to the application.
Configuration item formats:
SP rule format:
sp <ip_ver> <dir> esp <action> <priority> <src_ip> <dst_ip> \
<proto> <sport> <dport>
SA rule format:
sa <dir> <spi> <cipher_algo> <cipher_key> <auth_algo> <auth_key> \
<mode> <src_ip> <dst_ip>
Routing rule format:
rt <ip_ver> <src_ip> <dst_ip> <port>
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Arek Kusztal [Thu, 22 Sep 2016 10:45:55 +0000 (11:45 +0100)]
app/test: fix verification of digest for GCM
This patch fixes verification of digest in test_cryptodev.c file
for AES GCM test cases.
Fixes:
eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto operations")
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Arek Kusztal [Thu, 22 Sep 2016 10:45:53 +0000 (11:45 +0100)]
crypto/aesni_gcm: move pre-counter block to driver
This patch moves computing of pre-counter block into the AESNI-GCM
driver so it can be moved from test files.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Fiona Trahe [Fri, 16 Sep 2016 14:19:56 +0000 (15:19 +0100)]
crypto/qat: add 3DES cipher algorithm
3DES support added to QuickAssist PMD with CTR and CBC mode.
Both cipher-only and chained with HMAC_SHAx.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Fiona Trahe [Fri, 16 Sep 2016 14:19:55 +0000 (15:19 +0100)]
crypto/qat: cleanup code
Cleanup of unused code.
Rename and simplify a badly named struct element, was aes, but
used for all types of ciphers.
Print correct error msg (Unsupported rather than Undefined)
for all ciphers not supported by QAT PMD.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Eoin Breen [Tue, 20 Sep 2016 00:05:01 +0000 (01:05 +0100)]
tools: bind crypto devices
Adding the support to bind/unbind crypto devices with
dpdk-devbind.py script, as now it is not restricted
to network devices anymore.
Signed-off-by: Eoin Breen <eoin.breen@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Pablo de Lara [Wed, 21 Sep 2016 01:45:19 +0000 (02:45 +0100)]
crypto: rename all KASUMI references
KASUMI algorithm has all uppercase letters,
but some references of it had some lowercase letters.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Pablo de Lara [Wed, 21 Sep 2016 01:45:18 +0000 (02:45 +0100)]
crypto: rename some SNOW 3G references
SNOW 3G algorithm has all uppercase letters in its name
and a space between SNOW and 3G, but some references of it
had some lowercase letters or no space.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Deepak Kumar Jain [Wed, 21 Sep 2016 11:22:46 +0000 (12:22 +0100)]
crypto/qat: fix FreeBSD build
Using sys/types.h instead of linux/types.h
so as to compile QAT_PMD on FreeBSD.
Fixes:
1703e94ac5ce ("qat: add driver for QuickAssist devices")
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Arek Kusztal [Tue, 20 Sep 2016 12:35:46 +0000 (13:35 +0100)]
cryptodev: update GMAC API comments
In file rte_crypto_sym.h, GMAC API comments need to be changed
to comply with the GMAC specification. Main areas of change are
aad pointer and aad len, which now will be used to
provide plaintext.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Arek Kusztal [Tue, 20 Sep 2016 12:35:45 +0000 (13:35 +0100)]
app/test: add GMAC for qat
Added Galois Message Authentication Code (GMAC) tests to cryptodev tests.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Arek Kusztal [Tue, 20 Sep 2016 12:35:44 +0000 (13:35 +0100)]
crypto/qat: add GMAC capability
Added Galois Message Authentication Code (GMAC) capability to
QuickAssist Technology symmetric cryptographic driver.
GMAC is authentication only variant of Galois Counter Mode (GCM)
where all plaintext is provided with AAD pointer only.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Deepak Kumar Jain [Mon, 19 Sep 2016 16:37:01 +0000 (17:37 +0100)]
crypto/qat: add C3xxx device
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Deepak Kumar Jain [Tue, 13 Sep 2016 10:41:55 +0000 (11:41 +0100)]
crypto/qat: add C62x device
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Deepak Kumar Jain [Mon, 19 Sep 2016 11:00:56 +0000 (12:00 +0100)]
app/test: add KASUMI for qat
This patch adds KASUMI tests in the QAT testsuite.
Alg-Chaining tests have also been added in the KASUMI
SW PMD.
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Deepak Kumar Jain [Mon, 19 Sep 2016 11:00:55 +0000 (12:00 +0100)]
crypto/qat: add KASUMI
This patch add kasumi support in Intel(R)
QuickAssist driver.
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Deepak Kumar Jain [Mon, 19 Sep 2016 11:00:54 +0000 (12:00 +0100)]
app/test: rename some SNOW 3G functions
Renamed authenticated encryption and encrypted authentication
tests with easily recognized names.
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Deepak Kumar Jain [Mon, 19 Sep 2016 11:00:53 +0000 (12:00 +0100)]
app/test: cleanup crypto code
Cleanup the code for code design consistency.
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Deepak Kumar Jain [Mon, 19 Sep 2016 11:14:52 +0000 (12:14 +0100)]
doc: fix names of supported crypto algorithms
Update documentation with correct names of supported algorithms.
Fixes:
1703e94ac5cee ("qat: add driver for QuickAssist devices")
Fixes:
3aafc423cf4d ("snow3g: add driver for SNOW 3G library")
Fixes:
924e84f87306 ("aesni_mb: add driver for multi buffer based crypto")
Fixes:
2773c86d061a ("crypto/kasumi: add driver for KASUMI library")
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Eoin Breen [Tue, 13 Sep 2016 14:08:58 +0000 (15:08 +0100)]
doc: add instructions to enable qat
Signed-off-by: Eoin Breen <eoin.breen@intel.com>
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Deepak Kumar Jain [Fri, 16 Sep 2016 10:49:34 +0000 (11:49 +0100)]
crypto/null: fix key size increment value
This patch fixes the values of increment in key size.
Fixes:
94b0ad8e0aa5 ("null_crypto: add driver for null crypto operations")
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Deepak Kumar Jain [Fri, 16 Sep 2016 08:57:17 +0000 (09:57 +0100)]
app/test: add NULL operation for qat
Added NULL algorithm to test file for Intel(R) QuickAssist
Technology Driver.
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Deepak Kumar Jain [Fri, 16 Sep 2016 08:57:16 +0000 (09:57 +0100)]
crypto/qat: add NULL capability
Enabled NULL crypto for Intel(R) QuickAssist Technology.
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Deepak Kumar Jain [Mon, 12 Sep 2016 19:51:27 +0000 (20:51 +0100)]
app/test: add aes-sha384-hmac for qat
Added aes-sha384-hmac algorithm to test file for Intel(R) QuickAssist
Technology Driver.
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Deepak Kumar Jain [Mon, 12 Sep 2016 19:51:26 +0000 (20:51 +0100)]
crypto/qat: add aes-sha384-hmac capability
Enable support of aes-sha384-hmac in Intel(R) QuickAssist driver.
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Deepak Kumar Jain [Thu, 15 Sep 2016 16:26:33 +0000 (17:26 +0100)]
app/test: add aes-sha224-hmac for qat
Added aes-sha224-hmac algorithm to test file for Intel(R) QuickAssist
Technology Driver.
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Deepak Kumar Jain [Thu, 15 Sep 2016 16:26:32 +0000 (17:26 +0100)]
crypto/qat: add aes-sha224-hmac capability
Added support of aes-sha224-hmac in Intel(R) QuickAssist driver.
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Arek Kusztal [Fri, 9 Sep 2016 15:44:33 +0000 (16:44 +0100)]
app/test: add MD5 HMAC for qat
Added MD5 HMAC hash algorithm to test file for Intel QuickAssist
Technology driver.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Arek Kusztal [Fri, 9 Sep 2016 15:44:32 +0000 (16:44 +0100)]
crypto/qat: add MD5 HMAC capability
Added posibility to compute MD5 HMAC digest with Intel QuickAssist
Technology driver.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Signed-off-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Fiona Trahe [Thu, 4 Aug 2016 12:00:15 +0000 (13:00 +0100)]
crypto/qat: optimize request copy
using rte_mov128 instead of structure assignment to copy
template request from session context into request
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: John Griffin <john.griffin@intel.com>
John Griffin [Thu, 4 Aug 2016 15:46:23 +0000 (16:46 +0100)]
crypto/qat: make the session struct variable in size
This patch changes the qat firmware session data structure from a fixed
size to a variable size which is dependent on the size of the chosen
algorithm.
This reduces the amount of bytes which are transferred across
PCIe and thus helps to increase qat performance when the
accelerator is bound by PCIe.
Signed-off-by: John Griffin <john.griffin@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Shreyansh Jain [Thu, 6 Oct 2016 13:54:03 +0000 (19:24 +0530)]
vdev: rename init/uninit ops to probe/remove
Inline with PCI probe and remove, VDEV probe and remove hooks provide
a uniform naming.
PCI probe represents scan and driver initialization. For VDEV, it will
represent argument parsing and initialization.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Olivier Matz [Mon, 19 Sep 2016 12:26:51 +0000 (14:26 +0200)]
mem: fix build with -O1
When compiled with EXTRA_CFLAGS="-O1", the compiler is not
able to detect that size is always initialized when used, and
issues a wrong warning:
eal_memory.c: In function ‘rte_eal_hugepage_attach’:
eal_memory.c:1684:3: error: ‘size’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
munmap(hp, size);
^
Workaround this issue by initializing size to 0.
Seen on gcc (Debian 5.4.1-1) 5.4.1
20160803.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:20:06 +0000 (11:20 -0500)]
net/bnxt: update struct definitions for 1.5.1 HWRM API
Update the PMD to use the 1.5.1 HWRM API.
Most of the changes in the patch are white spaces and rearrangement of the
lines - a onetime change owing to the usage of a different auto generated
file.
Structures updated:
hwrm_stat_ctx_alloc_input, hwrm_stat_ctx_alloc_output,
hwrm_stat_ctx_free_input, hwrm_stat_ctx_free_output,
hwrm_stat_ctx_clr_stats_input, hwrm_stat_ctx_clr_stats_output,
hwrm_exec_fwd_resp_input, hwrm_exec_fwd_resp_output
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:19:59 +0000 (11:19 -0500)]
net/bnxt: update HWRM filter related structures
Update the PMD to use packet filtering related structures as per the
1.5.1 version of the HWRM API. Most of the changes in the patch are
white spaces and rearrangement of the lines - a onetime change owing to
the usage of a different auto generated file.
Structures being updated:
hwrm_cfa_l2_filter_cfg_input, hwrm_cfa_l2_filter_cfg_output,
hwrm_cfa_l2_set_rx_mask_input, hwrm_cfa_l2_set_rx_mask_output,
hwrm_cfa_l2_filter_alloc_input, hwrm_cfa_l2_filter_alloc_output,
hwrm_cfa_l2_filter_free_input, hwrm_cfa_l2_filter_free_output
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:19:53 +0000 (11:19 -0500)]
net/bnxt: update HWRM ring related structures
Update the PMD to use HWRM ring related structures as per the 1.5.1
version of the HWRM API. Most of the changes in the patch are white
spaces and rearrangement of the lines - a onetime change owing to the
usage of a different auto generated file.
Structures being updated:
hwrm_ring_alloc_input, hwrm_ring_alloc_output, hwrm_ring_free_input,
hwrm_ring_free_output, hwrm_ring_grp_alloc_input,
hwrm_ring_grp_alloc_output, hwrm_ring_grp_free_input,
hwrm_ring_grp_free_output
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:19:45 +0000 (11:19 -0500)]
net/bnxt: update VNIC related structures
Update the PMD to use VNIC related structures as per the 1.5.1 HWRM API.
Most of the changes in the patch are white spaces and rearrangement of the
lines - a onetime change owing to the usage of a different
auto generated file.
Structures being updated:
hwrm_vnic_alloc_input, hwrm_vnic_alloc_output, hwrm_vnic_free_input,
hwrm_vnic_free_output, hwrm_vnic_cfg_input, hwrm_vnic_cfg_output,
hwrm_vnic_rss_cfg_input, hwrm_vnic_rss_cfg_output,
hwrm_vnic_rss_cos_lb_ctx_alloc_input,
hwrm_vnic_rss_cos_lb_ctx_alloc_output,
hwrm_vnic_rss_cos_lb_ctx_free_input,
hwrm_vnic_rss_cos_lb_ctx_free_output
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:19:37 +0000 (11:19 -0500)]
net/bnxt: update structures for 1.5.1 HWRM API
Update the PMD to use the 1.5.1 HWRM API.
Most of the changes in the patch are white spaces and rearrangement of the
lines - a onetime change owing to the usage of a different
auto generated file.
Structures updated:
hwrm_func_qcfg_input, hwrm_func_qcfg_output, hwrm_func_drv_rgtr_input,
hwrm_func_drv_rgtr_output, hwrm_func_drv_unrgtr_input,
hwrm_func_drv_unrgtr_output, hwrm_queue_qportcfg_input,
hwrm_queue_qportcfg_output
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:19:31 +0000 (11:19 -0500)]
net/bnxt: update structures for 1.5.1 HWRM API
Update the PMD to use the 1.5.1 HWRM API.
Most of the changes in the patch are white spaces and rearrangement of the
lines - a onetime change owing to the usage of a different
auto generated file.
Structures being updated in this patch:
input, output, hwrm_ver_get_input, hwrm_ver_get_output,
hwrm_func_reset_input, hwrm_func_reset_output, hwrm_func_qcaps_input,
hwrm_func_qcaps_output
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:19:17 +0000 (11:19 -0500)]
net/bnxt: update completion descriptors
Update the PMD to use structures as per the 1.5.1 HWRM API.
Most of the changes in the patch are white spaces and rearrangement of the
lines - hopefully a onetime change owing to the usage of a different
auto generated file.
Structures updated:
cmpl_base, tx_cmpl, rx_pkt_cmpl, rx_pkt_cmpl_hi, hwrm_fwd_req_cmpl,
hwrm_async_event_cmpl
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:19:07 +0000 (11:19 -0500)]
net/bnxt: update buffer descriptor definitions
Update the PMD to use the 1.5.1 HWRM API.
Most of the changes in the patch are white spaces and rearrangement of the
lines - hopefully a onetime change owing to the usage of a different
auto generated file.
Structures updated in this patch:
tx_bd_short, tx_bd_long, tx_bd_long_hi, rx_prod_pkt_bd
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Mon, 26 Sep 2016 17:05:07 +0000 (12:05 -0500)]
net/bnxt: refactor for 1.5.1 HWRM API
Update the PMD to use the 1.5.1 HWRM API.
Most of the changes in this patch and the following patches are
white spaces and rearrangement of the lines - hopefully a onetime change
owing to the usage of a different auto generated file.
Other than that, the following fields have been renamed:
1) rx_err_pkts and tx_err_pkts are now rx_discard_pkts and tx_discard_pkts
in struct ctx_hw_stats64
2) the perm_mac_addr field in the response of bnxt_hwrm_func_qcaps has
changed to mac_addr.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:18:52 +0000 (11:18 -0500)]
net/bnxt: support hotplug
This patch adds support for port hotplug framework.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:18:46 +0000 (11:18 -0500)]
net/bnxt: support VF
Add support to the bnxt PMD to load on a PCI VF.
1) VF cannot change parameters like - speed, autoneg and pause
2) If the VF MAC address shows up as all 0's it has to be provisioned
by the PF in the hypervisor.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:18:37 +0000 (11:18 -0500)]
net/bnxt: update guide
Update doc/guides/nics/bnxt.rst to indicate that the bnxt PMD driver
supports Broadcom NetXtreme-C/NetXtreme-E BCM5730X/BCM5740X family of
network controllers and Broadcom StrataGX BCM5871X family of
communications processors.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:18:30 +0000 (11:18 -0500)]
net/bnxt: add new device IDs
More PCI Device IDs for Cumulus, Cumulus+ and Whitney, Whitney+ SKUs.
The NPAR model supported by firmware has been altered. It now allocates a
unique Device ID for each NPAR partition for each device. In addition,
ASIC's that are capable of supporting dual media have a unique DID
depending whether they are configured in copper or fiber mode.
This patch adds the necessary DIDs.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:18:16 +0000 (11:18 -0500)]
net/bnxt: support NIC Partitioning
Adding code to enable support for NIC Partitioning or NPAR 1.0
As a part of NPAR, we don't allow port settings like speed or flow
control to be changed.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Ajit Khaparde [Mon, 26 Sep 2016 16:16:54 +0000 (11:16 -0500)]
net/bnxt: support Broadcom StrataGX
This patch adds support for the Broadcom StrataGX® BCM5871X
series of Communications Processors.
These ARM based processors target a broad range of networking
applications including virtual CPE (vCPE) and NFV appliances,
10G service routers and gateways, control plane processing for
Ethernet switches, and network attached storage (NAS).
Other than adding the PCI Id for supporting the device,
the patch also adds a memory barrier before the Tx doorbell
and Completing ring doorbell is written to. Since ARM has a
weakly ordered memory model this enforces a strict ordering
of the descriptor writes before the doorbell writes happen.
Signed-off-by: John Carney <john.carney@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Xiao Wang [Sun, 25 Sep 2016 09:00:17 +0000 (17:00 +0800)]
net/ixgbe/base: add base driver update brief
The ixgbe base driver was updated to version
cid-10g-shared-code.2016.04.12.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 09:00:16 +0000 (17:00 +0800)]
net/ixgbe/base: clean up
Change the parameter bypass_vlvf to vlvf_bypass for consistency
with ixgbe_common.c.
Clean up some whitespace and misalignment.
Change variable type of secrxreg from int to u32 as it's used
to store register value.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 09:00:15 +0000 (17:00 +0800)]
net/ixgbe/base: fix skipping PHY config
By exiting early we could skip the PHY configuration and as such
the driver may not configure the PHY correctly for SFP+.
This patch removes the logic which would previously skip the PHY
configuration in the case where we are already at the requested
speed in ixgbe_setup_mac_link_multispeed_fiber().
Fixes:
f3430431abaf ("ixgbe/base: add SFP+ dual-speed support")
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 09:00:14 +0000 (17:00 +0800)]
net/ixgbe/base: remove unneeded flow control code
Support for flow control auto negotiation is defeatured from X550em_a
fiber when connected to speeds lower than 10Gbps. This patch cleans up
the code path which is mostly dead to begin with.
- add device IDs check in ixgbe_device_supports_autoneg_fc().
- ixgbe_fc_autoneg_fiber_x550em_a() is now used only to pass the user
settings to ixgbe_fc_enable_generic().
- make sure that start_hw does not fail when setup_fc is not implemented.
- small fix in the debug message when ixgbe_device_supports_autoneg_fc()
returns false.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 09:00:13 +0000 (17:00 +0800)]
net/ixgbe/base: update X550em_a backplane speed
Correct link flow for X550em_a backplane with ALEF.
Report the correct link capabilities:
SKUs configured for 2.5G only support 2.5G.
non-10G SKUs can only support 2.5 or 1G.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>