mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Merge ^/head r314482 through r314522.
This commit is contained in:
commit
ca6e5d9882
24 changed files with 130 additions and 82 deletions
40
README.md
40
README.md
|
|
@ -1,35 +1,35 @@
|
|||
FreeBSD Source:
|
||||
---------------
|
||||
This is the top level of the FreeBSD source directory. This file
|
||||
was last revised on:
|
||||
This is the top level of the FreeBSD source directory. This file
|
||||
was last revised on:
|
||||
$FreeBSD$
|
||||
|
||||
For copyright information, please see the file COPYRIGHT in this
|
||||
directory (additional copyright information also exists for some
|
||||
sources in this tree - please see the specific source directories for
|
||||
For copyright information, please see the file COPYRIGHT in this
|
||||
directory (additional copyright information also exists for some
|
||||
sources in this tree - please see the specific source directories for
|
||||
more information).
|
||||
|
||||
The Makefile in this directory supports a number of targets for
|
||||
building components (or all) of the FreeBSD source tree. See build(7)
|
||||
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
|
||||
for more information, including setting make(1) variables.
|
||||
The Makefile in this directory supports a number of targets for
|
||||
building components (or all) of the FreeBSD source tree. See build(7)
|
||||
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
|
||||
for more information, including setting make(1) variables.
|
||||
|
||||
The `buildkernel` and `installkernel` targets build and install
|
||||
the kernel and the modules (see below). Please see the top of
|
||||
the Makefile in this directory for more information on the
|
||||
The `buildkernel` and `installkernel` targets build and install
|
||||
the kernel and the modules (see below). Please see the top of
|
||||
the Makefile in this directory for more information on the
|
||||
standard build targets and compile-time flags.
|
||||
|
||||
Building a kernel is a somewhat more involved process. See build(7), config(8),
|
||||
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
|
||||
Building a kernel is a somewhat more involved process. See build(7), config(8),
|
||||
and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
|
||||
for more information.
|
||||
|
||||
Note: If you want to build and install the kernel with the
|
||||
`buildkernel` and `installkernel` targets, you might need to build
|
||||
Note: If you want to build and install the kernel with the
|
||||
`buildkernel` and `installkernel` targets, you might need to build
|
||||
world before. More information is available in the handbook.
|
||||
|
||||
The kernel configuration files reside in the `sys/<arch>/conf`
|
||||
sub-directory. GENERIC is the default configuration used in release builds.
|
||||
NOTES contains entries and documentation for all possible
|
||||
The kernel configuration files reside in the `sys/<arch>/conf`
|
||||
sub-directory. GENERIC is the default configuration used in release builds.
|
||||
NOTES contains entries and documentation for all possible
|
||||
devices, not just those commonly used.
|
||||
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ usr.bin User commands.
|
|||
usr.sbin System administration commands.
|
||||
```
|
||||
|
||||
For information on synchronizing your source tree with one or more of
|
||||
For information on synchronizing your source tree with one or more of
|
||||
the FreeBSD Project's development branches, please see:
|
||||
|
||||
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <libgen.h>
|
||||
#include <paths.h>
|
||||
#include <pwd.h>
|
||||
#include <signal.h>
|
||||
|
|
@ -457,7 +458,7 @@ main(int argc, char **argv)
|
|||
bzero(&queue, sizeof(queue));
|
||||
LIST_INIT(&queue.queue);
|
||||
|
||||
if (strcmp(argv[0], "mailq") == 0) {
|
||||
if (strcmp(basename(argv[0]), "mailq") == 0) {
|
||||
argv++; argc--;
|
||||
showq = 1;
|
||||
if (argc != 0)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -80,3 +80,7 @@
|
|||
reg = <0x28>;
|
||||
};
|
||||
};
|
||||
|
||||
&usb0 {
|
||||
dr_mode = "host";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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_ */
|
||||
|
|
|
|||
|
|
@ -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 : \
|
||||
|
|
|
|||
Loading…
Reference in a new issue