svn commit: r274223 - head/sys/netinet6
Author: glebius Date: Fri Nov 7 08:58:05 2014 New Revision: 274223 URL: https://svnweb.freebsd.org/changeset/base/274223 Log: Remove VNET_SYSCTL_ARG(). The generic sysctl(9) code handles that. Reviewed by: ae Sponsored by: Nginx, Inc. Modified: head/sys/netinet6/in6_proto.c Modified: head/sys/netinet6/in6_proto.c == --- head/sys/netinet6/in6_proto.c Fri Nov 7 06:37:20 2014 (r274222) +++ head/sys/netinet6/in6_proto.c Fri Nov 7 08:58:05 2014 (r274223) @@ -474,8 +474,6 @@ sysctl_ip6_temppltime(SYSCTL_HANDLER_ARG int error = 0; int old; - VNET_SYSCTL_ARG(req, arg1); - error = SYSCTL_OUT(req, arg1, sizeof(int)); if (error || !req->newptr) return (error); @@ -495,8 +493,6 @@ sysctl_ip6_tempvltime(SYSCTL_HANDLER_ARG int error = 0; int old; - VNET_SYSCTL_ARG(req, arg1); - error = SYSCTL_OUT(req, arg1, sizeof(int)); if (error || !req->newptr) return (error); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274224 - head/sys/net
Author: glebius Date: Fri Nov 7 09:15:39 2014 New Revision: 274224 URL: https://svnweb.freebsd.org/changeset/base/274224 Log: Remove useless structure ifindex_entry. Sponsored by: Nginx, Inc. Sponsored by: Netflix Modified: head/sys/net/if.c Modified: head/sys/net/if.c == --- head/sys/net/if.c Fri Nov 7 08:58:05 2014(r274223) +++ head/sys/net/if.c Fri Nov 7 09:15:39 2014(r274224) @@ -99,10 +99,6 @@ #include #endif -struct ifindex_entry { - struct ifnet *ife_ifnet; -}; - SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers"); SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management"); @@ -196,7 +192,7 @@ VNET_DEFINE(struct ifgrouphead, ifg_head static VNET_DEFINE(int, if_indexlim) = 8; /* Table of ifnet by index. */ -VNET_DEFINE(struct ifindex_entry *, ifindex_table); +VNET_DEFINE(struct ifnet **, ifindex_table); #defineV_if_indexlim VNET(if_indexlim) #defineV_ifindex_table VNET(ifindex_table) @@ -233,9 +229,9 @@ ifnet_byindex_locked(u_short idx) if (idx > V_if_index) return (NULL); - if (V_ifindex_table[idx].ife_ifnet == IFNET_HOLD) + if (V_ifindex_table[idx] == IFNET_HOLD) return (NULL); - return (V_ifindex_table[idx].ife_ifnet); + return (V_ifindex_table[idx]); } struct ifnet * @@ -282,7 +278,7 @@ retry: * next slot. */ for (idx = 1; idx <= V_if_index; idx++) { - if (V_ifindex_table[idx].ife_ifnet == NULL) + if (V_ifindex_table[idx] == NULL) break; } @@ -303,9 +299,9 @@ ifindex_free_locked(u_short idx) IFNET_WLOCK_ASSERT(); - V_ifindex_table[idx].ife_ifnet = NULL; + V_ifindex_table[idx] = NULL; while (V_if_index > 0 && - V_ifindex_table[V_if_index].ife_ifnet == NULL) + V_ifindex_table[V_if_index] == NULL) V_if_index--; } @@ -324,7 +320,7 @@ ifnet_setbyindex_locked(u_short idx, str IFNET_WLOCK_ASSERT(); - V_ifindex_table[idx].ife_ifnet = ifp; + V_ifindex_table[idx] = ifp; } static void @@ -402,7 +398,7 @@ if_grow(void) { int oldlim; u_int n; - struct ifindex_entry *e; + struct ifnet **e; IFNET_WLOCK_ASSERT(); oldlim = V_if_indexlim; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274225 - in head/sys: net netinet netinet/cc netinet6 netipsec netpfil/ipfw netpfil/pf
Author: glebius Date: Fri Nov 7 09:39:05 2014 New Revision: 274225 URL: https://svnweb.freebsd.org/changeset/base/274225 Log: Remove SYSCTL_VNET_* macros, and simply put CTLFLAG_VNET where needed. Sponsored by: Nginx, Inc. Modified: head/sys/net/bpf.c head/sys/net/flowtable.c head/sys/net/if_bridge.c head/sys/net/if_gif.c head/sys/net/if_mib.c head/sys/net/vnet.h head/sys/netinet/cc/cc.c head/sys/netinet/cc/cc_cdg.c head/sys/netinet/cc/cc_chd.c head/sys/netinet/cc/cc_hd.c head/sys/netinet/cc/cc_htcp.c head/sys/netinet/cc/cc_vegas.c head/sys/netinet/if_ether.c head/sys/netinet/igmp.c head/sys/netinet/in.c head/sys/netinet/in_gif.c head/sys/netinet/in_pcb.c head/sys/netinet/in_rmx.c head/sys/netinet/ip_carp.c head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_ipsec.c head/sys/netinet/ip_mroute.c head/sys/netinet/raw_ip.c head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_sack.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_timewait.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/in6_gif.c head/sys/netinet6/in6_proto.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/ip6_ipsec.c head/sys/netinet6/mld6.c head/sys/netinet6/nd6.c head/sys/netinet6/scope6.c head/sys/netipsec/ipsec.c head/sys/netipsec/key.c head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_ipcomp.c head/sys/netipsec/xform_ipip.c head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_dynamic.c head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/pf/if_pfsync.c Modified: head/sys/net/bpf.c == --- head/sys/net/bpf.c Fri Nov 7 09:15:39 2014(r274224) +++ head/sys/net/bpf.c Fri Nov 7 09:39:05 2014(r274225) @@ -180,8 +180,8 @@ static SYSCTL_NODE(_net_bpf, OID_AUTO, s static VNET_DEFINE(int, bpf_optimize_writers) = 0; #defineV_bpf_optimize_writers VNET(bpf_optimize_writers) -SYSCTL_VNET_INT(_net_bpf, OID_AUTO, optimize_writers, -CTLFLAG_RW, &VNET_NAME(bpf_optimize_writers), 0, +SYSCTL_INT(_net_bpf, OID_AUTO, optimize_writers, CTLFLAG_VNET | CTLFLAG_RW, +&VNET_NAME(bpf_optimize_writers), 0, "Do not send packets until BPF program is set"); static d_open_tbpfopen; Modified: head/sys/net/flowtable.c == --- head/sys/net/flowtable.cFri Nov 7 09:15:39 2014(r274224) +++ head/sys/net/flowtable.cFri Nov 7 09:39:05 2014(r274225) @@ -171,7 +171,7 @@ static VNET_DEFINE(int, flowtable_enable static SYSCTL_NODE(_net, OID_AUTO, flowtable, CTLFLAG_RD, NULL, "flowtable"); -SYSCTL_VNET_INT(_net_flowtable, OID_AUTO, enable, CTLFLAG_RW, +SYSCTL_INT(_net_flowtable, OID_AUTO, enable, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(flowtable_enable), 0, "enable flowtable caching."); SYSCTL_UMA_MAX(_net_flowtable, OID_AUTO, maxflows, CTLFLAG_RW, &flow_zone, "Maximum number of flows allowed"); Modified: head/sys/net/if_bridge.c == --- head/sys/net/if_bridge.cFri Nov 7 09:15:39 2014(r274224) +++ head/sys/net/if_bridge.cFri Nov 7 09:39:05 2014(r274225) @@ -406,8 +406,8 @@ SYSCTL_INT(_net_link_bridge, OID_AUTO, i static VNET_DEFINE(int, allow_llz_overlap) = 0; #defineV_allow_llz_overlap VNET(allow_llz_overlap) -SYSCTL_VNET_INT(_net_link_bridge, OID_AUTO, allow_llz_overlap, -CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(allow_llz_overlap), 0, +SYSCTL_INT(_net_link_bridge, OID_AUTO, allow_llz_overlap, +CTLFLAG_VNET | CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(allow_llz_overlap), 0, "Allow overlap of link-local scope " "zones of a bridge interface and the member interfaces"); Modified: head/sys/net/if_gif.c == --- head/sys/net/if_gif.c Fri Nov 7 09:15:39 2014(r274224) +++ head/sys/net/if_gif.c Fri Nov 7 09:39:05 2014(r274225) @@ -149,7 +149,7 @@ static SYSCTL_NODE(_net_link, IFT_GIF, g #endif static VNET_DEFINE(int, max_gif_nesting) = MAX_GIF_NEST; #defineV_max_gif_nesting VNET(max_gif_nesting) -SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_RW, +SYSCTL_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(max_gif_nesting), 0, "Max nested tunnels"); /* @@ -163,8 +163,9 @@ static VNET_DEFINE(int, parallel_tunnels static VNET_DEFINE(int, parallel_tunnels) = 0; #endif #defineV_parallel_tunnels VNET(parallel_tunnels) -SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, parallel_tunnels, CTLFLAG_RW, -&VNET_NAME(parallel_tunnels), 0, "Allow parallel tunnels?")
svn commit: r274226 - head/gnu/lib/libdialog
Author: bapt Date: Fri Nov 7 10:49:54 2014 New Revision: 274226 URL: https://svnweb.freebsd.org/changeset/base/274226 Log: libdialog has to be linked to libncursesw and libm Modified: head/gnu/lib/libdialog/Makefile Modified: head/gnu/lib/libdialog/Makefile == --- head/gnu/lib/libdialog/Makefile Fri Nov 7 09:39:05 2014 (r274225) +++ head/gnu/lib/libdialog/Makefile Fri Nov 7 10:49:54 2014 (r274226) @@ -13,6 +13,9 @@ SRCS= argv.c arrows.c buildlist.c butto INCS= dialog.h dlg_colors.h dlg_config.h dlg_keys.h MAN= dialog.3 +DPADD= ${LIBNCURSESW} ${LIBM} +LDADD= -lncursesw -lm + CFLAGS+= -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED -DGCC_UNUSED=__unused .PATH: ${DIALOG} WARNS?=1 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274227 - in head/sys/dev/usb: . serial
Author: hselasky Date: Fri Nov 7 11:04:27 2014 New Revision: 274227 URL: https://svnweb.freebsd.org/changeset/base/274227 Log: Add new USB IDs. Submitted by: G'abor Zahemszky MFC after:1 week Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c == --- head/sys/dev/usb/serial/u3g.c Fri Nov 7 10:49:54 2014 (r274226) +++ head/sys/dev/usb/serial/u3g.c Fri Nov 7 11:04:27 2014 (r274227) @@ -470,6 +470,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QUALCOMMINC, E2003, 0), U3G_DEV(QUALCOMMINC, K3772_Z, 0), U3G_DEV(QUALCOMMINC, K3772_Z_INIT, U3GINIT_SCSIEJECT), + U3G_DEV(QUALCOMMINC, MF195E, 0), + U3G_DEV(QUALCOMMINC, MF195E_INIT, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, MF626, 0), U3G_DEV(QUALCOMMINC, MF628, 0), U3G_DEV(QUALCOMMINC, MF633R, 0), Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsFri Nov 7 10:49:54 2014(r274226) +++ head/sys/dev/usb/usbdevsFri Nov 7 11:04:27 2014(r274227) @@ -3642,6 +3642,8 @@ product QUALCOMMINC E0086 0x0086 3G mode product QUALCOMMINC SURFSTICK 0x0117 1&1 Surf Stick product QUALCOMMINC K3772_Z_INIT 0x1179 K3772-Z Initial product QUALCOMMINC K3772_Z0x1181 K3772-Z +product QUALCOMMINC MF195E_INIT0x1514 MF195E initial +product QUALCOMMINC MF195E 0x1516 MF195E product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274228 - head/sys/dev/ixl
Author: bz Date: Fri Nov 7 11:34:06 2014 New Revision: 274228 URL: https://svnweb.freebsd.org/changeset/base/274228 Log: After r274205 unbreak NOIP kernels. vsi is now also used outside address family specific blocks so move it out from under the condition. MFC after:6 days X-MFC with: r274205 Modified: head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/ixl_txrx.c == --- head/sys/dev/ixl/ixl_txrx.c Fri Nov 7 11:04:27 2014(r274227) +++ head/sys/dev/ixl/ixl_txrx.c Fri Nov 7 11:34:06 2014(r274228) @@ -1089,8 +1089,8 @@ int ixl_init_rx_ring(struct ixl_queue *que) { struct rx_ring *rxr = &que->rxr; -#if defined(INET6) || defined(INET) struct ixl_vsi *vsi = que->vsi; +#if defined(INET6) || defined(INET) struct ifnet*ifp = vsi->ifp; struct lro_ctrl *lro = &rxr->lro; #endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274230 - head/sys/netipsec
Author: ae Date: Fri Nov 7 12:05:20 2014 New Revision: 274230 URL: https://svnweb.freebsd.org/changeset/base/274230 Log: Pass mbuf to pfil processing before stripping outer IP header as it is described in if_enc(4). MFC after:2 week Sponsored by: Yandex LLC Modified: head/sys/netipsec/ipsec_input.c Modified: head/sys/netipsec/ipsec_input.c == --- head/sys/netipsec/ipsec_input.c Fri Nov 7 12:00:32 2014 (r274229) +++ head/sys/netipsec/ipsec_input.c Fri Nov 7 12:05:20 2014 (r274230) @@ -379,15 +379,10 @@ ipsec4_common_input_cb(struct mbuf *m, s if_inc_counter(encif, IFCOUNTER_IPACKETS, 1); if_inc_counter(encif, IFCOUNTER_IBYTES, m->m_pkthdr.len); - /* -* Pass the mbuf to enc0 for bpf and pfil. We will filter the IPIP -* packet later after it has been decapsulated. -*/ + /* Pass the mbuf to enc0 for bpf and pfil. */ ipsec_bpf(m, sav, AF_INET, ENC_IN|ENC_BEFORE); - - if (prot != IPPROTO_IPIP) - if ((error = ipsec_filter(&m, PFIL_IN, ENC_IN|ENC_BEFORE)) != 0) - return (error); + if ((error = ipsec_filter(&m, PFIL_IN, ENC_IN|ENC_BEFORE)) != 0) + return (error); #endif /* DEV_ENC */ /* IP-in-IP encapsulation */ @@ -683,16 +678,10 @@ ipsec6_common_input_cb(struct mbuf *m, s if_inc_counter(encif, IFCOUNTER_IPACKETS, 1); if_inc_counter(encif, IFCOUNTER_IBYTES, m->m_pkthdr.len); - /* -* Pass the mbuf to enc0 for bpf and pfil. We will filter the IPIP -* packet later after it has been decapsulated. -*/ + /* Pass the mbuf to enc0 for bpf and pfil. */ ipsec_bpf(m, sav, AF_INET6, ENC_IN|ENC_BEFORE); - - /* XXX-BZ does not make sense. */ - if (prot != IPPROTO_IPIP) - if ((error = ipsec_filter(&m, PFIL_IN, ENC_IN|ENC_BEFORE)) != 0) - return (error); + if ((error = ipsec_filter(&m, PFIL_IN, ENC_IN|ENC_BEFORE)) != 0) + return (error); #endif /* DEV_ENC */ #ifdef INET ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274231 - in head/sys: dev/hyperv/netvsc net netgraph
Author: glebius Date: Fri Nov 7 15:14:10 2014 New Revision: 274231 URL: https://svnweb.freebsd.org/changeset/base/274231 Log: Remove struct arpcom. It is unused by most interface types, that allocate it, except Ethernet, where it carried ng_ether(4) pointer. For now carry the pointer in if_l2com directly. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/net/if.c head/sys/net/if_arp.h head/sys/net/if_bridge.c head/sys/net/if_ethersubr.c head/sys/net/if_fddisubr.c head/sys/net/if_iso88025subr.c head/sys/netgraph/ng_ether.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Nov 7 12:05:20 2014 (r274230) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Nov 7 15:14:10 2014 (r274231) @@ -529,7 +529,7 @@ hv_nv_connect_to_vsp(struct hv_device *d int ret = 0; device_t dev = device->device; hn_softc_t *sc = device_get_softc(dev); - struct ifnet *ifp = sc->arpcom.ac_ifp; + struct ifnet *ifp = sc->hn_ifp; net_dev = hv_nv_get_outbound_net_device(device); if (!net_dev) { Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Nov 7 12:05:20 2014 (r274230) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Nov 7 15:14:10 2014 (r274231) @@ -965,7 +965,6 @@ typedef struct { */ typedef struct hn_softc { struct ifnet*hn_ifp; - struct arpcom arpcom; device_thn_dev; uint8_t hn_unit; int hn_carrier; Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Nov 7 12:05:20 2014(r274230) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Nov 7 15:14:10 2014(r274231) @@ -255,7 +255,7 @@ netvsc_attach(device_t dev) sc->hn_dev_obj = device_ctx; - ifp = sc->hn_ifp = sc->arpcom.ac_ifp = if_alloc(IFT_ETHER); + ifp = sc->hn_ifp = if_alloc(IFT_ETHER); ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); @@ -634,8 +634,6 @@ netvsc_recv(struct hv_device *device_ctx } ifp = sc->hn_ifp; - - ifp = sc->arpcom.ac_ifp; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { return (0); Modified: head/sys/net/if.c == --- head/sys/net/if.c Fri Nov 7 12:05:20 2014(r274230) +++ head/sys/net/if.c Fri Nov 7 15:14:10 2014(r274231) @@ -2136,7 +2136,7 @@ do_link_state_change(void *arg, int pend (*vlan_link_state_p)(ifp); if ((ifp->if_type == IFT_ETHER || ifp->if_type == IFT_L2VLAN) && - IFP2AC(ifp)->ac_netgraph != NULL) + ifp->if_l2com != NULL) (*ng_ether_link_state_p)(ifp, link_state); if (ifp->if_carp) (*carp_linkstate_p)(ifp); Modified: head/sys/net/if_arp.h == --- head/sys/net/if_arp.h Fri Nov 7 12:05:20 2014(r274230) +++ head/sys/net/if_arp.h Fri Nov 7 15:14:10 2014(r274231) @@ -97,20 +97,6 @@ struct arpreq { #defineATF_PUBL0x08/* publish entry (respond for other host) */ #defineATF_USETRAILERS 0x10/* has requested trailers */ -#ifdef _KERNEL -/* - * Structure shared between the ethernet driver modules and - * the address resolution code. - */ -struct arpcom { - struct ifnet *ac_ifp; /* network-visible interface */ - void*ac_netgraph; /* ng_ether(4) netgraph node info */ -}; -#define IFP2AC(ifp) ((struct arpcom *)(ifp->if_l2com)) -#define AC2IFP(ac) ((ac)->ac_ifp) - -#endif /* _KERNEL */ - struct arpstat { /* Normal things that happen: */ uint64_t txrequests;/* # of ARP requests sent by this host. */ Modified: head/sys/net/if_bridge.c == --- head/sys/net/if_bridge.cFri Nov 7 12:05:20 2014(r274230) +++ head/sys/net/if_bridge.cFri Nov 7 15:14:10 2014(r274231) @@ -111,7 +111,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include /* for struct arpcom */ +#include #include #include #include @@ -125,7 +125,7 @@ __FBSDID("$FreeBSD$"); #include #endif #include -#include /* for struct arpcom */ +#include #include #include #include Modified: head/sys/net/if_ethersubr.c
Re: svn commit: r274226 - head/gnu/lib/libdialog
> On Nov 7, 2014, at 02:49, Baptiste Daroussin wrote: > > Author: bapt > Date: Fri Nov 7 10:49:54 2014 > New Revision: 274226 > URL: https://svnweb.freebsd.org/changeset/base/274226 > > Log: > libdialog has to be linked to libncursesw and libm Thank you for fixing these implicit dependencies. This is something that came up as part of the libfigpar/libdpv discussion. The one thing that might need to be done is that the lib/msun dependency might need to be articulated in Makefile.inc1. Thanks!! ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274246 - in head: sbin/ifconfig share/man/man4 sys/conf sys/modules sys/modules/if_gre sys/modules/if_me sys/net sys/netinet sys/netinet6
Author: ae Date: Fri Nov 7 19:13:19 2014 New Revision: 274246 URL: https://svnweb.freebsd.org/changeset/base/274246 Log: Overhaul if_gre(4). Split it into two modules: if_gre(4) for GRE encapsulation and if_me(4) for minimal encapsulation within IP. gre(4) changes: * convert to if_transmit; * rework locking: protect access to softc with rmlock, protect from concurrent ioctls with sx lock; * correct interface accounting for outgoing datagramms (count only payload size); * implement generic support for using IPv6 as delivery header; * make implementation conform to the RFC 2784 and partially to RFC 2890; * add support for GRE checksums - calculate for outgoing datagramms and check for inconming datagramms; * add support for sending sequence number in GRE header; * remove support of cached routes. This fixes problem, when gre(4) doesn't work at system startup. But this also removes support for having tunnels with the same addresses for inner and outer header. * deprecate support for various GREXXX ioctls, that doesn't used in FreeBSD. Use our standard ioctls for tunnels. me(4): * implementation conform to RFC 2004; * use if_transmit; * use the same locking model as gre(4); PR: 164475 Differential Revision:D1023 No objections from: net@ Relnotes: yes Sponsored by: Yandex LLC Added: head/share/man/man4/me.4 (contents, props changed) head/sys/modules/if_me/ head/sys/modules/if_me/Makefile (contents, props changed) head/sys/net/if_me.c (contents, props changed) head/sys/netinet6/ip6_gre.c (contents, props changed) Deleted: head/sys/netinet/ip_gre.h Modified: head/sbin/ifconfig/ifgre.c head/share/man/man4/Makefile head/share/man/man4/gre.4 head/sys/conf/NOTES head/sys/conf/files head/sys/modules/Makefile head/sys/modules/if_gre/Makefile head/sys/net/if_gre.c head/sys/net/if_gre.h head/sys/netinet/ip_gre.c head/sys/netinet6/in6_proto.c Modified: head/sbin/ifconfig/ifgre.c == --- head/sbin/ifconfig/ifgre.c Fri Nov 7 17:00:28 2014(r274245) +++ head/sbin/ifconfig/ifgre.c Fri Nov 7 19:13:19 2014(r274246) @@ -23,52 +23,50 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif +#include +__FBSDID("$FreeBSD$"); #include #include #include #include - -#include -#include - -#include #include #include -#include #include +#include #include -#include #include -#include +#include #include -#include #include "ifconfig.h" +#defineGREBITS "\020\01ENABLE_CSUM\02ENABLE_SEQ" + static void gre_status(int s); static void gre_status(int s) { - int grekey = 0; + uint32_t opts = 0; - ifr.ifr_data = (caddr_t)&grekey; + ifr.ifr_data = (caddr_t)&opts; if (ioctl(s, GREGKEY, &ifr) == 0) - if (grekey != 0) - printf("\tgrekey: %d\n", grekey); + if (opts != 0) + printf("\tgrekey: 0x%x (%u)\n", opts, opts); + opts = 0; + if (ioctl(s, GREGOPTS, &ifr) != 0 || opts == 0) + return; + printb("\toptions", opts, GREBITS); + putchar('\n'); } static void setifgrekey(const char *val, int dummy __unused, int s, const struct afswtch *afp) { - uint32_t grekey = atol(val); + uint32_t grekey = strtol(val, NULL, 0); strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name)); ifr.ifr_data = (caddr_t)&grekey; @@ -76,8 +74,35 @@ setifgrekey(const char *val, int dummy _ warn("ioctl (set grekey)"); } +static void +setifgreopts(const char *val, int d, int s, const struct afswtch *afp) +{ + uint32_t opts; + + ifr.ifr_data = (caddr_t)&opts; + if (ioctl(s, GREGOPTS, &ifr) == -1) { + warn("ioctl(GREGOPTS)"); + return; + } + + if (d < 0) + opts &= ~(-d); + else + opts |= d; + + if (ioctl(s, GRESOPTS, &ifr) == -1) { + warn("ioctl(GIFSOPTS)"); + return; + } +} + + static struct cmd gre_cmds[] = { DEF_CMD_ARG("grekey", setifgrekey), + DEF_CMD("enable_csum", GRE_ENABLE_CSUM, setifgreopts), + DEF_CMD("-enable_csum",-GRE_ENABLE_CSUM,setifgreopts), + DEF_CMD("enable_seq", GRE_ENABLE_SEQ, setifgreopts), + DEF_CMD("-enable_seq",-GRE_ENABLE_SEQ, setifgreopts), }; static struct afswtch af_gre = { .af_name= "af_gre", Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileFri Nov 7 17:00:28 2014 (r274245) +++ head/share/man/man4/MakefileFri Nov 7 19:13:19 2014 (r274246) @@ -252,6 +252,7 @@ MAN=aac.4 \ m
svn commit: r274248 - head/usr.sbin/ctld
Author: mav Date: Fri Nov 7 19:32:10 2014 New Revision: 274248 URL: https://svnweb.freebsd.org/changeset/base/274248 Log: Remove unused assignments, noticed by Clang analyzer. MFC after:1 week Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c == --- head/usr.sbin/ctld/ctld.c Fri Nov 7 19:26:20 2014(r274247) +++ head/usr.sbin/ctld/ctld.c Fri Nov 7 19:32:10 2014(r274248) @@ -896,7 +896,7 @@ void isns_register(struct isns *isns, struct isns *oldisns) { struct conf *conf = isns->i_conf; - int s, res; + int s; char hostname[256]; if (TAILQ_EMPTY(&conf->conf_targets) || @@ -912,8 +912,8 @@ isns_register(struct isns *isns, struct if (oldisns == NULL || TAILQ_EMPTY(&oldisns->i_conf->conf_targets)) oldisns = isns; - res = isns_do_deregister(oldisns, s, hostname); - res = isns_do_register(isns, s, hostname); + isns_do_deregister(oldisns, s, hostname); + isns_do_register(isns, s, hostname); close(s); set_timeout(0, false); } @@ -938,8 +938,8 @@ isns_check(struct isns *isns) res = isns_do_check(isns, s, hostname); if (res < 0) { - res = isns_do_deregister(isns, s, hostname); - res = isns_do_register(isns, s, hostname); + isns_do_deregister(isns, s, hostname); + isns_do_register(isns, s, hostname); } close(s); set_timeout(0, false); @@ -949,7 +949,7 @@ void isns_deregister(struct isns *isns) { struct conf *conf = isns->i_conf; - int s, res; + int s; char hostname[256]; if (TAILQ_EMPTY(&conf->conf_targets) || @@ -961,7 +961,7 @@ isns_deregister(struct isns *isns) return; gethostname(hostname, sizeof(hostname)); - res = isns_do_deregister(isns, s, hostname); + isns_do_deregister(isns, s, hostname); close(s); set_timeout(0, false); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274249 - head/sys/dev/ofw
Author: zbb Date: Fri Nov 7 19:34:10 2014 New Revision: 274249 URL: https://svnweb.freebsd.org/changeset/base/274249 Log: Avoid panic in ofwbus caused by not released resource list entry After resource allocation and release, resource list entry stays non-NULL. This causes panic in ofwbus_alloc_resource() on subsequent resource allocation. Clean appropriate list entry on release to avoid this. Obtained from:Semihalf Reviewed by: ian Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/ofw/ofwbus.c Modified: head/sys/dev/ofw/ofwbus.c == --- head/sys/dev/ofw/ofwbus.c Fri Nov 7 19:32:10 2014(r274248) +++ head/sys/dev/ofw/ofwbus.c Fri Nov 7 19:34:10 2014(r274249) @@ -399,11 +399,17 @@ ofwbus_adjust_resource(device_t bus, dev } static int -ofwbus_release_resource(device_t bus __unused, device_t child, int type, +ofwbus_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { + struct resource_list_entry *rle; int error; + /* Clean resource list entry */ + rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), type, rid); + if (rle != NULL) + rle->res = NULL; + if ((rman_get_flags(r) & RF_ACTIVE) != 0) { error = bus_deactivate_resource(child, type, rid, r); if (error) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274250 - head/sys/dev/random
Author: kib Date: Fri Nov 7 20:10:09 2014 New Revision: 274250 URL: https://svnweb.freebsd.org/changeset/base/274250 Log: Simplify assembler in ivy.c. Move the copying of the random bits into buffer from asm to C, which reduces amount of arguments for inline asm and simplifies constraints. Use unsigned types consistently. Submitted by: bde Approved by: secteam (delphij) Reviewed by: markm MFC after:1 week Modified: head/sys/dev/random/ivy.c Modified: head/sys/dev/random/ivy.c == --- head/sys/dev/random/ivy.c Fri Nov 7 19:34:10 2014(r274249) +++ head/sys/dev/random/ivy.c Fri Nov 7 20:10:09 2014(r274250) @@ -61,42 +61,41 @@ static struct live_entropy_source random }; static inline int -ivy_rng_store(long *buf) +ivy_rng_store(u_long *buf) { #ifdef __GNUCLIKE_ASM - long tmp; + u_long rndval; int retry; retry = RETRY_COUNT; __asm __volatile( "1:\n\t" - "rdrand %2\n\t" /* read randomness into tmp */ - "jb 2f\n\t" /* CF is set on success, exit retry loop */ + "rdrand %1\n\t" /* read randomness into tmp */ + "jc 2f\n\t" /* CF is set on success, exit retry loop */ "dec%0\n\t" /* otherwise, retry-- */ "jne1b\n\t" /* and loop if retries are not exhausted */ - "jmp3f\n" /* failure, retry is 0, used as return value */ - "2:\n\t" - "mov%2,%1\n\t" /* *buf = tmp */ - "3:" - : "+q" (retry), "=m" (*buf), "+q" (tmp) : : "cc"); + "2:" + : "+r" (retry), "=r" (rndval) : : "cc"); + *buf = rndval; return (retry); #else /* __GNUCLIKE_ASM */ return (0); #endif } -/* It is specifically allowed that buf is a multiple of sizeof(long) */ +/* It is required that buf length is a multiple of sizeof(u_long). */ static u_int random_ivy_read(void *buf, u_int c) { - long *b; + u_long *b, rndval; u_int count; KASSERT(c % sizeof(*b) == 0, ("partial read %d", c)); b = buf; for (count = c; count > 0; count -= sizeof(*b)) { - if (ivy_rng_store(b++) == 0) + if (ivy_rng_store(&rndval) == 0) break; + *b++ = rndval; } return (c - count); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274251 - head/sys/sys
Author: kib Date: Fri Nov 7 20:15:23 2014 New Revision: 274251 URL: https://svnweb.freebsd.org/changeset/base/274251 Log: Add DEV_MODULE_ORDERED(). Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/sys/conf.h Modified: head/sys/sys/conf.h == --- head/sys/sys/conf.h Fri Nov 7 20:10:09 2014(r274250) +++ head/sys/sys/conf.h Fri Nov 7 20:15:23 2014(r274251) @@ -227,14 +227,16 @@ struct devsw_module_data { /* Do not initialize fields hereafter */ }; -#defineDEV_MODULE(name, evh, arg) \ +#defineDEV_MODULE_ORDERED(name, evh, arg, ord) \ static moduledata_t name##_mod = { \ #name, \ evh, \ arg \ }; \ -DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE) +DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, ord) +#defineDEV_MODULE(name, evh, arg) \ +DEV_MODULE_ORDERED(name, evh, arg, SI_ORDER_MIDDLE) void clone_setup(struct clonedevs **cdp); void clone_cleanup(struct clonedevs **); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274252 - in head/sys: dev/random modules/random
Author: kib Date: Fri Nov 7 20:23:43 2014 New Revision: 274252 URL: https://svnweb.freebsd.org/changeset/base/274252 Log: Fix random.ko module. - Remove duplicated sources between standard part of the kernel and module. In particular, it caused duplicated lock initialization and sysctl registration, both having bad consequences. - Add missed source files to module. - Static part of the kernel provides randomdev module, not random_adaptors. Correct dependencies. - Use cdev modules declaration macros. Approved by: secteam (delphij) Reviewed by: markm Modified: head/sys/dev/random/ivy.c head/sys/dev/random/nehemiah.c head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev_soft.c head/sys/modules/random/Makefile Modified: head/sys/dev/random/ivy.c == --- head/sys/dev/random/ivy.c Fri Nov 7 20:15:23 2014(r274251) +++ head/sys/dev/random/ivy.c Fri Nov 7 20:23:43 2014(r274252) @@ -132,4 +132,4 @@ rdrand_modevent(module_t mod, int type, DEV_MODULE(rdrand, rdrand_modevent, NULL); MODULE_VERSION(rdrand, 1); -MODULE_DEPEND(rdrand, random_adaptors, 1, 1, 1); +MODULE_DEPEND(rdrand, randomdev, 1, 1, 1); Modified: head/sys/dev/random/nehemiah.c == --- head/sys/dev/random/nehemiah.c Fri Nov 7 20:15:23 2014 (r274251) +++ head/sys/dev/random/nehemiah.c Fri Nov 7 20:23:43 2014 (r274252) @@ -157,4 +157,4 @@ nehemiah_modevent(module_t mod, int type DEV_MODULE(nehemiah, nehemiah_modevent, NULL); MODULE_VERSION(nehemiah, 1); -MODULE_DEPEND(nehemiah, random_adaptors, 1, 1, 1); +MODULE_DEPEND(nehemiah, randomdev, 1, 1, 1); Modified: head/sys/dev/random/randomdev.c == --- head/sys/dev/random/randomdev.c Fri Nov 7 20:15:23 2014 (r274251) +++ head/sys/dev/random/randomdev.c Fri Nov 7 20:23:43 2014 (r274252) @@ -159,15 +159,7 @@ randomdev_modevent(module_t mod __unused return (error); } -#defineEARLY_2_DEV_MODULE(name, evh, arg) \ -static moduledata_t name##_mod = { \ -#name, \ -evh, \ -arg\ -}; \ -DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_SECOND) - -EARLY_2_DEV_MODULE(randomdev, randomdev_modevent, NULL); +DEV_MODULE_ORDERED(randomdev, randomdev_modevent, NULL, SI_ORDER_SECOND); MODULE_VERSION(randomdev, 1); /* Modified: head/sys/dev/random/randomdev_soft.c == --- head/sys/dev/random/randomdev_soft.cFri Nov 7 20:15:23 2014 (r274251) +++ head/sys/dev/random/randomdev_soft.cFri Nov 7 20:23:43 2014 (r274252) @@ -153,21 +153,13 @@ randomdev_soft_modevent(module_t mod __u return (error); } -#defineMID_DEV_MODULE(name, evh, arg) \ -static moduledata_t name##_mod = { \ -#name, \ -evh, \ -arg\ -}; \ -DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE) - #if defined(RANDOM_YARROW) -MID_DEV_MODULE(yarrow, randomdev_soft_modevent, NULL); +DEV_MODULE(yarrow, randomdev_soft_modevent, NULL); MODULE_VERSION(yarrow, 1); -MODULE_DEPEND(yarrow, random_adaptors, 1, 1, 1); +MODULE_DEPEND(yarrow, randomdev, 1, 1, 1); #endif #if defined(RANDOM_FORTUNA) -MID_DEV_MODULE(fortuna, randomdev_soft_modevent, NULL); +DEV_MODULE(fortuna, randomdev_soft_modevent, NULL); MODULE_VERSION(fortuna, 1); -MODULE_DEPEND(fortuna, random_adaptors, 1, 1, 1); +MODULE_DEPEND(fortuna, randomdev, 1, 1, 1); #endif Modified: head/sys/modules/random/Makefile == --- head/sys/modules/random/MakefileFri Nov 7 20:15:23 2014 (r274251) +++ head/sys/modules/random/MakefileFri Nov 7 20:23:43 2014 (r274252) @@ -6,8 +6,7 @@ KMOD= random SRCS= randomdev_soft.c -SRCS+= yarrow.c hash.c -SRCS+= random_harvestq.c live_entropy_sources.c +SRCS+= yarrow.c fortuna.c hash.c SRCS+= rijndael-alg-fst.c rijndael-api-fst.c sha2.c sha256c.c SRCS+= bus_if.h device_if.h vnode_if.h opt_cpu.h opt_random.h ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274253 - head/sys/cam/ctl
Author: mav Date: Fri Nov 7 20:42:15 2014 New Revision: 274253 URL: https://svnweb.freebsd.org/changeset/base/274253 Log: Fix LUN resize broken by r272911 commit. MFC after:3 days Modified: head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl_backend_block.c == --- head/sys/cam/ctl/ctl_backend_block.cFri Nov 7 20:23:43 2014 (r274252) +++ head/sys/cam/ctl/ctl_backend_block.cFri Nov 7 20:42:15 2014 (r274253) @@ -2392,7 +2392,7 @@ ctl_be_block_modify(struct ctl_be_block_ be_lun->params.lun_size_bytes = params->lun_size_bytes; - oldsize = be_lun->size_blocks; + oldsize = be_lun->size_bytes; if (be_lun->vn == NULL) error = ctl_be_block_open(softc, be_lun, req); else if (be_lun->vn->v_type == VREG) @@ -2400,7 +2400,7 @@ ctl_be_block_modify(struct ctl_be_block_ else error = ctl_be_block_modify_dev(be_lun, req); - if (error == 0 && be_lun->size_blocks != oldsize) { + if (error == 0 && be_lun->size_bytes != oldsize) { be_lun->size_blocks = be_lun->size_bytes >> be_lun->blocksize_shift; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274254 - head/bin/sh
Author: jilles Date: Fri Nov 7 21:30:16 2014 New Revision: 274254 URL: https://svnweb.freebsd.org/changeset/base/274254 Log: sh(1): Mention portability issue with shifting zero positional parameters. Per Austin Group issue #459, shifting zero positional parameters may or may not be considered an operand error (which causes the shell to exit in most cases). Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 == --- head/bin/sh/sh.1Fri Nov 7 20:42:15 2014(r274253) +++ head/bin/sh/sh.1Fri Nov 7 21:30:16 2014(r274254) @@ -32,7 +32,7 @@ .\"from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd September 21, 2014 +.Dd November 7, 2014 .Dt SH 1 .Os .Sh NAME @@ -2522,7 +2522,8 @@ and so on, decreasing the value of .Li $# by one. -If there are zero positional parameters, shifting does not do anything. +For portability, shifting if there are zero positional parameters +should be avoided, since the shell may abort. .It Ic test A built-in equivalent of .Xr test 1 . ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274267 - head/tests/sys/netinet
Author: ngie Date: Sat Nov 8 03:20:56 2014 New Revision: 274267 URL: https://svnweb.freebsd.org/changeset/base/274267 Log: Use PROGS instead of PROG and remove unnecessary SRCS?= assignment Using PROG instead of PROGS will in cases of high -j with -DNO_ROOT cause the PROG to show up more than once as it's handling the SCRIPTS install case in a recursive manner, separate from the non-recursive case After the recent batch of commits to bsd.progs.mk to fix behavior with how variables are defaulted to, explicitly setting SRCS for a PROG is no longer required MFC after: 1 week Reviewed by: asomers Phabric: D1130 Sponsored by: EMC / Isilon Storage Division Modified: head/tests/sys/netinet/Makefile Modified: head/tests/sys/netinet/Makefile == --- head/tests/sys/netinet/Makefile Sat Nov 8 02:53:55 2014 (r274266) +++ head/tests/sys/netinet/Makefile Sat Nov 8 03:20:56 2014 (r274267) @@ -3,9 +3,8 @@ TESTSDIR= ${TESTSBASE}/sys/netinet BINDIR=${TESTSDIR} -ATF_TESTS_SH+= fibs_test -PROG= udp_dontroute -SRCS= udp_dontroute.c +ATF_TESTS_SH= fibs_test +PROGS= udp_dontroute MAN= WARNS?=6 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274270 - head
Author: ngie Date: Sat Nov 8 04:24:54 2014 New Revision: 274270 URL: https://svnweb.freebsd.org/changeset/base/274270 Log: Fix build race in Makefile.inc1 after r274226 by adding lib/libm__L dependency for gnu/lib/libdialog Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Sat Nov 8 04:18:33 2014(r274269) +++ head/Makefile.inc1 Sat Nov 8 04:24:54 2014(r274270) @@ -1671,7 +1671,7 @@ _lib_libypclnt= lib/libypclnt lib/libradius__L: lib/libmd__L .endif -gnu/lib/libdialog__L: lib/ncurses/ncursesw__L +gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L .for _lib in ${_prereq_libs} ${_lib}__PL: .PHONY .MAKE ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274274 - head/sys/net
Author: glebius Date: Sat Nov 8 07:23:01 2014 New Revision: 274274 URL: https://svnweb.freebsd.org/changeset/base/274274 Log: ifindex_alloc_locked() never fails and doesn't have no-lock version, so change the prototype. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/net/if.c Modified: head/sys/net/if.c == --- head/sys/net/if.c Sat Nov 8 06:43:33 2014(r274273) +++ head/sys/net/if.c Sat Nov 8 07:23:01 2014(r274274) @@ -265,13 +265,12 @@ ifnet_byindex_ref(u_short idx) * Allocate an ifindex array entry; return 0 on success or an error on * failure. */ -static int -ifindex_alloc_locked(u_short *idxp) +static u_short +ifindex_alloc(void) { u_short idx; IFNET_WLOCK_ASSERT(); - retry: /* * Try to find an empty slot below V_if_index. If we fail, take the @@ -289,8 +288,7 @@ retry: } if (idx > V_if_index) V_if_index = idx; - *idxp = idx; - return (0); + return (idx); } static void @@ -431,11 +429,7 @@ if_alloc(u_char type) ifp = malloc(sizeof(struct ifnet), M_IFNET, M_WAITOK|M_ZERO); IFNET_WLOCK(); - if (ifindex_alloc_locked(&idx) != 0) { - IFNET_WUNLOCK(); - free(ifp, M_IFNET); - return (NULL); - } + idx = ifindex_alloc(); ifnet_setbyindex_locked(idx, IFNET_HOLD); IFNET_WUNLOCK(); ifp->if_index = idx; @@ -1022,7 +1016,6 @@ if_detach_internal(struct ifnet *ifp, in void if_vmove(struct ifnet *ifp, struct vnet *new_vnet) { - u_short idx; /* * Detach from current vnet, but preserve LLADDR info, do not @@ -1054,11 +1047,7 @@ if_vmove(struct ifnet *ifp, struct vnet CURVNET_SET_QUIET(new_vnet); IFNET_WLOCK(); - if (ifindex_alloc_locked(&idx) != 0) { - IFNET_WUNLOCK(); - panic("if_index overflow"); - } - ifp->if_index = idx; + ifp->if_index = ifindex_alloc(); ifnet_setbyindex_locked(ifp->if_index, ifp); IFNET_WUNLOCK(); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274276 - in head: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: delphij Date: Sat Nov 8 07:30:40 2014 New Revision: 274276 URL: https://svnweb.freebsd.org/changeset/base/274276 Log: MFV r274271: Improve zdb -b performance: - Reduce gethrtime() call to 1/100th of blkptr's; - Skip manipulating the size-ordered tree; - Issue more (10, previously 3) async reads; - Use lighter weight testing in traverse_visitbp(); Illumos issue: 5243 zdb -b could be much faster MFC after:2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c == --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sat Nov 8 07:26:39 2014 (r274275) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sat Nov 8 07:30:40 2014 (r274276) @@ -77,9 +77,11 @@ #ifndef lint extern boolean_t zfs_recover; extern uint64_t zfs_arc_max, zfs_arc_meta_limit; +extern int zfs_vdev_async_read_max_active; #else boolean_t zfs_recover; uint64_t zfs_arc_max, zfs_arc_meta_limit; +int zfs_vdev_async_read_max_active; #endif const char cmdname[] = "zdb"; @@ -2384,8 +2386,14 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog zcb->zcb_readfails = 0; - if (dump_opt['b'] < 5 && - gethrtime() > zcb->zcb_lastprint + NANOSEC) { + /* only call gethrtime() every 100 blocks */ + static int iters; + if (++iters > 100) + iters = 0; + else + return (0); + + if (dump_opt['b'] < 5 && gethrtime() > zcb->zcb_lastprint + NANOSEC) { uint64_t now = gethrtime(); char buf[10]; uint64_t bytes = zcb->zcb_type[ZB_TOTAL][ZDB_OT_TOTAL].zb_asize; @@ -2494,6 +2502,14 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) (longlong_t)vd->vdev_ms_count); msp->ms_ops = &zdb_metaslab_ops; + + /* +* We don't want to spend the CPU +* manipulating the size-ordered +* tree, so clear the range_tree +* ops. +*/ + msp->ms_tree->rt_ops = NULL; VERIFY0(space_map_load(msp->ms_sm, msp->ms_tree, SM_ALLOC)); msp->ms_loaded = B_TRUE; @@ -3508,6 +3524,13 @@ main(int argc, char **argv) */ zfs_arc_max = zfs_arc_meta_limit = 256 * 1024 * 1024; + /* +* "zdb -c" uses checksum-verifying scrub i/os which are async reads. +* "zdb -b" uses traversal prefetch which uses async reads. +* For good performance, let several of them be active at once. +*/ + zfs_vdev_async_read_max_active = 10; + kernel_init(FREAD); g_zfs = libzfs_init(); ASSERT(g_zfs != NULL); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Sat Nov 8 07:26:39 2014(r274275) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Sat Nov 8 07:30:40 2014(r274276) @@ -59,6 +59,7 @@ typedef struct traverse_data { int td_flags; prefetch_data_t *td_pfd; boolean_t td_paused; + uint64_t td_hole_birth_enabled_txg; blkptr_cb_t *td_func; void *td_arg; } traverse_data_t; @@ -229,25 +230,20 @@ traverse_visitbp(traverse_data_t *td, co } if (bp->blk_birth == 0) { - if (spa_feature_is_active(td->td_spa, SPA_FEATURE_HOLE_BIRTH)) { - /* -* Since this block has a birth time of 0 it must be a -* hole created before the SPA_FEATURE_HOLE_BIRTH -* feature was enabled. If SPA_FEATURE_HOLE_BIRTH -* was enabled before the min_txg for this traveral we -* know the hole must have been created before the -* min_txg for this traveral, so we can skip it. If -* SPA_FEATURE_HOLE_BIRTH was enabled after the min_txg -* for this traveral we cannot tell if the hole was -* created before or after the min_txg for this -* traversal, so we cannot skip it. -*/ - uint64_t hole_birth_enabled_txg; -
svn commit: r274277 - head/usr.sbin/ctld
Author: trasz Date: Sat Nov 8 07:50:57 2014 New Revision: 274277 URL: https://svnweb.freebsd.org/changeset/base/274277 Log: ctld(8) doesn't require -lcam or -lssl; remove those from DPADD and LDADD. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/Makefile Modified: head/usr.sbin/ctld/Makefile == --- head/usr.sbin/ctld/Makefile Sat Nov 8 07:30:40 2014(r274276) +++ head/usr.sbin/ctld/Makefile Sat Nov 8 07:50:57 2014(r274277) @@ -10,8 +10,8 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscs #CFLAGS+= -DICL_KERNEL_PROXY MAN= ctld.8 ctl.conf.5 -DPADD= ${LIBBSDXML} ${LIBCAM} ${LIBCRYPTO} ${LIBL} ${LIBSBUF} ${LIBSSL} ${LIBUTIL} -LDADD= -lbsdxml -lcam -lcrypto -ll -lsbuf -lssl -lutil +DPADD= ${LIBBSDXML} ${LIBCRYPTO} ${LIBL} ${LIBSBUF} ${LIBUTIL} +LDADD= -lbsdxml -lcrypto -ll -lsbuf -lutil YFLAGS+= -v CLEANFILES=y.tab.c y.tab.h y.output ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r274278 - head/usr.sbin/ctld
Author: trasz Date: Sat Nov 8 07:54:34 2014 New Revision: 274278 URL: https://svnweb.freebsd.org/changeset/base/274278 Log: Improve wording in ctl.conf(5). Differential Revision:https://reviews.freebsd.org/D1020 Reviewed by: bcr@ (earlier version), wblock@ MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctl.conf.5 Modified: head/usr.sbin/ctld/ctl.conf.5 == --- head/usr.sbin/ctld/ctl.conf.5 Sat Nov 8 07:50:57 2014 (r274277) +++ head/usr.sbin/ctld/ctl.conf.5 Sat Nov 8 07:54:34 2014 (r274278) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2014 +.Dd November 8, 2014 .Dt CTL.CONF 5 .Os .Sh NAME @@ -202,9 +202,10 @@ When set to the check will include .Sy initiator-portal , .Sy initiator-name , -and authentication credentials, ie. if the target does not require -CHAP authentication, or if CHAP user and secret used during discovery -match CHAP user and secret required to access the target. +and authentication credentials. +The target is returned if it does not require CHAP authentication, +or if the CHAP user and secret used during discovery match those +used by the target. Note that when using .Qq Ar portal-name-auth , targets that require CHAP authentication will only be returned if ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"