Hi Stephen, > -----Original Message----- > From: Stephen Hemminger <[email protected]> > Sent: Thursday, July 2, 2020 3:24 AM > To: Andrey Vesnovaty <[email protected]> > Cc: Thomas Monjalon <[email protected]>; Ferruh Yigit > <[email protected]>; Andrew Rybchenko <[email protected]>; > Ori Kam <[email protected]>; [email protected]; Andrey Vesnovaty > <[email protected]> > Subject: Re: [dpdk-dev] [RFC v2 1/1] add flow shared action API > > On Sat, 20 Jun 2020 16:32:57 +0300 > Andrey Vesnovaty <[email protected]> wrote: > > > + > > +void * > > +rte_flow_shared_action_create(uint16_t port_id, > > + const struct rte_flow_action *action, > > + struct rte_flow_error *error) > > +{ > > NAK > > API's that return void * (opaque pointer) are dangerous and should > not be added to DPDK. > > To do data hiding. Define a structure but don't expose the internals > of what that structure are.
I agree with you it is better not to use void * So I suggest to use new struct rte_action_ctx or something like this. That will be implemented differently for each driver just like rte_flow. What do you think? Best, Ori

