[dpdk-dev] [RFC PATCH] igb_uio: issue FLR during open and release of device file

Ferruh Yigit ferruh.yigit at intel.com
Wed May 31 19:11:40 CEST 2017


On 5/31/2017 4:30 PM, Stephen Hemminger wrote:
> On Wed, 31 May 2017 13:20:08 +0100
> Ferruh Yigit <ferruh.yigit at intel.com> wrote:
> 
>> On 5/31/2017 12:09 PM, Shijith Thotton wrote:
>>> Set UIO info device file operations open and release. Call pci reset
>>> function inside open and release to clear device state at start and
>>> end. Copied this behaviour from vfio_pci kernel module code. With this
>>> change, it is not mandatory to issue FLR by PMD's during init and close.  
>>
>> Cc: Jianfeng Tan <jianfeng.tan at intel.com>
>>
>> Jianfeng also implemented following patch:
>> http://dpdk.org/dev/patchwork/patch/17495/
>>
>> Which also implements release and open ops, for slightly different
>> reason (prevent DMA access after app exit), but mainly both are to
>> gracefully handle application exit status.
>>
>> btw, for Jianfeng's case, can adding pci_clear_master() in release and
>> moving pci_set_master() to open help preventing unwanted DMA?
>>
>>
>> Gregory,
>>
>> Can you please check if this patch fixes your issue?
>>
>> Thanks,
>> ferruh
> 
> pci_reset should stop all DMA. It also clears master status.

If so, should open() call pci_set_master(), currently it has been only
called by igbuio_pci_probe() once?


More information about the dev mailing list