On Sat, Jun 27, 2020 at 05:11:15PM -0700, William Tu wrote: > On Wed, Jun 10, 2020 at 04:49:45PM -0300, Flavio Leitner wrote: > > The annotation OVS_NO_THREAD_SAFETY_ANALYSIS and OVS_LOCKABLE are > > not part of the list, so ctags can't find functions using them. > > > > The annotation list comes from a regex and to include more items > > make the regex more difficult to read and maintain. Convert to a > > static list because it isn't supposed to change much and there > > is no standard names. > > > > Also add a comment to remind to keep the list up-to-date. > > > > Signed-off-by: Flavio Leitner <[email protected]> > > Hi Flavio, > > Instead of a static list, how about adding > sed -n -e 's/^#define \(OVS_[A-Z_]\+\)(\.\.\.)$/\1+/p' \ > -e 's/^#define \(OVS_[A-Z_]\+\)$/\1+/p' include/openvswitch/compiler.h > > So with the 2nd sed command, it creates > OVS_NO_RETURN+ > OVS_UNUSED+ > OVS_WARN_UNUSED_RESULT+ > OVS_LOCKABLE+ > OVS_GUARDED+ > OVS_NO_THREAD_SAFETY_ANALYSIS+ > OVS_PACKED_ENUM+ > > Which covers the OVS_NO_THREAD_SAFETY_ANALYSIS+ and others.
The '+' is required only when parenthesis could be used, so it wouldn't apply to OVS_NO_RETURN, for instance. I don't know the side effects. Another thing is that the '-I' parameter is useful when an identifier causes syntactic confusion. I can navigate to symbols using OVS_UNUSED and I don't see any problems. Same for OVS_NO_RETURN. Funny thing is that I had issues with OVS_LOCKABLE but not anymore. I did upgrade my fedora in between, so not sure. Anyways, I still have issues navigating to dpdk_do_tx_copy() because of OVS_NO_THREAD_SAFETY_ANALYSIS. It works if the identifier is included in the list. > I'm also ok keeping it static, if so, should we add these above? I understand the goal of fixing one time and leave it automatically, but ctags man-page is clear about using the parameter when an identifier causes problems. I don't know what else it does, so I took the safe approach. What do you think? Thanks, -- fbl _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
