From patchwork Tue Feb 7 19:34:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 1514 Return-Path: Received: from nick.hrz.tu-chemnitz.de (nick.hrz.tu-chemnitz.de [134.109.228.11]) by open-mesh.org (Postfix) with ESMTPS id 1A51F6008A0 for ; Tue, 7 Feb 2012 20:34:34 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@tu-chemnitz.de; dkim-adsp=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tu-chemnitz.de; s=dkim2010; h=Message-Id:Date:Subject:Cc:To:From; bh=4kTdOHWsJhMec5Z71bBENgJhU6zbtkKce/sL9XYhhjI=; b=YHEzbw8e1xNBQMQnHdyNM7m6XXqjJrD6UEE9NsmDnDByXMMkqE+jtW0jT042CLZ2SBN2hX6fBYo9TWSBFhH9SJO5o0nkJI2jorujvVsq26klF+5TCWi9D7HG9edeZRbxsXY0v9kHf30zZZIAkunEI+cxOhfr2tjFRqDE4NtUmlI=; Received: from p57aa11a5.dip0.t-ipconnect.de ([87.170.17.165] helo=pandem0nium) by nick.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RuqoD-0003QD-GB; Tue, 07 Feb 2012 20:34:33 +0100 Received: from dotslash by pandem0nium with local (Exim 4.72) (envelope-from ) id 1RuqoG-0006rX-NS; Tue, 07 Feb 2012 20:34:36 +0100 From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 7 Feb 2012 20:34:25 +0100 Message-Id: <1328643265-26349-1-git-send-email-siwu@hrz.tu-chemnitz.de> X-Mailer: git-send-email 1.7.2.5 X-RBL-Warning: 87.170.17.165 is listed at zen.spamhaus.org X-Scan-AV: nick.hrz.tu-chemnitz.de; 2012-02-07 20:34:33; 477b12f639427964a6b5cc9ba9da583f X-Scan-SA: nick.hrz.tu-chemnitz.de; 2012-02-07 20:34:33; 8fef2a75f02c49bbfa81c0a537346548 X-Spam-Score: 1.5 (+) X-Spam-Report: --- Textanalyse SpamAssassin 3.3.1 (1.5 Punkte) Fragen an/questions to: Postmaster TU Chemnitz * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 2.5 TUC_RBL RBL: Mail von bekanntem Spam-Relay oder Dialup (TUC) --- Ende Textanalyse Cc: Simon Wunderlich Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: only bloat with bla-structures if activated X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Feb 2012 19:34:34 -0000 We don't have to bloat the batman internal structures if bla is not configured. This patch adds a few ifdefs to do this. Signed-off-by: Simon Wunderlich --- types.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/types.h b/types.h index 7f7f610..a5b1a63 100644 --- a/types.h +++ b/types.h @@ -140,11 +140,13 @@ struct neigh_node { spinlock_t tq_lock; /* protects: tq_recv, tq_index */ }; +#ifdef CONFIG_BATMAN_ADV_BLA struct bcast_duplist_entry { uint8_t orig[ETH_ALEN]; uint16_t crc; unsigned long entrytime; }; +#endif struct bat_priv { atomic_t mesh_state; @@ -186,14 +188,18 @@ struct bat_priv { struct hashtable_t *orig_hash; struct hashtable_t *tt_local_hash; struct hashtable_t *tt_global_hash; +#ifdef CONFIG_BATMAN_ADV_BLA struct hashtable_t *claim_hash; struct hashtable_t *backbone_hash; +#endif struct list_head tt_req_list; /* list of pending tt_requests */ struct list_head tt_roam_list; struct hashtable_t *vis_hash; +#ifdef CONFIG_BATMAN_ADV_BLA struct bcast_duplist_entry bcast_duplist[DUPLIST_SIZE]; int bcast_duplist_curr; struct bla_claim_dst claim_dest; +#endif spinlock_t forw_bat_list_lock; /* protects forw_bat_list */ spinlock_t forw_bcast_list_lock; /* protects */ spinlock_t tt_changes_list_lock; /* protects tt_changes */ @@ -261,6 +267,7 @@ struct tt_orig_list_entry { struct hlist_node list; }; +#ifdef CONFIG_BATMAN_ADV_BLA struct backbone_gw { uint8_t orig[ETH_ALEN]; short vid; /* used VLAN ID */ @@ -282,6 +289,7 @@ struct claim { atomic_t refcount; struct hlist_node hash_entry; }; +#endif struct tt_change_node { struct list_head list;