l3-hw and filtered routes

Hello
I would like to use a CRS317 to do L3-HW of a partial/filtered FRT table.
My idea is to receive the whole FRT and fine a way to filter all the routes that has an AS PATH bigger than 2.

In the ROS 6 the route was not even listed in the ip route list… but in the v7 we see them with the I flag.


I have read this in the docs of the filter rules:
reject matched prefix, the prefix will be stored in the memory as “filtered” and will not be the candidate to be selected as the best path.

So how can I avoid to install the route in memory and leave space only for the accepted routes?

There is no “discard” in filters, but it I am not sure how it is even related to L3-HW, because only “active” route can be sent to HW.