dpdk.git
4 years agonet/bnxt: fix race between interrupt handler and dev config
Somnath Kotur [Fri, 11 Oct 2019 04:44:16 +0000 (10:14 +0530)]
net/bnxt: fix race between interrupt handler and dev config

Fix a possible that while interrupt handler is in the middle of
processing, dev_configure_op() might come in and try to destroy/realloc
the default completion ring on which interrupt completions arrive.
Synchronize the two so they don't race each other

Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: move macro definitions to header file
Kalesh AP [Thu, 10 Oct 2019 09:44:32 +0000 (15:14 +0530)]
net/bnxt: move macro definitions to header file

Move device and vendor ids macro definition from bnxt_ethdev.c
to bnxt.h.
There is no functionality impact.

Fixes: 882aa9c6e2e1 ("net/bnxt: move PCI device ids to the driver")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: cleanup comments
Kalesh AP [Thu, 10 Oct 2019 08:44:23 +0000 (14:14 +0530)]
net/bnxt: cleanup comments

- updated one comment for more readability and understanding
- fixed typo in comments
- moved a comment to right place
- removed one out-of-date comment
- removed few commented code

Fixes: f2a768d4d186 ("net/bnxt: add completion ring")
Cc: stable@dpdk.org
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: reset Rx allocation state on Rx queue restart
Lance Richardson [Wed, 9 Oct 2019 17:43:34 +0000 (13:43 -0400)]
net/bnxt: reset Rx allocation state on Rx queue restart

Call bnxt_rxq_vec_setup() to ensure that rxq->rxrearm_nb and
rxq->rxrearm_start are initialized correctly when a receive
queue is restarted.

Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Xiaobing Zhang <xiaobing.zhang@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: fix dereference before null check
Kalesh AP [Wed, 9 Oct 2019 08:46:17 +0000 (14:16 +0530)]
net/bnxt: fix dereference before null check

This patch fixes potential null pointer access in bnxt_alloc_ag_data().
Fix to return an error if null check is true.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org
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/ice/base: improve misc code style
Qi Zhang [Tue, 8 Oct 2019 01:50:18 +0000 (09:50 +0800)]
net/ice/base: improve misc code style

Combine a couple of function definitions that can fit on one line.
RCT a variable declaration.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@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/ice/base: add QFI for flow director
Qi Zhang [Tue, 8 Oct 2019 01:50:17 +0000 (09:50 +0800)]
net/ice/base: add QFI for flow director

Added the GTP QFI field to the Flow director interface to allow
matching against this field. Since this field only appears in GTP
packets with extension headers, this also requires adding profile
TCAM mask matching capability.  This allows comprehending different
PTYPE attributes by examining flags from the parser. Using this
method, different profiles can be used by examining flag values
from the parser.

Signed-off-by: Dan Nowlin <dan.nowlin@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/ice/base: fix switch rule programming for all profiles
Qi Zhang [Tue, 8 Oct 2019 01:50:16 +0000 (09:50 +0800)]
net/ice/base: fix switch rule programming for all profiles

In switch rule programming, if the caller requested tunnel type of
ICE_SW_TUN_AND_NON_TUN, then the code would incorrectly attempt to
add a tunneled UDP port in the training packet, this would cause the
rule addition to fail. This patch does not attempt to add the UDP
port so that the rule programming will succeed.

Fixes: c3d6ac02c0c3 ("net/ice/base: update switch training packets with open ports")

Signed-off-by: Dan Nowlin <dan.nowlin@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/ice/base: fix flow raw field vector extraction
Qi Zhang [Tue, 8 Oct 2019 01:50:15 +0000 (09:50 +0800)]
net/ice/base: fix flow raw field vector extraction

Correct the ordering of raw field extraction in the field vector
by taking into account the ordering setting for requesting block.

Fixes: aa1cd410fa64 ("net/ice/base: add flow module")
Cc: stable@dpdk.org
Signed-off-by: Dan Nowlin <dan.nowlin@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/ice/base: fix unexpected switch rule overwrite
Qi Zhang [Tue, 8 Oct 2019 01:50:14 +0000 (09:50 +0800)]
net/ice/base: fix unexpected switch rule overwrite

A switch rule with "drop" action will be overwritten by a
rule with same pattern match but with a "to queue" action.
While in an inversed flow creation sequence, the "to queue"
can't be overwritten by the "drop" rule.

The inconsistent behavior is not expected, the patch
fix the issue by preventing rule overwrite in both cases.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agonet/ice/base: initialize structures to zero
Qi Zhang [Tue, 8 Oct 2019 01:50:13 +0000 (09:50 +0800)]
net/ice/base: initialize structures to zero

Some functions create ice_pkg_enum structure, but it seems it's possible
some of the members are used un-initialized.  So we'll initialize all
instantiations of this structure within ice_flex_pipe.c

The patch also fix header comment mismatch issue for
ice_init_prof_result_bm

