Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-12-09 Thread Tyler Retzlaff
On Wed, Dec 08, 2021 at 07:40:10PM +0100, Morten Brørup wrote: > > From: Tyler Retzlaff [mailto:roret...@linux.microsoft.com] > > Sent: Wednesday, 8 December 2021 18.35 > > > > On Fri, Dec 03, 2021 at 11:37:10AM +0100, Morten Brørup wrote: > > > > From: Morten Brørup [mailto:m...@smartsharesystems

RE: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-12-08 Thread Morten Brørup
> From: Tyler Retzlaff [mailto:roret...@linux.microsoft.com] > Sent: Wednesday, 8 December 2021 18.35 > > On Fri, Dec 03, 2021 at 11:37:10AM +0100, Morten Brørup wrote: > > > From: Morten Brørup [mailto:m...@smartsharesystems.com] > > > Sent: Thursday, 2 December 2021 14.56 > > > > > > > > > I dis

Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-12-08 Thread Tyler Retzlaff
On Fri, Dec 03, 2021 at 11:37:10AM +0100, Morten Brørup wrote: > > From: Morten Brørup [mailto:m...@smartsharesystems.com] > > Sent: Thursday, 2 December 2021 14.56 > > > > > > I disagree: Negative value does not mean failure. Only -1 means > > failure. > > > > There is no -2 return value. There

Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-12-08 Thread Tyler Retzlaff
On Thu, Dec 02, 2021 at 01:01:26PM +, Ananyev, Konstantin wrote: > > > > > From: Thomas Monjalon [mailto:tho...@monjalon.net] > > > Sent: Thursday, 2 December 2021 08.19 > > > > > > 01/12/2021 22:37, Tyler Retzlaff: > > > > On Wed, Nov 24, 2021 at 06:04:56PM +, Bruce Richardson wrote: > >

RE: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-12-03 Thread Morten Brørup
> From: Morten Brørup [mailto:m...@smartsharesystems.com] > Sent: Thursday, 2 December 2021 14.56 > > > From: Ananyev, Konstantin [mailto:konstantin.anan...@intel.com] > > Sent: Thursday, 2 December 2021 14.01 > > > > > > From: Thomas Monjalon [mailto:tho...@monjalon.net] > > > > Sent: Thursday, 2

RE: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-12-02 Thread Morten Brørup
> From: Ananyev, Konstantin [mailto:konstantin.anan...@intel.com] > Sent: Thursday, 2 December 2021 14.01 > > > > From: Thomas Monjalon [mailto:tho...@monjalon.net] > > > Sent: Thursday, 2 December 2021 08.19 > > > > > > 01/12/2021 22:37, Tyler Retzlaff: > > > > On Wed, Nov 24, 2021 at 06:04:56PM

RE: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-12-02 Thread Ananyev, Konstantin
> > From: Thomas Monjalon [mailto:tho...@monjalon.net] > > Sent: Thursday, 2 December 2021 08.19 > > > > 01/12/2021 22:37, Tyler Retzlaff: > > > On Wed, Nov 24, 2021 at 06:04:56PM +, Bruce Richardson wrote: > > > > if (ret < 0 && rte_errno == EAGAIN) > > > > > > i only urge that this be ex

RE: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-12-02 Thread Morten Brørup
> From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Thursday, 2 December 2021 08.19 > > 01/12/2021 22:37, Tyler Retzlaff: > > On Wed, Nov 24, 2021 at 06:04:56PM +, Bruce Richardson wrote: > > > if (ret < 0 && rte_errno == EAGAIN) > > > > i only urge that this be explicit as opposed

Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-12-01 Thread Thomas Monjalon
01/12/2021 22:37, Tyler Retzlaff: > On Wed, Nov 24, 2021 at 06:04:56PM +, Bruce Richardson wrote: > > if (ret < 0 && rte_errno == EAGAIN) > > i only urge that this be explicit as opposed to a range i.e. ret == -1 > preferred over ret < 0 I don't understand why you think it is important to l

Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-12-01 Thread Tyler Retzlaff
On Wed, Nov 24, 2021 at 06:04:56PM +, Bruce Richardson wrote: > On Wed, Nov 24, 2021 at 09:24:42AM -0800, Tyler Retzlaff wrote: > > On Fri, Nov 19, 2021 at 10:56:36AM +0100, Thomas Monjalon wrote: > > > 19/11/2021 10:34, Ferruh Yigit: > > > > >> +if (ptr == NULL) { > > > > >> +r

Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-11-24 Thread Bruce Richardson
On Wed, Nov 24, 2021 at 09:24:42AM -0800, Tyler Retzlaff wrote: > On Fri, Nov 19, 2021 at 10:56:36AM +0100, Thomas Monjalon wrote: > > 19/11/2021 10:34, Ferruh Yigit: > > > >> + if (ptr == NULL) { > > > >> + rte_errno = EINVAL; > > > >> + return -rte_errno; > > > >> +

Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-11-24 Thread Tyler Retzlaff
On Fri, Nov 19, 2021 at 10:56:36AM +0100, Thomas Monjalon wrote: > 19/11/2021 10:34, Ferruh Yigit: > > >> +if (ptr == NULL) { > > >> +rte_errno = EINVAL; > > >> +return -rte_errno; > > >> +} > > > > > > in general dpdk has real problems with how it i

Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-11-19 Thread Bruce Richardson
On Fri, Nov 19, 2021 at 09:34:08AM +, Ferruh Yigit wrote: > On 11/18/2021 8:19 PM, Tyler Retzlaff wrote: > > On Thu, Nov 18, 2021 at 07:28:02PM +, eagost...@nvidia.com wrote: > > > From: Elena Agostini > > > > > > Signed-off-by: Elena Agostini > > > --- > > > lib/gpudev/gpudev.c |

Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-11-19 Thread Thomas Monjalon
19/11/2021 10:34, Ferruh Yigit: > On 11/18/2021 8:19 PM, Tyler Retzlaff wrote: > > On Thu, Nov 18, 2021 at 07:28:02PM +, eagost...@nvidia.com wrote: > >> From: Elena Agostini > >> > >> Signed-off-by: Elena Agostini > >> --- > >> lib/gpudev/gpudev.c | 10 ++ > >> lib/gpudev/rte_

Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-11-19 Thread Ferruh Yigit
On 11/18/2021 8:19 PM, Tyler Retzlaff wrote: On Thu, Nov 18, 2021 at 07:28:02PM +, eagost...@nvidia.com wrote: From: Elena Agostini Signed-off-by: Elena Agostini --- lib/gpudev/gpudev.c | 10 ++ lib/gpudev/rte_gpudev.h | 2 ++ 2 files changed, 12 insertions(+) diff --git

Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-11-18 Thread Tyler Retzlaff
On Thu, Nov 18, 2021 at 07:28:02PM +, eagost...@nvidia.com wrote: > From: Elena Agostini > > Signed-off-by: Elena Agostini > --- > lib/gpudev/gpudev.c | 10 ++ > lib/gpudev/rte_gpudev.h | 2 ++ > 2 files changed, 12 insertions(+) > > diff --git a/lib/gpudev/gpudev.c b/lib/gpud

Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-11-18 Thread Elena Agostini
> From: Stephen Hemminger > Date: Thursday, 18 November 2021 at 17:21 > To: Elena Agostini > Cc: dev@dpdk.org > Subject: Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for > free and unregister > External email: Use caution opening links or attachments>

Re: [PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-11-18 Thread Stephen Hemminger
On Thu, 18 Nov 2021 19:28:02 + wrote: > diff --git a/lib/gpudev/gpudev.c b/lib/gpudev/gpudev.c > index 2b174d8bd5..97575ed979 100644 > --- a/lib/gpudev/gpudev.c > +++ b/lib/gpudev/gpudev.c > @@ -576,6 +576,11 @@ rte_gpu_mem_free(int16_t dev_id, void *ptr) > return -rte_errno; >

[PATCH v1] gpudev: return EINVAL if invalid input pointer for free and unregister

2021-11-18 Thread eagostini
From: Elena Agostini Signed-off-by: Elena Agostini --- lib/gpudev/gpudev.c | 10 ++ lib/gpudev/rte_gpudev.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/lib/gpudev/gpudev.c b/lib/gpudev/gpudev.c index 2b174d8bd5..97575ed979 100644 --- a/lib/gpudev/gpudev.c +++ b/lib/gpud