Re: svn commit: r300113 - in head/sys: conf kern net sys

2016-05-21 Thread K. Macy
On Sat, May 21, 2016 at 3:36 AM, Hans Petter Selasky  wrote:
> On 05/18/16 06:35, Scott Long wrote:
>>
>> Author: scottl
>> Date: Wed May 18 04:35:58 2016
>> New Revision: 300113
>> URL: https://svnweb.freebsd.org/changeset/base/300113
>>
>> Log:
>>   Import the 'iflib' API library for network drivers.  From the author:
>>
>>   "iflib is a library to eliminate the need for frequently duplicated
>> device
>>   independent logic propagated (poorly) across many network drivers."
>>
>>   Participation is purely optional.  The IFLIB kernel config option is
>>   provided for drivers that want to transition between legacy and iflib
>>   modes of operation.  ixl and ixgbe driver conversions will be committed
>>   shortly.  We hope to see participation from the Broadcom and maybe
>>   Chelsio drivers in the near future.
>>
>>   Submitted by:   mm...@nextbsd.org
>>   Reviewed by:gallatin
>>   Differential Revision:  D5211
>>
>> Added:
>>   head/sys/net/ifdi_if.m   (contents, props changed)
>>   head/sys/net/iflib.c   (contents, props changed)
>>   head/sys/net/iflib.h   (contents, props changed)
>>   head/sys/net/mp_ring.c   (contents, props changed)
>>   head/sys/net/mp_ring.h   (contents, props changed)
>> Modified:
>>   head/sys/conf/files
>>   head/sys/conf/options
>>   head/sys/kern/device_if.m
>>   head/sys/kern/kern_mbuf.c
>>   head/sys/kern/subr_taskqueue.c
>>   head/sys/net/if.c
>>   head/sys/net/if_var.h
>>   head/sys/sys/_task.h
>>   head/sys/sys/mbuf.h
>>   head/sys/sys/taskqueue.h
>>
>
> Hi,
>
> Possibly the taskqueue related changes should have been broken out into a
> separate commit, hence they are not related to "iflib".
>
> --HPS

Yes.
-M
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r300113 - in head/sys: conf kern net sys

2016-05-21 Thread Hans Petter Selasky

On 05/18/16 06:35, Scott Long wrote:

Author: scottl
Date: Wed May 18 04:35:58 2016
New Revision: 300113
URL: https://svnweb.freebsd.org/changeset/base/300113

Log:
  Import the 'iflib' API library for network drivers.  From the author:

  "iflib is a library to eliminate the need for frequently duplicated device
  independent logic propagated (poorly) across many network drivers."

  Participation is purely optional.  The IFLIB kernel config option is
  provided for drivers that want to transition between legacy and iflib
  modes of operation.  ixl and ixgbe driver conversions will be committed
  shortly.  We hope to see participation from the Broadcom and maybe
  Chelsio drivers in the near future.

  Submitted by:   mm...@nextbsd.org
  Reviewed by:gallatin
  Differential Revision:  D5211

Added:
  head/sys/net/ifdi_if.m   (contents, props changed)
  head/sys/net/iflib.c   (contents, props changed)
  head/sys/net/iflib.h   (contents, props changed)
  head/sys/net/mp_ring.c   (contents, props changed)
  head/sys/net/mp_ring.h   (contents, props changed)
Modified:
  head/sys/conf/files
  head/sys/conf/options
  head/sys/kern/device_if.m
  head/sys/kern/kern_mbuf.c
  head/sys/kern/subr_taskqueue.c
  head/sys/net/if.c
  head/sys/net/if_var.h
  head/sys/sys/_task.h
  head/sys/sys/mbuf.h
  head/sys/sys/taskqueue.h



Hi,

Possibly the taskqueue related changes should have been broken out into 
a separate commit, hence they are not related to "iflib".


--HPS

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r300113 - in head/sys: conf kern net sys

2016-05-19 Thread Bjoern A. Zeeb

