[dpdk-dev] [PATCH v6 10/10] vhost: add vhost-user-blk example which support inflight

2019-08-28 Thread JinYu
A vhost-user-blk example that support inflight feature. It uses the new APIs that introduced in the first patch, so It can show how there APIs work to support inflight feature. Signed-off-by: Jin Yu --- V1 - add the case. V2 - add the rte_vhost prefix. V3 - add packed ring support --- examples/v

[dpdk-dev] [PATCH v6 09/10] vhost: add an API for judging vq format

2019-08-28 Thread JinYu
This patch introduces an API for getting virtqueue format. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 13 + lib/librte_vhost/vhost.c | 12 2 files changed, 25 insertions(+) diff --g

[dpdk-dev] [PATCH v6 07/10] vhost: add APIs for user getting inflight ring

2019-08-28 Thread JinYu
This patch introduces two APIs. one is for getting inflgiht ring and the other is for getting base. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 40 lib/librte_vhost/vhost.c | 59 +

[dpdk-dev] [PATCH v6 08/10] vhost: fix vring functions to support packed ring

2019-08-28 Thread JinYu
This patch fix two APIs so user can get the packed ring support. Fixes: fceec568 (vhost: add packed ring) Cc: sta...@dpdk.org Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.c | 68 +---

[dpdk-dev] [PATCH v6 03/10] vhost: add the inflight structure

2019-08-28 Thread JinYu
This patch adds the inflight queue region structure include the split and packed. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 43 1 file changed, 43 insertions(+) diff --git

[dpdk-dev] [PATCH v6 06/10] vhost: add the APIs to operate inflight ring

2019-08-28 Thread JinYu
This patch introduces three APIs to operate the inflight ring. Three APIs are set, set last and clear. It includes split and packed ring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 116 lib/libr

[dpdk-dev] [PATCH v6 04/10] vhost: add two new messages to support a shared buffer

2019-08-28 Thread JinYu
This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared buffer between qemu and backend. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.h | 7

[dpdk-dev] [PATCH v6 05/10] vhost: checkout and cleanup the resubmit inflight information

2019-08-28 Thread JinYu
This patch shows how to checkout the inflight ring and construct the resubmit information also include destroying resubmit info. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 19 lib/librte_vhost/vhost.c

[dpdk-dev] [PATCH v6 00/10] vhost: support inflight share memory protocol feature

2019-08-28 Thread JinYu
This patches introduces two new messages VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared buffer between qemu and backend for backend reconnection. Now It can both support split and packed ring. The example code show how these APIs work. The test has passed

[dpdk-dev] [PATCH v6 01/10] vhost: add the inflight description

2019-08-28 Thread JinYu
This patch add the inflight message description and the inflight share fd protocol feature flag. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- v1 - specify the APIs are split-ring only v2 - fix APIs and judge split or packed v3 - add rte_vhost_ p

[dpdk-dev] [PATCH v6 02/10] vhost: add packed ring

2019-08-28 Thread JinYu
This patch add the packed ring in the rte_vhost_vring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/librte_vhost/rte_vhost.h b

[dpdk-dev] [PATCH v1] net/ice: support device-specific DDP package loading

