All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [B.A.T.M.A.N.] [RFC 00/11] bridge loop avoidance II
From: Simon Wunderlich @ 2011-10-31  0:52 UTC (permalink / raw)
  To: b.a.t.m.a.n
In-Reply-To: <1320015072-10313-1-git-send-email-siwu@hrz.tu-chemnitz.de>

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

Hey there,

There are also some online repositories which might be interesting for
your review:

http://git.open-mesh.org/?p=simon/batman-adv.git;a=shortlog;h=refs/heads/blaII_dirty
here are the separate fix patches on top of the original patchset. I'll add
fixes here first.

http://git.open-mesh.org/?p=simon/batman-adv.git;a=shortlog;h=refs/heads/blaII
this is the patchset as sent to the mailing list. Fixes are squashed from
blaII_dirty into this branch later.

http://git.open-mesh.org/?p=simon/batctl.git;a=shortlog;h=refs/heads/blaII
this is the batctl patch which adds some control and debugging functions.

Cheers,
	Simon

On Sun, Oct 30, 2011 at 11:51:01PM +0100, Simon Wunderlich wrote:
> This series of patches is a request for comments on the redesigned
> bridge loop avoidance. The general concept is described in the wiki
> [1]. I've already performed a few testcases [2] which worked fine in
> my kvm environment. No crashes while running or unloading the 
> extension either.
> 
> The last patch in the series uses the cached address of the primary
> interface (the originator address known through the mesh) to save some
> code at various positions, there may be side effects I don't see
> however (e.g. implicit checking whether the module was configured
> correctly was removed).
> 
> Marek already pointed quite a few issues out, these changes are
> reflected in the respective commit logs. These commit comments will
> be removed in the final version.
> 
> Any comments and suggestions are appreciated. 
> 
> Thanks
>     Simon
> 
> [1] http://www.open-mesh.org/wiki/batman-adv/Bridge-loop-avoidance-II
> [2] http://www.open-mesh.org/wiki/batman-adv/Bridge-loop-avoidance-Testcases
> 
> Simon Wunderlich (11):
>   batman-adv: remove old bridge loop avoidance code
>   batman-adv: add basic bridge loop avoidance code
>   batman-adv: make bridge loop avoidance switchable
>   batman-adv: export claim tables through debugfs
>   batman-adv: allow multiple entries in tt_global_entries
>   batman-adv: don't let backbone gateways exchange tt entries
>   batman-adv: add broadcast duplicate check
>   batman-adv: drop STP over batman
>   batman-adv: form groups in the bridge loop avoidance
>   batman-adv: Update README and sysfs description
>   [RFC] batman-adv: get primaries address through bat_priv->own_orig
> 
>  Makefile.kbuild         |    1 +
>  README                  |   28 +-
>  bat_debugfs.c           |   18 +-
>  bat_sysfs.c             |    4 +-
>  bridge_loop_avoidance.c | 1509 +++++++++++++++++++++++++++++++++++++++++++++++
>  bridge_loop_avoidance.h |   34 ++
>  compat.c                |   16 +-
>  compat.h                |    3 +-
>  hard-interface.c        |    8 +-
>  icmp_socket.c           |   12 +-
>  main.c                  |    9 +-
>  main.h                  |    9 +-
>  originator.c            |    3 +-
>  packet.h                |   16 +
>  routing.c               |   41 +-
>  soft-interface.c        |  490 +---------------
>  soft-interface.h        |    2 -
>  sysfs-class-net-mesh    |    9 +
>  translation-table.c     |  366 ++++++++----
>  types.h                 |   70 ++-
>  unicast.c               |    9 +-
>  vis.c                   |   20 +-
>  22 files changed, 1965 insertions(+), 712 deletions(-)
>  create mode 100644 bridge_loop_avoidance.c
>  create mode 100644 bridge_loop_avoidance.h
> 
> -- 
> 1.7.7.1
> 
> 

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

^ permalink raw reply

* Re: how to set time zone
From: Ni Qingliang @ 2011-10-31  0:44 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer
In-Reply-To: <4EAABF76.7080703@windriver.com>

I'd like the 'system level configuration' solution.

the /etc/localtime/ link can be done when packaging rootfs (using the
system level configuration).