Signed-off-by: Jeb Cramer <jeb.j.cramer@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@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/ice/base: remove dead error condition
Qi Zhang [Tue, 8 Oct 2019 01:50:12 +0000 (09:50 +0800)]
net/ice/base: remove dead error condition

The pointer cmd is set to an address of a structure, which can never be
NULL.  Remove the check-for-NULL lines since it's dead code anyway.

Signed-off-by: Jeb Cramer <jeb.j.cramer@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/ice/base: improve flow director masking
Qi Zhang [Tue, 8 Oct 2019 01:50:11 +0000 (09:50 +0800)]
net/ice/base: improve flow director masking

Currently, 3-tuple FD matching is implemented using masking. However,
this is using up twenty-four of the thirty-two FD masks available. This
patch uses the swap register more efficiently to implement the 3-tuple
matches, which saves all FD masks for other uses.

Added IPV6 versions of DSCP, TTL and Protocol fields for flow director
use.

Signed-off-by: Dan Nowlin <dan.nowlin@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/ice/base: support GTPU TEID for flow director
Qi Zhang [Tue, 8 Oct 2019 01:50:10 +0000 (09:50 +0800)]
net/ice/base: support GTPU TEID for flow director

Added the training packet for GTPU TEID field to the Flow director to
allow matching against this field.

Signed-off-by: Junfeng Guo <junfeng.guo@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/ice/base: update flow packet type bitmaps
Qi Zhang [Tue, 8 Oct 2019 01:50:09 +0000 (09:50 +0800)]
net/ice/base: update flow packet type bitmaps

In the flow API, the outer first ptype bitmaps contained many
references to inner ptypes. Because of PTG assignments, these were
causing issues when programming rules on the inner ptypes.
For example, in RSS when programming the outer IPV6 hash fields,
it also programmed several inner IPV4 PTGs with the same extraction.

There were several ptypes that have been removed, thus this patch
removes those bits from the type bitmaps.

Signed-off-by: Dan Nowlin <dan.nowlin@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/ice/base: fix NVGRE switch rule programming
Qi Zhang [Tue, 8 Oct 2019 01:50:08 +0000 (09:50 +0800)]
net/ice/base: fix NVGRE switch rule programming

Correct for GRE/NVGRE training packets to include the
correct protocol IDs for TCP and UDP respectively.

Fixes: b83a0c290322 ("net/ice/base: fix inner TCP and UDP support for GRE")
Cc: stable@dpdk.org
Signed-off-by: Dan Nowlin <dan.nowlin@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/ice/base: fix adding PPPoE switch rule
Qi Zhang [Tue, 8 Oct 2019 01:50:07 +0000 (09:50 +0800)]
net/ice/base: fix adding PPPoE switch rule

Update VLAN protocol ID to correct value for single VXLAN scenario.
Fix the missing ethertype offset for PPPoE dummy packet offset to
allow matching the corresponding field.

Fixes: d1c2f76b440a ("net/ice/base: support GTP and PPPoE protocols")

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@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 agoapp/testpmd: introduce Rx offloads option
Vivek Sharma [Thu, 10 Oct 2019 04:34:26 +0000 (10:04 +0530)]
app/testpmd: introduce Rx offloads option

Introduce boot time argument for configuring all rx offloads.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoapp/testpmd: introduce QinQ offload option
Vivek Sharma [Fri, 11 Oct 2019 02:36:54 +0000 (08:06 +0530)]
app/testpmd: introduce QinQ offload option

Introduce boot time argument for configuring QinQ strip
offload.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoapp/testpmd: support QinQ offload in VLAN set command
Vivek Sharma [Fri, 11 Oct 2019 04:05:21 +0000 (09:35 +0530)]
app/testpmd: support QinQ offload in VLAN set command

Segregate QinQ from Extend Offload and support QinQ offload
in vlan set command. Merge all port wise rx vlan offloads in
command line help and documentation for a cleaner structure.

Fix port info display to distinguish between qinq strip and
extend offloads. Flatten all VLAN offload info into a single
line to reduce info length.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/dpaa2: set port in mbuf
Nipun Gupta [Wed, 9 Oct 2019 11:13:23 +0000 (16:43 +0530)]
net/dpaa2: set port in mbuf

This patch sets the port in mbuf for event scenarios as well

Fixes: b677d4c6d281 ("net/dpaa2: add API for event Rx adapter")
Fixes: 2d3788631862 ("net/dpaa2: support atomic queues")
Fixes: 16c4a3c46ab7 ("bus/fslmc: add enqueue response read in qbman")
Cc: stable@dpdk.org
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agodoc: replace license text with SPDX tag in AVP guide
Hemant Agrawal [Fri, 27 Sep 2019 09:04:32 +0000 (14:34 +0530)]
doc: replace license text with SPDX tag in AVP guide

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
4 years agodoc: replace license text with SPDX tag in ARK guide
Hemant Agrawal [Fri, 27 Sep 2019 09:04:31 +0000 (14:34 +0530)]
doc: replace license text with SPDX tag in ARK guide

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ed Czeck <ed.czeck@atomicrules.com>
4 years agonet/memif: optimize with one-way barrier
Phil Yang [Mon, 26 Aug 2019 11:00:14 +0000 (19:00 +0800)]
net/memif: optimize with one-way barrier

