[dpdk-dev] [PATCH 02/13] net/failsafe: check code of promiscuous mode switch

Andrew Rybchenko arybchenko at solarflare.com
Fri Sep 6 12:08:39 CEST 2019


On 9/6/19 12:24 PM, Gaëtan Rivet wrote:
> On Thu, Sep 05, 2019 at 07:38:23PM +0300, Andrew Rybchenko wrote:
>> On 9/5/19 7:36 PM, Stephen Hemminger wrote:
>>> On Thu, 5 Sep 2019 17:10:40 +0100
>>> Andrew Rybchenko <arybchenko at solarflare.com> wrote:
>>>
>>>> +		if (ret != 0) {
>>>> +			ERROR("Failed to apply promiscuous mode");
>>>> +			return ret;
>>>> +		}
>>> Just return the error as normal and let caller deal with it.
>>> Additional logging is not necessary.
>> In this particular case we simply follow style around.
>> No strong opinion. Up to Gaetan.
>>
> Ok, actually I missed a few things.
> You should leave the error message in and keep it consistent with the rest.
>
> However, you should test ret against fs_err(sdev, ret), you can find
> other uses of it elsewhere in the file. When rte_eth_promiscuous_enable
> returns -ENODEV, it is not an error for failsafe (as an absent device is
> expected at some point).

I see. Will fix in the next version.

> Stephen if you would prefer never to have messages, it should be changed
> all throughout the driver instead. If prefer it I would accept
> a patch about it. Just want to keep it consistent.
>



More information about the dev mailing list