On Thu, Sep 21, 2023 at 11:29 AM Naga Harish K, S V <[email protected]> wrote: > > > > > -----Original Message----- > > From: Jerin Jacob <[email protected]> > > Sent: Wednesday, September 20, 2023 3:02 PM > > To: Naga Harish K, S V <[email protected]> > > Cc: mattias.ronnblom <[email protected]>; [email protected]; > > Jerin Jacob <[email protected]>; [email protected]; Van Haaren, Harry > > <[email protected]>; [email protected]; Nilsson, Peter > > <[email protected]>; Heng Wang <[email protected]>; > > Pavan Nikhilesh <[email protected]>; Gujjar, Abhinandan S > > <[email protected]>; Carrillo, Erik G <[email protected]>; > > Shijith Thotton <[email protected]>; Hemant Agrawal > > <[email protected]>; Sachin Saxena <[email protected]>; > > Liang Ma <[email protected]>; Mccarthy, Peter > > <[email protected]>; Yan, Zhirun <[email protected]> > > Subject: Re: [PATCH v3 1/3] lib: introduce dispatcher library > > > > On Mon, Sep 18, 2023 at 5:26 AM Naga Harish K, S V > > <[email protected]> wrote: > > > > > > > > > > > > > -----Original Message----- > > > > From: Mattias Rönnblom <[email protected]> > > > > Sent: Monday, September 4, 2023 6:33 PM > > > > To: [email protected] > > > > Cc: Jerin Jacob <[email protected]>; [email protected]; Van > > > > Haaren, Harry <[email protected]>; [email protected]; > > > > Nilsson, Peter <[email protected]>; Heng Wang > > > > <[email protected]>; Naga Harish K, S V > > > > <[email protected]>; Pavan Nikhilesh > > > > <[email protected]>; Gujjar, Abhinandan S > > > > <[email protected]>; Carrillo, Erik G > > > > <[email protected]>; Shijith Thotton <[email protected]>; > > > > Hemant Agrawal <[email protected]>; Sachin Saxena > > > > <[email protected]>; Liang Ma <[email protected]>; > > > > Mccarthy, Peter <[email protected]>; Yan, Zhirun > > > > <[email protected]>; mattias.ronnblom > > > > <[email protected]> > > > > Subject: [PATCH v3 1/3] lib: introduce dispatcher library > > > > > > > > The purpose of the dispatcher library is to help reduce coupling in > > > > an Eventdev-based DPDK application. > > > > > > > > In addition, the dispatcher also provides a convenient and flexible > > > > way for the application to use service cores for application-level > > > > processing. > > > > > > > > Signed-off-by: Mattias Rönnblom <[email protected]> > > > > Tested-by: Peter Nilsson <[email protected]> > > > > Reviewed-by: Heng Wang <[email protected]> > > > > > > > > -- > > > > > > > > PATCH v3: > > > > o To underline its optional character and since it does not provide > > > > hardware abstraction, the event dispatcher is now a separate > > > > library. > > > > o Change name from rte_event_dispatcher -> rte_dispatcher, to make it > > > > shorter and to avoid the rte_event_* namespace. > > > > > > > > > > Rte_dispatcher is basically dispatching events but it feels like the name > > > does > > not convey that. > > > Also, it is like any other adapter service that can reside within the > > > eventdev > > directory. > > > > > > I can see some discussion in previous threads related to the placement of > > > the > > dispatcher library. > > > > > > It is an optional eventdev application service, not enforcing this > > programming model to the application. > > > The documentation may need to be updated and mention that this is > > optional. > > > > > > If any hardware comes up with the dispatcher feature, then this library > > > may > > need to be moved inside eventdev library later. > > > > I would like to follow YAGNI principle in eventdev library. > > What is YAGNI principle? for understanding purposes.
https://www.techtarget.com/whatis/definition/You-arent-gonna-need-it#:~:text=YAGNI%20principle%20(%22You%20Aren',desired%20increased%20frequency%20of%20releases. What meant by that, If it meant to be abstracting any HW Device feature(on the point of above: If any hardware comes up with the dispatcher feature, then this library may need to be moved inside eventdev library later) lest define API based on a Device definition and its capability. If it is targeting for an SW library align API based on that. For example, If this needed to be implemented in HW as device feature, I would implement as following - CAM as ACL or EM to store the rules - Key extractor to extract the interested filed(match actions). Similar to rte_flow flow patterns - Action will something similar to rte_flow mark action (https://doc.dpdk.org/guides/prog_guide/rte_flow.html#action-mark). - When packet/event delivered to application. HW stores the mark value in the metadata up on match. For such HW, if we try to abstract with current API proposal, it is not efficient. On the other way, if the use case, addressing the existing SW API library and model around the above HW primitives also not efficient.

