dpdk.git
4 years agonet/bnxt: fix reusing L2 filter
Somnath Kotur [Sat, 21 Dec 2019 02:29:41 +0000 (18:29 -0800)]
net/bnxt: fix reusing L2 filter

The software L2 filter was being released back to the free pool,
though it was created in HW and the filter corresponding to an actual
'flow' would have reference to the HW L2 filter.
But if this 'flow were to be deleted, then this HW L2 filter also
would be gone.
Fix this by storing the L2 filter created originally either for an
n-tuple flow or otherwise as part of the vnic's filter list.
This would require the filter_info struct to have a backptr to the
vnic which it came from.
Now that L2 filters can be re-used for an n-tuple filter(s), delete
L2 filter as well so the reference count of an L2 filter (if reused)
can be decremented appropriately.

Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: fix non matching flow hitting filter rule
Santoshkumar Karanappa Rastapur [Sat, 21 Dec 2019 02:29:40 +0000 (18:29 -0800)]
net/bnxt: fix non matching flow hitting filter rule

As part of ntuple filter, we were creating L2 filter with the ntuple
redirect queue resulting in any L2 matching flow getting steered to
this queue. For ntuple filters, we need to create the L2 filter with
default queue. The user specified redirect queue will be set while
creating the ntuple filter in hardware.

Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Cc: stable@dpdk.org
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
4 years agonet/bnxt: fix flow flush to sync with flow destroy
Somnath Kotur [Sat, 21 Dec 2019 02:29:39 +0000 (18:29 -0800)]
net/bnxt: fix flow flush to sync with flow destroy

Sync flow flush routine with flow destroy so that the operations
performed per flow during a flush are the same as that are done for an
individual flow destroy by having a common function to call for both.
One of the things that was missed in the flow flush routine was the
deletion of the L2 filter that would have been created as part of an
n-tuple filter.
Also, decrement the l2_ref_cnt for a filter in the case of a filter
update as it would've bumped up previously in validate_and_parse_flow()

Fixes: 89278c59d97c ("net/bnxt: fix flow flush handling")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
4 years agonet/bnxt: fix Tx queue profile selection
Somnath Kotur [Sat, 21 Dec 2019 02:29:37 +0000 (18:29 -0800)]
net/bnxt: fix Tx queue profile selection

In the case when CoS classification is disabled, driver was iterating
looking for only lossy profiles as that is what is expected to be used
for regular NIC operations. But in certain custom profiles, there were
no lossy profiles configured, only lossless profiles instead.
To handle such cases, it is better to fallback to using the first valid
profile.

Fixes: 698aa7e95325 ("net/bnxt: add code to determine the Tx COS queue")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: fix link during port toggle
Santoshkumar Karanappa Rastapur [Sat, 21 Dec 2019 02:29:35 +0000 (18:29 -0800)]
net/bnxt: fix link during port toggle

We need to wait for up to 500ms to receive async event notification
after forcing link down. Similarly we need to wait for up to 10s for
link to come up after configuring the hardware for link up.

Fixes: c09f57b49c13 ("net/bnxt: add start/stop/link update operations")
Cc: stable@dpdk.org
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
4 years agonet/ixgbe: set fixed flag for exact link speed
Guinan Sun [Tue, 3 Dec 2019 16:59:28 +0000 (16:59 +0000)]
net/ixgbe: set fixed flag for exact link speed

Setting exact link speed makes sense if auto-negotiation is
disabled. Fixed flag is required to disable auto-negotiation.

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Ting Xu <ting.xu@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/i40e: set fixed flag for exact link speed
Guinan Sun [Tue, 3 Dec 2019 16:59:27 +0000 (16:59 +0000)]
net/i40e: set fixed flag for exact link speed

Setting exact link speed makes sense if auto-negotiation is
disabled. Fixed flag is required to disable auto-negotiation.

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Ting Xu <ting.xu@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/i40e: fix Tx when TSO is enabled
Xiaoyun Li [Thu, 26 Dec 2019 06:45:44 +0000 (14:45 +0800)]
net/i40e: fix Tx when TSO is enabled

Hardware limits that max buffer size per tx descriptor should be
(16K-1)B. So when TSO enabled, the mbuf data size may exceed the
limit and cause malicious behavior to the NIC. This patch fixes
this issue by using more tx descs for this kind of large buffer.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Ciara Loftus <ciara.loftus@intel.com>
4 years agonet/iavf: fix virtual channel return
Yahui Cao [Tue, 24 Dec 2019 04:13:13 +0000 (12:13 +0800)]
net/iavf: fix virtual channel return

In iavf_handle_virtchnl_msg(), it is not appropriate for _clear_cmd()
to be used as a notification to foreground thread. So introduce
_notify_cmd() to fix this error. In addition, since _notify_cmd()
contains rte_wmb(), rte_compiler_barrier() is not necessary.

Sending msg from VF to PF is mainly by calling iavf_execute_vf_cmd(),
the whole virtchnl msg process is like,

iavf_execute_vf_cmd() will call iavf_aq_send_msg_to_pf() to send
msg and then polling the cmd done flag as "if (vf->pend_cmd ==
VIRTCHNL_OP_UNKNOWN)"

When reply msg is returned by pf, iavf_handle_virtchnl_msg() in
isr will read msg return value by "vf->cmd_retval = msg_ret" and
immediately set the cmd done flag by calling _clear_cmd() to
notify the iavf_execute_vf_cmd().

