diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/batman-adv/main.h | 40 | ||||
-rw-r--r-- | net/batman-adv/packet.h | 3 | ||||
-rw-r--r-- | net/batman-adv/soft-interface.c | 4 | ||||
-rw-r--r-- | net/batman-adv/types.h | 10 |
4 files changed, 29 insertions, 28 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 9ef6ef9b1e18..148b49e02642 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h | |||
@@ -34,16 +34,18 @@ | |||
34 | 34 | ||
35 | #define TQ_MAX_VALUE 255 | 35 | #define TQ_MAX_VALUE 255 |
36 | #define JITTER 20 | 36 | #define JITTER 20 |
37 | #define TTL 50 /* Time To Live of broadcast messages */ | ||
38 | 37 | ||
39 | #define PURGE_TIMEOUT 200 /* purge originators after time in seconds if no | 38 | /* Time To Live of broadcast messages */ |
40 | * valid packet comes in -> TODO: check | 39 | #define TTL 50 |
41 | * influence on TQ_LOCAL_WINDOW_SIZE */ | 40 | |
41 | /* purge originators after time in seconds if no valid packet comes in | ||
42 | * -> TODO: check influence on TQ_LOCAL_WINDOW_SIZE */ | ||
43 | #define PURGE_TIMEOUT 200 | ||
42 | #define TT_LOCAL_TIMEOUT 3600 /* in seconds */ | 44 | #define TT_LOCAL_TIMEOUT 3600 /* in seconds */ |
43 | 45 | ||
44 | #define TQ_LOCAL_WINDOW_SIZE 64 /* sliding packet range of received originator | 46 | /* sliding packet range of received originator messages in squence numbers |
45 | * messages in squence numbers (should be a | 47 | * (should be a multiple of our word size) */ |
46 | * multiple of our word size) */ | 48 | #define TQ_LOCAL_WINDOW_SIZE 64 |
47 | #define TQ_GLOBAL_WINDOW_SIZE 5 | 49 | #define TQ_GLOBAL_WINDOW_SIZE 5 |
48 | #define TQ_LOCAL_BIDRECT_SEND_MINIMUM 1 | 50 | #define TQ_LOCAL_BIDRECT_SEND_MINIMUM 1 |
49 | #define TQ_LOCAL_BIDRECT_RECV_MINIMUM 1 | 51 | #define TQ_LOCAL_BIDRECT_RECV_MINIMUM 1 |
@@ -55,21 +57,20 @@ | |||
55 | 57 | ||
56 | #define VIS_INTERVAL 5000 /* 5 seconds */ | 58 | #define VIS_INTERVAL 5000 /* 5 seconds */ |
57 | 59 | ||
58 | /* how much worse secondary interfaces may be to | 60 | /* how much worse secondary interfaces may be to be considered as bonding |
59 | * to be considered as bonding candidates */ | 61 | * candidates */ |
60 | |||
61 | #define BONDING_TQ_THRESHOLD 50 | 62 | #define BONDING_TQ_THRESHOLD 50 |
62 | 63 | ||
63 | #define MAX_AGGREGATION_BYTES 512 /* should not be bigger than 512 bytes or | 64 | /* should not be bigger than 512 bytes or change the size of |
64 | * change the size of | 65 | * forw_packet->direct_link_flags */ |
65 | * forw_packet->direct_link_flags */ | 66 | #define MAX_AGGREGATION_BYTES 512 |
66 | #define MAX_AGGREGATION_MS 100 | 67 | #define MAX_AGGREGATION_MS 100 |
67 | 68 | ||
68 | #define SOFTIF_NEIGH_TIMEOUT 180000 /* 3 minutes */ | 69 | #define SOFTIF_NEIGH_TIMEOUT 180000 /* 3 minutes */ |
69 | 70 | ||
71 | /* don't reset again within 30 seconds */ | ||
70 | #define RESET_PROTECTION_MS 30000 | 72 | #define RESET_PROTECTION_MS 30000 |
71 | #define EXPECTED_SEQNO_RANGE 65536 | 73 | #define EXPECTED_SEQNO_RANGE 65536 |
72 | /* don't reset again within 30 seconds */ | ||
73 | 74 | ||
74 | #define MESH_INACTIVE 0 | 75 | #define MESH_INACTIVE 0 |
75 | #define MESH_ACTIVE 1 | 76 | #define MESH_ACTIVE 1 |
@@ -84,12 +85,13 @@ | |||
84 | #ifdef pr_fmt | 85 | #ifdef pr_fmt |
85 | #undef pr_fmt | 86 | #undef pr_fmt |
86 | #endif | 87 | #endif |
87 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* Append 'batman-adv: ' before | 88 | /* Append 'batman-adv: ' before kernel messages */ |
88 | * kernel messages */ | 89 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
89 | 90 | ||
90 | #define DBG_BATMAN 1 /* all messages related to routing / flooding / | 91 | /* all messages related to routing / flooding / broadcasting / etc */ |
91 | * broadcasting / etc */ | 92 | #define DBG_BATMAN 1 |
92 | #define DBG_ROUTES 2 /* route or tt entry added / changed / deleted */ | 93 | /* route or tt entry added / changed / deleted */ |
94 | #define DBG_ROUTES 2 | ||
93 | #define DBG_ALL 3 | 95 | #define DBG_ALL 3 |
94 | 96 | ||
95 | 97 | ||
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h index c225c3acc55f..eda99650e9f8 100644 --- a/net/batman-adv/packet.h +++ b/net/batman-adv/packet.h | |||
@@ -128,8 +128,7 @@ struct vis_packet { | |||
128 | uint8_t entries; /* number of entries behind this struct */ | 128 | uint8_t entries; /* number of entries behind this struct */ |
129 | uint32_t seqno; /* sequence number */ | 129 | uint32_t seqno; /* sequence number */ |
130 | uint8_t ttl; /* TTL */ | 130 | uint8_t ttl; /* TTL */ |
131 | uint8_t vis_orig[6]; /* originator that informs about its | 131 | uint8_t vis_orig[6]; /* originator that announces its neighbors */ |
132 | * neighbors */ | ||
133 | uint8_t target_orig[6]; /* who should receive this packet */ | 132 | uint8_t target_orig[6]; /* who should receive this packet */ |
134 | uint8_t sender_orig[6]; /* who sent or rebroadcasted this packet */ | 133 | uint8_t sender_orig[6]; /* who sent or rebroadcasted this packet */ |
135 | } __packed; | 134 | } __packed; |
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index d6aaf9fa64d4..8e962e3aa427 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -793,8 +793,8 @@ static void interface_setup(struct net_device *dev) | |||
793 | * have not been initialized yet | 793 | * have not been initialized yet |
794 | */ | 794 | */ |
795 | dev->mtu = ETH_DATA_LEN; | 795 | dev->mtu = ETH_DATA_LEN; |
796 | dev->hard_header_len = BAT_HEADER_LEN; /* reserve more space in the | 796 | /* reserve more space in the skbuff for our header */ |
797 | * skbuff for our header */ | 797 | dev->hard_header_len = BAT_HEADER_LEN; |
798 | 798 | ||
799 | /* generate random address */ | 799 | /* generate random address */ |
800 | random_ether_addr(dev_addr); | 800 | random_ether_addr(dev_addr); |
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index 6b6c32e01c54..fab70e8b16ee 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h | |||
@@ -89,11 +89,11 @@ struct orig_node { | |||
89 | struct hlist_node hash_entry; | 89 | struct hlist_node hash_entry; |
90 | struct bat_priv *bat_priv; | 90 | struct bat_priv *bat_priv; |
91 | unsigned long last_frag_packet; | 91 | unsigned long last_frag_packet; |
92 | spinlock_t ogm_cnt_lock; /* protects: bcast_own, bcast_own_sum, | 92 | /* ogm_cnt_lock protects: bcast_own, bcast_own_sum, |
93 | * neigh_node->real_bits, | 93 | * neigh_node->real_bits, neigh_node->real_packet_count */ |
94 | * neigh_node->real_packet_count */ | 94 | spinlock_t ogm_cnt_lock; |
95 | spinlock_t bcast_seqno_lock; /* protects bcast_bits, | 95 | /* bcast_seqno_lock protects bcast_bits, last_bcast_seqno */ |
96 | * last_bcast_seqno */ | 96 | spinlock_t bcast_seqno_lock; |
97 | atomic_t bond_candidates; | 97 | atomic_t bond_candidates; |
98 | struct list_head bond_list; | 98 | struct list_head bond_list; |
99 | }; | 99 | }; |