Commit Graph

6674 Commits

Author SHA1 Message Date
Igor Romanov
617d1ac2fd net/bonding: use evenly distributed default RSS RETA
Default Redirection Table that is set in bonding driver is distributed
evenly over all Rx queues only within every RETA group (the first RETA
entries in every group are always start with zero). But in the most
drivers, default RETA is distributed over all Rx queues without sequence
resets in the beginning of a new group, which implies more balanced
per-core load.

Change the default RETA to be evenly distributed over all Rx queues
considering the whole table.

Fixes: 734ce47f71 ("bonding: support RSS dynamic configuration")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Chas Williams <chas3@att.com>
2018-09-14 20:08:41 +02:00
Igor Romanov
862b35afca net/sfc: support runtime Tx queue setup
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-14 20:08:41 +02:00
Igor Romanov
0668a27a62 net/sfc: support runtime Rx queue setup
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-14 20:08:41 +02:00
Shagun Agrawal
fefee7a619 net/cxgbe: add flow ops to match based on dest MAC
Add flow operations to match packets based on destination MAC address.
Allocate and program hardware MPS table with the destination MAC
address to be matched against. The returned MPS index is then used while
offloading flows to LETCAM (maskfull) and HASH (maskless) filter regions.

Also update existing mac_addr_set() to use the new MPS table API.

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-09-14 20:08:41 +02:00
Shagun Agrawal
6fda3f0ddd net/cxgbe: add API to program hardware MPS table
Add API to program and manage hardware Multi Port Switch table. MPS
holds destination MAC addresses to be matched against incoming packets
for further rule processing. Packets not matching any entry in MPS table
will be dropped by default, unless the underlying port is in promiscuous
mode.

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-09-14 20:08:41 +02:00
Shagun Agrawal
1decc62b1c net/cxgbe: add flow operations to offload VLAN actions
Add flow API operations to offload vlan push, pop, and rewrite actions.
For vlan push or rewrite actions, allocate and program an entry from
L2T table. Use the L2T index to program vlan actions for LETCAM
(maskfull) and HASH (maskless) filters.

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-09-14 20:08:41 +02:00
Shagun Agrawal
23af667f15 net/cxgbe: add API to program hardware layer 2 table
Add API to program and manage hardware Layer 2 Table. L2T holds
information necessary to rewrite specific fields in packet, such
as destination MAC address and vlan id.

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-09-14 20:08:41 +02:00
Chas Williams
044846f071 net/i40e: stop LLDP before setting local LLDP MIB
>From the Intel Ethernet Controller X710/XXV710/XL710 Specification
Update:

    Starting from NVM 5.02, if the Set Local LLDP MIB command is
    received while the DCBx specific agent is stopped, the command
    returns an EPERM error. If the command is received while the
    LLDP agent is stopped, it sets the local MIB without exchanging
    LLDP with peer, and returns SUCCESS.

This results in the harmless, but annoying, diagnostic:

    default dcb config fails. err = -53, aq_err = 1.

So, if possible (older firmwares cannot safely stop LLDP), stop the
LLDP daemon when we are in software mod before we attempt to call
i40e_set_dcb_config.

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-14 20:08:41 +02:00
Beilei Xing
4205c7ccec net/i40e: add alarm handler
This patch adds alarm handler, and then i40e
PF will use alarm handler instead of interrupt
handler when device is started and Rx interrupt
mode is disabled. This way will save CPU cycles
during receiving packets.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-14 20:08:41 +02:00
Eric Zhang
1db4d2330b net/virtio-user: check negotiated features before set
This patch checks negotiated features to see if necessary to offload
before set the tap device offload capabilities. It also checks if kernel
support the TUNSETOFFLOAD operation.

Fixes: 5e97e42025 ("net/virtio-user: enable offloading")
Cc: stable@dpdk.org

Signed-off-by: Eric Zhang <eric.zhang@windriver.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
2018-09-12 19:10:09 +02:00
Xueming Li
3afdf157fc net/mlx5: fix interrupt completion queue index wrapping
Rxq cq_ci was 16 bits while hardware is expecting to wrap
around 24 bits, this caused interrupt failure after burst of packets.

Fixes: 43e9d9794c ("net/mlx5: support upstream rdma-core")
Cc: stable@dpdk.org

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-09-10 13:59:03 +02:00
Luca Boccassi
8fd55a0794 net/ixgbe: do not return internal code
In case of a temporary failure the ixgbe driver can return the internal
error IXGBE_ERR_RESET_FAILED to the application. Instead, return
-EAGAIN as per the public API specification.

Fixes: cddaf87a1e ("lib: fix unused values")
Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-10 13:31:37 +02:00
Shagun Agrawal
450f99ce7b net/cxgbe: fix memory access when parsing flow match items
Coverity issue: 293096
Fixes: ee61f5113b ("net/cxgbe: parse and validate flows")
Cc: stable@dpdk.org

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-09-03 19:33:19 +02:00
Yaroslav Brustinov
daa3b0833f net/e1000: fix Tx offload capability typos
Fix rx/tx typos in igb_get_tx_port_offloads_capa and
igb_get_tx_queue_offloads_capa.

