dpdk.git
5 years agoapp/testpmd: clarify flow types in port info
Ferruh Yigit [Thu, 4 Oct 2018 18:44:08 +0000 (19:44 +0100)]
app/testpmd: clarify flow types in port info

In "show port info #" cmd output, "Supported flow types:" part is
not clear what flow types are listed.

Those are flow types that hash calculation offload supported by NIC.
Updated command output as "Supported RSS offload flow types:"

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
5 years agombuf: clarify QinQ flag usage
Ferruh Yigit [Wed, 3 Oct 2018 15:19:12 +0000 (16:19 +0100)]
mbuf: clarify QinQ flag usage

Update implementation that when PKT_RX_QINQ_STRIPPED mbuf ol_flags
set by PMD, PKT_RX_QINQ, PKT_RX_VLAN_STRIPPED & PKT_RX_VLAN
should be also set.

Clarify mbuf documentations that when PKT_RX_QINQ set PKT_RX_VLAN also
should be set.

So that appllication can rely on PKT_RX_QINQ flag to access both
mbuf.vlan_tci & mbuf.vlan_tci_outer

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
5 years agonet/mlx5: support externally allocated static memory
Yongseok Koh [Mon, 24 Sep 2018 18:36:47 +0000 (18:36 +0000)]
net/mlx5: support externally allocated static memory

When MLX PMD registers memory for DMA, it accesses the global memseg list
of DPDK to maximize the range of registration so that LKey search can be
more efficient. Granularity of MR registration is per page.

Externally allocated memory shouldn't be used for DMA because it can't be
searched in the memseg list and free event can't be tracked by DPDK. If it
is used, the following error will occur:

net_mlx5: port 0 unable to find virtually contiguous chunk for
address (0x5600017587c0). rte_memseg_contig_walk() failed.

There's a pending patchset [1] which enables externally allocated memory.
Once it is merged, users can register their own memory out of EAL then that
will resolve this issue.

Meanwhile, if the external memory is static (allocated on startup and never
freed), such memory can also be registered by little tweak in the code.

[1] http://patches.dpdk.org/project/dpdk/list/?series=1415

This patch is not a bug fix but needs to be included in stable versions.

Fixes: 974f1e7ef146 ("net/mlx5: add new memory region support")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx4: support externally allocated static memory
Yongseok Koh [Mon, 24 Sep 2018 18:36:45 +0000 (18:36 +0000)]
net/mlx4: support externally allocated static memory

When MLX PMD registers memory for DMA, it accesses the global memseg list
of DPDK to maximize the range of registration so that LKey search can be
more efficient. Granularity of MR registration is per page.

Externally allocated memory shouldn't be used for DMA because it can't be
searched in the memseg list and free event can't be tracked by DPDK. If it
is used, the following error will occur:

net_mlx5: port 0 unable to find virtually contiguous chunk for
address (0x5600017587c0). rte_memseg_contig_walk() failed.

There's a pending patchset [1] which enables externally allocated memory.
Once it is merged, users can register their own memory out of EAL then that
will resolve this issue.

Meanwhile, if the external memory is static (allocated on startup and never
freed), such memory can also be registered by little tweak in the code.

[1] http://patches.dpdk.org/project/dpdk/list/?series=1415

This patch is not a bug fix but needs to be included in stable versions.

Fixes: 9797bfcce1c9 ("net/mlx4: add new memory region support")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: fix representor port xstats
Xueming Li [Wed, 19 Sep 2018 07:55:26 +0000 (15:55 +0800)]
net/mlx5: fix representor port xstats

This patch fixes the issue that representor port shows xstats of PF.

Fixes: 2b7302638898 ("net/mlx5: probe all port representors")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: fix representor port link status
Xueming Li [Wed, 19 Sep 2018 08:27:37 +0000 (16:27 +0800)]
net/mlx5: fix representor port link status

Current code uses PF links status for representor port, not the
representor interface itself.
This caused wrong representor port link status when toggling
interface up or down.

Fixes: 2b7302638898 ("net/mlx5: probe all port representors")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: add Linux TC flower driver for E-Switch flow
Yongseok Koh [Mon, 24 Sep 2018 19:55:17 +0000 (19:55 +0000)]
net/mlx5: add Linux TC flower driver for E-Switch flow

Flows having 'transfer' attribute have to be inserted to E-Switch on the
NIC and the control path uses Linux TC flower interface via Netlink
socket.
This patch adds the flow driver on top of the new flow engine.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: remove Netlink flow driver
Yongseok Koh [Mon, 24 Sep 2018 19:55:16 +0000 (19:55 +0000)]
net/mlx5: remove Netlink flow driver

Netlink based E-Switch flow engine will be migrated to the new flow
engine.
nl_flow will be renamed to flow_tcf as it goes through Linux TC flower
interface.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: add abstraction for multiple flow drivers
Yongseok Koh [Mon, 24 Sep 2018 19:55:14 +0000 (19:55 +0000)]
net/mlx5: add abstraction for multiple flow drivers

