[dpdk-dev] [PATCH v3] Fixes: ethdev: secondary process change shared memory

Ferruh Yigit ferruh.yigit at intel.com
Fri Jan 17 18:58:15 CET 2020


On 1/17/2020 8:33 AM, Andrew Rybchenko wrote:
> On 1/17/20 5:08 AM, Fang TongHao wrote:
> 
> Summary does not comply with [1].
> 
>> Fixes the secondary process changed shared memory
>> in "rte_eth_copy_pci_info" function.In that function
>> only primary can update the value of "eth_dev->data"
>> which shared by primary and secondary.
> 
> Consider:
> Avoid overwriting device flags and other information in device
> data stored in shared memory when a secondary process
> probes PCI device.
> 
> Fixes tag and CC to stable is required in accordance with [2].
> 
>> Signed-off-by: Fang TongHao <fangtonghao at sangfor.com.cn>
> 
> [1]
> https://doc.dpdk.org/guides/contributing/patches.html#commit-messages-subject-line
> [2]
> https://doc.dpdk.org/guides/contributing/patches.html#commit-messages-body
> 

For sake of having the patch in -rc1, I have updated as suggested while merging,
commit log become as following:

    ethdev: fix secondary process memory overwrite

    Avoid overwriting device flags and other information in device
    data stored in shared memory when a secondary process
    probes PCI device.

    Fixes: 494adb7f63f2 ("ethdev: add device fields from PCI layer")
    Cc: stable at dpdk.org

    Signed-off-by: Fang TongHao <fangtonghao at sangfor.com.cn>
    Reviewed-by: Andrew Rybchenko <arybchenko at solarflare.com>
    Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>


And I have added a not the the function comment as following:
   * Copy pci device info to the Ethernet device data.
 + * Shared memory (eth_dev->data) only updated by primary process, so it is safe
 + * to call this function from both primary and secondary processes.
  *


Applied to dpdk-next-net/master, thanks.


More information about the dev mailing list