From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uk82M-0000ko-Mj for qemu-devel@nongnu.org; Wed, 05 Jun 2013 03:21:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uk82I-00011A-4F for qemu-devel@nongnu.org; Wed, 05 Jun 2013 03:21:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uk82H-00010y-TU for qemu-devel@nongnu.org; Wed, 05 Jun 2013 03:21:34 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r557LXhO014893 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 5 Jun 2013 03:21:33 -0400 Date: Wed, 5 Jun 2013 15:21:30 +0800 From: Amos Kong Message-ID: <20130605072130.GB4705@t430s.nay.redhat.com> References: <1370412828-15960-1-git-send-email-akong@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1370412828-15960-1-git-send-email-akong@redhat.com> Subject: Re: [Qemu-devel] [PATCH] virtio-net: fix wrong size of vlan filter table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: alex.williamson@redhat.com, mst@redhat.com On Wed, Jun 05, 2013 at 02:13:48PM +0800, Amos Kong wrote: > The MAX_VLAN is 4096, currently the vlan filter table has 512 > (4096 >> 3) entries, it's wrong. > > One entry in vlan filter table can indicate 32(1 << 5) vlans, > so the table should have 128 (4096 >> 5) entries. > > Signed-off-by: Amos Kong > --- This patch breaks the migration. > btw, it would be simple to use an uint32 number to indicate > all vlans (same as igbvf). I found e1000 uses the same table. > Nothing needs to change here, it would cause migration issue. The comment is wrong, igbvf also uses an array. Will post a v2 with migration fix. > --- > hw/net/virtio-net.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > -- Amos.