2019-08-28 Thread Ting Xu
This patch adds the feature that supports loading DDP package according to the device serial number. Prior to loading the default DDP package (ice.pkg), the driver will check for the presence of a device-specific DDP package with the name containing 64-bit PCIe Device Serial Number (ice-xxx

Re: [dpdk-dev] [PATCH 1/2] bus/pci: Fail rte_pci_probe if probing all whitelisted devices fail.

2019-08-28 Thread Nitin Katiyar
> -Original Message- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Wednesday, August 28, 2019 1:43 AM > To: Nitin Katiyar > Cc: dev@dpdk.org; Venkatesan Pradeep > > Subject: Re: [dpdk-dev] [PATCH 1/2] bus/pci: Fail rte_pci_probe if probing all > whitelisted devi

[dpdk-dev] [PATCH v2 63/63] net/ice/base: ignore inverse switch recipes

2019-08-28 Thread Qi Zhang
When looking for an existing recipes, never choose an inverse recipe as these are used for anti-spoofing. Choosing inverse recipes for source MAC address rules was causing errors while adding the rule. Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- dri

[dpdk-dev] [PATCH v2 61/63] net/ice/base: add GENEVE offset

2019-08-28 Thread Qi Zhang
Add Geneve offset for tunneled packets to allow dummy packets to be properly created. Signed-off-by: Doug Dziggel Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_switch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ice/base/ice_swit

[dpdk-dev] [PATCH 6/6] net/ice: switch to Rx flexible descriptor in AVX path

2019-08-28 Thread Leyi Rong
Switch to Rx flexible descriptor format instead of legacy descriptor format. Signed-off-by: Leyi Rong --- drivers/net/ice/ice_rxtx_vec_avx2.c | 232 ++-- 1 file changed, 118 insertions(+), 114 deletions(-) diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/i

[dpdk-dev] [PATCH v2 59/63] net/ice/base: remove Rx flex descriptor programming

2019-08-28 Thread Qi Zhang
Removing Rx flex descriptor metadata and flag programming from the code, these registers cannot be written to as they are read only. The programming for all fields per RxDID is now handled differently. Signed-off-by: Vignesh Sridhar Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang ---

[dpdk-dev] [PATCH v2 60/63] net/ice/base: enable RSS with ether layer for PPPoE

2019-08-28 Thread Qi Zhang
Add these two ptype(MAC_PPPOD_PAY and MAC_PPPOE_PAY) in outer mac bitmap, so it can hash for outer mac. Signed-off-by: Zhirun Yan Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flow.c | 8 ++-- drivers/net/ice/base/ice_flow.h | 5 + 2 files chan

[dpdk-dev] [PATCH v2 62/63] net/ice/base: update profile to recipe bitmap array

2019-08-28 Thread Qi Zhang
Correctly update profile to recipe bitmap array after adding and associating recipes. This fixes an issue where determining unused recipe result index slots was incorrect. Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_switch.c

[dpdk-dev] [PATCH v2 58/63] net/ice/base: add AQC get link topology handle support

2019-08-28 Thread Qi Zhang
Add AQC get link topology handle support. This is needed to determine Direct Attach (DA) or backplane media type for PHY types that support either. Get link topology handle cage node type request can be used to determine if a cage is present or not. If a cage is present for PHY types that supports

[dpdk-dev] [PATCH 4/6] net/ice: support more ptype

2019-08-28 Thread Leyi Rong
From: Wenzhuo Lu More protocol types are supported by HW. Add them. Signed-off-by: Wenzhuo Lu --- drivers/net/ice/ice_rxtx.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 69913b545..b815ade0f 100644 --- a/drivers/

[dpdk-dev] [PATCH 5/6] net/ice: switch to flexible descriptor in SSE path

2019-08-28 Thread Leyi Rong
From: Wenzhuo Lu With this path, the flexible descriptor is supported in SSE path. And the legacy descriptor is not supported. Signed-off-by: Wenzhuo Lu --- drivers/net/ice/ice_rxtx_vec_sse.c | 243 ++--- 1 file changed, 115 insertions(+), 128 deletions(-) diff --git a

[dpdk-dev] [PATCH 3/6] net/ice: add protocol extraction support for per Rx queue

2019-08-28 Thread Leyi Rong
From: Haiyue Wang The ice has the feature to extract protocol fields into flex descriptor by programming per queue. Currently, the ice PMD will put the protocol fields into rte_mbuf::udata64 with different type format. Application can access the protocol fields quickly. Signed-off-by: Haiyue Wan

[dpdk-dev] [PATCH v2 57/63] net/ice/base: delay less

2019-08-28 Thread Qi Zhang
Shorten the delay for SQ responses, but increase the number of loops. Max delay time is unchanged, but some operations complete much more quickly. In the process, add a new define to make the delay count and delay time more explicit, and simplify the code so it's the same for both switch and NIC m

[dpdk-dev] [PATCH v2 55/63] net/ice/base: update to register definition file

2019-08-28 Thread Qi Zhang
Added register definitions for GL_MDCK_TX_TDPU and GL_MDET_TX_TDPU. Signed-off-by: Bruce Allan Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_hw_autogen.h | 34 ++ 1 file changed, 34 insertions(+) diff --git a/drivers/ne

[dpdk-dev] [PATCH 2/6] net/ice: handle the Rx flex descriptor

2019-08-28 Thread Leyi Rong
From: Haiyue Wang Set the RXDID with flex descriptor type by default, change the rx function to support new descriptor. Signed-off-by: Haiyue Wang --- drivers/net/ice/ice_rxtx.c | 262 + 1 file changed, 121 insertions(+), 141 deletions(-) diff --git a/drive

[dpdk-dev] [PATCH 1/6] net/ice: add Rx flex descriptor definition

2019-08-28 Thread Leyi Rong
From: Haiyue Wang The Rx flex descriptor has 16B and 32B size, with different field definitions compared to legacy type. Signed-off-by: Haiyue Wang --- drivers/net/ice/ice_rxtx.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h index

[dpdk-dev] [PATCH v2 56/63] net/ice/base: replace open-code duplication

2019-08-28 Thread Qi Zhang
Use BIT_ULL() instead of ICE_FLOW_HASH_FLD() which does the same bit shift operation. Signed-off-by: Bruce Allan Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flow.h | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff

[dpdk-dev] [PATCH v2 53/63] net/ice/base: remove unnecessary if branch

2019-08-28 Thread Qi Zhang
We are already in the branch "if (fm_list->vsi_count == 1)" no need to exit and re-enter. Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_switch.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/ba

[dpdk-dev] [PATCH v2 54/63] net/ice/base: correct abbreviations

2019-08-28 Thread Qi Zhang
Correct abbreviation issues found by running abbrevcheck. Signed-off-by: Tony Nguyen Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_common.c| 4 ++-- drivers/net/ice/base/ice_controlq.c | 2 +- drivers/net/ice/base/ice_controlq.h | 2 +- driver

[dpdk-dev] [PATCH 0/6] enable Rx flexible descriptor

2019-08-28 Thread Leyi Rong
This patchset enable Rx flexible descriptor for ice PMD in both normal path and vector path. Depends on shared code update patchset. Haiyue Wang (3): net/ice: add Rx flex descriptor definition net/ice: handle the Rx flex descriptor net/ice: add protocol extraction support for per Rx queue L

[dpdk-dev] [PATCH v2 49/63] net/ice/base: refactor removal of VLAN promiscuous rules

2019-08-28 Thread Qi Zhang
Currently ice_clear_vsi_promisc() detects if the VLAN ID sent is not 0 and sets the recipe_id to ICE_SW_LKUP_PROMISC_VLAN in that case and ICE_SW_LKUP_PROMISC if the VLAN_ID is 0. However this doesn't allow VLAN 0 promiscuous rules to be removed, but they can be added. Fix this by checking if the p

[dpdk-dev] [PATCH v2 51/63] net/ice/base: update switch training packets with open ports

2019-08-28 Thread Qi Zhang
This patch updates UDP tunneled training packets with an appropriate UDP dest port. For the correct profile to be chosen, an open tunnel port must be included in the training packet. Added GENEVE tunnel labels in the test package in order to test GENEVE tunnel rule creation. Signed-off-by: Dan No

[dpdk-dev] [PATCH v2 52/63] net/ice/base: remove unnecessary dummy packet finding

2019-08-28 Thread Qi Zhang
We don't need to find a dummy packet when removing a rule so remove the call to get the dummy packet. This also obviates some variables so remove them also. Also reduce the scope of rule_buf_sz. Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_switch.c |

[dpdk-dev] [PATCH v2 50/63] net/ice/base: maximize switch recipe words per line

2019-08-28 Thread Qi Zhang
Remove grouping rules to maximize the number of words placed into a recipe line. This will allow more recipes to be added by reducing the number of result indices required. Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_switch.

[dpdk-dev] [PATCH v2 47/63] net/ice/base: remove unnecessary conditional check

2019-08-28 Thread Qi Zhang
There is no reason to do this conditional check before the assignment so simply remove it. Signed-off-by: Bruce Allan Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_switch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/n

[dpdk-dev] [PATCH v2 48/63] net/ice/base: fix flag settings in AQ call

2019-08-28 Thread Qi Zhang
Removed setting Read flag in the Get Allocated Resource Descriptors AQ command (0x020A). The read flag is not required for this command and causes the FW to return an error. Fixes: d781ccbdd15d ("net/ice/base: add functions to get allocated resources") Cc: sta...@dpdk.org Signed-off-by: Dan Nowli

[dpdk-dev] [PATCH v2 46/63] net/ice/base: add RSS support for PPPoE and GTPU

2019-08-28 Thread Qi Zhang
Added RSS support for PPPoE with inner TCP and UDP. Added RSS support for GTPU with IPv4 and IPv6. Signed-off-by: Zhirun Yan Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flow.c | 38 -- drivers/net/ice/base/ice_flow

[dpdk-dev] [PATCH v2 44/63] net/ice/base: fix for RSS hash on inner UDP port

2019-08-28 Thread Qi Zhang
Before this patch, only outer IP with inner UDP port can appear in RSS hash, because the extraction sequence uses outer IP protocol ID with Inner UDP protocol ID. ICE_PROT_UDP_OF always extracts the TUNNELED UDP port values (i.e., 4789 for VXLAN). ICE_PROT_UDP_IL_OR_S will extract NON-TUNNELED UDP

[dpdk-dev] [PATCH v2 45/63] net/ice/base: packet encapsulation for RSS

2019-08-28 Thread Qi Zhang
RSS configurations calls currently support only non-tunneled packets, which uses outer-first IPs. Adding another call to configure RSS for tunneled packets which will enable hashing on inner-last IP. RSS hash will only be done on the innermost IP. - Update RSS configuration calls to take packet seg

[dpdk-dev] [PATCH v2 39/63] net/ice/base: update UDP tunnel switch training packets

2019-08-28 Thread Qi Zhang
Change UDP tunnel training packets for the switch to work for both Geneve and VXLAN cases. Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/

[dpdk-dev] [PATCH v2 43/63] net/ice/base: ptype group consolidation

2019-08-28 Thread Qi Zhang
This patch is an optimization to decrease the number of TCAM entries used in the profile blocks, especially for RSS. To be most effective this will also require a package change in order to decrease the number of PTYPE groups necessary to program RSS, FD and ACL rules. Change required package vers

[dpdk-dev] [PATCH v2 42/63] net/ice/base: add routine for tunnel port query

2019-08-28 Thread Qi Zhang
Add ice_get_open_tunnel_port routine, which can be used to find an open tunnel port for creating switch and flow director training packets. Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flex_pipe.c | 22 ++

[dpdk-dev] [PATCH v2 40/63] net/ice/base: improve switch chained recipe

2019-08-28 Thread Qi Zhang
When updating switch database with chained recipes from firmware, where a null pointer derefence was occurring due to looking into a sub-recipe entry which is not filled in. Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_protoc

[dpdk-dev] [PATCH v2 41/63] net/ice/base: move and add some help function and macros

2019-08-28 Thread Qi Zhang
The patch move ice_ilog2 and ice_is_pow2 to ice_type.h, also add help macro ROUND_UP and IS_ETHER_ADDR_EQUAL. Signed-off-by: Bruce Allan Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flow.c | 9 - drivers/net/ice/base/ice_switch.c | 15 -

[dpdk-dev] [PATCH v2 38/63] net/ice/base: return switch error on invalid match criteria

2019-08-28 Thread Qi Zhang
Modify ice_add_adv_rule to return an error when an invalid match criteria is requested by the caller. This happens when the protocol and offset pair is not supported by the package. This change required a fix for the offset in the VXLAN GPE header, and also found an issue with NVGRE where the pack

[dpdk-dev] [PATCH v2 37/63] net/ice/base: associate recipes by profile type

2019-08-28 Thread Qi Zhang
Change recipe to profile association logic to determine the profile type to determine if a profile is compatible with the rule being added. Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flex_pipe.c | 87 +++

[dpdk-dev] [PATCH v2 34/63] net/ice/base: initialize driver NVM data earlier

2019-08-28 Thread Qi Zhang
The driver detects and warns about FW rollback mode before getting the NVM version (through ice_init_nvm) which results in "0.00 0x0 0.0.0" being printed. Fix this by calling ice_init_nvm earlier. This could have been fixed by moving ice_print_rollback_msg as well, but it made more sense to move i

[dpdk-dev] [PATCH v2 35/63] net/ice/base: add function to configure Tx AQ command

2019-08-28 Thread Qi Zhang
This function is needed by the driver to move PSM leaf nodes to a new parent. Additionally, add struct ice_aqc_move_txqs to struct ice_aq_desc so driver code can access it. Signed-off-by: Ben Shelton Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_admin

[dpdk-dev] [PATCH v2 36/63] net/ice/base: add support for not locking sideband queue

2019-08-28 Thread Qi Zhang
For certain PTP clock adjustments, there is a use case for locking the sideband queue at a higher level and performing an atomic series of operations while the sideband queue is locked. To accommodate this use case, split ice_sw_send_cmd() into a version that takes the lock and a version that does

[dpdk-dev] [PATCH v2 33/63] net/ice/base: set status when global cfg lock is unavailable

2019-08-28 Thread Qi Zhang
To download the DDP file to the device, a PF first has to grab the global configuration lock. When a PF can't grab this lock, set hw->pkg_dwnld_status to ICE_AQ_RC_EEXIST. Signed-off-by: Anirudh Venkataramanan Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/

[dpdk-dev] [PATCH v2 31/63] net/ice/base: update flag bits

2019-08-28 Thread Qi Zhang
Currently the VLAN ice_flg64_bits are off by 1. Fix this by setting the ICE_FLG_EVLAN_x8100 flag to 14, which also updates ICE_FLG_EVLAN_x9100 to 15 and ICE_FLG_VLAN_x8100 to 16. Signed-off-by: Brett Creeley Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ic

[dpdk-dev] [PATCH v2 32/63] net/ice/base: add more opcode and macros

2019-08-28 Thread Qi Zhang
Add more opcode and macros: 1. Add opcode for the NVM Update EMPR command. 2. Add opcode for NVM save factory settings 3. Add opcode for NVM Write/Write Activate calls 4. Add loopback reporting to get link response macros 5. Add link event defines macros Signed-off-by: Paul M Stillwell Jr Signed

[dpdk-dev] [PATCH v2 28/63] net/ice/base: move function declaration

2019-08-28 Thread Qi Zhang
Improve code orgnization, move declaration of ice_cfg_tc_nod_bw_alloc and ice_cfg_rl_burst_size from ice_common.h to ice_nvm.h. Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_common.h | 8 drivers/net/ice/base/ice_nvm.h| 4 drivers/net/

[dpdk-dev] [PATCH v2 29/63] net/ice/base: add 16-byte Flex Rx Descriptor

2019-08-28 Thread Qi Zhang
Add 16-byte Flex RX descriptor structure definition. Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_lan_tx_rx.h | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/b

[dpdk-dev] [PATCH v2 27/63] net/ice/base: improve switch advanced rule

2019-08-28 Thread Qi Zhang
Correct algorithm to detect free field vector indexes to be used for recipe line result values. The code now scans all recipes that are associated with all the field vector being targed for a new recipe to detect which result indexes are unused. Change recipe chaining code to place recipe on a sin

[dpdk-dev] [PATCH v2 30/63] net/ice/base: add 32-byte Flex Rx Desc

2019-08-28 Thread Qi Zhang
Add 32-byte Flex RX Descriptor structure definition. Signed-off-by: Junfeng Guo Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_lan_tx_rx.h | 40 1 file changed, 40 insertions(+) diff --git a/drivers/net/ice/base/ice

[dpdk-dev] [PATCH v2 26/63] net/ice/base: add locks for flow functions

2019-08-28 Thread Qi Zhang
Wrap functions to search for flow profiles, add and remove RSS configurations with flow profile locks. This is to ensure that if several VFs and PFs are disabled at the same time functions that access the flow profile lists are thread safe. Signed-off-by: Vignesh Sridhar Signed-off-by: Paul M Sti

[dpdk-dev] [PATCH v2 25/63] net/ice/base: add support for GTP and PPPoE protocols

2019-08-28 Thread Qi Zhang
Added switch protocol segments for both GTP and PPPOE protocols. Added RSS protocol segments for both GTP and PPPOE protocols. Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flow.c | 105 ++-

[dpdk-dev] [PATCH v2 22/63] net/ice/base: correct overrun Coverty hit

2019-08-28 Thread Qi Zhang
Added boundary check for layer_num in function ice_sched_rm_rl_profile, and ice_sched_add_rl_profile. Cc: sta...@dpdk.org Tarun Singh Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_sched.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) dif

