Re: Compilation --with-netmap fails FreeBSD current

Luigi Rizzo <[email protected]>
Newsgroups gmane.network.routing.click
Message-ID <[email protected]>
On Wed, Mar 07, 2012 at 10:03:28AM -0800, Josh Train wrote:
> Hi,
> 
> Yesterday I reinstalled a system with the latest FreeBSD-Current and
> tested that netmap works correctly with the pkt-gen application.
> 
> Today, I tried building click using sources that I pulled one day ago with
> the following set of commands:
> 
> ./configure --with-netmap

better late than never...
The following two additions to sys/net/netmap_user.h
(or for the linux version, include/net/netmap_user.h )
should enable compilation of click.

	#define NETMAP_RING_FIRST_RESERVED(r)                   \
		( (r)->cur < (r)->reserved ?                    \
		  (r)->cur + (r)->num_slots - (r)->reserved :   \
		  (r)->cur - (r)->reserved )

	/* one field in struct nmreq was renamed */
	#define nm_numrings	nr_rx_rings

i have already committed the former to FreeBSD/head, while
the latter is not there because i would prefer to fix the
one or two places in the Click sources.

cheers
luigi

> then I proceed to issue:
> 
> make
> 
> I got the following error:
> 
> In file included from ../include/click/packet.hh:4,
>                  from ../include/click/element.hh:7,
>                  from ../elements/userlevel/fromdevice.hh:3,
>                  from ../elements/userlevel/fromdevice.cc:35:
> ../include/click/ipaddress.hh: In member function 'bool
> IPAddress::is_multicast() const':
> ../include/click/ipaddress.hh:108: warning: large integer implicitly
> truncated to unsigned type
> ../include/click/ipaddress.hh:108: warning: large integer implicitly
> truncated to unsigned type
> In file included from ../elements/userlevel/fromdevice.hh:24,
>                  from ../elements/userlevel/fromdevice.cc:35:
> ../elements/userlevel/netmapinfo.hh: In static member function 'static
> bool NetmapInfo::refill(netmap_ring*)':
> ../elements/userlevel/netmapinfo.hh:36: error:
> 'NETMAP_RING_FIRST_RESERVED' was not declared in this scope
> ../elements/userlevel/netmapinfo.hh:37: error: expected `;' before ')' token
> ../elements/userlevel/fromdevice.cc: In member function 'int
> FromDevice::netmap_dispatch()':
> ../elements/userlevel/fromdevice.cc:493: error:
> 'NETMAP_RING_FIRST_RESERVED' was not declared in this scope
> gmake: *** [fromdevice.o] Error 1
> *** [userlevel] Error code 2
> 
> Stop in /root/click-latest.
> 
> Is this a known error? Is there another way I should be building click to
> enable it to use netmap in a recent version of FreeBSD-Current?
> 
> Thanks,
> 
> Josh
> 
> 
> 
> 
> _______________________________________________
> click mailing list
> [email protected]
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.