Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jun 2012 10:54:03 +0200
From:      Matthias Apitz <guru@unixarea.de>
To:        John Baldwin <jhb@freebsd.org>
Cc:        swills@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: 10-CURRENT r235646 && open-vm-tools-8.6.0-425873
Message-ID:  <20120603085402.GA6129@tinyCurrent>
In-Reply-To: <201205311134.55258.jhb@freebsd.org>
References:  <20120526142229.GA3893@tinyCurrent> <201205311134.55258.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
El día Thursday, May 31, 2012 a las 11:34:55AM -0400, John Baldwin escribió:

> On Saturday, May 26, 2012 10:22:29 am Matthias Apitz wrote:
> > 
> > Hi,
> > 
> > The port ports/emulators/open-vm-tools does not compile in 10-CURRENT:
> > 
> > # make install clean
> > ...
> > ...
> > if_vxn.c:719: warning: implicit declaration of function 'IF_ADDR_LOCK'
> > if_vxn.c:719: warning: nested extern declaration of 'IF_ADDR_LOCK'
> > [-Wnested-ext erns]
> > if_vxn.c:746: warning: implicit declaration of function 'IF_ADDR_UNLOCK'
> > if_vxn.c:746: warning: nested extern declaration of 'IF_ADDR_UNLOCK'
> > [-Wnested-e xterns]
> > *** [if_vxn.o] Error code 1
> > 
> > Let me know if you need more information.
> > Thanks
> 
> It should be using if_mcast_rlock() and if_mcast_runlock() instead of using 
> those macros directly.  This works all the way back to 8.0.

Hi,

Is there a patch or some example how to replace
IF_ADDR_LOCK/IF_ADDR_UNLOCK by if_mcast_rlock() and if_mcast_runlock()?

The code in the above source looks like this:

modules/freebsd/vmxnet/net_compat.h:
...
#if __FreeBSD_version < 505000
#   define VXN_IF_ADDR_LOCK(_ifp)
#   define VXN_IF_ADDR_UNLOCK(_ifp)
#else
#   define VXN_IF_ADDR_LOCK(_ifp)       IF_ADDR_LOCK((_ifp))
#   define VXN_IF_ADDR_UNLOCK(_ifp)     IF_ADDR_UNLOCK((_ifp))
#endif

modules/freebsd/vmxnet/if_vxn.c
...
vxn_load_multicast(vxn_softc_t *sc)
{
   struct ifmultiaddr *ifma;
   struct ifnet *ifp = VXN_SC2IFP(sc);
   ...
   VXN_IF_ADDR_LOCK(ifp);

   ...
   VXN_IF_ADDR_UNLOCK(ifp);
...

Thanks

	matthias
-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <guru@unixarea.de> - w http://www.unixarea.de/
UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120603085402.GA6129>