Using 'rte_mb' to synchronize the shared ring head/tail between producer
and consumer will stall the pipeline and damage performance on the weak
memory model platforms, such like aarch64. Meanwhile update the shared
ring head and tail are observable and ordered between CPUs on IA.

Optimized this full barrier with the one-way barrier can improve the
throughput. On aarch64 n1sdp server this patch make testpmd throughput
boost 2.1%. On Intel E5-2640, testpmd got 3.98% performance gain.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agonet/qede: print adapter info during init failure
Rasesh Mody [Sun, 6 Oct 2019 20:14:09 +0000 (13:14 -0700)]
net/qede: print adapter info during init failure

Dump the info logs banner with available information in case of
device initialization failure.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agonet/qede/base: update FW to 8.40.25.0
Rasesh Mody [Sun, 6 Oct 2019 20:14:08 +0000 (13:14 -0700)]
net/qede/base: update FW to 8.40.25.0

This patch updates the FW to 8.40.25.0 and corresponding base driver
changes. It also updates the PMD version to 2.11.0.1. The FW updates
consists of enhancements and fixes as described below.

 - VF RX queue start ramrod can get stuck due to completion error.
   Return EQ completion with error, when fail to load VF data. Use VF
   FID in RX queue start ramrod
 - Fix big receive buffer initialization for 100G to address failure
   leading to BRB hardware assertion
 - GRE tunnel traffic doesn't run when non-L2 ethernet protocol is
   enabled, fix FW to not forward tunneled SYN packets to LL2.
 - Fix the FW assert that is caused during vport_update when
   tx-switching is enabled
 - Add initial FW support for VF Representors
 - Add ecore_get_hsi_def_val() API to get default HSI values
 - Move following from .c to .h files:
   TSTORM_QZONE_START and MSTORM_QZONE_START
   enum ilt_clients
   renamed struct ecore_dma_mem to phys_mem_desc and moved
 - Add ecore_cxt_set_cli() and ecore_cxt_set_blk() APIs to set client
   config and block details
 - Use SET_FIELD() macro where appropriate
 - Address spell check and code alignment issues

Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agonet/qede/base: update HSI
Rasesh Mody [Sun, 6 Oct 2019 20:14:07 +0000 (13:14 -0700)]
net/qede/base: update HSI

Update hardware software common base driver code in preparation to
update the firmware to version 8.40.25.0.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agonet/qede/base: move DMAE to HSI
Rasesh Mody [Sun, 6 Oct 2019 20:14:06 +0000 (13:14 -0700)]
net/qede/base: move DMAE to HSI

Move DMA engine (DMAE) structures from base driver to HSI module.
Use DMAE_PARAMS_* in place of ECORE_DMAE_FLAG_*.
Enforce SET_FIELD() macro where appropriate.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agonet/qede/base: update RT defs NVM cfg and MCP
Rasesh Mody [Sun, 6 Oct 2019 20:14:05 +0000 (13:14 -0700)]
net/qede/base: update RT defs NVM cfg and MCP

Update and add runtime array offsets (rt defs), non-volatile memory
configuration options (nvm cfg) and management co-processor (mcp)
shared code in preparation to update the firmware to version 8.40.25.0.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agonet/qede/base: rename HSI datatypes and functions
Rasesh Mody [Sun, 6 Oct 2019 20:14:04 +0000 (13:14 -0700)]
net/qede/base: rename HSI datatypes and functions

