From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Marek Lindner <mareklindner@neomailbox.ch>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: convert tt request list into hlist
Date: Fri, 19 Jun 2015 11:23:18 +0200 [thread overview]
Message-ID: <1740986.1nN0tfpCTA@bentobox> (raw)
In-Reply-To: <1434697758-8399-1-git-send-email-mareklindner@neomailbox.ch>
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
On Friday 19 June 2015 15:09:18 Marek Lindner wrote:
> The tt request list does not require a double linked list, hence a
> conversion to hlist saves memory without losing functionality.
>
> Also, the list_del() call was changed to hlist_del_init() to allow
> an adding an extra check prior to deletion in batadv_tt_req_node_new().
>
> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
hlist_node is still double linked [1] (pprev is an "indirect" pointer to the
next pointer of the previous hlist_node in the list). The hlist_head is the
only one which has only one pointer. This is the reason why you can't add
things to the end of an hlist. But you can still add an hlist_node before
another hlist_node. This would be something which you could not do easily on a
"not double linked list"
Kind regards,
Sven
[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/linux/list.h?id=a54acb3a6f853e8394c4cb7b6a4d93c88f13eefd#n588
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-06-19 9:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 7:09 [B.A.T.M.A.N.] [PATCH] batman-adv: convert tt request list into hlist Marek Lindner
2015-06-19 8:00 ` Antonio Quartulli
2015-06-19 9:23 ` Sven Eckelmann [this message]
2015-06-19 9:32 ` Sven Eckelmann
2015-06-19 9:43 ` Marek Lindner
2015-06-19 9:43 ` Sven Eckelmann
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=1740986.1nN0tfpCTA@bentobox \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=mareklindner@neomailbox.ch \
/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