* [PATCH qemu 0/1] MAC address falls to permanent
@ 2023-01-31 18:20 Vlao Mao
2023-01-31 18:20 ` [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset Vlao Mao
2023-01-31 18:48 ` [PATCH qemu 0/1] MAC address falls to permanent Peter Maydell
0 siblings, 2 replies; 9+ messages in thread
From: Vlao Mao @ 2023-01-31 18:20 UTC (permalink / raw)
To: dmitry; +Cc: jasowang, qemu-trivial, qemu-devel, laurent
A bug was found with the vmxnet3 driver, after changing the MAC address
and rebooting, it falls into the category of a permanent address until
the VM is turned off. Here is log output:
-bash-4.4# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
-bash-4.4# ip link set dev ens3 address 33:33:33:33:33:33
-bash-4.4# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000
link/ether 33:33:33:33:33:33 brd ff:ff:ff:ff:ff:ff
-bash-4.4# ethtool -P ens3
Permanent address: 52:54:00:12:34:56
-bash-4.4# reboot
//rebooting
-bash-4.4# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000
link/ether 33:33:33:33:33:33 brd ff:ff:ff:ff:ff:ff
-bash-4.4# ethtool -P ens3
Permanent address: 33:33:33:33:33:33
-bash-4.4#
Vlao Mao (1):
vmxnet3: add mac address restore upon reset
hw/net/vmxnet3.c | 2 ++
1 file changed, 2 insertions(+)
--
2.35.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset
2023-01-31 18:20 [PATCH qemu 0/1] MAC address falls to permanent Vlao Mao
@ 2023-01-31 18:20 ` Vlao Mao
2023-01-31 18:48 ` [PATCH qemu 0/1] MAC address falls to permanent Peter Maydell
1 sibling, 0 replies; 9+ messages in thread
From: Vlao Mao @ 2023-01-31 18:20 UTC (permalink / raw)
To: dmitry; +Cc: jasowang, qemu-trivial, qemu-devel, laurent, VlaoMao
From: VlaoMao <vlaomao@gmail.com>
Changing the address with a subsequent reboot makes this address permanent until the vm is turned off
Signed-off-by: Vlao Mao <vlaomao@gmail.com>
---
hw/net/vmxnet3.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 04159c8222..695ca2f923 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -1206,6 +1206,8 @@ static void vmxnet3_reset(VMXNET3State *s)
s->drv_shmem = 0;
s->tx_sop = true;
s->skip_current_tx_pkt = false;
+
+ vmxnet3_reset_mac(s);
}
static void vmxnet3_update_rx_mode(VMXNET3State *s)
--
2.35.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH qemu 0/1] MAC address falls to permanent
2023-01-31 18:20 [PATCH qemu 0/1] MAC address falls to permanent Vlao Mao
2023-01-31 18:20 ` [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset Vlao Mao
@ 2023-01-31 18:48 ` Peter Maydell
2023-01-31 19:08 ` Влад Мао
1 sibling, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2023-01-31 18:48 UTC (permalink / raw)
To: Vlao Mao; +Cc: dmitry, jasowang, qemu-trivial, qemu-devel, laurent
On Tue, 31 Jan 2023 at 18:22, Vlao Mao <vlaomao@gmail.com> wrote:
>
> A bug was found with the vmxnet3 driver, after changing the MAC address
> and rebooting, it falls into the category of a permanent address until
> the VM is turned off.
For some network device models (those where the hardware has an
EEPROM and we're modelling "guest programmed a new MAC address
into the EEPROM") that is the correct behaviour. Is the vmxnet3
definitely one of the kind which is not supposed to have a
permanent MAC address backing storage ? (It's paravirtual, so
this would hopefully be indicated in the specs for it.)
thanks
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH qemu 0/1] MAC address falls to permanent
2023-01-31 18:48 ` [PATCH qemu 0/1] MAC address falls to permanent Peter Maydell
@ 2023-01-31 19:08 ` Влад Мао
0 siblings, 0 replies; 9+ messages in thread
From: Влад Мао @ 2023-01-31 19:08 UTC (permalink / raw)
To: Peter Maydell; +Cc: dmitry, jasowang, qemu-trivial, qemu-devel, laurent
I cannot say for sure, but e1000 does not have this behavior, vmxnet3
in vmware also does not behave this way.
In addition, the address gets there only after a reboot, it does not
get there during normal operation, as you can see from logs i
attached. It seems to me that this is not quite the expected behavior,
isn't it?
вт, 31 янв. 2023 г. в 21:48, Peter Maydell <peter.maydell@linaro.org>:
>
> On Tue, 31 Jan 2023 at 18:22, Vlao Mao <vlaomao@gmail.com> wrote:
> >
> > A bug was found with the vmxnet3 driver, after changing the MAC address
> > and rebooting, it falls into the category of a permanent address until
> > the VM is turned off.
>
> For some network device models (those where the hardware has an
> EEPROM and we're modelling "guest programmed a new MAC address
> into the EEPROM") that is the correct behaviour. Is the vmxnet3
> definitely one of the kind which is not supposed to have a
> permanent MAC address backing storage ? (It's paravirtual, so
> this would hopefully be indicated in the specs for it.)
>
> thanks
> -- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH qemu 0/1] MAC address falls to permanent
@ 2023-01-31 18:23 Vlao Mao
2023-01-31 18:23 ` [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset Vlao Mao
0 siblings, 1 reply; 9+ messages in thread
From: Vlao Mao @ 2023-01-31 18:23 UTC (permalink / raw)
To: dmitry; +Cc: jasowang, qemu-trivial, qemu-devel, laurent
A bug was found with the vmxnet3 driver, after changing the MAC address
and rebooting, it falls into the category of a permanent address until
the VM is turned off. Here is log output:
-bash-4.4# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
-bash-4.4# ip link set dev ens3 address 33:33:33:33:33:33
-bash-4.4# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000
link/ether 33:33:33:33:33:33 brd ff:ff:ff:ff:ff:ff
-bash-4.4# ethtool -P ens3
Permanent address: 52:54:00:12:34:56
-bash-4.4# reboot
//rebooting
-bash-4.4# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000
link/ether 33:33:33:33:33:33 brd ff:ff:ff:ff:ff:ff
-bash-4.4# ethtool -P ens3
Permanent address: 33:33:33:33:33:33
-bash-4.4#
Vlao Mao (1):
vmxnet3: add mac address restore upon reset
hw/net/vmxnet3.c | 2 ++
1 file changed, 2 insertions(+)
--
2.35.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset
2023-01-31 18:23 Vlao Mao
@ 2023-01-31 18:23 ` Vlao Mao
0 siblings, 0 replies; 9+ messages in thread
From: Vlao Mao @ 2023-01-31 18:23 UTC (permalink / raw)
To: dmitry; +Cc: jasowang, qemu-trivial, qemu-devel, laurent
Changing the address with a subsequent reboot makes this address permanent until the vm is turned off
Signed-off-by: Vlao Mao <vlaomao@gmail.com>
---
hw/net/vmxnet3.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 04159c8222..695ca2f923 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -1206,6 +1206,8 @@ static void vmxnet3_reset(VMXNET3State *s)
s->drv_shmem = 0;
s->tx_sop = true;
s->skip_current_tx_pkt = false;
+
+ vmxnet3_reset_mac(s);
}
static void vmxnet3_update_rx_mode(VMXNET3State *s)
--
2.35.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH qemu 0/1] vmxnet3: MAC address falls to permanent
@ 2023-01-30 19:06 ~vlaomao
2023-01-30 17:28 ` [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset ~vlaomao
0 siblings, 1 reply; 9+ messages in thread
From: ~vlaomao @ 2023-01-30 19:06 UTC (permalink / raw)
To: dmitry; +Cc: jasowang, qemu-trivial, qemu-devel, laurent
A bug was found with the vmxnet3 driver, after changing the MAC address
and rebooting, it falls into the category of a permanent address until
the VM is turned off. Here is log output:
-bash-4.4# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
-bash-4.4# ip link set dev ens3 address 33:33:33:33:33:33
-bash-4.4# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000
link/ether 33:33:33:33:33:33 brd ff:ff:ff:ff:ff:ff
-bash-4.4# ethtool -P ens3
Permanent address: 52:54:00:12:34:56
-bash-4.4# reboot
//rebooting
-bash-4.4# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000
link/ether 33:33:33:33:33:33 brd ff:ff:ff:ff:ff:ff
-bash-4.4# ethtool -P ens3
Permanent address: 33:33:33:33:33:33
-bash-4.4#
VlaoMao (1):
vmxnet3: add mac address restore upon reset
hw/net/vmxnet3.c | 2 ++
1 file changed, 2 insertions(+)
--
2.34.5
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset
2023-01-30 19:06 [PATCH qemu 0/1] vmxnet3: MAC address falls to permanent ~vlaomao
@ 2023-01-30 17:28 ` ~vlaomao
2023-01-31 17:50 ` Laurent Vivier
0 siblings, 1 reply; 9+ messages in thread
From: ~vlaomao @ 2023-01-30 17:28 UTC (permalink / raw)
To: dmitry; +Cc: jasowang, qemu-trivial, qemu-devel, laurent
From: VlaoMao <vlaomao@gmail.com>
Changing the address with a subsequent reboot makes this address permanent until the vm is turned off
---
Signed-off-by: Vlao Mao <vlaomao@gmail.com>
hw/net/vmxnet3.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 04159c822..695ca2f92 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -1206,6 +1206,8 @@ static void vmxnet3_reset(VMXNET3State *s)
s->drv_shmem = 0;
s->tx_sop = true;
s->skip_current_tx_pkt = false;
+
+ vmxnet3_reset_mac(s);
}
static void vmxnet3_update_rx_mode(VMXNET3State *s)
--
2.34.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset
2023-01-30 17:28 ` [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset ~vlaomao
@ 2023-01-31 17:50 ` Laurent Vivier
0 siblings, 0 replies; 9+ messages in thread
From: Laurent Vivier @ 2023-01-31 17:50 UTC (permalink / raw)
To: ~vlaomao; +Cc: jasowang, qemu-trivial, qemu-devel, dmitry
Le 30/01/2023 à 18:28, ~vlaomao a écrit :
> From: VlaoMao <vlaomao@gmail.com>
>
> Changing the address with a subsequent reboot makes this address permanent until the vm is turned off
> ---
> Signed-off-by: Vlao Mao <vlaomao@gmail.com>
As the Signed-off-by is part of the commit message it must be set before the signature signs ("---").
And the "From:" field must have the same value as the "Signed-off-by:" field (a space is missing in
your "From:" field -> Vlao Mao).
Thanks,
Laurent
>
> hw/net/vmxnet3.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
> index 04159c822..695ca2f92 100644
> --- a/hw/net/vmxnet3.c
> +++ b/hw/net/vmxnet3.c
> @@ -1206,6 +1206,8 @@ static void vmxnet3_reset(VMXNET3State *s)
> s->drv_shmem = 0;
> s->tx_sop = true;
> s->skip_current_tx_pkt = false;
> +
> + vmxnet3_reset_mac(s);
> }
>
> static void vmxnet3_update_rx_mode(VMXNET3State *s)
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <167510125533.6740.18222174398575558338-1@git.sr.ht>]
* Re: [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset
[not found] <167510125533.6740.18222174398575558338-1@git.sr.ht>
@ 2023-01-30 18:11 ` Laurent Vivier
2023-01-30 18:58 ` Влад Мао
0 siblings, 1 reply; 9+ messages in thread
From: Laurent Vivier @ 2023-01-30 18:11 UTC (permalink / raw)
To: ~vlaomao; +Cc: qemu-trivial, QEMU Developers, Dmitry Fleytman, Jason Wang
Le 30/01/2023 à 18:28, ~vlaomao a écrit :
> From: VlaoMao <vlaomao@gmail.com>
>
> Changing the address with a subsequent reboot makes this address permanent until the vm is turned off
Missing Signed-off-by.
See https://www.qemu.org/docs/master/devel/submitting-a-patch.html
> ---
> hw/net/vmxnet3.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
> index 04159c822..695ca2f92 100644
> --- a/hw/net/vmxnet3.c
> +++ b/hw/net/vmxnet3.c
> @@ -1206,6 +1206,8 @@ static void vmxnet3_reset(VMXNET3State *s)
> s->drv_shmem = 0;
> s->tx_sop = true;
> s->skip_current_tx_pkt = false;
> +
> + vmxnet3_reset_mac(s);
> }
>
> static void vmxnet3_update_rx_mode(VMXNET3State *s)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset
2023-01-30 18:11 ` Laurent Vivier
@ 2023-01-30 18:58 ` Влад Мао
0 siblings, 0 replies; 9+ messages in thread
From: Влад Мао @ 2023-01-30 18:58 UTC (permalink / raw)
To: Laurent Vivier; +Cc: qemu-trivial, QEMU Developers, Dmitry Fleytman, Jason Wang
Signed-off-by: Vlao Mao <vlaomao@gmail.com>
пн, 30 янв. 2023 г. в 21:12, Laurent Vivier <laurent@vivier.eu>:
>
> Le 30/01/2023 à 18:28, ~vlaomao a écrit :
> > From: VlaoMao <vlaomao@gmail.com>
> >
> > Changing the address with a subsequent reboot makes this address permanent until the vm is turned off
>
> Missing Signed-off-by.
>
> See https://www.qemu.org/docs/master/devel/submitting-a-patch.html
>
> > ---
> > hw/net/vmxnet3.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
> > index 04159c822..695ca2f92 100644
> > --- a/hw/net/vmxnet3.c
> > +++ b/hw/net/vmxnet3.c
> > @@ -1206,6 +1206,8 @@ static void vmxnet3_reset(VMXNET3State *s)
> > s->drv_shmem = 0;
> > s->tx_sop = true;
> > s->skip_current_tx_pkt = false;
> > +
> > + vmxnet3_reset_mac(s);
> > }
> >
> > static void vmxnet3_update_rx_mode(VMXNET3State *s)
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-01-31 19:09 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-31 18:20 [PATCH qemu 0/1] MAC address falls to permanent Vlao Mao
2023-01-31 18:20 ` [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset Vlao Mao
2023-01-31 18:48 ` [PATCH qemu 0/1] MAC address falls to permanent Peter Maydell
2023-01-31 19:08 ` Влад Мао
-- strict thread matches above, loose matches on Subject: below --
2023-01-31 18:23 Vlao Mao
2023-01-31 18:23 ` [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset Vlao Mao
2023-01-30 19:06 [PATCH qemu 0/1] vmxnet3: MAC address falls to permanent ~vlaomao
2023-01-30 17:28 ` [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset ~vlaomao
2023-01-31 17:50 ` Laurent Vivier
[not found] <167510125533.6740.18222174398575558338-1@git.sr.ht>
2023-01-30 18:11 ` Laurent Vivier
2023-01-30 18:58 ` Влад Мао
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).