Re: [dpdk-dev] [PATCH 2/3] eal: fix remove incorrect event_cb

2020-06-11 Thread Jeff Guo
hi, yunjian On 6/3/2020 8:55 PM, wangyunjian wrote: From: Yunjian Wang When the device_name is NULL, it will remove the event_cb directly. We need to compare the 'cb_fn' and 'cb_arg' at the same time. Fixes: a753e53d517b ("eal: add device event monitor framework") Cc: sta...@dpdk.org Signed-

[dpdk-dev] 回复: [PATCH] lib/ring: fix the bug of HTS/RTS bulk enqueue

2020-06-11 Thread Feifei Wang
> -邮件原件- > 发件人: Ananyev, Konstantin > 发送时间: 2020年6月10日 18:17 > 收件人: Feifei Wang ; Honnappa Nagarahalli > > 抄送: dev@dpdk.org; nd ; sta...@dpdk.org > 主题: RE: [PATCH] lib/ring: fix the bug of HTS/RTS bulk enqueue > > > > Directly call "_rte_ring_do_enqueue_elem" function can result in the >

[dpdk-dev] [PATCH 3/3] net/bnxt: add ARM64 vector support

2020-06-11 Thread Lance Richardson
Add bnxt vector PMD support using NEON SIMD instructions. Signed-off-by: Lance Richardson Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/Makefile | 3 + drivers/net/bnxt/bnxt_ethdev.c | 10 +- drivers/net/bnxt/bnxt_ring.c| 4 +- drivers/net/bnxt/bn

[dpdk-dev] [PATCH 2/3] net/bnxt: support Rx/Tx burst mode info

2020-06-11 Thread Lance Richardson
Retrieve burst mode options according to the selected Rx/Tx burst function name. Signed-off-by: Lance Richardson Reviewed-by: Somnath Kotur Reviewed-by: Ajit Kumar Khaparde --- doc/guides/nics/features/bnxt.ini | 1 + drivers/net/bnxt/bnxt_ethdev.c| 46 +++ 2 f

[dpdk-dev] [PATCH 1/3] net/bnxt: disable vector receive for mark action

2020-06-11 Thread Lance Richardson
The bnxt vector mode receive handler does not support the rte_flow 'mark' action. Since we cannot know in advance whether this action will be required, add support for dynamically switching from vector to non-vector receive when the first flow create request with a mark action is processed. Fixes:

[dpdk-dev] [PATCH 0/3] net/bnxt: vector mode enhancements

2020-06-11 Thread Lance Richardson
- Switch to non-vector receive function when "mark" action is requested. - Add support for rx_burst_mode_get()/tx_burst_mode_get() to return currently active receive/transmit mode. - Add vector mode support for ARM64. Lance Richardson (3): net/bnxt: disable vector receive for mark action n

[dpdk-dev] [PATCH 20/21] net/ixgbe/base: check Host Interface Return Status

2020-06-11 Thread Guinan Sun
Writing to read-only fields returns a non-OK Return Status for shadow RAM write command for X550. This information was previously discarded. Testing Hints: check if write to a read-only field, e.g. PHY Module Pointer, returns an error. Signed-off-by: Stanisław Grzeszczak Signed-off-by: Guinan Su

[dpdk-dev] [PATCH 21/21] net/ixgbe/base: update version

2020-06-11 Thread Guinan Sun
Update base code version in readme. Signed-off-by: Guinan Sun --- drivers/net/ixgbe/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/README b/drivers/net/ixgbe/base/README index a48b14ed2..c8d6b39ac 100644 --- a/drivers/net/ixgbe/base/README

[dpdk-dev] [PATCH 19/21] net/ixgbe/base: remove default advertising for 2.5G and 5G

2020-06-11 Thread Guinan Sun
We are seeing interoperability issues with switches when 2.5G and 5G are advertised by default, so default to off. LINUX ONLY: We will need to add a note to our README on how to enable 2.5G and 5G. The netwmask is a combination of: 0x020 1000baseT Full 0x8000 2500baseT Full 0x1000

[dpdk-dev] [PATCH 14/21] net/ixgbe/base: add defines for min rollback revision fields

2020-06-11 Thread Guinan Sun
Add defines for Minimum Rollback Revision fields as defined in SGVL. Signed-off-by: Jacek Naczyk Signed-off-by: Guinan Sun --- drivers/net/ixgbe/base/ixgbe_type.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe

[dpdk-dev] [PATCH 18/21] net/ixgbe/base: ipv6 Mask for purpose FDIR VLAN Port Feature

2020-06-11 Thread Guinan Sun
Allow Flow Director Filter to set IPv6 rules without setting IPv6 source/destination address. Signed-off-by: Piotr Skajewski Signed-off-by: Guinan Sun --- drivers/net/ixgbe/base/ixgbe_82599.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ixgbe/base/ixgbe_82599.c b/drivers/net

[dpdk-dev] [PATCH 17/21] net/ixgbe/base: improve log about autonego being disabled

2020-06-11 Thread Guinan Sun
On ESXi OS, when user disables auto negotiation, the following log appears: "(unsupported) Flow control autoneg is disabled". It is true that AN is disabled but it is not necessarily true that it is not supported. Signed-off-by: Jakub Chylkowski Signed-off-by: Guinan Sun --- drivers/net/ixgbe/b

