DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Chen, Junjie J" <junjie.j.chen@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Chen, Junjie J" <junjie.j.chen@intel.com>,
	 "Chen@dpdk.org" <Chen@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/i40e: update tx_free_threshold to improve	zero copy performance
Date: Thu, 12 Apr 2018 11:51:36 +0000	[thread overview]
Message-ID: <2601191342CEEE43887BDE71AB977258AE9143FC@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <20180412053226.295226-1-junjie.j.chen@intel.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Junjie Chen
> Sent: Thursday, April 12, 2018 6:32 AM
> To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Chen, Junjie J <junjie.j.chen@intel.com>; Chen@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/i40e: update tx_free_threshold to improve zero copy performance
> 
> From: "Chen, Junjie" <junjie.j.chen@intel.com>
> 
> When vhost backend works in dequeue zero copy mode, nic locks virtio's
> buffer until there is less or equal than tx_free_threshold buffer remain
> and then free number of tx burst buffer. This causes packets drop in
> virtio side and impacts zero copy performance. So we need to increase
> the tx_free_threshold to let nic free virtio's buffer as soon as possible.
> Also we keep the upper limit to tx max burst size to ensure least
> performance impact on non zero copy.

Ok but why vhost app can't just use tx_queue_setup() to specify desired value for
tx_free_thresh?
Why instead we have to modify PMD to satisfy needs of one app?
Konstantin

> 
> Signed-off-by: Chen, Junjie <junjie.j.chen@intel.com>
> ---
>  drivers/net/i40e/i40e_rxtx.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
> index 56a854cec..d9569bdc9 100644
> --- a/drivers/net/i40e/i40e_rxtx.c
> +++ b/drivers/net/i40e/i40e_rxtx.c
> @@ -2039,6 +2039,8 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
>  		tx_conf->tx_rs_thresh : DEFAULT_TX_RS_THRESH);
>  	tx_free_thresh = (uint16_t)((tx_conf->tx_free_thresh) ?
>  		tx_conf->tx_free_thresh : DEFAULT_TX_FREE_THRESH);
> +	if (tx_free_thresh < nb_desc - I40E_TX_MAX_BURST)
> +		tx_free_thresh = nb_desc - I40E_TX_MAX_BURST;
>  	if (tx_rs_thresh >= (nb_desc - 2)) {
>  		PMD_INIT_LOG(ERR, "tx_rs_thresh must be less than the "
>  			     "number of TX descriptors minus 2. "
> --
> 2.16.0

  reply	other threads:[~2018-04-12 11:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12  5:32 Junjie Chen
2018-04-12 11:51 ` Ananyev, Konstantin [this message]
2018-04-12 12:20   ` Zhang, Qi Z
2018-04-12 13:12     ` Bruce Richardson
2018-04-12 13:56       ` Ananyev, Konstantin

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=2601191342CEEE43887BDE71AB977258AE9143FC@IRSMSX102.ger.corp.intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=Chen@dpdk.org \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=junjie.j.chen@intel.com \
    --cc=qi.z.zhang@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).