iavf_execute_vf_cmd() find the cmd done flag is set and then
check whether command return value vf->cmd_retval is success or
not.

However _clear_cmd() also resets the vf->cmd_retval to success,
overwriting the actual return value which is used for diagnosis.
So iavf_execute_vf_cmd() will always find vf->cmd_retval is
success and then return success.

Fixes: 22b123a36d07 ("net/avf: initialize PMD")
Cc: stable@dpdk.org
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ipn3ke: fix line side statistics register read
Andy Pei [Tue, 31 Dec 2019 06:53:47 +0000 (14:53 +0800)]
net/ipn3ke: fix line side statistics register read

To read line side statistics register, eth_group_sel
args in function ipn3ke_indirect_mac_read should be 0.
When eth_group_sel is 1, the nic side register is read.

Fixes: 5a6d883878db ("net/ipn3ke: implement statistics")
Cc: stable@dpdk.org
Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
4 years agonet/ice: fix VSI context
Beilei Xing [Sat, 14 Dec 2019 06:14:17 +0000 (14:14 +0800)]
net/ice: fix VSI context

There'll always be a MDD event triggered when adding
a FDIR rule. The root cause is 'LAN enable' is not
configured during control VSI setup.
Besides, correct FDIR fields for both main VSI and
control VSI.

Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
4 years agonet/iavf/base: update version info
Qi Zhang [Tue, 3 Dec 2019 07:03:18 +0000 (15:03 +0800)]
net/iavf/base: update version info

Update base code version info in readme.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf: move device state flag
Qi Zhang [Tue, 3 Dec 2019 07:03:17 +0000 (15:03 +0800)]
net/iavf: move device state flag

Move device state flag from ice_hw to ice_adapter since it should
not be a part of base code.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: fix adminq return
Qi Zhang [Tue, 3 Dec 2019 07:03:16 +0000 (15:03 +0800)]
net/iavf/base: fix adminq return

When send a adminq, if get IAVF_AQ_RC_BUSY, we should return
IAVF_ERR_NOT_READY.

Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")
Cc: stable@dpdk.org
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: update copyright date
Qi Zhang [Tue, 3 Dec 2019 07:03:15 +0000 (15:03 +0800)]
net/iavf/base: update copyright date

Update copyright date to cover 2019.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: support more link speeds
Qi Zhang [Tue, 3 Dec 2019 07:03:14 +0000 (15:03 +0800)]
net/iavf/base: support more link speeds

Add 2.5G and 5G link speed support.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: update FW API version for X722
Qi Zhang [Tue, 3 Dec 2019 07:03:13 +0000 (15:03 +0800)]
net/iavf/base: update FW API version for X722

Update FW API version from 1.5 to 1.6 for X722
Also added NVM update related APIs.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: fix command buffer memory leak
Qi Zhang [Tue, 3 Dec 2019 07:03:12 +0000 (15:03 +0800)]
net/iavf/base: fix command buffer memory leak

Allocated resources were not freed in the event of failure in
iavf_init_asq function. This patch gracefully handles all failures.

Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")
Cc: stable@dpdk.org
Signed-off-by: Pandi Kumar Maharajan <pandi.maharajan@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: increase max VSI count for VFs
Qi Zhang [Tue, 3 Dec 2019 07:03:11 +0000 (15:03 +0800)]
net/iavf/base: increase max VSI count for VFs

Change max VSI per VF from 3 to 4.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: adjust indentation
Qi Zhang [Tue, 3 Dec 2019 07:03:10 +0000 (15:03 +0800)]
net/iavf/base: adjust indentation

Adjust the indent in function and macro definition.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: update virtual channel
Qi Zhang [Tue, 3 Dec 2019 07:03:09 +0000 (15:03 +0800)]
net/iavf/base: update virtual channel

Update virtual channel API to align with latest spec.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: rename functions
Qi Zhang [Tue, 3 Dec 2019 07:03:08 +0000 (15:03 +0800)]
net/iavf/base: rename functions

Rename iavf_parse_hw_config to iavf_vf_parse_hw_config.
Rename iavf_reset to iavf_vf_reset.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: remove unnecessary compile option
Qi Zhang [Tue, 3 Dec 2019 07:03:07 +0000 (15:03 +0800)]
net/iavf/base: remove unnecessary compile option

Remove compile option INTEGRATED_VF.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: remove unused code
Qi Zhang [Tue, 3 Dec 2019 07:03:06 +0000 (15:03 +0800)]
net/iavf/base: remove unused code

Remove unused APIs in iavf_prototype.h, iavf_adminq_cmd.h
iavf_type.h, iavf_adminq.h and iavf_common.c

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: update device IDs
Qi Zhang [Tue, 3 Dec 2019 07:03:05 +0000 (15:03 +0800)]
net/iavf/base: update device IDs

Add all supported device id.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: rename register macro
Qi Zhang [Tue, 3 Dec 2019 07:03:04 +0000 (15:03 +0800)]
net/iavf/base: rename register macro

Rename all register macro to align with kernel driver's implementation.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: rename error code enum
Qi Zhang [Tue, 3 Dec 2019 07:03:03 +0000 (15:03 +0800)]
net/iavf/base: rename error code enum