Flow engine has to support multiple driver paths. Verbs/DV for NIC flow
steering and Linux TC flower for E-Switch flow steering. In the future,
another flow driver could be added (devX).

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: add runtime parameter to enable Direct Verbs
Ori Kam [Mon, 24 Sep 2018 23:17:54 +0000 (23:17 +0000)]
net/mlx5: add runtime parameter to enable Direct Verbs

DV flow API is based on new kernel API and is
missing some functionality like counter but add other functionality
like encap.

In order not to affect current users even if the kernel supports
the new DV API it should be enabled only manually.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: add Direct Verbs final functions
Ori Kam [Mon, 24 Sep 2018 23:17:52 +0000 (23:17 +0000)]
net/mlx5: add Direct Verbs final functions

This commits add the missing function which are apply, remove, and
destroy.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: add Direct Verbs driver to glue
Ori Kam [Mon, 24 Sep 2018 23:17:51 +0000 (23:17 +0000)]
net/mlx5: add Direct Verbs driver to glue

This commit adds all Direct Verbs required functions to the glue lib.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: add Direct Verbs translate actions
Ori Kam [Mon, 24 Sep 2018 23:17:49 +0000 (23:17 +0000)]
net/mlx5: add Direct Verbs translate actions

In this commit we add the translation of flow actions.
Unlike the Verbs API actions are separeted from the items and are passed
to the API in array structure.
Since the target action like RSS require the QP information those
actions are handled both in the translate action and in the apply.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: add Direct Verbs translate items
Ori Kam [Mon, 24 Sep 2018 23:17:47 +0000 (23:17 +0000)]
net/mlx5: add Direct Verbs translate items

This commit handles the translation of the requested flow into Direct
Verbs API.

The Direct Verbs introduce the matcher object which acts as shared mask
for all flows that are using the same mask. So in this commit we
translate the item and get in return a matcher and the value that should
be matched.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: add Direct Verbs prepare function
Ori Kam [Mon, 24 Sep 2018 23:17:45 +0000 (23:17 +0000)]
net/mlx5: add Direct Verbs prepare function

This function allocates the Direct Verbs device flow, and
introduce the relevant PRM structures.

This commit also adds the matcher object. The matcher object acts as a
mask and should be shared between flows. For example all rules that
should match source IP with full mask should use the same matcher. A
flow that should match dest IP or source IP but without full mask should
have a new matcher allocated.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: add Direct Verbs validation function
Ori Kam [Mon, 24 Sep 2018 23:17:43 +0000 (23:17 +0000)]
net/mlx5: add Direct Verbs validation function

This is commit introduce the Direct Verbs driver API.
The Direct Verbs is an API adds new features like encapsulation, match
on metatdata.
In this commit the validation function was added, most of the validation
is done with functions that are also in use for the Verbs API.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: add flow translate function
Ori Kam [Mon, 24 Sep 2018 23:17:39 +0000 (23:17 +0000)]
net/mlx5: add flow translate function

This commit modify the conversion of the input parameters into Verbs
spec, in order to support all previous changes.

Some of those changes are:
removing the use of the parser,
storing each flow in its own flow structure.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: add flow prepare function
Ori Kam [Mon, 24 Sep 2018 23:17:37 +0000 (23:17 +0000)]
net/mlx5: add flow prepare function

In current implementation the calculation of the flow size is done
during the validation stage, and the same function is also used to
translate the input parameters into verbs spec.  This is hard to
maintain and error prone.
Another issue is dev-flows (flows that are created implicitly in order
to support the requested flow for example when the user request RSS on
UDP 2 rules need to be created one for IPv4 and one for IPv6).
In current implementation the dev-flows are created on the same
memory allocation. This will be harder to implement in future drivers.

The commits extract the calculation and creation of the dev-flow from
the translation part (the part that converts the parameters into the
format required by the driver). This results in that the prepare
function only function is to allocate the dev-flow.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: split flow validation to dedicated function
Ori Kam [Mon, 24 Sep 2018 23:17:35 +0000 (23:17 +0000)]
net/mlx5: split flow validation to dedicated function

In current implementation the validation logic reside in the same
function that calculates the size of the verbs spec and also create the
verbs spec.
This approach results in hard to maintain code which can't be shared.
also in current logic there is a use of parser entity that holds the
information between function calls. The main problem with this parser is
that it assumes the connection between different functions. For example
it assumes that the validation function was called and relevant values
were set.
This may result in an issue if and when we only call the validation
function, or call the apply function without the validation (Currently
according to RTE flow we must call validation before creating flow, but
if we want to change that to save time during flow creation, for example
the user validated some rule and just want to change the IP there is no
true reason the validate the rule again).

This commit address both of those issues by extracting the validation
logic into detected functions and remove the use of the parser object.
The side effect of those changes is that in some cases there will be a
need to traverse the item list again.

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/enic: add AVX2 based vectorized Rx handler
Hyong Youb Kim [Wed, 3 Oct 2018 20:09:28 +0000 (13:09 -0700)]
net/enic: add AVX2 based vectorized Rx handler

