dpdk.git
5 years agoevent/dpaa2: remove conditional compilation
Hemant Agrawal [Mon, 30 Sep 2019 08:32:11 +0000 (14:02 +0530)]
event/dpaa2: remove conditional compilation

This patch removes the conditional compilation for
cryptodev event support from RTE_LIBRTE_SECURITY flag.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agoevent/dpaa2: fix default queue configuration
Hemant Agrawal [Mon, 30 Sep 2019 08:32:10 +0000 (14:02 +0530)]
event/dpaa2: fix default queue configuration

Test vector expect only one type of scheduling as default.
The old code is provide support scheduling types instead of default.

Fixes: 13370a3877a5 ("eventdev: fix inconsistency in queue config")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agotest/event_crypto: check adapter config failure
Hemant Agrawal [Fri, 27 Sep 2019 08:16:06 +0000 (13:46 +0530)]
test/event_crypto: check adapter config failure

Return error when the adapter creation fails.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
5 years agotest/event_crypto: change cipher algo
Hemant Agrawal [Fri, 27 Sep 2019 08:16:05 +0000 (13:46 +0530)]
test/event_crypto: change cipher algo

The existing code uses NULL as the cipher algo
for testing crypto event adapter.
DPAA1/DPAA2 do not support NULL algo. Hence changing
it to the most common algo AES-CBC, which is supported
by all crypto drivers implementing event crypto adapter.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
5 years agotest/event_crypto: fix mempool name
Hemant Agrawal [Fri, 27 Sep 2019 08:16:04 +0000 (13:46 +0530)]
test/event_crypto: fix mempool name

The longer mempool name size is causing error in
rte_mempool_create_empty for dpaa1

ret = snprintf(mz_name, sizeof(mz_name), RTE_MEMPOOL_MZ_FORMAT, name);
This patch reduce the size of mempool name string

Fixes: 24054e3640a2 ("test/crypto: use separate session mempools")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
5 years agoevent/octeontx2: fix Rx adapter capabilities
Pavan Nikhilesh [Mon, 19 Aug 2019 10:46:51 +0000 (16:16 +0530)]
event/octeontx2: fix Rx adapter capabilities

Octeontx2 SSO co-processor allows multiple ethernet device Rx queues
connected to a single Event device queue.
Fix the Rx adapter capabilities to allow application to configure
Rx queueus in n:1 ratio to event queues by adding
`RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ` as a capability.

Fixes: 37720fc1fba8 ("event/octeontx2: add Rx adapter")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
5 years agoevent/sw: fix xstats reset value
Gage Eads [Tue, 27 Aug 2019 21:34:59 +0000 (16:34 -0500)]
event/sw: fix xstats reset value

The sw PMD implements xstats reset by having the xstat get operations
return a value to the statistic's value at the last reset. The value at the
last reset is maintained in the per-xstat reset_value field, but the PMD
was setting reset_value = current - reset_value instead of reset_value =
current.

Fixes: c1ad03df7ad5 ("event/sw: support xstats")
Cc: stable@dpdk.org
Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
5 years agotest/event_crypto: no service core when HW support available
Hemant Agrawal [Fri, 6 Sep 2019 10:44:34 +0000 (16:14 +0530)]
test/event_crypto: no service core when HW support available

If HW support is available, service core shall not come
into play by default. This shall be for both FWD/NEW modes.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
5 years agotest/event_crypto: check session init failure
Hemant Agrawal [Fri, 6 Sep 2019 10:42:28 +0000 (16:12 +0530)]
test/event_crypto: check session init failure

Mismatch in algo or sec capability can cause session to fail.
This patch handle it and return error timely.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
5 years agonet/mlx5: fix direct call to rdma-core library
Viacheslav Ovsiienko [Mon, 7 Oct 2019 13:58:22 +0000 (13:58 +0000)]
net/mlx5: fix direct call to rdma-core library

The routine mlx5dv_query_devx_port() was called directly
instead of using the mlx5 glue thunk.

Fixes: d5c06b1b10ae ("net/mlx5: query vport index match mode and parameters")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: fix device scan within switch domain
Viacheslav Ovsiienko [Mon, 7 Oct 2019 13:56:19 +0000 (13:56 +0000)]
net/mlx5: fix device scan within switch domain

In LAG configuration the devices in the same switch domain
might be spawned on the base of different PCI devices, so
we should check all devices backed by mlx5 PMD whether they
belong to specified switch domain. When the new devices are
being created it is not possible to detect whether the
sibling devices created in the current probe() loop belong
to the driver, driver field is not filled yet (it will be
done on returned success of current probe()). This patch
updates the device scanning, allowing extra match on
current backing PCI device, is being used to create siblings.

Fixes: f7e95215ac7c ("net/mlx5: extend switch domain searching range")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/mlx5: adjust inline setting for large Tx queue sizes
Viacheslav Ovsiienko [Tue, 1 Oct 2019 06:53:37 +0000 (06:53 +0000)]
net/mlx5: adjust inline setting for large Tx queue sizes

The hardware may have limitations on maximal amount of
supported Tx descriptors building blocks (WQEBB). Application
requires the Tx queue must accept the specified amount of packets.
If inline data feature is engaged the packet may require more WQEBBs
and overall amount of blocks may exceed the hardware capabilities.
Application has to make a trade-off between Tx queue size and maximal
data inline size.

