dpdk.git
5 years agonet/failsafe: support runtime Rx queues setup
Ian Dolzhansky [Fri, 31 Aug 2018 16:09:37 +0000 (17:09 +0100)]
net/failsafe: support runtime Rx queues setup

Signed-off-by: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
5 years agonet/failsafe: add Tx queue start and stop functions
Ian Dolzhansky [Thu, 20 Sep 2018 13:55:52 +0000 (14:55 +0100)]
net/failsafe: add Tx queue start and stop functions

Support Tx queue deferred start.

Signed-off-by: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
5 years agonet/failsafe: add Rx queue start and stop functions
Ian Dolzhansky [Thu, 20 Sep 2018 13:55:51 +0000 (14:55 +0100)]
net/failsafe: add Rx queue start and stop functions

Support Rx queue deferred start.

Signed-off-by: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
5 years agonet/failsafe: add checks for deferred queue setup
Ian Dolzhansky [Thu, 20 Sep 2018 13:55:50 +0000 (14:55 +0100)]
net/failsafe: add checks for deferred queue setup

Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org
Signed-off-by: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
5 years agoapp/testpmd: add queue deferred start switch
Ian Dolzhansky [Thu, 20 Sep 2018 13:55:49 +0000 (14:55 +0100)]
app/testpmd: add queue deferred start switch

Signed-off-by: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
5 years agonet/failsafe: fix crash on slave queue release
Igor Romanov [Fri, 31 Aug 2018 16:16:32 +0000 (17:16 +0100)]
net/failsafe: fix crash on slave queue release

Releasing a queue that is already released by slave may cause a
segmentation fault. For example, after a successfull device
configuration a queue is set up. Afterwards the device is reconfigured
with an invalid argument, forcing slaves to release the queues
(e.g. rte_eth_dev.data.tx_queues). Finally the failsafe's queues
are released. The queue release functions also try to release slaves'
queues using ETH(sdev)->data->tx_queues which is NULL at the time.

Add checks for NULL slaves' Tx and Rx queues before releasing them.

Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
5 years agonet/ifc: support live migration
Xiao Wang [Mon, 10 Sep 2018 11:01:23 +0000 (19:01 +0800)]
net/ifc: support live migration

IFCVF can help to log dirty page in live migration stage,
each queue's index can be read and configured to support
VHOST_USER_GET_VRING_BASE and VHOST_USER_SET_VRING_BASE.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Tested-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/ixgbe: check firmware status at init
Xiaoyun Li [Wed, 26 Sep 2018 09:04:56 +0000 (17:04 +0800)]
net/ixgbe: check firmware status at init

Check the firmware status at init time. If the firmware is in
recovery mode, alert the user to check it.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ixgbe/base: update version
Xiaoyun Li [Mon, 17 Sep 2018 09:28:14 +0000 (17:28 +0800)]
net/ixgbe/base: update version

Update README file to specify the version of CID drop.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ixgbe/base: support DCB registers dump
Xiaoyun Li [Mon, 17 Sep 2018 09:28:13 +0000 (17:28 +0800)]
net/ixgbe/base: support DCB registers dump

Add support for DCB registers dump.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ixgbe/base: update X550 SFP identification
Xiaoyun Li [Mon, 17 Sep 2018 09:28:12 +0000 (17:28 +0800)]
net/ixgbe/base: update X550 SFP identification

Use ixgbe_identify_sfp_module_X550em to update SFP identification
flow. ixgbe_identify_sfp_module_X550em includes specific checks for
X550 about supported SFP modules.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ixgbe/base: replace an operation in X550 setup
Xiaoyun Li [Mon, 17 Sep 2018 09:28:11 +0000 (17:28 +0800)]
net/ixgbe/base: replace an operation in X550 setup

Replace "=" operation with "|=" operation to only set the intended
register bits.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ixgbe/base: add FW recovery mode check
Xiaoyun Li [Mon, 17 Sep 2018 09:28:10 +0000 (17:28 +0800)]
net/ixgbe/base: add FW recovery mode check

Add FM NVM recovery mode check. Allow the software to detect this.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ixgbe/base: cleanup codes
Xiaoyun Li [Mon, 17 Sep 2018 09:28:09 +0000 (17:28 +0800)]
net/ixgbe/base: cleanup codes

Cleanup UNREFERENCED_1PARAMETER() macro because "hw" is used.
And remove Light Spring codes because the device was never
productised. And cleanup unused bypass codes.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ixgbe/base: update the license
Xiaoyun Li [Mon, 17 Sep 2018 09:28:08 +0000 (17:28 +0800)]
net/ixgbe/base: update the license

Update the GPL and BSD license headers to use the SPDX License
Identifier instead.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/virtio-user: fix memory hotplug support in vhost-kernel
Tiwei Bie [Wed, 5 Sep 2018 04:28:52 +0000 (12:28 +0800)]
net/virtio-user: fix memory hotplug support in vhost-kernel

It's possible to have much more hugepage backed memory regions
than what vhost-kernel supports due to the memory hotplug, which
may cause problems. A better solution is to have the virtio-user
pass all the memory ranges reserved by DPDK to vhost-kernel.

Fixes: 12ecb2f63b12 ("net/virtio-user: support memory hotplug")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agonet/virtio-user: avoid parsing process mappings
Tiwei Bie [Wed, 5 Sep 2018 04:28:51 +0000 (12:28 +0800)]
net/virtio-user: avoid parsing process mappings

