VS: DPDK issue with reading the eth interface status?

Ciprian Pascu (Nokia) ciprian.pascu at nokia.com
Wed Dec 7 15:12:36 CET 2022


It seems that in the Linux kernel some locking has been added with this commit: https://github.com/torvalds/linux/commit/83d0feffc5695d7dc24c6b8dac9ab265533beb78:

spin_lock_irqsave(&adapter->cmd_lock, flags);

VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, VMXNET3_CMD_GET_LINK);

ret = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD);
spin_unlock_irqrestore(&adapter->cmd_lock, flags);


Ciprian.


________________________________
Lähettäjä: Ciprian Pascu (Nokia)
Lähetetty: keskiviikko 7. joulukuuta 2022 15.57
Vastaanottaja: users at dpdk.org <users at dpdk.org>; bruce.richardson at intel.com <bruce.richardson at intel.com>
Aihe: DPDK issue with reading the eth interface status?


Hi,

I encountered an issue while using dpdk-20.05 in our VMware based VMs: at times, when sysstat data is collected, dpdk signals that some eth interface is down; this happens occasionally; after sysstat data has been collected, eth interface is signaled as up; I was wondering about these lines in '__vmxnet3_dev_link_update' function:



1251 »·······VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_GET_LINK);

1252 »·······ret = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);



Is this atomic? Could this lead to problems if some other module tries to read something else at about the same time and overwrites the command?





Thanks,

Ciprian.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/users/attachments/20221207/00d9ac4e/attachment-0001.htm>


More information about the users mailing list