In case if the inline settings are not requested explicitly with
devarg keys the default values are used. This patch adjusts the
applied default values if large Tx queue size is requested and
default inline settings can not be satisfied due to hardware
limitations.

The explicitly requested inline setting may be aligned (enlarging
only) by configurations routines to provide better WQEBB filling,
this implicit alignment is the subject for adjustment either.

The warning message is emitted to the log if adjustment happens.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
5 years agonet/cxgbe: fix races on flow API operations
Rahul Lakkireddy [Fri, 4 Oct 2019 14:24:17 +0000 (19:54 +0530)]
net/cxgbe: fix races on flow API operations

When rules are being inserted from multiple cores, there are several
race conditions during rte_flow operations.

For example, when inserting rules from 2 cores simultaneously, both
the cores try to fetch a free available filter entry and they both
end up fetching the same entry. Both of them start overwriting the
same filter entry before sending to firmware, which results in wrong
rule being inserted to hardware.

Fix the races by adding spinlock to serialize the rte_flow operations.

Fixes: ee61f5113b17 ("net/cxgbe: parse and validate flows")
Fixes: 9eb2c9a48072 ("net/cxgbe: implement flow create operation")
Fixes: da23bc9d33f4 ("net/cxgbe: implement flow destroy operation")
Fixes: 8d3c12e19368 ("net/cxgbe: implement flow query operation")
Fixes: 86910379d335 ("net/cxgbe: implement flow flush operation")
Cc: stable@dpdk.org
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
5 years agonet/bnxt: improve CPR handling in vector path
Lance Richardson [Fri, 4 Oct 2019 03:49:03 +0000 (20:49 -0700)]
net/bnxt: improve CPR handling in vector path

Reduce overhead of CPR descriptor validity checking in vector
receive and transmit functions.

Preserve raw cpr consumer index in vector transmit completion
function.

Remove an unneeded prefetch (per benchmarking) from vector
transmit completion function.

Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: advertise scatter Rx offload capability
Lance Richardson [Fri, 4 Oct 2019 03:49:02 +0000 (20:49 -0700)]
net/bnxt: advertise scatter Rx offload capability

Scattered receive is supported but not included in receive offload
capabilities. Fix by adding it and including in scattered receive
calculation.

Fixes: 9c1507d96ab8 ("net/bnxt: switch to the new offload API")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix default Rx queue for Thor
Lance Richardson [Fri, 4 Oct 2019 03:49:01 +0000 (20:49 -0700)]
net/bnxt: fix default Rx queue for Thor

Use first receive queue assigned to VNIC as the default receive queue
when configuring Thor VNICs. This is necessary e.g. in order for flow
redirection to a specific receive queue to work correctly.

Fixes: f8168ca0e690 ("net/bnxt: support thor controller")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix stats context calculation
Lance Richardson [Fri, 4 Oct 2019 03:49:00 +0000 (20:49 -0700)]
net/bnxt: fix stats context calculation

The required number of statistics contexts is computed as the sum
of the number of receive and transmit rings plus one for the async
completion ring. A statistics context is not actually required for
the async completion ring, so remove it from the calculation.

Fixes: bd0a14c99f65 ("net/bnxt: use dedicated CPR for async events")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: use common NQ ring
Lance Richardson [Fri, 4 Oct 2019 03:48:59 +0000 (20:48 -0700)]
net/bnxt: use common NQ ring

Thor queue scaling is currently limited by the number of NQs that
can be allocated. Fix by using a common NQ for all receive/transmit
rings instead of allocating a separate NQ for each ring.

Fixes: f8168ca0e690 ("net/bnxt: support thor controller")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
5 years agonet/bnxt: support CoS classification
Venkat Duvvuru [Fri, 4 Oct 2019 03:48:58 +0000 (20:48 -0700)]
net/bnxt: support CoS classification

Class of Service (CoS) is a way to manage multiple types of
traffic over a network to offer different types of services
to applications. CoS classification (priority to cosqueue) is
determined by the user and configured through the PF driver.
DPDK driver queries this configuration and maps the cos queue
ids to different VNICs. This patch adds this support.

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: support LRO on Thor adapters
Lance Richardson [Fri, 4 Oct 2019 03:48:57 +0000 (20:48 -0700)]
net/bnxt: support LRO on Thor adapters

Add support for LRO for adapters based on Thor (BCM57508).

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix ring alignment for Thor-based adapters
Lance Richardson [Fri, 4 Oct 2019 03:48:56 +0000 (20:48 -0700)]
net/bnxt: fix ring alignment for Thor-based adapters

When using transmit/receive queue sizes smaller than 256, alignment
requirements are not being met for Thor-based adapters. Fix by
forcing memory addresses used for transmit/receive/aggregation ring
allocations to be on 4K boundaries.

Fixes: f8168ca0e690 ("net/bnxt: support thor controller")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: increase TQM entry allocation
Lance Richardson [Fri, 4 Oct 2019 03:48:55 +0000 (20:48 -0700)]
net/bnxt: increase TQM entry allocation

The current TQM backing store size isn't sufficient to allow 512
transmit rings. Fix by correcting TQM SP queue size calculation.

