One of my answers to the overload problem was to filter out (via bpf) self inflicted route changes. It was very effective and one of the things I used to get to 10k+ routes. It's a really tiny patch.... bpf is universal... want it again?
On Mon, Aug 12, 2019 at 6:09 AM Juliusz Chroboczek <[email protected]> wrote: > > Please don't use tabs. > > > + if (strcmp(token2, "route") == 0) > > Don't use space after the if. > > > + else // monitor was detected but none of the specialties - monitoring > > everything. > > + c = -1; > > } > > It's going to treat "monitor typo" as just "monitor". This doesn't make > sense to me. > > > +#define CONFIG_ACTION_NEIGHBOUR_MONITOR 6 > > Wouldn't MONITOR_NEIGBOUR be more logical? > > > > + case CONFIG_ACTION_INTERFACE_MONITOR: > > + set_flag(&s->monitor, MONITOR_INTERFACE); > > + local_notify_all_interface_1(s); > > + break; > ... > > I suggest defining a separate function (say, monitor_mask) that maps the > constant to the flag. Perhaps just an array index. Then add a flags > value to local_notify_all_1 that specifies what you want to notify, and > say something like: > > case CONFIG_ACTION_INTERFACE_MONITOR: > case CONFIG_ACTION_ROUTE_MONITOR: > case ... > mask = monitor_mask(rc); > s->monitor |= mask; > local_notify_all_1(s, mask); > break; > case CONFIG_ACTION_INTERFACE_UNMONITOR: > case CONFIG_ACTION_ROUTE_UNMONITOR: > s->monitof &= ~monitor_mask(rc); > break; > > > > - int monitor; > > + uint8_t monitor; > > Please make this an unsigned int. We don't use stdint types in Babel (I'm > an old man). > > -- Juliusz > > _______________________________________________ > Babel-users mailing list > [email protected] > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/babel-users -- Dave Täht CTO, TekLibre, LLC http://www.teklibre.com Tel: 1-831-205-9740 _______________________________________________ Babel-users mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/babel-users