Recently some memory APIs were introduced to allow users to
get the file descriptor and offset for each memory segment.
We can leverage those APIs to get rid of the /proc magic on
memory table preparation in vhost-user backend.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agonet/virtio-user: fix deadlock in memory events callback
Tiwei Bie [Wed, 5 Sep 2018 04:28:50 +0000 (12:28 +0800)]
net/virtio-user: fix deadlock in memory events callback

Deadlock can occur when allocating memory if a vhost-kernel
based virtio-user device is in use. To fix the deadlock,
we will take memory hotplug lock explicitly in virtio-user
when necessary, and always call the _thread_unsafe memory
functions.

Bugzilla ID: 81
Fixes: 12ecb2f63b12 ("net/virtio-user: support memory hotplug")
Cc: stable@dpdk.org
Reported-by: Seán Harte <seanbh@gmail.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Tested-by: Seán Harte <seanbh@gmail.com>
Reviewed-by: Seán Harte <seanbh@gmail.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agonet/qede: support device reset
Shahed Shaikh [Sat, 8 Sep 2018 20:31:06 +0000 (13:31 -0700)]
net/qede: support device reset

Implement eth_dev_ops->dev_reset callback.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
5 years agonet/qede/base: fix MFW FLR flow
Shahed Shaikh [Sat, 8 Sep 2018 20:31:05 +0000 (13:31 -0700)]
net/qede/base: fix MFW FLR flow

Management firmware does not properly clean IGU block in PF FLR flow
which may result in undelivered attentions for link events from
default status block.
Add a workaround in PMD to execute extra IGU cleanup right after PF FLR
is done.

Fixes: 9e2f08a4ad5f ("net/qede/base: add request for PF FLR before load request")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
5 years agonet/qede: support Rx descriptor status
Shahed Shaikh [Sat, 8 Sep 2018 20:31:04 +0000 (13:31 -0700)]
net/qede: support Rx descriptor status

This patch implement eth_dev_ops->rx_descriptor_status
callback.
Walk through receive completion ring to calculate receive
descriptors used by firmware and then provide the status of
offset accordingly.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
5 years agonet/qede: fix Rx buffer size calculation
Shahed Shaikh [Sat, 8 Sep 2018 20:31:03 +0000 (13:31 -0700)]
net/qede: fix Rx buffer size calculation

 - HW does not include CRC in received frame when passed to host,
   so no need to consider CRC length while calculating Rx buffer size.
 - In scattered Rx mode, driver may allocate Rx buffer larger than
   the size of mbuf because it tries to adjust the buffer size to cache
   line size by ceiling it. Fix this by flooring the size instead of
   ceiling.
 - Consider the rule imposed by HW regarding the minimum size of Rx buffer
   in scattered Rx mode -
   (MTU + Maximum L2 Header Size + 2) / ETH_RX_MAX_BUFF_PER_PKT

Fixes: f6033f2497e7 ("net/qede: fix minimum buffer size and scatter Rx check")
CC: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
5 years agonet/qede: support generic flow API
Shahed Shaikh [Sat, 8 Sep 2018 20:31:02 +0000 (13:31 -0700)]
net/qede: support generic flow API

- Add support for rte_flow_validate(), rte_flow_create() and
  rte_flow_destroy() APIs
- This patch adds limited support for the flow items
  because of the limited filter profiles supported by HW.
- Only 4 tuples - src and dst IP (v4 or v6) addresses and
  src and dst port IDs of TCP or UDP.
- also, only redirect to queue action is supported.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
5 years agonet/qede: refactor flow director into generic aRFS
Shahed Shaikh [Sat, 8 Sep 2018 20:31:01 +0000 (13:31 -0700)]
net/qede: refactor flow director into generic aRFS

- In order to prepare the base for RTE FLOW support,
  convert common code used for flow director support
  into common aRFS code.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
5 years agonet/qede: fix flow director for IPv6 filter
Shahed Shaikh [Sat, 8 Sep 2018 20:31:00 +0000 (13:31 -0700)]
net/qede: fix flow director for IPv6 filter

- PMD does not fill vtc_flow field of IPv6 header while
  constructing a packet for IPv6 filter. Hence filter was
  not getting applied properly.
- IPv6 addresses got swapped while copying src and dst addresses.
- Same issue with UDP and TCP port ids.

