From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id D06E9A0C4A;
	Thu,  8 Jul 2021 14:33:27 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 9E4C94069C;
	Thu,  8 Jul 2021 14:33:27 +0200 (CEST)
Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189])
 by mails.dpdk.org (Postfix) with ESMTP id 3C99440696
 for <dev@dpdk.org>; Thu,  8 Jul 2021 14:33:26 +0200 (CEST)
Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.56])
 by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4GLFvw4fsmz77Qp;
 Thu,  8 Jul 2021 20:29:00 +0800 (CST)
Received: from [10.67.103.128] (10.67.103.128) by
 dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id
 15.1.2176.2; Thu, 8 Jul 2021 20:33:22 +0800
To: Martin Havlik <xhavli56@stud.fit.vutbr.cz>, Chas Williams <chas3@att.com>, 
 Tomasz Kulasek <tomaszx.kulasek@intel.com>, Declan Doherty
 <declan.doherty@intel.com>
CC: <dev@dpdk.org>, Jan Viktorin <viktorin@cesnet.cz>
References: <20210622092531.73112-1-xhavli56@stud.fit.vutbr.cz>
 <20210622092531.73112-2-xhavli56@stud.fit.vutbr.cz>
From: "Min Hu (Connor)" <humin29@huawei.com>
Message-ID: <9e2d66da-4ca4-2342-6a65-4f4188a9e9a7@huawei.com>
Date: Thu, 8 Jul 2021 20:33:22 +0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
 Thunderbird/68.3.1
MIME-Version: 1.0
In-Reply-To: <20210622092531.73112-2-xhavli56@stud.fit.vutbr.cz>
Content-Type: text/plain; charset="gbk"; format=flowed
Content-Transfer-Encoding: 8bit
X-Originating-IP: [10.67.103.128]
X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To
 dggeme756-chm.china.huawei.com (10.3.19.102)
X-CFilter-Loop: Reflected
Subject: Re: [dpdk-dev] [PATCH 1/3] net/bonding: fix proper return value
 check and correct log message
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

The old code has just low-level error, which just copied the "printf"
above.
Thanks for your patch.

Acked-by: Min Hu (Connor) <humin29@huawei.com>

在 2021/6/22 17:25, Martin Havlik 写道:
> Return value is now saved to errval and log message on error
> reports correct function name, doesn't use q_id which was out of context,
> and uses up-to-date errval.
> 
> Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
> Cc: tomaszx.kulasek@intel.com
> 
> Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
> Cc: Jan Viktorin <viktorin@cesnet.cz>
> ---
>   drivers/net/bonding/rte_eth_bond_pmd.c | 11 ++++++-----
>   1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index b01ef003e..4c43bf916 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -1805,12 +1805,13 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
>   				!= 0)
>   			return errval;
>   
> -		if (bond_ethdev_8023ad_flow_verify(bonded_eth_dev,
> -				slave_eth_dev->data->port_id) != 0) {
> +		errval = bond_ethdev_8023ad_flow_verify(bonded_eth_dev,
> +				slave_eth_dev->data->port_id);
> +		if (errval != 0) {
>   			RTE_BOND_LOG(ERR,
> -				"rte_eth_tx_queue_setup: port=%d queue_id %d, err (%d)",
> -				slave_eth_dev->data->port_id, q_id, errval);
> -			return -1;
> +				"bond_ethdev_8023ad_flow_verify: port=%d, err (%d)",
> +				slave_eth_dev->data->port_id, errval);
> +			return errval;
>   		}
>   
>   		if (internals->mode4.dedicated_queues.flow[slave_eth_dev->data->port_id] != NULL)
>