On Fri, 2011-10-28 at 22:43 +0800, Mark Hatle wrote:
> Setting the default TZ for the image is something that should be done in a post
> install script for the tzdata package or something similar.
> 
> Since the /etc/localtime is usually a copy/hardlink or symlink to the timezone
> data we don't want to package it up.  Instead we want to perform the actions
> that a program running on the target system itself would use to change the timezone.
> 
> So I think the easiest approach is to add a system level configuration variable
> (set the default).
> 
> Then use this variable to populate the configuration file that specifies the
> system timezone... and then use the post install process to check the contents
> of a text file.
> 
> Alternatively do this via an initscript -- but for folks w/ read-only
> filesystems I'm not sure that will work.
> 
> --Mark
> 
> On 10/28/11 3:22 AM, Andrea Adami wrote:
> > On Fri, Oct 28, 2011 at 9:05 AM, Ni Qingliang <niqingliang@insigma.com.cn
> > <mailto:niqingliang@insigma.com.cn>> wrote:
> >
> >     THANKS!
> >
> >     I still want the native support by oe-core/yocto:-). If no, I will try
> >     by myself.
> >
> >
> > I've asked three or four time the oe-core crow to improve the recipe...last one:
> >
> > On Wed, Oct 19, 2011 at 12:24 AM, Joshua Lock <josh@linux.intel.com
> > <mailto:josh@linux.intel.com>> wrote:
> >
> >     Per mailing requests, here are updates to the tzdata and gst-plugins-good
> >     recipes.
> >
> >     Joshua
> >
> >     The following changes since commit 95d0ff5e070c690314ab87665200099a52d37ebf:
> >
> >      tzdata: updated SRC_URI and update to 2011k (2011-10-18 11:16:58 -0700)
> >
> >
> > Thanks for the tzdata fix.
> > Now, we have the same recipes in meta-oe with a slightly different do_install
> > and packaging: I'm referring to /etc/localtime and /etc/timezone: which package
> > do provide those in oe-core?
> >
> > (We'll remove the tzdata/tzcodes from meta-oe once the recipes are matching)
> >
> > Regards
> >
> >
> >
> > Andrea
> >
> >
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Yi Qingliang
niqingliang@insigma.com.cn
http://niqingliang2003.wordpress.com





^ permalink raw reply

* [U-Boot] [PATCHv10] new tool mkenvimage: generates an env image from an arbitrary config file
From: Mike Frysinger @ 2011-10-31  0:49 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <20111023204438.C4D321408E9B@gemini.denx.de>

On Sunday 23 October 2011 16:44:38 Wolfgang Denk wrote:
> David Wagner wrote:
> > This tool takes a key=value configuration file (same as would a
> > `printenv' show) and generates the corresponding environment image,
> > ready to be flashed.
> > 
> > use case: flash the environment with an external tool
> 
> This patch fails to build when I try to run a plain "make
> tools/mkenvimage":
> 
> tools/mkenvimage.c:35:22: fatal error: compiler.h: No such file or
> directory
> tools/mkenvimage.c:39:24: fatal error: u-boot/crc.h: No such file or
> directory

i think that's expected.  if you do `make tools`, does it build correctly ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111030/3fb80ddb/attachment.pgp 

^ permalink raw reply

* [U-Boot] [PATCH] powerpc: Correct build warning introduced by getenv_ulong() patch
From: Mike Frysinger @ 2011-10-31  0:47 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1319427714-29479-1-git-send-email-sjg@chromium.org>

On Sunday 23 October 2011 23:41:54 Simon Glass wrote:
> --- a/arch/powerpc/lib/board.c
> +++ b/arch/powerpc/lib/board.c
>
>   */
>  void board_init_r (gd_t *id, ulong dest_addr)
>  {
> -	char *s;
>  	bd_t *bd;
>  	ulong malloc_start;
> 
> @@ -727,6 +726,8 @@ void board_init_r (gd_t *id, ulong dest_addr)
>  		flash_size = 0;
>  	} else if ((flash_size = flash_init ()) > 0) {
>  # ifdef CONFIG_SYS_FLASH_CHECKSUM
> +		char *s;
> +
>  		print_size (flash_size, "");
>  		/*
>  		 * Compute and print flash CRC if flashchecksum is set to 'y'
> @@ -927,8 +928,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
>  	/* Initialize from environment */
>  	load_addr = getenv_ulong("loadaddr", 16, load_addr);
>  #if defined(CONFIG_CMD_NET)
> -	if ((s = getenv ("bootfile")) != NULL) {
> -		copy_filename (BootFile, s, sizeof (BootFile));
> +	{
> +		char *s = getenv("bootfile");
> +
> +		if (s != NULL)
> +			copy_filename(BootFile, s, sizeof(BootFile));
>  	}
>  #endif

same feedback here wrt using __maybe_unused and marking things const ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111030/1ec12b89/attachment.pgp 

^ permalink raw reply

* [U-Boot] [PATCH v2] arm: Correct build error introduced by getenv_ulong() patch
From: Mike Frysinger @ 2011-10-31  0:44 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1319427875-29965-1-git-send-email-sjg@chromium.org>

On Sunday 23 October 2011 23:44:35 Simon Glass wrote:
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
>
>  	flash_size = flash_init();
>  	if (flash_size > 0) {
>  # ifdef CONFIG_SYS_FLASH_CHECKSUM
> +		char *s = getenv("flashchecksum");
> +
>  		print_size(flash_size, "");
>  		/*
>  		 * Compute and print flash CRC if flashchecksum is set to 'y'
>  		 *
>  		 * NOTE: Maybe we should add some WATCHDOG_RESET()? XXX
>  		 */
> -		s = getenv("flashchecksum");
>  		if (s && (*s == 'y')) {
>  			printf("  CRC: %08X", crc32(0,
>  				(const unsigned char *) CONFIG_SYS_FLASH_BASE,
> @@ -566,9 +567,12 @@ void board_init_r(gd_t *id, ulong dest_addr)
>  	/* Initialize from environment */
>  	load_addr = getenv_ulong("loadaddr", 16, load_addr);
>  #if defined(CONFIG_CMD_NET)
> -	s = getenv("bootfile");
> -	if (s != NULL)
> -		copy_filename(BootFile, s, sizeof(BootFile));
> +	{
> +		char *s = getenv("bootfile");
> +
> +		if (s != NULL)
> +			copy_filename(BootFile, s, sizeof(BootFile));
> +	}
>  #endif

seems like a better solution would be to use at the top:
	__maybe_unused char *s;

also, shouldn't these be "const char *s" ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111030/d0f8df3d/attachment.pgp 

^ permalink raw reply

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: generalise tt_local_reset_flags()
From: Simon Wunderlich @ 2011-10-31  0:42 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking
In-Reply-To: <1320001741-18351-1-git-send-email-ordex@autistici.org>

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

Hey Antonio,

I don't quite understand what this patch is good for - it generalises the function,
but does not use the function at another point. So what it is good for (next to
add more complexity to batman ;] ).

Furthermore it counts the changes and adds it to num_local_tt, is there a bug fix
hidden in this patch somewhere? :)

Cheers,
	Simon

On Sun, Oct 30, 2011 at 08:09:01PM +0100, Antonio Quartulli wrote:
> The tt_local_reset_flags() is actually used for one use case only. It is not
> generalised enough to be used indifferent situations. This patch make it general
> enough in order to let other code use it whenever a flag flip is requested over
> the whole hash table (passed as parameter).
> 
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> ---
> 
> This patch depends on:
> 
> batman-adv: create a common substructure for tt_global/local_entry
> 
> 
>  translation-table.c |   31 ++++++++++++++++++++-----------
>  1 files changed, 20 insertions(+), 11 deletions(-)
> 
> diff --git a/translation-table.c b/translation-table.c
> index 76134bc..5b60aba 100644
> --- a/translation-table.c
> +++ b/translation-table.c
> @@ -1695,19 +1695,20 @@ void tt_free(struct bat_priv *bat_priv)
>  	kfree(bat_priv->tt_buff);
>  }
>  
> -/* This function will reset the specified flags from all the entries in
> - * the given hash table and will increment num_local_tt for each involved
> - * entry */
> -static void tt_local_reset_flags(struct bat_priv *bat_priv, uint16_t flags)
> +/* This function will flip to new_value (if not already) the specified flags for
> + * all the entries in the given hash table and returns the number of modified
> + * entries */
> +static uint16_t tt_flip_flags(struct hashtable_t *hash, uint16_t flags,
> +			     uint8_t new_value)
>  {
>  	uint32_t i;
> -	struct hashtable_t *hash = bat_priv->tt_local_hash;
> +	uint16_t changed_num = 0;
>  	struct hlist_head *head;
>  	struct hlist_node *node;
>  	struct tt_common_entry *tt_common_entry;
>  
>  	if (!hash)
> -		return;
> +		goto out;
>  
>  	for (i = 0; i < hash->size; i++) {
>  		head = &hash->table[i];
> @@ -1715,14 +1716,18 @@ static void tt_local_reset_flags(struct bat_priv *bat_priv, uint16_t flags)
>  		rcu_read_lock();
>  		hlist_for_each_entry_rcu(tt_common_entry, node,
>  					 head, hash_entry) {
> -			if (!(tt_common_entry->flags & flags))
> +			if ((tt_common_entry->flags & flags) != new_value)
>  				continue;
> -			tt_common_entry->flags &= ~flags;
> -			atomic_inc(&bat_priv->num_local_tt);
> +			/* depending on 'new_value', enable or disable the flags
> +			 * pointed by 'flags' */
> +			tt_common_entry->flags &=
> +				(~flags | (new_value ? flags : NO_FLAGS));
> +			changed_num++;
>  		}
>  		rcu_read_unlock();
>  	}
> -
> +out:
> +	return changed_num;
>  }
>  
>  /* Purge out all the tt local entries marked with TT_CLIENT_PENDING */
> @@ -1766,7 +1771,11 @@ static void tt_local_purge_pending_clients(struct bat_priv *bat_priv)
>  
>  void tt_commit_changes(struct bat_priv *bat_priv)
>  {
> -	tt_local_reset_flags(bat_priv, TT_CLIENT_NEW);
> +	uint16_t changed_num = tt_flip_flags(bat_priv->tt_local_hash,
> +					    TT_CLIENT_NEW, 0);
> +	/* all the reset entries have now to be effectively counted as local
> +	 * entries */
> +	atomic_add(changed_num, &bat_priv->num_local_tt);
>  	tt_local_purge_pending_clients(bat_priv);
>  
>  	/* Increment the TTVN only once per OGM interval */
> -- 
> 1.7.3.4
> 
> 

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

^ permalink raw reply

* [U-Boot] [PATCH 2/3] nds32: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment
From: Mike Frysinger @ 2011-10-31  0:40 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <CACCg+XNAnsJs8tTX8BFRPGFf16t0Pr7VCCr_i+0KUx=eTQeHHg@mail.gmail.com>

On Friday 28 October 2011 00:46:38 ??? wrote:
> Since the NDS32 has been come into mainline.
> Could I pick up this kind of simple changes of reviewed patches which
> are related to NDS32 only by myself,
> and then send pull-request to you?
> Hope this could reducing your loading and gain some benefits

you've got a maintainer tree now:
	http://git.denx.de/?p=u-boot/u-boot-nds32.git

so you should be gathering all the NDS32 patches and pushing to wolfgang.  
please see the documentation here for the process:
	http://www.denx.de/wiki/U-Boot/DevelopmentProcess

short answer:
	- fixes should get pushed at any time
	- everything else should get pushed during merge window
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111030/ba4d243b/attachment.pgp 

^ permalink raw reply

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: create a common substructure for tt_global/local_entry
From: Simon Wunderlich @ 2011-10-31  0:39 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking
In-Reply-To: <1319973453-24753-1-git-send-email-ordex@autistici.org>

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

Hi,

this patch looks good to me, this should resolve the shared struct issues.

Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>

On Sun, Oct 30, 2011 at 12:17:33PM +0100, Antonio Quartulli wrote:
> Several functions in the translation table management code assume that the
> tt_global_entry and tt_local_entry structures have the same initial fields such
> as 'addr' and 'hash_entry'. To improve the code readability and to avoid
> mistakes in later changes, a common substructure that substitute the shared
> fields has been introduced (struct tt_common_entry).
> 
> Thanks to this modification, it has also been possible to slightly reduce the
> code length by merging some functions like compare_ltt/gtt() and
> tt_local/global_hash_find()
> 
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> ---
>  compat.c            |    5 +-
>  translation-table.c |  287 ++++++++++++++++++++++++++++-----------------------
>  types.h             |   14 ++--
>  vis.c               |    6 +-
>  4 files changed, 171 insertions(+), 141 deletions(-)
> 
> diff --git a/compat.c b/compat.c
> index 1793904..855360e 100644
> --- a/compat.c
> +++ b/compat.c
> @@ -30,9 +30,12 @@ void free_rcu_softif_neigh(struct rcu_head *rcu)
>  
>  void free_rcu_tt_local_entry(struct rcu_head *rcu)
>  {
> +	struct tt_common_entry *tt_common_entry;
>  	struct tt_local_entry *tt_local_entry;
>  
> -	tt_local_entry = container_of(rcu, struct tt_local_entry, rcu);
> +	tt_common_entry = container_of(rcu, struct tt_common_entry, rcu);
> +	tt_local_entry = container_of(tt_common_entry, struct tt_local_entry,
> +				      common);
>  	kfree(tt_local_entry);
>  }
>  
> diff --git a/translation-table.c b/translation-table.c
> index 78b9528..76134bc 100644
> --- a/translation-table.c
> +++ b/translation-table.c
> @@ -36,18 +36,9 @@ static void _tt_global_del(struct bat_priv *bat_priv,
>  static void tt_purge(struct work_struct *work);
>  
>  /* returns 1 if they are the same mac addr */
> -static int compare_ltt(const struct hlist_node *node, const void *data2)
> +static int compare_tt(const struct hlist_node *node, const void *data2)
>  {
> -	const void *data1 = container_of(node, struct tt_local_entry,
> -					 hash_entry);
> -
> -	return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0);
> -}
> -
> -/* returns 1 if they are the same mac addr */
> -static int compare_gtt(const struct hlist_node *node, const void *data2)
> -{
> -	const void *data1 = container_of(node, struct tt_global_entry,
> +	const void *data1 = container_of(node, struct tt_common_entry,
>  					 hash_entry);
>  
>  	return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0);
> @@ -60,13 +51,12 @@ static void tt_start_timer(struct bat_priv *bat_priv)
>  			   msecs_to_jiffies(5000));
>  }
>  
> -static struct tt_local_entry *tt_local_hash_find(struct bat_priv *bat_priv,
> -						 const void *data)
> +static struct tt_common_entry *tt_hash_find(struct hashtable_t *hash,
> +					    const void *data)
>  {
> -	struct hashtable_t *hash = bat_priv->tt_local_hash;
>  	struct hlist_head *head;
>  	struct hlist_node *node;
> -	struct tt_local_entry *tt_local_entry, *tt_local_entry_tmp = NULL;
> +	struct tt_common_entry *tt_common_entry, *tt_common_entry_tmp = NULL;
>  	uint32_t index;
>  
>  	if (!hash)
> @@ -76,51 +66,46 @@ static struct tt_local_entry *tt_local_hash_find(struct bat_priv *bat_priv,
>  	head = &hash->table[index];
>  
>  	rcu_read_lock();
> -	hlist_for_each_entry_rcu(tt_local_entry, node, head, hash_entry) {
> -		if (!compare_eth(tt_local_entry, data))
> +	hlist_for_each_entry_rcu(tt_common_entry, node, head, hash_entry) {
> +		if (!compare_eth(tt_common_entry, data))
>  			continue;
>  
> -		if (!atomic_inc_not_zero(&tt_local_entry->refcount))
> +		if (!atomic_inc_not_zero(&tt_common_entry->refcount))
>  			continue;
>  
> -		tt_local_entry_tmp = tt_local_entry;
> +		tt_common_entry_tmp = tt_common_entry;
>  		break;
>  	}
>  	rcu_read_unlock();
>  
> -	return tt_local_entry_tmp;
> +	return tt_common_entry_tmp;
>  }
>  
> -static struct tt_global_entry *tt_global_hash_find(struct bat_priv *bat_priv,
> -						   const void *data)
> +static struct tt_local_entry *tt_local_hash_find(struct bat_priv *bat_priv,
> +						 const void *data)
>  {
> -	struct hashtable_t *hash = bat_priv->tt_global_hash;
> -	struct hlist_head *head;
> -	struct hlist_node *node;
> -	struct tt_global_entry *tt_global_entry;
> -	struct tt_global_entry *tt_global_entry_tmp = NULL;
> -	uint32_t index;
> -
> -	if (!hash)
> -		return NULL;
> -
> -	index = choose_orig(data, hash->size);
> -	head = &hash->table[index];
> +	struct tt_common_entry *tt_common_entry;
> +	struct tt_local_entry *tt_local_entry = NULL;
>  
> -	rcu_read_lock();
> -	hlist_for_each_entry_rcu(tt_global_entry, node, head, hash_entry) {
> -		if (!compare_eth(tt_global_entry, data))
> -			continue;
> +	tt_common_entry = tt_hash_find(bat_priv->tt_local_hash, data);
> +	if (tt_common_entry)
> +		tt_local_entry = container_of(tt_common_entry,
> +					      struct tt_local_entry, common);
> +	return tt_local_entry;
> +}
>  
> -		if (!atomic_inc_not_zero(&tt_global_entry->refcount))
> -			continue;
> +static struct tt_global_entry *tt_global_hash_find(struct bat_priv *bat_priv,
> +						   const void *data)
> +{
> +	struct tt_common_entry *tt_common_entry;
> +	struct tt_global_entry *tt_global_entry = NULL;
>  
> -		tt_global_entry_tmp = tt_global_entry;
> -		break;
> -	}
> -	rcu_read_unlock();
> +	tt_common_entry = tt_hash_find(bat_priv->tt_global_hash, data);
> +	if (tt_common_entry)
> +		tt_global_entry = container_of(tt_common_entry,
> +					       struct tt_global_entry, common);
> +	return tt_global_entry;
>  
> -	return tt_global_entry_tmp;
>  }
>  
>  static bool is_out_of_time(unsigned long starting_time, unsigned long timeout)
> @@ -133,15 +118,18 @@ static bool is_out_of_time(unsigned long starting_time, unsigned long timeout)
>  
>  static void tt_local_entry_free_ref(struct tt_local_entry *tt_local_entry)
>  {
> -	if (atomic_dec_and_test(&tt_local_entry->refcount))
> -		kfree_rcu(tt_local_entry, rcu);
> +	if (atomic_dec_and_test(&tt_local_entry->common.refcount))
> +		kfree_rcu(tt_local_entry, common.rcu);
>  }
>  
>  static void tt_global_entry_free_rcu(struct rcu_head *rcu)
>  {
> +	struct tt_common_entry *tt_common_entry;
>  	struct tt_global_entry *tt_global_entry;
>  
> -	tt_global_entry = container_of(rcu, struct tt_global_entry, rcu);
> +	tt_common_entry = container_of(rcu, struct tt_common_entry, rcu);
> +	tt_global_entry = container_of(tt_common_entry, struct tt_global_entry,
> +				       common);
>  
>  	if (tt_global_entry->orig_node)
>  		orig_node_free_ref(tt_global_entry->orig_node);
> @@ -151,8 +139,9 @@ static void tt_global_entry_free_rcu(struct rcu_head *rcu)
>  
>  static void tt_global_entry_free_ref(struct tt_global_entry *tt_global_entry)
>  {
> -	if (atomic_dec_and_test(&tt_global_entry->refcount))
> -		call_rcu(&tt_global_entry->rcu, tt_global_entry_free_rcu);
> +	if (atomic_dec_and_test(&tt_global_entry->common.refcount))
> +		call_rcu(&tt_global_entry->common.rcu,
> +			 tt_global_entry_free_rcu);
>  }
>  
>  static void tt_local_event(struct bat_priv *bat_priv, const uint8_t *addr,
> @@ -217,26 +206,26 @@ void tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
>  		"Creating new local tt entry: %pM (ttvn: %d)\n", addr,
>  		(uint8_t)atomic_read(&bat_priv->ttvn));
>  
> -	memcpy(tt_local_entry->addr, addr, ETH_ALEN);
> -	tt_local_entry->last_seen = jiffies;
> -	tt_local_entry->flags = NO_FLAGS;
> +	memcpy(tt_local_entry->common.addr, addr, ETH_ALEN);
> +	tt_local_entry->common.flags = NO_FLAGS;
>  	if (is_wifi_iface(ifindex))
> -		tt_local_entry->flags |= TT_CLIENT_WIFI;
> -	atomic_set(&tt_local_entry->refcount, 2);
> +		tt_local_entry->common.flags |= TT_CLIENT_WIFI;
> +	atomic_set(&tt_local_entry->common.refcount, 2);
> +	tt_local_entry->last_seen = jiffies;
>  
>  	/* the batman interface mac address should never be purged */
>  	if (compare_eth(addr, soft_iface->dev_addr))
> -		tt_local_entry->flags |= TT_CLIENT_NOPURGE;
> +		tt_local_entry->common.flags |= TT_CLIENT_NOPURGE;
>  
> -	tt_local_event(bat_priv, addr, tt_local_entry->flags);
> +	tt_local_event(bat_priv, addr, tt_local_entry->common.flags);
>  
>  	/* The local entry has to be marked as NEW to avoid to send it in
>  	 * a full table response going out before the next ttvn increment
>  	 * (consistency check) */
> -	tt_local_entry->flags |= TT_CLIENT_NEW;
> +	tt_local_entry->common.flags |= TT_CLIENT_NEW;
>  
> -	hash_add(bat_priv->tt_local_hash, compare_ltt, choose_orig,
> -		 tt_local_entry, &tt_local_entry->hash_entry);
> +	hash_add(bat_priv->tt_local_hash, compare_tt, choose_orig,
> +		 &tt_local_entry->common, &tt_local_entry->common.hash_entry);
>  
>  	/* remove address from global hash if present */
>  	tt_global_entry = tt_global_hash_find(bat_priv, addr);
> @@ -247,8 +236,8 @@ void tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
>  		tt_global_entry->orig_node->tt_poss_change = true;
>  		/* The global entry has to be marked as PENDING and has to be
>  		 * kept for consistency purpose */
> -		tt_global_entry->flags |= TT_CLIENT_PENDING;
> -		send_roam_adv(bat_priv, tt_global_entry->addr,
> +		tt_global_entry->common.flags |= TT_CLIENT_PENDING;
> +		send_roam_adv(bat_priv, tt_global_entry->common.addr,
>  			      tt_global_entry->orig_node);
>  	}
>  out:
> @@ -310,7 +299,7 @@ int tt_local_seq_print_text(struct seq_file *seq, void *offset)
>  	struct net_device *net_dev = (struct net_device *)seq->private;
>  	struct bat_priv *bat_priv = netdev_priv(net_dev);
>  	struct hashtable_t *hash = bat_priv->tt_local_hash;
> -	struct tt_local_entry *tt_local_entry;
> +	struct tt_common_entry *tt_common_entry;
>  	struct hard_iface *primary_if;
>  	struct hlist_node *node;
>  	struct hlist_head *head;
> @@ -340,19 +329,19 @@ int tt_local_seq_print_text(struct seq_file *seq, void *offset)
>  		head = &hash->table[i];
>  
>  		rcu_read_lock();
> -		hlist_for_each_entry_rcu(tt_local_entry, node,
> +		hlist_for_each_entry_rcu(tt_common_entry, node,
>  					 head, hash_entry) {
>  			seq_printf(seq, " * %pM [%c%c%c%c%c]\n",
> -					tt_local_entry->addr,
> -					(tt_local_entry->flags &
> +					tt_common_entry->addr,
> +					(tt_common_entry->flags &
>  					 TT_CLIENT_ROAM ? 'R' : '.'),
> -					(tt_local_entry->flags &
> +					(tt_common_entry->flags &
>  					 TT_CLIENT_NOPURGE ? 'P' : '.'),
> -					(tt_local_entry->flags &
> +					(tt_common_entry->flags &
>  					 TT_CLIENT_NEW ? 'N' : '.'),
> -					(tt_local_entry->flags &
> +					(tt_common_entry->flags &
>  					 TT_CLIENT_PENDING ? 'X' : '.'),
> -					(tt_local_entry->flags &
> +					(tt_common_entry->flags &
>  					 TT_CLIENT_WIFI ? 'W' : '.'));
>  		}
>  		rcu_read_unlock();
> @@ -367,13 +356,13 @@ static void tt_local_set_pending(struct bat_priv *bat_priv,
>  				 struct tt_local_entry *tt_local_entry,
>  				 uint16_t flags)
>  {
> -	tt_local_event(bat_priv, tt_local_entry->addr,
> -		       tt_local_entry->flags | flags);
> +	tt_local_event(bat_priv, tt_local_entry->common.addr,
> +		       tt_local_entry->common.flags | flags);
>  
>  	/* The local client has to be marked as "pending to be removed" but has
>  	 * to be kept in the table in order to send it in a full table
>  	 * response issued before the net ttvn increment (consistency check) */
> -	tt_local_entry->flags |= TT_CLIENT_PENDING;
> +	tt_local_entry->common.flags |= TT_CLIENT_PENDING;
>  }
>  
>  void tt_local_remove(struct bat_priv *bat_priv, const uint8_t *addr,
> @@ -389,7 +378,7 @@ void tt_local_remove(struct bat_priv *bat_priv, const uint8_t *addr,
>  			     (roaming ? TT_CLIENT_ROAM : NO_FLAGS));
>  
>  	bat_dbg(DBG_TT, bat_priv, "Local tt entry (%pM) pending to be removed: "
> -		"%s\n", tt_local_entry->addr, message);
> +		"%s\n", tt_local_entry->common.addr, message);
>  out:
>  	if (tt_local_entry)
>  		tt_local_entry_free_ref(tt_local_entry);
> @@ -399,6 +388,7 @@ static void tt_local_purge(struct bat_priv *bat_priv)
>  {
>  	struct hashtable_t *hash = bat_priv->tt_local_hash;
>  	struct tt_local_entry *tt_local_entry;
> +	struct tt_common_entry *tt_common_entry;
>  	struct hlist_node *node, *node_tmp;
>  	struct hlist_head *head;
>  	spinlock_t *list_lock; /* protects write access to the hash lists */
> @@ -409,13 +399,16 @@ static void tt_local_purge(struct bat_priv *bat_priv)
>  		list_lock = &hash->list_locks[i];
>  
>  		spin_lock_bh(list_lock);
> -		hlist_for_each_entry_safe(tt_local_entry, node, node_tmp,
> +		hlist_for_each_entry_safe(tt_common_entry, node, node_tmp,
>  					  head, hash_entry) {
> -			if (tt_local_entry->flags & TT_CLIENT_NOPURGE)
> +			tt_local_entry = container_of(tt_common_entry,
> +						      struct tt_local_entry,
> +						      common);
> +			if (tt_local_entry->common.flags & TT_CLIENT_NOPURGE)
>  				continue;
>  
>  			/* entry already marked for deletion */
> -			if (tt_local_entry->flags & TT_CLIENT_PENDING)
> +			if (tt_local_entry->common.flags & TT_CLIENT_PENDING)
>  				continue;
>  
>  			if (!is_out_of_time(tt_local_entry->last_seen,
> @@ -426,7 +419,7 @@ static void tt_local_purge(struct bat_priv *bat_priv)
>  					     TT_CLIENT_DEL);
>  			bat_dbg(DBG_TT, bat_priv, "Local tt entry (%pM) "
>  				"pending to be removed: timed out\n",
> -				tt_local_entry->addr);
> +				tt_local_entry->common.addr);
>  		}
>  		spin_unlock_bh(list_lock);
>  	}
> @@ -437,6 +430,7 @@ static void tt_local_table_free(struct bat_priv *bat_priv)
>  {
>  	struct hashtable_t *hash;
>  	spinlock_t *list_lock; /* protects write access to the hash lists */
> +	struct tt_common_entry *tt_common_entry;
>  	struct tt_local_entry *tt_local_entry;
>  	struct hlist_node *node, *node_tmp;
>  	struct hlist_head *head;
> @@ -452,9 +446,12 @@ static void tt_local_table_free(struct bat_priv *bat_priv)
>  		list_lock = &hash->list_locks[i];
>  
>  		spin_lock_bh(list_lock);
> -		hlist_for_each_entry_safe(tt_local_entry, node, node_tmp,
> +		hlist_for_each_entry_safe(tt_common_entry, node, node_tmp,
>  					  head, hash_entry) {
>  			hlist_del_rcu(node);
> +			tt_local_entry = container_of(tt_common_entry,
> +						      struct tt_local_entry,
> +						      common);
>  			tt_local_entry_free_ref(tt_local_entry);
>  		}
>  		spin_unlock_bh(list_lock);
> @@ -512,18 +509,18 @@ int tt_global_add(struct bat_priv *bat_priv, struct orig_node *orig_node,
>  		if (!tt_global_entry)
>  			goto out;
>  
> -		memcpy(tt_global_entry->addr, tt_addr, ETH_ALEN);
> +		memcpy(tt_global_entry->common.addr, tt_addr, ETH_ALEN);
> +		tt_global_entry->common.flags = NO_FLAGS;
> +		atomic_set(&tt_global_entry->common.refcount, 2);
>  		/* Assign the new orig_node */
>  		atomic_inc(&orig_node->refcount);
>  		tt_global_entry->orig_node = orig_node;
>  		tt_global_entry->ttvn = ttvn;
> -		tt_global_entry->flags = NO_FLAGS;
>  		tt_global_entry->roam_at = 0;
> -		atomic_set(&tt_global_entry->refcount, 2);
>  
> -		hash_add(bat_priv->tt_global_hash, compare_gtt,
> -			 choose_orig, tt_global_entry,
> -			 &tt_global_entry->hash_entry);
> +		hash_add(bat_priv->tt_global_hash, compare_tt,
> +			 choose_orig, &tt_global_entry->common,
> +			 &tt_global_entry->common.hash_entry);
>  		atomic_inc(&orig_node->tt_size);
>  	} else {
>  		if (tt_global_entry->orig_node != orig_node) {
> @@ -534,20 +531,20 @@ int tt_global_add(struct bat_priv *bat_priv, struct orig_node *orig_node,
>  			orig_node_free_ref(orig_node_tmp);
>  			atomic_inc(&orig_node->tt_size);
>  		}
> +		tt_global_entry->common.flags = NO_FLAGS;
>  		tt_global_entry->ttvn = ttvn;
> -		tt_global_entry->flags = NO_FLAGS;
>  		tt_global_entry->roam_at = 0;
>  	}
>  
>  	if (wifi)
> -		tt_global_entry->flags |= TT_CLIENT_WIFI;
> +		tt_global_entry->common.flags |= TT_CLIENT_WIFI;
>  
>  	bat_dbg(DBG_TT, bat_priv,
>  		"Creating new global tt entry: %pM (via %pM)\n",
> -		tt_global_entry->addr, orig_node->orig);
> +		tt_global_entry->common.addr, orig_node->orig);
>  
>  	/* remove address from local hash if present */
> -	tt_local_remove(bat_priv, tt_global_entry->addr,
> +	tt_local_remove(bat_priv, tt_global_entry->common.addr,
>  			"global tt received", roaming);
>  	ret = 1;
>  out:
> @@ -561,6 +558,7 @@ int tt_global_seq_print_text(struct seq_file *seq, void *offset)
>  	struct net_device *net_dev = (struct net_device *)seq->private;
>  	struct bat_priv *bat_priv = netdev_priv(net_dev);
>  	struct hashtable_t *hash = bat_priv->tt_global_hash;
> +	struct tt_common_entry *tt_common_entry;
>  	struct tt_global_entry *tt_global_entry;
>  	struct hard_iface *primary_if;
>  	struct hlist_node *node;
> @@ -593,20 +591,24 @@ int tt_global_seq_print_text(struct seq_file *seq, void *offset)
>  		head = &hash->table[i];
>  
>  		rcu_read_lock();
> -		hlist_for_each_entry_rcu(tt_global_entry, node,
> +		hlist_for_each_entry_rcu(tt_common_entry, node,
>  					 head, hash_entry) {
> +			tt_global_entry = container_of(tt_common_entry,
> +						       struct tt_global_entry,
> +						       common);
>  			seq_printf(seq, " * %pM  (%3u) via %pM     (%3u)   "
> -					"[%c%c%c]\n", tt_global_entry->addr,
> +					"[%c%c%c]\n",
> +					tt_global_entry->common.addr,
>  					tt_global_entry->ttvn,
>  					tt_global_entry->orig_node->orig,
>  					(uint8_t) atomic_read(
>  						&tt_global_entry->orig_node->
>  						last_ttvn),
> -					(tt_global_entry->flags &
> +					(tt_global_entry->common.flags &
>  					 TT_CLIENT_ROAM ? 'R' : '.'),
> -					(tt_global_entry->flags &
> +					(tt_global_entry->common.flags &
>  					 TT_CLIENT_PENDING ? 'X' : '.'),
> -					(tt_global_entry->flags &
> +					(tt_global_entry->common.flags &
>  					 TT_CLIENT_WIFI ? 'W' : '.'));
>  		}
>  		rcu_read_unlock();
> @@ -626,13 +628,13 @@ static void _tt_global_del(struct bat_priv *bat_priv,
>  
>  	bat_dbg(DBG_TT, bat_priv,
>  		"Deleting global tt entry %pM (via %pM): %s\n",
> -		tt_global_entry->addr, tt_global_entry->orig_node->orig,
> +		tt_global_entry->common.addr, tt_global_entry->orig_node->orig,
>  		message);
>  
>  	atomic_dec(&tt_global_entry->orig_node->tt_size);
>  
> -	hash_remove(bat_priv->tt_global_hash, compare_gtt, choose_orig,
> -		    tt_global_entry->addr);
> +	hash_remove(bat_priv->tt_global_hash, compare_tt, choose_orig,
> +		    tt_global_entry->common.addr);
>  out:
>  	if (tt_global_entry)
>  		tt_global_entry_free_ref(tt_global_entry);
> @@ -650,7 +652,7 @@ void tt_global_del(struct bat_priv *bat_priv,
>  
>  	if (tt_global_entry->orig_node == orig_node) {
>  		if (roaming) {
> -			tt_global_entry->flags |= TT_CLIENT_ROAM;
> +			tt_global_entry->common.flags |= TT_CLIENT_ROAM;
>  			tt_global_entry->roam_at = jiffies;
>  			goto out;
>  		}
> @@ -665,6 +667,7 @@ void tt_global_del_orig(struct bat_priv *bat_priv,
>  			struct orig_node *orig_node, const char *message)
>  {
>  	struct tt_global_entry *tt_global_entry;
> +	struct tt_common_entry *tt_common_entry;
>  	uint32_t i;
>  	struct hashtable_t *hash = bat_priv->tt_global_hash;
>  	struct hlist_node *node, *safe;
> @@ -679,13 +682,16 @@ void tt_global_del_orig(struct bat_priv *bat_priv,
>  		list_lock = &hash->list_locks[i];
>  
>  		spin_lock_bh(list_lock);
> -		hlist_for_each_entry_safe(tt_global_entry, node, safe,
> +		hlist_for_each_entry_safe(tt_common_entry, node, safe,
>  					 head, hash_entry) {
> +			tt_global_entry = container_of(tt_common_entry,
> +						       struct tt_global_entry,
> +						       common);
>  			if (tt_global_entry->orig_node == orig_node) {
>  				bat_dbg(DBG_TT, bat_priv,
>  					"Deleting global tt entry %pM "
>  					"(via %pM): %s\n",
> -					tt_global_entry->addr,
> +					tt_global_entry->common.addr,
>  					tt_global_entry->orig_node->orig,
>  					message);
>  				hlist_del_rcu(node);
> @@ -700,6 +706,7 @@ void tt_global_del_orig(struct bat_priv *bat_priv,
>  static void tt_global_roam_purge(struct bat_priv *bat_priv)
>  {
>  	struct hashtable_t *hash = bat_priv->tt_global_hash;
> +	struct tt_common_entry *tt_common_entry;
>  	struct tt_global_entry *tt_global_entry;
>  	struct hlist_node *node, *node_tmp;
>  	struct hlist_head *head;
> @@ -711,9 +718,12 @@ static void tt_global_roam_purge(struct bat_priv *bat_priv)
>  		list_lock = &hash->list_locks[i];
>  
>  		spin_lock_bh(list_lock);
> -		hlist_for_each_entry_safe(tt_global_entry, node, node_tmp,
> +		hlist_for_each_entry_safe(tt_common_entry, node, node_tmp,
>  					  head, hash_entry) {
> -			if (!(tt_global_entry->flags & TT_CLIENT_ROAM))
> +			tt_global_entry = container_of(tt_common_entry,
> +						       struct tt_global_entry,
> +						       common);
> +			if (!(tt_global_entry->common.flags & TT_CLIENT_ROAM))
>  				continue;
>  			if (!is_out_of_time(tt_global_entry->roam_at,
>  					    TT_CLIENT_ROAM_TIMEOUT * 1000))
> @@ -721,7 +731,7 @@ static void tt_global_roam_purge(struct bat_priv *bat_priv)
>  
>  			bat_dbg(DBG_TT, bat_priv, "Deleting global "
>  				"tt entry (%pM): Roaming timeout\n",
> -				tt_global_entry->addr);
> +				tt_global_entry->common.addr);
>  			atomic_dec(&tt_global_entry->orig_node->tt_size);
>  			hlist_del_rcu(node);
>  			tt_global_entry_free_ref(tt_global_entry);
> @@ -735,6 +745,7 @@ static void tt_global_table_free(struct bat_priv *bat_priv)
>  {
>  	struct hashtable_t *hash;
>  	spinlock_t *list_lock; /* protects write access to the hash lists */
> +	struct tt_common_entry *tt_common_entry;
>  	struct tt_global_entry *tt_global_entry;
>  	struct hlist_node *node, *node_tmp;
>  	struct hlist_head *head;
> @@ -750,9 +761,12 @@ static void tt_global_table_free(struct bat_priv *bat_priv)
>  		list_lock = &hash->list_locks[i];
>  
>  		spin_lock_bh(list_lock);
> -		hlist_for_each_entry_safe(tt_global_entry, node, node_tmp,
> +		hlist_for_each_entry_safe(tt_common_entry, node, node_tmp,
>  					  head, hash_entry) {
>  			hlist_del_rcu(node);
> +			tt_global_entry = container_of(tt_common_entry,
> +						       struct tt_global_entry,
> +						       common);
>  			tt_global_entry_free_ref(tt_global_entry);
>  		}
>  		spin_unlock_bh(list_lock);
> @@ -768,8 +782,8 @@ static bool _is_ap_isolated(struct tt_local_entry *tt_local_entry,
>  {
>  	bool ret = false;
>  
> -	if (tt_local_entry->flags & TT_CLIENT_WIFI &&
> -	    tt_global_entry->flags & TT_CLIENT_WIFI)
> +	if (tt_local_entry->common.flags & TT_CLIENT_WIFI &&
> +	    tt_global_entry->common.flags & TT_CLIENT_WIFI)
>  		ret = true;
>  
>  	return ret;
> @@ -802,7 +816,7 @@ struct orig_node *transtable_search(struct bat_priv *bat_priv,
>  
>  	/* A global client marked as PENDING has already moved from that
>  	 * originator */
> -	if (tt_global_entry->flags & TT_CLIENT_PENDING)
> +	if (tt_global_entry->common.flags & TT_CLIENT_PENDING)
>  		goto out;
>  
>  	orig_node = tt_global_entry->orig_node;
> @@ -821,6 +835,7 @@ uint16_t tt_global_crc(struct bat_priv *bat_priv, struct orig_node *orig_node)
>  {
>  	uint16_t total = 0, total_one;
>  	struct hashtable_t *hash = bat_priv->tt_global_hash;
> +	struct tt_common_entry *tt_common_entry;
>  	struct tt_global_entry *tt_global_entry;
>  	struct hlist_node *node;
>  	struct hlist_head *head;
> @@ -831,20 +846,23 @@ uint16_t tt_global_crc(struct bat_priv *bat_priv, struct orig_node *orig_node)
>  		head = &hash->table[i];
>  
>  		rcu_read_lock();
> -		hlist_for_each_entry_rcu(tt_global_entry, node,
> +		hlist_for_each_entry_rcu(tt_common_entry, node,
>  					 head, hash_entry) {
> +			tt_global_entry = container_of(tt_common_entry,
> +						       struct tt_global_entry,
> +						       common);
>  			if (compare_eth(tt_global_entry->orig_node,
>  					orig_node)) {
>  				/* Roaming clients are in the global table for
>  				 * consistency only. They don't have to be
>  				 * taken into account while computing the
>  				 * global crc */
> -				if (tt_global_entry->flags & TT_CLIENT_ROAM)
> +				if (tt_common_entry->flags & TT_CLIENT_ROAM)
>  					continue;
>  				total_one = 0;
>  				for (j = 0; j < ETH_ALEN; j++)
>  					total_one = crc16_byte(total_one,
> -						tt_global_entry->addr[j]);
> +						tt_common_entry->addr[j]);
>  				total ^= total_one;
>  			}
>  		}
> @@ -859,7 +877,7 @@ uint16_t tt_local_crc(struct bat_priv *bat_priv)
>  {
>  	uint16_t total = 0, total_one;
>  	struct hashtable_t *hash = bat_priv->tt_local_hash;
> -	struct tt_local_entry *tt_local_entry;
> +	struct tt_common_entry *tt_common_entry;
>  	struct hlist_node *node;
>  	struct hlist_head *head;
>  	uint32_t i;
> @@ -869,16 +887,16 @@ uint16_t tt_local_crc(struct bat_priv *bat_priv)
>  		head = &hash->table[i];
>  
>  		rcu_read_lock();
> -		hlist_for_each_entry_rcu(tt_local_entry, node,
> +		hlist_for_each_entry_rcu(tt_common_entry, node,
>  					 head, hash_entry) {
>  			/* not yet committed clients have not to be taken into
>  			 * account while computing the CRC */
> -			if (tt_local_entry->flags & TT_CLIENT_NEW)
> +			if (tt_common_entry->flags & TT_CLIENT_NEW)
>  				continue;
>  			total_one = 0;
>  			for (j = 0; j < ETH_ALEN; j++)
>  				total_one = crc16_byte(total_one,
> -						   tt_local_entry->addr[j]);
> +						   tt_common_entry->addr[j]);
>  			total ^= total_one;
>  		}
>  		rcu_read_unlock();
> @@ -967,21 +985,25 @@ unlock:
>  /* data_ptr is useless here, but has to be kept to respect the prototype */
>  static int tt_local_valid_entry(const void *entry_ptr, const void *data_ptr)
>  {
> -	const struct tt_local_entry *tt_local_entry = entry_ptr;
> +	const struct tt_common_entry *tt_common_entry = entry_ptr;
>  
> -	if (tt_local_entry->flags & TT_CLIENT_NEW)
> +	if (tt_common_entry->flags & TT_CLIENT_NEW)
>  		return 0;
>  	return 1;
>  }
>  
>  static int tt_global_valid_entry(const void *entry_ptr, const void *data_ptr)
>  {
> -	const struct tt_global_entry *tt_global_entry = entry_ptr;
> +	const struct tt_common_entry *tt_common_entry = entry_ptr;
> +	const struct tt_global_entry *tt_global_entry;
>  	const struct orig_node *orig_node = data_ptr;
>  
> -	if (tt_global_entry->flags & TT_CLIENT_ROAM)
> +	if (tt_common_entry->flags & TT_CLIENT_ROAM)
>  		return 0;
>  
> +	tt_global_entry = container_of(tt_common_entry, struct tt_global_entry,
> +				       common);
> +
>  	return (tt_global_entry->orig_node == orig_node);
>  }
>  
> @@ -992,7 +1014,7 @@ static struct sk_buff *tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,
>  							      const void *),
>  					      void *cb_data)
>  {
> -	struct tt_local_entry *tt_local_entry;
> +	struct tt_common_entry *tt_common_entry;
>  	struct tt_query_packet *tt_response;
>  	struct tt_change *tt_change;
>  	struct hlist_node *node;
> @@ -1024,15 +1046,16 @@ static struct sk_buff *tt_response_fill_table(uint16_t tt_len, uint8_t ttvn,
>  	for (i = 0; i < hash->size; i++) {
>  		head = &hash->table[i];
>  
> -		hlist_for_each_entry_rcu(tt_local_entry, node,
> +		hlist_for_each_entry_rcu(tt_common_entry, node,
>  					 head, hash_entry) {
>  			if (tt_count == tt_tot)
>  				break;
>  
> -			if ((valid_cb) && (!valid_cb(tt_local_entry, cb_data)))
> +			if ((valid_cb) && (!valid_cb(tt_common_entry, cb_data)))
>  				continue;
>  
> -			memcpy(tt_change->addr, tt_local_entry->addr, ETH_ALEN);
> +			memcpy(tt_change->addr, tt_common_entry->addr,
> +			       ETH_ALEN);
>  			tt_change->flags = NO_FLAGS;
>  
>  			tt_count++;
> @@ -1449,7 +1472,7 @@ bool is_my_client(struct bat_priv *bat_priv, const uint8_t *addr)
>  		goto out;
>  	/* Check if the client has been logically deleted (but is kept for
>  	 * consistency purpose) */
> -	if (tt_local_entry->flags & TT_CLIENT_PENDING)
> +	if (tt_local_entry->common.flags & TT_CLIENT_PENDING)
>  		goto out;
>  	ret = true;
>  out:
> @@ -1681,7 +1704,7 @@ static void tt_local_reset_flags(struct bat_priv *bat_priv, uint16_t flags)
>  	struct hashtable_t *hash = bat_priv->tt_local_hash;
>  	struct hlist_head *head;
>  	struct hlist_node *node;
> -	struct tt_local_entry *tt_local_entry;
> +	struct tt_common_entry *tt_common_entry;
>  
>  	if (!hash)
>  		return;
> @@ -1690,11 +1713,11 @@ static void tt_local_reset_flags(struct bat_priv *bat_priv, uint16_t flags)
>  		head = &hash->table[i];
>  
>  		rcu_read_lock();
> -		hlist_for_each_entry_rcu(tt_local_entry, node,
> +		hlist_for_each_entry_rcu(tt_common_entry, node,
>  					 head, hash_entry) {
> -			if (!(tt_local_entry->flags & flags))
> +			if (!(tt_common_entry->flags & flags))
>  				continue;
> -			tt_local_entry->flags &= ~flags;
> +			tt_common_entry->flags &= ~flags;
>  			atomic_inc(&bat_priv->num_local_tt);
>  		}
>  		rcu_read_unlock();
> @@ -1706,6 +1729,7 @@ static void tt_local_reset_flags(struct bat_priv *bat_priv, uint16_t flags)
>  static void tt_local_purge_pending_clients(struct bat_priv *bat_priv)
>  {
>  	struct hashtable_t *hash = bat_priv->tt_local_hash;
> +	struct tt_common_entry *tt_common_entry;
>  	struct tt_local_entry *tt_local_entry;
>  	struct hlist_node *node, *node_tmp;
>  	struct hlist_head *head;
> @@ -1720,16 +1744,19 @@ static void tt_local_purge_pending_clients(struct bat_priv *bat_priv)
>  		list_lock = &hash->list_locks[i];
>  
>  		spin_lock_bh(list_lock);
> -		hlist_for_each_entry_safe(tt_local_entry, node, node_tmp,
> +		hlist_for_each_entry_safe(tt_common_entry, node, node_tmp,
>  					  head, hash_entry) {
> -			if (!(tt_local_entry->flags & TT_CLIENT_PENDING))
> +			if (!(tt_common_entry->flags & TT_CLIENT_PENDING))
>  				continue;
>  
>  			bat_dbg(DBG_TT, bat_priv, "Deleting local tt entry "
> -				"(%pM): pending\n", tt_local_entry->addr);
> +				"(%pM): pending\n", tt_common_entry->addr);
>  
>  			atomic_dec(&bat_priv->num_local_tt);
>  			hlist_del_rcu(node);
> +			tt_local_entry = container_of(tt_common_entry,
> +						      struct tt_local_entry,
> +						      common);
>  			tt_local_entry_free_ref(tt_local_entry);
>  		}
>  		spin_unlock_bh(list_lock);
> diff --git a/types.h b/types.h
> index ab8d0fe..e9eb043 100644
> --- a/types.h
> +++ b/types.h
> @@ -222,24 +222,24 @@ struct socket_packet {
>  	struct icmp_packet_rr icmp_packet;
>  };
>  
> -struct tt_local_entry {
> +struct tt_common_entry {
>  	uint8_t addr[ETH_ALEN];
>  	struct hlist_node hash_entry;
> -	unsigned long last_seen;
>  	uint16_t flags;
>  	atomic_t refcount;
>  	struct rcu_head rcu;
>  };
>  
> +struct tt_local_entry {
> +	struct tt_common_entry common;
> +	unsigned long last_seen;
> +};
> +
>  struct tt_global_entry {
> -	uint8_t addr[ETH_ALEN];
> -	struct hlist_node hash_entry; /* entry in the global table */
> +	struct tt_common_entry common;
>  	struct orig_node *orig_node;
>  	uint8_t ttvn;
> -	uint16_t flags; /* only TT_GLOBAL_ROAM is used */
>  	unsigned long roam_at; /* time at which TT_GLOBAL_ROAM was set */
> -	atomic_t refcount;
> -	struct rcu_head rcu;
>  };
>  
>  struct tt_change_node {
> diff --git a/vis.c b/vis.c
> index 7445413..cc3b9f2 100644
> --- a/vis.c
> +++ b/vis.c
> @@ -609,7 +609,7 @@ static int generate_vis_packet(struct bat_priv *bat_priv)
>  	struct vis_info *info = bat_priv->my_vis_info;
>  	struct vis_packet *packet = (struct vis_packet *)info->skb_packet->data;
>  	struct vis_info_entry *entry;
> -	struct tt_local_entry *tt_local_entry;
> +	struct tt_common_entry *tt_common_entry;
>  	int best_tq = -1;
>  	uint32_t i;
>  
> @@ -672,13 +672,13 @@ next:
>  		head = &hash->table[i];
>  
>  		rcu_read_lock();
> -		hlist_for_each_entry_rcu(tt_local_entry, node, head,
> +		hlist_for_each_entry_rcu(tt_common_entry, node, head,
>  					 hash_entry) {
>  			entry = (struct vis_info_entry *)
>  					skb_put(info->skb_packet,
>  						sizeof(*entry));
>  			memset(entry->src, 0, ETH_ALEN);
> -			memcpy(entry->dest, tt_local_entry->addr, ETH_ALEN);
> +			memcpy(entry->dest, tt_common_entry->addr, ETH_ALEN);
>  			entry->quality = 0; /* 0 means TT */
>  			packet->entries++;
>  
> -- 
> 1.7.3.4
> 
> 

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

^ permalink raw reply

* [U-Boot] [PATCH V2] mvsata_ide: add delay after EDMA port reset
From: Albert ARIBAUD @ 2011-10-31  0:38 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1320017547-22299-1-git-send-email-albert.u.boot@aribaud.net>

Although fast SoCs like kirkwood can cope without it,
this delay is required by orion5x-based chips, either
because they are slower, or because they run U-Boot
from NOR, or both.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
---
Patch history:

V2:	increase delay to 10 us for reliable ide reset from NOR FLASH
V1:	initial submission

Commit 70c55f5ab324d43093f1c8745462d92042b7306d had introduced resetting
the EDMA port on IDE reset. This obviously worked for kirkwoods, but not
for orion5x Ed Mini V2, where it made ide_reset() fail. Adding a slight
delay after returning port from reset to normal mode made ide_reset()
work again correctly.

Please check and confirm it does not break kirkwoods!

 drivers/block/mvsata_ide.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/block/mvsata_ide.c b/drivers/block/mvsata_ide.c
index 1be395f..cd602f1 100644
--- a/drivers/block/mvsata_ide.c
+++ b/drivers/block/mvsata_ide.c
@@ -122,6 +122,7 @@ static int mvsata_ide_initialize_port(struct mvsata_port_registers *port)
 	writel(MVSATA_EDMA_CMD_ATA_RST, &port->edma_cmd);
 	udelay(25); /* taken from original marvell port */
 	writel(0, &port->edma_cmd);
+	udelay(10); /* wait after reset was acked -- required for orion5x */
 
 	/* Set control IPM to 3 (no low power) and DET to 1 (initialize) */
 	control = readl(&port->scontrol);
-- 
1.7.5.4

^ permalink raw reply related

* [GIT PULL] GIC DT binding support
From: Arnd Bergmann @ 2011-10-31  0:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <4EAB1BFF.3070406@gmail.com>

On Friday 28 October 2011, Rob Herring wrote:
>   Merge branch 'for-sfr' of
> git://openlinux.windriver.com/people/paulg/linux-next into HEAD
> (2011-10-28 15:51:07 -0500)
> 

Rob, I think there is no chance that this is working out.

I've just spent a few hours trying to resolve all the dependencies from this,
but I don't think it will work out, unless Linus pulls that tree very soon,
which I think is very unlikely.

Have you made sure that Paul even considers this branch stable?

Normally this kind of change gets pushed *last* in the merge window, to make
it possible to fix up all the stuff that breaks. This means I cannot
wait for the branch to get merged upstream before send a pull request for
my next/dt and next/soc branches.

Do you even depend on that branch? It seems to me that you merely have a
conflict, not a dependency, so why do you even try fixing it up?

	Arnd

^ permalink raw reply

* Re: [PATCH] kill-subarray: fix, IMSM cannot kill-subarray with unsupported metadata
From: NeilBrown @ 2011-10-31  0:31 UTC (permalink / raw)
  To: Labun, Marcin; +Cc: linux-raid@vger.kernel.org, Williams, Dan J
In-Reply-To: <F9123E44003394499FDD2B17C60621D4043755@IRSMSX101.ger.corp.intel.com>

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

On Fri, 28 Oct 2011 14:46:57 +0000 "Labun, Marcin" <Marcin.Labun@intel.com>
wrote:

> Hi Neil,
> Please review modified patch in response for your comments.
> I have introduced two flags, one for activation blocking, second for container wide reshapes
> Blocking:
> - some arrays in container are blocked, the others can be activated and reshaped,
> - some arrays are blocked, others can be activated but container wide reshaped is blocked for all.
> 
> Thanks,
> Marcin Labun

Thanks.  This looks mostly OK.
I have applied it -  with a number of formatting improvements and the removal
for a debugging printf :-)

However this bit looks wrong:

> +/*
> + * helper routine to check metadata reshape avalability
> + * 1. Do not "grow" arrays with volume activation blocked
> + * 2. do not reshape containers with container reshape blocked
> + *
> + * IN:
> + *	subarray - array name or NULL for container wide reshape
> + *	content - md device info from container_content
> + * OUT:
> + *	0 - block reshape
> + */
> +static int check_reshape(char *subarray, struct mdinfo *content)
> +{
> +	char *ep;
> +	unsigned int idx;
> +	printf("subarray: %s\n", subarray);
> +
> +	
> +	if (!subarray) {
> +		if (content->array.state & (1<<MD_SB_BLOCK_CONTAINER_RESHAPE))
> +			return 0;
> +	}
> +	else {
> +		/* do not "grow" arrays with volume activation blocked */
> +		idx = strtoul(subarray, &ep, 10);
> +		if ((*ep == '\0') && (content->container_member == (int) idx) &&
> +		    (content->array.state & (1<<MD_SB_BLOCK_VOLUME)))
> +			return 0;
> +	}
> +	  
> +	return 1;
> +}

Grow.c shouldn't be doing a 'strtoul' here.  The subarray string belongs to
the metadata handler, mdadm core code shouldn't interpret it at all.

What exactly is the point of that bit of code?

Thanks,
NeilBrown


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply

* Re: Can you please create a git tree mirror on git.kernel.org?
From: Wanlong Gao @ 2011-10-31  0:30 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs, aelder
In-Reply-To: <20111028172217.GA32397@infradead.org>

On 10/29/2011 01:22 AM, Christoph Hellwig wrote:

> On Thu, Oct 20, 2011 at 10:48:00AM +0800, Wanlong Gao wrote:
>> Hi Alex:
>>
>> 	I see that xfs,xfsprogs,xfstests,dmapi all have a mirror on
>> 	git.kernel.org before kernel.org went down. Now, kernel.org goes on
>> 	without the mirrors, so, can you create them now? I think someone
>> 	will need them like me. Isn't it?
> 
> The repositories are now back in place, but not the primary repositories
> for commits yet, although I have updated them with all commits from the
> SGI repositories.
> 
> 


Yeah, thanks a lot Christoph.

-Wanlong Gao

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply

* Re: [dm-crypt] please HELP - can't acces encrypted LVM after linux reinstallation.
From: Aleksander Swirski @ 2011-10-31  0:30 UTC (permalink / raw)
  To: dm-crypt
In-Reply-To: <4EADCEF5.2070405@freesources.org>

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

I'm pretty sure this warning is only displayed when someone decides to
create new crypto on some partition or fill encrypted device with random
data in the next step after setting the password. but just setting the
password on an existing device makes data unusable without warning. when
the partitioning is finished there is a list of partitions that will be
wiped out, and also, during my installation crypto-deviced and /home inside
LVM was not listed there, but already lost few clicks earlier.

i understand that it wasn't taken into consideration that someone can
attach existing encrypted device, but only that a new one will be created.
this is inconsistent with how it goes with unencrypted partitions, where
you can reattach them without formatting and keep your data. so i guess
with encrypted partition this should also work that way. or maybe i miss
the point? i will try to make the whole scenario clear, and then send my
proposition, to debian-boot@lists.debian.org

On 30 October 2011 23:25, Jonas Meurer <jonas@freesources.org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Aleksander,
>
> Am 30.10.2011 19:56, schrieb Aleksander Swirski:
> > I will also try to push this info to the debian devs. I'm not sure
> > how to do that properly (hint appreciated). I know, that the route
> > of installation I took is not a common one, but a simple warning
> > would suffice to avoid this kind of trouble. After all my encrypted
> > LVM and specifically the /home partition within LVM wasn't listed
> > among those, which are to be erased at any point during the
> > installation. (I marked them with - K - keep the data)
>
> I guess that you selected to configure the device which contained the
> LVM volume group as new encrypted device. Then you where asked for the
> new passphrase twice, and a new LUKS header was written to the device,
> overwriting the old LUKS header. That way you shredded all the
> encrypted data on that device, regardless what it was.
>
> The partitions you marked as "keep the data" weren't overwritten, just
> the LUKS header of underlying device was overwritten.
>
> I agree, that a warning in the Debian Installer is a good idea, but to
> be honest, there's already a big fat warning:
>
> > _Description: Really erase the data on ${DEVICE}? The data on
> > ${DEVICE} will be overwritten with random data. It can no longer be
> > recovered after this step has completed. This is the last
> > opportunity to abort the erase.
>
> (from
>
> http://anonscm.debian.org/gitweb/?p=d-i/partman-crypto.git;a=blob;f=debian/partman-crypto.templates
> )
>
> If you like to propose changes to the (warnings in the) process of
> configuring encrypted volumes during installation of Debian, feel free
> to discuss this on debian-boot@lists.debian.org. You might as well
> take a look at the following page:
> http://wiki.debian.org/DebianInstaller/PartmanCrypto
>
> Greetings,
>  jonas
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQIcBAEBAgAGBQJOrc7tAAoJEFJi5/9JEEn+bo4P/0vX3AxnpXzWO3NUvYW2wh6H
> k7v8Dhx6Rw5HXttHuF8JSypkvcHuLfWyGLq0J4qlsw4GvK/cPtwdCuSe//uJvqSB
> 4Z6qj55E/3/M+aEBMzT9oBeZ5DVGPp0+76VWFNijGzHYMoT4YYm0pZBsmfZ7U2RJ
> +7xFyGP0d7oXJIqoW8aUyufgdYnRNdcZdJtY27XHgKW1m9ytllIuK0h7hl410/L0
> vy2t4IqSlO5Uko1/bOf3FETNkBRTUl4T2jWMP3dEpNMRobB1ZH5I5menXWSwzgR9
> c2QWRkwQ8iUsAdakofnl9O1jhtw3Z9MKxHQbnxh32oNuS5Aaf5xxfiI7jXf3yY/L
> GUKyIOa5nGtNtwUt4l0RTJAKoyY2J2KtBJm+JL51tQ3q/iyZsfRLVmyczlkzKUhj
> vMKgSzhV8/IyQ/snqftAMqmRXYgaOE3qDCe8MR+EChIFwX2Zr+eRWdRzVFDjQ0kP
> Cyc6Yw3TrthD8GuWWxU93tE3YMVxgI76+lDk/LBLZjviMTEfkR5e+gmuoff+Xdta
> aBYek7loOjkqb+gJ6qeqAKuDLAZnw/BmHfgpYQpatdSeiV6jpGPkGMbYTwDHLlXR
> rE72FJe1emdcDWQ6TE8SP+6KW22HirBPD5q6DPqJ2Oxcxx+AotXeLvDpnhd9S5b2
> fDNHacCUklPyCeH81nsH
> =PLsS
> -----END PGP SIGNATURE-----
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>

[-- Attachment #2: Type: text/html, Size: 5110 bytes --]

^ permalink raw reply

* Re: [Qemu-devel] [PATCH v2] Fix segfault on migration completion
From: Juan Quintela @ 2011-10-31  0:27 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: Paolo Bonzini, qemu-devel, Eduardo Habkost
In-Reply-To: <20111028145952.4bb63294@doriath>

Luiz Capitulino <lcapitulino@redhat.com> wrote:
> A simple migration reproduces it:
>
> 1. Start the source VM with:
>
>    # qemu [...] -S
>
> 2. Start the destination VM with:
>
>    # qemu <source VM cmd-line> -incoming tcp:0:4444
>
> 3. In the source VM:
>
>    (qemu) migrate -d tcp:0:4444
>
> 4. The source VM will segfault as soon as migration completes (might not
>    happen in the first try)
>
> What is happening here is that qemu_file_put_notify() can end up closing
> 's->file' (in which case it's also set to NULL). The call stack is rather
> complex, but Eduardo helped tracking it to:
>
> select loop -> migrate_fd_put_notify() -> qemu_file_put_notify() ->
> buffered_put_buffer() -> migrate_fd_put_ready() ->
> migrate_fd_completed() -> migrate_fd_cleanup().
>
> To be honest, it's not completely clear to me in which cases 's->file'
> is not closed (on error maybe)? But I doubt this fix will make anything
> worse.
>
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> ---
>
> V2: better commit log

Acked-by: Juan Quintela <quintela@redhat.com>

And people wonder why error handling on migration is difficult, sniff
:-(

^ permalink raw reply

* Business Proposal
From: Mr.Wang Shu @ 2011-10-31  0:11 UTC (permalink / raw)




This is Mr. Wang Shu from Hong Kong. I am sending you this message concerning a Business Proposal of $6,500,000.00
and I want you to partner with me in this project. This business will benefit you a lot. Please contact me back with the below 
address for details:

Email: 673081wh@w.cn

I await your prompt response. 

Thanks.

Mr. Wang Shu

^ permalink raw reply

* Re: [PATCH] parisc: futex: Use same lock set as lws calls
From: Carlos O'Donell @ 2011-10-31  0:21 UTC (permalink / raw)
  To: John David Anglin; +Cc: Rolf Eike Beer, linux-parisc
In-Reply-To: <BLU0-SMTP8183F951B80BB9F5455EB297D10@phx.gbl>

On Sun, Oct 30, 2011 at 12:13 PM, John David Anglin
<dave.anglin@bell.net> wrote:
> On 30-Oct-11, at 11:31 AM, Rolf Eike Beer wrote:
>
>> John David Anglin wrote:
>>
>>> This problem is fixed in the GCC trunk and 4.4, 4.5 and 4.6 branche=
s.
>>> libmpfr4-3.1.0 now passes all tests.
>>
>> Can we get a link to a bug or a commit so we could easily put this i=
nto
>> the
>> gentoo patchset for local usage until a new version is released?
>
>
> The trunk patch is on the gcc-patches list:
> http://gcc.gnu.org/ml/gcc-patches/2011-10/msg02758.html
>
> There are two variants of the patch:
> http://gcc.gnu.org/viewcvs?view=3Drevision&revision=3D180655
> http://gcc.gnu.org/viewcvs?view=3Drevision&revision=3D180662
>
> The first is for 4.7. =A0The latter applies to 4.4, 4.5 and 4.6.

Awesome! Great work Dave! :-)

Cheers,
Carlos.
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc"=
 in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c
From: Mike Frysinger @ 2011-10-31  0:19 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <201110310045.44028.marek.vasut@gmail.com>

On Sunday 30 October 2011 19:45:43 Marek Vasut wrote:
> > On Sunday 30 October 2011 16:48:50 Marek Vasut wrote:
> > > > On Tuesday 25 October 2011 05:39:58 Marek Vasut wrote:
> > > > > --- a/drivers/usb/eth/smsc95xx.c
> > > > > +++ b/drivers/usb/eth/smsc95xx.c
> > > > > 
> > > > > -	addr_lo = cpu_to_le32(*((u32 *)eth->enetaddr));
> > > > > +	addr_lo = cpu_to_le32(*eth->enetaddr);
> > > > 
> > > > pretty sure this is wrong.  enetaddr is a uchar[], so your code now
> > > > reads only 1 byte instead of 4.
> > > > 
> > > > that said, this code also seems to not be endian safe ...
> > > 
> > > It's good anyone actually cares to properly review. Anyway, why does
> > > noone actually care to fix all the damn warnings in their drivers
> > > before submitting them in the first place ?!
> > 
> > the strict alias warnings you are hitting show up only in newer
> > compilers. so i'm sure at the time of their development/submission, they
> > didn't exist.
> 
> This is a different driver than that armada100_fec.c.

ok ?  the original 12/18 patch said:
smsc95xx.c: In function 'smsc95xx_write_hwaddr':
smsc95xx.c:380:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111030/1493da06/attachment.pgp 

^ permalink raw reply

* Re: [B.A.T.M.A.N.] [PATCH 5/6] batman-adv: Distributed ARP Table - add snooping functions for ARP messages
From: Simon Wunderlich @ 2011-10-31  0:12 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking
In-Reply-To: <1319964962-5092-6-git-send-email-ordex@autistici.org>

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

This patch fails checkpatch.pl --strict.

On Sun, Oct 30, 2011 at 09:56:01AM +0100, Antonio Quartulli wrote:
> +bool arp_snoop_outgoing_request(struct bat_priv *bat_priv, struct sk_buff *skb)
> [...]
> +	arp_neigh_update(bat_priv, ip_src, hw_src);
> +
> +	n = neigh_lookup(&arp_tbl, &ip_dst, primary_if->soft_iface);
> +	/* check if it is a valid neigh entry */
> +	if (n && (n->nud_state & NUD_CONNECTED)) {
> +		skb_new = arp_create(ARPOP_REPLY, ETH_P_ARP, ip_src,
> +				     primary_if->soft_iface, ip_dst, hw_src, n->ha,
> +				     hw_src);
> +		unicast_send_skb(skb_new, bat_priv);
> +		bat_dbg(DBG_ARP, bat_priv, "ARP request replied locally\n");

This function is hooked up in the tx patch, why do we send the unicast reply to
the mesh? Shouldn't it be sent on the soft interface instead? I don't really understand this one ...

> +	} else
> +		/* Send the request on the DHT */
> +		ret = dht_send_data(bat_priv, skb, ip_dst);
> +	if (n)
> +		neigh_release(n);
> +out:
> +	if (primary_if)
> +		hardif_free_ref(primary_if);
> +	return ret;
> +}
> +
> diff --git a/routing.c b/routing.c
> index ef24a72..4f2b417 100644
> --- a/routing.c
> +++ b/routing.c
> @@ -965,6 +966,7 @@ int recv_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if)
>  	/* packet for me */
>  	if (is_my_mac(unicast_packet->dest)) {
>  		interface_rx(recv_if->soft_iface, skb, recv_if, hdr_size);
> +
>  		return NET_RX_SUCCESS;
>  	}
>  

This added newline is useless.

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

^ permalink raw reply

* Re: [PATCH 1/2][BTRFS-PROGS] add the "--force" switch to the mkfs.btrfs command
From: Hugo Mills @ 2011-10-31  0:11 UTC (permalink / raw)
  To: Goffredo Baroncelli; +Cc: linux-btrfs, Mitch Harder
In-Reply-To: <7496499.QeRia36pgE@venice>

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

   Hi, Goffredo,

On Tue, Oct 18, 2011 at 06:45:13PM +0200, Goffredo Baroncelli wrote:
> As requested by Mitch, I resend the patch related to the "--force" option for 
> the mkfs.btrfs command.
> 
> This patch allow to bypass the check which ensure that you are formatting a 
> not mounted partition/disk.
> Sometime (eg in a chrooted environment where the /proc filesystem is not 
> mounted ) you don't have all the information, and the check fails even if the 
> device is not mounted.
> 
> Passing the --force|-f flag to the mkfs.btrfs command you bypass this check.
> 
> This patch update the mkfs.c program.

   Could I have your signed-off-by for these two patches, please?
(This one and the subsequent one that does the man pages). I'm also
missing your S-o-B on the man page patch series -- no need to respin
the patches, just supply the relevant S-o-B line that I can put in.

   Thanks,
   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
        --- That's not rain,  that's a lake with slots in it. ---        

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

^ permalink raw reply

* Re: [B.A.T.M.A.N.] [PATCH 4/6] batman-adv: Distributed ARP Table - add ARP parsing functions
From: Simon Wunderlich @ 2011-10-31  0:10 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking
In-Reply-To: <1319964962-5092-5-git-send-email-ordex@autistici.org>

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

This patch is not checkpatch.pl --strict clean

On Sun, Oct 30, 2011 at 09:56:00AM +0100, Antonio Quartulli wrote:
> ARP messages are now parsed to make it possible to trigger special actions
> depending on their types (snooping).
> 
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> ---
>  arp.c |   43 +++++++++++++++++++++++++++++++++++++++++++
>  arp.h |    7 +++++++
>  2 files changed, 50 insertions(+), 0 deletions(-)
> 
> diff --git a/arp.c b/arp.c
> index 39043b8..ea7cc1e 100644
> --- a/arp.c
> +++ b/arp.c
> @@ -183,3 +183,46 @@ out:
>  	kfree(cand);
>  	return ret;
>  }
> +
> +/* Returns arphdr->ar_op if the skb contains a valid ARP packet, otherwise
> + * returns 0 */
> +uint16_t arp_get_type(struct bat_priv *bat_priv, struct sk_buff *skb)
> +{
> +	struct arphdr *arphdr;
> +	struct ethhdr *ethhdr;
> +	uint16_t type = 0;
> +
> +	if (unlikely(!pskb_may_pull(skb, ETH_HLEN)))
> +		goto out;
> +
> +	ethhdr = (struct ethhdr *)skb_mac_header(skb);
> +
> +	if (ethhdr->h_proto != htons(ETH_P_ARP))
> +		goto out;
> +
> +	if (unlikely(!pskb_may_pull(skb, ETH_HLEN + arp_hdr_len(skb->dev) + 8 + 12)))
> +		goto out;

use ETH_ALEN * 2 + 4 * 2 instead to show where theses numbers come from.


> +
> +	arphdr = (struct arphdr *)(skb->data + sizeof(struct ethhdr));
> +
> +	/* Check whether the ARP packet carries a valid
> +	 * IP information */
> +	if (arphdr->ar_hrd != htons(ARPHRD_ETHER))
> +		goto out;
> +
> +	if (arphdr->ar_pro != htons(ETH_P_IP))
> +		goto out;
> +
> +	if (arphdr->ar_hln != ETH_ALEN)
> +		goto out;
> +
> +	if (arphdr->ar_pln != 4)
> +		goto out;
> +
> +	type = ntohs(arphdr->ar_op);
> +	bat_dbg(DBG_ARP, bat_priv, "ARP message of type %d recognised "
> +		"[%pM-%pI4 %pM-%pI4]\n", type, ARP_HW_SRC(skb),
> +		&ARP_IP_SRC(skb), ARP_HW_DST(skb), &ARP_IP_DST(skb));

Would you mind printing the type as string? something like REQUEST or REPLY instead of 1 and 2 ...


> +out:
> +	return type;
> +}

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

^ permalink raw reply

* Re: [B.A.T.M.A.N.] [PATCH 3/6] batman-adv: Distributed ARP Table - create the DHT helper functions
From: Simon Wunderlich @ 2011-10-31  0:08 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking
In-Reply-To: <1319964962-5092-4-git-send-email-ordex@autistici.org>

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

On Sun, Oct 30, 2011 at 09:55:59AM +0100, Antonio Quartulli wrote:
> [...]
> +		for (i = 0; i < hash->size; i++) {
> +			head = &hash->table[i];
> +
> +			rcu_read_lock();
> +			hlist_for_each_entry_rcu(orig_node, node, head,
> +						 hash_entry) {
> +				if (orig_node->dht_hash > ip_key)
> +					tmp_max = USHRT_MAX -
> +						orig_node->dht_hash + ip_key;
> +				else
> +					tmp_max = ip_key - orig_node->dht_hash;
> +
> +				/* this is closest! */
> +				if (tmp_max <= max)
> +					continue;
> +
> +				/* this has already been selected */
> +				if (tmp_max > last_max)
> +					continue;
> +
> +				if (!atomic_inc_not_zero(&orig_node->refcount))
> +					continue;
> +
> +				/* In case of hash collision we can select two
> +				 * nodes with the same hash, but we have ensure
> +				 * they are different */
> +				if (tmp_max == last_max) {
> +					for (j = 0; j < select; j++)
> +						if (res[j].orig_node ==
> +						    orig_node)
> +							break;
> +					if (j < select)
> +						continue;
> +				}
> +
> +				if (!atomic_inc_not_zero(&orig_node->refcount))
> +					continue;

Why do you increase the refcount two times? If it is really required, please
add a comment.

> +
> +				max = tmp_max;
> +				if (max_orig_node)
> +					orig_node_free_ref(max_orig_node);
> +				max_orig_node = orig_node;
> +			}
> +			rcu_read_unlock();
> +		}
> +		last_max = max;
> +		if (max_orig_node) {
> +			res[select].type = DHT_CANDIDATE_ORIG;
> +			res[select].orig_node = max_orig_node;
> +			bat_dbg(DBG_ARP, bat_priv, "DHT_SEL_CAND %d: %pM %u\n",
> +				select, max_orig_node->orig, max);
> +		}
> +		if (res[select].type == DHT_CANDIDATE_ME) {
> +			chosen_me = true;
> +			bat_dbg(DBG_ARP, bat_priv, "DHT_SEL_CAND %d: ME %u\n",
> +				select, bat_priv->dht_hash);
> +		}
> +
> +		max_orig_node = NULL;
> +	}
> +
> +	return res;
> +}
> +
> +/*
> + * Sends the skb payload passed as argument to the candidates selected for
> + * 'ip'. The skb is copied by means of pskb_copy() and is sent as unicast packet
> + * to each of the selected candidate. */
> +static bool dht_send_data(struct bat_priv *bat_priv, struct sk_buff *skb,
> +			  uint32_t ip)
> +{
> +	int i;
> +	bool ret = false;
> +	struct neigh_node *neigh_node = NULL;
> +	struct sk_buff *tmp_skb;
> +	struct dht_candidate *cand = dht_select_candidates(bat_priv, ip);
> +
> +	if (!cand)
> +		goto out;
> +
> +	bat_dbg(DBG_ARP, bat_priv, "DHT_SEND for %pI4\n", &ip);
> +
> +	for (i = 0; i < DHT_CANDIDATES_NUM; i++) {
> +		if (cand[i].type == DHT_CANDIDATE_ME ||
> +		    cand[i].type == DHT_CANDIDATE_NULL) {
> +			continue;
> +		}

no braces are required here.

> +
> +		neigh_node = orig_node_get_router(cand[i].orig_node);
> +		if (!neigh_node)
> +			goto free_orig;
> +
> +		tmp_skb = pskb_copy(skb, GFP_ATOMIC);
> +		tmp_skb = prepare_unicast_packet(tmp_skb, cand[i].orig_node);
> +		if (tmp_skb)
> +			send_skb_packet(tmp_skb, neigh_node->if_incoming,
> +					neigh_node->addr);
> +		/* set ret to true only if we send at least one request */
> +		ret = true;
> +		neigh_node_free_ref(neigh_node);
> +free_orig:
> +		orig_node_free_ref(cand[i].orig_node);
> +	}
> +
> +out:
> +	kfree(cand);
> +	return ret;
> +}

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

^ permalink raw reply

* Re: [kbd] [PATCH] dvorak-ru.map: uncompress file
From: Alexey Gladkov @ 2011-10-31  0:06 UTC (permalink / raw)
  To: kbd
In-Reply-To: <1320017777-16417-1-git-send-email-vapier@gentoo.org>

31.10.2011 03:36, Mike Frysinger wrote:
> This shouldn't be gzipped in git.
> 
> Reported-by: Ilia Pozhilov <ilyapoz@gmail.com>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  data/keymaps/i386/dvorak/dvorak-ru.map |  Bin 2612 -> 10416 bytes
>  1 files changed, 0 insertions(+), 0 deletions(-)

God damn a new viewers!
Applied, thanks!

-- 
Rgrds, legion



^ permalink raw reply

* Re: [B.A.T.M.A.N.] [PATCH 1/6] batman-adv: implement an helper function to forge unicast packets
From: Simon Wunderlich @ 2011-10-31  0:05 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking
In-Reply-To: <1319964962-5092-2-git-send-email-ordex@autistici.org>

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

On Sun, Oct 30, 2011 at 09:55:57AM +0100, Antonio Quartulli wrote:
> @@ -304,33 +331,22 @@ int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv)
>  	orig_node = transtable_search(bat_priv, ethhdr->h_source,
>  				      ethhdr->h_dest);
>  
> -find_router:
> +prepare_packet:
>  	/**
>  	 * find_router():

I guess the comment should be changed as well when the label is renamed.

>  	 *  - if orig_node is NULL it returns NULL
>  	 *  - increases neigh_nodes refcount if found.
>  	 */
>  	neigh_node = find_router(bat_priv, orig_node, NULL);
> -

Do we really need to remove this newline?


>  	if (!neigh_node)
>  		goto out;
>  
> -	if (my_skb_head_push(skb, sizeof(*unicast_packet)) < 0)
> +	skb = prepare_unicast_packet(skb, orig_node);
> +	if (!skb)
>  		goto out;
>  
>  	unicast_packet = (struct unicast_packet *)skb->data;
>  
> -	unicast_packet->version = COMPAT_VERSION;
> -	/* batman packet type: unicast */
> -	unicast_packet->packet_type = BAT_UNICAST;
> -	/* set unicast ttl */
> -	unicast_packet->ttl = TTL;
> -	/* copy the destination for faster routing */
> -	memcpy(unicast_packet->dest, orig_node->orig, ETH_ALEN);
> -	/* set the destination tt version number */
> -	unicast_packet->ttvn =
> -		(uint8_t)atomic_read(&orig_node->last_ttvn);
> -
>  	if (atomic_read(&bat_priv->fragmentation) &&
>  	    data_len + sizeof(*unicast_packet) >
>  				neigh_node->if_incoming->net_dev->mtu) {
> @@ -350,7 +366,7 @@ out:
>  		neigh_node_free_ref(neigh_node);
>  	if (orig_node)
>  		orig_node_free_ref(orig_node);
> -	if (ret == 1)
> +	if (ret == 1 && skb)
>  		kfree_skb(skb);
>  	return ret;
>  }

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

^ permalink raw reply

* Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/3] ppc: Correctly handle errors reading ibm, vmx and ibm, dfp properties
From: David Gibson @ 2011-10-31  0:01 UTC (permalink / raw)
  To: Alexander Graf; +Cc: qemu-ppc, qemu-devel
In-Reply-To: <03D779A2-03B3-42B7-A36B-33D0DB41CAF3@suse.de>

On Sun, Oct 30, 2011 at 05:53:13PM +0100, Alexander Graf wrote:
> 
> On 28.10.2011, at 03:56, David Gibson wrote:
> 
> > kvmppc_read_int_cpu_dt() returns -1 on errors. However
> > kvmppc_host_cpu_def() assumes that it can use the return value
> > directly for setting the corresponding instruction support bits.  This
> > will give invalid results when kvmppc_read_int_cpu_dt() returns -1
> > (i.e. 0xffffffff).
> > 
> > In fact, it gets worse: the common case for -1 return values is when
> > the properties are simply not present.  On some machines this means
> > the features are not available but in other cases it just means that
> > the firmware on this platform does not provide this information.  So,
> > when there's an error reading the properties we really can't tell if
> > vmx or dfp is supported.
> > 
> > Therefore, this patch checks for -1 return values and falls back to
> > qemu's built in table of CPU capabilities in that case.
> > 
> > Reported-by: Nishanth Aravamudan <nacc@us.ibm.com>
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> 
> I already have this patch in my tree, though with different
> author.

Yeah, I realised that not long after I sent it.

> I've added Nishanth as Reported-by on it now and you as
> Acked-by, if you're ok with that.

Ok, thanks.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* Re: [B.A.T.M.A.N.] [PATCH 0/6] DAT: Distributed ARP Table
From: Simon Wunderlich @ 2011-10-31  0:03 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking
In-Reply-To: <1319964962-5092-1-git-send-email-ordex@autistici.org>

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

Hello Antonio,

thanks for the patchset! I've tested it again in my kvm setup, it worked very
well.

There are some issues remaining, I'll comment the individual patches for this.
About the general stuff:

 * maybe we should rename arp.{c|h} to dat.{c|h} to avoid confusion with
   other code in the linux kernel?
 * please do a checkpatch.pl --strict check on the patches, there were some
   warnings about too long lines and bad spaces

Cheers,
	Simon

On Sun, Oct 30, 2011 at 09:55:56AM +0100, Antonio Quartulli wrote:
> Hello people,
> as most of you may already know, last summer I've been working on the
> B.A.T.M.A.N.-Adv GSoC project named "DAT: Distributed ARP Table". For who wants
> to get deeper into the details of the project there are two links:
> - The GSoC proposal [1]
> - The DAT wikipage on open-mesh.org [2], with status and ideas description
> 
> Just to recap: DAT is a distributes hash table meant to store ARP entries for
> fast lookup. In a normal scenario, whenever a node wants to communicate with
> another one, it first needs to issue a broadcast ARP request in order to
> retrieve its PHY/MAC address. In a sparse network a broadcast message could be
> lost several times before reaching the real destination so creating high
> latencies. With DAT, every ARP entries (a pair [IP addr, MAC addr]) is stored on
> a "computed" set of nodes, therefore in case of ARP request theses nodes can
> directly be contacted (in unicast) and the needed information can be quickly
> fetched.
> 
> Cheers,
> Antonio
> 
> [1] http://www.google-melange.com/gsoc/project/google/gsoc2011/ordex/4001
> [2] http://www.open-mesh.org/wiki/batman-adv/DAT
> 
> 

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

^ permalink raw reply


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.