Fixes: 622075356e8f ("net/qede: support ntuple and flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
5 years agonet/qede: reorganize filter code
Shahed Shaikh [Sat, 8 Sep 2018 20:30:59 +0000 (13:30 -0700)]
net/qede: reorganize filter code

 - rename qede_fdir.c to qede_filter.c
 - move all filter code to qede_filter.c

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
5 years agonet/qede/base: use pointer for bytes length read
Rasesh Mody [Sat, 8 Sep 2018 20:30:58 +0000 (13:30 -0700)]
net/qede/base: use pointer for bytes length read

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: use trust mode for forced MAC limitations
Shahed Shaikh [Sat, 8 Sep 2018 20:30:57 +0000 (13:30 -0700)]
net/qede/base: use trust mode for forced MAC limitations

When trust mode is set to ON, VF can change it's MAC address
inspite PF has set a forced MAC for that VF from HV.

Earlier similar functionality is provided by module parameter
"allow_vf_mac_change_mode" of qed.

This change makes few changes in behavior of VF shadow config -
 - Let driver track the VF mac in shadow config as long as trust
  mode is OFF.
 - Once trust mode is ON, we should not care about MACs in shadow
  config (because we never intend to fall back because of lack of restore
  implementation).
 - Delete existing shadow MAC (this helps when trust mode is turned OFF,
  and VF tries to add new MAC – it won’t fail that time since we have
  a clean slate).
 - Skip addition and deletion of MACs in shadow configs.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
5 years agonet/qede/base: fix logic for sfp get/set
Rasesh Mody [Sat, 8 Sep 2018 20:30:56 +0000 (13:30 -0700)]
net/qede/base: fix logic for sfp get/set

Fix logic for sfp get rx_los, tx_fault, tx_disable, and sfp set tx_disable.

Fixes: bdc40630a8eb ("net/qede/base: add APIs for xcvr")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: correct MCP error handler log verbosity
Rasesh Mody [Sat, 8 Sep 2018 20:30:55 +0000 (13:30 -0700)]
net/qede/base: correct MCP error handler log verbosity

Correct the verbosity for slowpath message from DCB to SP.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: limit number of non ethernet queues to 64
Rasesh Mody [Sat, 8 Sep 2018 20:30:54 +0000 (13:30 -0700)]
net/qede/base: limit number of non ethernet queues to 64

Limit the number of non ethernet queues to 64, allowing a max queues to
status block ratio of 2:1 in case of storage target. Theoretically a
non-target storage PF can have 128 queues and SBs.

This change is to support 64 entries for a target iSCSI/FCoE PF and 128
for a non-target.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede: fix ethernet type in HW registers
Rasesh Mody [Sat, 8 Sep 2018 20:30:53 +0000 (13:30 -0700)]
net/qede: fix ethernet type in HW registers

Fix to program the HW registers with proper ether type.

Fixes: 36f45bce2537 ("net/qede/base: fix to support OVLAN mode")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: get pre-negotiated values for stag and bw
Rasesh Mody [Sat, 8 Sep 2018 20:30:52 +0000 (13:30 -0700)]
net/qede/base: get pre-negotiated values for stag and bw

Request management FW for STAG and bandwidth values negotiated prior to
the driver load.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: add OneView APIs
Rasesh Mody [Sat, 8 Sep 2018 20:30:51 +0000 (13:30 -0700)]
net/qede/base: add OneView APIs

Add support for the following OneView APIs:
 - ecore_mcp_ov_update_mtu() - Send MTU value to the management FW.
 - ecore_mcp_ov_update_mac() - Send MAC address to the management FW.
 - ecore_mcp_ov_update_eswitch() - Send eswitch_mode to management FW
   after the firmware load.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: fix to handle stag update event
Rasesh Mody [Sat, 8 Sep 2018 20:30:50 +0000 (13:30 -0700)]
net/qede/base: fix to handle stag update event

This fix adds a ecore_mcp_update_stag() handler to handle the STAG update
events from management FW and program the STAG value.
It also clears the stag config on PF, when management FW invalidates
the stag value.

Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/nfp: fix mbuf flags with checksum good
Alejandro Lucero [Thu, 6 Sep 2018 16:02:56 +0000 (17:02 +0100)]
net/nfp: fix mbuf flags with checksum good

If checksum offload enabled and hardware reports checksum as good,
update mbuf ol_flags with proper *_CKSUM_GOOD bits.

Fixes: b812daadad0d ("nfp: add Rx and Tx")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
5 years agonet/*/base: allow use of experimental APIs in base code
Bruce Richardson [Fri, 31 Aug 2018 13:35:10 +0000 (14:35 +0100)]
net/*/base: allow use of experimental APIs in base code

The driver setting of "allow_experimental_apis" was not being used when
building the base code. To allow this we can manually put in a check
in the base code files for the setting and set the appropriate cflag
if it's needed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Tested-by: Ilya Maximets <i.maximets@samsung.com>
5 years agonet/ifc: do not notify before HW ready
Xiao Wang [Fri, 14 Sep 2018 01:25:17 +0000 (09:25 +0800)]
net/ifc: do not notify before HW ready

If the device is not clearly reset by the previous driver and holds
some invalid ring addr, and the relay thread kicks it before HW is
properly re-configured, a bad DMA request may happen.

Besides, the notify_addr which is used by the relay thread is set in
the vdpa_ifcvf_start function, if a kick relay happens before
vdpa_ifcvf_start finishes, a null addr is accessed.

Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
5 years agonet/i40e: remove driver log
Beilei Xing [Tue, 18 Sep 2018 05:44:10 +0000 (13:44 +0800)]
net/i40e: remove driver log

Remove driver log when no interrupt event indicated
in alarm handler for both PF and VF, otherwise there
will be lots of prints which makes console unusable.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/i40e: add option to use latest vector path
Xiaoyun Li [Tue, 18 Sep 2018 02:22:40 +0000 (10:22 +0800)]
net/i40e: add option to use latest vector path

For IA, the AVX2 vector path is only recommended to be used on later
platforms (identified by AVX512 support, like SKL etc.) This is because
performance benchmark shows downgrade when running AVX2 vector path on
early platform (BDW/HSW) in some cases. But we still observe perf gain
with some real work loading.

So this patch introduced the new devarg use-latest-supported-vec to
force the driver always selecting the latest supported vec path. Then
apps are able to take AVX2 path on early platforms. And this logic can
be re-used if we will have AVX512 vec path in future.

This patch only affects IA platforms. The selected vec path would be
like the following:
  Without devarg/devarg = 0:
  Machine vPMD
  AVX512F AVX2
  AVX2 SSE4.2
  SSE4.2 SSE4.2
  <SSE4.2 Not Supported

  With devarg = 1
  Machine vPMD
  AVX512F AVX2
  AVX2 AVX2
  SSE4.2 SSE4.2
  <SSE4.2 Not Supported

Other platforms can also apply the same logic if necessary in future.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/mlx5: add bluefield VF support
Ori Kam [Sun, 2 Sep 2018 13:55:59 +0000 (13:55 +0000)]
net/mlx5: add bluefield VF support

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx4: support meson build
Nelio Laranjeiro [Fri, 31 Aug 2018 07:16:05 +0000 (09:16 +0200)]
net/mlx4: support meson build

Compile Mellanox driver when their external dependencies are met.  A
glue version of the driver can still be requested by using the
-Denable_driver_mlx_glue=true

Meson will try to find the required external libraries.  When they are
not installed system wide, they can be provided though CFLAGS, LDFLAGS
and LD_LIBRARY_PATH environment variables, example (considering
RDMA-Core is installed in /tmp/rdma-core):

 # CLFAGS=-I/tmp/rdma-core/build/include \
   LDFLAGS=-L/tmp/rdma-core/build/lib \
   LD_LIBRARY_PATH=/tmp/rdma-core/build/lib \
   meson output
 # LD_LIBRARY_PATH=/tmp/rdma-core/build/lib \
   ninja -C output install

Note: LD_LIBRARY_PATH before ninja is necessary when the meson
configuration has changed (e.g. meson configure has been called), in
such situation the LD_LIBRARY_PATH is necessary to invoke the
autoconfiguration script.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/mlx5: support meson build
Nelio Laranjeiro [Fri, 31 Aug 2018 07:16:05 +0000 (09:16 +0200)]
net/mlx5: support meson build

Compile Mellanox driver when its external dependencies are met.  A
glue version of the driver can still be requested by using the
-Denable_driver_mlx_glue=true

Meson will try to find the required external libraries.  When they are
not installed system wide, they can be provided though CFLAGS, LDFLAGS
and LD_LIBRARY_PATH environment variables, example (considering
RDMA-Core is installed in /tmp/rdma-core):

 # CLFAGS=-I/tmp/rdma-core/build/include \
   LDFLAGS=-L/tmp/rdma-core/build/lib \
   LD_LIBRARY_PATH=/tmp/rdma-core/build/lib \
   meson output
 # LD_LIBRARY_PATH=/tmp/rdma-core/build/lib \
   ninja -C output install

Note: LD_LIBRARY_PATH before ninja is necessary when the meson
configuration has changed (e.g. meson configure has been called), in
such situation the LD_LIBRARY_PATH is necessary to invoke the
autoconfiguration script.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/e1000: fix queue number in RSS configuration
Beilei Xing [Thu, 13 Sep 2018 07:06:23 +0000 (15:06 +0800)]
net/e1000: fix queue number in RSS configuration

RSS configuration works for all e1000 NICs except 82576.
This patch fixes this issue by correcting queue number
in RSS configuration.

Fixes: 424ae915baf0 ("net/e1000: move RSS to flow API")
Fixes: ac8d22de2394 ("ethdev: flatten RSS configuration in flow API")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
5 years agodrivers/crypto: remove double assignment of driver
Shreyansh Jain [Fri, 28 Sep 2018 12:26:04 +0000 (17:56 +0530)]
drivers/crypto: remove double assignment of driver

Removing double copy of driver information. 04664e5c8346 has shifted
that from driver's probe to bus's probe.

Fixes: 04664e5c8346 ("drivers/bus: fill driver reference after NXP probing")

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodrivers/net: remove double assignment of driver
Shreyansh Jain [Fri, 28 Sep 2018 12:26:03 +0000 (17:56 +0530)]
drivers/net: remove double assignment of driver

Removing double copy of driver information. 04664e5c8346 has shifted
that from driver's probe to bus's probe.

Fixes: 04664e5c8346 ("drivers/bus: fill driver reference after NXP probing")

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodrivers/bus: fill driver reference after NXP probing
Thomas Monjalon [Mon, 24 Sep 2018 23:55:28 +0000 (01:55 +0200)]
drivers/bus: fill driver reference after NXP probing

The probing functions of NXP buses were missing to set
the driver used for successfully probing a device.

The NXP driver and the generic rte_driver are now set
in the device structures.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
5 years agobus/ifpga: remove useless driver cast
Thomas Monjalon [Tue, 25 Sep 2018 22:02:20 +0000 (00:02 +0200)]
bus/ifpga: remove useless driver cast

The rte_afu_driver is assigned to rte_afu_device.driver during probing.
There is no need of accessing the rte_afu_driver via rte_device.driver
and type casting to its container.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Rosen Xu <rosen.xu@intel.com>
5 years agoeal/bsd: fix build
Anatoly Burakov [Thu, 20 Sep 2018 12:26:37 +0000 (13:26 +0100)]
eal/bsd: fix build

When compiling on FreeBSD, lots of warnings/errors are thrown for
unused parameter. Fix these by marking the parameters as unused
in the code.

Fixes: 1009ba1704f9 ("mem: add internal API to get and set segment fd")
Fixes: 3a44687139eb ("mem: allow querying offset into segment fd")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agoip_frag: add function to delete expired entries
Alex Kiselev [Mon, 4 Jun 2018 10:13:02 +0000 (13:13 +0300)]
ip_frag: add function to delete expired entries

A fragmented packets is supposed to live no longer than max_cycles,
but the lib deletes an expired packet only occasionally when it scans
a bucket to find an empty slot while adding a new packet.
Therefore a fragment might sit in the table forever.

Signed-off-by: Alex Kiselev <alex@therouter.net>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
5 years agolpm6: add incremental update on delete
Alex Kiselev [Tue, 18 Sep 2018 10:57:17 +0000 (13:57 +0300)]
lpm6: add incremental update on delete

Rework the delete function and add additional
internal data structures to support incremental
LPM tree update rather than full tree rebuild.

Signed-off-by: Alex Kiselev <alex@therouter.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agolpm6: store rules in hash table
Alex Kiselev [Tue, 18 Sep 2018 10:57:09 +0000 (13:57 +0300)]
lpm6: store rules in hash table

Rework the lpm6 rule subsystem and replace
current rules algorithm complexity O(n)
with hashtables which allow dealing with
large (50k) rule sets.

Signed-off-by: Alex Kiselev <alex@therouter.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agoconfig: remove unused parameter
Qi Zhang [Mon, 17 Sep 2018 07:39:32 +0000 (15:39 +0800)]
config: remove unused parameter

RTE_LIBRTE_I40E_ITR_INTERVAL is not used. So it should also be removed
in config/rte_config.h for meson+ninja build.

Fixes: 864a800d706d ("net/i40e: remove VF interrupt handler")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agoapp/testpmd: optimize mbuf pool allocation
Phil Yang [Wed, 12 Sep 2018 01:54:26 +0000 (09:54 +0800)]
app/testpmd: optimize mbuf pool allocation

By default, testpmd will create membuf pool for all NUMA nodes and
ignore EAL configuration.

Count the number of available NUMA according to EAL core mask or core
list configuration. Optimized by only creating membuf pool for those
nodes.

Fixes: c9cafcc82de8 ("app/testpmd: fix mempool creation by socket id")
Cc: stable@dpdk.org
Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
5 years agomem: support using memfd segments for in-memory mode
Anatoly Burakov [Tue, 4 Sep 2018 15:15:50 +0000 (16:15 +0100)]
mem: support using memfd segments for in-memory mode

Enable using memfd-created segments if supported by the system.

This will allow having real fd's for pages but without hugetlbfs
mounts, which will enable in-memory mode to be used with virtio.

The implementation is mostly piggy-backing on existing real-fd
code, except that we no longer need to unlink any files or track
per-page locks in single-file segments mode, because in-memory
mode does not support secondary processes anyway.

We move some checks from EAL command-line parsing code to memalloc
because it is now possible to use single-file segments mode with
in-memory mode, but only if memfd is supported.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agomem: allow querying offset into segment fd
Anatoly Burakov [Tue, 4 Sep 2018 15:15:49 +0000 (16:15 +0100)]
mem: allow querying offset into segment fd

In a few cases, user may need to query offset into fd for a
particular memory segment (for example, to selectively map
pages). This commit adds a new API to do that.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agomem: add external API to retrieve page fd
Anatoly Burakov [Tue, 4 Sep 2018 15:15:48 +0000 (16:15 +0100)]
mem: add external API to retrieve page fd

Now that we can retrieve page fd's internally, we can expose it
as an external API. This will add two flavors of API - thread-safe
and non-thread-safe. Fix up internal API's to return values we need
without modifying rte_errno internally if called from within EAL.

We do not want calling code to accidentally close an internal fd, so
we make a duplicate of it before we return it to the user. Caller is
therefore responsible for closing this fd.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agomem: add internal API to get and set segment fd
Anatoly Burakov [Tue, 4 Sep 2018 15:15:47 +0000 (16:15 +0100)]
mem: add internal API to get and set segment fd

Enable setting and retrieving segment fd's internally.

For now, retrieving fd's will not be used anywhere until we
get an external API, but it will be useful for things like
virtio, where we wish to share segment fd's.

Setting segment fd's will not be available as a public API
at this time, but internally it is needed for legacy mode,
because we're not allocating our hugepages in memalloc in
legacy mode case, and we still need to store the fd.

Another user of get segment fd API is memseg info dump, to
show which pages use which fd's.

Not supported on FreeBSD.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agomem: track page fd in non-single file mode
Anatoly Burakov [Tue, 4 Sep 2018 15:15:46 +0000 (16:15 +0100)]
mem: track page fd in non-single file mode

Previously, we were only tracking lock file fd's in single-file
segments mode, but did not track fd's in non-single file mode
because we didn't need to (mmap() call still kept the lock). Now
that we are going to expose these fd's to the world, we need to
have access to them, so track them even in non-single file
segments mode.

We don't need to close fd's after mmap() because we're still
tracking them in an fd list. Also, for anonymous hugepages mode,
fd will always be -1 so exit early on error.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agomem: rename lock list to fd list
Anatoly Burakov [Tue, 4 Sep 2018 15:15:45 +0000 (16:15 +0100)]
mem: rename lock list to fd list

Previously, we were only using lock lists to store per-page lock fd's
because we cannot use modern fcntl() file description locks to lock
parts of the page in single file segments mode.

Now, we will be using this list to store either lock fd's (along with
memseg list fd) in single file segments mode, or per-page fd's (and set
memseg list fd to -1), so rename the list accordingly.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agomem: raise maximum fd limit unconditionally
Anatoly Burakov [Tue, 4 Sep 2018 15:15:44 +0000 (16:15 +0100)]
mem: raise maximum fd limit unconditionally

