public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Cc: Marek Lindner <lindner_marek@yahoo.de>
Subject: Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: convert multiple /proc files to use sysfs
Date: Sun, 28 Feb 2010 10:37:28 +0100	[thread overview]
Message-ID: <20100228093728.GF637@lunn.ch> (raw)
In-Reply-To: <1267302649-22040-1-git-send-email-lindner_marek@yahoo.de>

Hi Marek

I've not looked into the details yet, just a quick glans. However
maybe we should discuss this point:

> @@ -249,6 +249,8 @@ static void rebuild_batman_packet(struct batman_if *batman_if)
>  
>  void schedule_own_packet(struct batman_if *batman_if)
>  {
> +	/* FIXME: each batman_if will be attached to a softif */
> +	struct bat_priv *bat_priv = netdev_priv(soft_device);
>  	unsigned long send_time;
>  	struct batman_packet *batman_packet;
>  	int vis_server = atomic_read(&vis_mode);
> @@ -289,7 +291,9 @@ void schedule_own_packet(struct batman_if *batman_if)
>  	slide_own_bcast_window(batman_if);
>  	send_time = own_send_time();
>  	add_bat_packet_to_list(batman_if->packet_buff,
> -			       batman_if->packet_len, batman_if, 1, send_time);
> +			       batman_if->packet_len,
> +			       batman_if, 1, send_time,
> +			       &bat_priv->aggregation_enabled);
>  }

  
>  struct bat_priv {
>  	struct net_device_stats stats;
> +	atomic_t aggregation_enabled;
> +	atomic_t bonding_enabled;
> +	struct kobject *mesh_obj;
>  };

With time i expect that bat_priv will gain many more members as global
variables are replaced with variables per mesh. Rather than passing to
functions a member, pass the pointer and let the function dereference
it. I think it will make the APIs neater in the long run.

    Andrew

  parent reply	other threads:[~2010-02-28  9:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-27 20:30 [B.A.T.M.A.N.] reorganized kernel interface Marek Lindner
2010-02-27 20:30 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: convert multiple /proc files to use sysfs Marek Lindner
2010-02-27 20:30   ` [B.A.T.M.A.N.] [PATCH 2/2] batctl: follow /proc to sysfs conversion & introduce input validation Marek Lindner
2010-03-01  1:51     ` Linus Lüssing
2010-03-01  6:06       ` Andrew Lunn
2010-03-01  7:17         ` Marek Lindner
2010-03-01  7:27       ` Marek Lindner
2010-02-28  9:37   ` Andrew Lunn [this message]
2010-02-28 10:19     ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: convert multiple /proc files to use sysfs Marek Lindner
2010-02-28 17:47   ` Gus Wirth

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=20100228093728.GF637@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=lindner_marek@yahoo.de \
    /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