Re: [dpdk-dev] [PATCH 32/39] eventdev: add routine to launch eventmode workers
flat view
From: Carrillo, Erik G <hidden>
Date: 2019-06-10 14:32:04
Hi Anoob, I've listed a few notes in-line.
-----Original Message----- From: Anoob Joseph <redacted> Sent: Monday, June 3, 2019 12:33 PM To: Jerin Jacob <redacted>; Rao, Nikhil <redacted>; Carrillo, Erik G [off-list ref]; Gujjar, Abhinandan S [off-list ref]; Richardson, Bruce [off-list ref]; De Lara Guarch, Pablo [off-list ref] Cc: Anoob Joseph <redacted>; Narayana Prasad [off-list ref]; dev@dpdk.org; Lukasz Bartosik [off-list ref]; Pavan Nikhilesh [off-list ref]; Hemant Agrawal [off-list ref]; Nipun Gupta [off-list ref]; Van Haaren, Harry [off-list ref]; Mattias Rönnblom [off-list ref]; Ma, Liang J [off-list ref] Subject: [PATCH 32/39] eventdev: add routine to launch eventmode workers With eventmode, workers could be drafted differently according to the capabilities of the underlying event device. The added function would receive an array of such workers and probes the eventmode properties to choose the worker. Signed-off-by: Anoob Joseph <redacted> Signed-off-by: Lukasz Bartosik <redacted> ---
<...snipped...>
quoted hunk ↗ jump to hunk
+ +/* Event mode packet tx types */ +enum rte_eventmode_helper_tx_types { + RTE_EVETNMODE_HELPER_TX_TYPE_INVALID = 0,
A couple of characters are transposed in the above.
quoted hunk ↗ jump to hunk
+ RTE_EVENTMODE_HELPER_TX_TYPE_MAX = 16 +}; + struct rte_eventmode_helper_conf { enum rte_eventmode_helper_pkt_transfer_mode mode; /**< Packet transfer mode of the application */ @@ -41,6 +55,20 @@ struct rte_eventmode_helper_event_link_info { /**< Lcore to be polling on this port */ };
I believe anonymous unions and structures should be annotated with RTE_STD_C11 below and in other places throughout the series.
quoted hunk ↗ jump to hunk
+/* Workers registered by the application */ struct +rte_eventmode_helper_app_worker_params { + union { + struct { + uint64_t burst : 4; + /**< Specify status of rx type burst */ + }; + uint64_t u64; + } cap; + /**< Capabilities of this worker */ + void (*worker_thread)(void *mode_conf); + /**< Worker thread */ +}; + /* Common helper functions for command line parsing */ /**@@ -157,6 +185,27 @@ uint8_t __rte_experimentalrte_eventmode_helper_get_tx_queue(struct rte_eventmode_helper_conf *mode_conf, uint8_t eventdev_id);
The doxygen documentation for __rte_experimental functions in general should have: * @warning * @b EXPERIMENTAL: this API may change without prior notice as well.
+/** + * Launch eventmode worker + * + * The application can request the eventmode helper subsystem to launch +the + * worker based on the capabilities of event device and the options +selected + * while initializing the eventmode. + * + * @param mode_conf + * Configuration of the mode in which app is doing packet handling + * @param app_wrkr + * List of all the workers registered by application, along with it's + * capabilities + * @param nb_wrkr_param + * Number of workers passed by the application + * + */ +void __rte_experimental +rte_eventmode_helper_launch_worker(struct rte_eventmode_helper_conf *mode_conf, + struct rte_eventmode_helper_app_worker_params *app_wrkr, + uint8_t nb_wrkr_param); + #ifdef __cplusplus } #endif
<...snipped...> Regards, Erik