All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@meshcoding.com>
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.] [PATCHv2 1/6] batman-adv: add isolation_mark sysfs attribute
Date: Sat, 16 Nov 2013 10:10:21 +0100	[thread overview]
Message-ID: <20131116091021.GI1663@neomailbox.net> (raw)
In-Reply-To: <3563164.50QBaKXCKk@diderot>

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

On Sat, Nov 16, 2013 at 01:35:53PM +0800, Marek Lindner wrote:
> On Wednesday 13 November 2013 17:38:00 Antonio Quartulli wrote:
> > @@ -692,6 +692,8 @@ static int batadv_softif_init_late(struct net_device
> > *dev)> 
> >  #endif
> >  
> >         bat_priv->tt.last_changeset = NULL;
> >         bat_priv->tt.last_changeset_len = 0;
> > 
> > +       bat_priv->isolation_mark = 0;
> > +       bat_priv->isolation_mark_mask = 0;
> > 
> >         /* randomize initial seqno to avoid collision */
> >         get_random_bytes(&random_seqno, sizeof(random_seqno));
> 
> Wasn't the plan to initialize isolation_mark_mask with something useful like 
> 0xFFFFFFFF ?

Uhm, no. The plan is that when the user enters a value _without_ specifying a
mask, then we assume the mask is 0xFFFFFFFF (this is what mask = UINT_MAX does
in the next few lines).

During initialization isolation_mark_mask must be 0 because this means "extended
isolation is off".

[...]

> > +static ssize_t batadv_store_isolation_mark(struct kobject *kobj,
> > +					   struct attribute *attr, char *buff,
> > +					   size_t count)
> > +{
> > +	struct net_device *net_dev = batadv_kobj_to_netdev(kobj);
> > +	struct batadv_priv *bat_priv = netdev_priv(net_dev);
> > +	uint32_t mark, mask = UINT_MAX;
> > +	char *mask_ptr;

[...]

> We always have 'show' before 'store' in the sysfs.c file. Please keep the 
> order.

Ok, will do.

> 
> Where is the sysfs documentation update ?

Oh, right. I totally forgot about that. Thanks!


Cheers,


-- 
Antonio Quartulli

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

  reply	other threads:[~2013-11-16  9:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 16:37 [B.A.T.M.A.N.] [PATCHv2 0/5] Introducing the Extended-Isolation Antonio Quartulli
2013-11-13 16:38 ` [B.A.T.M.A.N.] [PATCHv2 1/6] batman-adv: add isolation_mark sysfs attribute Antonio Quartulli
2013-11-16  5:35   ` Marek Lindner
2013-11-16  9:10     ` Antonio Quartulli [this message]
2013-11-13 16:38 ` [B.A.T.M.A.N.] [PATCHv2 2/6] batman-adv: mark a local client as isolated when needed Antonio Quartulli
2013-11-16  5:31   ` Marek Lindner
2013-11-16  9:11     ` Antonio Quartulli
2013-11-16 10:04       ` Martin Hundebøll
2013-11-16 10:43         ` Antonio Quartulli
2013-11-13 16:38 ` [B.A.T.M.A.N.] [PATCHv2 3/6] batman-adv: print the new BATADV_TT_CLIENT_ISOLA flag Antonio Quartulli
2013-11-13 16:38 ` [B.A.T.M.A.N.] [PATCHv2 4/6] batman-adv: extend the ap_isolation mechanism Antonio Quartulli
2013-11-13 16:38 ` [B.A.T.M.A.N.] [PATCHv2 5/6] batman-adv: create helper function to get AP isolation status Antonio Quartulli
2013-11-13 16:38 ` [B.A.T.M.A.N.] [PATCHv2 6/6] batman-adv: set the isolation mark in the skb if needed Antonio Quartulli

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=20131116091021.GI1663@neomailbox.net \
    --to=antonio@meshcoding.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.