Commit Graph

4899 Commits

Author SHA1 Message Date
Adrien Mazarguil
9720e325f0 net/failsafe: fix invalid free
rte_free() is not supposed to work with pointers returned by calloc().

Fixes: a0194d8281 ("net/failsafe: add flexible device definition")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2018-01-21 15:51:52 +01:00
Andy Moreton
218a16a6dc net/sfc/base: fix unused argument warning
The type_data argument to ef10_rx_qcreate is only used
in builds with EFSYS_OPT_RX_PACKED_STREAM. note this as
an unused argument to avoid warnings in builds without
packed stream support.

Fixes: b749646dad ("net/sfc/base: add function to create packed stream RxQ")

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-21 15:51:52 +01:00
Yong Wang
0ff76833f8 net/dpaa: fix potential memory leak
There are several func calls to rte_zmalloc() which don't do null
pointer check on the return value. And before return, the memory is not
freed. Fix it by adding null pointer check and rte_free().

Fixes: 37f9b54bd3 ("net/dpaa: support Tx and Rx queue setup")
Fixes: 62f53995ca ("net/dpaa: add frame count based tail drop with CGR")
Cc: stable@dpdk.org

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Reviewed-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-01-21 15:51:52 +01:00
Wenzhuo Lu
7f3ef71bfd net/avf: fix makefile typo
A typo in makefile that makes the RX/TX vector code
not to be compiled.

Fixes: 319c421f38 ("net/avf: enable SSE Rx Tx")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-01-21 15:51:52 +01:00
Yongseok Koh
c7bf62255e net/mlx5: fix handling link status event
Even though link of a port gets down, device still can receive traffic.
That is the reason why mlx5_set_link_up/down() switches rx/tx_pkt_burst().
However, if link gets down by an external command (e.g. ifconfig), it isn't
effective. It is better to change burst functions when link status change
is detected.

Fixes: 62072098b5 ("mlx5: support setting link up or down")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-01-21 15:51:52 +01:00
Xiao Wang
7365504f77 net/virtio: support guest announce
When live migration is done, for the backup VM, either the virtio
frontend or the vhost backend needs to send out gratuitous RARP packet
to announce its new network location.

This patch enables VIRTIO_NET_F_GUEST_ANNOUNCE feature to support live
migration scenario where the vhost backend doesn't have the ability to
generate RARP packet.

Brief introduction of the work flow:
1. QEMU finishes live migration, pokes the backup VM with an interrupt.
2. Virtio interrupt handler reads out the interrupt status value, and
   realizes it needs to send out RARP packet to announce its location.
3. Pause device to stop worker thread touching the queues.
4. Inject a RARP packet into a Tx Queue.
5. Ack the interrupt via control queue.
6. Resume device to continue packet processing.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
2018-01-21 15:51:52 +01:00
Maciej Czekaj
c97da2cbc2 net/thunderx: convert to new offload API
This patch removes all references to old-style offload API
replacing them with new offload flags.

Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
2018-01-21 15:51:52 +01:00
Tomasz Duszynski
9f7d41e6a7 net/mrvl: allow adding MAC address before port init
Since DPDK restores ether address configuration after device
is started it is safe to add ether address to uninitialized port (ppio).

Fixes: c0511a8f74 ("net/mrvl: check if ppio is initialized")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2018-01-21 15:51:52 +01:00
Tomasz Duszynski
59c796c889 net/mrvl: allow changing MTU before port init
DPDK updates MTU once mtu_set() callback returns success.
Since PMD changes port's MTU to dev->mtu every time device is
started it is safe to call mtu_set() before MUSDK ppio was initialized.

Fixes: c0511a8f74 ("net/mrvl: check if ppio is initialized")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2018-01-21 15:51:52 +01:00
Ivan Malov
c78d280e88 net/sfc: convert to new Tx offload API
Ethdev Tx offloads API has changed since:
commit cba7f53b71 ("ethdev: introduce Tx queue offloads API")
This commit support the new Tx offloads API.

