Commit Graph

11455 Commits

Author SHA1 Message Date
Michael Baum
ebed623f62 net/mlx5: fix hairpin Rx queue creation error path
The mlx5_rxq_obj_hairpin_new function defines a pointer named tmpl and
allocates memory for it using the rte_zmalloc_socket function.
Later, this function allocates memory to a variable inside tmpl using
the mlx5_devx_cmd_create_rq function.

In both cases, if the allocation fails, the code jumps to the error
label and frees allocated resources. However, in the first jump there
are still no resources to free and the jump only for the line return
NULL is unnecessary. Even worse, when it jumps to error label with
invalid tmpl it actually does dereference to a null pointer.
In contrast, the second jump needs to free the tmpl variable but the
function instead of freeing, tries to free the variable that it just
failed to allocate.
In addition, for another error, the function returns NULL without
freeing the tmpl variable before, causing a memory leak.

Delete the error label and replace each jump with local return NULL and
free tmpl variable if needed.

Fixes: e79c9be915 ("net/mlx5: support Rx hairpin queues")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-06-02 16:06:23 +02:00
Michael Baum
7e6eba619d net/mlx5: fix hairpin Tx queue creation error path
The mlx5_txq_obj_hairpin_new function defines a pointer named tmpl and
allocates memory for it using the rte_zmalloc_socket function.
Later, this function allocates memory to a variable inside tmpl using
the mlx5_devx_cmd_create_sq function.

In both cases, if the allocation fails, the code jumps to the error
label and frees allocated resources. However, in the first jump there
are still no resources to free and the jump only for the line return
NULL is unnecessary. Even worse, when it jumps to error label with
invalid tmpl it actually does dereference to a null pointer.
In contrast, the second jump needs to free the tmpl variable but the
function instead of freeing, tries to free the variable that it just
failed to allocate, and another variable that has never been allocated.
In addition, for another error, the function returns NULL without
freeing the tmpl variable before, causing a memory leak.

Delete the error label and replace each jump with local return NULL and
free tmpl variable if needed.

Fixes: ae18a1ae96 ("net/mlx5: support Tx hairpin queues")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-06-02 16:06:23 +02:00
Haiyue Wang
f1f8872a79 net/ice: fix PCI DSN to lowercase
The PCI DSN (device serial number) to format package file name should be
lowercase values.

Fixes: d1c91179e9 ("net/ice: check DSN package file firstly")
Cc: stable@dpdk.org

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-06-02 12:46:44 +02:00
Yunjian Wang
df2123474d net/bnxt: fix missed unlock
Coverity issue: 357741
Fixes: 02a95625fe ("net/bnxt: add flow stats in extended stats")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-05-28 17:57:07 +02:00
Mike Baucom
2e449a26e7 net/bnxt: fix mark action if rule is at index zero
In the ingress path, the cfa_code field in Rx completion identifies the
CFA action rule that was used for the incoming packet. It is possible
that the packet could hit the rule at index 0 in the table.
The mark action code was too restrictive by disallowing a cfa_code of
zero.
This code loosens the requirement and allows zero.

Fixes: b87abb2e55 ("net/bnxt: support marking packet")
Cc: stable@dpdk.org

Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-05-28 17:57:07 +02:00
Jeff Guo
1051b8db94 net/iavf: fix flow uninit
When closing VF device, the process of shutdown adminq should be after
the process of uninit the flow, since the VF might still need to use the
adminq to uninit flow.

Fixes: 9e03acd726 ("net/iavf: fix flow access")
Fixes: ff2d0c345c ("net/iavf: support generic flow API")
Cc: stable@dpdk.org

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-05-28 17:57:07 +02:00
Stephen Hemminger
3c9be81be9 net/netvsc: do not spin forever waiting for reply
Because of bugs in driver or host a reply to a request might
never occur. Better to give an error than spin forever.

Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-05-28 17:57:07 +02:00
Stephen Hemminger
501a7e5735 net/netvsc: process link change messages in alarm
The original code would deadlock itself if a link change event
happened with link state interrupt enabled. The problem is that
the link state changed message would be seen while reading
the host to guest ring (under lock) and then the driver would
send a query to the host to see the new link state. The response
would never be seen (stuck in a while loop) waiting for the
response.

The solution is to use the link change indication to trigger
a DPDK alarm. The alarm will happen in a different thread and
in that context it can send request for new link state and
also do interrupt callback. This is similar to how the bonding
driver is handling the same thing.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-05-28 17:57:07 +02:00
Stephen Hemminger
a4f53bec7c net/netvsc: do not query VF link state
When the primary device link state is queried, there is no
need to query the VF state as well. The application only sees
the state of the synthetic device.

