Commit 6e215fd8 authored by Sven Eckelmann's avatar Sven Eckelmann

batman-adv: Remove multiline comments from line ending

It is slightly irritating that comments after a long line span over
multiple lines without any code. It is easier to put them before the
actual code and reduce the number of lines which the eye has to read.
Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
parent 2dafb49d
...@@ -34,16 +34,18 @@ ...@@ -34,16 +34,18 @@
#define TQ_MAX_VALUE 255 #define TQ_MAX_VALUE 255
#define JITTER 20 #define JITTER 20
#define TTL 50 /* Time To Live of broadcast messages */
#define PURGE_TIMEOUT 200 /* purge originators after time in seconds if no /* Time To Live of broadcast messages */
* valid packet comes in -> TODO: check #define TTL 50
* influence on TQ_LOCAL_WINDOW_SIZE */
/* purge originators after time in seconds if no valid packet comes in
* -> TODO: check influence on TQ_LOCAL_WINDOW_SIZE */
#define PURGE_TIMEOUT 200
#define TT_LOCAL_TIMEOUT 3600 /* in seconds */ #define TT_LOCAL_TIMEOUT 3600 /* in seconds */
#define TQ_LOCAL_WINDOW_SIZE 64 /* sliding packet range of received originator /* sliding packet range of received originator messages in squence numbers
* messages in squence numbers (should be a * (should be a multiple of our word size) */
* multiple of our word size) */ #define TQ_LOCAL_WINDOW_SIZE 64
#define TQ_GLOBAL_WINDOW_SIZE 5 #define TQ_GLOBAL_WINDOW_SIZE 5
#define TQ_LOCAL_BIDRECT_SEND_MINIMUM 1 #define TQ_LOCAL_BIDRECT_SEND_MINIMUM 1
#define TQ_LOCAL_BIDRECT_RECV_MINIMUM 1 #define TQ_LOCAL_BIDRECT_RECV_MINIMUM 1
...@@ -55,21 +57,20 @@ ...@@ -55,21 +57,20 @@
#define VIS_INTERVAL 5000 /* 5 seconds */ #define VIS_INTERVAL 5000 /* 5 seconds */
/* how much worse secondary interfaces may be to /* how much worse secondary interfaces may be to be considered as bonding
* to be considered as bonding candidates */ * candidates */
#define BONDING_TQ_THRESHOLD 50 #define BONDING_TQ_THRESHOLD 50
#define MAX_AGGREGATION_BYTES 512 /* should not be bigger than 512 bytes or /* should not be bigger than 512 bytes or change the size of
* change the size of
* forw_packet->direct_link_flags */ * forw_packet->direct_link_flags */
#define MAX_AGGREGATION_BYTES 512
#define MAX_AGGREGATION_MS 100 #define MAX_AGGREGATION_MS 100
#define SOFTIF_NEIGH_TIMEOUT 180000 /* 3 minutes */ #define SOFTIF_NEIGH_TIMEOUT 180000 /* 3 minutes */
/* don't reset again within 30 seconds */
#define RESET_PROTECTION_MS 30000 #define RESET_PROTECTION_MS 30000
#define EXPECTED_SEQNO_RANGE 65536 #define EXPECTED_SEQNO_RANGE 65536
/* don't reset again within 30 seconds */
#define MESH_INACTIVE 0 #define MESH_INACTIVE 0
#define MESH_ACTIVE 1 #define MESH_ACTIVE 1
...@@ -84,12 +85,13 @@ ...@@ -84,12 +85,13 @@
#ifdef pr_fmt #ifdef pr_fmt
#undef pr_fmt #undef pr_fmt
#endif #endif
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* Append 'batman-adv: ' before /* Append 'batman-adv: ' before kernel messages */
* kernel messages */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#define DBG_BATMAN 1 /* all messages related to routing / flooding / /* all messages related to routing / flooding / broadcasting / etc */
* broadcasting / etc */ #define DBG_BATMAN 1
#define DBG_ROUTES 2 /* route or tt entry added / changed / deleted */ /* route or tt entry added / changed / deleted */
#define DBG_ROUTES 2
#define DBG_ALL 3 #define DBG_ALL 3
......
...@@ -128,8 +128,7 @@ struct vis_packet { ...@@ -128,8 +128,7 @@ struct vis_packet {
uint8_t entries; /* number of entries behind this struct */ uint8_t entries; /* number of entries behind this struct */
uint32_t seqno; /* sequence number */ uint32_t seqno; /* sequence number */
uint8_t ttl; /* TTL */ uint8_t ttl; /* TTL */
uint8_t vis_orig[6]; /* originator that informs about its uint8_t vis_orig[6]; /* originator that announces its neighbors */
* neighbors */
uint8_t target_orig[6]; /* who should receive this packet */ uint8_t target_orig[6]; /* who should receive this packet */
uint8_t sender_orig[6]; /* who sent or rebroadcasted this packet */ uint8_t sender_orig[6]; /* who sent or rebroadcasted this packet */
} __packed; } __packed;
......
...@@ -793,8 +793,8 @@ static void interface_setup(struct net_device *dev) ...@@ -793,8 +793,8 @@ static void interface_setup(struct net_device *dev)
* have not been initialized yet * have not been initialized yet
*/ */
dev->mtu = ETH_DATA_LEN; dev->mtu = ETH_DATA_LEN;
dev->hard_header_len = BAT_HEADER_LEN; /* reserve more space in the /* reserve more space in the skbuff for our header */
* skbuff for our header */ dev->hard_header_len = BAT_HEADER_LEN;
/* generate random address */ /* generate random address */
random_ether_addr(dev_addr); random_ether_addr(dev_addr);
......
...@@ -89,11 +89,11 @@ struct orig_node { ...@@ -89,11 +89,11 @@ struct orig_node {
struct hlist_node hash_entry; struct hlist_node hash_entry;
struct bat_priv *bat_priv; struct bat_priv *bat_priv;
unsigned long last_frag_packet; unsigned long last_frag_packet;
spinlock_t ogm_cnt_lock; /* protects: bcast_own, bcast_own_sum, /* ogm_cnt_lock protects: bcast_own, bcast_own_sum,
* neigh_node->real_bits, * neigh_node->real_bits, neigh_node->real_packet_count */
* neigh_node->real_packet_count */ spinlock_t ogm_cnt_lock;
spinlock_t bcast_seqno_lock; /* protects bcast_bits, /* bcast_seqno_lock protects bcast_bits, last_bcast_seqno */
* last_bcast_seqno */ spinlock_t bcast_seqno_lock;
atomic_t bond_candidates; atomic_t bond_candidates;
struct list_head bond_list; struct list_head bond_list;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment