xen-netback: minor cleanups
Subsystems (3)
cover xen-netback: minor cleanups
Two minor xen-netback cleanups originally from Zoltan.
David
PATCH 1/2 xen-netback: Disable NAPI after disabling interrupts
From: Zoltan Kiss <[email protected]>
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.
--- drivers/net/xen-netback/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/interface.c +1 -1
@@ -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); } }
Signature · 1 line
1.7.10.4
Re: [PATCH 1/2] xen-netback: Disable NAPI after disabling interrupts
Quoted 9 lines · David Vrabel
From: Zoltan Kiss <[email protected]>
Otherwise the interrupt handler still calls
napi_complete. Although it won't schedule NAPI again as eitherNAPI_STATE_DISABLEorNAPI_STATE_SCHEDis set, it is just unnecessary, and it makes more sense to do this way.Signed-off-by Zoltan Kiss <[email protected]>Signed-off-by David Vrabel <[email protected]>
Quoted 22 lines
--- drivers/net/xen-netback/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/xen-netback/interface.c +1
-1@@ -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); } }Signature · 1 line
1.7.10.4
Re: [PATCH 1/2] xen-netback: Disable NAPI after disabling interrupts
In reply to David VrabelQuoted 9 lines · David Vrabel
From: Zoltan Kiss <[email protected]>
Otherwise the interrupt handler still calls
napi_complete. Although it won't schedule NAPI again as eitherNAPI_STATE_DISABLEorNAPI_STATE_SCHEDis set, it is just unnecessary, and it makes more sense to do this way.Signed-off-by Zoltan Kiss <[email protected]>Signed-off-by David Vrabel <[email protected]>
Quoted 22 lines
--- drivers/net/xen-netback/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/xen-netback/interface.c +1
-1@@ -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); } }Signature · 1 line
1.7.10.4
PATCH 1/2 xen-netback: Disable NAPI after disabling interrupts
In reply to David VrabelFrom: Zoltan Kiss <[email protected]>
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.
--- drivers/net/xen-netback/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/interface.c +1 -1
@@ -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); } }
Signature · 1 line
1.7.10.4
PATCH 2/2 xen-netback: Remove __GFP_COLD
In reply to David VrabelFrom: Zoltan Kiss <[email protected]>
This flag is unnecessary, it came from some old code.
--- drivers/net/xen-netback/netback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/netback.c +1 -1
@@ -1550,7 +1550,7 @@ static int xenvif_handle_frag_list(struct xenvif_queue *queue, struct sk_buff *sunsigned 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;
Signature · 1 line
1.7.10.4
Re: [PATCH 2/2] xen-netback: Remove __GFP_COLD
Quoted 7 lines · David Vrabel
From: Zoltan Kiss <[email protected]>
This flag is unnecessary, it came from some old code.
Suggested-by Eric Dumazet <[email protected]>Signed-off-by Zoltan Kiss <[email protected]>Signed-off-by David Vrabel <[email protected]>
Quoted 19 lines
--- drivers/net/xen-netback/netback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/xen-netback/netback.c +1
-1@@ -1550,7 +1550,7 @@ static int xenvif_handle_frag_list(struct xenvif_queue *queue, struct sk_buff *sunsigned 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;Signature · 1 line
1.7.10.4
Re: [PATCH 2/2] xen-netback: Remove __GFP_COLD
In reply to David VrabelQuoted 7 lines · David Vrabel
From: Zoltan Kiss <[email protected]>
This flag is unnecessary, it came from some old code.
Suggested-by Eric Dumazet <[email protected]>Signed-off-by Zoltan Kiss <[email protected]>Signed-off-by David Vrabel <[email protected]>
Quoted 19 lines
--- drivers/net/xen-netback/netback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/xen-netback/netback.c +1
-1@@ -1550,7 +1550,7 @@ static int xenvif_handle_frag_list(struct xenvif_queue *queue, struct sk_buff *sunsigned 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;Signature · 1 line
1.7.10.4
PATCH 2/2 xen-netback: Remove __GFP_COLD
In reply to David VrabelFrom: Zoltan Kiss <[email protected]>
This flag is unnecessary, it came from some old code.
--- drivers/net/xen-netback/netback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/netback.c +1 -1
@@ -1550,7 +1550,7 @@ static int xenvif_handle_frag_list(struct xenvif_queue *queue, struct sk_buff *sunsigned 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;
Signature · 1 line
1.7.10.4
David Miller
maintainerFrom: David Vrabel <[email protected]>
Date: Tue, 28 Oct 2014 15:29:29 +0000
Quoted 1 line
Two minor xen-netback cleanups originally from Zoltan.
Series applied, thanks everyone.
David Miller
maintainerFrom: David Vrabel <[email protected]>
Date: Tue, 28 Oct 2014 15:29:29 +0000
Quoted 1 line
Two minor xen-netback cleanups originally from Zoltan.
Series applied, thanks everyone.