On Thu, Nov 20, 2025 at 1:02 AM Aaron Conole <[email protected]> wrote:

> Mike Pattrick via dev <[email protected]> writes:
>
> > Previously OVS created shared datapath ports for tunnels
> > (like genev_sys_6081, gre_sys, vxlan_sys_4789) shared between all
> > tunnels with the same destination port. In the kernel datapath this
> > is needed. But in the userspace datapath this prevents the datapath from
> > differentiating between tunnels while executing actions.
> >
> > This patch changes the implementation so each tunnel interface directly
> > as its own datapath port in userspace.
> >
> > Signed-off-by: Mike Pattrick <[email protected]>
> > ---
>
> ...
>
> > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> > index 4a200dd08..b62ad5842 100644
> > --- a/ofproto/ofproto-dpif.c
> > +++ b/ofproto/ofproto-dpif.c
> > @@ -4141,6 +4141,9 @@ port_add(struct ofproto *ofproto_, struct netdev
> *netdev)
> >          sset_add(&ofproto->ghost_ports, netdev_get_name(netdev));
> >          return 0;
> >      }
> > +    struct dpif *dpif = ofproto->backer->dpif;
> > +    const char *dpif_type_str = dpif_normalize_type(dpif_type(dpif));
> > +    netdev_set_dpif_type(netdev, dpif_type_str);
> >
> >      dp_port_name = netdev_vport_get_dpif_port(netdev, namebuf, sizeof
> namebuf);
> >      if (!dpif_port_exists(ofproto->backer->dpif, dp_port_name)) {
> > @@ -4156,9 +4159,6 @@ port_add(struct ofproto *ofproto_, struct netdev
> *netdev)
> >                        dp_port_name, odp_to_u32(port_no));
> >          }
> >      } else {
> > -        struct dpif *dpif = ofproto->backer->dpif;
> > -        const char *dpif_type_str =
> dpif_normalize_type(dpif_type(dpif));
> > -        netdev_set_dpif_type(netdev, dpif_type_str);
> >      }
>
> I didn't take too much depth to look at this, but this change seems
> strange to me.  Is it really intended to look like this?
>

You're correct, the "} else {" should be removed here.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to