All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: akong@redhat.com, mst@redhat.com
Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, stefanha@redhat.com,
	virtualization@lists.linux-foundation.org
Subject: Re: [QEMU PATCH v2] virtio-net: introduce a new macaddr control
Date: Thu, 17 Jan 2013 11:49:20 +1030	[thread overview]
Message-ID: <87mww8y5bb.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1358317007-29972-1-git-send-email-akong@redhat.com>

akong@redhat.com writes:
> @@ -349,6 +351,14 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd,
>  {
>      struct virtio_net_ctrl_mac mac_data;
>  
> +    if (cmd == VIRTIO_NET_CTRL_MAC_ADDR_SET && elem->out_num == 2 &&
> +        elem->out_sg[1].iov_len == ETH_ALEN) {
> +        /* Set MAC address */
> +        memcpy(n->mac, elem->out_sg[1].iov_base, elem->out_sg[1].iov_len);
> +        qemu_format_nic_info_str(&n->nic->nc, n->mac);
> +        return VIRTIO_NET_OK;
> +    }

Does the rest of the net device still rely on the layout of descriptors?
If so, OK, we'll fix them all together.  If not, this introduces a new
one.

Cheers,
Rusty.

WARNING: multiple messages have this Message-ID (diff)
From: Rusty Russell <rusty@rustcorp.com.au>
To: akong@redhat.com, mst@redhat.com
Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, stefanha@redhat.com,
	virtualization@lists.linux-foundation.org
Subject: Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control
Date: Thu, 17 Jan 2013 11:49:20 +1030	[thread overview]
Message-ID: <87mww8y5bb.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1358317007-29972-1-git-send-email-akong@redhat.com>

akong@redhat.com writes:
> @@ -349,6 +351,14 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd,
>  {
>      struct virtio_net_ctrl_mac mac_data;
>  
> +    if (cmd == VIRTIO_NET_CTRL_MAC_ADDR_SET && elem->out_num == 2 &&
> +        elem->out_sg[1].iov_len == ETH_ALEN) {
> +        /* Set MAC address */
> +        memcpy(n->mac, elem->out_sg[1].iov_base, elem->out_sg[1].iov_len);
> +        qemu_format_nic_info_str(&n->nic->nc, n->mac);
> +        return VIRTIO_NET_OK;
> +    }

Does the rest of the net device still rely on the layout of descriptors?
If so, OK, we'll fix them all together.  If not, this introduces a new
one.

Cheers,
Rusty.

  parent reply	other threads:[~2013-01-17  1:19 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16  5:56 [PATCH v2 0/2] make mac programming for virtio net more robust akong
2013-01-16  5:56 ` [Qemu-devel] " akong
2013-01-16  5:57 ` [PATCH v2 1/2] move virtnet_send_command() above virtnet_set_mac_address() akong
2013-01-16  5:57   ` [Qemu-devel] " akong
2013-01-16  5:57 ` akong
2013-01-16  5:57 ` [PATCH v2 2/2] virtio-net: introduce a new control to set macaddr akong
2013-01-16  5:57 ` akong
2013-01-16  5:57   ` [Qemu-devel] " akong
2013-01-16  6:20   ` Jason Wang
2013-01-16  6:20     ` [Qemu-devel] " Jason Wang
2013-01-16  8:24     ` Amos Kong
2013-01-16  8:24     ` Amos Kong
2013-01-16  8:24       ` [Qemu-devel] " Amos Kong
2013-01-16  8:36       ` Michael S. Tsirkin
2013-01-16  8:36         ` [Qemu-devel] " Michael S. Tsirkin
2013-01-16  6:16 ` [QEMU PATCH v2] virtio-net: introduce a new macaddr control akong
2013-01-16  6:16   ` [Qemu-devel] " akong
2013-01-16  6:37   ` Jason Wang
2013-01-16  6:37     ` [Qemu-devel] " Jason Wang
2013-01-16  8:19     ` Michael S. Tsirkin
2013-01-16  8:19       ` [Qemu-devel] " Michael S. Tsirkin
2013-01-16  8:59     ` Stefan Hajnoczi
2013-01-16  8:59       ` [Qemu-devel] " Stefan Hajnoczi
2013-01-16  9:07       ` Michael S. Tsirkin
2013-01-16  9:07         ` [Qemu-devel] " Michael S. Tsirkin
2013-01-16  9:07       ` Michael S. Tsirkin
2013-01-17  1:19   ` Rusty Russell [this message]
2013-01-17  1:19     ` [Qemu-devel] " Rusty Russell
2013-01-17  5:45     ` Amos Kong
2013-01-17  8:37       ` Amos Kong
2013-01-17  8:39       ` Stefan Hajnoczi
2013-01-17  8:39         ` Stefan Hajnoczi
2013-01-17  9:34         ` Michael S. Tsirkin
2013-01-17  9:34           ` Michael S. Tsirkin
2013-01-17 12:13     ` Michael S. Tsirkin
2013-01-17 12:13       ` [Qemu-devel] " Michael S. Tsirkin
2013-01-18  2:43       ` Amos Kong
2013-01-18  2:43         ` [Qemu-devel] " Amos Kong
2013-01-16  6:16 ` akong

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=87mww8y5bb.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=akong@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.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.