All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: "David S. Miller" <davem@redhat.com>
Cc: netdev@oss.sgi.com
Subject: PATCH: [SKBUFF] remove some ethernet header related magic numbers
Date: Tue, 05 Oct 2004 15:53:05 -0300	[thread overview]
Message-ID: <4162ED91.20605@conectiva.com.br> (raw)

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

Hi David,

	Plesase consider pulling from:

bk://kernel.bkbits.net/acme/sk_buff-2.6

	Now there are twelve outstanding changesets in this
tree.

Best Regards,

- Arnaldo

[-- Attachment #2: ethhdr_magic_numbers.patch --]
[-- Type: text/plain, Size: 1412 bytes --]

===================================================================


ChangeSet@1.2041, 2004-10-05 15:45:31-03:00, acme@conectiva.com.br
  [SKBUFF] remove some ethernet header related magic numbers
  
  Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  Signed-off-by: David S. Miller <davem@redhat.com>


 drivers/net/loopback.c |    2 +-
 net/core/pktgen.c      |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


diff -Nru a/drivers/net/loopback.c b/drivers/net/loopback.c
--- a/drivers/net/loopback.c	2004-10-05 15:50:11 -03:00
+++ b/drivers/net/loopback.c	2004-10-05 15:50:11 -03:00
@@ -85,7 +85,7 @@
 		if (!nskb)
 			break;
 		skb_reserve(nskb, 32);
-		nskb->mac.raw = nskb->data - 14;
+		nskb->mac.raw = nskb->data - ETH_HLEN;
 		nskb->nh.raw = nskb->data;
 		iph = nskb->nh.iph;
 		memcpy(nskb->data, skb->nh.raw, doffset);
diff -Nru a/net/core/pktgen.c b/net/core/pktgen.c
--- a/net/core/pktgen.c	2004-10-05 15:50:11 -03:00
+++ b/net/core/pktgen.c	2004-10-05 15:50:11 -03:00
@@ -515,8 +515,8 @@
 	iph->tot_len = htons(iplen);
 	iph->check = 0;
 	iph->check = ip_fast_csum((void *) iph, iph->ihl);
-	skb->protocol = __constant_htons(ETH_P_IP);
-	skb->mac.raw = ((u8 *)iph) - 14;
+	skb->protocol = htons(ETH_P_IP);
+	skb->mac.raw = ((u8 *)iph) - ETH_ALEN;
 	skb->dev = odev;
 	skb->pkt_type = PACKET_HOST;
 

===================================================================

                 reply	other threads:[~2004-10-05 18:53 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=4162ED91.20605@conectiva.com.br \
    --to=acme@conectiva.com.br \
    --cc=davem@redhat.com \
    --cc=netdev@oss.sgi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.