public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* skb->dev set redundantly in net/ipv4/arp.c:arp_send()
@ 2001-08-29  0:51 Bryan Rittmeyer
  0 siblings, 0 replies; only message in thread
From: Bryan Rittmeyer @ 2001-08-29  0:51 UTC (permalink / raw)
  To: davem, ak, kuznet; +Cc: linux-kernel

Hello,

I think skb->dev is being set twice, for no purpose,
in net/ipv4/arp.c:489 and net/ipv4/arp.c:563. The
only external calls between these lines are memcpy
and dev->hard_header, and neither of those will ever
change skb->dev. So we can get rid of the redundant
"skb->dev = dev" line right before dev_queue_xmit()
unless I'm really stupid :-)

Anyway, here's my proposed patch against 2.4.9:

--- net/ipv4/arp-orig.c Tue Aug 28 17:36:45 2001
+++ net/ipv4/arp.c      Tue Aug 28 17:38:52 2001
@@ -560,7 +560,6 @@
                 memset(arp_ptr, 0, dev->addr_len);
         arp_ptr+=dev->addr_len;
         memcpy(arp_ptr, &dest_ip, 4);
-       skb->dev = dev;

         dev_queue_xmit(skb);
         return;

Comments?

-Bryan

-- 
Bryan Rittmeyer
mailto:bryan@ixiacom.com


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-29  0:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-29  0:51 skb->dev set redundantly in net/ipv4/arp.c:arp_send() Bryan Rittmeyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox