From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH net-next 1/3] virtio_net: set multicast filter list to host Date: Tue, 10 Dec 2013 17:24:29 +0200 Message-ID: <20131210152429.GB25293@redhat.com> References: <20131209161632.5ac96e5a@nehalam.linuxnetplumber.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, David Miller , virtualization@lists.linux-foundation.org To: Stephen Hemminger Return-path: Content-Disposition: inline In-Reply-To: <20131209161632.5ac96e5a@nehalam.linuxnetplumber.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org List-Id: netdev.vger.kernel.org On Mon, Dec 09, 2013 at 04:16:32PM -0800, Stephen Hemminger wrote: > The virtio_net driver never sends the multicast address list to > the host. This is because send command takes a pointer to scatter list > to send but only inserts that one entry into the outgoing scatter list. > > This bug has been there since: > commit f565a7c259d71cc186753653d978c646d2354b36 > Author: Alex Williamson > Date: Wed Feb 4 09:02:45 2009 +0000 > > virtio_net: Add a MAC filter table > > Signed-off-by: Stephen Hemminger Acked-by: Michael S. Tsirkin Question is, can we detect a broken driver in the host somehow? If not we'll need a feature bit for hosts to actually do MC filtering. > --- a/drivers/net/virtio_net.c 2013-12-09 16:12:03.897891975 -0800 > +++ b/drivers/net/virtio_net.c 2013-12-09 16:12:36.353164803 -0800 > @@ -893,7 +893,7 @@ static bool virtnet_send_command(struct > sg_init_one(&hdr, &ctrl, sizeof(ctrl)); > sgs[out_num++] = &hdr; > > - if (out) > + for (; out; out = sg_next(out)) > sgs[out_num++] = out; > if (in) > sgs[out_num + in_num++] = in;