lkml.org 
[lkml]   [2000]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectnet_tx_action: local_irq_save() instead of local_irq_disable()
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;
\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.042 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site