Skip to contentSkip to conversation

vhost-user: release chardev on cleanup

PATCH Superseded [email protected] 2 participants 7 messages Apr 6, 2016 – Jan 10, 2017 Networking

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover vhost-user: release chardev on cleanup

From: Marc-André Lureau <[email protected]>

The following 2 one-liners remove the chardev from the vhost-user netdev it is attached to. This prevents from further reuse of the chardev that would likely fail to setup again with the slave.

Related to:
https://bugzilla.redhat.com/show_bug.cgi?id=1256619
https://bugzilla.redhat.com/show_bug.cgi?id=1256618

rfc->v1:
- rfc was sent a few months ago, no comments: rebased & resend as non-rfc this time.

Marc-André Lureau (2):
vhost-user: release chardev on cleanup
vhost-user: delete chardev on cleanup

 net/vhost-user.c | 3 +++
 1 file changed, 3 insertions(+)
Signature · 1 line
2.5.5
#1 lore raw

PATCH 1/2 vhost-user: release chardev on cleanup

From: Marc-André Lureau <[email protected]>

On init, vhost-user does qemu_chr_fe_claim_no_fail(). Do the opposite on cleanup to allow removing or reusing the chardev.

---
 net/vhost-user.c | 2 ++
 1 file changed, 2 insertions(+)
net/vhost-user.c +2 -0
index 1b9e73a..29fe097 100644
@@ -142,6 +142,8 @@ static void vhost_user_cleanup(NetClientState *nc)
     }
 
     qemu_purge_queued_packets(nc);
+
+    qemu_chr_fe_release(s->chr);
 }
 
 static bool vhost_user_has_vnet_hdr(NetClientState *nc)
Signature · 1 line
2.5.5
#2 lore raw

PATCH 2/2 vhost-user: delete chardev on cleanup

In reply to [email protected]

From: Marc-André Lureau <[email protected]>

Remove the chardev implicitely when cleaning up the netdev. This prevents from reusing the chardev since it would be in an incorrect state with the slave.

---
 net/vhost-user.c | 1 +
 1 file changed, 1 insertion(+)
net/vhost-user.c +1 -0
index 29fe097..2d7271a 100644
@@ -144,6 +144,7 @@ static void vhost_user_cleanup(NetClientState *nc)
     qemu_purge_queued_packets(nc);
 
     qemu_chr_fe_release(s->chr);
+    qemu_chr_delete(s->chr);
 }
 
 static bool vhost_user_has_vnet_hdr(NetClientState *nc)
Signature · 1 line
2.5.5
#3 lore raw
In reply to [email protected]

ping

Quoted 24 lines · On Wed, Apr 6, 2016 at 5:38 PM, <[email protected]> wrote:

From: Marc-André Lureau <[email protected]>

The following 2 one-liners remove the chardev from the vhost-user netdev it is attached to. This prevents from further reuse of the chardev that would likely fail to setup again with the slave.

Related to:
https://bugzilla.redhat.com/show_bug.cgi?id=1256619
https://bugzilla.redhat.com/show_bug.cgi?id=1256618

rfc->v1:
- rfc was sent a few months ago, no comments: rebased & resend as non-rfc this time.

Marc-André Lureau (2):
vhost-user: release chardev on cleanup
vhost-user: delete chardev on cleanup

 net/vhost-user.c | 3 +++
 1 file changed, 3 insertions(+)

--
2.5.5

Signature · 1 line
Marc-André Lureau
#4 lore raw

Hi

Quoted 2 lines · Marc-André Lureau

ping

2nd ping, probably for-2.8 now

Quoted 32 lines · On Wed, Apr 6, 2016 at 5:38 PM, <[email protected]> wrote:
Quoted 18 lines

From: Marc-André Lureau <[email protected]>

The following 2 one-liners remove the chardev from the vhost-user netdev it is attached to. This prevents from further reuse of the chardev that would likely fail to setup again with the slave.

Related to:
https://bugzilla.redhat.com/show_bug.cgi?id=1256619
https://bugzilla.redhat.com/show_bug.cgi?id=1256618

rfc->v1:
- rfc was sent a few months ago, no comments: rebased & resend as non-rfc this time.

Marc-André Lureau (2):
vhost-user: release chardev on cleanup
vhost-user: delete chardev on cleanup

Quoted 6 lines
 net/vhost-user.c | 3 +++
 1 file changed, 3 insertions(+)

--
2.5.5

--
Marc-André Lureau

Signature · 1 line
Marc-André Lureau
#5 lore raw

Hi

Quoted 10 lines · Marc-André Lureau

Hi

Quoted 2 lines · Marc-André Lureau

ping

2nd ping, probably for-2.8 now

3rd ping, those are 2 one-liners, don't be shy :)

thanks

Signature · 1 line
Marc-André Lureau
#6 lore raw

Hi

Quoted 10 lines · Marc-André Lureau

Hi

On Thu, Aug 11, 2016 at 1:16 PM Marc-André Lureau < [email protected]> wrote:

Hi

On Thu, Jun 16, 2016 at 1:05 PM Marc-André Lureau < [email protected]> wrote:

Quoted 9 lines

ping

2nd ping, probably for-2.8 now

3rd ping, those are 2 one-liners, don't be shy :)

Michael, could you look and pick those 2 patches?

thanks

Signature · 1 line
Marc-André Lureau