On Tue, Jun 24, 2014 at 01:41:13PM -0700, Ryan Wilson wrote:
> On Tue, Jun 24, 2014 at 8:44 AM, Ben Pfaff <b...@nicira.com> wrote:
> > I'm surprised that dpif_netdev_disable_upcall() is marked
> > OVS_NO_THREAD_SAFETY_ANALYSIS instead of
> > OVS_ACQUIRES(dp->upcall_rwlock).  Similarly for
> > dpif_netdev_enable_upcall().
> >
> >
> Its marked this way because when creating a dp_netdev, I must initialize
> and lock the dp->upcall_rwlock. If I don't add
> OVS_NO_THREAD_SAFETY_ANALYSIS, sparse complains dp->upcall_rwlock is locked
> at the end of the function. Unfortunately, I can't use
> OVS_ACQUIRES(dp->upcall_rwlock) since create_dp_netdev() creates the
> dp_netdev and does not take dp as an argument. Is there another way we deal
> with issues like this?

It seems to me that create_dp_netdev(), which initializes and takes
the rwlock, is the problematic function, so I'd be inclined to mark
that one as OVS_NO_THREAD_SAFETY_ANALYSIS.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to