Add the vectorized version of the no-scatter Rx handler. It aims to
process 8 descriptors per loop using AVX2 SIMD instructions. This
handler is in its own file enic_rxtx_vec_avx2.c, and makefile and
meson.build are modified to compile it when the compiler supports
AVX2. Under ideal conditions, the vectorized handler reduces
cycles/packet by more than 30%, when compared against the no-scatter
Rx handler. Most implementation ideas come from i40e's AVX2 based
handler, so credit goes to its authors.

At this point, the new handler is meant for field trials, and is not
selected by default. So add a new devarg enable-avx2-rx to allow the
user to request the use of the new handler. When enable-avx2-rx=1, the
driver will consider using the new handler.

Also update the guide doc and introduce the vectorized handler.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
5 years agonet/enic: move common Rx functions to a new header file
Hyong Youb Kim [Wed, 3 Oct 2018 20:09:27 +0000 (13:09 -0700)]
net/enic: move common Rx functions to a new header file

Move a number of Rx functions to the header file so that the avx2
based Rx handler can use them.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
5 years agombuf: fix Tx offload mask
Jerin Jacob [Tue, 2 Oct 2018 10:51:42 +0000 (16:21 +0530)]
mbuf: fix Tx offload mask

Fixes missing PKT_TX_UDP_SEG, PKT_TX_OUTER_IPV6,PKT_TX_OUTER_IPV4,
PKT_TX_IPV6 and  PKT_TX_IPV4 values in PKT_TX_OFFLOAD_MASK.

Also sort them in bit wise order to recognize missing items later.

Fixes: 6d18505efaa6 ("vhost: support UDP Fragmentation Offload")
Fixes: 1c3b7c33e977 ("mbuf: add Tx offloading flags for tunnels")
Fixes: 711ba9e23e68 ("mbuf: remove aliasing of Tx offloading flags with Rx ones")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
5 years agoethdev: support SCTP Rx checksum offload
Jerin Jacob [Tue, 2 Oct 2018 10:51:41 +0000 (16:21 +0530)]
ethdev: support SCTP Rx checksum offload

Added SCTP Rx checksum offload support

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agoethdev: get Rx queue interrupt fd
Xiaoyun Li [Sat, 29 Sep 2018 02:12:04 +0000 (10:12 +0800)]
ethdev: get Rx queue interrupt fd

Some users want to use their own epoll instances to control both
DPDK rxq interrupt fds and their own other fds. So added a function
to get rxq interrupt fd based on port id and queue id.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agoethdev: deprecate flow object copy function
Adrien Mazarguil [Fri, 31 Aug 2018 09:01:13 +0000 (11:01 +0200)]
ethdev: deprecate flow object copy function

No users left for this function, time to deprecate it.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
5 years agoethdev: add missing items/actions to flow object converter
Adrien Mazarguil [Fri, 31 Aug 2018 09:01:11 +0000 (11:01 +0200)]
ethdev: add missing items/actions to flow object converter

Several pattern items and actions were never handled by rte_flow_copy()
because their descriptions were missing. rte_flow_conv() inherited this
deficiency.

This patch adds them and reorders others to match rte_flow.h. It doesn't
pose as a fix because so far no one has complained about it and
rte_flow_conv() would have to be backported as well: this function is
the only sane approach to handle VXLAN and NVGRE encap definitions.

As a matter of fact, it's the last missing piece to finally allow
testpmd users to request the creation of VXLAN/NVGRE encap/decap flow
rules without getting rejected outright.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
5 years agonet/bonding: switch to flow API object conversion function
Adrien Mazarguil [Fri, 31 Aug 2018 09:01:09 +0000 (11:01 +0200)]
net/bonding: switch to flow API object conversion function

This patch replaces rte_flow_copy() with rte_flow_conv().

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
5 years agonet/failsafe: switch to flow API object conversion function
Adrien Mazarguil [Fri, 31 Aug 2018 09:01:07 +0000 (11:01 +0200)]
net/failsafe: switch to flow API object conversion function

This patch replaces rte_flow_copy() with rte_flow_conv().

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
5 years agoapp/testpmd: rely on flow API conversion function
Adrien Mazarguil [Fri, 31 Aug 2018 09:01:05 +0000 (11:01 +0200)]
app/testpmd: rely on flow API conversion function

This commit replaces all local information about pattern items and
actions as well as flow rule duplication code with calls to
rte_flow_conv().

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
5 years agoethdev: add flow API item/action name conversion
Adrien Mazarguil [Fri, 31 Aug 2018 09:01:02 +0000 (11:01 +0200)]
ethdev: add flow API item/action name conversion

This provides a means for applications to retrieve the name of flow
pattern items and actions.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
5 years agoethdev: add flow API object converter
Adrien Mazarguil [Fri, 31 Aug 2018 09:01:00 +0000 (11:01 +0200)]
ethdev: add flow API object converter

rte_flow_copy() is bound to duplicate flow rule descriptions
(attributes, pattern and list of actions, all at once), however
applications sometimes need more flexibility, for instance the ability
to duplicate only one of the underlying objects (a single pattern item
or action) or retrieve other properties such as their names.