This patch changes code with E4/E5/e4/e5/BB_K2 prefixes and suffixes.
 - HSI datatypes renaming - removed all e5 datatypes and renamed
   all e4 datatypes to be prefix less/suffix less.
   (s/_E4//; s/_e4//; s/E4_//).
 - HSI functions - removed e4/e5 prefixes/suffixes.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agonet/qede/base: lock entire QM reconfiguration flow
Rasesh Mody [Sun, 6 Oct 2019 20:14:03 +0000 (13:14 -0700)]
net/qede/base: lock entire QM reconfiguration flow

Multiple flows can issue QM reconfiguration, hence hold the lock longer
to account for entire duration of reconfiguration flow.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agonet/qede/base: change MFW mailbox command log verbosity
Rasesh Mody [Sun, 6 Oct 2019 20:14:02 +0000 (13:14 -0700)]
net/qede/base: change MFW mailbox command log verbosity

Change management FW mailboxes DP_VERBOSE module to ECORE_MSG_HW

Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agonet/qede/base: fix page index for PBL chains
Rasesh Mody [Sun, 6 Oct 2019 20:14:01 +0000 (13:14 -0700)]
net/qede/base: fix page index for PBL chains

ecore_chain_set_prod/cons() sets the wrong page index in chains with
non-power of 2 page count. Fix ecore_chain_set_prod/cons() for PBL
chains with non power of 2 page count.
Calculate the right page index according to current indexes.

Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agonet/hinic: support getting Rx/Tx queues info
Xiaoyun Wang [Thu, 10 Oct 2019 14:52:03 +0000 (22:52 +0800)]
net/hinic: support getting Rx/Tx queues info

This patch adds support for getting rxq or txq info.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: optimize Rx performance
Xiaoyun Wang [Thu, 10 Oct 2019 14:52:02 +0000 (22:52 +0800)]
net/hinic: optimize Rx performance

This patch optimizes receive packets performance
on arm platform.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic/base: optimize AEQ interfaces
Xiaoyun Wang [Thu, 10 Oct 2019 14:52:01 +0000 (22:52 +0800)]
net/hinic/base: optimize AEQ interfaces

This patch deletes ceq interfaces that not needed,
fix aeq buges in some scenarios.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: document missing features
Xiaoyun Wang [Thu, 10 Oct 2019 14:52:00 +0000 (22:52 +0800)]
net/hinic: document missing features

Add features to ini file.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: support LRO offload
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:59 +0000 (22:51 +0800)]
net/hinic: support LRO offload

This patch supports LRO offload.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: support inner L3 checksum offload
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:58 +0000 (22:51 +0800)]
net/hinic: support inner L3 checksum offload

This patch supports inner L3 checksum offload for VXLAN packets,
modifies rx checksum offload.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: get firmware version
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:57 +0000 (22:51 +0800)]
net/hinic: get firmware version

This patch adds support for getting firmware version.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: set link down and up
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:56 +0000 (22:51 +0800)]
net/hinic: set link down and up

This patch supports setting link down and up.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: flush flow director filter
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:55 +0000 (22:51 +0800)]
net/hinic: flush flow director filter

Supports to flush fdir filter.
Destroy all flow rules associated with a port on hinic.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: create and destroy flow director filter
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:54 +0000 (22:51 +0800)]
net/hinic: create and destroy flow director filter

Add support for creating/destroying fdir filter.
The filter rule includes LACP,ARP and ICMP packet type.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: create and destroy ntuple filter
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:53 +0000 (22:51 +0800)]
net/hinic: create and destroy ntuple filter

Add support for creating/destroying ntuple filter.
The filter rule includes BGP and VRRP packet type.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: add flow validation operations
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:52 +0000 (22:51 +0800)]
net/hinic: add flow validation operations

This patch is to validate the filter rules, which includes
ntuple filter, ethertype filter and fdir filter. The packets
type that supported are BGP,VRRP,LACP,ARP and ICMP.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic/base: add flow director config interface
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:51 +0000 (22:51 +0800)]
net/hinic/base: add flow director config interface

This patch adds fdir config operation, including set fdir filter,
normal filter, set and clear fdir tcam.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: add unicast and multicast MAC set
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:50 +0000 (22:51 +0800)]
net/hinic: add unicast and multicast MAC set

This patch adds unicast and multicast set interfaces.
Application can add or remove unicast MAC address, also can set
multicast MAC address, the maximum multicast list size is 2048.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: add allmulticast mode and MTU set
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:49 +0000 (22:51 +0800)]
net/hinic: add allmulticast mode and MTU set

When enable allmulticast mode, all multicast packets
can be received. This patch also adds support for MTU set,
the range of MTU is from 256 to 9600.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: add VLAN filter and offload
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:48 +0000 (22:51 +0800)]
net/hinic: add VLAN filter and offload

This patch adds support for VLAN filter and VLAN offload.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic: support VF
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:47 +0000 (22:51 +0800)]
net/hinic: support VF

This patch adds VF PMD operation interfaces to support SR-IOV.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic/base: add HW interfaces for SR-IOV
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:46 +0000 (22:51 +0800)]
net/hinic/base: add HW interfaces for SR-IOV

This patch introduces some HW interfaces required for SR-IOV function,
including: init hwdev, set port state, get default cos,
VF DMA attribute table, VF txrx flush and so on.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/hinic/base: add mbox command channel for SR-IOV
Xiaoyun Wang [Thu, 10 Oct 2019 14:51:45 +0000 (22:51 +0800)]
net/hinic/base: add mbox command channel for SR-IOV

Add mbox command channel for SR-IOV, which is used to
communicate between VF and VF, VF and PF. This patch
introduces data structures, initialization, interfaces
and commands of mbox channel.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
4 years agonet/bnxt: remove unnecessary variable assignment
Kalesh AP [Thu, 10 Oct 2019 01:41:53 +0000 (18:41 -0700)]
net/bnxt: remove unnecessary variable assignment

There is no need to assign return value to a temporary variable.
Instead return error directly in case of failure.

