DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 01/10] net/bnxt: handle flow create failure
Date: Tue, 14 Jan 2020 12:59:56 +0000	[thread overview]
Message-ID: <6d8a5f5d-ae8c-9ce6-4d88-6df1dbe36b41@intel.com> (raw)
In-Reply-To: <20200114051435.46093-2-ajit.khaparde@broadcom.com>

On 1/14/2020 5:14 AM, Ajit Khaparde wrote:
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> 
> If flow create fails due to not enough filter resources,
> driver does not populate the rte_flow_error using
> rte_flow_error_set().
> 
> Since "rte_errno" could have garbage value and is not relaiable,
> it could cause a segfault in the stack in port_flow_complain().
> 
> Fix it to set rte_flow_error using rte_flow_error_set()
> when flow create fails due to not enough filter resources.

Hi Ajit, Kalesh,

In patch title, 'handle' seems means fix, can you please prefer the 'fix' since
it become kind of keyword to define the patch content. This also helps us
missing the "Fixes: " tag as it has been here.

Thanks,
ferruh

> 
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt_flow.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
> index cde1fa41c..5564c5363 100644
> --- a/drivers/net/bnxt/bnxt_flow.c
> +++ b/drivers/net/bnxt/bnxt_flow.c
> @@ -1702,7 +1702,9 @@ bnxt_flow_create(struct rte_eth_dev *dev,
>  
>  	filter = bnxt_get_unused_filter(bp);
>  	if (filter == NULL) {
> -		PMD_DRV_LOG(ERR, "Not enough resources for a new flow.\n");
> +		rte_flow_error_set(error, ENOSPC,
> +				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
> +				   "Not enough resources for a new flow");
>  		goto free_flow;
>  	}
>  
> 


  reply	other threads:[~2020-01-14 13:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13  5:01 [dpdk-dev] [PATCH V2 00/10] bnxt patchset with bug fixes Kalesh A P
2020-01-13  5:01 ` [dpdk-dev] [PATCH V2 01/10] net/bnxt: handle flow create failure Kalesh A P
2020-01-13  5:01 ` [dpdk-dev] [PATCH V2 02/10] net/bnxt: fix probe failure in FreeBSD Kalesh A P
2020-01-13  5:01 ` [dpdk-dev] [PATCH V2 03/10] net/bnxt: fix to use correct IOVA mapping Kalesh A P
2020-01-13  5:01 ` [dpdk-dev] [PATCH V2 04/10] net/bnxt: fix enable/disable VLAN filtering Kalesh A P
2020-01-13  5:01 ` [dpdk-dev] [PATCH V2 05/10] net/bnxt: fix enable/disable vlan strip Kalesh A P
2020-01-13  5:01 ` [dpdk-dev] [PATCH V2 06/10] net/bnxt: handle hw filter setting when port is stopped Kalesh A P
2020-01-13  5:01 ` [dpdk-dev] [PATCH V2 07/10] net/bnxt: fix a memory leak in port stop Kalesh A P
2020-01-13  5:01 ` [dpdk-dev] [PATCH V2 08/10] net/bnxt: use macro for PCI log format Kalesh A P
2020-01-13  5:01 ` [dpdk-dev] [PATCH V2 09/10] net/bnxt: release port upon close Kalesh A P
2020-01-13  5:01 ` [dpdk-dev] [PATCH V2 10/10] net/bnxt: fix to cap max rings to minimum of compl rings and stat contexts Kalesh A P
2020-01-14  5:14 ` [dpdk-dev] [PATCH v3 00/10] bnxt patchset with bug fixes Ajit Khaparde
2020-01-14  5:14   ` [dpdk-dev] [PATCH v3 01/10] net/bnxt: handle flow create failure Ajit Khaparde
2020-01-14 12:59     ` Ferruh Yigit [this message]
2020-01-14  5:14   ` [dpdk-dev] [PATCH v3 02/10] net/bnxt: fix probe failure in FreeBSD Ajit Khaparde
2020-01-14  5:14   ` [dpdk-dev] [PATCH v3 03/10] net/bnxt: fix to use correct IOVA mapping Ajit Khaparde
2020-01-14  5:14   ` [dpdk-dev] [PATCH v3 04/10] net/bnxt: fix enable/disable VLAN filtering Ajit Khaparde
2020-01-14  5:14   ` [dpdk-dev] [PATCH v3 05/10] net/bnxt: fix VLAN strip support Ajit Khaparde
2020-01-14  5:14   ` [dpdk-dev] [PATCH v3 06/10] net/bnxt: handle HW filter setting when port is stopped Ajit Khaparde
2020-01-14  5:14   ` [dpdk-dev] [PATCH v3 07/10] net/bnxt: fix a memory leak in port stop Ajit Khaparde
2020-01-14  5:14   ` [dpdk-dev] [PATCH v3 08/10] net/bnxt: use macro for PCI log format Ajit Khaparde
2020-01-14  5:14   ` [dpdk-dev] [PATCH v3 09/10] net/bnxt: release port upon close Ajit Khaparde
2020-01-14 12:56     ` Ferruh Yigit
2020-01-14 14:49       ` Somnath Kotur
2020-01-16 11:20         ` Ferruh Yigit
2020-01-16 11:30           ` Somnath Kotur
2020-01-14  5:14   ` [dpdk-dev] [PATCH v3 10/10] net/bnxt: fix calculation of max rings Ajit Khaparde
2020-01-14  5:27   ` [dpdk-dev] [PATCH v3 00/10] bnxt patchset with bug fixes Ajit Khaparde
2020-01-14 13:02     ` 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=6d8a5f5d-ae8c-9ce6-4d88-6df1dbe36b41@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=kalesh-anakkur.purayil@broadcom.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).