[dpdk-dev] [PATCH v2] net/mlx5: support new representors' naming format

2019-03-02 Thread Dekel Peled
Kernel update [1] introduce new format of representors names. This patch implements RFC [2], updating MLX5 PMD to support the new format, while maintaining support of the existing format. [1] https://github.com/torvalds/linux/commit/c12ecc2 [2] http://mails.dpdk.org/archives/dev/2019-March/125676.

[dpdk-dev] [RFC v2] net/mlx5: support new naming scheme for representors

2019-03-02 Thread Dekel Peled
In current kernel implementation, the physical port name for representors is a numeric string (i.e. '0', '1', etc.). Kernel patch [1] implements an updated scheme for naming of representors ports. The new scheme gives a unique name for each port using the PF ID and the VF ID. Uplink represent

Re: [dpdk-dev] [RFC] net/mlx4: add secondary process support

2019-03-02 Thread Shahaf Shuler
Same question regarding patchwork. Friday, March 1, 2019 3:27 AM, Yongseok Koh: > Subject: [RFC] net/mlx4: add secondary process support > > In 19.05, mlx4 PMD will start to support secondary process. This will need > new rdma-core API and small fix in kernel driver, in order for Verbs to allow

[dpdk-dev] [Bug 219] DPDK 18.11 builds with MLX4/MLX5 support but testpmd won't recognize the device

2019-03-02 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=219 Bug ID: 219 Summary: DPDK 18.11 builds with MLX4/MLX5 support but testpmd won't recognize the device Product: DPDK Version: 18.11 Hardware: x86 OS: Linux

[dpdk-dev] [Bug 218] DPDK 18.02 (stable) won't compile when MLX4/MLX5 support is enabled

2019-03-02 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=218 Bug ID: 218 Summary: DPDK 18.02 (stable) won't compile when MLX4/MLX5 support is enabled Product: DPDK Version: 19.02 Hardware: All OS: All Status: CONFI

[dpdk-dev] [Bug 217] DPDK-19.02 will not build when MLX4/MLX5 is enabled. In comparison DPDK 18-11 builds fine

2019-03-02 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=217 Bug ID: 217 Summary: DPDK-19.02 will not build when MLX4/MLX5 is enabled. In comparison DPDK 18-11 builds fine Product: DPDK Version: 19.02 Hardware: All OS: All

[dpdk-dev] [PATCH 10/10] net/atlantic: fix xstats to return correct number of requested items

2019-03-02 Thread Igor Russkikh
Signed-off-by: Igor Russkikh --- drivers/net/atlantic/atl_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c index c2ba19830..d40645283 100644 --- a/drivers/net/atlantic/atl_ethdev.c +++ b/drivers

[dpdk-dev] [PATCH 08/10] net/atlantic: eliminate excessive log levels on rx/tx

2019-03-02 Thread Igor Russkikh
Default rxtx logging used ERR level, that caused logger to always trigger. That caused perf degradation even if logger was not enabled but compiled in. Signed-off-by: Igor Russkikh --- drivers/net/atlantic/atl_rxtx.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff -

[dpdk-dev] [PATCH 09/10] net/atlantic: fix missing vlan filter offload

2019-03-02 Thread Igor Russkikh
Signed-off-by: Igor Russkikh --- drivers/net/atlantic/atl_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c index ad4e5a717..c2ba19830 100644 --- a/drivers/net/atlantic/atl_ethdev.c +++ b/drivers/n

[dpdk-dev] [PATCH 03/10] net/atlantic: check for error codes

2019-03-02 Thread Igor Russkikh
Found by Coverity Signed-off-by: Igor Russkikh --- drivers/net/atlantic/hw_atl/hw_atl_utils.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/atlantic/hw_atl/hw_atl_utils.c index f11093a50..13f02b9f9 100644 --- a/d

[dpdk-dev] [PATCH 06/10] net/atlantic: fix eeprom fetching for small and uneven lengths

2019-03-02 Thread Igor Russkikh
From: Pavel Belous Signed-off-by: Igor Russkikh Signed-off-by: Pavel Belous --- .../net/atlantic/hw_atl/hw_atl_utils_fw2x.c | 27 --- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c b/drivers/net/atlantic/hw_atl/

[dpdk-dev] [PATCH 07/10] net/atlantic: fix link configuration

2019-03-02 Thread Igor Russkikh
In case link speed is re configured after port start, it does not takes the requested speed value, but instead just sets full autoneg mask. Signed-off-by: Igor Russkikh --- drivers/net/atlantic/atl_ethdev.c | 44 ++- 1 file changed, 20 insertions(+), 24 deletions(-)

[dpdk-dev] [PATCH 02/10] net/atlantic: remove unused variable

2019-03-02 Thread Igor Russkikh
Found by coverity scan Signed-off-by: Igor Russkikh --- drivers/net/atlantic/hw_atl/hw_atl_b0.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/atlantic/hw_atl/hw_atl_b0.c b/drivers/net/atlantic/hw_atl/hw_atl_b0.c index 9400e0edb..53fd8e9f0 100644 --- a/driv

