lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+sq2CfZSfSvJvekfiRgQ-P5xjF6B=7kOHGXhUPe7fk2Fb_57Q@mail.gmail.com>
Date:   Thu, 23 Jan 2020 00:57:55 +0530
From:   Sunil Kovvuri <sunil.kovvuri@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Linux Netdev List <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Michal Kubecek <mkubecek@...e.cz>,
        Sunil Goutham <sgoutham@...vell.com>
Subject: Re: [PATCH v4 03/17] octeontx2-pf: Attach NIX and NPA block LFs

On Tue, Jan 21, 2020 at 9:30 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Tue, 21 Jan 2020 18:51:37 +0530, sunil.kovvuri@...il.com wrote:
> > +int otx2_config_npa(struct otx2_nic *pfvf)
> > +{
> > +     struct otx2_qset *qset = &pfvf->qset;
> > +     struct npa_lf_alloc_req  *npalf;
> > +     struct otx2_hw *hw = &pfvf->hw;
> > +     int aura_cnt, err;
> > +
> > +     /* Pool - Stack of free buffer pointers
> > +      * Aura - Alloc/frees pointers from/to pool for NIX DMA.
> > +      */
> > +
> > +     if (!hw->pool_cnt)
> > +             return -EINVAL;
> > +
> > +     qset->pool = devm_kzalloc(pfvf->dev, sizeof(struct otx2_pool) *
> > +                               hw->pool_cnt, GFP_KERNEL);
> > +     if (!qset->pool)
> > +             return -ENOMEM;
> > +
> > +     /* Get memory to put this msg */
> > +     npalf = otx2_mbox_alloc_msg_npa_lf_alloc(&pfvf->mbox);
> > +     if (!npalf)
> > +             return -ENOMEM;
> > +
> > +     /* Set aura and pool counts */
> > +     npalf->nr_pools = hw->pool_cnt;
> > +     aura_cnt = ilog2(roundup_pow_of_two(hw->pool_cnt));
> > +     npalf->aura_sz = (aura_cnt >= ilog2(128)) ? (aura_cnt - 6) : 1;
> > +
> > +     err = otx2_sync_mbox_msg(&pfvf->mbox);
> > +     if (err)
> > +             return err;
> > +     return 0;
>
> return otx2_sync..
>
> directly
>
> > +}
>
> > +static int otx2_realloc_msix_vectors(struct otx2_nic *pf)
> > +{
> > +     struct otx2_hw *hw = &pf->hw;
> > +     int num_vec, err;
> > +
> > +     /* NPA interrupts are inot registered, so alloc only
> > +      * upto NIX vector offset.
> > +      */
> > +     num_vec = hw->nix_msixoff;
> > +#define NIX_LF_CINT_VEC_START                        0x40
> > +     num_vec += NIX_LF_CINT_VEC_START + hw->max_queues;
> > +
> > +     otx2_disable_mbox_intr(pf);
> > +     pci_free_irq_vectors(hw->pdev);
> > +     pci_free_irq_vectors(hw->pdev);
> > +     err = pci_alloc_irq_vectors(hw->pdev, num_vec, num_vec, PCI_IRQ_MSIX);
> > +     if (err < 0) {
> > +             dev_err(pf->dev, "%s: Failed to realloc %d IRQ vectors\n",
> > +                     __func__, num_vec);
> > +             return err;
> > +     }
> > +
> > +     err = otx2_register_mbox_intr(pf, false);
> > +     if (err)
> > +             return err;
> > +     return 0;
> > +}
>
> ditto, please fix this everywhere in the submission

Thanks, will fix and resubmit.

Sunil.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