qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Cindy Lu <lulu@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>,
	mjt@tls.msk.ru, QEMU Developers <qemu-devel@nongnu.org>,
	qemu-stable@nongnu.org
Subject: Re: [PATCH] virtio-net : Add check for VIRTIO_NET_F_MAC
Date: Wed, 29 Sep 2021 09:36:24 -0400	[thread overview]
Message-ID: <20210929093513-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACLfguUZ-JrcGenNecUZkaXf7upRiih73QPkhxN+fPKFaEpL8A@mail.gmail.com>

On Wed, Sep 29, 2021 at 08:08:40PM +0800, Cindy Lu wrote:
> On Wed, Sep 29, 2021 at 6:07 PM Michael Tokarev <mjt@tls.msk.ru> wrote:
> >
> > 29.09.2021 09:52, Cindy Lu wrote:
> > > For vdpa device, if the host support VIRTIO_NET_F_MAC
> > > we need to read the mac address from hardware, so need
> > > to check this bit, the logic is
> > > 1 if the host support VIRTIO_NET_F_MAC and the mac address
> > >     is correct, qemu will use the mac address in hardware
> > > 2.if the host not support , qemu will use the mac from cmdline
> >
> > So if hw supports NET_F_MAC, cmdline-provided parameter will
> > silently be ignored?
> >
> yes, this is based on the virtio spec, you can check this document in
> 5.1.5 Device Initialization
> https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html

Maybe use the hw mac if mac is not provided? If provided
make sure the command line matches the hardware, and fail
otherwise?

> Also, this check it only working for vdpa device
> > s/host not support/host does not support this feature/
> Thanks , will fix this
> >
> > > 3.if the cmdline not provide mac address, qemu will use radam mac
> > > address
> >
> > s/not/does not/
> > s/radam/random/
> >
> thanks, will fix this
> > Thanks,
> >
> > /mjt
> >



  reply	other threads:[~2021-09-29 13:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29  6:52 [PATCH] virtio-net : Add check for VIRTIO_NET_F_MAC Cindy Lu
2021-09-29 10:01 ` Michael Tokarev
2021-09-29 12:08   ` Cindy Lu
2021-09-29 13:36     ` Michael S. Tsirkin [this message]
2021-09-30  1:35       ` Cindy Lu
2021-09-30 10:46         ` Michael Tokarev

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=20210929093513-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=lulu@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@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 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).