Fixes: dc7680e859 ("net/netvsc: support integrated VF")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-05-28 17:57:07 +02:00
Stephen Hemminger
c6854a4126 net/netvsc: fix warning when VF is removed
The code to unset owner of VF device was changing port to invalid
value before calling unset.

Fixes: 4a9efcddad ("net/netvsc: fix VF support with secondary process")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-05-28 17:57:07 +02:00
Stephen Hemminger
b757deb8e3 net/netvsc: change datapath logging
The PMD_TX_LOG and PMD_RX_LOG can hide errors since this
debug log is typically disabled. Change the code to use
PMD_DRV_LOG for errors.

Under load, the ring buffer to the host can fill.
Add some statistics to estimate the impact and see other errors.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-05-28 17:57:07 +02:00
Stephen Hemminger
a41ef8eefe net/netvsc: implement descriptor status
These functions are useful for applications and debugging.
The netvsc PMD also transparently handles the rx/tx descriptor
functions for underlying VF device.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-05-28 17:57:07 +02:00
Stephen Hemminger
c7b82b14e3 net/netvsc: support per-queue info requests
There is not a lot of info here from this driver.
But worth supporting these additional info queries.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2020-05-28 17:57:07 +02:00
Ajit Khaparde
83b4bf39ec net/bnxt: fix crash during close
We are freeing flow_stats a little early. This results in a
segfault when the driver accesses the members during cleanup.
Move the call to bnxt_free_flow_stats_info() to prevent this.

Fixes: 02a95625fe ("net/bnxt: add flow stats in extended stats")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-05-28 17:57:07 +02:00
Rahul Gupta
bfc1d45875 net/bnxt: fix performance for Arm
Eliminate unnecessary rte_smp_wmb() before writing to request/completion
doorbells. Use rte_cio_wmb() memory barrier instead of rte_io_wmb()
before writing to tx/rx request queue doorbells and use
rte_compiler_barrier() before writing to tx/rx completion queue
doorbells.

Fixes: 4af9d0c729 ("net/bnxt: cleanup NQ doorbell")
Fixes: f8168ca0e6 ("net/bnxt: support thor controller")
Cc: stable@dpdk.org

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
2020-05-28 17:57:07 +02:00
Kalesh AP
0466d286cd net/bnxt: fix setting link speed
bnxt PMD uses the macro BNXT_SUPPORTED_SPEEDS to validate
the user requested speed. But this has all the speed values
supported by the PMD and is not chip specific.

The check against this macro returns success when the user
tries set the speed to 100G on a port even if the chip does
not support 100G speed.

Fixed it to use bnxt_get_speed_capabilities() to check the
supported speeds by the chip.

Fixes: 1d0704f4d7 ("net/bnxt: add device configure operation")
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>
2020-05-28 17:57:07 +02:00
Lijun Ou
40783b1280 net/hns3: fix key length when configuring RSS
When users set the length of RSS hash key greater than the supported
length by hardware, the driver should intercept and can not configure
the wrong key into the hardware.

Fixes: c37ca66f2b ("net/hns3: support RSS")
Cc: stable@dpdk.org

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
2020-05-28 17:57:07 +02:00
Lijun Ou
fdae939696 net/hns3: add RSS hash offload to Rx configuration
Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
enable/disable PMDs write to `rte_mbuf:#️⃣:rss`. The hns3 PMD driver
already can notify the validity of `rte_mbuf:#️⃣rss` to the
application by enabling `PKT_RX_RSS_HASH` flag in `rte_mbuf::ol_flags`.

Fixes: 19a3ca4c99 ("net/hns3: add start/stop and configure operations")
Fixes: c37ca66f2b ("net/hns3: support RSS")
Cc: stable@dpdk.org

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
2020-05-28 17:57:07 +02:00
Wei Hu (Xavier)
16c374402f net/hns3: fix Tx less than 60 bytes
Currently, when running testpmd application based on hns3 network engine
with csum fwd mode by "set fwd csum" command in the prompt line, sending
42 consecutive bytes of ARP packets to network port with packets
generator. But in fact hardware can't send the ARP packets and the
related logs as below:
"Preparing packet burst to failed: Invalid argument"

The hardware doesn't support transmit packets less than 60 bytes, and in
the '.tx_pkt_burst' ops implementation function named hns3_xmit_pkts
appending operation has been added for less than 60 bytes packets. So
the interception needs to be removed in the '.tx_pkt_prepare' ops
implementation function named hns3_prep_pkts.

