Skip to content

Commit

Permalink
Adjust Thread BBR neighbor/destination cache size (ARMmbed#1793)
Browse files Browse the repository at this point in the history
Allow Thread BBR to have more entries in neighbor and destination
cache.
  • Loading branch information
Arto Kinnunen committed Aug 22, 2018
1 parent 21deb75 commit b3139c8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/6LoWPAN/Thread/thread_bbr_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "common_functions.h"
#include "thread_border_router_api.h"
#include "thread_bbr_api.h"
#include "net_ipv6_api.h"
#include "Common_Protocols/ipv6_constants.h"
#include "DHCPv6_Server/DHCPv6_server_service.h"
#include "thread_management_if.h"
Expand Down Expand Up @@ -1099,7 +1100,11 @@ int thread_bbr_start(int8_t interface_id, int8_t backbone_interface_id)
// By default multicast forwarding is not enabled as it causes multicast loops
multicast_fwd_set_forwarding(this->interface_id, false);

// Adjust BBR neighbor and destination cache size
arm_nwk_ipv6_max_cache_entries(THREAD_BBR_IPV6_DESTINATION_CACHE_SIZE);

thread_extension_bbr_init(interface_id,backbone_interface_id);

return 0;
#else
return -1;
Expand Down
6 changes: 6 additions & 0 deletions source/6LoWPAN/Thread/thread_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,12 @@
*/
#define THREAD_BBR_ROUTER_ID_REQUEST_STATUS THREAD_COAP_STATUS_TLV_HAVE_CHILD_ID_REQUEST

/*
* Number of destination and neighbor cache entries assuming 250 thread devices (worst case) connecting to cloud service.
* Six entries reserved for backbone devices.
*/
#define THREAD_BBR_IPV6_DESTINATION_CACHE_SIZE 256

/*
* Timeout to solicit address from DHCP if previous request fails.
*/
Expand Down

0 comments on commit b3139c8

Please sign in to comment.