netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] VIRTIO: Use __skb_queue_purge()
@ 2008-05-22 10:07 Wang Chen
  2008-05-22 18:01 ` Jeff Garzik
  2008-05-23  1:54 ` Rusty Russell
  0 siblings, 2 replies; 4+ messages in thread
From: Wang Chen @ 2008-05-22 10:07 UTC (permalink / raw)
  To: Rusty Russell, Jeff Garzik, David S. Miller, NETDEV

Use standard routine for queue purging.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---
 drivers/net/virtio_net.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index f926b5a..fe7cdf2 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -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);
 
-- 
1.5.4.rc3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] VIRTIO: Use __skb_queue_purge()
  2008-05-22 10:07 [PATCH 1/2] VIRTIO: Use __skb_queue_purge() Wang Chen
@ 2008-05-22 18:01 ` Jeff Garzik
  2008-05-23  1:54 ` Rusty Russell
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2008-05-22 18:01 UTC (permalink / raw)
  To: Wang Chen; +Cc: Rusty Russell, David S. Miller, NETDEV

Wang Chen wrote:
> Use standard routine for queue purging.
> 
> Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
> ---
>  drivers/net/virtio_net.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index f926b5a..fe7cdf2 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] VIRTIO: Use __skb_queue_purge()
  2008-05-22 10:07 [PATCH 1/2] VIRTIO: Use __skb_queue_purge() Wang Chen
  2008-05-22 18:01 ` Jeff Garzik
@ 2008-05-23  1:54 ` Rusty Russell
  2008-05-23  2:18   ` Jeff Garzik
  1 sibling, 1 reply; 4+ messages in thread
From: Rusty Russell @ 2008-05-23  1:54 UTC (permalink / raw)
  To: Wang Chen; +Cc: Jeff Garzik, David S. Miller, NETDEV

On Thursday 22 May 2008 20:07:43 Wang Chen wrote:
> Use standard routine for queue purging.
>
> Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] VIRTIO: Use __skb_queue_purge()
  2008-05-23  1:54 ` Rusty Russell
@ 2008-05-23  2:18   ` Jeff Garzik
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2008-05-23  2:18 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Wang Chen, David S. Miller, NETDEV

Rusty Russell wrote:
> On Thursday 22 May 2008 20:07:43 Wang Chen wrote:
>> Use standard routine for queue purging.
>>
>> Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
> 
> 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




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-23  2:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 10:07 [PATCH 1/2] VIRTIO: Use __skb_queue_purge() Wang Chen
2008-05-22 18:01 ` Jeff Garzik
2008-05-23  1:54 ` Rusty Russell
2008-05-23  2:18   ` Jeff Garzik

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).