Repository navigation
Conversation
|
from a quick glance it looks okay. |
jk-ozlabs
left a comment
There was a problem hiding this comment.
Just a concern about the automatic padding, but looks OK otherwise.
Also, @igaw may have different requirements, but for me, there is no need to restate the diff in the commit-message dot-points. I can read it from the code. You only need to explain any context, background or design points that are not apparent in the actual code change.
|
The AI bots really like to add the 'what' and 'how' to commit message. Both can be seen in the patch. If the patch is too difficult to understand it is most of the time a good indicator that the commit could be improved. The 'why' should be in the commit message. fwiw, I ussaly tell the bots to mimick hch's style of writting commit message :) |
|
Thank you @igaw and @jk-ozlabs for the commit message style suggestion. I will do that in the future. |
c24247c to
efc846b
Compare
|
Thanks for the updates. Can you squash the fixup change into the original patches though? |
nvme_mi_pcie_xfer() only exposes the raw NVMe-MI PCIe Command Set transport, leaving every caller to hand-encode opcodes, NMD0..NMD2 bitfields, 64-bit BAR offsets, bounds checks, and the 4-byte dword payload alignment required by NVMe-MI Section 7. Add enum nvme_mi_pcie_opcode and typed Configuration, Memory, and I/O read/write helpers on top of nvme_mi_pcie_xfer() so callers do not duplicate wire-format and padding logic. Expose the new commands in mi-mctp (along with raw pcie passthrough) for out-of-band PCIe triage when the in-band link or Admin queue is unavailable, and add unit tests covering all opcodes, unaligned payloads, boundary validation, and MI status/PEL propagation. Signed-off-by: Guangzong Chen <guangzong@google.com>
efc846b to
151958b
Compare
|
Sure, I squash them to one commit and update the commit message. |
|
The three-patch series was fine - more that the final change (to use a symbolic value for the number of BARs) was a fixup for earlier patches, so that one should be squashed in to the appropriate earlier change that it fixes. But the one-patch implementation might be okay too. |
|
Looks fine from a quick glance. I understand @jk-ozlabs is also okay with it, if so I'll merge it. |
Add high-level helper APIs, unit tests, and
mi-mctpCLI support for the NVMe-MI 1.2c Section 7 PCIe Command Set (NMIMT = 4h):src/nvme/mi.h,src/nvme/mi.c,src/libnvme-mi.map): Defineenum nvme_mi_pcie_opcodeand addnvme_mi_pcie_config_{read,write}(),nvme_mi_pcie_mem_{read,write}(), andnvme_mi_pcie_io_{read,write}()with 4-byte dword alignment handling and bounds checks.test/mi.c): Add unit tests covering all six opcodes, unaligned payload lengths, invalid parameter checks, and MI error status propagation.examples/mi-mctp.c): Addpcie-cfg-{read,write},pcie-mem-{read,write},pcie-io-{read,write}, and rawpciesubcommands.