[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 6/8] qemu:virtio-net: Enable filtering based
From: |
malc |
Subject: |
Re: [Qemu-devel] [PATCH v2 6/8] qemu:virtio-net: Enable filtering based on MAC, promisc, broadcast and allmulti |
Date: |
Wed, 4 Feb 2009 03:18:10 +0300 (MSK) |
On Tue, 3 Feb 2009, Anthony Liguori wrote:
> Blue Swirl wrote:
> > On 2/3/09, Alex Williamson <address@hidden> 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 <address@hidden>
> > >
> >
> >
> > > + 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.
It does generate different code, bcast is being put into rodata in case
of const and data otherwise, whether it makes practical difference for
QEMU is another matter.
--
mailto:address@hidden
- [Qemu-devel] Re: [PATCH v2 4/8] qemu:virtio-net: Add a virtqueue for control commands from the guest, (continued)
[Qemu-devel] [PATCH v2 5/8] qemu:virtio-net: Add promiscuous and all-multicast mode bits, Alex Williamson, 2009/02/03
[Qemu-devel] [PATCH v2 6/8] qemu:virtio-net: Enable filtering based on MAC, promisc, broadcast and allmulti, Alex Williamson, 2009/02/03
- Re: [Qemu-devel] [PATCH v2 6/8] qemu:virtio-net: Enable filtering based on MAC, promisc, broadcast and allmulti, Blue Swirl, 2009/02/03
- Re: [Qemu-devel] [PATCH v2 6/8] qemu:virtio-net: Enable filtering based on MAC, promisc, broadcast and allmulti, Anthony Liguori, 2009/02/03
- Re: [Qemu-devel] [PATCH v2 6/8] qemu:virtio-net: Enable filtering based on MAC, promisc, broadcast and allmulti, Paul Brook, 2009/02/03
- Re: [Qemu-devel] [PATCH v2 6/8] qemu:virtio-net: Enable filtering based on MAC, promisc, broadcast and allmulti,
malc <=
[Qemu-devel] [PATCH v2 7/8] qemu:virtio-net: Add additional MACs via a filter table, Alex Williamson, 2009/02/03
[Qemu-devel] [PATCH v2 8/8] qemu:virtio-net: Add VLAN filtering, Alex Williamson, 2009/02/03