Instead of adding dedicated functions to handle each possible use case,
this patch introduces rte_flow_conv(), which supports any number of
object conversion operations in an extensible manner.

This patch re-implements rte_flow_copy() as a wrapper to
rte_flow_conv().

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
5 years agonet/sfc: support Rx descriptor status on EF10 datapath
Igor Romanov [Wed, 3 Oct 2018 09:03:56 +0000 (10:03 +0100)]
net/sfc: support Rx descriptor status on EF10 datapath

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
5 years agonet/sfc: support Rx scatter in EF10 Rx datapath
Andrew Rybchenko [Wed, 3 Oct 2018 09:03:55 +0000 (10:03 +0100)]
net/sfc: support Rx scatter in EF10 Rx datapath

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
5 years agonet/sfc: rename variable to prepare for scatter support
Andrew Rybchenko [Wed, 3 Oct 2018 09:03:54 +0000 (10:03 +0100)]
net/sfc: rename variable to prepare for scatter support

In the case of scattered packet one Rx buffer is just a segment
of the whole packet.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
5 years agonet/sfc: avoid usage of prepared packets number in EF10 Rx
Andrew Rybchenko [Wed, 3 Oct 2018 09:03:53 +0000 (10:03 +0100)]
net/sfc: avoid usage of prepared packets number in EF10 Rx

Number of prepared packets is good when one Rx descriptor is one packet.
Introduce pending Rx descriptor pointer which points to the first not
processed Rx descriptors. Rx descriptors from completed to pending have
buffers ready to be passed to application.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
5 years agonet/sfc: decrease number of variables maintained on EF10 Rx
Andrew Rybchenko [Wed, 3 Oct 2018 09:03:52 +0000 (10:03 +0100)]
net/sfc: decrease number of variables maintained on EF10 Rx

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
5 years agonet/sfc: avoid dummy writes to Rx queue state structure
Andrew Rybchenko [Wed, 3 Oct 2018 09:03:51 +0000 (10:03 +0100)]
net/sfc: avoid dummy writes to Rx queue state structure

If there is no packets to be processed, it does not make sense
to write the same values back to Rx queue structure.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
5 years agonet/sfc: check mbufs allocated using mempool API for Rx
Andrew Rybchenko [Wed, 3 Oct 2018 09:03:50 +0000 (10:03 +0100)]
net/sfc: check mbufs allocated using mempool API for Rx

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
5 years agonet/sfc: use mbuf raw free instead of mempool put directly
Andrew Rybchenko [Wed, 3 Oct 2018 09:03:49 +0000 (10:03 +0100)]
net/sfc: use mbuf raw free instead of mempool put directly

mbuf raw free adds debug build checks to ensure that mbuf is
really OK to be returned to mempool.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
5 years agonet/sfc: receive prepared packets even in Rx exception case
Andrew Rybchenko [Wed, 3 Oct 2018 09:03:48 +0000 (10:03 +0100)]
net/sfc: receive prepared packets even in Rx exception case

Make sure that number of prepared packets, completed and added
Rx ring pointers are reset to zeros on queue purge at stop.

Fixes: 638bddc99faa ("net/sfc: implement EF10 native Rx datapath")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
5 years agoexamples/vdpa: introduce a new sample for vDPA
Xiaolong Ye [Fri, 28 Sep 2018 21:47:47 +0000 (05:47 +0800)]
examples/vdpa: introduce a new sample for vDPA

The vdpa sample application creates vhost-user sockets by using the
vDPA backend. vDPA stands for vhost Data Path Acceleration which utilizes
virtio ring compatible devices to serve virtio driver directly to enable
datapath acceleration. As vDPA driver can help to set up vhost datapath,
this application doesn't need to launch dedicated worker threads for vhost
enqueue/dequeue operations.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agovhost: introduce API to get vDPA device number
Xiaolong Ye [Fri, 28 Sep 2018 21:47:46 +0000 (05:47 +0800)]
vhost: introduce API to get vDPA device number

It's used to get number of available registered vDPA devices.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agodoc: add guide for ENETC PMD
Gagandeep Singh [Wed, 3 Oct 2018 13:36:08 +0000 (19:06 +0530)]
doc: add guide for ENETC PMD

Add enetc usage document to compile and run the
DPDK application on enetc supported platform.
This document introduces the enetc driver, supported
platforms and supported features.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/enetc: support packet type parsing
Gagandeep Singh [Wed, 3 Oct 2018 13:36:07 +0000 (19:06 +0530)]
net/enetc: support packet type parsing

enable supported packet parse types feature

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/enetc: enable Rx and Tx
Gagandeep Singh [Wed, 3 Oct 2018 13:36:06 +0000 (19:06 +0530)]
net/enetc: enable Rx and Tx

Add RX and TX queue setup, datapath functions

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/enetc: add PMD with basic operations
Gagandeep Singh [Wed, 3 Oct 2018 13:36:05 +0000 (19:06 +0530)]
net/enetc: add PMD with basic operations

