Skip to contentSkip to conversation

VIRTIO: Use __skb_queue_purge()

PATCH Applied Wang Chen 3 participants 4 messages May 22, 2008 – May 23, 2008

Subsystems (3)
lore
Share & tools
lore

Wang Chen

author
#0 lore raw

PATCH 1/2 VIRTIO: Use __skb_queue_purge()

Use standard routine for queue purging.

---
 drivers/net/virtio_net.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/net/virtio_net.c +1 -2
index f926b5a..fe7cdf2 100644
@@ -470,8 +470,7 @@ static void virtnet_remove(struct virtio_device *vdev)
 		kfree_skb(skb);
 		vi->num--;
 	}
-	while ((skb = __skb_dequeue(&vi->send)) != NULL)
-		kfree_skb(skb);
+	__skb_queue_purge(&vi->send);
 
 	BUG_ON(vi->num != 0);
 
Signature · 1 line
1.5.4.rc3
#1 lore raw
Quoted 12 lines · Wang Chen

Use standard routine for queue purging.

---
 drivers/net/virtio_net.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/net/virtio_net.c +0 -0
index f926b5a..fe7cdf2 100644

drivers/net/virtio_net.c static void virtnet_remove(struct virtio_device *vdev) · line 474

Quoted 7 lines
drivers/net/virtio_net.c +1 -2
@@ -470,8 +470,7 @@ static void virtnet_remove(struct virtio_device *vdev)
 		kfree_skb(skb);
 		vi->num--;
 	}
-	while ((skb = __skb_dequeue(&vi->send)) != NULL)
-		kfree_skb(skb);
+	__skb_queue_purge(&vi->send);
 

applied 1-2

#2 lore raw
In reply to Wang Chen
Quoted 3 lines · On Thursday 22 May 2008 20:07:43 Wang Chen wrote:

Use standard routine for queue purging.

Thanks, applied.

Jeff, I'm planning on final testing of my 4 pending virtio_net patches for 2.6.26 today: if all goes well, I'll send them in a neat batch.

Cheers,
Rusty.

#3 lore raw
Quoted 8 lines · Rusty Russell
Quoted 3 lines · On Thursday 22 May 2008 20:07:43 Wang Chen wrote:

Use standard routine for queue purging.

Thanks, applied.

Jeff, I'm planning on final testing of my 4 pending virtio_net patches for 2.6.26 today: if all goes well, I'll send them in a neat batch.

It seemed more applicable as a general netdev cleanup so I also applied it :)

In general, regardless of bus topology or whatever, net driver patches tend to come in my direction.

Jeff