> On 18 May 2016, at 04:35 , Scott Long  wrote:
> 
> Author: scottl
> Date: Wed May 18 04:35:58 2016
> New Revision: 300113
> URL: https://svnweb.freebsd.org/changeset/base/300113
> 
> Log:
>  Import the 'iflib' API library for network drivers.  From the author:
> 
>  "iflib is a library to eliminate the need for frequently duplicated device
>  independent logic propagated (poorly) across many network drivers."
> 
>  Participation is purely optional.  The IFLIB kernel config option is
>  provided for drivers that want to transition between legacy and iflib
>  modes of operation.  ixl and ixgbe driver conversions will be committed
>  shortly.  We hope to see participation from the Broadcom and maybe
>  Chelsio drivers in the near future.
> 
>  Submitted by:   mm...@nextbsd.org
>  Reviewed by:gallatin
>  Differential Revision:  D5211


Can someone explain to me why I am seeing this now and what it means?

taskqgroup_adjust failed cnt: 1 stride: 1 mp_ncpus: 1 smp_started: 0


Thanks
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r300113 - in head/sys: conf kern net sys

2016-05-19 Thread Kristof Provost



On 19 May 2016, at 17:36, Andriy Gapon wrote:


On 19/05/2016 14:37, Kristof Provost wrote:



On 18 May 2016, at 10:05, Scott Long wrote:


Author: scottl
Date: Wed May 18 04:35:58 2016
New Revision: 300113
URL: https://svnweb.freebsd.org/changeset/base/300113

Log:
  Import the 'iflib' API library for network drivers.  From the 
author:


For reasons I don’t understand right now this appears to break boot 
on my T61.
It’s got an em NIC (82566MM) and is running root-on-zfs, if that 
matters.


It mounts the rootfs and then just freezes. I’m investigating, but 
would

appreciate any hints or thoughts.


Alexander has just committed r300201.  It should help.

Indeed, I’ve just updated to include that fix, and now the system 
boots.


Regards,
Kristof
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r300113 - in head/sys: conf kern net sys

2016-05-19 Thread Andriy Gapon
On 19/05/2016 14:37, Kristof Provost wrote:
> 
> 
> On 18 May 2016, at 10:05, Scott Long wrote:
> 
>> Author: scottl
>> Date: Wed May 18 04:35:58 2016
>> New Revision: 300113
>> URL: https://svnweb.freebsd.org/changeset/base/300113
>>
>> Log:
>>   Import the 'iflib' API library for network drivers.  From the author:
> 
> For reasons I don’t understand right now this appears to break boot on my T61.
> It’s got an em NIC (82566MM) and is running root-on-zfs, if that matters.
> 
> It mounts the rootfs and then just freezes. I’m investigating, but would
> appreciate any hints or thoughts.

Alexander has just committed r300201.  It should help.