Rename iavf_status_code to iavf_status to align with kernel
driver's implementation.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/iavf/base: remove unnecessary header file
Qi Zhang [Tue, 3 Dec 2019 07:03:02 +0000 (15:03 +0800)]
net/iavf/base: remove unnecessary header file

Delete iavf_hmc.h and iavf_lan_hmc.h since its not necessary.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/ixgbe: support VF MAC address add/remove
Guinan Sun [Tue, 24 Dec 2019 03:23:57 +0000 (03:23 +0000)]
net/ixgbe: support VF MAC address add/remove

Ixgbe PMD PF host code needs to support ixgbevf MAC address
add and remove. For this purpose, a response was added
between PF and VF to update the MAC address.

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/i40e: enable multi-queue Rx interrupt for VF
Lunyuan Cui [Tue, 3 Dec 2019 11:43:39 +0000 (11:43 +0000)]
net/i40e: enable multi-queue Rx interrupt for VF

Current implementation is that only one Rx queue can support interrupt,
because all queues are mapped in the same vector id in
vfio_enable_msix(). So VF can not support multi-queue Rx interrupt in
the interrupt mode.

In this patch, if the packet I/O interrupt on datapath is enabled
(rte_intr_dp_is_en(intr_handle) is true), we map different interrupt
vectors to each queue and send this map to PF. After PF sets the map to
the register, all Rx queue interrupts will be received.

In addition, vector id should less than the maximum vector value. When
queue number is more than vector value, we set up a loop of interrupt
vectors map.

Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agoethdev: fix flow API doxygen comment
Stephen Hemminger [Wed, 18 Dec 2019 01:12:40 +0000 (17:12 -0800)]
ethdev: fix flow API doxygen comment

Missing asterisk so that comment is not seen by doxygen.

Fixes: 9a2f44c76207 ("ethdev: add flow tag")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/ixgbe: enable jumbo frame for VF
Junyu Jiang [Mon, 2 Dec 2019 20:03:27 +0000 (20:03 +0000)]
net/ixgbe: enable jumbo frame for VF

Enable jumbo frame for VF by configuring DPDK PF.

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
4 years agonet/ice: add device IDs for C822N
Ting Xu [Wed, 18 Dec 2019 12:41:58 +0000 (12:41 +0000)]
net/ice: add device IDs for C822N

This patch added new device IDs for C822N.

Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/mlx5: fix item flag on GENEVE item validation
Dekel Peled [Wed, 18 Dec 2019 15:09:55 +0000 (17:09 +0200)]
net/mlx5: fix item flag on GENEVE item validation

On validation of GENEVE item, the wrong flag is used.
This patch sets the correct bit in item_flags bitmap.

Fixes: e59a5dbcfd07 ("net/mlx5: add flow match on GENEVE item")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: support RSS on src or dst fields only
Dekel Peled [Wed, 18 Dec 2019 10:05:47 +0000 (12:05 +0200)]
net/mlx5: support RSS on src or dst fields only

This patch implements the feature described in RFC [1], adding
support of RSS action on L3 and/or L4 source or destination only.

[1] http://mails.dpdk.org/archives/dev/2019-December/152796.html

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix setting of Rx hash fields
Dekel Peled [Wed, 18 Dec 2019 10:05:46 +0000 (12:05 +0200)]
net/mlx5: fix setting of Rx hash fields

Rx hash fields were copied from input parameter into TIR attributes
directly, with no translation. As result the copied value was wrong.

This patch adds translation of value from input bitmap to the
appropriate format.

Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: add define of LRO segment chunk size
Dekel Peled [Wed, 18 Dec 2019 07:51:39 +0000 (09:51 +0200)]
net/mlx5: add define of LRO segment chunk size

Maximal size of coalesced LRO segment is set in TIR attributes as
number of chunks of size 256 bytes each.
Current implementation uses the hardcoded value 256 in several places.

This patch adds a definition for this value, and uses this definition
in all relevant places.
A debug message is added to clearly notify the actual configured size.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: remove redundant define of LRO masks
Dekel Peled [Wed, 18 Dec 2019 07:49:36 +0000 (09:49 +0200)]
net/mlx5: remove redundant define of LRO masks

Bit-masks MLX5_FLOW_LAYER_IPV4_LRO and MLX5_FLOW_LAYER_IPV6_LRO were
added during work on LRO.
They are not used anywhere in current code.

This patch removes these redundant definitions.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/bnxt: add a field for FW capabilities
Kalesh AP [Tue, 10 Dec 2019 15:05:29 +0000 (20:35 +0530)]
net/bnxt: add a field for FW capabilities

The purpose of this patch is used to add a new field "fw_cap"
in bnxt structure. The new "fw_cap" field store all the capabilities
reported by the FW. This information will help us to determine
the device capabilities when registering feature support with FW.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: reset filter indices on free
Kalesh AP [Tue, 10 Dec 2019 15:05:28 +0000 (20:35 +0530)]
net/bnxt: reset filter indices on free

Fix bnxt_free_filter() to ensure that the filter indices
are reset correctly when a filter is freed.

This change helps in avoiding few duplicate code as well.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: remove unnecessary macro for unused variables
Kalesh AP [Tue, 10 Dec 2019 15:05:27 +0000 (20:35 +0530)]
net/bnxt: remove unnecessary macro for unused variables

