[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH] net/net: Record usage status of mac address
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC PATCH] net/net: Record usage status of mac address |
Date: |
Tue, 26 May 2015 11:08:12 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, May 21, 2015 at 05:44:48PM +0800, Shannon Zhao wrote:
> From: Shannon Zhao <address@hidden>
>
> Currently QEMU dynamically generates mac address for the NIC which
> doesn't specify the mac address. But when we hotplug a NIC without
> specifying mac address, the mac address will increase for the same NIC
> along with hotplug and hot-unplug, and at last it will overflow. And if
> we codeplug one NIC with mac address e.g. "52:54:00:12:34:56", then
> hotplug one NIC without specifying mac address and the mac address of
> the hotplugged NIC is duplicate of "52:54:00:12:34:56".
>
> This patch add a mac_table to record the usage status and free the mac
> address when the NIC is unrealized.
>
> Signed-off-by: Shannon Zhao <address@hidden>
> Signed-off-by: Shannon Zhao <address@hidden>
> ---
> net/net.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 55 insertions(+), 4 deletions(-)
Thanks, applied to my net tree:
https://github.com/stefanha/qemu/commits/net
Stefan
pgpi9R5MpuRLe.pgp
Description: PGP signature