From f64ec24c9bc3ec68628ac5f2a8321624fbe95e39 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 27 Jun 2017 09:27:00 +0200 Subject: [PATCH] Rename CONTIKI_NETWORK_DENSITY and CONTIKI_NETWORK_SIZE to NBR_TABLE_CONF_MAX_NEIGHBORS and NETSTCK_ROUTING_STATE_SIZE --- arch/platform/cooja/contiki-conf.h | 12 +++++------ core/contiki-default-conf.h | 21 ++++++++++--------- core/net/ipv6/uip-ds6-route.h | 2 +- core/net/mac/tsch/tsch-queue.h | 2 +- core/net/nbr-table.h | 2 +- core/net/rpl-lite/rpl-conf.h | 2 +- core/net/rpl/rpl-ns.h | 2 +- examples/ipv6/json-ws/project-conf.h | 8 +++---- examples/ipv6/multicast/project-conf.h | 8 +++---- examples/ipv6/rpl-simple/project-conf.h | 8 +++---- examples/ipv6/rpl-udp/project-conf.h | 8 +++---- .../cc26xx/cc26xx-web-demo/project-conf.h | 4 ++-- .../zoul/orion/client/project-conf.h | 4 ++-- 13 files changed, 42 insertions(+), 41 deletions(-) diff --git a/arch/platform/cooja/contiki-conf.h b/arch/platform/cooja/contiki-conf.h index 7a2a8cc3c..2b91ddb88 100644 --- a/arch/platform/cooja/contiki-conf.h +++ b/arch/platform/cooja/contiki-conf.h @@ -90,12 +90,12 @@ #define UIP_CONF_ROUTER 1 /* configure network size and density */ -#ifndef CONTIKI_NETWORK_SIZE -#define CONTIKI_NETWORK_SIZE 300 -#endif /* CONTIKI_NETWORK_SIZE */ -#ifndef CONTIKI_NETWORK_DENSITY -#define CONTIKI_NETWORK_DENSITY 300 -#endif /* CONTIKI_NETWORK_DENSITY */ +#ifndef NETSTCK_ROUTING_STATE_SIZE +#define NETSTCK_ROUTING_STATE_SIZE 300 +#endif /* NETSTCK_ROUTING_STATE_SIZE */ +#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 300 +#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */ #define TCPIP_CONF_ANNOTATE_TRANSMISSIONS 1 diff --git a/core/contiki-default-conf.h b/core/contiki-default-conf.h index 27ebe538e..cb29d2e98 100644 --- a/core/contiki-default-conf.h +++ b/core/contiki-default-conf.h @@ -90,17 +90,18 @@ * project-specific configuration to save memory. */ -/* CONTIKI_NETWORK_DENSITY specifies the maximum number of neighbors - * a node will have to handle. Used to set NBR_TABLE_MAX_NEIGHBORS. */ -#ifndef CONTIKI_NETWORK_DENSITY -#define CONTIKI_NETWORK_DENSITY 16 -#endif /* CONTIKI_NETWORK_DENSITY */ + /* NBR_TABLE_CONF_MAX_NEIGHBORS specifies the maximum number of neighbors + that each node will be able to handle. */ +#ifndef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 16 +#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */ -/* CONTIKI_NETWORK_SIZE specifies the maximum number of nodes in - * a network. Used to set UIP_MAX_ROUTES or RPL_NS_LINK_NUM. */ -#ifndef CONTIKI_NETWORK_SIZE -#define CONTIKI_NETWORK_SIZE 16 -#endif /* CONTIKI_NETWORK_SIZE */ +/* NETSTCK_ROUTING_STATE_SIZE specifies the maximum number of entries + the routing module will handle. Applies to uIP routing tables if they are + used, or to RPL non-storing mode links instead */ +#ifndef NETSTCK_ROUTING_STATE_SIZE +#define NETSTCK_ROUTING_STATE_SIZE 16 +#endif /* NETSTCK_ROUTING_STATE_SIZE */ /* NETSTACK_CONF_WITH_IPV6 specifies whether or not IPv6 should be used. If IPv6 is not used, IPv4 is used instead. */ diff --git a/core/net/ipv6/uip-ds6-route.h b/core/net/ipv6/uip-ds6-route.h index ac816b465..5ccf0fd02 100644 --- a/core/net/ipv6/uip-ds6-route.h +++ b/core/net/ipv6/uip-ds6-route.h @@ -56,7 +56,7 @@ #define UIP_MAX_ROUTES UIP_CONF_MAX_ROUTES #else /* UIP_CONF_MAX_ROUTES */ #if RPL_WITH_STORING -#define UIP_MAX_ROUTES CONTIKI_NETWORK_SIZE +#define UIP_MAX_ROUTES NETSTCK_ROUTING_STATE_SIZE #else #define UIP_MAX_ROUTES 0 #endif diff --git a/core/net/mac/tsch/tsch-queue.h b/core/net/mac/tsch/tsch-queue.h index 044d958c2..c4f099580 100644 --- a/core/net/mac/tsch/tsch-queue.h +++ b/core/net/mac/tsch/tsch-queue.h @@ -74,7 +74,7 @@ #ifdef TSCH_QUEUE_CONF_MAX_NEIGHBOR_QUEUES #define TSCH_QUEUE_MAX_NEIGHBOR_QUEUES TSCH_QUEUE_CONF_MAX_NEIGHBOR_QUEUES #else -#define TSCH_QUEUE_MAX_NEIGHBOR_QUEUES ((CONTIKI_NETWORK_DENSITY) + 2) +#define TSCH_QUEUE_MAX_NEIGHBOR_QUEUES ((NBR_TABLE_CONF_MAX_NEIGHBORS) + 2) #endif /* TSCH CSMA-CA parameters, see IEEE 802.15.4e-2012 */ diff --git a/core/net/nbr-table.h b/core/net/nbr-table.h index 982197c8c..66a0e3ee5 100644 --- a/core/net/nbr-table.h +++ b/core/net/nbr-table.h @@ -43,7 +43,7 @@ #ifdef NBR_TABLE_CONF_MAX_NEIGHBORS #define NBR_TABLE_MAX_NEIGHBORS NBR_TABLE_CONF_MAX_NEIGHBORS #else /* NBR_TABLE_CONF_MAX_NEIGHBORS */ -#define NBR_TABLE_MAX_NEIGHBORS CONTIKI_NETWORK_DENSITY +#define NBR_TABLE_MAX_NEIGHBORS NBR_TABLE_CONF_MAX_NEIGHBORS #endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */ /* An item in a neighbor table */ diff --git a/core/net/rpl-lite/rpl-conf.h b/core/net/rpl-lite/rpl-conf.h index 03534ac76..b6605ead4 100644 --- a/core/net/rpl-lite/rpl-conf.h +++ b/core/net/rpl-lite/rpl-conf.h @@ -63,7 +63,7 @@ #define RPL_NS_LINK_NUM RPL_NS_CONF_LINK_NUM #else /* RPL_NS_CONF_LINK_NUM */ #if RPL_WITH_NON_STORING -#define RPL_NS_LINK_NUM CONTIKI_NETWORK_SIZE +#define RPL_NS_LINK_NUM NETSTCK_ROUTING_STATE_SIZE #else #define RPL_NS_LINK_NUM 0 #endif diff --git a/core/net/rpl/rpl-ns.h b/core/net/rpl/rpl-ns.h index 1ac992831..8e2c018d3 100644 --- a/core/net/rpl/rpl-ns.h +++ b/core/net/rpl/rpl-ns.h @@ -47,7 +47,7 @@ #define RPL_NS_LINK_NUM RPL_NS_CONF_LINK_NUM #else /* RPL_NS_CONF_LINK_NUM */ #if RPL_WITH_NON_STORING -#define RPL_NS_LINK_NUM CONTIKI_NETWORK_SIZE +#define RPL_NS_LINK_NUM NETSTCK_ROUTING_STATE_SIZE #else #define RPL_NS_LINK_NUM 0 #endif diff --git a/examples/ipv6/json-ws/project-conf.h b/examples/ipv6/json-ws/project-conf.h index 276d0d528..b32d675bd 100644 --- a/examples/ipv6/json-ws/project-conf.h +++ b/examples/ipv6/json-ws/project-conf.h @@ -50,10 +50,10 @@ #undef QUEUEBUF_CONF_NUM #define QUEUEBUF_CONF_NUM 4 -#undef CONTIKI_NETWORK_SIZE -#define CONTIKI_NETWORK_SIZE 7 -#undef CONTIKI_NETWORK_DENSITY -#define CONTIKI_NETWORK_DENSITY 7 +#undef NETSTCK_ROUTING_STATE_SIZE +#define NETSTCK_ROUTING_STATE_SIZE 7 +#undef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 7 #undef UIP_CONF_BUFFER_SIZE #define UIP_CONF_BUFFER_SIZE 140 diff --git a/examples/ipv6/multicast/project-conf.h b/examples/ipv6/multicast/project-conf.h index 2a1c827a5..fa7695082 100644 --- a/examples/ipv6/multicast/project-conf.h +++ b/examples/ipv6/multicast/project-conf.h @@ -60,9 +60,9 @@ #define UIP_CONF_TCP 0 /* Code/RAM footprint savings so that things will fit on our device */ -#undef CONTIKI_NETWORK_SIZE -#define CONTIKI_NETWORK_SIZE 10 -#undef CONTIKI_NETWORK_DENSITY -#define CONTIKI_NETWORK_DENSITY 10 +#undef NETSTCK_ROUTING_STATE_SIZE +#define NETSTCK_ROUTING_STATE_SIZE 10 +#undef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 10 #endif /* PROJECT_CONF_H_ */ diff --git a/examples/ipv6/rpl-simple/project-conf.h b/examples/ipv6/rpl-simple/project-conf.h index 0895d650b..e69c1ab1d 100644 --- a/examples/ipv6/rpl-simple/project-conf.h +++ b/examples/ipv6/rpl-simple/project-conf.h @@ -32,11 +32,11 @@ /* Network size and PAN-ID */ -#undef CONTIKI_NETWORK_DENSITY -#define CONTIKI_NETWORK_DENSITY 25 +#undef NBR_TABLE_CONF_MAX_NEIGHBORS +#define NBR_TABLE_CONF_MAX_NEIGHBORS 25 -#undef CONTIKI_NETWORK_SIZE -#define CONTIKI_NETWORK_SIZE 25 +#undef NETSTCK_ROUTING_STATE_SIZE +#define NETSTCK_ROUTING_STATE_SIZE 25 #undef IEEE802154_CONF_PANID #define IEEE802154_CONF_PANID 0xf123 diff --git a/examples/ipv6/rpl-udp/project-conf.h b/examples/ipv6/rpl-udp/project-conf.h index f9c6520de..d2a76deb3 100644 --- a/examples/ipv6/rpl-udp/project-conf.h +++ b/examples/ipv6/rpl-udp/project-conf.h @@ -36,12 +36,12 @@ #ifdef TEST_MORE_ROUTES /* configure number of neighbors and routes */ -#define CONTIKI_NETWORK_DENSITY 10 -#define CONTIKI_NETWORK_SIZE 30 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 10 +#define NETSTCK_ROUTING_STATE_SIZE 30 #else /* configure number of neighbors and routes */ -#define CONTIKI_NETWORK_DENSITY 10 -#define CONTIKI_NETWORK_SIZE 10 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 10 +#define NETSTCK_ROUTING_STATE_SIZE 10 #endif /* TEST_MORE_ROUTES */ #undef CSMA_CONF_802154_AUTOACK diff --git a/examples/platform-specific/cc26xx/cc26xx-web-demo/project-conf.h b/examples/platform-specific/cc26xx/cc26xx-web-demo/project-conf.h index eb300443d..137e99474 100644 --- a/examples/platform-specific/cc26xx/cc26xx-web-demo/project-conf.h +++ b/examples/platform-specific/cc26xx/cc26xx-web-demo/project-conf.h @@ -57,8 +57,8 @@ * Set the TCP MSS */ #define UIP_CONF_BUFFER_SIZE 900 -#define CONTIKI_NETWORK_SIZE 5 -#define CONTIKI_NETWORK_DENSITY 5 +#define NETSTCK_ROUTING_STATE_SIZE 5 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 5 #define UIP_CONF_TCP_MSS 128 /*---------------------------------------------------------------------------*/ #endif /* PROJECT_CONF_H_ */ diff --git a/examples/platform-specific/zoul/orion/client/project-conf.h b/examples/platform-specific/zoul/orion/client/project-conf.h index 83d99056f..cbe867a14 100644 --- a/examples/platform-specific/zoul/orion/client/project-conf.h +++ b/examples/platform-specific/zoul/orion/client/project-conf.h @@ -42,8 +42,8 @@ #define ANTENNA_SW_SELECT_DEF_CONF ANTENNA_SW_SELECT_2_4GHZ #define RESOLV_CONF_SUPPORTS_MDNS 0 -#define CONTIKI_NETWORK_SIZE 3 -#define CONTIKI_NETWORK_DENSITY 3 +#define NETSTCK_ROUTING_STATE_SIZE 3 +#define NBR_TABLE_CONF_MAX_NEIGHBORS 3 #define HTTP_CLIENT_BUFFER_LEN 256