From: Ferruh Yigit <ferruh.yigit@intel.com>
To: "Zhao1, Wei" <wei.zhao1@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
"Peng, Yuan" <yuan.peng@intel.com>,
"Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
Kevin Traynor <ktraynor@redhat.com>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fix offloads overwrite by default configuration
Date: Fri, 14 Jun 2019 16:42:25 +0100 [thread overview]
Message-ID: <9bb24a9e-4e4f-9d9b-14dc-a9ed7d00d4d5@intel.com> (raw)
In-Reply-To: <A2573D2ACFCADC41BB3BE09C6DE313CA07F03B73@PGSMSX103.gar.corp.intel.com>
On 6/12/2019 2:17 AM, Zhao1, Wei wrote:
>
>
>> -----Original Message-----
>> From: Yigit, Ferruh
>> Sent: Tuesday, June 11, 2019 10:37 PM
>> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
>> Cc: stable@dpdk.org; Peng, Yuan <yuan.peng@intel.com>; Lu, Wenzhuo
>> <wenzhuo.lu@intel.com>; Kevin Traynor <ktraynor@redhat.com>
>> Subject: Re: [dpdk-stable] [PATCH] app/testpmd: fix offloads overwrite by
>> default configuration
>>
>> On 5/9/2019 8:20 AM, Wei Zhao wrote:
>>> There is an error in function rxtx_port_config(), which may overwrite
>>> offloads configuration get from function launch_args_parse() when run
>>> testpmd app. So rxtx_port_config() should do "or" for port offloads.
>>>
>>> Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure")
>>> cc: stable@dpdk.org
>>>
>>> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
>>> ---
>>> app/test-pmd/testpmd.c | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
>>> 6fbfd29..f0061d9 100644
>>> --- a/app/test-pmd/testpmd.c
>>> +++ b/app/test-pmd/testpmd.c
>>> @@ -2809,9 +2809,12 @@ static void
>>> rxtx_port_config(struct rte_port *port) {
>>> uint16_t qid;
>>> + uint64_t offloads;
>>>
>>> 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;
>>
>> While talking with Kevin, he pointed out the error in this code.
>>
>> We are updating queue level offloads, with whatever in the 'offloads' and it can
>> be non-queue level offloads in it, next time ethdev API called these values are
>> caught by the API checks and causing an error.
>>
>> It looks like port level offload flags needs to be masted out before writing to
>> queue level 'offloads' variable.
>
>
> By the way, this error in not introduced in this patch, it seems has exist long before this patch.
> This patch is just fix for overwrite problem.
I disagree, writing 'offloads' to "rx_conf[].offloads" without checking if they
queue offloads or not causing this problem. And that write introduced in this patch.
>
>
>
>>
>>>
>>> /* Check if any Rx parameters have been passed */
>>> if (rx_pthresh != RTE_PMD_PARAM_UNSET) @@ -2833,7
>> +2836,9 @@
>>> 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;
>>>
>>> /* Check if any Tx parameters have been passed */
>>> if (tx_pthresh != RTE_PMD_PARAM_UNSET)
>>>
>
next prev parent reply other threads:[~2019-06-14 15:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-09 7:20 [dpdk-dev] " Wei Zhao
2019-05-09 7:20 ` Wei Zhao
2019-05-13 3:30 ` Zhao1, Wei
2019-05-13 3:30 ` Zhao1, Wei
2019-05-13 15:08 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-05-13 15:08 ` Thomas Monjalon
2019-05-13 16:35 ` Ferruh Yigit
2019-05-13 16:35 ` Ferruh Yigit
2019-05-14 1:56 ` Zhao1, Wei
2019-05-14 1:56 ` Zhao1, Wei
2019-05-20 15:23 ` Ferruh Yigit
2019-05-21 1:30 ` Zhao1, Wei
2019-05-21 15:42 ` Ferruh Yigit
2019-05-24 1:55 ` Zhao1, Wei
2019-05-24 13:03 ` Ferruh Yigit
2019-06-10 7:27 ` Zhao1, Wei
2019-06-11 14:37 ` Ferruh Yigit
2019-06-12 0:57 ` Zhao1, Wei
2019-06-12 1:17 ` Zhao1, Wei
2019-06-14 15:42 ` Ferruh Yigit [this message]
2019-06-17 1:51 ` Zhao1, Wei
2019-06-17 12:59 ` Ferruh Yigit
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=9bb24a9e-4e4f-9d9b-14dc-a9ed7d00d4d5@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=ktraynor@redhat.com \
--cc=stable@dpdk.org \
--cc=wei.zhao1@intel.com \
--cc=wenzhuo.lu@intel.com \
--cc=yuan.peng@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).