From: Sven Eckelmann <sven@narfation.org>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Cc: davem@davemloft.net
Subject: Re: [B.A.T.M.A.N.] pull request: batman-adv 2011-11-26
Date: Sat, 3 Dec 2011 09:55:52 +0100 [thread overview]
Message-ID: <20111203085552.GA8944@sven-atom.home.narfation.org> (raw)
In-Reply-To: <20111202.205955.840690319685535229.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]
On Fri, Dec 02, 2011 at 08:59:55PM -0500, David Miller wrote:
> From: Antonio Quartulli <ordex@autistici.org>
> Date: Sat, 3 Dec 2011 02:55:29 +0100
>
> > We first call pskb_may_pull() to pull the header only and then, under certain
> > conditions, we linearise the whole skb to access it all. Should I use
> > pskb_may_pull() even in this case?
>
> Why would you need to access the whole thing?
It contains only information for the routing/pathfinding to client nodes (nodes
which do not directly participate in this mesh).
> There are only two types of possible accesses:
>
> 1) Header parsing --> use pskb_may_pull() as needed.
>
> 2) Copying the data to some other location, such as a user
> buffer. Use skb_copy_datagram_iovec or similar which handle
> fragmented SKBs just fine.
I think a "copy" using skb_header_pointer/skb_copy_bits would be the right
thing to do. batman-adv needs the data for kernel data structures and don't
send it to a userspace program (at least not as primary functionality). I don't
have benchmarks which compare both solutions (with a heavily fragmented skb)
when accessing small, packed structures in a skb.
Thanks,
Sven
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2011-12-03 8:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-26 14:26 [B.A.T.M.A.N.] pull request: batman-adv 2011-11-26 Marek Lindner
2011-11-26 14:26 ` [B.A.T.M.A.N.] [PATCH 01/10] batman-adv: update internal version number Marek Lindner
2011-11-26 14:26 ` [B.A.T.M.A.N.] [PATCH 02/10] batman-adv: tt_global_del_orig() has to print the correct message Marek Lindner
2011-11-26 14:26 ` [B.A.T.M.A.N.] [PATCH 03/10] batman-adv: Replace obsolete strict_strto<foo> with kstrto<foo> Marek Lindner
2011-11-26 14:26 ` [B.A.T.M.A.N.] [PATCH 04/10] batman-adv: refactoring gateway handling code Marek Lindner
2011-11-26 14:26 ` [B.A.T.M.A.N.] [PATCH 05/10] batman-adv: use orig_hash_find() instead of get_orig_node() in TT code Marek Lindner
2011-11-26 14:26 ` [B.A.T.M.A.N.] [PATCH 06/10] batman-adv: fixed hash functions type to uint32_t instead of int Marek Lindner
2011-11-26 14:26 ` [B.A.T.M.A.N.] [PATCH 07/10] batman-adv: directly write tt entries without buffering Marek Lindner
2011-11-26 14:26 ` [B.A.T.M.A.N.] [PATCH 08/10] batman-adv: linearise the tt_response skb only if needed Marek Lindner
2011-11-26 14:26 ` [B.A.T.M.A.N.] [PATCH 09/10] batman-adv: check for tt_reponse packet real length Marek Lindner
2011-11-26 14:26 ` [B.A.T.M.A.N.] [PATCH 10/10] batman-adv: Fix range check for expected packets Marek Lindner
2011-11-26 19:41 ` [B.A.T.M.A.N.] pull request: batman-adv 2011-11-26 David Miller
2011-12-02 17:12 ` Antonio Quartulli
2011-12-02 17:57 ` David Miller
2011-12-03 1:55 ` Antonio Quartulli
2011-12-03 1:59 ` David Miller
2011-12-03 8:55 ` Sven Eckelmann [this message]
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=20111203085552.GA8944@sven-atom.home.narfation.org \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
/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).