> 
>> Modified: head/sys/kern/subr_taskqueue.c
>> ==
>> --- head/sys/kern/subr_taskqueue.cWed May 18 04:04:14 2016(r300112)
>> +++ head/sys/kern/subr_taskqueue.cWed May 18 04:35:58 2016(r300113)
>> @@ -119,11 +123,17 @@ TQ_SLEEP(struct taskqueue *tq, void *p,
>>  }
>>
>>  static struct taskqueue *
>> -_taskqueue_create(const char *name __unused, int mflags,
>> +_taskqueue_create(const char *name, int mflags,
>>   taskqueue_enqueue_fn enqueue, void *context,
>> - int mtxflags, const char *mtxname)
>> + int mtxflags, const char *mtxname __unused)
>>  {
>>  struct taskqueue *queue;
>> +char *tq_name = NULL;
>> +
>> +if (name != NULL)
>> +tq_name = strndup(name, 32, M_TASKQUEUE);
>> +if (tq_name == NULL)
>> +tq_name = "taskqueue";
> 
> This looks wrong. It’s later free()ed.
> 
>>
>> @@ -194,6 +206,7 @@ taskqueue_free(struct taskqueue *queue)
>>  KASSERT(queue->tq_callouts == 0, ("Armed timeout tasks"));
>>  mtx_destroy(>tq_mutex);
>>  free(queue->tq_threads, M_TASKQUEUE);
>> +free(queue->tq_name, M_TASKQUEUE);
> 
> This potentially frees a constant pointer.
> 
> Regards,
> Kristof
> 


-- 
Andriy Gapon
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r300113 - in head/sys: conf kern net sys

2016-05-19 Thread Kristof Provost



On 18 May 2016, at 10:05, Scott Long wrote:


Author: scottl
Date: Wed May 18 04:35:58 2016
New Revision: 300113
URL: https://svnweb.freebsd.org/changeset/base/300113

Log:
  Import the 'iflib' API library for network drivers.  From the 
author:


For reasons I don’t understand right now this appears to break boot on 
my T61.
It’s got an em NIC (82566MM) and is running root-on-zfs, if that 
matters.


It mounts the rootfs and then just freezes. I’m investigating, but 
would appreciate any hints or thoughts.




Modified: head/sys/kern/subr_taskqueue.c
==
--- head/sys/kern/subr_taskqueue.c  Wed May 18 04:04:14 2016
(r300112)
+++ head/sys/kern/subr_taskqueue.c  Wed May 18 04:35:58 2016
(r300113)
@@ -119,11 +123,17 @@ TQ_SLEEP(struct taskqueue *tq, void *p,
 }

 static struct taskqueue *
-_taskqueue_create(const char *name __unused, int mflags,
+_taskqueue_create(const char *name, int mflags,
 taskqueue_enqueue_fn enqueue, void *context,
-int mtxflags, const char *mtxname)
+int mtxflags, const char *mtxname __unused)
 {
struct taskqueue *queue;
+   char *tq_name = NULL;
+
+   if (name != NULL)
+   tq_name = strndup(name, 32, M_TASKQUEUE);
+   if (tq_name == NULL)
+   tq_name = "taskqueue";


This looks wrong. It’s later free()ed.



@@ -194,6 +206,7 @@ taskqueue_free(struct taskqueue *queue)
KASSERT(queue->tq_callouts == 0, ("Armed timeout tasks"));
mtx_destroy(>tq_mutex);
free(queue->tq_threads, M_TASKQUEUE);
+   free(queue->tq_name, M_TASKQUEUE);


This potentially frees a constant pointer.

Regards,
Kristof
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r300113 - in head/sys: conf kern net sys

2016-05-18 Thread K. Macy
Those are new. Please just patch iflib to use them and let's move on.
-M

On Wed, May 18, 2016 at 4:58 PM, Gleb Smirnoff  wrote:
>   Hi!
>
> On Wed, May 18, 2016 at 04:35:58AM +, Scott Long wrote:
> S> 
> ==
> S> --- head/sys/net/if.cWed May 18 04:04:14 2016(r300112)
> S> +++ head/sys/net/if.cWed May 18 04:35:58 2016(r300113)
> S> @@ -3900,6 +3900,19 @@ if_multiaddr_count(if_t ifp, int max)
> S>  return (count);
> S>  }
> S>
> S> +int
> S> +if_multi_apply(struct ifnet *ifp, int (*filter)(void *, struct 
> ifmultiaddr *, int), void *arg)
> S> +{
> S> +struct ifmultiaddr *ifma;
> S> +int cnt = 0;
> S> +
> S> +if_maddr_rlock(ifp);
> S> +TAILQ_FOREACH(ifma, >if_multiaddrs, ifma_link)
> S> +cnt += filter(arg, ifma, cnt);
> S> +if_maddr_runlock(ifp);
> S> +return (cnt);
> S> +}
> S> +
> S>  struct mbuf *
> S>  if_dequeue(if_t ifp)
> S>  {
>
> In my projects/ifnet a similar functions exist:
>
> /*
>  * Traversing through interface address lists.
>  */
> typedef voidifaddr_cb_t(void *, struct sockaddr *, struct sockaddr *,
> struct sockaddr *);
> typedef voidifmaddr_cb_t(void *, struct sockaddr *);
> voidif_foreach_addr(if_t, ifaddr_cb_t, void *);
> voidif_foreach_maddr(if_t, ifmaddr_cb_t, void *);
>
> /*
>  * Methods for drivers to access interface unicast and multicast
>  * addresses.  Driver do not know 'struct ifaddr' neither 'struct 
> ifmultiaddr'.
>  */
> void
> if_foreach_addr(if_t ifp, ifaddr_cb_t cb, void *cb_arg)
> {
> struct ifaddr *ifa;
>
> IF_ADDR_RLOCK(ifp);
> TAILQ_FOREACH(ifa, >if_addrhead, ifa_link)
> (*cb)(cb_arg, ifa->ifa_addr, ifa->ifa_dstaddr,
> ifa->ifa_netmask);
> IF_ADDR_RUNLOCK(ifp);
> }
>
> void
> if_foreach_maddr(if_t ifp, ifmaddr_cb_t cb, void *cb_arg)
> {
> struct ifmultiaddr *ifma;
>
> IF_ADDR_RLOCK(ifp);
> TAILQ_FOREACH(ifma, >if_multiaddrs, ifma_link)
> (*cb)(cb_arg, ifma->ifma_addr);
> IF_ADDR_RUNLOCK(ifp);
> }
>
> Do you mind if I adopt head to them instead of if_multi_apply()?
>
> --
> Totus tuus, Glebius.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r300113 - in head/sys: conf kern net sys

2016-05-18 Thread Gleb Smirnoff
  Hi!

On Wed, May 18, 2016 at 04:35:58AM +, Scott Long wrote:
S> 
==
S> --- head/sys/net/if.cWed May 18 04:04:14 2016(r300112)
S> +++ head/sys/net/if.cWed May 18 04:35:58 2016(r300113)
S> @@ -3900,6 +3900,19 @@ if_multiaddr_count(if_t ifp, int max)
S>  return (count);
S>  }
S>  
S> +int
S> +if_multi_apply(struct ifnet *ifp, int (*filter)(void *, struct ifmultiaddr 
*, int), void *arg)
S> +{
S> +struct ifmultiaddr *ifma;
S> +int cnt = 0;
S> +
S> +if_maddr_rlock(ifp);
S> +TAILQ_FOREACH(ifma, >if_multiaddrs, ifma_link)
S> +cnt += filter(arg, ifma, cnt);
S> +if_maddr_runlock(ifp);
S> +return (cnt);
S> +}
S> +
S>  struct mbuf *
S>  if_dequeue(if_t ifp)
S>  {

In my projects/ifnet a similar functions exist:

/*
 * Traversing through interface address lists.
 */
typedef voidifaddr_cb_t(void *, struct sockaddr *, struct sockaddr *,
struct sockaddr *);
typedef voidifmaddr_cb_t(void *, struct sockaddr *);
voidif_foreach_addr(if_t, ifaddr_cb_t, void *);
voidif_foreach_maddr(if_t, ifmaddr_cb_t, void *);

/*
 * Methods for drivers to access interface unicast and multicast
 * addresses.  Driver do not know 'struct ifaddr' neither 'struct ifmultiaddr'.
 */
void
if_foreach_addr(if_t ifp, ifaddr_cb_t cb, void *cb_arg)
{
struct ifaddr *ifa;

IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, >if_addrhead, ifa_link)
(*cb)(cb_arg, ifa->ifa_addr, ifa->ifa_dstaddr,
ifa->ifa_netmask);
IF_ADDR_RUNLOCK(ifp);
}

void
if_foreach_maddr(if_t ifp, ifmaddr_cb_t cb, void *cb_arg)
{
struct ifmultiaddr *ifma;

IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifma, >if_multiaddrs, ifma_link)
(*cb)(cb_arg, ifma->ifma_addr);
IF_ADDR_RUNLOCK(ifp);
}