Previously, when we allocated hugepages, we closed the fd's corresponding
to them after we've done our mappings. Since we did mmap(), we didn't
actually lose the reference, but file descriptors used for mmap() do not
count against the fd limit. Since we are going to store all of our fd's,
we will hit the fd limit much more often when using smaller page sizes.

Fix this to raise the fd limit to maximum unconditionally.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agoeal: do not allow legacy mode with --in-memory mode
Anatoly Burakov [Tue, 4 Sep 2018 15:15:43 +0000 (16:15 +0100)]
eal: do not allow legacy mode with --in-memory mode

In-memory mode was never meant to support legacy mode, because we
cannot sort anonymous pages anyway.

Fixes: 72b49ff623c4 ("mem: support --in-memory mode")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agofbarray: fix detach in --no-shconf mode
Anatoly Burakov [Tue, 4 Sep 2018 15:15:42 +0000 (16:15 +0100)]
fbarray: fix detach in --no-shconf mode

In noshconf mode, no shared files are created, but we're still trying
to unlink them, resulting in detach/destroy failure even though it
should have succeeded. Fix it by exiting early in noshconf mode.

Fixes: 3ee2cde248a7 ("fbarray: support --no-shconf mode")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agoeal: add strscpy function
Gaetan Rivet [Tue, 11 Sep 2018 15:00:49 +0000 (17:00 +0200)]
eal: add strscpy function