Fixes: de620754a1 ("net/hns3: fix sending packets less than 60 bytes")
Fixes: bba6366983 ("net/hns3: support Rx/Tx and related operations")
Cc: stable@dpdk.org

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Hao Chen <chenhao164@huawei.com>
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
2020-05-28 17:57:07 +02:00
Chengchang Tang
3f28ec4a88 net/hns3: clear promiscuous on PF uninit
Currently, promiscuous mode configuration are not cleared during
uninstallation based on hns3 PF device. The residual entries may cause
unnecessary bandwidth usage.

So, we need clear the PF's promisc mode status during the uninit.

Fixes: a45fd0aa0e ("net/hns3: fix Rx queue search with broadcast packet")
Fixes: d51867db65 ("net/hns3: add initialization")
Cc: stable@dpdk.org

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
2020-05-28 17:57:07 +02:00
Chengchang Tang
e7eb703f8b net/hns3: replace special vport ids with macros
In hns3 PMD driver, the vport id 0 denote PF, and the vport id 1 denote
the first VF device of the port.

This patch adds two macros named HNS3_PF_FUNC_ID and
HNS3_1ST_VF_FUNC_ID, and replaces this two numbers to improve code
readability.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
2020-05-28 17:57:07 +02:00
Jeff Guo
c9da9d4183 net/iavf: fix RSS protocol field selector
When VFs configure the rss rule by virtchnl, it need to set bit mask
into the field selector for the protocol, then PF got the configure
massage and parse the field selector to the corresponding protocol
field.

Fixes: 7be10c3004 ("net/iavf: add RSS configuration for VF")
Cc: stable@dpdk.org

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Zhiwei He <zhiwei.he@intel.com>
2020-05-28 17:57:07 +02:00
Wei Zhao
59d3870c7f net/ice: fix switch action number check
The action number for switch filter should be 1, any
other such as 0 or more than 1 is invalid.

Fixes: 3428c6b6ec ("net/ice: add action number check for switch")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Qimai Xiao <qimaix.xiao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-05-28 17:57:07 +02:00
Guinan Sun
dd8384a4f5 net/ixgbe: check driver type in MACsec API
The driver type need to be checked in private API.

Fixes: 50556c8810 ("net/ixgbe: fix MACsec setting")
Cc: stable@dpdk.org

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-05-22 18:02:52 +02:00
Wei Zhao
be4ef2e0d0 net/i40e: fix flow director enabling
When we flush flow FDIR, all queues are disabled for FDIR.
If FDIR rule is created again, then the flow list is empty,
as it is the first time to create rule after flush fdir filter,
so we need to enable FDIR for all queues.
And also, disable FDIR for queues should be done in function
i40e_flow_flush_fdir_filter().

Fixes: 1491f63c75 ("net/i40e: fix flush of flow director filter")
Fixes: 6ae9b2b5e8 ("net/i40e: cache flow director enable value in Rx queue")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Jeff Guo <jia.guo@intel.com>
2020-05-22 17:10:15 +02:00
Jeff Guo
9e03acd726 net/iavf: fix flow access
Add invalid flow checking func in iavf generic flow to avoid the error
of "Cannot access memory at address 0xXXXXXX" occur.

When hash init, the default RSS rules would be added, while hash uninit,
the default RSS rules should be deleted. Add the missing part in the
hash uninit process.

Fixes: 5ea6142543 ("net/iavf: fix VF reset for RSS")
Fixes: ff2d0c345c ("net/iavf: support generic flow API")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
2020-05-22 17:10:15 +02:00
Jeff Guo
c9047db4af net/ice: fix setting L2TAG
Base on HW, if a packet is split into multiple segments, the L2TAG
should only be valid on the last Rx descriptor. So fix it by setting
L2TAG into mbuf when processing the last split packet.

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

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-05-22 17:10:15 +02:00
Jeff Guo
2482a99f30 net/iavf: fix setting L2TAG
Base on HW, if a packet is split into multiple segments, the L2TAG
should only be valid on the last Rx descriptor. So fix it by setting
L2TAG into mbuf when processing the last split packet.

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

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-05-22 17:10:15 +02:00
Jeff Guo
61b26a9c5a net/i40e: fix setting L2TAG
Base on HW, if a packet is split into multiple segments, the L2TAG
should only be valid on the last Rx descriptor. So fix it by setting
L2TAG into mbuf when processing the last split packet.

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

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-05-22 17:10:15 +02:00
Dekel Peled
b0447b5470 net/mlx5: revert DevX preference for Rx objects
Recent patch exposed a minor performance issue,
so it is reverted.

