On Fri, Jul 24, 2015 at 11:28:14AM -0700, Alex Wang wrote:
> On Fri, Jul 24, 2015 at 10:22 AM, Ben Pfaff <b...@nicira.com> wrote:
> 
> > On Fri, Jul 24, 2015 at 09:59:04AM -0700, Alex Wang wrote:
> > > I think we should not do the same for get_in4().  If interface is not
> > > assigned
> > > with ipv4 address, ioctl function will return errno 99.  Then user could
> > > later
> > > assign a valid ip.  But caching error number makes ovs never check again.
> > > (unless react to RTNLGRP_LINK notification and mark it as invalid)
> > >
> > > This also makes me wondering, if the same thing could happen to
> > get_in6()?
> > > How do we cope with ipv6 address change?
> >
> > I assumed we would get a notification when the status changes, which
> > would allow us to mark it as invalid.  If we don't get the right kind of
> > notification to invalidate our IPv4/v6 address caches, then we either
> > shouldn't cache them at all or subscribe to the right kind of
> > notification.
> >
> 
> After checking the code, I think we may be fine,
> 
> I remembered I asked this offline before:
> 
> We already have the NETLINK_ROUTE nl_sock joining multicast group
> RTNLGRP_LINK and resetting the cache flags correctly when there is an
> event.  However, I could not find any documentation at all regarding the
> multicast groups...  If RTNLGRP_LINK reports both ipv4/6 address change,
> then we are fine.  If not, we need to also join the proper multicast groups
> (e.g. RTNLGRP_IPV6_IFADDR, RTNLGRP_IPV4_IFADDR)
> 
> Do you know more about this?

I think we need to join another multicast group, because utilities/nlmon
doesn't report it when I add or remove IP addresses to a netdev.  It
does report it when I take a device up or down though.

That raises the question of whether we use IP addresses enough to bother
caching them.  But it looks like ofproto-dpif-xlate looks up IP address
these days for native tunneling, so the answer is probably "yes".
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to