[dpdk-dev] [PATCH v2 20/63] net/ice/base: check root pointer for validity

2019-08-28 Thread Qi Zhang
ice_sched_get_tc_node uses pi->root without checking for NULL. Add a check to prevent NULL pointer dereference. Signed-off-by: Anirudh Venkataramanan Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

[dpdk-dev] [PATCH v2 21/63] net/ice/base: fix type-mismatch

2019-08-28 Thread Qi Zhang
The iterators are u8, but the values being compared against are u16s. It may not ever be the case that the comparison is against a value larger than the upper bound of the smaller type, but code analysis tools don't know that. Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler") Cc: sta...

[dpdk-dev] [PATCH v2 24/63] net/ice/base: add support for NVM access commands

2019-08-28 Thread Qi Zhang
Add a new structure, ice_nvm_access, used to request access to read or write certain NVM related registers. The structure is used by NVM Update to request read or write of specific NVM registers in order to perform updates. Additionally, there is a command to request the driver "features" structu

[dpdk-dev] [PATCH v2 23/63] net/ice/base: update Boot Configuration Section read of NVM

2019-08-28 Thread Qi Zhang
Boot Configuration Section Block has been moved to the Preserved Field Area (PFA) of NVM. So, this patch updates the NVM reads that involve Boot Configuration Section. Signed-off-by: Md Fahad Iqbal Polash Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_d