Fixes: f8168ca0e690 ("net/bnxt: support thor controller")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
5 years agonet/atlantic: add FW mailbox guard mutex
Pavel Belous [Fri, 20 Sep 2019 16:22:07 +0000 (16:22 +0000)]
net/atlantic: add FW mailbox guard mutex

Driver uses the Firmware mailbox to read statistics and configure
some features.
This patch introduces a mutex to provide consistent access to the
FW mailbox to prevent potential data corruption.

Fixes: 86d36773bd42 ("net/atlantic: implement firmware operations")
Cc: stable@dpdk.org
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
5 years agonet/atlantic: fix reported flow control mode
Pavel Belous [Fri, 20 Sep 2019 16:22:05 +0000 (16:22 +0000)]
net/atlantic: fix reported flow control mode

Driver reports current flow control mode based on internal flow control
settings. Currently this logic works incorrectly.

Fixes: 921eb6b8ce31 ("net/atlantic: fix flow control by sync settings on Rx")
Cc: stable@dpdk.org
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
5 years agonet/atlantic: exclude MACsec counters from xstats
Pavel Belous [Fri, 20 Sep 2019 16:22:02 +0000 (16:22 +0000)]
net/atlantic: exclude MACsec counters from xstats

Currently, driver always return full set of xstats counters, including
MACSEC counters. But this driver also supports AQC100 chips, which
does not have MACSEC feature.
This fix adds checking for MACSEC availability (based on FW capability
bits) and returns xstats without MACSEC counters if MACSEC feature
is not available.

Fixes: 09d4dfa85359 ("net/atlantic: implement MACsec statistics")
Cc: stable@dpdk.org
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
5 years agonet/octeontx2: fix CQE ring prefetch on wrap around
Kommula Shiva Shankar [Fri, 13 Sep 2019 15:31:12 +0000 (21:01 +0530)]
net/octeontx2: fix CQE ring prefetch on wrap around

When computing the head of CQE ring of prefetch, use qmask to point to
the correct head index on wrap around case.

Fixes: cc4d7693f2d9 ("net/octeontx2: support Rx")
Cc: stable@dpdk.org
Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/bnx2x: update to latest FW 7.13.11
Rasesh Mody [Wed, 2 Oct 2019 19:14:56 +0000 (12:14 -0700)]
net/bnx2x: update to latest FW 7.13.11

Use latest firmware 7.13.11.

7.13.11 FW changelog:
    - Packets from a VF with pvid configured which were sent with a
      different vlan were transmitted instead of being discarded.
    - In some multi-function configurations, inter-PF and inter-VF
      Tx switching is incorrectly enabled.
    - Wrong assert code in FLR final cleanup in case it is sent not
      after FLR.
    - Chip may stall in very rare cases under heavy traffic with FW GRO
      enabled.
    - VF malicious notification error fixes.
    - Default gre tunnel to IPGRE which allows proper RSS for IPGRE
      packets, L2GRE traffic will reach single queue.
    - Removes unnecessary internal mem config, latest FW performs this
      autonomously.

Update the PMD version to 1.1.0.1.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
5 years agonet/bnx2x: update HSI
Rasesh Mody [Wed, 2 Oct 2019 19:14:55 +0000 (12:14 -0700)]
net/bnx2x: update HSI

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

Signed-off-by: Rasesh Mody <rmody@marvell.com>
5 years agonet/bnx2x: update and reorganize HW registers
Rasesh Mody [Wed, 2 Oct 2019 19:14:54 +0000 (12:14 -0700)]
net/bnx2x: update and reorganize HW registers

Update and reorganize HW registers in preparation to update the firmware
to version 7.13.11.
Move HW_INTERRUT_ASSERT_SET_0 out from ecore_reg.h to bnx2x.h.

Signed-off-by: Rasesh Mody <rmody@marvell.com>
5 years agonet/qede: limit Rx ring index read for debug
David Marchand [Fri, 27 Sep 2019 11:28:49 +0000 (13:28 +0200)]
net/qede: limit Rx ring index read for debug

Caught by clang, this idx value is only used for a debug message when
the mbufs allocation fails.
No need to use idx as a temporary storage.

Fixes: 8f2312474529 ("net/qede: fix performance bottleneck in Rx path")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
5 years agonet/octeontx2: support GRE TSO offload
Nithin Dabilpuram [Wed, 25 Sep 2019 04:54:07 +0000 (10:24 +0530)]
net/octeontx2: support GRE TSO offload

Extends existing TSO support to GRE tunnel on the
same SoC revisions.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
5 years agonet/octeontx2: support TSO offload
Nithin Dabilpuram [Wed, 25 Sep 2019 04:36:29 +0000 (10:06 +0530)]
net/octeontx2: support TSO offload

Add support to below TCP segmentation offloads for
96XX A1 onwards and 95xx B0 onwards.
- TCPv4, TCPv6
- VXLAN[v4 | v6][v4 | v6]
- GENEVE[v4 | v6][v4 | v6]

This patch also modifies a fastpath function to be forced
inline due to performance reasons for multi-seg mode.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
5 years agonet/octeontx2: extract NVGRE as ltype
Kiran Kumar K [Wed, 11 Sep 2019 09:19:25 +0000 (14:49 +0530)]
net/octeontx2: extract NVGRE as ltype