The code which fills in txq_flags in default_txconf is preserved
because rte_eth_dev_info_get() lacks conversion between offloads
and txq_flags fields which means that a legacy application which
relies on default_txconf will fail to configure Tx queues in the
case when some bits in txq_flags are mandatory.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-21 15:51:52 +01:00
Ivan Malov
85069adea7 net/sfc: factor out function to report Tx capabilities
The patch adds a separate function to report supported
Tx capabilities because this function will be required
in more places across the code in the upcoming patches.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-21 15:51:52 +01:00
Ivan Malov
ff6a1197c3 net/sfc: convert to new Rx offload API
Ethdev Rx offloads API has changed since:
commit ce17eddefc ("ethdev: introduce Rx queue offloads API")
This commit support the new Rx offloads API.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-21 15:51:52 +01:00
Ivan Malov
cd8da5e83d net/sfc: factor out function to report Rx capabilities
The patch adds a separate function to report supported
Rx capabilities because this function will be required
in more places across the code in the upcoming patches.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-21 15:51:52 +01:00
Roman Zhukov
66070f08b2 net/sfc: fix flow RSS check in error handling
RSS is a local variable with address which is never NULL.

Fixes: d77d07391d ("net/sfc: support flow API RSS action")
Cc: stable@dpdk.org

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-21 15:51:52 +01:00
Roman Zhukov
13195b557b net/sfc: fix initialization of flow structure
The rte_flow is already filled in with zeros in the
case of create. So memset() with zeros is needed only
in validation.