[dpdk-dev] [PATCH v2 18/63] net/ice/base: resolve static analysis issues

2019-08-28 Thread Qi Zhang
Coverity complains first_free can be -1 resulting in a negative shift left when k equals 0; i.e. the expression 1 << (first_free - k). Fix this by explicitly checking for this case. Cc: sta...@dpdk.org Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- dr

[dpdk-dev] [PATCH v2 16/63] net/ice/base: move VSI to VSI group

2019-08-28 Thread Qi Zhang
Add function to add a VSI to a given VSIG and update package with this entry. The usual flow in XLT management would iterate through all characteristics of the input VSI and create a new VSIG and TCAMs till a matching characteristic is found. When a match is found the VSI is moved into a matching V

[dpdk-dev] [PATCH v2 17/63] net/ice/base: enable masking for RSS and FD field vectors

2019-08-28 Thread Qi Zhang
Allow masking per word field on RSS and FD field vectors. Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flex_pipe.c | 540 ++- drivers/net/ice/base/ice_flex_pipe.h | 5 + drivers/net/ice/base/

[dpdk-dev] [PATCH v2 14/63] net/ice/base: adjust DCB INIT for SW mode

2019-08-28 Thread Qi Zhang
Adjust ice_init_dcb to set the is_sw_lldp boolean in the case where the FW has been detected to be in an untenable state such that the driver should forcibly make sure it is off. This will ensure that the FW is in a known state. Signed-off-by: Dave Ertman Signed-off-by: Paul M Stillwell Jr Sign

