public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex@autistici.org>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: move batadv_slide_own_bcast_window to bat_iv_ogm.c
Date: Mon, 15 Apr 2013 12:25:09 +0200	[thread overview]
Message-ID: <20130415102509.GA18298@ritirata.org> (raw)
In-Reply-To: <201304151710.40934.lindner_marek@yahoo.de>

[-- Attachment #1: Type: text/plain, Size: 1601 bytes --]

On Mon, Apr 15, 2013 at 05:10:40PM +0800, Marek Lindner wrote:
> On Tuesday, April 02, 2013 17:41:08 Antonio Quartulli wrote:
> > +static void
> > +batadv_iv_ogm_slide_own_bcast_window(struct batadv_hard_iface *hard_iface)
> > +{
> > +       struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
> > +       struct batadv_hashtable *hash = bat_priv->orig_hash;
> > +       struct hlist_head *head;
> > +       struct batadv_orig_node *orig_node;
> > +       unsigned long *word;
> > +       uint32_t i;
> > +       size_t word_index;
> > +       uint8_t *w;
> > +
> > +       for (i = 0; i < hash->size; i++) {
> > +               head = &hash->table[i];
> > +
> > +               rcu_read_lock();
> > +               hlist_for_each_entry_rcu(orig_node, head, hash_entry) {
> > +                       spin_lock_bh(&orig_node->ogm_cnt_lock);
> > +                       word_index = hard_iface->if_num * BATADV_NUM_WORDS;
> > +                       word = &(orig_node->bcast_own[word_index]);
> > +
> > +                       batadv_bit_get_packet(bat_priv, word, 1, 0);
> > +                       w = &orig_node->bcast_own_sum[hard_iface->if_num];
> > +                       *w = bitmap_weight(word,
> > BATADV_TQ_LOCAL_WINDOW_SIZE);
> > +                       spin_unlock_bh(&orig_node->ogm_cnt_lock);
> > +               }
> > +               rcu_read_unlock();
> > +       }
> > +}
> 
> Kernel doc ?

ok. Will provide some :)

> 
> Cheers,
> Marek

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-04-15 10:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02  9:41 [B.A.T.M.A.N.] [PATCH] batman-adv: move batadv_slide_own_bcast_window to bat_iv_ogm.c Antonio Quartulli
2013-04-15  9:10 ` Marek Lindner
2013-04-15 10:25   ` Antonio Quartulli [this message]
2013-04-16 13:38     ` Marek Lindner

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=20130415102509.GA18298@ritirata.org \
    --to=ordex@autistici.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /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