aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-03-01 21:55:49 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-03-01 21:55:49 +0000
commitca6e5d9882fc7d1669085c1bbc9192225cbb7487 (patch)
tree01248a21cd51bed7f5b9746c29390acabb870e3e /sys
parent348238dbd42306d9fb5d89ab393b840572cfeb0f (diff)
parent5adcb2b96de8857caee551f12f4165be98c303e7 (diff)
downloadsrc-ca6e5d9882fc7d1669085c1bbc9192225cbb7487.tar.gz
src-ca6e5d9882fc7d1669085c1bbc9192225cbb7487.zip
Merge ^/head r314482 through r314522.
Notes
Notes: svn path=/projects/clang400-import/; revision=314523
Diffstat (limited to 'sys')
-rw-r--r--sys/boot/arm/uboot/Makefile3
-rw-r--r--sys/boot/fdt/dts/arm/socfpga_arria10_socdk_sdmmc.dts4
-rw-r--r--sys/boot/powerpc/kboot/Makefile3
-rw-r--r--sys/boot/powerpc/ofw/Makefile3
-rw-r--r--sys/boot/powerpc/ps3/Makefile3
-rw-r--r--sys/boot/powerpc/uboot/Makefile3
-rw-r--r--sys/boot/userboot/userboot/Makefile3
-rw-r--r--sys/boot/zfs/zfsimpl.c4
-rw-r--r--sys/cam/ctl/ctl.c2
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c11
-rw-r--r--sys/compat/ia32/ia32_sysvec.c7
-rw-r--r--sys/dev/cxgbe/iw_cxgbe/mem.c3
-rw-r--r--sys/dev/hyperv/netvsc/hn_nvs.c11
-rw-r--r--sys/dev/hyperv/netvsc/hn_rndis.c17
-rw-r--r--sys/dev/hyperv/netvsc/if_hn.c7
-rw-r--r--sys/kern/imgact_elf.c26
-rw-r--r--sys/kern/subr_gtaskqueue.c2
-rw-r--r--sys/net/iflib.c17
-rw-r--r--sys/netpfil/ipfw/ip_fw2.c7
-rw-r--r--sys/netpfil/ipfw/nptv6/nptv6.c30
-rw-r--r--sys/sys/gtaskqueue.h1
-rw-r--r--sys/sys/sysent.h2
22 files changed, 108 insertions, 61 deletions
diff --git a/sys/boot/arm/uboot/Makefile b/sys/boot/arm/uboot/Makefile
index 4bf406864d6e..47d8cf0714e6 100644
--- a/sys/boot/arm/uboot/Makefile
+++ b/sys/boot/arm/uboot/Makefile
@@ -80,7 +80,8 @@ LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
.if ${MK_FORTH} != "no"
# Enable BootForth
BOOT_FORTH= yes
-CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/arm
+CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
+CFLAGS+= -I${.CURDIR}/../../ficl/arm
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
.endif
diff --git a/sys/boot/fdt/dts/arm/socfpga_arria10_socdk_sdmmc.dts b/sys/boot/fdt/dts/arm/socfpga_arria10_socdk_sdmmc.dts
index 853555844400..7659b7c8034c 100644
--- a/sys/boot/fdt/dts/arm/socfpga_arria10_socdk_sdmmc.dts
+++ b/sys/boot/fdt/dts/arm/socfpga_arria10_socdk_sdmmc.dts
@@ -80,3 +80,7 @@
reg = <0x28>;
};
};
+
+&usb0 {
+ dr_mode = "host";
+};
diff --git a/sys/boot/powerpc/kboot/Makefile b/sys/boot/powerpc/kboot/Makefile
index ca463982e3a6..6a1741b1db7c 100644
--- a/sys/boot/powerpc/kboot/Makefile
+++ b/sys/boot/powerpc/kboot/Makefile
@@ -64,7 +64,8 @@ LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
.if ${MK_FORTH} != "no"
# Enable BootForth
BOOT_FORTH= yes
-CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
+CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
+CFLAGS+= -I${.CURDIR}/../../ficl/powerpc
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
.endif
diff --git a/sys/boot/powerpc/ofw/Makefile b/sys/boot/powerpc/ofw/Makefile
index 5ce47cf6b80b..1d135f0a217b 100644
--- a/sys/boot/powerpc/ofw/Makefile
+++ b/sys/boot/powerpc/ofw/Makefile
@@ -63,7 +63,8 @@ LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
.if ${MK_FORTH} != "no"
# Enable BootForth
BOOT_FORTH= yes
-CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
+CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
+CFLAGS+= -I${.CURDIR}/../../ficl/powerpc
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
.endif
diff --git a/sys/boot/powerpc/ps3/Makefile b/sys/boot/powerpc/ps3/Makefile
index b2f2ef655cfb..b54cebe2bd06 100644
--- a/sys/boot/powerpc/ps3/Makefile
+++ b/sys/boot/powerpc/ps3/Makefile
@@ -64,7 +64,8 @@ LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
.if ${MK_FORTH} != "no"
# Enable BootForth
BOOT_FORTH= yes
-CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
+CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
+CFLAGS+= -I${.CURDIR}/../../ficl/powerpc
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
.endif
diff --git a/sys/boot/powerpc/uboot/Makefile b/sys/boot/powerpc/uboot/Makefile
index 6ff3acf63f4e..b18d8ebd6d68 100644
--- a/sys/boot/powerpc/uboot/Makefile
+++ b/sys/boot/powerpc/uboot/Makefile
@@ -69,7 +69,8 @@ LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a
.if ${MK_FORTH} != "no"
# Enable BootForth
BOOT_FORTH= yes
-CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
+CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
+CFLAGS+= -I${.CURDIR}/../../ficl/powerpc
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
.endif
diff --git a/sys/boot/userboot/userboot/Makefile b/sys/boot/userboot/userboot/Makefile
index 5528106d75e4..44376b8bad3b 100644
--- a/sys/boot/userboot/userboot/Makefile
+++ b/sys/boot/userboot/userboot/Makefile
@@ -43,7 +43,8 @@ NEWVERSWHAT= "User boot" ${MACHINE_CPUARCH}
.if ${MK_FORTH} != "no"
BOOT_FORTH= yes
-CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386
+CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl
+CFLAGS+= -I${.CURDIR}/../../ficl/i386
CFLAGS+= -DBF_DICTSIZE=15000
LIBFICL= ${.OBJDIR}/../ficl/libficl.a
.endif
diff --git a/sys/boot/zfs/zfsimpl.c b/sys/boot/zfs/zfsimpl.c
index 44e3bd343e3d..260479e257cb 100644
--- a/sys/boot/zfs/zfsimpl.c
+++ b/sys/boot/zfs/zfsimpl.c
@@ -2334,7 +2334,7 @@ zfs_lookup(const struct zfsmount *mount, const char *upath, dnode_phys_t *dnode)
char path[1024];
int symlinks_followed = 0;
struct stat sb;
- struct obj_list *entry;
+ struct obj_list *entry, *tentry;
STAILQ_HEAD(, obj_list) on_cache = STAILQ_HEAD_INITIALIZER(on_cache);
spa = mount->spa;
@@ -2482,7 +2482,7 @@ zfs_lookup(const struct zfsmount *mount, const char *upath, dnode_phys_t *dnode)
*dnode = dn;
done:
- STAILQ_FOREACH(entry, &on_cache, entry)
+ STAILQ_FOREACH_SAFE(entry, &on_cache, entry, tentry)
free(entry);
return (rc);
}
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
index becdd6fbddff..ac4a258303a6 100644
--- a/sys/cam/ctl/ctl.c
+++ b/sys/cam/ctl/ctl.c
@@ -9550,7 +9550,7 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len)
if (port && port->port_type == CTL_PORT_FC)
proto = SCSI_PROTO_FC << 4;
- else if (port->port_type == CTL_PORT_SAS)
+ else if (port && port->port_type == CTL_PORT_SAS)
proto = SCSI_PROTO_SAS << 4;
else if (port && port->port_type == CTL_PORT_ISCSI)
proto = SCSI_PROTO_ISCSI << 4;
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
index 51bfeb81f971..0d5bc865c4ef 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
@@ -278,7 +278,16 @@ zvol_size_changed(zvol_state_t *zv, uint64_t volsize)
if (pp == NULL)
return;
g_topology_lock();
- g_resize_provider(pp, zv->zv_volsize);
+
+ /*
+ * Do not invoke resize event when initial size was zero.
+ * ZVOL initializes the size on first open, this is not
+ * real resizing.
+ */
+ if (pp->mediasize == 0)
+ pp->mediasize = zv->zv_volsize;
+ else
+ g_resize_provider(pp, zv->zv_volsize);
g_topology_unlock();
}
#endif /* illumos */
diff --git a/sys/compat/ia32/ia32_sysvec.c b/sys/compat/ia32/ia32_sysvec.c
index 22d6b78f38fb..b6faf86def38 100644
--- a/sys/compat/ia32/ia32_sysvec.c
+++ b/sys/compat/ia32/ia32_sysvec.c
@@ -120,11 +120,8 @@ struct sysentvec ia32_freebsd_sysvec = {
.sv_setregs = ia32_setregs,
.sv_fixlimit = ia32_fixlimit,
.sv_maxssiz = &ia32_maxssiz,
- .sv_flags =
-#ifdef __amd64__
- SV_SHP | SV_TIMEKEEP |
-#endif
- SV_ABI_FREEBSD | SV_IA32 | SV_ILP32,
+ .sv_flags = SV_ABI_FREEBSD | SV_IA32 | SV_ILP32 |
+ SV_SHP | SV_TIMEKEEP,
.sv_set_syscall_retval = ia32_set_syscall_retval,
.sv_fetch_syscall_args = ia32_fetch_syscall_args,
.sv_syscallnames = freebsd32_syscallnames,
diff --git a/sys/dev/cxgbe/iw_cxgbe/mem.c b/sys/dev/cxgbe/iw_cxgbe/mem.c
index d6f1d812d83f..2b6c8e6017dc 100644
--- a/sys/dev/cxgbe/iw_cxgbe/mem.c
+++ b/sys/dev/cxgbe/iw_cxgbe/mem.c
@@ -341,9 +341,6 @@ static int build_phys_page_list(struct ib_phys_buf *buffer_list,
PAGE_SIZE - 1) & PAGE_MASK;
}
- if (*total_size > 0xFFFFFFFFULL)
- return -ENOMEM;
-
/* Find largest page shift we can use to cover buffers */
for (*shift = PAGE_SHIFT; *shift < 27; ++(*shift))
if ((1ULL << *shift) & mask)
diff --git a/sys/dev/hyperv/netvsc/hn_nvs.c b/sys/dev/hyperv/netvsc/hn_nvs.c
index de023ea7fc10..a44522414af6 100644
--- a/sys/dev/hyperv/netvsc/hn_nvs.c
+++ b/sys/dev/hyperv/netvsc/hn_nvs.c
@@ -272,12 +272,17 @@ hn_nvs_conn_chim(struct hn_softc *sc)
error = EIO;
goto cleanup;
}
- if (sectsz == 0) {
+ if (sectsz == 0 || sectsz % sizeof(uint32_t) != 0) {
/*
* Can't use chimney sending buffer; done!
*/
- if_printf(sc->hn_ifp, "zero chimney sending buffer "
- "section size\n");
+ if (sectsz == 0) {
+ if_printf(sc->hn_ifp, "zero chimney sending buffer "
+ "section size\n");
+ } else {
+ if_printf(sc->hn_ifp, "misaligned chimney sending "
+ "buffers, section size: %u\n", sectsz);
+ }
sc->hn_chim_szmax = 0;
sc->hn_chim_cnt = 0;
sc->hn_flags |= HN_FLAG_CHIM_CONNECTED;
diff --git a/sys/dev/hyperv/netvsc/hn_rndis.c b/sys/dev/hyperv/netvsc/hn_rndis.c
index 198cc27d5a15..596fa9a2aff9 100644
--- a/sys/dev/hyperv/netvsc/hn_rndis.c
+++ b/sys/dev/hyperv/netvsc/hn_rndis.c
@@ -841,9 +841,22 @@ hn_rndis_init(struct hn_softc *sc)
sc->hn_rndis_agg_pkts = comp->rm_pktmaxcnt;
sc->hn_rndis_agg_align = 1U << comp->rm_align;
+ if (sc->hn_rndis_agg_align < sizeof(uint32_t)) {
+ /*
+ * The RNDIS packet messsage encap assumes that the RNDIS
+ * packet message is at least 4 bytes aligned. Fix up the
+ * alignment here, if the remote side sets the alignment
+ * too low.
+ */
+ if_printf(sc->hn_ifp, "fixup RNDIS aggpkt align: %u -> %zu\n",
+ sc->hn_rndis_agg_align, sizeof(uint32_t));
+ sc->hn_rndis_agg_align = sizeof(uint32_t);
+ }
+
if (bootverbose) {
- if_printf(sc->hn_ifp, "RNDIS ver %u.%u, pktsz %u, pktcnt %u, "
- "align %u\n", comp->rm_ver_major, comp->rm_ver_minor,
+ if_printf(sc->hn_ifp, "RNDIS ver %u.%u, "
+ "aggpkt size %u, aggpkt cnt %u, aggpkt align %u\n",
+ comp->rm_ver_major, comp->rm_ver_minor,
sc->hn_rndis_agg_size, sc->hn_rndis_agg_pkts,
sc->hn_rndis_agg_align);
}
diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c
index 7b402d3ebbe7..0fdd29fe8bf6 100644
--- a/sys/dev/hyperv/netvsc/if_hn.c
+++ b/sys/dev/hyperv/netvsc/if_hn.c
@@ -1784,9 +1784,6 @@ hn_rndis_pktinfo_append(struct rndis_packet_msg *pkt, size_t pktsize,
pi->rm_type = pi_type;
pi->rm_pktinfooffset = RNDIS_PKTINFO_OFFSET;
- /* Update RNDIS packet msg length */
- pkt->rm_len += pi_size;
-
return (pi->rm_data);
}
@@ -1928,7 +1925,7 @@ hn_encap(struct ifnet *ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd,
}
pkt->rm_type = REMOTE_NDIS_PACKET_MSG;
- pkt->rm_len = sizeof(*pkt) + m_head->m_pkthdr.len;
+ pkt->rm_len = m_head->m_pkthdr.len;
pkt->rm_dataoffset = 0;
pkt->rm_datalen = m_head->m_pkthdr.len;
pkt->rm_oobdataoffset = 0;
@@ -1999,6 +1996,8 @@ hn_encap(struct ifnet *ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd,
}
pkt_hlen = pkt->rm_pktinfooffset + pkt->rm_pktinfolen;
+ /* Fixup RNDIS packet message total length */
+ pkt->rm_len += pkt_hlen;
/* Convert RNDIS packet message offsets */
pkt->rm_dataoffset = hn_rndis_pktmsg_offset(pkt_hlen);
pkt->rm_pktinfooffset = hn_rndis_pktmsg_offset(pkt->rm_pktinfooffset);
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 3b79df109f04..c01ab36cb5db 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -422,13 +422,14 @@ __elfN(map_partial)(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
}
static int
-__elfN(map_insert)(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
- vm_offset_t start, vm_offset_t end, vm_prot_t prot, int cow)
+__elfN(map_insert)(struct image_params *imgp, vm_map_t map, vm_object_t object,
+ vm_ooffset_t offset, vm_offset_t start, vm_offset_t end, vm_prot_t prot,
+ int cow)
{
struct sf_buf *sf;
vm_offset_t off;
vm_size_t sz;
- int error, rv;
+ int error, locked, rv;
if (start != trunc_page(start)) {
rv = __elfN(map_partial)(map, object, offset, start,
@@ -451,9 +452,10 @@ __elfN(map_insert)(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
* The mapping is not page aligned. This means we have
* to copy the data. Sigh.
*/
- rv = vm_map_find(map, NULL, 0, &start, end - start, 0,
- VMFS_NO_SPACE, prot | VM_PROT_WRITE, VM_PROT_ALL,
- 0);
+ vm_map_lock(map);
+ rv = vm_map_insert(map, NULL, 0, start, end,
+ prot | VM_PROT_WRITE, VM_PROT_ALL, 0);
+ vm_map_unlock(map);
if (rv != KERN_SUCCESS)
return (rv);
if (object == NULL)
@@ -480,8 +482,12 @@ __elfN(map_insert)(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
rv = vm_map_insert(map, object, offset, start, end,
prot, VM_PROT_ALL, cow);
vm_map_unlock(map);
- if (rv != KERN_SUCCESS)
+ if (rv != KERN_SUCCESS) {
+ locked = VOP_ISLOCKED(imgp->vp);
+ VOP_UNLOCK(imgp->vp, 0);
vm_object_deallocate(object);
+ vn_lock(imgp->vp, locked | LK_RETRY);
+ }
}
return (rv);
} else {
@@ -538,7 +544,7 @@ __elfN(load_section)(struct image_params *imgp, vm_offset_t offset,
cow = MAP_COPY_ON_WRITE | MAP_PREFAULT |
(prot & VM_PROT_WRITE ? 0 : MAP_DISABLE_COREDUMP);
- rv = __elfN(map_insert)(map,
+ rv = __elfN(map_insert)(imgp, map,
object,
file_addr, /* file offset */
map_addr, /* virtual start */
@@ -568,8 +574,8 @@ __elfN(load_section)(struct image_params *imgp, vm_offset_t offset,
/* This had damn well better be true! */
if (map_len != 0) {
- rv = __elfN(map_insert)(map, NULL, 0, map_addr, map_addr +
- map_len, VM_PROT_ALL, 0);
+ rv = __elfN(map_insert)(imgp, map, NULL, 0, map_addr,
+ map_addr + map_len, VM_PROT_ALL, 0);
if (rv != KERN_SUCCESS) {
return (EINVAL);
}
diff --git a/sys/kern/subr_gtaskqueue.c b/sys/kern/subr_gtaskqueue.c
index 418151869610..bb83412c549a 100644
--- a/sys/kern/subr_gtaskqueue.c
+++ b/sys/kern/subr_gtaskqueue.c
@@ -52,6 +52,8 @@ static MALLOC_DEFINE(M_GTASKQUEUE, "taskqueue", "Task Queues");
static void gtaskqueue_thread_enqueue(void *);
static void gtaskqueue_thread_loop(void *arg);
+TASKQGROUP_DEFINE(softirq, mp_ncpus, 1);
+
struct gtaskqueue_busy {
struct gtask *tb_running;
TAILQ_ENTRY(gtaskqueue_busy) tb_link;
diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index 34832c744e45..7c3fb3f3f7d3 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -480,7 +480,6 @@ MODULE_VERSION(iflib, 1);
MODULE_DEPEND(iflib, pci, 1, 1, 1);
MODULE_DEPEND(iflib, ether, 1, 1, 1);
-TASKQGROUP_DEFINE(if_io_tqg, mp_ncpus, 1);
TASKQGROUP_DEFINE(if_config_tqg, 1, 1);
#ifndef IFLIB_DEBUG_COUNTERS
@@ -3922,7 +3921,7 @@ iflib_device_deregister(if_ctx_t ctx)
if (ctx->ifc_led_dev != NULL)
led_destroy(ctx->ifc_led_dev);
/* XXX drain any dependent tasks */
- tqg = qgroup_if_io_tqg;
+ tqg = qgroup_softirq;
for (txq = ctx->ifc_txqs, i = 0; i < NTXQSETS(ctx); i++, txq++) {
callout_drain(&txq->ift_timer);
callout_drain(&txq->ift_db_check);
@@ -4552,7 +4551,7 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid,
q = &ctx->ifc_txqs[qid];
info = &ctx->ifc_txqs[qid].ift_filter_info;
gtask = &ctx->ifc_txqs[qid].ift_task;
- tqg = qgroup_if_io_tqg;
+ tqg = qgroup_softirq;
fn = _task_fn_tx;
GROUPTASK_INIT(gtask, 0, fn, q);
break;
@@ -4560,7 +4559,7 @@ iflib_irq_alloc_generic(if_ctx_t ctx, if_irq_t irq, int rid,
q = &ctx->ifc_rxqs[qid];
info = &ctx->ifc_rxqs[qid].ifr_filter_info;
gtask = &ctx->ifc_rxqs[qid].ifr_task;
- tqg = qgroup_if_io_tqg;
+ tqg = qgroup_softirq;
fn = _task_fn_rx;
GROUPTASK_INIT(gtask, 0, fn, q);
break;
@@ -4611,13 +4610,13 @@ iflib_softirq_alloc_generic(if_ctx_t ctx, int rid, iflib_intr_type_t type, void
case IFLIB_INTR_TX:
q = &ctx->ifc_txqs[qid];
gtask = &ctx->ifc_txqs[qid].ift_task;
- tqg = qgroup_if_io_tqg;
+ tqg = qgroup_softirq;
fn = _task_fn_tx;
break;
case IFLIB_INTR_RX:
q = &ctx->ifc_rxqs[qid];
gtask = &ctx->ifc_rxqs[qid].ifr_task;
- tqg = qgroup_if_io_tqg;
+ tqg = qgroup_softirq;
fn = _task_fn_rx;
break;
case IFLIB_INTR_IOV:
@@ -4661,7 +4660,7 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int *
q = &ctx->ifc_rxqs[0];
info = &rxq[0].ifr_filter_info;
gtask = &rxq[0].ifr_task;
- tqg = qgroup_if_io_tqg;
+ tqg = qgroup_softirq;
tqrid = irq->ii_rid = *rid;
fn = _task_fn_rx;
@@ -4678,7 +4677,7 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int *
taskqgroup_attach(tqg, gtask, q, tqrid, name);
GROUPTASK_INIT(&txq->ift_task, 0, _task_fn_tx, txq);
- taskqgroup_attach(qgroup_if_io_tqg, &txq->ift_task, txq, tqrid, "tx");
+ taskqgroup_attach(qgroup_softirq, &txq->ift_task, txq, tqrid, "tx");
return (0);
}
@@ -4728,7 +4727,7 @@ void
iflib_io_tqg_attach(struct grouptask *gt, void *uniq, int cpu, char *name)
{
- taskqgroup_attach_cpu(qgroup_if_io_tqg, gt, uniq, cpu, -1, name);
+ taskqgroup_attach_cpu(qgroup_softirq, gt, uniq, cpu, -1, name);
}
void
diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c
index ecdb2f896673..3df685c3c12b 100644
--- a/sys/netpfil/ipfw/ip_fw2.c
+++ b/sys/netpfil/ipfw/ip_fw2.c
@@ -2565,6 +2565,13 @@ do { \
l = 0; /* in any case exit inner loop */
retval = ipfw_run_eaction(chain, args,
cmd, &done);
+ /*
+ * If both @retval and @done are zero,
+ * consider this as rule matching and
+ * update counters.
+ */
+ if (retval == 0 && done == 0)
+ IPFW_INC_RULE_COUNTER(f, pktlen);
break;
default:
diff --git a/sys/netpfil/ipfw/nptv6/nptv6.c b/sys/netpfil/ipfw/nptv6/nptv6.c
index bedb18ba1ea0..da8697530061 100644
--- a/sys/netpfil/ipfw/nptv6/nptv6.c
+++ b/sys/netpfil/ipfw/nptv6/nptv6.c
@@ -352,24 +352,24 @@ ipfw_nptv6(struct ip_fw_chain *chain, struct ip_fw_args *args,
int ret;
*done = 0; /* try next rule if not matched */
+ ret = IP_FW_DENY;
icmd = cmd + 1;
if (cmd->opcode != O_EXTERNAL_ACTION ||
cmd->arg1 != V_nptv6_eid ||
icmd->opcode != O_EXTERNAL_INSTANCE ||
(cfg = NPTV6_LOOKUP(chain, icmd)) == NULL)
- return (0);
+ return (ret);
/*
* We need act as router, so when forwarding is disabled -
* do nothing.
*/
if (V_ip6_forwarding == 0 || args->f_id.addr_type != 6)
- return (0);
+ return (ret);
/*
* NOTE: we expect ipfw_chk() did m_pullup() up to upper level
* protocol's headers. Also we skip some checks, that ip6_input(),
* ip6_forward(), ip6_fastfwd() and ipfw_chk() already did.
*/
- ret = IP_FW_DENY;
ip6 = mtod(args->m, struct ip6_hdr *);
NPTV6_IPDEBUG("eid %u, oid %u, %s -> %s %d",
cmd->arg1, icmd->arg1,
@@ -384,15 +384,15 @@ ipfw_nptv6(struct ip_fw_chain *chain, struct ip_fw_args *args,
*/
if (IN6_ARE_MASKED_ADDR_EQUAL(&ip6->ip6_dst,
&cfg->internal, &cfg->mask))
- return (0);
+ return (ret);
ret = nptv6_rewrite_internal(cfg, &args->m, 0);
} else if (IN6_ARE_MASKED_ADDR_EQUAL(&ip6->ip6_dst,
&cfg->external, &cfg->mask))
ret = nptv6_rewrite_external(cfg, &args->m, 0);
else
- return (0);
+ return (ret);
/*
- * If address wasn't rewrited - free mbuf.
+ * If address wasn't rewrited - free mbuf and terminate the search.
*/
if (ret != 0) {
if (args->m != NULL) {
@@ -400,14 +400,16 @@ ipfw_nptv6(struct ip_fw_chain *chain, struct ip_fw_args *args,
args->m = NULL; /* mark mbuf as consumed */
}
NPTV6STAT_INC(cfg, dropped);
- }
- /* Terminate the search if one_pass is set */
- *done = V_fw_one_pass;
- /* Update args->f_id when one_pass is off */
- if (*done == 0 && ret == 0) {
- ip6 = mtod(args->m, struct ip6_hdr *);
- args->f_id.src_ip6 = ip6->ip6_src;
- args->f_id.dst_ip6 = ip6->ip6_dst;
+ *done = 1;
+ } else {
+ /* Terminate the search if one_pass is set */
+ *done = V_fw_one_pass;
+ /* Update args->f_id when one_pass is off */
+ if (*done == 0) {
+ ip6 = mtod(args->m, struct ip6_hdr *);
+ args->f_id.src_ip6 = ip6->ip6_src;
+ args->f_id.dst_ip6 = ip6->ip6_dst;
+ }
}
return (ret);
}
diff --git a/sys/sys/gtaskqueue.h b/sys/sys/gtaskqueue.h
index 8c35cb3827a9..c9b34e4f0edd 100644
--- a/sys/sys/gtaskqueue.h
+++ b/sys/sys/gtaskqueue.h
@@ -119,5 +119,6 @@ SYSINIT(taskqgroup_adj_##name, SI_SUB_SMP, SI_ORDER_ANY, \
#endif /* EARLY_AP_STARTUP */
TASKQGROUP_DECLARE(net);
+TASKQGROUP_DECLARE(softirq);
#endif /* !_SYS_GTASKQUEUE_H_ */
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
index 09da1afe9557..643717603fdd 100644
--- a/sys/sys/sysent.h
+++ b/sys/sys/sysent.h
@@ -138,7 +138,7 @@ struct sysentvec {
#define SV_AOUT 0x008000 /* a.out executable. */
#define SV_SHP 0x010000 /* Shared page. */
#define SV_CAPSICUM 0x020000 /* Force cap_enter() on startup. */
-#define SV_TIMEKEEP 0x040000
+#define SV_TIMEKEEP 0x040000 /* Shared page timehands. */
#define SV_ABI_MASK 0xff
#define SV_ABI_ERRNO(p, e) ((p)->p_sysent->sv_errsize <= 0 ? e : \