* [PATCH][ATM] get skb->len right after adjusting head
@ 2003-02-24 1:30 chas williams
2003-02-24 5:45 ` David S. Miller
2003-02-24 15:17 ` Alan Cox
0 siblings, 2 replies; 5+ messages in thread
From: chas williams @ 2003-02-24 1:30 UTC (permalink / raw)
To: davem; +Cc: linux-kernel
when the lane client strips off the lec it should also adjust the length
of skb
Index: linux/net/atm/lec.c
===================================================================
RCS file: /home/chas/CVSROOT/linux/net/atm/lec.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -b -w -r1.3 -r1.4
--- linux/net/atm/lec.c 22 Feb 2003 17:38:23 -0000 1.3
+++ linux/net/atm/lec.c 22 Feb 2003 17:43:41 -0000 1.4
@@ -714,6 +714,7 @@
}
skb->dev = dev;
skb->data += 2; /* skip lec_id */
+ skb->len -= 2;
#ifdef CONFIG_TR
if (priv->is_trdev) skb->protocol = tr_type_trans(skb, dev);
else
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][ATM] get skb->len right after adjusting head
2003-02-24 1:30 [PATCH][ATM] get skb->len right after adjusting head chas williams
@ 2003-02-24 5:45 ` David S. Miller
2003-02-24 13:38 ` chas williams
2003-02-24 15:17 ` Alan Cox
1 sibling, 1 reply; 5+ messages in thread
From: David S. Miller @ 2003-02-24 5:45 UTC (permalink / raw)
To: chas; +Cc: linux-kernel
From: chas williams <chas@locutus.cmf.nrl.navy.mil>
Date: Sun, 23 Feb 2003 20:30:49 -0500
when the lane client strips off the lec it should also adjust the length
of skb
Don't try to modify skb->{data,len} by hands, let the skb_*()
interfaces do it. Use skb_pull() in this case.
Franks a lot,
David S. Miller
davem@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][ATM] get skb->len right after adjusting head
2003-02-24 5:45 ` David S. Miller
@ 2003-02-24 13:38 ` chas williams
2003-02-24 23:36 ` David S. Miller
0 siblings, 1 reply; 5+ messages in thread
From: chas williams @ 2003-02-24 13:38 UTC (permalink / raw)
To: David S. Miller; +Cc: linux-kernel
In message <20030223.214513.120185268.davem@redhat.com>,"David S. Miller" writes:
>Don't try to modify skb->{data,len} by hands, let the skb_*()
>interfaces do it. Use skb_pull() in this case.
missed that function when i went looking for it. again, the right way:
Index: linux/net/atm/lec.c
===================================================================
RCS file: /home/chas/CVSROOT/linux/net/atm/lec.c,v
retrieving revision 1.1
retrieving revision 1.7
diff -u -d -b -w -r1.1 -r1.7
--- linux/net/atm/lec.c 20 Feb 2003 13:46:30 -0000 1.1
+++ linux/net/atm/lec.c 24 Feb 2003 13:34:43 -0000 1.7
@@ -711,7 +705,7 @@
lec_arp_check_empties(priv, vcc, skb);
}
skb->dev = dev;
- skb->data += 2; /* skip lec_id */
+ skb_pull(skb, 2); /* skip lec_id */
#ifdef CONFIG_TR
if (priv->is_trdev) skb->protocol = tr_type_trans(skb, dev);
else
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][ATM] get skb->len right after adjusting head
2003-02-24 1:30 [PATCH][ATM] get skb->len right after adjusting head chas williams
2003-02-24 5:45 ` David S. Miller
@ 2003-02-24 15:17 ` Alan Cox
1 sibling, 0 replies; 5+ messages in thread
From: Alan Cox @ 2003-02-24 15:17 UTC (permalink / raw)
To: chas williams; +Cc: davem, Linux Kernel Mailing List
On Mon, 2003-02-24 at 01:30, chas williams wrote:
> skb->dev = dev;
> skb->data += 2; /* skip lec_id */
> + skb->len -= 2;
skb_pull(skb, 2) surely
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][ATM] get skb->len right after adjusting head
2003-02-24 13:38 ` chas williams
@ 2003-02-24 23:36 ` David S. Miller
0 siblings, 0 replies; 5+ messages in thread
From: David S. Miller @ 2003-02-24 23:36 UTC (permalink / raw)
To: chas; +Cc: linux-kernel
From: chas williams <chas@locutus.cmf.nrl.navy.mil>
Date: Mon, 24 Feb 2003 08:38:58 -0500
In message <20030223.214513.120185268.davem@redhat.com>,"David S. Miller" writes:
>Don't try to modify skb->{data,len} by hands, let the skb_*()
>interfaces do it. Use skb_pull() in this case.
missed that function when i went looking for it. again, the right way:
You need to resend your original patch with this fix
added as I didn't apply your original patch :-)
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-02-24 23:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-24 1:30 [PATCH][ATM] get skb->len right after adjusting head chas williams
2003-02-24 5:45 ` David S. Miller
2003-02-24 13:38 ` chas williams
2003-02-24 23:36 ` David S. Miller
2003-02-24 15:17 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox