From: Konstantin Shkolnyy <kshk@linux.ibm.com>
To: Eugenio Perez Martin <eperezma@redhat.com>,
Jason Wang <jasowang@redhat.com>
Cc: qemu-devel@nongnu.org, dtatulea@nvidia.com, Cindy Lu <lulu@redhat.com>
Subject: Re: VDPA MAC address problem
Date: Thu, 20 Mar 2025 08:59:59 -0500 [thread overview]
Message-ID: <8939a177-376a-45e1-8585-bcbaa07f084c@linux.ibm.com> (raw)
In-Reply-To: <CAJaqyWd2DspK5ALoPLxAZ-rK-7=ok7ZNkYo=xOubDLuXiq-Vbg@mail.gmail.com>
On 3/20/2025 01:54, Eugenio Perez Martin wrote:
> On Thu, Mar 20, 2025 at 1:59 AM Jason Wang <jasowang@redhat.com> wrote:
>>
>> Adding Cindy and Eugenio
>>
>> On Thu, Mar 20, 2025 at 12:34 AM Konstantin Shkolnyy <kshk@linux.ibm.com> wrote:
>>>
>>> I’m observing a problem while testing VDPA with Nvidia ConnectX-6 (mlx5)
>>> on s390.
>>>
>>> Upon start, virtio_net_device_realize() tries to set a new MAC address
>>> by VHOST_VDPA_SET_CONFIG which doesn’t do anything.
>>>
>>> Later, the VM gets started and learns about the old address from
>>> virtio_net_get_config() which returns whatever VHOST_VDPA_GET_CONFIG
>>> returns, unless it's "6 zero bytes", in which case it instead returns
>>> the desired new address (and the problem is avoided).
>>>
>>> Then QEMU again tries to set the new address from vhost_net_start(), now
>>> by calling vhost_vdpa_net_load_cmd(...,VIRTIO_NET_CTRL_MAC,
>>> VIRTIO_NET_CTRL_MAC_ADDR_SET, ...). This time the new address is
>>> successfully programmed into the NIC, but the VM doesn't know about it.
>>
>> Have you enabled shadow virtqueue? If yes, does it work if you don't do that?
>>
>
> Either you're using SVQ or not, is cmdline nic mac address the same as
> the provided with the vdpa command?
The problem happens when the cmdline address (new) is different from the
current one in the VDPA device (old), whether the old one has been set
by "vdpa dev add" or by an earlier VM run.
In other words, it's generally not possible to run a VM with an
arbitrary address - it'll have to inherit whatever the VDPA device
already has. (Except for the very first run and _only_ if "vdpa dev add"
didn't specify the address (leaving it "6 zero bytes"), or specified the
same one as the cmdline.)
Therefore, it's not possible to omit the address in the libvirt XML and
let libvirt generate it.
next prev parent reply other threads:[~2025-03-20 14:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 16:34 VDPA MAC address problem Konstantin Shkolnyy
2025-03-20 0:58 ` Jason Wang
2025-03-20 6:54 ` Eugenio Perez Martin
2025-03-20 13:59 ` Konstantin Shkolnyy [this message]
2025-03-20 9:14 ` Cindy Lu
2025-03-20 14:18 ` Konstantin Shkolnyy
2025-03-21 1:23 ` Jason Wang
2025-03-20 16:45 ` Konstantin Shkolnyy
2025-03-21 1:22 ` Jason Wang
2025-03-21 4:29 ` Konstantin Shkolnyy
2025-03-21 6:18 ` Cindy Lu
2025-03-24 4:04 ` Jason Wang
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=8939a177-376a-45e1-8585-bcbaa07f084c@linux.ibm.com \
--to=kshk@linux.ibm.com \
--cc=dtatulea@nvidia.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=lulu@redhat.com \
--cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.