netdev
[Top] [All Lists]

Re: skb_copy(....) ?

To: netdev@xxxxxxxxxxx
Subject: Re: skb_copy(....) ?
From: Joachim.Franek@xxxxxxxxxxx (Joachim Franek)
Date: Thu, 21 Feb 2002 15:33:00 +0100
In-reply-to: <02022115222000.00810@zark>
Organization: IBJF
References: <02022115222000.00810@zark>
Reply-to: joachim.franek@xxxxxxxxxxx
Sender: owner-netdev@xxxxxxxxxxx
Am Donnerstag, 21. Februar 2002 15:22 schrieb Atif Syed:
> Dear all,
>
> I am trying to copy sk_buffer.
>
>
> skb_new=alloc_skb(sizeof(struct sk_buff) ,  GFP_ATOMIC);
> skb_new=pskb_copy(skb,GFP_KERNEL);
>
> These lines make hang the kernel. Should i have to allocate memory or only
> copy the skb to the new one. I am confused  after reading the
> documentation.
>
> Thanks in advance for help.
>
>
> Atif Syed
> NEC Europe Ltd. - Network Laboratories
>
> Email: Atif.Syed@xxxxxxxxxxxx

Have a look at:
http://lxr.linux.no/source/

choose "identifier search", and search for "pskb_copy".
If you choose kernel 2.4.16 (and i386) you get
the source code position: net/core/skbuff.c, line 559 .
Click on this link and see, that alloc is done.

BTW: thanks, I just need this function also.

-- 
Joachim Franek
www.de-franek.de
rs485.de-franek.de

<Prev in Thread] Current Thread [Next in Thread>