[PATCH] app/testpmd: fix testpmd crash when quit with mlx5 avail_thresh enabled

2022-10-23 Thread Spike Du
hresh configuration to not handle the events. This is documented in mlx5 driver guide. To avoid the crash in such use case, check port status, if it is not RTE_PORT_STARTED, don't process the avail_thresh event. Fixes: 0edfc9b08316 ("app/testpmd: add Host Shaper command") Signed-off-by: Spike

[PATCH v2] mlx5/testpmd: fix crash on quit with avail thresh enabled

2022-11-02 Thread Spike Du
hresh configuration to not handle the events. This is documented in mlx5 driver guide. To avoid the crash in such use case, check port status, if it is not RTE_PORT_STARTED, don't process the avail_thresh event. Fixes: f41a5092e6ae ("app/testpmd: add host shaper command") Cc: sta...@dpdk.org

RE: [PATCH v4 3/7] ethdev: introduce Rx queue based fill threshold

2022-06-06 Thread Spike Du
Hi Andrew, Please see below for "fill threshold" concept, I'm ok with other comments about code. Regards, Spike. > -Original Message- > From: Andrew Rybchenko > Sent: Saturday, June 4, 2022 8:46 PM > To: Spike Du ; Matan Azrad ; > Slava Ovsii

RE: [PATCH v4 3/7] ethdev: introduce Rx queue based fill threshold

2022-06-06 Thread Spike Du
Tuesday, June 7, 2022 1:16 AM > To: Spike Du ; Matan Azrad ; > Slava Ovsiienko ; Ori Kam ; > NBU-Contact-Thomas Monjalon (EXTERNAL) ; > Wenzhuo Lu ; Beilei Xing ; > Bernard Iremonger ; Ray Kinsella > ; Neil Horman > Cc: step...@networkplumber.org; m...@smartsharesystems.co

[PATCH v5 0/7] introduce per-queue available descriptor threshold and host shaper

2022-06-07 Thread Spike Du
llow David Marchand's driver specific commands framework to add mlx5 specific commands. Spike Du (7): net/mlx5: add LWM support for Rxq common/mlx5: share interrupt management ethdev: introduce Rx queue based available descriptor threshold net/mlx5: add LWM event handling support net/m

[PATCH v5 1/7] net/mlx5: add LWM support for Rxq

2022-06-07 Thread Spike Du
Add lwm(Limit WaterMark) field to Rxq object which indicates the percentage of RX queue size used by HW to raise LWM event to the user. Allow LWM setting in modify_rq command. Allow the LWM configuration dynamically by adding RDY2RDY state change. Signed-off-by: Spike Du --- drivers/net/mlx5

[PATCH v5 3/7] ethdev: introduce Rx queue based available descriptor threshold

2022-06-07 Thread Spike Du
- Example commands: To configure avail_thresh as 30% of rxq size on port 1 rxq 0: testpmd> set port 1 rxq 0 avail_thresh 30 To disable avail_thresh on port 1 rxq 0: testpmd> set port 1 rxq 0 avail_thresh 0 Signed-off-by: Spike Du --- app/test-pmd/cmdline.c

[PATCH v5 5/7] net/mlx5: support Rx queue based available descriptor threshold

2022-06-07 Thread Spike Du
finds the next RX queue with pending LWM event if any, starting from the given RX queue index. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst | 12 +++ doc/guides/rel_notes/release_22_07.rst | 1 + drivers/common/mlx5/mlx5_prm.h | 1 + drivers/net/mlx5/mlx5.c

[PATCH v5 7/7] app/testpmd: add Host Shaper command

2022-06-07 Thread Spike Du
t 1 host_shaper avail_thresh_triggered 0 rate 50 Add sample code to handle rxq available descriptor threshold event, it delays a while so that rxq empties, then disables host shaper and rearms available descriptor threshold event. Signed-off-by: Spike Du --- app/test-pmd/testpmd.c | 6 ++ doc/g

[PATCH v5 6/7] net/mlx5: add private API to config host port shaper

2022-06-07 Thread Spike Du
. The shaper limits the rate of traffic from host port to wire port. If lwm-triggered is enabled, a 100Mbps shaper is enabled automatically when one of the host port's Rx queues receives available descriptor threshold event. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst

[PATCH v5 2/7] common/mlx5: share interrupt management

2022-06-07 Thread Spike Du
There are many duplicate code of creating and initializing rte_intr_handle. Add a new mlx5_os API to do this, replace all PMD related code with this API. Signed-off-by: Spike Du --- drivers/common/mlx5/linux/mlx5_common_os.c | 131 ++ drivers/common/mlx5/linux

[PATCH v5 4/7] net/mlx5: add LWM event handling support

2022-06-07 Thread Spike Du
When LWM meets RQ WQE, the kernel driver raises an event to SW. Use devx event_channel to catch this and to notify the user. Allocate this channel per shared device. The channel has a cookie that informs the specific event port and queue. Signed-off-by: Spike Du --- drivers/net/mlx5/mlx5.c

RE: [PATCH v5 7/7] app/testpmd: add Host Shaper command

2022-06-09 Thread Spike Du
> -Original Message- > From: Andrew Rybchenko > Sent: Thursday, June 9, 2022 3:55 PM > To: Spike Du ; Matan Azrad ; > Slava Ovsiienko ; Ori Kam ; > NBU-Contact-Thomas Monjalon (EXTERNAL) ; > Xiaoyun Li ; Aman Singh > ; Yuying Zhang > Cc: st

[PATCH v6] app/testpmd: add Host Shaper command

2022-06-12 Thread Spike Du
- add 'static' keyword for cmdline structs - in AVAIL_THRESH event callback, add check to ensure it's mlx5 port Spike Du (1): app/testpmd: add Host Shaper command app/test-pmd/testpmd.c | 11 +++ doc/guides/nics/mlx5.rst| 46 + drivers/net/mlx5/meson

[PATCH v6] app/testpmd: add Host Shaper command

2022-06-12 Thread Spike Du
t 1 host_shaper avail_thresh_triggered 0 rate 50 Add sample code to handle rxq available descriptor threshold event, it delays a while so that rxq empties, then disables host shaper and rearms available descriptor threshold event. Signed-off-by: Spike Du --- app/test-pmd/testpmd.c | 11 +++ doc/g

RE: [PATCH v6] app/testpmd: add Host Shaper command

2022-06-14 Thread Spike Du
> -Original Message- > From: Singh, Aman Deep > Sent: Tuesday, June 14, 2022 5:44 PM > To: Spike Du ; Matan Azrad ; > Slava Ovsiienko ; Ori Kam ; > NBU-Contact-Thomas Monjalon (EXTERNAL) ; > Wenzhuo Lu ; Beilei Xing ; > Bernard Iremonger ; Shahaf Shule

[PATCH v7] app/testpmd: add Host Shaper command

2022-06-14 Thread Spike Du
- remove some test code. Spike Du (1): app/testpmd: add Host Shaper command app/test-pmd/testpmd.c | 7 ++ doc/guides/nics/mlx5.rst| 46 + drivers/net/mlx5/meson.build| 4 + drivers/net/mlx5/mlx5_testpmd.c | 206 d

[PATCH v7] app/testpmd: add Host Shaper command

2022-06-14 Thread Spike Du
t 1 host_shaper avail_thresh_triggered 0 rate 50 Add sample code to handle rxq available descriptor threshold event, it delays a while so that rxq empties, then disables host shaper and rearms available descriptor threshold event. Signed-off-by: Spike Du --- app/test-pmd/testpmd.c | 7 ++ doc/g

[PATCH v8 2/6] common/mlx5: share interrupt management

2022-06-15 Thread Spike Du
There are many duplicate code of creating and initializing rte_intr_handle. Add a new mlx5_os API to do this, replace all PMD related code with this API. Signed-off-by: Spike Du --- drivers/common/mlx5/linux/mlx5_common_os.c | 131 ++ drivers/common/mlx5/linux

[PATCH v8 0/6] introduce per-queue available descriptor threshold and host shaper

2022-06-15 Thread Spike Du
llow David Marchand's driver specific commands framework to add mlx5 specific commands. Spike Du (6): net/mlx5: add LWM support for Rxq common/mlx5: share interrupt management net/mlx5: add LWM event handling support net/mlx5: support Rx queue based available descriptor threshold net/ml

[PATCH v8 5/6] net/mlx5: add private API to config host port shaper

2022-06-15 Thread Spike Du
. The shaper limits the rate of traffic from host port to wire port. If lwm-triggered is enabled, a 100Mbps shaper is enabled automatically when one of the host port's Rx queues receives available descriptor threshold event. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst

[PATCH v8 1/6] net/mlx5: add LWM support for Rxq

2022-06-15 Thread Spike Du
Add lwm(Limit WaterMark) field to Rxq object which indicates the percentage of RX queue size used by HW to raise LWM event to the user. Allow LWM setting in modify_rq command. Allow the LWM configuration dynamically by adding RDY2RDY state change. Signed-off-by: Spike Du --- drivers/net/mlx5