Fixes: a9825ccf5b ("net/sfc: support flow API filters")
Cc: stable@dpdk.org

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-21 15:51:52 +01:00
Moti Haimovsky
95ae196ae1 net/tap: use new Rx offloads API
Ethdev Rx offloads API has changed since:
commit ce17eddefc ("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: Pascal Mazon <pascal.mazon@6wind.com>
2018-01-21 15:51:52 +01:00
Moti Haimovsky
818fe14a98 net/tap: use new Tx offloads API
Ethdev Tx offloads API has changed since:
commit cba7f53b71 ("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: Pascal Mazon <pascal.mazon@6wind.com>
2018-01-21 15:51:52 +01:00
Rafal Kozik
7369f88f88 net/ena: convert to new Rx offloads API
Ethdev Rx offloads API has changed since:

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

This commit support the new Rx offloads API.

Signed-off-by: Rafal Kozik <rk@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
2018-01-21 15:51:52 +01:00
Rafal Kozik
56b8b9b7e5 net/ena: convert to new Tx offloads API
Ethdev Tx offloads API has changed since:

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

This commit support the new Tx offloads API. Queue configuration
is stored in ena_ring.offloads. During preparing mbufs for tx, offloads are
allowed only if appropriate flags in this field are set.

Signed-off-by: Rafal Kozik <rk@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
2018-01-21 15:51:52 +01:00
Shachar Beiser
e8aafd9405 net/mlx5: fix IPv6 header fields
There are parameters that are not copy from
spec to verbs structure in the vtc_label

Fixes: 43e9d9794c ("net/mlx5: support upstream rdma-core")
Cc: stable@dpdk.org

Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-01-21 15:51:52 +01:00
Kirill Rybalchenko
2c6b19af78 ethdev: increase flow type limit from 32 to 64
Increase the internal limit for flow types from 32 to 64
to support future flow type extensions.

Change type of variables from uint32_t[] to uint64_t[]:
rte_eth_fdir_info.flow_types_mask
rte_eth_hash_global_conf.sym_hash_enable_mask
rte_eth_hash_global_conf.valid_bit_mask

This modification affects the following components:
net/i40e
net/ixgbe
app/testpmd

ABI versioning used to keep ABI stability.

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-21 15:51:52 +01:00
George Wilkie
5d020410f8 net/vmxnet3: reset packet type for non-IPv4 packets
With bonding, after sending sufficient ipv4 packets,
bond_ethdev_rx_burst_8023ad() no longer recognizes LACP packets
because the packet_type is set to RTE_PTYPE_L3_IPV4.
Ensure packet_type is reset for non-ipv4 packets in vmxnet3_rx_offload.

Signed-off-by: George Wilkie <george.wilkie@intl.att.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
2018-01-21 15:51:52 +01:00
Rosen Xu
e8ef26c4db net/i40e: fix packet type for X722
Move setting PCType after setting port's MAC type, which can resolve
the issue of PCType doesn't take effect on X722.

Fixes: a286ebeb07 ("net/i40e: add dynamic mapping of SW flow types to HW pctypes")
Cc: stable@dpdk.org

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2018-01-21 15:51:52 +01:00
Igor Ryzhov
b4f42173a5 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: e18e01e92c ("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>
2018-01-21 15:51:52 +01:00
Moti Haimovsky
b26af79388 net/failsafe: use new Rx offloads API
Ethdev Rx offloads API has changed since:
commit ce17eddefc ("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>
2018-01-21 15:51:52 +01:00
Moti Haimovsky
a11c2422ed net/failsafe: use new Tx offloads API
Ethdev Tx offloads API has changed since:
commit cba7f53b71 ("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>
2018-01-21 15:51:52 +01:00
Hemant Agrawal
3771bd2a40 bus/fslmc: adjust to dpaa2 eventdev disabling
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-21 15:51:52 +01:00
Nipun Gupta
ffb3389cef 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>
2018-01-21 15:51:52 +01:00
Hemant Agrawal
c172f85ef2 net/dpaa2: change VLAN filter rule to be called on config
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-21 15:51:52 +01:00
Hemant Agrawal
d2ef05d5c1 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>
2018-01-21 15:51:52 +01:00
Hemant Agrawal
043b36f621 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>
2018-01-21 15:51:52 +01:00
Rasesh Mody
f64b91b0eb 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: 1282943aa0 ("net/qede: fix default config option")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-01-21 15:51:52 +01:00
Andrew Rybchenko
a1472935a8 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: 4236ce9bf5 ("event/opdl: add OPDL ring infrastructure library")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-01-21 11:52:55 +01:00
Pablo de Lara
d1be197787 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>
2018-01-20 16:10:53 +01:00
Radu Nicolau
d3ec528ffc net/ixgbe: get security session size
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
2018-01-20 16:10:52 +01:00
Akhil Goyal
9a984458f7 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>
2018-01-20 16:10:52 +01:00
Alok Makhariya
b4053c4b8f 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>
2018-01-20 16:10:52 +01:00
Akhil Goyal
1f14d500bc crypto/dpaa_sec: support IPsec protocol offload
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-20 16:10:52 +01:00
Hemant Agrawal
e79416d10f 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>
2018-01-20 16:10:20 +01:00
Hemant Agrawal
fcf6702909 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>
2018-01-20 16:10:20 +01:00
Fan Zhang
945acb4a0d 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>
2018-01-20 16:10:20 +01:00
Maxime Coquelin
54a328f552 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: f37dfab21c ("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>
2018-01-20 16:25:48 +01:00
Nipun Gupta
342f299568 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>
2018-01-19 16:09:56 +01:00
Sunil Kumar Kori
0ee17f79eb event/dpaa: add enqueue/dequeue
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +01:00
Sunil Kumar Kori
4ed80e63f8 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>
2018-01-19 16:09:56 +01:00
Sunil Kumar Kori
1d99bc3550 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>
2018-01-19 16:09:56 +01:00
Sunil Kumar Kori
b08dc6430a 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>
2018-01-19 16:09:56 +01:00
Sunil Kumar Kori
9caac5dd1e 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>
2018-01-19 16:09:56 +01:00
Sunil Kumar Kori
5e74559314 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>
2018-01-19 16:09:56 +01:00
Sunil Kumar Kori
ad6628ac9b bus/dpaa: support dynamic logging
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +01:00
Sunil Kumar Kori
43797e7b47 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>
2018-01-19 16:09:56 +01:00
Nipun Gupta
2d37886318 net/dpaa2: support atomic queues
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +01:00
Nipun Gupta
496324d2a5 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>
2018-01-19 16:09:56 +01:00
Nipun Gupta
7b6edb640b 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>
2018-01-19 16:09:56 +01:00
Nipun Gupta
7c9e094fe5 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>
2018-01-19 16:09:56 +01:00
Nipun Gupta
4170dbe266 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>
2018-01-19 16:09:56 +01:00
Nipun Gupta
72654f090a event/dpaa2: replace static with dynamic logging
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
561c5c7b7f event/sw: update selftest ops
Update software eventdev ops to invoke selftest when application invokes
`rte_event_dev_selftest`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
5e6eb5ccd7 event/sw: make test standalone
Modify test_eventdev_sw to be standalone selftest independent of test
framework.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
85fb515b73 event/sw: move test to driver
Move software eventdev specific test (test_eventdev_sw) to
driver/event/sw/.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
3516327e00 event/octeontx: add selftest to device arguments
Add selftest as a device argument that can be enabled by suppling
'self_test=1' as a vdev parameter

	--vdev="event_octeontx,self_test=1"

The selftest is run after vdev creation is successfully
complete.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
c54b786602 event/octeontx: update selftest ops
Update octeontx eventdev ops to invoke selftest when application
invokes `rte_event_dev_selftest`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
daeda14c20 event/octeontx: make test standalone
Modify test_eventdev_octeontx to be standalone selftest independent of
test framework.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Pavan Nikhilesh
50fb749a39 event/octeontx: move test to driver
Move octeontx eventdev specific test (test_eventdev_octeontx.c) to
driver/event/octeontx.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Gage Eads
4521900526 event/sw: remove stale IQ references when reconfigured
This commit fixes a bug in which, when the sw PMD is reconfigured, it would
leave stale IQ chunk pointers in each queue's IQ structure. Now, the PMD
initializes all IQs at eventdev start time and releases all IQ chunk
pointers at eventdev stop time (which has the consequence that any events
in a queue when the eventdev is stopped will be lost). This approach should
be resilient to any reconfiguration done between the stop and start, such
as adding or removing queues.

This commit also fixes two potential issues in iq_chunk.h. iq_init()
now initializes the IQ's count field to 0, and iq_dequeue_burst() sets
iq->head to the appropriate next pointer.

Fixes: dca926ca9f ("event/sw: use dynamically-sized IQs")

Reported-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Signed-off-by: Gage Eads <gage.eads@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
2018-01-19 16:09:56 +01:00
Liang Ma
285aa4405f event/sw: apply new capability flags
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
2018-01-19 16:09:56 +01:00
Liang Ma
8301714765 event/octeontx: apply new capability flags
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
2018-01-19 16:09:56 +01:00
Liang Ma
8f4a294c23 event/dpaa2: apply new capability flags
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
2018-01-19 16:09:56 +01:00
Liang Ma
d548ef513c event/opdl: add unit tests
This commit adds unit test inside the OPDL PMD. There is a PMd parameter
"self_test" can be used to triger the test when vdev bus probe opdl device

  e.g.

  sudo ./app/test --vdev="event_opdl0,self_test=1"

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
2018-01-19 16:09:56 +01:00
Liang Ma
8ca5fad56d event/opdl: add enqueue/dequeue
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
2018-01-19 16:09:56 +01:00
Liang Ma
0bf298e392 event/opdl: add event port config get/set
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
2018-01-19 16:09:56 +01:00
Liang Ma
8ca8e3b48e event/opdl: add event queue config get/set
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
2018-01-19 16:09:56 +01:00
Liang Ma
3c7f3dcfb0 event/opdl: add PMD main body and helper function
This commit adds a OPDL implementation of the eventdev API. The
implementation here is intended to enable the community to use
the OPDL infrastructure under eventdev API.

The main components of the implementation is three files:
  - opdl_evdev.c              Creation, configuration, etc
  - opdl_evdev_xstats.c       helper function to support stats collection
  - opdl_evdev.h              include the main data structure of opdl
                              device and all the function prototype
                              need to be exposed to support eventdev API.

  - opdl_evdev_init.c         implement all initailization helper function

This commit only adds the implementation, no existing DPDK files
are modified.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
2018-01-19 16:09:56 +01:00
Liang Ma
4236ce9bf5 event/opdl: add OPDL ring infrastructure library
OPDL ring is the core infrastructure of OPDL PMD. OPDL ring library
provide the core data structure and core helper function set. The Ring
implements a single ring multi-port/stage pipelined packet distribution
mechanism. This mechanism has the following characteristics:

• No multiple queue cost, therefore, latency is significant reduced.
• Fixed dependencies between queue/ports is more suitable for complex.
  fixed pipelines of stateless packet processing (static pipeline).
• Has decentralized distribution (no scheduling core).
• Packets remain in order (no reorder core(s)).
* Update build system to enable compilation.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Peter Mccarthy <peter.mccarthy@intel.com>
Reviewed-by: Seán Harte <seanbh@gmail.com>
2018-01-19 16:09:56 +01:00
Gage Eads
decdc1cdca event/sw: simplify credit scheme
This commit modifies the sw PMD credit scheme such that credits are
consumed when enqueueing a NEW event and released when an event is
released -- typically, the beginning and end of a pipeline. Workers that
simply forward events do not interact with the credit pool.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Gage Eads
ec36d881f5 eventdev: add implicit release disable capability
This commit introduces a capability for disabling the "implicit" release
functionality for a port, which prevents the eventdev PMD from issuing
outstanding releases for previously dequeued events when dequeuing a new
batch of events.

If a PMD does not support this capability, the application will receive an
error if it attempts to setup a port with implicit releases disabled.
Otherwise, if the port is configured with implicit releases disabled, the
application must release each dequeued event by invoking
rte_event_enqueue_burst() with RTE_EVENT_OP_RELEASE or
RTE_EVENT_OP_FORWARD.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Gage Eads
dca926ca9f event/sw: use dynamically-sized IQs
This commit introduces dynamically-sized IQs, by switching the underlying
data structure from a fixed-size ring to a linked list of queue 'chunks.'
This has a number of benefits:
- Certain corner cases were observed in which all of a pipeline's flows
  could be pinned to one port for extended periods, effectively turning a
  multi-core pipeline into single-core one. This was caused by an event
  producer having a larger new_event_threshold than the IQ depth, and
  injecting large numbers of packets that are ultimately backpressured in a
  worker's rx_ring, causing those packets' flows to be scheduled to that
  port.
  The dynamically sized IQ does not have this problem because each IQ can
  grow large enough to store all the system's events, such that
  backpressure will not reach the worker_ring.
- Slight performance improvement (~1-2%) in high throughput scenarios,
  tested with eventdev_pipeline_sw_pmd.

This implementation has a small increase in the queue storage memory
footprint (~70KB). This commit also removes the iq_size xstat, which no
longer applies to this implementation.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Gage Eads
e1f2dcdb8f event/sw: fix queue memory leak and multi-link bug
This commit reinitializes a queue before it is reconfigured, such that
reorder buffer memory is not leaked.

This bug masked a few other problems, which this commit corrects as well:
- sw_port_link() allowed a port to link to a queue twice, such that the
  port could then successfully unlink the queue twice. Now the link
  function checks whether a port is already linked to the queue, and if so
  returns success but doesn't assign the a port a second slot in the
  queue's cq map.
- test_eventdev.c's test_eventdev_unlink() was unlinking a queue twice
  from the same port, and expecting the second unlink to succeed. Now the
  test unlinks, links, then unlinks again.
- test_eventdev.c's test_eventdev_link_get() was linking a single queue but
  expecting the unlink function to return nb_queues (where nb_queues > 1).
  The test now checks for a return value of 1.

Fixes: 5ffb2f142d ("event/sw: support event queues")
Fixes: 371a688fc1 ("event/sw: support linking queues to ports")
Fixes: f8f9d233ea ("test/eventdev: add unit tests")
Cc: stable@dpdk.org

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
Amr Mokhtar
b8cfe2c9ae bb/turbo_sw: add software turbo driver
- bbdev 'turbo_sw' is the software accelerated version of 3GPP L1
 Turbo coding operation using the optimized Intel FlexRAN SDK libraries.
- 'turbo_sw' pmd is disabled by default

Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-19 01:44:25 +01:00
Amr Mokhtar
7dc2b15894 bb/null: add null base band device driver
- 'bbdev_null' is a basic pmd that performs a minimalistic
 bbdev operation
- useful for bbdev smoke testing and in measuring the overhead
 introduced by the bbdev library
- 'bbdev_null' pmd is enabled by default

Signed-off-by: Amr Mokhtar <amr.mokhtar@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-01-19 01:44:25 +01:00
Pavan Nikhilesh
9ac7f8e572 mempool/octeontx: fix natural alignment being optimized out
The mbox messages are naturally aligned and in some cases compiler
optimization might disregard natural alignment.
Use volatile key word to force compiler to disable optimizing and
maintain alignment.

Fixes: aecb8e093b ("event/octeontx: introduce specialized mbox message copy")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2018-01-19 00:43:56 +01:00
Hemant Agrawal
83a4f267f2 mempool/dpaa: optimize phy to virt conversion
If the allocation is from a single memzone, optimize
the phy-virt address conversions.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-19 00:43:56 +01:00
Pavan Nikhilesh
43e9f17ce7 log: remove log level config option
Remove RTE_LOG_LEVEL config option, use existing RTE_LOG_DP_LEVEL config
option for controlling datapath log level.
RTE_LOG_LEVEL is no longer needed as dynamic logging can be used to
control global and module specific log levels.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
2018-01-17 14:21:46 +01:00
Hemant Agrawal
5329b95aae bus/fslmc: clear the vfio group on error
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-17 00:44:47 +01:00
Adrien Mazarguil
0d440d081c lib: fix missing includes in exported headers
Many exported headers rely on definitions found in rte_config.h without
including it, as shown by the following command:

 grep -L '^#include <rte_config.h>' -- \
  $(grep -Rl \
    $(sed -n '/^#define \([^ ]\+\).*$/{s//\1/;H;};${x;s/\n//;s/\n/\\|/g;p;}' \
      build/include/rte_config.h) \
    -- build/include/)

We cannot assume external applications will include rte_config.h on their
own, neither directly nor through a -include parameter like DPDK does
internally.

This not only causes obvious compilation failures that can be reproduced
with check-includes.sh such as:

 [...]/rte_memory.h:88:43: error: ‘RTE_CACHE_LINE_SIZE’ was not declared in
     this scope
  #define __rte_cache_aligned __rte_aligned(RTE_CACHE_LINE_SIZE)
                                            ^

It also results in less visible issues, for instance rte_hash_crc.h relying
on RTE_ARCH_X86_64's presence to provide dedicated inline functions.

This patch partially reverts the commit below and adds missing include
lines to the remaining files.

Fixes: f1a7a5c5f4 ("remove include of generated config header")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-01-17 00:31:05 +01:00
Adrien Mazarguil
12f9877574 net/i40e: fix ISO C in exported header
Reported by check-includes.sh:

 [...]/rte_pmd_i40e.h:97:30: error: ISO C restricts enumerator values to
     range of `int' [-Werror=pedantic]
   RTE_PMD_I40E_PKG_INFO_MAX = 0xFFFFFFFF
                               ^

Fixes: edeab742ed ("net/i40e: get information about DDP profile")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2018-01-17 00:24:56 +01:00
Ferruh Yigit
1fb6fee3af net/pcap: convert license headers to SPDX tags
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2018-01-16 18:47:49 +01:00
Xiao Wang
1978a9dc57 net/virtio: add packet injection method
This patch adds dev_pause, dev_resume and inject_pkts APIs to allow
driver to pause the worker threads and inject special packets into
Tx queue. The next patch will be based on this.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-01-16 18:47:49 +01:00
Xiao Wang
a2ffb87b1b net/virtio: make control queue thread-safe
The virtio_send_command function may be called from app's configuration
routine, but also from an interrupt handler called when live migration
is done on the backup side. So this patch makes control queue
thread-safe first.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-01-16 18:47:49 +01:00
Zhike Wang
240da8b214 net/virtio: init MTU in case no control channel
The max_mtu is kept as zero in case no CRTL channel, which leads
to failure when calling virtio_mtu_set().

Signed-off-by: Zhike Wang <wangzhike@jd.com>
Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
2018-01-16 18:47:49 +01:00
Yongseok Koh
6a59d64719 net/mlx5: fix calculation of flow ID flag
PKT_RX_FDIR_ID should be set only if flow_tag is neither non-zero nor
MLX5_FLOW_MARK_DEFAULT.

Fixes: 6cb559d67b ("net/mlx5: add vectorized Rx/Tx burst for x86")
Fixes: 570acdb1da ("net/mlx5: add vectorized Rx/Tx burst for ARM")
Cc: stable@dpdk.org

Reported-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Xueming Li <xuemingl@mellanox.com>
2018-01-16 18:47:49 +01:00
Yongseok Koh
64a5a065cf net/mlx5: fix missing attribute size for drop action
Adding the size of ibv_flow_spec_action_drop is missing. This can cause
overflow when converting rte_flow to ibv_flow and thus corrupt memory.

Fixes: 8086cf08b2 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-01-16 18:47:49 +01:00
Yongseok Koh
6817ad3871 net/mlx5: fix deadlock of link status alarm
If mlx5_dev_link_status_handler() is executed while canceling the alarm,
deadlock can happen because rte_eal_alarm_cancel() waits for all callbackes
to finish execution and both calls are protected by priv->lock.

Fixes: 198a3c339a ("mlx5: handle link status interrupts")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-01-16 18:47:49 +01:00
Qi Zhang
dd18b06a32 net/e1000: fix mailbox interrupt handler
Mailbox interrupt handler only takecare of the PF reset notification,
for other message mbx->ops.read should not be called since it gets
chance to break the foreground VF to PF communication.

Fixes: 316f4f1adc ("net/igb: support VF mailbox interrupt for link up/down")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2018-01-16 18:47:49 +01:00
Qi Zhang
6810c63926 net/ixgbe: fix mailbox interrupt handler
Mailbox interrupt handler only takes care of PF reset notification, for
other message ixgbe_read_mbx should not be called since it gets chance
to break the foreground VF to PF communication.
This can be simply repeated by 'testpmd>rx_vlan rm all 0'.

Fixes: 77234603fb ("net/ixgbe: support VF mailbox interrupt for link up/down")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2018-01-16 18:47:49 +01:00
Markus Theil
c473d362e3 net/e1000: add device ID for 82579LM support
This patch adds the PCI device ID for Intel 82579LM support.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-01-16 18:47:49 +01:00
Chas Williams
a2efa4f660 net/e1000: always enable receive and transmit
The transmit and receive controller state machines are only enabled after
receiving an interrupt and the link status is now valid.  If an adapter
is being used in conjunction with NC-SI, network controller sideband
interface, the adapter may never get a link state change interrupt since
the adapter's PHY is always link up and never changes state.

To fix this, always enable and disable the transmit and receive with
.dev_start and .dev_stop.  This is a better match for what is typically
done with the other PMD's.  Since we may never get an interrupt to check
the link state, we also poll once at the end of .dev_start to get the
current link status.

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-01-16 18:47:49 +01:00
David Harton
cde1f02528 net/i40e: fix VF reset stats crash
Calling i40evf_dev_xstats_reset can sometimes crash. Fixed issue
by checking return code before using pstats.

Fixes: 8210e9e0d8 ("net/i40e: fix clear xstats bug in VF")
Cc: stable@dpdk.org

Signed-off-by: David Harton <dharton@cisco.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
2018-01-16 18:47:49 +01:00
Wei Zhao
37b68eacfc net/i40e: fix port segmentation fault when restart
This patch will go into the process of clear all queue region
related configuration when dev stop even if there is no queue region
command before, so this is a bug, it may cause error. So add code
to check if there is queue configuration exist when flush queue
region config and remove this process when device stop. Queue region
clear only do when device initialization or PMD get flush command.

Fixes: 7cbecc2f74 ("net/i40e: support queue region set and flush")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-01-16 18:47:49 +01:00
Beilei Xing
8d1e8e70ff net/i40e: fix setting MAC address of VF
New MAC address is copied to dev->data->mac_addrs[0] before calling
setting MAC address ops. So it will fail when deleting
dev->data->mac_addrs[0]. Deleting hw->mac.addr will fix the issue.

Fixes: 943c2d899a ("net/i40e: set VF MAC from VF")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-01-16 18:47:49 +01:00