patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Wei Zhao <wei.zhao1@intel.com>, dev@dpdk.org
Cc: stable@dpdk.org, ferruh.yigit@intel.com
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] app/testpmd: fix offloads default set error
Date: Mon, 10 Jun 2019 11:09:32 +0100	[thread overview]
Message-ID: <b398ca2b-ebb5-eac3-cb6f-5240507eadcd@redhat.com> (raw)
In-Reply-To: <1560149110-58407-1-git-send-email-wei.zhao1@intel.com>

On 10/06/2019 07:45, Wei Zhao wrote:
> There is no need to use default offloads configuration
> if offloads configuration has been pass down from uplayer.
> 

It doesn't seem like the right fix to me. It means if a user
enable/disable one offload in the command line they are silently
changing from the default behaviour of other offloads? I could
understand if the user set all offloads in one go through a mask but not
when they are set seemingly independent.

It looks like you need to track which ones have been enabled/disabled by
the user, and use the default for for the other offloads.

> Fixes: 5e91aeef218c ("app/testpmd: fix offload flags after port config")
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> ---
>  app/test-pmd/testpmd.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index 0148b0a..b5f5801 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -2815,7 +2815,8 @@ rxtx_port_config(struct rte_port *port)
>  	for (qid = 0; qid < nb_rxq; qid++) {
>  		offloads = port->rx_conf[qid].offloads;
>  		port->rx_conf[qid] = port->dev_info.default_rxconf;
> -		port->rx_conf[qid].offloads |= offloads;
> +		if (offloads)
> +			port->rx_conf[qid].offloads = offloads;
>  
>  		/* Check if any Rx parameters have been passed */
>  		if (rx_pthresh != RTE_PMD_PARAM_UNSET)
> @@ -2839,7 +2840,8 @@ rxtx_port_config(struct rte_port *port)
>  	for (qid = 0; qid < nb_txq; qid++) {
>  		offloads = port->tx_conf[qid].offloads;
>  		port->tx_conf[qid] = port->dev_info.default_txconf;
> -		port->tx_conf[qid].offloads |= offloads;
> +		if (offloads)
> +			port->tx_conf[qid].offloads = offloads;
>  
>  		/* Check if any Tx parameters have been passed */
>  		if (tx_pthresh != RTE_PMD_PARAM_UNSET)
> 


  reply	other threads:[~2019-06-10 10:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10  6:45 [dpdk-stable] " Wei Zhao
2019-06-10 10:09 ` Kevin Traynor [this message]
2019-06-11  1:28   ` [dpdk-stable] [dpdk-dev] " Zhao1, Wei
2019-06-11 14:41     ` Ferruh Yigit
2019-06-12  1:04       ` Zhao1, Wei
2019-07-02 17:56         ` Ferruh Yigit
2019-07-02 18:02           ` Ferruh Yigit
2019-06-11  1:31   ` 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=b398ca2b-ebb5-eac3-cb6f-5240507eadcd@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@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).