Fixes: 1fe427fd08ee ("net/bnxt: support enable/disable interrupt")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
4 years agonet/bnxt: fix coding style
Kalesh AP [Thu, 10 Oct 2019 01:41:52 +0000 (18:41 -0700)]
net/bnxt: fix coding style

- Remove unnecessary new line
- Remove unnecessary blank lines
- Align rte_* header file inclusion at one place

Fixes: 37d6161a68ba ("net/bnxt: add ring group alloc/free")
Fixes: ec77c6298301 ("net/bnxt: add stats context allocation")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: fix handling interface change status
Kalesh AP [Thu, 10 Oct 2019 01:41:51 +0000 (18:41 -0700)]
net/bnxt: fix handling interface change status

Driver issues hwrm_if_change when the port is started and stopped.
This command returns whether the fw has undergone a reset while port
was down. Fix to handle hwrm_if_change status during port start only.

Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
4 years agonet/bnxt: enable interrupts according interface status
Kalesh AP [Thu, 10 Oct 2019 01:41:50 +0000 (18:41 -0700)]
net/bnxt: enable interrupts according interface status

Driver issues hwrm_if_change when the port is started. This command
returns whether the fw has undergone a reset while port was down and
driver does re-init of resources if fw has undergone a reset.
Fix to enable interrupts only after this check.

Fixes: c023cd5b2192 ("net/bnxt: fix async link handling and update")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: change MSI-X vector to queue mapping
Rahul Gupta [Thu, 10 Oct 2019 01:41:49 +0000 (18:41 -0700)]
net/bnxt: change MSI-X vector to queue mapping

DPDK PCIe-VFIO framework configures base MSIX vector for interrupts
which is supported by other h/w. In case of bnxt, base MSIX vector
starts with the RX completion queue 0. To comply with the DPDK
framework We need to increase the map index by 1 so that RXTX
completion queues events can be delivered to appropriate event listeners
by kernel VFIO.

Fixes: bd0a14c99f65 ("net/bnxt: use dedicated CPR for async events")
Cc: stable@dpdk.org
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: reduce cleanup time during reset recovery
Rahul Gupta [Thu, 10 Oct 2019 01:41:48 +0000 (18:41 -0700)]
net/bnxt: reduce cleanup time during reset recovery

In stop_op(), don't wait for link down event's ASYNC response from FW.

Fixes: c023cd5b2192 ("net/bnxt: fix async link handling and update")
Cc: stable@dpdk.org
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: get default HWRM command timeout from FW
Ajit Khaparde [Thu, 10 Oct 2019 01:41:47 +0000 (18:41 -0700)]
net/bnxt: get default HWRM command timeout from FW

The HWRM command timeout is set to a very high value.
VER_GET command response returns the default request timeout value.
Use this value for waiting for HWRM commands to complete.
Poll for the valid bit every 1us instead of 600us.

Fixes: cbcd375d37d2 ("net/bnxt: fix HWRM macros and locking")
Cc: stable@dpdk.org
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
4 years agonet/bnxt: update trusted VF status only when it changes
Ajit Khaparde [Thu, 10 Oct 2019 01:41:46 +0000 (18:41 -0700)]
net/bnxt: update trusted VF status only when it changes

We are currently logging trusted VF information everytime a VF config
change is indicated by the async message. Update it only when new
setting is different from the current setting.

Fixes: b42c15c83e88 ("net/bnxt: support trusted VF")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
4 years agonet/bnxt: remove redundant header file inclusion
Kalesh AP [Thu, 10 Oct 2019 01:41:45 +0000 (18:41 -0700)]
net/bnxt: remove redundant header file inclusion

bnxt.h header includes bnxt_cpr.h and bnxt_util.h.
There is no need to include these headers file explicitly.

This commit does not cause any functional change.

Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: return error if setting link up fails
Kalesh AP [Thu, 10 Oct 2019 01:41:44 +0000 (18:41 -0700)]
net/bnxt: return error if setting link up fails

Currently bnxt driver does not return error in case setting link up fails.

Fixes: 5c206086feaa ("net/bnxt: add link state operations")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
4 years agonet/bnxt: free default completion ring before VF config
Santoshkumar Karanappa Rastapur [Thu, 10 Oct 2019 01:41:43 +0000 (18:41 -0700)]
net/bnxt: free default completion ring before VF config

If the VF resources need to be reconfigured using the
bnxt_hwrm_func_reserve_vf_resc, make sure that the default completion
ring is freed first before the resources are reserved.

Reallocate the ring once the VF resources are configured.

Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: fix stats errors handling
Kalesh AP [Thu, 10 Oct 2019 01:41:42 +0000 (18:41 -0700)]
net/bnxt: fix stats errors handling

This patch fixes few checks and few return values while getting
and clearing device statistics.

1. Fixed to return standard error code.
2. Clubbed few error checks
3. Removed an unnecessary return check

Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset")
Fixes: 88920136688c ("net/bnxt: support xstats get by id")
Cc: stable@dpdk.org
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/pfe: add link status update
Gagandeep Singh [Thu, 10 Oct 2019 06:32:33 +0000 (12:02 +0530)]
net/pfe: add link status update