[dpdk-dev] [PATCH v2 19/63] net/ice/base: fix memory leak issue

2019-08-28 Thread Qi Zhang
Need to free new ice_vsig_prof if no valid ptype can be found. Fixes: d935fb5bb091 ("net/ice/base: fix packet type size") Cc: sta...@dpdk.org Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flex_pipe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletio

[dpdk-dev] [PATCH v2 15/63] net/ice/base: add NVM pkg flag

2019-08-28 Thread Qi Zhang
Add flag for case where active package has been loaded from NVM. Signed-off-by: Ashish Shah Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flex_pipe.c | 1 + drivers/net/ice/base/ice_type.h | 1 + 2 files changed, 2 insertions(+) diff --git a/driv

[dpdk-dev] [PATCH v2 13/63] net/ice/base: add support for reading REPC statistics

2019-08-28 Thread Qi Zhang
The GLV_REPC register contains statistics for tracking received packets that are discarded due to certain errors. This register behaves differently from some of the other related statistics registers in two ways. First, it contains two 16bit statistics, and thus cannot be read as a 32bit or 40bit

[dpdk-dev] [PATCH v2 12/63] net/ice/base: add helper functions for PHY caching

2019-08-28 Thread Qi Zhang
Add additional functions to aide in caching PHY configuration. In order to cache the initial modes, we need to determine the operating mode based on capabilities. Add helper functions for flow control and FEC to take a set of capabilities and return the operating mode matching those capabilities

