On 12/18/24 23:34, Han Zhou wrote:
> Currently the ovs-router doesn't read kernel IP rules, so when there are
> needs to route based on source IP address there is no way to achieve it
> in the ovs-router. This patch provides a convenient way to achieve
> source based routes by providing an optional arg to the ovs-appctl
> ovs/router/add command 'src_prefix=ip/mask', to allow users to specify
> matching on src in addition to dst for user-added routes.
> 
> Signed-off-by: Han Zhou <[email protected]>
> ---
>  lib/ovs-router.c    | 151 ++++++++++++++++++++++++++++++++++++--------
>  tests/ovs-router.at |  71 ++++++++++++++++++++-
>  2 files changed, 191 insertions(+), 31 deletions(-)

Hi, Han.  This is an interesting feature and certainly a gap between
the kernel and userpsace tunnel support.  But I'm a little concerned
about having the implementation different from the kernel and not
being able to cache the source routes from the kernel.

It might be better to add support for multiple tables in the router and
actually dump other tables from the kernel, but only ones referenced
from the default one or the other already referenced table (to avoid
performance issues when BGP is running, for exmaple).
This way we could actually cache kernel routes instead of creating a
custom syntax and diverge from the kernel implementation.

What do you think?

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to