[PATCH v2] net/iavf: fix gtpu extension flow error

2022-07-05 Thread wenxuanx . wu
From: Wenxuan Wu Due to the change of struct rte_gtp_psc_generic_hdr, kernel driver can not handle gtp_psc properly, we introduce a new structure to fix this gap between kernel driver and struct rte_gtp_psc_generic_hdr. Fixes: d5eb3e600d9e ("net/iavf: support flow director basic rule") Cc: simei

[PATCH v2] net/iavf: fix gtpu extension flow error

2022-07-05 Thread wenxuanx . wu
From: Wenxuan Wu Due to the change of struct rte_gtp_psc_generic_hdr, kernel driver can not handle gtp_psc properly, we introduce a new structure to fix this gap between kernel driver and struct rte_gtp_psc_generic_hdr. Fixes: d5eb3e600d9e ("net/iavf: support flow director basic rule") Cc: simei

[PATCH] net/iavf: fix gtpu extension flow error

2022-07-05 Thread wenxuanx . wu
From: Wenxuan Wu Due to the change of struct rte_gtp_psc_generic_hdr, firmware can not handle gtp_psc properly, we induce a new structure to fix this gap between firmware and struct rte_gtp_psc_generic_hdr. Fixes: d5eb3e600d9e ("net/iavf: support flow director basic rule") Cc: simei...@intel.com

[PATCH v2] net/ice/base: fix gcc 12 warning stringop-overflow

2022-06-23 Thread wenxuanx . wu
From: Wenxuan Wu gcc 12 with -O2 flag would raise the following warning: ../drivers/net/ice/base/ice_switch.c:7220:61: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 7220 | buf[recps].content.lkup_indx[i + 1] = entry->fv_idx[i]; | ~~~

[PATCH] app: fix gcc 12 array bounds warning

2022-06-16 Thread wenxuanx . wu
From: Wenxuan Wu when n == 1000, and it would overflow the array size of 4 bytes with nul terminator. Change the logic to avoid this warning. Fixes: 15c431864000 ("app/flow-perf: add packet forwarding support") Cc: sta...@dpdk.org Signed-off-by: Wenxuan Wu --- app/test-flow-perf/main.c | 2 +-

[PATCH] ice/base: fix gcc 12 warning stringop-overflow

2022-06-16 Thread wenxuanx . wu
From: Wenxuan Wu Gcc with -O2 flag, would retrieve the value in one time. This patch changed the type of fv_idx in struct ice_recp_grp_entry to align with its callers which is also u8 type. When u8 idx[5] = a value u16 index[4], gcc12 would give this warning, because it is not big enough to stor

[PATCH] app: fix gcc 12 array bounds warning

2022-06-16 Thread wenxuanx . wu
From: Wenxuan Wu when n == 1000, and it would be overflow the array size of 4 bytes with nul terminator. Change the logic to avoid this warning. Fixes: 15c431864000 ("app/flow-perf: add packet forwarding support") Cc: sta...@dpdk.org Signed-off-by: Wenxuan Wu --- app/test-flow-perf/main.c | 2

[PATCH 1/2] app: fix gcc 12 array bounds warning

2022-06-16 Thread wenxuanx . wu
From: Wenxuan Wu when n == 1000, and it would be overflow the array size of 4 bytes with nul terminator. Change the logic to avoid this warning. Fixes: 15c431864000 ("app/flow-perf: add packet forwarding support") Cc: sta...@dpdk.org Signed-off-by: Wenxuan Wu --- app/test-flow-perf/main.c | 2

[PATCH v9 4/4] net/ice: support buffer split in Rx path

2022-06-13 Thread wenxuanx . wu
From: Wenxuan Wu This patch adds support for protocol based buffer split in normal Rx data paths. When the Rx queue is configured with specific protocol type, packets received will be directly split into protocol header and payload parts limitation of ice pmd. And the two parts will be put into d

[PATCH v9 3/4] app/testpmd: add rxhdrs commands and parameters

