From: Rusty Russell <rusty@rustcorp.com.au>
To: Alex Williamson <alex.williamson@hp.com>
Cc: markmc@redhat.com, netdev@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH v2 4/4] virtio_net: Add support for VLAN filtering in the hypervisor
Date: Fri, 30 Jan 2009 16:31:32 +1030 [thread overview]
Message-ID: <200901301631.32862.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20090129230523.2672.55464.stgit@debian.lart>
On Friday 30 January 2009 09:35:23 Alex Williamson wrote:
> + if (!virtnet_send_command(vi, VIRTIO_NET_CTRL_VLAN,
> + VIRTIO_NET_CTRL_VLAN_ADD, &vid, sizeof(vid)))
> + printk(KERN_WARNING "%s: Failed to add VLAN ID %d.\n",
> + dev->name, vid);
> +}
Hmm, I should have mentioned dev_warn() in previous patches.
And possibly (since we never expect it to happen), we should move it into virtnet_send_command to save all the callers sweating on it. It'd be
less informative tho.
> + if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VLAN)) {
> + u8 enable = 1;
> +
> + /* Enable VLAN filtering */
> + if (virtnet_send_command(vi, VIRTIO_NET_CTRL_VLAN,
> + VIRTIO_NET_CTRL_VLAN_ENABLE,
> + &enable, sizeof(enable)))
> + dev->features |= NETIF_F_HW_VLAN_FILTER;
> + else
> + printk(KERN_WARNING "virtio_net: "
> + "Failed to enable VLAN filter\n");
> + }
We can kill VLAN_ENABLE. We activate it by acking the feature bit.
So this becomes:
if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VLAN))
dev->features |= NETIF_F_HW_VLAN_FILTER;
> + * The VLAN filter table is controlled via a simple ADD/DEL interface.
> + * VLAN IDs not added will be dropped. Del is the opposite of add.
> + * Both commands expect an out entry containing a 2 byte VLAN ID.
s/will be dropped/may be filtered out by the host/ ?
Cheers,
Rusty.
next prev parent reply other threads:[~2009-01-30 6:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-29 23:05 [PATCH v2 0/4] virtio_net: Add MAC and VLAN filtering Alex Williamson
2009-01-29 23:05 ` [PATCH v2 1/4] virtio_net: Add a virtqueue for outbound control commands Alex Williamson
2009-01-30 5:08 ` Rusty Russell
2009-01-29 23:05 ` [PATCH v2 2/4] virtio_net: Add a set_rx_mode interface Alex Williamson
2009-01-30 5:30 ` Rusty Russell
2009-01-29 23:05 ` [PATCH v2 3/4] virtio_net: Add a MAC filter table Alex Williamson
2009-01-30 5:46 ` Rusty Russell
2009-01-29 23:05 ` [PATCH v2 4/4] virtio_net: Add support for VLAN filtering in the hypervisor Alex Williamson
2009-01-30 6:01 ` Rusty Russell [this message]
2009-01-30 1:49 ` [PATCH v2 0/4] virtio_net: Add MAC and VLAN filtering David Miller
2009-01-30 7:05 ` Rusty Russell
2009-01-30 7:12 ` David Miller
2009-01-30 5:03 ` Rusty Russell
2009-02-01 20:05 ` [PATCH v3 " Alex Williamson
2009-02-01 20:05 ` [PATCH v3 1/4] virtio_net: Add a virtqueue for outbound control commands Alex Williamson
2009-02-02 9:40 ` Rusty Russell
2009-02-02 14:10 ` Anthony Liguori
2009-02-01 20:05 ` [PATCH v3 2/4] virtio_net: Add a set_rx_mode interface Alex Williamson
2009-02-02 9:52 ` Rusty Russell
2009-02-02 21:34 ` Alex Williamson
2009-02-03 2:54 ` Rusty Russell
2009-02-01 20:05 ` [PATCH v3 3/4] virtio_net: Add a MAC filter table Alex Williamson
2009-02-02 9:57 ` Rusty Russell
2009-02-01 20:05 ` [PATCH v3 4/4] virtio_net: Add support for VLAN filtering in the hypervisor Alex Williamson
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=200901301631.32862.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=alex.williamson@hp.com \
--cc=kvm@vger.kernel.org \
--cc=markmc@redhat.com \
--cc=netdev@vger.kernel.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).