Commit Graph

21532 Commits

Author SHA1 Message Date
Chengchang Tang
4bf2c84bd8 net/hns3: remove restriction on setting VF MTU
The hns3 PF/VF devices on the same port share the hardware MTU
configuration. Currently, we send mailbox to inform hns3 PF kernel
ethdev driver to finish hardware MTU configuration in hns3 VF PMD
driver, there is no need to stop the port for hns3 VF device, and
the MTU value issued by hns3 VF PMD driver must be less than or
equal to PF's MTU.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
2020-03-18 10:21:42 +01:00
Wei Hu (Xavier)
ef2e785c36 net/hns3: fix Tx interrupt when enabling Rx interrupt
Currently, when receiving and transmitting packets based on hns3 network
engine there are probably unexpected and redundant Tx interrupts if Rx
interrupt is enabled.

The root cause as below:
Tx and Rx queues with the same number share the interrupt vector in hns3
network engine, and in this case there are the residual hardware mapping
relationship configuration between queue and interrupt vector configured
in hns3 kernel ethdev driver.

We should clear the all hardware mapping relationship configurations in
the initialization. Because of the hardware constraints, we have to
implement clearing the relationship by binding all queues to the last
interrupt vector and reserving the last interrupt vector, this method
results in a decrease of the maximum queues when upper applications call
the rte_eth_dev_configure API function to enable Rx interrupt.

Fixes: 02a7b55657 ("net/hns3: support Rx interrupt")
Cc: stable@dpdk.org

Signed-off-by: Hao Chen <chenhao164@huawei.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
2020-03-18 10:21:42 +01:00
Hongbo Zheng
6dca716c9e net/hns3: support TSO
This patch adds TCP segment offload support for hns3 PMD driver.

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
2020-03-18 10:21:42 +01:00
Xiao Zhang
ecbc857013 ethdev: add PFCP header to flow API
This patch adds the new flow item RTE_FLOW_ITEM_TYPE_PFCP to flow API to
match a PFCP header.
Add sample PFCP rules for testpmd guide. Since Session Endpoint
Identifier (SEID) only will be present in PFCP Session header and PFCP
Session headers shall be identified when the S field is equal to 1, when
create rules for PFCP Session header with certain SEID the S field need
be set 1.

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
2020-03-18 10:21:42 +01:00
Qi Zhang
edec6dd838 net/ice: remove redundant functions
Remove function ice_clear_queues, since all equivalent code
has already been executed during ice_rx|tx_queue_stop.

Also function ice_rx|tx_queue_release_mbufs simply wrapped a
function pointer call which is not necessary, remove them.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-03-18 10:21:42 +01:00
Kevin Traynor
ece8e4c262 net/hinic: fix repeating cable log and length check
gcc 10.0.1 reports:

../drivers/net/hinic/base/hinic_pmd_hwdev.c: In function ‘print_cable_info’:
../drivers/net/hinic/base/hinic_pmd_hwdev.c:1398:3:
warning:
‘snprintf’ argument 4 may overlap destination object ‘tmp_str’
[-Wrestrict]
 1398 |   snprintf(tmp_str + strlen(tmp_str), (sizeof(tmp_str) - 1),
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1399 |     "%s, Temperature: %u", tmp_str,
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1400 |     info->cable_temp);
      |     ~~~~~~~~~~~~~~~~~

The warning is that tmp_str is in both src and dest.

Anyway, the current code is incorrect and because of the +strlen
the existing string will be repeated twice and max length
does not limit to the end of the string.

Fix by removing tmp_str from the src of snprintf and adding the
correct max length.

Fixes: d9ce191794 ("net/hinic/base: add hardware operation")
Cc: stable@dpdk.org

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-03-18 10:21:42 +01:00
Kevin Traynor
9c84acab47 net/hinic: fix snprintf length of cable info
Correct length and remove unnecessary brackets.

Fixes: d9ce191794 ("net/hinic/base: add hardware operation")
Cc: stable@dpdk.org

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-03-18 10:21:42 +01:00
Július Milan
06123fdd60 net/memif: fix init when already connected
This patch fixes the situation when there is already connected pair of
memif interfaces and another slave tries to initiate the connection with
(already occupied) master. Expected behavior is that the second slave
is refused and gets disconnect message with reason: "Already connected",
while old connection remains functional.

Fixes: 09c7e63a71 ("net/memif: introduce memory interface PMD")
Cc: stable@dpdk.org

