Hi Andrew and Ivan, > -----Original Message----- > From: Andrew Rybchenko <andrew.rybche...@oktetlabs.ru> > Sent: Friday, October 1, 2021 4:47 PM > Subject: [PATCH v1 01/12] ethdev: add ethdev item to flow API > > From: Ivan Malov <ivan.ma...@oktetlabs.ru> > > For use with "transfer" flows. Supposed to match traffic transmitted by the > DPDK application via the specified ethdev, at e-switch level. > > Must not be combined with attributes "ingress" / "egress". > > Signed-off-by: Ivan Malov <ivan.ma...@oktetlabs.ru> > Signed-off-by: Andrew Rybchenko <andrew.rybche...@oktetlabs.ru> > ---
[Snip] > /** Generate flow_action[] entry. */ > diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index > 7b1ed7f110..880502098e 100644 > --- a/lib/ethdev/rte_flow.h > +++ b/lib/ethdev/rte_flow.h > @@ -574,6 +574,15 @@ enum rte_flow_item_type { > * @see struct rte_flow_item_conntrack. > */ > RTE_FLOW_ITEM_TYPE_CONNTRACK, > + > + /** > + * [META] > + * > + * Matches traffic at e-switch going from (sent by) the given ethdev. > + * > + * @see struct rte_flow_item_ethdev > + */ > + RTE_FLOW_ITEM_TYPE_ETHDEV, > }; > > /** > @@ -1799,6 +1808,24 @@ static const struct rte_flow_item_conntrack > rte_flow_item_conntrack_mask = { }; #endif > > +/** > + * @warning > + * @b EXPERIMENTAL: this structure may change without prior notice > + * > + * Provides an ethdev ID for use with items which are as follows: > + * RTE_FLOW_ITEM_TYPE_ETHDEV. > + */ > +struct rte_flow_item_ethdev { > + uint16_t id; /**< Ethdev ID */ True for all above uses, should this be renamed to port? > +}; > + > +/** Default mask for RTE_FLOW_ITEM_TYPE_ETHDEV */ #ifndef > __cplusplus > +static const struct rte_flow_item_ethdev rte_flow_item_ethdev_mask = { > + .id = 0xffff, > +}; > +#endif > + > /** > * Matching pattern item definition. > * > -- > 2.30.2