This patch introduces the enetc PMD with basic
initialisation functions includes probe, teardown,
hardware initialisation

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agodoc: fix typos in the flow API guide
Ilya Maximets [Wed, 26 Sep 2018 14:37:46 +0000 (17:37 +0300)]
doc: fix typos in the flow API guide

Fixes: 3e0ceb9f17ff ("doc: add basic howto for flow API")
Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agoapp/testpmd: fix csum parse-tunnel command invocation
Jerin Jacob [Tue, 2 Oct 2018 13:35:47 +0000 (19:05 +0530)]
app/testpmd: fix csum parse-tunnel command invocation

Based on the documentation and help print, the sub command
for csum suppose to be "parse-tunnel" instead of "parse_tunnel".

Fixes: 64fc36064dc3 ("app/testpmd: add csum parse-tunnel command")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
5 years agoapp/testpmd: check Rx VLAN offload flag to print VLAN TCI
Hyong Youb Kim [Wed, 26 Sep 2018 03:06:17 +0000 (20:06 -0700)]
app/testpmd: check Rx VLAN offload flag to print VLAN TCI

Since the following commit, PKT_RX_VLAN indicates the presence of
mbuf's vlan_tci, not PKT_RX_VLAN_STRIPPED.

Fixes: 380a7aab1ae2 ("mbuf: rename deprecated VLAN flags")
Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/mvneta: support statistics reset
Natalie Samsonov [Wed, 3 Oct 2018 07:22:16 +0000 (09:22 +0200)]
net/mvneta: support statistics reset

Add support for resetting of driver statistics.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/mvneta: support basic stats
Zyta Szpak [Wed, 3 Oct 2018 07:22:15 +0000 (09:22 +0200)]
net/mvneta: support basic stats

Add support for getting of basic statistics for the driver.

Signed-off-by: Yelena Krivosheev <yelena@marvell.com>
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Signed-off-by: Zyta Szpak <zr@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/mvneta: add MAC filtering
Zyta Szpak [Wed, 3 Oct 2018 07:22:14 +0000 (09:22 +0200)]
net/mvneta: add MAC filtering

Add callbacks for adding/removing MAC addresses.

Signed-off-by: Yelena Krivosheev <yelena@marvell.com>
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Signed-off-by: Zyta Szpak <zr@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/mvneta: support promiscuous mode
Zyta Szpak [Wed, 3 Oct 2018 07:22:13 +0000 (09:22 +0200)]
net/mvneta: support promiscuous mode

Add callbacks for enabling/disabling of promiscuous mode.

Signed-off-by: Yelena Krivosheev <yelena@marvell.com>
Signed-off-by: Zyta Szpak <zr@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/mvneta: add link update
Zyta Szpak [Wed, 3 Oct 2018 07:22:12 +0000 (09:22 +0200)]
net/mvneta: add link update

Add callback for updating information about link status/info.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Signed-off-by: Zyta Szpak <zr@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/mvneta: support setting MTU
Zyta Szpak [Wed, 3 Oct 2018 07:22:11 +0000 (09:22 +0200)]
net/mvneta: support setting MTU

Add callback for setting of MTU.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Signed-off-by: Zyta Szpak <zr@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/mvneta: support Rx/Tx
Zyta Szpak [Wed, 3 Oct 2018 07:22:10 +0000 (09:22 +0200)]
net/mvneta: support Rx/Tx

Add part of PMD for actual reception/transmission.

Signed-off-by: Yelena Krivosheev <yelena@marvell.com>
Signed-off-by: Dmitri Epshtein <dima@marvell.com>
Signed-off-by: Zyta Szpak <zr@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/mvneta: add PMD skeleton
Zyta Szpak [Wed, 3 Oct 2018 07:22:09 +0000 (09:22 +0200)]
net/mvneta: add PMD skeleton

Add neta pmd driver skeleton providing base for the further
development.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Signed-off-by: Yelena Krivosheev <yelena@marvell.com>
Signed-off-by: Dmitri Epshtein <dima@marvell.com>
Signed-off-by: Zyta Szpak <zr@semihalf.com>
Signed-off-by: Andrzej Ostruszka <amo@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/qede: bump PMD version to 2.10.0.1
Rasesh Mody [Sat, 29 Sep 2018 08:14:40 +0000 (08:14 +0000)]
net/qede: bump PMD version to 2.10.0.1

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: semantic changes
Rasesh Mody [Sat, 29 Sep 2018 08:14:39 +0000 (08:14 +0000)]
net/qede/base: semantic changes

This patch consists of semantic/formatting changes.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: add APIs for dscp priority map configuration
Rasesh Mody [Sat, 29 Sep 2018 08:14:37 +0000 (08:14 +0000)]
net/qede/base: add APIs for dscp priority map configuration

Add APIs for dscp priority map configuration. APIs added are
ecore_dcbx_get_dscp_priority(), ecore_dcbx_set_dscp_priority().
These base driver APIs can be used for dscp-map query/config.

