net_tx_action: local_irq_save() instead of local_irq_disable()

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Sat Feb 12 2000 - 06:13:24 EST


AFAICS net_tx_action() is never called with disabled interrupts, so the
local_irq_save() calls could be replaced with local_irq_disable(). I've
attached an untested patch.

--
	Manfred

--- 2.3/net/core/dev.c Thu Feb 10 22:39:11 2000 +++ build-2.3/net/core/dev.c Sat Feb 12 12:09:42 2000 @@ -911,15 +911,14 @@ static void net_tx_action(struct softirq_action *h) { int cpu = smp_processor_id(); - unsigned long flags; if (softnet_data[cpu].completion_queue) { struct sk_buff *clist; - local_irq_save(flags); + local_irq_disable(); clist = softnet_data[cpu].completion_queue; softnet_data[cpu].completion_queue = NULL; - local_irq_restore(flags); + local_irq_enable(); while (clist != NULL) { struct sk_buff *skb = clist; @@ -933,10 +932,10 @@ if (softnet_data[cpu].output_queue) { struct net_device *head; - local_irq_save(flags); + local_irq_disable(); head = softnet_data[cpu].output_queue; softnet_data[cpu].output_queue = NULL; - local_irq_restore(flags); + local_irq_disable(); while (head != NULL) { struct net_device *dev = head;

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:22 EST