Adding change to sync RTE Flow with KPU profile to extract
NVGRE as ltype.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: support Tx descriptor status
Kiran Kumar K [Fri, 6 Sep 2019 12:43:02 +0000 (18:13 +0530)]
net/octeontx2: support Tx descriptor status

Adding support for tx descriptor status dev ops for octeontx2.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: update KPU parser profile
Vivek Sharma [Fri, 6 Sep 2019 00:13:59 +0000 (05:43 +0530)]
net/octeontx2: update KPU parser profile

Update LB ltypes and use the updated ones so as replace
LB_STAG and LB_QINQ by single LB_STAG_QINQ ltype.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet/octeontx2: allow VFs to enable back pressure
Nithin Dabilpuram [Fri, 30 Aug 2019 04:04:43 +0000 (09:34 +0530)]
net/octeontx2: allow VFs to enable back pressure

Allow VFs to enable backpressure for performance reasons.
The backpressure control is with kernel AF driver that will enable
backpressure even if one PF/VF requests it and disable it only
after all the PFs/VFs request for disable.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
5 years agonet/octeontx2: fix checksum flag translation
Sunil Kumar Kori [Thu, 3 Oct 2019 06:32:29 +0000 (12:02 +0530)]
net/octeontx2: fix checksum flag translation

NPC errors were incorrectly translated to ol_flag as
error code enum was not in sync with NPC profile.

Fixes: 371d3212cbed ("common/octeontx2: add build infrastructure and HW definition")
Cc: stable@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
5 years agonet: add missing rte prefix for ESP tail
David Marchand [Fri, 27 Sep 2019 11:30:35 +0000 (13:30 +0200)]
net: add missing rte prefix for ESP tail

This structure has been missed during the big rework.

Fixes: 5ef254676752 ("net: add rte prefix to ESP structure")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/bnxt: fix flow flush handling
Ajit Khaparde [Wed, 2 Oct 2019 23:26:01 +0000 (16:26 -0700)]
net/bnxt: fix flow flush handling

We are not freeing all the flows when a flow_flush is called.
Iterate through all the flows belonging to all the VNICs in use and
free the filters.

Fixes: 4ace85a7da25 ("net/bnxt: allocate rings and groups")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
5 years agonet/bnxt: fix multicast filter programming
Kalesh AP [Wed, 2 Oct 2019 23:26:00 +0000 (16:26 -0700)]
net/bnxt: fix multicast filter programming

Fixed multicast filter programming and allmulti programming.
Fixed to skip programming multicast macs if the user requests
allmulti mode.

Also removed a comment in bnxt_hwrm_cfa_l2_set_rx_mask() which is
no longer valid now.

Fixes: d69851df12b2 ("net/bnxt: support multicast filter and set MAC addr")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix VLAN filtering
Venkat Duvvuru [Wed, 2 Oct 2019 23:25:59 +0000 (16:25 -0700)]
net/bnxt: fix VLAN filtering

Currently, when hw-vlan-filter is enabled on testpmd, driver is
receiving all vlan packets. Instead, it should only receive untagged
packets and vlan packets for which the VLAN filter is programmed.
This is because, the default rule to match on MAC is not getting
deleted, when hw-vlan-filter is ON.

This patch fixes the problem, by deleting the default MAC rule and
programming a new rule to receive only untagged packets, when
hw-vlan-filter is enabled & another rule for each vlan, as and when
that vlan is configured on that port.

Fixes: 246c5cc5f05e ("net/bnxt: use correct flags during VLAN configuration")
Cc: stable@dpdk.org
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
5 years agonet/bnxt: drop untagged frames when specified
Ajit Khaparde [Wed, 2 Oct 2019 23:25:58 +0000 (16:25 -0700)]
net/bnxt: drop untagged frames when specified

When a drop action for L2 filters is specified, support it.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
5 years agonet/bnxt: synchronize between flow related functions
Venkat Duvvuru [Wed, 2 Oct 2019 23:25:57 +0000 (16:25 -0700)]
net/bnxt: synchronize between flow related functions

Currently, there are four flow related functions, namely
bnxt_flow_create, bnxt_flow_destroy, bnxt_flow_validate,
bnxt_flow_flush. All these functions are not multi-thread safe.

This patch fixes it by synchronizing these functions with a lock.

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
5 years agonet/bnxt: handle cleanup if flow creation fails
Ajit Khaparde [Wed, 2 Oct 2019 23:25:56 +0000 (16:25 -0700)]
net/bnxt: handle cleanup if flow creation fails

If flow creation fails because of an HWRM command failure or
or some other reason, reset the vnic and rxq info set earlier.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
5 years agonet/bnxt: validate RSS hash key length
Venkat Duvvuru [Wed, 2 Oct 2019 23:25:55 +0000 (16:25 -0700)]
net/bnxt: validate RSS hash key length

In bnxt_rss_hash_update_op, driver is proceeding with
bnxt_hwrm_vnic_rss_cfg even though RSS hashkey length is invalid.