Signed-off-by: Július Milan <jmilan.dev@gmail.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-03-18 10:21:41 +01:00
Július Milan
cbbbbd3365 net/memif: enable loopback
With this patch it is possible to connect 2 DPDK memifs into loopback,
i.e. when they have the same id and different roles, as for example:
  "--vdev=net_memif0,role=master,id=0"
  "--vdev=net_memif1,role=slave,id=0"

Signed-off-by: Július Milan <jmilan.dev@gmail.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-03-18 10:21:41 +01:00
Tonghao Zhang
a6e7cd81fa common/mlx5: fix build without dlopen option
When setting the CONFIG_RTE_BUILD_SHARED_LIB to y,
and build the mlx5 pmd, there is a building error.
To fix it, add RTE_IBVERBS_LINK_DLOPEN to include
relative codes.

    mlx5_common.o: In function `mlx5_glue_init':
    drivers/common/mlx5/mlx5_common.c:324: undefined reference to `dlclose'

Fixes: 7b4f1e6bd3 ("common/mlx5: introduce common library")
Cc: stable@dpdk.org

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-03-18 10:21:41 +01:00
Dekel Peled
e8e5fdfdd6 net/mlx5: support match on IPv4 TTL and IPv6 HLIM
This patch adds to MLX5 PMD the support of matching on IPv4 TTL and
IPv6 hoplimit.
Support is valid when using DV flow engine (Verbs flow engine doesn't
support matching on this field).

Signed-off-by: Eli Britstein <elibr@mellanox.com>
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-03-18 10:21:41 +01:00
Dekel Peled
6bd5efb23d net/mlx5: fix mask used for IPv6 item validation
The nic_mask struct in function mlx5_flow_validate_item_ipv6()
includes hop_limits field.
This is redundant since matching on this item is not supported using
Verbs flow engine (dv_flow_en=0).

(Separate patch will be sent to handle this issue for DV flow engine.)

Setting a rule including match on this field will fail:
testpmd> flow create 0 ingress pattern eth / ipv6 hop is 1 / end actions
drop / end
port_flow_complain(): Caught PMD error type 1 (cause unspecified):
hardware refuses to create flow: Operation not supported

This patch removes the redundant field from nic_mask, to ensure that
such flow rules will be rejected by PMD validation:
testpmd> flow create 0 ingress pattern eth / ipv6 hop is 1 / end actions
drop / end
port_flow_complain(): Caught PMD error type 13 (specific pattern item):
cause: 0x7fffffffa2c8, mask enables non supported bits: Operation not
supported

The related lines in function flow_verbs_translate_item_ipv6() are
removed as well, since they are redundant.

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

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-03-18 10:21:41 +01:00
Qi Zhang
af3f83032b net/ice: remove bulk alloc option
Remove CONFIG_RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC with below
consideration:

1. A default Rx path can always be selected by setting a proper
   rx_free_thresh value at runtime, see
   ice_check_rx_burst_bulk_alloc_preconditions.

2. Its not a big deal to always reserve more space for desc ring.
   "ring_size = (uint16_t)(rxq->nb_rx_desc + ICE_RX_MAX_BURST);"

3. Fixes a potential invalid memory access in ice_reset_rx_queue.
   If CONFIG_RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC is turned on while
   ice_check_rx_burst_bulk_alloc_preconditions return fail.
   Below code will have problem.

   for (i = 0; i < ICE_RX_MAX_BURST; ++i)
   	rxq->sw_ring[rxq->nb_rx_desc + i].mbuf = &rxq->fake_mbuf;

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

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-03-18 10:21:41 +01:00
Igor Romanov
a8bcd99de4 net/sfc: fix Rx queue start failure path
Call correct cleanup operations on failure in Rx queue start function.

Fixes: df1bfde4ff ("net/sfc: factor out libefx-based Rx datapath")
Fixes: 28944ac098 ("net/sfc: implement Rx queue start and stop operations")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2020-03-18 10:21:41 +01:00
Ivan Malov
2e2e5bdf90 net/sfc: generalise flow pattern item processing
This is needed to reuse pattern processing engine for MAE.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2020-03-18 10:21:41 +01:00
Ivan Malov
4f867ad6a0 net/sfc: generalise flow start and stop path
As a preparation step, generalise flow start and stop path using
callbacks.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2020-03-18 10:21:41 +01:00
Ivan Malov
5b2b9236aa net/sfc: generalise flow parsing
Generalise flow attribute parsing function in regard to transfer attribute.
Add a method table and factor out VNIC-specific parsing code as a callback.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2020-03-18 10:21:41 +01:00
Ivan Malov
7ba166841c net/sfc: introduce flow allocation and free path
Riverhead boards maintain support for MAE, a low-level Match-Action Engine.
The upcoming patches will bring support for MAE to RTE flow implementation.