[dpdk-dev] [PATCH 01/10] net/atlantic: Fix negative error codes

2019-03-02 Thread Igor Russkikh
Signed-off-by: Igor Russkikh --- drivers/net/atlantic/atl_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c index 40c913795..aea58c0d5 100644 --- a/drivers/net/atlantic/atl_rxtx.c +++ b/drivers/net/atla

[dpdk-dev] [PATCH 04/10] net/atlantic: fix buffer overflow

2019-03-02 Thread Igor Russkikh
From: Pavel Belous Found by Coverity Signed-off-by: Igor Russkikh Signed-off-by: Pavel Belous --- drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c b/drivers/net/atlantic

[dpdk-dev] [PATCH 05/10] net/atlantic: use eeprom magic as a device address

2019-03-02 Thread Igor Russkikh
From: Pavel Belous Default dev addr is replaced with magic field from the request. Length is allowed to be less than maximum. SMBUS access bit definitions also better organised now. Signed-off-by: Igor Russkikh Signed-off-by: Pavel Belous --- drivers/net/atlantic/atl_ethdev.c | 20

[dpdk-dev] [PATCH 00/10] net/atlantic: bugfixes and code cleanup

2019-03-02 Thread Igor Russkikh
The patchset mainly fixes some Coverity issues, couple of minor bugs and overflows. It also improves eeprom get/set logic with ability of custom device address and dump length. Igor Russkikh (7): net/atlantic: Fix negative error codes net/atlantic: remove unused variable net/atlantic: check

[dpdk-dev] Virtio / Vhost-user alternative

2019-03-02 Thread longtb5
Hi everyone, Suppose QEMU and DPDK support is not a requirement, is there any alternative that could theoretically outperform virtio/vhost-user? I'm asking this weird question because the existing virtio/vhost-user interface, while regarded as the de facto path to VM, is currently one of the maj

[dpdk-dev] [PATCH v2 12/13] net/enic: fix an endian bug in VLAN match

2019-03-02 Thread Hyong Youb Kim
The VLAN fields in the NIC filter use little endian. The VLAN item is in big endian, so swap bytes. Fixes: 6ced137607d0 ("net/enic: flow API for NICs with advanced filters enabled") Cc: sta...@dpdk.org Signed-off-by: Hyong Youb Kim --- doc/guides/nics/enic.rst | 10 -- drivers/net/

[dpdk-dev] [PATCH v2 13/13] net/enic: fix several issues with inner packet matching

2019-03-02 Thread Hyong Youb Kim
Inner packet matching is currently buggy in many cases. 1. Mishandling null spec ("match any"). The copy_item functions do nothing if spec is null. This is incorrect, as all patterns should be appended to the L5 pattern buffer even for null spec (treated as all zeros). 2. Accessing null spec caus

[dpdk-dev] [PATCH v2 10/13] net/enic: reset VXLAN port regardless of overlay offload

2019-03-02 Thread Hyong Youb Kim
Currently, the driver resets the vxlan port register only if overlay offload is enabled. But, the register is actually tied to hardware vxlan parsing, which is an independent feature and is always enabled even if overlay offload is disabled. If left uninitialized, it can affect flow rules that matc

[dpdk-dev] [PATCH v2 11/13] net/enic: fix a couple issues with VXLAN match

2019-03-02 Thread Hyong Youb Kim
The filter API does not have flags for "match VXLAN". Explicitly set the UDP destination port and mask in the L4 pattern. Otherwise, UDP packets with non-VXLAN ports may be falsely reported as VXLAN. 1400 series VIC adapters have hardware VXLAN parsing. The L5 buffer on the NIC starts with the inn

[dpdk-dev] [PATCH v2 09/13] net/enic: enable limited support for RAW flow item

2019-03-02 Thread Hyong Youb Kim
Some apps like VPP use a raw item to match UDP tunnel headers like VXLAN or GENEVE. The NIC hardware supports such usage via L5 match, which does pattern match on packet data immediately following the outer L4 header. Accept raw items for these limited use cases. Signed-off-by: Hyong Youb Kim ---

[dpdk-dev] [PATCH v2 08/13] net/enic: move arguments into struct

2019-03-02 Thread Hyong Youb Kim
There are many copy_item functions, all with the same arguments, which makes it difficult to add/change arguments. Move the arguments into a struct to help subsequent commits that will add/fix features. Also remove self-explanatory verbose comments for these local functions. These changes are pure

[dpdk-dev] [PATCH v2 07/13] net/enic: enable limited PASSTHRU flow action

2019-03-02 Thread Hyong Youb Kim
Some apps like VPP use PASSTHRU+MARK flow rules to offload packet matching to the NIC. Just like MARK+RSS used by OVS-DPDK and others, PASSTHRU+MARK is used to "mark and then receive normally". Recent VIC adapters support such flow rules, so enable PASSTHRU for this limited use case. Signed-off-by

[dpdk-dev] [PATCH v2 06/13] net/enic: enable limited RSS flow action