Remove "__rte_unused" instances that are not required.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
4 years agonet/bnxt: fix request for hot reset support
Kalesh AP [Tue, 10 Dec 2019 15:05:26 +0000 (20:35 +0530)]
net/bnxt: fix request for hot reset support

During the registration process, the drivers must publish
"HOT_RESET_SUPPORTED" capability to the core firmware only
if core firmware is capable of Hot Reset.

Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
4 years agonet/bnxt: restore VLAN filters during reset recovery
Kalesh AP [Tue, 10 Dec 2019 15:05:25 +0000 (20:35 +0530)]
net/bnxt: restore VLAN filters during reset recovery

Older Firmware could have state information such as
MAC Filters, VLAN settings etc configured by user.
But new Firmware is unaware of this state information
and as a result driver should restore these settings
during reset recovery.

This patch restores the user configured vlan settings
prior to hot FW upgrade or FW error.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: restore MAC filters during reset recovery
Kalesh AP [Tue, 10 Dec 2019 15:05:24 +0000 (20:35 +0530)]
net/bnxt: restore MAC filters during reset recovery

Older Firmware could have state information such as
MAC Filters, VLAN settings etc configured by user.
But new Firmware is unaware of this state information
and as a result driver should restore these settings
during reset recovery.

This patch restores the user configured mac addresses
prior to hot FW upgrade or FW error.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/mlx5: fix multiple flow table hash list
Xiaoyu Min [Mon, 16 Dec 2019 09:27:41 +0000 (11:27 +0200)]
net/mlx5: fix multiple flow table hash list

The eth devices which share one ibv device only need one hash list of
flow table.

Currently, flow table hash list is created per each eth device
whatever whether they share one ibv device or not.

If the devices share one ibv device, the previously created hash list
will become dangle because the pointer point to (sh->flow_tbls) is
overwritten by the later created hast list.

To fix this, just don't create hash list if it is already created.

Fixes: 54534725d2f3 ("net/mlx5: fix flow table hash list conversion")
Cc: stable@dpdk.org
Reported-by: Zhike Wang <wangzhike@jd.com>
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: clean up redundant assignment
Tonghao Zhang [Wed, 27 Nov 2019 14:18:42 +0000 (22:18 +0800)]
net/mlx5: clean up redundant assignment

The type of txq has been assigned in mlx5_txq_hairpin_new.

Fixes: ae18a1ae9692 ("net/mlx5: support Tx hairpin queues")
Cc: stable@dpdk.org
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agonet/mlx5: fix crash when setting hairpin queues
Tonghao Zhang [Wed, 27 Nov 2019 14:18:41 +0000 (22:18 +0800)]
net/mlx5: fix crash when setting hairpin queues

If configuring the number of tx/rx queue with rte_eth_dev_configure
to nr_queues + hairpin_nr_queues, and setting tx/rx queues to
nr_queues with rte_eth_tx/rx_queue_setup. But not configuring the
hairpin queues via rte_eth_tx/rx_hairpin_queue_setup.

When starting the netdev, there is a crash because of NULL accessing.

Fixes: cf5516696d77 ("ethdev: add hairpin queue")
Cc: stable@dpdk.org
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agonet/i40e: re-program promiscuous mode on VF interface
Eelco Chaudron [Tue, 19 Nov 2019 13:45:21 +0000 (08:45 -0500)]
net/i40e: re-program promiscuous mode on VF interface

During a kernel PF reset, this event is propagated to the VF.
The DPDK VF PMD will execute the reset task before the PF is done
with his. This results in the admin queue message not being responded
to leaving the port in "promiscuous" mode.

This patch makes sure the promiscuous mode is configured independently
of the current admin state.

Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Reviewed-by: Xiao Zhang <xiao.zhang@intel.com>
4 years agonet/ixgbe: fix link up in FreeBSD
Lunyuan Cui [Mon, 16 Dec 2019 02:24:18 +0000 (02:24 +0000)]
net/ixgbe: fix link up in FreeBSD

In FreeBSD environment, nic_uio drivers do not support interrupts,
rte_intr_callback_register() will fail to register interrupts.
We cannot make link status to change from down to up by interrupt
callback. So we need to wait for the controller to acquire link
when ports start. Through multiple tests, 5s should be enough.

Fixes: b9bd0f09fa15 ("ethdev: fix link status query")
Cc: stable@dpdk.org
Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agonet/ixgbe: fix link status
Lunyuan Cui [Tue, 17 Dec 2019 06:12:03 +0000 (06:12 +0000)]
net/ixgbe: fix link status

The link status for ixgbevf is not correct when PF link up.
IXGBE_ESDP register is only used when media type is fiber.

Fixes: 1ca05831b9be ("net/ixgbe: fix link status")
Cc: stable@dpdk.org
Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/iavf: add TSO offload use basic path
Tao Zhu [Tue, 3 Dec 2019 15:28:25 +0000 (23:28 +0800)]
net/iavf: add TSO offload use basic path

IAVF choices VECTOR TX path or Basic TX path by macro
IAVF_NO_VECTOR_FLAGS. TSO offload only processed by Basic TX path.

Fixes: 605c6f9ca52f ("net/avf: convert to new Rx and Tx offload API")
Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/i40e: fix port close in FreeBSD
Chenxu Di [Wed, 11 Dec 2019 09:06:03 +0000 (09:06 +0000)]
net/i40e: fix port close in FreeBSD

