[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <IA1PR11MB6194FD66BA60E12D6430DF22DDBF2@IA1PR11MB6194.namprd11.prod.outlook.com>
Date: Fri, 18 Apr 2025 17:14:24 +0000
From: "Ertman, David M" <david.m.ertman@...el.com>
To: Simon Horman <horms@...nel.org>, "Nikolova, Tatyana E"
<tatyana.e.nikolova@...el.com>
CC: "jgg@...dia.com" <jgg@...dia.com>, "leon@...nel.org" <leon@...nel.org>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [Intel-wired-lan] [iwl-next v5 5/5] iidc/ice/irdma: Update IDC to
support multiple consumers
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Simon Horman
> Sent: Thursday, April 17, 2025 4:22 AM
> To: Nikolova, Tatyana E <tatyana.e.nikolova@...el.com>
> Cc: jgg@...dia.com; leon@...nel.org; intel-wired-lan@...ts.osuosl.org; linux-
> rdma@...r.kernel.org; netdev@...r.kernel.org
> Subject: Re: [Intel-wired-lan] [iwl-next v5 5/5] iidc/ice/irdma: Update IDC to
> support multiple consumers
>
> On Tue, Apr 15, 2025 at 09:15:49PM -0500, Tatyana Nikolova wrote:
> > From: Dave Ertman <david.m.ertman@...el.com>
> >
> > In preparation of supporting more than a single core PCI driver
> > for RDMA, move ice specific structs like qset_params, qos_info
> > and qos_params from iidc_rdma.h to iidc_rdma_ice.h.
> >
> > Previously, the ice driver was just exporting its entire PF struct
> > to the auxiliary driver, but since each core driver will have its own
> > different PF struct, implement a universal struct that all core drivers
> > can provide to the auxiliary driver through the probe call.
> >
> > Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
> > Signed-off-by: Dave Ertman <david.m.ertman@...el.com>
> > Co-developed-by: Mustafa Ismail <mustafa.ismail@...el.com>
> > Signed-off-by: Mustafa Ismail <mustafa.ismail@...el.com>
> > Co-developed-by: Shiraz Saleem <shiraz.saleem@...el.com>
> > Signed-off-by: Shiraz Saleem <shiraz.saleem@...el.com>
> > Co-developed-by: Tatyana Nikolova <tatyana.e.nikolova@...el.com>
> > Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@...el.com>
>
> ...
>
> > diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink.c
> b/drivers/net/ethernet/intel/ice/devlink/devlink.c
> > index fcb199efbea5..4af60e2f37df 100644
> > --- a/drivers/net/ethernet/intel/ice/devlink/devlink.c
> > +++ b/drivers/net/ethernet/intel/ice/devlink/devlink.c
> > @@ -1339,8 +1339,13 @@ ice_devlink_enable_roce_get(struct devlink
> *devlink, u32 id,
> > struct devlink_param_gset_ctx *ctx)
> > {
> > struct ice_pf *pf = devlink_priv(devlink);
> > + struct iidc_rdma_core_dev_info *cdev;
> >
> > - ctx->val.vbool = pf->rdma_mode & IIDC_RDMA_PROTOCOL_ROCEV2
> ? true : false;
> > + cdev = pf->cdev_info;
> > + if (!cdev)
> > + return -ENODEV;
>
> Is it possible for cdev to be NULL here?
>
> Likewise for other checks for NULL arguments passed to functions
> elsewhere in this patch.
Hi Simon,
In the resume path from Sx states it is possible to have a NULL pointer for
the cdev_info pointer. This is due to us not wanting to fail on resuming unless
absolutely necessary. I went through the rest of the patch looking for NULL checks
and all of them are valid from my inspection (possible to be NULL).
Thanks for the review!
DaveE
>
> > +
> > + ctx->val.vbool = !!(cdev->rdma_protocol &
> IIDC_RDMA_PROTOCOL_ROCEV2);
> >
> > return 0;
> > }
>
> ...
Powered by blists - more mailing lists