[dpdk-dev] [PATCH] malloc: fix potential null pointer dereference

2018-08-15 Thread Tiwei Bie
We need to do the NULL pointer check first after malloc(). Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug") Cc: sta...@dpdk.org Signed-off-by: Tiwei Bie --- lib/librte_eal/common/malloc_heap.c | 4 +--- lib/librte_eal/common/malloc_mp.c | 4 +--- 2 files changed, 2 insertio

Re: [dpdk-dev] [PATCH] net/mlx5: fix artificial L4 limitation on switch flow rules

2018-08-15 Thread Shahaf Shuler
Monday, August 6, 2018 5:26 PM, Adrien Mazarguil: > Subject: [PATCH] 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 t

Re: [dpdk-dev] [PATCH] malloc: fix potential null pointer dereference

2018-08-15 Thread Burakov, Anatoly
On 15-Aug-18 8:20 AM, Tiwei Bie wrote: We need to do the NULL pointer check first after malloc(). Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug") Cc: sta...@dpdk.org Signed-off-by: Tiwei Bie --- Acked-by: Anatoly Burakov -- Thanks, Anatoly

Re: [dpdk-dev] [PATCH v3 1/3] test: add unit tests for metrics library

2018-08-15 Thread Pattan, Reshma
Hi Hari, > -Original Message- > From: Vemula, Hari KumarX > Sent: Friday, August 3, 2018 3:33 PM > To: dev@dpdk.org > Cc: Horton, Remy ; Pattan, Reshma > ; Vemula, Hari KumarX > > Subject: [PATCH v3 1/3] test: add unit tests for metrics library > > Unit testcases are added for metrics li

Re: [dpdk-dev] [PATCH 2/2] virtio: fix PCI config err handling

2018-08-15 Thread Luca Boccassi
On Wed, 2018-08-15 at 11:11 +0800, Tiwei Bie wrote: > On Tue, Aug 14, 2018 at 03:30:35PM +0100, Luca Boccassi wrote: > > From: Brian Russell > > > > In virtio_read_caps, rte_pci_read_config returns the number of > > bytes > > read from PCI config or < 0 on error. > > If less than the expected num

Re: [dpdk-dev] [PATCH v9] checkpatches.sh: Add checks for ABI symbol addition

2018-08-15 Thread Neil Horman
On Wed, Aug 15, 2018 at 11:40:42AM +0530, Nikhil Rao wrote: > > -Original Message- > > From: Neil Horman [mailto:nhor...@tuxdriver.com] > > I was about to say that its because you've not got enough context to let the > > awk file figure out what your section name is, but that doesn't appear

[dpdk-dev] [Bug 82] Failure to compile l3fwd example on ARM

2018-08-15 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=82 Bug ID: 82 Summary: Failure to compile l3fwd example on ARM Product: DPDK Version: unspecified Hardware: ARM OS: Linux Status: CONFIRMED Severity: major P

Re: [dpdk-dev] [PATCH] net/virtio-user: check negotiated features before set

2018-08-15 Thread Legacy, Allain
> -Original Message- > From: Tiwei Bie [mailto:tiwei@intel.com] > Sent: Tuesday, August 14, 2018 11:40 PM > To: Legacy, Allain > Cc: maxime.coque...@redhat.com; zhihong.w...@intel.com; > dev@dpdk.org; Peters, Matt; Zhang, Qing Long (Eric) > Subject: Re: [PATCH] net/virtio-user: check ne

[dpdk-dev] [PATCH v2] net/mlx5: disable ConnectX-4 Lx Multi Packet Send by default

2018-08-15 Thread Shahaf Shuler
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 t

Re: [dpdk-dev] [PATCH 0/2] Some small changes to net/virtio

2018-08-15 Thread Luca Boccassi
On Tue, 2017-07-18 at 07:52 -0400, Charles (Chas) Williams wrote: > > On 07/18/2017 07:50 AM, Ferruh Yigit wrote: > > On 7/18/2017 12:05 AM, Charles (Chas) Williams wrote: > > > Just a couple small changes to net/virtio that make it a little > > > more > > > well behaved. > > > > Same question he

[dpdk-dev] [PATCH] net/ixgbe: reduce PF mailbox interrupt rate

2018-08-15 Thread Luca Boccassi
We have observed high rate of NIC PF interrupts when VNF is using DPDK APIs rte_eth_link_get_nowait() and rte_eth_link_get() functions, as they are causing VF driver to send many MBOX ACK messages. With these changes, the interrupt rates go down significantly. Here's some testing results: Without

[dpdk-dev] [PATCH] vhost: fix zmbufs array leak after NUMA realloc

2018-08-15 Thread Ilya Maximets
'numa_realloc()' allocates 'zmbufs' even if zero copy mode is not configured. This leads to memory leak, because array is freed only for zero copy case. Fixes: 2651726defb7 ("vhost: do deep copy while reallocating queue") CC: sta...@dpdk.org Signed-off-by: Ilya Maximets --- lib/librte_vhost/vho

