[dpdk-dev] [PATCH 1/3] stringfns: remove rte_snprintf

Richardson, Bruce bruce.richardson at intel.com
Thu Jun 26 17:09:01 CEST 2014


> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Wednesday, June 25, 2014 1:33 AM
> To: Richardson, Bruce
> Cc: dev at dpdk.org; Stephen Hemminger
> Subject: Re: [dpdk-dev] [PATCH 1/3] stringfns: remove rte_snprintf
> 
> 2014-06-24 17:39, Richardson, Bruce:
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Stephen Hemminger
> > > The function rte_snprintf serves no useful purpose. It is the
> > > same as snprintf() for all valid inputs. Just remove it and
> > > replace all uses in current code.
> >
> > NAK to this as is.
> > Approve of replacing all instance of the rte_snprintf function with the
> > standard version in all our code and libraries. However, rather than just
> > removing the function completely, I think we should just flag the function
> > as deprecated initially, and then later on look to remove it completely.
> 
> I agree we should try to use the "deprecated" attribute when possible.
> So application porting effort will be smoother.
> 
> But in this case, there is something different: as Stephen wrote, rte_snprintf
> is useless. It's useless inside the DPDK so it's even more useless for user
> applications.
> As it's really useless, it has no sense to keep it as deprecated.
> Please, let's simply remove it.
> 

The reason to keep it as deprecated is so that those customers who don't want to do a huge amount of search-replace immediately can get things working again temporarily using -Wno-deprecated. It provides a simple temporary fallback cushion, and then we can completely remove the function later. 
So, I'd like to see us remove all our usage of the function internally in 1.7, along with marking as deprecated, and then completely remove in 1.8, (i.e. in a week's time or so) :-)


More information about the dev mailing list