Configure the doorbell queue (DORQ) to use vlan-id/priority.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: add RL update params
Rasesh Mody [Sat, 29 Sep 2018 08:14:35 +0000 (08:14 +0000)]
net/qede/base: add RL update params

Add 'rl_bc_stage_th','rl_timer_stage_th' and 'dcqcn_reset_alpha_on_idle'
to RL update param as well as logs.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: changes for 100G
Rasesh Mody [Sat, 29 Sep 2018 08:14:35 +0000 (08:14 +0000)]
net/qede/base: changes for 100G

Change details:

 - Get engine affinity from the management FW and configure accordingly
 - Add an LLH filter with the primary MAC address in QPAR/NPAR
 - Move some of the LLH APIs around
 - Add PPFID APIs
 - Update all allocated ppfids with the same value for the
   following PORT_PF registers:
   NIG_REG_DSCP_TO_TC_MAP_ENABLE
 - Add port_id, src_pfid and dst_pfid to DMA engine params

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: enable control frame filtering
Rasesh Mody [Sat, 29 Sep 2018 08:14:34 +0000 (08:14 +0000)]
net/qede/base: enable control frame filtering

Enable control frame filtering for non-trusted VFs.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: get pre-negotiated OEM values
Rasesh Mody [Sat, 29 Sep 2018 08:14:33 +0000 (08:14 +0000)]
net/qede/base: get pre-negotiated OEM values

Request management FW for OEM values, which are negotiated prior to
the driver load by sending the GET_OEM_UPDATES command after both
engines are initialized.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: support periodic Doorbell Recovery
Rasesh Mody [Sat, 29 Sep 2018 08:14:33 +0000 (08:14 +0000)]
net/qede/base: support periodic Doorbell Recovery

Add support for periodic Doorbell Recovery.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: support VF min rate
Rasesh Mody [Sat, 29 Sep 2018 08:14:33 +0000 (08:14 +0000)]
net/qede/base: support VF min rate

Add support for SRIOV vf min rate configuration.
Fix return code for ecore_iov_get_vf_min_rate().

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: add pretend function for port/PF
Rasesh Mody [Sat, 29 Sep 2018 08:14:32 +0000 (08:14 +0000)]
net/qede/base: add pretend function for port/PF

Add a pretend function for port/PF, pretend to another port and another
function when accessing the ptt window

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: adjust queue manager idx greater than max
Rasesh Mody [Sat, 29 Sep 2018 08:14:32 +0000 (08:14 +0000)]
net/qede/base: adjust queue manager idx greater than max

Modified queue manager getter APIs to cycle through their range if
index is higher than max. This prevents accessing index out of bounds.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: add error handling for mutex allocation
Rasesh Mody [Sat, 29 Sep 2018 08:14:31 +0000 (08:14 +0000)]
net/qede/base: add error handling for mutex allocation

Add error handling for mutex allocation failure

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: add mf-bit/API for FIP special mode
Rasesh Mody [Sat, 29 Sep 2018 08:14:30 +0000 (08:14 +0000)]
net/qede/base: add mf-bit/API for FIP special mode

Add mf-bit/API for FIP special mode.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: add API to update FW RSS indirection table
Rasesh Mody [Sat, 29 Sep 2018 08:14:30 +0000 (08:14 +0000)]
net/qede/base: add API to update FW RSS indirection table

Added ecore_update_eth_rss_ind_table_entry() api to update FW RSS
indirection table entry according to new interface of FW 8.37.x.x.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: workaround to indicate SHMEM data ready
Rasesh Mody [Sat, 29 Sep 2018 08:14:29 +0000 (08:14 +0000)]
net/qede/base: workaround to indicate SHMEM data ready

The driver can notify that there was an MCP reset and read the SHMEM
values before the management FW has completed initializing them.
As a temporary solution, the "sup_msgs" field is used as a SHMEM data
ready indication. This should be replaced with an actual indication
when it is provided by the management FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: add DPC sync after PF stop
Rasesh Mody [Sat, 29 Sep 2018 08:14:28 +0000 (08:14 +0000)]
net/qede/base: add DPC sync after PF stop

Add DPC sync after stopping the physical funciton to allow clean up of
asyncronous events. Post this the driver don't expect the FW to send
async events.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: check for EDPM enabled in DB recovery
Rasesh Mody [Sat, 29 Sep 2018 08:14:28 +0000 (08:14 +0000)]
net/qede/base: check for EDPM enabled in DB recovery

Add a check for EDPM enabled before flushing doorbell recovery queue.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/qede/base: upgrade to FW 8.37.7.0
Rasesh Mody [Sat, 29 Sep 2018 08:14:27 +0000 (08:14 +0000)]
net/qede/base: upgrade to FW 8.37.7.0

This patch adds changes to base driver for upgrading to 8.37.3.0 FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/bnxt: reduce polling interval for valid bit
Xiaoxin Peng [Sat, 29 Sep 2018 02:00:06 +0000 (19:00 -0700)]
net/bnxt: reduce polling interval for valid bit