This patch fixes the problem by returning -EINVAL when RSS hashkey
length is invalid.

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
5 years agonet/bnxt: check for VNIC ID in rollback
Somnath Kotur [Wed, 2 Oct 2019 23:25:54 +0000 (16:25 -0700)]
net/bnxt: check for VNIC ID in rollback

If driver init/probe fails as part of cleanup/rollback, we may end
up invoking this HWRM cmd even on an invalid vNIC which will
unnecessarily log an error message as the cmd will fail.
Check for invalid ID before issuing the HWRM cmd

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
5 years agonet/bnxt: check if device is started before flow creation
Ajit Khaparde [Wed, 2 Oct 2019 23:25:53 +0000 (16:25 -0700)]
net/bnxt: check if device is started before flow creation

Check device is started before flow creation.
Since the vnic data structures aren't created until device start,
the driver dereferences NULL vnic if flow creation is attempted before
device is started,

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
5 years agonet/bnxt: handle ring cleanup in case of error
Rahul Gupta [Wed, 2 Oct 2019 23:25:52 +0000 (16:25 -0700)]
net/bnxt: handle ring cleanup in case of error

Initialize all rings to INVALID_HW_RING_ID.
This can be used to determine the rings to free if allocation fails.

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
5 years agonet/bnxt: allow only unicast MAC address filter creation
Ajit Khaparde [Wed, 2 Oct 2019 23:25:51 +0000 (16:25 -0700)]
net/bnxt: allow only unicast MAC address filter creation

Check if the application is trying to create filters using
broadcast and multicast MAC address and reject it.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
5 years agonet/bnxt: fix setting default MAC address
Kalesh AP [Wed, 2 Oct 2019 23:25:50 +0000 (16:25 -0700)]
net/bnxt: fix setting default MAC address

Driver was incorrectly programming the MAC with the already
configured one instead of the newly requested MAC by user.

Also, fix to restore the old mac address back to the default
vnic filter if the mac update operation fails.

Fixes: 68f589f2c728 ("net/bnxt: fix setting primary MAC address")
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>
5 years agonet/bnxt: cleanup VNIC after flow validate
Ajit Khaparde [Wed, 2 Oct 2019 23:25:49 +0000 (16:25 -0700)]
net/bnxt: cleanup VNIC after flow validate

When an application issues flow validate, we free the temporary
filter that is created. But the vnic is not freed up. This can
potentially interfere with subsequent flow creation. So free the vnic.

Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: delete and flush L2 filters cleanly
Ajit Khaparde [Wed, 2 Oct 2019 23:25:48 +0000 (16:25 -0700)]
net/bnxt: delete and flush L2 filters cleanly

Once the last filter associated with a VNIC is deleted when using
RSS action or the Queue action free the VNIC. Also free the RSS
context if the VNIC is using it.

Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: parse priority attribute for flow creation
Ajit Khaparde [Wed, 2 Oct 2019 23:25:47 +0000 (16:25 -0700)]
net/bnxt: parse priority attribute for flow creation

Parse priority attribute during flow creation.
This information will be used to give a hint to the FW to
place the flow rule accordingly in the CFA tables.

Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: support RSS action
Ajit Khaparde [Wed, 2 Oct 2019 23:25:46 +0000 (16:25 -0700)]
net/bnxt: support RSS action

Add support for RSS action during flow creation.

group id should not be 0 when RSS action is specified. Driver will
return an error for such a flow.

If a group id is used to create a filter with “n” RSS queues, it cannot
be used to create a filter with a different number of RSS queues till
all the flows using that combination are deleted.

While creating a flow if a group id groups a certain Rx queue ids for
RSS, the same group id shall not create a flow with a different group of
Rx queue ids till all the flows belonging to the group ids are deleted.

While creating a flow if a group id groups a certain Rx queue ids for
RSS, the same queue ids shall not be used with a different group id till
all flows created with that group id are deleted.

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
5 years agonet/bnxt: support creating SMAC and inner DMAC filters
Ajit Khaparde [Wed, 2 Oct 2019 23:25:45 +0000 (16:25 -0700)]
net/bnxt: support creating SMAC and inner DMAC filters

We are currently creating only outer DMAC filters.
Create SMAC and inner DMAC filters using HWRM_CFA_L2_FILTER_ALLOC.
For this the HWRM_CFA_L2_FILTER_ALLOC has already been updated.

Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: allow flow creation when RSS is enabled
Ajit Khaparde [Wed, 2 Oct 2019 23:25:44 +0000 (16:25 -0700)]
net/bnxt: allow flow creation when RSS is enabled

Currently flow creation is allowed with queue action only
when RSS is disabled. Remove this restriction. Flows can be
created when RSS is enabled.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
5 years agonet/bnxt: allow dynamic creation of VNIC
Ajit Khaparde [Wed, 2 Oct 2019 23:25:43 +0000 (16:25 -0700)]
net/bnxt: allow dynamic creation of VNIC

Refactor code to allow dynamic creation of VNIC for RSS
or Queue Action during flow create.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
5 years agonet/bnxt: return standard error codes for HWRM command
Ajit Khaparde [Wed, 2 Oct 2019 23:25:42 +0000 (16:25 -0700)]
net/bnxt: return standard error codes for HWRM command

