[dpdk-dev] [PATCH v2] net/i40e: fix inputset field mask

2021-01-31 Thread Zhang,Alvin
From: Alvin Zhang The absolute field offsets of IPv4 or IPv6 header are related to hardware configuration. The X710 and X722 have different hardware configurations, and users can even modify the hardware configuration. Therefore, The default values cannot be used when calculating mask offset. Th

[dpdk-dev] [PATCH] net/i40e: fix X722 FDIR field mask

2021-01-28 Thread Zhang,Alvin
From: Alvin Zhang The absolute field offsets of IPv4 or IPv6 header are related to hardware configuration. The X710 and X722 have different hardware configurations, and users can even modify the hardware configuration. Therefore, The default values cannot be used when calculating mask offset. co

[dpdk-dev] [PATCH] net/i40e: fix X722 FDIR field mask

2021-01-28 Thread Zhang,Alvin
From: Alvin Zhang The absolute field offsets of IPv4 or IPv6 header are related to hardware configuration. The X710 and X722 have different hardware configurations, and users can even modify the hardware configuration. Therefore, The default values cannot be used when calculating mask offset. co

[dpdk-dev] [PATCH v2] app/testpmd: fix RSS key

2021-01-21 Thread Zhang,Alvin
From: Alvin Zhang Since the patch '1848b117' has initialized the variable 'key' in 'struct rte_flow_action_rss' with 'NULL', the PMD cannot get the RSS key now. Details as bellow: testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-other end key 12345

[dpdk-dev] [PATCH v7] net/ixgbe: fix configuration of max frame size

2021-01-18 Thread Zhang,Alvin
From: Alvin Zhang For some types of NIC, jumbo frame is not supported in IOV mode, so if a VF requests to configure the frame size to not bigger than IXGBE_ETH_MAX_LEN, the kernel driver returns 0, but the DPDK ixgbe PMD returens -1, this will cause the VF to fail to start when the PF driven by D

[dpdk-dev] [PATCH] app/testpmd: fix RSS key

2021-01-18 Thread Zhang,Alvin
From: Alvin Zhang Since the patch '1848b117' has set the value of key in 'struct rte_flow_action_rss' to NULL, the PMD cannot get the RSS key now. This patch sets offset and size of the key pointer as the first parameter of the token 'key' and copies the start address of the 'HEX' data to the lo

[dpdk-dev] [PATCH v6] net/ixgbe: fix configuration of max frame size

2021-01-18 Thread Zhang,Alvin
From: Alvin Zhang For some types of NIC, jumbo frame is not supported in IOV mode, so if a VF requests to configure the frame size to not bigger than RTE_ETHER_MAX_LEN, the kernel driver returns 0, but the DPDK ixgbe PMD returens -1, this will cause the VF to fail to start when the PF driven by D

[dpdk-dev] [PATCH v5] net/ixgbe: fix configuration of max frame size

2021-01-17 Thread Zhang,Alvin
From: Alvin Zhang For some types of NIC, jumbo frame is not supported in IOV mode, so if a VF requests to configure the frame size to not bigger than RTE_ETHER_MAX_LEN, the kernel driver returns 0, but the DPDK ixgbe PMD returens -1, this will cause the VF to fail to start when the PF driven by D

[dpdk-dev] [PATCH v4] net/ixgbe: fix configuration of max frame size

2021-01-15 Thread Zhang,Alvin
From: Alvin Zhang For 82599 NIC, jumbo frame feature is not supported in IOV mode, if a VF requests to configure the max frame size to that not bigger than RTE_ETHER_MAX_LEN, the kernel driver returns 0, but the DPDK ixgbe PMD returens -1, this will cause the VF to fail to start when the PF drive

[dpdk-dev] [PATCH v2] net/i40e: fix out-of-scope variable

2021-01-15 Thread Zhang,Alvin
From: Alvin Zhang Using "key", which points to an out-of-scope variable "rss_key_default". Coverity issue: 365293 Fixes: ef4c16fd9148 ("net/i40e: refactor RSS flow") Signed-off-by: Alvin Zhang --- V2: Update the commit log. --- drivers/net/i40e/i40e_hash.c | 6 -- 1 file changed, 4 inser

[dpdk-dev] [PATCH v3] net/ixgbe: fix configuration of max frame size

2021-01-14 Thread Zhang,Alvin
From: Alvin Zhang For 82599 NIC, jumbo frame feature is not supported in IOV mode, but if a VF requests to configure the frame size to that not bigger than RTE_ETHER_MAX_LEN, the PMD should not return -1. This patch keeps ixgbe PMD's handling mode consistent with kernel driver in above situation.

[dpdk-dev] [PATCH v2] net/ixgbe: fix configuration of max frame size