The strncpy function has long been deemed unsafe for use,
in favor of strlcpy or snprintf.

While snprintf is standard and strlcpy is still largely available,
they both have issues regarding error checking and performance.

Both will force reading the source buffer past the requested size
if the input is not a proper c-string, and will return the expected
number of bytes copied, meaning that error checking needs to verify
that the number of bytes copied is not superior to the destination
size.

This contributes to awkward code flow, unclear error checking and
potential issues with malformed input.

The function strscpy has been discussed for some time already and
has been made available in the linux kernel[1].

Propose this new function as a safe alternative.

[1]: http://git.kernel.org/linus/30c44659f4a3

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Juhamatti Kuusisaari <juhamatti.kuusisaari@coriant.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agombuf: remove deprecated segment free functions
David Marchand [Mon, 17 Sep 2018 12:45:09 +0000 (14:45 +0200)]
mbuf: remove deprecated segment free functions

__rte_mbuf_raw_free and __rte_pktmbuf_prefree_seg have been deprecated for
a long time now (early 17.05), are not part of the abi and are easily
replaced with existing api.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
5 years agoevent/opdl: add in meson build
Luca Boccassi [Tue, 18 Sep 2018 14:58:21 +0000 (15:58 +0100)]
event/opdl: add in meson build

Signed-off-by: Luca Boccassi <bluca@debian.org>
5 years agoevent/opdl: rename map file to match library name
Luca Boccassi [Tue, 18 Sep 2018 14:58:20 +0000 (15:58 +0100)]
event/opdl: rename map file to match library name

