On Thu, Feb 09, 2023 at 10:56:03AM +0100, Claudio Jeker wrote:
> In IMSG_CTL_SHOW_NEIGHBOR a struct peer is sent from the SE to the RDE to
> fill out 10 values. This is a waste of IO, struct peer is over 1000 bytes
> large. Instead just pass the peerid to the RDE, let the rde send back a
> stats object and have the control code do the merge.
> Introduce struct rde_peer_stats to hold all these values and adjust the
> code accordingly.

Makes a lot of sense and reads fine. Just one thing:

> @@ -348,7 +348,7 @@ struct peer       *getpeerbyip(struct bgpd_con
>  struct peer  *getpeerbyid(struct bgpd_config *, uint32_t);
>  int           peer_matched(struct peer *, struct ctl_neighbor *);
>  int           imsg_ctl_parent(int, uint32_t, pid_t, void *, uint16_t);
> -int           imsg_ctl_rde(int, pid_t, void *, uint16_t);
> +int           imsg_ctl_rde(int, pid_t, uint32_t, void *, uint16_t);

Would it not be better to sort the peerid before the pid like in the
other functions that have both? If you prefer to keep it this way,

ok tb

Reply via email to