Thread (25 messages) 25 messages, 6 authors, 2020-07-02

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

From: Andrey Vesnovaty <hidden>
Date: 2020-07-02 08:06:20

On Thu, Jul 2, 2020 at 10:20 AM Ori Kam [off-list ref] wrote:
Hi Stephen,
quoted
-----Original Message-----
From: Stephen Hemminger <stephen@networkplumber.org>
Sent: Thursday, July 2, 2020 3:24 AM
To: Andrey Vesnovaty <redacted>
Cc: Thomas Monjalon <redacted>; Ferruh Yigit
[off-list ref]; Andrew Rybchenko [off-list ref];
Ori Kam [off-list ref]; dev@dpdk.org; Andrey Vesnovaty
[off-list ref]
Subject: Re: [dpdk-dev] [RFC v2 1/1] add flow shared action API

On Sat, 20 Jun 2020 16:32:57 +0300
Andrey Vesnovaty [off-list ref] wrote:
quoted
+
+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'll add `struct rte_flow_shared_action` to upcoming patches. Thanks.
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help