[PATCH v8 3/6] net/mlx5: add LWM event handling support

2022-06-15 Thread Spike Du
When LWM meets RQ WQE, the kernel driver raises an event to SW. Use devx event_channel to catch this and to notify the user. Allocate this channel per shared device. The channel has a cookie that informs the specific event port and queue. Signed-off-by: Spike Du --- drivers/net/mlx5/mlx5.c

[PATCH v8 4/6] net/mlx5: support Rx queue based available descriptor threshold

2022-06-15 Thread Spike Du
finds the next RX queue with pending LWM event if any, starting from the given RX queue index. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst | 12 +++ doc/guides/rel_notes/release_22_07.rst | 1 + drivers/common/mlx5/mlx5_prm.h | 1 + drivers/net/mlx5/mlx5.c

[PATCH v8 6/6] app/testpmd: add Host Shaper command

2022-06-15 Thread Spike Du
t 1 host_shaper avail_thresh_triggered 0 rate 50 Add sample code to handle rxq available descriptor threshold event, it delays a while so that rxq empties, then disables host shaper and rearms available descriptor threshold event. Signed-off-by: Spike Du --- app/test-pmd/testpmd.c | 7 ++ doc/g

[PATCH v9 1/6] net/mlx5: add LWM support for Rxq

2022-06-15 Thread Spike Du
Add lwm(Limit WaterMark) field to Rxq object which indicates the percentage of RX queue size used by HW to raise LWM event to the user. Allow LWM setting in modify_rq command. Allow the LWM configuration dynamically by adding RDY2RDY state change. Signed-off-by: Spike Du --- drivers/net/mlx5

[PATCH v9 0/6] introduce per-queue available descriptor threshold and host shaper

2022-06-15 Thread Spike Du
llow David Marchand's driver specific commands framework to add mlx5 specific commands. Spike Du (6): net/mlx5: add LWM support for Rxq common/mlx5: share interrupt management net/mlx5: add LWM event handling support net/mlx5: support Rx queue based available descriptor threshold net/ml

[PATCH v9 2/6] common/mlx5: share interrupt management

2022-06-15 Thread Spike Du
There are many duplicate code of creating and initializing rte_intr_handle. Add a new mlx5_os API to do this, replace all PMD related code with this API. Signed-off-by: Spike Du --- drivers/common/mlx5/linux/mlx5_common_os.c | 131 ++ drivers/common/mlx5/linux

[PATCH v9 3/6] net/mlx5: add LWM event handling support

2022-06-15 Thread Spike Du
When LWM meets RQ WQE, the kernel driver raises an event to SW. Use devx event_channel to catch this and to notify the user. Allocate this channel per shared device. The channel has a cookie that informs the specific event port and queue. Signed-off-by: Spike Du --- drivers/net/mlx5/mlx5.c

[PATCH v9 4/6] net/mlx5: support Rx queue based available descriptor threshold

2022-06-15 Thread Spike Du
finds the next RX queue with pending LWM event if any, starting from the given RX queue index. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst | 12 +++ doc/guides/rel_notes/release_22_07.rst | 1 + drivers/common/mlx5/mlx5_prm.h | 1 + drivers/net/mlx5/mlx5.c

[PATCH v9 5/6] net/mlx5: add private API to config host port shaper

2022-06-15 Thread Spike Du
. The shaper limits the rate of traffic from host port to wire port. If lwm-triggered is enabled, a 100Mbps shaper is enabled automatically when one of the host port's Rx queues receives available descriptor threshold event. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst

[PATCH v9 6/6] app/testpmd: add Host Shaper command

2022-06-15 Thread Spike Du
t 1 host_shaper avail_thresh_triggered 0 rate 50 Add sample code to handle rxq available descriptor threshold event, it delays a while so that rxq empties, then disables host shaper and rearms available descriptor threshold event. Signed-off-by: Spike Du --- app/test-pmd/testpmd.c | 7 ++ doc/g

[PATCH v10 0/6] introduce per-queue available descriptor threshold and host shaper

2022-06-16 Thread Spike Du
llow David Marchand's driver specific commands framework to add mlx5 specific commands. Spike Du (6): net/mlx5: add LWM support for Rxq common/mlx5: share interrupt management net/mlx5: add LWM event handling support net/mlx5: support Rx queue based available descriptor threshold net/ml