Fixes: e5c05e6590 ("net/e1000: convert to new Tx offloads API")
Cc: stable@dpdk.org

Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-09-03 19:08:41 +02:00
Jia Yu
6b2a47de07 net/bonding: fix buffer corruption in packets
When bond slave devices cannot transmit all packets in bufs array,
tx_burst callback shall merge the un-transmitted packets back to
bufs array. Recent merge logic introduced a bug which causes
invalid mbuf addresses being written to bufs array.
When caller frees the un-transmitted packets, due to invalid addresses,
application will crash.

The fix is avoid shifting mbufs, and directly write un-transmitted
packets back to bufs array.

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

Signed-off-by: Jia Yu <jyu@vmware.com>
Acked-by: Chas Williams <chas3@att.com>
2018-08-28 15:27:39 +02:00
Alejandro Lucero
7712a1c660 net/nfp: fix live MAC changes not supported
Some NFP firmwares support live changes to the MAC address, but
this is not always true and the firmware advertises it accordingly.

This patch checks if firmware does not support live changes and
sets RTE_ETH_DEV_NOLIVE_MAC_ADDR in that case.

Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-08-28 15:27:39 +02:00
Natalie Samsonov
4943a290b8 net/mvpp2: support VLAN for parser offload
Add VLAN packet type support for parser offload.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Shlomi Gridish <sgridish@marvell.com>
Reviewed-by: Dmitri Epshtein <dima@marvell.com>
Reviewed-by: Yuval Caduri <cyuval@marvell.com>
2018-08-28 15:27:39 +02:00
Natalie Samsonov
61940700f5 net/mvpp2: make private variables static
Mark internal variables static to avoid potential redefinition
errors later on.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Yelena Krivosheev <yelena@marvell.com>
2018-08-28 15:27:39 +02:00
Natalie Samsonov
63e0f01704 net/mvpp2: fix comments and error messages
Fix comments and error messages.

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

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
2018-08-28 15:27:39 +02:00
Tomasz Duszynski
fe37bf0f7d net/mvpp2: fix array initialization
Fix used_bpools array initialization by using range initializer.
This way all necessary variables are properly initialized regardless
of PP2_NUM_PKT_PROC value.

Fixes: 0ddc9b815b ("net/mrvl: add net PMD skeleton")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
2018-08-28 15:27:39 +02:00
Liron Himi
4b4ab496c9 net/mvpp2: use common code to initialize DMA
Use common code to initialize MUSDK DMA memory buffers.

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Natalie Samsonov <nsamsono@marvell.com>
2018-08-28 15:27:39 +02:00
Liron Himi
7a39d1b099 common/mvep: add common code for Marvell drivers
Add MVEP (Marvell Embedded Processors) to drivers/common which
will keep code reused by current and future MRVL PMDs.
Right now we have only common DMA memory initialization routines there.

Signed-off-by: Liron Himi <lironh@marvell.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Reviewed-by: Natalie Samsonov <nsamsono@marvell.com>
2018-08-28 15:27:39 +02:00
Shahaf Shuler
b8ac090835 net/mlx5: fix RSS flow action hash type selection
On the code after the below commits, the criteria to select the IPV4 or
IPV6 hash functions was the existence of some ETH_RSS_IPV4 RSS types on
the flow rule.

The check is wrong. For example ETH_RSS_NONFRAG_IPV4_TCP will not select
the IPV4 hash which will cause the packet to be spread in a bad way.

Fix it by adding the corresponding types needed for each hash selection.

Fixes: 592f05b29a ("net/mlx5: add RSS flow action")
Fixes: fd0b70316b ("net/mlx5: support inner RSS computation")
Cc: stable@dpdk.org

Reported-by: Yaroslav Brustinov <ybrustin@cisco.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-08-28 15:27:39 +02:00
Shahaf Shuler
f9de87187b net/mlx5: disable ConnectX-4 Lx Multi Packet Send by default
On ConnectX-4 Lx the Multi Packet Send (MPW) feature is considered
un-secure, as on some cases were the application provides incorrect mbufs
on the Tx burst the host or NIC can get stuck.

Hence, disabling the feature by default for this specific NIC.
Users can still enable this feature and enjoy the performance gain
(mostly for low number of cores) by using the txq_mpw_en devarg.

This patch will impact the out of the box performance of some application
using ConnectX-4 Lx for the sack of security and robustness.

Since we need different defaults based on the underlying device the mpw
field in the configuration struct was extended to contain also the
MLX5_ARG_UNSET option.

Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-08-28 15:27:39 +02:00
Adrien Mazarguil
dce1e4c204 net/mlx5: fix artificial L4 limitation on switch flow rules
Partial bit-masks are in fact supported on TCP/UDP source/destination
ports. Remove unnecessary check.

Fixes: 2bfc777e07 ("net/mlx5: add L2-L4 pattern items to switch flow rules")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-08-28 15:27:39 +02:00
Jerin Jacob
9f92552eb9 net/octeontx: fix packet corruption on Tx
LMTST does not guarantee packet content get synced with L2C when
HW access the packet for transmitting.

