patch-2.3.41 linux/net/ethernet/eth.c

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

diff -u --recursive --new-file v2.3.40/linux/net/ethernet/eth.c linux/net/ethernet/eth.c
@@ -207,7 +207,7 @@
 	 *	seems to set IFF_PROMISC.
 	 */
 	 
-	else if(dev->flags&(IFF_PROMISC/*|IFF_ALLMULTI*/))
+	else if(1 /*dev->flags&IFF_PROMISC*/)
 	{
 		if(memcmp(eth->h_dest,dev->dev_addr, ETH_ALEN))
 			skb->pkt_type=PACKET_OTHERHOST;
@@ -265,7 +265,8 @@
 	memcpy(((u8*)hh->hh_data) + 2, haddr, dev->addr_len);
 }
 
-#ifndef CONFIG_IP_ROUTER
+#if 0 /*ndef CONFIG_IP_ROUTER*/
+/* This one is only slowdown with checksumming in user process context. --ANK */
 
 /*
  *	Copy from an ethernet device memory space to an sk_buff while checksumming if IP
@@ -298,7 +299,7 @@
 	if ((ip_length <= length) && (ip_length > 7))
 		length=ip_length;
 
-	dest->csum=csum_partial_copy(src+sizeof(struct iphdr)+ETH_HLEN,dest->data+sizeof(struct iphdr)+ETH_HLEN,length,base);
+	dest->csum=csum_partial_copy_nocheck(src+sizeof(struct iphdr)+ETH_HLEN,dest->data+sizeof(struct iphdr)+ETH_HLEN,length,base);
 	dest->ip_summed=1;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)