[PATCH v10 1/6] net/mlx5: add LWM support for Rxq

2022-06-16 Thread Spike Du
Add lwm(Limit WaterMark) field to Rxq object which indicates the percentage of RX queue size used by HW to raise LWM event to the user. Allow LWM setting in modify_rq command. Allow the LWM configuration dynamically by adding RDY2RDY state change. Signed-off-by: Spike Du Acked-by: Matan Azard

[PATCH v10 2/6] common/mlx5: share interrupt management

2022-06-16 Thread Spike Du
There are many duplicate code of creating and initializing rte_intr_handle. Add a new mlx5_os API to do this, replace all PMD related code with this API. Signed-off-by: Spike Du Acked-by: Matan Azard --- drivers/common/mlx5/linux/mlx5_common_os.c | 131 ++ drivers

[PATCH v10 3/6] net/mlx5: add LWM event handling support

2022-06-16 Thread Spike Du
When LWM meets RQ WQE, the kernel driver raises an event to SW. Use devx event_channel to catch this and to notify the user. Allocate this channel per shared device. The channel has a cookie that informs the specific event port and queue. Signed-off-by: Spike Du Acked-by: Matan Azard

[PATCH v10 4/6] net/mlx5: support Rx queue based available descriptor threshold

2022-06-16 Thread Spike Du
finds the next RX queue with pending LWM event if any, starting from the given RX queue index. Signed-off-by: Spike Du Acked-by: Matan Azard --- doc/guides/nics/mlx5.rst | 12 +++ doc/guides/rel_notes/release_22_07.rst | 1 + drivers/common/mlx5/mlx5_prm.h | 1 + drivers

[PATCH v10 5/6] net/mlx5: add private API to config host port shaper

2022-06-16 Thread Spike Du
. The shaper limits the rate of traffic from host port to wire port. If lwm-triggered is enabled, a 100Mbps shaper is enabled automatically when one of the host port's Rx queues receives available descriptor threshold event. Signed-off-by: Spike Du Acked-by: Matan Azard --- doc/guides/nics/mlx

[PATCH v10 6/6] app/testpmd: add Host Shaper command

2022-06-16 Thread Spike Du
t 1 host_shaper avail_thresh_triggered 0 rate 50 Add sample code to handle rxq available descriptor threshold event, it delays a while so that rxq empties, then disables host shaper and rearms available descriptor threshold event. Signed-off-by: Spike Du Acked-by: Matan Azard --- app/test-pmd/testpmd.c

[PATCH] vdpa/mlx5: refactor with common interrupt management API

2022-07-05 Thread Spike Du
Replace vdpa interrupt handle creation logic with common interrupt management API. Signed-off-by: Spike Du --- drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 25 - 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa

RE: [RFC 0/6] net/mlx5: introduce limit watermark and host shaper

2022-05-01 Thread Spike Du
The Host-system is flexible, it may use DPDK or not. Regards, Spike. > -Original Message- > From: Jerin Jacob > Sent: Sunday, May 1, 2022 8:51 PM > To: Spike Du > Cc: Andrew Rybchenko ; Cristian > Dumitrescu ; Ferruh Yigit > ; techbo...@dpdk.org; Matan Azrad > ; Slava

[RFC v1 0/7] net/mlx5: introduce limit watermark and host shaper

2022-05-05 Thread Spike Du
ork and is specific to Nvidia NIC, use PMD private API. For integration with testpmd, put the private cmdline function and LWM event handler in mlx5 PMD directory by adding a new file mlx5_test.c. Only add minimal code in testpmd to invoke interfaces from mlx5_test.c. Spike Du (7): net/mlx5: add LWM s

[RFC v1 1/7] net/mlx5: add LWM support for Rxq

2022-05-05 Thread Spike Du
Add lwm(Limit WaterMark) field to Rxq object which indicates the percentage of RX queue size used by HW to raise LWM event to the user. Allow LWM setting in modify_rq command. Allow the LWM configuration dynamically by adding RDY2RDY state change. Signed-off-by: Spike Du --- drivers/net/mlx5

[RFC v1 2/7] common/mlx5: share interrupt management

2022-05-05 Thread Spike Du
There are many duplicate code of creating and initializing rte_intr_handle. Add a new mlx5_os API to do this, replace all PMD related code with this API. Signed-off-by: Spike Du --- drivers/common/mlx5/linux/mlx5_common_os.c | 131 ++ drivers/common/mlx5/linux

