From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUSHP-0002mI-TQ for qemu-devel@nongnu.org; Tue, 03 Feb 2009 15:53:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUSHP-0002kv-9e for qemu-devel@nongnu.org; Tue, 03 Feb 2009 15:53:59 -0500 Received: from [199.232.76.173] (port=40015 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUSHO-0002kQ-Sm for qemu-devel@nongnu.org; Tue, 03 Feb 2009 15:53:58 -0500 Received: from mail-qy0-f20.google.com ([209.85.221.20]:54643) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LUSHM-0004gs-SK for qemu-devel@nongnu.org; Tue, 03 Feb 2009 15:53:57 -0500 Received: by qyk13 with SMTP id 13so4220178qyk.10 for ; Tue, 03 Feb 2009 12:53:51 -0800 (PST) Message-ID: <4988AECB.2070208@codemonkey.ws> Date: Tue, 03 Feb 2009 14:53:31 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2 6/8] qemu:virtio-net: Enable filtering based on MAC, promisc, broadcast and allmulti References: <20090203192932.19598.50925.stgit@kvm.aw> <20090203193004.19598.51326.stgit@kvm.aw> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: markmc@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org Blue Swirl wrote: > On 2/3/09, Alex Williamson wrote: > >> Make use of the new RX_MODE control virtqueue class by dropping >> packets the guest doesn't want to see. >> >> Signed-off-by: Alex Williamson >> > > >> + static uint8_t bcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; >> > > 'const'? > It may be good practice but practically speaking, I don't think it will generate different code. The only thing that uses bcast is memcmp() which should be a builtin. Since bcast doesn't otherwise escape the function, it's an obvious candidate for optimization. I think the compiler already has enough information that const doesn't tell it anything more. Regards, Anthony Liguori