From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] [PATCH v2 6/8] qemu:virtio-net: Enable filtering based on MAC, promisc, broadcast and allmulti Date: Tue, 03 Feb 2009 14:53:31 -0600 Message-ID: <4988AECB.2070208@codemonkey.ws> References: <20090203192932.19598.50925.stgit@kvm.aw> <20090203193004.19598.51326.stgit@kvm.aw> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, markmc@redhat.com, kvm@vger.kernel.org To: Blue Swirl Return-path: Received: from mail-qy0-f11.google.com ([209.85.221.11]:63920 "EHLO mail-qy0-f11.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751244AbZBCUxx (ORCPT ); Tue, 3 Feb 2009 15:53:53 -0500 Received: by qyk4 with SMTP id 4so2902877qyk.13 for ; Tue, 03 Feb 2009 12:53:51 -0800 (PST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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