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]
Date:   Tue, 23 Feb 2021 08:46:40 +0000
From:   Avri Altman <Avri.Altman@....com>
To:     "daejun7.park@...sung.com" <daejun7.park@...sung.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
        "stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
        "cang@...eaurora.org" <cang@...eaurora.org>,
        "bvanassche@....org" <bvanassche@....org>,
        "huobean@...il.com" <huobean@...il.com>,
        ALIM AKHTAR <alim.akhtar@...sung.com>,
        Javier Gonzalez <javier.gonz@...sung.com>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        JinHwan Park <jh.i.park@...sung.com>,
        SEUNGUK SHIN <seunguk.shin@...sung.com>,
        Sung-Jun Park <sungjun07.park@...sung.com>,
        yongmyung lee <ymhungry.lee@...sung.com>,
        Jinyoung CHOI <j-young.choi@...sung.com>,
        BoRam Shin <boram.shin@...sung.com>
Subject: RE: RE: RE: [PATCH v22 2/4] scsi: ufs: L2P map management for HPB
 read

> 
> > +/*
> > > + * This function will parse recommended active subregion information in
> > > sense
> > > + * data field of response UPIU with SAM_STAT_GOOD state.
> > > + */
> > > +void ufshpb_rsp_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
> > > +{
> > > +       struct ufshpb_lu *hpb;
> > > +       struct scsi_device *sdev;
> > > +       struct utp_hpb_rsp *rsp_field = &lrbp->ucd_rsp_ptr->hr;
> > > +       int data_seg_len;
> > > +       bool found = false;
> > > +
> > > +       __shost_for_each_device(sdev, hba->host) {
> > > +               hpb = ufshpb_get_hpb_data(sdev);
> > > +
> > > +               if (!hpb)
> > > +                       continue;
> > > +
> > > +               if (rsp_field->lun == hpb->lun) {
> > > +                       found = true;
> > > +                       break;
> > This piece of code looks awkward, although it is probably working.
> > Why not just having a reference to the hpb luns, e.g. something like:
> > struct ufshpb_lu *hpb_luns[8] in struct ufs_hba.
> > Less elegant - but much more effective than iterating the scsi host on every
> completion interrupt.
> 
> How about checking (cmd->lun == rsp->lun) before the iteration?
> Major case will be have same lun. And, it is hard to add struct ufshpb_lu
> *hpb_luns[128]
> in struct ufs_hba, because LUN can be upto 127.
Oh - yes, 8 is for write booster.
OK.  Whatever you think.

However, I think there can be up to 32 regular luns,
meaning UFS_UPIU_MAX_UNIT_NUM_ID need to be fixed as well.

Thanks,
Avri

> 
> Thanks,
> Daejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