Re: [PATCH net-next v1] hinic: add three net_device_ops of vf
From: Jakub Kicinski
Date: Fri May 08 2020 - 17:38:29 EST
On Thu, 7 May 2020 18:21:19 +0000 Luo bin wrote:
> @@ -899,8 +920,18 @@ int hinic_init_cmdqs(struct hinic_cmdqs *cmdqs, struct hinic_hwif *hwif,
>
> hinic_ceq_register_cb(&func_to_io->ceqs, HINIC_CEQ_CMDQ, cmdqs,
> cmdq_ceq_handler);
> +
> + err = hinic_set_cmdq_depth(hwdev, CMDQ_DEPTH);
> + if (err) {
> + dev_err(&hwif->pdev->dev, "Failed to set cmdq depth\n");
> + goto err_set_cmdq_depth;
> + }
> +
> return 0;
>
> +err_set_cmdq_depth:
> + hinic_ceq_unregister_cb(&func_to_io->ceqs, HINIC_CEQ_CMDQ);
Looking at code in hinic_free_cmdqs(), isn't this also missing:
cmdq_type = HINIC_CMDQ_SYNC;
for (; cmdq_type < HINIC_MAX_CMDQ_TYPES; cmdq_type++)
free_cmdq(&cmdqs->cmdq[cmdq_type]);
?
> err_cmdq_ctxt:
> hinic_wqs_cmdq_free(&cmdqs->cmdq_pages, cmdqs->saved_wqs,
> HINIC_MAX_CMDQ_TYPES);