If the FW returns an error for an HWRM request, it does not necessarily
return standard error codes.
Convert these HWRM errors to standard errno.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/szedata2: fix dependency check
Thomas Monjalon [Sat, 14 Sep 2019 09:37:00 +0000 (11:37 +0200)]
net/szedata2: fix dependency check

The library libsze2 provides a pkg-config file: libsze2.pc.
Looking for this .pc file - with dependency() - is preferred
than looking for the library - with cc.find_library().

If the library is not installed in a standard path,
it can be found thanks to PKG_CONFIG_PATH variable.
The previous solution required to use CFLAGS and LDFLAGS
environment variables.

Fixes: 508cfe6be9f1 ("net/szedata2: add to meson build")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Jan Remes <remes@netcope.com>
5 years agonet/nfb: fix dependency check
Thomas Monjalon [Sat, 14 Sep 2019 09:36:59 +0000 (11:36 +0200)]
net/nfb: fix dependency check

The library libnfb is part of netcope-common which provides
a pkg-config file: netcope-common.pc.
Looking for this .pc file - with dependency() - is preferred
than looking for the library - with cc.find_library().

If the library is not installed in a standard path,
it can be found thanks to PKG_CONFIG_PATH variable.
The previous solution required to use CFLAGS and LDFLAGS
environment variables.

Fixes: 6435f9a0ac22 ("net/nfb: add new netcope driver")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Jan Remes <remes@netcope.com>
5 years agonet/qede: re-add to meson
David Marchand [Thu, 3 Oct 2019 08:18:19 +0000 (10:18 +0200)]
net/qede: re-add to meson

qede has been dropped from the drivers/net meson.
Add it again.

Fixes: 9a8864c8b5da ("net/octeontx2: add build and doc infrastructure")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/dpaa2: add soft parser driver
Sunil Kumar Kori [Thu, 29 Aug 2019 10:27:37 +0000 (15:57 +0530)]
net/dpaa2: add soft parser driver

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa2: support soft parser in MC
Sunil Kumar Kori [Thu, 29 Aug 2019 10:27:36 +0000 (15:57 +0530)]
net/dpaa2: support soft parser in MC

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Reviewed-by: Sachin Saxena <sachin.saxena@nxp.com>
5 years agonet/dpaa2: support separate MC portal per process
Shreyansh Jain [Thu, 29 Aug 2019 10:27:35 +0000 (15:57 +0530)]
net/dpaa2: support separate MC portal per process

Earlier, there was a single MCP handle which was available across
complete DPAA2 driver as well as part of the dev_private which was
shared by the secondary process.

For secondary, that is not valid and it would require to open its
own handle for the MC. This is eventually used as part of the DPNI
configuration.

By using the process_private member of the rte_eth_dev, it is
possible to keep separate handles per process. Without worry of
overwriting when secondary process accesses the dev_private.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Sachin Saxena <sachin.saxena@nxp.com>
5 years agobus/fslmc: support multi VFIO group
Hemant Agrawal [Thu, 29 Aug 2019 10:27:34 +0000 (15:57 +0530)]
bus/fslmc: support multi VFIO group

DPAA2 support VFIO device passthrough in VM.
However in this case, each device is associated with different vfio group.

This code required different container id for each group.
On using the same container fd the second time,
ioctl calls are returning error.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agobus/fslmc: check for DMA map in primary process only
Shreyansh Jain [Thu, 29 Aug 2019 10:27:33 +0000 (15:57 +0530)]
bus/fslmc: check for DMA map in primary process only

DMA mapping is a property of primary process - SMMU population done
once by primary doesn't need to be populated again in secondary

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Sachin Saxena <sachin.saxena@nxp.com>
5 years agobus/fslmc: restrict address translation to PA mode
Shreyansh Jain [Thu, 29 Aug 2019 10:27:32 +0000 (15:57 +0530)]
bus/fslmc: restrict address translation to PA mode

The address translation support for PA->VA is required only in
case of PA mode operation of DPDK. This was causing warning to
be reported on running any DPAA2 application in VA mode:

    Add: Incorrect entry for PA->VA Table(xxxxxxxxxx)
    Add: Lowest address: xxxxxxxxxxxx

This was caused by call to update the DPAAX table when VA mode
was enabled, in which case the VA==IOVA address.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Sachin Saxena <sachin.saxena@nxp.com>
5 years agonet/dpaa2: add PTP driver
Priyanka Jain [Thu, 29 Aug 2019 10:27:31 +0000 (15:57 +0530)]
net/dpaa2: add PTP driver

This patch adds the support for PTP driver for
DPAA2 devices.

To enable set
CONFIG_RTE_LIBRTE_IEEE1588=y in
config/defconfig_arm64-dpaa2-linuxapp-gc

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa2: add DPRTC sub-module
Priyanka Jain [Thu, 29 Aug 2019 10:27:30 +0000 (15:57 +0530)]
net/dpaa2: add DPRTC sub-module

This patch add support for dprtc
(Data Path Real Time Clock) sub-module
based on MC 10.16.0 flib.

It provides interface for PTP stack software
to access physical IEEE 1588 Real Time Clock.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa2: support timestamp
Priyanka Jain [Thu, 29 Aug 2019 10:27:29 +0000 (15:57 +0530)]
net/dpaa2: support timestamp

