[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/2] net: introduce command to query mac-tabl
Re: [Qemu-devel] [PATCH v2 2/2] net: introduce command to query mac-table information
Tue, 21 May 2013 11:31:59 +0800
On Thu, May 16, 2013 at 03:19:54PM +0300, Michael S. Tsirkin wrote:
> On Thu, May 16, 2013 at 07:07:25PM +0800, Amos Kong wrote:
> > We want to implement mac programming over macvtap through Libvirt.
> > The previous patch adds QMP event to notify management of mac-table
> > change. This patch adds a monitor command to query rx mode information
> > of mac-tables.
> > (qemu) info mac-table vnet0
> > vnet0:
> > \ promisc: on
> > \ allmulti: off
> > \ alluni: off
> > \ nomulti: off
> > \ nouni: off
> > \ nobcast: off
> > \ multi_overflow: off
> > \ uni_overflow: off
> > \ multicast:
> > 01:00:5e:00:00:01
> > 33:33:00:00:00:01
> > 33:33:ff:12:34:56
> > Signed-off-by: Amos Kong <address@hidden>
> It's an interesting example.
> There are no unicast addresses at all?
Currently we save the main MAC in n->mac (not in n->mactable).
I only output the content of n->mactable.
And main MAC doesn't exist in guest's virtio_net_dev->uc, so it's not
The main MAC can also be got by 'info network', but not coverted to QMP.
I will add main MAC in query result and add event for its change.
I just started a guest by :
qemu .. -device virtio-net-pci,netdev=ndev1,id=id1 -netdev tap,id=ndev1 \
-device e1000,netdev=ndev2,id=id2 -netdev tap,id=ndev2
The default mac address was used.
e1000 nic: 52:54:00:12:34:57
52:54:00:12:34:56 doesn't exist in guest's virtio_net_dev->uc.
I tried to add a new vlan for virtio-nic in guest
# vconfig add eth1 3 up
then changed mac of eth1
# ifconfig eth1 hw ether 12:34:00:00:00:00
then I can see a mac address in unicast part of mac-table
(qemu) info mac-table
> I'm guessing you are missing the main MAC.
Re: [Qemu-devel] [PATCH v2 1/2] net: introduce MAC_TABLE_CHANGED event, Eric Blake, 2013/05/16
[Qemu-devel] [PATCH v2 2/2] net: introduce command to query mac-table information, Amos Kong, 2013/05/16
Re: [Qemu-devel] [PATCH v2 2/2] net: introduce command to query mac-table information, Jason Wang, 2013/05/29