Do you mind if I adopt head to them instead of if_multi_apply()?

-- 
Totus tuus, Glebius.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r300113 - in head/sys: conf kern net sys

2016-05-18 Thread Bjoern A. Zeeb

> On 18 May 2016, at 04:35 , Scott Long  wrote:
> 
> Author: scottl
> Date: Wed May 18 04:35:58 2016
> New Revision: 300113
> URL: https://svnweb.freebsd.org/changeset/base/300113
> 
> Log:
>  Import the 'iflib' API library for network drivers.  From the author:
> 
>  "iflib is a library to eliminate the need for frequently duplicated device
>  independent logic propagated (poorly) across many network drivers."
> 
>  Participation is purely optional.  The IFLIB kernel config option is
>  provided for drivers that want to transition between legacy and iflib
>  modes of operation.  ixl and ixgbe driver conversions will be committed
>  shortly.  We hope to see participation from the Broadcom and maybe
>  Chelsio drivers in the near future.
> 
>  Submitted by:   mm...@nextbsd.org
>  Reviewed by:gallatin
>  Differential Revision:  D5211
> 
> Added:
>  head/sys/net/ifdi_if.m   (contents, props changed)
>  head/sys/net/iflib.c   (contents, props changed)
>  head/sys/net/iflib.h   (contents, props changed)
>  head/sys/net/mp_ring.c   (contents, props changed)
>  head/sys/net/mp_ring.h   (contents, props changed)
> Modified:
>  head/sys/conf/files
>  head/sys/conf/options
>  head/sys/kern/device_if.m
>  head/sys/kern/kern_mbuf.c
>  head/sys/kern/subr_taskqueue.c
>  head/sys/net/if.c
>  head/sys/net/if_var.h
>  head/sys/sys/_task.h
>  head/sys/sys/mbuf.h
>  head/sys/sys/taskqueue.h

