[dpdk-dev] [PATCH] ethdev: modifiy vlan_offload_set_t to return int

Bruce Richardson bruce.richardson at intel.com
Fri Aug 25 10:20:36 CEST 2017


On Fri, Aug 25, 2017 at 12:55:21AM +0000, David Harton (dharton) wrote:
> 
> 
> > -----Original Message-----
> > From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> > Sent: Thursday, August 24, 2017 7:37 PM
> > To: David Harton (dharton) <dharton at cisco.com>
> > Cc: thomas at monjalon.net; ferruh.yigit at intel.com;
> > stephen.hurd at broadcom.com; ajit.khaparde at broadcom.com; John Daley
> > (johndale) <johndale at cisco.com>; wenzhuo.lu at intel.com;
> > konstantin.ananyev at intel.com; jingjing.wu at intel.com;
> > beilei.xing at intel.com; jing.d.chen at intel.com; adrien.mazarguil at 6wind.com;
> > nelio.laranjeiro at 6wind.com; alejandro.lucero at netronome.com;
> > hemant.agrawal at nxp.com; rasesh.mody at cavium.com; harish.patil at cavium.com;
> > skhare at vmware.com; yliu at fridaylinux.org; maxime.coquelin at redhat.com;
> > allain.legacy at windriver.com; dev at dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH] ethdev: modifiy vlan_offload_set_t to
> > return int
> > 
> > On Thu, 24 Aug 2017 19:18:51 -0400
> > David Harton <dharton at cisco.com> wrote:
> > 
> > > @@ -2031,7 +2031,7 @@ struct avp_queue {
> > >  	mask = (ETH_VLAN_STRIP_MASK |
> > >  		ETH_VLAN_FILTER_MASK |
> > >  		ETH_VLAN_EXTEND_MASK);
> > > -	avp_vlan_offload_set(eth_dev, mask);
> > > +	(void)avp_vlan_offload_set(eth_dev, mask);
> > 
> > This is a BSDism. You don't need the void cast.
> 
> Never know what to do...SA tools and some compilers whine if I don't.
> People complain if I do. :)
> 
> What if I check the return code and log an error? 

Sounds like a case of "doing the right thing" to me :-)


More information about the dev mailing list