[dpdk-dev] [PATCH 16/21] net/ixgbe/base: initialize data field in struct buffer

2020-06-11 Thread Guinan Sun
While sending request using ixgbe_hic_unlocked() the data field in buffer struct is not used. It is set when the struct is overwritten by FW to deliver the response. To not pass random data to FW the whole structure should be zeroed before use. Signed-off-by: Krzysztof Galazka Signed-off-by: Piot

[dpdk-dev] [PATCH 15/21] net/ixgbe/base: remove unnecessary log message FC autonego

2020-06-11 Thread Guinan Sun
The function ixgbe_device_supports_autoneg_fc is checking whether a particular device and medium configuration is supporting Flow Control Autonegotiation. In case of non-support, the message is always logged which is confusing. The fix is removing unnecessary log entry. Signed-off-by: Zalfresso-Ju

[dpdk-dev] [PATCH 13/21] net/ixgbe/base: modify Klocwork hits for DDK 7.0

2020-06-11 Thread Guinan Sun
Fix issues found by Klocwork for DDK 7.0 Signed-off-by: Jakub Chylkowski Signed-off-by: Guinan Sun --- drivers/net/ixgbe/base/ixgbe_82599.c | 12 +--- drivers/net/ixgbe/base/ixgbe_common.c| 6 ++ drivers/net/ixgbe/base/ixgbe_common.h| 2 +- drivers/net/ixgbe/base/ixgbe

[dpdk-dev] [PATCH 12/21] net/ixgbe/base: create dedicated func to restart auto nego

2020-06-11 Thread Guinan Sun
Code to restart auto negotiation on PHY is already used in two places and is needed in CORE repo of ixgben. This patch places it in dedicated function for code clarity and makes it available outside the SHARED repo. Testing Hints (required if no HSD): Check if link goes up and traffic works. Chang

[dpdk-dev] [PATCH 11/21] net/ixgbe/base: modify loop accounting for retries

2020-06-11 Thread Guinan Sun
The condition for comparing retry against max_retry was flawed in the do-while loops. For the case where retry was initialized to 0 and max_retry was initialized to 1, we'd break out of the loop at the condition when the intent is to retry the code at least once. Otherwise, the loop is unnecessary

[dpdk-dev] [PATCH 10/21] net/ixgbe/base: move increments after evaluations

2020-06-11 Thread Guinan Sun
The retry variable was being incremented before it was evaluated by the subsequent conditional against the maximum retries to figure out which message to print. So we'll move the increment op to the end. Signed-off-by: Jeb Cramer Signed-off-by: Guinan Sun --- drivers/net/ixgbe/base/ixgbe_phy.c

[dpdk-dev] [PATCH 08/21] net/ixgbe/base: cleanup spelling mistakes in comments

2020-06-11 Thread Guinan Sun
Several functions in the driver code have a weird function comment formatting which uses two spaces instead of only one space for the main function body. This formatting will be mechanically fixed by sed in a future patch, but doing so leads to some checkpatch.pl warnings on that patch. Cleanup th

[dpdk-dev] [PATCH 07/21] net/ixgbe/base: added register definitions for NVM update

2020-06-11 Thread Guinan Sun
Added additional register for X550 and above device family. Signed-off-by: Piotr Skajewski Signed-off-by: Guinan Sun --- drivers/net/ixgbe/base/ixgbe_type.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h index c1e

[dpdk-dev] [PATCH 03/21] net/ixgbe/base: hange flow for "Apply Update" command

2020-06-11 Thread Guinan Sun
For the "Apply Update" command the firmware does not given an response. For this command, success should be return. Based on information at EAS. Signed-off-by: Mateusz Kowalski Signed-off-by: Guinan Sun --- drivers/net/ixgbe/base/ixgbe_common.c | 9 - drivers/net/ixgbe/base/ixgbe_type.

[dpdk-dev] [PATCH 02/21] net/ixgbe/base: change in the condition for response HI

2020-06-11 Thread Guinan Sun
According to SGVL EAS Host interface Shadow RAM Read (0x31) command response buffer length is stored in two bytes, instead of one byte. Signed-off-by: Mateusz Kowalski Signed-off-by: Guinan Sun --- drivers/net/ixgbe/base/ixgbe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[dpdk-dev] [PATCH 04/21] net/ixgbe/base: x550em 10G NIC driver issue

2020-06-11 Thread Guinan Sun
With the NVM image for x550em XFI ethtool will not report the auto-negotiation feature correctly. The auto-negotiation should be "No" for supports and advertised items. Signed-off-by: Piotr Skajewski Signed-off-by: Guinan Sun --- drivers/net/ixgbe/base/ixgbe_x550.c | 8 +++- 1 file changed,

[dpdk-dev] [PATCH 05/21] net/ixgbe/base: added API for NVM update

2020-06-11 Thread Guinan Sun
When Secure Boot is enabled access to the /dev/mem is forbidden for user-space applications and clients are reporting inability to use tools in Secure Boot Mode. The way to perform NVM update is to use ixgbe driver. Currently 10G Linux Base Driver has API which allows only EEPROM access. There is a

[dpdk-dev] [PATCH 00/21] update ixgbe base code

