22#ifndef __REMOVE_DEFAULT_ROUTES_H__
23#define __REMOVE_DEFAULT_ROUTES_H__
26#include "../common/routing_table.h"
32static inline bool _just_a_link(uint32_t direction) {
33 return __builtin_popcount(direction) == 1 &&
38static inline bool _opposite_links(
entry_t *entry) {
42 return ((dst >> 3) == (src & 0x7) && (src >> 3) == (dst & 0x7));
50 log_info(
"No Minimise needed as size %u, is below target of %u",
61 if (_just_a_link(entry->
route) &&
62 _just_a_link(entry->
source) &&
63 _opposite_links(entry)) {
67 if (after_size > target_length) {
76 for (
int i = 0; i < after_size; i++) {
81 if (_just_a_link(entry->
route) &&
82 _just_a_link(entry->
source) &&
83 _opposite_links(entry)) {
SpiNNaker debug header file.
void log_info(const char *message,...)
This function logs informational messages. This is the lowest level of message normally printed.
#define LINK_MASK
Picks the bits of a link out of a route.
static bool remove_default_routes_minimise(int target_length)
Remove defaultable routes from a routing table if that helps.
static void routing_table_copy_entry(int new_index, int old_index)
Copy an entry from one index to another.
uint32_t route
Routing direction.
int routing_table_get_n_entries(void)
Get the number of entries in the routing table.
entry_t * routing_table_get_entry(uint32_t entry_id_to_find)
Gets a pointer to where this entry is stored.
void routing_table_remove_from_size(int size_to_remove)
updates table stores accordingly.
uint32_t source
Source of packets arriving at this entry.
Holds data for a routing table entry.