[dpdk-dev] [RFC v2 1/1] add flow shared action API

Ori Kam orika at mellanox.com
Thu Jul 2 09:20:27 CEST 2020


Hi Stephen,

> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Thursday, July 2, 2020 3:24 AM
> To: Andrey Vesnovaty <andrey.vesnovaty at gmail.com>
> Cc: Thomas Monjalon <thomas at monjalon.net>; Ferruh Yigit
> <ferruh.yigit at intel.com>; Andrew Rybchenko <arybchenko at solarflare.com>;
> Ori Kam <orika at mellanox.com>; dev at dpdk.org; Andrey Vesnovaty
> <andreyv at mellanox.com>
> Subject: Re: [dpdk-dev] [RFC v2 1/1] add flow shared action API
> 
> On Sat, 20 Jun 2020 16:32:57 +0300
> Andrey Vesnovaty <andrey.vesnovaty at gmail.com> 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



More information about the dev mailing list