Merge ^/head r321239 through r321306.
This commit is contained in:
parent
c098686ee9
commit
5baf59fe4b
@ -85,7 +85,7 @@ main(int argc, char *argv[])
|
||||
int set_timezone;
|
||||
struct vary *v;
|
||||
const struct vary *badv;
|
||||
struct tm lt;
|
||||
struct tm *lt;
|
||||
struct stat sb;
|
||||
|
||||
v = NULL;
|
||||
@ -174,8 +174,10 @@ main(int argc, char *argv[])
|
||||
if (*argv && **argv == '+')
|
||||
format = *argv + 1;
|
||||
|
||||
lt = *localtime(&tval);
|
||||
badv = vary_apply(v, <);
|
||||
lt = localtime(&tval);
|
||||
if (lt == NULL)
|
||||
errx(1, "invalid time");
|
||||
badv = vary_apply(v, lt);
|
||||
if (badv) {
|
||||
fprintf(stderr, "%s: Cannot apply date adjustment\n",
|
||||
badv->arg);
|
||||
@ -191,7 +193,7 @@ main(int argc, char *argv[])
|
||||
*/
|
||||
setlocale(LC_TIME, "C");
|
||||
|
||||
(void)strftime(buf, sizeof(buf), format, <);
|
||||
(void)strftime(buf, sizeof(buf), format, lt);
|
||||
(void)printf("%s\n", buf);
|
||||
if (fflush(stdout))
|
||||
err(1, "stdout");
|
||||
@ -210,6 +212,8 @@ setthetime(const char *fmt, const char *p, int jflag, int nflag)
|
||||
int century;
|
||||
|
||||
lt = localtime(&tval);
|
||||
if (lt == NULL)
|
||||
errx(1, "invalid time");
|
||||
lt->tm_isdst = -1; /* divine correct DST */
|
||||
|
||||
if (fmt != NULL) {
|
||||
|
@ -469,21 +469,13 @@ FBSDprivate_1.0 {
|
||||
__sys_acct;
|
||||
_adjtime;
|
||||
__sys_adjtime;
|
||||
_aio_cancel;
|
||||
__sys_aio_cancel;
|
||||
_aio_error;
|
||||
__sys_aio_error;
|
||||
_aio_fsync;
|
||||
__sys_aio_fsync;
|
||||
_aio_read;
|
||||
__sys_aio_read;
|
||||
_aio_return;
|
||||
__sys_aio_return;
|
||||
_aio_suspend;
|
||||
__sys_aio_suspend;
|
||||
_aio_waitcomplete;
|
||||
__sys_aio_waitcomplete;
|
||||
_aio_write;
|
||||
__sys_aio_write;
|
||||
_audit;
|
||||
__sys_audit;
|
||||
@ -727,7 +719,6 @@ FBSDprivate_1.0 {
|
||||
__sys_lgetfh;
|
||||
_link;
|
||||
__sys_link;
|
||||
_lio_listio;
|
||||
__sys_lio_listio;
|
||||
_listen;
|
||||
__sys_listen;
|
||||
|
@ -31,16 +31,6 @@ FBSD_1.5 {
|
||||
};
|
||||
|
||||
FBSDprivate_1.0 {
|
||||
_aio_read;
|
||||
_aio_write;
|
||||
_aio_return;
|
||||
_aio_waitcomplete;
|
||||
_aio_fsync;
|
||||
__aio_read;
|
||||
__aio_write;
|
||||
__aio_return;
|
||||
__aio_waitcomplete;
|
||||
__aio_fsync;
|
||||
_mq_open;
|
||||
_mq_close;
|
||||
_mq_notify;
|
||||
|
@ -39,15 +39,10 @@
|
||||
#include "sigev_thread.h"
|
||||
#include "un-namespace.h"
|
||||
|
||||
__weak_reference(__aio_read, _aio_read);
|
||||
__weak_reference(__aio_read, aio_read);
|
||||
__weak_reference(__aio_write, _aio_write);
|
||||
__weak_reference(__aio_write, aio_write);
|
||||
__weak_reference(__aio_return, _aio_return);
|
||||
__weak_reference(__aio_return, aio_return);
|
||||
__weak_reference(__aio_waitcomplete, _aio_waitcomplete);
|
||||
__weak_reference(__aio_waitcomplete, aio_waitcomplete);
|
||||
__weak_reference(__aio_fsync, _aio_fsync);
|
||||
__weak_reference(__aio_fsync, aio_fsync);
|
||||
|
||||
typedef void (*aio_func)(union sigval val, struct aiocb *iocb);
|
||||
|
@ -244,6 +244,7 @@ melifaro [label="Alexander V. Chernikov\nmelifaro@FreeBSD.org\n2011/10/04"]
|
||||
mizhka [label="Michael Zhilin\nmizhka@FreeBSD.org\n2016/07/19"]
|
||||
mjacob [label="Matt Jacob\nmjacob@FreeBSD.org\n1997/08/13"]
|
||||
mjg [label="Mateusz Guzik\nmjg@FreeBSD.org\n2012/06/04"]
|
||||
mjoras [label="Matt Joras\nmjoras@FreeBSD.org\n2017/07/12"]
|
||||
mlaier [label="Max Laier\nmlaier@FreeBSD.org\n2004/02/10"]
|
||||
mmel [label="Michal Meloun\nmmel@FreeBSD.org\n2015/11/01"]
|
||||
monthadar [label="Monthadar Al Jaberi\nmonthadar@FreeBSD.org\n2012/04/02"]
|
||||
@ -720,6 +721,7 @@ rrs -> jchandra
|
||||
rrs -> tuexen
|
||||
|
||||
rstone -> markj
|
||||
rstone -> mjoras
|
||||
|
||||
ru -> ceri
|
||||
ru -> cjc
|
||||
|
@ -36,8 +36,14 @@
|
||||
* XXX: from gcc 6.2 manual:
|
||||
* Note, the ms_abi attribute for Microsoft Windows 64-bit targets
|
||||
* currently requires the -maccumulate-outgoing-args option.
|
||||
*
|
||||
* Avoid EFIABI_ATTR declarations for compilers that don't support it.
|
||||
* GCC support began in version 4.4.
|
||||
*/
|
||||
#if defined(__clang__) || defined(__GNUC__) && \
|
||||
(__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4)
|
||||
#define EFIABI_ATTR __attribute__((ms_abi))
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL
|
||||
struct uuid;
|
||||
|
@ -182,8 +182,8 @@ load(const char *filepath, dev_info_t *devinfo, void **bufp, size_t *bufsize)
|
||||
|
||||
if ((status = bs->AllocatePool(EfiLoaderData, (UINTN)st.st_size, &buf))
|
||||
!= EFI_SUCCESS) {
|
||||
printf("Failed to allocate load buffer %zd for pool '%s' for '%s' "
|
||||
"(%lu)\n", st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status));
|
||||
printf("Failed to allocate load buffer %jd for pool '%s' for '%s' "
|
||||
"(%lu)\n", (intmax_t)st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status));
|
||||
return (EFI_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
|
@ -216,6 +216,7 @@ MKMODULESENV+= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR}
|
||||
MKMODULESENV+= MACHINE_CPUARCH=${MACHINE_CPUARCH}
|
||||
MKMODULESENV+= MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH}
|
||||
MKMODULESENV+= MODULES_EXTRA="${MODULES_EXTRA}" WITHOUT_MODULES="${WITHOUT_MODULES}"
|
||||
MKMODULESENV+= ARCH_FLAGS="${ARCH_FLAGS}"
|
||||
.if (${KERN_IDENT} == LINT)
|
||||
MKMODULESENV+= ALL_MODULES=LINT
|
||||
.endif
|
||||
@ -250,6 +251,7 @@ EMBEDFS_ARCH.${MACHINE_ARCH}!= sed -n '/OUTPUT_ARCH/s/.*(\(.*\)).*/\1/p' ${LDSCR
|
||||
|
||||
EMBEDFS_FORMAT.arm?= elf32-littlearm
|
||||
EMBEDFS_FORMAT.armv6?= elf32-littlearm
|
||||
EMBEDFS_FORMAT.aarch64?= elf64-littleaarch64
|
||||
EMBEDFS_FORMAT.mips?= elf32-tradbigmips
|
||||
EMBEDFS_FORMAT.mipsel?= elf32-tradlittlemips
|
||||
EMBEDFS_FORMAT.mips64?= elf64-tradbigmips
|
||||
|
@ -366,7 +366,7 @@ ${_src}:
|
||||
.endif
|
||||
|
||||
# Respect configuration-specific C flags.
|
||||
CFLAGS+= ${CONF_CFLAGS}
|
||||
CFLAGS+= ${ARCH_FLAGS} ${CONF_CFLAGS}
|
||||
|
||||
.if !empty(SRCS:Mvnode_if.c)
|
||||
CLEANFILES+= vnode_if.c
|
||||
|
@ -203,7 +203,7 @@ static pci_vendor_info_t igb_vendor_info_array[] =
|
||||
PVID(0x8086, E1000_DEV_ID_I210_COPPER_OEM1, "Intel(R) PRO/1000 PCI-Express Network Driver"),
|
||||
PVID(0x8086, E1000_DEV_ID_I210_COPPER_FLASHLESS, "Intel(R) PRO/1000 PCI-Express Network Driver"),
|
||||
PVID(0x8086, E1000_DEV_ID_I210_SERDES_FLASHLESS, "Intel(R) PRO/1000 PCI-Express Network Driver"),
|
||||
PVID(0x8086, E1000_DEV_ID_I210_FIBER, "Intel(R) PRO/1000 PCI-Express Network Driver"),
|
||||
PVID(0x8086, E1000_DEV_ID_I210_FIBER, "Intel(R) PRO/1000 PCI-Express Network Driver"),
|
||||
PVID(0x8086, E1000_DEV_ID_I210_SERDES, "Intel(R) PRO/1000 PCI-Express Network Driver"),
|
||||
PVID(0x8086, E1000_DEV_ID_I210_SGMII, "Intel(R) PRO/1000 PCI-Express Network Driver"),
|
||||
PVID(0x8086, E1000_DEV_ID_I211_COPPER, "Intel(R) PRO/1000 PCI-Express Network Driver"),
|
||||
@ -231,8 +231,8 @@ static int em_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs
|
||||
static void em_if_queues_free(if_ctx_t ctx);
|
||||
|
||||
static uint64_t em_if_get_counter(if_ctx_t, ift_counter);
|
||||
static void em_if_init(if_ctx_t ctx);
|
||||
static void em_if_stop(if_ctx_t ctx);
|
||||
static void em_if_init(if_ctx_t ctx);
|
||||
static void em_if_stop(if_ctx_t ctx);
|
||||
static void em_if_media_status(if_ctx_t, struct ifmediareq *);
|
||||
static int em_if_media_change(if_ctx_t ctx);
|
||||
static int em_if_mtu_set(if_ctx_t ctx, uint32_t mtu);
|
||||
@ -357,11 +357,11 @@ static device_method_t em_if_methods[] = {
|
||||
DEVMETHOD(ifdi_detach, em_if_detach),
|
||||
DEVMETHOD(ifdi_shutdown, em_if_shutdown),
|
||||
DEVMETHOD(ifdi_suspend, em_if_suspend),
|
||||
DEVMETHOD(ifdi_resume, em_if_resume),
|
||||
DEVMETHOD(ifdi_resume, em_if_resume),
|
||||
DEVMETHOD(ifdi_init, em_if_init),
|
||||
DEVMETHOD(ifdi_stop, em_if_stop),
|
||||
DEVMETHOD(ifdi_msix_intr_assign, em_if_msix_intr_assign),
|
||||
DEVMETHOD(ifdi_intr_enable, em_if_enable_intr),
|
||||
DEVMETHOD(ifdi_intr_enable, em_if_enable_intr),
|
||||
DEVMETHOD(ifdi_intr_disable, em_if_disable_intr),
|
||||
DEVMETHOD(ifdi_tx_queues_alloc, em_if_tx_queues_alloc),
|
||||
DEVMETHOD(ifdi_rx_queues_alloc, em_if_rx_queues_alloc),
|
||||
@ -1025,7 +1025,7 @@ em_if_attach_post(if_ctx_t ctx)
|
||||
/* Non-AMT based hardware can now take control from firmware */
|
||||
if (adapter->has_manage && !adapter->has_amt)
|
||||
em_get_hw_control(adapter);
|
||||
|
||||
|
||||
INIT_DEBUGOUT("em_if_attach_post: end");
|
||||
|
||||
return (error);
|
||||
@ -1401,7 +1401,7 @@ em_msix_link(void *arg)
|
||||
u32 reg_icr;
|
||||
|
||||
++adapter->link_irq;
|
||||
MPASS(adapter->hw.back != NULL);
|
||||
MPASS(adapter->hw.back != NULL);
|
||||
reg_icr = E1000_READ_REG(&adapter->hw, E1000_ICR);
|
||||
|
||||
if (reg_icr & E1000_ICR_RXO)
|
||||
@ -1691,8 +1691,9 @@ em_if_update_admin_status(if_ctx_t ctx)
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
struct ifnet *ifp = iflib_get_ifp(ctx);
|
||||
device_t dev = iflib_get_dev(ctx);
|
||||
u32 link_check = 0;
|
||||
u32 link_check, thstat, ctrl;
|
||||
|
||||
link_check = thstat = ctrl = 0;
|
||||
/* Get the cached link value or read phy for real */
|
||||
switch (hw->phy.media_type) {
|
||||
case e1000_media_type_copper:
|
||||
@ -1717,11 +1718,21 @@ em_if_update_admin_status(if_ctx_t ctx)
|
||||
e1000_check_for_link(hw);
|
||||
link_check = adapter->hw.mac.serdes_has_link;
|
||||
break;
|
||||
default:
|
||||
/* VF device is type_unknown */
|
||||
case e1000_media_type_unknown:
|
||||
e1000_check_for_link(hw);
|
||||
link_check = !hw->mac.get_link_status;
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check for thermal downshift or shutdown */
|
||||
if (hw->mac.type == e1000_i350) {
|
||||
thstat = E1000_READ_REG(hw, E1000_THSTAT);
|
||||
ctrl = E1000_READ_REG(hw, E1000_CTRL_EXT);
|
||||
}
|
||||
|
||||
/* Now check for a transition */
|
||||
if (link_check && (adapter->link_active == 0)) {
|
||||
e1000_get_speed_and_duplex(hw, &adapter->link_speed,
|
||||
@ -1743,6 +1754,21 @@ em_if_update_admin_status(if_ctx_t ctx)
|
||||
adapter->link_active = 1;
|
||||
adapter->smartspeed = 0;
|
||||
if_setbaudrate(ifp, adapter->link_speed * 1000000);
|
||||
if ((ctrl & E1000_CTRL_EXT_LINK_MODE_GMII) &&
|
||||
(thstat & E1000_THSTAT_LINK_THROTTLE))
|
||||
device_printf(dev, "Link: thermal downshift\n");
|
||||
/* Delay Link Up for Phy update */
|
||||
if (((hw->mac.type == e1000_i210) ||
|
||||
(hw->mac.type == e1000_i211)) &&
|
||||
(hw->phy.id == I210_I_PHY_ID))
|
||||
msec_delay(I210_LINK_DELAY);
|
||||
/* Reset if the media type changed. */
|
||||
if ((hw->dev_spec._82575.media_changed) &&
|
||||
(adapter->hw.mac.type >= igb_mac_min)) {
|
||||
hw->dev_spec._82575.media_changed = false;
|
||||
adapter->flags |= IGB_MEDIA_RESET;
|
||||
em_reset(ctx);
|
||||
}
|
||||
iflib_link_state_change(ctx, LINK_STATE_UP, ifp->if_baudrate);
|
||||
printf("Link state changed to up\n");
|
||||
} else if (!link_check && (adapter->link_active == 1)) {
|
||||
@ -2210,6 +2236,114 @@ lem_smartspeed(struct adapter *adapter)
|
||||
adapter->smartspeed = 0;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* Initialize the DMA Coalescing feature
|
||||
*
|
||||
**********************************************************************/
|
||||
static void
|
||||
igb_init_dmac(struct adapter *adapter, u32 pba)
|
||||
{
|
||||
device_t dev = adapter->dev;
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
u32 dmac, reg = ~E1000_DMACR_DMAC_EN;
|
||||
u16 hwm;
|
||||
u16 max_frame_size;
|
||||
|
||||
if (hw->mac.type == e1000_i211)
|
||||
return;
|
||||
|
||||
max_frame_size = adapter->shared->isc_max_frame_size;
|
||||
if (hw->mac.type > e1000_82580) {
|
||||
|
||||
if (adapter->dmac == 0) { /* Disabling it */
|
||||
E1000_WRITE_REG(hw, E1000_DMACR, reg);
|
||||
return;
|
||||
} else
|
||||
device_printf(dev, "DMA Coalescing enabled\n");
|
||||
|
||||
/* Set starting threshold */
|
||||
E1000_WRITE_REG(hw, E1000_DMCTXTH, 0);
|
||||
|
||||
hwm = 64 * pba - max_frame_size / 16;
|
||||
if (hwm < 64 * (pba - 6))
|
||||
hwm = 64 * (pba - 6);
|
||||
reg = E1000_READ_REG(hw, E1000_FCRTC);
|
||||
reg &= ~E1000_FCRTC_RTH_COAL_MASK;
|
||||
reg |= ((hwm << E1000_FCRTC_RTH_COAL_SHIFT)
|
||||
& E1000_FCRTC_RTH_COAL_MASK);
|
||||
E1000_WRITE_REG(hw, E1000_FCRTC, reg);
|
||||
|
||||
|
||||
dmac = pba - max_frame_size / 512;
|
||||
if (dmac < pba - 10)
|
||||
dmac = pba - 10;
|
||||
reg = E1000_READ_REG(hw, E1000_DMACR);
|
||||
reg &= ~E1000_DMACR_DMACTHR_MASK;
|
||||
reg = ((dmac << E1000_DMACR_DMACTHR_SHIFT)
|
||||
& E1000_DMACR_DMACTHR_MASK);
|
||||
|
||||
/* transition to L0x or L1 if available..*/
|
||||
reg |= (E1000_DMACR_DMAC_EN | E1000_DMACR_DMAC_LX_MASK);
|
||||
|
||||
/* Check if status is 2.5Gb backplane connection
|
||||
* before configuration of watchdog timer, which is
|
||||
* in msec values in 12.8usec intervals
|
||||
* watchdog timer= msec values in 32usec intervals
|
||||
* for non 2.5Gb connection
|
||||
*/
|
||||
if (hw->mac.type == e1000_i354) {
|
||||
int status = E1000_READ_REG(hw, E1000_STATUS);
|
||||
if ((status & E1000_STATUS_2P5_SKU) &&
|
||||
(!(status & E1000_STATUS_2P5_SKU_OVER)))
|
||||
reg |= ((adapter->dmac * 5) >> 6);
|
||||
else
|
||||
reg |= (adapter->dmac >> 5);
|
||||
} else {
|
||||
reg |= (adapter->dmac >> 5);
|
||||
}
|
||||
|
||||
E1000_WRITE_REG(hw, E1000_DMACR, reg);
|
||||
|
||||
E1000_WRITE_REG(hw, E1000_DMCRTRH, 0);
|
||||
|
||||
/* Set the interval before transition */
|
||||
reg = E1000_READ_REG(hw, E1000_DMCTLX);
|
||||
if (hw->mac.type == e1000_i350)
|
||||
reg |= IGB_DMCTLX_DCFLUSH_DIS;
|
||||
/*
|
||||
** in 2.5Gb connection, TTLX unit is 0.4 usec
|
||||
** which is 0x4*2 = 0xA. But delay is still 4 usec
|
||||
*/
|
||||
if (hw->mac.type == e1000_i354) {
|
||||
int status = E1000_READ_REG(hw, E1000_STATUS);
|
||||
if ((status & E1000_STATUS_2P5_SKU) &&
|
||||
(!(status & E1000_STATUS_2P5_SKU_OVER)))
|
||||
reg |= 0xA;
|
||||
else
|
||||
reg |= 0x4;
|
||||
} else {
|
||||
reg |= 0x4;
|
||||
}
|
||||
|
||||
E1000_WRITE_REG(hw, E1000_DMCTLX, reg);
|
||||
|
||||
/* free space in tx packet buffer to wake from DMA coal */
|
||||
E1000_WRITE_REG(hw, E1000_DMCTXTH, (IGB_TXPBSIZE -
|
||||
(2 * max_frame_size)) >> 6);
|
||||
|
||||
/* make low power state decision controlled by DMA coal */
|
||||
reg = E1000_READ_REG(hw, E1000_PCIEMISC);
|
||||
reg &= ~E1000_PCIEMISC_LX_DECISION;
|
||||
E1000_WRITE_REG(hw, E1000_PCIEMISC, reg);
|
||||
|
||||
} else if (hw->mac.type == e1000_82580) {
|
||||
u32 reg = E1000_READ_REG(hw, E1000_PCIEMISC);
|
||||
E1000_WRITE_REG(hw, E1000_PCIEMISC,
|
||||
reg & ~E1000_PCIEMISC_LX_DECISION);
|
||||
E1000_WRITE_REG(hw, E1000_DMACR, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
em_reset(if_ctx_t ctx)
|
||||
@ -2222,6 +2356,8 @@ em_reset(if_ctx_t ctx)
|
||||
u32 pba;
|
||||
|
||||
INIT_DEBUGOUT("em_reset: begin");
|
||||
/* Let the firmware know the OS is in control */
|
||||
em_get_hw_control(adapter);
|
||||
|
||||
/* Set up smart power down as default off on newer adapters. */
|
||||
if (!em_smart_pwr_down && (hw->mac.type == e1000_82571 ||
|
||||
@ -2400,15 +2536,15 @@ em_reset(if_ctx_t ctx)
|
||||
case e1000_vfadapt_i350:
|
||||
/* 16-byte granularity */
|
||||
hw->fc.low_water = hw->fc.high_water - 16;
|
||||
break;
|
||||
case e1000_ich9lan:
|
||||
case e1000_ich10lan:
|
||||
break;
|
||||
case e1000_ich9lan:
|
||||
case e1000_ich10lan:
|
||||
if (if_getmtu(ifp) > ETHERMTU) {
|
||||
hw->fc.high_water = 0x2800;
|
||||
hw->fc.low_water = hw->fc.high_water - 8;
|
||||
break;
|
||||
}
|
||||
/* else fall thru */
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
if (hw->mac.type == e1000_80003es2lan)
|
||||
hw->fc.pause_time = 0xFFFF;
|
||||
@ -2417,13 +2553,24 @@ em_reset(if_ctx_t ctx)
|
||||
|
||||
/* Issue a global reset */
|
||||
e1000_reset_hw(hw);
|
||||
E1000_WRITE_REG(hw, E1000_WUFC, 0);
|
||||
em_disable_aspm(adapter);
|
||||
if (adapter->hw.mac.type >= igb_mac_min) {
|
||||
E1000_WRITE_REG(hw, E1000_WUC, 0);
|
||||
} else {
|
||||
E1000_WRITE_REG(hw, E1000_WUFC, 0);
|
||||
em_disable_aspm(adapter);
|
||||
}
|
||||
if (adapter->flags & IGB_MEDIA_RESET) {
|
||||
e1000_setup_init_funcs(hw, TRUE);
|
||||
e1000_get_bus_info(hw);
|
||||
adapter->flags &= ~IGB_MEDIA_RESET;
|
||||
}
|
||||
/* and a re-init */
|
||||
if (e1000_init_hw(hw) < 0) {
|
||||
device_printf(dev, "Hardware Initialization Failed\n");
|
||||
return;
|
||||
}
|
||||
if (adapter->hw.mac.type >= igb_mac_min)
|
||||
igb_init_dmac(adapter, pba);
|
||||
|
||||
E1000_WRITE_REG(hw, E1000_VET, ETHERTYPE_VLAN);
|
||||
e1000_get_phy_info(hw);
|
||||
@ -2464,7 +2611,7 @@ em_initialize_rss_mapping(struct adapter *adapter)
|
||||
for (i = 0; i < 32; ++i)
|
||||
E1000_WRITE_REG(hw, E1000_RETA(i), reta);
|
||||
|
||||
E1000_WRITE_REG(hw, E1000_MRQC, E1000_MRQC_RSS_ENABLE_2Q |
|
||||
E1000_WRITE_REG(hw, E1000_MRQC, E1000_MRQC_RSS_ENABLE_2Q |
|
||||
E1000_MRQC_RSS_FIELD_IPV4_TCP |
|
||||
E1000_MRQC_RSS_FIELD_IPV4 |
|
||||
E1000_MRQC_RSS_FIELD_IPV6_TCP_EX |
|
||||
@ -2551,8 +2698,7 @@ igb_initialize_rss_mapping(struct adapter *adapter)
|
||||
arc4rand(&rss_key, sizeof(rss_key), 0);
|
||||
#endif
|
||||
for (i = 0; i < 10; i++)
|
||||
E1000_WRITE_REG_ARRAY(hw,
|
||||
E1000_RSSRK(0), i, rss_key[i]);
|
||||
E1000_WRITE_REG_ARRAY(hw, E1000_RSSRK(0), i, rss_key[i]);
|
||||
|
||||
/*
|
||||
* Configure the RSS fields to hash upon.
|
||||
@ -2619,7 +2765,7 @@ em_setup_interface(if_ctx_t ctx)
|
||||
/* Enable only WOL MAGIC by default */
|
||||
if (adapter->wol) {
|
||||
if_setcapenablebit(ifp, IFCAP_WOL_MAGIC,
|
||||
IFCAP_WOL_MCAST| IFCAP_WOL_UCAST);
|
||||
IFCAP_WOL_MCAST| IFCAP_WOL_UCAST);
|
||||
} else {
|
||||
if_setcapenablebit(ifp, 0, IFCAP_WOL_MAGIC |
|
||||
IFCAP_WOL_MCAST| IFCAP_WOL_UCAST);
|
||||
@ -2691,7 +2837,7 @@ em_if_tx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int ntxqs
|
||||
txr->tx_base = (struct e1000_tx_desc *)vaddrs[i*ntxqs];
|
||||
txr->tx_paddr = paddrs[i*ntxqs];
|
||||
}
|
||||
|
||||
|
||||
device_printf(iflib_get_dev(ctx), "allocated for %d tx_queues\n", adapter->tx_num_queues);
|
||||
return (0);
|
||||
fail:
|
||||
@ -2716,7 +2862,7 @@ em_if_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs, uint64_t *paddrs, int nrxqs
|
||||
adapter->rx_num_queues, M_DEVBUF, M_NOWAIT | M_ZERO))) {
|
||||
device_printf(iflib_get_dev(ctx), "Unable to allocate queue memory\n");
|
||||
error = ENOMEM;
|
||||
goto fail;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
for (i = 0, que = adapter->rx_queues; i < nrxqsets; i++, que++) {
|
||||
@ -2756,7 +2902,7 @@ em_if_queues_free(if_ctx_t ctx)
|
||||
txr->tx_rsq = NULL;
|
||||
}
|
||||
free(adapter->tx_queues, M_DEVBUF);
|
||||
adapter->tx_queues = NULL;
|
||||
adapter->tx_queues = NULL;
|
||||
}
|
||||
|
||||
if (rx_que != NULL) {
|
||||
@ -3031,7 +3177,7 @@ em_initialize_receive_unit(if_ctx_t ctx)
|
||||
u64 bus_addr = rxr->rx_paddr;
|
||||
#if 0
|
||||
u32 rdt = adapter->rx_num_queues -1; /* default */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
E1000_WRITE_REG(hw, E1000_RDLEN(i),
|
||||
scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended));
|
||||
@ -3086,7 +3232,7 @@ em_initialize_receive_unit(if_ctx_t ctx)
|
||||
srrctl |= 2048 >> E1000_SRRCTL_BSIZEPKT_SHIFT;
|
||||
rctl |= E1000_RCTL_SZ_2048;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* If TX flow control is disabled and there's >1 queue defined,
|
||||
* enable DROP.
|
||||
@ -3124,7 +3270,7 @@ em_initialize_receive_unit(if_ctx_t ctx)
|
||||
rxdctl &= 0xFFF00000;
|
||||
rxdctl |= IGB_RX_PTHRESH;
|
||||
rxdctl |= IGB_RX_HTHRESH << 8;
|
||||
rxdctl |= IGB_RX_WTHRESH << 16;
|
||||
rxdctl |= IGB_RX_WTHRESH << 16;
|
||||
E1000_WRITE_REG(hw, E1000_RXDCTL(i), rxdctl);
|
||||
}
|
||||
} else if (adapter->hw.mac.type >= e1000_pch2lan) {
|
||||
@ -3253,7 +3399,7 @@ em_if_disable_intr(if_ctx_t ctx)
|
||||
/*
|
||||
* Bit of a misnomer, what this really means is
|
||||
* to enable OS management of the system... aka
|
||||
* to disable special hardware management features
|
||||
* to disable special hardware management features
|
||||
*/
|
||||
static void
|
||||
em_init_manageability(struct adapter *adapter)
|
||||
@ -3307,6 +3453,9 @@ em_get_hw_control(struct adapter *adapter)
|
||||
{
|
||||
u32 ctrl_ext, swsm;
|
||||
|
||||
if (adapter->vf_ifp)
|
||||
return;
|
||||
|
||||
if (adapter->hw.mac.type == e1000_82573) {
|
||||
swsm = E1000_READ_REG(&adapter->hw, E1000_SWSM);
|
||||
E1000_WRITE_REG(&adapter->hw, E1000_SWSM,
|
||||
@ -3317,7 +3466,6 @@ em_get_hw_control(struct adapter *adapter)
|
||||
ctrl_ext = E1000_READ_REG(&adapter->hw, E1000_CTRL_EXT);
|
||||
E1000_WRITE_REG(&adapter->hw, E1000_CTRL_EXT,
|
||||
ctrl_ext | E1000_CTRL_EXT_DRV_LOAD);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -3637,7 +3785,7 @@ static void
|
||||
em_if_led_func(if_ctx_t ctx, int onoff)
|
||||
{
|
||||
struct adapter *adapter = iflib_get_softc(ctx);
|
||||
|
||||
|
||||
if (onoff) {
|
||||
e1000_setup_led(&adapter->hw);
|
||||
e1000_led_on(&adapter->hw);
|
||||
@ -3783,7 +3931,7 @@ static uint64_t
|
||||
em_if_get_counter(if_ctx_t ctx, ift_counter cnt)
|
||||
{
|
||||
struct adapter *adapter = iflib_get_softc(ctx);
|
||||
struct ifnet *ifp = iflib_get_ifp(ctx);
|
||||
struct ifnet *ifp = iflib_get_ifp(ctx);
|
||||
|
||||
switch (cnt) {
|
||||
case IFCOUNTER_COLLISIONS:
|
||||
@ -3820,7 +3968,7 @@ static void
|
||||
em_add_hw_stats(struct adapter *adapter)
|
||||
{
|
||||
device_t dev = iflib_get_dev(adapter->ctx);
|
||||
struct em_tx_queue *tx_que = adapter->tx_queues;
|
||||
struct em_tx_queue *tx_que = adapter->tx_queues;
|
||||
struct em_rx_queue *rx_que = adapter->rx_queues;
|
||||
|
||||
struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev);
|
||||
@ -4065,7 +4213,7 @@ em_add_hw_stats(struct adapter *adapter)
|
||||
|
||||
/* Interrupt Stats */
|
||||
|
||||
int_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "interrupts",
|
||||
int_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "interrupts",
|
||||
CTLFLAG_RD, NULL, "Interrupt Statistics");
|
||||
int_list = SYSCTL_CHILDREN(int_node);
|
||||
|
||||
@ -4242,7 +4390,7 @@ em_set_flowcntl(SYSCTL_HANDLER_ARGS)
|
||||
case e1000_fc_none:
|
||||
adapter->hw.fc.requested_mode = input;
|
||||
adapter->fc = input;
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
/* Do nothing */
|
||||
return (error);
|
||||
@ -4290,7 +4438,7 @@ em_sysctl_debug_info(SYSCTL_HANDLER_ARGS)
|
||||
if (result == 1) {
|
||||
adapter = (struct adapter *) arg1;
|
||||
em_print_debug_info(adapter);
|
||||
}
|
||||
}
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
@ -235,6 +235,27 @@
|
||||
#define EM_EEPROM_APME 0x400;
|
||||
#define EM_82544_APME 0x0004;
|
||||
|
||||
|
||||
/* Support AutoMediaDetect for Marvell M88 PHY in i354 */
|
||||
#define IGB_MEDIA_RESET (1 << 0)
|
||||
|
||||
/* Define the starting Interrupt rate per Queue */
|
||||
#define IGB_INTS_PER_SEC 8000
|
||||
#define IGB_DEFAULT_ITR ((1000000/IGB_INTS_PER_SEC) << 2)
|
||||
|
||||
#define IGB_LINK_ITR 2000
|
||||
#define I210_LINK_DELAY 1000
|
||||
|
||||
#define IGB_MAX_SCATTER 40
|
||||
#define IGB_VFTA_SIZE 128
|
||||
#define IGB_BR_SIZE 4096 /* ring buf size */
|
||||
#define IGB_TSO_SIZE (65535 + sizeof(struct ether_vlan_header))
|
||||
#define IGB_TSO_SEG_SIZE 4096 /* Max dma segment size */
|
||||
#define IGB_TXPBSIZE 20408
|
||||
#define IGB_HDR_BUF 128
|
||||
#define IGB_PKTTYPE_MASK 0x0000FFF0
|
||||
#define IGB_DMCTLX_DCFLUSH_DIS 0x80000000 /* Disable DMA Coalesce Flush */
|
||||
|
||||
/*
|
||||
* Driver state logic for the detection of a hung state
|
||||
* in hardware. Set TX_HUNG whenever a TX packet is used
|
||||
@ -455,11 +476,11 @@ struct adapter {
|
||||
struct ifmedia *media;
|
||||
int msix;
|
||||
int if_flags;
|
||||
int min_frame_size;
|
||||
int em_insert_vlan_header;
|
||||
u32 ims;
|
||||
bool in_detach;
|
||||
|
||||
u32 flags;
|
||||
/* Task for FAST handling */
|
||||
struct grouptask link_task;
|
||||
|
||||
@ -514,6 +535,7 @@ struct adapter {
|
||||
unsigned long watchdog_events;
|
||||
|
||||
struct e1000_hw_stats stats;
|
||||
u16 vf_ifp;
|
||||
};
|
||||
|
||||
/********************************************************************************
|
||||
|
@ -2209,6 +2209,23 @@ storvsc_io_done(struct hv_storvsc_request *reqp)
|
||||
resp_buf[0], resp_buf[1], resp_buf[2],
|
||||
resp_buf[3], resp_buf[4]);
|
||||
}
|
||||
/*
|
||||
* XXX: Hyper-V (since win2012r2) responses inquiry with
|
||||
* unknown version (0) for GEN-2 DVD device.
|
||||
* Manually set the version number to SPC3 in order to
|
||||
* ask CAM to continue probing with "PROBE_REPORT_LUNS".
|
||||
* see probedone() in scsi_xpt.c
|
||||
*/
|
||||
if (SID_TYPE(inq_data) == T_CDROM &&
|
||||
inq_data->version == 0 &&
|
||||
(vmstor_proto_version >= VMSTOR_PROTOCOL_VERSION_WIN8)) {
|
||||
inq_data->version = SCSI_REV_SPC3;
|
||||
if (bootverbose) {
|
||||
xpt_print(ccb->ccb_h.path,
|
||||
"set version from 0 to %d\n",
|
||||
inq_data->version);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* XXX: Manually fix the wrong response returned from WS2012
|
||||
*/
|
||||
@ -2218,7 +2235,7 @@ storvsc_io_done(struct hv_storvsc_request *reqp)
|
||||
vmstor_proto_version == VMSTOR_PROTOCOL_VERSION_WIN7)) {
|
||||
if (data_len >= 4 &&
|
||||
(resp_buf[2] == 0 || resp_buf[3] == 0)) {
|
||||
resp_buf[2] = 5; // verion=5 means SPC-3
|
||||
resp_buf[2] = SCSI_REV_SPC3;
|
||||
resp_buf[3] = 2; // resp fmt must be 2
|
||||
if (bootverbose)
|
||||
xpt_print(ccb->ccb_h.path,
|
||||
|
@ -1513,8 +1513,8 @@ iflib_txsd_alloc(iflib_txq_t txq)
|
||||
NULL, /* lockfuncarg */
|
||||
&txq->ift_desc_tag))) {
|
||||
device_printf(dev,"Unable to allocate TX DMA tag: %d\n", err);
|
||||
device_printf(dev,"maxsize: %zd nsegments: %d maxsegsize: %zd\n",
|
||||
sctx->isc_tx_maxsize, nsegments, sctx->isc_tx_maxsegsize);
|
||||
device_printf(dev,"maxsize: %ju nsegments: %d maxsegsize: %ju\n",
|
||||
(uintmax_t)sctx->isc_tx_maxsize, nsegments, (uintmax_t)sctx->isc_tx_maxsegsize);
|
||||
goto fail;
|
||||
}
|
||||
if ((err = bus_dma_tag_create(bus_get_dma_tag(dev),
|
||||
@ -2927,6 +2927,14 @@ iflib_busdma_load_mbuf_sg(iflib_txq_t txq, bus_dma_tag_t tag, bus_dmamap_t map,
|
||||
m_free(tmp);
|
||||
continue;
|
||||
}
|
||||
m = m->m_next;
|
||||
count++;
|
||||
} while (m != NULL);
|
||||
if (count > *nsegs)
|
||||
return (0);
|
||||
m = *m0;
|
||||
count = 0;
|
||||
do {
|
||||
next = (pidx + count) & (ntxd-1);
|
||||
MPASS(ifsd_m[next] == NULL);
|
||||
ifsd_m[next] = m;
|
||||
|
@ -4293,47 +4293,44 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
|
||||
((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc))) {
|
||||
asoc->state |= SCTP_STATE_PARTIAL_MSG_LEFT;
|
||||
}
|
||||
if (((asoc->state & SCTP_STATE_SHUTDOWN_PENDING) ||
|
||||
(SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) &&
|
||||
(asoc->stream_queue_cnt == 1) &&
|
||||
(asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT)) {
|
||||
struct mbuf *op_err;
|
||||
|
||||
*abort_now = 1;
|
||||
/* XXX */
|
||||
op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, "");
|
||||
stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24;
|
||||
sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED);
|
||||
return;
|
||||
}
|
||||
if ((asoc->state & SCTP_STATE_SHUTDOWN_PENDING) &&
|
||||
(asoc->stream_queue_cnt == 0)) {
|
||||
if (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT) {
|
||||
/* Need to abort here */
|
||||
struct mbuf *op_err;
|
||||
struct sctp_nets *netp;
|
||||
|
||||
abort_out_now:
|
||||
*abort_now = 1;
|
||||
/* XXX */
|
||||
op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, "");
|
||||
stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24;
|
||||
sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED);
|
||||
return;
|
||||
} else {
|
||||
struct sctp_nets *netp;
|
||||
|
||||
if ((SCTP_GET_STATE(asoc) == SCTP_STATE_OPEN) ||
|
||||
(SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) {
|
||||
SCTP_STAT_DECR_GAUGE32(sctps_currestab);
|
||||
}
|
||||
SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_SENT);
|
||||
SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
|
||||
sctp_stop_timers_for_shutdown(stcb);
|
||||
if (asoc->alternate) {
|
||||
netp = asoc->alternate;
|
||||
} else {
|
||||
netp = asoc->primary_destination;
|
||||
}
|
||||
sctp_send_shutdown(stcb, netp);
|
||||
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN,
|
||||
stcb->sctp_ep, stcb, netp);
|
||||
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD,
|
||||
stcb->sctp_ep, stcb, netp);
|
||||
if ((SCTP_GET_STATE(asoc) == SCTP_STATE_OPEN) ||
|
||||
(SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) {
|
||||
SCTP_STAT_DECR_GAUGE32(sctps_currestab);
|
||||
}
|
||||
SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_SENT);
|
||||
SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
|
||||
sctp_stop_timers_for_shutdown(stcb);
|
||||
if (asoc->alternate) {
|
||||
netp = asoc->alternate;
|
||||
} else {
|
||||
netp = asoc->primary_destination;
|
||||
}
|
||||
sctp_send_shutdown(stcb, netp);
|
||||
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN,
|
||||
stcb->sctp_ep, stcb, netp);
|
||||
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD,
|
||||
stcb->sctp_ep, stcb, netp);
|
||||
} else if ((SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED) &&
|
||||
(asoc->stream_queue_cnt == 0)) {
|
||||
struct sctp_nets *netp;
|
||||
|
||||
if (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT) {
|
||||
goto abort_out_now;
|
||||
}
|
||||
SCTP_STAT_DECR_GAUGE32(sctps_currestab);
|
||||
SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_ACK_SENT);
|
||||
SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
|
||||
@ -4989,48 +4986,45 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
||||
((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc))) {
|
||||
asoc->state |= SCTP_STATE_PARTIAL_MSG_LEFT;
|
||||
}
|
||||
if (((asoc->state & SCTP_STATE_SHUTDOWN_PENDING) ||
|
||||
(SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) &&
|
||||
(asoc->stream_queue_cnt == 1) &&
|
||||
(asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT)) {
|
||||
struct mbuf *op_err;
|
||||
|
||||
*abort_now = 1;
|
||||
/* XXX */
|
||||
op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, "");
|
||||
stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24;
|
||||
sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED);
|
||||
return;
|
||||
}
|
||||
if ((asoc->state & SCTP_STATE_SHUTDOWN_PENDING) &&
|
||||
(asoc->stream_queue_cnt == 0)) {
|
||||
if (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT) {
|
||||
/* Need to abort here */
|
||||
struct mbuf *op_err;
|
||||
struct sctp_nets *netp;
|
||||
|
||||
abort_out_now:
|
||||
*abort_now = 1;
|
||||
/* XXX */
|
||||
op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, "");
|
||||
stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_31;
|
||||
sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED);
|
||||
return;
|
||||
} else {
|
||||
struct sctp_nets *netp;
|
||||
|
||||
if ((SCTP_GET_STATE(asoc) == SCTP_STATE_OPEN) ||
|
||||
(SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) {
|
||||
SCTP_STAT_DECR_GAUGE32(sctps_currestab);
|
||||
}
|
||||
SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_SENT);
|
||||
SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
|
||||
sctp_stop_timers_for_shutdown(stcb);
|
||||
if (asoc->alternate) {
|
||||
netp = asoc->alternate;
|
||||
} else {
|
||||
netp = asoc->primary_destination;
|
||||
}
|
||||
sctp_send_shutdown(stcb, netp);
|
||||
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN,
|
||||
stcb->sctp_ep, stcb, netp);
|
||||
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD,
|
||||
stcb->sctp_ep, stcb, netp);
|
||||
if ((SCTP_GET_STATE(asoc) == SCTP_STATE_OPEN) ||
|
||||
(SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) {
|
||||
SCTP_STAT_DECR_GAUGE32(sctps_currestab);
|
||||
}
|
||||
SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_SENT);
|
||||
SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
|
||||
sctp_stop_timers_for_shutdown(stcb);
|
||||
if (asoc->alternate) {
|
||||
netp = asoc->alternate;
|
||||
} else {
|
||||
netp = asoc->primary_destination;
|
||||
}
|
||||
sctp_send_shutdown(stcb, netp);
|
||||
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN,
|
||||
stcb->sctp_ep, stcb, netp);
|
||||
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD,
|
||||
stcb->sctp_ep, stcb, netp);
|
||||
return;
|
||||
} else if ((SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED) &&
|
||||
(asoc->stream_queue_cnt == 0)) {
|
||||
struct sctp_nets *netp;
|
||||
|
||||
if (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT) {
|
||||
goto abort_out_now;
|
||||
}
|
||||
SCTP_STAT_DECR_GAUGE32(sctps_currestab);
|
||||
SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_ACK_SENT);
|
||||
SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
|
||||
|
@ -392,8 +392,8 @@ typedef struct callout sctp_os_timer_t;
|
||||
(sb).sb_mb = NULL; \
|
||||
(sb).sb_mbcnt = 0;
|
||||
|
||||
#define SCTP_SB_LIMIT_RCV(so) so->so_rcv.sb_hiwat
|
||||
#define SCTP_SB_LIMIT_SND(so) so->so_snd.sb_hiwat
|
||||
#define SCTP_SB_LIMIT_RCV(so) (SOLISTENING(so) ? so->sol_sbrcv_hiwat : so->so_rcv.sb_hiwat)
|
||||
#define SCTP_SB_LIMIT_SND(so) (SOLISTENING(so) ? so->sol_sbsnd_hiwat : so->so_snd.sb_hiwat)
|
||||
|
||||
/*
|
||||
* routes, output, etc.
|
||||
|
@ -268,9 +268,23 @@ sctp_ss_default_set_value(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_associa
|
||||
}
|
||||
|
||||
static int
|
||||
sctp_ss_default_is_user_msgs_incomplete(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc SCTP_UNUSED)
|
||||
sctp_ss_default_is_user_msgs_incomplete(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc)
|
||||
{
|
||||
return (0);
|
||||
struct sctp_stream_out *strq;
|
||||
struct sctp_stream_queue_pending *sp;
|
||||
|
||||
if (asoc->stream_queue_cnt != 1) {
|
||||
return (0);
|
||||
}
|
||||
strq = asoc->ss_data.locked_on_sending;
|
||||
if (strq == NULL) {
|
||||
return (0);
|
||||
}
|
||||
sp = TAILQ_FIRST(&strq->outqueue);
|
||||
if (sp == NULL) {
|
||||
return (0);
|
||||
}
|
||||
return (!sp->msg_is_complete);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -38,14 +38,4 @@ struct pctrie {
|
||||
uintptr_t pt_root;
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
static __inline boolean_t
|
||||
pctrie_is_empty(struct pctrie *ptree)
|
||||
{
|
||||
|
||||
return (ptree->pt_root == 0);
|
||||
}
|
||||
|
||||
#endif /* _KERNEL */
|
||||
#endif /* !__SYS_PCTRIE_H_ */
|
||||
|
@ -122,6 +122,9 @@ struct efi_tblhdr {
|
||||
uint32_t __res;
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
#ifdef EFIABI_ATTR
|
||||
struct efi_rt {
|
||||
struct efi_tblhdr rt_hdr;
|
||||
efi_status (*rt_gettime)(struct efi_tm *, struct efi_tmcap *)
|
||||
@ -144,6 +147,7 @@ struct efi_rt {
|
||||
efi_status (*rt_reset)(enum efi_reset, efi_status, u_long,
|
||||
efi_char *) EFIABI_ATTR;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct efi_systbl {
|
||||
struct efi_tblhdr st_hdr;
|
||||
@ -163,7 +167,6 @@ struct efi_systbl {
|
||||
uint64_t st_cfgtbl;
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
extern vm_paddr_t efi_systbl_phys;
|
||||
#endif /* _KERNEL */
|
||||
|
||||
|
@ -119,5 +119,19 @@ void pctrie_remove(struct pctrie *ptree, uint64_t key,
|
||||
size_t pctrie_node_size(void);
|
||||
int pctrie_zone_init(void *mem, int size, int flags);
|
||||
|
||||
static __inline void
|
||||
pctrie_init(struct pctrie *ptree)
|
||||
{
|
||||
|
||||
ptree->pt_root = 0;
|
||||
}
|
||||
|
||||
static __inline boolean_t
|
||||
pctrie_is_empty(struct pctrie *ptree)
|
||||
{
|
||||
|
||||
return (ptree->pt_root == 0);
|
||||
}
|
||||
|
||||
#endif /* _KERNEL */
|
||||
#endif /* !_SYS_PCTRIE_H_ */
|
||||
|
@ -38,14 +38,4 @@ struct vm_radix {
|
||||
uintptr_t rt_root;
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
static __inline boolean_t
|
||||
vm_radix_is_empty(struct vm_radix *rtree)
|
||||
{
|
||||
|
||||
return (rtree->rt_root == 0);
|
||||
}
|
||||
|
||||
#endif /* _KERNEL */
|
||||
#endif /* !__VM_RADIX_H_ */
|
||||
|
@ -204,7 +204,7 @@ vm_object_zinit(void *mem, int size, int flags)
|
||||
/* These are true for any object that has been freed */
|
||||
object->type = OBJT_DEAD;
|
||||
object->ref_count = 0;
|
||||
object->rtree.rt_root = 0;
|
||||
vm_radix_init(&object->rtree);
|
||||
object->paging_in_progress = 0;
|
||||
object->resident_page_count = 0;
|
||||
object->shadow_count = 0;
|
||||
@ -301,7 +301,7 @@ vm_object_init(void)
|
||||
#endif
|
||||
vm_object_zinit, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
|
||||
|
||||
vm_radix_init();
|
||||
vm_radix_zinit();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -310,7 +310,7 @@ SYSINIT(vm_radix_reserve_kva, SI_SUB_KMEM, SI_ORDER_THIRD,
|
||||
* Initialize the UMA slab zone.
|
||||
*/
|
||||
void
|
||||
vm_radix_init(void)
|
||||
vm_radix_zinit(void)
|
||||
{
|
||||
|
||||
vm_radix_node_zone = uma_zcreate("RADIX NODE",
|
||||
|
@ -35,7 +35,6 @@
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
void vm_radix_init(void);
|
||||
int vm_radix_insert(struct vm_radix *rtree, vm_page_t page);
|
||||
boolean_t vm_radix_is_singleton(struct vm_radix *rtree);
|
||||
vm_page_t vm_radix_lookup(struct vm_radix *rtree, vm_pindex_t index);
|
||||
@ -44,6 +43,21 @@ vm_page_t vm_radix_lookup_le(struct vm_radix *rtree, vm_pindex_t index);
|
||||
void vm_radix_reclaim_allnodes(struct vm_radix *rtree);
|
||||
vm_page_t vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index);
|
||||
vm_page_t vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage);
|
||||
void vm_radix_zinit(void);
|
||||
|
||||
static __inline void
|
||||
vm_radix_init(struct vm_radix *rtree)
|
||||
{
|
||||
|
||||
rtree->rt_root = 0;
|
||||
}
|
||||
|
||||
static __inline boolean_t
|
||||
vm_radix_is_empty(struct vm_radix *rtree)
|
||||
{
|
||||
|
||||
return (rtree->rt_root == 0);
|
||||
}
|
||||
|
||||
#endif /* _KERNEL */
|
||||
#endif /* !_VM_RADIX_H_ */
|
||||
|
@ -50,12 +50,23 @@ static void
|
||||
usage(void)
|
||||
{
|
||||
|
||||
xo_error("usage: procstat [--libxo] [-CHhn] [-M core] "
|
||||
xo_error(
|
||||
"usage: procstat [--libxo] [-Hhn] [-M core] "
|
||||
"[-N system] [-w interval]\n"
|
||||
" [-b | -c | -e | -f | -i | -j | -k | "
|
||||
"-l | -L | -r | -s | \n"
|
||||
" -S | -t | -v | -x]\n"
|
||||
" [-a | pid | core ...]\n");
|
||||
" [-S | -b | -c | -e | -i | -j | -k | -kk | "
|
||||
"-l | -r | -s | \n"
|
||||
" -t | -v | -x]\n"
|
||||
" [-a | pid ... | core ...]\n"
|
||||
" procstat [--libxo] -Cf [-hn] [-M core] "
|
||||
"[-N system] [-a | pid ... | core ...]\n"
|
||||
" [-S | -b | -c | -e | -i | -j | -k | -kk | "
|
||||
"-l | -r | -s | \n"
|
||||
" procstat [--libxo] -L [-hn] [-M core] "
|
||||
"[-N system] [-w interval]\n"
|
||||
" [-S | -b | -c | -e | -i | -j | -k | -kk | "
|
||||
"-l | -r | -s | \n"
|
||||
" -t | -v | -x]\n"
|
||||
" [core ...]\n");
|
||||
xo_finish();
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
|
@ -148,6 +148,9 @@ static struct syscall decoded_syscalls[] = {
|
||||
.args = { { Int, 0 } } },
|
||||
{ .name = "compat11.fstat", .ret_type = 1, .nargs = 2,
|
||||
.args = { { Int, 0 }, { Stat11 | OUT, 1 } } },
|
||||
{ .name = "compat11.fstatat", .ret_type = 1, .nargs = 4,
|
||||
.args = { { Atfd, 0 }, { Name | IN, 1 }, { Stat11 | OUT, 2 },
|
||||
{ Atflags, 3 } } },
|
||||
{ .name = "compat11.lstat", .ret_type = 1, .nargs = 2,
|
||||
.args = { { Name | IN, 0 }, { Stat11 | OUT, 1 } } },
|
||||
{ .name = "compat11.stat", .ret_type = 1, .nargs = 2,
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <uuid.h>
|
||||
|
||||
#include "acpidump.h"
|
||||
|
||||
@ -70,6 +71,8 @@ static void acpi_print_srat_memory(ACPI_SRAT_MEM_AFFINITY *mp);
|
||||
static void acpi_print_srat(ACPI_SUBTABLE_HEADER *srat);
|
||||
static void acpi_handle_srat(ACPI_TABLE_HEADER *sdp);
|
||||
static void acpi_handle_tcpa(ACPI_TABLE_HEADER *sdp);
|
||||
static void acpi_print_nfit(ACPI_NFIT_HEADER *nfit);
|
||||
static void acpi_handle_nfit(ACPI_TABLE_HEADER *sdp);
|
||||
static void acpi_print_sdt(ACPI_TABLE_HEADER *sdp);
|
||||
static void acpi_print_fadt(ACPI_TABLE_HEADER *sdp);
|
||||
static void acpi_print_facs(ACPI_TABLE_FACS *facs);
|
||||
@ -79,6 +82,8 @@ static void acpi_print_rsd_ptr(ACPI_TABLE_RSDP *rp);
|
||||
static void acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp);
|
||||
static void acpi_walk_subtables(ACPI_TABLE_HEADER *table, void *first,
|
||||
void (*action)(ACPI_SUBTABLE_HEADER *));
|
||||
static void acpi_walk_nfit(ACPI_TABLE_HEADER *table, void *first,
|
||||
void (*action)(ACPI_NFIT_HEADER *));
|
||||
|
||||
/* Size of an address. 32-bit for ACPI 1.0, 64-bit for ACPI 2.0 and up. */
|
||||
static int addr_size;
|
||||
@ -280,6 +285,27 @@ acpi_walk_subtables(ACPI_TABLE_HEADER *table, void *first,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
acpi_walk_nfit(ACPI_TABLE_HEADER *table, void *first,
|
||||
void (*action)(ACPI_NFIT_HEADER *))
|
||||
{
|
||||
ACPI_NFIT_HEADER *subtable;
|
||||
char *end;
|
||||
|
||||
subtable = first;
|
||||
end = (char *)table + table->Length;
|
||||
while ((char *)subtable < end) {
|
||||
printf("\n");
|
||||
if (subtable->Length < sizeof(ACPI_NFIT_HEADER)) {
|
||||
warnx("invalid subtable length %u", subtable->Length);
|
||||
return;
|
||||
}
|
||||
action(subtable);
|
||||
subtable = (ACPI_NFIT_HEADER *)((char *)subtable +
|
||||
subtable->Length);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
acpi_print_cpu(u_char cpu_id)
|
||||
{
|
||||
@ -392,16 +418,25 @@ acpi_print_local_nmi(u_int lint, uint16_t mps_flags)
|
||||
acpi_print_mps_flags(mps_flags);
|
||||
}
|
||||
|
||||
static const char *apic_types[] = { "Local APIC", "IO APIC", "INT Override",
|
||||
"NMI", "Local APIC NMI",
|
||||
"Local APIC Override", "IO SAPIC",
|
||||
"Local SAPIC", "Platform Interrupt",
|
||||
"Local X2APIC", "Local X2APIC NMI",
|
||||
"GIC CPU Interface Structure",
|
||||
"GIC Distributor Structure",
|
||||
"GICv2m MSI Frame",
|
||||
"GIC Redistributor Structure",
|
||||
"GIC ITS Structure" };
|
||||
static const char *apic_types[] = {
|
||||
[ACPI_MADT_TYPE_LOCAL_APIC] = "Local APIC",
|
||||
[ACPI_MADT_TYPE_IO_APIC] = "IO APIC",
|
||||
[ACPI_MADT_TYPE_INTERRUPT_OVERRIDE] = "INT Override",
|
||||
[ACPI_MADT_TYPE_NMI_SOURCE] = "NMI",
|
||||
[ACPI_MADT_TYPE_LOCAL_APIC_NMI] = "Local APIC NMI",
|
||||
[ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE] = "Local APIC Override",
|
||||
[ACPI_MADT_TYPE_IO_SAPIC] = "IO SAPIC",
|
||||
[ACPI_MADT_TYPE_LOCAL_SAPIC] = "Local SAPIC",
|
||||
[ACPI_MADT_TYPE_INTERRUPT_SOURCE] = "Platform Interrupt",
|
||||
[ACPI_MADT_TYPE_LOCAL_X2APIC] = "Local X2APIC",
|
||||
[ACPI_MADT_TYPE_LOCAL_X2APIC_NMI] = "Local X2APIC NMI",
|
||||
[ACPI_MADT_TYPE_GENERIC_INTERRUPT] = "GIC CPU Interface Structure",
|
||||
[ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR] = "GIC Distributor Structure",
|
||||
[ACPI_MADT_TYPE_GENERIC_MSI_FRAME] = "GICv2m MSI Frame",
|
||||
[ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR] = "GIC Redistributor Structure",
|
||||
[ACPI_MADT_TYPE_GENERIC_TRANSLATOR] = "GIC ITS Structure"
|
||||
};
|
||||
|
||||
static const char *platform_int_types[] = { "0 (unknown)", "PMI", "INIT",
|
||||
"Corrected Platform Error" };
|
||||
|
||||
@ -1076,7 +1111,13 @@ acpi_print_srat_memory(ACPI_SRAT_MEM_AFFINITY *mp)
|
||||
printf("\tProximity Domain=%d\n", mp->ProximityDomain);
|
||||
}
|
||||
|
||||
static const char *srat_types[] = { "CPU", "Memory", "X2APIC", "GICC" };
|
||||
static const char *srat_types[] = {
|
||||
[ACPI_SRAT_TYPE_CPU_AFFINITY] = "CPU",
|
||||
[ACPI_SRAT_TYPE_MEMORY_AFFINITY] = "Memory",
|
||||
[ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY] = "X2APIC",
|
||||
[ACPI_SRAT_TYPE_GICC_AFFINITY] = "GICC",
|
||||
[ACPI_SRAT_TYPE_GIC_ITS_AFFINITY] = "GIC ITS",
|
||||
};
|
||||
|
||||
static void
|
||||
acpi_print_srat(ACPI_SUBTABLE_HEADER *srat)
|
||||
@ -1127,6 +1168,174 @@ acpi_handle_srat(ACPI_TABLE_HEADER *sdp)
|
||||
printf(END_COMMENT);
|
||||
}
|
||||
|
||||
static const char *nfit_types[] = {
|
||||
[ACPI_NFIT_TYPE_SYSTEM_ADDRESS] = "System Address",
|
||||
[ACPI_NFIT_TYPE_MEMORY_MAP] = "Memory Map",
|
||||
[ACPI_NFIT_TYPE_INTERLEAVE] = "Interleave",
|
||||
[ACPI_NFIT_TYPE_SMBIOS] = "SMBIOS",
|
||||
[ACPI_NFIT_TYPE_CONTROL_REGION] = "Control Region",
|
||||
[ACPI_NFIT_TYPE_DATA_REGION] = "Data Region",
|
||||
[ACPI_NFIT_TYPE_FLUSH_ADDRESS] = "Flush Address"
|
||||
};
|
||||
|
||||
|
||||
static void
|
||||
acpi_print_nfit(ACPI_NFIT_HEADER *nfit)
|
||||
{
|
||||
char *uuidstr;
|
||||
uint32_t status;
|
||||
|
||||
ACPI_NFIT_SYSTEM_ADDRESS *sysaddr;
|
||||
ACPI_NFIT_MEMORY_MAP *mmap;
|
||||
ACPI_NFIT_INTERLEAVE *ileave;
|
||||
ACPI_NFIT_SMBIOS *smbios;
|
||||
ACPI_NFIT_CONTROL_REGION *ctlreg;
|
||||
ACPI_NFIT_DATA_REGION *datareg;
|
||||
ACPI_NFIT_FLUSH_ADDRESS *fladdr;
|
||||
|
||||
if (nfit->Type < nitems(nfit_types))
|
||||
printf("\tType=%s\n", nfit_types[nfit->Type]);
|
||||
else
|
||||
printf("\tType=%u (unknown)\n", nfit->Type);
|
||||
switch (nfit->Type) {
|
||||
case ACPI_NFIT_TYPE_SYSTEM_ADDRESS:
|
||||
sysaddr = (ACPI_NFIT_SYSTEM_ADDRESS *)nfit;
|
||||
printf("\tRangeIndex=%u\n", (u_int)sysaddr->RangeIndex);
|
||||
printf("\tProximityDomain=%u\n",
|
||||
(u_int)sysaddr->ProximityDomain);
|
||||
uuid_to_string((uuid_t *)(sysaddr->RangeGuid),
|
||||
&uuidstr, &status);
|
||||
if (status != uuid_s_ok)
|
||||
errx(1, "uuid_to_string: status=%u", status);
|
||||
printf("\tRangeGuid=%s\n", uuidstr);
|
||||
free(uuidstr);
|
||||
printf("\tAddress=0x%016jx\n", (uintmax_t)sysaddr->Address);
|
||||
printf("\tLength=0x%016jx\n", (uintmax_t)sysaddr->Length);
|
||||
printf("\tMemoryMapping=0x%016jx\n",
|
||||
(uintmax_t)sysaddr->MemoryMapping);
|
||||
|
||||
#define PRINTFLAG(var, flag) printflag((var), ACPI_NFIT_## flag, #flag)
|
||||
|
||||
printf("\tFlags=");
|
||||
PRINTFLAG(sysaddr->Flags, ADD_ONLINE_ONLY);
|
||||
PRINTFLAG(sysaddr->Flags, PROXIMITY_VALID);
|
||||
PRINTFLAG_END();
|
||||
|
||||
#undef PRINTFLAG
|
||||
|
||||
break;
|
||||
case ACPI_NFIT_TYPE_MEMORY_MAP:
|
||||
mmap = (ACPI_NFIT_MEMORY_MAP *)nfit;
|
||||
printf("\tDeviceHandle=%u\n", (u_int)mmap->DeviceHandle);
|
||||
printf("\tPhysicalId=%u\n", (u_int)mmap->PhysicalId);
|
||||
printf("\tRegionId=%u\n", (u_int)mmap->RegionId);
|
||||
printf("\tRangeIndex=%u\n", (u_int)mmap->RangeIndex);
|
||||
printf("\tRegionIndex=%u\n", (u_int)mmap->RegionIndex);
|
||||
printf("\tRegionSize=0x%016jx\n", (uintmax_t)mmap->RegionSize);
|
||||
printf("\tRegionOffset=0x%016jx\n",
|
||||
(uintmax_t)mmap->RegionOffset);
|
||||
printf("\tAddress=0x%016jx\n", (uintmax_t)mmap->Address);
|
||||
printf("\tInterleaveIndex=%u\n", (u_int)mmap->InterleaveIndex);
|
||||
|
||||
#define PRINTFLAG(var, flag) printflag((var), ACPI_NFIT_MEM_## flag, #flag)
|
||||
|
||||
printf("\tFlags=");
|
||||
PRINTFLAG(mmap->Flags, SAVE_FAILED);
|
||||
PRINTFLAG(mmap->Flags, RESTORE_FAILED);
|
||||
PRINTFLAG(mmap->Flags, FLUSH_FAILED);
|
||||
PRINTFLAG(mmap->Flags, NOT_ARMED);
|
||||
PRINTFLAG(mmap->Flags, HEALTH_OBSERVED);
|
||||
PRINTFLAG(mmap->Flags, HEALTH_ENABLED);
|
||||
PRINTFLAG(mmap->Flags, MAP_FAILED);
|
||||
PRINTFLAG_END();
|
||||
|
||||
#undef PRINTFLAG
|
||||
|
||||
break;
|
||||
case ACPI_NFIT_TYPE_INTERLEAVE:
|
||||
ileave = (ACPI_NFIT_INTERLEAVE *)nfit;
|
||||
printf("\tInterleaveIndex=%u\n",
|
||||
(u_int)ileave->InterleaveIndex);
|
||||
printf("\tLineCount=%u\n", (u_int)ileave->LineCount);
|
||||
printf("\tLineSize=%u\n", (u_int)ileave->LineSize);
|
||||
/* XXX ileave->LineOffset[i] output is not supported */
|
||||
break;
|
||||
case ACPI_NFIT_TYPE_SMBIOS:
|
||||
smbios = (ACPI_NFIT_SMBIOS *)nfit;
|
||||
/* XXX smbios->Data[x] output is not supported */
|
||||
break;
|
||||
case ACPI_NFIT_TYPE_CONTROL_REGION:
|
||||
ctlreg = (ACPI_NFIT_CONTROL_REGION *)nfit;
|
||||
printf("\tRegionIndex=%u\n", (u_int)ctlreg->RegionIndex);
|
||||
printf("\tVendorId=0x%04x\n", (u_int)ctlreg->VendorId);
|
||||
printf("\tDeviceId=0x%04x\n", (u_int)ctlreg->DeviceId);
|
||||
printf("\tRevisionId=%u\n", (u_int)ctlreg->RevisionId);
|
||||
printf("\tSubsystemVendorId=0x%04x\n",
|
||||
(u_int)ctlreg->SubsystemVendorId);
|
||||
printf("\tSubsystemDeviceId=0x%04x\n",
|
||||
(u_int)ctlreg->SubsystemDeviceId);
|
||||
printf("\tSubsystemRevisionId=%u\n",
|
||||
(u_int)ctlreg->SubsystemRevisionId);
|
||||
printf("\tValidFields=%u\n", (u_int)ctlreg->ValidFields);
|
||||
printf("\tManufacturingLocation=%u\n",
|
||||
(u_int)ctlreg->ManufacturingLocation);
|
||||
printf("\tManufacturingDate=%u\n",
|
||||
(u_int)ctlreg->ManufacturingDate);
|
||||
printf("\tSerialNumber=%u\n",
|
||||
(u_int)ctlreg->SerialNumber);
|
||||
printf("\tWindows=%u\n", (u_int)ctlreg->Windows);
|
||||
printf("\tWindowSize=0x%016jx\n",
|
||||
(uintmax_t)ctlreg->WindowSize);
|
||||
printf("\tCommandOffset=0x%016jx\n",
|
||||
(uintmax_t)ctlreg->CommandOffset);
|
||||
printf("\tCommandSize=0x%016jx\n",
|
||||
(uintmax_t)ctlreg->CommandSize);
|
||||
printf("\tStatusOffset=0x%016jx\n",
|
||||
(uintmax_t)ctlreg->StatusOffset);
|
||||
printf("\tStatusSize=0x%016jx\n",
|
||||
(uintmax_t)ctlreg->StatusSize);
|
||||
|
||||
#define PRINTFLAG(var, flag) printflag((var), ACPI_NFIT_## flag, #flag)
|
||||
|
||||
printf("\tFlags=");
|
||||
PRINTFLAG(mmap->Flags, ADD_ONLINE_ONLY);
|
||||
PRINTFLAG(mmap->Flags, PROXIMITY_VALID);
|
||||
PRINTFLAG_END();
|
||||
|
||||
#undef PRINTFLAG
|
||||
|
||||
break;
|
||||
case ACPI_NFIT_TYPE_DATA_REGION:
|
||||
datareg = (ACPI_NFIT_DATA_REGION *)nfit;
|
||||
printf("\tRegionIndex=%u\n", (u_int)datareg->RegionIndex);
|
||||
printf("\tWindows=%u\n", (u_int)datareg->Windows);
|
||||
printf("\tOffset=0x%016jx\n", (uintmax_t)datareg->Offset);
|
||||
printf("\tSize=0x%016jx\n", (uintmax_t)datareg->Size);
|
||||
printf("\tCapacity=0x%016jx\n", (uintmax_t)datareg->Capacity);
|
||||
printf("\tStartAddress=0x%016jx\n",
|
||||
(uintmax_t)datareg->StartAddress);
|
||||
break;
|
||||
case ACPI_NFIT_TYPE_FLUSH_ADDRESS:
|
||||
fladdr = (ACPI_NFIT_FLUSH_ADDRESS *)nfit;
|
||||
printf("\tDeviceHandle=%u\n", (u_int)fladdr->DeviceHandle);
|
||||
printf("\tHintCount=%u\n", (u_int)fladdr->HintCount);
|
||||
/* XXX fladdr->HintAddress[i] output is not supported */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
acpi_handle_nfit(ACPI_TABLE_HEADER *sdp)
|
||||
{
|
||||
ACPI_TABLE_NFIT *nfit;
|
||||
|
||||
printf(BEGIN_COMMENT);
|
||||
acpi_print_sdt(sdp);
|
||||
nfit = (ACPI_TABLE_NFIT *)sdp;
|
||||
acpi_walk_nfit(sdp, (nfit + 1), acpi_print_nfit);
|
||||
printf(END_COMMENT);
|
||||
}
|
||||
|
||||
static void
|
||||
acpi_print_sdt(ACPI_TABLE_HEADER *sdp)
|
||||
{
|
||||
@ -1442,6 +1651,8 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp)
|
||||
acpi_handle_tcpa(sdp);
|
||||
else if (!memcmp(sdp->Signature, ACPI_SIG_DMAR, 4))
|
||||
acpi_handle_dmar(sdp);
|
||||
else if (!memcmp(sdp->Signature, ACPI_SIG_NFIT, 4))
|
||||
acpi_handle_nfit(sdp);
|
||||
else {
|
||||
printf(BEGIN_COMMENT);
|
||||
acpi_print_sdt(sdp);
|
||||
|
@ -17,7 +17,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd October 31, 2016
|
||||
.Dd July 19, 2017
|
||||
.Dt CRON 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -138,7 +138,7 @@ set to a null string, usually specified in a shell as
|
||||
or
|
||||
.Li \*q\*q .
|
||||
.It Fl n
|
||||
Don't daemonize, run in foreground instead.
|
||||
Do not daemonize; run in foreground instead.
|
||||
.It Fl s
|
||||
Enable special handling of situations when the GMT offset of the local
|
||||
timezone changes, such as the switches between the standard time and
|
||||
@ -209,13 +209,17 @@ trace through the execution, but do not perform any actions
|
||||
.El
|
||||
.El
|
||||
.Sh FILES
|
||||
.Bl -tag -width /etc/pam.d/cron -compact
|
||||
.Bl -tag -width /usr/local/etc/cron.d -compact
|
||||
.It Pa /etc/crontab
|
||||
System crontab file
|
||||
.It Pa /etc/cron.d
|
||||
Directory for optional/modularized system crontab files.
|
||||
.It Pa /etc/pam.d/cron
|
||||
.Xr pam.conf 5
|
||||
configuration file for
|
||||
.Nm
|
||||
.It Pa /usr/local/etc/cron.d
|
||||
Directory for third-party package provided crontab files.
|
||||
.It Pa /var/cron/tabs
|
||||
Directory for personal crontab files
|
||||
.El
|
||||
|
@ -14,8 +14,8 @@ RFC3164_FMT='^[A-Z][a-z]{2} [ 0-9][0-9] [0-9]{2}:[0-9]{2}:[0-9]{2}'
|
||||
COUNT=0
|
||||
TMPDIR=$(pwd)/work
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$0: Can't create temp dir, exiting..."
|
||||
exit 1
|
||||
echo "$0: Can't create temp dir, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Begin an individual test
|
||||
@ -432,8 +432,8 @@ tests_rfc5424() {
|
||||
cknt ${dir}${LOGFNAME}.0${ext}
|
||||
ckfe $LOGFNAME5424
|
||||
cknt ${dir}${LOGFNAME5424}.0${ext}
|
||||
ckrfc3164 ${LOGFNAME}
|
||||
ckrfc5424 ${LOGFNAME5424}
|
||||
ckrfc3164 ${LOGFNAME}
|
||||
ckrfc5424 ${LOGFNAME5424}
|
||||
end
|
||||
|
||||
begin "RFC-5424 - rotate normal 1 ${name_postfix}"
|
||||
@ -442,10 +442,10 @@ tests_rfc5424() {
|
||||
ckfe ${dir}${LOGFNAME}.0${ext}
|
||||
ckfe $LOGFNAME5424
|
||||
ckfe ${dir}${LOGFNAME5424}.0${ext}
|
||||
ckrfc3164 ${LOGFNAME}
|
||||
ckrfc3164 ${dir}${LOGFNAME}.0${ext}
|
||||
ckrfc5424 ${LOGFNAME5424}
|
||||
ckrfc5424 ${dir}${LOGFNAME5424}.0${ext}
|
||||
ckrfc3164 ${LOGFNAME}
|
||||
ckrfc3164 ${dir}${LOGFNAME}.0${ext}
|
||||
ckrfc5424 ${LOGFNAME5424}
|
||||
ckrfc5424 ${dir}${LOGFNAME5424}.0${ext}
|
||||
end
|
||||
|
||||
tmpdir_clean
|
||||
|
@ -24,7 +24,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd July 1, 2013
|
||||
.Dd July 19, 2017
|
||||
.Dt NFSV4 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -34,7 +34,8 @@
|
||||
The NFS client and server provides support for the
|
||||
.Tn NFSv4
|
||||
specification; see
|
||||
.%T "Network File System (NFS) Version 4 Protocol RFC 3530" .
|
||||
.%T "Network File System (NFS) Version 4 Protocol RFC 7530" and
|
||||
.%T "Network File System (NFS) Version 4 Minor Version 1 Protocol RFC 5661" .
|
||||
The protocol is somewhat similar to NFS Version 3, but differs in significant
|
||||
ways.
|
||||
It uses a single compound RPC that concatenates operations to-gether.
|
||||
@ -74,6 +75,7 @@ It provides several optional features not present in NFS Version 3:
|
||||
- Referrals, which redirect subtrees to other servers
|
||||
(not yet implemented)
|
||||
- Delegations, which allow a client to operate on a file locally
|
||||
- pNFS, where I/O operations are separated from Metadata operations
|
||||
.Ed
|
||||
.Pp
|
||||
The
|
||||
@ -115,8 +117,8 @@ multiple server file systems, although not all clients are capable of doing
|
||||
this.
|
||||
.Pp
|
||||
.Nm
|
||||
uses names for users and groups instead of numbers.
|
||||
On the wire, they
|
||||
uses strings for users and groups instead of numbers.
|
||||
On the wire, these strings can either have the numbers in the string or
|
||||
take the form:
|
||||
.sp
|
||||
.Bd -literal -offset indent -compact
|
||||
@ -136,15 +138,37 @@ Under FreeBSD, the mapping daemon is called
|
||||
.Xr nfsuserd 8
|
||||
and has a command line option that overrides the domain component of the
|
||||
machine's hostname.
|
||||
For use of
|
||||
For use of this form of string on
|
||||
.Nm ,
|
||||
either client or server, this daemon must be running.
|
||||
If this ``<dns.domain>'' is not set correctly or the daemon is not running, ``ls -l'' will typically
|
||||
.Pp
|
||||
The form where the numbers are in the strings can only be used for AUTH_SYS.
|
||||
To configure your systems this way, the
|
||||
.Xr nfsuserd 8
|
||||
daemon does not need to be running on the server, but the following sysctls need to be
|
||||
set to 1 on the server.
|
||||
.sp
|
||||
.Bd -literal -offset indent -compact
|
||||
vfs.nfs.enable_uidtostring
|
||||
vfs.nfsd.enable_stringtouid
|
||||
.Ed
|
||||
.sp
|
||||
On the client, the sysctl
|
||||
.sp
|
||||
.Bd -literal -offset indent -compact
|
||||
vfs.nfs.enable_uidtostring
|
||||
.Ed
|
||||
.sp
|
||||
must be set to 1 and the
|
||||
.Xr nfsuserd 8
|
||||
daemon does not need to be running.
|
||||
.Pp
|
||||
If these strings are not configured correctly, ``ls -l'' will typically
|
||||
report a lot of ``nobody'' and ``nogroup'' ownerships.
|
||||
.Pp
|
||||
Although uid/gid numbers are no longer used in the
|
||||
.Nm
|
||||
protocol, they will still be in the RPC authentication fields when
|
||||
protocol except optionally in the above strings, they will still be in the RPC authentication fields when
|
||||
using AUTH_SYS (sec=sys), which is the default.
|
||||
As such, in this case both the user/group name and number spaces must
|
||||
be consistent between the client and server.
|
||||
@ -156,24 +180,24 @@ will go on the wire.
|
||||
.Sh SERVER SETUP
|
||||
To set up the NFS server that supports
|
||||
.Nm ,
|
||||
you will need to either set the variables in
|
||||
you will need to set the variables in
|
||||
.Xr rc.conf 5
|
||||
as follows:
|
||||
.sp
|
||||
.Bd -literal -offset indent -compact
|
||||
nfs_server_enable="YES"
|
||||
nfsv4_server_enable="YES"
|
||||
.Ed
|
||||
.sp
|
||||
plus
|
||||
.sp
|
||||
.Bd -literal -offset indent -compact
|
||||
nfsuserd_enable="YES"
|
||||
.Ed
|
||||
.sp
|
||||
or start
|
||||
.Xr mountd 8
|
||||
and
|
||||
.Xr nfsd 8
|
||||
without the ``-o'' option, which would force use of the old server.
|
||||
The
|
||||
.Xr nfsuserd 8
|
||||
daemon must also be running.
|
||||
if the server is using the ``<user>@<domain>'' form of user/group strings or
|
||||
is using the ``-manage-gids'' option for
|
||||
.Xr nfsuserd 8 .
|
||||
.Pp
|
||||
You will also need to add at least one ``V4:'' line to the
|
||||
.Xr exports 5
|
||||
@ -232,7 +256,7 @@ plus set ``tcp'' and
|
||||
.Pp
|
||||
The
|
||||
.Xr nfsuserd 8
|
||||
must be running, as above.
|
||||
must be running if name<->uid/gid mapping is being used, as above.
|
||||
Also, since an
|
||||
.Nm
|
||||
mount uses the host uuid to identify the client uniquely to the server,
|
||||
@ -255,7 +279,7 @@ daemon to handle client side callbacks.
|
||||
This will occur if
|
||||
.sp
|
||||
.Bd -literal -offset indent -compact
|
||||
nfsuserd_enable="YES"
|
||||
nfsuserd_enable="YES" <-- If name<->uid/gid mapping is being used.
|
||||
nfscbd_enable="YES"
|
||||
.Ed
|
||||
.sp
|
||||
@ -265,7 +289,7 @@ are set in
|
||||
Without a functioning callback path, a server will never issue Delegations
|
||||
to a client.
|
||||
.sp
|
||||
By default, the callback address will be set to the IP address acquired via
|
||||
For NFSv4.0, by default, the callback address will be set to the IP address acquired via
|
||||
rtalloc() in the kernel and port# 7745.
|
||||
To override the default port#, a command line option for
|
||||
.Xr nfscbd 8
|
||||
@ -282,6 +306,10 @@ N.N.N.N.N.N
|
||||
where the first 4 Ns are the host IP address and the last two are the
|
||||
port# in network byte order (all decimal #s in the range 0-255).
|
||||
.Pp
|
||||
For NFSv4.1, the callback path (called a backchannel) uses the same TCP connection as the mount,
|
||||
so none of the above applies and should work through gateways without
|
||||
any issues.
|
||||
.Pp
|
||||
To build a kernel with the client that supports
|
||||
.Nm
|
||||
linked into it, the option
|
||||
|
Loading…
Reference in New Issue
Block a user