[dpdk-dev] [PATCH] devtools: don't use bash extension in checkpatches

2018-08-15 Thread Ilya Maximets
'read -d' is a bash extension and doesn't work in POSIX shells. For example 'checkpatches.sh' doesn't work properly on ubuntu, where 'dash' is a default shell: ./devtools/checkpatches.sh: 52: read: Illegal option -d Let's use single quotes instead of variable. Fixes: 7413e7f2aeb3 ("devtools: a

[dpdk-dev] [PATCH] net/bonding: per-slave intermediate rx ring

2018-08-15 Thread Luca Boccassi
During bond 802.3ad receive, a burst of packets is fetched from each slave into a local array and appended to per-slave ring buffer. Packets are taken from the head of the ring buffer and returned to the caller. The number of mbufs provided to each slave is sufficient to meet the requirements of t

[dpdk-dev] [PATCH v2] net/bonding: per-slave intermediate rx ring

2018-08-15 Thread Luca Boccassi
During bond 802.3ad receive, a burst of packets is fetched from each slave into a local array and appended to per-slave ring buffer. Packets are taken from the head of the ring buffer and returned to the caller. The number of mbufs provided to each slave is sufficient to meet the requirements of t

[dpdk-dev] [PATCH 1/2] net/ixgbe: fix x550 code to handle unidentified PHY

2018-08-15 Thread Luca Boccassi
ixgbe_identify_phy_x550em() was missing the code to handle unidentified PHY that has been there in 82599 so it was not able to complete initialization of ixgbe sequence if no sfp plugged in. Port it over to return an appropriate type and complete init sequence properly. Fixes: d2e72774e58c ("ixgbe

[dpdk-dev] [PATCH 2/2] net/ixgbe: add LHA ID to x550 code

2018-08-15 Thread Luca Boccassi
ixgbe is able to recognize 1G SX and LX id, but it is missing the LHA. Add it, so that it can handle LHA sfp plugin. Fixes: d2e72774e58c ("ixgbe/base: support X550") Cc: sta...@dpdk.org Signed-off-by: Luca Boccassi --- drivers/net/ixgbe/base/ixgbe_82599.c | 2 ++ drivers/net/ixgbe/base/ixgbe_p

Re: [dpdk-dev] [PATCH v2] net/mlx5: disable ConnectX-4 Lx Multi Packet Send by default

2018-08-15 Thread Yongseok Koh
> On Aug 15, 2018, at 5:17 AM, Shahaf Shuler wrote: > > 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 fo

[dpdk-dev] [Bug 83] For RSS flow actions, e1000_ethdev.h uses IGB_MAX_RX_QUEUE_NUM instead of IGB_MAX_RX_QUEUE_NUM_82576

2018-08-15 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=83 Bug ID: 83 Summary: For RSS flow actions, e1000_ethdev.h uses IGB_MAX_RX_QUEUE_NUM instead of IGB_MAX_RX_QUEUE_NUM_82576 Product: DPDK Version: unspecified Hardwa

Re: [dpdk-dev] [Bug 82] Failure to compile l3fwd example on ARM

2018-08-15 Thread Honnappa Nagarahalli
Thanks for raising the bug. Can you please provide the GCC version you are using? Thanks, Honnappa -Original Message- From: dev On Behalf Of bugzi...@dpdk.org Sent: Wednesday, August 15, 2018 6:10 AM To: dev@dpdk.org Subject: [dpdk-dev] [Bug 82] Failure to compile l3fwd example on ARM

Re: [dpdk-dev] [RFC] ethdev: add tail drop API for traffic management

2018-08-15 Thread Xu, Rosen
> -Original Message- > From: Xu, Rosen > Sent: Tuesday, August 14, 2018 14:45 > To: Jerin Jacob > Cc: dev@dpdk.org; Dumitrescu, Cristian ; Lu, > Wenzhuo ; Singh, Jasvinder > ; Yigit, Ferruh ; > nithin.dabilpu...@cavium.com > Subject: RE: [dpdk-dev] [RFC] ethdev: add tail drop API for tr

[dpdk-dev] [PATCH] lib/librte_ethdev: expand queue threshold size of RED parameters

2018-08-15 Thread Rosen Xu
There's very commonly that more than 4G DDR memory in NIC for HQoS, so right now the queue threshold size of RED needs to expand to uint64_t. This patch fixes it. Signed-off-by: Rosen Xu --- lib/librte_ethdev/rte_tm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/li

[dpdk-dev] [PATCH v15 1/7] ethdev: add function to release port in secondary process

2018-08-15 Thread Qi Zhang
Add driver API rte_eth_release_port_secondary to support the case when an ethdev need to be detached on a secondary process. Local state is set to unused and shared data will not be reset so the primary process can still use it. Signed-off-by: Qi Zhang --- lib/librte_ethdev/rte_ethdev.c

[dpdk-dev] [PATCH v15 0/7] enable hotplug on multi-process

2018-08-15 Thread Qi Zhang
v15: - fix missing return in rte_eth_dev_pci_release. - minor fix and more detail comments for patch 5/7. - update release notes for v18.11. v14: - rebase. - All changes belongs to patch 1/6. 1) rename rte_eth_dev_release_port_private to rte_eth_dev_release_port_seondary since it is only u