This patch add link related operations like
link update, up and down.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agonet/pfe: add allmulticast and promiscuous
Gagandeep Singh [Thu, 10 Oct 2019 06:32:32 +0000 (12:02 +0530)]
net/pfe: add allmulticast and promiscuous

This patch adds support to enable multicast and
promiscuous mode.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agonet/pfe: add MTU and MAC address set
Gagandeep Singh [Thu, 10 Oct 2019 06:32:31 +0000 (12:02 +0530)]
net/pfe: add MTU and MAC address set

To update MAC address or MTU, operations are
added to the driver.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agonet/pfe: add packet types and basic statistics
Gagandeep Singh [Thu, 10 Oct 2019 06:32:30 +0000 (12:02 +0530)]
net/pfe: add packet types and basic statistics

This patch add support for supported packet types
by the platform andbasic statistics like
numbers of packets/bytes receive and transmit.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agonet/pfe: add Rx/Tx
Gagandeep Singh [Thu, 10 Oct 2019 06:32:29 +0000 (12:02 +0530)]
net/pfe: add Rx/Tx

This patch add burst enqueue and dequeue operations
to the pfe PMD.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agonet/pfe: add queue setup and release
Gagandeep Singh [Thu, 10 Oct 2019 06:32:28 +0000 (12:02 +0530)]
net/pfe: add queue setup and release

This patch add RX/TX queue setup operations
and supported checksum offloads.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agonet/pfe: add device start/stop
Gagandeep Singh [Thu, 10 Oct 2019 06:32:27 +0000 (12:02 +0530)]
net/pfe: add device start/stop

This patch adds device start, stop and close
operations.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
4 years agonet/pfe: add MAC and host interface initialisation
Gagandeep Singh [Thu, 10 Oct 2019 06:32:26 +0000 (12:02 +0530)]
net/pfe: add MAC and host interface initialisation

HIF or host interface is responsible for transmit
and receive packets between physical ethernet
interfaces and HIF library defined logical interfaces.

This patch initialise that host interface and MAC.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
4 years agonet/pfe: add HW specific macros and operations
Gagandeep Singh [Thu, 10 Oct 2019 06:32:25 +0000 (12:02 +0530)]
net/pfe: add HW specific macros and operations

This patch add some hardware specific macros
and functions that will be used by the driver.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
4 years agonet/pfe: support dynamic logging
Gagandeep Singh [Thu, 10 Oct 2019 06:32:24 +0000 (12:02 +0530)]
net/pfe: support dynamic logging

This patch introduces logging for the pfe PMD.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agonet/pfe: introduce basic functions
Gagandeep Singh [Thu, 10 Oct 2019 06:32:22 +0000 (12:02 +0530)]
net/pfe: introduce basic functions

pfe (packet forwarding engine) is a network
poll mode driver for NXP SoC ls1012a.

This patch introduces the framework of pfe
driver with basic functions of initialisation
and teardown.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
4 years agocommon/dpaax: move OF library from DPAA bus
Hemant Agrawal [Thu, 10 Oct 2019 06:32:21 +0000 (12:02 +0530)]
common/dpaax: move OF library from DPAA bus

This code is being shared by more than 1 type of driver.
Common is most appropriate place for it.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agonet/tap: fix blocked Rx packets
Marcin Smoczynski [Mon, 23 Sep 2019 13:22:47 +0000 (15:22 +0200)]
net/tap: fix blocked Rx packets

When OS sends more packets than are being read with a single
'rte_eth_rx_burst' call, rx packets are getting stucked in the tap pmd
and are unable to receive, because trigger_seen is getting updated
and consecutive calls are not getting any packets.

Do not update trigger_seen unless less than a max number of packets were
received allowing next call to receive the rest.

Remove unnecessary compiler barrier.

Fixes: a0d8e807d9de ("net/tap: add Rx trigger")
Cc: stable@dpdk.org
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Tested-by: Mariusz Drost <mariuszx.drost@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
4 years agonet/enic: add flow implementation based on Flow Manager API
Hyong Youb Kim [Mon, 23 Sep 2019 14:41:34 +0000 (07:41 -0700)]
net/enic: add flow implementation based on Flow Manager API

Flow Manager API is the new firmware interface that exposes match
action capabilities in 1400 series VIC adapters. It is intended for
virtual switch offloads and enables more advanced features than the
existing filter API. For example, it supports VXLAN encap and decap
actions, and exposes TCAM and exact match tables.

Add the new flow implementation using Flow Manager and use it when
available. When Flow Manager is not available, the driver will
continue to use the old filter-based flow implementation.

Signed-off-by: John Daley <johndale@cisco.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
4 years agonet/enic: enable GENEVE with options offload
Hyong Youb Kim [Mon, 23 Sep 2019 14:41:33 +0000 (07:41 -0700)]
net/enic: enable GENEVE with options offload

