[dpdk-dev] [PATCH 2/3] rte_ctrl_if: add control interface library

Ferruh Yigit ferruh.yigit at intel.com
Thu Jan 28 14:56:15 CET 2016


On Thu, Jan 28, 2016 at 07:24:51AM -0600, Jay Rolette wrote:
> On Thu, Jan 28, 2016 at 7:15 AM, Ferruh Yigit <ferruh.yigit at intel.com>
> wrote:
> 
> > On Thu, Jan 28, 2016 at 11:14:47AM +0000, Remy Horton wrote:
> > > On 27/01/2016 16:24, Ferruh Yigit wrote:
> > >
> > > > +   default:
> > > > +           ret = -95 /* EOPNOTSUPP */;
> > > > +           break;
> > >
> > > Is this intentional? -EOPNOTSUPP is -122 (-95 is -ENOTSOCK)..
> > >
> > Return value is not significant, callee just checks for negative value,
> > I can remove comment to prevent confusion.
> >
> 
> No, please fix the return value. Return values are significant when you are
> trying to debug or understand the intent of the code.
> 
There is nothing to fix in return value here. I am simply planning to do something like:
#define NOT_SUPPORTED -2
ret = NOT_SUPPORTED;

But the value of -95 or -110 or -2 does not differ.

Thanks,
ferruh



More information about the dev mailing list