So that it can be used from Meson as well

Signed-off-by: Luca Boccassi <bluca@debian.org>
5 years agobaseband/null: add in meson build
Luca Boccassi [Tue, 18 Sep 2018 14:58:19 +0000 (15:58 +0100)]
baseband/null: add in meson build

Signed-off-by: Luca Boccassi <bluca@debian.org>
5 years agocrypto/scheduler: add in meson build
Luca Boccassi [Tue, 18 Sep 2018 14:58:16 +0000 (15:58 +0100)]
crypto/scheduler: add in meson build

Signed-off-by: Luca Boccassi <bluca@debian.org>
5 years agonet/vmxnet3: add in meson build
Luca Boccassi [Tue, 18 Sep 2018 14:58:22 +0000 (15:58 +0100)]
net/vmxnet3: add in meson build

Note that the library built by meson will not have the _uio suffix:
librte_pmd_vmxnet3.so - as it follows the directory name, while the
legacy makefile rename it to librte_pmd_vmxnet3_uio.so.

Signed-off-by: Luca Boccassi <bluca@debian.org>
5 years agonet/qede: add in meson build
Luca Boccassi [Tue, 18 Sep 2018 14:58:18 +0000 (15:58 +0100)]
net/qede: add in meson build

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Shahed Shaikh <shahed.shaikh@cavium.com>
5 years agonet/vdev_netvsc: add in meson build
Luca Boccassi [Tue, 18 Sep 2018 14:58:15 +0000 (15:58 +0100)]
net/vdev_netvsc: add in meson build

