[ovs-dev] [PATCH V2] lib: Make error messages more useful

Gregory Rose gvrose8192 at gmail.com
Tue Jan 2 21:15:56 UTC 2018


On 1/2/2018 11:52 AM, Ben Pfaff wrote:
> On Thu, Dec 28, 2017 at 01:52:41PM -0800, Greg Rose wrote:
>> There are many "opening datapath" error messages and when one occurs
>> it is impossible to know just from the log message which of the
>> "opening datapath" errors occurred.  Add a helper function that
>> incorporates the calling function's name to help identify where
>> the datapath open error occurred.
>>
>> Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
> Thanks for working on improving OVS error messages.
>
> Users don't want to see the details of OVS code, whether those details
> are line numbers or function names, except maybe when they're at wits'
> end anyway (e.g. assertion failures, debug-level log messages).  To
> better distinguish error messages, we should provide something
> meaningful to the user.  That could be the name of a dpctl or unixctl
> command, or some other indication of why the code was opening the
> datapath (e.g. "to add an interface").

Hmm.  Yeah, that's why I was including the datapath name in the original 
patch.

>
> The helper function I was envisioning would have included the initial
> call to parsed_dpif_open(), since that's such a common step before
> reporting an error.

OK, if you feel it is still worth pursuing then I'll use the approach 
you suggest.

Thanks,

- Greg

>
> Thanks,
>
> Ben.



More information about the dev mailing list