Fixes: d237d22fbe ("net/mlx5: prefer DevX API to create Rx objects")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-05-21 17:59:29 +02:00
Igor Romanov
977424c2cc net/sfc/base: fix manual filter delete in EF10
When user requests a filter deletion only filter with
manual priority must be deleted. When an automatic filter has
the same specification, it must be skipped.

Fixes: 585c22edb2 ("net/sfc/base: handle manual and auto filter clashes in EF10")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2020-05-21 17:38:12 +02:00
Xiaoyun Wang
c6f9f0b7d4 net/hinic: fix TSO
When TSO MSS is smaller than 80, and the sum length of continuous
sge num is larger than a MSS, which may cause hardware failed,
so in this scenarios pmd driver should adjust the tso_segsz with
the same with the value of hardware supported.

Fixes: 076221c8fe ("net/hinic: add Rx/Tx")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
2020-05-21 17:12:27 +02:00
Ankur Dwivedi
357439ad09 net/octeontx2: fix buffer size assignment
The elt_size field in mempool holds the size of one packet buffer.
It can be used to set the lpm_sizem1 field in rq context.

The lpb_sizem1 field in rq context is 12 bit, direct assignment
to it was causing overflow of value. Because of this errors
were observed while trying inline inbound with large packets.
This patch resolves the errors.

Fixes: 094fc8a3a1 ("net/octeontx2: add Rx queue setup and release")
Cc: stable@dpdk.org

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2020-05-21 15:53:14 +02:00
Rahul Gupta
20cb28a0ec net/bnxt: fix Rx ring producer index
When a queue is started after deferred_start, then increment raw_prod
irrespective of new mbuf is allocated or old mbufs are used.

Fixes: d256c73c11 ("net/bnxt: fix memory leak during queue restart")
Cc: stable@dpdk.org

Signed-off-by: Rahul Gupta <rahul.gupta@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>
2020-05-21 15:53:14 +02:00
Leyi Rong
514d1c989d net/iavf: fix flow director after queue reconfigured
FDIR ID parsing will not be handled correctly after queue reconfigured,
enable FDIR ID parsing per Q regardless of fdir_ref_cnt to fix it.

Fixes: f71dbf852d ("net/iavf: add flow director enabled switch value")

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-05-21 15:53:14 +02:00
Qi Zhang
3ccf61bc1e net/ice/base: fix tunnel type match word handling
Use a common function when selecting the proper word and mask match for
a tunnel type when programming switch rules.

Store switch recipe field mask as little endian, which avoids needing to
convert back to big endian after reading recipe from FW.

Obtain word mask from FW recipe.

Fix word matching element and index pairing.

Fixes: fed0c5ca5f ("net/ice/base: support programming a new switch recipe")
Cc: stable@dpdk.org

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2020-05-21 15:53:14 +02:00
Thomas Monjalon
7f55a2053b net/mvpp2: fix build with gcc 10
GCC 10 is detecting the enum mismatch when assigning UDP variables
with MUSDK constants for TCP.

drivers/net/mvpp2/mrvl_flow.c:2521:47: error: implicit conversion
from 'enum mv_net_tcp_fields' to 'enum mv_net_udp_fields'
[-Werror=enum-conversion]

An assigned field is also fixed from "tcp" to "udp".

Fixes: 7235341d75 ("net/mrvl: support classifier")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Liron Himi <lironh@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
2020-05-21 15:41:48 +02:00
Ferruh Yigit
0ff708ed6f bus/fslmc: drop inline from non-static functions
There is no point in having non-static (and non-extern) inline
functions.

Also this breaks the build for the ICC [1] because of the 'internal'
symbol check.

When function is 'inline' ICC is ignoring 'section' attribute and not
putting function to 'internal' section which breaks 'check-symbols.sh'
script with below error.

[1]
qbman_swp_dqrr_next is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of qbman_swp_dqrr_next
qbman_swp_enqueue_multiple is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of qbman_swp_enqueue_multiple
qbman_swp_enqueue_multiple_desc is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of qbman_swp_enqueue_multiple_desc
qbman_swp_enqueue_multiple_fd is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of qbman_swp_enqueue_multiple_fd
qbman_swp_pull is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of qbman_swp_pull
qbman_swp_release is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of qbman_swp_release

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2020-05-20 15:15:48 +02:00
Jeff Guo
5ea6142543 net/iavf: fix VF reset for RSS
Since there are some default rss configure in kernel PF/VF but not DPDK
IAVF, if these configurations be modified by VF and then VF reset, this
default rss configurations can not be reset to default by IAVF. So need
to add default rss set in IAVF hash initial process.