2022-06-13 Thread wenxuanx . wu
From: Wenxuan Wu Add command line parameter: --rxhdrs=mac,[ipv4,udp] Set the protocol_hdr of segments to scatter packets on receiving if split feature is engaged. And the queues with BUFFER_SPLIT flag. Add interactive mode command: testpmd>set rxhdrs mac,ipv4,l3,tcp,udp,sctp (protocol sequence

[PATCH v9 2/4] ethdev: introduce protocol hdr based buffer split

2022-06-13 Thread wenxuanx . wu
From: Wenxuan Wu Currently, Rx buffer split supports length based split. With Rx queue offload RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT enabled and Rx packet segment configured, PMD will be able to split the received packets into multiple segments. However, length based buffer split is not suitable for N

[PATCH v9 1/4] ethdev: introduce protocol header API

2022-06-13 Thread wenxuanx . wu
From: Wenxuan Wu This patch added new ethdev API to retrieve supported protocol header mask of a PMD, which helps to configure protocol header based buffer split. Signed-off-by: Wenxuan Wu --- doc/guides/rel_notes/release_22_07.rst | 2 ++ lib/ethdev/ethdev_driver.h | 18 +

[PATCH v9 0/4] add an api to support proto based buffer split

2022-06-13 Thread wenxuanx . wu
From: Wenxuan Wu Protocol type based buffer split consists of splitting a received packet into several separate segments based on the packet content. It is useful in some scenarios, such as GPU acceleration. The splitting will help to enable true zero copy and hence improve the performance signif

[PATCH] build: fix meson build when gcc >= 10.0

2022-06-06 Thread wenxuanx . wu
From: Wenxuan Wu GCC version greater than 10.0, with compile option -O2, several warnings info would appear, this fix omitted these warnings. Fixes: cfacbcb5a23b ("build: disable gcc 10 zero-length-bounds warning") Cc: sta...@dpdk.org Signed-off-by: Wenxuan Wu --- config/meson.build | 7

[PATCH v8 3/3] app/testpmd: add rxhdrs commands and parameters

2022-06-01 Thread wenxuanx . wu
From: Wenxuan Wu Add command line parameter: --rxhdrs=mac,[ipv4,udp] Set the protocol_hdr of segments to scatter packets on receiving if split feature is engaged. And the queues with BUFFER_SPLIT flag. Add interative mode command: testpmd>set rxhdrs mac,ipv4,l3,tcp,udp,sctp (protocol sequence a

[PATCH v8 2/3] net/ice: support buffer split in Rx path

2022-06-01 Thread wenxuanx . wu
From: Wenxuan Wu This patch adds support for proto based buffer split in normal Rx data paths. When the Rx queue is configured with specific protocol type, packets received will be directly splitted into protocol header and payload parts. And the two parts will be put into different mempools. Cu

[PATCH v8 1/3] ethdev: introduce protocol header based buffer split

2022-06-01 Thread wenxuanx . wu
From: Wenxuan Wu Currently, Rx buffer split supports length based split. With Rx queue offload RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT enabled and Rx packet segment configured, PMD will be able to split the received packets into multiple segments. However, length based buffer split is not suitable for N

[PATCH v8 1/3] ethdev: introduce protocol hdr based buffer split

2022-06-01 Thread wenxuanx . wu
From: Wenxuan Wu Currently, Rx buffer split supports length based split. With Rx queue offload RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT enabled and Rx packet segment configured, PMD will be able to split the received packets into multiple segments. However, length based buffer split is not suitable for N

[PATCH v8 0/3] ethdev: introduce protocol type based header split

2022-06-01 Thread wenxuanx . wu
From: Wenxuan Wu Buffer split consists of splitting a received packet into two separate regions based on the packet content. It is useful in some scenarios, such as GPU acceleration. The splitting will help to enable true zero copy and hence improve the performance significantly. This patchset e

[PATCH v7 3/3] app/testpmd: add rxhdrs commands and parameters

2022-06-01 Thread wenxuanx . wu
From: Wenxuan Wu Add command line parameter: --rxhdrs=mac,[ipv4,udp] Set the protocol_hdr of segments to scatter packets on receiving if split feature is engaged. And the queues with BUFFER_SPLIT flag. Add interative mode command: testpmd>set rxhdrs mac,ipv4,l3,tcp,udp,sctp (protocol sequence a

[PATCH v7 2/3] net/ice: support buffer split in Rx path

2022-06-01 Thread wenxuanx . wu
From: Wenxuan Wu This patch adds support for proto based buffer split in normal Rx data paths. When the Rx queue is configured with specific protocol type, packets received will be directly splitted into protocol header and payload parts. And the two parts will be put into different mempools. Cu

[PATCH v7 1/3] ethdev: introduce protocol header based buffer split

2022-06-01 Thread wenxuanx . wu
From: Wenxuan Wu Currently, Rx buffer split supports length based split. With Rx queue offload RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT enabled and Rx packet segment configured, PMD will be able to split the received packets into multiple segments. However, length based buffer split is not suitable for N

[PATCH v7 0/3] ethdev: introduce protocol type based header split

2022-06-01 Thread wenxuanx . wu
From: Wenxuan Wu Buffer split consists of splitting a received packet into two separate regions based on the packet content. It is useful in some scenarios, such as GPU acceleration. The splitting will help to enable true zero copy and hence improve the performance significantly. This patchset e

[PATCH v7 3/3] app/testpmd: add rxhdrs commands and parameters

2022-06-01 Thread wenxuanx . wu
From: Wenxuan Wu Add command line parameter: --rxhdrs=mac,[ipv4,udp] Set the protocol_hdr of segments to scatter packets on receiving if split feature is engaged. And the queues with BUFFER_SPLIT flag. Add interative mode command: testpmd>set rxhdrs mac,ipv4,l3,tcp,udp,sctp (protocol sequence a

[PATCH v7 2/3] net/ice: support buffer split in Rx path

2022-06-01 Thread wenxuanx . wu
From: Wenxuan Wu This patch adds support for proto based buffer split in normal Rx data paths. When the Rx queue is configured with specific protocol type, packets received will be directly splitted into protocol header and payload parts. And the two parts will be put into different mempools. Cu

[PATCH v7 1/3] ethdev: introduce protocol header based buffer split

2022-06-01 Thread wenxuanx . wu
From: Wenxuan Wu Currently, Rx buffer split supports length based split. With Rx queue offload RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT enabled and Rx packet segment configured, PMD will be able to split the received packets into multiple segments. However, length based buffer split is not suitable for N

[PATCH v7 0/3] ethdev: introduce protocol type based header split

2022-06-01 Thread wenxuanx . wu
From: Wenxuan Wu Buffer split consists of splitting a received packet into two separate regions based on the packet content. It is useful in some scenarios, such as GPU acceleration. The splitting will help to enable true zero copy and hence improve the performance significantly. This patchset e

[PATCH v4] net/i40e: fix max frame size config at port level

2022-05-17 Thread wenxuanx . wu
From: Wenxuan Wu Previously, max frame size can only be set when link is up, and the wait time is 1 sec. Startup time of 10G_BASET longer than 1s would result in failure. Acctually, max frame size of media type I40E_MEDIA_TYPE_BASET can be set regardless of link status. This patch omitted the l

[PATCH v4] net/i40e: fix max frame size config at port level

2022-05-17 Thread wenxuanx . wu
From: Wenxuan Wu Previously, max frame size can only be set when link is up, and the wait time is 1 sec. Startup time of 10G_BASET longer than 1s would result in failure. Acctually, max frame size of media type I40E_MEDIA_TYPE_BASET can be set regardless of link status. This patch omitted the l

[PATCH v3] net/i40e: fix max frame size config at port level

2022-05-13 Thread wenxuanx . wu
From: Wenxuan Wu Previously, max frame size can only be set when link is up, and the wait time is 1 sec. Startup time of 10G_BASET longer than 1s would result in failure. Acctually, max frame size of media type I40E_MEDIA_TYPE_BASET can be set regardless of link status. This patch omitted the l

[PATCH v2] net/i40e: fix max frame size config at port level

2022-05-10 Thread wenxuanx . wu
From: Wenxuan Wu Previously, max frame size can only be set when link is up, and the wait time is 1 sec. For media type of I40E_10G_BASET would consume longer time which is too short to up would result in error. Acctually, max frame size of media type I40E_MEDIA_TYPE_BASET can be set regardless

[PATCH v2] net/i40e: fix max frame size config at port level

2022-05-10 Thread wenxuanx . wu
From: Wenxuan Wu Previously, max frame size can only be set when link is up, and the wait time is 1 sec. For media type of I40E_10G_BASET would consume longer time which is too short to up would result in error. Acctually, max frame size of media type I40E_MEDIA_TYPE_BASET can be set regardless

[PATCH] net/i40e: fix max frmame size config at port level

2022-04-28 Thread wenxuanx . wu
From: Wenxuan Wu Previously, max frame size can only be set when link is up, and the wait time is 1 sec. But for nic media type of I40E_10G_BASET would consume longer time which is too short to up would result in error. Acctually, max frame size of media type I40E_MEDIA_TYPE_BASET can be set reg

[PATCH] driver/i40e: enable max frame at port level

2022-04-28 Thread wenxuanx . wu
From: Wenxuan Wu This fix resolve max frame size can only be set when link is up. hw.type would result in different behavior: For X710, max frame size can be set regardless of link status. For X722, link up should be guaranteed. Fixes: a4ba77367923 Cc: sta...@dpdk.org Signed-off-by: Wenxuan Wu

[PATCH] net/ivaf: make reset wait time longer

2022-04-26 Thread wenxuanx . wu
From: Wenxuan Wu In 810 CA series, reset time would be longer to wait the kernel return value. this patch enable reset wait time longer to finish kernel reset operation. Signed-off-by: Wenxuan Wu --- drivers/net/iavf/iavf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

[PATCH v5 3/4] net/ice: support proto based buf split in Rx path

2022-04-26 Thread wenxuanx . wu
From: Wenxuan Wu This patch adds support for proto based buffer split in normal Rx data paths. When the Rx queue is configured with specific protocol type, packets received will be directly splitted into protocol header and payload parts. And the two parts will be put into different mempools. Cu

[PATCH v5 2/4] app/testpmd: add proto based buffer split config

2022-04-26 Thread wenxuanx . wu
From: Wenxuan Wu This patch adds protocol based buffer split configuration in testpmd. The protocol split feature is off by default. To enable protocol split, you need: 1. Start testpmd with two mempools. e.g. --mbuf-size=2048,2048 2. Configure Rx queue with rx_offload buffer split on. 3. Set the

[PATCH v5 1/4] lib/ethdev: introduce protocol type based buffer split

2022-04-26 Thread wenxuanx . wu
From: Wenxuan Wu Protocol based buffer split consists of splitting a received packet into two separate regions based on its content. The split happens after the packet protocol header and before the packet payload. Splitting is usually between the packet protocol header that can be posted to a de

[PATCH v5 0/3] ethdev: introduce protocol based buffer split

2022-04-26 Thread wenxuanx . wu
From: Wenxuan Wu Protocol based buffer split consists of splitting a received packet into two separate regions based on the packet content. It is useful in some scenarios, such as GPU acceleration. The splitting will help to enable true zero copy and hence improve the performance significantly.

[PATCH] net/i40e: max frame size config regardless of link status

2022-04-14 Thread wenxuanx . wu
From: Wenxuan Wu Previously, max frame size can only be set when link is up, testpmd configuration when port is down, so there is a confilict to apply this max frame size before link up. Actual results: Set max frame size at port level not applicable on link down RX-packets: 0

[v4 3/3] net/ice: support header split in Rx data path

2022-04-02 Thread wenxuanx . wu
From: Xuan Ding This patch adds support for header split in normal Rx data paths. When the Rx queue is configured with header split for specific protocol type, packets received will be directly splited into header and payload parts. And the two parts will be put into different mempools. Currentl

[v4 2/3] app/testpmd: add header split configuration

2022-04-02 Thread wenxuanx . wu
From: Xuan Ding This patch adds header split configuration in testpmd. The header split feature is off by default. To enable header split, you need: 1. Configure Rx queue with rx_offload header split on. 2. Set the protocol type of header split. Command for set header split protocol type: testpm

[v4 1/3] ethdev: introduce protocol type based header split

2022-04-02 Thread wenxuanx . wu
From: Xuan Ding Header split consists of splitting a received packet into two separate regions based on the packet content. The split happens after the packet header and before the packet payload. Splitting is usually between the packet header that can be posted to a dedicated buffer and the pack

[v4 0/3] ethdev: introduce protocol type based header split

2022-04-02 Thread wenxuanx . wu
From: Xuan Ding Header split consists of splitting a received packet into two separate regions based on the packet content. It is useful in some scenarios, such as GPU acceleration. The splitting will help to enable true zero copy and hence improve the performance significantly. This patchset ex

[PATCH v2] app/testpmd : fix testpmd quit error

2022-03-03 Thread wenxuanx . wu
From: wenxuan wu When testpmd use func get_eth_dev_info() while related resource had been released. Change the logic of func port_is_bonding_slave, this func eth_dev_info_get_print_err while pf is released would result in this error. Use ports instead to avoid this bug. Fixes: 0a0821bcf312 ("

[PATCH v2 2/2] app/testpmd:fix testpmd quit failure

2022-02-23 Thread wenxuanx . wu
From: wenxuan wu When testpmd start ed with 1 pf and 2 vfs, testpmd quited while vfs were still alive would result in failure. Root cause is that pf had been released already but vfs were still accessing by func rte_eth_dev_info_get, which would result in heap-free-after-use error. By quitting

[PATCH v2 1/2] lib/ethdev: add reverse macro to quit testpmd

2022-02-23 Thread wenxuanx . wu
From: wenxuan wu There is a heap-free-after-use bug when quit testpmd with pf and vfs, stop and close ports in reverse order is a more reasonable approach. Cc: sta...@dpdk.org Signed-off-by: wenxuan wu --- lib/ethdev/rte_ethdev.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(

[PATCH 0/2] app/testpmd: fix testpmd quit with pf and vfs

2022-02-23 Thread wenxuanx . wu
From: wenxuan wu Apply our reverse iterator macro into testpmd to avoid testpmd startups with pf and vfs quit without error heap-free-before-use wenxuan wu (2): lib/ethdev: add reverse macro to quit testpmd app/testpmd:fix testpmd quit failure app/test-pmd/testpmd.c | 4 ++-- lib/ethde

[PATCH 2/2] lib/ethdev: add reverse macro to quit testpmd

2022-02-17 Thread wenxuanx . wu
From: wenxuan wu There is a heap-free-after-use bug when quit testpmd with pf and vfs, stop and close ports in reverse order is a more reasonable approach. Cc: sta...@dpdk.org Signed-off-by: wenxuan wu --- lib/ethdev/rte_ethdev.h | 14 +- 1 file changed, 13 insertions(+), 1 deleti

[PATCH 1/2] app/testpmd: fix quit testpmd with vfs and pf

2022-02-17 Thread wenxuanx . wu
From: wenxuan wu When testpmd startups with pf and vfs,this error occurs when quitting, results in pf is released before vfs ,so the vf would access an freed heap memory. The solution is that release our allocated ports in reverse order,add two macros RTE_ETH_FOREACH_DEV_REVERSE_OWNED_BY and RTE

[PATCH 0/2] app/testpmd: fix quit testpmd with vfs and pf

2022-02-17 Thread wenxuanx . wu
From: wenxuan wu Apply our reverse iterator macro into testpmd to avoid testpmd startups with pf and vfs quit without error heap-free-before-use wenxuan wu (2): app/testpmd: fix quit testpmd with vfs and pf lib/ethdev: add reverse macro to quit testpmd app/test-pmd/testpmd.c | 4 ++--

[DPDK] /lib/eal: fix failed to stop device monitor error

2022-02-11 Thread wenxuanx . wu
From: Wenxuan Wu The ret value in rte_dev_event_monitor_stop stands for whether the monitor has been successfully closed ,and should not bind with rte_intr_callback_unregister,so once it goes to the right exit point of rte_dev_event_monitor, the ret value should be set to 0. Also ,the refmonitor

[PATCH] eal/linux: fix fail to stop device monitor error

2022-02-10 Thread wenxuanx . wu
From: Wenxuan Wu The ret value stands for whether the device monitor has been successfully closed, and has nothing to do with rte_intr_callback_unregister funcs once it return a value greater than 0 .So if the closure procedure has gone to the right exit point ,we should set this value to 0. Als

[PATCH] app/testpmd : fix testpmd quit error

2022-02-09 Thread wenxuanx . wu
From: Wenxuan Wu when testpmd startup with pf and vfs, it is ok when running, while exiting, it will result in heap-free-after-use which means pf is released but vf is still accessing. Change the logic of func port_is_bonding_slave ,this func eth_dev_info_get_print_err while pf is released would

[PATCH] app/testpmd : fix testpmd quit error

2022-02-09 Thread wenxuanx . wu
From: Wenxuan Wu when testpmd starup with pf and vfs, it is ok when running, while exiting, it will result in heap-free-after-use which means pf is released but vf is still accessing. Change the logic of func port_is_bonding_slave ,this func eth_dev_info_get_print_err while pf is released would