svn commit: r268359 - head/sys/dev/mge
Author: fabient Date: Mon Jul 7 08:22:39 2014 New Revision: 268359 URL: http://svnweb.freebsd.org/changeset/base/268359 Log: Optim and Fix for mge driver: - add missing rcvif in mbuf - add missing ipacket stat - remove uncessary mbuf copy on output path - fix deadlock of the TX engine in case of error Obtained from:NETASQ MFC after:2 weeks Modified: head/sys/dev/mge/if_mge.c Modified: head/sys/dev/mge/if_mge.c == --- head/sys/dev/mge/if_mge.c Mon Jul 7 06:37:14 2014(r268358) +++ head/sys/dev/mge/if_mge.c Mon Jul 7 08:22:39 2014(r268359) @@ -1140,6 +1140,8 @@ mge_intr_rx_locked(struct mge_softc *sc, mb->m_pkthdr.len -= 2; mb->m_data += 2; + mb->m_pkthdr.rcvif = ifp; + mge_offload_process_frame(ifp, mb, status, bufsize); @@ -1159,6 +1161,8 @@ mge_intr_rx_locked(struct mge_softc *sc, count -= 1; } + ifp->if_ipackets += rx_npkts; + return (rx_npkts); } @@ -1437,12 +1441,6 @@ mge_encap(struct mge_softc *sc, struct m ifp = sc->ifp; - /* Check for free descriptors */ - if (sc->tx_desc_used_count + 1 >= MGE_TX_DESC_NUM) { - /* No free descriptors */ - return (-1); - } - /* Fetch unused map */ desc_no = sc->tx_desc_curr; dw = &sc->mge_tx_desc[desc_no]; @@ -1451,9 +1449,16 @@ mge_encap(struct mge_softc *sc, struct m /* Create mapping in DMA memory */ error = bus_dmamap_load_mbuf_sg(sc->mge_tx_dtag, mapp, m0, segs, &nsegs, BUS_DMA_NOWAIT); - if (error != 0 || nsegs != 1 ) { + if (error != 0) { + m_freem(m0); + return (error); + } + + /* Only one segment is supported. */ + if (nsegs != 1) { bus_dmamap_unload(sc->mge_tx_dtag, mapp); - return ((error != 0) ? error : -1); + m_freem(m0); + return (-1); } bus_dmamap_sync(sc->mge_tx_dtag, mapp, BUS_DMASYNC_PREWRITE); @@ -1553,15 +1558,33 @@ mge_start_locked(struct ifnet *ifp) if (m0 == NULL) break; - mtmp = m_defrag(m0, M_NOWAIT); - if (mtmp) - m0 = mtmp; + if (m0->m_pkthdr.csum_flags & (CSUM_IP|CSUM_TCP|CSUM_UDP) || + m0->m_flags & M_VLANTAG) { + if (M_WRITABLE(m0) == 0) { + mtmp = m_dup(m0, M_NOWAIT); + m_freem(m0); + if (mtmp == NULL) + continue; + m0 = mtmp; + } + } + /* The driver support only one DMA fragment. */ + if (m0->m_next != NULL) { + mtmp = m_defrag(m0, M_NOWAIT); + if (mtmp) + m0 = mtmp; + } - if (mge_encap(sc, m0)) { + /* Check for free descriptors */ + if (sc->tx_desc_used_count + 1 >= MGE_TX_DESC_NUM) { IF_PREPEND(&ifp->if_snd, m0); ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } + + if (mge_encap(sc, m0) != 0) + break; + queued++; BPF_MTAP(ifp, m0); } ___ 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: r268361 - head/sys/cam/ctl
Author: mav Date: Mon Jul 7 08:58:36 2014 New Revision: 268361 URL: http://svnweb.freebsd.org/changeset/base/268361 Log: Fix bugs for PERSISTENT RESERVE OUT bits in r268096. Modified: head/sys/cam/ctl/ctl_cmd_table.c Modified: head/sys/cam/ctl/ctl_cmd_table.c == --- head/sys/cam/ctl/ctl_cmd_table.cMon Jul 7 08:42:04 2014 (r268360) +++ head/sys/cam/ctl/ctl_cmd_table.cMon Jul 7 08:58:36 2014 (r268361) @@ -127,7 +127,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, - 10, { 0x00, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, + 10, { 0x01, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, /* 02 RELEASE */ {ctl_persistent_reserve_out, CTL_SERIDX_PRES_OUT, CTL_CMD_FLAG_ALLOW_ON_RESV | @@ -138,7 +138,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, - 10, { 0x00, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, + 10, { 0x02, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, /* 03 CLEAR */ {ctl_persistent_reserve_out, CTL_SERIDX_PRES_OUT, CTL_CMD_FLAG_ALLOW_ON_RESV | @@ -149,7 +149,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, - 10, { 0x00, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, + 10, { 0x03, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, /* 04 PREEMPT */ {ctl_persistent_reserve_out, CTL_SERIDX_PRES_OUT, CTL_CMD_FLAG_ALLOW_ON_RESV | @@ -160,7 +160,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, - 10, { 0x00, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, + 10, { 0x04, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, /* 05 PREEMPT AND ABORT */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -174,7 +174,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_FLAG_DATA_OUT | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, - 10, { 0x00, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, + 10, { 0x06, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0x07}}, /* 07 REGISTER AND MOVE */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, ___ 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: r268362 - head/sys/cam/ctl
Author: mav Date: Mon Jul 7 09:37:22 2014 New Revision: 268362 URL: http://svnweb.freebsd.org/changeset/base/268362 Log: Teach ctl_add_initiator() to dynamically allocate IIDs from pool. If port passed negative IID value, the function will try to allocate IID from the pool of unused, based on passed wwpn or name arguments. It does all its best to make IID unique and persistent across reconnects. This makes persistent reservation properly work for iSCSI. Previously, in case of reconnects, reservation could be unexpectedly lost, or even migrate between intiators. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_frontend.c head/sys/cam/ctl/ctl_frontend.h head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_frontend_iscsi.h head/sys/cam/ctl/ctl_private.h head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/ctl.c == --- head/sys/cam/ctl/ctl.c Mon Jul 7 08:58:36 2014(r268361) +++ head/sys/cam/ctl/ctl.c Mon Jul 7 09:37:22 2014(r268362) @@ -1089,11 +1089,6 @@ ctl_init(void) printf("ctl: CAM Target Layer loaded\n"); /* -* Initialize the initiator and portname mappings -*/ - memset(softc->wwpn_iid, 0, sizeof(softc->wwpn_iid)); - - /* * Initialize the ioctl front end. */ ctl_frontend_register(&ioctl_frontend); @@ -1365,32 +1360,24 @@ ctl_ioctl_offline(void *arg) /* * Remove an initiator by port number and initiator ID. - * Returns 0 for success, 1 for failure. + * Returns 0 for success, -1 for failure. */ int -ctl_remove_initiator(int32_t targ_port, uint32_t iid) +ctl_remove_initiator(struct ctl_port *port, int iid) { - struct ctl_softc *softc; - - softc = control_softc; + struct ctl_softc *softc = control_softc; mtx_assert(&softc->ctl_lock, MA_NOTOWNED); - if ((targ_port < 0) -|| (targ_port > CTL_MAX_PORTS)) { - printf("%s: invalid port number %d\n", __func__, targ_port); - return (1); - } if (iid > CTL_MAX_INIT_PER_PORT) { printf("%s: initiator ID %u > maximun %u!\n", __func__, iid, CTL_MAX_INIT_PER_PORT); - return (1); + return (-1); } mtx_lock(&softc->ctl_lock); - - softc->wwpn_iid[targ_port][iid].in_use = 0; - + port->wwpn_iid[iid].in_use--; + port->wwpn_iid[iid].last_use = time_uptime; mtx_unlock(&softc->ctl_lock); return (0); @@ -1398,41 +1385,91 @@ ctl_remove_initiator(int32_t targ_port, /* * Add an initiator to the initiator map. - * Returns 0 for success, 1 for failure. + * Returns iid for success, < 0 for failure. */ int -ctl_add_initiator(uint64_t wwpn, int32_t targ_port, uint32_t iid) +ctl_add_initiator(struct ctl_port *port, int iid, uint64_t wwpn, char *name) { - struct ctl_softc *softc; - int retval; - - softc = control_softc; + struct ctl_softc *softc = control_softc; + time_t best_time; + int i, best; mtx_assert(&softc->ctl_lock, MA_NOTOWNED); - retval = 0; - - if ((targ_port < 0) -|| (targ_port > CTL_MAX_PORTS)) { - printf("%s: invalid port number %d\n", __func__, targ_port); - return (1); - } - if (iid > CTL_MAX_INIT_PER_PORT) { - printf("%s: WWPN %#jx initiator ID %u > maximun %u!\n", + if (iid >= CTL_MAX_INIT_PER_PORT) { + printf("%s: WWPN %#jx initiator ID %u > maximum %u!\n", __func__, wwpn, iid, CTL_MAX_INIT_PER_PORT); - return (1); + free(name, M_CTL); + return (-1); } mtx_lock(&softc->ctl_lock); - if (softc->wwpn_iid[targ_port][iid].in_use != 0) { + if (iid < 0 && (wwpn != 0 || name != NULL)) { + for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) { + if (wwpn != 0 && wwpn == port->wwpn_iid[i].wwpn) { + iid = i; + break; + } + if (name != NULL && port->wwpn_iid[i].name != NULL && + strcmp(name, port->wwpn_iid[i].name) == 0) { + iid = i; + break; + } + } + } + + if (iid < 0) { + for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) { + if (port->wwpn_iid[i].in_use == 0 && + port->wwpn_iid[i].wwpn == 0 && + port->wwpn_iid[i].name == NULL) { + iid = i; + break; + } + } + } + + if (iid < 0) { + best = -1; + best_time = INT32_MAX; +
svn commit: r268363 - in head: sys/cam/ctl usr.sbin/ctladm
Author: mav Date: Mon Jul 7 11:05:04 2014 New Revision: 268363 URL: http://svnweb.freebsd.org/changeset/base/268363 Log: Add support for READ FULL STATUS action of PERSISTENT RESERVE IN command. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl.h head/sys/cam/ctl/ctl_cmd_table.c head/sys/cam/ctl/scsi_ctl.c head/usr.sbin/ctladm/ctladm.c Modified: head/sys/cam/ctl/ctl.c == --- head/sys/cam/ctl/ctl.c Mon Jul 7 09:37:22 2014(r268362) +++ head/sys/cam/ctl/ctl.c Mon Jul 7 11:05:04 2014(r268363) @@ -1499,6 +1499,61 @@ take: } static int +ctl_create_iid(struct ctl_port *port, int iid, uint8_t *buf) +{ + int len; + + switch (port->port_type) { + case CTL_PORT_FC: + { + struct scsi_transportid_fcp *id = + (struct scsi_transportid_fcp *)buf; + if (port->wwpn_iid[iid].wwpn == 0) + return (0); + memset(id, 0, sizeof(*id)); + id->format_protocol = SCSI_PROTO_FC; + scsi_u64to8b(port->wwpn_iid[iid].wwpn, id->n_port_name); + return (sizeof(*id)); + } + case CTL_PORT_ISCSI: + { + struct scsi_transportid_iscsi_port *id = + (struct scsi_transportid_iscsi_port *)buf; + if (port->wwpn_iid[iid].name == NULL) + return (0); + memset(id, 0, 256); + id->format_protocol = SCSI_TRN_ISCSI_FORMAT_PORT | + SCSI_PROTO_ISCSI; + len = strlcpy(id->iscsi_name, port->wwpn_iid[iid].name, 252) + 1; + len = roundup2(min(len, 252), 4); + scsi_ulto2b(len, id->additional_length); + return (sizeof(*id) + len); + } + case CTL_PORT_SAS: + { + struct scsi_transportid_sas *id = + (struct scsi_transportid_sas *)buf; + if (port->wwpn_iid[iid].wwpn == 0) + return (0); + memset(id, 0, sizeof(*id)); + id->format_protocol = SCSI_PROTO_SAS; + scsi_u64to8b(port->wwpn_iid[iid].wwpn, id->sas_address); + return (sizeof(*id)); + } + default: + { + struct scsi_transportid_spi *id = + (struct scsi_transportid_spi *)buf; + memset(id, 0, sizeof(*id)); + id->format_protocol = SCSI_PROTO_SPI; + scsi_ulto2b(iid, id->scsi_addr); + scsi_ulto2b(port->targ_port, id->rel_trgt_port_id); + return (sizeof(*id)); + } + } +} + +static int ctl_ioctl_lun_enable(void *arg, struct ctl_id targ_id, int lun_id) { return (0); @@ -7619,6 +7674,11 @@ retry: case SPRI_RC: /* report capabilities */ total_len = sizeof(struct scsi_per_res_cap); break; + case SPRI_RS: /* read full status */ + total_len = sizeof(struct scsi_per_res_in_header) + + (sizeof(struct scsi_per_res_in_full_desc) + 256) * + lun->pr_key_count; + break; default: panic("Invalid PR type %x", cdb->action); } @@ -7775,7 +7835,62 @@ retry: scsi_ulto2b(type_mask, res_cap->type_mask); break; } - case SPRI_RS: //read full status + case SPRI_RS: { // read full status + struct scsi_per_res_in_full *res_status; + struct scsi_per_res_in_full_desc *res_desc; + struct ctl_port *port; + int i, len; + + res_status = (struct scsi_per_res_in_full*)ctsio->kern_data_ptr; + + /* +* We had to drop the lock to allocate our buffer, which +* leaves time for someone to come in with another +* persistent reservation. (That is unlikely, though, +* since this should be the only persistent reservation +* command active right now.) +*/ + if (total_len < (sizeof(struct scsi_per_res_in_header) + + (sizeof(struct scsi_per_res_in_full_desc) + 256) * +lun->pr_key_count)){ + mtx_unlock(&lun->lun_lock); + free(ctsio->kern_data_ptr, M_CTL); + printf("%s: reservation length changed, retrying\n", + __func__); + goto retry; + } + + scsi_ulto4b(lun->PRGeneration, res_status->header.generation); + + res_desc = &res_status->desc[0]; + for (i = 0; i < 2*CTL_MAX_INITIATORS; i++) { + if (!lun->per_res[i].registered) + continue; + + memcpy(&res_desc->res_key, &lun->per_res[i].re
svn commit: r268364 - head/sys/cam/ctl
Author: mav Date: Mon Jul 7 11:52:22 2014 New Revision: 268364 URL: http://svnweb.freebsd.org/changeset/base/268364 Log: Fix "use after free" on port creation error in r268291. Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c == --- head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Jul 7 11:05:04 2014 (r268363) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Jul 7 11:52:22 2014 (r268364) @@ -1945,26 +1945,26 @@ cfiscsi_ioctl_port_create(struct ctl_req alias = ctl_get_opt(&opts, "cfiscsi_target_alias"); tag = ctl_get_opt(&opts, "cfiscsi_portal_group_tag"); if (target == NULL || tag == NULL) { - ctl_free_opts(&opts); req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), "Missing required argument"); + ctl_free_opts(&opts); return; } ct = cfiscsi_target_find_or_create(&cfiscsi_softc, target, alias); if (ct == NULL) { - ctl_free_opts(&opts); req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), "failed to create target \"%s\"", target); + ctl_free_opts(&opts); return; } if (ct->ct_state == CFISCSI_TARGET_STATE_ACTIVE) { - cfiscsi_target_release(ct); - ctl_free_opts(&opts); req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), "target \"%s\" already exist", target); + cfiscsi_target_release(ct); + ctl_free_opts(&opts); return; } port = &ct->ct_port; ___ 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: r268365 - head/sys/kern
Author: mjg Date: Mon Jul 7 14:03:30 2014 New Revision: 268365 URL: http://svnweb.freebsd.org/changeset/base/268365 Log: Don't call crdup nor uifind under vnode lock. A locked vnode can get into the way of satisyfing malloc with M_WATOK. This is a fixup to r268087. Suggested by: kib MFC after:1 week Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c == --- head/sys/kern/kern_exec.c Mon Jul 7 11:52:22 2014(r268364) +++ head/sys/kern/kern_exec.c Mon Jul 7 14:03:30 2014(r268365) @@ -718,11 +718,11 @@ interpret: VOP_UNLOCK(imgp->vp, 0); setugidsafety(td); error = fdcheckstd(td); - vn_lock(imgp->vp, LK_SHARED | LK_RETRY); if (error != 0) goto done1; newcred = crdup(oldcred); euip = uifind(attr.va_uid); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); PROC_LOCK(p); /* * Set the new credentials. @@ -766,7 +766,9 @@ interpret: if (oldcred->cr_svuid != oldcred->cr_uid || oldcred->cr_svgid != oldcred->cr_gid) { PROC_UNLOCK(p); + VOP_UNLOCK(imgp->vp, 0); newcred = crdup(oldcred); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); PROC_LOCK(p); change_svuid(newcred, newcred->cr_uid); change_svgid(newcred, newcred->cr_gid); @@ -843,6 +845,7 @@ interpret: SDT_PROBE(proc, kernel, , exec__success, args->fname, 0, 0, 0, 0); + VOP_UNLOCK(imgp->vp, 0); done1: /* * Free any resources malloc'd earlier that we didn't use. @@ -851,7 +854,6 @@ done1: uifree(euip); if (newcred != NULL) crfree(oldcred); - VOP_UNLOCK(imgp->vp, 0); /* * Handle deferred decrement of ref counts. ___ 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"
Re: svn commit: r268087 - head/sys/kern
On Mon, Jul 07, 2014 at 09:23:57AM +0300, Konstantin Belousov wrote: > On Sun, Jul 06, 2014 at 11:39:00PM +0200, Mateusz Guzik wrote: > > > That said, I would prefer to just commit previously proposed fixup. > > > > Ok. > Committed as r268365. > > > > hm, I only now notice that fexecve case does: > > vn_lock(binvp, LK_EXCLUSIVE | LK_RETRY) > > > > I guess this can be safely changed to LK_SHARED. > > No, it cannot. The VV_TEXT flag must be handled under the exclusive lock. Allright, not touching this one. Thanks, -- Mateusz Guzik ___ 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: r268368 - head/share/man/man5
Author: dim Date: Mon Jul 7 16:43:42 2014 New Revision: 268368 URL: http://svnweb.freebsd.org/changeset/base/268368 Log: Regenerate src.conf.5, which was completely busted by r268351. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Mon Jul 7 15:31:46 2014 (r268367) +++ head/share/man/man5/src.conf.5 Mon Jul 7 16:43:42 2014 (r268368) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: stable/10/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des +.\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd July 4, 2014 +.Dd July 7, 2014 .Dt SRC.CONF 5 .Os .Sh NAME @@ -78,49 +78,1071 @@ The following list provides a name and s that can be used for source builds. .Bl -tag -width indent .It Va WITHOUT_ACCT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 20:47:44Z ed +.\" from FreeBSD: head/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 20:47:44Z ed Set to not build process accounting tools such as .Xr accton 8 and .Xr sa 8 . .It Va WITHOUT_ACPI -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru Set to not build .Xr acpiconf 8 , .Xr acpidump 8 and related programs. .It Va WITHOUT_AMD -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam Set to not build .Xr amd 8 , and related programs. .It Va WITHOUT_APM -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr apm 8 , .Xr apmd 8 and related programs. .It Va WITHOUT_ARM_EABI -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ARM_EABI 253396 2013-07-16 19:15:19Z andrew +.\" from FreeBSD: head/tools/build/options/WITHOUT_ARM_EABI 253396 2013-07-16 19:15:19Z andrew Set the ARM ABI to OABI. .It Va WITHOUT_ASSERT_DEBUG -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru Set to compile programs and libraries without the .Xr assert 3 checks. .It Va WITHOUT_AT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam Set to not build .Xr at 1 and related utilities. .It Va WITHOUT_ATM -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to ATM networking. .It Va WITHOUT_AUDIT -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru Set to not build audit support into system programs. .It Va WITHOUT_AUTHPF -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru Set to not build .Xr authpf 8 . +.It Va WITHOUT_BINUTILS +.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 266158 2014-05-15 16:51:45Z brooks +Set to not build or install binutils (as, c++-filt, gconv, +ld, nm, objcopy, objdump, readelf, size and strip) as part +of the normal system build. +The resulting system cannot build programs from source. +.It Va WITHOUT_BINUTILS_BOOTSTRAP +.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp +Set to not build binutils (as, c++-filt, gconv, +ld, nm, objcopy, objdump, readelf, size and strip) +as part of the bootstrap process. +.Bf -symbolic +The option does not work for build targets unless some alternative +toolchain is provided. +.Ef +.It Va WITHOUT_BLUETOOTH +.\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru +Set to not build Bluetooth related kernel modules, programs and libraries. +.It Va WITHOUT_BOOT +.\" from FreeBSD: head/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru +Set to not build the boot blocks and loader. +.It Va WITHOUT_BSD_CPIO +.\" from FreeBSD: head/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb +Set to not build the BSD licensed version of cpio based on +.Xr libarchive 3 . +.It Va WITH_BSD_GREP +.\" from FreeBSD: head/tools/build/options/WITH_BSD_GREP 73 2
svn commit: r268369 - head/share/man/man9
Author: imp Date: Mon Jul 7 16:55:07 2014 New Revision: 268369 URL: http://svnweb.freebsd.org/changeset/base/268369 Log: Document C_HARDCLOCK flag. Modified: head/share/man/man9/timeout.9 Modified: head/share/man/man9/timeout.9 == --- head/share/man/man9/timeout.9 Mon Jul 7 16:43:42 2014 (r268368) +++ head/share/man/man9/timeout.9 Mon Jul 7 16:55:07 2014 (r268369) @@ -372,6 +372,11 @@ divided by acceptable time deviation: 1 Smaller value allows to aggregate more events in one timer interrupt to reduce processing overhead and power consumption. .El +.It Dv C_HARDCLOCK +Align the timeouts, if possible, to +.Fn hardclock +calls. +.El .Pp The functions .Fn callout_reset_curcpu ___ 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: r268370 - head/sys/dev/iscsi
Author: mav Date: Mon Jul 7 17:34:48 2014 New Revision: 268370 URL: http://svnweb.freebsd.org/changeset/base/268370 Log: Make XPT_GET_TRAN_SETTINGS to report CAM that command queueing is enabled, but make couple changes to handle non-queued commands too, if happen. MFC after:2 weeks Modified: head/sys/dev/iscsi/iscsi.c Modified: head/sys/dev/iscsi/iscsi.c == --- head/sys/dev/iscsi/iscsi.c Mon Jul 7 16:55:07 2014(r268369) +++ head/sys/dev/iscsi/iscsi.c Mon Jul 7 17:34:48 2014(r268370) @@ -1341,7 +1341,7 @@ iscsi_ioctl_daemon_handoff(struct iscsi_ is->is_sim = cam_sim_alloc(iscsi_action, iscsi_poll, "iscsi", is, is->is_id /* unit */, &is->is_lock, - maxtags, maxtags, is->is_devq); + 1, maxtags, is->is_devq); if (is->is_sim == NULL) { ISCSI_SESSION_UNLOCK(is); ISCSI_SESSION_WARN(is, "failed to allocate SIM"); @@ -1960,23 +1960,24 @@ iscsi_action_scsiio(struct iscsi_session break; } -switch (csio->tag_action) { -case MSG_HEAD_OF_Q_TAG: - bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_HOQ; - break; -break; -case MSG_ORDERED_Q_TAG: - bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_ORDERED; -break; -case MSG_ACA_TASK: - bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_ACA; -break; -case CAM_TAG_ACTION_NONE: -case MSG_SIMPLE_Q_TAG: -default: - bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_SIMPLE; -break; -} + if ((ccb->ccb_h.flags & CAM_TAG_ACTION_VALID) != 0) { + switch (csio->tag_action) { + case MSG_HEAD_OF_Q_TAG: + bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_HOQ; + break; + case MSG_ORDERED_Q_TAG: + bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_ORDERED; + break; + case MSG_ACA_TASK: + bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_ACA; + break; + case MSG_SIMPLE_Q_TAG: + default: + bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_SIMPLE; + break; + } + } else + bhssc->bhssc_flags |= BHSSC_FLAGS_ATTR_UNTAGGED; bhssc->bhssc_lun = htobe64(CAM_EXTLUN_BYTE_SWIZZLE(ccb->ccb_h.target_lun)); bhssc->bhssc_initiator_task_tag = is->is_initiator_task_tag; @@ -2069,6 +2070,23 @@ iscsi_action(struct cam_sim *sim, union cpi->ccb_h.status = CAM_REQ_CMP; break; } + case XPT_GET_TRAN_SETTINGS: + { + struct ccb_trans_settings *cts; + struct ccb_trans_settings_scsi *scsi; + + cts = &ccb->cts; + scsi = &cts->proto_specific.scsi; + + cts->protocol = PROTO_SCSI; + cts->protocol_version = SCSI_REV_SPC3; + cts->transport = XPORT_ISCSI; + cts->transport_version = 0; + scsi->valid = CTS_SCSI_VALID_TQ; + scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; + cts->ccb_h.status = CAM_REQ_CMP; + break; + } case XPT_CALC_GEOMETRY: cam_calc_geometry(&ccb->ccg, /*extended*/1); ccb->ccb_h.status = CAM_REQ_CMP; ___ 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: r268373 - head/sys/kern
Author: truckman Date: Mon Jul 7 22:02:39 2014 New Revision: 268373 URL: http://svnweb.freebsd.org/changeset/base/268373 Log: Declaration whitespace changes for style(9). MFC after:1 week Modified: head/sys/kern/subr_rman.c Modified: head/sys/kern/subr_rman.c == --- head/sys/kern/subr_rman.c Mon Jul 7 21:27:47 2014(r268372) +++ head/sys/kern/subr_rman.c Mon Jul 7 22:02:39 2014(r268373) @@ -94,12 +94,12 @@ struct resource_i { u_long r_end; /* index of the last entry (inclusive) */ u_int r_flags; void*r_virtual; /* virtual address of this resource */ - struct device *r_dev; /* device which has allocated this resource */ - struct rman *r_rm; /* resource manager from whence this came */ + struct device *r_dev; /* device which has allocated this resource */ + struct rman *r_rm; /* resource manager from whence this came */ int r_rid; /* optional rid for this resource. */ }; -static int rman_debug = 0; +static int rman_debug = 0; SYSCTL_INT(_debug, OID_AUTO, rman_debug, CTLFLAG_RWTUN, &rman_debug, 0, "rman debug"); @@ -107,12 +107,12 @@ SYSCTL_INT(_debug, OID_AUTO, rman_debug, static MALLOC_DEFINE(M_RMAN, "rman", "Resource manager"); -struct rman_head rman_head; -static struct mtx rman_mtx; /* mutex to protect rman_head */ -static int int_rman_activate_resource(struct rman *rm, struct resource_i *r, +struct rman_head rman_head; +static struct mtx rman_mtx; /* mutex to protect rman_head */ +static int int_rman_activate_resource(struct rman *rm, struct resource_i *r, struct resource_i **whohas); -static int int_rman_deactivate_resource(struct resource_i *r); -static int int_rman_release_resource(struct rman *rm, struct resource_i *r); +static int int_rman_deactivate_resource(struct resource_i *r); +static int int_rman_release_resource(struct rman *rm, struct resource_i *r); static __inline struct resource_i * int_alloc_resource(int malloc_flag) @@ -316,8 +316,8 @@ rman_last_free_region(struct rman *rm, u int rman_adjust_resource(struct resource *rr, u_long start, u_long end) { - struct resource_i *r, *s, *t, *new; - struct rman *rm; + struct resource_i *r, *s, *t, *new; + struct rman *rm; /* Not supported for shared resources. */ r = rr->__r_i; @@ -438,12 +438,12 @@ rman_adjust_resource(struct resource *rr struct resource * rman_reserve_resource_bound(struct rman *rm, u_long start, u_long end, - u_long count, u_long bound, u_int flags, - struct device *dev) + u_long count, u_long bound, u_int flags, + struct device *dev) { - u_int new_rflags; - struct resource_i *r, *s, *rv; - u_long rstart, rend, amask, bmask; + u_int new_rflags; + struct resource_i *r, *s, *rv; + u_long rstart, rend, amask, bmask; rv = NULL; @@ -720,9 +720,9 @@ rman_activate_resource(struct resource * int rman_await_resource(struct resource *re, int pri, int timo) { - int rv; - struct resource_i *r, *whohas; - struct rman *rm; + int rv; + struct resource_i *r, *whohas; + struct rman *rm; r = re->__r_i; rm = r->r_rm; @@ -758,7 +758,7 @@ int_rman_deactivate_resource(struct reso int rman_deactivate_resource(struct resource *r) { - struct rman *rm; + struct rman *rm; rm = r->__r_i->r_rm; mtx_lock(rm->rm_mtx); @@ -770,7 +770,7 @@ rman_deactivate_resource(struct resource static int int_rman_release_resource(struct rman *rm, struct resource_i *r) { - struct resource_i *s, *t; + struct resource_i *s, *t; if (r->r_flags & RF_ACTIVE) int_rman_deactivate_resource(r); @@ -864,9 +864,9 @@ out: int rman_release_resource(struct resource *re) { - int rv; - struct resource_i *r; - struct rman *rm; + int rv; + struct resource_i *r; + struct rman *rm; r = re->__r_i; rm = r->r_rm; @@ -879,7 +879,7 @@ rman_release_resource(struct resource *r uint32_t rman_make_alignment_flags(uint32_t size) { - int i; + int i; /* * Find the hightest bit set, and add one if more than one bit @@ -897,96 +897,112 @@ rman_make_alignment_flags(uint32_t size) void rman_set_start(struct resource *r, u_long start) { + r->__r_i->r_start = start; } u_long rman_get_start(struct resource *r) { + return (r->__r_i->r_start); } void rman_set_end(struct resource *r, u_long end) { + r->__r_i->r_end = end; } u_long rman_get_end(struct resource *r) { + return (r->__r_i->r_end); } u_long rman_get_size(struct resource *r) { + return (
svn commit: r268375 - head/sys/sys
Author: imp Date: Mon Jul 7 23:21:15 2014 New Revision: 268375 URL: http://svnweb.freebsd.org/changeset/base/268375 Log: Fix typo in flag name. Modified: head/sys/sys/buf.h Modified: head/sys/sys/buf.h == --- head/sys/sys/buf.h Mon Jul 7 23:21:07 2014(r268374) +++ head/sys/sys/buf.h Mon Jul 7 23:21:15 2014(r268375) @@ -210,7 +210,7 @@ struct buf { #defineB_CLUSTEROK 0x0002 /* Pagein op, so swap() can count it. */ #defineB_00040 0x0004 /* Available flag. */ #defineB_00080 0x0008 /* Available flag. */ -#defineB_0010 0x0010 /* Available flag. */ +#defineB_00100 0x0010 /* Available flag. */ #defineB_DIRTY 0x0020 /* Needs writing later (in EXT2FS). */ #defineB_RELBUF0x0040 /* Release VMIO buffer. */ #defineB_FS_FLAG1 0x0080 /* Available flag for FS use. */ ___ 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: r268374 - in head/sys: fs/nandfs sys
Author: imp Date: Mon Jul 7 23:21:07 2014 New Revision: 268374 URL: http://svnweb.freebsd.org/changeset/base/268374 Log: Naughty NANDFS was using hidden unused flag, hiding the fact that the flag was used and wasn't really available. Change the name without fixing any laying issues that might be present in NANDFS' use of this flag. Modified: head/sys/fs/nandfs/nandfs.h head/sys/sys/buf.h Modified: head/sys/fs/nandfs/nandfs.h == --- head/sys/fs/nandfs/nandfs.h Mon Jul 7 22:02:39 2014(r268373) +++ head/sys/fs/nandfs/nandfs.h Mon Jul 7 23:21:07 2014(r268374) @@ -303,8 +303,8 @@ struct nandfs_node { #definePRINT_NODE_FLAGS \ "\10\1IN_ACCESS\2IN_CHANGE\3IN_UPDATE\4IN_MODIFIED\5IN_RENAME" -#defineNANDFS_GATHER(x) ((x)->b_flags |= B_0080) -#defineNANDFS_UNGATHER(x) ((x)->b_flags &= ~B_0080) -#defineNANDFS_ISGATHERED(x) ((x)->b_flags & B_0080) +#defineNANDFS_GATHER(x) ((x)->b_flags |= B_FS_FLAG1) +#defineNANDFS_UNGATHER(x) ((x)->b_flags &= ~B_FS_FLAG1) +#defineNANDFS_ISGATHERED(x) ((x)->b_flags & B_FS_FLAG1) #endif /* !_FS_NANDFS_NANDFS_H_ */ Modified: head/sys/sys/buf.h == --- head/sys/sys/buf.h Mon Jul 7 22:02:39 2014(r268373) +++ head/sys/sys/buf.h Mon Jul 7 23:21:07 2014(r268374) @@ -213,7 +213,7 @@ struct buf { #defineB_0010 0x0010 /* Available flag. */ #defineB_DIRTY 0x0020 /* Needs writing later (in EXT2FS). */ #defineB_RELBUF0x0040 /* Release VMIO buffer. */ -#defineB_0080 0x0080 /* Available flag. */ +#defineB_FS_FLAG1 0x0080 /* Available flag for FS use. */ #defineB_NOCOPY0x0100 /* Don't copy-on-write this buf. */ #defineB_INFREECNT 0x0200 /* buf is counted in numfreebufs */ #defineB_PAGING0x0400 /* volatile paging I/O -- bypass VMIO */ ___ 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: r268376 - head/bin/rm
Author: imp Date: Mon Jul 7 23:21:20 2014 New Revision: 268376 URL: http://svnweb.freebsd.org/changeset/base/268376 Log: rm -rf can fail sometimes with an error from fts_read. Make it honor fflag to ignore fts_read errors, but stop deleting from that directory because no further progress can be made. When building a kernel with a high -j value on a high core count machine, during the cleanobj phase we can wind up doing multiple rm -rf at the same time for modules that have subdirectories. This exposed this race (sometimes) as fts_read can return an error if the directory is removed by another rm -rf. Since the intent of the -f flag was to ignore errors, even if this was a bug in fts_read, we should ignore the error like we've been instructed to do. Modified: head/bin/rm/rm.c Modified: head/bin/rm/rm.c == --- head/bin/rm/rm.cMon Jul 7 23:21:15 2014(r268375) +++ head/bin/rm/rm.cMon Jul 7 23:21:20 2014(r268376) @@ -335,7 +335,7 @@ err: warn("%s", p->fts_path); eval = 1; } - if (errno) + if (!fflag && errno) err(1, "fts_read"); fts_close(fts); } ___ 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: r268377 - head
Author: imp Date: Mon Jul 7 23:21:25 2014 New Revision: 268377 URL: http://svnweb.freebsd.org/changeset/base/268377 Log: xdev builds libsupc++ and libstdc++ in a slightly strange way. This cause a race to be exposed between the two. Compensate for this race by serializing the build/install of libstdc++ before libsupc++. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Mon Jul 7 23:21:20 2014(r268376) +++ head/Makefile.inc1 Mon Jul 7 23:21:25 2014(r268377) @@ -1497,6 +1497,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 .if ${MK_GNUCXX} != "no" && ${MK_CXX} != "no" _prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/lib/libstdc++__L: lib/msun__L +gnu/lib/libsubc++__L: gnu/lib/libstdc++__L .endif .if defined(WITH_ATF) || ${MK_TESTS} != "no" ___ 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: r268380 - head
Author: imp Date: Tue Jul 8 02:11:48 2014 New Revision: 268380 URL: http://svnweb.freebsd.org/changeset/base/268380 Log: Typo means that this couldn't have possibly fixed anything, so revert r268377. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Jul 8 01:01:30 2014(r268379) +++ head/Makefile.inc1 Tue Jul 8 02:11:48 2014(r268380) @@ -1497,7 +1497,6 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 .if ${MK_GNUCXX} != "no" && ${MK_CXX} != "no" _prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/lib/libstdc++__L: lib/msun__L -gnu/lib/libsubc++__L: gnu/lib/libstdc++__L .endif .if defined(WITH_ATF) || ${MK_TESTS} != "no" ___ 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: r268381 - head/usr.bin/showmount
Author: wblock (doc committer) Date: Tue Jul 8 02:43:04 2014 New Revision: 268381 URL: http://svnweb.freebsd.org/changeset/base/268381 Log: Make synopsis version of -3 flag match other uses in the page. MFC after:1 week Modified: head/usr.bin/showmount/showmount.8 Modified: head/usr.bin/showmount/showmount.8 == --- head/usr.bin/showmount/showmount.8 Tue Jul 8 02:11:48 2014 (r268380) +++ head/usr.bin/showmount/showmount.8 Tue Jul 8 02:43:04 2014 (r268381) @@ -40,7 +40,8 @@ .Sh SYNOPSIS .Nm .Op Fl a | d -.Op Fl e3 +.Op Fl e +.Op Fl 3 .Op Ar host .Sh DESCRIPTION The ___ 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"