A follow-up patch will introduce MAE-specific specification cleanup method.
In order to prepare for the patch, introduce flow allocation and free path.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2020-03-18 10:21:41 +01:00
Ivan Malov
6f63bf7bda net/sfc: generalise flow specification structure
Add the concept of a flow specification type.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2020-03-18 10:21:41 +01:00
Ivan Malov
1962171292 net/sfc: make flow list engine-agnostic
A backend which a driver employs to handle flow rules of a given
type depends on the underlying NIC flow engine. The driver in
question in its current state is tailored to support the only
flow engine, VNIC filtering. As the need arises to add support
for transfer rules, the driver has to be reworked so that it
becomes possible to introduce yet another backend.

As a preparation step, make the flow list shared
between different engines.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2020-03-18 10:21:41 +01:00
Ivan Malov
7571c08d9f net/sfc: make flow RSS details VNIC-specific
The flow specification structure will be transformed to a generic one, and
its current contents will be fenced off to form a VNIC-specific parameters.
Flow RSS details do not belong to the said specification currently, albeit
being VNIC-specific. This patch addresses this issue as a preparation step.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2020-03-18 10:21:41 +01:00
Chandu Babu N
e01d9b2e98 net/axgbe: support unicast hash table for MAC address
Implement eth_dev_ops uc_hash_table_set and uc_all_hash_table_set

Signed-off-by: Chandu Babu N <chandu@amd.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
2020-03-18 10:21:41 +01:00
Chandu Babu N
49a5e6226a net/axgbe: support setting MAC address
Supports adding MAC addresses to enable whitelist filtering to
accept packets
implement eth_dev_ops mac_addr_set, mac_addr_add, mac_addr_remove and
set_mc_addr_list

Signed-off-by: Chandu Babu N <chandu@amd.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
2020-03-18 10:21:41 +01:00
Shougang Wang
b1eca6cc85 net/i40e: fix DCB initialization
Stopping LLDP is necessary for DPDK, but it will cause DCB init failure.
For kernel shared code, the prerequisite for successful initialization
of DCB is that LLDP is enabled. This patch starts LLDP before DCB init
and stops it when init finishes.

Fixes: a8e84b22bd ("net/i40e/base: support persistent LLDP")
Cc: stable@dpdk.org

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-03-18 10:21:41 +01:00
Igor Romanov
ba77f3e171 net/sfc: fix initialization error path
NIC deinitialization should not happen after a failed NIC
initialization.

Fixes: 91831d4068 ("net/sfc: estimate available resources")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2020-03-18 10:21:41 +01:00
Eduard Serra
52ec00fd14 net/vmxnet3: fix RSS setting on v4
When calling to setup RSS on v4 API, ESX will expect
IPv4/6 TCP RSS to be set/requested mandatory.

This patch will:
- Set IPv4/6 TCP RSS when these have not been set. A warning
message is thrown to make sure we warn the application we are
setting IPv4/6 TCP RSS when not set.
- An additional check has been added to dodge RSS configuration
altogether unless MQ_RSS has been requested, similar to v3.

The alternative (returning error) was considered, the intent
is to ease the task of setting up and running vmxnet3 in situations
where it's supposed to be most straightforward (testpmd, pktgen).

Bugzilla ID: 400
Fixes: 643fba7707 ("net/vmxnet3: add v4 boot and guest UDP RSS config")
Cc: stable@dpdk.org

Signed-off-by: Eduard Serra <eserra@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2020-03-18 10:21:41 +01:00
Selwin Sebastian
965b3127d4 net/axgbe: support scattered Rx
Enable scattered rx support and add jumbo packet receive capability

Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
2020-03-18 10:21:41 +01:00
Andrew Rybchenko
9d28d6b0b0 net/sfc: fix reported promiscuous/multicast mode
Requested promiscuous or all-multicast mode may be dropped on port
start if FW denies to enable it (e.g. because of no permission
in the case of VF). Return applied value on get.

Fixes: f5258439ee ("net/sfc: avoid failure on port start if Rx mode is rejected")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2020-03-18 10:21:41 +01:00
Gaetan Rivet
c4169faf9d doc: fix number of failsafe sub-devices
Supporting more than 2 sub-device is a remnant from earlier fail-safe
design, that was never actually published.

Fixes: a46f8d584e ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org

Signed-off-by: Gaetan Rivet <grive@u256.net>
2020-03-18 10:21:41 +01:00
Gaetan Rivet
b340b41de0 doc: improve failsafe guide
Reading the fail-safe doc with a few years added, a few phrasing
choices are ambiguous or confusing.

Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
2020-03-18 10:21:41 +01:00
Qi Zhang
31108c69ba net/ice: remove unnecessary variable
Remove unnecessary variable "meta" in ice_flow_create and
ice_flow_validate, it should be defined when really needed:
its ice_parse_engine_create and ice_parse_engine_validate.

