[dpdk-dev] [PATCH] virtio: fix modify drv_flags for specific device

Tan, Jianfeng jianfeng.tan at intel.com
Wed Apr 27 07:10:49 CEST 2016


Hi,

On 4/26/2016 7:53 PM, David Marchand wrote:
> On Tue, Apr 26, 2016 at 4:24 AM, Jianfeng Tan <jianfeng.tan at intel.com> wrote:
>> Issue: virtio's drv_flags are decided by devices types (modern vs legacy),
>> and which kernel driver is used, and the negotiated features (especially
>> VIRTIO_NET_STATUS) with backend, which makes it possible to multiple
>> virtio devices have different versions of drv_flags, but this variable
>> is currently shared by each virtio device.
>>
>> How to fix: dev_flags is a device-specific variable to store this info.
>>
>> Fixes: da978dfdc43 ("virtio: use port IO to get PCI resource")
>>
>> Reported-by: David Marchand <david.marchand at 6wind.com>
>> Suggested-by: David Marchand <david.marchand at 6wind.com>
>> Signed-off-by: Jianfeng Tan <jianfeng.tan at intel.com>
> - ethdev dev_flags is supposed to be filled with
> RTE_ETH_DEV_DETACHABLE, RTE_ETH_DEV_INTR_LSC etc... not pci macros.

Oops, I'll correct it in next version.

>
> - I would have kept the init code as it is until the
> rte_eth_copy_pci_info() step, then sanitise the dev_flags, but this
> might be a matter of taste.
>
Yes, if we keep that until rte_eth_copy_pci_info() step, the drv_flags 
has already been changed.

Besides, I see bnx2x pmd could have similar issue, and the QLogic bnx2x 
maintainers are CCed to confirm.

Thanks,
Jianfeng


More information about the dev mailing list