[RFC v1 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-05 Thread Spike Du
tting LWM to 0 means disable it. Add LWM's configuration handle in eth_dev_ops. Signed-off-by: Spike Du --- lib/ethdev/ethdev_driver.h | 7 +++ lib/ethdev/rte_ethdev.c| 28 lib/ethdev/rte_ethdev.h| 30 +- lib/ethdev/v

[RFC v1 4/7] net/mlx5: add LWM event handling support

2022-05-05 Thread Spike Du
When LWM meets RQ WQE, the kernel driver raises an event to SW. Use devx event_channel to catch this and to notify the user. Allocate this channel per shared device. The channel has a cookie that informs the specific event port and queue. Signed-off-by: Spike Du --- drivers/net/mlx5/mlx5.c

[RFC v1 5/7] net/mlx5: support Rx queue based limit watermark

2022-05-05 Thread Spike Du
Add mlx5 specific LWM(limit watermark) configuration handler. While the Rx queue fullness reaches the LWM limit, the driver catches an HW event and invokes the user callback. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst | 4 ++ doc/guides/rel_notes/release_22_07.rst

[RFC v1 6/7] net/mlx5: add private API to config host port shaper

2022-05-05 Thread Spike Du
. The shaper limits the rate of traffic from host port to wire port. If lwm-triggered is enabled, a 100Mbps shaper is enabled automatically when one of the host port's Rx queues receives LWM(Limit Watermark) event. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst | 7 +++

[RFC v1 7/7] app/testpmd: add LWM and Host Shaper command

2022-05-05 Thread Spike Du
The rate unit is 100Mbps. To disable lwm_triggered and configure a shaper of 5Gbps on port 1: testpmd> mlx5 set port 1 host_shaper lwm_triggered 0 rate 50 Add sample code to handle rxq LWM event, it delays a while so that rxq empties, then disables host shaper and rearms LWM event. Signed-off-b

[RFC v2 0/7] introduce per-queue limit watermark and host shaper

2022-05-21 Thread Spike Du
ork and is specific to Nvidia NIC, use PMD private API. For integration with testpmd, put the private cmdline function and LWM event handler in mlx5 PMD directory by adding a new file mlx5_test.c. Only add minimal code in testpmd to invoke interfaces from mlx5_test.c. Spike Du (7): net/mlx

[RFC v2 1/7] net/mlx5: add LWM support for Rxq

2022-05-21 Thread Spike Du
Add lwm(Limit WaterMark) field to Rxq object which indicates the percentage of RX queue size used by HW to raise LWM event to the user. Allow LWM setting in modify_rq command. Allow the LWM configuration dynamically by adding RDY2RDY state change. Signed-off-by: Spike Du --- drivers/net/mlx5

[RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-21 Thread Spike Du
translate the percentage to queue descriptor number, the numbe should be bigger than 0 and less than queue size. Add LWM's configuration and query driver callbacks in eth_dev_ops. Signed-off-by: Spike Du --- lib/ethdev/ethdev_driver.h | 22 lib/ethdev/rte_ethdev.c

[RFC v2 5/7] net/mlx5: support Rx queue based limit watermark

2022-05-21 Thread Spike Du
. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst | 12 ++ doc/guides/rel_notes/release_22_07.rst | 1 + drivers/common/mlx5/mlx5_prm.h | 1 + drivers/net/mlx5/mlx5.c| 2 + drivers/net/mlx5/mlx5_rx.c | 156

[RFC v2 4/7] net/mlx5: add LWM event handling support

2022-05-21 Thread Spike Du
When LWM meets RQ WQE, the kernel driver raises an event to SW. Use devx event_channel to catch this and to notify the user. Allocate this channel per shared device. The channel has a cookie that informs the specific event port and queue. Signed-off-by: Spike Du --- drivers/net/mlx5/mlx5.c

[RFC v2 2/7] common/mlx5: share interrupt management

2022-05-21 Thread Spike Du
There are many duplicate code of creating and initializing rte_intr_handle. Add a new mlx5_os API to do this, replace all PMD related code with this API. Signed-off-by: Spike Du --- drivers/common/mlx5/linux/mlx5_common_os.c | 131 ++ drivers/common/mlx5/linux/mlx5_common_os.h

[RFC v2 6/7] net/mlx5: add private API to config host port shaper

2022-05-21 Thread Spike Du
. The shaper limits the rate of traffic from host port to wire port. If lwm-triggered is enabled, a 100Mbps shaper is enabled automatically when one of the host port's Rx queues receives LWM(Limit Watermark) event. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst | 26 +++

[RFC v2 7/7] app/testpmd: add LWM and Host Shaper command

2022-05-21 Thread Spike Du
The rate unit is 100Mbps. To disable lwm_triggered and configure a shaper of 5Gbps on port 1: testpmd> mlx5 set port 1 host_shaper lwm_triggered 0 rate 50 Add sample code to handle rxq LWM event, it delays a while so that rxq empties, then disables host shaper and rearms LWM event. Signed-off-b

RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-22 Thread Spike Du
Hi, > -Original Message- > From: Stephen Hemminger > Sent: Sunday, May 22, 2022 11:25 PM > To: Spike Du > Cc: Matan Azrad ; Slava Ovsiienko > ; Ori Kam ; NBU-Contact- > Thomas Monjalon (EXTERNAL) ; dev@dpdk.org; > Raslan Darawsheh > Subject: Re: [RFC v2 3/7]

RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-22 Thread Spike Du
Hi, pls see below. > -Original Message- > From: Stephen Hemminger > Sent: Sunday, May 22, 2022 11:23 PM > To: Spike Du > Cc: Matan Azrad ; Slava Ovsiienko > ; Ori Kam ; NBU-Contact- > Thomas Monjalon (EXTERNAL) ; dev@dpdk.org; > Raslan Darawsheh > Subje

RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-23 Thread Spike Du
> -Original Message- > From: Thomas Monjalon > Sent: Monday, May 23, 2022 6:59 PM > To: Spike Du ; Morten Brørup > > Cc: Matan Azrad ; Slava Ovsiienko > ; Ori Kam ; dev@dpdk.org; > Raslan Darawsheh > Subject: Re: [RFC v2 3/7] ethdev: introduce Rx

RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-23 Thread Spike Du
> -Original Message- > From: Thomas Monjalon > Sent: Tuesday, May 24, 2022 5:46 AM > To: Stephen Hemminger ; Spike Du > > Cc: dev@dpdk.org; Matan Azrad ; Slava Ovsiienko > ; Ori Kam ; Raslan Darawsheh > ; ferruh.yi...@amd.com; > andrew.rybche...@oktetlabs.ru

RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-23 Thread Spike Du
> -Original Message- > From: Stephen Hemminger > Sent: Tuesday, May 24, 2022 6:55 AM > To: Spike Du > Cc: Matan Azrad ; Slava Ovsiienko > ; Ori Kam ; NBU-Contact- > Thomas Monjalon (EXTERNAL) ; dev@dpdk.org; > Raslan Darawsheh > Subject: Re: [RFC v2 3/7]

[PATCH v3 0/7] introduce per-queue limit watermark and host shaper

2022-05-24 Thread Spike Du
ork and is specific to Nvidia NIC, use PMD private API. For integration with testpmd, put the private cmdline function and LWM event handler in mlx5 PMD directory by adding a new file mlx5_test.c. Only add minimal code in testpmd to invoke interfaces from mlx5_test.c. Spike Du (7): net/mlx

[PATCH v3 1/7] net/mlx5: add LWM support for Rxq

2022-05-24 Thread Spike Du
Add lwm(Limit WaterMark) field to Rxq object which indicates the percentage of RX queue size used by HW to raise LWM event to the user. Allow LWM setting in modify_rq command. Allow the LWM configuration dynamically by adding RDY2RDY state change. Signed-off-by: Spike Du --- drivers/net/mlx5

[PATCH v3 3/7] ethdev: introduce Rx queue based limit watermark

2022-05-24 Thread Spike Du
x27;s configuration and query driver callbacks in eth_dev_ops. Signed-off-by: Spike Du --- lib/ethdev/ethdev_driver.h | 22 lib/ethdev/rte_ethdev.c| 52 lib/ethdev/rte_ethdev.h| 71 ++ lib/ethdev/version.map

[PATCH v3 4/7] net/mlx5: add LWM event handling support

2022-05-24 Thread Spike Du
When LWM meets RQ WQE, the kernel driver raises an event to SW. Use devx event_channel to catch this and to notify the user. Allocate this channel per shared device. The channel has a cookie that informs the specific event port and queue. Signed-off-by: Spike Du --- drivers/net/mlx5/mlx5.c

[PATCH v3 6/7] net/mlx5: add private API to config host port shaper

2022-05-24 Thread Spike Du
. The shaper limits the rate of traffic from host port to wire port. If lwm-triggered is enabled, a 100Mbps shaper is enabled automatically when one of the host port's Rx queues receives LWM(Limit Watermark) event. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst | 26 +++

[PATCH v3 7/7] app/testpmd: add LWM and Host Shaper command

2022-05-24 Thread Spike Du
The rate unit is 100Mbps. To disable lwm_triggered and configure a shaper of 5Gbps on port 1: testpmd> mlx5 set port 1 host_shaper lwm_triggered 0 rate 50 Add sample code to handle rxq LWM event, it delays a while so that rxq empties, then disables host shaper and rearms LWM event. Signed-off-b

[PATCH v3 5/7] net/mlx5: support Rx queue based limit watermark

2022-05-24 Thread Spike Du
. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst | 12 ++ doc/guides/rel_notes/release_22_07.rst | 1 + drivers/common/mlx5/mlx5_prm.h | 1 + drivers/net/mlx5/mlx5.c| 2 + drivers/net/mlx5/mlx5_rx.c | 156

[PATCH v3 2/7] common/mlx5: share interrupt management

2022-05-24 Thread Spike Du
There are many duplicate code of creating and initializing rte_intr_handle. Add a new mlx5_os API to do this, replace all PMD related code with this API. Signed-off-by: Spike Du --- drivers/common/mlx5/linux/mlx5_common_os.c | 131 ++ drivers/common/mlx5/linux/mlx5_common_os.h

RE: [PATCH v3 0/7] introduce per-queue limit watermark and host shaper

2022-05-25 Thread Spike Du
> -Original Message- > From: Morten Brørup > Sent: Wednesday, May 25, 2022 3:00 AM > To: NBU-Contact-Thomas Monjalon (EXTERNAL) ; > Spike Du > Cc: Matan Azrad ; Slava Ovsiienko > ; Ori Kam ; dev@dpdk.org; > Raslan Darawsheh ; step...@networkplumber.org; > an

RE: [PATCH v3 0/7] introduce per-queue limit watermark and host shaper

2022-05-25 Thread Spike Du
> -Original Message- > From: Morten Brørup > Sent: Wednesday, May 25, 2022 9:40 PM > To: Spike Du ; NBU-Contact-Thomas Monjalon > (EXTERNAL) > Cc: Matan Azrad ; Slava Ovsiienko > ; Ori Kam ; dev@dpdk.org; > Raslan Darawsheh ; step...@networkplumber.org; > an

[PATCH v4 0/7] introduce per-queue fill threshold and host shaper

2022-06-03 Thread Spike Du
API. For integration with testpmd, put the private cmdline function and fill threshold event handler in mlx5 PMD directory by adding a new file mlx5_testpmd.c. Follow David Marchand's driver specific commands framework to add mlx5 specific commands. Spike Du (7): net/mlx5: add LWM support for Rx

[PATCH v4 1/7] net/mlx5: add LWM support for Rxq

2022-06-03 Thread Spike Du
Add lwm(Limit WaterMark) field to Rxq object which indicates the percentage of RX queue size used by HW to raise LWM event to the user. Allow LWM setting in modify_rq command. Allow the LWM configuration dynamically by adding RDY2RDY state change. Signed-off-by: Spike Du --- drivers/net/mlx5

[PATCH v4 2/7] common/mlx5: share interrupt management

2022-06-03 Thread Spike Du
There are many duplicate code of creating and initializing rte_intr_handle. Add a new mlx5_os API to do this, replace all PMD related code with this API. Signed-off-by: Spike Du --- drivers/common/mlx5/linux/mlx5_common_os.c | 131 ++ drivers/common/mlx5/linux

[PATCH v4 3/7] ethdev: introduce Rx queue based fill threshold

2022-06-03 Thread Spike Du
: testpmd> set port 1 rxq 0 fill_thresh 30 To disable fill_thresh on port 1 rxq 0: testpmd> set port 1 rxq 0 fill_thresh 0 Signed-off-by: Spike Du --- app/test-pmd/cmdline.c | 68 +++ app/test-pmd/config.c | 21 ++ app/test-pmd/tes

[PATCH v4 4/7] net/mlx5: add LWM event handling support

2022-06-03 Thread Spike Du
When LWM meets RQ WQE, the kernel driver raises an event to SW. Use devx event_channel to catch this and to notify the user. Allocate this channel per shared device. The channel has a cookie that informs the specific event port and queue. Signed-off-by: Spike Du --- drivers/net/mlx5/mlx5.c

[PATCH v4 5/7] net/mlx5: support Rx queue based fill threshold

2022-06-03 Thread Spike Du
LWM event if any, starting from the given RX queue index. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst | 12 +++ doc/guides/rel_notes/release_22_07.rst | 1 + drivers/common/mlx5/mlx5_prm.h | 1 + drivers/net/mlx5/mlx5.c| 2 + drivers/net/mlx5

[PATCH v4 6/7] net/mlx5: add private API to config host port shaper

2022-06-03 Thread Spike Du
. The shaper limits the rate of traffic from host port to wire port. If lwm-triggered is enabled, a 100Mbps shaper is enabled automatically when one of the host port's Rx queues receives fill threshold event. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst | 35 +++

[PATCH v4 7/7] app/testpmd: add Host Shaper command

2022-06-03 Thread Spike Du
t 1 host_shaper fill_thresh_triggered 0 rate 50 Add sample code to handle rxq fill_thresh event, it delays a while so that rxq empties, then disables host shaper and rearms fill_thresh event. Signed-off-by: Spike Du --- app/test-pmd/testpmd.c | 6 ++ doc/guides/nics/mlx5.rst| 46 + d

[RFC 0/6] net/mlx5: introduce limit watermark and host shaper

2022-03-31 Thread Spike Du
event, delay a while until RX queue is empty , then disable the shaper. We recycle this work flow to reduce RX queue drops. Spike Du (6): net/mlx5: add LWM support for Rxq common/mlx5: share interrupt management net/mlx5: add LWM event handling support net/mlx5: add private API to configure Rx

[RFC 1/6] net/mlx5: add LWM support for Rxq

2022-03-31 Thread Spike Du
Add lwm(Limit WaterMark) field to Rxq object which indicates the percentage of RX queue size used by HW to raise LWM event to the user. Allow LWM setting in modify_rq command. Allow the LWM configuration dynamically by adding RDY2RDY state change. Signed-off-by: Spike Du --- drivers/net/mlx5

[RFC 2/6] common/mlx5: share interrupt management

2022-03-31 Thread Spike Du
There are many duplicate code of creating and initializing rte_intr_handle. Add a new mlx5_os API to do this, replace all PMD related code with this API. Signed-off-by: Spike Du --- drivers/common/mlx5/linux/mlx5_common_os.c | 131 ++ drivers/common/mlx5/linux

[RFC 3/6] net/mlx5: add LWM event handling support

2022-03-31 Thread Spike Du
When LWM meets RQ WQE, the kernel driver raises an event to SW. Use devx event_channel to catch this and to notify the user. Allocate this channel per shared device. The channel has a cookie that informs the specific event port and queue. Signed-off-by: Spike Du --- drivers/net/mlx5/mlx5.c

[RFC 4/6] net/mlx5: add private API to configure Rxq LWM

2022-03-31 Thread Spike Du
The new API allows setting/unsetting/modifying an LWM(limit watermark) event per Rxq. While the Rx queue fullness reaches the LWM limit, the driver catches an HW event and invokes the user callback. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst | 4 ++ doc/guides/rel_notes

[RFC 5/6] net/mlx5: add private API to config host port shaper

2022-03-31 Thread Spike Du
. The shaper limits the rate of traffic from host port to wire port. If lwm-triggered is enabled, a 100Mbps shaper is enabled automatically when one of the host port's Rx queues receives LWM(Limit Watermark) event. Signed-off-by: Spike Du --- doc/guides/nics/mlx5.rst | 7 +++

[RFC 6/6] app/testpmd: add LWM and Host Shaper command

2022-03-31 Thread Spike Du
00Mbps. To disable lwm_triggered and configure a shaper of 5Gbps on port 1: testpmd> set port 1 host_shaper lwm_triggered 0 rate 50 Add sample code to handle rxq LWM event, it delays a while so that rxq empties, then disables host shaper and rearms LWM event. Signed-off-by: Spike Du --- a

RE: [RFC 0/6] net/mlx5: introduce limit watermark and host shaper

2022-04-25 Thread Spike Du
le, what's the correct way to do it? Any framework to isolate the PMD private logic from testpmd common code, but still give a chance to call private APIs in testpmd? Regards, Spike. > -Original Message- > From: Jerin Jacob > Sent: Tuesday, April 5, 2022 4:59 PM >

RE: [RFC 0/6] net/mlx5: introduce limit watermark and host shaper

2022-04-28 Thread Spike Du
le, what's the correct way to do it? Any framework to isolate the PMD private logic from testpmd common code, but still give a chance to call private APIs in testpmd? Regards, Spike. > -Original Message- > From: Jerin Jacob > Sent: Tuesday, April 5, 2022 4:59 PM >