2021-01-14 Thread Zhang,Alvin
From: Alvin Zhang For 82599 NIC, jumbo frame feature is not supported in IOV mode, but if a VF requests to configure the frame size to that not bigger than RTE_ETHER_MAX_LEN, the PMD should not return -1. This patch keeps ixgbe PMD's handling mode consistent with kernel driver in above situation.

[dpdk-dev] [PATCH] net/ixgbe: fix configuration of max frame size

2021-01-14 Thread Zhang,Alvin
From: Alvin Zhang For 82599 NIC, jumbo frame feature is not supported in IOV mode, but if a VF requests to configure the frame size to that not bigger than RTE_ETHER_MAX_LEN, the PMD should not return -1. This patch keeps ixgbe PMD's handling mode consistent with kernel driver in above situation.

[dpdk-dev] [PATCH] net/i40e: fix out-of-scope variable

2021-01-13 Thread Zhang,Alvin
From: Alvin Zhang Using "key", which points to an out-of-scope variable "rss_key_default". Signed-off-by: Alvin Zhang --- drivers/net/i40e/i40e_hash.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_hash.c b/drivers/net/i40e/i40e_hash.c index e07

[dpdk-dev] [PATCH] net/ice: fix initialization of RSS look-up table

2021-01-07 Thread Zhang,Alvin
From: Alvin Zhang RSS look-up table initialization is done incorrectly due to divide-by-zero error. Add a check to rx-queue count. Fixes: 50370662b727 ("net/ice: support device and queue ops") Cc: sta...@dpdk.org Signed-off-by: Alvin Zhang --- drivers/net/ice/ice_ethdev.c | 10 ++ 1 f

[dpdk-dev] [PATCH v4 3/3] net/i40e: refactor RSS flow

2021-01-07 Thread Zhang,Alvin
From: Alvin Zhang 1. Delete original code. 2. Add 2 tables(One maps flow pattern and RSS type to PCTYPE, another maps RSS type to input set). 3. Parse RSS pattern and RSS type to get PCTYPE. 4. Parse RSS action to get queues, RSS function and hash field. 5. Create and destroy RSS filters. 6. C

[dpdk-dev] [PATCH v4 2/3] net/i40e: fix return value

2021-01-07 Thread Zhang,Alvin
From: Alvin Zhang The api should return the system error status, but it returned the hardware error status, this is confused for the caller. This patch adds check on hardware execution status and returns -EIO in case of hardware execution failure. Signed-off-by: Alvin Zhang Fixes: 1d4b2b4966bb

[dpdk-dev] [PATCH v4 1/3] doc: fix testpmd command for i40e RSS flow

2021-01-07 Thread Zhang,Alvin
From: Alvin Zhang The command here does not create a queue region, but only sets the lookup table, so the descriptions in the doc is not exact. Signed-off-by: Alvin Zhang Fixes: feaae285b342 ("net/i40e: support hash configuration in RSS flow") Cc: sta...@dpdk.org --- V2: Divide the patch into

[dpdk-dev] [PATCH v3 3/3] net/i40e: refactor RSS flow

2021-01-07 Thread Zhang,Alvin
From: Alvin Zhang 1. Delete original code. 2. Add 2 tables(One maps flow pattern and RSS type to PCTYPE, another maps RSS type to input set). 3. Parse RSS pattern and RSS type to get PCTYPE. 4. Parse RSS action to get queues, RSS function and hash field. 5. Create and destroy RSS filters. 6. C

[dpdk-dev] [PATCH v3 2/3] net/i40e: fix return value

2021-01-07 Thread Zhang,Alvin
From: Alvin Zhang The api should return the system error status, but it returned the hardware error status, this is confused for the caller. This patch adds check on hardware execution status and returns -EIO in case of hardware execution failure. Signed-off-by: Alvin Zhang Fixes: 1d4b2b4966bb

[dpdk-dev] [PATCH v3 1/3] doc: fix testpmd command for i40e RSS flow

2021-01-07 Thread Zhang,Alvin
From: Alvin Zhang The command here does not create a queue region, but only sets the lookup table, so the descriptions in the doc is not exact. Signed-off-by: Alvin Zhang Fixes: feaae285b342 ("net/i40e: support hash configuration in RSS flow") Cc: sta...@dpdk.org --- V2: Divide the patch into

[dpdk-dev] [PATCH] app/testpmd: fix RSS key

2020-12-29 Thread Zhang,Alvin
From: Alvin Zhang Since the patch '1848b117' has set the value of key in 'struct rte_flow_action_rss' to NULL, the PMD cannot get the RSS key now. This patch sets offset and size of the key pointer as the first parameter of the token 'key' and copies the start address of the 'HEX' data to the lo