FreeBSD OS doesn't support igb_uio interrupt, so it will fail when
unregister the interrupt callback in port close. We can fix the issue by
passing -ENOENT when check the return value of unregister interrupt
callback function.

Fixes: ac89d46096d5 ("net/i40e: release port upon close")
Cc: stable@dpdk.org
Signed-off-by: Chenxu Di <chenxux.di@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/iavf: fix Rx total stats
Jiaqi Min [Fri, 13 Dec 2019 01:23:29 +0000 (01:23 +0000)]
net/iavf: fix Rx total stats

Rx total stats is the total number of successfully received packets,
so exclude the number of rx_discards for Rx total stats.

Fixes: f4a41a6953af ("net/avf: support stats")
Cc: stable@dpdk.org
Signed-off-by: Jiaqi Min <jiaqix.min@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
4 years agonet/ipn3ke: fix meson build
Bruce Richardson [Thu, 12 Dec 2019 17:28:43 +0000 (17:28 +0000)]
net/ipn3ke: fix meson build

The ipn3ke driver and the ifpga driver had circular dependencies on each
other, meaning that neither could be built with meson. Fix this by:

* setting the build order of net and raw to match that in makefiles
* removing the dependency from the net driver on the rawdev one
* fixing the dependency names in the rawdev driver meson.build file

Fixes: 8418c92811b4 ("net/ipn3ke: remove configuration for i40e port bonding")
Fixes: e1defba4cf66 ("raw/ifpga/base: support device tree")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
4 years agomaintainers: update for OCTEON TX
Jerin Jacob [Wed, 11 Dec 2019 14:23:42 +0000 (19:53 +0530)]
maintainers: update for OCTEON TX

Harman thankfully accepted to replace myself as maintainer for OCTEONTX
ethdev PMD.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agomaintainers: adjust maintainership of Intel tree
Xiaolong Ye [Wed, 11 Dec 2019 09:12:35 +0000 (17:12 +0800)]
maintainers: adjust maintainership of Intel tree

Currently I am the main committer of dpdk-next-net-intel tree.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/ice: fix packet type table
Shougang Wang [Tue, 10 Dec 2019 01:33:21 +0000 (01:33 +0000)]
net/ice: fix packet type table

According to comms package, index 94 should be MAC_IPV6_ICMP,
not MAC_IPV4_ICMP. This patch fixes the issue.

Fixes: 4cf29798b4c9 ("net/ice: fix packet type table")
Cc: stable@dpdk.org
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/netvsc: disable before changing RSS parameters
Stephen Hemminger [Fri, 6 Dec 2019 23:52:48 +0000 (15:52 -0800)]
net/netvsc: disable before changing RSS parameters

In order to change RSS parameters, the host requires that RSS
is disable first.

Fixes: 92d23a57cafe ("net/netvsc: support configuring RSS parameters")
Cc: stable@dpdk.org
Signed-off-by: Donald Lee <donald_lee@trendmicro.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Dexuan Cui <decui@microsoft.com>
Tested-by: Abhishek Marathe <abmarath@microsoft.com>
4 years agonet/netvsc: fix RSS offload flag
Stephen Hemminger [Fri, 6 Dec 2019 23:52:47 +0000 (15:52 -0800)]
net/netvsc: fix RSS offload flag

The change to add OFFLOAD_RSS_HASH broke use of netvsc PMD
with testpmd. The netvsc driver fails during configure step:

Configuring Port 1 (socket 0)
hn_dev_configure(): unsupported RX offload: 0x80000

Fixes: 5d308972954c ("ethdev: add mbuf RSS update as an offload")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agonet/ice: disable TSO offload in vector path
Tao Zhu [Tue, 3 Dec 2019 15:28:52 +0000 (23:28 +0800)]
net/ice: disable TSO offload in vector path

ICE choices VECTOR TX path or Basic TX path by macro
ICE_NO_VECTOR_FLAGS.
TSO offload only processed by Basic TX path.

Fixes: f88de4694d94 ("net/ice: support Tx SSE vector")
Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/fm10k: fix descriptor VLAN field filling in Tx
Lu Qiuwen [Thu, 5 Dec 2019 13:30:08 +0000 (21:30 +0800)]
net/fm10k: fix descriptor VLAN field filling in Tx

The VLAN field in the descriptor is not filled when ol_flags has
no VLAN flag. When the caller sends some packets with VLAN tags,
but other packets do not have VLAN tags, the behavior of the program
cannot be determined.

Fixes: 4b61d3bfa941 ("fm10k: add receive and tranmit")
Cc: stable@dpdk.org
Signed-off-by: Lu Qiuwen <luqiuwen@iie.ac.cn>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
4 years agonet/pcap: truncate packet if it is too large
Zhike Wang [Mon, 9 Dec 2019 01:53:09 +0000 (09:53 +0800)]
net/pcap: truncate packet if it is too large

Previously large packet would be dropped, instead now it is better to
keep it via truncating it.

Signed-off-by: Zhike Wang <wangzhike@jd.com>
Reviewed-by: Cian Ferriter <cian.ferriter@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoapp/testpmd: fix device mcast list error handling
Ciara Power [Wed, 4 Dec 2019 16:38:15 +0000 (16:38 +0000)]
app/testpmd: fix device mcast list error handling