Ignoring style for a moment, this broke builds;

just as examples:  mips XLP

cc1: warnings being treated as errors
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c: In function 'drain_ring_lockless':
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c:204: warning: implicit declaration 
of function 'atomic_cmpset_64'
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c:204: warning: nested extern 
declaration of 'atomic_cmpset_64' [-Wnested-externs]
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c:231: warning: implicit declaration 
of function 'atomic_cmpset_acq_64'
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c:231: warning: nested extern 
declaration of 'atomic_cmpset_acq_64' [-Wnested-externs]
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c: In function 'ifmp_ring_enqueue':
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c:456: warning: implicit declaration 
of function 'atomic_cmpset_rel_64'
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c:456: warning: nested extern 
declaration of 'atomic_cmpset_rel_64' [-Wnested-externs]
--- mp_ring.o ---
*** [mp_ring.o] Error code 1

bmake[5]: stopped in /storage/head/obj/mips.mips/scratch/tmp/bz/head.svn/sys/XLP


powerpc LINT:

cc1: warnings being treated as errors
/scratch/tmp/bz/head.svn/sys/net/iflib.c: In function '_iflib_fl_refill':
/scratch/tmp/bz/head.svn/sys/net/iflib.c:1538: warning: comparison is always 
true due to limited range of data type
/scratch/tmp/bz/head.svn/sys/net/iflib.c: In function 'iflib_fl_bufs_free':
/scratch/tmp/bz/head.svn/sys/net/iflib.c:1667: warning: comparison is always 
true due to limited range of data type
--- iflib.o ---
*** [iflib.o] Error code 1

bmake[5]: stopped in 
/storage/head/obj/powerpc.powerpc/scratch/tmp/bz/head.svn/sys/LINT
cc1: warnings being treated as errors
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c: In function 'drain_ring_lockless':
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c:204: warning: implicit declaration 
of function 'atomic_cmpset_64'
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c:204: warning: nested extern 
declaration of 'atomic_cmpset_64' [-Wnested-externs]
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c:231: warning: implicit declaration 
of function 'atomic_cmpset_acq_64'
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c:231: warning: nested extern 
declaration of 'atomic_cmpset_acq_64' [-Wnested-externs]
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c: In function 'ifmp_ring_enqueue':
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c:456: warning: implicit declaration 
of function 'atomic_cmpset_rel_64'
/scratch/tmp/bz/head.svn/sys/net/mp_ring.c:456: warning: nested extern 
declaration of 'atomic_cmpset_rel_64' [-Wnested-externs]
--- mp_ring.o ---
*** [mp_ring.o] Error code 1

…




— 
Bjoern A. Zeeb  Charles Haddon Spurgeon:
"Friendship is one of the sweetest joys of life.  Many might have failed
 beneath the bitterness of their trial  had they not found a friend."

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r300113 - in head/sys: conf kern net sys

2016-05-17 Thread Scott Long
Author: scottl
Date: Wed May 18 04:35:58 2016
New Revision: 300113
URL: https://svnweb.freebsd.org/changeset/base/300113

Log:
  Import the 'iflib' API library for network drivers.  From the author:
  
  "iflib is a library to eliminate the need for frequently duplicated device
  independent logic propagated (poorly) across many network drivers."
  
  Participation is purely optional.  The IFLIB kernel config option is
  provided for drivers that want to transition between legacy and iflib
  modes of operation.  ixl and ixgbe driver conversions will be committed
  shortly.  We hope to see participation from the Broadcom and maybe
  Chelsio drivers in the near future.
  
  Submitted by:   mm...@nextbsd.org
  Reviewed by:gallatin
  Differential Revision:  D5211