[dpdk-dev] [PATCH v15 5/7] drivers/net: enable device detach on secondary

2018-08-15 Thread Qi Zhang
With the enabling for hotplug on multi-process, rte_eth_dev_pci_generic_remove can be used to detach the device from a secondary process also. But we need to take care of the uninit callback parameter to make sure it handles the secondary case correctly. Signed-off-by: Qi Zhang --- drivers/net/b

[dpdk-dev] [PATCH v15 2/7] eal: enable hotplug on multi-process

2018-08-15 Thread Qi Zhang
We are going to introduce the solution to handle hotplug in multi-process, it includes the below scenario: 1. Attach a device from the primary 2. Detach a device from the primary 3. Attach a device from a secondary 4. Detach a device from a secondary In the primary-secondary process model, we ass

[dpdk-dev] [PATCH v15 3/7] eal: support attach or detach share device from secondary

2018-08-15 Thread Qi Zhang
This patch cover the multi-process hotplug case when a device attach/detach request be issued from a secondary process device attach on secondary: a) secondary send sync request to the primary. b) primary receive the request and attach the new device if failed goto i). c) primary forward attach

[dpdk-dev] [PATCH v15 4/7] drivers/net: enable hotplug on secondary process

2018-08-15 Thread Qi Zhang
Attach port from secondary should ignore devargs since the private device is not necessary to support. Also previously, detach port on a secondary process will mess primary process and cause the same device can't be attached back again. A secondary process should use rte_eth_dev_release_port_second

[dpdk-dev] [PATCH v15 7/7] doc: update release notes for mulit-process hotplug

2018-08-15 Thread Qi Zhang
Update release notes for the new multi-process hotplug feature. Signed-off-by: Qi Zhang --- doc/guides/rel_notes/release_18_11.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst index 3ae6b3f58..f0

[dpdk-dev] [PATCH v15 6/7] examples/multi_process: add hotplug sample

2018-08-15 Thread Qi Zhang
The sample code demonstrates device (ethdev only) management at a multi-process environment. The user can attach/detach a device on primary process and see it is synced on secondary process automatically. How to start? ./hotplug_mp --proc-type=auto Command Line Example: >help >list /* attach a

Re: [dpdk-dev] [PATCH] devtools: don't use bash extension in checkpatches

2018-08-15 Thread Arnon Warshavsky
Hi Ilya Let's use single quotes instead of variable. Using the script directly with single quotes loses the ability to reuse it with an additional set of folders , expressions and RET_ON_FAIL. If we wish to keep the awk code in this file and not in a separate file, maybe receiving the awk script

Re: [dpdk-dev] [PATCH] vhost: fix zmbufs array leak after NUMA realloc

2018-08-15 Thread Tiwei Bie
On Wed, Aug 15, 2018 at 05:54:39PM +0300, Ilya Maximets wrote: > 'numa_realloc()' allocates 'zmbufs' even if zero copy mode > is not configured. This leads to memory leak, because array > is freed only for zero copy case. > > Fixes: 2651726defb7 ("vhost: do deep copy while reallocating queue") > C

Re: [dpdk-dev] [PATCH] net/virtio-user: check negotiated features before set

2018-08-15 Thread Tiwei Bie
On Wed, Aug 15, 2018 at 12:28:05PM +, Legacy, Allain wrote: > > -Original Message- > > From: Tiwei Bie [mailto:tiwei@intel.com] > > Sent: Tuesday, August 14, 2018 11:40 PM > > To: Legacy, Allain > > Cc: maxime.coque...@redhat.com; zhihong.w...@intel.com; > > dev@dpdk.org; Peters, Ma

Re: [dpdk-dev] [PATCH v9] checkpatches.sh: Add checks for ABI symbol addition

2018-08-15 Thread Rao, Nikhil
> -Original Message- > From: Neil Horman [mailto:nhor...@tuxdriver.com] > Sent: Wednesday, August 15, 2018 4:19 PM > To: Rao, Nikhil > Cc: dev@dpdk.org; tho...@monjalon.net; Mcnamara, John > ; Richardson, Bruce > ; Yigit, Ferruh ; > step...@networkplumber.org; toggle-mailboxes@hmswarspi

Re: [dpdk-dev] [PATCH 2/2] virtio: fix PCI config err handling

2018-08-15 Thread Tiwei Bie
On Wed, Aug 15, 2018 at 10:50:57AM +0100, Luca Boccassi wrote: > On Wed, 2018-08-15 at 11:11 +0800, Tiwei Bie wrote: > > On Tue, Aug 14, 2018 at 03:30:35PM +0100, Luca Boccassi wrote: > > > From: Brian Russell > > > > > > In virtio_read_caps, rte_pci_read_config returns the number of > > > bytes