A meta data created by parser->parse_pattern_action should be
freed inside parser->engine->create.

During a validate operation, since parser->engine_>create will not
be invoked, it is unnecessary to create a meta during parser, so
NULL will passed to engine->parse_pattern_action and all parser's
parse_pattern_action need to be modified to handle meta = NULL
properly.

With above implementation, the patch also fixes a potential memory
leak in ice_parse_engine_validate, since meta may not be freed.

BTW, an engine without a create op should be regarded as a bug. So
use RTE_ASSERT to replace runtime engine->create == NULL check in
ice_parse_engine_create.

Fixes: 4e27d3ed02 ("net/ice: fix flow API framework")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-03-18 10:21:41 +01:00
Alex Marginean
d84612e9bd net/enetc: init SI transactions attribute register
This was left to its default value.  With the patch transactions are:
- coherent,
- do not allocate in downstream cache (there is none on LS1028a),
- merge surrounding data for BD writes,
- overwrite surrounding data for frame data writes.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
2020-03-18 10:21:41 +01:00
Alex Marginean
515e4eab2b net/enetc: improve prefetch in Rx ring clean
LS1028A does not have platform cache so any reads following a hardware
write will go directly to DDR.  Latency of such a read is in excess of
100 core cycles, so try to prefetch more in advance to mitigate this.
How much is worth prefetching really depends on traffic conditions.
With congested Rx this could go up to 4 cache lines or so.  But if
software keeps up with hardware and follows behind Rx PI by a cache line
then it's harmful in terms of performance to cache more.  We would only
prefetch data that's yet to be written by ENETC, which will be evicted
again anyway.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
2020-03-18 10:21:41 +01:00
Alex Marginean
4df8bf0171 net/enetc: use bulk free in Tx clean
Use rte_pktmbuf_free_bulk to release all mbufs at once.  This is flagged
as obsolete/not yet stable in DPDK but seems to be functional.
Don't count the released frames, it's no longer needed in the caller.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
2020-03-18 10:21:41 +01:00
Alex Marginean
17d13fe659 net/enetc: use bulk alloc in Rx refill ring
Since we know in advance that we're going to fill in multiple
descriptors it's convenient to allocate the buffers in batches.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
2020-03-18 10:21:41 +01:00
Alex Marginean
66894d983e net/enetc: reorder BDR structure
Reorder the members of the structure so that the ones used on datapath
fit in a single cache line, to slightly reduce pressure on cache and
miss rate.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
2020-03-18 10:21:41 +01:00
Alex Marginean
11a6dc423b net/enetc: improve batching Rx ring refill
Move from doing batch refill of Rx ring from bundles of 8 to once per
enetc_clean_rx_ring call.  One benefit is that we're cleaning up all the
BDs that we just processed, which should still be cached.  The other is
that hardware Rx index stays a little back and doesn't cause contention
on the BDs processed in the Rx loop.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
2020-03-18 10:21:41 +01:00
Alex Marginean
880728f8d4 net/enetc: fix Rx lock-up
The default value in hardware for the Rx MAC FIFO (@) is higher than it
should be and can lead to Rx lock-up under traffic.
Set it to the value recommended by hardware team, 1.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2020-03-18 10:21:41 +01:00
Alex Marginean
9a6d2fae26 net/enetc: batch process clean Tx ring calls
Each call to enetc_clean_tx_ring will cost at least 150-200 CPU cycles
even if no clean-up is done, due to the CI register read.
We're only calling it once at the end of the function, on the assumption
that software is slower than hardware and hardware completed sending
older frames out by now.
We're also cleaning up the ring before kicking off Tx for the new batch
to minimize chances of contention on the Tx ring.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
2020-03-18 10:21:41 +01:00
Alex Marginean
8cb6b561ea net/enetc: relax read for Tx CI in clean Tx
We don't need barriers here since this read doesn't have to be strictly
serialized in relation to other surrounding memory/register accesses.
We only want a reasonably recent value out of hardware so we know how
much we can clean.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
2020-03-18 10:21:41 +01:00
Alex Marginean
6efb46f0e8 net/enetc: do not stall in clean Tx ring
Don't read the hardware CI register in a loop, read it once, clean up
and exit.
The issue with reading the register in a loop is that we're stalling
here trying to catch up with hardware which keeps sending traffic as
long as it has traffic to send, so in effect we could be waiting here
for the Tx ring to be drained by hardware, instead of us doing Rx in
that meantime.
At the time we return the function there may be new BDs in the ring that
could be cleaned, we're just leaving those there for the next time.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
2020-03-18 10:21:41 +01:00
Kalesh AP
48f9faddc6 net/bnxt: fix MAC address setting when port is stopped
Driver destroys the VNIC when the port is brought down.
Port HW filter setting such as default MAC address and
unicast MAC filters will be applied when port is started.

