On Tue, Mar 28, 2023 at 05:02:26PM +0200, Theo Buehler wrote: > On Tue, Mar 28, 2023 at 03:35:46PM +0200, Claudio Jeker wrote: > > This diff moves prefix_write to rde_prefix.c and renames it to pt_write. > > The function now takes a struct pt_entry * as argument and with this the > > extra indirection via pt_getaddr() falls away. > > I'm ok with this, although it's not entirely obvious to me why this is > better.
I want to remove most usage of pt_getaddr() and pt_fill() mainly to have less dependency on struct bgpd_addr. The problem is that adding flowspec to struct bgpd_addr does not really work. So using struct pt_entry pointers works better since the representation is then purely internal. Right now my goal is to get most of the Adj-RIB-Out handling cleaned up making it possible to announce flowspec rules from OpenBGPD. > I found this diff hard to review. Perhaps you could land it with an > intermediate step that only moves the two functions without doing > anything else. Once I did this, it was a lot easier to see what > happened. Sorry about that. Will try to remember for next time. I already split all the pt_entry churn into multible diffs but guess N + 1 is the rule :) -- :wq Claudio