[dpdk-dev] [EXT] Re: [PATCH v3 2/7] eal/interrupts: implement get set APIs

Harman Kalra hkalra at marvell.com
Tue Oct 19 20:44:21 CEST 2021



> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Harman Kalra
> Sent: Tuesday, October 19, 2021 2:21 PM
> To: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
> Cc: dev at dpdk.org; Thomas Monjalon <thomas at monjalon.net>; Ray Kinsella
> <mdr at ashroe.eu>; david.marchand at redhat.com
> Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v3 2/7] eal/interrupts: implement
> get set APIs
> 

[...]

> > > +
> > > +	nb_intr = RTE_MIN(src->nb_intr, intr_handle->nb_intr);
> >
> > Truncating copy is error-prone.
> > It should be either a reallocation (in the future) or an error (now).
> 
> Actually in patch 6, I have made lot of changes to this API wrt nb_intr, where
> efds/elist arrays are reallocated based on src->nb_intr and make
> intr_handle->nb_intr equal to src->nb_intr. I think those changes can be
> moved from patch 6 to patch 2.

Hi Dmitry,

I have addressed all your comments in V4, kindly review.
Regarding this particular comment, I have not made any changes as I already
explained in my previous reply that patch 6 takes care of realloc based on nb_intr,
I thought those changes can be moved from patch 6 to 2, but it's not possible because
till patch 5, arrays efds, elist are kept as static arrays to avoid build breakage. While in
patch 6 I made these arrays as pointers and dynamically allocated memory for them.


Thanks
Harman

[...]
> 
> >
> > > +	memcpy(intr_handle->efds, src->efds, nb_intr);



More information about the dev mailing list