Commit Graph

8426 Commits

Author SHA1 Message Date
Anatoly Burakov
fbaf943887 build: remove individual library versions
Since the library versioning for both stable and experimental ABI's is
now managed globally, the LIBABIVER and version variables no longer
serve any useful purpose, and can be removed.

The replacement in Makefiles was done using the following regex:

	^(#.*\n)?LIBABIVER\s*:=\s*\d+\n(\s*\n)?

(LIBABIVER := numbers, optionally preceded by a comment and optionally
succeeded by an empty line)

The replacement for meson files was done using the following regex:

	^(#.*\n)?version\s*=\s*\d+\n(\s*\n)?

(version = numbers, optionally preceded by a comment and optionally
succeeded by an empty line)

[David]: those variables are manually removed for the files:
- drivers/common/qat/Makefile
- lib/librte_eal/meson.build
[David]: the LIBABIVER is restored for the external ethtool example
library.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-20 23:05:39 +01:00
Matan Azrad
e7f4fbb301 net/mlx5: fix Rx queue release assertions
In debug mode, there is assertion to validate the CQ object before the
release.

Wrongly, the assertion is done for any type of RX queue even if it
doesn't use CQ at all, for example in hairpin Rx queue.

Ignore CQ assertion when hairpin queue is released.

Fixes: e79c9be915 ("net/mlx5: support Rx hairpin queues")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
2019-11-20 17:36:06 +01:00
Xiaoyun Wang
66f64dd6dc net/hinic: fix secondary process
The secondary process does not need to register interrupt handle,
remove rte_intr_callback_register from secondary process branch.

Fixes: 64727024d2 ("net/hinic: add device initialization")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2019-11-20 17:36:06 +01:00
Matan Azrad
36e5527573 net/mlx5: fix L3 encapsulation flow validation
In order to configure L3 encapsulation\decapsulation flow to mlx5
devices, 2 actions should be added to the flow actions list:
RTE_FLOW_ACTION_TYPE_RAW_DECAP and RTE_FLOW_ACTION_TYPE_RAW_ENCAP.

One of the validations for this scenario is to check that modify actions
is not done before the L3 decapsulation, because it doesn't make sense
to decapsulate a modified data.

Wrongly, this check was done for the case of L3 encapsulation what
causes a validation failure in modify + L3 encapsulation flow.

Ignore this check in case of L3 encapsulation.

Fixes: 4bb14c83df ("net/mlx5: support modify header using Direct Verbs")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
2019-11-20 17:36:06 +01:00
Ajit Khaparde
fb4921ab4c net/bnxt: fix flow check for null spec and mask
bnxt_validate_and_parse_flow_type already has protocol specific NULL
checks for rte_flow_item spec and mask and take actions accordingly.
A check at the top of the loop is redundant and is preventing the
protocol specific checks from being executed.

Fixes: b7e01f3860 ("net/bnxt: handle cleanup if flow creation fails")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-11-20 17:36:06 +01:00
Lance Richardson
d9aa878b79 net/bnxt: fix vector Rx selection
Take DEV_RX_OFFLOAD_RSS_HASH into account when deciding whether vector
mode receive can be enabled.

Fixes: 8b945a7f7d ("drivers/net: update Rx RSS hash offload capabilities")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-11-20 17:36:06 +01:00
Rahul Gupta
41a9d881cb net/bnxt: fix jumbo frame configuration in firmware
In order to prevent reconfiguration of firmware resources for every
MTU change, configure FW with max MTU value using hwrm_func_cfg
to support all frame sizes. There is no need to overwrite the driver
level MTU variable data->mtu with the FW MTU.

Fixes: 905cd45ce3 ("net/bnxt: use configured MTU during load")
Cc: stable@dpdk.org

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-11-20 17:36:06 +01:00
Ajit Khaparde
89a0deb866 net/bnxt: fix resource qcaps with older FW
On some old versions of FW, bnxt_hwrm_func_resc_qcaps can return an
error. This is because the command was not implemented completely
in FW till the subsequent version. Ignore the error and continue with
the driver initialization.

Fixes: edafb57ba4 ("net/bnxt: fix VF resource allocation")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-11-20 17:36:06 +01:00
Yahui Cao
c1b22c18de net/ice: fix flow director rule duplication check
When FDIR filter detects duplicated rule and then returns EEXIST, ice
flow will capture this error and return immediately.

Fixes: 4e27d3ed02 ("net/ice: fix flow API framework")

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-11-20 17:36:06 +01:00
Ori Kam
2e715e53de net/mlx5: fix hairpin split detection
When creating a flow, the flow is checked if it should be split into
2 flows based on the queue/rss acton.

If the RSS action with given without any queues, it will result in crash
due to the fact that the function checks the queue type.

This commit fixes this issue by checking if the rss action is not empty,
and at least one queue.

Fixes: d85c7b5ea5 ("net/mlx5: split hairpin flows")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20 17:36:06 +01:00
Viacheslav Ovsiienko
c4d314a352 net/mlx5: fix assert in Tx inline settings
Assert condition is fixed to not alert for the case
when multi-packet write is not supported/engaged at all.

Fixes: b53cd86965 ("net/mlx5: adjust inline setting for large Tx queue sizes")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20 17:36:06 +01:00
Viacheslav Ovsiienko
6cfe84fbe7 net/mlx5: fix port action for LAG
To support LAG configurations the mlx5dv_dr_action_create_dest_ib_port()
should be called instead of mlx5dv_dr_action_create_dest_vport().

Fixes: f07341e7ae ("net/mlx5: update source and destination vport translations")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
2019-11-20 17:36:06 +01:00
Qi Zhang
3b4888d53d net/ice: add flow mark hint
Since not all data paths support flow mark, the driver needs
a hint from application to select the correct data path if
flow mark is required. The patch introduces a devarg
"flow-mark-support" as a workaround solution, since a standard
way is still ongoing.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2019-11-20 17:36:06 +01:00
Yahui Cao
c8a9eacb21 net/ice: fix flow director rule after device stop
By moving irq enable/disable from device start/stop to FDIR
setup/teardown, FDIR queue irq config is independent of LAN queue irq
config. So device stop will not cause FDIR rule failure.

Fixes: 84dc7a95a2 ("net/ice: enable flow director engine")

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Qi Zhang <qi.z.zhang@intel.com>
2019-11-20 17:36:06 +01:00
Yahui Cao
ac1f6b51ad net/ice: fix flow director programming status check
To make sure if FDIR programming succeed or fail, legacy programming
status descriptor WB format is enabled and FDIR queue irq is opened.

Fixes: 84dc7a95a2 ("net/ice: enable flow director engine")

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Qi Zhang <qi.z.zhang@intel.com>
2019-11-20 17:36:06 +01:00
Qi Zhang
6e0fbe16df net/ice: fix flow type selection for flow director
The FDIR parser will select ICE_FLTR_PTYPE_NONF_IPV4_OTHER as flow type
for an IPv4 UDP flow with empty l4 matching field which is not correct.
Same issues happens on all the combination between IPv4/IPv6 and
UDP/TCP/SCTP cases.

The patch fixes all the wrong flow ptype selections.

Fixes: f5cafa961f ("net/ice: add flow director create and destroy")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2019-11-20 17:36:06 +01:00
Viacheslav Ovsiienko
f078ceb6ae net/mlx5: fix Tx doorbell write memory barrier
As the result of testing it was found that some hosts have
the performance penalty imposed by required write memory barrier
after doorbell writing. Before 19.08 release there was some
heuristics to decide whether write memory barrier should be
performed. For the bursts of recommended size (or multiple)
it was supposed there were some extra ongoing packets in the
next burst and write memory barrier may be skipped (supposed
to be performed in the next burst, at least after descriptor
writing).

This patch restores that behaviour, the devargs tx_db_nc=2
must be specified to engage this performance tuning feature.

Fixes: 8409a28573 ("net/mlx5: control transmit doorbell register mapping")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20 17:36:06 +01:00
Dekel Peled
cd4569d2bf net/mlx5: change default flow engine to DV
The default flow engine is Verbs flow engine, for legacy reasons.
This patch changes the default to DV flow engine (dv_flow_en = 1).
Documentation is updated accordingly.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20 17:36:06 +01:00
Paul Atkins
60b05125c4 net/af_packet: advertise Tx offload capabilities
The af_packet pmd already supports MULTI_SEG tx packets, and tx
VLAN_INSERT so advertise these capabilities.

Signed-off-by: Paul Atkins <paul.atkins@intl.att.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-20 17:36:06 +01:00
Viacheslav Ovsiienko
85c4bcbcc5 net/mlx5: fix vport index in port action
The rdma_core routine mlx5dv_dr_create_flow_action_dest_vport()
requires the vport id parameter to create port action.
The register c[0] value was used to deduce the port id value
and it fails in bonding configuration. The correct way is
to apply vport_num value queried from the rdma_core library.

Fixes: f07341e7ae ("net/mlx5: update source and destination vport translations")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20 17:36:06 +01:00
Matan Azrad
54534725d2 net/mlx5: fix flow table hash list conversion
For the case when DR is not supported and DV is supported:
	multi-tables feature is off.
	In this case, only table 0 is supported.
	Table 0 structure wrongly was not created what prevented any
	matcher object to be created and even caused crashes.

Create the table hash list in DV case too.
Create table zero empty structure for each domain when DR is not
supported.
Allow NULL DR internal table object to be used.

Fixes: 860897d289 ("net/mlx5: reorganize flow tables with hash list")

Signed-off-by: Matan Azrad <matan@mellanox.com>
2019-11-20 17:36:06 +01:00
Qi Zhang
62f2d75e88 net/ice/base: update version
Update base code version info in readme.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-11-20 17:36:06 +01:00
Jakub Grajciar
43b815d881 net/memif: support zero-copy slave
Zero-copy slave support for memif PMD.
Slave interface exposes DPDK memory to
master interface. Only single file segments
are supported (EAL option --single-file-segments).

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-20 17:36:06 +01:00
Krzysztof Kanas
8d75f49e61 net/bonding: fix selection logic
Arrays agg_count and agg_bandwidth should be indexed by slave_id not by
aggregator port_id.

The new_agg_id should be chosen as slave_id from slaves table in
different selection modes.

Fixes: 6d72657ce3 ("net/bonding: add other aggregator modes")
Cc: stable@dpdk.org

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Acked-by: Chas Williams <chas3@att.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-20 17:36:06 +01:00
Reshma Pattan
5fde1a7592 net: use IPV4 VHL constant
Use new macro RTE_IPV4_VHL_DEF instead of IP_VHL_DEF
wherever applicable.

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-20 17:36:06 +01:00
Andrew Rybchenko
73fb89dd6a drivers/net: fix RSS hash offload flag if no RSS
By default RSS hash delivery (offload) is bound to RSS mode and
it is incorrect to advertise it as enabled if Rx multi-queue mode
has no RSS.

Fixes: 8b945a7f7d ("drivers/net: update Rx RSS hash offload capabilities")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-20 17:36:06 +01:00
Pavan Nikhilesh
d2706e15e6 net/octeontx2: support reduced set of packet types
Add support to set supported ptypes for octeontx2 and
remove devarg scheme to disable ptype parsing support as
application can use rte_eth_dev_set_ptypes() normative API
to enable the same use case.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-11-20 17:36:05 +01:00
Harman Kalra
35867a370f net/octeontx2: fix PTP configurations for VF
Issue has been observed if PTP is already enabled on PF and
later VFs are configured. Since PTP requires mbuf data off
to be shifted by 8 bytes, due to this l3fwd/l2fwd was not
working with VFs.
Also some extra garbage bytes were observed in packet data
when ptp was enabled.

Fixes: b5dc314044 ("net/octeontx2: support base PTP")
Cc: stable@dpdk.org

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-11-20 17:36:05 +01:00
Anoob Joseph
b26a63510a net/octeontx2: fix error handling after CQ init
After otx2_nix_register_cq_irqs() is called and the IRQs are setup,
otx2_nix_unregister_cq_irqs() need to be called in the subsequent error
exit paths.

Fixes: d34db5ccbf ("net/octeontx2: fix driver reconfiguration")
Cc: stable@dpdk.org

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-11-20 17:36:05 +01:00
Sunil Kumar Kori
53de676f8b net/octeontx2: add Rx/Tx burst mode info
Retrieve burst mode information according to the selected Rx/Tx mode and
offloads.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-11-20 17:36:05 +01:00
Kalesh AP
1bcec6ee08 net/bnxt: fix IP checksum error indication
Update "mbuf->ol_flags" correctly for 'Checksum Unknown' errors
for both tunneled and non-tunneled IP packets.

Fixes: b875339622 ("net/bnxt: fix L4 checksum indication in non-vector Rx")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-11-20 17:36:05 +01:00
Rosen Xu
8418c92811 net/ipn3ke: remove configuration for i40e port bonding
The ipn3ke board FPGA and i40e BDF scan has added in ifpga_rawdev,
so it doesn't need to provide configuration for i40e port bonding.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20 17:36:05 +01:00
Tianfei Zhang
e1defba4cf raw/ifpga/base: support device tree
In PAC N3000 card, this is a BMC chip which using MAX10 FPGA
to manage the board configuration, like sensors, flash controller,
QSFP, powers. And this is a SPI bus connected between A10 FPGA and
MAX10, we can access the MAX10 registers over this SPI bus.

In BMC, there are about 19 sensors in MAX10 chip, including the FPGA
core temperature, Board temperature, board current, voltage and so on.

We use DTB (Device tree table) to describe it. This DTB file is store
in nor flash partition, which will flashed in Factory when the boards
delivery to customers. And the same time, the customers can easy to
customize the BMC configuration like change the sensors.

Add device tree support by using libfdt library in Linux distribution.
The end-user should pre-install the libfdt and libfdt-devel package
before use DPDK on PAC N3000 Card.

For Centos 7.x: sudo yum install libfdt libfdt-devel
For Ubuntu 18.04: sudo apt install libfdt-dev libfdt1

To eliminate build error, we currently do not compile raw/ifpga
and net/ipn3ke. User should install libfdt and libfdt-devel first,
modify config/common_linux, CONFIG_RTE_LIBRTE_PMD_IFPGA_RAWDEV=n
to CONFIG_RTE_LIBRTE_PMD_IFPGA_RAWDEV=y, modify config/common_base,
CONFIG_RTE_LIBRTE_IPN3KE_PMD=n to CONFIG_RTE_LIBRTE_IPN3KE_PMD=y.
Then this function can work.

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-11-20 17:36:05 +01:00
Andy Pei
ec26c81df7 net/i40e: support ipn3ke FPGA port bonding
In ipn3ke, each FPGA network side port bonding to an i40e pf,
each i40e pf link status should get data from FPGA network,
side port. This patch provide bonding relationship.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-11-20 17:36:05 +01:00
Viacheslav Ovsiienko
99eafd1b7a net/mlx5: fix vport id in port id action
The kernel driver (starting from OFED 4.7.3.1.3) uses the upper half
of metadata register C0 to provide VHCA and vport id's. The mlx5 PMD
should check the actual mask of register C0 and shift the vport id
value for port actions appropriately.

Fixes: f07341e7ae ("net/mlx5: update source and destination vport translations")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-11-20 17:36:05 +01:00
Viacheslav Ovsiienko
06f78b5ebc net/mlx5: fix environment variable recovery
The state of environment variable MLX5_BF_SHUT_UP was not
recovered correctly if there was no tx_db_nc devarg specified.

Fixes: 8409a28573 ("net/mlx5: control transmit doorbell register mapping")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20 17:36:05 +01:00
Yahui Cao
1422df2908 net/ice: add SPDX tag
Fixes: 84dc7a95a2 ("net/ice: enable flow director engine")

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2019-11-20 17:36:05 +01:00
Qi Zhang
2f11d96fea net/ice: ignore error when removing RSS rule
Currently, multiple rte_flow RSS rules may map to the same
hardware rule if a later rule is just for input set change or
symm turn on/off. So after one of the rules be destroyed, we will
get error ICE_ERR_DOES_NOT_EXIST when destroying any other rules.
The patch simply fixes this by ignoring this error. A more
sophisticated fix that remember the sequence and replay properly
will be provided in the future.

Fixes: 5ad3db8d4b ("net/ice: enable advanced RSS")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2019-11-20 17:36:05 +01:00
Simei Su
702055151a net/ice: fix RSS flow destroy
In ice_hash_create(), whatever the hash_function is, the
filter_ptr->symm is always 0 and when we destroy the flow, the
ice_rem_rss_cfg() is never carried out. So the destroy function never
works well. The patch fixes this issue and at the same time
distinguishes between simple_xor and symmetric_toeplitz.

To fix this issue, the patch adds a new structure to include a flag to
indicate if it is a simple_xor flow so that it's easier to remove the
config when destroying the flow. The patch also simplifies code
implementation logic in ice_hash_create().

Fixes: 5ad3db8d4b ("net/ice: enable advanced RSS")

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-11-20 17:36:05 +01:00
Ajit Khaparde
e92247f03b net/bnxt: fix null dereference in Rx stop
Null-checking "rxq" suggests that it may be null, but it has already
been dereferenced on all paths leading to the check.
Refactored the code to address this issue.

Coverity issue: 350594
Fixes: fc4bfea596 ("net/bnxt: fix Rx queue start/stop for Thor based NICs")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-11-20 17:36:05 +01:00
Venkat Duvvuru
ae6a941dd9 net/bnxt: fix log message level
When an existing mac_addr is tried to get programmed again, a
message is displayed that the mac_addr already exists.
However the message is of type ERR. This patch changes the message
to type DEBUG

Fixes: 938a87db43 ("net/bnxt: fix redundant MAC address check")
Cc: stable@dpdk.org

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-11-20 17:36:05 +01:00
Ajit Khaparde
063e59ddd2 net/bnxt: fix crash in xstats get
We would hit a segfault in bnxt_dev_xstats_get_op() if xstats argument
is NULL, Check if the argument is NULL and return appropriately.

Fixes: bfb9c2260b ("net/bnxt: support xstats get/reset")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
2019-11-20 17:36:05 +01:00
Rahul Gupta
fcdd7210aa net/bnxt: fix flow creation with non-consecutive group ids
In non-RSS mode, vnics map 1:1 with Rx queues during init. This can
create problems if non-consecutive group IDs are given as part of
subsequent flow create cmds as they can end up pointing to Rx queues
(mapped during init) that are different than the intended destination
queue as specified in the flow create cmd.
To fix this, now that we have the ability to dynamically create
vnics, do not create any additional vnics other than the default vnic
during init. Allocate them only during flow/filter creation time.

When RSS is disabled we need to use the COS queue count queried
from firmware.

Fixes: 36024b2e7f ("net/bnxt: allow dynamic creation of VNIC")

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-11-20 17:36:05 +01:00
Somnath Kotur
f03e66cb64 net/bnxt: limit queue count for NS3/Stingray devices
Cap max queue count to 128 for NS3 devices and ensure that same count
is reported as part of dev_info_get_op as well

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
2019-11-20 17:36:05 +01:00
Kalesh AP
aadae082ee net/bnxt: add checks for firmware reset
Driver should fail the eth_dev_ops callbacks and accessing
Tx and Rx queues when device is in reset or in error state.
Added missing checks for fw reset in few routines.

Fixes: be14720def ("net/bnxt: support FW reset")

Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2019-11-20 17:36:05 +01:00
Xiaoyu Min
20ac796641 net/mlx5: fix layer bits to be unique
The layer bits should be unique otherwise layer info will be
interpreted wrongly.

Fixes: 70d84dc797 ("net/mlx5: add internal tag item and action")
Fixes: 55deee1715 ("net/mlx5: extend flow mark support")

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20 17:36:05 +01:00
Dekel Peled
50d23b9ace net/mlx5: fix verbs flow counter query
Function flow_verbs_counter_query() was recently modified.
The new 'if' condition uses a pointer to flow counter-set.
This pointer is valid only if flow contains a count action.

This patch adds check to verify the pointer is valid.

Fixes: d85c7b5ea5 ("net/mlx5: split hairpin flows")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20 17:36:05 +01:00
Dekel Peled
6b7af102d0 net/mlx5: fix getting Rx queue type
Function mlx5_rxq_get_type() uses the input queue index, without
checking it, as index to the Rx queues array.
If this value is too high, it will result in pointer to memory out
of Rx queues array bounds.

This patch adds check of the input queue index, to verify it is valid.

Fixes: d85c7b5ea5 ("net/mlx5: split hairpin flows")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-11-20 17:36:05 +01:00
Viacheslav Ovsiienko
cec19a342f net/mlx5: fix suffix flow creation in metadata split
The variable cleanup was erroneously done before pointer usage.
The cleanup is moved to appropriate place, comment is clarified.

Fixes: 8d72fa6689 ("net/mlx5: share tag between meter and metadata")

Reported-by: Eli Britstein <elibr@mellanox.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2019-11-20 17:36:05 +01:00
Matan Azrad
7f1517012b net/mlx5: revert default rules amount optimization
This reverts commit 304ffe576f.

It tried to optimize the amount of the default flow
rules and created it only once on top of the PF representor.

For each FDB rule, the default port ID to match on is like of the port
that triggers the flow.

Hence, the single default rule will not be matched on the VF traffic.

As a result, all the traffic of the VFs will not match to the jump flow
in the root table and will always be forwarded to the representor port.

Revert the commit.

Fixes: 304ffe576f ("net/mlx5: fix condition to create default rule")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2019-11-20 17:36:05 +01:00