[dpdk-dev] [PATCH v2 09/63] net/ice/base: add SFF EEPROM AQ Command

2019-08-28 Thread Qi Zhang
read/write module eeprom on i2c bus. Signed-off-by: Scott W Taylor Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_adminq_cmd.h | 29 ++ drivers/net/ice/base/ice_common.c | 46 +++ drivers/net/ice/b

[dpdk-dev] [PATCH v2 10/63] net/ice/base: improve debug print message

2019-08-28 Thread Qi Zhang
Improve debug print message. Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_common.c | 41 +++-- drivers/net/ice/base/ice_controlq.c | 10 + 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/driver

[dpdk-dev] [PATCH v2 11/63] net/ice/base: add capabilities when in safe mode

2019-08-28 Thread Qi Zhang
The dynamic device personalization (DDP) file download onto the device can fail, and when this happens the driver has to transition to "safe mode" where only basic functionality is possible. The device though doesn't understand safe mode, and so the opcodes to discover device/function capabilities

[dpdk-dev] [PATCH v2 04/63] net/ice/base: add support to init RXDID descs fields

2019-08-28 Thread Qi Zhang
Add new switch cases to init RXDID descs MD fields. Signed-off-by: Junfeng Guo Signed-off-by: Haiyue Wang Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_common.c| 91 drivers/net/ice/base/ice_lan_tx_rx.h | 6 ++

[dpdk-dev] [PATCH v2 07/63] net/ice/base: correct argument port info

2019-08-28 Thread Qi Zhang
correct argument pi(port_info) passed in function ice_sched_get_first_node(), otherwise it will return the incorrect node. functions ice_sched_get_agg_node and ice_sched_cfg_sibl_node_prio: change argument from hw to pi for it to align to correct port. Moved saving tc node bw info from hardware s

[dpdk-dev] [PATCH v2 08/63] net/ice/base: remove debug code

2019-08-28 Thread Qi Zhang
Remove firmware logging debug code. Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_adminq_cmd.h | 88 -- drivers/net/ice/base/ice_common.c | 223 -- drivers/net/ice/base/ice_common.h | 1 - drivers/n

[dpdk-dev] [PATCH v2 05/63] net/ice/base: store number of functions for the device