Change polling interval for valid bit in bnxt_hwrm_send_message
Poll every 1us instead of 600us.

Fixes: 804e746c7b73 ("net/bnxt: add hardware resource manager init code")
Cc: stable@dpdk.org
Signed-off-by: Xiaoxin Peng <xiaoxin.peng@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: remove excess log messages
Ajit Khaparde [Sat, 29 Sep 2018 02:00:05 +0000 (19:00 -0700)]
net/bnxt: remove excess log messages

When the firmware version and the driver HWRM version do not match,
we are logging some messages. These messages unnecessarily clutter
the logs and can add to the noise. We are logging the HWRM version
and the firmware version anyway. The difference in version numbers
can be gleaned from that. Removing the remaining log messages.

Fixes: 804e746c7b73 ("net/bnxt: add hardware resource manager init code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: set VLAN strip mode before default VNIC cfg
Bei Sun [Sat, 29 Sep 2018 02:00:04 +0000 (19:00 -0700)]
net/bnxt: set VLAN strip mode before default VNIC cfg

Firmware sets pf pair in default VNIC cfg. If the VLAN strip
setting is not available at this time, it will not be
configured correctly in the CFA.
Set the desired VLAN strip mode before default VNIC configuration.

Fixes: 7fe5668d2ea3 ("net/bnxt: support VLAN filter and strip")
Cc: stable@dpdk.org
Signed-off-by: Bei Sun <bei.sun@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: set a VNIC as default only once
Ajit Khaparde [Sat, 29 Sep 2018 02:00:03 +0000 (19:00 -0700)]
net/bnxt: set a VNIC as default only once

If a vnic is configured as default and the setting has not changed,
there is no need to issue this setting again to the FW.

Fixes: db678d5c2b54 ("net/bnxt: add HWRM VNIC configure")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: set MAC filtering as outer for non tunnel frames
Ajit Khaparde [Sat, 29 Sep 2018 02:00:02 +0000 (19:00 -0700)]
net/bnxt: set MAC filtering as outer for non tunnel frames

We need to set HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST bit in
L2_FILTER_ALLOC for filtering non-tunnel packets based on outermost MAC.

Fixes: f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix registration of VF async event completion ring
Yongping Zhang [Sat, 29 Sep 2018 02:00:01 +0000 (19:00 -0700)]
net/bnxt: fix registration of VF async event completion ring

While registering vf's event completion ring to FW, use the wrong
macro, FW doesn't set up the event completion ring successfully,
VF can't receive any async event.

Fixes: 4535cad39515 ("net/bnxt: handle VF/PF initialization appropriately")
Cc: stable@dpdk.org
Signed-off-by: Yongping Zhang <yongping.zhang@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: support trusted VF
Ajit Khaparde [Sat, 29 Sep 2018 02:00:00 +0000 (19:00 -0700)]
net/bnxt: support trusted VF

In the current model, VFs are not trusted.
So it is not allowed to send many HWRM commands.
Newer firmware has added support to allow VF to be trusted.
Now the VF queries if it is a trusted entity and based on that
it can send HWRM commands to the firmware.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: support enabling new mailbox channel
Ajit Khaparde [Sat, 29 Sep 2018 01:59:59 +0000 (18:59 -0700)]
net/bnxt: support enabling new mailbox channel

For hardware having multiple embedded management processors the firmware
has added support to indicate if the comm channel to the processor has
been enabled. If the channel is enabled, switch the CFA NTUPLE and EM
filtering commands to use the kong channel.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: support extended port counters
Ajit Khaparde [Sat, 29 Sep 2018 01:59:58 +0000 (18:59 -0700)]
net/bnxt: support extended port counters

This patch adds support extended port statistics like COS bytes,
packets, XON -> XOFF and XOFF -> XON transitions in Tx and Rx path.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: update HWRM version
Ajit Khaparde [Sat, 29 Sep 2018 01:59:55 +0000 (18:59 -0700)]
net/bnxt: update HWRM version

Update the HWRM API to version 1.9.2.53

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix MTU setting
Ajit Khaparde [Sat, 29 Sep 2018 01:59:54 +0000 (18:59 -0700)]
net/bnxt: fix MTU setting

The HW can support maximum frame length of 9600 bytes.
And we are currently capping the max frame size to 9500 bytes.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix uninitialized pointer access in Tx
Somnath Kotur [Sat, 29 Sep 2018 01:59:53 +0000 (18:59 -0700)]
net/bnxt: fix uninitialized pointer access in Tx

bnxt_start_xmit() was attempting to access an uninitialized ptr - txbd1
which would lead to segmentation fault.
Fix to initialize ptr to NULL and check for the same before access.

Fixes: f10258e39ec2 ("net/bnxt: fix HW Tx checksum offload check")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: get rid of ff pools and use VNIC info array
Somnath Kotur [Sat, 29 Sep 2018 01:59:52 +0000 (18:59 -0700)]
net/bnxt: get rid of ff pools and use VNIC info array

There was no direct association between the rxq's VNIC and the
vnic_info[].
Explicitly associate the two in bnxt_mq_rx_configure().

Fixes: 0a256e4a548b ("net/bnxt: fix Rx ring count limitation")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
5 years agonet/enic: support flow counter action
John Daley [Fri, 28 Sep 2018 03:08:37 +0000 (20:08 -0700)]
net/enic: support flow counter action

Support counter action for 1400 series adapters.

The adapter API for allocating and freeing counters is independent of
the adapter match/action API. If the filter action is requested, a
counter is first allocated and then assigned to the filter, and when
the filter is deleted, the counter must also be deleted.

Counters are DMAd to pre-allocated consistent memory periodically,
controlled by the define VNIC_FLOW_COUNTER_UPDATE_MSECS. The default is
100 milliseconds.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
5 years agonet/enic: fix flow API memory leak
John Daley [Fri, 28 Sep 2018 03:08:36 +0000 (20:08 -0700)]
net/enic: fix flow API memory leak

rte_flow structures were not being freed when destroyed or flushed.

Fixes: 6ced137607d0 ("net/enic: flow API for NICs with advanced filters enabled")
Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
5 years agonet/bnx2x: fix to add PHY lock
Rasesh Mody [Sat, 29 Sep 2018 05:42:41 +0000 (05:42 +0000)]
net/bnx2x: fix to add PHY lock

This patch adds phy_lock, acquire/release the lock when performing
PHY transactions. Without this fix driver can run into synchronization
issues with management FW when modifying PHY settings.

Fixes: 540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/bnx2x: fix call to link handling periodic function
Rasesh Mody [Sat, 29 Sep 2018 05:42:40 +0000 (05:42 +0000)]
net/bnx2x: fix call to link handling periodic function

If link handling periodic function is allowed to be called in interrupt
context, the periodic function can get called too frequently and exhaust
the retry credits to check link status.

This change makes sure link handling periodic function is not called in
interrupt context.

Fixes: 540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/bnx2x: fix to disable further interrupts
Rasesh Mody [Sat, 29 Sep 2018 05:42:39 +0000 (05:42 +0000)]
net/bnx2x: fix to disable further interrupts

Fix to disable further fastpath/slowpath interrupts. These will be
enabled again by their respective handlers

Fixes: 540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/bnx2x: update link/PHY management
Rasesh Mody [Sat, 29 Sep 2018 05:42:36 +0000 (05:42 +0000)]
net/bnx2x: update link/PHY management

This patch has changes to update the link/PHY management (elink) code
to the latest.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/bnx2x: fix logging to include device name
Rasesh Mody [Sat, 29 Sep 2018 05:42:29 +0000 (05:42 +0000)]
net/bnx2x: fix logging to include device name

Fix PMD logging scheme to include device name in the messages printed.

Fixes: 540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
5 years agonet/nfp: fix RSS
Alejandro Lucero [Wed, 26 Sep 2018 13:45:50 +0000 (14:45 +0100)]
net/nfp: fix RSS

Three problems are fixed in this patch:

 - RSS capabilities not advertised properly
 - RSS configuration just done for some RSS types
 - RSS hash match reported for just some RSS types

Fixes: 934e4c60fbff ("nfp: add RSS")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
5 years agonet/netvsc: check return from kvargs process
Stephen Hemminger [Wed, 26 Sep 2018 09:31:12 +0000 (10:31 +0100)]
net/netvsc: check return from kvargs process

Should check return value from processing latency value.

Coverity issue: 322104
Fixes: a25d39a3eb69 ("net/netvsc: allow tuning latency with devargs")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
5 years agonet/failsafe: report actual device capabilities
Igor Romanov [Wed, 26 Sep 2018 06:38:04 +0000 (07:38 +0100)]
net/failsafe: report actual device capabilities

Failsafe device capabilities depend on supported by the failsafe
itself plus capabilities supported by sub-devices.
Make fs_dev_infos_get() take failsafe device capabilities into account.

Fixes: cac923cfea47 ("ethdev: support runtime queue setup")
Cc: stable@dpdk.org
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
5 years agonet/enic: explicitly disable overlay offload
Hyong Youb Kim [Wed, 26 Sep 2018 02:54:22 +0000 (19:54 -0700)]
net/enic: explicitly disable overlay offload

Reopening vNIC does not automatically disable overlay offload. If it
is previously enabled, it remains enabled even when the user restarts
DPDK and requests overlay offload to be disabled via devarg
disable-overlay=1. So explicitly disable overlay offload when
requested.

Fixes: 93fb21fdbe23 ("net/enic: enable overlay offload for VXLAN and GENEVE")
Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
5 years agonet/enic: add VLAN and csum offloads to simple Tx handler
Hyong Youb Kim [Wed, 26 Sep 2018 02:54:21 +0000 (19:54 -0700)]
net/enic: add VLAN and csum offloads to simple Tx handler

Currently the simple Tx handler supports no offloads, which makes it
usable only for a small number of benchmarks. Add vlan and checksum
offloads to the handler, as cycles/packet increases only by about 3
cycles, and applications commonly use those offloads.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>