From: LDB <thesource@ldb-jab.org>
To: kalash nainwal <nirvana.code@gmail.com>
Cc: "kristrev@student.matnat.uio.no" <kristrev@student.matnat.uio.no>,
netdev@vger.kernel.org, linux-net@vger.kernel.org
Subject: Re: Copy data from one SKB to another
Date: Sat, 24 Feb 2007 05:53:51 -0500 [thread overview]
Message-ID: <45E0193F.5090909@ldb-jab.org> (raw)
In-Reply-To: <e92e3a770702240137p6c0b31b3r2b7ce0b4042fac4b@mail.gmail.com>
kalash nainwal wrote:
> On 2/22/07, kristrev@student.matnat.uio.no
> <kristrev@student.matnat.uio.no> wrote:
>> Hello,
>>
>> I am working on optimizing the TCP-code for a certain type of TCP-stream,
>> and to make one of my optimizations work I need to copy data from one SKB
>> (the data field of the skb) to another SKB (data field).
>>
>> Currently I am using memcpy, and it does what it is supposed to, but I am
>> curious as to if there are any other (potentially faster/more efficient)
>> ways of doing it. I have checked out the skb_add_data (used when you can
>> copy data from the msg you are sending into the most recent skb added to
>> the queue), but from what I can understand it only copies from userspace
>> into kernelspace (whereas I need to copy kernel-kernel).
>>
>> Does anyone have any hints, suggestions, solutions or something else they
>> think might help?
>>
>> Thanks,
>> Kristian
>>
>> -
>
> How about cloning? Is that an option?
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
skb_clone is an option but you cannot modify any data - correct me if I am wrong.
The other options are pskb_copy and skb_copy used when modifications are
necessary - correct if I am wrong.
You just have to chose which is appropriate for your specific needs.
LDB
next prev parent reply other threads:[~2007-02-24 11:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-22 11:59 Copy data from one SKB to another kristrev
2007-02-24 9:37 ` kalash nainwal
2007-02-24 10:53 ` LDB [this message]
2007-02-24 11:32 ` Kristian Evensen
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=45E0193F.5090909@ldb-jab.org \
--to=thesource@ldb-jab.org \
--cc=kristrev@student.matnat.uio.no \
--cc=linux-net@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nirvana.code@gmail.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 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).