svn commit: r333193 - head/usr.bin/grep
Author: kevans Date: Thu May 3 02:56:13 2018 New Revision: 333193 URL: https://svnweb.freebsd.org/changeset/base/333193 Log: zgrep(1): Note that -r/-R are not currently supported. This is better behavior than just silently doing the wrong thing. We do not currently have plans to support -r/-R with the compression-enabled greps. Reported by: jilles Modified: head/usr.bin/grep/zgrep.sh Modified: head/usr.bin/grep/zgrep.sh == --- head/usr.bin/grep/zgrep.sh Thu May 3 02:42:13 2018(r333192) +++ head/usr.bin/grep/zgrep.sh Thu May 3 02:56:13 2018(r333193) @@ -106,6 +106,10 @@ do silent=1 shift ;; + -r|-R) + echo "${prg}: the ${1} flag is not currently supported" >&2 + exit 1 + ;; -V|--version) exec ${grep} -V ;; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r333192 - head/lib/libc/sys
On Wed, May 2, 2018 at 9:42 PM, Kyle Evanswrote: > Author: kevans > Date: Thu May 3 02:42:13 2018 > New Revision: 333192 > URL: https://svnweb.freebsd.org/changeset/base/333192 > > Log: > fcntl(2): Vaguely document that ENOTTY is possible, with light examples > > Reported by: vs (2006, FreeBSD 6.1-BETA3) > Reported by: me (2018, angry debugging session) I guess I should be more specific here- this specific angry debugging session was in net/freerdp's usage of devel/libepoll-shim. An apparently common pattern is: timer = timerfd_create(...); ... fcntl(timer->fd, F_SETFL, O_NONBLOCK); This fcntl(2) call will fail and result in an ENOTTY, because libepoll-shim's implementation of timerfd_create is a wrapper around kqueue and this isn't an OK thing to do. This was the inspiration of one of the specifically mentioned examples. epoll API provides a way to set NONBLOCK in the creation process, the use of which in lieu of the timerfd_create ... fcntl pattern ended up being the proper fix. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333192 - head/lib/libc/sys
Author: kevans Date: Thu May 3 02:42:13 2018 New Revision: 333192 URL: https://svnweb.freebsd.org/changeset/base/333192 Log: fcntl(2): Vaguely document that ENOTTY is possible, with light examples Reported by: vs (2006, FreeBSD 6.1-BETA3) Reported by: me (2018, angry debugging session) MFC after:1 month Modified: head/lib/libc/sys/fcntl.2 Modified: head/lib/libc/sys/fcntl.2 == --- head/lib/libc/sys/fcntl.2 Thu May 3 01:23:42 2018(r333191) +++ head/lib/libc/sys/fcntl.2 Thu May 3 02:42:13 2018(r333192) @@ -28,7 +28,7 @@ .\" @(#)fcntl.28.2 (Berkeley) 1/12/94 .\" $FreeBSD$ .\" -.Dd July 7, 2016 +.Dd May 2, 2018 .Dt FCNTL 2 .Os .Sh NAME @@ -572,6 +572,14 @@ process are already in use, or no file descriptors greater than or equal to .Fa arg are available. +.It Bq Er ENOTTY +The +.Fa fd +argument is not a valid file descriptor for the requested operation. +This may be the case if +.Fa fd +is a device node, or a descriptor returned by +.Xr kqueue 2 . .It Bq Er ENOLCK The argument .Fa cmd ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333191 - head/sys/arm/conf
Author: mw Date: Thu May 3 01:23:42 2018 New Revision: 333191 URL: https://svnweb.freebsd.org/changeset/base/333191 Log: Add Marvell ArmadaXP and Armada38X to GENERIC config Include source files and drivers for Marvell ArmadaXP and Armada38X in GENERIC kernel config. Submitted by: Michal MazurRafal Kozik Reviewed by: manu Tested by: manu Obtained from: Semihalf Sponsored by: Stormshield Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC == --- head/sys/arm/conf/GENERIC Thu May 3 01:10:41 2018(r333190) +++ head/sys/arm/conf/GENERIC Thu May 3 01:23:42 2018(r333191) @@ -21,6 +21,7 @@ ident GENERIC cpuCPU_CORTEXA +cpuCPU_MV_PJ4B optionsSMP_ON_UP machinearm armv7 makeoptionsCONF_CFLAGS="-march=armv7a" @@ -38,6 +39,7 @@ files "../allwinner/h3/files.h3" files "../broadcom/bcm2835/files.bcm2836" files "../broadcom/bcm2835/files.bcm283x" files "../freescale/imx/files.imx6" +files "../mv/files.arm7" files "../nvidia/tegra124/files.tegra124" files "../qemu/files.qemu" files "../ti/files.ti" @@ -55,6 +57,8 @@ options SOC_ALLWINNER_A83T optionsSOC_ALLWINNER_H2PLUS optionsSOC_ALLWINNER_H3 optionsSOC_BCM2836 +optionsSOC_MV_ARMADA38X +optionsSOC_MV_ARMADAXP optionsSOC_TI_AM335X optionsSOC_OMAP4 @@ -185,9 +189,10 @@ device pass# Passthrough device (direct ATA/SCSI a # USB support optionsUSB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb -#deviceuhci +device uhci device ohci device ehci +device xhci device dwcotg # DWC OTG controller device musb @@ -196,6 +201,8 @@ device umass # Disks/Mass storage - Requires scbus device uhid# "Human Interface Devices" device ukbd# Allow keyboard like HIDs to control console +device firmware + # Device mode support device usb_template# Control of the gadget @@ -204,6 +211,10 @@ device loop device ether device vlan# 802.1Q VLAN support device bpf +device mii +device mdio +device etherswitch +device e6000sw # Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! @@ -215,6 +226,7 @@ device cgem# Zynq-7000 gig ethernet device device dwc # 10/100/1000 integrated GMAC controller device emac# 10/100 integrated EMAC controller device ffec# Freescale Fast Ethernet Controller +device neta# Marvell 10/100/1000 Network controller device smsc# SMSC LAN91C111 # Sound support @@ -243,6 +255,11 @@ device ti_sdma # Extensible Firmware Interface optionsEFI + +# Marvell Cryptographic Engine and Security Accelerator +device cesa +device crypto +device cryptodev # Flattened Device Tree optionsFDT # Configure using FDT/DTB data ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333190 - head/sys/arm/mv
Author: mw Date: Thu May 3 01:10:41 2018 New Revision: 333190 URL: https://svnweb.freebsd.org/changeset/base/333190 Log: Fix SoC identification issue on Marvell platforms Marvell SoC identification function was called by SYSINIT on all armv7 platforms, which brakes platforms other than Marvell built with GENERIC config. Fix this by shifting SoC identifying to Marvell platform initialization. Submitted by: Patryk DudaReviewed by: manu Tested by: manu Obtained from: Semihalf Sponsored by: Stormshield Modified: head/sys/arm/mv/mv_common.c Modified: head/sys/arm/mv/mv_common.c == --- head/sys/arm/mv/mv_common.c Thu May 3 00:57:19 2018(r333189) +++ head/sys/arm/mv/mv_common.c Thu May 3 01:10:41 2018(r333190) @@ -180,6 +180,8 @@ static int fdt_win_setup(void); static int fdt_win_process_child(phandle_t, struct soc_node_spec *, const char*); +static void soc_identify(uint32_t, uint32_t); + static uint32_t dev_mask = 0; static int cpu_wins_no = 0; static int eth_port = 0; @@ -441,13 +443,13 @@ mv_check_soc_family() case MV_DEV_MV78460: soc_decode_win_spec = _win_specs[MV_SOC_ARMADA_XP]; soc_family = MV_SOC_ARMADA_XP; - return (MV_SOC_ARMADA_XP); + break; case MV_DEV_88F6828: case MV_DEV_88F6820: case MV_DEV_88F6810: soc_decode_win_spec = _win_specs[MV_SOC_ARMADA_38X]; soc_family = MV_SOC_ARMADA_38X; - return (MV_SOC_ARMADA_38X); + break; case MV_DEV_88F5181: case MV_DEV_88F5182: case MV_DEV_88F5281: @@ -462,11 +464,15 @@ mv_check_soc_family() case MV_DEV_MV78160: soc_decode_win_spec = _win_specs[MV_SOC_ARMV5]; soc_family = MV_SOC_ARMV5; - return (MV_SOC_ARMV5); + break; default: soc_family = MV_SOC_UNSUPPORTED; return (MV_SOC_UNSUPPORTED); } + + soc_identify(dev, rev); + + return (soc_family); } static __inline void @@ -702,14 +708,12 @@ soc_id(uint32_t *dev, uint32_t *rev) } static void -soc_identify(void) +soc_identify(uint32_t d, uint32_t r) { - uint32_t d, r, size, mode, freq; + uint32_t size, mode, freq; const char *dev; const char *rev; - soc_id(, ); - printf("SOC: "); if (bootverbose) printf("(0x%4x:0x%02x) ", d, r); @@ -827,20 +831,6 @@ soc_identify(void) break; } } - -static void -platform_identify(void *dummy) -{ - - soc_identify(); - - /* -* XXX Board identification e.g. read out from FPGA or similar should -* go here -*/ -} -SYSINIT(platform_identify, SI_SUB_CPU, SI_ORDER_SECOND, platform_identify, -NULL); #ifdef KDB static void ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333189 - head/etc
Author: eadler Date: Thu May 3 00:57:19 2018 New Revision: 333189 URL: https://svnweb.freebsd.org/changeset/base/333189 Log: [etc] Update newsyslog.conf default comment Remove line about allowed flags. It was missing 'pRTY' and is duplicative of the man page. It didn't describe the flags in any detail to help remind users of how to configure newsylog. Modified: head/etc/newsyslog.conf Modified: head/etc/newsyslog.conf == --- head/etc/newsyslog.conf Wed May 2 23:43:33 2018(r333188) +++ head/etc/newsyslog.conf Thu May 3 00:57:19 2018(r333189) @@ -8,8 +8,6 @@ # is no process which needs to be signalled when a given log file is # rotated, then the entry for that file should include the 'N' flag. # -# The 'flags' field is one or more of the letters: BCDGJNUXZ or a '-'. -# # Note: some sites will want to select more restrictive protections than the # defaults. In particular, it may be desirable to switch many of the 644 # entries to 640 or 600. For example, some sites will consider the ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333188 - head/share/mk
Author: emaste Date: Wed May 2 23:43:33 2018 New Revision: 333188 URL: https://svnweb.freebsd.org/changeset/base/333188 Log: Build lld as long as we have a C++11 host compiler As with Clang, build our toolchain components by default when the host compiler is capable of doing so, to make them available for testing and experimentation. Sponsored by: The FreeBSD Foundation Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Wed May 2 22:36:10 2018(r333187) +++ head/share/mk/src.opts.mk Wed May 2 23:43:33 2018(r333188) @@ -242,8 +242,8 @@ __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC # If an external compiler that supports C++11 is used as ${CC} and Clang # supports the target, then Clang is enabled but GCC is installed as the # default /usr/bin/cc. -__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX GPL_DTC -__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC LLD +__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX GPL_DTC LLD +__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC .else # Everything else disables Clang, and uses GCC instead. __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333186 - head/sys/netinet6
Author: tuexen Date: Wed May 2 22:11:16 2018 New Revision: 333186 URL: https://svnweb.freebsd.org/changeset/base/333186 Log: Send an ICMPv6 PacketTooBig message in case of forwading a packet which is too big for the outgoing interface and no firewall is involed. This problem was introduced in https://svnweb.freebsd.org/changeset/base/324996 Thanks to Irene Ruengeler for finding the bug and testing the fix. Reviewed by: kp@ MFC after:3 days Modified: head/sys/netinet6/ip6_fastfwd.c Modified: head/sys/netinet6/ip6_fastfwd.c == --- head/sys/netinet6/ip6_fastfwd.c Wed May 2 21:32:20 2018 (r333185) +++ head/sys/netinet6/ip6_fastfwd.c Wed May 2 22:11:16 2018 (r333186) @@ -195,12 +195,19 @@ passin: in6_ifstat_inc(rcvif, ifs6_in_noroute); goto dropin; } + if (!PFIL_HOOKED(_inet6_pfil_hook)) { + if (m->m_pkthdr.len > nh.nh_mtu) { + in6_ifstat_inc(nh.nh_ifp, ifs6_in_toobig); + icmp6_error(m, ICMP6_PACKET_TOO_BIG, 0, nh.nh_mtu); + m = NULL; + goto dropout; + } + goto passout; + } /* * Outgoing packet firewall processing. */ - if (!PFIL_HOOKED(_inet6_pfil_hook)) - goto passout; if (pfil_run_hooks(_inet6_pfil_hook, , nh.nh_ifp, PFIL_OUT, PFIL_FWD, NULL) != 0 || m == NULL) goto dropout; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333185 - in head: . sys/modules/ixgb
Author: sbruno Date: Wed May 2 21:32:20 2018 New Revision: 333185 URL: https://svnweb.freebsd.org/changeset/base/333185 Log: Follow up to r333173, Retire ixgb(4) Remove sys/modules/ixgb and add the linked man page for if_ixgb via ObsoleteFiles. Submitted by: kbowling Relnotes: yes Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D15273 Deleted: head/sys/modules/ixgb/ Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Wed May 2 21:29:42 2018(r333184) +++ head/ObsoleteFiles.inc Wed May 2 21:32:20 2018(r333185) @@ -39,6 +39,7 @@ # done # 20180502: retire ixgb +OLD_FILES+=usr/share/man/man4/if_ixgb.4.gz OLD_FILES+=usr/share/man/man4/ixgb.4.gz # 20180501: retire lmc OLD_FILES+=usr/include/dev/lmc/if_lmc.h ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333184 - head/sys/fs/nfsserver
Author: rmacklem Date: Wed May 2 21:29:42 2018 New Revision: 333184 URL: https://svnweb.freebsd.org/changeset/base/333184 Log: Revert r333183, since I am not sure that just initializing the list is the correct thing to do and that is already done without this commit. Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c == --- head/sys/fs/nfsserver/nfs_nfsdstate.c Wed May 2 20:36:11 2018 (r333183) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Wed May 2 21:29:42 2018 (r333184) @@ -387,7 +387,6 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsc LIST_FOREACH(tstp, _clp->lc_stateid[i], ls_hash) tstp->ls_clp = new_clp; } - LIST_INIT(_clp->lc_session); LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp, lc_hash); nfsstatsv1.srvclients++; @@ -452,7 +451,6 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsc LIST_FOREACH(tstp, _clp->lc_stateid[i], ls_hash) tstp->ls_clp = new_clp; } - LIST_INIT(_clp->lc_session); LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp, lc_hash); nfsstatsv1.srvclients++; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333183 - head/sys/fs/nfsserver
Author: rmacklem Date: Wed May 2 20:36:11 2018 New Revision: 333183 URL: https://svnweb.freebsd.org/changeset/base/333183 Log: Add two missing LIST_INIT()s. This patch adds two missing LIST_INIT()s. Found by inspection. In practice, these are currently no-ops, since the structure they are in is malloc'd with M_ZERO and all LIST_INIT does is set the pointer in the list head to NULL. (In other words, the M_ZERO has already correctly initialized it.) MFC after:2 months Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c == --- head/sys/fs/nfsserver/nfs_nfsdstate.c Wed May 2 20:22:03 2018 (r333182) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Wed May 2 20:36:11 2018 (r333183) @@ -387,6 +387,7 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsc LIST_FOREACH(tstp, _clp->lc_stateid[i], ls_hash) tstp->ls_clp = new_clp; } + LIST_INIT(_clp->lc_session); LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp, lc_hash); nfsstatsv1.srvclients++; @@ -451,6 +452,7 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsc LIST_FOREACH(tstp, _clp->lc_stateid[i], ls_hash) tstp->ls_clp = new_clp; } + LIST_INIT(_clp->lc_session); LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp, lc_hash); nfsstatsv1.srvclients++; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333182 - head/sys/dev/mlx5/mlx5_en
Author: kib Date: Wed May 2 20:22:03 2018 New Revision: 333182 URL: https://svnweb.freebsd.org/changeset/base/333182 Log: mlx5en: Always allow VLAN id 0. According to the 802.1Q-2014 9.6 VLAN Tag Control Information, VID value 0 means that there is no VLAN tag assigned to the packet, and only PCP and DEI values from the tag are meaningful. Current flow table programming filter out such packets. When programming VLAN filter for flow table, unconditionally add rule which accept packets with VLAN id 0. The packets are already handled correctly by the network stack. Reviewed by: hselasky, slavash Sponsored by: Mellanox Technologies MFC after:1 week Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c == --- head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c Wed May 2 20:15:02 2018(r333181) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c Wed May 2 20:22:03 2018(r333182) @@ -696,6 +696,7 @@ mlx5e_add_all_vlan_rules(struct mlx5e_priv *priv) int err; int i; + set_bit(0, priv->vlan.active_vlans); for_each_set_bit(i, priv->vlan.active_vlans, VLAN_N_VID) { err = mlx5e_add_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_MATCH_VID, i); @@ -727,6 +728,7 @@ mlx5e_del_all_vlan_rules(struct mlx5e_priv *priv) for_each_set_bit(i, priv->vlan.active_vlans, VLAN_N_VID) mlx5e_del_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_MATCH_VID, i); + clear_bit(0, priv->vlan.active_vlans); } #definemlx5e_for_each_hash_node(hn, tmp, hash, i) \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333180 - head/sys/dev/nvme
Author: mav Date: Wed May 2 20:13:03 2018 New Revision: 333180 URL: https://svnweb.freebsd.org/changeset/base/333180 Log: Fix LOR between controller and queue locks. Admin pass-through requests took controller lock before the queue lock, but in case of request submission to a failed controller controller lock was taken after the queue lock. Fix that by reducing the lock scopes and switching to mtx_pool locks to track pass-through request completion. Sponsored by: iXsystems, Inc. Modified: head/sys/dev/nvme/nvme_ctrlr.c Modified: head/sys/dev/nvme/nvme_ctrlr.c == --- head/sys/dev/nvme/nvme_ctrlr.c Wed May 2 20:10:27 2018 (r333179) +++ head/sys/dev/nvme/nvme_ctrlr.c Wed May 2 20:13:03 2018 (r333180) @@ -233,11 +233,12 @@ nvme_ctrlr_fail_req_task(void *arg, int pending) struct nvme_request *req; mtx_lock(>lock); - while (!STAILQ_EMPTY(>fail_req)) { - req = STAILQ_FIRST(>fail_req); + while ((req = STAILQ_FIRST(>fail_req)) != NULL) { STAILQ_REMOVE_HEAD(>fail_req, stailq); + mtx_unlock(>lock); nvme_qpair_manual_complete_request(req->qpair, req, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, TRUE); + mtx_lock(>lock); } mtx_unlock(>lock); } @@ -978,6 +979,7 @@ static void nvme_pt_done(void *arg, const struct nvme_completion *cpl) { struct nvme_pt_command *pt = arg; + struct mtx *mtx = pt->driver_lock; uint16_t status; bzero(>cpl, sizeof(pt->cpl)); @@ -987,9 +989,10 @@ nvme_pt_done(void *arg, const struct nvme_completion * status &= ~NVME_STATUS_P_MASK; pt->cpl.status = status; - mtx_lock(pt->driver_lock); + mtx_lock(mtx); + pt->driver_lock = NULL; wakeup(pt); - mtx_unlock(pt->driver_lock); + mtx_unlock(mtx); } int @@ -1058,15 +1061,7 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctr req->cmd.nsid = htole32(nsid); - if (is_admin_cmd) - mtx = >lock; - else { - KASSERT((nsid-1) >= 0 && (nsid-1) < NVME_MAX_NAMESPACES, - ("%s: invalid namespace ID %d\n", __func__, nsid)); - mtx = >ns[nsid-1].lock; - } - - mtx_lock(mtx); + mtx = mtx_pool_find(mtxpool_sleep, pt); pt->driver_lock = mtx; if (is_admin_cmd) @@ -1074,10 +1069,10 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctr else nvme_ctrlr_submit_io_request(ctrlr, req); - mtx_sleep(pt, mtx, PRIBIO, "nvme_pt", 0); + mtx_lock(mtx); + while (pt->driver_lock != NULL) + mtx_sleep(pt, mtx, PRIBIO, "nvme_pt", 0); mtx_unlock(mtx); - - pt->driver_lock = NULL; err: if (buf != NULL) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333178 - head/sys/netinet
Author: tuexen Date: Wed May 2 20:04:31 2018 New Revision: 333178 URL: https://svnweb.freebsd.org/changeset/base/333178 Log: SImplify the call to tcp_drop(), since the handling of soft error is also done in tcp_drop(). No functional change. Sponsored by: Netflix, Inc. Modified: head/sys/netinet/tcp_timer.c Modified: head/sys/netinet/tcp_timer.c == --- head/sys/netinet/tcp_timer.cWed May 2 20:04:25 2018 (r333177) +++ head/sys/netinet/tcp_timer.cWed May 2 20:04:31 2018 (r333178) @@ -662,8 +662,7 @@ tcp_timer_rexmt(void * xtp) tcp_inpinfo_lock_del(inp, tp); goto out; } - tp = tcp_drop(tp, tp->t_softerror ? - tp->t_softerror : ETIMEDOUT); + tp = tcp_drop(tp, ETIMEDOUT); tcp_inpinfo_lock_del(inp, tp); goto out; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333177 - head/sys/arm/broadcom/bcm2835
Author: gonzo Date: Wed May 2 20:04:25 2018 New Revision: 333177 URL: https://svnweb.freebsd.org/changeset/base/333177 Log: Unbreak RaspberryPi 2 boot after r332839 r332839 changed number of cells per interrupt for local_intc from 1 to 2 to pass type of IRQ. Driver expected only 1 cell so after r332839 all interrupt children of local_intc failed to allocate IRQ resource. Fix this regression by relaxing check for number of cells in interrupt property to be either 1 or 2. PR: 227904 Modified: head/sys/arm/broadcom/bcm2835/bcm2836.c Modified: head/sys/arm/broadcom/bcm2835/bcm2836.c == --- head/sys/arm/broadcom/bcm2835/bcm2836.c Wed May 2 19:36:46 2018 (r333176) +++ head/sys/arm/broadcom/bcm2835/bcm2836.c Wed May 2 20:04:25 2018 (r333177) @@ -454,8 +454,10 @@ bcm_lintc_map_intr(device_t dev, struct intr_map_data return (ENOTSUP); daf = (struct intr_map_data_fdt *)data; - if (daf->ncells != 1 || daf->cells[0] >= BCM_LINTC_NIRQS) + if (daf->ncells > 2 || daf->cells[0] >= BCM_LINTC_NIRQS) return (EINVAL); + + /* TODO: handle IRQ type here */ sc = device_get_softc(dev); *isrcp = >bls_isrcs[daf->cells[0]].bli_isrc; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333176 - head/usr.sbin/traceroute6
Author: tuexen Date: Wed May 2 19:36:46 2018 New Revision: 333176 URL: https://svnweb.freebsd.org/changeset/base/333176 Log: Fix in the documentation that the default hop limit is not 30, but the value of the sysctl variable net.inet6.ip6.hlim. This is true since https://svnweb.freebsd.org/base?view=revision=122574 The default of 30 (which was correct up to r122574) was incorrectly documented in https://svnweb.freebsd.org/base?view=revision=130268 Thanks to Timo Voelker for makeing me aware of the inconsistency between to code and the documentation. MFC after:3 days Modified: head/usr.sbin/traceroute6/traceroute6.8 Modified: head/usr.sbin/traceroute6/traceroute6.8 == --- head/usr.sbin/traceroute6/traceroute6.8 Wed May 2 19:36:29 2018 (r333175) +++ head/usr.sbin/traceroute6/traceroute6.8 Wed May 2 19:36:46 2018 (r333176) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 27, 2018 +.Dd May 2, 2018 .Dt TRACEROUTE6 8 .Os .\" @@ -112,7 +112,10 @@ is not specified, and only numeric addresses if is specified. .It Fl m Ar hoplimit Specify maximum hoplimit, up to 255. -The default is 30 hops. +The default is the value of the +.Va net.inet6.ip6.hlim +.Xr sysctl 8 +(the same default used for TCP connections). .It Fl n Do not resolve numeric address to hostname. .It Fl N ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333175 - in head/sys: kern net netinet netinet6 sys
Author: shurd Date: Wed May 2 19:36:29 2018 New Revision: 333175 URL: https://svnweb.freebsd.org/changeset/base/333175 Log: Separate list manipulation locking from state change in multicast Multicast incorrectly calls in to drivers with a mutex held causing drivers to have to go through all manner of contortions to use a non sleepable lock. Serialize multicast updates instead. Submitted by: mmacyReviewed by: shurd, sbruno Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D14969 Modified: head/sys/kern/subr_gtaskqueue.c head/sys/kern/subr_witness.c head/sys/net/if.c head/sys/netinet/igmp.c head/sys/netinet/igmp_var.h head/sys/netinet/in.c head/sys/netinet/in_mcast.c head/sys/netinet/in_pcb.c head/sys/netinet/in_var.h head/sys/netinet/ip_carp.c head/sys/netinet6/in6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/in6_mcast.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_var.h head/sys/netinet6/mld6.c head/sys/netinet6/mld6_var.h head/sys/sys/gtaskqueue.h Modified: head/sys/kern/subr_gtaskqueue.c == --- head/sys/kern/subr_gtaskqueue.c Wed May 2 17:41:00 2018 (r333174) +++ head/sys/kern/subr_gtaskqueue.c Wed May 2 19:36:29 2018 (r333175) @@ -53,6 +53,7 @@ static void gtaskqueue_thread_enqueue(void *); static voidgtaskqueue_thread_loop(void *arg); TASKQGROUP_DEFINE(softirq, mp_ncpus, 1); +TASKQGROUP_DEFINE(config, 1, 1); struct gtaskqueue_busy { struct gtask*tb_running; @@ -662,7 +663,7 @@ SYSINIT(tqg_record_smp_started, SI_SUB_SMP, SI_ORDER_F void taskqgroup_attach(struct taskqgroup *qgroup, struct grouptask *gtask, -void *uniq, int irq, char *name) +void *uniq, int irq, const char *name) { cpuset_t mask; int qid, error; @@ -976,4 +977,13 @@ void taskqgroup_destroy(struct taskqgroup *qgroup) { +} + +void +taskqgroup_config_gtask_init(void *ctx, struct grouptask *gtask, gtask_fn_t *fn, + const char *name) +{ + + GROUPTASK_INIT(gtask, 0, fn, ctx); + taskqgroup_attach(qgroup_config, gtask, gtask, -1, name); } Modified: head/sys/kern/subr_witness.c == --- head/sys/kern/subr_witness.cWed May 2 17:41:00 2018 (r333174) +++ head/sys/kern/subr_witness.cWed May 2 19:36:29 2018 (r333175) @@ -532,18 +532,22 @@ static struct witness_order_list_entry order_lists[] = * IPv4 multicast: * protocol locks before interface locks, after UDP locks. */ + { "in_multi_sx", _class_sx }, { "udpinp", _class_rw }, - { "in_multi_mtx", _class_mtx_sleep }, + { "in_multi_list_mtx", _class_mtx_sleep }, { "igmp_mtx", _class_mtx_sleep }, + { "ifnet_rw", _class_rw }, { "if_addr_lock", _class_rw }, { NULL, NULL }, /* * IPv6 multicast: * protocol locks before interface locks, after UDP locks. */ + { "in6_multi_sx", _class_sx }, { "udpinp", _class_rw }, - { "in6_multi_mtx", _class_mtx_sleep }, + { "in6_multi_list_mtx", _class_mtx_sleep }, { "mld_mtx", _class_mtx_sleep }, + { "ifnet_rw", _class_rw }, { "if_addr_lock", _class_rw }, { NULL, NULL }, /* Modified: head/sys/net/if.c == --- head/sys/net/if.c Wed May 2 17:41:00 2018(r333174) +++ head/sys/net/if.c Wed May 2 19:36:29 2018(r333175) @@ -985,11 +985,13 @@ static void if_purgemaddrs(struct ifnet *ifp) { struct ifmultiaddr *ifma; - struct ifmultiaddr *next; IF_ADDR_WLOCK(ifp); - TAILQ_FOREACH_SAFE(ifma, >if_multiaddrs, ifma_link, next) + while (!TAILQ_EMPTY(>if_multiaddrs)) { + ifma = TAILQ_FIRST(>if_multiaddrs); + TAILQ_REMOVE(>if_multiaddrs, ifma, ifma_link); if_delmulti_locked(ifp, ifma, 1); + } IF_ADDR_WUNLOCK(ifp); } @@ -3429,6 +3431,12 @@ if_addmulti(struct ifnet *ifp, struct sockaddr *sa, struct sockaddr_dl sdl; int error; +#ifdef INET + IN_MULTI_LIST_UNLOCK_ASSERT(); +#endif +#ifdef INET6 + IN6_MULTI_LIST_UNLOCK_ASSERT(); +#endif /* * If the address is already present, return a new reference to it; * otherwise, allocate storage and set up a new address. @@ -3610,6 +3618,9 @@ if_delmulti_ifma(struct ifmultiaddr *ifma) struct ifnet *ifp; int lastref; +#ifdef INET + IN_MULTI_LIST_UNLOCK_ASSERT(); +#endif ifp = ifma->ifma_ifp; #ifdef DIAGNOSTIC if (ifp == NULL) { @@ -3711,8 +3722,7 @@ if_delmulti_locked(struct ifnet *ifp, struct ifmultiad if_freemulti(ll_ifma); }
Re: svn commit: r333174 - head/sys/amd64/vmm/io
That places the MFC right before the optional 11.2 Beta3, I would rather see this "low risk" change merged before May 11th, the code freeze date and Beta1, if it is desired in 11.2, for maximal test exposure. Sure, that can be done. later, Peter. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r333174 - head/sys/amd64/vmm/io
[ Charset UTF-8 unsupported, converting... ] > Author: grehan > Date: Wed May 2 17:41:00 2018 > New Revision: 333174 > URL: https://svnweb.freebsd.org/changeset/base/333174 > > Log: > Use PCI power-mgmt to reset a device if FLR fails. > > A large number of devices don't support PCIe FLR, in particular > graphics adapters. Use PCI power management to perform the > reset if FLR fails or isn't available, by cycling the device > through the D3 state. > > This has been tested by a number of users with Nvidia and AMD GPUs. > > Submitted and tested by: Matt Macy > Reviewed by:jhb, imp, rgrimes > MFC after: 3 weeks That places the MFC right before the optional 11.2 Beta3, I would rather see this "low risk" change merged before May 11th, the code freeze date and Beta1, if it is desired in 11.2, for maximal test exposure. > Differential Revision: https://reviews.freebsd.org/D15268 > > Modified: > head/sys/amd64/vmm/io/ppt.c > > Modified: head/sys/amd64/vmm/io/ppt.c > == > --- head/sys/amd64/vmm/io/ppt.c Wed May 2 15:59:15 2018 > (r333173) > +++ head/sys/amd64/vmm/io/ppt.c Wed May 2 17:41:00 2018 > (r333174) > @@ -353,6 +353,30 @@ ppt_is_mmio(struct vm *vm, vm_paddr_t gpa) > return (FALSE); > } > > +static void > +ppt_pci_reset(device_t dev) > +{ > + int ps; > + > + if (pcie_flr(dev, > + max(pcie_get_max_completion_timeout(dev) / 1000, 10), > + true)) > + return; > + > + /* > + * If FLR fails, attempt a power-management reset by cycling > + * the device in/out of D3 state. > + * PCI spec says we can only go into D3 state from D0 state. > + * Transition from D[12] into D0 before going to D3 state. > + */ > + ps = pci_get_powerstate(dev); > + if (ps != PCI_POWERSTATE_D0 && ps != PCI_POWERSTATE_D3) > + pci_set_powerstate(dev, PCI_POWERSTATE_D0); > + if (pci_get_powerstate(dev) != PCI_POWERSTATE_D3) > + pci_set_powerstate(dev, PCI_POWERSTATE_D3); > + pci_set_powerstate(dev, ps); > +} > + > int > ppt_assign_device(struct vm *vm, int bus, int slot, int func) > { > @@ -368,9 +392,7 @@ ppt_assign_device(struct vm *vm, int bus, int slot, in > return (EBUSY); > > pci_save_state(ppt->dev); > - pcie_flr(ppt->dev, > - max(pcie_get_max_completion_timeout(ppt->dev) / 1000, 10), > - true); > + ppt_pci_reset(ppt->dev); > pci_restore_state(ppt->dev); > ppt->vm = vm; > iommu_add_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); > @@ -393,9 +415,7 @@ ppt_unassign_device(struct vm *vm, int bus, int slot, > return (EBUSY); > > pci_save_state(ppt->dev); > - pcie_flr(ppt->dev, > - max(pcie_get_max_completion_timeout(ppt->dev) / 1000, 10), > - true); > + ppt_pci_reset(ppt->dev); > pci_restore_state(ppt->dev); > ppt_unmap_mmio(vm, ppt); > ppt_teardown_msi(ppt); > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333174 - head/sys/amd64/vmm/io
Author: grehan Date: Wed May 2 17:41:00 2018 New Revision: 333174 URL: https://svnweb.freebsd.org/changeset/base/333174 Log: Use PCI power-mgmt to reset a device if FLR fails. A large number of devices don't support PCIe FLR, in particular graphics adapters. Use PCI power management to perform the reset if FLR fails or isn't available, by cycling the device through the D3 state. This has been tested by a number of users with Nvidia and AMD GPUs. Submitted and tested by: Matt Macy Reviewed by: jhb, imp, rgrimes MFC after:3 weeks Differential Revision:https://reviews.freebsd.org/D15268 Modified: head/sys/amd64/vmm/io/ppt.c Modified: head/sys/amd64/vmm/io/ppt.c == --- head/sys/amd64/vmm/io/ppt.c Wed May 2 15:59:15 2018(r333173) +++ head/sys/amd64/vmm/io/ppt.c Wed May 2 17:41:00 2018(r333174) @@ -353,6 +353,30 @@ ppt_is_mmio(struct vm *vm, vm_paddr_t gpa) return (FALSE); } +static void +ppt_pci_reset(device_t dev) +{ + int ps; + + if (pcie_flr(dev, +max(pcie_get_max_completion_timeout(dev) / 1000, 10), +true)) + return; + + /* +* If FLR fails, attempt a power-management reset by cycling +* the device in/out of D3 state. +* PCI spec says we can only go into D3 state from D0 state. +* Transition from D[12] into D0 before going to D3 state. +*/ + ps = pci_get_powerstate(dev); + if (ps != PCI_POWERSTATE_D0 && ps != PCI_POWERSTATE_D3) + pci_set_powerstate(dev, PCI_POWERSTATE_D0); + if (pci_get_powerstate(dev) != PCI_POWERSTATE_D3) + pci_set_powerstate(dev, PCI_POWERSTATE_D3); + pci_set_powerstate(dev, ps); +} + int ppt_assign_device(struct vm *vm, int bus, int slot, int func) { @@ -368,9 +392,7 @@ ppt_assign_device(struct vm *vm, int bus, int slot, in return (EBUSY); pci_save_state(ppt->dev); - pcie_flr(ppt->dev, - max(pcie_get_max_completion_timeout(ppt->dev) / 1000, 10), - true); + ppt_pci_reset(ppt->dev); pci_restore_state(ppt->dev); ppt->vm = vm; iommu_add_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); @@ -393,9 +415,7 @@ ppt_unassign_device(struct vm *vm, int bus, int slot, return (EBUSY); pci_save_state(ppt->dev); - pcie_flr(ppt->dev, - max(pcie_get_max_completion_timeout(ppt->dev) / 1000, 10), - true); + ppt_pci_reset(ppt->dev); pci_restore_state(ppt->dev); ppt_unmap_mmio(vm, ppt); ppt_teardown_msi(ppt); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333173 - in head: . share/man/man4 sys/conf sys/dev/ixgb sys/i386/conf sys/modules sys/modules/ixgb sys/netpfil/pf sys/sparc64/conf tools/kerneldoc/subsys tools/tools/tinybsd/conf/brid...
Author: sbruno Date: Wed May 2 15:59:15 2018 New Revision: 333173 URL: https://svnweb.freebsd.org/changeset/base/333173 Log: Retire ixgb(4) This driver was for an early and uncommon legacy PCI 10GbE for a single ASIC, Intel 82597EX. Intel quickly shifted to the long lived ixgbe family. Submitted by: kbowling Reviewed by: brooks imp jeffrey.e.pie...@intel.com Relnotes: yes Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D15234 Deleted: head/share/man/man4/ixgb.4 head/sys/dev/ixgb/ head/sys/modules/ixgb/Makefile head/tools/kerneldoc/subsys/Doxyfile-dev_ixgb Modified: head/ObsoleteFiles.inc head/UPDATING head/share/man/man4/Makefile head/share/man/man4/polling.4 head/share/man/man4/vlan.4 head/sys/conf/NOTES head/sys/conf/files head/sys/i386/conf/GENERIC head/sys/modules/Makefile head/sys/netpfil/pf/pf.c head/sys/sparc64/conf/GENERIC head/tools/tools/tinybsd/conf/bridge/TINYBSD head/tools/tools/tinybsd/conf/default/TINYBSD head/tools/tools/tinybsd/conf/firewall/TINYBSD head/tools/tools/tinybsd/conf/vpn/TINYBSD head/tools/tools/tinybsd/conf/wireless/TINYBSD head/tools/tools/tinybsd/conf/wrap/TINYBSD head/usr.sbin/bsdconfig/share/device.subr Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Wed May 2 15:45:31 2018(r333172) +++ head/ObsoleteFiles.inc Wed May 2 15:59:15 2018(r333173) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20180502: retire ixgb +OLD_FILES+=usr/share/man/man4/ixgb.4.gz # 20180501: retire lmc OLD_FILES+=usr/include/dev/lmc/if_lmc.h OLD_DIRS+=usr/include/dev/lmc Modified: head/UPDATING == --- head/UPDATING Wed May 2 15:45:31 2018(r333172) +++ head/UPDATING Wed May 2 15:59:15 2018(r333173) @@ -51,6 +51,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ** SPECIAL WARNING: ** +20180502: + The ixgb(4) driver has been removed. This driver was for an early and + uncommon legacy PCI 10GbE for a single ASIC, Intel 82597EX. Intel + quickly shifted to the long lived ixgbe family. If you have device + ixgb in your kernel config file it must be removed. + 20180501: The lmc(4) driver has been removed. This was a WAN interface card that was already reportedly rare in 2003, and had an ambiguous Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileWed May 2 15:45:31 2018 (r333172) +++ head/share/man/man4/MakefileWed May 2 15:59:15 2018 (r333173) @@ -244,7 +244,6 @@ MAN=aac.4 \ iwmfw.4 \ iwn.4 \ iwnfw.4 \ - ixgb.4 \ ixgbe.4 \ ixl.4 \ ixlv.4 \ @@ -675,7 +674,6 @@ MLINKS+=ipw.4 if_ipw.4 MLINKS+=iwi.4 if_iwi.4 MLINKS+=iwm.4 if_iwm.4 MLINKS+=iwn.4 if_iwn.4 -MLINKS+=ixgb.4 if_ixgb.4 MLINKS+=ixgbe.4 ix.4 MLINKS+=ixgbe.4 if_ix.4 MLINKS+=ixgbe.4 if_ixgbe.4 Modified: head/share/man/man4/polling.4 == --- head/share/man/man4/polling.4 Wed May 2 15:45:31 2018 (r333172) +++ head/share/man/man4/polling.4 Wed May 2 15:59:15 2018 (r333173) @@ -185,7 +185,6 @@ As of this writing, the .Xr fwip 4 , .Xr fxp 4 , .Xr igb 4 , -.Xr ixgb 4 , .Xr nfe 4 , .Xr nge 4 , .Xr re 4 , Modified: head/share/man/man4/vlan.4 == --- head/share/man/man4/vlan.4 Wed May 2 15:45:31 2018(r333172) +++ head/share/man/man4/vlan.4 Wed May 2 15:59:15 2018(r333173) @@ -132,7 +132,6 @@ in hardware: .Xr cxgbe 4 , .Xr em 4 , .Xr igb 4 , -.Xr ixgb 4 , .Xr ixgbe 4 , .Xr jme 4 , .Xr liquidio 4 , Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Wed May 2 15:45:31 2018(r333172) +++ head/sys/conf/NOTES Wed May 2 15:59:15 2018(r333173) @@ -2123,7 +2123,6 @@ devicecxgbe # Chelsio T4-T6 1/10/25/40/100 Gigabit device cxgbev # Chelsio T4-T6 Virtual Functions device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel Pro/1000 Gigabit Ethernet -device ixgb# Intel Pro/10Gbe PCI-X Ethernet device ix # Intel Pro/10Gbe PCIE Ethernet device ixv # Intel Pro/10Gbe PCIE Ethernet VF device le # AMD Am7900 LANCE and Am79C9xx PCnet Modified: head/sys/conf/files
svn commit: r333172 - head/usr.bin/grep
Author: kevans Date: Wed May 2 15:45:31 2018 New Revision: 333172 URL: https://svnweb.freebsd.org/changeset/base/333172 Log: bsdgrep: Adjust a missed NLS reference that was invalidated by recent work Submitted by: Dan McGregorModified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c == --- head/usr.bin/grep/util.cWed May 2 15:21:51 2018(r333171) +++ head/usr.bin/grep/util.cWed May 2 15:45:31 2018(r333172) @@ -389,7 +389,7 @@ procfile(const char *fn) printf("%s%c", fn, nullflag ? 0 : '\n'); if (c && !cflag && !lflag && !Lflag && binbehave == BINFILE_BIN && f->binary && !qflag) - printf(getstr(8), fn); + printf(getstr(7), fn); free(pc.ln.file); free(f); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r332770 - in head/sys: conf netinet netinet/tcp_stacks sys
On 05/01/18 at 05:11P, Warner Losh wrote: > On Tue, May 1, 2018 at 5:00 PM, Jonathan Looneywrote: > > > On Mon, Apr 30, 2018 at 3:16 AM, hiren panchasara < > > hi...@strugglingcoder.info> wrote: > > > > > > In my understanding, default stack currently cannot use this mechanism. > > When do > > > you think that'll be possible? > > > > > > I think I can speak to Randall's plans for this. Thank you! > > > > Randall chose not to include in this commit the hooks for the default > > stack to use the high-precision timers. I believe his immediate priorities > > are upstreaming RACK and BBR. After that, if there is demand, he may > > upstream the (relatively untested) code that allows the default stack to > > use the high-precision timers (protected by a non-default kernel option) so > > others can choose to experiment with it. I believe it'd be useful to be able to pace packets with the traditional stack. > > > > (By the way, we're hoping to change the terminology away from describing > > the traditional FreeBSD stack as the "default" stack. In theory, someone > > can make any stack be their local default. We'll need to figure out what to > > actually call it at some point. My suggestion was the "FreeBSD" stack, > > although that is lacking in some imagination. In any case, we should have > > that discussion at some point in the future. > > > > Only slightly less poor would be "traditional" stack :) See, I've already started using this name. :-) Cheers, Hiren pgpx7Xm2Xao5i.pgp Description: PGP signature
svn commit: r333170 - head/sys/x86/xen
Author: royger Date: Wed May 2 10:20:55 2018 New Revision: 333170 URL: https://svnweb.freebsd.org/changeset/base/333170 Log: xen: fix formatting of xen_init_ops No functional change Sponsored by: Citrix Systems R Modified: head/sys/x86/xen/pv.c Modified: head/sys/x86/xen/pv.c == --- head/sys/x86/xen/pv.c Wed May 2 10:19:17 2018(r333169) +++ head/sys/x86/xen/pv.c Wed May 2 10:20:55 2018(r333170) @@ -119,7 +119,7 @@ struct init_ops xen_init_ops = { #ifdef SMP .start_all_aps = xen_pv_start_all_aps, #endif - .msi_init = xen_msi_init, + .msi_init = xen_msi_init, }; static struct bios_smap xen_smap[MAX_E820_ENTRIES]; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333169 - in head/sys: dev/xen/gntdev xen
Author: royger Date: Wed May 2 10:19:17 2018 New Revision: 333169 URL: https://svnweb.freebsd.org/changeset/base/333169 Log: xen: fix gntdev Current interface to the gntdev in FreeBSD is wrong, and mostly worked out of luck before the PTI FreeBSD fixes, when kernel and user-space where sharing the same page tables. On FreeBSD ioctls have the size of the passed struct encoded in the ioctl number, because the generic ioctl handler in the OS takes care of copying the data from user-space to kernel space, and then calls the device specific ioctl handler. Thus using ioctl structs with variable sizes is not possible. The fix is to turn the array of structs at the end of ioctl_gntdev_alloc_gref and ioctl_gntdev_map_grant_ref into pointers, that can be properly accessed from the kernel gntdev driver using the copyin/copyout functions. Note that this is exactly how it's done for the privcmd driver. Sponsored by: Citrix Systems R Modified: head/sys/dev/xen/gntdev/gntdev.c head/sys/xen/gntdev.h Modified: head/sys/dev/xen/gntdev/gntdev.c == --- head/sys/dev/xen/gntdev/gntdev.cWed May 2 08:26:59 2018 (r333168) +++ head/sys/dev/xen/gntdev/gntdev.cWed May 2 10:19:17 2018 (r333169) @@ -414,7 +414,7 @@ gntdev_alloc_gref(struct ioctl_gntdev_alloc_gref *arg) /* Copy the output values. */ arg->index = file_offset; for (i = 0; i < arg->count; i++) - arg->gref_ids[i] = grefs[i].gref_id; + suword32(>gref_ids[i], grefs[i].gref_id); /* Modify the per user private data. */ mtx_lock(_user->user_data_lock); @@ -659,16 +659,27 @@ gntdev_map_grant_ref(struct ioctl_gntdev_map_grant_ref gmap->grant_map_ops = malloc(sizeof(struct gnttab_map_grant_ref) * arg->count, M_GNTDEV, M_WAITOK | M_ZERO); - - error = get_file_offset(priv_user, arg->count, >file_index); - if (error != 0) - return (error); for (i = 0; i < arg->count; i++) { - gmap->grant_map_ops[i].dom = arg->refs[i].domid; - gmap->grant_map_ops[i].ref = arg->refs[i].ref; + struct ioctl_gntdev_grant_ref ref; + + error = copyin(>refs[i], , sizeof(ref)); + if (error != 0) { + free(gmap->grant_map_ops, M_GNTDEV); + free(gmap, M_GNTDEV); + return (error); + } + gmap->grant_map_ops[i].dom = ref.domid; + gmap->grant_map_ops[i].ref = ref.ref; gmap->grant_map_ops[i].handle = -1; gmap->grant_map_ops[i].flags = GNTMAP_host_map; + } + + error = get_file_offset(priv_user, arg->count, >file_index); + if (error != 0) { + free(gmap->grant_map_ops, M_GNTDEV); + free(gmap, M_GNTDEV); + return (error); } mtx_lock(_user->user_data_lock); Modified: head/sys/xen/gntdev.h == --- head/sys/xen/gntdev.h Wed May 2 08:26:59 2018(r333168) +++ head/sys/xen/gntdev.h Wed May 2 10:19:17 2018(r333169) @@ -139,7 +139,7 @@ struct ioctl_gntdev_alloc_gref { /* OUT parameters */ uint64_t index; /* Variable OUT parameter */ -uint32_t gref_ids[1]; +uint32_t *gref_ids; }; #define GNTDEV_ALLOC_FLAG_WRITABLE 1 @@ -168,7 +168,7 @@ struct ioctl_gntdev_map_grant_ref { /* OUT parameters */ uint64_t index; /* Variable IN parameter */ -struct ioctl_gntdev_grant_ref refs[1]; +struct ioctl_gntdev_grant_ref *refs; }; #define IOCTL_GNTDEV_UNMAP_GRANT_REF \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"