netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv1 0/2 net-next] xen-netback: minor cleanups
@ 2014-10-28 15:29 David Vrabel
  2014-10-28 15:29 ` [PATCH 1/2] xen-netback: Disable NAPI after disabling interrupts David Vrabel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: David Vrabel @ 2014-10-28 15:29 UTC (permalink / raw)
  To: netdev; +Cc: David Vrabel, xen-devel, Ian Campbell, Wei Liu

Two minor xen-netback cleanups originally from Zoltan.

David

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

* [PATCH 1/2] xen-netback: Disable NAPI after disabling interrupts
  2014-10-28 15:29 [PATCHv1 0/2 net-next] xen-netback: minor cleanups David Vrabel
@ 2014-10-28 15:29 ` David Vrabel
  2014-10-29 11:05   ` Wei Liu
  2014-10-28 15:29 ` [PATCH 2/2] xen-netback: Remove __GFP_COLD David Vrabel
  2014-10-29 20:00 ` [PATCHv1 0/2 net-next] xen-netback: minor cleanups David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: David Vrabel @ 2014-10-28 15:29 UTC (permalink / raw)
  To: netdev; +Cc: David Vrabel, xen-devel, Ian Campbell, Wei Liu, Zoltan Kiss

From: Zoltan Kiss <zoltan.kiss@linaro.org>

Otherwise the interrupt handler still calls napi_complete. Although it
won't schedule NAPI again as either NAPI_STATE_DISABLE or
NAPI_STATE_SCHED is set, it is just unnecessary, and it makes more
sense to do this way.

Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
---
 drivers/net/xen-netback/interface.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index 895fe84..a6a32d3 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -235,10 +235,10 @@ static void xenvif_down(struct xenvif *vif)
 
 	for (queue_index = 0; queue_index < num_queues; ++queue_index) {
 		queue = &vif->queues[queue_index];
-		napi_disable(&queue->napi);
 		disable_irq(queue->tx_irq);
 		if (queue->tx_irq != queue->rx_irq)
 			disable_irq(queue->rx_irq);
+		napi_disable(&queue->napi);
 		del_timer_sync(&queue->credit_timeout);
 	}
 }
-- 
1.7.10.4

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

* [PATCH 2/2] xen-netback: Remove __GFP_COLD
  2014-10-28 15:29 [PATCHv1 0/2 net-next] xen-netback: minor cleanups David Vrabel
  2014-10-28 15:29 ` [PATCH 1/2] xen-netback: Disable NAPI after disabling interrupts David Vrabel
@ 2014-10-28 15:29 ` David Vrabel
  2014-10-29 11:05   ` Wei Liu
  2014-10-29 20:00 ` [PATCHv1 0/2 net-next] xen-netback: minor cleanups David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: David Vrabel @ 2014-10-28 15:29 UTC (permalink / raw)
  To: netdev; +Cc: David Vrabel, xen-devel, Ian Campbell, Wei Liu, Zoltan Kiss

From: Zoltan Kiss <zoltan.kiss@linaro.org>

This flag is unnecessary, it came from some old code.

Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
---
 drivers/net/xen-netback/netback.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 25f4c06..730252c 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -1550,7 +1550,7 @@ static int xenvif_handle_frag_list(struct xenvif_queue *queue, struct sk_buff *s
 		unsigned int len;
 
 		BUG_ON(i >= MAX_SKB_FRAGS);
-		page = alloc_page(GFP_ATOMIC|__GFP_COLD);
+		page = alloc_page(GFP_ATOMIC);
 		if (!page) {
 			int j;
 			skb->truesize += skb->data_len;
-- 
1.7.10.4

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

* Re: [PATCH 1/2] xen-netback: Disable NAPI after disabling interrupts
  2014-10-28 15:29 ` [PATCH 1/2] xen-netback: Disable NAPI after disabling interrupts David Vrabel
