> -----Original Message----- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Adrien Mazarguil > Sent: Thursday, November 17, 2016 12:23 AM > To: dev@dpdk.org > Cc: Thomas Monjalon <thomas.monja...@6wind.com>; De Lara Guarch, > Pablo <pablo.de.lara.gua...@intel.com>; Olivier Matz > <olivier.m...@6wind.com> > Subject: [dpdk-dev] [PATCH 01/22] ethdev: introduce generic flow API > > This new API supersedes all the legacy filter types described in > rte_eth_ctrl.h. > It is slightly higher level and as a result relies more on PMDs to process and > validate flow rules. > > Benefits: > > - A unified API is easier to program for, applications do not have to be > written for a specific filter type which may or may not be supported by > the underlying device. > > - The behavior of a flow rule is the same regardless of the underlying > device, applications do not need to be aware of hardware quirks. > > - Extensible by design, API/ABI breakage should rarely occur if at all. > > - Documentation is self-standing, no need to look up elsewhere. > > Existing filter types will be deprecated and removed in the near future. > > Signed-off-by: Adrien Mazarguil <adrien.mazarg...@6wind.com> > --- > MAINTAINERS | 4 + > lib/librte_ether/Makefile | 3 + > lib/librte_ether/rte_eth_ctrl.h | 1 + > lib/librte_ether/rte_ether_version.map | 10 + > lib/librte_ether/rte_flow.c | 159 +++++ > lib/librte_ether/rte_flow.h | 947 ++++++++++++++++++++++++++++ > lib/librte_ether/rte_flow_driver.h | 177 ++++++ > 7 files changed, 1301 insertions(+) > > +/** > + * RTE_FLOW_ITEM_TYPE_ETH > + * > + * Matches an Ethernet header. > + */ > +struct rte_flow_item_eth { > + struct ether_addr dst; /**< Destination MAC. */ > + struct ether_addr src; /**< Source MAC. */ > + unsigned int type; /**< EtherType. */ Hi Adrien,
ETHERTYPE in ether header is 2 bytes, so I think "uint16_t type" is more appropriate here, what do you think? Thanks, Beilei Xing > +}; > +