Signed-off-by: Luca Boccassi <bluca@debian.org>
5 years agonet/tap: add in meson build
Luca Boccassi [Tue, 18 Sep 2018 14:58:14 +0000 (15:58 +0100)]
net/tap: add in meson build

Use same autoconf generation mechanism as the MLX4/5 PMDs

Signed-off-by: Luca Boccassi <bluca@debian.org>
5 years agobuild: generate API documentation with meson
Luca Boccassi [Tue, 11 Sep 2018 20:42:36 +0000 (21:42 +0100)]
build: generate API documentation with meson

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agobuild: use same version as make showversion in meson
Luca Boccassi [Tue, 11 Sep 2018 20:42:35 +0000 (21:42 +0100)]
build: use same version as make showversion in meson

make showversion will print 18.11.0-rc0 but Meson sets 18.11-rc0,
causing among other things a difference in the generated documentation.

Fixes: 76b9d9de5c7d ("version: 18.11-rc0")

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agomk: use templated doxygen config
Luca Boccassi [Tue, 11 Sep 2018 20:42:34 +0000 (21:42 +0100)]
mk: use templated doxygen config

This will allow the same config file to be used from Meson.
The result has been verified to be identical via diffoscope.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agomk: use script to generate examples.dox
Luca Boccassi [Tue, 11 Sep 2018 20:42:33 +0000 (21:42 +0100)]
mk: use script to generate examples.dox

This will make it possible to generate the file in the same way from
Meson as well.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agobuild: fix compatibility with meson 0.41 onwards
Bruce Richardson [Tue, 18 Sep 2018 10:55:52 +0000 (11:55 +0100)]
build: fix compatibility with meson 0.41 onwards

Versions of meson prior to 0.47 flattened the parameters to the
"set_variable" function, which meant that the function could not take
array variables as a parameter. Therefore, we need to disable driver
tracking for those older versions, in order to maintain compatibility
with the minimum supported 0.41 version, and also v0.45 shipped in
Ubuntu 18.04 release.

Fixes: 806c45dd483d ("build: add configuration summary at end of config")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Timothy Redaelli <tredaelli@redhat.com>
5 years agodevtools: use shared libs to save space in build test
Bruce Richardson [Fri, 14 Sep 2018 16:17:17 +0000 (17:17 +0100)]
devtools: use shared libs to save space in build test

For usability, the default build type in meson is static, so that
binaries can be run from the build directory easily. However, static
builds take more space, so for build-testing purposes default to using
shared builds where possible.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agopdump: remove dependency on libpthread
Reshma Pattan [Tue, 7 Aug 2018 14:41:17 +0000 (15:41 +0100)]
pdump: remove dependency on libpthread

pdump library now uses generic multi process channel
and it is no more dependent on the pthreads, so remove
the dependency from the Makefile.

Fixes: 660098d61f57 ("pdump: use generic multi-process channel")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
5 years agobuild: add configuration summary at end of config
Bruce Richardson [Wed, 29 Aug 2018 16:19:20 +0000 (17:19 +0100)]
build: add configuration summary at end of config

After running meson to configure a DPDK build, it can be useful to know
what was automatically enabled or disabled. Therefore, print out by way of
summary a categorised list of libraries and drivers to be built.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agobuild: simplify logic for default library dependencies
Bruce Richardson [Thu, 19 Jul 2018 14:37:02 +0000 (15:37 +0100)]
build: simplify logic for default library dependencies

EAL is a standard dependency of all libraries, except for those built
before it. We can therefore simplify the logic by just checking if EAL
has been processed, and make it a standard dependency if so.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agobuild: create relative symlinks for PMDs in libdir
Luca Boccassi [Wed, 12 Sep 2018 17:21:34 +0000 (18:21 +0100)]
build: create relative symlinks for PMDs in libdir

Add -r option to ln, otherwise the link will be absolute and contain
the build path and break packaging among other things:

lrwxrwxrwx 1 bluca bluca     99 Sep 11 22:17 librte_mempool_dpaa.so.1.1
  -> /home/bluca/git/dpdk/testt4//usr/local/lib/x86_64-linux-gnu/dpdk/
     drivers/librte_mempool_dpaa.so.1.1

With -r:

lrwxrwxrwx 1 bluca bluca     35 Sep 12 18:13 librte_pmd_zlib.so.1.1
  -> dpdk/drivers/librte_pmd_zlib.so.1.1

Fixes: ed4d43d73e2b ("build: symlink drivers to library directory")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Tested-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agobuild: add ppc64 meson build
Luca Boccassi [Mon, 10 Sep 2018 11:32:43 +0000 (12:32 +0100)]
build: add ppc64 meson build

This has been only build-tested for now, on a native ppc64el POWER8E
machine running Debian sid.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agoigb_uio: install module when building with meson
Luca Boccassi [Mon, 17 Sep 2018 09:01:27 +0000 (10:01 +0100)]
igb_uio: install module when building with meson

Install in $kerneldir/../extra/dpdk. Usually $kerneldir should something
like: /lib/modules/$kver/build, so this directory will match the default
one used by legacy makefiles.

Fixes: a52f4574f798 ("igb_uio: build with meson")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agonet/i40e: use -Wno-error=format-security for meson
Luca Boccassi [Mon, 17 Sep 2018 09:01:26 +0000 (10:01 +0100)]
net/i40e: use -Wno-error=format-security for meson