2020-06-11 Thread Guinan Sun
update ixgbe base code. Guinan Sun (21): net/ixgbe/base: clear VFMBMEM and toggle VF's Tx queues net/ixgbe/base: change in the condition for response HI net/ixgbe/base: hange flow for "Apply Update" command net/ixgbe/base: x550em 10G NIC driver issue net/ixgbe/base: added API for NVM upd

[dpdk-dev] [PATCH 06/21] net/ixgbe/base: resolve infinite recursion on PCIe link down

2020-06-11 Thread Guinan Sun
In some corner cases the functions ixgbe_clear_rar_generic and ixgbe_clear_vmdq_generic may call one another leading to infinite recursion. When ixgbe_clear_vmdq_generic is called with IXGBE_CLEAR_VMDQ_ALL flag, it's going to clear MPSAR registers, and proceed to call ixgbe_clear_rar_generic, whic

[dpdk-dev] [PATCH 01/21] net/ixgbe/base: clear VFMBMEM and toggle VF's Tx queues

2020-06-11 Thread Guinan Sun
Add a method to clear VFMBMEM memory. Add a method to toggle VF's TX queues as workaround for silicon errata. Signed-off-by: Piotr Pietruszewski Signed-off-by: Guinan Sun --- drivers/net/ixgbe/base/ixgbe_api.c| 13 +++ drivers/net/ixgbe/base/ixgbe_api.h| 1 + drivers/net/ixgbe/base

[dpdk-dev] net/ice: enable new input set for rss hash

2020-06-11 Thread Jeff Guo
PF could add or delete a RSS rule base on the PF's hash capability. Some new rss input set will be supported, the protocols as below: eth src/eth dst/svlan/cvlan/l2tpv3/esp/ah/pfcp/gtpu down/gtpu up. Signed-off-by: Jeff Guo --- drivers/net/ice/ice_hash.c | 1557 +++---

[dpdk-dev] net/iavf: add inner 5 tuple hash for GTPU

2020-06-11 Thread Jeff Guo
Previous iavf only support inner ipv4 hash for GTPU, this patch aims to enable inner 5 tuple hash for GTPU, that involves inner ipv4 src/dst, tcp sport/dport, udp sport/dport and protocol id. Signed-off-by: Jeff Guo --- drivers/net/iavf/iavf_hash.c | 1080 +++--- 1 fi

Re: [dpdk-dev] [PATCH v2 34/52] net/ice/base: update the vsi handle to remaining VSI

2020-06-11 Thread Wang, Haiyue
> -Original Message- > From: Yigit, Ferruh > Sent: Friday, June 12, 2020 02:41 > To: Zhang, Qi Z ; Yang, Qiming > Cc: Ye, Xiaolong ; dev@dpdk.org; Wang, Haiyue > ; > Stillwell Jr, Paul M > Subject: Re: [dpdk-dev] [PATCH v2 34/52] net/ice/base: update the vsi handle > to remaining VSI >

[dpdk-dev] [PATCH 3/3] net/ice: add RSS support for PPPoE

2020-06-11 Thread Simei Su
This patch enables PPPoE control packets with src mac and session id and PPPoE data packets with ip address and L4 port in rte_flow. Signed-off-by: Simei Su --- drivers/net/ice/ice_hash.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/drivers/

[dpdk-dev] [PATCH 2/3] app/testpmd: support extended RSS offload types

2020-06-11 Thread Simei Su
This patch adds testpmd cmdline support for PPPoE. Signed-off-by: Simei Su --- app/test-pmd/cmdline.c | 6 -- app/test-pmd/config.c | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 996a498..1ac0b89 100644 --- a/app/t

[dpdk-dev] [PATCH 0/3] net/ice: enable advanced RSS for PPPoE

2020-06-11 Thread Simei Su
[PATCH 1/3] ethdev: add rss offload types. [PATCH 2/3] app/testpmd: add cmdline support fo rss types. [PATCH 3/3] net/ice: add RSS support for PPPoE control packets and data packets in rte_flow. Simei Su (3): ethdev: add new RSS offload types app/testpmd: support extended RSS offlo

[dpdk-dev] [PATCH 1/3] ethdev: add new RSS offload types

2020-06-11 Thread Simei Su
This patch defines new RSS offload types for PPPoE and session id is assumed to be the default RSS input set. Signed-off-by: Simei Su --- lib/librte_ethdev/rte_ethdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethd

[dpdk-dev] [PATCH v2 09/10] doc: add note about blacklist/whitelist changes

2020-06-11 Thread Stephen Hemminger
The blacklist/whitelist changes to API will not be a breaking change for applications in this release but worth adding a note to encourage migration. Signed-off-by: Stephen Hemminger --- doc/guides/rel_notes/release_20_08.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/doc/guides/re

[dpdk-dev] [PATCH v2 10/10] eal: mark old macros for blacklist/whitelist as deprecated

2020-06-11 Thread Stephen Hemminger
Use of these macros in applications should cause a deprecation warning. This patch causes a false positive in checkpatch. Signed-off-by: Stephen Hemminger --- lib/librte_eal/include/rte_bus.h | 10 +++--- lib/librte_eal/include/rte_dev.h | 10 +++--- lib/librte_eal/include/rte_d

[dpdk-dev] [PATCH v2 06/10] eal: replace pci-whitelist/pci-blacklist options

2020-06-11 Thread Stephen Hemminger
Replace pci-whitelist with pci-allowlist and pci-blacklist with pci-blocklist. Allow the old options for now, but make sure help and all tests will use the new options. The short flags are more commonly used and changing them would impact more documentation and applications. The -b flag can be des