[dpdk-dev] [PATCH v2 3/3] net/i40e: refactor RSS flow

2020-12-27 Thread Zhang,Alvin
From: Alvin Zhang 1. Delete original code. 2. Add 2 tables(One maps flow pattern and RSS type to PCTYPE, another maps RSS type to input set). 3. Parse RSS pattern and RSS type to get PCTYPE. 4. Parse RSS action to get queues, RSS function and hash field. 5. Create and destroy RSS filters. 6. C

[dpdk-dev] [PATCH v2 2/3] net/i40e: fix return value

2020-12-27 Thread Zhang,Alvin
From: Alvin Zhang The api should return the system error status, but it returned the hardware error status, this is confused for the caller. This patch adds check on hardware execution status and returns -EIO in case of hardware execution failure. Signed-off-by: Alvin Zhang Fixes: 1d4b2b4966bb

[dpdk-dev] [PATCH v2 1/3] doc: fix testpmd command for i40e RSS flow

2020-12-27 Thread Zhang,Alvin
From: Alvin Zhang The command here does not create a queue region, but only sets the lookup table, so the descriptions in the doc is not exact. Signed-off-by: Alvin Zhang Fixes: feaae285b342 ("net/i40e: support hash configuration in RSS flow") Cc: sta...@dpdk.org --- V2: Divide the patch into

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

2020-12-22 Thread Zhang,Alvin
From: Alvin Zhang Check if there are enough queue pairs currently allocated, and if not, request PF to allocate them. Fixes: e436cd43835b ("net/iavf: negotiate large VF and request more queues") Cc: sta...@dpdk.org Signed-off-by: Alvin Zhang --- drivers/net/iavf/iavf_ethdev.c | 4 +++- 1 file

[dpdk-dev] [PATCH] net/i40e: refactor of hash flow

2020-12-22 Thread Zhang,Alvin
From: Alvin Zhang 1. Delete original code. 2. Add 2 tables(One maps flow pattern and RSS type to PCTYPE, another maps RSS type to input set). 3. Parse RSS pattern and RSS type to get PCTYPE. 4. Parse RSS action to get queues, RSS function and hash field. 5. Create and destroy RSS filters. 6. C

[dpdk-dev] [PATCH] net/i40e: refactor of hash flow

2020-12-21 Thread Zhang,Alvin
From: Alvin Zhang 1. Delete original code. 2. Add 2 tables(One maps flow pattern and RSS type to PCTYPE, another maps RSS type to input set). 3. Parse RSS pattern and RSS type to get PCTYPE. 4. Parse RSS action to get queues, RSS function and hash field. 5. Create and destroy RSS filters. 6. C

[dpdk-dev] [PATCH] net/i40e: fix Rx-bytes statistics

2020-12-15 Thread Zhang,Alvin
From: Alvin Zhang Update the Rx-bytes statistics by subtract CRC bytes count from original bytes count. Fixes: bd7883c07d4a ("net/i40e: refactor some stats related functions") Cc: sta...@dpdk.org Signed-off-by: Alvin Zhang --- drivers/net/i40e/i40e_ethdev_vf.c | 1 + 1 file changed, 1 inserti

[dpdk-dev] [PATCH] net/ixgbe: check the result of setting VF MTU

2020-12-02 Thread Zhang,Alvin
From: Alvin Zhang If a VF request to set a invalid maximum packet length value, The PF kernel driver may disable its reception. This patch add codes to output information and return the error status. Signed-off-by: Alvin Zhang Fixes: 12cd03db ("ixgbevf: allow to set MTU") Cc: sta...@dpdk.

[dpdk-dev] [PATCH] test: fix buffer overflow

2020-11-25 Thread Zhang,Alvin
From: Alvin Zhang The Tx buffer may overflow when there is more than one port. Signed-off-by: Alvin Zhang Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx") Cc: sta...@dpdk.org --- app/test/test_pmd_perf.c | 18 -- 1 file changed, 8 insertions(+), 10 deletion

[dpdk-dev] [PATCH v3] net/ice: support flow mark ID in avx512 path

2020-11-12 Thread Zhang,Alvin
From: Alvin Zhang Support flow director mark ID parsing from flexible Rx descriptor in avx512 path. Signed-off-by: Alvin Zhang --- v2: Update codes according to comments. v3: Rename the function ice_flex_rxd_to_fdir_flags_vec_avx with ice_flex_rxd_to_fdir_flags_vec_avx512. --- drivers/ne

[dpdk-dev] [PATCH v2] net/ice: support flow mark ID in avx512 path

