Commit Graph

9341 Commits

Author SHA1 Message Date
Hemant Agrawal
b48a3d859f crypto/caam_jr: reduce function traces in critical path
Reducing the functional traces from data path and critical session path

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-10-09 11:50:12 +02:00
Adam Dybkowski
8a95d6bc93 compress/isal: shorten queue pair name
This patch shortens the queue pair name created when initializing
the queue pair of the ISAL PIM, based on the device and qp ids.

Suggested-by: Paul Luse <paul.e.luse@intel.com>
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-10-09 11:50:12 +02:00
Stephen Hemminger
2e8d5cf763 bus/pci: fix Intel IOMMU sysfs access check
Just open the sysfs file and handle failure, rather than using access().
This eliminates Coverity warnings about TOCTOU
"time of check versus time of use"; although for this sysfs file that is
not really an issue anyway.

Coverity issue: 347276
Fixes: 54a328f552 ("bus/pci: forbid IOVA mode if IOMMU address width too small")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2019-10-09 10:22:45 +02:00
David Marchand
8ac3591694 remove useless include of EAL memory config header
Restrict this header inclusion to its real users.

Fixes: 028669bc9f ("eal: hide shared memory config")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-10-09 10:22:24 +02:00
Thomas Monjalon
b38a54aeb1 net/mlx: fix build with make and recent gcc
With VERBOSE=1, this error was seen in debug mode with gcc 9.1:

In file included from /tmp/dpdk.auto-config-h.sh.c.w0VWMi:1:
In file included from rdma-core/build/include/infiniband/mlx5dv.h:47:
In file included from rdma-core/build/include/infiniband/verbs.h:46:
In file included from rdma-core/build/include/infiniband/verbs_api.h:66:
In file included from rdma-core/build/include/infiniband/ib_user_ioctl_verbs.h:38:
include/rdma/ib_user_verbs.h:161:28: fatal error:
zero size arrays are an extension [-Wzero-length-array]
__aligned_u64 driver_data0;
^
1 error generated.

As a result, buildtools/auto-config-h.sh was not generating
a correct autoconf file, so the compilation was generating such error:

fatal error: redefinition of 'mlx5_ib_uapi_flow_action_packet_reformat_type'

It is fixed by disabling -pedantic option when calling auto-config-h.sh
from the makefile-based system.

Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-09-12 18:32:40 +02:00
Thomas Monjalon
de38dd8cf5 net/mlx: fix meson build with custom dependency path
If rdma-core is not installed in a standard directory of the system,
it is possible to specify the location of the pkgconfig file via
an environment variable:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:~/rdma-core/build/lib/pkgconfig

In this case, the dependency may become mandatory to specify
for the configuration tests (checking dependency symbols or fields).

Some spacing is also fixed around.

Fixes: 8e49376400 ("net/mlx4: add external allocator for Verbs object")
Fixes: 1dd7c7e38c ("net/mlx4: support meson build")
Fixes: 96d7c62a70 ("net/mlx5: support meson build")
Cc: stable@dpdk.org

Suggested-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-09-12 18:32:40 +02:00
Thomas Monjalon
8f64150fa5 drivers: add some reasons for meson disabling
Some drivers were missing reasons text for their disabling in meson.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-09-12 18:32:40 +02:00
Thomas Monjalon
167d9c6797 build: remove redundant libs from pkgconfig
As explained in drivers/meson.build,
"
  For the find_library() case (but not with dependency()) we also
  need to specify the "-l" flags in pkgconfig_extra_libs variable
  too, so that it can be reflected in the pkgconfig output for
  static builds.
"

The commit e30b4e566f ("build: improve dependency handling")
must be followed up with this one in order to remove more
occurences of pkgconfig_extra_libs redundant with use of dependency().

Fixes: f1debd77ef ("net/af_xdp: introduce AF_XDP PMD")
Fixes: 3c32e89f68 ("compress/isal: add skeleton ISA-L compression PMD")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-09-12 18:32:40 +02:00
Tiwei Bie
1d2aa48b87 net/virtio: remove remaining simple Tx related stuff
The simple Tx path in virtio has been removed in below commit.
This patch removes an undefined function declaration of simple
Tx and all related descriptions in the doc.

Fixes: 57f818963d ("net/virtio: remove simple Tx path")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-09-06 17:32:42 +02:00
Dekel Peled
d2ceaa7353 net/mlx5: remove unneeded constant
Constant MLX5_GROUP_FACTOR is defined with value 1, and used to
multiply group value in two places.

This patch removes the unneeded constant definition and use.

Fixes: 4f84a19779 ("net/mlx5: add Direct Rules API")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-09-06 17:15:14 +02:00
Raslan Darawsheh
c9ba7523c4 net/mlx5: support UDP tunnel adding
This adds support for adding a new UDP tunnel port
on a specific VXLAN types.

Currently we only support VXLAN, VXLAN-GPE on ports
4789, 4790 respectively. Without having to configure
anything in the NIC.

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-09-06 17:15:14 +02:00
Dekel Peled
eb0819f565 net/mlx5: fix typo in error message
This patch fixes a typing mistake in an error message.

Fixes: 2e4c987aad ("net/mlx5: validate Direct Rule E-Switch")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-09-06 17:15:14 +02:00
Dekel Peled
b41c48b7ad net/mlx5: fix jump action validation
This patch updates the validation function of jump action.
It adds check of conflicting fate actions in flow rule.
It also removes check of action->type which is not needed.

Fixes: 684b9a1b1f ("net/mlx5: support jump action")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-09-06 17:15:14 +02:00
Dekel Peled
e6ed9dfdf8 net/mlx5: fix drop action validation
Function mlx5_flow_validate_action_drop() checks if another fate
action is already present in this flow rule, using defined value
MLX5_FLOW_FATE_ACTIONS.

This patch enhances the check using value
(MLX5_FLOW_FATE_ACTIONS | MLX5_FLOW_FATE_ESWITCH_ACTIONS)
to make sure all relevant fate actions are checked.

Fixes: 23c1d42c71 ("net/mlx5: split flow validation to dedicated function")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-09-06 17:15:14 +02:00
Dekel Peled
48c91c8f3f net/mlx5: fix comment
In struct mlx5_ibv_shared, member esw_drop_action was added between
existing member tx_tbl and the comment line describing it.
This patch moves the comment line to its original location, and fixes
a typo in the comment.

Fixes: 34fa7c0268 ("net/mlx5: add drop action to Direct Verbs E-Switch")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-09-06 17:15:14 +02:00
Xiaoyu Min
725a4284f7 net/mlx5: fix missing packet type for IP-in-IP
The hw ptype information is missed for IP-in-IP tunnel.
It should be RTE_PTYPE_TUNNEL_IP ptype.

Fixes: 5e33bebdd8 ("net/mlx5: support IP-in-IP tunnel")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-09-06 17:15:14 +02:00
Wei Zhao
9594db99c7 net/ixgbe: fix VF RSS offloads configuration
x550 NIC VF port has the capacity to set RSS hash,
so device info get function should report that.

Fixes: 2144f6630f ("ixgbe: add redirection table size in device info")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-09-05 19:18:38 +02:00
Wei Zhao
5e0a2c935b net/ixgbe: enable new PF host mbox version
A new mail box version of ixgbe_mbox_api_13 need to be enabled for PF
host, in order that it can communicate with VF for queue number.

Fixes: 46b14c2311 ("ixgbe: get VF queue number")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-09-05 19:18:38 +02:00
Junyu Jiang
f26f416d4c net/ixgbe: fix queue interrupt for X552/557
Interrupt mode is not working on X552/557 device because
this device doesn't enable the queue interrupt mapping,
this patch fixed the issue.

Fixes: d2e72774e5 ("ixgbe/base: support X550")
Cc: stable@dpdk.org

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2019-09-05 19:18:32 +02:00
Maxime Leroy
86536da001 net/vmxnet3: remove IP checksum from capabilities
The vmxnet3_prep_pkts function set rte_errno to ENOTSUP for any packets
having PKT_TX_IP_CHECKSUM set in ol_flags. But the vmxnet3 has
DEV_TX_OFFLOAD_IPV4_CKSUM set in this tx offload capa.

This issue has been introduced with the new Rx offload
API. DEV_TX_OFFLOAD_IPV4_CKSUM and DEV_RX_OFFLOAD_IPV4_CKSUM has been
added to the tx/rx offloads capa, but the vmxnet3 driver doesn't support
it.

To fix the issue, DEV_TX/RX_OFFLOAD_IPV4_CKSUM needs to be removed from
tx/rx offload capa.

Fixes: 95e4a96ccb ("net/vmxnet3: convert to new Rx offload API")
Cc: stable@dpdk.org

Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2019-09-04 10:14:28 +02:00
Yong Wang
e573264c71 net/ixgbe: remove redundant assignment
Since "link.link_duplex" has been assigned to ETH_LINK_FULL_DUPLEX just
before switch statement, the assignment in switch-case statement is
redundant. Remove it.

Fixes: 82113036e4 ("ethdev: redesign link speed config")
Cc: stable@dpdk.org

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-09-04 09:53:35 +02:00
Ruifeng Wang
ed838a5fe9 net/ixgbe: use intrinsics to count packet in NEON Rx
vPMD for aarch64 calculates the number of received packets using a loop.
Change to use NEON intrinsics for calculation. This saves CPU cycles
and has slightly better performance.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
2019-09-03 17:12:38 +02:00
Ruifeng Wang
18b7d4eb3d net/ixgbe: remove memory barrier from NEON Rx
The memory barrier was intended for descriptor data integrity (see
comments in [1]). As later NEON loads were implemented and a whole
entry is loaded in one-run and atomic, that makes the ordering of
partial loading unnecessary. Remove it accordingly.

Corrected couple of code comments.

In terms of performance, observed slightly higher average throughput
in tests with 82599ES NIC.

[1] http://patches.dpdk.org/patch/18153/

Fixes: 989a840505 ("net/ixgbe: fix received packets number for ARM NEON")
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
2019-09-03 17:12:38 +02:00
Gavin Hu
f1f0f39806 net/i40e: remove compiler barrier from NEON Rx
As packet length extraction code was simplified,the ordering
was not necessary any more.[1]

2% performance gain was measured on Marvell ThunderX2.
4.3% performance gain was measured on Ampere eMAG80

[1] http://mails.dpdk.org/archives/dev/2016-April/037529.html

Fixes: ae0eb310f2 ("net/i40e: implement vector PMD for ARM")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
2019-09-03 17:12:37 +02:00
Gavin Hu
78b50591c8 net/i40e: remove memory barrier from NEON Rx
For x86, the descriptors needs to be loaded in order, so in between two
descriptors loading, there is a compiler barrier in place.[1]
For aarch64, a patch [2] is in place to survive with discontinuous DD
bits, the barriers can be removed to take full advantage of out-of-order
execution.

50% performance gain in the RFC2544 NDR test was measured on ThunderX2.
12.50% performance gain in the RFC2544 NDR test was measured on Ampere
eMAG80 platform.

[1] http://inbox.dpdk.org/users/039ED4275CED7440929022BC67E7061153D71548@
SHSMSX105.ccr.corp.intel.com/
[2] https://mails.dpdk.org/archives/stable/2017-October/003324.html

Fixes: ae0eb310f2 ("net/i40e: implement vector PMD for ARM")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
2019-09-03 17:12:37 +02:00
Christian Ehrhardt
ceadf1a405 net/mlx4: fix build on ppc64
The AltiVec header file breaks boolean type:

error: incompatible types when initializing type
'__vector _bool int' {aka '_vector(4) __bool int'} using type 'int'

If __APPLE_ALTIVEC__ is defined, then bool type is redefined
and conflicts with stdbool.h.

There is no good solution to fix it for the whole project without
breaking something else, so a workaround is inserted in mlx5 PMD.
This workaround is not compatible with C++ but there is no C++ in DPDK.

Related to: 725f5dd0bf ("net/mlx5: fix build on PPC64")
Cc: stable@dpdk.org

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-09-03 11:53:34 +02:00
Ivan Ilchenko
5fdd61136b net/atlantic: remove double function declaration
atl_dev_info_get() is declared twice in atl_ethdev.c.
Delete one of these declarations.

Fixes: bb42aa9ffe ("net/atlantic: configure device start/stop")
Cc: stable@dpdk.org

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Igor Russkikh <igor.russkikh@aquantia.com>
2019-09-02 18:19:50 +02:00
Xiao Zhang
0ed5e26eb0 net/ice: support multi-process
Add multiple processes support for ice, secondary processes will share
memory and configuration with primary process, do not need further
initialization for secondary processes.

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-08-30 18:06:35 +02:00
Tetsuya Mukawa
91f9c18fcc net/null: update license text to SPDX format
Signed-off-by: Tetsuya Mukawa <mtetsuyah@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-08-30 10:25:19 +02:00
Rastislav Cernay
3890413fc5 net/szedata2: remove resources when port is closed
The rte_eth_dev_close() function now handles freeing resources for
devices (e.g., mac_addrs).  To conform with the new close() behaviour we
are asserting the RTE_ETH_DEV_CLOSE_REMOVE flag so that
rte_eth_dev_close() releases all device level dynamic memory.