@ 2014-10-29 11:05   ` Wei Liu
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Liu @ 2014-10-29 11:05 UTC (permalink / raw)
  To: David Vrabel; +Cc: netdev, xen-devel, Ian Campbell, Wei Liu, Zoltan Kiss

On Tue, Oct 28, 2014 at 03:29:30PM +0000, David Vrabel wrote:
> From: Zoltan Kiss <zoltan.kiss@linaro.org>
> 
> Otherwise the interrupt handler still calls napi_complete. Although it
> won't schedule NAPI again as either NAPI_STATE_DISABLE or
> NAPI_STATE_SCHED is set, it is just unnecessary, and it makes more
> sense to do this way.
> 
> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
>  drivers/net/xen-netback/interface.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
> index 895fe84..a6a32d3 100644
> --- a/drivers/net/xen-netback/interface.c
> +++ b/drivers/net/xen-netback/interface.c
> @@ -235,10 +235,10 @@ static void xenvif_down(struct xenvif *vif)
>  
>  	for (queue_index = 0; queue_index < num_queues; ++queue_index) {
>  		queue = &vif->queues[queue_index];
> -		napi_disable(&queue->napi);
>  		disable_irq(queue->tx_irq);
>  		if (queue->tx_irq != queue->rx_irq)
>  			disable_irq(queue->rx_irq);
> +		napi_disable(&queue->napi);
>  		del_timer_sync(&queue->credit_timeout);
>  	}
>  }
> -- 
> 1.7.10.4

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

* Re: [PATCH 2/2] xen-netback: Remove __GFP_COLD
  2014-10-28 15:29 ` [PATCH 2/2] xen-netback: Remove __GFP_COLD David Vrabel
@ 2014-10-29 11:05   ` Wei Liu
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Liu @ 2014-10-29 11:05 UTC (permalink / raw)
  To: David Vrabel; +Cc: netdev, xen-devel, Ian Campbell, Wei Liu, Zoltan Kiss

On Tue, Oct 28, 2014 at 03:29:31PM +0000, David Vrabel wrote:
> From: Zoltan Kiss <zoltan.kiss@linaro.org>
> 
> This flag is unnecessary, it came from some old code.
> 
> Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
>  drivers/net/xen-netback/netback.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
> index 25f4c06..730252c 100644
> --- a/drivers/net/xen-netback/netback.c
> +++ b/drivers/net/xen-netback/netback.c
> @@ -1550,7 +1550,7 @@ static int xenvif_handle_frag_list(struct xenvif_queue *queue, struct sk_buff *s
>  		unsigned int len;
>  
>  		BUG_ON(i >= MAX_SKB_FRAGS);
> -		page = alloc_page(GFP_ATOMIC|__GFP_COLD);
> +		page = alloc_page(GFP_ATOMIC);
>  		if (!page) {
>  			int j;
>  			skb->truesize += skb->data_len;
> -- 
> 1.7.10.4

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

* Re: [PATCHv1 0/2 net-next] xen-netback: minor cleanups
  2014-10-28 15:29 [PATCHv1 0/2 net-next] xen-netback: minor cleanups David Vrabel
  2014-10-28 15:29 ` [PATCH 1/2] xen-netback: Disable NAPI after disabling interrupts David Vrabel
  2014-10-28 15:29 ` [PATCH 2/2] xen-netback: Remove __GFP_COLD David Vrabel
@ 2014-10-29 20:00 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2014-10-29 20:00 UTC (permalink / raw)
  To: david.vrabel; +Cc: netdev, xen-devel, ian.campbell, wei.liu2

From: David Vrabel <david.vrabel@citrix.com>
Date: Tue, 28 Oct 2014 15:29:29 +0000

> Two minor xen-netback cleanups originally from Zoltan.

Series applied, thanks everyone.

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

end of thread, other threads:[~2014-10-29 20:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-28 15:29 [PATCHv1 0/2 net-next] xen-netback: minor cleanups David Vrabel
2014-10-28 15:29 ` [PATCH 1/2] xen-netback: Disable NAPI after disabling interrupts David Vrabel
2014-10-29 11:05   ` Wei Liu
2014-10-28 15:29 ` [PATCH 2/2] xen-netback: Remove __GFP_COLD David Vrabel
2014-10-29 11:05   ` Wei Liu
2014-10-29 20:00 ` [PATCHv1 0/2 net-next] xen-netback: minor cleanups David Miller

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