Latest firmware supports Geneve with options offload. Current overlay
offload only supports Geneve with no options. This new feature is
disabled by default, as it is intrusive and cannot be used with flow
API. Add a new devarg 'geneve-opt' so the user can explicitly enable
it.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
4 years agonet/enic: fix crash in secondary process
Hyong Youb Kim [Fri, 6 Sep 2019 06:50:20 +0000 (23:50 -0700)]
net/enic: fix crash in secondary process

Both primary and secondary processes may call the queue start/stop,
link update handlers. These functions use the rte_eth_dev pointer
cached in the adapter private data (struct enic). But, this pointer is
valid only in the primary process, as rte_eth_dev addresses may differ
in different processes. Using that cached pointer in secondary
processes leads to a crash.

For the link update handler (enic_link_update), use the rte_eth_dev
pointer passed down from the rte layer as it is valid in the current
process. For the queue start/stop handlers (enic_start_wq and
friends), cache the rte_eth_dev_data pointer in the adapter private
data, and use that. rte_eth_dev_data is in shared memory and its
address is same across processes.

Fixes: 837e68ae94a2 ("net/enic: fix queue stop and start")
Fixes: cf8d9826b7be ("net/enic: extract code for checking link status")
Cc: stable@dpdk.org
Reported-by: Dirk-Holger Lenz <dirk.lenz@ng4t.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Tested-by: Dirk-Holger Lenz <dirk.lenz@ng4t.com>
Reviewed-by: John Daley <johndale@cisco.com>
4 years agonet/enic: fix probe for secondary process
Hyong Youb Kim [Fri, 6 Sep 2019 06:50:19 +0000 (23:50 -0700)]
net/enic: fix probe for secondary process

Only the primary process initializes the adapter private data and
rte_eth_dev_data. For secondary processes, do not touch them.

Secondary processes need to select the right Tx and Rx handlers. Pick
the same handlers that the primary process uses.

Fixes: fefed3d1e62c ("enic: new driver")
Cc: stable@dpdk.org
Reported-by: Dirk-Holger Lenz <dirk.lenz@ng4t.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Tested-by: Dirk-Holger Lenz <dirk.lenz@ng4t.com>
Reviewed-by: John Daley <johndale@cisco.com>
4 years agoapp/testpmd: show supported packet types
Vamsi Attunuru [Thu, 19 Sep 2019 03:50:04 +0000 (09:20 +0530)]
app/testpmd: show supported packet types

Patch adds a runtime function to display port supported ptypes
in different layers.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
4 years agoethdev: fix QinQ offload
Vivek Sharma [Fri, 13 Sep 2019 11:14:49 +0000 (16:44 +0530)]
ethdev: fix QinQ offload

Use correct flag for indicating QinQ strip rx offload.

Fixes: dfebfc9882fb ("ethdev: support dynamic configuration of QinQ strip")
Cc: stable@dpdk.org
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/octeontx2: enable GTPU for RSS hash index
Kiran Kumar K [Tue, 3 Sep 2019 06:43:05 +0000 (12:13 +0530)]
net/octeontx2: enable GTPU for RSS hash index

Adding support to parse GTPU flag for RSS hash index calculation in
octeontx2.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoethdev: add GTPU flow type
Kiran Kumar K [Tue, 3 Sep 2019 06:43:04 +0000 (12:13 +0530)]
ethdev: add GTPU flow type

Adding support to enable GTPU eth flow type for RSS hash
index calculation.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/dpaa2: update MC firmware version
Sachin Saxena [Tue, 10 Sep 2019 10:30:51 +0000 (16:00 +0530)]
net/dpaa2: update MC firmware version

MC firmware is the core component of FSLMC bus and net/DPAA2 devices.

Prior to this patch, MC firmware supported 10.14.x version. This
patch bumps the min supported version to 10.18.x.

Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agobus/fslmc: update MC firmware version
Sachin Saxena [Tue, 10 Sep 2019 10:30:50 +0000 (16:00 +0530)]
bus/fslmc: update MC firmware version

MC firmware is the core component of FSLMC bus and DPAA2 devices.

Prior to this patch, MC firmware supported 10.14.x version. This
patch bumps the min supported version to 10.18.x.

Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agoethdev: add definitions for EEPROM standards
Dekel Peled [Mon, 9 Sep 2019 11:09:59 +0000 (14:09 +0300)]
ethdev: add definitions for EEPROM standards

This patch add definitions of maximal data length in module EEPROM,
values are compatible with include/uapi/linux/ethtool.h.

These definitions can be used by application to validate data length.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agotest/bonding: fix LSC timeout unit
Krzysztof Kanas [Fri, 23 Aug 2019 08:16:59 +0000 (10:16 +0200)]
test/bonding: fix LSC timeout unit

