DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: "Min Hu (Connor)" <humin29@huawei.com>,
	"Havlík Martin" <xhavli56@stud.fit.vutbr.cz>
Cc: dev@dpdk.org, viktorin@cesnet.cz, chas3@att.com,
	declan.doherty@intel.com, tomaszx.kulasek@intel.com
Subject: Re: [dpdk-dev] [PATCH 2/3] net/bonding: fix not checked return value
Date: Tue, 13 Jul 2021 12:26:40 +0300	[thread overview]
Message-ID: <27a0e379-2021-c4d6-1e35-ce03310f8d3c@oktetlabs.ru> (raw)
In-Reply-To: <4648adf2-e63d-39da-57b4-7e4aaab4473f@huawei.com>

On 7/9/21 3:09 AM, Min Hu (Connor) wrote:
> 
> 
> 在 2021/7/8 21:20, Havlík Martin 写道:
>> Dne 2021-07-08 14:43, Min Hu (Connor) napsal:
>>> 在 2021/6/22 17:25, Martin Havlik 写道:
>>>> Return value from bond_ethdev_8023ad_flow_set() is now checked
>>>> and appropriate message is logged on error.
>>>>
>>>> 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 | 8 +++++++-
>>>>   1 file changed, 7 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c
>>>> b/drivers/net/bonding/rte_eth_bond_pmd.c
>>>> index 4c43bf916..a6755661c 100644
>>>> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
>>>> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
>>>> @@ -1819,8 +1819,14 @@ slave_configure(struct rte_eth_dev
>>>> *bonded_eth_dev,
>>>>                    
>>>> internals->mode4.dedicated_queues.flow[slave_eth_dev->data->port_id],
>>>>                       &flow_error);
>>>>   -        bond_ethdev_8023ad_flow_set(bonded_eth_dev,
>>>> +        errval = bond_ethdev_8023ad_flow_set(bonded_eth_dev,
>>>>                   slave_eth_dev->data->port_id);
>>>> +        if (errval != 0) {
>>>> +            RTE_BOND_LOG(ERR,
>>>> +                "bond_ethdev_8023ad_flow_set: port=%d, err (%d)",
>>>> +                slave_eth_dev->data->port_id, errval);
>>>> +            return errval;
>>>> +        }
>>>>       }
>>>>
>>> Firstly, I think your patch is OK,
>>> But I want to know what is your standard to decide which function
>>> should check return value or not(of course, they are none-void)?
>>>
>> I encountered the problem with dedicated queues on mlx5, I looked into
>> the source code and I saw the cause, so I fixed it. If I had seen any
>> other issue, I would've fixed it too. That, for example, applies to
>> the log message fix I included. My standard is to check all non-void
>> return values.
> Got it.
>>> While, I noticed "bond_ethdev_lsc_event_callback" nearby was not
>>> checked, but you ignored it.
>>>
>> Not ignored, just didn't properly review more code than what closely
>> surrounded the problematic lines.
>>>>       /* Start device */
>>>>
> Acked by: Min Hu (Connor) <humin29@huawei.com>
>> .

Acked-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

Applied, thanks.

  reply	other threads:[~2021-07-13  9:26 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22  9:25 [dpdk-dev] [PATCH 0/3] net/bonding: make dedicated queues work with mlx5 Martin Havlik
2021-06-22  9:25 ` [dpdk-dev] [PATCH 1/3] net/bonding: fix proper return value check and correct log message Martin Havlik
2021-07-08 12:33   ` Min Hu (Connor)
2021-07-13  9:26     ` Andrew Rybchenko
2021-06-22  9:25 ` [dpdk-dev] [PATCH 2/3] net/bonding: fix not checked return value Martin Havlik
2021-07-08 12:43   ` Min Hu (Connor)
2021-07-08 13:20     ` Havlík Martin
2021-07-09  0:09       ` Min Hu (Connor)
2021-07-13  9:26         ` Andrew Rybchenko [this message]
2021-06-22  9:25 ` [dpdk-dev] [PATCH 3/3] net/bonding: start ethdev prior to setting 8023ad flow Martin Havlik
2021-06-23  7:04   ` Min Hu (Connor)
2021-06-24 11:57     ` Havlík Martin
2021-07-04 15:18       ` Matan Azrad
2021-07-07 15:54         ` Jan Viktorin
2021-07-11  8:49           ` Ori Kam
2021-07-11 21:45             ` Jan Viktorin
2021-07-12 13:07               ` Ori Kam
2021-07-13  8:18                 ` Havlík Martin
2021-07-13  9:26                   ` Andrew Rybchenko
2021-07-13 11:06                     ` Jan Viktorin
2021-07-13 17:17                       ` Ori Kam
2021-07-14 15:00                         ` Jan Viktorin
2021-07-15 13:58                           ` Thomas Monjalon
2021-08-24 13:18                             ` Ferruh Yigit
2021-08-26 10:15                               ` Jan Viktorin
2021-07-04 15:03 ` [dpdk-dev] [PATCH 0/3] net/bonding: make dedicated queues work with mlx5 Andrew Rybchenko

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=27a0e379-2021-c4d6-1e35-ce03310f8d3c@oktetlabs.ru \
    --to=andrew.rybchenko@oktetlabs.ru \
    --cc=chas3@att.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=humin29@huawei.com \
    --cc=tomaszx.kulasek@intel.com \
    --cc=viktorin@cesnet.cz \
    --cc=xhavli56@stud.fit.vutbr.cz \
    /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).