[dpdk-dev] [PATCH v2 08/10] app/test: use new allowlist and blocklist

2020-06-11 Thread Stephen Hemminger
Test the renamed pci-blocklist and pci-allowlist arguments. Use new terms in test variable names as well. Signed-off-by: Stephen Hemminger --- app/test/autotest.py| 16 ++-- app/test/autotest_runner.py | 18 ++--- app/test/test.c | 2 +- app/test/test_eal_fla

[dpdk-dev] [PATCH v2 07/10] doc: replace references to blacklist/whitelist

2020-06-11 Thread Stephen Hemminger
The terms blacklist and whitelist are no longer used. Replace them in the documentation. Most of this was automatic replacement, but in a couple of places the language was awkward before and have tried to improve the readabilty. Signed-off-by: Stephen Hemminger --- doc/guides/cryptodevs/dpaa2_s

[dpdk-dev] [PATCH v2 05/10] drivers: replace references to blacklist

2020-06-11 Thread Stephen Hemminger
Use the new terminolgy BLOCKLIST to describe when devices are excluded from being used. Signed-off-by: Stephen Hemminger --- drivers/bus/dpaa/dpaa_bus.c| 7 +++ drivers/bus/fslmc/fslmc_bus.c | 9 - drivers/bus/fslmc/fslmc_vfio.c | 8 drivers/bus/pci/pci_c

[dpdk-dev] [PATCH v2 02/10] mk: replace reference to blacklist/whitelist

2020-06-11 Thread Stephen Hemminger
Use BLOCKLIST and ALLOWLIST in the make variable names. Signed-off-by: Stephen Hemminger --- mk/rte.sdktest.mk | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mk/rte.sdktest.mk b/mk/rte.sdktest.mk index 803018ba3a70..6777e0c0f603 100644 --- a/mk/rte.sdktest.mk

[dpdk-dev] [PATCH v2 04/10] eal: replace usage of blacklist/whitelist in enum

2020-06-11 Thread Stephen Hemminger
The terms blacklist and whitelist are often seen as reminders of the divisions in society. Instead, use more exact terms for handling of which devices are used in DPDK. This patch renames the enum values in the EAL include files. As a backward compatiable temporary migration tool, define a replace

[dpdk-dev] [PATCH v2 01/10] rte_ethdev: change comment to rte_dev_eth_mac_addr_add

2020-06-11 Thread Stephen Hemminger
The comment used the term whitelist and was awkardly written. Replace it with simpler direct description of adding a new address. No code or API changes for this. Signed-off-by: Stephen Hemminger --- lib/librte_ethdev/rte_ethdev.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --g

[dpdk-dev] [PATCH v2 03/10] check_maintainers: change variable names

2020-06-11 Thread Stephen Hemminger
Use blocklist where blacklist was used and allowlist where whitelist was used. Signed-off-by: Stephen Hemminger --- devtools/check-maintainers.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/devtools/check-maintainers.sh b/devtools/check-maintainers.sh index 85a300

[dpdk-dev] [PATCH v2 00/10] Rename blacklsit/whitelist to block/allow list

2020-06-11 Thread Stephen Hemminger
The terms blacklist and whitelist are often seen as reminders of the divisions in society. Instead, use more exact terms for handling of which devices are used in DPDK. This is a proposed change for DPDK 20.08 to replace the names blacklist and whitelist in API and command lines. The first three

[dpdk-dev] [PATCH v2] eal/vfio: reduce severity of startup messages

2020-06-11 Thread Stephen Hemminger
The startup of VFIO is too noisy. Logging is expensive on some systems, and distracting to the user. It should not be logging at NOTICE level, reduce it to INFO level. It really should be DEBUG here but that would hide it by default. Signed-off-by: Stephen Hemminger --- v2 - add one more place

[dpdk-dev] [RFC] net/mlx5: add vectorized mprq

2020-06-11 Thread Alexander Kozyrev
The vectorized Rx burst function helps to accelerate the Rx processing by using SIMD (single instruction, multiple data) extensions for the multi-buffer packet processing. Pre-allocating multiple mbufs and filling them in batches of four greatly improves the throughput of the Rx burst routine. M

[dpdk-dev] [PATCH 11/14] examples/vdpa: use new wrappers instead of ops

2020-06-11 Thread Maxime Coquelin
Now that wrappers to query number of queues, Virtio features and Vhost-user protocol features are available, let's make the vDPA example to use them. Signed-off-by: Maxime Coquelin --- examples/vdpa/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/vdpa/main

Re: [dpdk-dev] [PATCH v4] devtools: add new SPDX license compliance checker

2020-06-11 Thread Thomas Monjalon
24/02/2020 22:01, Stephen Hemminger: > +tmpfile=$(mktemp) Please check how other temp files are created in other scripts for consitency. > +git grep -L SPDX-License-Identifier -- \ > + ':^.git*' ':^.ci/*' ':^.travis.yml' \ > + ':^README' ':^MAINTAINERS' ':^VERSION' ':^ABI_VERSION' \ >

[dpdk-dev] [PATCH 08/14] vhost: remove useless vDPA API