Adding coherent IO write barrier will make sure HW sees the correct
packet if its modified.

Fixes: 9e747589bd ("net/octeontx: add packet transmit burst function")
Cc: stable@dpdk.org

Reported-by: Vikas Aggarwal <vikas.aggarwal@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2018-08-28 15:27:39 +02:00
Stephen Hemminger
1f2766b7ee net/netvsc: resize event buffer as needed
The event buffer was changed to be a fixed size value,
had a couple of issues. The big one is that rte_free was still
being called for a pointer that was not setup with rte_malloc().

The event buffer was also too small to handle heavy receive
traffic; and running the event buffer out would crash
the application.

Fix by going back to a dynamically resized event buffer.
And grow it by 25% to avoid lots of realloc's.

Fixes: 530af95a78 ("bus/vmbus: avoid signalling host on read")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-28 15:27:39 +02:00
Stephen Hemminger
7a866f0d1b net/netvsc: implement free Tx mbuf on demand
Add tx_done_cleanup ethdev hook to allow application to
control if/when it wants completions to be handled.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-28 15:27:39 +02:00
Stephen Hemminger
0312753ef2 net/netvsc: set lower host latency
Tune the vmbus connection so the host scans faster. This improves
transmit performance. The host default value is 100us but setting
to 50us reduces packet loss significantly.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-28 15:27:39 +02:00
Stephen Hemminger
9d071e5ce7 bus/vmbus: add host latency tuning function
Add vmbus API to allow tuning the scan interval on the host side.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-28 15:27:39 +02:00
Stephen Hemminger
99e3d0e72f net/netvsc: fix chimney buffer size error handling
Fix the error handling in setting up transmit buffer.
If setting up chimney buffer fails, then it is not connected so
no need to send disconnect.

Allow for some unused area if full area is not used.

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

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-28 15:27:39 +02:00
Yunjian Wang
763e450ae2 net/bonding: support matching QinQ ethertype
We assume VLAN ethtertype is 0x8100 in get_vlan_offset() function,
but it could be 0x88A8 if QinQ is supported.

Fixes: 06fe78b98c ("bond: add mode 6")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Chas Williams <chas3@att.com>
2018-08-28 15:27:39 +02:00
Qi Zhang
23f1c42459 bus/vdev: fix error log on secondary device scan
When a secondary process handles VDEV_SCAN_ONE mp action, it is possible
the device is already be inserted. This happens when we have multiple
secondary processes which cause multiple broadcasts from primary during
bus->scan. So we don't need to log any error for -EEXIST.

Bugzilla ID: 84
Fixes: cdb068f031 ("bus/vdev: scan by multi-process channel")
Cc: stable@dpdk.org

Reported-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Gage Eads <gage.eads@intel.com>
2018-09-16 11:33:00 +02:00
Hemant Agrawal
3605968c2f bus/fslmc: fix undefined reference of memsegs
This patch fix the undefined reference issue with rte_dpaa2_memsegs
when compiled in shared lib mode with EXTRA_CFLAGS="-g -O0"

Bugzilla ID: 61
Fixes: 365fb925d3 ("bus/fslmc: optimize physical to virtual address search")
Cc: stable@dpdk.org

Reported-by: Keith Wiles <keith.wiles@intel.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-08-27 14:14:27 +02:00
Rami Rosen
95b01d8cdc bus/pci: remove unneeded EAL private include
This trivial patch removes an uneeded include
from drivers/bus/pci/linux/pci.c.

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
2018-08-09 17:47:53 +02:00
Rami Rosen
40ee5c60f0 bus/pci: remove useless forward declaration
This patch removes the forward declaration of rte_pci_remove_device()
method. In the past, this forward decalaration was needed for
rte_pci_detach(), which is now removed from pci_common.c.

Fixes: e690338a7b ("bus/pci: remove unused function to detach by address")

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
2018-08-09 17:43:53 +02:00
Yongseok Koh
4996efd746 net/mlx5: fix minimum size of multi-packet Rx queue
The size of Rx queue is determined by dividing the number of descriptors by
the number of strides. As device can't support single slot queue, if the
number of descriptors is same as the number of strides, MPRQ shouldn't be
enabled. Otherwise, this will cause HW fault. For example, if rxd is set to
512 with testpmd on ConnectX-4 Lx, PMD can't receive more than 512 packets
because the minimum number of strides for ConnectX-4 Lx is 512. Users have
to configure larger number of descriptors in this case.

Fixes: 7d6bf6b866 ("net/mlx5: add Multi-Packet Rx support")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2018-08-09 00:56:50 +02:00
Rasesh Mody
69b7a14319 net/qede: bump version to 2.9.0.1
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-08 20:35:15 +02:00
Shahed Shaikh
10191fcd1a net/qede: fix ntuple filter configuration
PMD did not pass down the intended queue id while
configuring the ntuple filter.