Signed-off-by: Rastislav Cernay <cernay@netcope.com>
Acked-by: Jan Remes <remes@netcope.com>
2019-08-28 15:09:28 +02:00
Rastislav Cernay
f1d59d3fc8 net/nfb: remove resources when port is closed
The rte_eth_dev_close() function now handles freeing resources for
devices (e.g., mac_addrs).  To conform with the new close() behaviour we
are asserting the RTE_ETH_DEV_CLOSE_REMOVE flag so that
rte_eth_dev_close() releases all device level dynamic memory.

Signed-off-by: Rastislav Cernay <cernay@netcope.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Jan Remes <remes@netcope.com>
2019-08-28 13:09:19 +02:00
Abhishek Sachan
7c3bcc7b6d net/af_packet: fix stale sockets
af_packet driver is leaving stale socket after device is removed.

Ring buffers are memory mapped when device is added using rte_dev_probe.
There is no corresponding munmap call when device is removed/closed.

This commit fixes the issue by calling munmap
from rte_pmd_af_packet_remove().

Bugzilla ID: 339
Fixes: e6ee4db01b ("af_packet: make the device detachable")
Cc: stable@dpdk.org

Signed-off-by: Abhishek Sachan <abhishek.sachan@altran.com>
Reviewed-by: John W. Linville <linville@tuxdriver.com>
2019-08-27 15:31:16 +02:00
Sylvain Rodon
ce276d9ec3 net/pcap: propagate timestamp from header to mbuf
Timestamp is always set in PCAP header, whether it reads a file or
listen on an interface. This information can be important for some
applications and it cannot be obtained otherwise (especially when
reading a PCAP file, where the timestamp is not the current time).
Timestamp here is the number of microseconds since epoch.

Signed-off-by: Sylvain Rodon <srn@nexatech.fr>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-08-27 13:52:53 +02:00
Stephen Hemminger
a9b28a4391 net/ark: implement dynamic log type
The generic RTE_LOGTYPE_PMD is a historical relic and should
be deprecated. Every driver must register its own logtype.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-08-27 10:44:14 +02:00
Stephen Hemminger
18fab3a918 net/cxgbe: implement dynamic log type
The generic RTE_LOGTYPE_PMD is a historical relic and should
be deprecated. Every driver must register its own logtype.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-08-27 10:29:50 +02:00
Stephen Hemminger
6fc581e9f8 net/null: replace BSD license with SPDX tag
Replace the boilerplate BSD license text with the equivalent
SPDX license id.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Tetsuya Mukawa <mtetsuyah@gmail.com>
Acked-by: Takanari Hayama <taki@igel.co.jp>
2019-08-26 14:43:46 +02:00
Yongseok Koh
30d87a5ed5 net/mlx5: fix TSO flag check
Fix some mistakes in Tx bursts in regard to TSO flag check.

Fixes: 18a1c20044 ("net/mlx5: implement Tx burst template")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2019-08-26 14:41:13 +02:00
Xiaoyu Min
c6cc228e9d net/mlx5: fix crash for empty raw encap data
For the rte_flow_action_raw_encap, the header definition for
encapsulation must be available, otherwise it will lead to crash on some
OFED versions and logically it should be rejected.

Fixes: 8ba9eee4ce ("net/mlx5: add raw data encap/decap to Direct Verbs")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Dekel Peled <dekelp@mellanox.com>
2019-08-26 14:41:13 +02:00
Lu Qiuwen
61874d3c06 net/fm10k: fix stats crash in multi-process
The ops pointers in fm10k_stats_get() are set up from primary
process, when secondary process calls these ops pointers,
a segment fault will happen.

Fixes: 7223d200c2 ("fm10k: add base driver")
Cc: stable@dpdk.org

Signed-off-by: Lu Qiuwen <luqiuwen@iie.ac.cn>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-08-26 12:43:23 +02:00
Xiao Zhang
2da3ba7467 net/i40e: fix VF runtime queues RSS config
I40evf queue can not work properly with kernel pf driver for X722 vf.
Eg. when configure 8 queues pair, only 4 queues can receive packets,
and half packets will be lost if using 2 queues pair.

This issue is caused by misconfiguration of look up table, the original
code of LUT configuration did not work for X722 vf, use aq command to
setup the LUT to make it work properly.

Fixes: cea7a51c17 ("i40evf: support RSS")
Cc: stable@dpdk.org

Acked-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
2019-08-26 12:43:23 +02:00
David Marchand
68218b87c1 net/bonding: prefer allmulti to promiscuous for LACP
Rather than the global promiscuous mode on all slaves, let's try to use
allmulti.
To do this, we apply the same mechanism than for promiscuous and drop in
rx_burst.

When adding a slave, we first try to use allmulti, else we try
promiscuous.
Because of this, we must be able to handle allmulti on the bonding
interface, so the associated dev_ops is added with checks on which mode
has been applied on each slave.

Rather than add a new flag in the bond private structure, we can remove
promiscuous_en since ethdev already maintains this information.
When starting the bond device, there is no promisc/allmulti re-apply
as, again, ethdev does this itself.

On reception, we must inspect if the packets are multicast or unicast
and take a decision to drop based on which mode has been enabled on the
bonding interface.

Note: in the future, if we define an API so that we can add/remove mc
addresses to a port (rather than the current global set_mc_addr_list
API), we can refine this to only register the LACP multicast mac
address.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
2019-08-22 18:45:49 +02:00
David Marchand
0ec234460b net/bonding: fix unicast packets filtering
By default, the 802.3ad code enables promisc mode on all slaves.
To avoid all packets going to the application (unless the application
asked for promiscuous mode), all frames are supposed to be filtered in
the rx burst handler.

However the incriminated commit broke this because non pure ethernet
frames (basically any unicast Ether()/IP() packet) are not filtered
anymore.

Fixes: 71b7b37ec9 ("net/bonding: use ptype flags for LACP Rx filtering")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
2019-08-22 18:45:49 +02:00
David Marchand
58729b5494 net/bonding: fix LACP fast queue Rx handler
Fast queue Rx burst function is missing checks on promisc and the
slave collecting state.
Define an inline wrapper to have a common base.

Fixes: 112891cd27 ("net/bonding: add dedicated HW queues for LACP control")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
2019-08-22 18:45:49 +02:00
David Marchand
8ff0003c19 net/bonding: fix out of bound access in LACP mode
We'd better consolidate the fast queue and the normal tx burst functions
under a common inline wrapper for maintenance.

But looking closer at the bufs_slave_port_idxs[] mapping array in those
tx burst functions, its size is invalid since up to nb_bufs are handled
here.
A previous patch [1] fixed this issue for balance tx burst function
without mentioning it.

802.3ad and balance modes are functionally equivalent on transmit.
The only difference is on the slave id distribution.
Add an additional inline wrapper to consolidate even more and fix this
issue.

[1]: https://git.dpdk.org/dpdk/commit/?id=c5224f623431

Fixes: 09150784a7 ("net/bonding: burst mode hash calculation")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
2019-08-22 18:45:49 +02:00
Lance Richardson
3227d09853 net/bnxt: revert fix traffic stall on stop/start
This reverts commit aa2c00702b, which
introduced the possibility of an invalid address exception when running
an application with a stopped receive queue. The issues with rxq stop/start
 will be revisited in the 19.11 release timeframe.

Fixes: aa2c00702b ("net/bnxt: fix traffic stall on Rx queue stop/start")
Cc: stable@dpdk.org

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-08-10 23:55:07 +02:00
Congwen Zhang
1861e3a66f net/ixgbe/base: fix product version check
The "and" condition offset == 0 && offset == NVM_INVALID_PTR
 can never be true.

Fixes: cf3af5aa56 ("net/ixgbe/base: add functions to get version info")
Cc: stable@dpdk.org

Signed-off-by: Congwen Zhang <zhang.congwen@zte.com.cn>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-08-08 16:55:19 +02:00
Viacheslav Ovsiienko
4dec9c79c2 net/mlx5: fix completion request for multi-segment
The copying of sent mbufs pointers might be deferred to the end of
tx_burst() routine to be copied in one call of rte_memcpy.
For the multi segment packets this optimization is not applicable,
because number of packets does not match with number of mbufs and
we do not have linear array of pointers in pkts parameter.

The completion request generating routine wrongly took into account
the inconsistent (for multi-segment packets) deferred pointer copying.

Fixes: 5a93e173b8 ("net/mlx5: fix Tx completion request generation")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-08-07 15:28:09 +02:00
Jerin Jacob
de4473d911 net/memif: fix build with gcc 9.1
gcc-9 is stricter on NULL arguments for printf.
Fix the following build error by avoiding NULL argument to printf.