2020-06-11 Thread Maxime Coquelin
vDPA is no more used outside of the vDPA internals, so remove rte_vdpa_get_device() API that is now useless. Signed-off-by: Maxime Coquelin --- lib/librte_vhost/rte_vdpa.h| 30 - lib/librte_vhost/rte_vhost_version.map | 1 - lib/librte_vhost/vdpa.c| 4

[dpdk-dev] [PATCH 09/14] vhost: use linked-list for vDPA devices

2020-06-11 Thread Maxime Coquelin
There is no more notion of device ID outside of vdpa.c. We can now move from array to linked-list model for keeping track of the vDPA devices. There is no point in using array here, as all vDPA API are used from the control path, so no performance concerns. Signed-off-by: Maxime Coquelin --- li

[dpdk-dev] [PATCH 12/14] examples/vdpa: remove useless device count

2020-06-11 Thread Maxime Coquelin
The VDPA example now uses the vDPA class iterator, so knowing the number of available devices beforehand is no longer needed. Signed-off-by: Maxime Coquelin --- examples/vdpa/main.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/vdpa/main.c b/examples/vdpa/mai

[dpdk-dev] [PATCH 14/14] vhost: split vDPA header file

2020-06-11 Thread Maxime Coquelin
This patch split the vDPA header file in two, making rte_vdpa_device structure opaque to the application. Applications should only include rte_vdpa.h, while drivers should include both rte_vdpa.h and rte_vdpa_dev.h. Signed-off-by: Maxime Coquelin --- drivers/vdpa/ifc/ifcvf_vdpa.c | 1 + dri

[dpdk-dev] [PATCH 13/14] vhost: remove vDPA device count API

2020-06-11 Thread Maxime Coquelin
This API is no more useful, this patch removes it. Signed-off-by: Maxime Coquelin --- lib/librte_vhost/rte_vdpa.h| 13 - lib/librte_vhost/rte_vhost_version.map | 1 - lib/librte_vhost/vdpa.c| 9 - 3 files changed, 23 deletions(-) diff --git a/li

[dpdk-dev] [PATCH 05/14] vhost: replace device ID in vDPA ops

2020-06-11 Thread Maxime Coquelin
This patch is a preliminary step to get rid of the vDPA device ID. It makes vDPA callbacks to use the vDPA device struct as a reference instead of the ID. Signed-off-by: Maxime Coquelin --- drivers/vdpa/ifc/ifcvf_vdpa.c | 79 +++-- drivers/vdpa/mlx5/mlx5_vdpa.c | 85 +

[dpdk-dev] [PATCH 10/14] vhost: introduce wrappers for some vDPA ops

2020-06-11 Thread Maxime Coquelin
This patch is preliminary work to make the vDPA device structure opaque to the user application. Some callbacks of the vDPA devices are used to query capabilities before attaching to a Vhost port. This patch introduces wrappers for these ops. Signed-off-by: Maxime Coquelin --- lib/librte_vhost/r

[dpdk-dev] [PATCH 07/14] vhost: replace device ID in applications

2020-06-11 Thread Maxime Coquelin
This patch replaces the use of vDPA device ID with vDPA device pointer. The goals is to remove the vDPA device ID to avoid condusion with the Vhost ID. Signed-off-by: Maxime Coquelin --- examples/vdpa/main.c | 79 +- lib/librte_vhost/rte_vdpa.h

[dpdk-dev] [PATCH 06/14] vhost: replace vDPA device ID in Vhost

2020-06-11 Thread Maxime Coquelin
This removes the notion of device ID in Vhost library as a preliminary step to get rid of the vDPA device ID. Signed-off-by: Maxime Coquelin --- drivers/vdpa/ifc/ifcvf_vdpa.c | 12 drivers/vdpa/mlx5/mlx5_vdpa.c | 18 --- examples/vdpa/main.c |

[dpdk-dev] [PATCH 04/14] vhost: make vDPA framework bus agnostic

2020-06-11 Thread Maxime Coquelin
This patch makes the vDPA framework to no more support only PCI devices, but any devices by relying on the generic device name as identifier. Signed-off-by: Maxime Coquelin --- drivers/vdpa/ifc/ifcvf_vdpa.c | 6 +- drivers/vdpa/mlx5/mlx5_vdpa.c | 8 +-- drivers/vdpa/mlx5/mlx5

[dpdk-dev] [PATCH 01/14] bus/dpaa: fix null pointer dereference

2020-06-11 Thread Maxime Coquelin
This patches fixes a null pointer derefencing that happens when the device string passed to the iterator is NULL. This situation can happen when iterating on a class type. For example: RTE_DEV_FOREACH(dev, "class=eth", &dev_iter) { ... } Fixes: e79df833d3f6 ("bus/dpaa: support hotplug ops") C

[dpdk-dev] [PATCH 00/14] vDPA API and framework rework

