Routing Filters: jump/return or chain matcher?

I’m trying to convert a whole set of BGP filtering logic to Mikrotik ROS v7. Because of its complexity, I want to try and keep filters modular and reusable. I’m struggling with the control flow options between chains a bit.

There seem to be two options:

  1. jump action to another chain, which does its thing - accept or rejecting prefixes - and calls return when it is done.

  2. chain <otherchain> matcher in an if statement. This matches when the other chain accepts the prefix.

The way I understand it, accept in the jump option shortcuts all following processing and instantly returns, while with the chain option processing will continue as normal.

Are there other differences? Performance impact? What does return do if called in a chain used by the chain matcher or standalone, does it count as accept or reject?

return passes control back to the point of invocation without making a decision. If the chain terminates without a decision, it is implicitly considered a rejection. In the case of a chain matcher, return means that the match will fail.