Fixed to return success silently for these callbacks
when port is stopped.

Fixes: 39b88344e3 ("net/bnxt: fix enable/disable VLAN filtering")
Cc: stable@dpdk.org

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2020-03-18 10:21:41 +01:00
Kalesh AP
10d6982008 net/bnxt: fix recovery alarm race condition in port close
There is a race condition when port is closed while error recovery
is happening in driver. Fixed this by canceling the recovery threads
during port close.

Fixes: df6cd7c1f7 ("net/bnxt: handle reset notify async event from FW")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
2020-03-18 10:21:41 +01:00
Tao Zhu
f761def512 net/ice: fix hash flow crash
Commit 'dc36bd5dfdeb' mistakenly initializes ret as -rte_errno, then
return ret if ice_search_pattern_match_item fails, if rte_errno happens
to be 0 in this case, it would cause an unrecognized flow rule to be
marked as recognition success. Later, when the code tries to parse the
flow rule, a segmentation fault will occur due to null pointer
reference.

Fixes: dc36bd5dfd ("net/ice: fix flow FDIR/switch memory leak")
Cc: stable@dpdk.org

Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-03-18 10:21:41 +01:00
Qiming Yang
b466857928 net/i40e: fix X722 performance
Lack of GL_SWR_PM_UP_THR value for mac type 4x10G X722 caused it can't
reach line rate in one queue one core forwarding case. It's about 1%
performance drop.  This patch adds value as:

 Device-ID  Value        Comments
 0x37D0    0x03030303   4x10G FPK

This value is hardware specific.

Fixes: 3320d4a240 ("net/i40e: workaround performance degradation")
Cc: stable@dpdk.org

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-03-18 10:21:41 +01:00
Stephen Hemminger
ccd37d341e net/af_packet: remove queue number limitation
Since qpairs is part of the vdev arguments, there is no need to
limit it to 16. The queue arrays can be dynamically sized based
on the requested parameters.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: John W. Linville <linville@tuxdriver.com>
2020-03-18 10:21:41 +01:00
Xiao Zhang
573ef95dc7 app/testpmd: parse flow command line for AH
Add AH and AH SPI to testpmd rte flow command line.
Add note and sample AH rules in testpmd guide.

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
2020-03-18 10:21:41 +01:00
Ophir Munk
3c3f27e905 net/mlx5: fix VLAN PCP item calculation
The VLAN 16 bits tci field contains both values of PCP and VID. When
extracting any one of them - it is required not to affect the other one.
Previous to this commit in routine flow_dev_get_vlan_info_from_items()
we calculated the PCP as follows:
    (1) vlan->vlan_tci &= MLX5DV_FLOW_VLAN_PCP_MASK;
    (2) vlan->vlan_tci |= <3 bits value of PCP>
In line (1) we should have used the negated mask ('~' operator) such
that only the PCP bits will be nullified before ORing them with the
updated PCP value.

Fixes: 9aee7a8418 ("net/mlx5: support push flow action on VLAN header")
Cc: stable@dpdk.org

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
2020-03-18 10:21:41 +01:00
Gavin Hu
bade47a757 net/i40e: relax barrier in Tx
To keep ordering of mixed accesses, rte_cio is sufficient.
The rte_io barrier inside the I40E_PCI_REG_WRITE is overkill.[1]

[1] http://inbox.dpdk.org/dev/CALBAE1M-ezVWCjqCZDBw+MMDEC4O9
qf0Kpn89EMdGDajepKoZQ@mail.gmail.com

Fixes: 4861cde461 ("i40e: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2020-03-18 10:21:41 +01:00
Xiao Zhang
496608a079 net/i40e: fix port start during config restore
If configuring VF promiscuous mode is not supported, return '-ENOTSUP'
error code in '.promiscuous_enable/disable' dev_ops.

This is to fix the port start during config restore, where if
'.promiscuous_enable/disable' dev_ops exists and return any value other
than '-ENOTSUP', start will fail.

Same is done for '.allmulticast_enable/disable' dev_ops.

Fixes: ddc7cb0d94 ("net/i40e: re-program promiscuous mode on VF interface")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-03-18 10:21:41 +01:00