In file included from drivers/net/memif/memif_socket.c:26:
In function 'memif_socket_create',
inlined from 'memif_socket_init' at net/memif/memif_socket.c:965:12:
net/memif/rte_eth_memif.h:35:2: error:
'%s' directive argument is null [-Werror=format-overflow=]
   35 |  rte_log(RTE_LOG_ ## level, memif_logtype, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   36 |   "%s(): " fmt "\n", __func__, ##args)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 09c7e63a71 ("net/memif: introduce memory interface PMD")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
2019-08-07 10:21:33 +02:00
Nicolas Chautru
4e8cd9041e baseband/turbo_sw: remove dead code
Error handling code cannot logically be reached.

Coverity issue: 344980, 344992
Fixes: c769c71175 ("baseband/turbo_sw: extend for 5G")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
2019-08-06 23:33:14 +02:00
Viacheslav Ovsiienko
0e3d0525b2 net/mlx5: fix memory event callback list
The shared Infiniband device context should be included
into memory event callback list only once on context creation,
and removed from the list only once on context destroying.
Multiple insertions of the same object caused the infinite
loop on the list processing.

Fixes: ccb3815346 ("net/mlx5: update memory event callback for shared context")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-08-06 17:42:12 +02:00
Xiaoyu Min
c3318f529c net/mlx5: fix RSS expand for IP-in-IP
The RSS expand function for IP-in-IP tunnel type is missed,
which leads to create following flow failed:

   flow create 0 ingress pattern eth / ipv4 proto is 4 /
        ipv4 / udp / end actions rss queues 0 1 end level 2
	types ip ipv4-other udp ipv4 ipv4-frag end /
	mark id 221 / count / end

In order to make RSS expand function working correctly,
now the way to check whether a IP tunnel existing is to
check whether there is the second IPv4/IPv6 item and whether the
first IPv4/IPv6 item's next protocl is IPPROTO_IPIP/IPPROTO_IPV6.
For example:
  ... pattern eth / ipv4 proto is 4 / ipv4 / ....

Fixes: 5e33bebdd8 ("net/mlx5: support IP-in-IP tunnel")

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-08-06 17:42:12 +02:00
Dekel Peled
1f1eb0949c net/mlx5: fix UDP checksum zeroing
Function flow_dv_zero_encap_udp_csum() uses a while loop to iterate
over vlan items in flow rule.
Pointer next_hdr is incremented to the next item before it is used,
so the first item is skipped.

This patch moves the incrementing of next_hdr to the correct place.

Fixes: bf1d7d9a03 ("net/mlx5: zero out UDP checksum in encapsulation")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-08-06 17:42:12 +02:00
Xiaoyu Min
6fd05da9ef net/mlx5: fix link speed info when link is down
When the link is down, the link speed returned by ethtool is
UINT32_MAX and the link status is 0.

In this case, the DPDK ethdev link speed should be set to
ETH_SPEED_NUM_NONE.
Otherwise since link speed is non-zero but link status is zero, this
is an inconsistent situation and -EAGAIN is returned, which is not right.

Fixes: 1884087198 ("net/mlx5: fix support for newer link speeds")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-08-06 17:42:12 +02:00
Viacheslav Ovsiienko
f32a3f5216 net/mlx5: fix completion queue overflow for large burst
There is the limit on completion descriptor fetch to improve
latency. If burst size is large there might be not enough
resources freed in completion processing. This fix reiterates
sending loop and allows multiple completion descriptor fetch
and processing.

Fixes: 18a1c20044 ("net/mlx5: implement Tx burst template")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-08-06 17:42:12 +02:00
Viacheslav Ovsiienko
3502b05925 net/mlx5: fix packet size inline settings
This patch fixes the default settings for packet size to inline
with Enhanced Multi-Packet Write feature, allowing 256B packets
to be inlined with Out-Of-the-Box settings.

Fixes: 50724e1bba ("net/mlx5: update Tx definitions")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-08-06 17:42:12 +02:00
Viacheslav Ovsiienko
c6f0485646 net/mlx5: fix inline data settings
If the minimal inline data are required the data inline feature
must be engaged. There were the incorrect settings enabling the
entire small packet inline (in size up to 82B) which may result
in sending rate declining if there is no enough cores. The same
problem was raised if inline was enabled to support VLAN tag
insertion by software.

Fixes: 38b4b397a5 ("net/mlx5: add Tx configuration and setup")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-08-06 17:42:12 +02:00
Viacheslav Ovsiienko
da1df1ccab net/mlx5: fix completion queue drain loop
The completion loop speed optimizations for error-free
operations are done - no CQE field fetch on each loop
iteration. Also, code size is oprimized - the flush
buffers routine is invoked once.

Fixes: 318ea4cfa1 ("net/mlx5: fix Tx completion descriptors fetching loop")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-08-06 17:42:12 +02:00
Viacheslav Ovsiienko
7014ef5bba net/mlx5: fix inline data length assert
The debug assert wrongly triggers on the inline data 18B,
this should be passed successfully.

Fixes: 18a1c20044 ("net/mlx5: implement Tx burst template")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-08-06 17:42:12 +02:00
Viacheslav Ovsiienko
614de6c898 net/mlx5: fix default minimal data inline
The patch [Fixes] sets the default value of required minimal
inline data to 0 bytes. On some configurations (depends
on switchdev/legacy settings and FW version/settings)
the ConnectX-4LX NIC requires minimal 18 bytes of
Tx descriptor inline data to operate correctly.

Wrongly set to 0 default value may prevent NIC from operating
with out-of-the-box settings, this patch reverts default
value for ConnectX-4LX back to 18 bytes (inline L2).

Fixes: 9f350504bb ("net/mlx5: fix ConnectX-4LX minimal inline data limit")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-08-06 17:42:12 +02:00
Xiaoyu Min
b12c7b2368 net/mlx5: fix VLAN inner type matching on DR/DV
The rte_flow_item_vlan has the inner_type, which is missing on
DR/DV flow engine.

By adding this support, the example testpmd commands could be:

 - matching all vlan traffic with id 2:

 testpmd> flow create 0 ingress pattern eth / vlan vid is 2 / end
          actions queue index 2 / end

 - matching all ipv4 traffic in vlan with id 2:

 testpmd> flow create 0 ingress pattern eth / vlan vid is 2
          inner_type is 0x0800 / end actions queue index 2 / end

Fixes: fc2c498ccb ("net/mlx5: add Direct Verbs translate items")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-08-06 17:42:12 +02:00
Dekel Peled
9b08de133e net/mlx5: fix flow rule configuration
Some flow rules were not configured.

Part of the code in function flow_dv_matcher_enable() is enclosed in
'#ifdef HAVE_MLX5DV_DR' preprocessor directive.
Using this directive is not needed here, and prevents compilation of
relevant code.

This patch removes the unnecessary preprocessor directive.

Fixes: 4f84a19779 ("net/mlx5: add Direct Rules API")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-08-06 17:42:12 +02:00
Dekel Peled
a3970d31e6 net/mlx5: fix validation of VLAN PCP item
Function mlx5_flow_validate_item_vlan() validates the user setting
is supported by NIC, using a mask with TCI mask 0x0fff.
This check will reject a flow rule specifying a vlan pcp item.

This patch updates mlx5_flow_validate_item_vlan() to use mask 0xffff,
so flow rules with vlan pcp item are accepted.

Fixes: 23c1d42c71 ("net/mlx5: split flow validation to dedicated function")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-08-06 17:42:12 +02:00
Stephen Hemminger
164cad78b0 net/mlx4: fix crash on info query in secondary process
mlx4_dev_info_get calls mlx4_get_ifname, but mlx4_get_ifname
uses priv->ctx which is not a valid pointer in a secondary
process. The fix is to cache the value in primary.

In the primary process, get and store the interface index of
the device so that secondary process can see it.

Bugzilla ID: 320
Fixes: 61cbdd4194 ("net/mlx4: separate device control functions")
Cc: stable@dpdk.org

Reported-by: Suyang Ju <sju@paloaltonetworks.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-08-06 17:42:12 +02:00
David Christensen
20215627cd net/mlx5: fix Tx inline minimum for ConnectX-5
The function mlx5_set_min_inline() includes a switch() that checks
various PCI device IDs in order to set the txq_inline_min value.  No
value is set when the PCI device ID matches the ConnectX-5 adapters,
resulting in an assert() failure later in the function
mlx5_set_txlimit_params().

This error was encountered on an IBM Power 9 system running RHEL 7.6
w/o Mellanox OFED installed.

Fixes: 38b4b397a5 ("net/mlx5: add Tx configuration and setup")

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-08-06 17:42:12 +02:00
Dekel Peled
b857ed01ca net/mlx5: fix limit of direct rules tables number
MLX5 PMD limits the number of SW steering tables to 32.
This patch updates the limit to 65535, to allow wide range of values.

Fixes: e2b4925ef7 ("net/mlx5: support Direct Rules E-Switch")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-08-06 17:42:12 +02:00
Viacheslav Ovsiienko
dfedf3e3f9 net/mlx5: add workaround for VLAN in virtual machine
On some virtual setups (particularly on ESXi) when we have SR-IOV and
E-Switch enabled there is the problem to receive VLAN traffic on VF
interfaces. The NIC driver in ESXi hypervisor does not setup E-Switch
vport setting correctly and VLAN traffic targeted to VF is dropped.

The patch provides the temporary workaround - if the rule
containing the VLAN pattern is being installed for VF the VLAN
network interface over VF is created, like the command does:

  ip link add link vf.if name mlx5.wa.1.100 type vlan id 100

The PMD in DPDK maintains the database of created VLAN interfaces
for each existing VF and requested VLAN tags. When all of the RTE
Flows using the given VLAN tag are removed the created VLAN interface
with this VLAN tag is deleted.

The name of created VLAN interface follows the format:

  evmlx.d1.d2, where d1 is VF interface ifindex, d2 - VLAN ifindex

Implementation limitations:

- mask in rules is ignored, rule must specify VLAN tags exactly,
  no wildcards (which are implemented by the masks) are allowed

- virtual environment is detected via rte_hypervisor() call,
  and the type of hypervisor is checked. Currently we engage
  the workaround for ESXi and unrecognized hypervisors (which
  always happen on platforms other than x86 - it means workaround
  applied for the Flow over PCI VF). There are no confirmed data
  the other hypervisors (HyperV, Qemu) need this workaround,
  we are trying to reduce the list of configurations on those
  workaround should be applied.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-08-06 17:42:12 +02:00
Xiao Zhang
1c38061e79 net/fm10k: fix address of first segment
This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343416
Fixes: fe65e1e1ce ("fm10k: add vector scatter Rx")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-08-06 13:30:53 +02:00
Xiao Zhang
ba38f91468 net/iavf: fix address of first segment
This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343447
Fixes: 319c421f38 ("net/avf: enable SSE Rx Tx")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-08-06 13:30:42 +02:00
Xiao Zhang
4916f63985 net/i40e: fix address of first segment
This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343422, 343403
Fixes: ca74903b75 ("net/i40e: extract non-x86 specific code from vector driver")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-08-06 13:30:10 +02:00
Xiao Zhang
91342addd1 net/ice: fix address of first segment
This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343452, 343407
Fixes: c68a52b8b3 ("net/ice: support vector SSE in Rx")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-08-06 13:29:25 +02:00
Xiao Zhang
739c35f08b net/ixgbe: fix address of first segment
This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 13245
Fixes: 8a44c15aa5 ("net/ixgbe: extract non-x86 specific code from vector driver")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-08-06 13:28:47 +02:00
Xiaolong Ye
4782c785f8 net/ice: fix null pointer dereferences for tunnels
This patch fixes two null pointer dereferences in flow code detected by
coverity scan.

Coverity issue: 345815, 345816
Fixes: 94f00800d7 ("net/ice: fix VXLAN/NVGRE flow matching")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-08-06 13:09:04 +02:00
Xiao Zhang
08141dc7e1 net/e1000: fix PCI config read check
Add return value checking when reading configure information from PCI
register to avoid Coverity issue.

Fixes: 1fc97012 ("net/e1000: fix i219 hang on reset/close")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-08-06 13:07:54 +02:00
Xiaolong Ye
aae5d9a6e2 net/ice: remove unused parameter tag
Given the fact that dev parameter is used in ice_dev_configure.

Fixes: 50370662b7 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-08-06 13:06:54 +02:00
Phil Yang
9467deff9d net/memif: fix multi-process Tx
When working as a secondary process, it uses eth_memif_rx in PMD egress.
It should be eth_memif_tx.

Fixes: c41a04958b ("net/memif: support multi-process")

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
2019-08-06 11:26:52 +02:00
Jakub Grajciar
10bd0ad512 net/memif: fix error paths
Coverity issue: 343440, 343459, 343464, 343394
Fixes: 09c7e63a71 ("net/memif: introduce memory interface PMD")

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-08-06 10:40:54 +02:00
Xiaoyun Li
78eef20796 raw/ntb: fix null pointer dereference
This patch fixes null pointer dereference issues found by coverity scan.

Coverity issue: 344981, 344991, 345000, 345002, 345006, 345024
Fixes: 2773100279 ("raw/ntb: introduce NTB raw device driver")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-08-06 09:57:18 +02:00
Kalesh AP
aa2c00702b net/bnxt: fix traffic stall on Rx queue stop/start
Fixed a check in bnxt_alloc_hwrm_rx_ring() while initializing
the rx ring.

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

Fixes: 9b63c6fd70 ("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>
2019-08-05 23:33:12 +02:00
Vamsi Attunuru
195981133a common/octeontx2: fix mbox memory access
Octeontx2 PMD's mailbox client uses device memory to send messages
to mailbox server in the admin function Linux kernel driver.
The device memory used for the mailbox communication needs to
be qualified as volatile memory type to avoid unaligned device
memory accesses because of compiler's memory access coalescing.

This patch modifies the mailbox request and responses as volatile
type which were non-volatile earlier and accessed from unaligned
memory addresses which resulted in bus errors on Fedora 30 with
gcc 9.1.1.

Fixes: 2b71657c86 ("common/octeontx2: add mbox request and response definition")

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-08-05 23:18:27 +02:00
Liron Himi
696202ca53 net/mvpp2: remove resources when port is closed
Since 18.11, it is suggested that driver should release all its private
resources at the dev_close routine. So all resources previously released
in remove routine are now released at the dev_close routine, and the
dev_close routine will be called in driver remove routine in order to
support removing a device without closing its ports.

Above behavior changes are supported by setting RTE_ETH_DEV_CLOSE_REMOVE
flag during probe stage.

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Yuri Chipchev <yuric@marvell.com>
2019-08-05 19:26:32 +02:00
Amit Gupta
230dce6461 net/thunderx: fix crash on detach
Fix the PCIe detach segfault by releasing eth_dev resources
by adding nicvf cleanup support on PCI detach.

Fixes: fdf91e0f2f ("drivers/net: do not use ethdev driver")
Cc: stable@dpdk.org

Signed-off-by: Amit Gupta <agupta3@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-08-05 19:03:01 +02:00
Harman Kalra
e359e3b796 drivers/octeontx2: fix Coverity warnings
Addressed issues reported by coverity: NULL pointer dereferencing
issues, unchecked return value, uinitialized scalar value,
probable deadcode cases, unintended sign extension, bad bit
shift operation, Wrong sizeof argument (SIZEOF_MISMATCH)

Coverity issue: 343396, 345028, 344977, 345015, 345025, 344969
Coverity issue: 345014, 344966, 343437, 344993, 345007, 344988
Coverity issue: 343405, 344999, 345003

Fixes: 58f6f93c34 ("net/octeontx2: add module EEPROM dump")
Fixes: 38f566280a ("net/octeontx2: add link stats operations")
Fixes: b5dc314044 ("net/octeontx2: support base PTP")
Fixes: ba1b3b081e ("net/octeontx2: support VLAN offloads")
Fixes: 092b383418 ("net/octeontx2: add flow init and fini")
Fixes: 3da1b85b6d ("common/octeontx2: add FLR IRQ handler")
Fixes: 2548ab774f ("mempool/octeontx2: add context dump support")
Fixes: 2b71657c86 ("common/octeontx2: add mbox request and response definition")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-08-05 18:42:19 +02:00
Nithin Dabilpuram
8d0715f054 net/octeontx2: support 96xx A1 silicon revision
Update workaround changes for erratas that are fixed on 96xx A1.
This patch also enables cq drop for all the passes for
maintaining performance along with updating a default
Rx ring size in dev_info.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-08-05 18:36:25 +02:00
Vamsi Attunuru
4d6816814a net/octeontx2: fix optimal default SQE buffer count
Patch extends minimum supported max_sqb_count devarg value
such that it can limit the max sqb count to 8 buffers and
also defines NIX_DEF_SQB and uses it to compute the number
of sqe buffers required for the egress traffic.

NIX_DEF_SQB is defined as 16 which is optimal across multiple
octeontx2 platforms to scale up the performance proportional
to the corresponding port/queue to lcore mappings.

Fixes: fb0198b7dc ("net/octeontx2: add devargs parsing functions")

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-08-05 18:22:34 +02:00
Jerin Jacob
01b3da69ef common/octeontx2: update ready message response
The kernel mbox server driver(AF) updated the ready
message response. Sync with AF driver.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
2019-08-05 18:11:51 +02:00
Jerin Jacob
f55974c401 net/octeontx2: drop Rx and L2 error packets
From B0 HW revision onwards, HW can drop the Rx and L2 error packets.
Enable this by default if the feature is available.
Since this bit field is used as reserved in old HW revisions,
No need to have additional HW version check.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-08-05 17:52:39 +02:00
Maciej Bielski
40e7c02155 net/ena: fix L4 checksum Tx offload
During an if-condition evaluation, a 2-bit flag evaluates to 'true' for
'0x1', '0x2' and '0x3'. Thus, from this perspective these flags are
indistinguishable. To make them distinct, respective bits must be
extracted with a mask and then checked for strict equality.

Specifically here, even if `PKT_TX_UDP_CKSUM` (value '0x3') was set, the
expression `mbuf->ol_flags & PKT_TX_TCP` (the second flag of value
'0x1') is evaluated first and the result is 'true'. In consequence, for
UDP packets the execution flow enters an incorrect branch.

Fixes: 56b8b9b7e5 ("net/ena: convert to new Tx offloads API")
Cc: stable@dpdk.org

Reported-by: Eduard Serra <eserra@vmware.com>
Signed-off-by: Maciej Bielski <mba@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
2019-08-05 19:42:02 +02:00
Hemant Agrawal
c1ada9b63b net/virtio: fix build with 0 headroom
When using RTE_PKTMBUF_HEADROOM as 0, virito ethdev driver throws
compilation error
virtio_ethdev.c:1851:2: note: in expansion of macro ‘RTE_BUILD_BUG_ON’
RTE_BUILD_BUG_ON(RTE_PKTMBUF_HEADROOM
	< sizeof(struct virtio_net_hdr_mrg_rxbuf));

This patch change it into run-time check.

Bugzilla ID: 335
Fixes: dec08c28c0 ("virtio: check packet headroom at compile time")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-08-05 19:26:49 +02:00
Hemant Agrawal
f4435e380d bus/fslmc: fix build with 0 headroom
When using RTE_PKTMBUF_HEADROOM as 0, dpaa driver throws compilation error
error "Annotation requirement is more than RTE_PKTMBUF_HEADROOM"

This patch change it into run-time check.

Bugzilla ID: 335
Fixes: beb2a7865d ("bus/fslmc: define hardware annotation area size")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-08-05 19:24:27 +02:00
Hemant Agrawal
47854c1803 net/dpaa: fix build with 0 headroom
When using RTE_PKTMBUF_HEADROOM as 0, dpaa driver throws compilation error
error "Annotation requirement is more than RTE_PKTMBUF_HEADROOM"

This patch change it into run-time check.

Bugzilla ID: 335
Fixes: ff9e112d78 ("net/dpaa: add NXP DPAA PMD driver skeleton")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-08-05 19:24:17 +02:00
Stephen Hemminger
6f3f0acd95 remove extra blank lines at end of files
There should not be blank lines at end of files.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-08-05 15:19:32 +02:00
David Marchand
66d3724b2c bus/pci: always check IOMMU capabilities
IOMMU capabilities won't change and must be checked even if no PCI device
seem to be supported yet when EAL initialised.

This is to accommodate with SPDK that registers its drivers after
rte_eal_init(), especially on PPC platform where the IOMMU does not
support VA.

Fixes: 703458e19c ("bus/pci: consider only usable devices for IOVA mode")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Takeshi Yoshimura <tyos@jp.ibm.com>
2019-08-05 12:08:15 +02:00
David Marchand
b62f3aff91 bus/pci: remove unused x86 Linux constant
This macro is unused after a previous fix.

Fixes: fe822eb8c5 ("bus/pci: use IOVA DMA mask check when setting IOVA mode")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-08-05 12:02:20 +02:00
Kalesh AP
1868b17b57 net/bnxt: set checksum flags in vector Rx
Fixed to return the checksum status of rx packets by setting
"ol_flags" correctly in vector mode receive.

These changes have been there for non vector mode receive.
In vector mode receive also indicate inner and outer checksum
errors individually in "ol_flag" to indicate L3 and L4 error.

Fixes: bc4a000f2f ("net/bnxt: implement SSE vector mode")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-30 19:39:39 +02:00
Kalesh AP
02cc2b439e net/bnxt: fix context memory allocation
There is a bug in context memory allocation because of which
it results in reusing the context memory allocated for the first
port while allocating memory for next ports.

Fix it by passing the port id in the name field while
allocating context memory.

Fixes: f8168ca0e6 ("net/bnxt: support thor controller")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-30 19:39:39 +02:00
Jerin Jacob
198cce7110 net/virtio: fix build
Add extern to variable declaration to avoid some compiler treating it
as variable definition.

build error log:

lib/librte_pmd_virtio.a(vhost_kernel.o):(.rodata+0x110):
multiple definition of `vhost_msg_strings'
lib/librte_pmd_virtio.a(vhost_user.o):(.data.rel.ro.local+0x0):
first defined here
lib/librte_pmd_virtio.a(virtio_user_dev.o):(.rodata+0xe8):
multiple definition of `vhost_msg_strings'
lib/librte_pmd_virtio.a(vhost_user.o):(.data.rel.ro.local+0x0):
first defined here

Fixes: 33d24d65fe ("net/virtio-user: abstract backend operations")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-07-30 19:46:11 +02:00
Bruce Richardson
54dcfdee85 drivers/raw: standardize naming
The driver names for rawdevs were both different in make and meson builds
and were non-standard in the make version in that some included "rawdev" in
the name while others didn't.

Therefore, for global consistency of naming, we can use "rte_rawdev" rather
than "rte_pmd" for the prefix for the libraries. While most other driver
categories use "rte_pmd" as a prefix, there is precedent for this in the
mempool drivers use "rte_mempool" as a prefix.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-07-30 15:36:35 +02:00
Bruce Richardson
473c88f9b3 drivers/raw: remove rawdev from directory names
The ifpga and skeleton rawdev drivers included "rawdev" in their directory
names, which was superfluous given that they were in the drivers/raw
directory. Shorten the names via this patch.

For meson builds, this will rename the final library .so/.a files
produced, but those will be renamed again later via a patch to
standardize rawdev names.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2019-07-30 15:20:41 +02:00
Jerin Jacob
5077d88879 common/octeontx2: prevent STP instruction fissure
OTX2 AP core can sometimes fissure STP instructions when it is more
optimal to send such writes into the pipeline as 2 separate
instructions. However registers should be excluded from such
optimization. This commit ensures that no CSR write is ever fissured
by introducing zero cost workaround by setting STP pre-index by zero to
make sure OTX2 AP core prevent fissure.

Fixes: 8a4f835971 ("common/octeontx2: add IO handling APIs")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-29 22:18:41 +02:00
Harman Kalra
9f741506f8 drivers/octeontx2: fix recursive interrupts
In case of QINT interrupt occurrence, SW fails to clear the QINT
line resulting in recursive interrupts because currently interrupt
handler gets the cause of the interrupt by reading
NIX_LF_RQ[SQ/CQ/AURA/POOL]_OP_INT but does not write 1 to clear
RQ[SQ/CQ/ERR]_INT field in respective NIX_LF_RQ[SQ/CQ/AURA/POOL]_OP_INT
registers.

Fixes: dc47ba15f6 ("net/octeontx2: handle queue specific error interrupts")
Fixes: 50b95c3ea7 ("mempool/octeontx2: add NPA IRQ handler")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-29 22:18:01 +02:00
Pavan Nikhilesh
ef9f8bb6d5 event/octeontx2: fix null dereference
Fix NULL dereference after rte_realloc and add extra NULL checks.
Fix few memory leak with kvargs.

Coverity issue: 345023, 345022, 345009, 345011, 345026, 344997, 344990
Fixes: ffa4ec0b60 ("event/octeontx2: allow adapters to resize inflight buffers")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-07-29 22:17:29 +02:00
Viacheslav Ovsiienko
5a93e173b8 net/mlx5: fix Tx completion request generation
The packets transmitting in mlx5 is performed by building
Tx descriptors (WQEs) and sending last ones to the NIC.
The descriptor can contain the special flags, telling the NIC
to generate Tx completion notification (CQEs). At the beginning
of tx_burst() routine PMD checks whether there are some Tx
completions and frees the transmitted packet buffers.

The flags to request completion generation must be set once
per specified amount of packets to provide uniform stream
of completions and freeing the Tx queue in uniform fashion.
The previous implementation sets the completion request
generation once per burst, if burst size if big enough it may
latency in CQE generation and freeing large amount of buffers
in tx_burst routine on multiple completions which also
affects the latency and even causes the Tx queue overflow
and Tx drops.

This patches enforces the completion request will be set
in the exact Tx descriptor if specified amount of packets
is already sent.

Fixes: 18a1c20044 ("net/mlx5: implement Tx burst template")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-07-29 18:05:10 +02:00
Viacheslav Ovsiienko
9f350504bb net/mlx5: fix ConnectX-4LX minimal inline data limit
Mellanox ConnectX-4LX NIC in configurations with disabled
E-Switch can operate without minimal required inline data
into Tx descriptor. There was the hardcoded limit set to
18B in PMD, fixed to be no limit (0B).

Fixes: 38b4b397a5 ("net/mlx5: add Tx configuration and setup")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-07-29 18:05:10 +02:00
Viacheslav Ovsiienko
318ea4cfa1 net/mlx5: fix Tx completion descriptors fetching loop
This patch limits the amount of fetched and processed
completion descriptors in one tx_burst routine call.

The completion processing involves the buffer freeing
which may be time consuming and introduce the significant
latency, so limiting the amount of processed completions
mitigates the latency issue.

Fixes: 18a1c20044 ("net/mlx5: implement Tx burst template")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-07-29 18:05:10 +02:00
Matan Azrad
17ed314c6c net/mlx5: allow LRO per Rx queue
Enabling LRO offload per queue makes sense because the user will
probably want to allocate different mempool for LRO queues - the LRO
mempool mbuf size may be bigger than non LRO mempool.

Change the LRO offload to be per queue instead of per port.

If one of the queues is with LRO enabled, all the queues will be
configured via DevX.

If RSS flows direct TCP packets to queues with different LRO enabling,
these flows will not be offloaded with LRO.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-29 16:54:27 +02:00
Matan Azrad
5158260917 net/mlx5: allow implicit LRO flow
When a user configures LRO in the port offloads, he probably wants each
TCP packet will have a chance to open an LRO session.

The PMD wasn't configure LRO in the flow TIR if the flow is not
explicitly configured TCP item despite the flow included TCP traffic.

For example, the next flows were not LRO offloaded:
pattern eth / end, pattern eth / ip / end, pattern eth / ipv6 / end.

Enable LRO configuration for all the TIRs if LRO is configured in the
port.

No performance impact for non-LRO traffic in these TIRs.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-29 16:54:27 +02:00
Matan Azrad
2579543f60 net/mlx5: handle LRO packets in regular Rx queue
When LRO offload is configured in Rx queue, the HW may coalesce TCP
packets from same TCP connection into single packet.

In this case the SW should fix the relevant packet headers because
the HW doesn't update them according to the new created packet
characteristics but provides the update values in the CQE.

Add update header code to the regular Rx burst function to support LRO
feature.

Make sure the first mbuf has enough space to include each TCP header,
otherwise the header update may cross mbufs what complicates the
operation too match.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-29 16:54:27 +02:00
Matan Azrad
18a68e046b net/mlx5: fix DevX Rx queue memory alignment
The alignment requested by the FW for WQ buffer allocation is 512.

Change it from cache line alignment to 512.

Fixes: dc9ceff73c ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-29 16:54:27 +02:00
Matan Azrad
bd41389e35 net/mlx5: allow LRO in regular Rx queue
LRO support was only for MPRQ, hence mprq Rx burst was selected when
LRO was configured in the port.

The current support for MPRQ is suffering from bad memory utilization
since an external mempool is allocated by the PMD for the packets data
in addition to the user mempool, besides that, the user may get packet
data addresses which were not configured by him.

Even though MPRQ has the best performance for packet receiving in the
most cases and because of the above facts it is better to remove the
automatic MPRQ select when LRO is configured.

Move MPRQ to be selected only when the user force it by the PMD
arguments including LRO case.

Allow LRO offload using the regular RQ with the regular Rx burst
function.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-29 16:54:27 +02:00
Matan Azrad
1a241e5579 net/mlx5: fix DevX Rx queue type
When the Rx queue is not in striding RQ mode it should be configured as
cyclic RQ.

In this case the type remains 0 which means linked-list type.

Set the RQ type to be cyclic when the queue is not in striding RQ mode.

Fixes: dc9ceff73c ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-29 16:54:27 +02:00
Matan Azrad
b7d1e5d4d1 net/mlx5: fix DevX scattered Rx queue size
The WQ size configuration via DevX didn't take into account the maximum
number of segments per packet what wrongly caused to configure bigger
WQE size than the size expected by the PMD in other places.

The scatter mode stride size should be the size of segment multiplied
by the number of maximum segments per packet.
The number of WQEs per WQ should be the number of descriptors divided by
the number of the maximum segments per packet.

Fix the size calculations to the above rule.

Fixes: dc9ceff73c ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-29 16:54:27 +02:00
Matan Azrad
be39124e5b net/mlx5: support mbuf headroom for LRO packet
Patch [1] zeroes the mbuf headroom when the port is configured with LRO
because when working with more than one stride per packet the HW cannot
guaranty an headroom in the start stride of each packet.

Change the solution to support mbuf headroom by adding an empty buffer
as the first packet segment, scatter mode must be enabled to support it.

[1] http://patches.dpdk.org/patch/56912/

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-29 16:54:27 +02:00
Matan Azrad
d64e1e28eb net/mlx5: remove redundant offload flag reset
When mbuf is allocated by rte_pktmbuf_alloc the offload flag is reset by
it, so data-path function should not do it again.

Remove the above offload flag reset from MPRQ data-path.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-29 16:54:27 +02:00
Matan Azrad
50c00baff7 net/mlx5: limit LRO size to maximum Rx packet
The field max_rx_pkt_len in Rx configuration indicates the maximum size
for Rx packet to be received.

There was no any field to indicate the maximum size of LRO packet to be
received by the application.

Assuming the user configures max_rx_pkt_len as the maximum LRO packet
length when LRO is configured on the port, the PMD limits the maximum
LRO packet size received from HW to be max_rx_pkt_len.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-29 16:54:27 +02:00
Matan Azrad
721c953018 net/mlx5: fix Rx scatter mode validation
If the mbuf size of the Rx mempool supplied by the user in the Rx setup
is unable to contain the maximum Rx packet length in addition to the
mbuf head-room, the Rx scatter offload must be configured. Otherwise,
there is not enough space in single mbuf to contain a packet with size
of the maximum Rx packet length.

The PMD did not return an error in the above mentioned case.

Return an error in the above case.

Fixes: 7d6bf6b866 ("net/mlx5: add Multi-Packet Rx support")
Fixes: edad38fcd0 ("net/mlx: enhance Rx scatter mode detection")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-29 16:54:27 +02:00
Ying A Wang
80918477ee net/ice: fix LLDP forward
The patch fix the issue that LLDP packet can't be forwarded to host.

Fixes: 59d151de66 ("net/ice: stop LLDP by default")
Cc: stable@dpdk.org

Signed-off-by: Ying A Wang <ying.a.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-07-29 15:52:22 +02:00
Xiaolong Ye
0a665e3917 net/vmxnet3: replace license text with SPDX tag
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-07-29 13:31:45 +02:00
Xiaolong Ye
bb4a49fa4b net/e1000: replace license text with SPDX tag
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-07-29 13:31:45 +02:00
Xiaolong Ye
32c65bcdec net/i40e: replace license text with SPDX tag
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-07-29 13:31:45 +02:00
Xiaolong Ye
98785b0c08 net/ixgbe: replace license text with SPDX tag
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-07-29 13:31:45 +02:00
John Daley
1480787d08 net/enic: restore default log level to info
Prior to the fix, RTE_LOGTYPE_INFO messages were displayed by default.
After the fix, only NOTICE level and higher were displayed by default
and INFO level were not. There are INFO level vNIC config related
messages which customers and tech support currently depend on for
debugging and so on and to suddenly hide these messages is not a good
idea.

This patch changes the default log level to RTE_LOG_INFO for enic so
messages are printed as before the fix.

Fixes: bbd8ecc054 ("net/enic: remove PMD log type references")

Signed-off-by: John Daley <johndale@cisco.com>
2019-07-29 13:01:01 +02:00
Kiran Kumar K
e0e5d23b3c net/octeontx2: support GRE key parsing
Adding support to parse GRE KEY for octeontx2 Flow.
Matching on GRE Key will only work, if checksum and routing
bits in the GRE header are equal to 0.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-29 12:24:49 +02:00
Harman Kalra
122135e73c net/octeontx2: support read clock
This patch implements read clock api whose purpose is to return
raw clock ticks. Using this API real time ticks spent in
processing a packet can be known:
    <read_clock val at any time> - mbuf->timestamp

Calling mbox for reading raw clock ticks in fastpath is very
expensive so its value is derived from time stamp counter(tsc)
using freq multiplier (ratio of raw clock ticks and tsc) and clock
delta (by how much tsc is lagging from raw clock value).

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-29 12:24:39 +02:00
Harman Kalra
bd992b2adc net/octeontx2: fix PTP performance
A huge drop in per core MPPS value was observed when PTP stack is
enabled. The reason behind the bottleneck is HW serialises the
transfer of all SQEs, which seeks timestamp capture, on the same
send DMA path. Hence only those packets which requires timestamp
capture should set SETTSTAMP in send mem alg.
With this patch timestamping would be done only for those packets
with PKT_TX_IEEE1588_TMST set.

Fixes: fb3ae0951a ("net/octeontx2: support Tx")
Fixes: 8980a15300 ("event/octeontx2: support PTP for SSO")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-29 12:23:22 +02:00
Harman Kalra
ee1e81266e net/octeontx2: fix PTP enable via Rx offload flags
Earlier implementation for enabling ptp via RX offload flag was
causing segmentation fault as it was getting executed in the
device configuration stage where RX and TX queues were not
configured. As in the ptp enable process rx queues are used for
mbuf setup while tx queues are used for send descriptor setup.
Moving the logic in dev start as all the resources will be
configured.

Fixes: b5dc314044 ("net/octeontx2: support base PTP")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-29 12:23:22 +02:00
Sunil Kumar Kori
a61a361ac1 net/octeontx2: fix indirect mbuf handling during Tx
Multi segmented packet may be spliced with indirect mbufs also.
Currently driver causes buffer leak for indirect mbufs as they
were not being freed to packet pool.

Patch fixes handling of indirect mbufs for following use cases
- packet contains all indirect mbufs only.
- packet contains mixed mbufs i.e. direct and indirect both.

Fixes: cbd5710db4 ("net/octeontx2: add Tx multi segment version")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-29 12:23:22 +02:00
David Marchand
9151787924 net/vhost: do not count unsent packets as errors
missed_pkts reflects the number of packets that the driver did not manage
to send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.

Fixes: 5f05e95cd5 ("net/vhost: fix Tx error counting")
Fixes: ee584e9710 ("vhost: add driver on top of the library")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
2019-07-26 15:27:05 +02:00
David Marchand
17c652c222 net/ring: do not count unsent packets as errors
err_pkts reflects the number of packets that the driver did not manage
to send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.

Fixes: e1e4017751 ("ring: add new driver")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-26 15:27:05 +02:00
David Marchand
2e56e7885d net/memif: do not count unsent packets as errors
n_err reflects the number of packets that the driver did not manage to
send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.

Fixes: 09c7e63a71 ("net/memif: introduce memory interface PMD")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-26 15:27:05 +02:00
David Marchand
9f0d4c6ba8 net/kni: do not count unsent packets as errors
err_pkts reflects the number of packets that the driver did not manage to
send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.

Fixes: 75e2bc54c0 ("net/kni: add KNI PMD")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-26 15:27:05 +02:00
David Marchand
921bd50fa2 net/kni: remove unused Rx error counter
The delta between what the application asked to receive and what was
indeed received, can not be called an error counter.
This counter is not reported anywhere, remove it.

Fixes: 75e2bc54c0 ("net/kni: add KNI PMD")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-26 15:27:05 +02:00
David Marchand
3f72f60714 net/virtio: remove unused Tx error counter
This Tx counter has never been used.

Fixes: 9658d17da2 ("virtio: maintain stats per queue")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
2019-07-26 15:27:05 +02:00
David Marchand
9b6076a6e4 net/null: remove unused Tx error counter
This Tx counter has never been used.

Fixes: c743e50c47 ("null: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-26 15:27:05 +02:00
David Marchand
6c54c874d5 net/af_xdp: remove unused Tx counter
This Tx counter is now unused.

Fixes: 10edf857fd ("net/af_xdp: make reserve/submit peek/release consistent")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-07-26 15:27:05 +02:00
David Marchand
4b6f5d3dcd net/af_packet: remove unused Rx counter
This Rx counter has never been used.

Fixes: 364e08f2bb ("af_packet: add PMD for AF_PACKET-based virtual devices")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-26 15:27:05 +02:00
Wei Zhao
fb3a93f9fe net/ixgbe: fix RETA size for VF
Filling correct RETA table size at ixgbevf_dev_info_get,
so RETA table update will be supported for VF port.
For X540_vf and 82599_vf, since they don't support
RETA table update, set RETA size to 0.

Fixes: 2144f6630f ("ixgbe: add redirection table size in device info")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-07-26 13:24:32 +02:00
Mesut Ali Ergin
3d6666ac97 net/i40e: fix double flow mark action check
This commit fixes an issue with the error checking in flow
MARK action. Previously, (ANY + MARK) would fail, as the
(mark_spec == 0) condition would cause an early error return,
however really it is (mark_spec != 0) that should cause the
early error return.

Flipping the binary comparison corrects the behaviour, and
(ANY + MARK) now succeeds, while (MARK + MARK) fails.

Fixes: 0bbcfc706a ("net/i40e: support MARK and RSS flow action")

Suggested-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Mesut Ali Ergin <mesut.a.ergin@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-07-26 13:24:32 +02:00
Qi Zhang
43b29221c1 net/iavf: fix endless loop
Change loop index from uint16_t to uint32_t since max
index 65535 could be exceeded when ring size is 2k+.

Fixes: 69dd4c3d08 ("net/avf: enable queue and device")
Cc: stable@dpdk.org

Reported-by: Lei Yao <lei.a.yao@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-07-26 13:24:32 +02:00
David Marchand
fbbbf553f2 net/pcap: fix concurrent multiseg Tx
Two cores can send multi segment packets on two different pcap ports.
Because of this, we can't have one single buffer to linearize packets.

Use rte_pktmbuf_read() to copy the packet into a buffer on the stack
and remove eth_pcap_gather_data() when necessary (if the mbuf is
contiguous, rte_pktmbuf_read() just points at the buffer address).

Fixes: 6db141c91e ("pcap: support jumbo frames")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-26 00:32:18 +02:00
David Marchand
9be0b6bde3 net/pcap: fix Tx return count in error conditions
When a packet cannot be transmitted, the driver is supposed to free this
packet and report it as handled.
This is to prevent the application from retrying to send the same packet
and ending up in a liveloop since the driver will never manage to send
it.

Fixes: 49a0a2ffd5 ("net/pcap: fix possible mbuf double freeing")
Fixes: 6db141c91e ("pcap: support jumbo frames")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-26 00:32:18 +02:00
David Marchand
6653d812c6 net/pcap: fix Rx with small buffers
If the pkt pool contains only buffers smaller than the default headroom,
then the driver will compute an invalid buffer size (negative value cast
to an uint16_t).
Rely on the mbuf api to check how much space is available in the mbuf.

Fixes: 6eb0ae218a ("pcap: fix mbuf allocation")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-26 00:32:18 +02:00
Kalesh AP
6a0276241d net/bnxt: reduce verbosity of a message
Change verbosity of a message to DEBUG from ERROR.
This is just debug message.

Fixes: 3e92fd4e4e ("net/bnxt: use dynamic log type")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-25 17:54:57 +02:00
Kalesh AP
ebbc8f27f1 net/bnxt: fix endianness
Use rte_cpu_to_le_16/32 while parsing the hwrm command response.

Fixes: 11e5e19695 ("net/bnxt: support redirecting tunnel packets to VF")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-25 17:54:57 +02:00
Kalesh AP
013c490966 net/bnxt: fix tunnel redirect commands
Modified to send the tunnel redirect commands to Chimp HWRM channel as
Kong does not support these commands.

Fixes: 11e5e19695 ("net/bnxt: support redirecting tunnel packets to VF")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-25 17:54:57 +02:00
Santoshkumar Karanappa Rastapur
b02a39ba3b net/bnxt: fix extended port counter statistics
We were trying to fill in more rx extended stats than the size allocated
for stats causing segfault. Fixed this by adding an explicit check.
Rearranged the code to return statistic values in xstats_get as per the
names returned in xstats_get_names.

Fixes: f55e12f334 ("net/bnxt: support extended port counters")
Cc: stable@dpdk.org

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-25 17:54:57 +02:00
Lance Richardson
bd0a14c99f net/bnxt: use dedicated CPR for async events
This commit enables the creation of a dedicated completion
ring for asynchronous event handling instead of handling these
events on a receive completion ring.

For the stingray platform and other platforms needing tighter
control of resource utilization, we retain the ability to
process async events on a receive completion ring.

For Thor-based adapters, we use a dedicated NQ (notification
queue) ring for async events (async events can't currently
be received on a completion ring due to a firmware limitation).

Rename "def_cp_ring" to "async_cp_ring" to better reflect its
purpose (async event notifications) and to avoid confusion with
VNIC default receive completion rings.

Allow rxq 0 to be stopped when not being used for async events.

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
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>
2019-07-25 11:43:05 +02:00
Andrew Rybchenko
0270853d94 net/sfc: unify power of 2 alignment check macro
Substitute driver-defined IS_P2ALIGNED() with EFX_IS_P2ALIGNED()
defined in libefx.

Add type argument and cast value and alignment to one specified type.

Fixes: e1b9445985 ("net/sfc: build libefx")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-07-24 21:01:11 +02:00
Andrew Rybchenko
827ad8232c net/sfc: fix align to power of 2 when align has smaller type
Substitute driver-defined P2ALIGN() with EFX_P2ALIGN() defined in
libefx.

Cast value and alignment to one specified type to guarantee result
correctness.

Fixes: e1b9445985 ("net/sfc: build libefx")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-07-24 21:01:11 +02:00
Andrew Rybchenko
441717b92c net/sfc: fix power of 2 round up when align has smaller type
Substitute driver-defined P2ROUNDUP() h with EFX_P2ROUNDUP()
defined in libefx.

Cast value and alignment to one specified type to guarantee result
correctness.

Fixes: e1b9445985 ("net/sfc: build libefx")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-07-24 21:01:11 +02:00
Xiaolong Ye
9c04a5df3b net/i40e: replace license text with SPDX tag
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
2019-07-24 21:01:11 +02:00
Xiaolong Ye
41ede22ecf net/e1000: replace license text with SPDX tag
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-07-24 18:44:40 +02:00
Xiaolong Ye
f634105932 net/fm10k: replace license text with SPDX tag
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-07-24 18:44:40 +02:00
Xiaolong Ye
317862a4e4 net/iavf: replace license text with SPDX tag
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-07-24 18:44:40 +02:00
Dekel Peled
fa071809c6 net/mlx5: fix Rx queue release of resources
Function rxq_release_rq_resources() releases resources of RQ object
created by DevX API.

This patch updates this function to properly clear the released
resources, to avoid repeated release of the same resource.

Fixes: dc9ceff73c ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-24 18:05:32 +02:00
Dekel Peled
a88209b04c net/mlx5: fix doorbell release on Rx queue release
Function mlx5_rxq_release() calls mlx5_release_dbr() to release the
doorbell allocated for this Rx queue.
This call is relevant only for Rx queue objects created using
DevX API.

This patch adds the required check, to call mlx5_release_dbr()
only when relevant.
It also updates mlx5_release_dbr() to use the input offset correctly.

Fixes: dc9ceff73c ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-24 18:05:07 +02:00
Ying A Wang
94f00800d7 net/ice: fix VXLAN/NVGRE flow matching
For VXLAN/NVGRE packet, vni/tni should be included in the matching
keys. This patch fixes this issue.

Fixes: d76116a467 ("net/ice: add generic flow API")

Signed-off-by: Ying A Wang <ying.a.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-07-24 17:17:18 +02:00
Haiyue Wang
84dd950a2f net/ice: remove type cast in Rx/Tx ring setup
The memzone's start virtual address pointer (addr) is of type void *,
no need to add type cast.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-07-24 17:16:33 +02:00
Peng Huang
ba277e3720 net/i40e: fix RSS hash update for X722 VF
This patch fixes X722 VF problem when received packet don't have
HASH value.
1) Packet classifier types update should support X722 VF, not only
 for X722 PF;
2) MAC type is invalid for X722 VF when set packet classifier type,
so move it after MAC type is set correctly;

Fixes: a286ebeb07 ("net/i40e: add dynamic mapping of SW flow types to HW pctypes")
Cc: stable@dpdk.org

Signed-off-by: Peng Huang <peng.huang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-07-24 17:16:29 +02:00
Tao Zhu
dbda2092de net/i40e: fix request queue in VF
When the VF configuration is larger than the number of queues reserved
by PF, VF sends the request queue command through admin queue. When PF
received this command, it may reset the VF and send a notification
before resetting. If this notification is read by the timed task alarm,
Task request queue will lost notification. This patch prevents two
tasks from running simultaneously.

Fixes: ee653bd800 ("net/i40e: determine number of queues per VF at run time")
Cc: stable@dpdk.org

Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-07-24 17:16:24 +02:00
Qi Zhang
18af127cad net/ice/base: fix bitmap and/or routines
There was an issue with ice_and_bitmap and ice_or_bitmap when
dealing with bit array sizes that are not even multiples of 32,
where some of relevant bits in the highest 32 bits were being
cleared. This patch fixes those problems.

Fixes: c9e37832c9 ("net/ice/base: rework on bit ops")
Cc: stable@dpdk.org

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2019-07-24 16:00:57 +02:00
Qi Zhang
06210a430c net/ice/base: cleanup hardware register macros
Cleanup hardware registers macros in ice_auto_generator.h.

Fixes: 51c7f09f3f ("net/ice/base: add registers for Intel E800 Series NIC")
Cc: stable@dpdk.org

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2019-07-24 16:00:57 +02:00
Qi Zhang
5c5331775d net/ice/base: use macro instead of function name
use __func__ instead of function name in ice_debug calls.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2019-07-24 16:00:57 +02:00
Qi Zhang
d935fb5bb0 net/ice/base: fix packet type size
Change ptype variable to correctly be 16-bits in ice_prof_map
structure.

Fixes: 51d04e4933 ("net/ice/base: add flexible pipeline module")
Cc: stable@dpdk.org

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2019-07-24 16:00:57 +02:00
Qi Zhang
04221f0b3e net/ice/base: fix resource leak
We don't free s_rule if ice_aq_sw_rules() returns a non-zero status. If
it returned a zero status, s_rule would be freed right after, so this
implies it should be freed within the scope of the function regardless.

Fixes: c7dd159311 ("net/ice/base: add virtual switch code")
Cc: stable@dpdk.org

Signed-off-by: Jeb Cramer <jeb.j.cramer@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2019-07-24 16:00:57 +02:00
Qi Zhang
b83a0c2903 net/ice/base: fix inner TCP and UDP support for GRE
The dummy packets for GRE were set up for IP, but not inner
TCP or UDP. There are some applications that want to be
able to parse on those inner L4 headers so add them to
the dummy packets.

Also, the GRE dummy packet was formatted differently from
the other dummy packets so change the formatting to match
all the other dummy packets.

Fixes: 839c0a4b77 ("net/ice/base: enable additional switch rules")

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2019-07-24 16:00:57 +02:00
Xiao Zhang
1fc9701238 net/e1000: fix i219 hang on reset/close
Unit hang may occur if multiple descriptors are available in the rings
during reset or close. This state can be detected by configure status
by bit 8 in register. If the bit is set and there are pending
descriptors in one of the rings, we must flush them before reset or
close.

Fixes: 805803445a ("e1000: support EM devices (also known as e1000/e1000e)")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-07-24 16:00:57 +02:00
Adam Dybkowski
ff53baa9cc compress/zlib: fix error handling
Add missing return after setting the error status in case of
invalid flush_flag in the operation.
The issue was found by the coverity scan as the fin_flush variable,
not initialized in such case, was used later in the flow.

Coverity issue: 340859
Fixes: c7b436ec95 ("compress/zlib: support burst enqueue/dequeue")
Cc: stable@dpdk.org

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
2019-07-26 14:52:24 +02:00
Bruce Richardson
e53efcb548 raw/ioat: fix include quotes
Some builds with clang report an error because '<>' rather than '""' were
used for including the ioat spec header file.

  Target: x86_64-native-bsdapp-clang
  error: 'rte_ioat_spec.h' file not found with <angled> include; use "quotes" instead
  #include <rte_ioat_spec.h>
           ^~~~~~~~~~~~~~~~~
           "rte_ioat_spec.h"
  1 error generated.

Since this file should always be in the same directory as the main header,
we can safely change the include line to fix this error.

Fixes: abff4333ec ("raw/ioat: create device on probe and destroy on release")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-07-23 20:49:47 +02:00
Dekel Peled
ea81c1b816 net/mlx5: fix NVGRE matching
NVGRE has a GRE header with c_rsvd0_ver value 0x2000 and protocol
value 0x6558.
These should be matched when item_nvgre is provided.

This patch adds validation function of NVGRE item.
It also updates the translate function of NVGRE item, to add the
required values, if they were not specified.

Original work by Xiaoyu Min <jackmin@mellanox.com>

Fixes: fc2c498ccb ("net/mlx5: add Direct Verbs translate items")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
2019-07-23 14:31:36 +02:00
Matan Azrad
ee39fe82ea net/mlx5: adjust maximum LRO message size
LRO message is contained in the MPRQ strides.
While the LRO message size cannot be bigger than 65280 according to the
PRM, the strides which contain it may be bigger than the maximum buffer
size allowed in dpdk mbuf - 0xFFFF.

Adjust the maximum LRO message size to avoid buffer length overflow.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Matan Azrad
a496e09317 net/mlx5: zero LRO mbuf headroom
LRO packet may consume all the stride memory, hence the PMD cannot
guaranty head-room for the LRO mbuf.

The issue is lack in HW support to write the packet in offset from the
stride start.

A new striding RQ feature may be added in CX6 DX to allow head-room and
tail-room for the LRO strides.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Matan Azrad
e4c2a16eb1 net/mlx5: handle LRO packets in Rx queue
When LRO offload is configured in Rx queue, the HW may coalesce TCP
packets from same TCP connection into single packet.

In this case the SW should fix the relevant packet headers because the
HW doesn't update them according to the new created packet
characteristics.

Add update header code to the mprq Rx burst function to support LRO
feature.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Matan Azrad
8b8f7994f1 net/mlx5: update LRO fields in completion entry
Update the CQE structure to include LRO fields.

Some reserved values were changed, hence also data-path code used the
reserved values were updated accordingly.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Matan Azrad
3a22f3877c net/mlx5: replace external mbuf shared memory
As an arrangement to the LRO support when a packet can consume all the
stride memory, the external mbuf shared information cannot be anymore
in the end of the stride, because the HW may write the packet data to
all the stride memory.

Move the shared information memory from the stride to the control
memory of the external mbuf.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
940f0a1d07 net/mlx5: support LRO with single RxQ object
Implement LRO support using a single RQ object per DPDK RxQ.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
dc9ceff73c net/mlx5: create advanced RxQ via DevX
Function mlx5_rxq_obj_new(), previously called mlx5_rxq_ibv_new(),
supports creating Rx queue objects using verbs.
This patch expands the relevant functions, to support creating
verbs or DevX Rx queue objects:
Function mlx5_rxq_obj_new() updated to create RQ object using DevX.
Function mlx5_ind_table_obj_new() updated to create RQT object using DevX.
Function mlx5_hrxq_new() updated to create TIR object using DevX.
New utility functions added to perform specific operations:
mlx5_devx_rq_new(),  mlx5_devx_wq_attr_fill(),
mlx5_devx_create_rq_attr_fill().

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
abc81aafde net/mlx5: add function for Rx verbs work queue
Verbs WQ for RxQ is created inside function mlx5_rxq_obj_new().
This patch moves the creation of verbs WQ to dedicated function
mlx5_ibv_wq_new().

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
8bbad00a91 net/mlx5: add function for Rx verbs completion queue
Verbs CQ for RxQ is created inside function mlx5_rxq_obj_new().
This patch moves the creation of CQ to dedicated function
mlx5_ibv_cq_new().

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
b9d86122bf net/mlx5: store protection domain number on create
Function mlx5_alloc_shared_ibctx() allocates Protection Domain using
verbs API, as part of shared IB device context.
This patch adds reading and storing of pdn value from the created PD
object, using DV API.
The pdn value is required when creating WQ using DevX API.

This patch also updates function flow_dv_create_counter_stat_mem_mng()
which uses the pdn value as well.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
84537d3c35 net/mlx5: update queue state modify for DevX
Function mlx5_queue_state_modify_primary() was implemented to handle
state change for queues created using Verbs API.

This patch update function mlx5_queue_state_modify_primary() to
support state change of RQ object created using DevX API.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
23820a7989 net/mlx5: rename hash RxQ verbs to general
Prepare for introducing use of DevX TIR object.
Hash Rx queue is currently created using verbs QP only.
The next patches will add the option to create it with a TIR object
using DevX.
This patch renames hrxq_ibv to hrxq wherever relevant, and adds
the DevX items to relevant structs.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
15c80a126d net/mlx5: rename verbs indirection table to obj
Prepare for introducing of DevX RQT object.
Rx indirection table object is currently created using verbs only.
The next patches will add the option to create an RQT object using
DevX.
This patch renames ind_table_ibv to ind_table_obj wherever relevant,
and adds the DevX items to relevant structs.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
93403560ba net/mlx5: rename RxQ verbs to general RxQ object
Prepare for introducing of DevX RxQ object.
RxQ object is currently created using verbs only.
The next patches will add the option to create RxQ object using DevX.
This patch renames rxq_ibv to rxq_obj wherever relevant, and adds the
DevX items to relevant structs.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
21cae8580f net/mlx5: allocate door-bells via DevX
When using DevX API, memory for door-bell records should be allocated
by PMD and registered using DevX API.

This patch implements the utility functions to support it:
- Add struct mlx5_devx_dbr_page, containing door-bells page data.
- Add list of struct mlx5_devx_dbr_page door-bell pages to device
  private data.
- Implement function mlx5_alloc_dbr_page() to allocate page for
  door-bell records, and register it using DevX API.
- Implement function mlx5_get_dbr(). to acquire a door-bell record
  from the door-bells page, allocating a new page if needed.
- Implement function mlx5_release_dbr() to release a door-bell
  record that is no longer needed, freeing the containing page if
  it becomes empty.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
718d166e55 net/mlx5: create advanced RxQ table via DevX
Implement function mlx5_devx_cmd_create_rqt() to create RQT
object using DevX API.
Add related structs in mlx5.h and mlx5_prm.h.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
c3aea272ee net/mlx5: create advanced Rx object via DevX
Implement function mlx5_devx_cmd_create_tir() to create TIR
object using DevX API..
Add related structs in mlx5.h and mlx5_prm.h.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
5bf204fef1 net/mlx5: modify advanced RxQ object via DevX
Implement function mlx5_devx_cmd_modify_rq() to modify RQ.
Add related structs in mlx5.h and mlx5_prm.h.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
86fc67fc93 net/mlx5: create advanced RxQ object via DevX
Implement function mlx5_devx_cmd_create_rq() to create RQ object using
DevX API.
Add related structs in mlx5.h and mlx5_prm.h.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
8791ff42ef net/mlx5: update Tx queue create for LRO
Update function mlx5_txq_ibv_new(), query and store the TIS
transport domain value.
It is required later on Rx side when creating matching TIR.
Add field in mlx5 data structure to store Transport Domain ID.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
09f78f2144 net/mlx5: support Tx interface query via DevX
Implement function mlx5_devx_cmd_qp_tis_td_query(), to query
QP TIS Transport Domain value.

Add related structs in mlx5_prm.h.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
175f1c21d0 net/mlx5: check conditions to enable LRO
Use DevX API to read device LRO capabilities.
Check if LRO is supported and can be enabled.
Check if MPRQ is supported and can be used.
Enable MPRQ for LRO use if not enabled by user.
Added note for mlx5_mprq_enabled(), to emphasize that LRO
enables MPRQ.
Disable CQE compression and CRC stripping if LRO is enabled.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
3075bd23e3 net/mlx5: add glue for create action via DevX
Add compile option HAVE_MLX5DV_DR_ACTION_DEST_DEVX_TIR, and matching
dest_tir flag in device configuration structure.
Add glue function pointer dv_create_flow_action_dest_devx_tir, and
function mlx5_glue_dv_create_flow_action_dest_devx_tir(),
to invoke API mlx5dv_dr_action_create_dest_devx_tir();

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
62d6f70f30 net/mlx5: add glue for queue query via DevX
Add function mlx5_glue_devx_qp_query().
Add glue function pointer devx_qp_query to run it.
Glue version updated to 19.08.0.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
d9102b3312 net/mlx5: query LRO capabilities via DevX
Update function mlx5_devx_cmd_query_hca_attr() to query HCA
capabilities related to LRO.

Add relevant structs in drivers/net/mlx5/mlx5_prm.h.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
21bb6c7e62 net/mlx5: introduce LRO
Add command-line argument to set LRO session timeout.
Add LRO settings struct in PMD configuration struct.
Add support of LRO offload in port configuration.
Add macros and function to check if LRO is supported and enabled.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
970eb58c47 net/mlx5: remove redundant item from union
A variable of type struct ibv_cq_ex is declared in 2 unions, but
isn't used.
This patch removes the 2 redundant declarations.

Fixes: 6218063b39 ("net/mlx5: refactor Rx data path")
Fixes: 1d88ba1719 ("net/mlx5: refactor Tx data path")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Xiaolong Ye
4fe1af80dd net/i40e: fix flow director rule destroy
We should tear down the fdir when the last flow is destroyed, current
logic is opposite to expected behavior, this patch fixes this issue.

Fixes: 2e67a7fbf3 ("net/i40e: config flow director automatically")
Cc: stable@dpdk.org

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2019-07-23 14:31:36 +02:00
Xiaolong Ye
3106ca84dc net/i40e: fix ethernet flow rule
i40e FDIR doesn't allow to create flow with empty spec and mask for
ethertype pattern. Without this patch, below flow would be created
successfully which is unexpected.

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

Fixes: 7d83c152a2 ("net/i40e: parse flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2019-07-23 14:31:36 +02:00
Krzysztof Kanas
d34db5ccbf net/octeontx2: fix driver reconfiguration
When configure returns error, e.g. in case not supported offloads
(outer ip and sctp) driver released Rx,Tx queues. Then in case of
correct configuration the driver could not start due to queues already
released but the driver thought it was configured correctly.

Secondly if driver returns error from configuration librte_ethdev will
release, rx queues and tx queues, without chaining driver configured
state.

Fix that by 'releasing' configuration and changing driver state when
error is returned from otx2_nix_configure.

Fixes: 548b5839a3 ("net/octeontx2: add device configure operation")

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-23 14:31:36 +02:00
Ed Czeck
c5ddc9b98d net/ark: remove resources when port is close
Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the resources
for the port can be freed by rte_eth_dev_close()

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
2019-07-23 14:31:36 +02:00
Ed Czeck
7311db7318 net/ark: fix queue packet replacement
Queue index was incorrectly incremented with port, which
caused incorrect queue packet placement. This manifested
when port number was != 0.

Fixes: c33d45af36 ("net/ark: add Tx initial version")
Cc: stable@dpdk.org

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
2019-07-23 14:31:36 +02:00
Nipun Gupta
1f4d77d20b net/dpaa2: fix multi-segment Tx
This patch resets frc and ctrl in sg tx fd to avoid corruption.

Fixes: 774e9ea919 ("net/dpaa2: add support for multi seg buffers")
Cc: stable@dpdk.org

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-07-23 14:31:36 +02:00
Hemant Agrawal
829904201f net/dpaa: check multi-segment external buffers
This patch add check to return error as the handling
for external buffer packets with SG is currently missing.

Fixes: 37f9b54bd3 ("net/dpaa: support Tx and Rx queue setup")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-07-23 14:31:36 +02:00
Viacheslav Ovsiienko
ff45f462b8 net/mlx5: revert Netlink socket sharing
This reverts commit e28111ac98.
The netlink requests are replaced by ifindex caching and
not needed anymore.

Fixes: e28111ac98 ("net/mlx5: fix master device Netlink socket sharing")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-07-23 14:31:36 +02:00
Viacheslav Ovsiienko
fa2e14d492 net/mlx5: cache associated network device index
The associated device index is retrieved via Netlink request to
underlying Infiniband device driver. This network device index
is permanent throughout the lifetime of device. We do not
spawn the rte_eth_dev ports without associated network device, and
if network device is being unbound we get the remove notification
message and rte_eth_dev port is also detached. So, we may store
the ifindex in mlx5_device_spawn() routine at rte_eth_dev port
creation and initialization time and use the cached value further
instead of doing actual Netlink request.

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-07-23 14:31:36 +02:00
Viacheslav Ovsiienko
cb9cb61e54 net/mlx5: report max number of mbuf segments
This patch fills the tx_desc_lim.nb_seg_max and
tx_desc_lim.nb_mtu_seg_max fields of rte_eth_dev_info
structure to report thee maximal number of packet
segments, requested inline data configuration is
taken into account in conservative way.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-07-23 14:31:36 +02:00
Viacheslav Ovsiienko
18a1c20044 net/mlx5: implement Tx burst template
This patch adds the implementation of tx_burst routine template.
The template supports all Tx offloads and multiple optimized
tx_burst routines can be generated by compiler from this one.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-07-23 14:31:36 +02:00
Viacheslav Ovsiienko
eb8121ab9d net/mlx5: introduce Tx burst routine template
Mellanox NICs support the wide set of Tx offloads. The supported
offloads are reported by the mlx5 PMD in rte_eth_dev_info
tx_offload_capa field.
An application may choose any combination of supported offloads
and configure the device appropriately. Some of Tx offloads may be
not requested by application, or ever all of them may be omitted.
Most of the Tx offloads require some code branches in tx_burst routine
to support ones. If Tx offload is not requested the tx_burst routine
code may be significantly simplified and consume less CPU cycles.

For example, if application does not engage TSO offload this code
can be omitted, if multi-segment packet is not supposed the tx_burst
may assume single mbuf packets only, etc.

Currently, the mlx5 PMD implements multiple tx_burst subroutines
for most common combinations of requested Tx offloads, each branch
has its own dedicated implementation. It is not very easy to update,
support and develop such kind of code - multiple branches impose
the multiple points to process. Also many of frequently requested
offload combinations are not supported yet. That leads to selecting of
not completely matching tx_burst routine and harms the performance.

This patch introduces the new approach for tx_burst code. It is proposed
to develop the unified template for tx_burst routine, which supports
all the Tx offloads and takes the compile time defined parameter
describing the supposed set of supported offloads. On the base
of this template, the compiler is able to generate multiple tx_burst
routines highly optimized for the statically specified set of
Tx offloads.
Next, in runtime, at Tx queue configuration the best matching optimized
implementation of tx_burst is chosen.

This patch intentionally omits the template internal implementation,
but just introduces the template itself to emboss the approach of
the multiple specially tuned tx_burst routines.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-07-23 14:31:36 +02:00
Viacheslav Ovsiienko
38b4b397a5 net/mlx5: add Tx configuration and setup
This patch updates the Tx datapath control and configuration
structures and code for managing Tx datapath settings.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-07-23 14:31:36 +02:00
Viacheslav Ovsiienko
ed4470c70f net/mlx5: extend NIC attributes query via DevX
This patch extends the NIC attributes query via DevX.
The appropriate interface structures are borrowed from
kernel driver headers and DevX calls are added to
mlx5_devx_cmd_query_hca_attr() routine.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-07-23 14:31:36 +02:00
Viacheslav Ovsiienko
50724e1bba net/mlx5: update Tx definitions
This patch updates Tx datapath definitions, mostly hardware related.
The Tx descriptor structures are redefined with required fields,
size definitions are renamed to reflect the meanings in more
appropriate way. This is a preparation step before introducing
the new Tx datapath implementation.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-07-23 14:31:36 +02:00
Viacheslav Ovsiienko
505f1fe426 net/mlx5: add Tx devargs
This patch introduces new mlx5 PMD devarg options:

- txq_inline_min - specifies minimal amount of data to be inlined into
  WQE during Tx operations. NICs may require this minimal data amount
  to operate correctly. The exact value may depend on NIC operation
  mode, requested offloads, etc.

- txq_inline_max - specifies the maximal packet length to be completely
  inlined into WQE Ethernet Segment for ordinary SEND method. If packet
  is larger the specified value, the packet data won't be copied by the
  driver at all, data buffer is addressed with a pointer. If packet
  length is less or equal all packet data will be copied into WQE.

- txq_inline_mpw - specifies the maximal packet length to be completely
  inlined into WQE for Enhanced MPW method.

Driver documentation is also updated.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-07-23 14:31:36 +02:00
Viacheslav Ovsiienko
a6bd4911ad net/mlx5: remove Tx implementation
This patch removes the existing Tx datapath code
as preparation step before introducing the new
implementation. The following entities are being
removed:

- deprecated devargs support
- tx_burst() routines
- related PRM definitions
- SQ configuration code
- Tx routine selection code
- incompatible Tx completion code

The following devargs are deprecated and ignored:
- "txq_inline" is going to be converted to "txq_inline_max"
  for compatibility issue
- "tx_vec_en"
- "txqs_max_vec"
- "txq_mpw_hdr_dseg_en"
- "txq_max_inline_len" is going to be converted
  to "txq_inline_mpw" for compatibility issue

The deprecated devarg keys are recognized by PMD
and ignored/converted to the new ones in order not
to block device probing.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
42280dd91b net/mlx5: fix typos in comments
Some spelling mistakes were found in comments.
This patch fixes them.

Fixes: d10b09db0a ("net/mlx5: fix allocation when no memory on device NUMA node")
Fixes: fc2c498ccb ("net/mlx5: add Direct Verbs translate items")
Fixes: 7d6bf6b866 ("net/mlx5: add Multi-Packet Rx support")
Fixes: f6d9ab4e76 ("net/mlx5: check Tx queue size overflow")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
187ec068d5 net/mlx4: fix typo in comment
A spelling mistake was found in comment.
This patch fixes it.

Fixes: 8e49376400 ("net/mlx4: add external allocator for Verbs object")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-07-23 14:31:36 +02:00
Dekel Peled
20367e45f2 net/mlx5: fix flow item flags bitmap
In functions flow_dv_translate() and  flow_dv_validate(), the flow
items are scanned and each item is marked in item_flags bitmap.
The code handling some of the items was ported from another project,
where items are marked in a slightly different manner.

This patch fixes the setting of items in bitmap, adapting it to the
required manner.

Fixes: d53aa89aea ("net/mlx5: support matching on ICMP/ICMP6")
Fixes: 5865955ad994 ("net/mlx5: match GRE key and present bits")
Fixes: 2e4c987aad ("net/mlx5: validate Direct Rule E-Switch")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
2019-07-23 14:31:36 +02:00
Kiran Kumar K
3aef89aaec net/octeontx2: support IPv6 ext parsing
Adding support for ipv6_ext header parsing in the octeontx2 flow.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-23 14:31:36 +02:00
Nithin Dabilpuram
fcc971d38d net/octeontx2: add build check on fast path fields
Add build bug on on fast path used fields that are
dependent on their positions and values.

Fixes: f1eff76ab6 ("net/octeontx2: add Rx vector version")
Fixes: ddc1bc26e9 ("net/octeontx2: add Tx vector version")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-23 14:31:36 +02:00
Stephen Hemminger
e6da1f00e7 net/octeontx: use driver log type
All log messages should use driver logtype. RTE_LOGTYPE_PMD is
planned to be deprecated in the future.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-23 14:31:36 +02:00
Beilei Xing
eec6a3394e net/ice: fix unsafe tailq element removal
TAILQ_FOREACH macro is not safe to remove elements
during iterating tailq lists. Replace it with
TAILQ_FOREACH_SAFE.

Fixes: d76116a467 ("net/ice: add generic flow API")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-07-23 14:31:36 +02:00
Xiao Zhang
f0027fa182 net/e1000: fix buffer overrun while i219 processing DMA
Intel® 100/200 Series Chipset platforms reduced the round-trip
latency for the LAN Controller DMA accesses, causing in some high
performance cases a buffer overrun while the I219 LAN Connected
Device is processing the DMA transactions. I219LM and I219V devices
can fall into unrecovered Tx hang under very stressfully UDP traffic
and multiple reconnection of Ethernet cable. This Tx hang of the LAN
Controller is only recovered if the system is rebooted. Slightly slow
down DMA access by reducing the number of outstanding requests.
This workaround could have an impact on TCP traffic performance
on the platform. Disabling TSO eliminates performance loss for TCP
traffic without a noticeable impact on CPU performance.

Please, refer to I218/I219 specification update:
https://www.intel.com/content/www/us/en/embedded/products/networking/
ethernet-connection-i218-family-documentation.html

Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-07-23 14:31:36 +02:00
Ajit Khaparde
a8cbae89da net/bnxt: remove unnecessary interrupt disable
Remove an unnecessary rte_intr_disable() call to disable interrupt
during device init.

Fixes: c09f57b49c ("net/bnxt: add start/stop/link update operations")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:36 +02:00
Lance Richardson
fca922e8f6 net/bnxt: disable vector mode Tx with VLAN offload
The vector mode transmit path does not currently support VLAN tag
insertion, so we need to disable vector transmit when transmit
VLAN insertion offload is enabled.

Fixes: bc4a000f2f ("net/bnxt: implement SSE vector mode")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:36 +02:00
Rahul Gupta
c79012a3b0 net/bnxt: fix interrupt rearm logic
Rearm will intimate hardware that current interrupts are processed
and it can continue to send more.

Fixes: 1fe427fd08 ("net/bnxt: support enable/disable interrupt")
Cc: stable@dpdk.org

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:36 +02:00
Stephen Hemminger
d261c9ef56 net/bnxt: fix Rx interrupt vector
The receive interrupt vector should be offset by the constant
RTE_INTR_VEC_RXTX_OFFSET; otherwise setting up some queue interrupts
will fail.

Fixes: 1fe427fd08 ("net/bnxt: support enable/disable interrupt")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Tested-by: Rahul Gupta <rahul.gupta@broadcom.com>
2019-07-23 14:31:36 +02:00
Kalesh AP
5a7bc3c0b8 net/bnxt: add new device id
Added support for new thor device.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:36 +02:00
Ajit Khaparde
721597ae2f net/bnxt: update HWRM API to version 1.10.0.91
Update HWRM API to version 1.10.0.91

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:36 +02:00
Kalesh AP
5151df16fb net/bnxt: fix checking result of HWRM command
HWRM_CHECK_RESULT macro is used to check the status of HWRM commands.

Fixes: 18c2854b96 ("net/bnxt: configure a default VF VLAN")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-23 14:31:35 +02:00
Santoshkumar Karanappa Rastapur
b4e190d55c net/bnxt: fix MAC/VLAN filter allocation
We were adding the VLAN filters to all the VNICs of the function.
Also, we were adding these VLANs to all the existing MAC only filters.
This was resulting in fewer VLANs getting added. By default we should
allocate MAC+VLAN filter only to the default VNIC of the function using
the default mac address.
Similar logic was followed in the VLAN deletion code. This patch fixes
it.  Use inner VLAN fields instead of outer VLAN during filter deletion
to be in sync with VLAN addition code.

Fixes: 246c5cc5f0 ("net/bnxt: use correct flags during VLAN configuration")
Cc: stable@dpdk.org

Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:35 +02:00
Lance Richardson
75306ee088 net/bnxt: fix getting statistics
Avoid overrun in rte_eth_stats struct when the number of tx/rx
rings in use is greater than RTE_ETHDEV_QUEUE_STAT_CNTRS.

Fixes: 57d5e5bc86 ("net/bnxt: add statistics")
Cc: stable@dpdk.org

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:35 +02:00
Lance Richardson
f8d9e381bc net/bnxt: fix RSS table address for thor
The current implementation erroneously passes the address of the
beginning of RSS table for each 64-entry context instead of the
address of the appropriate suitable for the context. This results
in only the first 64 receive queues being used. Fix by passing the
correct address for each context.

Fixes: 38412304b5 ("net/bnxt: enable RSS for thor-based controllers")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-23 14:31:35 +02:00
Lance Richardson
fc2d87b935 net/bnxt: fix RSS context numbers for thor
BCM57500-based adapters use a variable number of RSS contexts
depending upon the number of receive rings in use. The current
implementation is erroneously using the maximum possible number
of RSS contexts instead of the actual number allocated when
setting up RSS tables in the adapter. Fix by using the actual
number of allocated contexts.

Fixes: 38412304b5 ("net/bnxt: enable RSS for thor-based controllers")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:35 +02:00
Lance Richardson
db5d0f98be net/bnxt: fix HWRM messages for thor RSS config
Fully initialize hwrm messages for thor RSS configuration
to avoid hwrm duplicate sequence numbers.

Fixes: 38412304b5 ("net/bnxt: enable RSS for thor-based controllers")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
2019-07-23 14:31:35 +02:00
Lance Richardson
4ab48e8241 net/bnxt: fix RSS table sizes
RSS table size is variable with BCM57500-based adapters. Use correct
size when allocating memory for RSS state.

Fixes: 38412304b5 ("net/bnxt: enable RSS for thor-based controllers")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-23 14:31:35 +02:00
Santoshkumar Karanappa Rastapur
ce1d456243 net/bnxt: fix RSS disable for thor-based adapters
In bnxt_hwrm_vnic_rss_cfg_thor, we were exiting if hash_type is 0.
This was preventing RSS getting disabled. Fixing it by removing the
check for hash_type while configuring RSS.

Fixes: 38412304b5 ("net/bnxt: enable RSS for thor-based controllers")

Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:35 +02:00
Kalesh AP
6d91fd2ffe net/bnxt: fix lock release on getting NVM info
HWRM response was parsed after releasing the spinlock.

Fixes: 19e6af01bb ("net/bnxt: support get/set EEPROM")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-23 14:31:35 +02:00
Kalesh AP
e67daabd22 net/bnxt: fix return values to standard error codes
Fixed the return values of few routines to return standard error code.
Also fixed few error logs to more meaningful one.

Fixes: 804e746c7b ("net/bnxt: add hardware resource manager init code")
Fixes: e3d8f1e6a6 ("net/bnxt: cache address of doorbell to subsequent access")
Fixes: 19e6af01bb ("net/bnxt: support get/set EEPROM")
Fixes: b7435d660a ("net/bnxt: add ntuple filtering support")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-23 14:31:35 +02:00
Kalesh AP
324c56551a net/bnxt: fix error checking of FW commands
HWRM_CHECK_RESULT() checks the return value of HWRM command and returns
in case the command fails. There is no need of return value check after
HWRM_CHECK_RESULT().

Fixes: 49947a13ba ("net/bnxt: support Tx loopback, set VF MAC and queues drop")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:35 +02:00
Lance Richardson
43f78b380f net/bnxt: retry IRQ callback deregistration
rte_intr_callback_unregister() can fail if the handler happens to
be active at the time of the call. Add logic to retry a reasonable
number of times to help ensure that the callback is unregistered
on uninit.

Fixes: 7bc8e9a227 ("net/bnxt: support async link notification")
Cc: stable@dpdk.org

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:35 +02:00
Lance Richardson
838c9c7923 net/bnxt: fix VNIC default completion ring
Use the completion ring associated with the default Rx ring
when configuring the default completion ring ID instead
of the async completion ring ID.

Fixes: f8168ca0e6 ("net/bnxt: support thor controller")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:35 +02:00
Kalesh AP
161964c6dc net/bnxt: reset filters before registering interrupts
If interrupt registration fails during device init, driver invokes
uninit which in turn causes error messages while trying to free
vnic filters. Fix this by moving filter initialization call before
interrupt registration.

Fixes: 1b533790f4 ("net/bnxt: avoid invalid vnic id in set L2 Rx mask")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:35 +02:00
Kalesh AP
7d2d64c76c net/bnxt: fix device init error path
1. bnxt_dev_init() invokes bnxt_dev_uninit() on failure. So there is
   no need to do individual function cleanups in failure path.
2. rearrange the check for primary process to remove an unwanted goto.
3. fix to invoke bnxt_hwrm_func_buf_unrgtr() in bnxt_dev_uninit() when
   it is needed.

Fixes: b7778e8a1c ("net/bnxt: refactor to properly allocate resources for PF/VF")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-23 14:31:35 +02:00
Kalesh AP
68f589f2c7 net/bnxt: fix setting primary MAC address
1. Default filter is tied to VNIC 0 at index 0. After finding the filter
   with mac_index 0 and set the new MAC address, looping through
   remaining filters is unnecessary.
2. Added a check for NULL MAC address.
3. bnxt_hwrm_set_l2_filter() clears the existing filter configuration
   first before applying new filter settings. Hence there is no need to
   invoke bnxt_hwrm_clear_l2_filter() explicitly in
   bnxt_set_default_mac_addr_op().

Fixes: d69851df12 ("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: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:35 +02:00
Kalesh AP
0a44537589 net/bnxt: fix unconditional wait in link update
There is an unconditional delay in link update op.
Fixed it to wait only if wait for request completion is set.

Fixes: 7bc8e9a227 ("net/bnxt: support async link notification")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
2019-07-23 14:31:35 +02:00
Kalesh AP
d8b3bc78d8 net/bnxt: fix adding MAC address
HWRM command to add MAC address can fail. Driver should check
the return value of HWRM command and do the house keeping properly.

Fixes: 778b759ba1 ("net/bnxt: add MAC address")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-07-23 14:31:35 +02:00
Kalesh AP
1f3cea0044 net/bnxt: fix check of address mapping
rte_mem_virt2iova() function returns RTE_BAD_IOVA on failure, not zero.

Fixes: 62196f4e09 ("mem: rename address mapping function to IOVA")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-23 14:31:35 +02:00
Kalesh AP
6de4c538b3 net/bnxt: fix error handling in port start
1. during port start, if bnxt_init_chip() return error
   bnxt_dev_start_op() invokes bnxt_shutdown_nic() which in turn calls
   bnxt_free_all_hwrm_resources() to free up resources. Hence remove the
   bnxt_free_all_hwrm_resources() from bnxt_init_chip() failure path.
2. fix to check the return value of rte_intr_enable() as this call
   can fail.
3. set bp->dev_stopped to 0 only when port start succeeds.
4. handle failure cases in bnxt_init_chip() routine to do proper
   cleanup and return correct error value.

Fixes: b7778e8a1c ("net/bnxt: refactor to properly allocate resources for PF/VF")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-07-23 14:31:35 +02:00
Xiao Zhang
9efa8d28b4 net/i40e: fix SFP X722 with FW4.16
When NVM API version is 1.7 or above adminq operation to set TPID is
set as supported. This cause using adminq instead of registers.

For SFP X722 FW4.16, reported NVM API version is 1.8, and this cause
adminq operation to set as supported but it is not supported on FW4.16

Additional check added for SFP X722 to not enable adminq operation.

Fixes: 73cd7d6dc8 ("net/i40e: use set switch AQ instead of register setting")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reviewed-by: Haiyue Wang <haiyue.wang@intel.com>
2019-07-23 14:31:35 +02:00
Herakliusz Lipiec
73bd0ad593 net/i40e: fix MAC removal check
Add return value check for i40e_vsi_delete_mac call in
rte_pmd_i40e_remove_vf_mac_addr as per coverity issue.

Coverity issue: 277224
Fixes: e0cb96204b ("net/i40e: add support for representor ports")
Cc: stable@dpdk.org

Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2019-07-23 14:31:35 +02:00
Ying A Wang
72d138ff0f net/ice: add flow IPv6 TC support
When set flow ipv6 tc rule, ice_get_flow_field will set error.
This patch fixes this issue.

Fixes: d76116a467 ("net/ice: add generic flow API")

Signed-off-by: Ying A Wang <ying.a.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2019-07-23 14:31:35 +02:00