[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250417112143.GE2430521@horms.kernel.org>
Date: Thu, 17 Apr 2025 12:21:43 +0100
From: Simon Horman <horms@...nel.org>
To: Tatyana Nikolova <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: [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.
> +
> + ctx->val.vbool = !!(cdev->rdma_protocol & IIDC_RDMA_PROTOCOL_ROCEV2);
>
> return 0;
> }
...
Powered by blists - more mailing lists