2019-08-28 Thread Qi Zhang
Store the number of functions the device has. This value can be very useful when calculating how to best allocate global resources. Signed-off-by: Kevin Scott Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_common.c | 6 +- drivers/net/ice/base/ice_

[dpdk-dev] [PATCH v2 03/63] net/ice/base: add support for NVM rollback detection

2019-08-28 Thread Qi Zhang
This patch adds code to detect NVM rollback. The rollback detection is done as part of the HW init flow. When NVM rollback is detected, a warning message is printed along with the FW/NVM version data. To do this, this patch adds a helper function ice_get_nvm_version. Also, a pointer to hw->nvm is

[dpdk-dev] [PATCH v2 06/63] net/ice/base: add read PBA module function

2019-08-28 Thread Qi Zhang
New support function added - ice_get_pfa_module_tlv(), the driver or other modules can make use of this function to read the pfa area. Signed-off-by: Tarun Singh Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_common.c | 66 ++

[dpdk-dev] [PATCH v2 02/63] net/ice/base: add function to get FW mode

2019-08-28 Thread Qi Zhang
Add a helper function to get FW mode. The FW mode can be normal, debug, recovery or rollback. This makes ice_is_fw_in_rec_mode redundant, so remove it. Signed-off-by: Anirudh Venkataramanan Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_common.c | 23 +

[dpdk-dev] [PATCH v2 01/63] net/ice/base: enhance NVM read

2019-08-28 Thread Qi Zhang
Add an option to read NVM from flash directly. Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_adminq_cmd.h | 22 ++ drivers/net/ice/base/ice_dcb.h| 1 + drivers/net/ice/base/ice_nvm.c| 12 +--- 3 files changed

[dpdk-dev] [PATCH 00/63 v2] net/ice/base: update base code

2019-08-28 Thread Qi Zhang
Key Features: 1) Add PPPoE, GTP protocol support for switch, FDIR, RSS 2) Add Flexible Descriptor support. 3) Improved package download. 4) Improved RSS to support inner header 5) Improved recipe management for switch rule v2: - improved commit log Qi Zhang (63): net/ice/base: enhance NVM rea

Re: [dpdk-dev] [PATCH 0/5] lib/ring: templates to support custom element size

2019-08-28 Thread Honnappa Nagarahalli
> Subject: RE: [dpdk-dev] [PATCH 0/5] lib/ring: templates to support custom > element size > > Hi Honnappa, > > Great idea I think we can replace duplicated implementation > lib/librte_eventdev/rte_event_ring.h which uses element sizeof 16B. > There are already a couple of SW eventdevice drive

Re: [dpdk-dev] [PATCH 2/2] net/i40e: remove compiler barrier for aarch64

2019-08-28 Thread Honnappa Nagarahalli
> > As packet length extraction code was simplified,the ordering was not > necessary any more.[1] IMO, there is no relationship between the compiler barrier and [1] at least on Arm platforms. I suggest we just say 'there is no reason for the compiler barrier'. I think this compiler barrier is no

Re: [dpdk-dev] [PATCH 1/2] net/i40e: desc loading is unnecessarily ordered for aarch64

2019-08-28 Thread Honnappa Nagarahalli
Thanks Gavin, few comments are inline > -Original Message- > From: Gavin Hu > Sent: Tuesday, August 13, 2019 5:44 AM > To: dev@dpdk.org > Cc: nd ; tho...@monjalon.net; jer...@marvell.com; > pbhagavat...@marvell.com; Honnappa Nagarahalli > ; qi.z.zh...@intel.com; > bruce.richard...@intel.c

Re: [dpdk-dev] [PATCH] net/szedata2: remove resources when port is closed

2019-08-28 Thread Ferruh Yigit
On 8/27/2019 10:04 PM, Rastislav Cernay wrote: > From: Rastislav Cernay > > The rte_eth_dev_close() function now handles freeing resources for > devices (e.g., mac_addrs). To conform with the new close() behaviour we > are asserting the RTE_ETH_DEV_CLOSE_REMOVE flag so that > rte_eth_dev_close()

Re: [dpdk-dev] [PATCH v3] net/nfb: remove resources when port is closed

2019-08-28 Thread Ferruh Yigit
On 8/27/2019 9:37 PM, Rastislav Cernay wrote: > From: Rastislav Cernay > > The rte_eth_dev_close() function now handles freeing resources for > devices (e.g., mac_addrs). To conform with the new close() behaviour we > are asserting the RTE_ETH_DEV_CLOSE_REMOVE flag so that > rte_eth_dev_close()

Re: [dpdk-dev] [PATCH] build: avoid --as-needed as it causes overlinking

