DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: remove old flow director API
Date: Wed, 22 Apr 2015 08:26:25 +0000	[thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F8C0A293@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1828887.OHa7Y3J5bx@xps13>



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Monday, April 20, 2015 11:00 PM
> To: Wu, Jingjing
> Cc: dev@dpdk.org
> Subject: Re: [RFC PATCH] ethdev: remove old flow director API
> 
> 2015-04-20 14:32, Wu, Jingjing:
> > From: Thomas Monjalon [mailto:thomas.monjalon@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.

rte_fdir_conf in rte_eth_conf is used when rte_eth_dev_configure to set initialization parameters which cann't be changed at running time.
For example, if we disable the flow director, we can set the mode in it to RTR_FDIR_DISABLE, then the resource will not be allocated for flow director.
The way is the same as rss_conf in rte_eth_conf. While the filter_ctrl can provide interface to configure parameters or add/delete rules at device running time.

  reply	other threads:[~2015-04-22  8:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20 14:11 Thomas Monjalon
2015-04-20 14:32 ` Wu, Jingjing
2015-04-20 14:59   ` Thomas Monjalon
2015-04-22  8:26     ` Wu, Jingjing [this message]
2015-04-20 16:33 ` Neil Horman
2015-04-20 16:45   ` Venky Venkatesan
2015-04-27 16:08     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9BB6961774997848B5B42BEC655768F8C0A293@SHSMSX104.ccr.corp.intel.com \
    --to=jingjing.wu@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).