public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bryan Rittmeyer <bryan@ixiacom.com>
To: davem@redhat.com, ak@muc.de, kuznet@ms2.inr.ac.ru
Cc: linux-kernel@vger.kernel.org
Subject: skb->dev set redundantly in net/ipv4/arp.c:arp_send()
Date: Tue, 28 Aug 2001 17:51:19 -0700	[thread overview]
Message-ID: <3B8C3C87.6090307@ixiacom.com> (raw)

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


                 reply	other threads:[~2001-08-29  0:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B8C3C87.6090307@ixiacom.com \
    --to=bryan@ixiacom.com \
    --cc=ak@muc.de \
    --cc=davem@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox