[dpdk-dev] [PATCH v3 02/10] ethdev: add conf arg to shared action icreate API
Andrey Vesnovaty
andreyv at nvidia.com
Tue Oct 6 12:28:03 CEST 2020
PSB
> -----Original Message-----
> From: Ori Kam <orika at nvidia.com>
> Sent: Sunday, October 4, 2020 2:11 PM
> To: Andrey Vesnovaty <andreyv at nvidia.com>; dev at dpdk.org
> Cc: jer at marvell.com; jerinjacobk at gmail.com; NBU-Contact-Thomas Monjalon
> <thomas at monjalon.net>; ferruh.yigit at intel.com;
> stephen at networkplumber.org; bruce.richardson at intel.com; Slava Ovsiienko
> <viacheslavo at nvidia.com>; andrey.vesnovaty at gmail.com; mdr at ashroe.eu;
> nhorman at tuxdriver.com; ajit.khaparde at broadcom.com;
> samik.gupta at broadcom.com; Ori Kam <orika at mellanox.com>; Andrew
> Rybchenko <arybchenko at solarflare.com>
> Subject: RE: [PATCH v3 02/10] ethdev: add conf arg to shared action icreate API
>
> Hi Andrey
>
> Why is this patch not part of the previous one?
Got it. Will be squashed.
>
> Best,
> Ori
> > -----Original Message-----
> > From: Andrey Vesnovaty <andreyv at nvidia.com>
> > Sent: Sunday, October 4, 2020 1:06 AM
> > To: dev at dpdk.org
> > Cc: jer at marvell.com; jerinjacobk at gmail.com; NBU-Contact-Thomas
> Monjalon
> > <thomas at monjalon.net>; ferruh.yigit at intel.com;
> > stephen at networkplumber.org; bruce.richardson at intel.com; Ori Kam
> > <orika at nvidia.com>; Slava Ovsiienko <viacheslavo at nvidia.com>;
> > andrey.vesnovaty at gmail.com; mdr at ashroe.eu; nhorman at tuxdriver.com;
> > ajit.khaparde at broadcom.com; samik.gupta at broadcom.com; Ori Kam
> > <orika at mellanox.com>; Andrew Rybchenko <arybchenko at solarflare.com>
> > Subject: [PATCH v3 02/10] ethdev: add conf arg to shared action icreate API
> >
> > Add configuration argument to shared action create interface.
> > Currently there is only ingress & egress fields but more fields can be
> > added later. Shared action configuration & implementation are PMD
> > specific.
> >
> > Signed-off-by: Andrey Vesnovaty <andreyv at nvidia.com>
> > ---
> > lib/librte_ethdev/rte_flow.c | 4 +++-
> > lib/librte_ethdev/rte_flow.h | 17 +++++++++++++++--
> > lib/librte_ethdev/rte_flow_driver.h | 5 +++--
> > 3 files changed, 21 insertions(+), 5 deletions(-)
> >
> > diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
> > index ba3f01f7c7..9afa8905df 100644
> > --- a/lib/librte_ethdev/rte_flow.c
> > +++ b/lib/librte_ethdev/rte_flow.c
> > @@ -1255,6 +1255,7 @@ rte_flow_get_aged_flows(uint16_t port_id, void
> > **contexts,
> >
> > struct rte_flow_shared_action *
> > rte_flow_shared_action_create(uint16_t port_id,
> > + const struct rte_flow_shared_action_conf *conf,
> > const struct rte_flow_action *action,
> > struct rte_flow_error *error)
> > {
> > @@ -1265,7 +1266,8 @@ rte_flow_shared_action_create(uint16_t port_id,
> > if (unlikely(!ops))
> > return NULL;
> > if (likely(!!ops->shared_action_create)) {
> > - shared_action = ops->shared_action_create(dev, action, error);
> > + shared_action = ops->shared_action_create(dev, conf, action,
> > + error);
> > if (shared_action == NULL)
> > flow_err(port_id, -rte_errno, error);
> > return shared_action;
> > diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
> > index 02391316cb..8a2db4f6da 100644
> > --- a/lib/librte_ethdev/rte_flow.h
> > +++ b/lib/librte_ethdev/rte_flow.h
> > @@ -3380,6 +3380,16 @@ int
> > rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
> > uint32_t nb_contexts, struct rte_flow_error *error);
> >
> > +/**
> > + * Specify shared action configuration
> > + */
> > +struct rte_flow_shared_action_conf {
> > + uint32_t ingress:1;
> > + /**< Action valid for rules applied to ingress traffic. */
> > + uint32_t egress:1;
> > + /**< Action valid for rules applied to egress traffic. */
> > +};
> > +
> > /**
> > * @warning
> > * @b EXPERIMENTAL: this API may change without prior notice.
> > @@ -3388,6 +3398,8 @@ rte_flow_get_aged_flows(uint16_t port_id, void
> > **contexts,
> > *
> > * @param[in] port_id
> > * The port identifier of the Ethernet device.
> > + * @param[in] conf
> > + * Shared action configuration.
> > * @param[in] action
> > * Action configuration for shared action creation.
> > * @param[out] error
> > @@ -3404,6 +3416,7 @@ rte_flow_get_aged_flows(uint16_t port_id, void
> > **contexts,
> > __rte_experimental
> > struct rte_flow_shared_action *
> > rte_flow_shared_action_create(uint16_t port_id,
> > + const struct rte_flow_shared_action_conf *conf,
> > const struct rte_flow_action *action,
> > struct rte_flow_error *error);
> >
> > @@ -3432,8 +3445,8 @@ rte_flow_shared_action_create(uint16_t port_id,
> > __rte_experimental
> > int
> > rte_flow_shared_action_destroy(uint16_t port_id,
> > - struct rte_flow_shared_action *action,
> > - struct rte_flow_error *error);
> > + struct rte_flow_shared_action *action,
> > + struct rte_flow_error *error);
> >
> > /**
> > * @warning
> > diff --git a/lib/librte_ethdev/rte_flow_driver.h
> > b/lib/librte_ethdev/rte_flow_driver.h
> > index 72bfc3b7a7..adaace47ea 100644
> > --- a/lib/librte_ethdev/rte_flow_driver.h
> > +++ b/lib/librte_ethdev/rte_flow_driver.h
> > @@ -111,8 +111,9 @@ struct rte_flow_ops {
> > /** See rte_flow_shared_action_create() */
> > struct rte_flow_shared_action *(*shared_action_create)
> > (struct rte_eth_dev *dev,
> > - const struct rte_flow_action *action,
> > - struct rte_flow_error *error);
> > + const struct rte_flow_shared_action_conf *conf,
> > + const struct rte_flow_action *action,
> > + struct rte_flow_error *error);
> > /** See rte_flow_shared_action_destroy() */
> > int (*shared_action_destroy)
> > (struct rte_eth_dev *dev,
> > --
> > 2.26.2
More information about the dev
mailing list