Added:
  head/sys/net/ifdi_if.m   (contents, props changed)
  head/sys/net/iflib.c   (contents, props changed)
  head/sys/net/iflib.h   (contents, props changed)
  head/sys/net/mp_ring.c   (contents, props changed)
  head/sys/net/mp_ring.h   (contents, props changed)
Modified:
  head/sys/conf/files
  head/sys/conf/options
  head/sys/kern/device_if.m
  head/sys/kern/kern_mbuf.c
  head/sys/kern/subr_taskqueue.c
  head/sys/net/if.c
  head/sys/net/if_var.h
  head/sys/sys/_task.h
  head/sys/sys/mbuf.h
  head/sys/sys/taskqueue.h

Modified: head/sys/conf/files
==
--- head/sys/conf/files Wed May 18 04:04:14 2016(r300112)
+++ head/sys/conf/files Wed May 18 04:35:58 2016(r300113)
@@ -3523,6 +3523,9 @@ net/if_tun.c  optional tun
 net/if_tap.c   optional tap
 net/if_vlan.c  optional vlan
 net/if_vxlan.c optional vxlan inet | vxlan inet6
+net/ifdi_if.m  optional ether pci
+net/iflib.coptional ether pci
+net/mp_ring.c  optional ether
 net/mppcc.coptional netgraph_mppc_compression
 net/mppcd.coptional netgraph_mppc_compression
 net/netisr.c   standard

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Wed May 18 04:04:14 2016(r300112)
+++ head/sys/conf/options   Wed May 18 04:35:58 2016(r300113)
@@ -139,6 +139,7 @@ GEOM_VINUM  opt_geom.h
 GEOM_VIRSTOR   opt_geom.h
 GEOM_VOL   opt_geom.h
 GEOM_ZERO  opt_geom.h
+IFLIB  opt_iflib.h
 KDTRACE_HOOKS  opt_global.h
 KDTRACE_FRAME  opt_kdtrace.h
 KN_HASHSIZEopt_kqueue.h

Modified: head/sys/kern/device_if.m
==
--- head/sys/kern/device_if.m   Wed May 18 04:04:14 2016(r300112)
+++ head/sys/kern/device_if.m   Wed May 18 04:35:58 2016(r300113)
@@ -62,6 +62,11 @@ CODE {
{
return 0;
}
+
+   static void * null_register(device_t dev)
+   {
+   return NULL;
+   }
 };

 /**
@@ -316,3 +321,24 @@ METHOD int resume {
 METHOD int quiesce {
device_t dev;
 } DEFAULT null_quiesce;
+
+/**
+ * @brief This is called when the driver is asked to register handlers.
+ *
+ *
+ * To include this method in a device driver, use a line like this
+ * in the driver's method list:
+ *
+ * @code
+ * KOBJMETHOD(device_register, foo_register)
+ * @endcode
+ *
+ * @param dev  the device for which handlers are being registered
+ *
+ * @retval NULL method not implemented
+ * @retval non-NULLa pointer to implementation specific static driver state
+ *
+ */
+METHOD void * register {
+   device_t dev;
+} DEFAULT null_register;

Modified: head/sys/kern/kern_mbuf.c
==
--- head/sys/kern/kern_mbuf.c   Wed May 18 04:04:14 2016(r300112)
+++ head/sys/kern/kern_mbuf.c   Wed May 18 04:35:58 2016(r300113)
@@ -444,7 +444,7 @@ mb_dtor_mbuf(void *mem, int size, void *
flags = (unsigned long)arg;
 
KASSERT((m->m_flags & M_NOFREE) == 0, ("%s: M_NOFREE set", __func__));
-   if ((m->m_flags & M_PKTHDR) && !SLIST_EMPTY(>m_pkthdr.tags))
+   if (!(flags & MB_DTOR_SKIP) && (m->m_flags & M_PKTHDR) && 
!SLIST_EMPTY(>m_pkthdr.tags))
m_tag_delete_chain(m, NULL);
 #ifdef INVARIANTS
trash_dtor(mem, size, arg);

Modified: head/sys/kern/subr_taskqueue.c
==
--- head/sys/kern/subr_taskqueue.c  Wed May 18 04:04:14 2016
(r300112)
+++ head/sys/kern/subr_taskqueue.c  Wed May 18 04:35:58 2016
(r300113)
@@ -34,12 +34,14 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -62,9 +64,11 @@ struct taskqueue {
STAILQ_HEAD(, task) tq_queue;