[dpdk-dev] [PATCH v2] net/axgbe: add support for reading FW version

2020-12-28 Thread selwin . sebastian
From: Selwin Sebastian Added support for fw_version_get API Signed-off-by: Selwin Sebastian --- doc/guides/nics/features/axgbe.ini | 1 + drivers/net/axgbe/axgbe_ethdev.c | 1 + drivers/net/axgbe/axgbe_rxtx.c | 25 + drivers/net/axgbe/axgbe_rxtx.h | 3 +++

[dpdk-dev] [PATCH v2] net/axgbe: add support for reading FW version

2020-12-28 Thread selwin . sebastian
From: Selwin Sebastian Added support for fw_version_get API Signed-off-by: Selwin Sebastian --- doc/guides/nics/features/axgbe.ini | 1 + drivers/net/axgbe/axgbe_ethdev.c | 1 + drivers/net/axgbe/axgbe_rxtx.c | 25 + drivers/net/axgbe/axgbe_rxtx.h | 3 +++

Re: [dpdk-dev] [PATCH v2 5/8] emu/iavf: add resource management and internal logic of iavf

2020-12-28 Thread Wu, Jingjing
> +static ssize_t iavf_emu_bar0_rw(struct rte_vfio_user_reg_info *reg, char > *buf, > + size_t count, loff_t pos, bool iswrite) { > + struct iavf_emudev *dev = (struct iavf_emudev *)reg->priv; > + char *reg_pos; > + > + if (!reg->base) { > + EMU_IAVF_LOG(ERR, "BAR 0 does

Re: [dpdk-dev] [PATCH 1/2] pdump: use rte_pktmbuf_free bulk

2020-12-28 Thread Morten Brørup
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Stephen Hemminger > Sent: Sunday, December 27, 2020 4:34 AM > > Use rte_pktmbuf_free_bulk instead of loop when freeing > packets. > > Signed-off-by: Stephen Hemminger > --- > app/pdump/main.c | 8 > lib/librte_pdump/rte

[dpdk-dev] [PATCH 6/6] doc: update GTP extension header support

2020-12-28 Thread Shiri Kuzin
added GTP extension header support to mlx5 PMD. The limitations and support were updated in documentation. Signed-off-by: Shiri Kuzin --- doc/guides/nics/mlx5.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index 3bda0f8417..3b1a0

[dpdk-dev] [PATCH 4/6] net/mlx5: add GTP PSC flow validation

2020-12-28 Thread Shiri Kuzin
In this patch we add validation routine for GTP PSC extension header. The GTP PSC extension header must follow the GTP item. Signed-off-by: Shiri Kuzin --- drivers/net/mlx5/mlx5_flow.h| 5 +++ drivers/net/mlx5/mlx5_flow_dv.c | 70 + 2 files changed, 75 inser

[dpdk-dev] [PATCH 5/6] net/mlx5: add GTP PSC item translation

2020-12-28 Thread Shiri Kuzin
This patch adds the translation function which sets the qfi, PDU type. The next extension header which indicates the following extension header type is set to 0x85 - a PDU session container. Signed-off-by: Shiri Kuzin --- drivers/net/mlx5/mlx5_flow_dv.c | 85 + 1

[dpdk-dev] [PATCH 3/6] common/mlx5: add matcher fields for GTP extensions

2020-12-28 Thread Shiri Kuzin
This is a preparation step to support GTP extension header. In this patch we add the matcher fields that will be used to match on the GTP extension header. Signed-off-by: Shiri Kuzin --- drivers/common/mlx5/mlx5_prm.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dri

[dpdk-dev] [PATCH 1/6] ethdev: update GTP headers

2020-12-28 Thread Shiri Kuzin
From: Viacheslav Ovsiienko This patch introduces the GTP header individual flag bit fields and the header optional word with N-PDU number, Sequence Number and Next Extension Header type. Signed-off-by: Viacheslav Ovsiienko --- lib/librte_net/rte_gtp.h | 33 ++--- 1

[dpdk-dev] [PATCH 2/6] app/testpmd: add GTP PSC option support in raw sets

2020-12-28 Thread Shiri Kuzin
From: Viacheslav Ovsiienko This patch add support for generating GTP PDU container session option for the raw encap and raw decap sets. The generated options is single 32-bit word with minimal length specified as 4, no extra fields in the option are supported. The option item must be preceded wit

[dpdk-dev] [PATCH 0/6] add GTP PSC extension header support

2020-12-28 Thread Shiri Kuzin
In this patch we add the support for GTP PSC in net/mlx5. This will enable matching on "rte_flow_item_gtp_psc" item. The support in testpmd is extended to support raw encap\decap of GTP PSC. Shiri Kuzin (4): common/mlx5: add matcher fields for GTP extensions net/mlx5: add GTP PSC flow valid

Re: [dpdk-dev] [PATCH v2 01/22] ethdev: fix MTU size exceeds max rx packet length

2020-12-28 Thread Andrew Rybchenko
On 12/17/20 12:22 PM, Steve Yang wrote: > If max rx packet length is smaller then MTU + Ether overhead, that will > drop all MTU size packets. > > Update the MTU size according to the max rx packet and Ether overhead. > > Fixes: 59d0ecdbf0e1 ("ethdev: MTU accessors") > > Signed-off-by: Steve Yan

Re: [dpdk-dev] [RFC 0/7] support SubFunction representor

2020-12-28 Thread Andrew Rybchenko
On 12/18/20 5:55 PM, Xueming Li wrote: > SubFunction [1] is a portion of the PCI device, a SF netdev has its own > dedicated queues(txq, rxq). A SF netdev supports eswitch representation > offload similar to existing PF and VF representors. A SF shares PCI > level resources with other SFs and/or wi

Re: [dpdk-dev] [RFC 2/7] ethdev: support multi-host representor

2020-12-28 Thread Andrew Rybchenko
On 12/18/20 5:55 PM, Xueming Li wrote: > This patch introduce multi-host controller for ethdev representor > syntax, examples: > > [[c#]pf#]vf#: VF port representor/s, example: pf0vf1 > [[c#]pf#]sf#: SF port representor/s, example: c1pf1sf[0-3] > > c# is controller ID/range in case of multi-host,

Re: [dpdk-dev] [RFC 3/7] devarg: change reprsentor ID to bitmap

2020-12-28 Thread Andrew Rybchenko
On 12/18/20 5:55 PM, Xueming Li wrote: > In eth representor comparer callback, ethdev was compared with devarg. comparer -> comparator? > Since ethdev representor port didn't contain controller(host) and owner > port information, callback only compared representor port and returned > representor

Re: [dpdk-dev] [RFC 5/7] kvargs: update parser for new representor syntax

2020-12-28 Thread Andrew Rybchenko
On 12/18/20 5:55 PM, Xueming Li wrote: > This patch updates kvargs parser to allow comma in list value: > k1=a[1,2]b[3-5] > > Signed-off-by: Xueming Li > --- > lib/librte_kvargs/rte_kvargs.c | 82 +++--- > 1 file changed, 56 insertions(+), 26 deletions(-) > > diff --

[dpdk-dev] [PATCH v2 35/35] net/mlx5: fix warnings on comparison sign mismatch

2020-12-28 Thread Tal Shnaiderman
The clang compiler warns on size mismatches of several comparisons. warning: comparison of integers of different signs To resolve those the right types is used/cast to. Cc: sta...@dpdk.org Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.c| 4 ++-

[dpdk-dev] [PATCH v2 29/35] net/mlx5: fix separating eth_dev_ops per OS

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk There are three types of eth_dev_ops: primary, secondary and isolate represented in three callback tables per OS. In this commit the OS specific eth dev tables are unified into shared tables in file mlx5.c. Starting from this commit all operating systems must implement the same

[dpdk-dev] [PATCH v2 34/35] mlx5: do not fail on IPv6 broadcast flow creation failure

2020-12-28 Thread Tal Shnaiderman
IPv6 broadcast flow creation is unsupported in Windows. do not fail on IPv6 broadcast flow creation on this mast to avoid entire default rules creation failure. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_trigger.c | 8 ++-- 1 file changed, 6 insertions(+)

[dpdk-dev] [PATCH v2 33/35] mlx5: use OS function for dr_sync_domain

2020-12-28 Thread Tal Shnaiderman
use OS functions for flow_dv_sync_domain to compile Windows. mlx5_os_flow_dr_sync_domain is unsupported for Windows. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_flow_os.h | 6 ++ drivers/net/mlx5/mlx5_flow_dv.c | 6 +++--- drivers/net/mlx5

[dpdk-dev] [PATCH v2 32/35] mlx5: use init function for ctx list mutex

2020-12-28 Thread Tal Shnaiderman
The mutex mlx5_dev_ctx_list_mutex was initialized with PTHREAD_MUTEX_INITIALIZER global macro however this macro is not supported on Windows OS shim implementation of pthreads in DPDK. Moved the init of this mutex to RTE_INIT to support this mutex on both OSs. Signed-off-by: Tal Shnaiderman Acke

[dpdk-dev] [PATCH v2 30/35] net/mlx5: define MLX5_NAMESIZE for device interface size

2020-12-28 Thread Tal Shnaiderman
Windows Devx interface name is the same as device name with different size then IF_NAMESIZE. to support it MLX5_NAMESIZE is defined with IF_NAMESIZE value for Linux and MLX5_FS_NAME_MAX value for Windows. Fixes: e9c0b96e3526 ("net/mlx5: move Linux ifname function") Cc: sta...@dpdk.org Signed-off-

[dpdk-dev] [PATCH v2 28/35] net/mlx5: use HAVE_INFINIBAND_VERBS_H in shared code

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Use macro HAVE_INFINIBAND_VERBS_H to successfully compile files both under Linux and Windows (or any non Linux in general). Under Windows this macro: 1. Hides Verbs references. 2. Exposes required DV structs that are under ifdefs related to rdma core. Linux code under definition

[dpdk-dev] [PATCH v2 31/35] net/mlx5: use OS independent code in ASO feature

2020-12-28 Thread Tal Shnaiderman
Modify the ASO feature to use OS independent code not to break Windows build. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_age.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_age.c b/drivers/

[dpdk-dev] [PATCH v2 24/35] net/mlx5/windows: introduce flow support

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This patch adds the initial flow framework under Windows OS. It supports a subset of filters (ETH, IPV4, UDP) and a QUEUE action. It is based on DevX mechanism to send commands to the NIC through the kernel. It does not support steering rules (i.e. writing directly to the NIC me

[dpdk-dev] [PATCH v2 17/35] net/mlx5/windows: support open device

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This commit implements mlx5_os_open_device() API. It calls glue API open_device() then glue API query_device() to fill in 'struct mlx5_context' with data for later usage. Signed-off-by: Ophir Munk Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/net/mlx5/wind

[dpdk-dev] [PATCH v2 27/35] net/mlx5/windows: create flow rule

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This commit implements mlx5_flow_os_create_flow() API. It is equivalent to Linux rdma-core implementation. The API receives the matcher mask, matcher value and an array of actions. They are copied into a PRM-like struct devx_fs_rule_add_in. Then glue API devx_fs_rule_add() is cal

[dpdk-dev] [PATCH v2 25/35] net/mlx5/windows: create flow matcher object

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This commit implements the mlx5_flow_os_create_flow_matcher() API. It is the Linux rdma-core equivalent implementation. Missing rdma-core parameters (e.g. struct mlx5dv_flow_match_parameters) are added to file mlx5_win_defs.h. The API allocates space to hold the PRM bits in PRM f

[dpdk-dev] [PATCH v2 26/35] net/mlx5/windows: create flow action dest TIR object

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This commit implements mlx5_flow_os_create_flow_action_dest_devx_tir() API as the Linux rdma-core equivalent. Missing rdma-core parameters are added to file mlx5_win_defs.h. The action TIR id and type (MLX5_FLOW_CONTEXT_DEST_TYPE_TIR) are saved in the action struct. The action s

[dpdk-dev] [PATCH v2 22/35] net/mlx5/linux: add OS default miss flow action

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Wrap glue call dr_create_flow_action_default_miss() with an OS API. This commit is a follow up on [1]. [1] commit d4d85aa6f13a ("common/mlx5: add default miss action") commit b293fbf9672b ("net/mlx5: add OS specific flow actions operations") Signed-off-by: Ophir Munk Acked-by:

[dpdk-dev] [PATCH v2 19/35] net/mlx5/windws: spawn eth devices

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This commit implements mlx5_dev_spawn() API which allocates an eth device (struct rte_eth_dev) for each PCI device. When working with representors virtual functions (as in Linux), one PCI device may spawn several eth devices: the master device for the main physical function (PF)

[dpdk-dev] [PATCH v2 23/35] net/mlx5/linux: fix add OS dest_devx_tir action

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Wrap glue call dv_create_flow_action_dest_devx_tir() with an OS API. Fixes: b293fbf9672b ("net/mlx5: add OS specific flow actions operations") Cc: sta...@dpdk.org Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_flow_os.h | 26 +

[dpdk-dev] [PATCH v2 20/35] net/mlx5/windows: support VF PCI address

2020-12-28 Thread Tal Shnaiderman
Support VF BDF scanning by checking both the BDF and raw BDF provided by DevX. In Linux a PCI address is formatted as: domain, bus, device, function (DBDF). This is right for both a PF and a VF. In Windows a PF also has a DBDF format, but the domain is always 0, while a VF has a special "domain" c

[dpdk-dev] [PATCH v2 21/35] net/mlx5/linux: wrap adjust flow priority with OS calls

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk mlx5_flow_adjust_priority() is used to adjust priorities according to priorities levels. It is Verbs based and it is called from shared code (mlx5_flow_dv.c). Therefore, wrap it in an OS API. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_flow

[dpdk-dev] [PATCH v2 18/35] net/mlx5/windows: initial probing implementation

2020-12-28 Thread Tal Shnaiderman
This commit implements mlx5_os_pci_probe API under Windows. It does all required initializations then it gets the PCI device list using glue API get_device_list(). Next, all non MLX5 matched devices are filtered out. The supported NIC types are: CONNECTX4VF, CONNECTX4LXVF, CONNECTX5VF, CONNECTX5EX

[dpdk-dev] [PATCH v2 16/35] net/mlx5/windows: support get pdn

2020-12-28 Thread Tal Shnaiderman
Implement OS function call to get pdn. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/net/mlx5/windows/mlx5_os.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c index de23f0ac88

[dpdk-dev] [PATCH v2 13/35] net/mlx5/windows: support get interface name

2020-12-28 Thread Tal Shnaiderman
This commit copies the interface name as saved in the device context since its creation. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/net/mlx5/windows/

[dpdk-dev] [PATCH v2 15/35] net/mlx5/windws: add VLAN stubs

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This commit adds stubs to VLAN VM operations. It is the Windows equivalent implementation of [1]. The Linux implementation was based on Netlink APIs which are not supported in Windows. [1] commit 7af10d29a4a0 ("net/mlx5/linux: refactor VLAN") Signed-off-by: Ophir Munk Acked-

[dpdk-dev] [PATCH v2 12/35] net/mlx5/windows: support get mtu

2020-12-28 Thread Tal Shnaiderman
This commit implements API mlx5_get_mtu(). It returns the MTU size as saved in the device context since its creation. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 27 +++ 1 file changed, 27 insertions(+) diff --git

[dpdk-dev] [PATCH v2 14/35] net/mlx5/windows: support device removed query

2020-12-28 Thread Tal Shnaiderman
This commit implements mlx5_is_removed() API. A new glue call 'init_shutdown_event' is added to support the new API. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/windows/mlx5_glue.c| 21 + drivers/common/mlx5/windows/mlx5_glue.h| 1 +

[dpdk-dev] [PATCH v2 11/35] net/mlx5/windows: support read clock

2020-12-28 Thread Tal Shnaiderman
This commit adds a new glue function query_rt_values to support the new API mlx5_read_clock(). Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_prm.h | 1 + drivers/common/mlx5/windows/mlx5_glue.c| 26 ++ drivers/common/m

[dpdk-dev] [PATCH v2 05/35] common/mlx5/windows: wrap event channel APIs with OS calls

2020-12-28 Thread Tal Shnaiderman
This commit is the Windows equivalent of the Linux implementation. Windows returns an error ENOTSUP for the APIs to create/destroy event channel or to subscribe an event. Signed-off-by: Tal Shnaiderman Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/common/mlx5/windows/mlx5_common_

[dpdk-dev] [PATCH v2 07/35] net/mlx5/windows: add stubs for MP requests

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Windows supports the primary process with no secondary process control. This commit adds stubs for requests to start/stop the data-path to the secondary process and for requests to start/stop a queue of the primary process. Signed-off-by: Ophir Munk Acked-by: Matan Azrad ---

[dpdk-dev] [PATCH v2 09/35] net/mlx5/windows: add ethdev stub operations

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This commits adds ethdev stubs. These APIs are called from shared code that must compile under Linux and Windows. The following stubs are added: mlx5_set_mtu mlx5_os_read_dev_counters mlx5_intr_callback_unregister mlx5_os_get_stats_n mlx5_os_stats_init mlx5_set_link_down mlx5_set

[dpdk-dev] [PATCH v2 10/35] net/mlx5/windows: support link update

2020-12-28 Thread Tal Shnaiderman
Add support for mlx5_link_update() to get link speed and link state. Other parameters are currently hard-coded. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 44 +++ 1 file changed, 44 insertions(+) diff --git a

[dpdk-dev] [PATCH v2 04/35] common/mlx5/windows: add DevX UAR getters

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk The following getters are added: mlx5_os_get_devx_uar_mmap_offset, mlx5_os_get_devx_uar_base_addr, mlx5_os_get_devx_uar_reg_addr, mlx5_os_get_devx_uar_page_id. This commit is the Windows equivalent of the Linux implementation in [1]. [1] commit 8638e19a10aa ("net/mlx5: remove m

[dpdk-dev] [PATCH v2 03/35] common/mlx5: add rte compatibility header file

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Add #include to file mlx5_devx_cmds.h. It is required for Windows to identify the __rte_internal definition. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/common/mlx5/mlx5

[dpdk-dev] [PATCH v2 02/35] mlx5/windows: add mlx5 macros for fs name and path

2020-12-28 Thread Tal Shnaiderman
ibdev_name and ibdev_path sizes are defined in Windows DevX differently from the sizes used in Linux with IBV_SYSFS_NAME_MAX and IBV_SYSFS_PATH_MAX. Added MLX5_FS_NAME_MAX and MLX5_FS_NAME_PATH in mlx5_os.h for both OSs. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/net/mlx5

[dpdk-dev] [PATCH v2 08/35] net/mlx5/windows: support get mac

2020-12-28 Thread Tal Shnaiderman
This commits implements API mlx5_get_mac(). It returns the MAC address saved in the device context since its creation. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/net/mlx5/windows/meson.build | 1 + drivers/net/mlx5/windows/mlx5_ethdev_os.c | 43 +

[dpdk-dev] [PATCH v2 06/35] net/mlx5/windows: add memory region callbacks

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This commit is the Windows part implementation of [1]. [1] commit d5ed8aa9449d ("net/mlx5: add memory region callbacks in per-device cache")' Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/windows/mlx5_os.c | 17

[dpdk-dev] [PATCH v2 00/35] mlx5 Windows support - part #6

2020-12-28 Thread Tal Shnaiderman
This patch series is part of preparing mlx5 PMD to compile and run under Windows OS. Part #6 Depends-on: series-14480 ("mlx5 Windows support - part #5") v2: Fix style issues. Ophir Munk (18): common/mlx5/windows: add missing DV and IBV definitions common/mlx5: add rte compatibility header f

[dpdk-dev] [PATCH v2 01/35] common/mlx5/windows: add missing DV and IBV definitions

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Add missing DV and IBV definition to file mlx5_win_defs.h. The definitions originated from rdma-core library which is not part of Windows. They are referenced in shared files that must compile under Windows such as mlx5_flow_dv.c and mlx5_rxtx.c. Signed-off-by: Ophir Munk Acked

Re: [dpdk-dev] [PATCH] net/octeontx2: fix corruption in segments list

2020-12-28 Thread Nithin Dabilpuram
On Mon, Dec 21, 2020 at 07:33:08PM +0530, sk...@marvell.com wrote: > From: Sunil Kumar Kori > > On Tx, lastseg->next is not being reset to null for multi segmented packet > and same mbuf can be used on Rx which has a stale mbuf entry into > mbuf->next. > > On Rx, application receives mbuf with m

Re: [dpdk-dev] [RFC 4/7] ethdev: capability for new representor syntax

2020-12-28 Thread Andrew Rybchenko
On 12/18/20 5:55 PM, Xueming Li wrote: > This patch introduces new eth device capability to support SubFunction > representor device. > > Signed-off-by: Xueming Li Motivation why the flag is required is missing.

Re: [dpdk-dev] [RFC 1/7] ethdev: support sub function representor

2020-12-28 Thread Andrew Rybchenko
On 12/18/20 5:55 PM, Xueming Li wrote: > To support SF representor, this patch enhances devargs syntax: > > [pf#]vf#: new VF port representor/s, example: vf[0-3], pf0vf3 > [pf#]sf#: new SF port representor/s, example: sf[0-3], pf1sf2 > > pf# is optional for SF and VF representor. If not present,

[dpdk-dev] [PATCH v4 5/5] net/iavf: implement new VLAN capability handling

2020-12-28 Thread Haiyue Wang
The new VLAN virtchnl opcodes introduce new settings like different TPID filtering, stripping. Query the PF's VLAN capabilities based on current device configuration, then set the ethdev VLAN information that the VF can support. The VLAN filtering and offload acceleration should be performed on t

[dpdk-dev] [PATCH v4 4/5] net/ice: add the DCF VLAN handling

2020-12-28 Thread Haiyue Wang
Add the DCF port representor infrastructure for the VFs of DCF attached PF. Then the standard ethdev API like VLAN can be used to configure the VFs. Signed-off-by: Qiming Yang Signed-off-by: Haiyue Wang --- drivers/net/ice/ice_dcf.c| 1 + drivers/net/ice/ice_dcf_ethdev.c

[dpdk-dev] [PATCH v4 3/5] net/ice: enable QinQ filter for switch

2020-12-28 Thread Haiyue Wang
Enable the double VLAN support for QinQ filter switch. Signed-off-by: Wei Zhao Signed-off-by: Haiyue Wang --- drivers/net/ice/ice_generic_flow.c | 8 +++ drivers/net/ice/ice_generic_flow.h | 1 + drivers/net/ice/ice_switch_filter.c | 104 +--- 3 files changed, 102

[dpdk-dev] [PATCH v4 2/5] net/iavf: support Ethernet CRC strip disable

2020-12-28 Thread Haiyue Wang
The VF will check the PF's CRC strip capability firstly, then set the 'CRC strip disable' value in the queue configuration according to the RX CRC offload setting. Signed-off-by: Haiyue Wang --- drivers/net/iavf/iavf_ethdev.c | 3 +++ drivers/net/iavf/iavf_rxtx.c | 6 +- drivers/net/iavf/i

[dpdk-dev] [PATCH v4 1/5] common/iavf: new VLAN opcode

2020-12-28 Thread Haiyue Wang
Add new VLAN opcode support. Signed-off-by: Haiyue Wang --- drivers/common/iavf/virtchnl.h | 259 + 1 file changed, 259 insertions(+) diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h index fcbaa31fa..13788e46b 100644 --- a/drivers/comm

[dpdk-dev] [PATCH v4 0/5] Add AVF & DCF VLAN feaure

2020-12-28 Thread Haiyue Wang
Add new VLAN feature, which has rich settings. v4: make code readable for QinQ TPID setting. v3: code refactor for handing QinQ according to the VC response. Haiyue Wang (5): common/iavf: new VLAN opcode net/iavf: support Ethernet CRC strip disable net/ice: enable QinQ filter for switch n

Re: [dpdk-dev] [PATCH v12 06/11] ethdev: add simple power management API

2020-12-28 Thread Andrew Rybchenko
On 12/17/20 5:05 PM, Anatoly Burakov wrote: > From: Liang Ma > > Add a simple API to allow getting the monitor conditions for > power-optimized monitoring of the RX queues from the PMD, as well as > release notes information. > > Signed-off-by: Liang Ma > Signed-off-by: Anatoly Burakov > Acked

Re: [dpdk-dev] [PATCH] net/iavf: fix queue pairs configuration

2020-12-28 Thread Zhang, Qi Z
> -Original Message- > From: dev On Behalf Of Zhang,Alvin > Sent: Wednesday, December 23, 2020 1:30 PM > To: Xing, Beilei ; Xu, Ting > Cc: dev@dpdk.org; Zhang, AlvinX ; sta...@dpdk.org > Subject: [dpdk-dev] [PATCH] net/iavf: fix queue pairs configuration > > From: Alvin Zhang > > Ch

Re: [dpdk-dev] [PATCH 00/27] ice base code update

2020-12-28 Thread Zhang, Qi Z
> -Original Message- > From: Yang, Qiming > Sent: Thursday, December 24, 2020 11:17 AM > To: Zhang, Qi Z > Cc: dev@dpdk.org > Subject: RE: [PATCH 00/27] ice base code update > > > > -Original Message- > > From: Zhang, Qi Z > > Sent: Tuesday, December 15, 2020 14:05 > > To: Y

[dpdk-dev] [PATCH v5 23/32] common/mlx5/windows: extend PRM match_param_bits struct

2020-12-28 Thread Tal Shnaiderman
Add reserved size to PRM 'struct mlx5_ifc_fte_match_param_bits' for non Linux OS. Windows drivers require this extension since their expected size should match the actual struct size. Linux drivers do not require this extension and already use calculations based on the shorter size. Use a static a

[dpdk-dev] [PATCH v5 31/32] net/mlx5/windows: implement mlx5 mac addr add

2020-12-28 Thread Tal Shnaiderman
Get the list of MAC addresses and verify if the input mac parameter already exists. If not - return -ENOTSUP (as Windows does not support adding new MAC addresses). If the MAC address exists (EEXIST) return 0 (the equivalent of Linux implementation of this API). Signed-off-by: Tal Shnaiderman Ack

[dpdk-dev] [PATCH v5 24/32] common/mlx5/windows: add getter functions

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Add file mlx5/windows/mlx5_common_os.h the equivalent of Linux file mlx5/linux/mlx5_common_os.h. It contains getters functions mlx5_os_get_dev_device_name, mlx5_os_get_ctx_device_name, mlx5_os_get_ctx_device_path, mlx5_os_get_umem_id, mlx5_os_get_devx_channel_fd. Signed-off-by:

[dpdk-dev] [PATCH v5 27/32] net/mlx5: update MR prototypes for DevX

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Currently MR operations are Verbs based. This commit updates MR operations prototypes such that DevX MR operations callbacks can be used as well. Rename 'struct mlx5_verbs_ops' as 'struct mlx5_mr_ops' and move it to shared file mlx5.h. Signed-off-by: Ophir Munk Acked-by: Matan

[dpdk-dev] [PATCH v5 25/32] common/mlx5/windows: add OS alloc/dealloc pd

2020-12-28 Thread Tal Shnaiderman
Implement Windows API mlx5_os_alloc_pd() and mlx5_os_dealloc_pd(). They are equivalent to the Linux implementation in [1]. [1] ("net/mlx5: wrap glue alloc/dealloc PD with OS calls") Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/rte_common_mlx5_exports.def | 3 +-

[dpdk-dev] [PATCH v5 05/32] net/mlx5: replace Linux sleep with rte sleep

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Replace Linux API usleep() and nanosleep() with rte_delay_us_sleep(). The replacement occurs in shared files compiled under different operating systems. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5.c | 5 +++-- drivers/net/mlx5/mlx5_trigge

[dpdk-dev] [PATCH v5 08/32] net/mlx5: move static_assert calls to global scope

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Some Windows compilers consider static_assert() as calls to another function rather than a compiler directive which allows checking type information at compile time. This only occurs if the static_assert call appears inside another function scope. To solve it move the static_ass

[dpdk-dev] [PATCH v5 20/32] mlx5/windows: add mlx5 meson file

2020-12-28 Thread Tal Shnaiderman
File drivers/common/mlx5/windows/meson.build is added to enable mlx5 source files compilation under common windows directory. A Devx SDK tool must be installed to export two external H files: mlx5devx.h and mlx5_ifc_devx.h. The installation is based on environment variable DEVX_INC_PATH. In additio

[dpdk-dev] [PATCH v5 26/32] common/mlx5/windows: add OS umem reg/dereg API

2020-12-28 Thread Tal Shnaiderman
Implement Windows API mlx5_os_umem_reg() and mlx5_os_umem_dereg(). They are equivalent to the Linux implementation. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/rte_common_mlx5_exports.def | 2 + drivers/common/mlx5/windows/mlx5_common_os.c| 60 +

[dpdk-dev] [PATCH v5 32/32] net/mlx5: refactor eth dev ops for Windows

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk There are two types of eth_dev_ops used under Windows: primary and isolate mode. Their function calls initialization is added to the OS specific file mlx5_os.c. Secondary process eth_dev_ops is nullified. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/wi

[dpdk-dev] [PATCH v5 14/32] common/mlx5/windows: handle memory allocations with alignment

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This commit is the Windows equivalent of the Linux implementation. The APIs included in this commit: mlx5_os_malloc(), mlx5_os_free(). For memory allocations (with or without alignment) we always call _aligned_malloc(). Even if zero alignment was requested in the first place - w

[dpdk-dev] [PATCH v5 30/32] net/mlx5/windows: add mlx5_os.c stubs

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk mlx5_os_set_nonblock_channel_fd mlx5_os_dev_shared_handler_install mlx5_os_dev_shared_handler_uninstall mlx5_os_read_dev_stat mlx5_os_mac_addr_flush mlx5_os_mac_addr_remove mlx5_os_vf_mac_addr_modify mlx5_os_set_promisc mlx5_os_set_allmulti Set struct mlx5_flow_driver_ops mlx5_f

[dpdk-dev] [PATCH v5 21/32] mlx5/windows: add initialization routine for external lib

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Add function mlx5_glue_constructor() as an initialization routine for run-time dependency on external lib. Currently the routine has an empty body. It is used for compatibility with Linux. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/common/mlx5/windows/meson.

[dpdk-dev] [PATCH v5 29/32] net/mlx5/windows: implement device attribute getter

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This commit is the Windows implementation of mlx5_os_get_dev_attr() API. It follows the commit in [1]. A new file named mlx5_os.c is added under windows directory as its Linux counterpart file: linux/mlx5_os.c. [1]. commit e85f623e13ea ("net/mlx5: remove attributes dependency on

[dpdk-dev] [PATCH v5 07/32] net/mlx5: do not define static_assert in Windows

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk In Linux 'static_assert' is defined in file mlx5_defs.h: #ifndef HAVE_STATIC_ASSERT #define static_assert _Static_assert #endif The same definition can originate from Linux file /usr/include/assert.h. In Windows static_assert is used while _Static_assert is unknown. Ther

[dpdk-dev] [PATCH v5 19/32] common/mlx5/windows: add glue functions APIs

2020-12-28 Thread Tal Shnaiderman
Windows glue functions are added to file mlx5/windows/mlx5_glue.c. The following APIs are supported: get_device_list, free_device_list, open_device, close_device, query_device, query_hca_iseg, devx_obj_create, devx_obj_destroy, devx_obj_query, devx_obj_modify, devx_general_cmd, devx_umem_reg, devx_

[dpdk-dev] [PATCH v5 28/32] common/mlx5/windows: add OS reg/dereg MR

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This commits implements Windows API for MR registration and deregistration. It is based on DevX. Is support the relaxed ordering flow in Windows by checking the capabilities and machine type. Signed-off-by: Ophir Munk Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad ---

[dpdk-dev] [PATCH v5 22/32] mlx5/windows: generate file mlx5_autoconf.h

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk File mlx5_autoconf.h is generated under Windows to maintain compatibility with the Linux build system. This file is included in Linux/Windows shared source files therefore it is required. Currently the file is created empty. Signed-off-by: Ophir Munk Acked-by: Matan Azrad ---

[dpdk-dev] [PATCH v5 02/32] net/mlx5/linux: extend device attributes getter

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This commit adds device attributes parameters to be reported by mlx5_os_get_dev_attr(): max_cqe, max_mr, max_pd, max_srq, max_srq_wr Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 5 + drivers/net/mlx5/mlx5.h | 5 + 2 f

[dpdk-dev] [PATCH v5 10/32] net/mlx5: wrap glue reg/dereg UMEM with OS calls

2020-12-28 Thread Tal Shnaiderman
Wrap glue calls for UMEM registration and deregistration with generic OS calls since each OS (Linux or Windows) has a different glue API parameters. Signed-off-by: Tal Shnaiderman Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_os.h | 12

[dpdk-dev] [PATCH v5 06/32] net/mlx5: define mprq functions as static inline

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Functions mlx5_check_mprq_support(), mlx5_rxq_mprq_enabled(), mlx5_mprq_enabled() are moved from source file mlx5_rxq.c to header file mlx5_rxtx.h and their type is updated to 'static __rte_always_inline'. Previously the functions were declared as 'inline' in the source file whic

[dpdk-dev] [PATCH v5 09/32] net/mlx5: wrap glue alloc/dealloc PD with OS calls

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Wrap glue calls alloc_pd() and dealloc_pd() with generic OS calls. In Linux - protection domain allocations are implemented by Verbs glue API while in Windows it is by DevX API. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_os.h |

[dpdk-dev] [PATCH v5 18/32] common/mlx5: add DevX alloc PD command

2020-12-28 Thread Tal Shnaiderman
Add a new DevX API mlx5_devx_cmd_alloc_pd() that creates a new protection domain (PD). Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c| 35 drivers/common/mlx5/mlx5_devx_cmds.h| 2 ++ drivers/common/

[dpdk-dev] [PATCH v5 13/32] common/mlx5/linux: handle memory allocations with alignment

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk mlx5_malloc() API has an alignment parameter for system memory allocations. malloc() is called for non-aligned allocations and posix_memalign() is called for aligned allocations. When calling mlx5_free() there is no distinction whether the memory was originally allocated with or

[dpdk-dev] [PATCH v5 11/32] net/mlx5: fix adding destroy flow action wrapper

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Glue function destroy_flow_action() was wrapped by OS specific operation mlx5_flow_os_destroy_flow_action(). It was skipped in file mlx5.c. Fixes: b293fbf9672b ("net/mlx5: add OS specific flow actions operations") Cc: sta...@dpdk.org Signed-off-by: Ophir Munk Acked-by: Matan A

[dpdk-dev] [PATCH v5 16/32] common/mlx5: add Windows exports file

2020-12-28 Thread Tal Shnaiderman
File drivers/common/mlx5/rte_common_mlx5_exports.def contains mlx5 Windows exported symbols under common/mlx5 directory (DLL file name librte_common_mlx5*.dll). It is the equivalent of Linux map file rte_common_mlx5_version.map but the list of symbols may be different between the two operating syst

[dpdk-dev] [PATCH v5 15/32] common/mlx5/linux: wrap event channel APIs with OS calls

2020-12-28 Thread Tal Shnaiderman
Wrap the API to create/destroy event channel and to subscribe an event with OS calls. In Linux those calls are implemented by glue functions while in Windows they are not supported. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/linux/mlx5_common_os.h | 22

[dpdk-dev] [PATCH v5 17/32] common/mlx5: extend DevX query hca attributes command

2020-12-28 Thread Tal Shnaiderman
Extend DevX API mlx5_devx_cmd_query_hca_attr() to report on max number of available objects including: CQ, QP, PD, SRQ. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/common/mlx5/mlx5_devx_cmds.c | 11 +++ drivers/common/mlx5/mlx5_devx_cmds.h | 10 +- drivers/c

[dpdk-dev] [PATCH v5 12/32] common/mlx5: add definition HAVE_INFINIBAND_VERBS_H

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Add a Verbs file presence indication. Under Linux it is required that file infiniband/verbs.h is installed for building DPDK. Other operating systems (e.g. Windows) ignore Verbs completely. This commit adds definition HAVE_INFINIBAND_VERBS_H (file mlx5_autoconf.h) to indicate w

[dpdk-dev] [PATCH v5 03/32] net/mlx5: remove Linux files from Windows compilation

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk This commit removes Linux files flow_verbs.c and mlx5_rxtx_vec.c from Windows compilation. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/meson.build | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/m

[dpdk-dev] [PATCH v5 04/32] net/mlx5: fix freeing packet pacing

2020-12-28 Thread Tal Shnaiderman
From: Ophir Munk Packet pacing is allocated under condition #ifdef HAVE_MLX5DV_PP_ALLOC. In a similar way - free packet pacing index under the same condition. This update is required to successfully compile under operating systems which do not support packet pacing. Fixes: aef1e20ebeb2 ("net/mlx

[dpdk-dev] [PATCH v5 01/32] net/mlx5: fix folding constant array error

2020-12-28 Thread Tal Shnaiderman
Before this commit the PMD used: const int elt_n = 8 const int *stack[elt_n]; In Windows clang compiler complains: net/mlx5/mlx5_flow.c:215:19: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant] Fix it by using a constant macro definition

[dpdk-dev] [PATCH v5 00/32] mlx5 Windows support - part #5

2020-12-28 Thread Tal Shnaiderman
This patch series is part of preparing mlx5 PMD to compile and run under Windows OS. Part #5 v1: initial version v2: Fixes after CR and rebase, also patchset was split and part of the commits sent in v1 will be sent later on. v3: Remove common compilation as it depends on upcoming patches [Dmitr

Re: [dpdk-dev] [PATCH v4 2/2] examples/vhost: refactor vhost data path

2020-12-28 Thread Jiang, Cheng1
Hi Jiayu, > -Original Message- > From: Hu, Jiayu > Sent: Monday, December 28, 2020 12:04 PM > To: Jiang, Cheng1 ; maxime.coque...@redhat.com; > Xia, Chenbo > Cc: dev@dpdk.org; Yang, YvonneX > Subject: RE: [PATCH v4 2/2] examples/vhost: refactor vhost data path > > Hi Cheng, > > Some

[dpdk-dev] [Bug 606] x540-AT2: Can not create rte_flow VF (Linux driver)

2020-12-28 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=606 Bug ID: 606 Summary: x540-AT2: Can not create rte_flow VF (Linux driver) Product: DPDK Version: 18.11 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal

Re: [dpdk-dev] [PATCH v4 1/2] examples/vhost: add ioat ring space count and check

2020-12-28 Thread Jiang, Cheng1
Hi Jiayu, > -Original Message- > From: Hu, Jiayu > Sent: Monday, December 28, 2020 10:51 AM > To: Jiang, Cheng1 ; maxime.coque...@redhat.com; > Xia, Chenbo > Cc: dev@dpdk.org; Yang, YvonneX > Subject: RE: [PATCH v4 1/2] examples/vhost: add ioat ring space count and > check > > Hi Cheng

  1   2   >