Fixes: 622075356e ("net/qede: support ntuple and flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-08-08 20:09:53 +02:00
Matan Azrad
4278f8df47 net/tap: fix zeroed flow mask configurations
The rte_flow meaning of zero flow mask configuration is to match all
the range of the item value.
For example, the flow eth / ipv4 dst spec 1.2.3.4 dst mask 0.0.0.0
should much all the ipv4 traffic from the rte_flow API perspective.

>From some kernel perspectives the above rule means to ignore all the
ipv4 traffic (e.g. Ubuntu 16.04, 4.15.10).

Due to the fact that the tap PMD should provide the rte_flow meaning,
it is necessary to ignore the spec in case the mask is zero when it
forwards such like flows to the kernel.
So, the above rule should be translated to eth / ipv4 to get the
correct meaning.

Ignore spec configurations when the mask is zero.

Fixes: de96fe68ae ("net/tap: add basic flow API patterns and actions")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-08-07 22:48:53 +02:00
Stephen Hemminger
a31f76d8fe net/netvsc: report checksum failures
The host will notify netvsc device about failed UDP and TCP
checksum. Propagate that information into the mbuf.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-07 14:42:16 +02:00
Stephen Hemminger
3e3ef77e46 net/netvsc: support packet type
The Netvsc PMD was not filling in the packet type information.

Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-07 14:41:57 +02:00
Stephen Hemminger
cd3e20a687 bus/vmbus: handle EOF on IRQ read
This function is not used by netvsc driver yet.
Still the code should handle case where device driver returns
zero (due to rescind).

Coverity issue: 302871
Fixes: 831dba47bd ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-07 14:41:51 +02:00
Stephen Hemminger
5ef90536d7 bus/vmbus: make sure path is null terminated
Use strlcpy rather than strncpy to avoid any issues about
null termination.

Coverity issue 302859
Fixes: 831dba47bd ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-07 14:41:47 +02:00
Stephen Hemminger
bca88be88a bus/vmbus: close directory in error path
Fix bug reported by Coverity where directory being scanned was
not closed in error path (leaking file descriptor).

Coverity issue: 302848
Fixes: 831dba47bd ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-07 14:41:40 +02:00
Tomasz Jozwiak
b30aa8911c common/qat: fix offset greater than first segment
This patch fixes sgl filling to handle offset
greater than first sgl segment

Fixes: 1947bd1858 ("compress/qat: support scatter-gather buffers")

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2018-08-03 09:14:24 +02:00
Tomasz Jozwiak
4b57bfec46 compress/qat: fix buffer lengths in offset case
Fixed lengths for src and dest buffers

Fixes: 32842f2a6d ("compress/qat: create FW request and process response")

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2018-08-03 09:14:24 +02:00
Lee Daly
7f474b4324 compress/isal: fix offset check
This commit fixes an offset check in decompression which was checking
destination offset size against dst data_len rather than checking
against dst pkt_len as required, to support single and multi-segment
buffers.

Fixes: 788e748d38 ("compress/isal: support chained mbufs")

Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-08-03 09:14:24 +02:00
Yongseok Koh
b85b719ab7 net/mlx5: fix minimum number of Multi-Packet RQ buffers
If MPRQ is enabled, a PMD-private mempool is allocated. For ConnectX-4 Lx,
the minimum number of strides is 512 which ConnectX-5 supports 8. This
results in quite small number of elements for the MPRQ mempool. For
example, if the size of Rx ring is configured as 512, only one MPRQ buffer
can cover the whole ring. If there's only one Rx queue is configured. In
the following code in mlx5_mprq_alloc_mp(), desc is 1 and obj_num will be
36 as a result.

	desc *= 4;
	obj_num = desc + MLX5_MPRQ_MP_CACHE_SZ * priv->rxqs_n;

However, rte_mempool_create_empty() has a sanity check to refuse large
per-lcore cache size compared to the number of elements. Cache flush
threshold should not exceed the number of elements of a mempool. For the
above example, the threshold is 32 * 1.5 = 48 which is larger than 36 and
it fails to create the mempool.

Fixes: 7d6bf6b866 ("net/mlx5: add Multi-Packet Rx support")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2018-08-05 13:29:34 +02:00
Yongseok Koh
e845e9ceb4 net/mlx5: fix check for MPLS-in-GRE
Multiple tunnel isn't allowed but MPLS over GRE should be accepted.

Fixes: a4a5cd21d2 ("net/mlx5: add flow MPLS item")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2018-08-05 13:15:08 +02:00
Yongseok Koh
2547ee7458 net/mlx5: preserve allmulticast flag for flow isolation mode
mlx5_dev_ops_isolate doesn't have APIs for enabling/disabling allmulti
mode as it can't be enabled in flow isolation mode. If the function
pointers are null, librte APIs such as
rte_eth_allmulticast_enable/disable() fail to set the flag
(dev->data->all_multicast). The flag is used when starting traffic by
mlx5_traffic_enable(). When switching out of flow isolation mode, allmulti
mode will not be set even though it has been enabled.

Fixes: 0887aa7f27 ("net/mlx5: add new operations for isolated mode")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2018-08-05 08:47:41 +02:00
Yongseok Koh
24b068ad71 net/mlx5: preserve promiscuous flag for flow isolation mode
mlx5_dev_ops_isolate doesn't have APIs for enabling/disabling promiscuous
mode as it can't be enabled in flow isolation mode. If the function
pointers are null, librte APIs such as rte_eth_promiscuous_enable/disable()
fail to set the flag (dev->data->promiscuous). The flag is used when
starting traffic by mlx5_traffic_enable(). When switching out of flow
isolation mode, promiscuous mode will not be set even though it has been
enabled.

Fixes: 0887aa7f27 ("net/mlx5: add new operations for isolated mode")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2018-08-05 08:47:40 +02:00
Stephen Hemminger
530af95a78 bus/vmbus: avoid signalling host on read
Don't signal host that receive ring has been read until all events
have been processed. This reduces the number of guest exits and
therefore improves performance.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-05 11:03:18 +02:00
Stephen Hemminger
2d2c4991b4 net/netvsc: add queue info
This helps when diagnosing ring issues in testpmd.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-05 11:03:15 +02:00
Stephen Hemminger
7e6c824307 net/netvsc: avoid over filling Rx descriptor ring
If the number of packets requested are already present in the
rx_ring then skip reading the ring buffer from the host.

If the ring between the poll and receive side is full, then don't
poll (let incoming packets stay on host).

If no more transmit descriptors are available, then still try and
flush any outstanding data.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-05 11:03:11 +02:00
Stephen Hemminger
fc30efe3a2 net/netvsc: change Rx descriptor setup and sizing
Increase the size of the ring used to hold mbuf's received
but not processed.  The default is now based off the size
of the receive mbuf pool not the number of sections from the host.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-05 11:02:15 +02:00
Stephen Hemminger
ec3242685a net/netvsc: fix ring freeing
The internal receive ring should be freed with rte_ring_free
not rte_free.

Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-05 02:28:12 +02:00
Radu Nicolau
94421f9e76 net/bonding: fix slave add for mode 4
Moved the link status validity check from the slave add to the slave
activation step. Otherwise slave add will fail for mode 4 if
the ports are all stopped but only one of them checked.

Removed activate slave call from slave add function.

Bugzilla ID: 52
Fixes: b77d21cc23 ("ethdev: add link status get/set helper functions")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2018-08-05 02:18:16 +02:00
Radu Nicolau
5922ff069f net/bonding: fix race condition
Race condition can appear in the bond_mode_8023ad_periodic_cb()
callback when bonding port is stopped, reconfigured and restarted.

Re-ordered calls in bond_ethdev_start() to have callback alarm set
after slave ports are reconfigured.

Fixes: 2efb58cbab ("bond: new link bonding library")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Chas Williams <chas3@att.com>
2018-08-05 02:18:16 +02:00
Vipin Varghese
5a401fb85e net/tap: call probe finish for tun secondary
Invoke rte_eth_dev_probing_finish for rte_pmd_tun_probe.

Fixes: fbe90cdd77 ("ethdev: add probing finish function")
Cc: stable@dpdk.org

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2018-08-05 01:44:24 +02:00
Xiaoyun Li
5ce4c2be1a net/avf: fix offload capabilities
There are several tx/rx offload capabilities missing in AVF.
Add them in this patch since AVF supports them.

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

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-08-02 04:19:50 +02:00
Wei Zhao
21ecd2d7ab net/i40e: revert fix of flow director check
This reverts commit 7546dc4a13.

In i40e FDIR PMD code for checking programming status,
when the action of add FDIR filter is ok, i40e NIC will
not write back to programming status descriptor, so if
PMD code check DD is not done after period of time dealy,
it means the add or remove filter action is ok. It only write
back descriptor when fail. So, there is no issue for the original
code.

Fixes: 7546dc4a13 ("net/i40e: fix check of flow director programming status")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-08-01 15:36:32 +02:00
Harry van Haaren
f5dd9a88de net/i40e: fix rearm check in AVX2 Rx
This commit fixes an infinite loop bug that could occur
if the i40e AVX2 driver is used, and high traffic rates
cause the mempool from which the rxq pulls mbufs to become
empty.

The result would be an infinite loop of checking if we
should perform an rx rearm, calling the function and an
error return due the the mempool being emtpy.

The fix is to align the code in the AVX2 driver with the
SSE driver, where an if() is used instead of a while(),
allowing the thread to return from i40e rx function even
if the mempool is empty.

Fixes: dafadd7376 ("net/i40e: add AVX2 Rx function")
Cc: stable@dpdk.org

Reported-by: David Coyle <david.coyle@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Brendan Ryan <brendan.ryan@intel.com>
Tested-by: David Coyle <david.coyle@intel.com>
2018-08-01 02:41:29 +02:00
Yanglong Wu
014a48de60 net/i40e: fix maximum frame size check
Check packet size according to TSO or no-TSO.

Fixes: bfeed0262b ("net/i40e: check illegal packets")

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-07-30 03:01:30 +02:00
Beilei Xing
33310b592f net/i40e: fix device parameter parsing
There's parsing error when using device argument
support-multi-driver or queue-num-per-vf or both.
Error log is "PMD: Error parsing device, invalid
key <support-multi-driver>" and "PMD: Error parsing
device, invalid key <queue-num-per-vf>". The root
cause is that device argument will be parsed in
different parsing functions with local valid key .
This patch fixes the issue by combine all supported
arguments's valid keys.

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

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-07-26 08:01:47 +02:00
Adrien Mazarguil
16ed22ba14 net/mlx5: fix VLAN pop action on switch flow rules
TC message for VLAN POP is broken due to an unfinished nested attribute.

Fixes: 7ac6778d50 ("net/mlx5: add VLAN item and actions to switch flow rules")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-08-02 13:47:57 +02:00
Adrien Mazarguil
eb19f1f6c8 net/mlx5: fix VLAN matching on switch flow rules
VLAN ID is not properly translated to TC due to swapped byte order.

Fixes: 7ac6778d50 ("net/mlx5: add VLAN item and actions to switch flow rules")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-08-02 13:46:39 +02:00
Moti Haimovsky
dd6eaddff7 net/mlx5: fix RSS flow configuration crash
This commit fixes a segmentation fault observed when configuring
mlx5 with RSS flow rule containing invalid queues indices such as
negative numbers, queue numbers bigger than the number Rx queues the
PMD or has no queues at all.

Fixes: 592f05b29a ("net/mlx5: add RSS flow action")

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
2018-08-02 13:22:35 +02:00
Ophir Munk
09e0fd260e net/mlx5: fix secondary process resource leakage
When running testpmd with an mlx5 device and then executing at testpmd
prompt in a raw: "port start all" followed by "port stop all"
a new file named /var/tmp/net_mlx5_<socket num> is created as a result
of creating a new unix domain socket (used for communication between
the primary and secondary processes).
When the new unix socket file is created the old unix socket file should
have been removed. This commit fixes it by closing the old unix socket
just before creating the new one in function mlx5_socket_init()

Fixes: f8b9a3bad4 ("net/mlx5: install a socket to exchange a file descriptor")
Cc: stable@dpdk.org

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
2018-08-02 13:15:27 +02:00
Shahaf Shuler
9da1db6bbf net/mlx5: fix VLAN filtering
The below commit has added a graph based expansion logic for RSS rule to
satisfy Verbs requirements. With this logic, for example, the rule:

flow create 0 ingress pattern eth / end actions rss queues 0 1 end types
ipv4-tcp ipv6-tcp end / end

will be expanded into the rules:

flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss queues 0 1
end types ipv4-tcp ipv6-tcp end / end

flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss queues 0 1
end types ipv4-tcp ipv6-tcp end / end

flow create 0 ingress pattern eth / end actions queue index 0 / end

The below commit defined two graphs:
1. graph for the tunnel case which starts from the ETH item
2. graph for the non-tunnel case which starts from the ETH item

The graphs are ignoring the VLAN case. Hence rules with VLAN item will
fail to traverse the graph and it will result in flow rule creation error.

Adding the VLAN item to the existing graphs will not work as the flow
engine will reject any VLAN item without a specific vid.

To solve this case two new graphs were added (for the tunnel and
non-tunnel case) which contain the VLAN item and are being used only
when the VLAN item exists in the flow pattern.

Two cases left un-covered for the inner RSS:
1. The case were VLAN exists in the pattern as part of the inner headers
2. The case were VLAN exists in the pattern both in the outer and the
inner headers

Solving those cases will require to add two more graphs.
Holding a VLAN for the overlay network is not common, the subnets are
usually defined by the tunnel protocol, for example the VXLAN vni.
Hence adding those two graphs seems like an overkill at this point.
Based on needs one can add those to provide the full support.

Fixes: 592f05b29a ("net/mlx5: add RSS flow action")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
2018-08-02 13:15:18 +02:00
Moti Haimovsky
ff9fe66c97 net/mlx4: advertise Rx jumbo frame support
This commit adds the missing Rx jumbo frame support advertisement
in Rx offload capabilities.

Cc: stable@dpdk.org

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2018-08-02 12:34:18 +02:00
Matan Azrad
2d3b832052 net/mlx5: fix packet type offload for tunnels
There are dedicated QP attributes, tunnel offload flag and mask, which
must be configured in order to allow part of the HW tunnel offloads.

So, if a QP is pointed by a tunnel flow, the above QP attributes
should be configured.

The mask configuration is wrongly only performed if an internal RSS was
configured by the user, while there is no reason to condition the
tunnel offloads in RSS configurations.

Consequently, some of the tunnel offloads was not performed by the HW
when a tunnel flow was configured, for example, the packet tunnel
types was not reported to the user.

Replace the internal RSS condition with the tunnel flow condition.

Fixes: df6afd377a ("net/mlx5: remove useless arguments in hrxq API")

Signed-off-by: Matan Azrad <matan@mellanox.com>
2018-08-02 12:34:18 +02:00
Timothy Redaelli
c7684b6be4 net/mlx5: avoid stripping the glue library
Stripping binaries at build time is usually a bad thing since it makes
impossible to generate (split) debug symbols and this can lead to a more
difficult debugging.

Fixes: 59b91bec12 ("net/mlx5: spawn rdma-core dependency plug-in")
Cc: stable@dpdk.org

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2018-08-02 12:34:17 +02:00
Timothy Redaelli
d7a4e99d84 net/mlx4: avoid stripping the glue library
Stripping binaries at build time is usually a bad thing since it makes
impossible to generate (split) debug symbols and this can lead to a more
difficult debugging.

Fixes: 27cea11686 ("net/mlx4: spawn rdma-core dependency plug-in")
Cc: stable@dpdk.org

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2018-08-02 12:34:17 +02:00
Shahaf Shuler
ed4c7fd92a net/mlx5: fix flow count action for shared counter
According to commit fb8fd96d42 ("ethdev: add shared counter to flow
API") the counter id should be taken into account only when the shared
flag is set.

Fixes: 60bd8c9747 ("net/mlx5: add count flow action")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
2018-08-02 12:34:17 +02:00
Moti Haimovsky
2b4e423fd4 net/mlx4: check RSS queues number limitation
This patch verifies that the number of Rx queues configured for RSS
is supported by the device hardware.
RSS support in mlx4 requires contiguous chunk of QPs to be reserved,
there is a hardware limitation on the amount of contiguous QPs which
is reported by the hardware. Ignoring this value will cause Rx queues
creation to fail.

Cc: stable@dpdk.org

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2018-08-02 12:34:16 +02:00
Gavin Hu
e94be227b7 net/dpaa2: remove loop for unused pool entries
Currently only one buffer pool is configured and in use,
looping for up to maxmum 8 times is unnecessary and might
be buggy as assigned uninititalized values.

The fix is to loop for the configured times with initialize
with valid values.

Fixes: 16bbc98a3e ("bus/fslmc: update MC to 10.3.x")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-08-03 17:09:44 +02:00
Rasesh Mody
688654bf32 net/bnx2x: move SPDX tags to source files
We were using LICENSE.bnx2x_pmd to reference inclusion of SPDX licensing
tag from all the source file. Remove the LICENSE.bnx2x_pmd file and
directly include SPDX tags in source files.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-08-03 17:08:39 +02:00
Rasesh Mody
9eb5dc09c3 net/bnx2x: fix copyright
Originally the PMD had "QLogic Corporation" copyright. When we submitted
commit e3de5dad2a ("net/bnx2x: change copyright info to Cavium"),
the "Qlogic Corporation" copyright was accidentally replaced
with "Cavium Inc". So now we see multiple Cavium copyright messages.
We're changing it to "Broadcom Corporation" copyright.

Fixes: e3de5dad2a ("net/bnx2x: change copyright info to Cavium")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-03 17:08:34 +02:00
Rasesh Mody
d5ae91cbe7 net/bnx2x: bump version to 1.0.6.1
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-03 15:44:06 +02:00
Rasesh Mody
6041aa619f net/bnx2x: fix poll link status
The PMD has been modified to invoke the polling function in the link
management code which detects the peer speed/mode, configure the link
and update the status accordingly. This patch is the fix for the link
down issue seen when we do dev_stop() and dev_start() from an
application.

Fixes: 540a211084 ("bnx2x: driver core")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-03 15:43:12 +02:00
Rasesh Mody
4a4607bb9c net/bnx2x: fix FW command timeout during stop
This patch fixes firmware command timeout error seen during device stop
while stopping queues. It patially reverts an earlier preventive change
commit 91b7e432bc ("net/bnx2x: disable fast path interrupts") to now
enable fast path interrupts.

The original issue of performance degradation is not observed anymore,
with or without the fix.

Fixes: 91b7e432bc ("net/bnx2x: disable fast path interrupts")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-02 22:06:34 +02:00
Shahed Shaikh
7e3060a370 net/qede: fix MAC address removal failure message
Don't treat MAC address removal failure as a fatal error
and print in logs.

Fixes: 77fac1b54f ("net/qede: fix filtering code")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-08-02 21:48:19 +02:00
Rasesh Mody
538bcb378a net/qede/base: fix GRC attention callback
Treat any attention which is not for timeout event as invalid
and return status accordingly. The HW error handler logs and clears
the HW attention. Without this fix we can see flood of GRC attentions.

Fixes: e6051bd6b0 ("qede: add interrupt handling support")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-02 21:47:57 +02:00
Rasesh Mody
c8dbf68143 net/qede/base: fix to clear HW indication
VDMs may cause the was_error indication to be set after the driver
clears it. Clear the indication after the internal FID_enable for
the PF is set.

Fixes: 60c78a5e25 ("net/qede/base: fix recovery from previous ungraceful exit")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-02 21:41:45 +02:00
Shahed Shaikh
4eee1bbf25 net/qede: fix interrupt handler unregister
Commit 023d7a0449f11 ("net/qede: fix legacy interrupt mode")
added a handler for legacy interrupt mode but forgot to
unregister same handler in rte_intr_callback_unregister()

Fixes: 245aec2893 ("net/qede: fix legacy interrupt mode")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-08-02 12:42:11 +02:00
Ajit Khaparde
7f675c27d9 net/bnxt: fix RETA size
The reta_size being indicated in the bnxt_dev_info_get_op was incorrect.
Set it to the value supported by the hardware.

Fixes: 0a6d2a7200 ("net/bnxt: get device infos")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Tested-by: Randy Schacher <stuart.schacher@broadcom.com>
2018-08-02 12:12:47 +02:00
Ajit Khaparde
6dc875ab5f net/bnxt: check access denied for HWRM commands
Firmware can restrict access to certain resources in the hardware
depending on various factors. In such cases when the PMD tries to
configure these resources the firmware will return
HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED error. Parse this and return
the standard EACCES error to the applications.

Fixes: 804e746c7b ("net/bnxt: add hardware resource manager init code")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-08-02 12:12:47 +02:00
Ajit Khaparde
4623c0d4b5 net/bnxt: fix lock release on NVM write failure
In bnxt_hwrm_flash_nvram, before attempting to allocate a buffer
we are grabbing the rte_spinlock. And if the allocation fails we
are returning before releasing the spinlock. We avoid the situation
by calling HWRM_PREP which grabs the lock after the buffer is
allocated successfully.

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

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
2018-08-02 12:12:47 +02:00
Ajit Khaparde
6621ae1461 net/bnxt: fix memory leaks in NVM commands
In some cases we may not be freeing up memory allocated for certain
NVM commands because the code might have bailed out before reaching
rte_free(). This patch moves some code around to ensure the allocated
memory is freed before exiting the function.

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

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Michael Wildt <michael.wildt@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
2018-08-02 12:05:25 +02:00
Somnath Kotur
eae0a36249 net/bnxt: fix filter freeing
bnxt_clear_hwrm_vnic_filters() was removing the created filter from HW,
but not clearing the internal data structures by removing it from the
struct bnxt_vnic_info->filter list.

Fixes: 5ef3b79fdf ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-08-02 12:00:48 +02:00
Shagun Agrawal
a0163693bc net/cxgbevf: do not allocate control queues
Control queues can not be allocated for VFs. So, add check to
only allocate control queues for PFs. This fixes adapter crash
when an attempt is made to allocate control queues for VFs.

Fixes: 3a3aaabc ("net/cxgbe: add control queue to communicate filter requests")

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-08-02 11:24:40 +02:00
Shagun Agrawal
217d181626 net/cxgbe: fix null dereference on CLIP failure
Coverity issue: 302872
Fixes: 3f2c1e209c ("net/cxgbe: add Compressed Local IP region")

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-08-02 11:03:16 +02:00
Hyong Youb Kim
0caa07034a net/enic: reset VXLAN port during initialization
The NIC persists the vxlan port number across vNIC init/de-init
(e.g. restart testpmd). So, explicitly reset the setting to the
default value (4789) as part of the initialization.

Fixes: 8a4efd1741 ("net/enic: add handlers to add/delete vxlan port number")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-08-02 10:34:04 +02:00
Hyong Youb Kim
d16623dd39 net/enic: revert mbuf fast free offload
This reverts the patch that enabled mbuf fast free.

There are two main reasons.

First, enic_fast_free_wq_bufs is broken. When
DEV_TX_OFFLOAD_MBUF_FAST_FREE is enabled, the driver calls this
function to free transmitted mbufs. This function currently does not
reset next and nb_segs. This is simply wrong as the fast-free flag
does not imply anything about next and nb_segs.

We could fix enic_fast_free_wq_bufs by making it to call
rte_pktmbuf_prefree_seg to reset the required fields. But, it negates
most of cycle saving.

Second, there are customer applications that blindly enable all Tx
offloads supported by the device. Some of these applications do not
satisfy the requirements of mbuf fast free (i.e. a single pool per
queue and refcnt = 1), and end up crashing or behaving badly.

Fixes: bcaa54c1a1 ("net/enic: support mbuf fast free offload")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-08-02 10:26:02 +02:00
Pavan Nikhilesh
efb9dd148e net/octeontx: fix stop clearing Rx/Tx functions
On dev_stop the Rx/Tx_burst functions are being set to NULL, this causes
a SEGFAULT in cases where control path calls stop and a paket is still
being processed by a worker.
Instead clear the fastpath functions in dev_close.

Fixes: da6c687471 ("net/octeontx: add start and stop support")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-08-02 09:59:10 +02:00
Tiwei Bie
62758c768f net/virtio-user: fix parameters string
Add the missing param "server" to param string.
Also add the missing spaces after params.

Fixes: bd8f50a45d ("net/virtio-user: support server mode")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-08-02 04:41:58 +02:00
Tiwei Bie
25760ee803 net/virtio: remove unused offloads macro
This macro isn't used any more after below commit:

Fixes: a4996bd89c ("ethdev: new Rx/Tx offloads API")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
2018-08-02 04:41:55 +02:00
Tiwei Bie
8855839c5d net/virtio: remove unnecessary Rx error assignments
Remove the unnecessary assignments in Rx functions
as they are useless and misleading.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
2018-08-02 04:41:51 +02:00
Shreyansh Jain
fc4a4860ba raw/skeleton: implement queue count API
Use the rte_rawdev_queue_count API in skeleton and add its unit test
case.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-08-01 18:25:30 +02:00