* PATCH: [SKBUFF] remove some ethernet header related magic numbers
@ 2004-10-05 18:53 Arnaldo Carvalho de Melo
0 siblings, 0 replies; only message in thread
From: Arnaldo Carvalho de Melo @ 2004-10-05 18:53 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
[-- 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;
===================================================================
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-05 18:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-05 18:53 PATCH: [SKBUFF] remove some ethernet header related magic numbers Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).