The multicast set list function now has a return value, which is checked
by the calling functions. A rollback occurs on detection of failure, to
realign local config with the device config.

The error print statement in the function had included the port_id and
mc_addr_nb values in the wrong order, these are now swapped.

Fixes: 8fff667578a7 ("app/testpmd: new command to add/remove multicast MAC addresses")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/bnxt: use macro for getting default VNIC
Kalesh AP [Mon, 2 Dec 2019 04:18:09 +0000 (09:48 +0530)]
net/bnxt: use macro for getting default VNIC

BNXT_GET_DEFAULT_VNIC macro returns the default VNIC of the
function and fixed all occurrences of code to use the macro.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
4 years agonet/bnxt: remove a log while deleting EM filters
Kalesh AP [Mon, 2 Dec 2019 04:18:08 +0000 (09:48 +0530)]
net/bnxt: remove a log while deleting EM filters

Remove an unnecessary log while deleting EM filters.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
4 years agonet/bnxt: refactor chip type selection
Kalesh AP [Mon, 2 Dec 2019 04:18:07 +0000 (09:48 +0530)]
net/bnxt: refactor chip type selection

Use switch-case statement to replace if-else statement.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
4 years agoapp/testpmd: show MAC addresses added to a port
Kalesh AP [Mon, 25 Nov 2019 08:27:50 +0000 (13:57 +0530)]
app/testpmd: show MAC addresses added to a port

Patch adds a runtime function to display the unicast and
multicast MAC addresses added to a port.

Syntax:
show port (port_id) macs|mcast_macs

Usage:
testpmd> show port 0 macs
Number of MAC address added: 1
  B0:26:28:7F:F5:C1
testpmd>
testpmd> show port 0 mcast_macs
Number of Multicast MAC address added: 0
testpmd>
testpmd> mac_addr add 0 B0:26:28:7F:22:33
testpmd> mac_addr add 0 B0:26:28:7F:22:34
testpmd> show port 0 macs
Number of MAC address added: 3
  B0:26:28:7F:F5:C1
  B0:26:28:7F:22:33
  B0:26:28:7F:22:34
testpmd>
testpmd> mac_addr remove 0 B0:26:28:7F:22:33
testpmd> show port 0 macs
Number of MAC address added: 2
  B0:26:28:7F:F5:C1
  B0:26:28:7F:22:34

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoeventdev: use custom element size rings
Honnappa Nagarahalli [Sat, 18 Jan 2020 19:32:47 +0000 (13:32 -0600)]
eventdev: use custom element size rings

Use custom element size ring APIs to replace event ring
implementation. This avoids code duplication.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
4 years agohash: use 32-bit elements rings to save memory
Honnappa Nagarahalli [Sat, 18 Jan 2020 19:32:46 +0000 (13:32 -0600)]
hash: use 32-bit elements rings to save memory

The freelist and external bucket indices are 32b. Using rings
that use 32b element sizes will save memory.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
4 years agotest/ring: add custom element size performance tests
Honnappa Nagarahalli [Sat, 18 Jan 2020 19:32:45 +0000 (13:32 -0600)]
test/ring: add custom element size performance tests

Adjust the performance test cases to test rte_ring_xxx_elem APIs.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agotest/ring: add custom element size functional tests
Honnappa Nagarahalli [Sat, 18 Jan 2020 19:32:44 +0000 (13:32 -0600)]
test/ring: add custom element size functional tests

Add basic infrastructure to test rte_ring_xxx_elem APIs.
Adjust the existing test cases to test for various ring
element sizes.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agoring: support configurable element size
Honnappa Nagarahalli [Sat, 18 Jan 2020 19:32:43 +0000 (13:32 -0600)]
ring: support configurable element size

Current APIs assume ring elements to be pointers. However, in many
use cases, the size can be different. Add new APIs to support
configurable ring element sizes.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agotest/ring: use division for cycle count calculation
Honnappa Nagarahalli [Sat, 18 Jan 2020 19:32:42 +0000 (13:32 -0600)]
test/ring: use division for cycle count calculation

Use division instead of modulo operation to calculate more
accurate cycle count.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agoci: switch to Ubuntu 18.04 in Travis
Kevin Laatz [Tue, 17 Dec 2019 11:42:59 +0000 (11:42 +0000)]
ci: switch to Ubuntu 18.04 in Travis

Currently, the Travis CI is using Ubuntu 16.04 LTS (Xenial) which is
becoming increasingly outdated. This patch updates Travis to use Ubuntu
18.04 LTS (Bionic) which will give us the benefit of more up-to-date
packages being available and the newer features that come with them.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Andrzej Ostruszka <amo@semihalf.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agotest/crypto: add Chacha Poly cases
Arek Kusztal [Wed, 15 Jan 2020 17:55:24 +0000 (18:55 +0100)]
test/crypto: add Chacha Poly cases

This patch adds Chacha20-Poly1305 implementation to
cryptodev tests.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
4 years agocrypto/qat: support Chacha Poly
Arek Kusztal [Wed, 15 Jan 2020 17:55:23 +0000 (18:55 +0100)]
crypto/qat: support Chacha Poly

This patchset adds Chacha20-Poly1305 implementation to Intel
QuickAssist Technology pmd.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
4 years agotest/crypto: add mixed encypted-digest
Adam Dybkowski [Wed, 15 Jan 2020 14:59:23 +0000 (15:59 +0100)]
test/crypto: add mixed encypted-digest

This patch adds unit tests for QAT PMD for mixed encrypted-digest
cases, involving SNOW3G UIA2, ZUC EIA3, AES CMAC and NULL auth
algorithms together with SNOW3G UEA2, ZUC EEA3, AES CTR and NULL
cipher algorithms in various combinations.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
4 years agocrypto/qat: handle mixed hash-cipher requests on GEN3
Adam Dybkowski [Wed, 15 Jan 2020 14:59:22 +0000 (15:59 +0100)]
crypto/qat: handle mixed hash-cipher requests on GEN3

This patch implements handling mixed encrypted digest hash-cipher
requests (e.g. SNOW3G + ZUC or ZUC + AES CTR) possible when running
on GEN3 QAT. Such algorithm combinations are not supported on
GEN1/GEN2 hardware.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
4 years agoexamples/ipsec-secgw: fix crash on unsupported algo
Savinay Dharmappa [Fri, 13 Dec 2019 11:49:55 +0000 (11:49 +0000)]
examples/ipsec-secgw: fix crash on unsupported algo

If algo is NULL set the status to error and return. This change
prevent crashing of ipsec-secgw application when a specific
cipher/auth/aead algo are not supported by application.

Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
Cc: stable@dpdk.org
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agocrypto/qat: add minimum enqueue threshold
Arek Kusztal [Wed, 15 Jan 2020 14:32:11 +0000 (15:32 +0100)]
crypto/qat: add minimum enqueue threshold

This patch adds minimum enqueue threshold to Intel
QuickAssist Technology PMD.
It is an optimisation, configured by a command line option,
which can be used to reduce MMIO write occurrences.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
4 years agocommon/qat: support dual threads for enqueue/dequeue
Fiona Trahe [Wed, 15 Jan 2020 14:32:10 +0000 (15:32 +0100)]
common/qat: support dual threads for enqueue/dequeue

Remove the limitation whereby enqueue and dequeue must be
done in same thread.
The inflight calculation is reworked to be thread-safe for 2
threads - note this is not general multi-thread support, i.e
all enqueues to a qp must still be done in one thread and
all dequeues must be done in one thread, but enqueues and
dequeues may be in separate threads.
Documentation updated.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
4 years agocommon/qat: move max in-flights param into qp
Fiona Trahe [Wed, 15 Jan 2020 14:32:09 +0000 (15:32 +0100)]
common/qat: move max in-flights param into qp

The max_inflights parameter is moved from qat_queue to qat_qp as it's
a more appropriate location.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
4 years agocommon/qat: remove tail write coalescing
Fiona Trahe [Wed, 15 Jan 2020 14:32:08 +0000 (15:32 +0100)]
common/qat: remove tail write coalescing

The feature Coalescing Tail Writes on Enqueue is removed
as it is not thread-safe and a dual-thread feature will be added shortly.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
4 years agotest/crypto: add ECPM cases
Sunila Sahu [Wed, 15 Jan 2020 12:56:34 +0000 (18:26 +0530)]
test/crypto: add ECPM cases

Add test vectors and verify routines for
asymmetric operation, EC Point Multiplication.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Sunila Sahu <ssahu@marvell.com>
4 years agocrypto/octeontx2: support ECPM
Sunila Sahu [Wed, 15 Jan 2020 12:56:33 +0000 (18:26 +0530)]
crypto/octeontx2: support ECPM

Add support asymmetric operation EC Point MUltiplication,
in crypto_octeontx2 PMD.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Balakrishna Bhamidipati <bbhamidipati@marvell.com>
Signed-off-by: Sunila Sahu <ssahu@marvell.com>
4 years agocrypto/octeontx: support ECPM
Sunila Sahu [Wed, 15 Jan 2020 12:56:32 +0000 (18:26 +0530)]
crypto/octeontx: support ECPM

Add support for asymmetric operation EC Point Multiplication,
in crypto_octeontx PMD.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Balakrishna Bhamidipati <bbhamidipati@marvell.com>
Signed-off-by: Sunila Sahu <ssahu@marvell.com>
4 years agocryptodev: support ECPM
Balakrishna Bhamidipati [Wed, 15 Jan 2020 12:56:31 +0000 (18:26 +0530)]
cryptodev: support ECPM

Asymmetric crypto library is extended to add ECPM (Elliptic Curve Point
Multiplication). The required xform type and op parameters are
introduced.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Balakrishna Bhamidipati <bbhamidipati@marvell.com>
Signed-off-by: Sunila Sahu <ssahu@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agotest/crypto: add ECDSA sign/verify cases
Ayuj Verma [Wed, 15 Jan 2020 12:43:39 +0000 (18:13 +0530)]
test/crypto: add ECDSA sign/verify cases

This patch adds ECDSA sign and verify test
routine and test vectors.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Signed-off-by: Sunila Sahu <ssahu@marvell.com>
4 years agocrypto/octeontx2: support ECDSA
Sunila Sahu [Wed, 15 Jan 2020 12:43:38 +0000 (18:13 +0530)]
crypto/octeontx2: support ECDSA

Adding support for ECDSA asymmetric crypto
operations in crypto_octeontx2 PMD.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Balakrishna Bhamidipati <bbhamidipati@marvell.com>
Signed-off-by: Sunila Sahu <ssahu@marvell.com>
4 years agocrypto/octeontx: support ECDSA
Sunila Sahu [Wed, 15 Jan 2020 12:43:37 +0000 (18:13 +0530)]
crypto/octeontx: support ECDSA

Adding support for ECDSA asymmetric crypto operations
in crypto_octeontx PMD.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Signed-off-by: Sunila Sahu <ssahu@marvell.com>
4 years agocryptodev: support ECDSA
Ayuj Verma [Wed, 15 Jan 2020 12:43:36 +0000 (18:13 +0530)]
cryptodev: support ECDSA

Asymmetric crypto library is extended to add ECDSA. Elliptic curve
xform and ECDSA op params are introduced.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Signed-off-by: Sunila Sahu <ssahu@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agotest/crypto: fix missing operation status check
Adam Dybkowski [Fri, 20 Dec 2019 12:58:52 +0000 (13:58 +0100)]
test/crypto: fix missing operation status check

This patch adds checking of the symmetric crypto operation status
that was silently skipped before. It fixes the wireless algorithms
session creation (SNOW3G, KASUMI, ZUC) and passing of the digest
data for the verification by PMD. Also fixed the missing aad padding
issue revealed after op status checking was introduced.

Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented")
Fixes: 77a217a19bb7 ("test/crypto: add AES-CCM tests")
Cc: stable@dpdk.org
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Tested-by: Ankur Dwivedi <adwivedi@marvell.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
4 years agocryptodev: add Chacha20-Poly1305 AEAD algorithm
Arek Kusztal [Mon, 13 Jan 2020 10:43:47 +0000 (11:43 +0100)]
cryptodev: add Chacha20-Poly1305 AEAD algorithm

This patch adds Chacha20-Poly1305 AEAD algorithm to Cryptodev.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agoevent/opdl: use new API to save cycles on aarch64
Gavin Hu [Thu, 7 Nov 2019 21:35:28 +0000 (22:35 +0100)]
event/opdl: use new API to save cycles on aarch64

Use the new API to wait in low power state instead of continuous
polling to save CPU cycles and power.

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/thunderx: use new API to save cycles on aarch64
Gavin Hu [Thu, 7 Nov 2019 21:35:27 +0000 (22:35 +0100)]
net/thunderx: use new API to save cycles on aarch64

Use the new API to wait in low power state instead of continuous
polling to save CPU cycles and power.

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agoticketlock: use new API to reduce contention on aarch64
Gavin Hu [Thu, 7 Nov 2019 21:35:26 +0000 (22:35 +0100)]
ticketlock: use new API to reduce contention on aarch64

While using ticket lock, cores repeatedly poll the lock variable.
This is replaced by rte_wait_until_equal API.

Running ticketlock_autotest on ThunderX2, Ampere eMAG80, and Arm N1SDP[1],
there were variances between runs, but no notable performance gain or
degradation were seen with and without this patch.

[1] https://community.arm.com/developer/tools-software/oss-platforms/w/\
docs/440/neoverse-n1-sdp

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Tested-by: Phil Yang <phil.yang@arm.com>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
4 years agoeal: add wait until equal API
Gavin Hu [Thu, 7 Nov 2019 21:35:25 +0000 (22:35 +0100)]
eal: add wait until equal API

The rte_wait_until_equal_xx APIs abstract the functionality of
'polling for a memory location to become equal to a given value'.

Add the RTE_ARM_USE_WFE configuration entry for aarch64, disabled
by default. When it is enabled, the above APIs will call WFE instruction
to save CPU cycles and power.

From a VM, when calling this API on aarch64, it may trap in and out to
release vCPUs whereas cause high exit latency. Since kernel 4.18.20 an
adaptive trapping mechanism is introduced to balance the latency and
workload.

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agobus/fslmc: remove conflicting memory barrier macro
Gavin Hu [Thu, 7 Nov 2019 21:35:24 +0000 (22:35 +0100)]
bus/fslmc: remove conflicting memory barrier macro

There are two definitions conflicting each other, for more
details, refer to [1].

include/rte_atomic_64.h:19: error: "dmb" redefined [-Werror]
drivers/bus/fslmc/mc/fsl_mc_sys.h:36: note: this is the location of the
previous definition
 #define dmb() {__asm__ __volatile__("" : : : "memory"); }

The fix is to reuse the EAL definition to avoid conflicts.

[1] http://inbox.dpdk.org/users/VI1PR08MB537631AB25F41B8880DCCA988FDF0@
VI1PR08MB5376.eurprd08.prod.outlook.com/T/#u

Fixes: 3af733ba8da8 ("bus/fslmc: introduce MC object functions")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agoevent/octeontx2: relax memory requirement for timers
Pavan Nikhilesh [Tue, 7 Jan 2020 13:17:38 +0000 (18:47 +0530)]
event/octeontx2: relax memory requirement for timers

Relax memory requirement for event timers when internal mempool used is
octeontx2 mempool.
Add debug log to print the memory used.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agoevent/octeontx2: fix device name in device info
Pavan Nikhilesh [Mon, 6 Jan 2020 07:43:18 +0000 (13:13 +0530)]
event/octeontx2: fix device name in device info

Fix imcorrect device name being used in device info.

Fixes: bebc3dbcf4a6 ("event/octeontx2: add device capabilities function")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>