Re: [dpdk-dev] [PATCH v7 2/2] bus/pci: support MMIO in PCI ioport accessors
From: 谢华伟(此时此刻) <hidden>
Date: 2021-03-03 07:56:38
On 2021/3/2 21:14, David Marchand wrote:
quoted
quoted
This change is a fix/optimisation. This is a separate topic from adding MMIO support with x86 ioport. I would split as a separate patch.Hi David: Maybe there is confuse? There is no change. The out/in is added. I don't remove _p on purpose.Looking at v8 and repeating previous mails: +#if defined(RTE_ARCH_X86) ... +static inline void iowrite8(uint8_t val, void *addr) +{ + (uint64_t)(uintptr_t)addr >= PIO_MAX ? + *(volatile uint8_t *)addr = val : + outb(val, (unsigned long)addr); <====== +} [...] -#if defined(RTE_ARCH_X86) - outb_p(*s, reg); <====== -#else - *(volatile uint8_t *)reg = *s; -#endif + iowrite8(*s, (void *)reg); This almost went unnoticed (thanks Ferruh for spotting). Do we_need_ this change on outX_p -> outX?
I understand where the confuse comes from. In the previous implementation, it is _p version, however i think _p is not needed. In the initial DPDK virtio PMD, there is no _p, if my memory is correct. Don't know who added it, if any reason. Anyway, i will send v9 with _p.
I am not comfortable at touching such low level internal routines that have been in dpdk since v1.5.0. If there is a good reason, it has nothing to do with adding MMIO support and must be split in a separate patch. If there is no reason, please restore outX_p, since the safest is not to touch.