From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7CD76A04B1; Fri, 28 Aug 2020 16:51:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F1D211C1DF; Fri, 28 Aug 2020 16:51:47 +0200 (CEST) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.176.14]) by dpdk.org (Postfix) with ESMTP id AE7A11C18E; Fri, 28 Aug 2020 16:51:46 +0200 (CEST) Received: from roundcube.fit.vutbr.cz (spytihnev.fit.vutbr.cz [147.229.9.226]) (authenticated bits=0) by eva.fit.vutbr.cz (8.16.1/8.16.1) with ESMTPSA id 07SEpWr1012943 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 28 Aug 2020 16:51:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stud.fit.vutbr.cz; s=studfit; t=1598626293; bh=8x6NekQ/qIk+lU5/fb5+tCwFJU02dBQzyqnhXtsnhZo=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=cfk+7RNVWha/bc9fZVqunvRCK/XsjMyFzWHvVBt7h2o1aRi4UkJo+A46lknRS8qXY BSneo5aQDu0eR81auZwWyQGYnhAIFUWi4oPuZ3I+4paRjLn5S7Q6TVnhi944HEP+bo 4uueV+NtjD4XV22gimsmaBVjI7zUJlJNNqFDBbao= MIME-Version: 1.0 Date: Fri, 28 Aug 2020 16:51:32 +0200 From: Carasec Elena To: Kevin Traynor Cc: "Xing, Beilei" , dev@dpdk.org, stable@dpdk.org, "Zhang, Qi Z" , Adrien Mazarguil , Andrew Rybchenko , Luca Boccassi , Jan Viktorin , "Di, ChenxuX" , "Wang, ShougangX" , Jeff Guo In-Reply-To: <52820343-1536-3bae-25b7-a1ea9a1da3fa@redhat.com> References: <1598441281-11209-1-git-send-email-xcaras00@stud.fit.vutbr.cz> <52820343-1536-3bae-25b7-a1ea9a1da3fa@redhat.com> User-Agent: Roundcube Webmail Message-ID: <65aed7cbc30c0ae92957e3af949b87af@stud.fit.vutbr.cz> X-Sender: xcaras00@stud.fit.vutbr.cz Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] i40e: fix segfault when using custom RSS key X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Yes, it is valid for the branches 18.11 and 19.11 LTS. Best regards, Elena -------- Původní zpráva -------- Předmět: Re: [dpdk-stable] [dpdk-dev] [PATCH] i40e: fix segfault when using custom RSS key Datum: 2020-08-28 15:05 Odesílatel: Kevin Traynor Adresát: Carasec Elena , "Xing, Beilei" Hi, On 28/08/2020 13:52, Carasec Elena wrote: > Hello, > > We admit that the mistake was from our part. > New tests' results have revealed that from DPDK v20.05 this issue > does not exist anymore. So, this patch is applicable for DPDK > v20.02 and older. > The "Fixed:" commit is first in 18.05, so looks like this is valid for 18.11 and 19.11 LTS branches. Please confirm, and it will need i40e maintainers ack too. thanks, Kevin. > Kind regards, > Elena Carasec > > > > -------- Original Message -------- > Subject: RE: [dpdk-dev] [PATCH] i40e: fix segfault when using custom > RSS > key > Date: 2020-08-28 08:38 > From: "Xing, Beilei" > To: Elena Carasec , "dev@dpdk.org" > > >> -----Original Message----- >> From: dev On Behalf Of Elena Carasec >> Sent: Wednesday, August 26, 2020 7:28 PM >> To: dev@dpdk.org >> Cc: Elena Carasec ; stable@dpdk.org; Xing, >> Beilei >> ; Zhang, Qi Z ; Adrien >> Mazarguil ; Andrew Rybchenko >> ; Luca Boccassi ; Jan >> Viktorin >> Subject: [dpdk-dev] [PATCH] i40e: fix segfault when using custom RSS >> key >> >> &out->conf and in can point to the same memory area. Reinitialization >> of >> out->conf leads to setting in->key to NULL, but leaves key_len 40. >> This >> leads to segfault on destruction of the RSS flow action. The segfault >> happens >> inside i40e_action_rss_same(), when comparing comp->key and >> with->key, because both comp->key_len and with->key_len are 40 (should >> be 0). >> >> Reproduction steps (testpmd): >> >> port stop 0 >> flow create 0 ingress pattern end actions rss func default level 0\ >> key >> 6d5a6d5a6d5a6d5a6d5a6d5a6d5a6d5a6d5a6d5a6d5a6d5a6d5a6d5a6d5a6d5 >> a6d5a6d5a6d5a6d5a\ >> key_len 40 queues 0 end / end >> port start 0 >> set link-up port 0 >> start >> stop >> set link-down port 0 >> port stop 0 >> flow destroy 0 rule 0 >> (Segmentation fault) > > Hi, > > Thanks for the fix. > But according to Chenxu and Shougang's test, this issue doesn't exist > after DPDK 20.05, > where RSS configuration has been refactored. > Could you please retry with the latest DPDK? > > BR, > Beilei > >> >> Fixes: ac8d22de2394 ("ethdev: flatten RSS configuration in flow API") >> >> Signed-off-by: Elena Carasec >> Signed-off-by: Jan Viktorin >> --- >> drivers/net/i40e/i40e_ethdev.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/net/i40e/i40e_ethdev.c >> b/drivers/net/i40e/i40e_ethdev.c >> index 11c02b1..a5fe130 100644 >> --- a/drivers/net/i40e/i40e_ethdev.c >> +++ b/drivers/net/i40e/i40e_ethdev.c >> @@ -13211,6 +13211,8 @@ struct i40e_customized_pctype* >> return -EINVAL; >> if (!in->key && in->key_len) >> return -EINVAL; >> + if (&out->conf == in) >> + return 0; >> out->conf = (struct rte_flow_action_rss){ >> .func = in->func, >> .level = in->level, >> -- >> 1.8.3.1 >