IEEE1588 driver needs timestamp of packets.
For DPAA2, the timestamp of TX packets is
stored in annotation area of corresponding
TX confirmation packet.

This patch enables timestamp fields in
annotation area and TX confirmation mode if
CONFIG_RTE_LIBRTE_IEEE1588 is set in
config/defconfig_arm64-dpaa2-linuxapp-gc

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa2: support Tx confirmation mode
Priyanka Jain [Thu, 29 Aug 2019 10:27:28 +0000 (15:57 +0530)]
net/dpaa2: support Tx confirmation mode

TX confirmation mode provides dedicated confirmation
queues for transmitted packets. These queues are used
by software to get the status and release
transmitted packets buffers.

By default TX confirmation mode is kept disabled.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa2: support DPDMUX classification for ethernet
Hemant Agrawal [Thu, 29 Aug 2019 10:27:27 +0000 (15:57 +0530)]
net/dpaa2: support DPDMUX classification for ethernet

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa2: use LFQIDs in Tx instead of QDID
Sachin Saxena [Thu, 29 Aug 2019 10:27:26 +0000 (15:57 +0530)]
net/dpaa2: use LFQIDs in Tx instead of QDID

Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
5 years agonet/dpaa2: support config max Rx length in HW
Hemant Agrawal [Thu, 29 Aug 2019 10:27:25 +0000 (15:57 +0530)]
net/dpaa2: support config max Rx length in HW

The MC expects the length to be configured without CRC

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa2: add CGR counters in xstats
Hemant Agrawal [Thu, 29 Aug 2019 10:27:24 +0000 (15:57 +0530)]
net/dpaa2: add CGR counters in xstats

Add congestion frame drop and byte drop count in xtra stats.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa2: support taildrop on frame count basis
Hemant Agrawal [Thu, 29 Aug 2019 10:27:23 +0000 (15:57 +0530)]
net/dpaa2: support taildrop on frame count basis

The existing taildrop was based on queue data size.
This patch replaces it with frame count bases using
CGR methods of DPAA2 device.
The number of CGRs are limited. So,
- use per queue CGR based tail drop for as many as CGR
available.
- Remaining queues shall use the legacy byte based tail drop

Number of CGRs can be controlled by dpl file during dpni_create.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa2: add optional non-prefetch Rx mode
Nipun Gupta [Thu, 29 Aug 2019 10:27:22 +0000 (15:57 +0530)]
net/dpaa2: add optional non-prefetch Rx mode

When we need particular number of packets from the rx routine,
which would change in every call, we cannot prefetch the packets
and provide previous results to the user.

User can select the mode by using devargs for non prefetch mode.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa2: support L2 payload based RSS distribution
Hemant Agrawal [Thu, 29 Aug 2019 10:27:21 +0000 (15:57 +0530)]
net/dpaa2: support L2 payload based RSS distribution

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa2: enable Rx offload for timestamp
Hemant Agrawal [Thu, 29 Aug 2019 10:27:20 +0000 (15:57 +0530)]
net/dpaa2: enable Rx offload for timestamp

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa2: realign Rx offload support types
Hemant Agrawal [Thu, 29 Aug 2019 10:27:19 +0000 (15:57 +0530)]
net/dpaa2: realign Rx offload support types

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agomempool/dpaa: reduce debug messages
Hemant Agrawal [Thu, 29 Aug 2019 10:27:18 +0000 (15:57 +0530)]
mempool/dpaa: reduce debug messages

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Sachin Saxena <sachin.saxena@nxp.com>
5 years agocommon/dpaax: reduce debug messages
Hemant Agrawal [Thu, 29 Aug 2019 10:27:17 +0000 (15:57 +0530)]
common/dpaax: reduce debug messages

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Sachin Saxena <sachin.saxena@nxp.com>
5 years agonet/dpaa2: improve Rx offload debug message
Hemant Agrawal [Thu, 29 Aug 2019 10:27:16 +0000 (15:57 +0530)]
net/dpaa2: improve Rx offload debug message

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa: reduce debug messages
Hemant Agrawal [Thu, 29 Aug 2019 10:27:15 +0000 (15:57 +0530)]
net/dpaa: reduce debug messages

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Sachin Saxena <sachin.saxena@nxp.com>
5 years agonet/dpaa: support Tx scatter gather for non-DPAA buffer
Nipun Gupta [Thu, 29 Aug 2019 10:27:14 +0000 (15:57 +0530)]
net/dpaa: support Tx scatter gather for non-DPAA buffer

This patch adds support for Scatter Gather
in the transmit side, for the cases where the
buffer are received which are not from DPAA
buffer pool.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa: support Rx interrupt enable and disable
Nipun Gupta [Thu, 29 Aug 2019 10:27:13 +0000 (15:57 +0530)]
net/dpaa: support Rx interrupt enable and disable

This patch adds support for dpaa eth driver
interrupt enable and disable callback functions.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa: support Rx interrupt handler
Nipun Gupta [Thu, 29 Aug 2019 10:27:12 +0000 (15:57 +0530)]
net/dpaa: support Rx interrupt handler

