[ovs-dev] [PATCH v3] ofproto-dpif-xlate: makes OVS native tunneling honor tunnel-specified source addresses

Ben Pfaff blp at ovn.org
Tue Apr 17 15:45:46 UTC 2018

On Tue, Apr 17, 2018 at 12:29:12PM +0800, wenxu at ucloud.cn wrote:
> From: wenxu <wenxu at ucloud.cn>
> It makes OVS native tunneling honor tunnel-specified source addresses,
> in the same way that Linux kernel tunneling honors them.
> This patch made valid tun_src specified by flow-action can be used for
> tunnel_src of packet. add a "local" property for a route entry and enhance
> the priority of local route higher than user route.
> Like the kernel space when lookup the route, if there are tun_src specified
> by flow-action or port options. Check the tun_src wheather is a local
> address, then lookup the route.
> Signed-off-by: wenxu <wenxu at ucloud.cn>
> Signed-off-by: frank.zeng <frank.zeng at ucloud.cn>

Thanks a lot for this latest version.

This has patch conflicts due to a recent change in
ofproto/ofproto-dpif-sflow.c.  Would you mind rebasing?

This code tends to use booleans in correct, but somewhat nonidiomatic
ways.  For example:
            if (p_src->local != true) {
would more idiomatically be written as:
            if (!p_src->local) {

        if (rt->priority == rt->plen || rt->local == true) {
        if (rt->priority == rt->plen || rt->local) {

        if (rtm->rtm_type == RTN_LOCAL) {
            change->rd.local = true;
        } else {
            change->rd.local = false;
        change->rd.local = rtm->rtm_type == RTN_LOCAL;

Would you mind adjusting the style?

I also noticed a doubled semicolon in sflow_choose_agent_address().

Thanks again,


More information about the dev mailing list