Fixes: 7be10c3004 ("net/iavf: add RSS configuration for VF")
Cc: stable@dpdk.org

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Zhiwei He <zhiwei.he@intel.com>
2020-05-19 17:12:17 +02:00
Qiming Yang
6cc330b709 net/i40e: fix queue related exception handling
There should have different behavior in queue start fail and stop fail
case.  When queue start fail, all the next actions should be terminated
and then started queues should be cleared. But for queue stop stage, one
queue stop fail should not end other queues stop. This patch fixed that
issue in PF and VF.

Fixes: b6583ee402 ("i40e: full VMDQ pools support")
Fixes: 3f6a696f10 ("i40evf: queue start and stop")
Cc: stable@dpdk.org

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-05-19 17:12:16 +02:00
Qi Zhang
31fc9249c7 net/ice: fix RSS for GTPU
All supported pattern for GTPU include extend header:
pattern_eth_ipv4_gtpu_eh_ipv4
pattern_eth_ipv4_gtpu_eh_ipv4_udp
pattern_eth_ipv4_gtpu_eh_ipv4_tcp

So the RSS rule should only take effect on GTPU packet that contains
extend header. The patch fix above issue and also allow inner l4 port
as input set.

Fixes: c08a72c79c ("net/ice: fix pattern name of GTPU with extension header")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Tested-by: Simei Su <simei.su@intel.com>
2020-05-19 17:12:16 +02:00
Wei Zhao
b342fd9084 net/i40e: fix wild pointer
In i40e PMD code of function i40e_res_pool_free(), if valid_entry
is freed by "rte_free(valid_entry);" in the code, then the following
code for pool update may still use the wild pointer "valid_entry"
for pool info update. It seems has the risk of core dump for
using wild pointer operation, we should avoid this risk.

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

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-05-19 17:12:16 +02:00
Pavan Nikhilesh
31246a328f mempool/octeontx2: add devargs to lock context in cache
Add device arguments to lock NPA aura and pool contexts in NDC cache.
The device args take hexadecimal bitmask where each bit represent the
corresponding aura/pool id.
Example:
	-w 0002:02:00.0,npa_lock_mask=0xf // Lock first 4 aura/pool ctx

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2020-05-19 18:28:58 +02:00
Darek Stojaczyk
a842899e91 build: skip config of explicitly disabled drivers
Even when a PMD was disabled with meson's disable_drivers option
its config file was still being parsed. Some of the PMD configs
attempt to find a library they depend on and parse its header files
with certain assumptions. If the library is found, but it's simply
too old to contain the necessary header files, the meson build
fails and it can only be fixed by either updating that library, or
expanding the meson script for the faulty PMD.

While the latter should be still done for the sake of DPDK quality,
an intermediate solution would be to skip building the faulty PMD
- there's a chance we don't need it. That's what this patch allows.

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2020-05-19 16:52:22 +02:00
Muhammad Bilal
5a448a55b4 fix same typo in multiple places
Removed the typing error in doc/guides/eventdevs/index.rst,
drivers/net/mlx5/mlx5.c and in lib/librte_vhost/rte_vhost.h

Bugzilla ID: 477
Fixes: 0857b94211 ("doc: add event device and software eventdev")
Fixes: 039253166a ("vhost: add device op when notification to guest is sent")
Fixes: ad74bc6195 ("net/mlx5: support multiport IB device during probing")
Cc: stable@dpdk.org

Signed-off-by: Muhammad Bilal <m.bilal@emumba.com>
2020-05-19 15:55:57 +02:00
Hemant Agrawal
ab72057ada bus/fslmc: remove unused internal symbol
rte_dpaa2_memsegs is not being used by any other library
or even within bus.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2020-05-19 15:49:53 +02:00
Hemant Agrawal
a6a5f4b48b bus/fslmc: add accessor for MCP
Currently rte_mcp_ptr_list is being shared as a variable
across libs. This is only used in control path.
This patch change it to a exported function based access.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2020-05-19 15:49:53 +02:00
Hemant Agrawal
051ae3af3e bus/dpaa: add accessor for netcfg
This patch changes the export of fman port config
as function call instead of direct variable access.
This is in control path, so it will not impact perf.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2020-05-19 15:49:53 +02:00
Hemant Agrawal
df80d4f87f bus/dpaa: move log types to NXP drivers
This is to reduce the number of variables getting exposed
from the dpaa bus. They are not required to be in bus.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2020-05-19 15:49:53 +02:00
Hemant Agrawal
a8ee206a1b bus/dpaa: add accessor for qman portal ids
qman caam and pool portal ids are only used in control
path. This patch changes their inter library access to
function call instead of direct shared variable.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
2020-05-19 15:49:53 +02:00