Re: [EXTERNAL] Re: [net-next PATCH 1/4] octeontx2-pf: Defines common API for HW resources configuration
From: Pavan Chebbi
Date: Wed Sep 04 2024 - 02:19:03 EST
On Wed, Sep 4, 2024 at 11:18 AM Geethasowjanya Akula <gakula@xxxxxxxxxxx> wrote:
>
>
>
> >-----Original Message-----
> >From: Pavan Chebbi <pavan.chebbi@xxxxxxxxxxxx>
> >Sent: Tuesday, September 3, 2024 8:27 PM
> >To: Geethasowjanya Akula <gakula@xxxxxxxxxxx>
> >Cc: netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; kuba@xxxxxxxxxx;
> >davem@xxxxxxxxxxxxx; pabeni@xxxxxxxxxx; jiri@xxxxxxxxxxx;
> >edumazet@xxxxxxxxxx; Sunil Kovvuri Goutham <sgoutham@xxxxxxxxxxx>;
> >Subbaraya Sundeep Bhatta <sbhatta@xxxxxxxxxxx>; Hariprasad Kelam
> ><hkelam@xxxxxxxxxxx>
> >Subject: [EXTERNAL] Re: [net-next PATCH 1/4] octeontx2-pf: Defines common
> >API for HW resources configuration
> >
> >On Tue, Sep 3, 2024 at 6:11 PM Geetha sowjanya <gakula@xxxxxxxxxxx>
> >wrote:
> >>
> >> -
> >> /* Assign default mac address */
> >> otx2_get_mac_from_af(netdev);
> >>
> >> @@ -3118,11 +3141,8 @@ static int otx2_probe(struct pci_dev *pdev, const
> >struct pci_device_id *id)
> >> if (test_bit(CN10K_LMTST, &pf->hw.cap_flag))
> >> qmem_free(pf->dev, pf->dync_lmt);
> >> otx2_detach_resources(&pf->mbox);
> >Isn't some of this unwinding/cleanup already moved to the new
> >function? Looks like duplicate code to me.
> No. If the otx2_probe () fails in any of the function after " otx2_init_rsrc()" function call.
> Then below code cleanup the resources allocated.
Ack. I missed to see that otx2_init_rsrc() is being carved out in
order to be called independently also.
> >
> >> -err_disable_mbox_intr:
> >> otx2_disable_mbox_intr(pf);
> >> -err_mbox_destroy:
> >> otx2_pfaf_mbox_destroy(pf);
> >> -err_free_irq_vectors:
> >> pci_free_irq_vectors(hw->pdev);
> >> err_free_netdev:
> >> pci_set_drvdata(pdev, NULL);
> >> --
> >> 2.25.1
> >>
> >>
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature