* dpdk-virio get wrong mac
@ 2023-10-20 6:53 杨佳昊
0 siblings, 0 replies; only message in thread
From: 杨佳昊 @ 2023-10-20 6:53 UTC (permalink / raw)
To: users
[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]
dpdk:dpdk-20.08
Host: Dell ubuntu-PowerEdge-R740 22.04
virtual machine:arch linux kernel3.16.44
Virtual machine driver: virtio-transitional(0.95)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Problem Description:
In virtio kernel driver,everything goes right.
In dpdk,I get mac wrong on fist dpdk boot.when,dpdk reboot,mac is right.
By debugging, in legacy_read_dev_config dpdk-virio read mac by wrong offset
< rte_pci_ioport_read(VTPCI_IO(hw), dst, length,
< VIRTIO_PCI_CONFIG(hw) + offset);
< #define VIRTIO_PCI_CONFIG(hw) \
< (((hw)->use_msix == VIRTIO_MSIX_ENABLED) ? 24 : 20)
I found dpdk reads pci config with offset by hw->use_msix. In kernel dmesg, it shows that MSIX is enable.But,value of hw->misx in dpdk-virtio is uncertain.
The above description causes the starting address of reading mac to be either 4 bits ahead or 4 bits behind.
However, after restarting dpdk once,dpdk no longer uses the legacy interface, but the modern interface.The mac got through the modern interface is always correct.
I don't know if this is a bug in dpdk,or there is something wrong with my environment?
[-- Attachment #2: Type: text/html, Size: 6257 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-23 11:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-20 6:53 dpdk-virio get wrong mac 杨佳昊
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).