DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: "Zhao1, Wei" <wei.zhao1@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Zhao1, Wei" <wei.zhao1@intel.com>
Subject: Re: [dpdk-dev] [PATCH v6] net/i40e: queue region set and flush
Date: Fri, 29 Sep 2017 09:00:52 +0000	[thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F810E839BB@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1506672718-39160-3-git-send-email-wei.zhao1@intel.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao
> Sent: Friday, September 29, 2017 4:12 PM
> To: dev@dpdk.org
> Cc: Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [dpdk-dev] [PATCH v6] net/i40e: queue region set and flush
> 
> This feature enable queue regions configuration for RSS in PF, so that different
> traffic classes or different packet classification types can be separated to
> different queues in different queue regions.This patch can set queue region
> range, it include queue number in a region and the index of first queue.
> This patch enable mapping between different priorities (UP) and different
> traffic classes.It also enable mapping between a region index and a sepcific
> flowtype(PCTYPE).It also provide the solution of flush all configuration about
> queue region the above described.
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev.c            |  27 +-
>  drivers/net/i40e/i40e_ethdev.h            |  39 +++
>  drivers/net/i40e/rte_pmd_i40e.c           | 520
> ++++++++++++++++++++++++++++++
>  drivers/net/i40e/rte_pmd_i40e.h           |  60 ++++
>  drivers/net/i40e/rte_pmd_i40e_version.map |   1 +
>  5 files changed, 641 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 720f067..9a67b6d 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -137,10 +137,6 @@
>  #define I40E_PRTTSYN_TSYNTYPE    0x0e000000
>  #define I40E_CYCLECOUNTER_MASK   0xffffffffffffffffULL
> 
> -#define I40E_MAX_PERCENT            100
> -#define I40E_DEFAULT_DCB_APP_NUM    1
> -#define I40E_DEFAULT_DCB_APP_PRIO   3
> -
>  /**
>   * Below are values for writing un-exposed registers suggested
>   * by silicon experts
> @@ -309,7 +305,6 @@ static int i40e_pf_parameter_init(struct rte_eth_dev
> *dev);  static int i40e_pf_setup(struct i40e_pf *pf);  static int
> i40e_dev_rxtx_init(struct i40e_pf *pf);  static int i40e_vmdq_setup(struct
> rte_eth_dev *dev); -static int i40e_dcb_init_configure(struct rte_eth_dev *dev,
> bool sw_dcb);  static int i40e_dcb_setup(struct rte_eth_dev *dev);  static void
> i40e_stat_update_32(struct i40e_hw *hw, uint32_t reg,
>  		bool offset_loaded, uint64_t *offset, uint64_t *stat); @@ -
> 1036,6 +1031,20 @@ i40e_init_fdir_filter_list(struct rte_eth_dev *dev)
>  	return ret;
>  }
> 
> +void
> +i40e_init_queue_region_conf(struct rte_eth_dev *dev) {
> +	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data-
> >dev_private);
> +	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data-
> >dev_private);
> +	struct i40e_queue_region_info *info = &pf->queue_region;
> +	uint16_t i;
> +
> +	for (i = 0; i < I40E_PFQF_HREGION_MAX_INDEX; i++)
> +		i40e_write_rx_ctl(hw, I40E_PFQF_HREGION(i), 0);
> +
> +	memset(info, 0, sizeof(struct i40e_queue_region_info)); }
> +
>  static int
>  eth_i40e_dev_init(struct rte_eth_dev *dev)  { @@ -1311,6 +1320,9 @@
> eth_i40e_dev_init(struct rte_eth_dev *dev)
>  	if (ret < 0)
>  		goto err_init_fdir_filter_list;
> 
> +		/* initialize queue region configuration */
Indent too much.

[......]
> +i40e_queue_region_dcb_configure(struct i40e_hw *hw,
> +				struct i40e_pf *pf)
> +{
> +	struct i40e_dcbx_config dcb_cfg_local;
> +	struct i40e_dcbx_config *dcb_cfg;
> +	struct i40e_queue_region_info *info = &pf->queue_region;
> +	struct i40e_dcbx_config *old_cfg = &hw->local_dcbx_config;
> +	int32_t ret = -EINVAL;
> +	uint16_t i, j, prio_index, region_index;
> +	uint8_t tc_map, tc_bw, bw_lf;
> +
> +	if (!info->queue_region_number) {
> +		PMD_DRV_LOG(ERR, "there is no that region id been set
> before");

How about "No queue region has been set"?
[......]
> +/**
> + *  Option types of queue region.
> + */
> +enum rte_pmd_i40e_queue_region_op {
> +	RTE_PMD_I40E_REGION_UNDEFINED,
> +	RTE_PMD_I40E_QUEUE_REGION_SET,      /**< add queue region set */
> +	RTE_PMD_I40E_REGION_FLOWTYPE_SET,   /**< add pf region pctype
> set */
> +	/*** add queue region user priority set */
"***" -> "**"
> +	RTE_PMD_I40E_USER_PRIORITY_REGION_SET,
> +	/**
> +	 * ALL configuration about queue region from up layer
> +	 * at first will only keep in DPDK softwarestored in driver,
> +	 * only after " FLUSH_ON ", it commit all configuration to HW.
> +	 * Because PMD had to set hardware configuration at a time, so
> +	 * it will record all up layer command at first.
> +	 */
> +	RTE_PMD_I40E_RSS_QUEUE_REGION_ALL_FLUSH_ON,
> +	/**
> +	 * "FLUSH_OFF " is just clean all configuration about queue
> +	 * region just now, and restore all to DPDK i40e driver default
> +	 * config when start up.
> +	 */
> +	RTE_PMD_I40E_RSS_QUEUE_REGION_ALL_FLUSH_OFF,
> +	RTE_PMD_I40E_RSS_QUEUE_REGION_INFO_GET,
> +	RTE_PMD_I40E_QUEUE_REGION_OP_MAX
> +};
> +
>  #define RTE_PMD_I40E_DDP_NAME_SIZE 32
> 
>  /**
> @@ -146,6 +173,27 @@ struct rte_pmd_i40e_ptype_mapping {  };
> 
>  /**
> + * Queue region related information.
> + */
> +struct rte_i40e_rss_region_conf {
> +	/**< the region id for this configuration */
> +	uint8_t region_id;
> +	/**< the pctype or hardware flowtype of packet,
> +	 * the specific index for each type has been defined
> +	 * in file i40e_type.h as enum i40e_filter_pctype.
> +	 */

Please change "/**<" to "/**", and please check all comments!!!

> +	uint8_t hw_flowtype;
> +	/**< the start queue index for this region */
> +	uint8_t queue_start_index;
> +	/**< the total queue number of this queue region */
> +	uint8_t queue_num;
> +	/**< the packet's user priority for this region */
> +	uint8_t user_priority;
> +	 /**< Option types of queue region */
> +	enum rte_pmd_i40e_queue_region_op op;
> +};
> +
Thanks
Jingjing

  reply	other threads:[~2017-09-29  9:00 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24  3:26 [dpdk-dev] [PATCH 0/2] net/i40e: API to configure queue regions for RSS Wei Zhao
2017-08-24  3:26 ` [dpdk-dev] [PATCH 1/2] net/i40e: queue region set and flush Wei Zhao
2017-08-31 16:18   ` Ferruh Yigit
2017-09-01  2:38     ` Zhao1, Wei
2017-09-06  9:11       ` Ferruh Yigit
2017-09-15 11:00         ` Ferruh Yigit
2017-09-20  3:20           ` Zhao1, Wei
2017-09-20 10:32             ` Ferruh Yigit
2017-09-18  3:38         ` Zhao1, Wei
2017-09-05 23:52   ` Chilikin, Andrey
2017-09-06  7:21     ` Zhao1, Wei
2017-08-24  3:26 ` [dpdk-dev] [PATCH 2/2] app/testpmd: add API for configuration of queue region Wei Zhao
2017-09-13  6:04 ` [dpdk-dev] [PATCH v2 0/2] net/i40e: API to configure queue regions for RSS Wei Zhao
2017-09-13  6:04   ` [dpdk-dev] [PATCH v2 1/2] net/i40e: queue region set and flush Wei Zhao
2017-09-13  6:04   ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: add API for configuration of queue region Wei Zhao
2017-09-15  3:13   ` [dpdk-dev] [PATCH v3 0/2] net/i40e: API to configure queue regions for RSS Wei Zhao
2017-09-15  3:13     ` [dpdk-dev] [PATCH v3 1/2] net/i40e: queue region set and flush Wei Zhao
2017-09-20 10:36       ` Ferruh Yigit
2017-09-21  6:48         ` Zhao1, Wei
2017-09-21  7:10           ` Ferruh Yigit
2017-09-21  7:26             ` Zhao1, Wei
2017-09-21 15:45               ` Ferruh Yigit
2017-09-25  7:40         ` Zhao1, Wei
2017-09-25  9:31           ` Ferruh Yigit
2017-09-26  7:46             ` Zhao1, Wei
2017-09-26  8:54         ` Zhao1, Wei
2017-09-27 19:13           ` Ferruh Yigit
2017-09-28  2:40             ` Zhao1, Wei
2017-09-21 19:53       ` Chilikin, Andrey
2017-09-22  8:49         ` Zhao1, Wei
2017-09-22 20:13           ` Chilikin, Andrey
2017-09-25  2:55             ` Zhao1, Wei
2017-09-24 16:01       ` Wu, Jingjing
2017-09-25  3:26         ` Zhao1, Wei
2017-09-25  5:55         ` Zhao1, Wei
2017-09-15  3:13     ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: add API for configuration of queue region Wei Zhao
2017-09-20 10:45       ` Ferruh Yigit
2017-09-25  9:25         ` Zhao1, Wei
2017-09-25  9:43           ` Ferruh Yigit
2017-09-26  5:30             ` Zhao1, Wei
2017-09-28  9:04     ` [dpdk-dev] [PATCH v4 0/3] net/i40e: API to configure queue regions for RSS Wei Zhao
2017-09-28  9:04       ` [dpdk-dev] [PATCH v4 1/3] net/i40e: queue region set and flush Wei Zhao
2017-09-28  9:04       ` [dpdk-dev] [PATCH v4 2/3] app/testpmd: add API for configuration of queue region Wei Zhao
2017-09-28  9:04       ` [dpdk-dev] [PATCH v4 3/3] doc/testpmd_app_ug: add doc info for " Wei Zhao
2017-09-28  9:10     ` [dpdk-dev] [PATCH v4 0/3] net/i40e: API to configure queue regions for RSS Wei Zhao
2017-09-28  9:10       ` [dpdk-dev] [PATCH v4 1/3] net/i40e: queue region set and flush Wei Zhao
2017-09-28  9:10       ` [dpdk-dev] [PATCH v4 2/3] app/testpmd: add API for configuration of queue region Wei Zhao
2017-09-28  9:10       ` [dpdk-dev] [PATCH v4 3/3] doc/testpmd_app_ug: add doc info for " Wei Zhao
2017-09-29  2:56       ` [dpdk-dev] [PATCH v5 0/3] net/i40e: API to configure queue regions for RSS Wei Zhao
2017-09-29  2:56         ` [dpdk-dev] [PATCH v5 1/3] net/i40e: queue region set and flush Wei Zhao
2017-09-29  4:54           ` Wu, Jingjing
2017-09-29  8:27             ` Zhao1, Wei
2017-09-29  2:56         ` [dpdk-dev] [PATCH v5 2/3] app/testpmd: add API for configuration of queue region Wei Zhao
2017-09-29  5:04           ` Wu, Jingjing
2017-09-29  5:21             ` Zhao1, Wei
2017-09-29  2:56         ` [dpdk-dev] [PATCH v5 3/3] doc/testpmd_app_ug: add doc info for " Wei Zhao
2017-09-29  8:11         ` [dpdk-dev] [PATCH v6] net/i40e: API to configure queue regions for RSS Wei Zhao
2017-09-29  8:11           ` [dpdk-dev] [PATCH v6] app/testpmd: add API for configuration of queue region Wei Zhao
2017-09-29  8:11           ` [dpdk-dev] [PATCH v6] net/i40e: queue region set and flush Wei Zhao
2017-09-29  9:00             ` Wu, Jingjing [this message]
2017-09-29  9:16           ` [dpdk-dev] [PATCH v7 0/2] net/i40e: API to configure queue regions for RSS Wei Zhao
2017-09-29  9:16             ` [dpdk-dev] [PATCH v7 1/2] net/i40e: queue region set and flush Wei Zhao
2017-09-29 12:22               ` Wu, Jingjing
2017-10-10  1:45                 ` Zhao1, Wei
2017-10-03 17:54               ` Ferruh Yigit
2017-10-10  6:11                 ` Zhao1, Wei
2017-09-29  9:16             ` [dpdk-dev] [PATCH v7 2/2] app/testpmd: add API for configuration of queue region Wei Zhao
2017-09-29 14:29               ` Wu, Jingjing
2017-10-03 18:04               ` Ferruh Yigit
2017-10-10  1:46                 ` Zhao1, Wei
2017-10-10  2:55                 ` Zhao1, Wei
2017-10-10  3:01                 ` Zhao1, Wei
2017-10-11  2:15                   ` Ferruh Yigit
2017-09-29 10:15             ` [dpdk-dev] [PATCH v7 0/2] net/i40e: API to configure queue regions for RSS Peng, Yuan
2017-10-11  8:49             ` [dpdk-dev] [PATCH v8 " Wei Zhao
2017-10-11  8:49               ` [dpdk-dev] [PATCH v8 1/2] net/i40e: queue region set and flush Wei Zhao
2017-10-11  8:49               ` [dpdk-dev] [PATCH v8 2/2] app/testpmd: add API for configuration of queue region Wei Zhao
2017-10-11  8:55             ` [dpdk-dev] [PATCH v8 0/2] net/i40e: API to configure queue regions for RSS Wei Zhao
2017-10-11  8:55               ` [dpdk-dev] [PATCH v8 1/2] net/i40e: queue region set and flush Wei Zhao
2017-10-13 10:06                 ` Chilikin, Andrey
2017-10-18  3:00                   ` Zhao1, Wei
2017-10-18 13:00                     ` Chilikin, Andrey
2017-10-19  2:18                       ` Zhao1, Wei
2017-10-11  8:55               ` [dpdk-dev] [PATCH v8 2/2] app/testpmd: add API for configuration of queue region Wei Zhao
2017-10-11 11:29               ` [dpdk-dev] [PATCH v8 0/2] net/i40e: API to configure queue regions for RSS Peng, Yuan
2017-10-11 21:06               ` Ferruh Yigit
2017-10-13  1:52                 ` Zhao1, Wei

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=9BB6961774997848B5B42BEC655768F810E839BB@SHSMSX103.ccr.corp.intel.com \
    --to=jingjing.wu@intel.com \
    --cc=dev@dpdk.org \
    --cc=wei.zhao1@intel.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).