Re: [dpdk-dev] [PATCH] bus/pci: nvme on Windows requires class id and bus

2021-01-27 Thread Tal Shnaiderman
> Subject: Re: [PATCH] bus/pci: nvme on Windows requires class id and bus > > External email: Use caution opening links or attachments > > > Hi Tal, > > Thanks for the comments. > > >> + /* Try and find PCI class ID */ > >> + for (cp = buf; !(cp[0] == 0 && cp[1] == 0); cp++) > > Ho

Re: [dpdk-dev] [PATCH] bus/pci: nvme on Windows requires class id and bus

2021-01-27 Thread Nick Connolly
On 26/01/2021 22:41, Thomas Monjalon wrote: That's true. Comparisons should be explicit. Thanks Thomas, Nick

Re: [dpdk-dev] [PATCH] bus/pci: nvme on Windows requires class id and bus

2021-01-26 Thread Thomas Monjalon
26/01/2021 19:18, Nick Connolly: > Hi Tal, > > Thanks for the comments. > > >> + /* Try and find PCI class ID */ > >> + for (cp = buf; !(cp[0] == 0 && cp[1] == 0); cp++) > > How about > > for (cp = buf; cp[0] || cp[1]; cp++) > That would be my preferred idiom, but the DPDK coding styl

Re: [dpdk-dev] [PATCH] bus/pci: nvme on Windows requires class id and bus

2021-01-26 Thread Nick Connolly
Hi Tal, Thanks for the comments. + /* Try and find PCI class ID */ + for (cp = buf; !(cp[0] == 0 && cp[1] == 0); cp++) How about for (cp = buf; cp[0] || cp[1]; cp++) That would be my preferred idiom, but the DPDK coding style (1.9.1) says 'do not use ! for tests unless it is a boo

Re: [dpdk-dev] [PATCH] bus/pci: nvme on Windows requires class id and bus

2021-01-26 Thread Tal Shnaiderman
> Subject: [PATCH] bus/pci: nvme on Windows requires class id and bus > > External email: Use caution opening links or attachments > > > Attaching to an NVMe disk on Windows using SPDK requires the PCI class ID > and device.bus fields. Decode the class ID from the PCI device info strings > if i

[dpdk-dev] [PATCH] bus/pci: nvme on Windows requires class id and bus

2021-01-25 Thread Nick Connolly
Attaching to an NVMe disk on Windows using SPDK requires the PCI class ID and device.bus fields. Decode the class ID from the PCI device info strings if it is present and set device.bus. Signed-off-by: Nick Connolly --- drivers/bus/pci/windows/pci.c | 10 +- 1 file changed, 9 insertions(