patch-1.3.10 linux/net/core/dev.c

Next file: linux/net/ipv4/af_inet.c
Previous file: linux/net/core/datagram.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.9/linux/net/core/dev.c linux/net/core/dev.c
@@ -312,7 +312,6 @@
 void dev_queue_xmit(struct sk_buff *skb, struct device *dev, int pri)
 {
 	unsigned long flags;
-	int nitcount;
 	struct packet_type *ptype;
 	int where = 0;		/* used to say if the packet should go	*/
 				/* at the front or the back of the	*/
@@ -367,7 +366,7 @@
 	restore_flags(flags);
 
 	/* copy outgoing packets to any sniffer packet handlers */
-	if(!where)
+	if(!where && dev_nit)
 	{
 		skb->stamp=xtime;
 		for (ptype = ptype_all; ptype!=NULL; ptype = ptype->next) 
@@ -384,7 +383,6 @@
 				skb2->h.raw = skb2->data + dev->hard_header_len;
 				skb2->mac.raw = skb2->data;
 				ptype->func(skb2, skb->dev, ptype);
-				nitcount--;
 			}
 		}
 	}
@@ -458,7 +456,7 @@
 	 */
 
 #ifdef CONFIG_NET_RUNONIRQ	/* Dont enable yet, needs some driver mods */
-	inet_bh();
+	net_bh();
 #else
 	mark_bh(NET_BH);
 #endif
@@ -616,7 +614,8 @@
 	/*
 	 *	Can we send anything now? We want to clear the
 	 *	decks for any more sends that get done as we
-	 *	process the input.
+	 *	process the input. This also minimises the
+	 *	latency on a transmit interrupt bh.
 	 */
 
 	dev_transmit();
@@ -676,7 +675,7 @@
 		
 		for (ptype = ptype_base[ntohs(type)&15]; ptype != NULL; ptype = ptype->next) 
 		{
-			if ((ptype->type == type || ptype->type == htons(ETH_P_ALL)) && (!ptype->dev || ptype->dev==skb->dev))
+			if (ptype->type == type && (!ptype->dev || ptype->dev==skb->dev))
 			{
 				/*
 				 *	We already have a match queued. Deliver

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this