svn commit: r325167 - head/sys/net

Andrew Turner andrew at fubar.geek.nz
Mon Oct 30 22:40:50 UTC 2017


> On 30 Oct 2017, at 21:14, Stephen Hurd <shurd at FreeBSD.org> wrote:
> 
> Author: shurd
> Date: Mon Oct 30 21:14:31 2017
> New Revision: 325167
> URL: https://svnweb.freebsd.org/changeset/base/325167
> 
> Log:
>  Fix PR222744 - netmap errors with iflib em driver
> 
>  Fix error when refilling netmap buffers that resulted in the first
>  buffer of the successive passes through ifl_bus_addrs[] leaving the
>  first value unset (tmp_pidx started at 1, not zero after the first time
>  through the loop).
> 
>  Leave the one unused buffer required by some NICs visible in the netmap
>  ring rather than hidden. There will always be a buffer in use by the
>  kernel now when an iflib driver is used via netmap.
> 
>  Always get the netmap slot index via netmap_idx_n2k() to account for
>  nkr_hwofs in a consistent way.
> 
>  Split shared functionality into new functions.
>  iru_init(): shared by _iflib_fl_refill() and netmap_fl_refill()
>  netmap_fl_refill(): shared by iflib_netmap_rxsync() and
>  iflib_netmap_rxq_init()
> 
>  PR:		222744
>  Reported by:	Shirkdog <mshirk at daemon-security.com>
>  Reviewed by:	sbruno
>  Approved by:	sbruno (mentor)
>  Sponsored by:	Limelight Networks
>  Differential Revision:	https://reviews.freebsd.org/D12769

This breaks building without netmap as iru_init is within an #ifdef DEV_NETMAP block, but is declared and used outside this:

--- iflib.o ---
/jenkins/workspace/FreeBSD-arm64-head/freebsd-head/sys/net/iflib.c:140:13: error: function 'iru_init' has internal linkage but is not defined [-Werror,-Wundefined-internal]

static void iru_init(if_rxd_update_t iru, iflib_rxq_t rxq, uint8_t flid);
            ^
/jenkins/workspace/FreeBSD-arm64-head/freebsd-head/sys/net/iflib.c:1841:2: note: used here
        iru_init(&iru, fl->ifl_rxq, fl->ifl_id);
        ^
1 error generated.

Andrew



More information about the svn-src-head mailing list