2020-11-12 Thread Zhang,Alvin
From: Alvin Zhang Support flow director mark ID parsing from flexible Rx descriptor in avx512 path. Signed-off-by: Alvin Zhang Fixes: 7f85d5ebcfe1 ("net/ice: add AVX512 vector path") --- v2: Update codes according to comments. --- drivers/net/ice/ice_rxtx_vec_avx512.c | 65 ++

[dpdk-dev] [PATCH v2] net/ice: support flow mark ID in avx512 path

2020-11-12 Thread Zhang,Alvin
From: Alvin Zhang Support flow director mark ID parsing from flexible Rx descriptor in avx512 path. Signed-off-by: Alvin Zhang Fixes: 7f85d5ebcfe1 ("net/ice: add AVX512 vector path") --- v1: Update codes according to comments. --- drivers/net/ice/ice_rxtx_vec_avx512.c | 65 ++

[dpdk-dev] [PATCH] net/ice: support flow mark ID in avx512 path

2020-11-12 Thread Zhang,Alvin
From: Alvin Zhang Support flow director mark ID parsing from flexible Rx descriptor in avx512 path. Signed-off-by: Alvin Zhang Fixes: 7f85d5ebcfe1 ("net/ice: add AVX512 vector path") --- drivers/net/ice/ice_rxtx_vec_avx512.c | 65 +-- 1 file changed, 63 inserti

[dpdk-dev] [PATCH] net/ice: support flow mark ID in avx512 path

2020-11-11 Thread Zhang,Alvin
From: Alvin Zhang Support flow director mark ID parsing from flexible Rx descriptor in avx512 path. Signed-off-by: Alvin Zhang Fixes: 59852468c19c ("net/ice: support flow mark in AVX path") Cc: sta...@dpdk.org --- drivers/net/ice/ice_rxtx_vec_avx512.c | 65 +--

[dpdk-dev] [RFC] net/i40e: refactor of hash flow

2020-11-11 Thread Zhang,Alvin
From: Alvin Zhang 1. Delete original code. 2. Add 2 tables(pattern RSS type matched PCTYPE, RSS type to input set). 3. Parse RSS pattern and RSS type to get PCTYPE. 4. Parse RSS action to get queues, RSS function and hash field. 5. Create and destroy RSS filters. 6. Create new files for hash flow

[dpdk-dev] [PATCH] net/ice: support flow mark ID in avx512 path

2020-11-11 Thread Zhang,Alvin
From: Alvin Zhang Support flow director mark ID parsing from flexible Rx descriptor in avx512 path. Signed-off-by: Alvin Zhang --- drivers/net/ice/ice_rxtx_vec_avx512.c | 61 +++ 1 file changed, 61 insertions(+) diff --git a/drivers/net/ice/ice_rxtx_vec_avx512.

[dpdk-dev] [PATCH] doc: update release notes for iavf

2020-11-04 Thread Zhang,Alvin
From: Alvin Zhang Update release notes with feature of outer IP hash for GTPC and GTPU. Signed-off-by: Alvin Zhang --- doc/guides/rel_notes/release_20_11.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst ind

[dpdk-dev] [PATCH] net/iavf: fix Rx offload flags in SSE path

2020-10-27 Thread Zhang,Alvin
From: Alvin Zhang Update reading offload flags of last two of four packets. Fixes: 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE path") Cc: sta...@dpdk.org Signed-off-by: Alvin Zhang --- drivers/net/iavf/iavf_rxtx_vec_sse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[dpdk-dev] [RFC] net/i40e: refactor of hash flow

2020-10-22 Thread Zhang,Alvin
From: Alvin Zhang 1. Delete original code. 2. Add 2 tables(pattern RSS type matched PCTYPE, RSS type to input set). 3. Parse RSS pattern and RSS type to get PCTYPE. 4. Parse RSS action to get queues, RSS function and hash field. 5. Create and destroy RSS filters. 6. Create new files for hash flow

[dpdk-dev] [PATCH] net/ice: fix Rx offload flags in SSE path

2020-10-22 Thread Zhang,Alvin
From: Alvin Zhang Update reading offload flags of last two of four packets. Fixes: ece1f8a8f1c8 ("net/ice: switch to flexible descriptor in SSE path") Cc: sta...@dpdk.org Signed-off-by: Alvin Zhang --- drivers/net/ice/ice_rxtx_vec_sse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[dpdk-dev] [PATCH] net/ice: fix RSS hash offload at vector mode

2020-10-14 Thread Zhang Alvin
From: Alvin Zhang 1. According to whether the RSS offload bit of the received packet is set to determin if the RSS hash should be read or not. 2. Simplify the code of reading RSS hash value. Fixes: 12443386a0b0 ("net/ice: support flex Rx descriptor RxDID22") Cc: sta...@dpdk.org Signed-off-by