From: 杨佳昊 <yang_jiahao@venusgroup.com.cn>
To: "users" <users@dpdk.org>
Subject: dpdk-virio get wrong mac
Date: Fri, 20 Oct 2023 14:53:58 +0800 [thread overview]
Message-ID: <a635771d7b829a14e162d4b19c422e635c32817f.3296cb54.e3ad.4b10.b6fd.4a9bbd78fe64@feishu.cn> (raw)
[-- 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 --]
reply other threads:[~2023-10-23 11:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a635771d7b829a14e162d4b19c422e635c32817f.3296cb54.e3ad.4b10.b6fd.4a9bbd78fe64@feishu.cn \
--to=yang_jiahao@venusgroup.com.cn \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).