Fixes: 76d29903f5f5 ("bond: support link status interrupt")
Cc: stable@dpdk.org
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agotest/bonding: fix LSC related cases
Krzysztof Kanas [Fri, 23 Aug 2019 08:16:58 +0000 (10:16 +0200)]
test/bonding: fix LSC related cases

On rare situation test_link_bonding test case fail due to timespec
tv_nsec overflow, which causes pthread_cond_timedwait to return EINVAL
and test to fail.

Fixes: 76d29903f5f5 ("bond: support link status interrupt")
Cc: stable@dpdk.org
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoapp/testpmd: add bits per second to statistics
Matan Azrad [Mon, 29 Jul 2019 12:36:57 +0000 (12:36 +0000)]
app/testpmd: add bits per second to statistics

Traffic bps statistics is very useful for performance testing.

Add bits per second statistics for Rx and Tx.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Moti Haimovsky <motih@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoethdev: add AH key field to flow API
Kiran Kumar K [Thu, 25 Jul 2019 09:03:45 +0000 (14:33 +0530)]
ethdev: add AH key field to flow API

Add new rte_flow_item_ah in order to match the Authentication Header
based on RFC 2402.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoethdev: add IGMP key field to flow API
Kiran Kumar K [Thu, 25 Jul 2019 09:03:44 +0000 (14:33 +0530)]
ethdev: add IGMP key field to flow API

Add new rte_flow_item_igmp in order to match the Internet Group
Management Protocol based on RFC 2236.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoethdev: add NSH key field to flow API
Kiran Kumar K [Thu, 25 Jul 2019 09:03:43 +0000 (14:33 +0530)]
ethdev: add NSH key field to flow API

Add new rte_flow_item_nsh in order to match the network service header
based on RFC 8300.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/mlx5: fix allocation size of RQT attribute
Ori Kam [Thu, 26 Sep 2019 10:22:15 +0000 (10:22 +0000)]
net/mlx5: fix allocation size of RQT attribute

The receive queues list size is based on the size of uint32_t, so
when allocating the memory, the correct value should be used. Or
else there is risk to corrupt the memory, depending on the queues
number, because there is some pad area for alignment. If the queue
number is not large enough, the issue couldn't be observed.

Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")
Cc: stable@dpdk.org
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: validate flow rule item order
Xiaoyu Min [Wed, 11 Sep 2019 08:46:15 +0000 (16:46 +0800)]
net/mlx5: validate flow rule item order

The Item order validation between L2 and L3 is missing, which leading to
the following flow rule is accepted:

  testpmd> flow create 0 ingress pattern ipv4 / eth / end actions drop /
           end

Only the outer L3 layer should check whether the L2 layer is present,
because the L3 layer could directly follow the tunnel layer
without L2 layer.

Meanwhile inner L2 layer should check whether there is inner L3 layer
before it.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/virtio: do not require IO permissions
David Marchand [Tue, 22 Oct 2019 08:21:43 +0000 (10:21 +0200)]
net/virtio: do not require IO permissions

On x86, iopl permissions are only available to root user (or users that
have the CAP_SYS_RAWIO capability).
But those permissions are only needed when the virtio devices accesses
are done with inb/outb instructions, which is when the device is bound
to a UIO kernel module.

So far, the virtio driver was refusing to register based on the check
on IO permissions.
This check does not make sense when binding the device to vfio.

Now that the check on IO permissions has been abstracted in the ioport
API, we can remove it on virtio side.

We still need to call rte_eal_iopl_init() in the virtio constructor so
that the interrupt thread inherits this permission in the case it could
be used with UIO later.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Tiwei Bie <tiwei.bie@intel.com>
4 years agobus/pci: check IO permissions for UIO only
David Marchand [Tue, 22 Oct 2019 08:21:42 +0000 (10:21 +0200)]
bus/pci: check IO permissions for UIO only

On x86, calling inb/outb special instructions (used in UIO ioport
read/write parts) is only possible if the right IO permissions has been
granted.

The only user of this API (the net/virtio pmd) checks this
unconditionnaly but this should be hidden by the rte_pci_ioport API
itself and only checked when the device is bound to a UIO driver.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agoeal: use define instead of raw option name
Anatoly Burakov [Thu, 24 Oct 2019 15:17:57 +0000 (16:17 +0100)]
eal: use define instead of raw option name

We are using '--base-virtaddr' in a few places. We have a define for that,
so use it instead.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agoeal/freebsd: support option --base-virtaddr
Anatoly Burakov [Thu, 24 Oct 2019 15:17:56 +0000 (16:17 +0100)]
eal/freebsd: support option --base-virtaddr

According to our docs, only Linuxapp supports base-virtaddr option.
That is, strictly speaking, not true because most of the things
that are attempting to respect base-virtaddr are in common files,
so FreeBSD already *mostly* supports this option in practice.

This commit fixes the remaining bits to explicitly support
base-virtaddr option, and moves the arg parsing from EAL to common
options parsing code. Documentation is also updated to reflect
that all platforms now support base-virtaddr.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>