2019-03-02 Thread Hyong Youb Kim
Some apps like OVS-DPDK use MARK+RSS flow rules in order to offload packet matching to the NIC. The RSS action in such flow rules simply indicates "receive packet normally", not trying to override the port wide RSS. The action is included in the flow rules simply to terminate them, as MARK is not a

[dpdk-dev] [PATCH v2 05/13] net/enic: check for unsupported flow item types

2019-03-02 Thread Hyong Youb Kim
Currently a pattern with an unsupported item type causes segfault, because the flow handler is using the type as an array index without checking bounds. Add an explicit check for unsupported item types and avoid out-of-bound accesses. Fixes: 6ced137607d0 ("net/enic: flow API for NICs with advanced

[dpdk-dev] [PATCH v2 04/13] net/enic: allow flow mark ID 0

2019-03-02 Thread Hyong Youb Kim
The driver currently accepts mark ID 0 but does not report it in matching packet's mbuf. For example, the following testpmd command succeeds. But, the mbuf of a matching IPv4 UDP packet does not have PKT_RX_FDIR_ID set. flow create 0 ingress pattern ... actions mark id 0 / queue index 0 / end The

[dpdk-dev] [PATCH v2 00/13] net/enic: 19.05 updates

2019-03-02 Thread Hyong Youb Kim
This patch series fixes bugs in enic's implementation of flow API and adds very limited support for RAW, RSS, and PASSTHRU. Limited RSS and PASSTHRU are intended to support partial offloads in OVS-DPDK and VPP. These apps use MARK + default RSS and PASSTHRU + MARK to "mark packet and then receive n

[dpdk-dev] [PATCH v2 02/13] net/enic: fix flow director SCTP matching

2019-03-02 Thread Hyong Youb Kim
The firmware filter API does not have flags indicating "match SCTP packet". Instead, the driver needs to explicitly add an IP match and set the protocol number (132 for SCTP) in the IP header. The existing code (copy_fltr_v2) has two bugs. 1. It sets the protocol number (132) in the match value,

[dpdk-dev] [PATCH v2 03/13] net/enic: fix SCTP match for flow API

2019-03-02 Thread Hyong Youb Kim
The driver needs to explicitly set the protocol number (132) in the IP header pattern, as the current firmware filter API lacks "match SCTP packet" flag. Otherwise, the resulting NIC filter may lead to false positives (i.e. NIC reporting non-SCTP packets as SCTP packets). The flow director handler

[dpdk-dev] [PATCH v2 01/13] net/enic: remove unused code

2019-03-02 Thread Hyong Youb Kim
Remove unused functions. Specifically, vnic_set_rss_key() is obsolete. enic_{add,del}_vlan() has never been supported in the firmware. And, remove vnic_rss.c altogether as it becomes empty. These were discovered by cppcheck. Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- drivers/net/

Re: [dpdk-dev] [PATCH v1 1/6] net/af_xdp: introduce AF_XDP PMD driver

2019-03-02 Thread Ye Xiaolong
Hi, Luca Thanks for your review. On 03/01, Luca Boccassi wrote: >On Fri, 2019-03-01 at 16:09 +0800, Xiaolong Ye wrote: >> Add a new PMD driver for AF_XDP which is a proposed faster version of >> AF_PACKET interface in Linux. More info about AF_XDP, please refer to >> [1] >> [2]. >> >> This is th

Re: [dpdk-dev] [PATCH v1 1/6] net/af_xdp: introduce AF_XDP PMD driver

2019-03-02 Thread Ye Xiaolong
Hi, On 03/01, Stephen Hemminger wrote: >On Fri, 1 Mar 2019 16:09:42 +0800 >Xiaolong Ye wrote: > >> +if (umem->buffer) >> +free(umem->buffer); > >Minor nit: you don't need to check for NULL free() already handles this. Thanks for the suggestion, will change accordingly.

Re: [dpdk-dev] [PATCH v1 1/6] net/af_xdp: introduce AF_XDP PMD driver

2019-03-02 Thread Ye Xiaolong
Hi, On 03/01, Stephen Hemminger wrote: >On Fri, 1 Mar 2019 16:09:42 +0800 >Xiaolong Ye wrote: > >> + >> +static int >> +rte_pmd_af_xdp_probe(struct rte_vdev_device *dev) >> +{ >> +struct rte_kvargs *kvlist; >> +char *if_name = NULL; >> +int queue_idx = ETH_AF_XDP_DFLT_QUEUE_IDX; >> +

Re: [dpdk-dev] [PATCH v1 6/6] app/testpmd: add mempool flags parameter

2019-03-02 Thread Ye Xiaolong
Hi, On 03/01, Stephen Hemminger wrote: >On Fri, 1 Mar 2019 16:09:47 +0800 >Xiaolong Ye wrote: > >> When create rte_mempool, flags can be parsed from command line. >> Now, it is possible for testpmd to create a af_xdp friendly >> mempool (which enable zero copy). >> >> Signed-off-by: Qi Zhang >