This patch adds interrupt handler support for
the ethernet devices which are configured with
a dedicated portal for packet Rx
(i.e. for FQ's in push mode).

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agobus/dpaa: decouple FQ portal alloc and init
Nipun Gupta [Thu, 29 Aug 2019 10:27:11 +0000 (15:57 +0530)]
bus/dpaa: decouple FQ portal alloc and init

The decoupling of FQ portal allocation is required as a
pre-requisite to support Rx interrupts as we need to have
event FD's at portal allocation i.e. before the
initialization of the Frame Queues.
This change will help us get the event fd once the portals
have been allocated for static FQ's.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agobus/dpaa: remove thread affinity
Nipun Gupta [Thu, 29 Aug 2019 10:27:10 +0000 (15:57 +0530)]
bus/dpaa: remove thread affinity

Thread affinity is already taken care by DPDK. Remove them from bus.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
5 years agonet/dpaa: improve Rx offload debug message
Hemant Agrawal [Thu, 29 Aug 2019 10:27:09 +0000 (15:57 +0530)]
net/dpaa: improve Rx offload debug message

This patch also align few RX offload support to right category.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Sachin Saxena <sachin.saxena@nxp.com>
5 years agobus/dpaa: fix dpaa_sec blacklist
Hemant Agrawal [Thu, 29 Aug 2019 10:27:08 +0000 (15:57 +0530)]
bus/dpaa: fix dpaa_sec blacklist

The black list of dpaa_sec devices fails.
EAL: failed to parse device "dpaa:dpaa_sec-1"

This patch address following issues:
- bus usages dpaa-sec while the driver usage dpaa_sec
- bus usages numbers from 0 to MAX_SEC - while driver
probe usages sec number form max-fman_device +1

Fixes: 6e0752205bb2 ("bus/dpaa: support device blacklisting")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Sachin Saxena <sachin.saxena@nxp.com>
5 years agonet/bnxt: use macro for getting default VNIC
Kalesh AP [Wed, 2 Oct 2019 17:17:45 +0000 (10:17 -0700)]
net/bnxt: use macro for getting default VNIC

Minor code cleanup. BNXT_GET_DEFAULT_VNIC macro returns the default VNIC
of the function and fixed code to use the macro.

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>
5 years agonet/bnxt: support for QinQ insertion and stripping
Somnath Kotur [Wed, 2 Oct 2019 17:17:44 +0000 (10:17 -0700)]
net/bnxt: support for QinQ insertion and stripping

Driver will accelerate only outer/S-VLAN insertion by turning on
the appropriate bits in the Tx Buffer Descriptor when the packet
arrives for transmission.
The TPID to be used for this S-VLAN is conveyed by the vlan_tpid_set
dev_op which will terminate in the driver.
In the Rx path, driver will continue providing the stripped vlan tag
in the mbuf's vlan tci field. This would be the outermost vlan tag
in a double-tagged packet or the vlan tag for a single vlan tagged pkt.

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix crash in secondary process
Stephen Hemminger [Wed, 2 Oct 2019 17:17:43 +0000 (10:17 -0700)]
net/bnxt: fix crash in secondary process

The secondary process should not modify device state when
init is called. The pci device information pointed to by
dev_private pointer is not correct in secondary process.

Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix Rx queue count
Rahul Gupta [Wed, 2 Oct 2019 17:17:42 +0000 (10:17 -0700)]
net/bnxt: fix Rx queue count

Fix Computing of number of used descriptors in an Rx queue.

Fixes: 1b7ceba3e375 ("net/bnxt: support Rx queue count")
Cc: stable@dpdk.org
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
5 years agonet/bnxt: fix accessing variable before null check
Kalesh AP [Wed, 2 Oct 2019 17:17:41 +0000 (10:17 -0700)]
net/bnxt: fix accessing variable before null check

Check input argument "rxq" in bnxt_rx_queue_release_mbufs(), to be sure
variable is not NULL before accessing it.

Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")
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>
5 years agonet/bnxt: remove unnecessary interrupt disable
Kalesh AP [Wed, 2 Oct 2019 17:17:40 +0000 (10:17 -0700)]
net/bnxt: remove unnecessary interrupt disable

Since bnxt_enable_int() is called at start time,
invoke bnxt_disable_int() during stop only.
Remove it from device uninit function.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
5 years agonet/bnxt: remove unused macro
Kalesh AP [Wed, 2 Oct 2019 17:17:39 +0000 (10:17 -0700)]
net/bnxt: remove unused macro

remove MAX_NUM_MAC_ADDR macro

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
5 years agonet/bnxt: remove unnecessary return check
Kalesh AP [Wed, 2 Oct 2019 17:17:38 +0000 (10:17 -0700)]
net/bnxt: remove unnecessary return check

HWRM_CHECK_RESULT_SILENT() returns if the HWRM command fails.
There is no need to check the return value after this call.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
5 years agonet/bnxt: fix deferred start of Tx queues
Kalesh AP [Wed, 2 Oct 2019 17:17:37 +0000 (10:17 -0700)]
net/bnxt: fix deferred start of Tx queues

Driver should not change "deferred_start" state of the tx queues.
It should get the state in queue_setup_op() and use that value.

Since the deferred start state was being used in the packet transmit
functions to determine whether the queue has been stopped already,
introduced a per-txq flag to track queue stopped/started state.

Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")
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: Lance Richardson <lance.richardson@broadcom.com>