linux-nvme / nvme-cli

NVMe management command line interface.
https://nvmexpress.org
GNU General Public License v2.0
1.41k stars 637 forks source link

nvme: choose PIF from QPIF if QPIFS supports and PIF is QTYPE #2378

Closed francispravin5 closed 2 weeks ago

francispravin5 commented 2 weeks ago

As per TP4141a: "If the Qualified Protection Information Format Support(QPIFS) bit is set to 1 and the Protection Information Format(PIF) field is set to 11b (i.e., Qualified Type), then the pif is as defined in the Qualified Protection Information Format (QPIF) field." So, choose PIF from QPIF if QPIFS supports and PIF is QTYPE.

igaw commented 2 weeks ago

Thanks. Maybe we should move this into a helper eventually?

francispravin5 commented 2 weeks ago

Yes. We can create a helper function to get pif and sts value.