[dpdk-dev] [RFC PATCH] ethdev: remove old flow director API
Thomas Monjalon
thomas.monjalon at 6wind.com
Mon Apr 20 16:59:59 CEST 2015
2015-04-20 14:32, Wu, Jingjing:
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> > It's time to remove this old API.
> > It seems some work is still needed to rely only on eth_ctrl API.
> > At least ixgbe, i40e and testpmd must be fixed.
> > Jingjing, do you think it's possible to remove all these structures
> > from rte_ethdev.h?
> >
> [Wu, Jingjing] Yes, I agree.
> But few comments list below.
> Beside the following change, some commands also need to be removed in testpmd. For the ixgbe, code to the old APIs are already fixed.
> > --- a/lib/librte_ether/rte_ethdev.h
> > +++ b/lib/librte_ether/rte_ethdev.h
> > @@ -672,42 +672,6 @@ struct rte_eth_pfc_conf {
> > };
> >
> > /**
> > - * Memory space that can be configured to store Flow Director filters
> > - * in the board memory.
> > - */
> > -enum rte_fdir_pballoc_type {
> > - RTE_FDIR_PBALLOC_64K = 0, /**< 64k. */
> > - RTE_FDIR_PBALLOC_128K, /**< 128k. */
> > - RTE_FDIR_PBALLOC_256K, /**< 256k. */
> > -};
This is hardware-related. Why should it be part of the API?
> > -
> > -/**
> > - * Select report mode of FDIR hash information in RX descriptors.
> > - */
> > -enum rte_fdir_status_mode {
> > - RTE_FDIR_NO_REPORT_STATUS = 0, /**< Never report FDIR hash. */
> > - RTE_FDIR_REPORT_STATUS, /**< Only report FDIR hash for matching pkts. */
> > - RTE_FDIR_REPORT_STATUS_ALWAYS, /**< Always report FDIR hash. */
> > -};
> > -
> > -/**
> > - * A structure used to configure the Flow Director (FDIR) feature
> > - * of an Ethernet port.
> > - *
> > - * If mode is RTE_FDIR_DISABLE, the pballoc value is ignored.
> > - */
> > -struct rte_fdir_conf {
> > - enum rte_fdir_mode mode; /**< Flow Director mode. */
> > - enum rte_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */
> > - enum rte_fdir_status_mode status; /**< How to report FDIR hash. */
> > - /** RX queue of packets matching a "drop" filter in perfect mode. */
> > - uint8_t drop_queue;
> > - struct rte_eth_fdir_masks mask;
> > - struct rte_eth_fdir_flex_conf flex_conf;
> > - /**< Flex payload configuration. */
> > -};
> > -
> [Wu, Jingjing] This structures and above types are useful about global configuration. They can't be removed.
Why? I thought eth_ctrl API would be enough.
It seems strange to have a part of the flow director API in rte_eth_ctrl.h and
another part in rte_ethdev.h. Other filters have no impact on rte_ethdev.h.
More information about the dev
mailing list