This PMD is built with -Wno-format, which means GCC errors out if
-Wformat-security is used.

Fixes: e940646b20fa ("drivers/net: build Intel NIC PMDs with meson")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agoraw/ifpga: use -Wno-error=format-security for meson
Luca Boccassi [Mon, 17 Sep 2018 09:01:25 +0000 (10:01 +0100)]
raw/ifpga: use -Wno-error=format-security for meson

This PMD is built with -Wno-format, which means GCC errors out if
-Wformat-security is used.

Fixes: 56bb54ea1bdf ("raw/ifpga/base: add Intel FPGA OPAE share code")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agoeal: include missing hypervisor files in meson
Luca Boccassi [Mon, 17 Sep 2018 09:01:24 +0000 (10:01 +0100)]
eal: include missing hypervisor files in meson

They are built by the legacy makefiles but not by Meson.

Fixes: 8f40ee0734c8 ("eal/x86: get hypervisor name")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agocompat: fix symbol version support with meson
Bruce Richardson [Mon, 17 Sep 2018 08:18:00 +0000 (09:18 +0100)]
compat: fix symbol version support with meson

For meson builds, the define to enable the symbol version
macros in rte_compat.h was missing. This led to symbols being
omitted from shared objects. For example, checking rte_distributor.so
with objdump and comparing make and meson built versions:

$ objdump -T make-build/lib/librte_distributor.so | grep _flush
 0000000000001b60 g    DF .text 00000000000000a7 (DPDK_2.0)   rte_distributor_flush
 0000000000003f10 g    DF .text 0000000000000434  DPDK_17.05  rte_distributor_flush
$ objdump -T meson-build/lib/librte_distributor.so | grep _flush
 0000000000001d50 g    DF .text 00000000000000fb  DPDK_2.0    rte_distributor_flush

Adding in the missing define fixes this.

Fixes: 5b9656b157d3 ("lib: build with meson")
Cc: stable@dpdk.org
Reported-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Luca Boccassi <bluca@debian.org>
5 years agocrypto/openssl: replace macros by static inline functions
Ashish Gupta [Tue, 31 Jul 2018 14:16:25 +0000 (19:46 +0530)]
crypto/openssl: replace macros by static inline functions

Replace macros by static inline functions in openssl version
compatibility layer

Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agoexamples/ipsec-secgw: support 3DES-CBC
Hemant Agrawal [Wed, 25 Jul 2018 09:49:43 +0000 (15:19 +0530)]
examples/ipsec-secgw: support 3DES-CBC

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
5 years agoapp/bbdev: fix inputs mbuf creation
Kamil Chalupnik [Fri, 17 Aug 2018 07:19:19 +0000 (09:19 +0200)]
app/bbdev: fix inputs mbuf creation

Omitting inputs and outputs mbuf creation for BaseBand Null Device
as inputs and outputs data do not exist for Null Device

Fixes: b2a4654f082b ("mempool: check for zero size creation")
Cc: stable@dpdk.org
Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
5 years agocompress/qat: use compression specific driver name
Fiona Trahe [Fri, 10 Aug 2018 15:18:01 +0000 (16:18 +0100)]
compress/qat: use compression specific driver name

The QAT compression driver was named "qat".
Rename to compress_qat for consistency with other compressdev drivers
and with crypto_qat.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
5 years agocrypto/qat: fix typo
Fiona Trahe [Fri, 10 Aug 2018 15:18:39 +0000 (16:18 +0100)]
crypto/qat: fix typo

Fixes: f9a3d7f68f05 ("crypto/qat: move code into appropriate files")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
5 years agodoc: describe qat build config options
Fiona Trahe [Fri, 10 Aug 2018 14:10:53 +0000 (15:10 +0100)]
doc: describe qat build config options

Added description of the build configuration options for QAT.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
5 years agodoc: update build instructions for qat PMDs
Fiona Trahe [Fri, 10 Aug 2018 14:10:52 +0000 (15:10 +0100)]
doc: update build instructions for qat PMDs

Update PMD build section.
Linked to kernel dependency section and refactored text
between those 2 sections.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
5 years agodoc: add overview of qat guide
Fiona Trahe [Fri, 10 Aug 2018 14:10:51 +0000 (15:10 +0100)]
doc: add overview of qat guide

Add overview of QAT doc sections and link between them.
Indent to next level all sections within
the crypto and common sections.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
5 years agodoc: correct typo and cosmetic changes in qat guide
Fiona Trahe [Fri, 10 Aug 2018 14:10:50 +0000 (15:10 +0100)]
doc: correct typo and cosmetic changes in qat guide

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
5 years agodoc: add how to test in qat crypto guide
Fiona Trahe [Fri, 10 Aug 2018 14:10:49 +0000 (15:10 +0100)]
doc: add how to test in qat crypto guide

Add section to common QAT part of doc about
which tests can be used to exercise
QAT compress and crypto PMDS

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
5 years agodoc: add limitations to qat compressdev guide
Fiona Trahe [Fri, 10 Aug 2018 14:10:48 +0000 (15:10 +0100)]
doc: add limitations to qat compressdev guide

Add two missing limitations to QAT compressdev documentation.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>