2019-08-28 Thread Aaron Conole
Aaron Conole writes: > Christian Ehrhardt writes: > >> On Wed, Aug 28, 2019 at 3:53 PM Aaron Conole wrote: >>> >>> Christian Ehrhardt writes: >>> >>> > A while ago telemetry was added in 57ae0ec6 and it also added as-needed >>> > to config/meson.build. This seems no more needed these days as d

Re: [dpdk-dev] [PATCH 0/5] lib/ring: templates to support custom element size

2019-08-28 Thread Pavan Nikhilesh Bhagavatula
Hi Honnappa, Great idea I think we can replace duplicated implementation lib/librte_eventdev/rte_event_ring.h which uses element sizeof 16B. There are already a couple of SW eventdevice drivers using event_ring. Pavan. >-Original Message- >From: dev On Behalf Of Honnappa >Nagarahalli

Re: [dpdk-dev] [PATCH v2 0/2] IXGBE vPMD changes for aarch64

2019-08-28 Thread Ye Xiaolong
On 08/28, Ruifeng Wang wrote: >Couple of changes to IXGBE vector PMD on aarch64 platform. >An unnecessary memory barrier was identified and removed. >Also part of processing was replaced with NEON intrinsics. >Both of the changes will help to improve performance. > >Ruifeng Wang (2): > net/ixgbe:

Re: [dpdk-dev] [PATCH] build: avoid --as-needed as it causes overlinking

2019-08-28 Thread Aaron Conole
Christian Ehrhardt writes: > On Wed, Aug 28, 2019 at 3:53 PM Aaron Conole wrote: >> >> Christian Ehrhardt writes: >> >> > A while ago telemetry was added in 57ae0ec6 and it also added as-needed >> > to config/meson.build. This seems no more needed these days as due to other >> > build changes t

Re: [dpdk-dev] [PATCH 0/5] lib/ring: templates to support custom element size

2019-08-28 Thread Jerin Jacob Kollanukkaran
> -Original Message- > From: dev On Behalf Of Honnappa Nagarahalli > Sent: Wednesday, August 28, 2019 8:16 PM > To: olivier.m...@6wind.com; yipeng1.w...@intel.com; > sameh.gobr...@intel.com; bruce.richard...@intel.com; > pablo.de.lara.gua...@intel.com; honnappa.nagaraha...@arm.com > Cc: de

[dpdk-dev] Drops seen with virtio pmd driver

2019-08-28 Thread Venumadhav Josyula
Hi All, We are observing packet drops ~@90Mbs with virtio pmd driver. These packets are not been queued in the tx descriptors, the function 'rte_eth_tx_burst' is returning the less than n. So questions are following i) are there any issues seen ? Observations in our case :- i) packets are dropp

[dpdk-dev] [PATCH] vhost: add device opr when notification to guest is sent

2019-08-28 Thread Eelco Chaudron
This patch adds an operation callback which gets called every time the library is waking up the guest trough an eventfd_write() call. This can be used by 3rd party application, like OVS, to track the number of times interrupts where generated. This might be of interest to find out system-call were

Re: [dpdk-dev] [PATCH] build: avoid --as-needed as it causes overlinking

2019-08-28 Thread Christian Ehrhardt
On Wed, Aug 28, 2019 at 3:53 PM Aaron Conole wrote: > > Christian Ehrhardt writes: > > > A while ago telemetry was added in 57ae0ec6 and it also added as-needed > > to config/meson.build. This seems no more needed these days as due to other > > build changes the ordering in buildlogs is: > > [.

[dpdk-dev] [PATCH 3/5] tools/checkpatch: relax constraints on __rte_experimental

2019-08-28 Thread Honnappa Nagarahalli
Relax the constraints on __rte_experimental usage, allow redefining to macros. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Gavin Hu --- devtools/checkpatches.sh | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.

[dpdk-dev] [PATCH 4/5] lib/ring: add ring APIs to support 32b ring elements

2019-08-28 Thread Honnappa Nagarahalli
Add ring APIs to support 32b ring elements using templates. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Dharmik Thakkar Reviewed-by: Gavin Hu Reviewed-by: Ruifeng Wang --- lib/librte_ring/Makefile | 3 ++- lib/librte_ring/meson.build | 4 +++- lib/librte_ring/rte_r

[dpdk-dev] [PATCH 5/5] lib/hash: use ring with 32b element size to save memory

2019-08-28 Thread Honnappa Nagarahalli
The freelist and external bucket indices are 32b. Using rings that use 32b element sizes will save memory. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Dharmik Thakkar Reviewed-by: Gavin Hu Reviewed-by: Ruifeng Wang --- lib/librte_hash/rte_cuckoo_hash.c | 55 ++

  1   2   >