2020-06-11 Thread Maxime Coquelin
This series aims to rework the vDPA framework and its API to better fit into the DPDK device model and also be more easily consumable by applications. Main changes are creating a device class for vDPA, which enables applications to iterate vDPA devices in a generic way: RTE_DEV_FOREACH(dev, "clas

[dpdk-dev] [PATCH 03/14] vhost: introduce vDPA devices class

2020-06-11 Thread Maxime Coquelin
This patch introduces vDPA device class. It will enable application to iterate over the vDPA devices. Signed-off-by: Maxime Coquelin --- lib/librte_vhost/vdpa.c | 116 +--- 1 file changed, 98 insertions(+), 18 deletions(-) diff --git a/lib/librte_vhost/vdpa.c

[dpdk-dev] [PATCH 02/14] bus/fslmc: fix null pointer dereference

2020-06-11 Thread Maxime Coquelin
This patches fixes a null pointer derefencing that happens when the device string passed to the iterator is NULL. This situation can happen when iterating on a class type. For example: RTE_DEV_FOREACH(dev, "class=eth", &dev_iter) { ... } Fixes: e67a61614d0b ("bus/fslmc: support device iterati

Re: [dpdk-dev] [PATCH v4] devtools: add new SPDX license compliance checker

2020-06-11 Thread Thomas Monjalon
11/06/2020 20:46, Stephen Hemminger: > On Mon, 24 Feb 2020 13:01:30 -0800 > Stephen Hemminger wrote: > > > Simple script to look for drivers and scripts that > > are missing requires SPDX header. > > > > Update the contribution guidelines to indicate that SPDX license > > identfier is required f

Re: [dpdk-dev] [PATCH v4] eal: fix warnings on Windows

2020-06-11 Thread Narcisa Ana Maria Vasile
On Thu, Jun 11, 2020 at 12:50:55PM -0700, Pallavi Kadam wrote: > Fixed bunch of warnings when compiling using clang on Windows > such as the use of an unsafe string function (strerror), > [-Wunused-variable], [-Wunused-function] in eal_common_options.c > [-Wunused-const-variable] in getopt.c and [-

[dpdk-dev] [PATCH v4] eal: fix warnings on Windows

2020-06-11 Thread Pallavi Kadam
Fixed bunch of warnings when compiling using clang on Windows such as the use of an unsafe string function (strerror), [-Wunused-variable], [-Wunused-function] in eal_common_options.c [-Wunused-const-variable] in getopt.c and [-Wunused-parameter] in eal_common_thread.c. Also fixed warnings generate

Re: [dpdk-dev] [PATCH v3 1/2] eal: fix warnings on Windows

2020-06-11 Thread Kadam, Pallavi
On 6/11/2020 9:14 AM, Thomas Monjalon wrote: 29/05/2020 01:14, Pallavi Kadam: Fixed bunch of warnings when compiling using clang on Windows such as the use of an unsafe string function (strerror), [-Wunused-variable], [-Wunused-function] in eal_common_options.c [-Wunused-const-variable] in ge

Re: [dpdk-dev] [PATCH v3 2/2] build: treat warning as an error on Windows

2020-06-11 Thread Kadam, Pallavi
On 6/11/2020 9:12 AM, Thomas Monjalon wrote: 29/05/2020 01:14, Pallavi Kadam: Added -Werror in meson file to consider all the warnings as errors on Windows. Signed-off-by: Pallavi Kadam Reviewed-by: Ranjit Menon --- --- a/config/meson.build +++ b/config/meson.build +# add -Werror to treat

Re: [dpdk-dev] [PATCH v2 52/52] net/ice/base: update IPV4 and IPV6 flow ptype masks

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 1:00 PM, Qi Zhang wrote: > In the flow API, add ability to add IPV4/IPV6 rules that match on > packets with or without inner L4 protocols. > > Also, remove PPPOD packet from PPPOE bitmap. I can't spot this change among other changes, if it is not directly related to the main feature,

Re: [dpdk-dev] [PATCH v4] devtools: add new SPDX license compliance checker

2020-06-11 Thread Stephen Hemminger
On Mon, 24 Feb 2020 13:01:30 -0800 Stephen Hemminger wrote: > Simple script to look for drivers and scripts that > are missing requires SPDX header. > > Update the contribution guidelines to indicate that SPDX license > identfier is required for this project. > > Signed-off-by: Stephen Hemminge

Re: [dpdk-dev] [dpdk-stable] [PATCH v2 49/52] net/ice/base: fix uninitialized flag

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: > This patch add initialization for prof_res_bm_init flag > to zero in order that the possible resource for field vector > in the files can be initialized. I guess this is fixing initialization of _something_ (resource for field vector in package file?), and t

Re: [dpdk-dev] [PATCH v2 40/52] net/ice/base: add new API to check all autoneg enable bits

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: > struct ice_aqc_get_phy_caps_data has multiple autoneg enable bits. > ice_is_phy_caps_an_enabled checks all bits and returns true if any > autoneg enable bits are set. We refer as API to the functions that are exposed to applications, what do you think about

Re: [dpdk-dev] [PATCH v2 35/52] net/ice/base: correct return value

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: > Function ice_rem_adv_rule_id return incorrect error code (ICE_ERR_PARAM) > whereas it should have returned ICE_ERR_DOES_NOT_EXIST return code > if filter list is empty or unable to find "rule" in list Can you please add the "Fixes: " tag? And the patch titl

Re: [dpdk-dev] [PATCH v2 34/52] net/ice/base: update the vsi handle to remaining VSI

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: > Needs to update the VSI handle to the last remaining VSI using the > rule for ICE_FWD_TO_VSI. Otherwise it may have error for deleting the > rule. The reason of the patch is not clear, it looks to "prevent an error for deleting the rule", but can you please

[dpdk-dev] [PATCH] eal/vfio: reduce severity of startup messages

2020-06-11 Thread Stephen Hemminger
The startup of VFIO is too noisy. Logging is expensive on some systems, and distracting to the user. It should not be logging at NOTICE level, reduce it to INFO level. It really should be DEBUG here but that would hide it by default. Signed-off-by: Stephen Hemminger --- lib/librte_eal/linux/eal

Re: [dpdk-dev] [PATCH v2 33/52] net/ice/base: add RL profile bit mask check

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: > Mask bits before accessing the profile type field. RL profile == Rate Limiter profile? > > Signed-off-by: Tarun Singh > Signed-off-by: Paul M. Stillwell Jr > Signed-off-by: Qi Zhang <...>

Re: [dpdk-dev] [PATCH v2 28/52] net/ice/base: return correct error code

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: > Return ICE_ERR_DOES_NOT_EXIST return code if admin command error code is > ICE_AQ_RC_ENOENT (not exist). ice_aq_sw_rules is used when switch > rule is getting added/deleted/updated. In case of delete/update > switch rule, admin command can return ICE_AQ_RC_EN

Re: [dpdk-dev] [PATCH v2 23/52] net/ice/base: remove unnecessary braces

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: > This patch mainly does cleanups related to unnecessary braces. Personally I think better to keep the braces when the block is more than single line, otherwise you are mostly relying on indentation which is prone to error. If you have strong opinion/need to

Re: [dpdk-dev] [PATCH v2 22/52] net/ice/base: increase timeout after PFR

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: > To allow for resets during package download, increase the timeout period > after performing a PFR. The time waited is the global config lock > timeout plus the normal PFSWR timeout. Is PFR == PF Reset, right? And is this same as FLR? > > Signed-off-by: Dan

Re: [dpdk-dev] [PATCH v2 01/52] net/ice/base: add support for non-IP Layer2 protocol

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: > FDIR can forward Ethernet packets with non-IP ethertype. In patch title, isn't "non-IP Layer2 protocol" confusing? Should it be "non-IP Layer 3 protocol"? But I think description in commit log is better, what do you think: "support flow director for non-IP p

Re: [dpdk-dev] [PATCH v2 48/52] net/ice/base: add more tunnel type for IPv4 and IPv6

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: > This patch add more tunnel type defination ipv4/ipv6 packet, 's/defination/definition/' > it enable tcp/udp layer of ipv4/ipv6 as L4 payload but without > L4 dst/src port number as input set for switch filter rule. > > For example: > we can download a swit

Re: [dpdk-dev] [PATCH v2 43/52] net/ice/base: adjust scheduler default BW weight

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: > By default the queues are configured in legacy mode. The default > BW settings for legacy/advanced modes are different. BW == Bandwidth? > The existing > code was using the advanced mode default value of 1 which was > incorrect. This caused the unbalanced B

Re: [dpdk-dev] [PATCH v2 15/52] net/ice/base: group function protoypes together

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: In patch title, 's/protoypes/prototypes/' > There are some function prototypes at the beginning of the file and > some at the end, group them all together so that they are in one > consistent location. > > Signed-off-by: Tony Nguyen > Signed-off-by: Paul M.

Re: [dpdk-dev] [PATCH v2 10/52] net/ice/base: fix variable type for ACL

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: > The commit ef92cee94cdb ("ice-shared: Fix remaining minor casting > issues") changed the idx variable within ice_acl_add_entry() from > a u16 to a u8. Where is this commit, I guess it is not in the DPDK repo, and the DPDK repo one is already listed in the '

Re: [dpdk-dev] [PATCH v2 29/52] net/ice/base: remove unnecessary code

2020-06-11 Thread Ferruh Yigit
On 6/9/2020 12:59 PM, Qi Zhang wrote: > Remove unncessary case branch. 's/unncessary/unnecessary/' 'ICE_BLK_SW' & 'ICE_BLK_PE' cases seems removed, is there any context for record why they are unnecessary, can you please add to the commit log? > > Signed-off-by: Qi Zhang <...>

[dpdk-dev] [PATCH] net/mlx5: fix Rx/Tx descriptors number adjustment

2020-06-11 Thread Alexander Kozyrev
The number of descriptors to configure in a Rx/Tx queue is passed to the mlx5_tx/rx_queue_pre_setup() function by value. That means any adjustments of this variable are local and cannot affect the actual value that is used to allocate mbufs in the mlx5_txq/rxq_new() functions. Pass the number as a

[dpdk-dev] [PATCH] net/mlx5: do not select legacy MPW implicitly

2020-06-11 Thread Alexander Kozyrev
The Legacy MPW (multi-packet write) should not be engaged implicitly. We should exclude this function form a Tx burst routine selection process unless it is requested specifically by setting the txq_mpw_en devarg. Exclude this function from the selection process the same way it is done for the Enha

Re: [dpdk-dev] [PATCH v8 00/11] Windows basic memory management

2020-06-11 Thread Thomas Monjalon
10/06/2020 16:27, Dmitry Kozlyuk: > This patchset implements basic MM with the following features: There are some compilation issues on FreeBSD and 32-bit Linux: http://mails.dpdk.org/archives/test-report/2020-June/135764.html

Re: [dpdk-dev] [PATCH v8 02/11] eal: introduce internal wrappers for file operations

2020-06-11 Thread Thomas Monjalon
10/06/2020 16:27, Dmitry Kozlyuk: > Introduce OS-independent wrappers in order to support common EAL code > on Unix and Windows: > > * eal_file_open: open or create a file. > * eal_file_lock: lock or unlock an open file. > * eal_file_truncate: enforce a given size for an open file. > > Implementa

Re: [dpdk-dev] [PATCH v3 1/2] eal: fix warnings on Windows

2020-06-11 Thread Thomas Monjalon
29/05/2020 01:14, Pallavi Kadam: > Fixed bunch of warnings when compiling using clang on Windows > such as the use of an unsafe string function (strerror), > [-Wunused-variable], [-Wunused-function] in eal_common_options.c > [-Wunused-const-variable] in getopt.c and [-Wunused-parameter] > in eal_co

Re: [dpdk-dev] [PATCH v3 2/2] build: treat warning as an error on Windows

2020-06-11 Thread Thomas Monjalon
29/05/2020 01:14, Pallavi Kadam: > Added -Werror in meson file to consider all the warnings > as errors on Windows. > > Signed-off-by: Pallavi Kadam > Reviewed-by: Ranjit Menon > --- > --- a/config/meson.build > +++ b/config/meson.build > +# add -Werror to treat warnings as errors on Windows > +

[dpdk-dev] [PATCH] vhost: fix host notifier configuration error flow

2020-06-11 Thread Matan Azrad
A vDPA driver can configure its device FD to be notified directly by the guest memory mapping using `rte_vhost_host_notifier_ctrl` API. The driver request is managed by the dpdk vhost management and is forwarded to the QEMU, the vhost massage includes reply request in order to be sure that the mem

Re: [dpdk-dev] [PATCH v1 1/2] eal/x86: add WC store function

2020-06-11 Thread Jerin Jacob
On Thu, Jun 11, 2020 at 7:26 PM Nicolau, Radu wrote: > > > On 6/11/2020 1:23 PM, Jerin Jacob wrote: > > On Thu, Jun 11, 2020 at 3:41 PM Radu Nicolau wrote: > >> Add rte_write32_wc function that implements a WC store > >> using movdiri instruction. > >> > >> Signed-off-by: Radu Nicolau > >> --- >

[dpdk-dev] [PATCH v3] mbuf: fix out-of-bounds access at dyn field register

2020-06-11 Thread Xiaolong Ye
We should make sure off + size < sizeof(struct rte_mbuf) to avoid possible out-of-bounds access of free_space array, there is no issue currently due to the low bits of free_flags (which is adjacent to free_space) are always set to 0. But we shouldn't rely on it since it's fragile and layout of stru

[dpdk-dev] [RFC][PATCH v2 0/3] pdump HW timestamps for mlx5

2020-06-11 Thread Patrick Keroulas
The intention is to produce a pcap with nanosecond precision when timestamp offloading is activated on mlx5 NIC. The packets forwarded by testpmd hold the raw counter but a pcap requires a time unit. Assuming that the NIC clock is already synced with external master clock, this patchset simply int

[dpdk-dev] [RFC][PATCH v2 2/3] ethdev: add API to convert raw timestamps to nsec

2020-06-11 Thread Patrick Keroulas
Existing ethdev functions can read/write time from/to device but they're all related to timesync and none of them can translate a raw counter in real time unit which is usefull in a pdump application. A new API is required because the conversion is derived from dev clock info. Signed-off-by: Patr

[dpdk-dev] [RFC][PATCH v2 3/3] net/pcap: dump hardware timestamps

2020-06-11 Thread Patrick Keroulas
When hardware timestamping is activated, system time should no longer be used to timestamp dumped the packets. Instead, use value held by forwarded and assume they were converted to nanoseconds. Signed-off-by: Patrick Keroulas Signed-off-by: Vivien Didelot --- drivers/net/pcap/rte_eth_pcap.c |

[dpdk-dev] [RFC][PATCH v2 1/3] net/mlx5: add counter-to-ns converter from libibverbs

2020-06-11 Thread Patrick Keroulas
While some devices update their own clock info to provide current time, mlx5dv part of libibverbs already handles this and also converts any raw counter cycle to nanoseconds. Signed-off-by: Patrick Keroulas --- drivers/common/mlx5/linux/mlx5_glue.c | 16 ++ drivers/common/mlx5/linux/

Re: [dpdk-dev] [PATCH v4 2/2] test/cryptodev: add chacha poly test cases to cryptodev

2020-06-11 Thread Anoob Joseph
Minor nit inline. Acked-by: Anoob Joseph > -Original Message- > From: dev On Behalf Of Arek Kusztal > Sent: Thursday, June 11, 2020 12:48 AM > To: dev@dpdk.org > Cc: akhil.go...@nxp.com; fiona.tr...@intel.com; Arek Kusztal > > Subject: [dpdk-dev] [PATCH v4 2/2] test/cryptodev: add chac

Re: [dpdk-dev] [PATCH v2] mbuf: fix out-of-bounds access

2020-06-11 Thread Olivier Matz
On Thu, Jun 11, 2020 at 08:48:01AM +0800, Xiaolong Ye wrote: > We should make sure off + size < sizeof(struct rte_mbuf) to avoid > possible out-of-bounds access of free_space array, there is no issue > currently due to the low bits of free_flags (which is adjacent to > free_space) are always set to

  1   2   >