event/dlb2: add dequeue interrupt mode support
PATCH 1/1 event/dlb2: add dequeue interrupt mode support
DLB2 port interrupt is implemented using DPDK interrupt framework. This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument port_dequeue_wait. Supported modes are polling and interrupt. Default mode is polling.
This commit also adds code to handle device error interrupts and print alarm details.
--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++- drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825 +++++++++++++++++++++ drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)
doc/guides/eventdevs/dlb2.rst +20 -0
@@ -477,6 +477,26 @@ Example command to use as meson option for credit handling: meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1' +Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API rte_event_dequeue_burst(). +The default port dequeue mode is polling. Dequeue wait mode can be configured +on per eventdev port basis using devargs argument 'port_dequeue_wait'. In +interrupt mode, if the port queue is empty, the application thread will block +on the interrupt until a new event arrives. It enters blocking mode only after +any specified timeout. During the timeout, it will poll the port queue for +events as usual. Interrupt mode uses the DPDK interrupt support framework. + + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interrupt + + port = all/<port-id>/<port-id>-<port-id> + mode = interrupt/polling + +Eventdev port interrupt and polling wait modes for dequeue can be set for all +the ports, a single port, or a range of ports using this parameter. + Running Eventdev Applications with DLB Device ---------------------------------------------
drivers/event/dlb2/dlb2.c +228 -8
287 lines not on this page · raw message
drivers/event/dlb2/dlb2_iface.c +7 -0
@@ -61,6 +61,11 @@ int (*dlb2_iface_map_qid)(struct dlb2_hw_dev *handle,int (*dlb2_iface_unmap_qid)(struct dlb2_hw_dev *handle,struct dlb2_unmap_qid_args *cfg); +int (*dlb2_iface_block_on_cq_interrupt)(struct dlb2_hw_dev *handle, +int port_id,bool is_ldb, +volatile void *cq_va,uint8_t cq_gen, +bool arm); +int (*dlb2_iface_pending_port_unmaps)(struct dlb2_hw_dev *handle,struct dlb2_pending_port_unmaps_args *args);
@@ -82,3 +87,5 @@ int (*dlb2_iface_set_cq_inflight_ctrl)(struct dlb2_hw_dev *handle,int (*dlb2_iface_set_cos_bw)(struct dlb2_hw_dev *handle,struct dlb2_set_cos_bw_args *args); +int (*dlb2_iface_port_ctrl)(struct dlb2_port *qm_port,bool enable); +
drivers/event/dlb2/dlb2_iface.h +8 -0
@@ -60,6 +60,12 @@ extern int (*dlb2_iface_map_qid)(struct dlb2_hw_dev *handle,extern int (*dlb2_iface_unmap_qid)(struct dlb2_hw_dev *handle,struct dlb2_unmap_qid_args *cfg); +extern int (*dlb2_iface_block_on_cq_interrupt)(struct dlb2_hw_dev *handle, +int port_id,bool is_ldb, +volatile void *cq_va, +uint8_t cq_gen, +bool arm); +extern int (*dlb2_iface_pending_port_unmaps)(struct dlb2_hw_dev *handle,struct dlb2_pending_port_unmaps_args *args);
@@ -81,4 +87,6 @@ extern int (*dlb2_iface_set_cq_inflight_ctrl)(struct dlb2_hw_dev *handle,extern int (*dlb2_iface_set_cos_bw)(struct dlb2_hw_dev *handle,struct dlb2_set_cos_bw_args *args); +extern int (*dlb2_iface_port_ctrl)(struct dlb2_port *qm_port,bool enable); +#endif /* _DLB2_IFACE_H_ */
drivers/event/dlb2/dlb2_priv.h +18 -0
@@ -41,6 +41,7 @@#define DLB2_NUM_DIR_CREDITS "num_dir_credits"#define DEV_ID_ARG "dev_id"#define DLB2_QID_DEPTH_THRESH_ARG "qid_depth_thresh" +#define DLB2_PORT_DEQUEUE_WAIT_ARG "port_dequeue_wait"#define DLB2_POLL_INTERVAL_ARG "poll_interval"#define DLB2_SW_CREDIT_QUANTA_ARG "sw_credit_quanta"#define DLB2_HW_CREDIT_QUANTA_ARG "hw_credit_quanta"
@@ -95,6 +96,14 @@#define DLB2_MAX_LDB_SN_ALLOC 1024#define DLB2_MAX_QUEUE_DEPTH_THRESHOLD 8191#define DLB2_MAX_NUM_LDB_PORTS_PER_COS (DLB2_MAX_NUM_LDB_PORTS/DLB2_COS_NUM_VALS) +#define DLB2_COREMASK_LEN 36 + +enum dlb2_port_dequeue_wait_types { +DLB2_PORT_DEQUEUE_WAIT_POLLING , +DLB2_PORT_DEQUEUE_WAIT_INTERRUPT , +DLB2_PORT_DEQUEUE_WAIT_UMWAIT , +DLB2_NUM_PORT_DEQUEUE_WAIT_TYPES /* Must be last */ +};/* 2048 total hist list entries and 64 total ldb ports, which * makes for 2048/64 == 32 hist list entries per port. However, CQ
@@ -387,8 +396,10 @@ struct dlb2_port {struct dlb2_cq_pop_qe *consume_qe;struct dlb2_eventdev *dlb2;/* back ptr */ struct dlb2_eventdev_port *ev_port;/* back ptr */ +enum dlb2_port_dequeue_wait_types dequeue_wait;bool use_scalar;/* force usage of scalar code */ uint8_t reorder_id;/* id used for reordering events coming back into the scheduler */ +uint8_t evdev_id;/* index into process-local multidev mapping array */ uint16_t hw_credit_quanta;bool use_avx512;bool enable_inflight_ctrl;/*DLB2.5 enable HW inflight control */
@@ -665,6 +676,12 @@ struct dlb2_qid_depth_thresholds {int val[DLB2_MAX_NUM_QUEUES_ALL ]; }; +/* used for collecting and passing around the dev args */ +struct dlb2_port_dequeue_wait { +enum dlb2_port_dequeue_wait_types val[DLB2_MAX_NUM_PORTS_ALL ]; +}; + +struct dlb2_port_cos {int cos_id[DLB2_MAX_NUM_PORTS_ALL ]; };
@@ -679,6 +696,7 @@ struct dlb2_devargs {int num_dir_credits_override;int dev_id;struct dlb2_qid_depth_thresholds qid_depth_thresholds; +struct dlb2_port_dequeue_wait port_dequeue_wait;int poll_interval;int sw_credit_quanta;int hw_credit_quanta;
drivers/event/dlb2/dlb2_user.h +112 -0
118 lines not on this page · raw message
drivers/event/dlb2/pf/base/dlb2_hw_types.h +70 -0
94 lines not on this page · raw message
drivers/event/dlb2/pf/base/dlb2_osdep.h +46 -0
58 lines not on this page · raw message
drivers/event/dlb2/pf/base/dlb2_regs.h +148 -1
173 lines not on this page · raw message
drivers/event/dlb2/pf/base/dlb2_resource.c +825 -0
852 lines not on this page · raw message
drivers/event/dlb2/pf/base/dlb2_resource.h +6 -0
@@ -1974,4 +1974,10 @@ int dlb2_hw_set_cq_inflight_ctrl(struct dlb2_hw *hw, u32 domain_id,struct dlb2_cmd_response *resp, bool vdev_request, unsigned int vdev_id); +int dlb2_block_on_cq_interrupt (struct dlb2_hw *dlb2, +int port_id, +bool is_ldb, +volatile void *cq_va, +u8 cq_gen, +bool arm);#endif /* __DLB2_RESOURCE_H */
drivers/event/dlb2/pf/dlb2_pf.c +223 -0
259 lines not on this page · raw message
Signature · 1 line
2.39.1
PATCH v2 1/1 event/dlb2: add dequeue interrupt mode support
DLB2 port interrupt is implemented using DPDK interrupt framework. This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument port_dequeue_wait. Supported modes are polling and interrupt. Default mode is polling.
This commit also adds code to handle device error interrupts and print alarm details.
--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++- drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825 +++++++++++++++++++++ drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)
doc/guides/eventdevs/dlb2.rst +20 -0
@@ -477,6 +477,26 @@ Example command to use as meson option for credit handling: meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1' +Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API rte_event_dequeue_burst(). +The default port dequeue mode is polling. Dequeue wait mode can be configured +on per eventdev port basis using devargs argument 'port_dequeue_wait'. In +interrupt mode, if the port queue is empty, the application thread will block +on the interrupt until a new event arrives. It enters blocking mode only after +any specified timeout. During the timeout, it will poll the port queue for +events as usual. Interrupt mode uses the DPDK interrupt support framework. + + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interrupt + + port = all/<port-id>/<port-id>-<port-id> + mode = interrupt/polling + +Eventdev port interrupt and polling wait modes for dequeue can be set for all +the ports, a single port, or a range of ports using this parameter. + Running Eventdev Applications with DLB Device ---------------------------------------------
drivers/event/dlb2/dlb2.c +228 -8
287 lines not on this page · raw message
drivers/event/dlb2/dlb2_iface.c +7 -0
@@ -61,6 +61,11 @@ int (*dlb2_iface_map_qid)(struct dlb2_hw_dev *handle,int (*dlb2_iface_unmap_qid)(struct dlb2_hw_dev *handle,struct dlb2_unmap_qid_args *cfg); +int (*dlb2_iface_block_on_cq_interrupt)(struct dlb2_hw_dev *handle, +int port_id,bool is_ldb, +volatile void *cq_va,uint8_t cq_gen, +bool arm); +int (*dlb2_iface_pending_port_unmaps)(struct dlb2_hw_dev *handle,struct dlb2_pending_port_unmaps_args *args);
@@ -82,3 +87,5 @@ int (*dlb2_iface_set_cq_inflight_ctrl)(struct dlb2_hw_dev *handle,int (*dlb2_iface_set_cos_bw)(struct dlb2_hw_dev *handle,struct dlb2_set_cos_bw_args *args); +int (*dlb2_iface_port_ctrl)(struct dlb2_port *qm_port,bool enable); +
drivers/event/dlb2/dlb2_iface.h +8 -0
@@ -60,6 +60,12 @@ extern int (*dlb2_iface_map_qid)(struct dlb2_hw_dev *handle,extern int (*dlb2_iface_unmap_qid)(struct dlb2_hw_dev *handle,struct dlb2_unmap_qid_args *cfg); +extern int (*dlb2_iface_block_on_cq_interrupt)(struct dlb2_hw_dev *handle, +int port_id,bool is_ldb, +volatile void *cq_va, +uint8_t cq_gen, +bool arm); +extern int (*dlb2_iface_pending_port_unmaps)(struct dlb2_hw_dev *handle,struct dlb2_pending_port_unmaps_args *args);
@@ -81,4 +87,6 @@ extern int (*dlb2_iface_set_cq_inflight_ctrl)(struct dlb2_hw_dev *handle,extern int (*dlb2_iface_set_cos_bw)(struct dlb2_hw_dev *handle,struct dlb2_set_cos_bw_args *args); +extern int (*dlb2_iface_port_ctrl)(struct dlb2_port *qm_port,bool enable); +#endif /* _DLB2_IFACE_H_ */
drivers/event/dlb2/dlb2_priv.h +18 -0
@@ -41,6 +41,7 @@#define DLB2_NUM_DIR_CREDITS "num_dir_credits"#define DEV_ID_ARG "dev_id"#define DLB2_QID_DEPTH_THRESH_ARG "qid_depth_thresh" +#define DLB2_PORT_DEQUEUE_WAIT_ARG "port_dequeue_wait"#define DLB2_POLL_INTERVAL_ARG "poll_interval"#define DLB2_SW_CREDIT_QUANTA_ARG "sw_credit_quanta"#define DLB2_HW_CREDIT_QUANTA_ARG "hw_credit_quanta"
@@ -95,6 +96,14 @@#define DLB2_MAX_LDB_SN_ALLOC 1024#define DLB2_MAX_QUEUE_DEPTH_THRESHOLD 8191#define DLB2_MAX_NUM_LDB_PORTS_PER_COS (DLB2_MAX_NUM_LDB_PORTS/DLB2_COS_NUM_VALS) +#define DLB2_COREMASK_LEN 36 + +enum dlb2_port_dequeue_wait_types { +DLB2_PORT_DEQUEUE_WAIT_POLLING , +DLB2_PORT_DEQUEUE_WAIT_INTERRUPT , +DLB2_PORT_DEQUEUE_WAIT_UMWAIT , +DLB2_NUM_PORT_DEQUEUE_WAIT_TYPES /* Must be last */ +};/* 2048 total hist list entries and 64 total ldb ports, which * makes for 2048/64 == 32 hist list entries per port. However, CQ
@@ -387,8 +396,10 @@ struct dlb2_port {struct dlb2_cq_pop_qe *consume_qe;struct dlb2_eventdev *dlb2;/* back ptr */ struct dlb2_eventdev_port *ev_port;/* back ptr */ +enum dlb2_port_dequeue_wait_types dequeue_wait;bool use_scalar;/* force usage of scalar code */ uint8_t reorder_id;/* id used for reordering events coming back into the scheduler */ +uint8_t evdev_id;/* index into process-local multidev mapping array */ uint16_t hw_credit_quanta;bool use_avx512;bool enable_inflight_ctrl;/*DLB2.5 enable HW inflight control */
@@ -665,6 +676,12 @@ struct dlb2_qid_depth_thresholds {int val[DLB2_MAX_NUM_QUEUES_ALL ]; }; +/* used for collecting and passing around the dev args */ +struct dlb2_port_dequeue_wait { +enum dlb2_port_dequeue_wait_types val[DLB2_MAX_NUM_PORTS_ALL ]; +}; + +struct dlb2_port_cos {int cos_id[DLB2_MAX_NUM_PORTS_ALL ]; };
@@ -679,6 +696,7 @@ struct dlb2_devargs {int num_dir_credits_override;int dev_id;struct dlb2_qid_depth_thresholds qid_depth_thresholds; +struct dlb2_port_dequeue_wait port_dequeue_wait;int poll_interval;int sw_credit_quanta;int hw_credit_quanta;
drivers/event/dlb2/dlb2_user.h +112 -0
118 lines not on this page · raw message
drivers/event/dlb2/pf/base/dlb2_hw_types.h +70 -0
94 lines not on this page · raw message
drivers/event/dlb2/pf/base/dlb2_osdep.h +46 -0
58 lines not on this page · raw message
drivers/event/dlb2/pf/base/dlb2_regs.h +148 -1
173 lines not on this page · raw message
drivers/event/dlb2/pf/base/dlb2_resource.c +825 -0
852 lines not on this page · raw message
drivers/event/dlb2/pf/base/dlb2_resource.h +6 -0
@@ -1974,4 +1974,10 @@ int dlb2_hw_set_cq_inflight_ctrl(struct dlb2_hw *hw, u32 domain_id,struct dlb2_cmd_response *resp, bool vdev_request, unsigned int vdev_id); +int dlb2_block_on_cq_interrupt (struct dlb2_hw *dlb2, +int port_id, +bool is_ldb, +volatile void *cq_va, +u8 cq_gen, +bool arm);#endif /* __DLB2_RESOURCE_H */
drivers/event/dlb2/pf/dlb2_pf.c +223 -0
259 lines not on this page · raw message
Signature · 1 line
2.39.1
Quoted 38 lines · Pravin Pathak
DLB2 port interrupt is implemented using DPDK interrupt framework. This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument
port_dequeue_wait. Supported modes are polling and interrupt. Default mode is polling.
This commit also adds code to handle device error interrupts and print alarm details.Signed-off-by Pravin Pathak <[email protected]>Signed-off-by Tirthendu Sarkar <[email protected]>--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++- drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825 +++++++++++++++++++++ drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)doc/guides/eventdevs/dlb2.rst +3
-0@@ -477,6 +477,26 @@ Example command to use as meson option for credit handling: meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1' +Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API rte_event_dequeue_burst().
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for credit handling: · line 492
Quoted 10 lines
doc/guides/eventdevs/dlb2.rst +10
-0+The default port dequeue mode is polling. Dequeue wait mode can be configured +on per eventdev port basis using devargs argument 'port_dequeue_wait'. In +interrupt mode, if the port queue is empty, the application thread will block +on the interrupt until a new event arrives. It enters blocking mode only after +any specified timeout. During the timeout, it will poll the port queue for +events as usual. Interrupt mode uses the DPDK interrupt support framework. + + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interrupt
Adding other eventdev PMD mainatainers.
Looks like it can be a generic feature. i.e set this option is dev_configure() If there is no objection, Please send a new patch around that.
Quoted 52 lines · Jerin Jacob
Quoted 38 lines · Pravin Pathak
DLB2 port interrupt is implemented using DPDK interrupt framework. This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument
port_dequeue_wait. Supported modes are polling and interrupt. Default mode is polling.
This commit also adds code to handle device error interrupts and print alarm details.Signed-off-by Pravin Pathak <[email protected]>Signed-off-by Tirthendu Sarkar <[email protected]>--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++- drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825 +++++++++++++++++++++ drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)doc/guides/eventdevs/dlb2.rst +3
-0@@ -477,6 +477,26 @@ Example command to use as meson option for credit handling: meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1' +Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API rte_event_dequeue_burst().doc/guides/eventdevs/dlb2.rst Example command to use as meson option for credit handling: · line 492
Quoted 10 lines
doc/guides/eventdevs/dlb2.rst +10
-0+The default port dequeue mode is polling. Dequeue wait mode can be configured +on per eventdev port basis using devargs argument 'port_dequeue_wait'. In +interrupt mode, if the port queue is empty, the application thread will block +on the interrupt until a new event arrives. It enters blocking mode only after +any specified timeout. During the timeout, it will poll the port queue for +events as usual. Interrupt mode uses the DPDK interrupt support framework. + + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interruptAdding other eventdev PMD mainatainers.
Quoted 2 lines
Looks like it can be a generic feature. i.e set this option is
dev_configure()If there is no objection, Please send a new patch around that.
I've considered implementing this in DSW, although in a different manner (with eventfds and poll()).
The dequeue timeout will still be honored in "interrupt mode", correct? It wasn't obvious from the description.
What's being configured should just be a threshold time at which the event device would go from busy-polling to blocking the thread.
Maybe it should be called something with "blocking" or "sleeping", instead of "interrupt", since interrupts are never directly involved.
Anyway, seems like a good candidate for a generic feature to me.
Quoted 54 lines · Mattias Rönnblom
Quoted 52 lines · Jerin Jacob
Quoted 38 lines · Pravin Pathak
DLB2 port interrupt is implemented using DPDK interrupt framework. This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument
port_dequeue_wait. Supported modes are polling and interrupt. Default mode is polling.
This commit also adds code to handle device error interrupts and print alarm details.Signed-off-by Pravin Pathak <[email protected]>Signed-off-by Tirthendu Sarkar <[email protected]>--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++- drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825 +++++++++++++++++++++ drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)doc/guides/eventdevs/dlb2.rst +3
-0@@ -477,6 +477,26 @@ Example command to use as meson option for credit handling: meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1' +Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API rte_event_dequeue_burst().doc/guides/eventdevs/dlb2.rst Example command to use as meson option for credit handling: · line 492
Quoted 10 lines
doc/guides/eventdevs/dlb2.rst +10
-0+The default port dequeue mode is polling. Dequeue wait mode can be configured +on per eventdev port basis using devargs argument 'port_dequeue_wait'. In +interrupt mode, if the port queue is empty, the application thread will block +on the interrupt until a new event arrives. It enters blocking mode only after +any specified timeout. During the timeout, it will poll the port queue for +events as usual. Interrupt mode uses the DPDK interrupt support framework. + + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interruptAdding other eventdev PMD mainatainers.
Quoted 8 lines
Quoted 2 lines
Looks like it can be a generic feature. i.e set this option is
dev_configure()If there is no objection, Please send a new patch around that.I've considered implementing this in DSW, although in a different manner (with eventfds and
poll()).The dequeue timeout will still be honored in "interrupt mode", correct? It wasn't obvious from the description.
How is it in Intel PMD?
Quoted 6 lines
What's being configured should just be a threshold time at which the event device would go from busy-polling to blocking the thread.
Maybe it should be called something with "blocking" or "sleeping", instead of "interrupt", since interrupts are never directly involved.
Agree. or make it a power save mode or so.
Quoted 3 lines
Anyway, seems like a good candidate for a generic feature to me.
Quoted 83 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Monday, June 30, 2025 7:44 AM
To: Mattias Rönnblom <[email protected]>
Cc: Pathak, Pravin <[email protected]>; [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>; [email protected]; [email protected]; Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 3 lines · Mattias Rönnblom
Quoted 1 line · Jerin Jacob
On Sat, Jun 28, 2025 at 11:17 AM Pravin Pathak
Quoted 9 lines · <[email protected]> wrote:
Quoted 9 lines
Quoted 9 lines
DLB2 port interrupt is implemented using DPDK interrupt framework. This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument
port_dequeue_wait. Supported modes are polling and interrupt. Default mode is polling. This commit also adds code to handle device error interrupts and print alarm details.Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by Pravin Pathak <[email protected]>Signed-off-by Tirthendu Sarkar <[email protected]>--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++-Quoted 8 lines
Quoted 8 lines
drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825+++++++++++++++++++++
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)(quoted diff) +0
-0
b/doc/guides/eventdevs/dlb2.rstindex8ec7168f20..a4ba857351100644
Quoted 3 lines
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst +0
-0@@ -477,6 +477,26 @@ Example command to use as meson option forcredit handling:
Quoted 2 lines
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for · line 477
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst +0
-0meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1'
Quoted 4 lines
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for credit handling:
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +3
-0+Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API
rte_event_dequeue_burst().Quoted 6 lines
Quoted 6 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for · line 486
Quoted 6 lines
doc/guides/eventdevs/dlb2.rst +6
-0+The default port dequeue mode is polling. Dequeue wait mode can be +configured on per eventdev port basis using devargs argument +'port_dequeue_wait'. In interrupt mode, if the port queue is +empty, the application thread will block on the interrupt until a +new event arrives. It enters blocking mode only after any +specified timeout. During the timeout, it will poll the port queue forevents as usual. Interrupt mode uses the DPDK interrupt support framework.
Quoted 9 lines
Quoted 9 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for credit handling: · line 492
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +4
-0+ + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interruptAdding other eventdev PMD mainatainers.
Looks like it can be a generic feature. i.e set this option is
dev_configure()If there is no objection, Please send a new patch aroundthat.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
I've considered implementing this in DSW, although in a different manner (with eventfds and
poll()).The dequeue timeout will still be honored in "interrupt mode", correct? It wasn't obvious from the description.
How is it in Intel PMD?
It would be best if we configure it per port using RTE_EVENT_PORT_CFG_* flags. Will it be, OK?
The dequeue timeout will be honored, and the decision to block or return will be made after the timeout. If not interrupt, it can be called blocking vs polling mode. If the port config is fine, I will create a new patch with it. Also, we should have this as a capability for eventdevs.
Quoted 13 lines
Quoted 7 lines
What's being configured should just be a threshold time at which the event device would go from busy-polling to blocking the thread.
Maybe it should be called something with "blocking" or "sleeping", instead of "interrupt", since interrupts are never directly involved.
Agree. or make it a power save mode or so.
Quoted 3 lines
Anyway, seems like a good candidate for a generic feature to me.
Quoted 87 lines · Pravin
Quoted 87 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Monday, June 30, 2025 7:44 AM
To: Mattias Rönnblom <[email protected]>
Cc: Pathak, Pravin <[email protected]>; [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>; [email protected]; [email protected]; Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 3 lines · Mattias Rönnblom
Quoted 1 line · Jerin Jacob
On Sat, Jun 28, 2025 at 11:17 AM Pravin Pathak
Quoted 9 lines · <[email protected]> wrote:
Quoted 9 lines
Quoted 9 lines
DLB2 port interrupt is implemented using DPDK interrupt framework. This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument
port_dequeue_wait. Supported modes are polling and interrupt. Default mode is polling. This commit also adds code to handle device error interrupts and print alarm details.Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by Pravin Pathak <[email protected]>Signed-off-by Tirthendu Sarkar <[email protected]>--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++-Quoted 8 lines
Quoted 8 lines
drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825+++++++++++++++++++++
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)(quoted diff) +0
-0
b/doc/guides/eventdevs/dlb2.rstindex8ec7168f20..a4ba857351100644
Quoted 3 lines
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst +0
-0@@ -477,6 +477,26 @@ Example command to use as meson option forcredit handling:
Quoted 2 lines
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for · line 477
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst +0
-0meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1'
Quoted 4 lines
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for credit handling:
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +3
-0+Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API
rte_event_dequeue_burst().Quoted 6 lines
Quoted 6 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for · line 486
Quoted 6 lines
doc/guides/eventdevs/dlb2.rst +6
-0+The default port dequeue mode is polling. Dequeue wait mode can be +configured on per eventdev port basis using devargs argument +'port_dequeue_wait'. In interrupt mode, if the port queue is +empty, the application thread will block on the interrupt until a +new event arrives. It enters blocking mode only after any +specified timeout. During the timeout, it will poll the port queue forevents as usual. Interrupt mode uses the DPDK interrupt support framework.
Quoted 9 lines
Quoted 9 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for credit handling: · line 492
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +4
-0+ + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interruptAdding other eventdev PMD mainatainers.
Looks like it can be a generic feature. i.e set this option is
dev_configure()If there is no objection, Please send a new patch aroundthat.
Quoted 4 lines
I've considered implementing this in DSW, although in a different manner (with eventfds and
poll()).
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
The dequeue timeout will still be honored in "interrupt mode", correct? It wasn't obvious from the description.
How is it in Intel PMD?
It would be best if we configure it per port using RTE_EVENT_PORT_CFG_* flags. Will it be, OK?
Yes
Quoted 3 lines
The dequeue timeout will be honored, and the decision to block or return will be made after the timeout. If not interrupt, it can be called blocking vs polling mode. If the port config is fine, I will create a new patch with it. Also, we should have this as a capability for eventdevs.
Yes
Quoted 14 lines
Quoted 14 lines
Quoted 8 lines
What's being configured should just be a threshold time at which the event device would go from busy-polling to blocking the thread.
Maybe it should be called something with "blocking" or "sleeping", instead of "interrupt", since interrupts are never directly involved.
Agree. or make it a power save mode or so.
Quoted 3 lines
Anyway, seems like a good candidate for a generic feature to me.
Quoted 86 lines · Pravin
Quoted 86 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Monday, June 30, 2025 7:44 AM
To: Mattias Rönnblom <[email protected]>
Cc: Pathak, Pravin <[email protected]>; [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>; [email protected]; [email protected]; Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 3 lines · Mattias Rönnblom
Quoted 1 line · Jerin Jacob
On Sat, Jun 28, 2025 at 11:17 AM Pravin Pathak
Quoted 9 lines · <[email protected]> wrote:
Quoted 9 lines
Quoted 9 lines
DLB2 port interrupt is implemented using DPDK interrupt framework. This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument
port_dequeue_wait. Supported modes are polling and interrupt. Default mode is polling. This commit also adds code to handle device error interrupts and print alarm details.Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by Pravin Pathak <[email protected]>Signed-off-by Tirthendu Sarkar <[email protected]>--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++-Quoted 8 lines
Quoted 8 lines
drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825+++++++++++++++++++++
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)(quoted diff) +0
-0
b/doc/guides/eventdevs/dlb2.rstindex8ec7168f20..a4ba857351100644
Quoted 3 lines
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst +0
-0@@ -477,6 +477,26 @@ Example command to use as meson option forcredit handling:
Quoted 2 lines
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for · line 477
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst +0
-0meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1'
Quoted 4 lines
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for credit handling:
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +3
-0+Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API
rte_event_dequeue_burst().Quoted 6 lines
Quoted 6 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for · line 486
Quoted 6 lines
doc/guides/eventdevs/dlb2.rst +6
-0+The default port dequeue mode is polling. Dequeue wait mode can be +configured on per eventdev port basis using devargs argument +'port_dequeue_wait'. In interrupt mode, if the port queue is +empty, the application thread will block on the interrupt until a +new event arrives. It enters blocking mode only after any +specified timeout. During the timeout, it will poll the port queue forevents as usual. Interrupt mode uses the DPDK interrupt support framework.
Quoted 9 lines
Quoted 9 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for credit handling: · line 492
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +4
-0+ + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interruptAdding other eventdev PMD mainatainers.
Looks like it can be a generic feature. i.e set this option is
dev_configure()If there is no objection, Please send a new patch aroundthat.
Quoted 4 lines
I've considered implementing this in DSW, although in a different manner (with eventfds and
poll()).
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
The dequeue timeout will still be honored in "interrupt mode", correct? It wasn't obvious from the description.
How is it in Intel PMD?
It would be best if we configure it per port using RTE_EVENT_PORT_CFG_* flags. Will it be, OK? The dequeue timeout will be honored, and the decision to block or return will be made after the timeout.
That doesn't sound like the timeout is honored.
The reason an application wants the dequeue call to complete within a certain time, even though there wasn't any events, is likely because it want to go do something else with that thread, after the timeout.
Thus, you can't decide to block the thread *after* the timeout. If you block, you have to do some time *before* the timeout, and wake up in time to meet the deadline.
For example, if the event device is given a 1 ms dequeue timeout by the application, it could go busy-poll for 10 us, then busy-poll with a short tpause for 100 us, and then put the thread to sleep blocking on some fd for the remaining 890 us.
The hardware-specific nature of the timing and exact mechanism to use speaks against having this kind of configuration in the Eventdev API.
Quoted 16 lines
If not interrupt, it can be called blocking vs polling mode. If the port config is fine, I will create a new patch with it. Also, we should have this as a capability for eventdevs.
Quoted 13 lines
Quoted 7 lines
What's being configured should just be a threshold time at which the event device would go from busy-polling to blocking the thread.
Maybe it should be called something with "blocking" or "sleeping", instead of "interrupt", since interrupts are never directly involved.
Agree. or make it a power save mode or so.
Quoted 3 lines
Anyway, seems like a good candidate for a generic feature to me.
Quoted 132 lines
-----Original Message-----
From: Mattias Rönnblom <[email protected]>
Sent: Monday, June 30, 2025 12:51 PM
To: Pathak, Pravin <[email protected]>; Jerin Jacob <[email protected]>
Cc: [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>; [email protected]; [email protected]; Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 10 lines · Pravin
Quoted 10 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Monday, June 30, 2025 7:44 AM
To: Mattias Rönnblom <[email protected]>
Cc: Pathak, Pravin <[email protected]>; [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>;Quoted 42 lines
Quoted 42 lines
[email protected]; Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 3 lines · Mattias Rönnblom
Quoted 1 line · Jerin Jacob
On Sat, Jun 28, 2025 at 11:17 AM Pravin Pathak
Quoted 9 lines · <[email protected]> wrote:
Quoted 9 lines
Quoted 9 lines
DLB2 port interrupt is implemented using DPDK interrupt framework. This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument
port_dequeue_wait. Supported modes are polling and interrupt. Default mode is polling. This commit also adds code to handle device error interrupts and print alarm details.Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by Pravin Pathak <[email protected]>Signed-off-by Tirthendu Sarkar <[email protected]>--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++-Quoted 8 lines
Quoted 8 lines
drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825+++++++++++++++++++++
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
(quoted diff) +0
-0
b/doc/guides/eventdevs/dlb2.rstindex8ec7168f20..a4ba857351100644
Quoted 3 lines
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst +0
-0@@ -477,6 +477,26 @@ Example command to use as meson optionfor
Quoted 9 lines
Quoted 9 lines
credit handling:
Quoted 2 lines
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 477
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst +0
-0meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1'
Quoted 4 lines
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for credit handling:
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +3
-0+Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API
rte_event_dequeue_burst().Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 487
Quoted 7 lines
doc/guides/eventdevs/dlb2.rst +7
-0+The default port dequeue mode is polling. Dequeue wait mode can +be configured on per eventdev port basis using devargs argument +'port_dequeue_wait'. In interrupt mode, if the port queue is +empty, the application thread will block on the interrupt until a +new event arrives. It enters blocking mode only after any +specified timeout. During the timeout, it will poll the port +queue forevents as usual. Interrupt mode uses the DPDK interrupt support
framework.
Quoted 15 lines
Quoted 15 lines
Quoted 10 lines
Quoted 10 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option for credit handling: · line 492
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +4
-0+ + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interruptAdding other eventdev PMD mainatainers.
Looks like it can be a generic feature. i.e set this option is
dev_configure()If there is no objection, Please send a new patch aroundthat.
Quoted 4 lines
I've considered implementing this in DSW, although in a different manner (with eventfds and
poll()).Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
The dequeue timeout will still be honored in "interrupt mode", correct? It wasn't obvious from the description.
How is it in Intel PMD?
It would be best if we configure it per port using RTE_EVENT_PORT_CFG_*
flags. Will it be, OK?
Quoted 1 line
The dequeue timeout will be honored, and the decision to block or return
will be made after the timeout.
That doesn't sound like the timeout is honored.
The reason an application wants the dequeue call to complete within a certain time, even though there wasn't any events, is likely because it want to go do something else with that thread, after the timeout.
Thus, you can't decide to block the thread *after* the timeout. If you block, you have to do some time *before* the timeout, and wake up in time to meet the deadline.
Quoted 7 lines
For example, if the event device is given a 1 ms dequeue timeout by the application, it could go busy-poll for 10 us, then busy-poll with a short tpause for 100 us, and then put the thread to sleep blocking on some fd for the remaining 890 us.
The hardware-specific nature of the timing and exact mechanism to use speaks against having this kind of configuration in the Eventdev API.
The mode is not for what to do during a timeout, but after a timeout.
We can enter sleep mode immediately by setting the timeout to 0 if we need to.
This mode is not changing the current timeout behavior. After the timeout,
it allows HW devices supporting interrupts to block on an interrupt.
It will wake up only after a new event arrives at the port. If the application needs control back then it can use the current default non-blocking mode. A better mode to save power during timeout will be to use umwait-based sleep. Consider this as extension to current timeout behavior if device supports interrupts.
Quoted 18 lines
Quoted 2 lines
If not interrupt, it can be called blocking vs polling mode. If the port config is
fine, I will create a new patch with it.
Quoted 15 lines
Also, we should have this as a capability for eventdevs.
Quoted 13 lines
Quoted 7 lines
What's being configured should just be a threshold time at which the event device would go from busy-polling to blocking the thread.
Maybe it should be called something with "blocking" or "sleeping", instead of "interrupt", since interrupts are never directly involved.
Agree. or make it a power save mode or so.
Quoted 3 lines
Anyway, seems like a good candidate for a generic feature to me.
Quoted 137 lines · Pravin
Quoted 137 lines
-----Original Message-----
From: Mattias Rönnblom <[email protected]>
Sent: Monday, June 30, 2025 12:51 PM
To: Pathak, Pravin <[email protected]>; Jerin Jacob <[email protected]>
Cc: [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>; [email protected]; [email protected]; Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 10 lines · Pravin
Quoted 10 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Monday, June 30, 2025 7:44 AM
To: Mattias Rönnblom <[email protected]>
Cc: Pathak, Pravin <[email protected]>; [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>;Quoted 42 lines
Quoted 42 lines
[email protected]; Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 3 lines · Mattias Rönnblom
Quoted 1 line · Jerin Jacob
On Sat, Jun 28, 2025 at 11:17 AM Pravin Pathak
Quoted 9 lines · <[email protected]> wrote:
Quoted 9 lines
Quoted 9 lines
DLB2 port interrupt is implemented using DPDK interrupt framework. This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument
port_dequeue_wait. Supported modes are polling and interrupt. Default mode is polling. This commit also adds code to handle device error interrupts and print alarm details.Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by Pravin Pathak <[email protected]>Signed-off-by Tirthendu Sarkar <[email protected]>--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++-Quoted 8 lines
Quoted 8 lines
drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825+++++++++++++++++++++
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
(quoted diff) +0
-0
b/doc/guides/eventdevs/dlb2.rstindex8ec7168f20..a4ba857351100644
Quoted 3 lines
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst +0
-0@@ -477,6 +477,26 @@ Example command to use as meson optionfor
Quoted 9 lines
Quoted 9 lines
credit handling:
Quoted 2 lines
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 477
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst +0
-0meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1'
Quoted 4 lines
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 480
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +3
-0+Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API
rte_event_dequeue_burst().Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 487
Quoted 7 lines
doc/guides/eventdevs/dlb2.rst +7
-0+The default port dequeue mode is polling. Dequeue wait mode can +be configured on per eventdev port basis using devargs argument +'port_dequeue_wait'. In interrupt mode, if the port queue is +empty, the application thread will block on the interrupt until a +new event arrives. It enters blocking mode only after any +specified timeout. During the timeout, it will poll the port +queue forevents as usual. Interrupt mode uses the DPDK interrupt support
framework.
Quoted 15 lines
Quoted 15 lines
Quoted 10 lines
Quoted 10 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 491
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +4
-0+ + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interruptAdding other eventdev PMD mainatainers.
Looks like it can be a generic feature. i.e set this option is
dev_configure()If there is no objection, Please send a new patch aroundthat.
Quoted 4 lines
I've considered implementing this in DSW, although in a different manner (with eventfds and
poll()).Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
The dequeue timeout will still be honored in "interrupt mode", correct? It wasn't obvious from the description.
How is it in Intel PMD?
It would be best if we configure it per port using RTE_EVENT_PORT_CFG_*
flags. Will it be, OK?
Quoted 1 line
The dequeue timeout will be honored, and the decision to block or return
will be made after the timeout.
That doesn't sound like the timeout is honored.
The reason an application wants the dequeue call to complete within a certain time, even though there wasn't any events, is likely because it want to go do something else with that thread, after the timeout.
Thus, you can't decide to block the thread *after* the timeout. If you block, you have to do some time *before* the timeout, and wake up in time to meet the deadline.
For example, if the event device is given a 1 ms dequeue timeout by the application, it could go busy-poll for 10 us, then busy-poll with a short tpause for 100 us, and then put the thread to sleep blocking on some fd for the remaining 890 us.
Quoted 4 lines
Quoted 2 lines
The hardware-specific nature of the timing and exact mechanism to use speaks against having this kind of configuration in the Eventdev API.
The mode is not for what to do during a timeout, but after a timeout.
My comments were not so much concerning any DLB-specific extension, but rather how this kind of function should work, if it was a part of the standard API.
Quoted 3 lines
We can enter sleep mode immediately by setting the timeout to 0 if we need to. This mode is not changing the current timeout behavior. After the timeout, it allows HW devices supporting interrupts to block on an interrupt.
The current API specifies that control is returned to the application, after the timeout has expired. If you change that with a PMD parameter, the DLB behavior will be in violation of the API contract. Applications using rte_keepalive_alive() between dequeues is one example of those that will break. In fact, all applications that use more than one RTE service will break.
Quoted 5 lines
It will wake up only after a new event arrives at the port. If the application needs control back then it can use the current default non-blocking mode. A better mode to save power during timeout will be to use umwait-based sleep. Consider this as extension to current timeout behavior if device supports interrupts.
What about applications that both want power efficiency *and* require a timeout?
It makes no sense to me the change the semantics of the dequeue timeout parameter from "the time until I want control back" to "the time I want the event device to use polling, after which it should put the thread to sleep". Those two are pretty much orthogonal.
The current API doesn't specify what happens during the timeout. If you by "non-blocking" mean "busy-polling", that is not an API requirement. I don't see why the event device couldn't put the lcore thread to sleep during a long timeout (and I also see why you may not want that to be the default behavior).
Quoted 19 lines
Quoted 18 lines
Quoted 2 lines
If not interrupt, it can be called blocking vs polling mode. If the port config is
fine, I will create a new patch with it.
Quoted 15 lines
Also, we should have this as a capability for eventdevs.
Quoted 13 lines
Quoted 7 lines
What's being configured should just be a threshold time at which the event device would go from busy-polling to blocking the thread.
Maybe it should be called something with "blocking" or "sleeping", instead of "interrupt", since interrupts are never directly involved.
Agree. or make it a power save mode or so.
Quoted 3 lines
Anyway, seems like a good candidate for a generic feature to me.
Quoted 198 lines
-----Original Message-----
From: Mattias Rönnblom <[email protected]>
Sent: Tuesday, July 1, 2025 4:16 AM
To: Pathak, Pravin <[email protected]>; Jerin Jacob <[email protected]>
Cc: [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>; [email protected]; [email protected]; Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 11 lines · Pravin
Quoted 11 lines
-----Original Message-----
From: Mattias Rönnblom <[email protected]>
Sent: Monday, June 30, 2025 12:51 PM
To: Pathak, Pravin <[email protected]>; Jerin Jacob <[email protected]>
Cc: [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>; [email protected];Quoted 11 lines
Quoted 11 lines
Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 2 lines · Pravin
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Monday, June 30, 2025 7:44 AM
To: Mattias Rönnblom <[email protected]>
Cc: Pathak, Pravin <[email protected]>; [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, DavidQuoted 4 lines
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
[email protected]; Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 1 line · Mattias Rönnblom
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines · Jerin Jacob
Quoted 1 line
On Sat, Jun 28, 2025 at 11:17 AM Pravin Pathak
Quoted 5 lines · <[email protected]> wrote:
Quoted 5 lines
Quoted 5 lines
DLB2 port interrupt is implemented using DPDK interrupt framework. This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument
port_dequeue_wait.Quoted 89 lines
Quoted 89 lines
Quoted 22 lines
Quoted 22 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Supported modes are polling and interrupt. Default mode is polling. This commit also adds code to handle device error interrupts and print alarm details.
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by Pravin Pathak <[email protected]>Signed-off-by Tirthendu Sarkar <[email protected]>--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++-Quoted 8 lines
Quoted 8 lines
drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825+++++++++++++++++++++
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
(quoted diff) +0
-0
b/doc/guides/eventdevs/dlb2.rstindex8ec7168f20..a4ba857351100644
Quoted 3 lines
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst +0
-0@@ -477,6 +477,26 @@ Example command to use as meson optionfor
Quoted 9 lines
Quoted 9 lines
credit handling:
Quoted 2 lines
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 477
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst +0
-0meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1'
Quoted 4 lines
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 480
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +3
-0+Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API
rte_event_dequeue_burst().Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 487
Quoted 7 lines
doc/guides/eventdevs/dlb2.rst +7
-0+The default port dequeue mode is polling. Dequeue wait mode can +be configured on per eventdev port basis using devargs argument +'port_dequeue_wait'. In interrupt mode, if the port queue is +empty, the application thread will block on the interrupt until +a new event arrives. It enters blocking mode only after any +specified timeout. During the timeout, it will poll the port +queue forevents as usual. Interrupt mode uses the DPDK interrupt support
framework.
Quoted 15 lines
Quoted 15 lines
Quoted 10 lines
Quoted 10 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 491
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +4
-0+ + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interruptAdding other eventdev PMD mainatainers.
Looks like it can be a generic feature. i.e set this option is
dev_configure()If there is no objection, Please send a new patch aroundthat.
Quoted 4 lines
I've considered implementing this in DSW, although in a different manner (with eventfds and
poll()).Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
The dequeue timeout will still be honored in "interrupt mode", correct? It wasn't obvious from the description.
How is it in Intel PMD?
It would be best if we configure it per port using RTE_EVENT_PORT_CFG_*
flags. Will it be, OK?
Quoted 2 lines
The dequeue timeout will be honored, and the decision to block or return
will be made after the timeout.
That doesn't sound like the timeout is honored.
The reason an application wants the dequeue call to complete within a certain time, even though there wasn't any events, is likely because it want to go do something else with that thread, after the timeout.
Thus, you can't decide to block the thread *after* the timeout. If you block, you have to do some time *before* the timeout, and wake up in time to meet the deadline.
For example, if the event device is given a 1 ms dequeue timeout by the application, it could go busy-poll for 10 us, then busy-poll with a short tpause for 100 us, and then put the thread to sleep blocking on some fd for the remaining 890 us.
Quoted 4 lines
Quoted 2 lines
The hardware-specific nature of the timing and exact mechanism to use speaks against having this kind of configuration in the Eventdev API.
The mode is not for what to do during a timeout, but after a timeout.
My comments were not so much concerning any DLB-specific extension, but rather how this kind of function should work, if it was a part of the standard API.
Quoted 1 line
We can enter sleep mode immediately by setting the timeout to 0 if we need
to.
Quoted 2 lines
This mode is not changing the current timeout behavior. After the timeout, it allows HW devices supporting interrupts to block on an interrupt.
The current API specifies that control is returned to the application, after the timeout has expired. If you change that with a PMD parameter, the DLB behavior will be in violation of the API contract. Applications using
rte_keepalive_alive()between dequeues is one example of those that will break. In fact, all applications that use more than one RTE service will break.Quoted 4 lines
It will wake up only after a new event arrives at the port. If the application needs control back then it can use the current default non-blocking mode. A better mode to save power during timeout will be to use umwait-based sleep. Consider this as extension to current timeout
behavior if device supports interrupts.
Quoted 1 line
What about applications that both want power efficiency *and* require a timeout?
It makes no sense to me the change the semantics of the dequeue timeout parameter from "the time until I want control back" to "the time I want the event device to use polling, after which it should put the thread to sleep". Those two are pretty much orthogonal.
Quoted 5 lines
The current API doesn't specify what happens during the timeout. If you by "non-blocking" mean "busy-polling", that is not an API requirement. I don't see why the event device couldn't put the lcore thread to sleep during a long timeout (and I also see why you may not want that to be the default behavior).
I got your point. Application will prefer to return and not block after the timeout as per current API description. Current API signature is
= 0 no-wait, returns immediately if there is no event.
Quoted 1 line
0 wait for the event or timeout
Will it be OK to extend it to treat max timeout 0xffffffff as block for event with PMD specific Mechanism to wait for the event ? Port specific configuration will not be required in this case. Devices supporting interrupts then can use interrupt blocking mode internally.
Quoted 21 lines
Quoted 21 lines
Quoted 20 lines
Quoted 4 lines
If not interrupt, it can be called blocking vs polling mode. If the port config is
fine, I will create a new patch with it.
Quoted 15 lines
Also, we should have this as a capability for eventdevs.
Quoted 13 lines
Quoted 7 lines
What's being configured should just be a threshold time at which the event device would go from busy-polling to blocking the thread.
Maybe it should be called something with "blocking" or "sleeping", instead of "interrupt", since interrupts are never directly involved.
Agree. or make it a power save mode or so.
Quoted 3 lines
Anyway, seems like a good candidate for a generic feature to me.
Quoted 204 lines · Pravin
Quoted 198 lines
-----Original Message-----
From: Mattias Rönnblom <[email protected]>
Sent: Tuesday, July 1, 2025 4:16 AM
To: Pathak, Pravin <[email protected]>; Jerin Jacob <[email protected]>
Cc: [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>; [email protected]; [email protected]; Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 11 lines · Pravin
Quoted 11 lines
-----Original Message-----
From: Mattias Rönnblom <[email protected]>
Sent: Monday, June 30, 2025 12:51 PM
To: Pathak, Pravin <[email protected]>; Jerin Jacob <[email protected]>
Cc: [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>; [email protected];Quoted 11 lines
Quoted 11 lines
Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 2 lines · Pravin
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Monday, June 30, 2025 7:44 AM
To: Mattias Rönnblom <[email protected]>
Cc: Pathak, Pravin <[email protected]>; [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, DavidQuoted 4 lines
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
[email protected]; Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 1 line · Mattias Rönnblom
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines · Jerin Jacob
Quoted 1 line
On Sat, Jun 28, 2025 at 11:17 AM Pravin Pathak
Quoted 5 lines · <[email protected]> wrote:
Quoted 5 lines
Quoted 5 lines
DLB2 port interrupt is implemented using DPDK interrupt framework. This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument
port_dequeue_wait.Quoted 89 lines
Quoted 89 lines
Quoted 22 lines
Quoted 22 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Supported modes are polling and interrupt. Default mode is polling. This commit also adds code to handle device error interrupts and print alarm details.
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by Pravin Pathak <[email protected]>Signed-off-by Tirthendu Sarkar <[email protected]>--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++-Quoted 8 lines
Quoted 8 lines
drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825+++++++++++++++++++++
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
(quoted diff) +0
-0
b/doc/guides/eventdevs/dlb2.rstindex8ec7168f20..a4ba857351100644
Quoted 3 lines
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst +0
-0@@ -477,6 +477,26 @@ Example command to use as meson optionfor
Quoted 9 lines
Quoted 9 lines
credit handling:
Quoted 2 lines
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 477
Quoted 2 lines
doc/guides/eventdevs/dlb2.rst +0
-0meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1'
Quoted 4 lines
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 480
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +3
-0+Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API
rte_event_dequeue_burst().Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 487
Quoted 7 lines
doc/guides/eventdevs/dlb2.rst +7
-0+The default port dequeue mode is polling. Dequeue wait mode can +be configured on per eventdev port basis using devargs argument +'port_dequeue_wait'. In interrupt mode, if the port queue is +empty, the application thread will block on the interrupt until +a new event arrives. It enters blocking mode only after any +specified timeout. During the timeout, it will poll the port +queue forevents as usual. Interrupt mode uses the DPDK interrupt support
framework.
Quoted 15 lines
Quoted 15 lines
Quoted 10 lines
Quoted 10 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson option · line 491
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +4
-0+ + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interruptAdding other eventdev PMD mainatainers.
Looks like it can be a generic feature. i.e set this option is
dev_configure()If there is no objection, Please send a new patch aroundthat.
Quoted 4 lines
I've considered implementing this in DSW, although in a different manner (with eventfds and
poll()).Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
The dequeue timeout will still be honored in "interrupt mode", correct? It wasn't obvious from the description.
How is it in Intel PMD?
It would be best if we configure it per port using RTE_EVENT_PORT_CFG_*
flags. Will it be, OK?
Quoted 2 lines
The dequeue timeout will be honored, and the decision to block or return
will be made after the timeout.
That doesn't sound like the timeout is honored.
The reason an application wants the dequeue call to complete within a certain time, even though there wasn't any events, is likely because it want to go do something else with that thread, after the timeout.
Thus, you can't decide to block the thread *after* the timeout. If you block, you have to do some time *before* the timeout, and wake up in time to meet the deadline.
For example, if the event device is given a 1 ms dequeue timeout by the application, it could go busy-poll for 10 us, then busy-poll with a short tpause for 100 us, and then put the thread to sleep blocking on some fd for the remaining 890 us.
Quoted 4 lines
Quoted 2 lines
The hardware-specific nature of the timing and exact mechanism to use speaks against having this kind of configuration in the Eventdev API.
The mode is not for what to do during a timeout, but after a timeout.
My comments were not so much concerning any DLB-specific extension, but rather how this kind of function should work, if it was a part of the standard API.
Quoted 1 line
We can enter sleep mode immediately by setting the timeout to 0 if we need
to.
Quoted 2 lines
This mode is not changing the current timeout behavior. After the timeout, it allows HW devices supporting interrupts to block on an interrupt.
The current API specifies that control is returned to the application, after the timeout has expired. If you change that with a PMD parameter, the DLB behavior will be in violation of the API contract. Applications using
rte_keepalive_alive()between dequeues is one example of those that will break. In fact, all applications that use more than one RTE service will break.Quoted 4 lines
It will wake up only after a new event arrives at the port. If the application needs control back then it can use the current default non-blocking mode. A better mode to save power during timeout will be to use umwait-based sleep. Consider this as extension to current timeout
behavior if device supports interrupts.
Quoted 1 line
What about applications that both want power efficiency *and* require a timeout?
It makes no sense to me the change the semantics of the dequeue timeout parameter from "the time until I want control back" to "the time I want the event device to use polling, after which it should put the thread to sleep". Those two are pretty much orthogonal.
Quoted 5 lines
The current API doesn't specify what happens during the timeout. If you by "non-blocking" mean "busy-polling", that is not an API requirement. I don't see why the event device couldn't put the lcore thread to sleep during a long timeout (and I also see why you may not want that to be the default behavior).
Quoted 8 lines
I got your point. Application will prefer to return and not block after the timeout as per current API description. Current API signature is
= 0 no-wait, returns immediately if there is no event.Quoted 1 line
0 wait for the event or timeout
Will it be OK to extend it to treat max timeout
0xffffffffas block for event with PMD specific Mechanism to wait for the event ? Port specific configuration will not be required in this case. Devices supporting interrupts then can use interrupt blocking mode internally.
Correct me if I'm wrong here, but I think an event device is free to block using a PMD-specific mechanism with any non-zero timeout. The longer the timeout, the more sense it make to put the thread to sleep (blocking on an fd).
I also think that the details of how to spend the timeout time probably needs to be configured by the app (at startup). Different modes, thresholds, etc. Maybe such are best off as PMD parameters at this point.
Is there some limitation in the interrupt APIs, or what is preventing the DLB driver to both honor a finite timeout and block/put the lcore thread to sleep?
Quoted 22 lines
Quoted 21 lines
Quoted 21 lines
Quoted 20 lines
Quoted 4 lines
If not interrupt, it can be called blocking vs polling mode. If the port config is
fine, I will create a new patch with it.
Quoted 15 lines
Also, we should have this as a capability for eventdevs.
Quoted 13 lines
Quoted 7 lines
What's being configured should just be a threshold time at which the event device would go from busy-polling to blocking the thread.
Maybe it should be called something with "blocking" or "sleeping", instead of "interrupt", since interrupts are never directly involved.
Agree. or make it a power save mode or so.
Quoted 3 lines
Anyway, seems like a good candidate for a generic feature to me.
Quoted 254 lines
-----Original Message-----
From: Mattias Rönnblom <[email protected]>
Sent: Thursday, July 3, 2025 5:25 AM
To: Pathak, Pravin <[email protected]>; Jerin Jacob <[email protected]>
Cc: [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>; [email protected]; [email protected]; Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 11 lines · Pravin
Quoted 11 lines
-----Original Message-----
From: Mattias Rönnblom <[email protected]>
Sent: Tuesday, July 1, 2025 4:16 AM
To: Pathak, Pravin <[email protected]>; Jerin Jacob <[email protected]>
Cc: [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>; [email protected];Quoted 11 lines
Quoted 11 lines
Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 2 lines · Pravin
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
-----Original Message-----
From: Mattias Rönnblom <[email protected]>
Sent: Monday, June 30, 2025 12:51 PM
To: Pathak, Pravin <[email protected]>; Jerin Jacob <[email protected]>
Cc: [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand,David
Quoted 38 lines
Quoted 38 lines
Quoted 1 line
Quoted 1 line
Quoted 11 lines
Quoted 11 lines
Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 2 lines · Pravin
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Monday, June 30, 2025 7:44 AM
To: Mattias Rönnblom <[email protected]>
Cc: Pathak, Pravin <[email protected]>; [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, DavidQuoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
[email protected]; Sarkar, Tirthendu
<[email protected]>; Pavan Nikhilesh
<[email protected]>; Shijith Thotton
<[email protected]>; Hemant AgrawalQuoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 1 line · Mattias Rönnblom
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines · Jerin Jacob
Quoted 1 line
On Sat, Jun 28, 2025 at 11:17 AM Pravin Pathak
Quoted 2 lines · <[email protected]> wrote:
Quoted 2 lines
Quoted 2 lines
DLB2 port interrupt is implemented using DPDK interrupt
framework.
Quoted 26 lines
Quoted 26 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument
port_dequeue_wait.Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Supported modes are polling and interrupt. Default mode is polling. This commit also adds code to handle device error interrupts and print alarm details.
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by Pravin Pathak <[email protected]>Signed-off-by Tirthendu Sarkar <[email protected]>--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++-Quoted 8 lines
Quoted 8 lines
drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825+++++++++++++++++++++
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
(quoted diff) +0
-0
b/doc/guides/eventdevs/dlb2.rstindex8ec7168f20..a4ba857351100644
Quoted 3 lines
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst +0
-0@@ -477,6 +477,26 @@ Example command to use as mesonoption
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
for
Quoted 10 lines
Quoted 10 lines
credit handling:
Quoted 3 lines
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson · line 478
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst +0
-1meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1'
Quoted 4 lines
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson · line 480
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +3
-0+Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API
rte_event_dequeue_burst().Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson · line 487
Quoted 7 lines
doc/guides/eventdevs/dlb2.rst +7
-0+The default port dequeue mode is polling. Dequeue wait mode +can be configured on per eventdev port basis using devargs +argument 'port_dequeue_wait'. In interrupt mode, if the port +queue is empty, the application thread will block on the +interrupt until a new event arrives. It enters blocking mode +only after any specified timeout. During the timeout, it will +poll the port queue forevents as usual. Interrupt mode uses the DPDK interrupt support
framework.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson · line 491
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +4
-0+ + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interruptAdding other eventdev PMD mainatainers.
Looks like it can be a generic feature. i.e set this option is
dev_configure()If there is no objection, Please send a new patch aroundQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
that.
Quoted 5 lines
I've considered implementing this in DSW, although in a different manner (with eventfds and
poll()).The dequeue timeout will still be honored in "interrupt mode",
correct?
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
It wasn't obvious from the description.
How is it in Intel PMD?
It would be best if we configure it per port using RTE_EVENT_PORT_CFG_*
flags. Will it be, OK?
Quoted 2 lines
The dequeue timeout will be honored, and the decision to block or return
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
will be made after the timeout.
That doesn't sound like the timeout is honored.
The reason an application wants the dequeue call to complete within a certain time, even though there wasn't any events, is likely because it want to go do something else with that thread, after the
timeout.
Quoted 19 lines
Quoted 19 lines
Quoted 10 lines
Quoted 10 lines
Thus, you can't decide to block the thread *after* the timeout. If you block, you have to do some time *before* the timeout, and wake up in time to meet the deadline.
For example, if the event device is given a 1 ms dequeue timeout by the application, it could go busy-poll for 10 us, then busy-poll with a short tpause for 100 us, and then put the thread to sleep blocking on some fd for the remaining 890 us.
Quoted 4 lines
Quoted 2 lines
The hardware-specific nature of the timing and exact mechanism to use speaks against having this kind of configuration in the Eventdev API.
The mode is not for what to do during a timeout, but after a timeout.
My comments were not so much concerning any DLB-specific extension, but rather how this kind of function should work, if it was a part of the standard API.
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
We can enter sleep mode immediately by setting the timeout to 0 if we need
to.
Quoted 2 lines
This mode is not changing the current timeout behavior. After the timeout, it allows HW devices supporting interrupts to block on
an interrupt.
Quoted 7 lines
Quoted 7 lines
The current API specifies that control is returned to the application, after the timeout has expired. If you change that with a PMD parameter, the DLB behavior will be in violation of the API contract. Applications using
rte_keepalive_alive()between dequeues is one example of those that will break. In fact, all applications that use more than one RTE service willbreak.
Quoted 9 lines
Quoted 9 lines
Quoted 6 lines
It will wake up only after a new event arrives at the port. If the application needs control back then it can use the current default non-blocking mode. A better mode to save power during timeout will be to use umwait-based sleep. Consider this as extension to current timeout
behavior if device supports interrupts.
Quoted 1 line
Quoted 6 lines
Quoted 6 lines
What about applications that both want power efficiency *and* require a timeout?
It makes no sense to me the change the semantics of the dequeue timeout parameter from "the time until I want control back" to "the time I want the event device to use polling, after which it should put the
thread to sleep".
Quoted 8 lines
Quoted 7 lines
Those two are pretty much orthogonal.
The current API doesn't specify what happens during the timeout. If you by "non-blocking" mean "busy-polling", that is not an API requirement. I don't see why the event device couldn't put the lcore thread to sleep during a long timeout (and I also see why you may not want that to be the default behavior).
Quoted 6 lines
I got your point. Application will prefer to return and not block after the timeout as per current API description. Current API signature is = 0 no-wait, returns immediately if there is no event.
Quoted 1 line
0 wait for the event or timeout
Will it be OK to extend it to treat max timeout
0xffffffffas block for event with PMD specific Mechanism to wait for the event ? Port specificconfiguration will not be required in this case.
Quoted 1 line
Devices supporting interrupts then can use interrupt blocking mode
internally.
Quoted 1 line
Correct me if I'm wrong here, but I think an event device is free to block using a PMD-specific mechanism with any non-zero timeout. The longer the timeout, the more sense it make to put the thread to sleep (blocking on an fd).
Quoted 6 lines
I also think that the details of how to spend the timeout time probably needs to be configured by the app (at startup). Different modes, thresholds, etc. Maybe such are best off as PMD parameters at this point.
Is there some limitation in the interrupt APIs, or what is preventing the DLB driver to both honor a finite timeout and block/put the lcore thread to sleep?
Current API definition does not specify or put restriction on timeout mechanism PMD decides to implement. But it will be nice to have application some control on it. DLB PMD supports polling, umwait and interrupt blocking as three modes. Current configuration is devargs based and specific to DLB PMD. If application has choice at each dequeue call, it can decide what mechanism to use. Polling for lower latencies, umwait for power saving and interrupt blocking to make a de-scheduling call and release CPU for other thread. We had implementation supporting these using most significant bits of timeout value on per dequeue call basis. But as it breaks API, now it is done with devargs. If control over dequeue wait is useful to applications, then it can be standardized instead of being PMD specific. Else, we will keep it the way it is now in the patch.
I took look at ethdev PMD and there additional APIs are used for blocking. rte_eth_dev_rx_intr_enableepoll_wait()rte_eth_dev_rx_intr_disable
And other APIs to configure interrupts. But Eventdev mechanism of doing all inside dequeue API looks Simple.
Quoted 24 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 5 lines
If not interrupt, it can be called blocking vs polling mode. If the port config is
fine, I will create a new patch with it.
Quoted 4 lines
Also, we should have this as a capability for eventdevs.
Quoted 2 lines
Quoted 2 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
What's being configured should just be a threshold time at which the event device would go from busy-polling to blocking the thread.
Maybe it should be called something with "blocking" or "sleeping", instead of "interrupt", since interrupts are never directly
involved.
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Agree. or make it a power save mode or so.
Quoted 3 lines
Anyway, seems like a good candidate for a generic feature to me.
Quoted 261 lines · Pravin
Quoted 254 lines
-----Original Message-----
From: Mattias Rönnblom <[email protected]>
Sent: Thursday, July 3, 2025 5:25 AM
To: Pathak, Pravin <[email protected]>; Jerin Jacob <[email protected]>
Cc: [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>; [email protected]; [email protected]; Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 11 lines · Pravin
Quoted 11 lines
-----Original Message-----
From: Mattias Rönnblom <[email protected]>
Sent: Tuesday, July 1, 2025 4:16 AM
To: Pathak, Pravin <[email protected]>; Jerin Jacob <[email protected]>
Cc: [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, David <[email protected]>; [email protected];Quoted 11 lines
Quoted 11 lines
Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 2 lines · Pravin
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
-----Original Message-----
From: Mattias Rönnblom <[email protected]>
Sent: Monday, June 30, 2025 12:51 PM
To: Pathak, Pravin <[email protected]>; Jerin Jacob <[email protected]>
Cc: [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand,David
Quoted 38 lines
Quoted 38 lines
Quoted 1 line
Quoted 1 line
Quoted 11 lines
Quoted 11 lines
Sarkar, Tirthendu <[email protected]>; Pavan Nikhilesh <[email protected]>; Shijith Thotton <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 2 lines · Pravin
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Monday, June 30, 2025 7:44 AM
To: Mattias Rönnblom <[email protected]>
Cc: Pathak, Pravin <[email protected]>; [email protected]; [email protected]; Chen, Mike Ximing <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Marchand, DavidQuoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
[email protected]; Sarkar, Tirthendu
<[email protected]>; Pavan Nikhilesh
<[email protected]>; Shijith Thotton
<[email protected]>; Hemant AgrawalQuoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Sachin Saxena <[email protected]>; [email protected]; Mattias Rönnblom <[email protected]>
Subject: Re: [PATCH v1] event/dlb2: add dequeue interrupt mode supportQuoted 1 line · Mattias Rönnblom
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines · Jerin Jacob
Quoted 1 line
On Sat, Jun 28, 2025 at 11:17 AM Pravin Pathak
Quoted 2 lines · <[email protected]> wrote:
Quoted 2 lines
Quoted 2 lines
DLB2 port interrupt is implemented using DPDK interrupt
framework.
Quoted 26 lines
Quoted 26 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
This allows eventdev dequeue API to sleep when the port queue is empty and gets wakeup when event arrives at the port. Port dequeue mode is configured using devargs argument
port_dequeue_wait.Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Supported modes are polling and interrupt. Default mode is polling. This commit also adds code to handle device error interrupts and print alarm details.
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by Pravin Pathak <[email protected]>Signed-off-by Tirthendu Sarkar <[email protected]>--- doc/guides/eventdevs/dlb2.rst | 20 + drivers/event/dlb2/dlb2.c | 236 +++++-Quoted 8 lines
Quoted 8 lines
drivers/event/dlb2/dlb2_iface.c | 7 + drivers/event/dlb2/dlb2_iface.h | 8 + drivers/event/dlb2/dlb2_priv.h | 18 + drivers/event/dlb2/dlb2_user.h | 112 +++ drivers/event/dlb2/pf/base/dlb2_hw_types.h | 70 ++ drivers/event/dlb2/pf/base/dlb2_osdep.h | 46 ++ drivers/event/dlb2/pf/base/dlb2_regs.h | 149 +++- drivers/event/dlb2/pf/base/dlb2_resource.c | 825+++++++++++++++++++++
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/event/dlb2/pf/base/dlb2_resource.h | 6 + drivers/event/dlb2/pf/dlb2_pf.c | 223 ++++++ 12 files changed, 1711 insertions(+), 9 deletions(-)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
(quoted diff) +0
-0
b/doc/guides/eventdevs/dlb2.rstindex8ec7168f20..a4ba857351100644
Quoted 3 lines
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst +0
-0@@ -477,6 +477,26 @@ Example command to use as mesonoption
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
for
Quoted 10 lines
Quoted 10 lines
credit handling:
Quoted 3 lines
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson · line 478
Quoted 3 lines
doc/guides/eventdevs/dlb2.rst +0
-1meson configure -Dc_args='-DDLB_SW_CREDITS_CHECKS=0 -DDLB_HW_CREDITS_CHECKS=1'
Quoted 4 lines
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson · line 480
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +3
-0+Interrupt Mode Support +~~~~~~~~~~~~~~~~~~~~~~ +DLB dequeue supports interrupt mode for the API
rte_event_dequeue_burst().Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson · line 487
Quoted 7 lines
doc/guides/eventdevs/dlb2.rst +7
-0+The default port dequeue mode is polling. Dequeue wait mode +can be configured on per eventdev port basis using devargs +argument 'port_dequeue_wait'. In interrupt mode, if the port +queue is empty, the application thread will block on the +interrupt until a new event arrives. It enters blocking mode +only after any specified timeout. During the timeout, it will +poll the port queue forevents as usual. Interrupt mode uses the DPDK interrupt support
framework.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
doc/guides/eventdevs/dlb2.rst Example command to use as meson · line 491
Quoted 4 lines
doc/guides/eventdevs/dlb2.rst +4
-0+ + .. code-block:: console + + --allow ea:00.0,port_dequeue_wait=all:interruptAdding other eventdev PMD mainatainers.
Looks like it can be a generic feature. i.e set this option is
dev_configure()If there is no objection, Please send a new patch aroundQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
that.
Quoted 5 lines
I've considered implementing this in DSW, although in a different manner (with eventfds and
poll()).The dequeue timeout will still be honored in "interrupt mode",
correct?
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
It wasn't obvious from the description.
How is it in Intel PMD?
It would be best if we configure it per port using RTE_EVENT_PORT_CFG_*
flags. Will it be, OK?
Quoted 2 lines
The dequeue timeout will be honored, and the decision to block or return
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
will be made after the timeout.
That doesn't sound like the timeout is honored.
The reason an application wants the dequeue call to complete within a certain time, even though there wasn't any events, is likely because it want to go do something else with that thread, after the
timeout.
Quoted 19 lines
Quoted 19 lines
Quoted 10 lines
Quoted 10 lines
Thus, you can't decide to block the thread *after* the timeout. If you block, you have to do some time *before* the timeout, and wake up in time to meet the deadline.
For example, if the event device is given a 1 ms dequeue timeout by the application, it could go busy-poll for 10 us, then busy-poll with a short tpause for 100 us, and then put the thread to sleep blocking on some fd for the remaining 890 us.
Quoted 4 lines
Quoted 2 lines
The hardware-specific nature of the timing and exact mechanism to use speaks against having this kind of configuration in the Eventdev API.
The mode is not for what to do during a timeout, but after a timeout.
My comments were not so much concerning any DLB-specific extension, but rather how this kind of function should work, if it was a part of the standard API.
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
We can enter sleep mode immediately by setting the timeout to 0 if we need
to.
Quoted 2 lines
This mode is not changing the current timeout behavior. After the timeout, it allows HW devices supporting interrupts to block on
an interrupt.
Quoted 7 lines
Quoted 7 lines
The current API specifies that control is returned to the application, after the timeout has expired. If you change that with a PMD parameter, the DLB behavior will be in violation of the API contract. Applications using
rte_keepalive_alive()between dequeues is one example of those that will break. In fact, all applications that use more than one RTE service willbreak.
Quoted 9 lines
Quoted 9 lines
Quoted 6 lines
It will wake up only after a new event arrives at the port. If the application needs control back then it can use the current default non-blocking mode. A better mode to save power during timeout will be to use umwait-based sleep. Consider this as extension to current timeout
behavior if device supports interrupts.
Quoted 1 line
Quoted 6 lines
Quoted 6 lines
What about applications that both want power efficiency *and* require a timeout?
It makes no sense to me the change the semantics of the dequeue timeout parameter from "the time until I want control back" to "the time I want the event device to use polling, after which it should put the
thread to sleep".
Quoted 8 lines
Quoted 7 lines
Those two are pretty much orthogonal.
The current API doesn't specify what happens during the timeout. If you by "non-blocking" mean "busy-polling", that is not an API requirement. I don't see why the event device couldn't put the lcore thread to sleep during a long timeout (and I also see why you may not want that to be the default behavior).
Quoted 6 lines
I got your point. Application will prefer to return and not block after the timeout as per current API description. Current API signature is = 0 no-wait, returns immediately if there is no event.
Quoted 1 line
0 wait for the event or timeout
Will it be OK to extend it to treat max timeout
0xffffffffas block for event with PMD specific Mechanism to wait for the event ? Port specificconfiguration will not be required in this case.
Quoted 1 line
Devices supporting interrupts then can use interrupt blocking mode
internally.
Quoted 1 line
Correct me if I'm wrong here, but I think an event device is free to block using a PMD-specific mechanism with any non-zero timeout. The longer the timeout, the more sense it make to put the thread to sleep (blocking on an fd).
Quoted 6 lines
I also think that the details of how to spend the timeout time probably needs to be configured by the app (at startup). Different modes, thresholds, etc. Maybe such are best off as PMD parameters at this point.
Is there some limitation in the interrupt APIs, or what is preventing the DLB driver to both honor a finite timeout and block/put the lcore thread to sleep?
Quoted 10 lines
Current API definition does not specify or put restriction on timeout mechanism PMD decides to implement. But it will be nice to have application some control on it. DLB PMD supports polling, umwait and interrupt blocking as three modes. Current configuration is devargs based and specific to DLB PMD. If application has choice at each dequeue call, it can decide what mechanism to use. Polling for lower latencies, umwait for power saving and interrupt blocking to make a de-scheduling call and release CPU for other thread. We had implementation supporting these using most significant bits of timeout value on per dequeue call basis. But as it breaks API, now it is done with devargs. If control over dequeue wait is useful to applications, then it can be standardized instead of being PMD specific. Else, we will keep it the way it is now in the patch.
I agree it makes sense to allow the application (or the user deploying the app) control over power management / latency parameters.
It's not obvious those need (or should) be specified on a per-dequeue call basis. Wouldn't it suffice to make it a per-device or per-port (~= per-lcore) configuration?
Maybe this kind of configuration is better off starting as PMD devargs, since it will vary both with hardware/ISA and event device implementation. When we have a couple of different implementation, we can try to generalize a common API from them.
Quoted 32 lines
I took look at ethdev PMD and there additional APIs are used for blocking.
rte_eth_dev_rx_intr_enableepoll_wait()rte_eth_dev_rx_intr_disable
And other APIs to configure interrupts. But Eventdev mechanism of doing all inside dequeue API looks Simple.Quoted 24 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 5 lines
If not interrupt, it can be called blocking vs polling mode. If the port config is
fine, I will create a new patch with it.
Quoted 4 lines
Also, we should have this as a capability for eventdevs.
Quoted 2 lines
Quoted 2 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
What's being configured should just be a threshold time at which the event device would go from busy-polling to blocking the thread.
Maybe it should be called something with "blocking" or "sleeping", instead of "interrupt", since interrupts are never directly
involved.
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Agree. or make it a power save mode or so.
Quoted 3 lines
Anyway, seems like a good candidate for a generic feature to me.