From owner-p4-projects@FreeBSD.ORG Sun Sep 16 05:00:19 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4A15816A420; Sun, 16 Sep 2007 05:00:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBFBB16A418 for ; Sun, 16 Sep 2007 05:00:18 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C17BA13C465 for ; Sun, 16 Sep 2007 05:00:18 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8G50IlG065895 for ; Sun, 16 Sep 2007 05:00:18 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8G50IkO065892 for perforce@freebsd.org; Sun, 16 Sep 2007 05:00:18 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 16 Sep 2007 05:00:18 GMT Message-Id: <200709160500.l8G50IkO065892@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126459 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2007 05:00:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=126459 Change 126459 by kmacy@kmacy_home:ethng on 2007/09/16 04:59:53 defer freeing tx cleaned mbufs to the service thread if available or until after the txq lock is dropped Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#17 edit .. //depot/projects/ethng/src/sys/dev/cxgb/sys/mbufq.h#3 edit .. //depot/projects/ethng/src/sys/modules/cxgb/Makefile#6 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#17 (text+ko) ==== @@ -87,7 +87,7 @@ #endif extern struct sysctl_oid_list sysctl__hw_cxgb_children; -static int cxgb_pcpu_tx_coalesce = 1; +static int cxgb_pcpu_tx_coalesce = 0; TUNABLE_INT("hw.cxgb.tx_coalesce", &cxgb_pcpu_tx_coalesce); SYSCTL_UINT(_hw_cxgb, OID_AUTO, tx_coalesce, CTLFLAG_RDTUN, &cxgb_pcpu_tx_coalesce, 0, "coalesce small packets into a single work request"); @@ -383,12 +383,13 @@ } static int -cxgb_pcpu_reclaim_tx(struct sge_txq *txq) +cxgb_pcpu_reclaim_tx(struct sge_txq *txq, struct mbuf_head *mbq) { int reclaimable, total_reclaimed, reclaimed, freed, i, j, n; struct mbuf *m_vec[TX_CLEAN_MAX_DESC]; struct sge_qset *qs = txq_to_qset(txq, TXQ_ETH); - + + KASSERT(qs->qs_cpuid == curcpu, ("cpu qset mismatch cpuid=%d curcpu=%d", qs->qs_cpuid, curcpu)); @@ -398,12 +399,18 @@ total_reclaimed += reclaimed; - if (j > 10 || cxgb_debug) + if (j > 20 || cxgb_debug) printf("n=%d reclaimable=%d txq->processed=%d txq->cleaned=%d txq->in_use=%d\n", n, reclaimable, txq->processed, txq->cleaned, txq->in_use); - - for (i = 0; i < n; i++) - m_freem_vec(m_vec[i]); + + for (i = 0; i < n; i++) + prefetch(m_vec[i]); + /* + * really want to use an mbuf_ring here to avoid touching touching the mbufs + * when all we want to do is store them for later + */ + for (i = 0; i < n; i++) + mbufq_tail(mbq, m_vec[i]); freed += n; j++; @@ -418,14 +425,14 @@ } static int -cxgb_pcpu_start_(struct sge_qset *qs, struct mbuf *immpkt, int tx_flush) +cxgb_pcpu_start_(struct sge_qset *qs, struct mbuf *immpkt, int tx_flush, struct mbuf_head *mbq) { int i, err, initerr, flush, reclaimed, stopped; struct port_info *pi; struct sge_txq *txq; adapter_t *sc; uint32_t max_desc; - + pi = qs->port; initerr = err = i = reclaimed = 0; sc = pi->adapter; @@ -447,7 +454,7 @@ m_freem_vec(immpkt); return (initerr); } - + if ((tx_flush && (desc_reclaimable(txq) > 0)) || (desc_reclaimable(txq) > (TX_ETH_Q_SIZE>>1))) { int reclaimed = 0; @@ -457,7 +464,7 @@ qs->qs_cpuid, curcpu, desc_reclaimable(txq), txq, txq->cidx, txq->pidx); } - reclaimed = cxgb_pcpu_reclaim_tx(txq); + reclaimed = cxgb_pcpu_reclaim_tx(txq, mbq); if (cxgb_debug) printf("reclaimed=%d\n", reclaimed); } @@ -494,6 +501,8 @@ struct port_info *pi; struct sge_qset *qs; struct sge_txq *txq = NULL /* gcc is dumb */; + struct mbuf_head mbq; + struct mbuf *m; pi = ifp->if_softc; qs = NULL; @@ -508,10 +517,11 @@ qs = &pi->adapter->sge.qs[pi->first_qset]; txq = &qs->txq[TXQ_ETH]; - + + mbufq_init(&mbq); if (mtx_trylock(&txq->lock)) { txq->flags |= TXQ_TRANSMITTING; - err = cxgb_pcpu_start_(qs, immpkt, FALSE); + err = cxgb_pcpu_start_(qs, immpkt, FALSE, &mbq); txq->flags &= ~TXQ_TRANSMITTING; resid = (mbufq_len(&txq->sendq) > 128) || (desc_reclaimable(txq) > 128); mtx_unlock(&txq->lock); @@ -521,6 +531,21 @@ if (resid && (txq->flags & TXQ_TRANSMITTING) == 0) wakeup(qs); + critical_enter(); + /* + * Are we on a cpu with a service thread? + */ + if (curcpu < SGE_QSETS) { + qs = &pi->adapter->sge.qs[curcpu]; + txq = &qs->txq[TXQ_ETH]; + mbufq_append(&txq->cleanq, &mbq); + critical_exit(); + } else { + critical_exit(); + while ((m = mbufq_dequeue(&mbq)) != NULL) + m_freem_vec(m); + } + return ((err == ENOSPC) ? 0 : err); } @@ -531,7 +556,9 @@ struct sge_qset *qs; struct mbuf *m, *head, *tail, *lhead, *ltail; int calc_cookie, qidx, i; + struct mbuf_head mbq; + mbufq_init(&mbq); IFQ_LOCK(&ifp->if_snd); IFQ_DEQUEUE_NOLOCK(&ifp->if_snd, m); head = tail = m; @@ -568,7 +595,7 @@ * Assume one-to-one mapping of qset to CPU for now XXX */ - (void)cxgb_pcpu_start_(qs, NULL, TRUE); + (void)cxgb_pcpu_start_(qs, NULL, TRUE, &mbq); /* * XXX multiple packets */ @@ -583,6 +610,9 @@ struct thread *td; struct adapter *sc = qs->port->adapter; struct sge_txq *txq = &qs->txq[TXQ_ETH]; + struct mbuf_head mbq; + struct mbuf *m; + int err = 0; td = curthread; @@ -597,15 +627,18 @@ printf("bound to %d running on %d\n", qs->qs_cpuid, curcpu); for (;;) { + mbufq_init(&mbq); + if (qs->qs_flags & QS_EXITING) break; if ((qs->port->ifp->if_drv_flags && IFF_DRV_RUNNING) == 0) goto done; + if (mtx_trylock(&txq->lock)) { txq->flags |= TXQ_TRANSMITTING; - err = cxgb_pcpu_start_(qs, NULL, TRUE); + err = cxgb_pcpu_start_(qs, NULL, TRUE, &mbq); txq->flags &= ~TXQ_TRANSMITTING; mtx_unlock(&txq->lock); } else @@ -630,7 +663,14 @@ txq->txq_mr.mr_prod); continue; } - done: + done: + critical_enter(); + mbufq_append(&mbq, &txq->cleanq); + mbufq_init(&txq->cleanq); + critical_exit(); + while ((m = mbufq_dequeue(&mbq)) != NULL) + m_freem_vec(m); + tsleep(qs, 1, "cxgbidle", sleep_ticks); } ==== //depot/projects/ethng/src/sys/dev/cxgb/sys/mbufq.h#3 (text+ko) ==== @@ -44,6 +44,7 @@ mbufq_init(struct mbuf_head *l) { l->head = l->tail = NULL; + l->qlen = l->qsize = 0; } static __inline int @@ -107,4 +108,16 @@ return (l->head); } +static __inline void +mbufq_append(struct mbuf_head *a, struct mbuf_head *b) +{ + if (a->tail) + a->tail->m_nextpkt = b->head; + if (b->tail) + a->tail = b->tail; + a->qlen += b->qlen; + a->qsize += b->qsize; + + +} #endif /* CXGB_MBUFQ_H_ */ ==== //depot/projects/ethng/src/sys/modules/cxgb/Makefile#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/cxgb/Makefile,v 1.9 2007/07/17 06:50:35 kmacy Exp $ +# $FreeBSD: src/sys/modules/cxgb/Makefile,v 1.10 2007/09/09 01:28:02 kmacy Exp $ CXGB = ${.CURDIR}/../../dev/cxgb .PATH: ${CXGB} ${CXGB}/common ${CXGB}/sys @@ -7,24 +7,28 @@ SRCS= cxgb_mc5.c cxgb_vsc8211.c cxgb_ael1002.c cxgb_mv88e1xxx.c SRCS+= cxgb_xgmac.c cxgb_vsc7323.c cxgb_t3_hw.c cxgb_main.c SRCS+= cxgb_sge.c cxgb_lro.c cxgb_offload.c cxgb_l2t.c -SRCS+= device_if.h bus_if.h pci_if.h opt_zero.h +SRCS+= device_if.h bus_if.h pci_if.h opt_zero.h opt_sched.h SRCS+= uipc_mvec.c cxgb_multiq.c CFLAGS+= -DCONFIG_CHELSIO_T3_CORE -g -DCONFIG_DEFINED -DDEFAULT_JUMBO -I${CXGB} -DSMP -#CFLAGS+= -DIFNET_MULTIQUEUE -#CFLAGS+= -DINVARIANT_SUPPORT -DINVARIANTS +CFLAGS+= -DIFNET_MULTIQUEUE +#CFLAGS+= -DDISABLE_MBUF_IOVEC +#CFLAGS+= -DDEBUG -DDEBUG_PRINT +#CFLAGS+= -DINVARIANT_SUPPORT -DINVARIANTS -DWITNESS +#CFLAGS += -DLOCK_PROFILING + #CFLAGS+= -DWITNESS #CFLAGS+= -DDEBUG -DDEBUG_PRINT .if ${MACHINE_ARCH} != "ia64" # ld is broken on ia64 -t3fw-4.5.0.bin: ${CXGB}/t3fw-4.5.0.bin.gz.uu - uudecode -p < ${CXGB}/t3fw-4.5.0.bin.gz.uu \ +t3fw-4.7.1.bin: ${CXGB}/t3fw-4.7.1.bin.gz.uu + uudecode -p < ${CXGB}/t3fw-4.7.1.bin.gz.uu \ | gzip -dc > ${.TARGET} -FIRMWS= t3fw-4.5.0.bin:t3fw450 -CLEANFILES+= t3fw-4.5.0.bin +FIRMWS= t3fw-4.7.1.bin:t3fw471 +CLEANFILES+= t3fw-4.7.1.bin t3b_protocol_sram-1.1.0.bin: ${CXGB}/t3b_protocol_sram-1.1.0.bin.gz.uu uudecode -p < ${CXGB}/t3b_protocol_sram-1.1.0.bin.gz.uu \ From owner-p4-projects@FreeBSD.ORG Sun Sep 16 10:15:09 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5F49316A421; Sun, 16 Sep 2007 10:15:09 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3568716A418 for ; Sun, 16 Sep 2007 10:15:09 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1C2B213C428 for ; Sun, 16 Sep 2007 10:15:09 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8GAF9P1099596 for ; Sun, 16 Sep 2007 10:15:09 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8GAF8rL099593 for perforce@freebsd.org; Sun, 16 Sep 2007 10:15:08 GMT (envelope-from zec@FreeBSD.org) Date: Sun, 16 Sep 2007 10:15:08 GMT Message-Id: <200709161015.l8GAF8rL099593@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@FreeBSD.org using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 126462 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2007 10:15:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=126462 Change 126462 by zec@zec_tpx32 on 2007/09/16 10:14:47 Get rid of vimage_0, vnet_0, vprocg_0 and vcpu_0. Checking whether running in a default context should from now on be done exclusively using IS_DEFAULT_VIMAGE() or IS_DEFAULT_VNET() macros. All the structures are allocated now via vi_alloc() even for the "default" vimage at boot time. Each vimage / vnet / vprocg / vcpu structure now has an unique ID number, which is always 0 for "default" instances. Attempt to fix races in counting the number of processes per vprocg. Stop exposing the parent name of the vimage to the userland. A few cosmetic / style cleanups. Affected files ... .. //depot/projects/vimage/src/sys/dev/firewire/firewire.c#8 edit .. //depot/projects/vimage/src/sys/i386/i386/dump_machdep.c#3 edit .. //depot/projects/vimage/src/sys/i386/i386/minidump_machdep.c#4 edit .. //depot/projects/vimage/src/sys/kern/init_main.c#11 edit .. //depot/projects/vimage/src/sys/kern/kern_exit.c#6 edit .. //depot/projects/vimage/src/sys/kern/kern_linker.c#9 edit .. //depot/projects/vimage/src/sys/kern/kern_vimage.c#37 edit .. //depot/projects/vimage/src/sys/netinet/in_proto.c#8 edit .. //depot/projects/vimage/src/sys/netinet/tcp_hostcache.c#16 edit .. //depot/projects/vimage/src/sys/netinet/tcp_subr.c#32 edit .. //depot/projects/vimage/src/sys/netinet/tcp_var.h#16 edit .. //depot/projects/vimage/src/sys/netinet/vinet.h#19 edit .. //depot/projects/vimage/src/sys/sys/vimage.h#37 edit Differences ... ==== //depot/projects/vimage/src/sys/dev/firewire/firewire.c#8 (text+ko) ==== @@ -677,7 +677,7 @@ static void fw_reset_crom(struct firewire_comm *fc) { - INIT_VPROCG(&vprocg_0); + INIT_VPROCG(curthread->td_ucred->cr_vimage->v_procg); /* XXX */ struct crom_src_buf *buf; struct crom_src *src; struct crom_chunk *root; ==== //depot/projects/vimage/src/sys/i386/i386/dump_machdep.c#3 (text+ko) ==== @@ -112,7 +112,7 @@ mkdumpheader(struct kerneldumpheader *kdh, uint32_t archver, uint64_t dumplen, uint32_t blksz) { - INIT_VPROCG(vimage_0.v_procg); + INIT_VPROCG(curthread->td_ucred->cr_vimage->v_procg); /* XXX */ bzero(kdh, sizeof(*kdh)); strncpy(kdh->magic, KERNELDUMPMAGIC, sizeof(kdh->magic)); ==== //depot/projects/vimage/src/sys/i386/i386/minidump_machdep.c#4 (text) ==== @@ -86,7 +86,7 @@ mkdumpheader(struct kerneldumpheader *kdh, uint32_t archver, uint64_t dumplen, uint32_t blksz) { - INIT_VPROCG(vimage_0.v_procg); + INIT_VPROCG(curthread->td_ucred->cr_vimage->v_procg); bzero(kdh, sizeof(*kdh)); strncpy(kdh->magic, KERNELDUMPMAGIC, sizeof(kdh->magic)); ==== //depot/projects/vimage/src/sys/kern/init_main.c#11 (text+ko) ==== @@ -447,8 +447,9 @@ p->p_ucred->cr_ruidinfo = uifind(0); p->p_ucred->cr_prison = NULL; /* Don't jail it. */ #ifdef VIMAGE - p->p_ucred->cr_vimage = p->p_ucred->cr_rvimage = &vimage_0; - vprocg_0.nprocs = 1; + p->p_ucred->cr_vimage = LIST_FIRST(&vimage_head); + p->p_ucred->cr_rvimage = p->p_ucred->cr_vimage; + LIST_FIRST(&vprocg_head)->nprocs = 1; #endif #ifdef AUDIT audit_cred_kproc0(p->p_ucred); ==== //depot/projects/vimage/src/sys/kern/kern_exit.c#6 (text+ko) ==== @@ -173,21 +173,28 @@ } KASSERT(p->p_numthreads == 1, ("exit1: proc %p exiting with %d threads", p, p->p_numthreads)); + #ifdef VIMAGE /* * Switch back to vprocg of our parent so we can deliver * signals, otherwise we won't die - why?!? XXX * - * XXX real or effective vimage? - * XXX nprocs counting in vprocg? + * XXX is PROC_UNLOCK()/PROC_LOCK() sequence safe here? */ if (p->p_pptr && p->p_ucred->cr_vimage->v_procg != p->p_pptr->p_ucred->cr_vimage->v_procg) { - struct ucred *oldcred = p->p_ucred; + struct ucred *oldcred; setsugid(p); + crhold(p->p_pptr->p_ucred); + oldcred = p->p_ucred; p->p_ucred = p->p_pptr->p_ucred; - crhold(p->p_ucred); + PROC_UNLOCK(p); + sx_xlock(&allproc_lock); + oldcred->cr_vimage->v_procg->nprocs--; + p->p_ucred->cr_vimage->v_procg->nprocs++; + sx_xunlock(&allproc_lock); + PROC_LOCK(p); crfree(oldcred); } #endif ==== //depot/projects/vimage/src/sys/kern/kern_linker.c#9 (text+ko) ==== @@ -857,7 +857,7 @@ return (error); #ifdef VIMAGE - if (td->td_ucred->cr_vimage != &vimage_0) + if (!IS_DEFAULT_VIMAGE(td->td_ucred->cr_vimage)) return (EPERM); #endif @@ -929,9 +929,8 @@ return (error); /* XXX should suser catch this for us? */ - VNET_ASSERT(td->td_ucred->cr_vimage == &vimage_0); - /* XXX is this necessary at all? */ - VNET_ASSERT(td == curthread); + VNET_ASSERT(IS_DEFAULT_VIMAGE(td->td_ucred->cr_vimage)); + CURVNET_SET(td->td_ucred->cr_vimage->v_vnet); KLD_LOCK(); ==== //depot/projects/vimage/src/sys/kern/kern_vimage.c#37 (text+ko) ==== @@ -36,9 +36,11 @@ #include #include #include +#include #include +#include #include -#include +#include #include #ifdef DDB @@ -58,10 +60,12 @@ MALLOC_DEFINE(M_VPROCG, "vprocg", "process group control block"); MALLOC_DEFINE(M_VCPU, "vcpu", "cpu resource control block"); +static struct vimage *vi_alloc(char *, int); static int vi_destroy(struct vimage *); static void vnet_mod_complete_registration(struct vnet_modlink *); static int vnet_mod_constructor(struct vnet_modlink *); static int vnet_mod_destructor(struct vnet_modlink *); +static int vi_child_of(struct vimage *, struct vimage *); #ifdef VI_PREALLOC_SIZE /* @@ -100,12 +104,6 @@ #define vi_free(addr, type) free((addr), (type)) #endif /* VI_PREALLOC_SIZE */ -/* XXX those must vanish */ -struct vimage vimage_0; -struct vprocg vprocg_0; -struct vcpu vcpu_0; -struct vnet vnet_0; - struct vimage_list_head vimage_head; struct vnet_list_head vnet_head; struct vprocg_list_head vprocg_head; @@ -123,7 +121,12 @@ #define VNET_LIST_UNLOCK() \ mtx_unlock(&vnet_list_refc_mtx); -static int last_vi_id = 0; +static u_int last_vi_id = 0; +static u_int last_vnet_id = 0; +#if 0 +static u_int last_vprocg_id = 0; +static u_int last_vcpu_id = 0; +#endif static TAILQ_HEAD(vnet_modlink_head, vnet_modlink) vnet_modlink_head; static TAILQ_HEAD(vnet_modpending_head, vnet_modlink) vnet_modpending_head; @@ -169,7 +172,9 @@ break; /* Depencency found, we are done */ if (vml_iter == NULL) { #ifdef DEBUG_ORDERING - printf("dependency %d missing for vnet mod %s, postponing registration\n", vmi->vmi_dependson, vmi->vmi_name); + printf("dependency %d missing for vnet mod %s," + "postponing registration\n", + vmi->vmi_dependson, vmi->vmi_name); #endif /* DEBUG_ORDERING */ TAILQ_INSERT_TAIL(&vnet_modpending_head, vml, vml_mod_le); @@ -199,7 +204,10 @@ break; if (vml_iter != NULL) { #ifdef DEBUG_ORDERING - printf("vnet mod %s now registering, dependency %d loaded\n", vml_iter->vml_modinfo->vmi_name, vml->vml_modinfo->vmi_id); + printf("vnet mod %s now registering," + "dependency %d loaded\n", + vml_iter->vml_modinfo->vmi_name, + vml->vml_modinfo->vmi_id); #endif /* DEBUG_ORDERING */ TAILQ_REMOVE(&vnet_modpending_head, vml_iter, vml_mod_le); @@ -288,7 +296,7 @@ u_char eaddr[6]; if (vi_req == NULL || strcmp(vi_req->vi_name, "-") == 0) { - if (vip == &vimage_0) + if (IS_DEFAULT_VIMAGE(vip)) return (ENXIO); new_vnet = vip->vi_parent->v_vnet; } else @@ -313,7 +321,7 @@ struct ifnet *t_ifp; CURVNET_SET_QUIET(new_vnet); - t_ifp = ifunit(vi_req->vi_parent_name); + t_ifp = ifunit(vi_req->vi_if_xname); CURVNET_RESTORE(); if (t_ifp != NULL) return (EEXIST); @@ -372,9 +380,9 @@ snprintf(ifp->if_xname, IFNAMSIZ, "%s%d", ifp->if_dname, ifp->if_dunit); } else { - if (vi_req && strlen(vi_req->vi_parent_name) > 0) { + if (vi_req && strlen(vi_req->vi_if_xname) > 0) { snprintf(ifp->if_xname, IFNAMSIZ, "%s", - vi_req->vi_parent_name); + vi_req->vi_if_xname); } else { int unit = 0; struct ifnet *iter; @@ -480,12 +488,6 @@ vi_req->vi_id = vip_r->vi_id; bcopy(&vip_r->vi_name, &vi_req->vi_name, sizeof (vi_req->vi_name)); - if (vip_r->vi_parent) - bcopy(&vip_r->vi_parent->vi_name, - &vi_req->vi_parent_name, - sizeof (vi_req->vi_parent_name)); - else - vi_req->vi_parent_name[0] = 0; vi_req->vi_proc_count = vip_r->v_procg->nprocs; vi_req->vi_if_count = vip_r->v_vnet->ifccnt; vi_req->vi_sock_count = vip_r->v_vnet->sockcnt; @@ -515,21 +517,24 @@ newcred->cr_rvimage = vip_r; /* XXX */ p->p_ucred = newcred; PROC_UNLOCK(p); + sx_xlock(&allproc_lock); + oldcred->cr_vimage->v_procg->nprocs--; + p->p_ucred->cr_vimage->v_procg->nprocs++; + sx_xunlock(&allproc_lock); crfree(oldcred); break; } if (vi_req->req_action & VI_CREATE) { - vip_r = vi_alloc(vi_req->vi_name, vi_req->vi_maxsockets, - vi_req->vi_tsc_hashs, - vi_req->vi_tsc_buckl); + vip_r = vi_alloc(vi_req->vi_name, + vi_req->vi_maxsockets); if (vip_r == NULL) return (ENOMEM); vip_r->vi_parent = vip; } - if (vip == vip_r && vip != &vimage_0) + if (vip == vip_r && !IS_DEFAULT_VIMAGE(vip)) return (EPERM); } @@ -567,9 +572,7 @@ struct vimage * -vi_alloc(name, maxsock, tsc_hashs, tsc_buckl) - char *name; - int maxsock, tsc_hashs, tsc_buckl; +vi_alloc(char *name, int maxsock) { struct vimage *vip; struct vnet *vnet; @@ -596,6 +599,7 @@ if (vnet == NULL) panic("vi_alloc: malloc failed for vnet \"%s\"\n", name); vip->v_vnet = vnet; + vnet->vnet_id = last_vnet_id++; vnet->vnet_magic_n = VNET_MAGIC_N; vprocg = vi_malloc(sizeof(struct vprocg), M_VPROCG, M_NOWAIT | M_ZERO); @@ -646,6 +650,9 @@ struct vnet_modlink *vml; /* XXX Beware of races -> more locking to be done... */ + if (vprocg->nprocs != 0) + return (EBUSY); + if (vnet->sockcnt != 0) return (EBUSY); @@ -783,23 +790,13 @@ LIST_INIT(&vprocg_head); LIST_INIT(&vcpu_head); - LIST_INSERT_HEAD(&vimage_head, &vimage_0, vi_le); - LIST_INSERT_HEAD(&vnet_head, &vnet_0, vnet_le); - LIST_INSERT_HEAD(&vprocg_head, &vprocg_0, vprocg_le); - LIST_INSERT_HEAD(&vcpu_head, &vcpu_0, vcpu_le); - - sprintf(vimage_0.vi_name, "default"); - vimage_0.v_vnet = &vnet_0; - vimage_0.v_procg = &vprocg_0; - vimage_0.v_cpu = &vcpu_0; - - vnet_0.vnet_magic_n = VNET_MAGIC_N; - mtx_init(&vnet_list_refc_mtx, "vnet_list_refc_mtx", NULL, MTX_DEF); cv_init(&vnet_list_condvar, "vnet_list_condvar"); + vi_alloc("default", 0); + /* We MUST clear curvnet in vi_init_done before going SMP. */ - curvnet = &vnet_0; + curvnet = LIST_FIRST(&vnet_head); } static void @@ -824,7 +821,6 @@ SYSINIT(vimage_done, SI_SUB_VIMAGE_DONE, SI_ORDER_FIRST, vi_init_done, NULL) #ifdef VI_PREALLOC_SIZE - void * vi_malloc(unsigned long size, struct malloc_type *type, int flags) { @@ -845,7 +841,8 @@ /* Not (enough) free space in our pool, resort to malloc() */ if (vmt == NULL) { if (vi_mpool_fail_cnt == 0) - printf("vi_mpool exhausted, consider increasing VI_PREALLOC_SIZE\n"); + printf("vi_mpool exhausted," + "consider increasing VI_PREALLOC_SIZE\n"); vi_mpool_fail_cnt++; addr = malloc(size, type, flags); return addr; ==== //depot/projects/vimage/src/sys/netinet/in_proto.c#8 (text+ko) ==== @@ -130,6 +130,7 @@ .pr_ctlinput = tcp_ctlinput, .pr_ctloutput = tcp_ctloutput, .pr_init = tcp_init, + .pr_destroy = tcp_destroy, .pr_slowtimo = tcp_slowtimo, .pr_drain = tcp_drain, .pr_usrreqs = &tcp_usrreqs ==== //depot/projects/vimage/src/sys/netinet/tcp_hostcache.c#16 (text+ko) ==== @@ -105,10 +105,9 @@ #ifndef VIMAGE static struct tcp_hostcache tcp_hostcache; +static struct callout tcp_hc_callout; #endif -static struct callout tcp_hc_callout; - static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *); static struct hc_metrics *tcp_hc_insert(struct in_conninfo *); static int sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS); @@ -222,16 +221,22 @@ NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); uma_zone_set_max(V_tcp_hostcache.zone, V_tcp_hostcache.cache_limit); -#ifdef VIMAGE - if (!IS_DEFAULT_VNET(curvnet)) - return; -#endif - /* * Set up periodic cache cleanup. */ - callout_init(&tcp_hc_callout, CALLOUT_MPSAFE); - callout_reset(&tcp_hc_callout, V_tcp_hostcache.prune * hz, tcp_hc_purge, 0); + callout_init(&V_tcp_hc_callout, CALLOUT_MPSAFE); + callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz, + tcp_hc_purge, curvnet); +} + +void +tcp_hc_destroy(void) +{ + INIT_VNET_INET(curvnet); + + /* XXX TODO walk the hashtable and free all entries */ + + callout_drain(&V_tcp_hc_callout); } /* @@ -638,12 +643,12 @@ static void tcp_hc_purge(void *arg) { + CURVNET_SET((struct vnet *) arg); + INIT_VNET_INET(curvnet); struct hc_metrics *hc_entry, *hc_next; int all = 0; int i; - VNET_ITERLOOP_BEGIN() - INIT_VNET_INET(vnet_iter); if (V_tcp_hostcache.purgeall) { all = 1; V_tcp_hostcache.purgeall = 0; @@ -665,11 +670,9 @@ } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); } - VNET_ITERLOOP_END(); + + callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz, + tcp_hc_purge, arg); - /* XXX Marko - FIXME! */ - CURVNET_SET(&vnet_0); - INIT_VNET_INET(&vnet_0); - callout_reset(&tcp_hc_callout, V_tcp_hostcache.prune * hz, tcp_hc_purge, 0); CURVNET_RESTORE(); } ==== //depot/projects/vimage/src/sys/netinet/tcp_subr.c#32 (text+ko) ==== @@ -387,6 +387,12 @@ } void +tcp_destroy(void) +{ + tcp_hc_destroy(); +} + +void tcp_fini(void *xtp) { ==== //depot/projects/vimage/src/sys/netinet/tcp_var.h#16 (text+ko) ==== @@ -547,6 +547,7 @@ void tcp_drain(void); void tcp_fasttimo(void); void tcp_init(void); +void tcp_destroy(void); void tcp_fini(void *); char *tcp_log_addrs(struct in_conninfo *, struct tcphdr *, void *, const void *); @@ -587,6 +588,7 @@ * All tcp_hc_* functions are IPv4 and IPv6 (via in_conninfo) */ void tcp_hc_init(void); +void tcp_hc_destroy(void); void tcp_hc_get(struct in_conninfo *, struct hc_metrics_lite *); u_long tcp_hc_getmtu(struct in_conninfo *); void tcp_hc_updatemtu(struct in_conninfo *, u_long); ==== //depot/projects/vimage/src/sys/netinet/vinet.h#19 (text+ko) ==== @@ -87,6 +87,7 @@ struct inpcbinfo _tcbinfo; struct tcpstat _tcpstat; /* tcp statistics */ struct tcp_hostcache _tcp_hostcache; + struct callout _tcp_hc_callout; struct tcp_syncache _tcp_syncache; TAILQ_HEAD(, tcptw) _twq_2msl; @@ -220,6 +221,7 @@ #define V_tcpstat VNET_INET(tcpstat) #define V_twq_2msl VNET_INET(twq_2msl) #define V_tcp_hostcache VNET_INET(tcp_hostcache) +#define V_tcp_hc_callout VNET_INET(tcp_hc_callout) #define V_tcp_syncache VNET_INET(tcp_syncache) #define V_tcp_sc_rst_sock_fail VNET_INET(tcp_sc_rst_sock_fail) ==== //depot/projects/vimage/src/sys/sys/vimage.h#37 (text+ko) ==== @@ -108,23 +108,25 @@ struct vnet { void *mod_data[VNET_MOD_MAX]; - LIST_ENTRY(vnet) vnet_le; + u_int vnet_ref; /* reference count */ + LIST_ENTRY(vnet) vnet_le; /* all vnets list */ + u_int vnet_id; /* ID num */ - int ifccnt; - int sockcnt; + u_int ifccnt; + u_int sockcnt; - int vnet_magic_n; + u_int vnet_magic_n; }; struct vnet_symmap { char *name; - int offset; - int size; + size_t offset; + size_t size; }; struct vnet_modinfo { - int vmi_id; - int vmi_dependson; + u_int vmi_id; + u_int vmi_dependson; char *vmi_name; vnet_attach_fn *vmi_iattach; vnet_detach_fn *vmi_idetach; @@ -298,28 +300,22 @@ const char *); void printcpuinfo(struct vprocg *); -struct vimage *vi_alloc(char *, int, int, int); void vi_cpu_acct(void *); int vi_td_ioctl(u_long, struct vi_req *, struct thread *); int vi_if_move(struct vi_req *, struct ifnet *, struct vimage *); -int vi_child_of(struct vimage *, struct vimage *); int vi_symlookup(struct kld_sym_lookup *, char *); struct vimage *vnet2vimage(struct vnet *); char *vnet_name(struct vnet *); -extern struct vimage vimage_0; LIST_HEAD(vimage_list_head, vimage); extern struct vimage_list_head vimage_head; -extern struct vprocg vprocg_0; LIST_HEAD(vprocg_list_head, vprocg); extern struct vprocg_list_head vprocg_head; -extern struct vcpu vcpu_0; LIST_HEAD(vcpu_list_head, vcpu); extern struct vcpu_list_head vcpu_head; -extern struct vnet vnet_0; LIST_HEAD(vnet_list_head, vnet); extern struct vnet_list_head vnet_head; extern int vnet_list_refc; @@ -337,14 +333,13 @@ mtx_unlock(&vnet_list_refc_mtx); \ cv_signal(&vnet_list_condvar); -#define IS_DEFAULT_VNET(arg) ((arg) == &vnet_0 ? 1 : 0) +#define IS_DEFAULT_VIMAGE(arg) ((arg)->vi_id == 0) +#define IS_DEFAULT_VNET(arg) ((arg)->vnet_id == 0) -/* - * XXX The stuff bellow needs a major cleanup / rewrite from scratch. - */ - struct vimage { - LIST_ENTRY(vimage) vi_le; + LIST_ENTRY(vimage) vi_le; /* all vimage list */ + LIST_ENTRY(vimage) vi_sibilings; /* vimages with same parent */ + LIST_HEAD(, vimage) vi_child_head; /* direct offspring list */ struct vimage *vi_parent; /* ptr to parent vimage */ u_int vi_id; /* ID num */ @@ -357,6 +352,8 @@ struct vprocg { LIST_ENTRY(vprocg) vprocg_le; + u_int vprocg_ref; /* reference count */ + u_int vprocg_id; /* ID num */ u_int nprocs; @@ -394,6 +391,8 @@ struct vcpu { LIST_ENTRY(vcpu) vcpu_le; + u_int vcpu_ref; /* reference count */ + u_int vcpu_id; /* ID num */ #if 0 u_int cp_time_avg[CPUSTATES]; @@ -418,8 +417,6 @@ u_int vi_cpu_weight; /* Prop. share scheduling priority */ int vi_intr_limit; /* Limit on CPU usage in intr ctx */ int vi_maxsockets; - int vi_tsc_hashs; - int vi_tsc_buckl; u_short vi_id; /* IDnum - but do we need it at all? */ u_short vi_proc_limit; /* max. number of processes */ u_short vi_proc_count; /* current number of processes */ @@ -427,9 +424,9 @@ u_short vi_child_count; /* current number of child vnets */ int vi_if_count; /* current number network interfaces */ int vi_sock_count; - char vi_name[MAXHOSTNAMELEN]; - char vi_parent_name[MAXHOSTNAMELEN]; + char vi_name[MAXPATHLEN]; char vi_chroot[MAXPATHLEN]; + char vi_if_xname[MAXPATHLEN]; /* XXX should be IFNAMSIZ */ int cp_time_avg[CPUSTATES]; struct loadavg averunnable; }; From owner-p4-projects@FreeBSD.ORG Sun Sep 16 10:16:11 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 52B0616A468; Sun, 16 Sep 2007 10:16:11 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F5FE16A418 for ; Sun, 16 Sep 2007 10:16:11 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E31AE13C45E for ; Sun, 16 Sep 2007 10:16:10 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8GAGAov099637 for ; Sun, 16 Sep 2007 10:16:10 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8GAGAJI099634 for perforce@freebsd.org; Sun, 16 Sep 2007 10:16:10 GMT (envelope-from zec@FreeBSD.org) Date: Sun, 16 Sep 2007 10:16:10 GMT Message-Id: <200709161016.l8GAGAJI099634@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@FreeBSD.org using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 126463 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2007 10:16:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=126463 Change 126463 by zec@zec_tpx32 on 2007/09/16 10:15:51 Sync the userland management utility with the kernel-level changes, and stop displaying unused fields (CPU limits / accounting / vimage parent info). Affected files ... .. //depot/projects/vimage/src/usr.sbin/vimage/vimage.c#3 edit Differences ... ==== //depot/projects/vimage/src/usr.sbin/vimage/vimage.c#3 (text+ko) ==== @@ -62,21 +62,21 @@ void vi_print(struct vi_req *vi_req) { +#if 0 double lf = 1.0/vi_req->averunnable.fscale; +#endif printf ("\"%s\":\n", vi_req->vi_name); - printf (" %d processes, ", vi_req->vi_proc_count); - printf ("load averages: %3.2f, %3.2f, %3.2f\n", + printf (" Processes (current/max): %d/%d\n", + vi_req->vi_proc_count, vi_req->vi_proc_limit); +#if 0 + printf (" load averages: %3.2f, %3.2f, %3.2f\n", lf * vi_req->averunnable.ldavg[0], lf * vi_req->averunnable.ldavg[1], lf * vi_req->averunnable.ldavg[2]); -#if 0 printf (" CPU usage: %3.2f%% (", 0.0001 * vi_req->cp_time_avg[CP_ALL]); -#else - printf (" CPU usage: ("); -#endif printf ("%3.2f%% user, ", 0.0001 * vi_req->cp_time_avg[CP_USER]); printf ("%3.2f%% nice, ", 0.0001 * vi_req->cp_time_avg[CP_NICE]); printf ("%3.2f%% sys, ",0.0001 * vi_req->cp_time_avg[CP_SYS]); @@ -92,22 +92,15 @@ 0.0001 * vi_req->vi_intr_limit); else printf ("no intr limit\n"); +#endif - if (vi_req->vi_proc_limit) - printf (" Proc limit: %d", vi_req->vi_proc_limit); - else - printf (" No proc limit"); if (vi_req->vi_child_limit) - printf (", child limit: %d", vi_req->vi_child_limit); - printf("\n Sockets (current/max): %d/%d\n", vi_req->vi_sock_count, + printf (" child limit: %d\n", vi_req->vi_child_limit); + printf(" Sockets (current/max): %d/%d\n", vi_req->vi_sock_count, vi_req->vi_maxsockets); - printf (" %d network interfaces", vi_req->vi_if_count); + printf (" %d network interfaces\n", vi_req->vi_if_count); if (vi_req->vi_child_count) - printf (", %d child vimages", - vi_req->vi_child_count); - if (vi_req->vi_parent_name[0]) - printf (", parent vimage: \"%s\"", - vi_req->vi_parent_name); printf ("\n"); + printf (" %d child vimages\n", vi_req->vi_child_count); if (vi_req->vi_chroot[0]) printf (" Chroot dir: %s\n", vi_req->vi_chroot); } @@ -185,11 +178,10 @@ /* here vi_chroot stores the current ifc name */ strncpy(vi_req.vi_chroot, argv[3], sizeof (vi_req.vi_chroot)); if (argc >= 5) - /* here vi_parent_name stores the target ifc name */ - strncpy(vi_req.vi_parent_name, argv[4], - sizeof (vi_req.vi_parent_name)); + strncpy(vi_req.vi_if_xname, argv[4], + sizeof (vi_req.vi_if_xname)); else - vi_req.vi_parent_name[0] = 0; + vi_req.vi_if_xname[0] = 0; if (ioctl(s, SIOCSIFVIMAGE, (caddr_t)&vi_req) < 0) goto abort; printf("%s@%s\n", vi_req.vi_chroot, vi_req.vi_name); From owner-p4-projects@FreeBSD.ORG Sun Sep 16 12:47:29 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4259816A41A; Sun, 16 Sep 2007 12:47:29 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BBE516A417 for ; Sun, 16 Sep 2007 12:47:29 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E7E5A13C45A for ; Sun, 16 Sep 2007 12:47:28 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8GClSET019236 for ; Sun, 16 Sep 2007 12:47:28 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8GClSU0019233 for perforce@freebsd.org; Sun, 16 Sep 2007 12:47:28 GMT (envelope-from gonzo@FreeBSD.org) Date: Sun, 16 Sep 2007 12:47:28 GMT Message-Id: <200709161247.l8GClSU0019233@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 126469 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2007 12:47:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=126469 Change 126469 by gonzo@gonzo_jeeves on 2007/09/16 12:47:23 o Remove printf from tick_init_params since UART code may use DELAY(9) so tick_init_params should be called before cninit. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips/tick.c#18 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips/tick.c#18 (text+ko) ==== @@ -83,6 +83,10 @@ tick_init_params(uint64_t platform_counter_freq, int double_count) { + /* + * XXX: Do not use printf here: uart code 8250 may use DELAY so + * this function should be called before cninit. + */ counter_freq = platform_counter_freq; counts_per_hz = counter_freq / hz; @@ -97,13 +101,13 @@ counts_per_usec /= 2; } - printf("MIPS32 clock: %ju Hz\n", (intmax_t)counter_freq); set_cputicker(tick_ticker, counter_freq, 1); } void tick_init(void) { + printf("MIPS32 clock: %ju Hz\n", (intmax_t)counter_freq); if (counter_freq != 0 && !counter_is_broken) { counter_timecounter.tc_frequency = counter_freq; tc_init(&counter_timecounter); From owner-p4-projects@FreeBSD.ORG Sun Sep 16 12:58:45 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 630CD16A41B; Sun, 16 Sep 2007 12:58:45 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23CF316A418 for ; Sun, 16 Sep 2007 12:58:45 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0B94013C465 for ; Sun, 16 Sep 2007 12:58:45 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8GCwiFH019811 for ; Sun, 16 Sep 2007 12:58:44 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8GCwivm019807 for perforce@freebsd.org; Sun, 16 Sep 2007 12:58:44 GMT (envelope-from gonzo@FreeBSD.org) Date: Sun, 16 Sep 2007 12:58:44 GMT Message-Id: <200709161258.l8GCwivm019807@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 126471 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2007 12:58:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=126471 Change 126471 by gonzo@gonzo_jeeves on 2007/09/16 12:58:04 o get rid of mips_init function and merge it's functionality to platform_init. o Reorder some function calls: - init_param1 should be called first to initialize hz variable - tick_init_params should be called before cninit because uart code may use DELAY. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips32/idt/idt_machdep.c#4 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips32/idt/idt_machdep.c#4 (text+ko) ==== @@ -73,46 +73,6 @@ extern int *end; void -mips_init(void) -{ - int i; - - printf("entry: mips_init()\n"); - - bootverbose = 1; - realmem = btoc(32 << 20); - - for (i = 0; i < 10; i++) { - phys_avail[i] = 0; - } - - /* phys_avail regions are in bytes */ - phys_avail[0] = MIPS_KSEG0_TO_PHYS((vm_offset_t)&end); - phys_avail[1] = ctob(realmem); - - physmem = realmem; - - init_param1(); - init_param2(physmem); - - mips_cpu_init(); - pmap_bootstrap(); - - proc_linkup(&proc0, &thread0); - thread0.td_kstack = kstack0; - pcpu_init(pcpup, 0, sizeof(struct pcpu)); - pcpup->pc_curthread = &thread0; - cpu_thread_setup(curthread); - pcpup->pc_curpcb = curthread->td_pcb; - - mutex_init(); - -#ifdef DDB - kdb_init(); -#endif -} - -void platform_halt(void) { @@ -151,17 +111,53 @@ void platform_start(int argc, char **argv) { + uint64_t platform_counter_freq; vm_offset_t kernend; - uint64_t platform_counter_freq; + int i; /* clear the BSS and SBSS segments */ kernend = round_page((vm_offset_t)&end); memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + bootverbose = 1; + realmem = btoc(32 << 20); + + for (i = 0; i < 10; i++) { + phys_avail[i] = 0; + } + + /* phys_avail regions are in bytes */ + phys_avail[0] = MIPS_KSEG0_TO_PHYS((vm_offset_t)&end); + phys_avail[1] = ctob(realmem); + + physmem = realmem; + + /* + * ns8250 uart code uses DELAY so ticker should be inititalized + * before cninit. And tick_init_params refers to hz, so * init_param1 + * should be called first. + */ + init_param1(); + /* TODO: parse argc,argv */ + platform_counter_freq = 330000000UL; + tick_init_params(platform_counter_freq, 1); cninit(); - mips_init(); - /* Set counter_freq for tick_init_params() */ - platform_counter_freq = 330000000UL; + + init_param2(physmem); + + mips_cpu_init(); + pmap_bootstrap(); + + proc_linkup(&proc0, &thread0); + thread0.td_kstack = kstack0; + pcpu_init(pcpup, 0, sizeof(struct pcpu)); + pcpup->pc_curthread = &thread0; + cpu_thread_setup(curthread); + pcpup->pc_curpcb = curthread->td_pcb; + + mutex_init(); - tick_init_params(platform_counter_freq, 1); +#ifdef DDB + kdb_init(); +#endif } From owner-p4-projects@FreeBSD.ORG Sun Sep 16 12:59:47 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2523816A420; Sun, 16 Sep 2007 12:59:47 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEFE916A418 for ; Sun, 16 Sep 2007 12:59:46 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C6CDE13C467 for ; Sun, 16 Sep 2007 12:59:46 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8GCxkUY019858 for ; Sun, 16 Sep 2007 12:59:46 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8GCxkSC019855 for perforce@freebsd.org; Sun, 16 Sep 2007 12:59:46 GMT (envelope-from gonzo@FreeBSD.org) Date: Sun, 16 Sep 2007 12:59:46 GMT Message-Id: <200709161259.l8GCxkSC019855@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 126472 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2007 12:59:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=126472 Change 126472 by gonzo@gonzo_jeeves on 2007/09/16 12:59:44 o Add ns8250-compatible uart instead of home-brew console.c Affected files ... .. //depot/projects/mips2/src/sys/mips/mips32/idt/files.idt#3 edit .. //depot/projects/mips2/src/sys/mips/mips32/idt/uart_cpu_rc32434.c#1 add Differences ... ==== //depot/projects/mips2/src/sys/mips/mips32/idt/files.idt#3 (text+ko) ==== @@ -1,6 +1,8 @@ # $FreeBSD$ -mips/mips32/idt/console.c standard -mips/mips32/idt/idt_machdep.c standard -mips/mips32/idt/obio.c standard -mips/mips32/idt/idtpci.c optional pci +# mips/mips32/idt/console.c standard +mips/mips32/idt/idt_machdep.c standard +mips/mips32/idt/obio.c standard +mips/mips32/idt/idtpci.c optional pci +mips/mips32/idt/uart_cpu_rc32434.c optional uart +# mips/mips32/idt/uart_bus_rc32434.c optional uart From owner-p4-projects@FreeBSD.ORG Sun Sep 16 13:24:21 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AC7B616A469; Sun, 16 Sep 2007 13:24:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C6BB16A420 for ; Sun, 16 Sep 2007 13:24:20 +0000 (UTC) (envelope-from gabor@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3482113C49D for ; Sun, 16 Sep 2007 13:24:20 +0000 (UTC) (envelope-from gabor@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8GDOKmM022703 for ; Sun, 16 Sep 2007 13:24:20 GMT (envelope-from gabor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8GDOJRv022700 for perforce@freebsd.org; Sun, 16 Sep 2007 13:24:19 GMT (envelope-from gabor@freebsd.org) Date: Sun, 16 Sep 2007 13:24:19 GMT Message-Id: <200709161324.l8GDOJRv022700@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@freebsd.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 126473 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2007 13:24:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=126473 Change 126473 by gabor@gabor_server on 2007/09/16 13:23:54 - Cut long lines - Correct whitespace Affected files ... .. //depot/projects/docproj_hu/books/handbook/audit/chapter.sgml#3 edit Differences ... ==== //depot/projects/docproj_hu/books/handbook/audit/chapter.sgml#3 (text+ko) ==== @@ -5,7 +5,7 @@ + Original Revision: r1.30 --> @@ -33,41 +33,55 @@ MAC - A &os; 6.2-RELEASE és az azóta megjelent verziók támogatják a - biztonsági események aprólékos vizsgálatát. Ezzel egy megbízható, - részletes és jól konfigurálható naplózási rendszert társítanak a - rendszerben található biztonságot igénylõ események széles köréhez, - beleértve a bejelentkezéseket, a konfigurációs állományokban bekövetkezõ - változásokat, állomány- és hálózati hozzáféréseket. Az így létrehozott - naplóbejegyzések felbecsülhetetlen értékûnek bizonyulhatnak egy élõ - rendszer felügyelete során, vagy egy hálózati támadás észleléséhez, - esetleg egy összeomlás okainak kielemezéséhez. A &os; ehhez a &sun; - által kifejlesztett BSM technológia API-ját és - állományformátumát valósítja meg, és így képes együttmûködni a &sun; - &solaris; valamint az &apple; &macos; X bizonsági rendszereivel - egyaránt. + A &os; 6.2-RELEASE és az azóta megjelent verziók + támogatják a biztonsági események + aprólékos vizsgálatát. Ezzel egy + megbízható, részletes és jól + konfigurálható naplózási rendszert + társítanak a rendszerben található + biztonságot igénylõ események széles + köréhez, beleértve a bejelentkezéseket, a + konfigurációs állományokban + bekövetkezõ változásokat, állomány- + és hálózati hozzáféréseket. Az + így létrehozott naplóbejegyzések + felbecsülhetetlen értékûnek bizonyulhatnak egy + élõ rendszer felügyelete során, vagy egy + hálózati támadás + észleléséhez, esetleg egy összeomlás + okainak kielemezéséhez. A &os; ehhez a &sun; által + kifejlesztett BSM technológia API-ját + és állományformátumát + valósítja meg, és így képes + együttmûködni a &sun; &solaris; valamint az &apple; + &macos; X bizonsági rendszereivel egyaránt. - Ebben a fejezetben a biztonsági események vizsgálatának - telepítéséhez és beállításához szükséges ismeretek tekintjük át. - Ennek keretében szó esik a vizsgálati házirendekrõl, valamint - mutatunk egy példát a vizsgálatok beállítására. + Ebben a fejezetben a biztonsági események + vizsgálatának telepítéséhez és + beállításához szükséges ismeretek + tekintjük át. Ennek keretében szó esik a + vizsgálati házirendekrõl, valamint mutatunk egy + példát a vizsgálatok + beállítására. A fejezet elolvasása során megismerjük: - mit jelent az események vizsgálata és hogyan + mit jelent az események vizsgálata és hogyan mûködik. - hogyan kell beállítani az események vizsgálatát &os;-n - a különbözõ felhasználók és programok esetén. + hogyan kell beállítani az események + vizsgálatát &os;-n a különbözõ + felhasználók és programok esetén. - hogyan értelmezzük egy vizsgálati nyomokat a - vizsgálatot szûkítõ és -elemzõ segédprogramok segítségével. + hogyan értelmezzük egy vizsgálati nyomokat a + vizsgálatot szûkítõ és -elemzõ + segédprogramok segítségével. @@ -75,505 +89,627 @@ - alapvetõ &unix;-os és &os;-s ismeretek - (). + alapvetõ &unix;-os és &os;-s ismeretek + (). - a rendszermag konfigurálásával és fordításával kapcsolatos - tudnivalók alapszintû ismerete (). + a rendszermag konfigurálásával és + fordításával kapcsolatos tudnivalók + alapszintû ismerete (). - az informatikai biztonság alapfogalmainak és annak a &os;-re - vonatkozó részleteinek minimális ismerete - (). + az informatikai biztonság alapfogalmainak és annak + a &os;-re vonatkozó részleteinek minimális + ismerete (). - A &os; 6.2-es verziójában jelenlevõ biztonsági vizsgálat még - csak kísérleti jelleggel szerepel, éles környezetben kizárólag csak - az ilyen fajta szoftverekkel kapcsolatos kockázatok tudatában és - elfogadásával javasolt használni. Ismert korlátozások: nem mindegyik - biztonságot érintõ esemény vizsgálható, mint mondjuk az egyes - bejelentkezési típusok, mivel azok nem megfelelõen hitelesítik - a belépõ felhasználókat. Ilyenek például az X11-alapú felületek és - az egyéb, erre a célra alkalmas, más által fejlesztett daemonok. + A &os; 6.2-es verziójában jelenlevõ + biztonsági vizsgálat még csak + kísérleti jelleggel szerepel, éles + környezetben kizárólag csak az ilyen fajta + szoftverekkel kapcsolatos kockázatok tudatában és + elfogadásával javasolt használni. Ismert + korlátozások: nem mindegyik biztonságot + érintõ esemény vizsgálható, mint + mondjuk az egyes bejelentkezési típusok, mivel azok nem + megfelelõen hitelesítik a belépõ + felhasználókat. Ilyenek például az + X11-alapú felületek és az egyéb, erre a + célra alkalmas, más által fejlesztett daemonok. - A biztonsági események vizsgálata során a rendszer képes nagyon - részletes naplókat készíteni az érintett tevékenységekrõl. Így egy - kellõen forgalmas rendszeren az állománymozgások alapos nyomonkövetése - bizonyos konfigurációkon akár gigabyte-okat is kitehet hetente. A - rendszergazdáknak ezért mindig javasolt számolniuk a nagy forgalmú - események biztonsági vizsgálatának tárigényével. Például, emiatt - érdemes lehet egy egész állományrendszert szánni erre a feladatra a - /var/audit könyvtárban, és így a többi - állományrendszer nem látja kárát, ha véletlenül betelne ez a - terület. + A biztonsági események vizsgálata során + a rendszer képes nagyon részletes naplókat + készíteni az érintett + tevékenységekrõl. Így egy kellõen + forgalmas rendszeren az állománymozgások alapos + nyomonkövetése bizonyos konfigurációkon + akár gigabyte-okat is kitehet hetente. A + rendszergazdáknak ezért mindig javasolt számolniuk + a nagy forgalmú események biztonsági + vizsgálatának tárigényével. + Például, emiatt érdemes lehet egy egész + állományrendszert szánni erre a feladatra a + /var/audit könyvtárban, és + így a többi állományrendszer nem látja + kárát, ha véletlenül betelne ez a + terület. - A fejezet fontosabb fogalmai - A fejezet elolvasása elõtt meg kell ismernünk néhány fontos - alapfogalmat: + A fejezet elolvasása elõtt meg kell ismernünk + néhány fontos alapfogalmat: - esemény: Vizsgálható eseménynek azt az - eseményt nevezzük, amely egy vizsgálati alrendszerben naplózható. - Biztonsági események lehetnek például: egy állomány létrehozása, - egy hálózati kapcsolat felépítése, vagy egy felhasználó - bejelentkezése. Egy esemény jellegzetes, ha - visszakövethetõ valamelyik hitelesített felhasználóhoz, vagy - nem jellegzetes, ha ez nem lehetséges. Nem - jellegzetes események lehet például minden olyan esemény, amely - egy bejelentkezési folyamat hitelesítési lépése elõtt történik, - ilyenek a hibás jelszóval történõ belépési kísérletek. + esemény: Vizsgálható + eseménynek azt az eseményt nevezzük, amely egy + vizsgálati alrendszerben naplózható. + Biztonsági események lehetnek például: + egy állomány létrehozása, egy + hálózati kapcsolat felépítése, + vagy egy felhasználó bejelentkezése. Egy + esemény jellegzetes, ha + visszakövethetõ valamelyik hitelesített + felhasználóhoz, vagy nem jellegzetes, + ha ez nem lehetséges. Nem jellegzetes események lehet + például minden olyan esemény, amely egy + bejelentkezési folyamat hitelesítési + lépése elõtt történik, ilyenek a + hibás jelszóval történõ + belépési kísérletek. - osztály: Eseményosztálynak az összefüggõ - események névvel ellátott halmazát tekintjük, és szûrési - feltételekben használjuk õket. Általában alkalmazott osztályok: - file creation (fc, állománylétrehozás), - exec (ex, programindítás), és - login_logout (lo, ki- és bejelentkezés). + osztály: + Eseményosztálynak az összefüggõ + események névvel ellátott halmazát + tekintjük, és szûrési feltételekben + használjuk õket. Általában alkalmazott + osztályok: file creation (fc, + állománylétrehozás), exec + (ex, programindítás), és + login_logout (lo, ki- és + bejelentkezés). - rekord: Rekordnak nevezzük a biztonsági - eseményeket leíró biztonsági naplóbejegyzéseket. A rekordok - tartalmazhatják a feljegyzett esemény típusát, az eseményt kiváltó - tevékenységet (felhasználót), a dátumot és az idõt, tetszõleges - objektum vagy paraméter értékét, feltételek teljesülését vagy - meghiúsulását. + rekord: Rekordnak nevezzük a + biztonsági eseményeket leíró + biztonsági naplóbejegyzéseket. A rekordok + tartalmazhatják a feljegyzett esemény + típusát, az eseményt kiváltó + tevékenységet (felhasználót), a + dátumot és az idõt, tetszõleges objektum + vagy paraméter értékét, feltételek + teljesülését vagy + meghiúsulását. - nyom: Vizsgálati nyomnak vagy - naplóállománynak nevezzük a különféle biztonsági eseményeket - leíró vizsgálati rekordok sorozatát. A nyomok többnyire nagyjából - az események bekövetkezése szerinti idõrendben következnek. Csak - és kizárólag az erre felhatalmazott programok hozhatnak létre - rekordokat a vizsgálati nyomban. + nyom: Vizsgálati nyomnak vagy + naplóállománynak nevezzük a + különféle biztonsági eseményeket + leíró vizsgálati rekordok sorozatát. A + nyomok többnyire nagyjából az események + bekövetkezése szerinti idõrendben következnek. + Csak és kizárólag az erre felhatalmazott + programok hozhatnak létre rekordokat a vizsgálati + nyomban. - szûrési feltétel: Szûrési - feltételnek nevezünk egy olyan sztringet, amelyet események - szûrésére használunk, és módosítókat valamint eseményosztályok - neveit tartalmazza. + szûrési feltétel: + Szûrési feltételnek nevezünk egy olyan + sztringet, amelyet események szûrésére + használunk, és módosítókat + valamint eseményosztályok neveit tartalmazza. - elõválogatás: Elõválogatásnak nevezzük - a folyamatot, amelynek során a rendszer beazonosítja azokat az - eseményeket, amelyek a rendszergazda számára fontosak. Ezáltal - elkerülhetjük olyan vizsgálati rekordok generálását, amelyek - számunkra érdektelen eseményekrõl számolnak be. Az elõválogatás - szûrési feltételek sorát használja az adott felhasználókhoz - tartozó adott biztonsági események vizsgálatának beállításához, - akárcsak a hitelesített és a nem hitelesített programokat - értintõ globális beállítások meghatározásához. + elõválogatás: + Elõválogatásnak nevezzük a folyamatot, + amelynek során a rendszer beazonosítja azokat az + eseményeket, amelyek a rendszergazda számára + fontosak. Ezáltal elkerülhetjük olyan + vizsgálati rekordok generálását, amelyek + számunkra érdektelen eseményekrõl + számolnak be. Az elõválogatás + szûrési feltételek sorát használja + az adott felhasználókhoz tartozó adott + biztonsági események vizsgálatának + beállításához, akárcsak a + hitelesített és a nem hitelesített programokat + értintõ globális beállítások + meghatározásához. - leszûkítés: Leszûkítésnek nevezzük a - folyamatot, amelynek során a már meglevõ biztonsági rekordokból - válogatunk le tárolásra, nyomtatásra vagy elemzésre. Hasonlóan - ez a folyamat, ahol a szükségtelen rekordokat eltávolítjuk a - vizsgálatai nyomból. A leszûkítés segítségével a rendszergazdák - a vizsgálati adatok eltárolására alakíthatnak ki házirendet. - Például a részletesebb vizsgálati nyomokat érdemes egy hónapig - megtartani, ennek lejártával viszont már inkább ajánlott - leszûkíteni õket és archiválásra csak a bejelentkezési információkat - megtartani. + leszûkítés: + Leszûkítésnek nevezzük a folyamatot, amelynek + során a már meglevõ biztonsági + rekordokból válogatunk le tárolásra, + nyomtatásra vagy elemzésre. Hasonlóan ez a + folyamat, ahol a szükségtelen rekordokat + eltávolítjuk a vizsgálatai nyomból. A + leszûkítés segítségével a + rendszergazdák a vizsgálati adatok + eltárolására alakíthatnak ki + házirendet. Például a részletesebb + vizsgálati nyomokat érdemes egy hónapig + megtartani, ennek lejártával viszont már + inkább ajánlott leszûkíteni õket + és archiválásra csak a bejelentkezési + információkat megtartani. - A vizsgálat támogatásának telepítése + A vizsgálat támogatásának + telepítése - A eseményvizsgálathoz szükséges felhasználói programok a &os; - 6.2-RELEASE kiadásától kezdõdõen az alap operációs rendszer részét - képezik. Azonban az eseményvizsgálat használatához a rendszermagban is - be kell kapcsolnunk a megfelelõ támogatást, mégpedig a rendszermag - konfigurációs állományában az alábbi sor hozzáadásával: + A eseményvizsgálathoz szükséges + felhasználói programok a &os; 6.2-RELEASE + kiadásától kezdõdõen az alap + operációs rendszer részét képezik. + Azonban az eseményvizsgálat használatához a + rendszermagban is be kell kapcsolnunk a megfelelõ + támogatást, mégpedig a rendszermag + konfigurációs állományában az + alábbi sor hozzáadásával: options AUDIT - Fordítsuk és telepítsük újra a rendszermagot az - ben ismertetett folyamat szerint. + Fordítsuk és telepítsük újra a + rendszermagot az ben ismertetett + folyamat szerint. - Ahogy a rendszermagot sikerült lefordítanunk és telepítenünk, - valamint a rendszerünk is újraindult, indítsuk el a vizsgáló daemont - a következõ sor hozzáadásával a &man.rc.conf.5;-ban: + Ahogy a rendszermagot sikerült lefordítanunk és + telepítenünk, valamint a rendszerünk is + újraindult, indítsuk el a vizsgáló daemont + a következõ sor hozzáadásával a + &man.rc.conf.5;-ban: auditd_enable="YES" - A vizsgálatot innentõl ténylegesen egy ismételt újraindítással vagy - pedig az elõbb említett daemon manuális elindításával - aktiválhatjuk: - + A vizsgálatot innentõl ténylegesen egy + ismételt újraindítással vagy pedig az + elõbb említett daemon manuális + elindításával aktiválhatjuk: + /etc/rc.d/auditd start A vizsgálat beállítása - A vizsgálatok beállításához szükséges összes konfigurációs állomány - a /etc/security könyvtárban - található. A következõ állományok vannak itt a daemon indítása - elõtt: + A vizsgálatok beállításához + szükséges összes konfigurációs + állomány a /etc/security könyvtárban + található. A következõ állományok + vannak itt a daemon indítása elõtt: - audit_class - a vizsgálati osztályok - definícióit tartalmazza. + audit_class - a vizsgálati + osztályok definícióit tartalmazza. - audit_control - a vizsgálati alrendszer - különbözõ területei vezérli, többek közt az alapértelmezett - vizsgálati osztályokat, az vizsgálati adatok tárhelyén meghagyandó - minimális lemezterület, a vizsgálati nyom maximális mérete - stb. + audit_control - a vizsgálati + alrendszer különbözõ területei + vezérli, többek közt az alapértelmezett + vizsgálati osztályokat, az vizsgálati adatok + tárhelyén meghagyandó minimális + lemezterület, a vizsgálati nyom maximális + mérete, stb. - audit_event - a rendszerben jelenlevõ - vizsgálati események szöveges megnevezése és leírása, valamint a - lista, hogy melyikük mely osztályban található. + audit_event - a rendszerben jelenlevõ + vizsgálati események szöveges megnevezése + és leírása, valamint a lista, hogy melyikük + mely osztályban található. - audit_user - felhasználónként változó - vizsgálati elvárások, kombinálva a bejelentkezéskor érvényes - globálisan alapértelmezett beállításokkal. + audit_user - + felhasználónként változó + vizsgálati elvárások, kombinálva a + bejelentkezéskor érvényes globálisan + alapértelmezett beállításokkal. - audit_warn - az - auditd által használt testreszabható - shell szkript, aminek segítségével a szélsõséges helyzetekben - figyelmeztetõ üzeneteket tudunk generálni, mint mondjuk amikor - a rekordok számára fenntartott hely elfogyóban van, vagy amikor a - nyomokat tartalmazó állományt archiváltuk. + audit_warn - az + auditd által használt + testreszabható shell szkript, aminek + segítségével a szélsõséges + helyzetekben figyelmeztetõ üzeneteket tudunk + generálni, mint mondjuk amikor a rekordok + számára fenntartott hely elfogyóban van, vagy + amikor a nyomokat tartalmazó állományt + archiváltuk. - Az eseményvizsgálat konfigurációs állományait alapos körültekintés - mellett szabad szerkeszteni és karbantartani, mivel a bennük keletkezõ - hibák az események helytelen naplózását eredményezhetik. + Az eseményvizsgálat konfigurációs + állományait alapos körültekintés + mellett szabad szerkeszteni és karbantartani, mivel a + bennük keletkezõ hibák az események + helytelen naplózását + eredményezhetik. Eseményszûrési feltételek - Az eseményvizsgálati beállítások során számtalan helyen felbukkanak - a vizsgálni kívánt eseményeket meghatározó szûrési feltételek. Ezen - feltételek eseményosztályok felsorolását tartalmazzák, mindegyiküket - egy módosító vezeti be, ezzel jelezve, hogy az adott eseményosztályba - tartozó rekordokat tartsuk meg vagy vessük el. Esetleg utalhatnak arra - is, hogy vagy csak a sikerességet jelzõ rekordokat, vagy csak a - sikertelenséget jelzõ rekordokat szûrjük ki. A szûrési feltételek - balról jobbra értékelõdnek ki, és két kifejezés összefûzéssel - kombinálható. + Az eseményvizsgálati beállítások + során számtalan helyen felbukkanak a vizsgálni + kívánt eseményeket meghatározó + szûrési feltételek. Ezen feltételek + eseményosztályok felsorolását + tartalmazzák, mindegyiküket egy + módosító vezeti be, ezzel jelezve, hogy az adott + eseményosztályba tartozó rekordokat tartsuk meg + vagy vessük el. Esetleg utalhatnak arra is, hogy vagy csak a + sikerességet jelzõ rekordokat, vagy csak a + sikertelenséget jelzõ rekordokat szûrjük ki. + A szûrési feltételek balról jobbra + értékelõdnek ki, és két + kifejezés összefûzéssel + kombinálható. A most következõ lista tartalmazza a - audit_class állományban található alapértelmezett - eseményvizsgálati osztályokat: + audit_class állományban + található alapértelmezett + eseményvizsgálati osztályokat: - - all - all (mind) - - Minden eseményosztályra vonatkozik. - - - - ad - - administrive (adminisztrációs) - olyan - adminisztrációs tevékenységek, amelyek egyben az egész rendszeren - végrehajtódnak. - - - - ap - - application (alkalmazás) - az alkalmazások - által meghatározott tevékenység. - - - - cl - - file close (állomány lezárása) - a - close rendszerhívás meghívásának - vizsgálata. - - - - ex - - exec (programindítás) - egy program - indításának vizsgálata. A parancssorban átadott paraméterek és - a környezeti változók vizsgálatát a &man.audit.control.5; - vezérli a policy beállításhoz tartozó - argv és envv - paraméterek segítségével. - - - - fa - - file attribute access - (állományjellemzõk hozzáférése) - a rendszerbeli - objektumok jellemzõinek hozzáférésnek vizsgálata, mint pl. a - &man.stat.1;, &man.pathconf.2; és ehhez hasonló események. - + + all - all (mind) - + Minden eseményosztályra vonatkozik. + + + + ad - administrive + (adminisztrációs) - olyan + adminisztrációs tevékenységek, + amelyek egyben az egész rendszeren + végrehajtódnak. + + + + ap - application + (alkalmazás) - az alkalmazások + által meghatározott + tevékenység. + + + + cl - file close + (állomány lezárása) - a + close rendszerhívás + meghívásának vizsgálata. + + + + ex - exec + (programindítás) - egy program + indításának vizsgálata. A + parancssorban átadott paraméterek és + a környezeti változók vizsgálatát + a &man.audit.control.5; vezérli a policy + beállításhoz tartozó + argv és envv + paraméterek segítségével. + + + + fa - file attribute access + (állományjellemzõk + hozzáférése) - a rendszerbeli + objektumok jellemzõinek hozzáférésnek + vizsgálata, mint pl. a &man.stat.1;, &man.pathconf.2; + és ehhez hasonló események. + - - fc - - file create (állomány létrehozása) - - állományt eredményezõ események vizsgálata. - + + fc - file create + (állomány létrehozása) - + állományt eredményezõ események + vizsgálata. + - - fd - - file delete (állomány törlése) - - állományt törlõ események vizsgálata. - - - - fm - - file attribute modify (állományjellemzõk - módosítása) - állományok jellemzõit megváltoztató - események vizsgálata, mint mondjuk a &man.chown.8;, - &man.chflags.1;, &man.flock.2; stb. - - - - fr - - file read (állományolvasás) - - állományok olvasásra történõ megnyitásával, olvasásával - stb. kapcsolatos események vizsgálata. - - - - fw - - file write (állományírás) - - állományok írásra történõ megnyitásával, írásával, - módosításával stb. kapcsolatos események vizsgálata. - - - - io - - ioctl - a &man.ioctl.2; rendszerhívást - használó események vizsgálata. - - - - ip - - ipc - a folyamatok közti kommunikáció - különféle formáinak, beleértve a POSIX csövek és System V - IPC mûveleteinek vizsgálata. - - - - lo - - login_logout (ki- és bejelentkezés) - - a rendszerben megjelenõ &man.login.1; és &man.logout.1; - események vizsgálata. - - - - na - - non attributable (nem jellegzetes) - - a nem jellegzetes események vizsgálata. - - - - no - - invalid class (érvénytelen osztály) - - egyetlen biztonsági eseményt sem tartalmaz. - - - - nt - - network (hálózat) - - a hálózathoz tartozó események vizsgálata, mint pl. a - &man.connect.2; és &man.accept.2;. - - - - ot - - other (egyéb) - - más egyéb események vizsgálata. - - - - pc - - process (folyamat) - a folyamatokkal - kapcsolatos mûveletek, mint például a &man.exec.3; és - &man.exit.3; vizsgálata. - + + fd - file delete + (állomány törlése) - + állományt törlõ események + vizsgálata. + + + + fm - file attribute modify + (állományjellemzõk + módosítása) - + állományok jellemzõit + megváltoztató események vizsgálata, + mint mondjuk a &man.chown.8;, &man.chflags.1;, &man.flock.2;, + stb. + + + + fr - file read + (állományolvasás) - + állományok olvasásra történõ + megnyitásával, olvasásával, + stb. kapcsolatos események vizsgálata. + + + + fw - file write + (állományírás) - + állományok írásra + történõ megnyitásával, + írásával, + módosításával, stb. kapcsolatos + események vizsgálata. + + + + io - ioctl - a + &man.ioctl.2; rendszerhívást használó + események vizsgálata. + + + + ip - ipc - a folyamatok + közti kommunikáció különféle + formáinak, beleértve a POSIX csövek és + System V IPC mûveleteinek + vizsgálata. + + + + lo - login_logout (ki- + és bejelentkezés) - a rendszerben + megjelenõ &man.login.1; és &man.logout.1; + események vizsgálata. + + + + na - non attributable (nem + jellegzetes) - a nem jellegzetes események + vizsgálata. + + + + no - invalid class + (érvénytelen osztály) - + egyetlen biztonsági eseményt sem tartalmaz. + + + + nt - network + (hálózat) - a hálózathoz + tartozó események vizsgálata, mint pl. a + &man.connect.2; és &man.accept.2;. + + + + ot - other + (egyéb) - más egyéb + események vizsgálata. + + + pc - process + (folyamat) - a folyamatokkal kapcsolatos mûveletek, + mint például a &man.exec.3; és &man.exit.3; + vizsgálata. + - - Az imént felsorolt eseményosztályok az - audit_class és audit_event - állományok módosításával igény szerint testreszabhatóak. - - A listában szereplõ minden egyes eseményosztályhoz tartozik - még egy módosító is, amely jelzi, hogy a sikeres vagy a sikertelen - mûveleteket kell-e szûrnünk, valamint hogy a bejegyzés az adott - típust vagy osztályt hozzáadja vagy elveszi az adott - szûrésbõl. + + Az imént felsorolt eseményosztályok az + audit_class és + audit_event állományok + módosításával igény szerint + testreszabhatóak. + + A listában szereplõ minden egyes + eseményosztályhoz tartozik még egy + módosító is, amely jelzi, hogy a sikeres vagy a + sikertelen mûveleteket kell-e szûrnünk, valamint hogy a + bejegyzés az adott típust vagy osztályt + hozzáadja vagy elveszi az adott + szûrésbõl. - - - (üres) az adott típusból mind a sikereseket és mind a - sikerteleneket feljegyzi. - - - - + az eseményosztályba tartozó sikeres - eseményeket vizsgálja csak. - - - - - az eseményosztályba tartozó sikertelen - eseményeket vizsgálja csak. - - - - ^ az eseményosztályból sem a sikereseket, - sem pedig a sikerteleneket nem vizsgálja. - - - - ^+ az eseményosztályból nem vizsgálja a - sikeres eseményeket. - - - - ^- az eseményosztályból nem vizsgálja a - sikertelen eseményeket. - + + (üres) az adott típusból mind a sikereseket + és mind a sikerteleneket feljegyzi. + + + + + az eseményosztályba + tartozó sikeres eseményeket vizsgálja + csak. + + + + - az eseményosztályba + tartozó sikertelen eseményeket vizsgálja + csak. + + + + ^ az eseményosztályból + sem a sikereseket, sem pedig a sikerteleneket nem + vizsgálja. + + + + ^+ az eseményosztályból + nem vizsgálja a sikeres eseményeket. + + + ^- az eseményosztályból + nem vizsgálja a sikertelen eseményeket. + - Az alábbi példa egy olyan szûrési feltételt mutat be, amely - a ki/bejelentkezések közül megadja a sikereset és a sikerteleneket, - viszont a programindítások közül csak a sikereseket: + Az alábbi példa egy olyan szûrési + feltételt mutat be, amely a ki/bejelentkezések + közül megadja a sikereset és a sikerteleneket, + viszont a programindítások közül csak a + sikereseket: lo,+ex - A konfigurációs állományok - A vizsgálati rendszer beállításához az esetek túlnyomó részében - a rendszergazdáknak csupán két állományt kell módosítaniuk: ezek az - audit_control és az - audit_user. Az elõbbi felelõs a rendszerszintû - vizsgálati jellemzõkért és házirendekért, míg az utóbbi az igények - felhasználókénti finomhangolásához használható. + A vizsgálati rendszer + beállításához az esetek + túlnyomó részében a + rendszergazdáknak csupán két + állományt kell módosítaniuk: ezek az + audit_control és az + audit_user. Az elõbbi felelõs a + rendszerszintû vizsgálati jellemzõkért + és házirendekért, míg az utóbbi az + igények felhasználókénti + finomhangolásához használható. - Az <filename>audit_control</filename> állomány - - Az audit_control állomány határozza meg a - vizsgálati alrendszer alapértelmezéseit. Ezt az állományt - megnyitva a következõket láthatjuk: + Az <filename>audit_control</filename> + állomány + + Az audit_control állomány + határozza meg a vizsgálati alrendszer + alapértelmezéseit. Ezt az állományt + megnyitva a következõket láthatjuk: - dir:/var/audit + dir:/var/audit flags:lo minfree:20 naflags:lo policy:cnt filesz:0 - A opciót használjuk a vizsgálati naplók - tárolására szolgáló egy vagy több könyvtár megadására. Ha egynél - több könyvtárra vonatkozó bejegyzés található az állományban, akkor - azok a megadás sorrendjében kerülnek feltöltésre. Nagyon gyakori - az a beállítás, ahol a vizsgálati naplókat egy erre a célra külön - kialakított állományrendszeren tárolják, megelõzve ezzel az - állományrendszer betelésekor keletkezõ problémákat a többi - alrendszerben. - - A mezõ egy rendszerszintû - alapértelmezett elõválogatási maszkot határoz meg a jellegzetes - események számára. A fenti példában a sikeres és sikertelen ki- - és bejelentkezéseket mindegyik felhasználó esetén - vizsgáljuk. - - A opció megszabja a vizsgálati nyom - tárolására szánt állományrendszeren a minimális szabad helyet, - a teljes kapacitás százalékában. Amint ezt a küszöböt túllépjük, - egy figyelmeztetés fog generálódni. A fenti példa a minimálisan - szükséges rendelkezésre álló helyet húsz százalékra - állítja. - - A opció megadja azokat az - eseményosztályokat, amelyeket vizsgálni kell a nem jellegzetes - események, mind mondjuk a bejelentkezési folyamatok vagy - rendszerdaemonok esetén. - - A opció a vizsgálat különbözõ - szempontjait irányító házirendbeli beállítások vesszõvel - elválasztott listáját tartalmazza. Az alapértelmezett - cnt beállítás azt adja meg, hogy a rendszer - a felmerülõ vizsgálati hibák ellenére is folytassa tovább a - mûködését (erõsen javasolt a használata). A másik gyakorta - alkalmazott beállítás az argv, amellyel a - rendszer a parancsvégrehajtás részeként az &man.execve.2; - rendszerhívás parancssori paramétereit is megvizsgálja. - - A opció meghatározza a - vizsgálati nyom automatikus szétvágása és archiválása elõtti - maximális méretét, byte-ban. Az alapértelmezett értéke a 0, - amely kikapcsolja ezt az archiválást. Ha az itt megadott - állományméret nem nulla és a minimálisan elvárt 512 kb alatt - van, akkor a rendszer figyelmen kívül hagyja és errõl egy - figyelmeztetést ad. + A opciót használjuk a + vizsgálati naplók tárolására + szolgáló egy vagy több könyvtár + megadására. Ha egynél több + könyvtárra vonatkozó bejegyzés + található az állományban, akkor azok a + megadás sorrendjében kerülnek + feltöltésre. Nagyon gyakori az a + beállítás, ahol a vizsgálati + naplókat egy erre a célra külön + kialakított állományrendszeren + tárolják, megelõzve ezzel az + állományrendszer betelésekor keletkezõ + problémákat a többi alrendszerben. + + A mezõ egy rendszerszintû + alapértelmezett elõválogatási maszkot + határoz meg a jellegzetes események >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Sep 16 21:57:52 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CD24C16A421; Sun, 16 Sep 2007 21:57:51 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87E8716A418 for ; Sun, 16 Sep 2007 21:57:51 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 802E913C46B for ; Sun, 16 Sep 2007 21:57:51 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8GLvp3R080128 for ; Sun, 16 Sep 2007 21:57:51 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8GLvpx2080125 for perforce@freebsd.org; Sun, 16 Sep 2007 21:57:51 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 16 Sep 2007 21:57:51 GMT Message-Id: <200709162157.l8GLvpx2080125@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126488 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2007 21:57:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=126488 Change 126488 by kmacy@kmacy_home:ethng on 2007/09/16 21:57:27 add a route structure to the inpcb release the reference to the rt_entry if its set when we free the inpcb Affected files ... .. //depot/projects/ethng/src/sys/netinet/in_pcb.c#4 edit .. //depot/projects/ethng/src/sys/netinet/in_pcb.h#3 edit Differences ... ==== //depot/projects/ethng/src/sys/netinet/in_pcb.c#4 (text+ko) ==== @@ -727,6 +727,8 @@ #ifdef MAC mac_destroy_inpcb(inp); #endif + if (inp->inp_route.ro_rt) + RTFREE(inp->inp_route.ro_rt); INP_UNLOCK(inp); uma_zfree(ipi->ipi_zone, inp); } ==== //depot/projects/ethng/src/sys/netinet/in_pcb.h#3 (text+ko) ==== @@ -168,9 +168,9 @@ struct inpcbport *inp_phd; /* head of this list */ #define inp_zero_size offsetof(struct inpcb, inp_gencnt) inp_gen_t inp_gencnt; /* generation count of this instance */ - uint32_t inp_rss_hash; struct mtx inp_mtx; - + uint32_t inp_rss_hash; + struct route inp_route; #define in6p_faddr inp_inc.inc6_faddr #define in6p_laddr inp_inc.inc6_laddr #define in6p_hops inp_depend6.inp6_hops /* default hop limit */ From owner-p4-projects@FreeBSD.ORG Sun Sep 16 22:00:56 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 11C8F16A420; Sun, 16 Sep 2007 22:00:56 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEE0616A417 for ; Sun, 16 Sep 2007 22:00:55 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C747E13C45D for ; Sun, 16 Sep 2007 22:00:55 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8GM0tem080395 for ; Sun, 16 Sep 2007 22:00:55 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8GM0tUv080388 for perforce@freebsd.org; Sun, 16 Sep 2007 22:00:55 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 16 Sep 2007 22:00:55 GMT Message-Id: <200709162200.l8GM0tUv080388@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126489 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2007 22:00:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=126489 Change 126489 by kmacy@kmacy_home:ethng on 2007/09/16 22:00:18 cache the route in the inpcb this is currently half-complete at best as it doesn't yet re-validate the rt_entry against a gen_count as is intended Affected files ... .. //depot/projects/ethng/src/sys/netinet/tcp_output.c#3 edit Differences ... ==== //depot/projects/ethng/src/sys/netinet/tcp_output.c#3 (text+ko) ==== @@ -123,7 +123,8 @@ int tcp_output(struct tcpcb *tp) { - struct socket *so = tp->t_inpcb->inp_socket; + struct inpcb *inp = tp->t_inpcb; + struct socket *so = inp->inp_socket; long len, recwin, sendwin; int off, flags, error; #ifdef TCP_SIGNATURE @@ -1121,9 +1122,23 @@ */ if (path_mtu_discovery) ip->ip_off |= IP_DF; + /* + * XXX need to validate + */ + if (inp->inp_route.ro_rt == NULL) { + struct sockaddr_in *dst = (struct sockaddr_in *)&inp->inp_route.ro_dst; + struct ip *ip = mtod(m, struct ip *); + + bzero(dst, sizeof(*dst)); + dst->sin_family = AF_INET; + dst->sin_len = sizeof(*dst); + dst->sin_addr = ip->ip_dst; + + rtalloc_ign(&inp->inp_route, 0); + } m->m_pkthdr.rss_hash = tp->t_inpcb->inp_rss_hash; - error = ip_output(m, tp->t_inpcb->inp_options, NULL, + error = ip_output(m, tp->t_inpcb->inp_options, &inp->inp_route, ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0, tp->t_inpcb); } From owner-p4-projects@FreeBSD.ORG Sun Sep 16 22:00:56 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6C04216A51F; Sun, 16 Sep 2007 22:00:56 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32C8916A4E9 for ; Sun, 16 Sep 2007 22:00:56 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 27DF413C45E for ; Sun, 16 Sep 2007 22:00:56 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8GM0ukq080404 for ; Sun, 16 Sep 2007 22:00:56 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8GM0tdq080398 for perforce@freebsd.org; Sun, 16 Sep 2007 22:00:55 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 16 Sep 2007 22:00:55 GMT Message-Id: <200709162200.l8GM0tdq080398@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126490 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2007 22:00:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=126490 Change 126490 by kmacy@kmacy_home:ethng on 2007/09/16 22:00:39 cache the route in the inpcb this is currently half-complete at best as it doesn't yet re-validate the rt_entry against a gen_count as is intended Affected files ... .. //depot/projects/ethng/src/sys/netinet/udp_usrreq.c#4 edit Differences ... ==== //depot/projects/ethng/src/sys/netinet/udp_usrreq.c#4 (text+ko) ==== @@ -967,8 +967,23 @@ if (unlock_udbinfo) INP_INFO_WUNLOCK(&udbinfo); + + /* + * XXX need to validate + */ + if (inp->inp_route.ro_rt == NULL) { + struct sockaddr_in *dst = (struct sockaddr_in *)&inp->inp_route.ro_dst; + struct ip *ip = mtod(m, struct ip *); + + bzero(dst, sizeof(*dst)); + dst->sin_family = AF_INET; + dst->sin_len = sizeof(*dst); + dst->sin_addr = ip->ip_dst; + + rtalloc_ign(&inp->inp_route, 0); + } m->m_pkthdr.rss_hash = inp->inp_rss_hash; - error = ip_output(m, inp->inp_options, NULL, ipflags, + error = ip_output(m, inp->inp_options, &inp->inp_route, ipflags, inp->inp_moptions, inp); INP_UNLOCK(inp); return (error); From owner-p4-projects@FreeBSD.ORG Sun Sep 16 22:03:00 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DCF3416A41A; Sun, 16 Sep 2007 22:02:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9612316A419 for ; Sun, 16 Sep 2007 22:02:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8EA7113C458 for ; Sun, 16 Sep 2007 22:02:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8GM2xlS080615 for ; Sun, 16 Sep 2007 22:02:59 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8GM2xKQ080608 for perforce@freebsd.org; Sun, 16 Sep 2007 22:02:59 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 16 Sep 2007 22:02:59 GMT Message-Id: <200709162202.l8GM2xKQ080608@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126491 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2007 22:03:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=126491 Change 126491 by kmacy@kmacy_home:ethng on 2007/09/16 22:02:56 avoid the extra lock acquisitions incurred by rt_check if the interface is up and the gateway is set Affected files ... .. //depot/projects/ethng/src/sys/netinet/if_ether.c#3 edit Differences ... ==== //depot/projects/ethng/src/sys/netinet/if_ether.c#3 (text+ko) ==== @@ -358,7 +358,7 @@ struct llinfo_arp *la = NULL; struct rtentry *rt = NULL; struct sockaddr_dl *sdl; - int error; + int error = 0; if (m->m_flags & M_BCAST) { /* broadcast */ (void)memcpy(desten, ifp->if_broadcastaddr, ifp->if_addrlen); @@ -370,7 +370,11 @@ } if (rt0 != NULL) { - error = rt_check(&rt, &rt0, dst); + if (((rt0->rt_flags && RTF_UP) == 0) || + ((rt0->rt_flags & RTF_GATEWAY) && (rt0->rt_gateway == NULL))) + error = rt_check(&rt, &rt0, dst); + else + rt = rt0; if (error) { m_freem(m); return error; From owner-p4-projects@FreeBSD.ORG Mon Sep 17 02:47:11 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E1DE516A41A; Mon, 17 Sep 2007 02:47:10 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21C0C16A419 for ; Mon, 17 Sep 2007 02:47:10 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1110D13C459 for ; Mon, 17 Sep 2007 02:47:10 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8H2l9Fp010639 for ; Mon, 17 Sep 2007 02:47:09 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8H2l9Ii010634 for perforce@freebsd.org; Mon, 17 Sep 2007 02:47:09 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Sep 2007 02:47:09 GMT Message-Id: <200709170247.l8H2l9Ii010634@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126496 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 02:47:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=126496 Change 126496 by kmacy@kmacy_home:ethng on 2007/09/17 02:46:25 add HWPMC_HOOKS and hwpmc module to default build now that its available in this branch Affected files ... .. //depot/projects/ethng/src/sys/amd64/conf/MULTIQ#2 edit Differences ... ==== //depot/projects/ethng/src/sys/amd64/conf/MULTIQ#2 (text+ko) ==== @@ -23,7 +23,7 @@ # To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. -makeoptions MODULES_OVERRIDE="cxgb em if_vlan linux linprocfs netgraph" +makeoptions MODULES_OVERRIDE="cxgb em if_vlan linux linprocfs netgraph hwpmc" makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols @@ -210,4 +210,7 @@ options IFNET_MULTIQUEUE # add support for using multiple tx queues to ifnet options ALT_BREAK_TO_DEBUGGER +#options LOCK_PROFILING +options HWPMC_HOOKS + #options BIND_ALL From owner-p4-projects@FreeBSD.ORG Mon Sep 17 02:50:14 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8F83F16A41A; Mon, 17 Sep 2007 02:50:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61E0E16A418 for ; Mon, 17 Sep 2007 02:50:14 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5115713C442 for ; Mon, 17 Sep 2007 02:50:14 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8H2oENS010796 for ; Mon, 17 Sep 2007 02:50:14 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8H2oD0o010793 for perforce@freebsd.org; Mon, 17 Sep 2007 02:50:13 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Sep 2007 02:50:13 GMT Message-Id: <200709170250.l8H2oD0o010793@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126497 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 02:50:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=126497 Change 126497 by kmacy@kmacy_home:ethng on 2007/09/17 02:50:04 add MINCLSIZE so that users can reduce the system's propensity to put data into the mbuf as freeing an mbuf that has left the cache is expensive as a result of the following: static void mb_dtor_mbuf(void *mem, int size, void *arg) { struct mbuf *m; m = (struct mbuf *)mem; if ((m->m_flags & M_PKTHDR) != 0) <- have to touch the mbuf m_tag_delete_chain(m, NULL); ... eventually this should be a sysctl Affected files ... .. //depot/projects/ethng/src/sys/conf/options#4 edit Differences ... ==== //depot/projects/ethng/src/sys/conf/options#4 (text+ko) ==== @@ -535,6 +535,7 @@ INVARIANT_SUPPORT opt_global.h INVARIANTS opt_global.h MCLSHIFT opt_global.h +MINCLSIZE opt_global.h MUTEX_DEBUG opt_global.h MUTEX_NOINLINE opt_global.h LOCK_PROFILING opt_global.h From owner-p4-projects@FreeBSD.ORG Mon Sep 17 02:54:21 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 14C0316A41B; Mon, 17 Sep 2007 02:54:21 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C38C816A417 for ; Mon, 17 Sep 2007 02:54:20 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9A8C113C461 for ; Mon, 17 Sep 2007 02:54:20 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8H2sKjg011094 for ; Mon, 17 Sep 2007 02:54:20 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8H2sKUZ011091 for perforce@freebsd.org; Mon, 17 Sep 2007 02:54:20 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Sep 2007 02:54:20 GMT Message-Id: <200709170254.l8H2sKUZ011091@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126498 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 02:54:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=126498 Change 126498 by kmacy@kmacy_home:ethng on 2007/09/17 02:53:52 only use the data area of an mbuf if the payload will fit directly into the tunnel queue Affected files ... .. //depot/projects/ethng/src/sys/amd64/conf/MULTIQ#3 edit Differences ... ==== //depot/projects/ethng/src/sys/amd64/conf/MULTIQ#3 (text+ko) ==== @@ -212,5 +212,5 @@ options ALT_BREAK_TO_DEBUGGER #options LOCK_PROFILING options HWPMC_HOOKS +options MINCLSIZE 48 -#options BIND_ALL From owner-p4-projects@FreeBSD.ORG Mon Sep 17 03:33:12 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EFEF416A41B; Mon, 17 Sep 2007 03:33:11 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A337216A418 for ; Mon, 17 Sep 2007 03:33:11 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9032413C442 for ; Mon, 17 Sep 2007 03:33:11 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8H3XBvb015012 for ; Mon, 17 Sep 2007 03:33:11 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8H3XBkn015006 for perforce@freebsd.org; Mon, 17 Sep 2007 03:33:11 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Sep 2007 03:33:11 GMT Message-Id: <200709170333.l8H3XBkn015006@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126499 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 03:33:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=126499 Change 126499 by kmacy@kmacy_home:ethng on 2007/09/17 03:32:38 add refill_fl_lt to refill if the free list has gone below a certain count convert p -> pi for port_info pointers Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#21 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#21 (text+ko) ==== @@ -135,6 +135,7 @@ struct tx_sw_desc { /* SW state per Tx descriptor */ struct mbuf *m[TX_WR_COUNT_MAX]; + int count; bus_dmamap_t map; int flags; @@ -640,11 +641,17 @@ refill_fl(adap, fl, min(16U, fl->size - fl->credits)); } +static __inline void +__refill_fl_lt(adapter_t *adap, struct sge_fl *fl, int max) +{ + if ((fl->size - fl->credits) < max) + refill_fl(adap, fl, min(max, fl->size - fl->credits)); +} + void refill_fl_service(adapter_t *adap, struct sge_fl *fl) { - return; /* XXX no-op for now */ - __refill_fl(adap, fl); + __refill_fl_lt(adap, fl, 512); } #ifndef DISABLE_MBUF_IOVEC @@ -778,7 +785,7 @@ { adapter_t *sc = arg; #ifndef IFNET_MULTIQUEUE - struct port_info *p; + struct port_info *pi; struct sge_qset *qs; struct sge_txq *txq; int i, j; @@ -794,7 +801,7 @@ (qs->fl[1].credits < qs->fl[1].size)); if (reclaim_eth || reclaim_ofl || refill_rx) { p = &sc->port[i]; - taskqueue_enqueue(p->tq, &p->timer_reclaim_task); + taskqueue_enqueue(pi->tq, &pi->timer_reclaim_task); break; } } @@ -829,9 +836,9 @@ } int -t3_sge_init_port(struct port_info *p) +t3_sge_init_port(struct port_info *pi) { - TASK_INIT(&p->timer_reclaim_task, 0, sge_timer_reclaim, p); + TASK_INIT(&pi->timer_reclaim_task, 0, sge_timer_reclaim, pi); return (0); } @@ -871,9 +878,9 @@ { int reclaimable, i, n; struct mbuf *m_vec[TX_CLEAN_MAX_DESC]; - struct port_info *p; + struct port_info *pi; - p = txq->port; + pi = txq->port; reclaim_more: n = 0; reclaimable = desc_reclaimable(txq); @@ -887,11 +894,11 @@ for (i = 0; i < n; i++) { m_freem_vec(m_vec[i]); } - if (p && p->ifp->if_drv_flags & IFF_DRV_OACTIVE && + if (pi && pi->ifp->if_drv_flags & IFF_DRV_OACTIVE && txq->size - txq->in_use >= TX_START_MAX_DESC) { txq_fills++; - p->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - taskqueue_enqueue(p->tq, &p->start_task); + pi->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + taskqueue_enqueue(pi->tq, &pi->start_task); } if (n) @@ -909,9 +916,9 @@ static void sge_timer_reclaim(void *arg, int ncount) { - struct port_info *p = arg; - int i, nqsets = p->nqsets; - adapter_t *sc = p->adapter; + struct port_info *pi = arg; + int i, nqsets = pi->nqsets; + adapter_t *sc = pi->adapter; struct sge_qset *qs; struct sge_txq *txq; struct mtx *lock; @@ -1250,7 +1257,6 @@ #define GET_VTAG(cntrl, m) #endif - int t3_encap(struct sge_qset *qs, struct mbuf **m, int count, int *free) { @@ -1258,7 +1264,7 @@ struct mbuf *m0; struct sge_txq *txq; struct txq_state txqs; - struct port_info *p; + struct port_info *pi; unsigned int ndesc, flits, cntrl, mlen; int err, nsegs, tso_info = 0; @@ -1276,19 +1282,19 @@ #endif DPRINTF("t3_encap cpu=%d ", curcpu); - p = qs->port; - sc = p->adapter; + pi = qs->port; + sc = pi->adapter; txq = &qs->txq[TXQ_ETH]; txsd = &txq->sdesc[txq->pidx]; txd = &txq->desc[txq->pidx]; - DPRINTF("t3_encap port_id=%d qsidx=%d ", p->port_id, p->first_qset); - DPRINTF("mlen=%d txpkt_intf=%d tx_chan=%d\n", m[0]->m_pkthdr.len, p->txpkt_intf, p->tx_chan); + DPRINTF("t3_encap port_id=%d qsidx=%d ", pi->port_id, pi->first_qset); + DPRINTF("mlen=%d txpkt_intf=%d tx_chan=%d\n", m[0]->m_pkthdr.len, pi->txpkt_intf, pi->tx_chan); /* * XXX handle checksum, TSO, and VLAN here * */ - cntrl = V_TXPKT_INTF(p->txpkt_intf); + cntrl = V_TXPKT_INTF(pi->txpkt_intf); /* * XXX need to add VLAN support for 6.x @@ -1311,7 +1317,7 @@ for (i = 0; i < count; i++) { struct cpl_tx_pkt_batch_entry *cbe = &cpl_batch->pkt_entry[i]; - cntrl = V_TXPKT_INTF(p->port_id); + cntrl = V_TXPKT_INTF(pi->port_id); GET_VTAG(cntrl, m[i]); cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT) | (1 << 24); cbe->cntrl = htonl(cntrl); @@ -1390,7 +1396,6 @@ memcpy(&txd->flit[2], mtod(m0, uint8_t *), mlen); else m_copydata(m0, 0, mlen, (caddr_t)&txd->flit[2]); - *free = 1; flits = (mlen + 7) / 8 + 2; cpl->wr.wr_hi = htonl(V_WR_BCNTLFLT(mlen & 7) | @@ -1429,7 +1434,7 @@ m_set_priority(m0, txqs.pidx); write_wr_hdr_sgl(ndesc, txd, &txqs, txq, sgl, flits, sgl_flits, wr_hi, wr_lo); - check_ring_tx_db(p->adapter, txq); + check_ring_tx_db(pi->adapter, txq); return (0); } @@ -2778,10 +2783,10 @@ ngathered = rx_offload(&adap->tdev, rspq, rspq->rspq_mh.mh_head, offload_mbufs, ngathered); } - __refill_fl(adap, &qs->fl[0]); - __refill_fl(adap, &qs->fl[1]); } + __refill_fl_lt(adap, &qs->fl[0], 32); + __refill_fl_lt(adap, &qs->fl[1], 32); --budget_left; } @@ -2795,6 +2800,8 @@ if (__predict_false(qs->txq_stopped != 0)) restart_tx(qs); + __refill_fl_lt(adap, &qs->fl[0], 512); + __refill_fl_lt(adap, &qs->fl[1], 512); budget -= budget_left; return (budget); } From owner-p4-projects@FreeBSD.ORG Mon Sep 17 03:37:17 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 65B1E16A468; Mon, 17 Sep 2007 03:37:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B35E16A420 for ; Mon, 17 Sep 2007 03:37:17 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 28F3313C459 for ; Mon, 17 Sep 2007 03:37:17 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8H3bGVW015198 for ; Mon, 17 Sep 2007 03:37:16 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8H3bGgY015195 for perforce@freebsd.org; Mon, 17 Sep 2007 03:37:16 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Sep 2007 03:37:16 GMT Message-Id: <200709170337.l8H3bGgY015195@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126500 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 03:37:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=126500 Change 126500 by kmacy@kmacy_home:ethng on 2007/09/17 03:36:17 check if MINCLSIZE is already defined Affected files ... .. //depot/projects/ethng/src/sys/sys/mbuf.h#5 edit Differences ... ==== //depot/projects/ethng/src/sys/sys/mbuf.h#5 (text+ko) ==== @@ -55,8 +55,10 @@ */ #define MLEN (MSIZE - sizeof(struct m_hdr)) /* normal data len */ #define MHLEN (MLEN - sizeof(struct pkthdr)) /* data len w/pkthdr */ +#define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */ +#ifndef MINCLSIZE #define MINCLSIZE (MHLEN + 1) /* smallest amount to put in cluster */ -#define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */ +#endif #ifdef _KERNEL /*- From owner-p4-projects@FreeBSD.ORG Mon Sep 17 08:12:14 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D7E9116A41A; Mon, 17 Sep 2007 08:12:13 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A25EC16A418 for ; Mon, 17 Sep 2007 08:12:13 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3ACB513C48A for ; Mon, 17 Sep 2007 08:12:13 +0000 (UTC) (envelope-from andre@freebsd.org) Received: (qmail 19532 invoked from network); 17 Sep 2007 07:30:53 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 17 Sep 2007 07:30:53 -0000 Message-ID: <46EE30A8.7020809@freebsd.org> Date: Mon, 17 Sep 2007 09:45:44 +0200 From: Andre Oppermann User-Agent: Thunderbird 1.5.0.13 (Windows/20070809) MIME-Version: 1.0 To: Kip Macy References: <200709162157.l8GLvpx2080125@repoman.freebsd.org> In-Reply-To: <200709162157.l8GLvpx2080125@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Perforce Change Reviews Subject: Re: PERFORCE change 126488 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 08:12:14 -0000 Kip Macy wrote: > http://perforce.freebsd.org/chv.cgi?CH=126488 > > Change 126488 by kmacy@kmacy_home:ethng on 2007/09/16 21:57:27 > > add a route structure to the inpcb > release the reference to the rt_entry if its set when we free the inpcb We already had this once before and it was nasty as you had to do a full inpcb walk to nuke any references if a route changed. -- Andre From owner-p4-projects@FreeBSD.ORG Mon Sep 17 08:50:19 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3308D16A468; Mon, 17 Sep 2007 08:50:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFC6F16A418 for ; Mon, 17 Sep 2007 08:50:18 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.freebsd.org (Postfix) with ESMTP id 77A2313C46B for ; Mon, 17 Sep 2007 08:50:18 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so1072185nfb for ; Mon, 17 Sep 2007 01:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=tCMu08DIMZpJugExdn4TYC2Fhu2dcZpQR+YkXpf1W6c=; b=TQ3Tel343tZUgmiR8twYoXQNJBY0dXp1zMT3OPOXCCqQZAkGTCts4prpcteqDjDhIrGO61nXpozxoKHrOwjOxicmNqX56Y0W08E+M7sXsujGyk6u4NmxMRIVctLnyjHq4OWmvZgKjQtuQLSxDk58RTTYhlP2ShixJDITgejR4Iw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oIkJgC4CxWeLOAOaMRO48RzexVHTEmIXBCDvSP2q/k6X8cqNI0zqy1jGh0LfvY3LuZLrmBbXypmtR+xXoxngzZW63arcGEmV33F7u57OTwpHhAeyl0GP+K6jUmz3297Al938Yqq+eiy9/j7TVW6T461+e32HAj38TaWjKd7j/iw= Received: by 10.78.159.7 with SMTP id h7mr2444933hue.1190019016937; Mon, 17 Sep 2007 01:50:16 -0700 (PDT) Received: by 10.78.162.18 with HTTP; Mon, 17 Sep 2007 01:50:16 -0700 (PDT) Message-ID: Date: Mon, 17 Sep 2007 01:50:16 -0700 From: "Kip Macy" To: "Andre Oppermann" In-Reply-To: <46EE30A8.7020809@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200709162157.l8GLvpx2080125@repoman.freebsd.org> <46EE30A8.7020809@freebsd.org> Cc: Perforce Change Reviews , Kip Macy Subject: Re: PERFORCE change 126488 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 08:50:19 -0000 On 9/17/07, Andre Oppermann wrote: > Kip Macy wrote: > > http://perforce.freebsd.org/chv.cgi?CH=126488 > > > > Change 126488 by kmacy@kmacy_home:ethng on 2007/09/16 21:57:27 > > > > add a route structure to the inpcb > > release the reference to the rt_entry if its set when we free the inpcb > > We already had this once before and it was nasty as you had to > do a full inpcb walk to nuke any references if a route changed. Nope. If you keep a generation counter for the route in the inpcb and check it each time in udp_output against the rtentry / route table you'll know that your cached route is no longer valid. I'm not currently doing that, but it won't be hard to add. In any event, incurring a 20% slowdown (in the uncontended case, its basically crippling in the contended case i.e. 1 flow on the same route) for an event that occurs < .01% of the time on most networks seems questionable. -Kip From owner-p4-projects@FreeBSD.ORG Mon Sep 17 16:43:52 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 29CFD16A469; Mon, 17 Sep 2007 16:43:52 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5F1E16A420 for ; Mon, 17 Sep 2007 16:43:51 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E06FE13C459 for ; Mon, 17 Sep 2007 16:43:51 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8HGhp8b029899 for ; Mon, 17 Sep 2007 16:43:51 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8HGhptr029896 for perforce@freebsd.org; Mon, 17 Sep 2007 16:43:51 GMT (envelope-from zec@FreeBSD.org) Date: Mon, 17 Sep 2007 16:43:51 GMT Message-Id: <200709171643.l8HGhptr029896@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@FreeBSD.org using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 126517 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 16:43:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=126517 Change 126517 by zec@zec_tpx32 on 2007/09/17 16:43:24 As an experiment, maintain load average accounting on per-vprocg basis, where a vprocg can be thought of as something like a jail-style process group in the current vimage incarnation. Seems to work OK on both VIMAGE and nooptions VIMAGE kernel configs with SCHED_4BSD. Perhaps this could be made to work with ULE as well... Affected files ... .. //depot/projects/vimage/src/sys/compat/linprocfs/linprocfs.c#11 edit .. //depot/projects/vimage/src/sys/compat/linux/linux_misc.c#10 edit .. //depot/projects/vimage/src/sys/kern/kern_synch.c#11 edit .. //depot/projects/vimage/src/sys/kern/kern_vimage.c#38 edit .. //depot/projects/vimage/src/sys/kern/sched_4bsd.c#8 edit .. //depot/projects/vimage/src/sys/kern/tty.c#10 edit .. //depot/projects/vimage/src/sys/sys/resource.h#4 edit .. //depot/projects/vimage/src/sys/sys/sched.h#5 edit .. //depot/projects/vimage/src/sys/sys/vimage.h#38 edit .. //depot/projects/vimage/src/sys/vm/vm_meter.c#6 edit .. //depot/projects/vimage/src/usr.sbin/vimage/vimage.c#4 edit Differences ... ==== //depot/projects/vimage/src/sys/compat/linprocfs/linprocfs.c#11 (text+ko) ==== @@ -502,15 +502,16 @@ static int linprocfs_doloadavg(PFS_FILL_ARGS) { + INIT_VPROCG(curthread->td_ucred->cr_vimage->v_procg); sbuf_printf(sb, "%d.%02d %d.%02d %d.%02d %d/%d %d\n", - (int)(averunnable.ldavg[0] / averunnable.fscale), - (int)(averunnable.ldavg[0] * 100 / averunnable.fscale % 100), - (int)(averunnable.ldavg[1] / averunnable.fscale), - (int)(averunnable.ldavg[1] * 100 / averunnable.fscale % 100), - (int)(averunnable.ldavg[2] / averunnable.fscale), - (int)(averunnable.ldavg[2] * 100 / averunnable.fscale % 100), + (int)(V_averunnable.ldavg[0] / V_averunnable.fscale), + (int)(V_averunnable.ldavg[0] * 100 / V_averunnable.fscale % 100), + (int)(V_averunnable.ldavg[1] / V_averunnable.fscale), + (int)(V_averunnable.ldavg[1] * 100 / V_averunnable.fscale % 100), + (int)(V_averunnable.ldavg[2] / V_averunnable.fscale), + (int)(V_averunnable.ldavg[2] * 100 / V_averunnable.fscale % 100), 1, /* number of running tasks */ nprocs, /* number of tasks */ lastpid /* the last pid */ ==== //depot/projects/vimage/src/sys/compat/linux/linux_misc.c#10 (text+ko) ==== @@ -125,6 +125,7 @@ int linux_sysinfo(struct thread *td, struct linux_sysinfo_args *args) { + INIT_VPROCG(td->td_ucred->cr_vimage->v_procg); struct l_sysinfo sysinfo; vm_object_t object; int i, j; @@ -137,8 +138,8 @@ /* Use the information from the mib to get our load averages */ for (i = 0; i < 3; i++) - sysinfo.loads[i] = averunnable.ldavg[i] * - LINUX_SYSINFO_LOADS_SCALE / averunnable.fscale; + sysinfo.loads[i] = V_averunnable.ldavg[i] * + LINUX_SYSINFO_LOADS_SCALE / V_averunnable.fscale; sysinfo.totalram = physmem * PAGE_SIZE; sysinfo.freeram = sysinfo.totalram - cnt.v_wire_count * PAGE_SIZE; ==== //depot/projects/vimage/src/sys/kern/kern_synch.c#11 (text+ko) ==== @@ -78,8 +78,11 @@ static struct callout loadav_callout; static struct callout lbolt_callout; +#ifndef VIMAGE struct loadavg averunnable = { {0, 0, 0}, FSCALE }; /* load average, of runnable procs */ +#endif + /* * Constants for averages over 1, 5, and 15 minutes * when sampling at 5 second intervals. @@ -521,12 +524,19 @@ int i, nrun; struct loadavg *avg; + VPROCG_ITERLOOP_BEGIN(); + INIT_VPROCG(vprocg_iter); +#ifdef VIMAGE + nrun = sched_load(vprocg_iter); +#else nrun = sched_load(); - avg = &averunnable; +#endif + avg = &V_averunnable; for (i = 0; i < 3; i++) avg->ldavg[i] = (cexp[i] * avg->ldavg[i] + nrun * FSCALE * (FSCALE - cexp[i])) >> FSHIFT; + VPROCG_ITERLOOP_END(); /* * Schedule the next update to occur after 5 seconds, but add a ==== //depot/projects/vimage/src/sys/kern/kern_vimage.c#38 (text+ko) ==== @@ -39,6 +39,8 @@ #include #include #include +#include +#include #include #include #include @@ -123,10 +125,8 @@ static u_int last_vi_id = 0; static u_int last_vnet_id = 0; -#if 0 static u_int last_vprocg_id = 0; static u_int last_vcpu_id = 0; -#endif static TAILQ_HEAD(vnet_modlink_head, vnet_modlink) vnet_modlink_head; static TAILQ_HEAD(vnet_modpending_head, vnet_modlink) vnet_modpending_head; @@ -488,6 +488,8 @@ vi_req->vi_id = vip_r->vi_id; bcopy(&vip_r->vi_name, &vi_req->vi_name, sizeof (vi_req->vi_name)); + bcopy(&vip_r->v_procg->_averunnable, &vi_req->averunnable, + sizeof (vi_req->averunnable)); vi_req->vi_proc_count = vip_r->v_procg->nprocs; vi_req->vi_if_count = vip_r->v_vnet->ifccnt; vi_req->vi_sock_count = vip_r->v_vnet->sockcnt; @@ -520,6 +522,8 @@ sx_xlock(&allproc_lock); oldcred->cr_vimage->v_procg->nprocs--; p->p_ucred->cr_vimage->v_procg->nprocs++; + sched_load_reassign(oldcred->cr_vimage->v_procg, + newcred->cr_vimage->v_procg); sx_xunlock(&allproc_lock); crfree(oldcred); break; @@ -606,21 +610,24 @@ if (vprocg == NULL) panic("vi_alloc: malloc failed for vprocg \"%s\"\n", name); vip->v_procg = vprocg; + vprocg->vprocg_id = last_vprocg_id++; vcpu = vi_malloc(sizeof(struct vcpu), M_VCPU, M_NOWAIT | M_ZERO); if (vcpu == NULL) panic ("vi_alloc: malloc failed for vcpu \"%s\"\n", name); vip->v_cpu = vcpu; + vcpu->vcpu_id = last_vcpu_id++; - /* Some initialization stuff... */ + /* Struct vimage initialization */ sprintf(vip->vi_name, "%s", name); + /* Struct vprocg initialization - perhaps move to anther place? */ + V_averunnable.fscale = FSCALE; + + /* Initialize / attach vnet module instances. */ CURVNET_SET_QUIET(vnet); - - /* Initialize / attach module instances. */ TAILQ_FOREACH(vml, &vnet_modlink_head, vml_mod_le) vnet_mod_constructor(vml); - CURVNET_RESTORE(); VNET_LIST_LOCK(); /* XXX should lock other lists separately */ ==== //depot/projects/vimage/src/sys/kern/sched_4bsd.c#8 (text+ko) ==== @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.103 2007/07/18 20:46:05 jeff Exp $"); #include "opt_hwpmc_hooks.h" +#include "opt_vimage.h" #include #include @@ -52,6 +53,7 @@ #include #include #include +#include #include #include @@ -103,7 +105,9 @@ static struct td_sched td_sched0; struct mtx sched_lock; +#ifndef VIMAGE static int sched_tdcnt; /* Total runnable threads in the system. */ +#endif static int sched_quantum; /* Roundrobin scheduling quantum in ticks. */ #define SCHED_QUANTUM (hz / 10) /* Default sched quantum */ @@ -229,18 +233,33 @@ #endif static __inline void -sched_load_add(void) +sched_load_add(struct thread *td) { - sched_tdcnt++; + INIT_VPROCG(td->td_ucred->cr_vimage->v_procg); + + V_sched_tdcnt++; CTR1(KTR_SCHED, "global load: %d", sched_tdcnt); } static __inline void -sched_load_rem(void) +sched_load_rem(struct thread *td) { - sched_tdcnt--; + INIT_VPROCG(td->td_ucred->cr_vimage->v_procg); + + V_sched_tdcnt--; CTR1(KTR_SCHED, "global load: %d", sched_tdcnt); } + +#ifdef VIMAGE +void +sched_load_reassign(struct vprocg *old, struct vprocg *new) +{ + /* XXX locking? */ + old->_sched_tdcnt--; + new->_sched_tdcnt++; +} +#endif + /* * Arrange to reschedule if necessary, taking the priorities and * schedulers into account. @@ -369,7 +388,11 @@ static void schedcpu(void) { +#ifndef VIMAGE register fixpt_t loadfac = loadfactor(averunnable.ldavg[0]); +#else + #define loadfac loadfactor(p->p_ucred->cr_vimage->v_procg->_averunnable.ldavg[0]) +#endif struct thread *td; struct proc *p; struct td_sched *ts; @@ -467,6 +490,9 @@ PROC_SUNLOCK(p); } /* end of process loop */ sx_sunlock(&allproc_lock); +#ifdef VIMAGE +#undef loadfac +#endif } /* @@ -490,10 +516,11 @@ static void updatepri(struct thread *td) { + INIT_VPROCG(td->td_ucred->cr_vimage->v_procg); register fixpt_t loadfac; register unsigned int newcpu; - loadfac = loadfactor(averunnable.ldavg[0]); + loadfac = loadfactor(V_averunnable.ldavg[0]); if (td->td_slptime > 5 * loadfac) td->td_estcpu = 0; else { @@ -559,7 +586,7 @@ roundrobin(NULL); /* Account for thread0. */ - sched_load_add(); + sched_load_add(&thread0); } /* External interfaces start here */ @@ -654,7 +681,7 @@ thread_unlock(td); mtx_lock_spin(&sched_lock); if ((child->td_proc->p_flag & P_NOLOAD) == 0) - sched_load_rem(); + sched_load_rem(td); mtx_unlock_spin(&sched_lock); } @@ -850,7 +877,7 @@ } if ((p->p_flag & P_NOLOAD) == 0) - sched_load_rem(); + sched_load_rem(td); if (newtd) newtd->td_flags |= (td->td_flags & TDF_NEEDRESCHED); @@ -892,7 +919,7 @@ newtd->td_sched->ts_flags |= TSF_DIDRUN; TD_SET_RUNNING(newtd); if ((newtd->td_proc->p_flag & P_NOLOAD) == 0) - sched_load_add(); + sched_load_add(newtd); } else { newtd = choosethread(); } @@ -1143,7 +1170,7 @@ } if ((td->td_proc->p_flag & P_NOLOAD) == 0) - sched_load_add(); + sched_load_add(td); runq_add(ts->ts_runq, ts, flags); } #else /* SMP */ @@ -1188,7 +1215,7 @@ return; } if ((td->td_proc->p_flag & P_NOLOAD) == 0) - sched_load_add(); + sched_load_add(td); runq_add(ts->ts_runq, ts, flags); maybe_resched(td); } @@ -1210,7 +1237,7 @@ curthread->td_proc->p_comm); if ((td->td_proc->p_flag & P_NOLOAD) == 0) - sched_load_rem(); + sched_load_rem(td); runq_remove(ts->ts_runq, ts); TD_SET_CAN_RUN(td); } @@ -1328,11 +1355,19 @@ thread_unlock(td); } +#ifdef VIMAGE int +sched_load(struct vprocg *vprocg) +{ + return (V_sched_tdcnt); +} +#else +int sched_load(void) { return (sched_tdcnt); } +#endif int sched_sizeof_proc(void) ==== //depot/projects/vimage/src/sys/kern/tty.c#10 (text+ko) ==== @@ -2534,6 +2534,7 @@ void ttyinfo(struct tty *tp) { + INIT_VPROCG(curthread->td_ucred->cr_vimage->v_procg); struct timeval utime, stime; struct proc *p, *pick; struct thread *td, *picktd; @@ -2548,7 +2549,7 @@ return; /* Print load average. */ - load = (averunnable.ldavg[0] * 100 + FSCALE / 2) >> FSHIFT; + load = (V_averunnable.ldavg[0] * 100 + FSCALE / 2) >> FSHIFT; ttyprintf(tp, "load: %d.%02d ", load / 100, load % 100); /* ==== //depot/projects/vimage/src/sys/sys/resource.h#4 (text+ko) ==== @@ -153,8 +153,8 @@ #ifdef _KERNEL +#ifndef VIMAGE extern struct loadavg averunnable; -#ifndef VIMAGE extern long cp_time[CPUSTATES]; #endif ==== //depot/projects/vimage/src/sys/sys/sched.h#5 (text+ko) ==== @@ -63,6 +63,9 @@ #define _SCHED_H_ #ifdef _KERNEL + +struct vprocg; + /* * General scheduling info. * @@ -72,7 +75,12 @@ * sched_runnable: * Runnable threads for this processor. */ +#ifdef VIMAGE +int sched_load(struct vprocg *); +void sched_load_reassign(struct vprocg *, struct vprocg *); +#else int sched_load(void); +#endif int sched_rr_interval(void); int sched_runnable(void); ==== //depot/projects/vimage/src/sys/sys/vimage.h#38 (text+ko) ==== @@ -231,6 +231,13 @@ } \ VNET_LIST_UNREF(); +#define VPROCG_ITERLOOP_BEGIN() \ + struct vprocg *vprocg_iter; \ + LIST_FOREACH(vprocg_iter, &vprocg_head, vprocg_le) { \ + +#define VPROCG_ITERLOOP_END() \ + } \ + #else /* !VNET_DEBUG */ #define VNET_ASSERT(condition) @@ -281,6 +288,8 @@ #define VNET_ITERLOOP_BEGIN() #define VNET_ITERLOOP_END() #define INIT_VPROCG(arg) +#define VPROCG_ITERLOOP_BEGIN() +#define VPROCG_ITERLOOP_END() #endif /* !VIMAGE */ @@ -290,6 +299,8 @@ #define V_hostname VPROCG(hostname) #define V_domainname VPROCG(domainname) #define V_morphing_symlinks VPROCG(morphing_symlinks) +#define V_averunnable VPROCG(averunnable) +#define V_sched_tdcnt VPROCG(sched_tdcnt) #ifdef VIMAGE void vnet_mod_register(const struct vnet_modinfo *); @@ -364,10 +375,10 @@ int _morphing_symlinks; + struct loadavg _averunnable; /* from kern/kern_synch.c */ + int _sched_tdcnt; /* from kern/sched_4bsd.c */ + #if 0 - struct loadavg averunnable; /* from kern/kern_synch.c */ - int nrun; - u_int proc_limit; /* max. number of processes */ struct msgbuf *msgbufp; ==== //depot/projects/vimage/src/sys/vm/vm_meter.c#6 (text+ko) ==== @@ -32,6 +32,8 @@ #include __FBSDID("$FreeBSD: src/sys/vm/vm_meter.c,v 1.96 2007/07/27 20:01:21 alc Exp $"); +#include "opt_vimage.h" + #include #include #include @@ -51,6 +53,7 @@ #include #include #include +#include struct vmmeter cnt; @@ -76,18 +79,20 @@ static int sysctl_vm_loadavg(SYSCTL_HANDLER_ARGS) { + INIT_VPROCG(curthread->td_ucred->cr_vimage->v_procg); + #ifdef SCTL_MASK32 u_int32_t la[4]; if (req->flags & SCTL_MASK32) { - la[0] = averunnable.ldavg[0]; - la[1] = averunnable.ldavg[1]; - la[2] = averunnable.ldavg[2]; - la[3] = averunnable.fscale; + la[0] = V_averunnable.ldavg[0]; + la[1] = V_averunnable.ldavg[1]; + la[2] = V_averunnable.ldavg[2]; + la[3] = V_averunnable.fscale; return SYSCTL_OUT(req, la, sizeof(la)); } else #endif - return SYSCTL_OUT(req, &averunnable, sizeof(averunnable)); + return SYSCTL_OUT(req, &V_averunnable, sizeof(V_averunnable)); } SYSCTL_PROC(_vm, VM_LOADAVG, loadavg, CTLTYPE_STRUCT|CTLFLAG_RD, NULL, 0, sysctl_vm_loadavg, "S,loadavg", "Machine loadaverage history"); ==== //depot/projects/vimage/src/usr.sbin/vimage/vimage.c#4 (text+ko) ==== @@ -62,19 +62,17 @@ void vi_print(struct vi_req *vi_req) { -#if 0 double lf = 1.0/vi_req->averunnable.fscale; -#endif printf ("\"%s\":\n", vi_req->vi_name); printf (" Processes (current/max): %d/%d\n", vi_req->vi_proc_count, vi_req->vi_proc_limit); -#if 0 printf (" load averages: %3.2f, %3.2f, %3.2f\n", lf * vi_req->averunnable.ldavg[0], lf * vi_req->averunnable.ldavg[1], lf * vi_req->averunnable.ldavg[2]); +#if 0 printf (" CPU usage: %3.2f%% (", 0.0001 * vi_req->cp_time_avg[CP_ALL]); printf ("%3.2f%% user, ", 0.0001 * vi_req->cp_time_avg[CP_USER]); From owner-p4-projects@FreeBSD.ORG Mon Sep 17 16:45:56 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AC9BE16A41A; Mon, 17 Sep 2007 16:45:56 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 698CA16A418 for ; Mon, 17 Sep 2007 16:45:56 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4C66E13C45A for ; Mon, 17 Sep 2007 16:45:56 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8HGjumh031177 for ; Mon, 17 Sep 2007 16:45:56 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8HGjuiJ031162 for perforce@freebsd.org; Mon, 17 Sep 2007 16:45:56 GMT (envelope-from zec@FreeBSD.org) Date: Mon, 17 Sep 2007 16:45:56 GMT Message-Id: <200709171645.l8HGjuiJ031162@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@FreeBSD.org using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 126518 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 16:45:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=126518 Change 126518 by zec@zec_tpx32 on 2007/09/17 16:45:08 Unbreak VIMAGE + MAC builds. Affected files ... .. //depot/projects/vimage/src/sys/netinet/tcp_syncache.c#19 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet/tcp_syncache.c#19 (text+ko) ==== @@ -970,7 +970,7 @@ #ifdef MAC if (mac_init_syncache(&maclabel) != 0) { INP_UNLOCK(inp); - INP_INFO_WUNLOCK(&tcbinfo); + INP_INFO_WUNLOCK(&V_tcbinfo); goto done; } else mac_init_syncache_from_inpcb(maclabel, inp); From owner-p4-projects@FreeBSD.ORG Mon Sep 17 16:48:21 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 115AB16A469; Mon, 17 Sep 2007 16:48:21 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6C7E16A41A; Mon, 17 Sep 2007 16:48:20 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 554D913C491; Mon, 17 Sep 2007 16:48:19 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [194.248.135.20] (account mc467741@c2i.net HELO [192.168.2.105]) by mailfe05.swip.net (CommuniGate Pro SMTP 5.1.10) with ESMTPA id 515923220; Mon, 17 Sep 2007 17:48:17 +0200 From: Hans Petter Selasky To: Kip Macy Date: Mon, 17 Sep 2007 17:48:36 +0200 User-Agent: KMail/1.9.7 References: <200709152326.l8FNQwPq024216@repoman.freebsd.org> In-Reply-To: <200709152326.l8FNQwPq024216@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200709171748.36573.hselasky@c2i.net> Cc: Perforce Change Reviews Subject: Re: PERFORCE change 126455 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 16:48:21 -0000 On Sunday 16 September 2007, Kip Macy wrote: > http://perforce.freebsd.org/chv.cgi?CH=126455 > > Change 126455 by kmacy@kmacy_home:ethng on 2007/09/15 23:26:15 > > skip busdma rx setup on x86 > increases rx throughput by about 15% on udp netperf recv Really this should be done for all platforms. The mbuf m_data field should have a companion pointer for example m_databuffer of type "struct usbd_page_chache *" : struct usbd_page_cache { struct usbd_page *page_start; struct usbd_page *page_end; struct usbd_page *page_cur; uint32_t page_offset_buf; uint32_t page_offset_cur; }; struct usbd_page { void *buffer; bus_size_t physaddr; #ifdef __FreeBSD__ bus_dma_tag_t tag; bus_dmamap_t map; register_t intr_temp; #endif #ifdef __NetBSD__ bus_dma_tag_t tag; bus_dmamap_t map; bus_dma_segment_t seg; register_t intr_temp; int32_t seg_count; #endif uint32_t length; }; Then based on the "tag" and "map" from the structures pointed to by "m_databuffer" you perform a flush/invalidate before setting up DMA. What do you think Kip ? --HPS From owner-p4-projects@FreeBSD.ORG Mon Sep 17 18:04:10 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7B4A616A468; Mon, 17 Sep 2007 18:04:10 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E414516A417 for ; Mon, 17 Sep 2007 18:04:09 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outH.internet-mail-service.net (outH.internet-mail-service.net [216.240.47.231]) by mx1.freebsd.org (Postfix) with ESMTP id CE5CD13C480 for ; Mon, 17 Sep 2007 18:04:09 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Mon, 17 Sep 2007 11:03:59 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id 501001263DA; Mon, 17 Sep 2007 11:03:59 -0700 (PDT) Message-ID: <46EEC18F.6000809@elischer.org> Date: Mon, 17 Sep 2007 11:03:59 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Marko Zec References: <200708212351.l7LNpi6Q006480@repoman.freebsd.org> In-Reply-To: <200708212351.l7LNpi6Q006480@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Perforce Change Reviews Subject: Re: PERFORCE change 125520 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 18:04:10 -0000 Marko Zec wrote: > http://perforce.freebsd.org/chv.cgi?CH=125520 > > Change 125520 by zec@zec_tpx32 on 2007/08/21 23:51:39 > > Given that ng_pipe nodes can be connected into arbitrary > topologies, and therefore it is possible for ngp_rcvdata() > to be recursively called from a single thread, it is > necessary to explicitly allow for the ng_pipe_giant mutex > to be recursively acquireable. OR use a different locking scheme. i.e. reference counts or something. > > Affected files ... > > .. //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 edit > > Differences ... > > ==== //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 (text+ko) ==== > > @@ -1028,7 +1028,7 @@ > error = EEXIST; > else { > mtx_init(&ng_pipe_giant, "ng_pipe_giant", NULL, > - MTX_DEF); > + MTX_DEF | MTX_RECURSE); > LIST_INIT(&node_head); > LIST_INIT(&hook_head); > ds_handle = timeout((timeout_t *) &pipe_scheduler, From owner-p4-projects@FreeBSD.ORG Mon Sep 17 18:32:36 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E924116A4C0; Mon, 17 Sep 2007 18:32:35 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3E3916A49E for ; Mon, 17 Sep 2007 18:32:35 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C5CA013C474 for ; Mon, 17 Sep 2007 18:32:35 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8HIWZr3051692 for ; Mon, 17 Sep 2007 18:32:35 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8HIWZpg051688 for perforce@freebsd.org; Mon, 17 Sep 2007 18:32:35 GMT (envelope-from pgj@FreeBSD.org) Date: Mon, 17 Sep 2007 18:32:35 GMT Message-Id: <200709171832.l8HIWZpg051688@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Cc: Subject: PERFORCE change 126522 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 18:32:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=126522 Change 126522 by pgj@disznohal on 2007/09/17 18:32:15 Add initial Hungarian translation of Chapter 19: GEOM. It refers to an illustration of disk striping (geom/striping.png) that is currently not included in this submit. I think it will require further efforts to make it localised and built. Affected files ... .. //depot/projects/docproj_hu/books/handbook/geom/chapter.sgml#2 edit Differences ... ==== //depot/projects/docproj_hu/books/handbook/geom/chapter.sgml#2 (text+ko) ==== @@ -1,95 +1,103 @@ ---> + - + Tom Rhodes - Written by + Írta: - GEOM: Modular Disk Transformation Framework + GEOM: Moduláris lemezszervezõ rendszer - Synopsis + Áttekintés GEOM - GEOM Disk Framework + A GEOM lemezrendszer GEOM - - This chapter covers the use of disks under the GEOM - framework in &os;. This includes the major RAID - control utilities which use the framework for configuration. - This chapter will not go into in depth discussion on how GEOM - handles or controls I/O, the underlying subsystem, or code. - This information is provided through the &man.geom.4; manual - page and its various SEE ALSO references. This chapter is also - not a definitive guide to RAID - configurations. Only GEOM-supported RAID - classifications will be discussed. - - After reading this chapter, you will know: + + Ez a fejezet a &os;-ben található GEOM rendszert + mutatja be. Ez a rendszer tömöríti az általa is alkalmazott + fontosabb RAID-vezérlõ + segédprogramokat. A fejezet nem részletezi, hogy a GEOM + konkrétan milyen módon kezeli és vezérli az I/O-t, ahogy + azt sem, hogyan mûködik az alapjául szolgáló alrendszer + vagy hogy néz ki annak forráskódja. Az ilyen jellegû + információk a &man.geom.4; man oldalon, valamint az ott + felsorolt hivatkozott helyeken találhatóak meg. Továbbá, ez + a fejezet magukról a RAID-konfigurációkról + sem ad pontos tájékoztatást. Kizárólag csak a GEOM által is + támogatott RAID-besorolásokról esik + szó. + + A fejezet elolvasása során megismerjük: - What type of RAID support is available - through GEOM. + a GEOM segítségével milyen fajtájú RAID + támogatást érhetünk el. - How to use the base utilities to configure, maintain, - and manipulate the various RAID - levels. - + hogyan kell használni a rendszer által nyújtott + alapvetõ segédeszközöket a különféle RAID + -szintek konfigurálásához, karbantartásához és + kezeléséhez. + - How to mirror, stripe, encrypt, and remotely connect disk - devices through GEOM. + hogyan kell a GEOM-on keresztül tükrözni, csíkozni, + titkosítani és távolról összekapcsolni lemezes + eszközöket. - How to troubleshoot disks attached to the GEOM - framework. + hogyan kell a GEOM rendszerben összekapcsolt lemezeknél + felmerülõ hibákat felderíteni. + + A fejezet elolvasásához ajánlott: - Before reading this chapter, you should: - - + - Understand how &os; treats disk devices - (). + megérteni, hogyan kezeli a &os; a lemezes eszközöket + (). - Know how to configure and install a new &os; kernel - (). + ismerni, hogyan konfiguráljunk és telepítsünk egy + új &os; rendszermagot (). - GEOM Introduction - - GEOM permits access and control to classes — Master Boot - Records, BSD labels, etc — through the - use of providers, or the special files in - /dev. Supporting various - software RAID configurations, GEOM will - transparently provide access to the operating system and - operating system utilities. + A GEOM bemutatása + + A GEOM rendszer adatszolgáltatókon vagy speciális + /dev-állományokon keresztül + hozzáférést és vezérlést tesz lehetõvé bizonyos osztályokhoz — + Master Boot Recordokhoz, BSD-címkékhez stb. + Számos szoftveres RAID konfiguráció támogatásával + a GEOM transzparens elérést tesz lehetõvé mind az operációs rendszer, + mind pedig az általa felkínált segédprogramok számára. @@ -98,7 +106,7 @@ Tom Rhodes - Written by + Írta: Murray @@ -107,559 +115,603 @@ - RAID0 - Striping + RAID0 - Csíkozás GEOM - Striping + Lemezcsíkozás - - Striping is a method used to combine several disk drives into - a single volume. In many cases, this is done through the use of - hardware controllers. The GEOM disk subsystem provides - software support for RAID0, also known as - disk striping. + + A csíkozás módszerét használjuk több lemezmeghajtó egyetlen + kötetté történõ összevonásához. A GEOM lemezalrendszer + szoftveres támogatást nyújt a RAID0, más + néven a lemezcsíkozás megvalósításához. + + Egy RAID0 rendszerben az adatokat + blokkokra bontva írjuk fel a tömbben található lemezek között + szétosztva. Így ahelyett, hogy meg kellene várnunk 256 kb-nyi + adat egyetlen lemezre írását, egy RAID0 + rendszerben egyszerre íródik 64 kb-nyi adat négy különbözõ + lemezre, és ezáltal gyorsabb elérést szolgáltat. Ez a + gyorsaság további lemezvezérlõk használatával még jobban + fokozható. + + Az egy RAID0-csíkozásban résztvevõ + lemezek mindegyikének azonos méretûnek kell lennie, mivel + az írásra és olvasásra irányuló I/O-kérések a párhuzamos + kiszolgálás érdekében összefésülõdnek. - In a RAID0 system, data are split up in - blocks that get written across all the drives in the array. - Instead of having to wait on the system to write 256k to one - disk, a RAID0 system can simultaneously write - 64k to each of four different disks, offering superior I/O - performance. This performance can be enhanced further by using - multiple disk controllers. - - Each disk in a RAID0 stripe must be of - the same size, since I/O requests are interleaved to read or - write to multiple disks in parallel. - - Disk Striping Illustration + Példa lemezcsíkozásra - Creating a stripe of unformatted ATA disks + Csíkozás kialakítása formázatlan ATA-lemezekkel + + Töltsük be a geom_stripe + modult: + + &prompt.root; kldload geom_stripe + + + Bizonyosodjuk meg róla, hogy a rendszerünkben + található egy szabad csatlakozási pont. Ha majd ezt a + kötetet szánjuk rendszerünk gyökérpartíciójának, használjunk + erre a célra egy másik könyvtárat, pl. a + /mnt-ot: + + &prompt.root; mkdir /mnt + + + Keressük meg a csíkozásra felhasználni kívánt + lemezek eszközneveit, és hozzunk létre belõlük egy új csíkozott + eszközt. Például, ha két használatban nem levõ, + particionálatlan ATA-lemezt, név szerint a + /dev/ad2 és /dev/ad3 + eszközöket akarjunk csíkozni: - Load the geom_stripe - module: + &prompt.root; gstripe label -v st0 /dev/ad2 /dev/ad3 + + + Az így létrejött új köteten most hozzunk létre egy + általános címkét, vagy más néven egy partíciós táblát, és + telepítsük fel rá a rendszer alapértelmezett rendszerindító + programját: - &prompt.root; kldload geom_stripe - + &prompt.root; bsdlabel -wB /dev/stripe/st0 + + + Ezzel meg kellett jelennie további másik két + eszköznek is a /dev/stripe + könyvtárban, a st0 eszköz + mellett. Ezek többek közt az st0a + és az st0c. Itt már ki is tudunk + alakítani egy állományrendszert az st0a + eszközön a newfs használatával: + + &prompt.root; newfs -U /dev/stripe/st0a + + Sok-sok számot fogunk látni cikázni a képernyõn, + majd néhány másodperc múlva befejezõdik a folyamat. + Létrehoztuk a kötetet, ami most már készen áll a + becsatolásra. + + - Ensure that a suitable mount point exists. If this - volume will become a root partition, then temporarily use - another mount point such as /mnt: + A kialakított lemezcsíkozást így tudjuk kézzel + csatlakoztatni: - &prompt.root; mkdir /mnt - + &prompt.root; mount /dev/stripe/st0a /mnt + + A csíkozott állományrendszer a rendszerindítás folyamán + automatikusan becsatlakoztathatjuk, ha elhelyezzük az + alábbi kötetinformációkat az /etc/fstab + állományba: - Determine the device names for the disks which will - be striped, and create the new stripe device. For example, - to stripe two unused and unpartitioned ATA disks, - for example /dev/ad2 and - /dev/ad3: + &prompt.root; echo "/dev/stripe/st0a /mnt ufs rw 2 2" \ + >> /etc/fstab + + A geom_stripe modult is automatikusan be + kell tölteni a rendszerindítás során. Ehhez a következõ sort kell + hozzáadni a /boot/loader.conf + állományhoz: - &prompt.root; gstripe label -v st0 /dev/ad2 /dev/ad3 - - - - - Write a standard label, also known as a partition - table, on the new volume and install the default - bootstrap code: - - &prompt.root; bsdlabel -wB /dev/stripe/st0 - - - - This process should have created two other devices - in the /dev/stripe - directory in addition to the st0 device. - Those include st0a and - st0c. At this point a file system may be created - on the st0a device with the - newfs utility: - - &prompt.root; newfs -U /dev/stripe/st0a - - Many numbers will glide across the screen, and after a few - seconds, the process will be complete. The volume has been - created and is ready to be mounted. - - - - To manually mount the created disk stripe: - - &prompt.root; mount /dev/stripe/st0a /mnt - - To mount this striped file system automatically during the boot - process, place the volume information in - /etc/fstab file: + &prompt.root; echo 'geom_stripe_load="YES"' >> /boot/loader.conf - &prompt.root; echo "/dev/stripe/st0a /mnt ufs rw 2 2" \ - >> /etc/fstab - - The geom_stripe module must also be automatically loaded during - system initialization, by adding a line to - /boot/loader.conf: - - &prompt.root; echo 'geom_stripe_load="YES"' >> /boot/loader.conf - - RAID1 - Mirroring + RAID1 - Tükrözés GEOM - Disk Mirroring + Lemeztükrözés + + A tükrözés számos vállalatnál és háztartásban alkalmazott + technológia, amely az adatok megszakítás nélküli lementésére + használatos. Amikor tükrözést használunk, az egyszerûen csak + arra utal, hogy a B lemez ugyanazokat az adatokat tartalmazza, + mint az A lemez. Vagy amikor a C és D lemez tartalma egyezik + meg az A és B lemezekével. Függetlenül a lemezek kiosztásától, + itt az a lényeg, hogy az egyik lemez teljes területe vagy az + egyik partíciója le van másolva. Késõbb az ezen a módon + lementett adatok könnyen visszaállíthatóak anélkül, hogy ez a + szolgáltatásban vagy az elérhetõségben bármilyen kimaradást + okozna, és akár még fizikailag is biztonságosan tárolhatóak. + + Elõször is szereznünk kell két egyforma méretû lemezt, + valamint ez a példa feltételezi, hogy ezek a lemezek közvetlen + elérésû (&man.da.4;) SCSI-lemezek. + + Kezdetnek telepítsük fel a &os;-t az elsõ lemezre, de + csak két partícióval. Ezek egyike legyen a lapozóállományt + tartalmazó partíció, aminek mérete pedig a fizikailag + rendelkezésre álló memória (RAM) méretének + kétszere legyen. A többi helyet adjuk oda a gyökérpartíciónak + (/). Természetesen a + többi csatolási pontot is kihasználhatjuk, külön partíciókkal, + de ezzel a feladat nehézsége tízszeresére növekszik, mivel + ekkor manuálisan kell átírnunk a &man.bsdlabel.8; és + &man.fdisk.8; beállításokat. + + Indítsuk újra a számítógépet és várjuk meg, amíg a + rendszer teljesen fel nem áll. Amint ez a folyamat véget ért, + jelentkezzük be a root + felhasználóval. + + Hozzuk létre a /dev/mirror/gm eszközt + és kössük hozzá a /dev/ad1 + eszközhöz: - Mirroring is a technology used by many corporations and home - users to back up data without interruption. When a mirror exists, - it simply means that diskB replicates diskA. Or, perhaps diskC+D - replicates diskA+B. Regardless of the disk configuration, the - important aspect is that information on one disk or partition is - being replicated. Later, that information could be more easily - restored, backed up without causing service or access - interruption, and even be physically stored in a data - safe. + &prompt.root; gmirror label -vnb round-robin gm0 /dev/da1 + + A rendszernek erre így kell reagálnia: - To begin, ensure the system has two disk drives of equal size, - this exercise assumes they are direct access (&man.da.4;) - SCSI disks. - - Begin by installing &os; on the first disk with only two - partitions. One should be a swap partition, double the - RAM size and all remaining space devoted to - the root (/) file system. - It is possible to have separate partitions for other mount points; - however, this will increase the difficulty level ten fold due to - manual alteration of the &man.bsdlabel.8; and &man.fdisk.8; - settings. - - Reboot and wait for the system to fully initialize. Once this - process has completed, log in as the root - user. - - Create the /dev/mirror/gm device and link - it with /dev/da1: - - &prompt.root; gmirror label -vnb round-robin gm0 /dev/da1 - - The system should respond with: - + Metadata value stored on /dev/da1. Done. - Initialize GEOM, this will load the - /boot/kernel/geom_mirror.ko kernel - module: + Keltsük életre a GEOM-ot, aminek során betöltõdik a + /boot/kernel/geom_mirror.ko + kernelmodul: + + &prompt.root; gmirror load + + + Ezzel a paranccsal létre kellett jönnie a + gm0 eszköznek a + /dev/mirror + könyvtárban. + + + Helyezzünk el egy partíciós táblát és rendszerindító + programot az fdisk segítségével az + újonnan létrehozott gm0 + eszközön: - &prompt.root; gmirror load + &prompt.root; fdisk -vBI /dev/mirror/gm0 + + Most pedig tegyünk fel egy általános címkét a + bsdlabel programmal: - - This command should have created the - gm0, device node under the - /dev/mirror - directory. - + &prompt.root; bsdlabel -wB /dev/mirror/gm0s1 + + + Ha több slice-unk és partíciónk is van, az iménti két + parancsban máshogy kell megadnunk a paramétereket. Meg kell + egyezniük a másik lemezen található slice-al és a + partíciójának méretével. + + + Használjuk a &man.newfs.8; segédprogramot a + gm0s1a eszközön egy UFS + típusú állományrendszer létesítésére: + + &prompt.root; newfs -U /dev/mirror/gm0s1a + + Ennek eredményeképpen kapunk egy halom számot a + képernyõn. Nagyon jó! Ellenõrizzük, nem látunk-e a képernyõn + valamilyen hibaüzenetet, majd csatlakoztassuk az eszközt a + a /mnt pontra: - Install a generic fdisk label and boot code - to new gm0 device: - - &prompt.root; fdisk -vBI /dev/mirror/gm0 - - Now install generic bsdlabel - information: - - &prompt.root; bsdlabel -wB /dev/mirror/gm0s1 - - - If multiple slices and partitions exist, the flags for the - previous two commands will require alteration. They must match - the slice and partition size of the other disk. - - - Use the &man.newfs.8; utility to construct a default UFS - file system on the gm0s1a device node: - - &prompt.root; newfs -U /dev/mirror/gm0s1a - - This should have caused the system to spit out some - information and a bunch of numbers. This is good. Examine the - screen for any error messages and mount the device to the - /mnt mount point: - - &prompt.root; mount /dev/mirror/gm0s1a /mnt - - Now move all data from the boot disk over to this new file - system. This example uses the &man.dump.8; and &man.restore.8; - commands; however, &man.dd.1; would also work with this - scenario. - - &prompt.root; dump -L -0 -f- / |(cd /mnt && restore -r -v -f-) - - This must be done for each file system. Simply place the - appropriate file system in the correct location when running the - aforementioned command. - - Now edit the replicated /mnt/etc/fstab - file and remove or comment out the swap file - - It should be noted that commenting out the swap file entry - in fstab will most likely require you to - re-establish a different way of enabling swap space. Please - refer to for more - information. - . Change the other file system information to use the - new disk as shown in the following example: - - # Device Mountpoint FStype Options Dump Pass# + &prompt.root; mount /dev/mirror/gm0s1a /mnt + + Ezt követõen pedig mozgassunk át minden adatot a frissen + létrehozott állományrendszere arról a lemezrõl, ahonnan + elindítottuk a rendszert. Ebben a példában ezt ugyan a + &man.dump.8; és &man.restore.8; parancsokkal oldjuk meg, + erre a célra viszont a &man.dd.1; is remekül használható. + + &prompt.root; dump -L -0 -f- / |(cd /mnt && restore -r -v -f-) + + Ezt el kell végeznünk mindegyik állományrendszerre. + Egyszerûen másoljuk be az érintett állományrendszert a + megfelelõ helyre az elõbb bemutatott parancsban. + + Ezután írjuk át a duplikált + /mnt/etc/fstab állományt, és távolítsuk + el vagy csak kommentezzük ki belõle a lapozóállományt + + Megjegyezzük, hogy ez az fstab + állományból kiszedett bejegyzés miatt valószínûleg + más módon kell majd engedélyeznünk a lapozóállomány + használatát. Errõl bõvebben ld. a + . + . + Írjuk felül a másik állományrendszer adatait is az új + eszköznek megfelelõ beállításokkal, ahogy a példa is + mutatja: + + # Device Mountpoint FStype Options Dump Pass# #/dev/da0s2b none swap sw 0 0 /dev/mirror/gm0s1a / ufs rw 1 1 - Now create a boot.config file on both the - current and new root partitions. This file will - help the system BIOS - boot the correct drive: + Most pedig hozzunk létre egy boot.config + állományt mind a jelenlegi, mind pedig az új gyökérpartíciókon. + Ez az állomány fogja segíteni a rendszerünk + BIOS-ának a megfelelõ meghajtóról történõ + elinduláshoz: + + &prompt.root; echo "1:da(1,a)/boot/loader" > /boot.config - &prompt.root; echo "1:da(1,a)/boot/loader" > /boot.config + &prompt.root; echo "1:da(1,a)/boot/loader" > /mnt/boot.config + + + A helyes rendszerindulás bebiztosításához megadtuk + mind a két gyökérpartíciót. Ha valamilyen ok folytán + a rendszer nem lenne képes olvasni az új gyökérpartíciót, + így mindig lesz egy biztonsági tartalékunk. + + + Gondoskodjunk a geom_mirror.ko modul + rendszerindítás során történõ betöltésérõl az alábbi + parancssal: - &prompt.root; echo "1:da(1,a)/boot/loader" > /mnt/boot.config + &prompt.root; echo 'geom_mirror_load="YES"' >> /mnt/boot/loader.conf + + Indítsuk újra a rendszert: - - We have placed it on both root partitions to ensure proper - boot up. If for some reason the system cannot read from the - new root partition, a failsafe is available. - + &prompt.root; shutdown -r now + + Ha minden rendben zajlott, akkor a rendszerünk elindult + a gm0s1a eszközrõl, és a + login vár minket. Ha valami rosszul sült + volna el, tekintsük át a fejezetben található, hibakeresérõl + szóló szakaszt. Ezután adjuk hozzá a da0 + lemezt a gm0 eszközhöz: - Ensure the geom_mirror.ko module will load - on boot by running the following command: - - &prompt.root; echo 'geom_mirror_load="YES"' >> /mnt/boot/loader.conf - - Reboot the system: - - &prompt.root; shutdown -r now - - If all has gone well, the system should have booted from the - gm0s1a device and a login - prompt should be waiting. If something went wrong, see review - the forthcoming troubleshooting section. Now add the - da0 disk to gm0 - device: - - &prompt.root; gmirror configure -a gm0 + &prompt.root; gmirror configure -a gm0 &prompt.root; gmirror insert gm0 /dev/da0 - The flag tells &man.gmirror.8; to use - automatic synchronization; i.e., mirror the disk writes - automatically. The manual page explains how to rebuild and - replace disks, although it uses data - in place of gm0. + Az paraméter tudatja a &man.gmirror.8;-al, + hogy automatikus szinkronizációt használjon, tehát az lemezre + írást magától tükrözze. A hozzátartozó man oldal elmagyarázza, + hogyan építsük át a tömböt és hogyan cseréljük benne a lemezeket, + habár az data névvel hivatkozik az itt + említett gm0 eszközre. - Troubleshooting + Hibakeresés - System refuses to boot + A rendszer nem hajlandó elindulni + + Ha a rendszerünk ehhez hasonló módon + indul: - If the system boots up to a prompt similar to: - - ffs_mountroot: can't find rootvp + ffs_mountroot: can't find rootvp Root mount failed: 6 mountroot> - Reboot the machine using the power or reset button. At - the boot menu, select option six (6). This will drop the - system to a &man.loader.8; prompt. Load the kernel module - manually: + Indítsuk újra a gépünket a kikapcsoló gomb vagy + a reset segítségével. A rendszerindító menüben + válasszuk a hatodik opciót (6). Ennek eredményeképpen + megkapjuk a &man.loader.8; parancssorát. Töltsük be + a kernelmodult manuálisan: - OK? load geom_mirror + OK? load geom_mirror OK? boot - If this works then for whatever reason the module was not - being loaded properly. Place: - - options GEOM_MIRROR - - in the kernel configuration file, rebuild and reinstall. - That should remedy this issue. + Ha ez beválik, akkor valamiért a modult nem sikerült + rendesen betölteni. Helyezzük el a + + options GEOM_MIRROR + + sort a rendszermag konfigurációs állományában, + fordítsuk újra és telepítsük. Ezzel várhatóan + orvosoltuk a problémát. - GEOM Gate Network Devices + Eszközök hálózati illesztése a GEOM-ban + + A GEOM távoli eszközök, pl. lemezek, CD-meghajtók + stb. használatát is támogatja a hálózati illesztést + szolgáló segédprogramjaival, hasonlóan az + NFS-hez. + + Kezdésként létre kell hozni az megosztást + elõsegítõ állományt. Ez az állomány határozza meg, ki + és milyen szinten jogosult használni az megosztott + erõforrásokat. Mondjuk, ha megosztjuk az elsõ + SCSI-lemezen a negyedik slice-ot, + az alábbi /etc/gg.exports állomány + több, mint tökéletes: - GEOM supports the remote use of devices, such as disks, - CD-ROMs, files, etc. through the use of the gate utilities. - This is similar to NFS. + 192.168.1.0/24 RW /dev/da0s4d + + Ezzel a belsõ hálózaton levõ összes számítógép képes + lesz elérni a da0s4d partíción + található állományrendszert. + + Az eszköz megosztásához elõször gondoskodnunk kell róla, + hogy ne legyen csatlakoztatva, majd ezután indítsuk el a + &man.ggated.8; szerver daemonját: + + &prompt.root; ggated + + Ezt követõen a mount felhasználásával + csatoljuk az eszközt a kliensen, az alábbi parancs + kiadásával: - To begin, an exports file must be created. This file - specifies who is permitted to access the exported resources and - what level of access they are offered. For example, to export - the fourth slice on the first SCSI disk, the - following /etc/gg.exports is more than - adequate: - - 192.168.1.0/24 RW /dev/da0s4d - - It will allow all hosts inside the private network access - the file system on the da0s4d - partition. - - To export this device, ensure it is not currently mounted, - and start the &man.ggated.8; server daemon: - - &prompt.root; ggated - - Now to mount the device on the client - machine, issue the following commands: - - &prompt.root; ggatec create -o rw 192.168.1.1 /dev/da0s4d + &prompt.root; ggatec create -o rw 192.168.1.1 /dev/da0s4d ggate0 &prompt.root; mount /dev/ggate0 /mnt - From here on, the device may be accessed through the - /mnt mount point. + Innentõl kezdve az eszköz elérhetõ lesz a + /mnt csatlakozási ponton + keresztül. + + + Fontos kiemelnünk, hogy ez a mûvelet eredménytelen akkor, + ha az adott eszközt vagy maga a szerver, vagy pedig valamelyik + másik kliens már korábban csatolta. + + + Amikor az eszközre már nincs tovább szükségünk, biztonságosan + le tudjuk választani a &man.umount.8; paranccsal, hasonlóan + bármelyik más lemezes eszközhöz. - - It should be pointed out that this will fail if the device - is currently mounted on either the server machine or any other - machine on the network. - - - When the device is no longer needed, it may be safely - unmounted with the &man.umount.8; command, similar to any other - disk device. - Labeling Disk Devices + A lemezes eszközök címkézése GEOM - Disk Labels + Lemezcímkék + + A rendszer indítása közben a &os; rendszermagja a talált + eszközöknek megfelelõen létrehoz mindegyikõjüknek egy-egy + eszközleírót. Ez a próbálgatásos módszer magával hoz néhány + gondot, például mi történik akkor, ha az új lemezes eszközt + USB-n keresztül adjuk a rendszerhez? + Nagyon valószínû, hogy ez az eszköz megkapja a + da0 nevet és ezzel az eredeti + da0 eszköz eltolódik a + da1 névhez. Ennek köszönhetõen + az /etc/fstab állományban felsorolt + állományrendszerek csatolása veszélybe kerül, aminek + következtében akár meghiúsulhat a rendszerindulás is. + + Az egyik lehetséges megoldása a problémának, ha sorbafûzzük + a SCSI eszközeinket, és így a + SCSI-kártyához kapcsolt újabb eszköz egy + addig nem használt számot fog birtokba venni. De mi helyzet + az USB-s eszközökkel, amelyek kiüthetik az + elsõdleges SCSI-lemezeinket? Ez egyébként + azért történhet meg, mert az USB-s eszközöket + általában hamarabb keresi a rendszer, mint a SCSI + kártyán levõ eszközöket. Megoldhatjuk úgy ezt a gondot, hogy + csak azután csatlakoztatjuk az említett eszközöket, miután a + rendszer elindult. De megoldhatjuk úgy is, hogy csak egyetlen + ATA-meghajtót használunk és soha nem soroljuk + fel a SCSI eszközöket az + /etc/fstab állományban. - During system initialization, the &os; kernel will create - device nodes as devices are found. This method of probing for - devices raises some issues, for instance what if a new disk - device is added via USB? It is very likely - that a flash device may be handed the device name of - da0 and the original - da0 shifted to - da1. This will cause issues mounting - file systems if they are listed in - /etc/fstab, effectively, this may also - prevent the system from booting. + Ezeknél kínálkozik azonban egy jobb megoldás! A + glabel nevû segédprogrammal a rendszergazda + vagy a felhasználó úgy tudja címkézni a lemezmeghajtókat, hogy + azok a /etc/fstab állományban szereplõ + címkéket használják. Mivel a glabel a + címkét az adott szolgáltató utolsó szektorában tárolja el, ez + a címke megmarad az újraindítás után is. Ha ezt a címkét + eszközként használjuk, az állományrendszerek mindig ugyanarról + a meghajtóról fognak csatolódni, függetlenül attól, hogy + milyen eszközleírón keresztül érjük el õket. + + + Egyáltalán nem állítottuk, hogy egy címke csak + állandó lehet. A glabel segítségével + egyaránt létre lehet hozni állandó és átmeneti címkéket, + de csak az állandó címke képes az újraindítás után is + megmaradni. A két címketípus közti különbségeket a + &man.glabel.8; man oldal tárgyalja részletesebben. + - One solution to this issue is to chain the - SCSI devices in order so a new device added to - the SCSI card will be issued unused device - numbers. But what about USB devices which may - replace the primary SCSI disk? This happens - because USB devices are usually - probed before the SCSI card. One solution - is to only insert these devices after the system has been - booted. Another method could be to use only a single - ATA drive and never list the - SCSI devices in - /etc/fstab. - - A better solution is available. By using the - glabel utility, an administrator or user may - label their disk devices and use these labels in - /etc/fstab. Because - glabel stores the label in the last sector of - a given provider, the label will remain persistent across reboots. - By using this label as a device, the file system may always be - mounted regardless of what device node it is accessed - through. - - - This goes without saying that a label be permanent. The - glabel utility may be used to create both a - transient and permanent label. Only the permanent label will - remain consistent across reboots. See the &man.glabel.8; - manual page for more information on the differences between - labels. - - - Label Types and Examples + Címketípusok és példák + + A címkéknek két típusa létezik, az általános címke + és az állományrendszer-címke. A kettõ közötti eltérés + az állandó címkékkel kapcsolatos automatikus detektálás, + illetve a tény, hogy ez a típus címke az újraindítás + után is megmarad. Ezeknek a címkéknek van egy külön, + az állományrendszerük szerint elnevezett könyvtára a + /dev könyvtáron + belül. Mondjuk az UFS2 + állományrendszer-címkék a + /dev/ufs2 + könyvtárban keletkeznek. + + Egy általános címke a következõ induláskor elveszik. + Ezeket a címkék a + /dev/label + könyvtárban keletkeznek, és ideálisak a + kísérletezgetésre. + + Állandó címkék az állományrendszereken a + tunefs vagy a newfs + segédprogramok valamelyikével helyezhetõek el. Ha egy + UFS2 állományrendszerre szeretnénk + tenni egy állandó címkét az adataink megsemmisítése + nélkül, adjuk ki a következõ parancsot: - There are two types of labels, a generic label and a - file system label. The difference between the labels is - the auto detection associated with permanent labels, and the - fact that this type of label will be persistent across reboots. - These labels are given a special directory in - /dev, which will be named - based on their file system type. For example, - UFS2 file system labels will be created in - the /dev/ufs2 - directory. + &prompt.root; tunefs -L home /dev/da3 + + + Ha az érintett állományrendszeren nincs üres + hely, ennek a parancsnak a használata adatvesztéshez + vezethet. Ilyen esetben inkább a felesleges állományok + eltávolításával kellene törõdnünk, nem pedig címkék + hozzáadásával. + + + Ezután egy címkének kell megjelennie a + /dev/ufs2 könyvtárban, + amelyet vegyünk is fel az /etc/fstab + állományba: - A generic label will go away with the next reboot. These - labels will be created in the - /dev/label directory and - are perfect for experimentation. + /dev/ufs2/home /home ufs rw 2 2 - + + Az állományrendszert tilos csatolni a + tunefs futtatása alatt! + + + Most már a megszokott módon csatolhatjuk az + állományrendszert: - Permanent labels may be placed on the file system using the - tunefs or newfs - utilities. To create a permanent label for a - UFS2 file system without destroying any - data, issue the following command: + &prompt.root; mount /home + + Az alábbi parancs használható a címke eltüntetéséhez: >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Sep 17 18:34:41 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3A3C816A473; Mon, 17 Sep 2007 18:34:41 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF86E16A469 for ; Mon, 17 Sep 2007 18:34:40 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B0F5013C4F9 for ; Mon, 17 Sep 2007 18:34:40 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8HIYegD052182 for ; Mon, 17 Sep 2007 18:34:40 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8HIYeOa052158 for perforce@freebsd.org; Mon, 17 Sep 2007 18:34:40 GMT (envelope-from pgj@FreeBSD.org) Date: Mon, 17 Sep 2007 18:34:40 GMT Message-Id: <200709171834.l8HIYeOa052158@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Cc: Subject: PERFORCE change 126523 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 18:34:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=126523 Change 126523 by pgj@disznohal on 2007/09/17 18:33:50 Add initial Hungarian translation of Appendix D: PGP Keys. Affected files ... .. //depot/projects/docproj_hu/books/handbook/pgpkeys/chapter.sgml#2 edit Differences ... ==== //depot/projects/docproj_hu/books/handbook/pgpkeys/chapter.sgml#2 (text+ko) ==== @@ -1,38 +1,39 @@ - - Do not edit this file except as instructed by the addkey.sh script. + + PGP kulcsok - See the README file in doc/share/pgpkeys for instructions. - ---> - - PGP Keys - pgp keys - In case you need to verify a signature or send encrypted email - to one of the officers or developers a number of keys are provided - here for your convenience. A complete keyring of FreeBSD.org - users is available for download from http://www.FreeBSD.org/doc/pgpkeyring.txt. + + Arra az esetre, ha ellenõriznünk kellene a tisztek + vagy fejlesztõk aláírását, esetleg titkosított e-mailt + szeretnénk küldeni nekik, ebben a fejezetben mellékeljük + az ehhez szükséges kulcsokat. A + FreeBSD.org összes + felhasználójának kulcsa letölthetõ a + http://www.FreeBSD.org/doc/pgpkeyring.txt + címrõl. - Officers + Tisztek §ion.pgpkeys-officers; - Core Team Members + A Core Team tagjai §ion.pgpkeys-core; - Developers + Fejlesztõk §ion.pgpkeys-developers; From owner-p4-projects@FreeBSD.ORG Mon Sep 17 18:48:36 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0C08516A418; Mon, 17 Sep 2007 18:48:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B464216A4C7 for ; Mon, 17 Sep 2007 18:48:35 +0000 (UTC) (envelope-from zec@icir.org) Received: from xaqua.tel.fer.hr (xaqua.tel.fer.hr [161.53.19.25]) by mx1.freebsd.org (Postfix) with ESMTP id 8701A13C46A for ; Mon, 17 Sep 2007 18:48:35 +0000 (UTC) (envelope-from zec@icir.org) Received: by xaqua.tel.fer.hr (Postfix, from userid 20006) id F30839B649; Mon, 17 Sep 2007 20:48:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on xaqua.tel.fer.hr X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.7 Received: from localhost (imunes.tel.fer.hr [161.53.19.8]) by xaqua.tel.fer.hr (Postfix) with ESMTP id E68119B645; Mon, 17 Sep 2007 20:48:32 +0200 (CEST) From: Marko Zec To: Julian Elischer Date: Mon, 17 Sep 2007 20:48:28 +0200 User-Agent: KMail/1.9.7 References: <200708212351.l7LNpi6Q006480@repoman.freebsd.org> <46EEC18F.6000809@elischer.org> In-Reply-To: <46EEC18F.6000809@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200709172048.29253.zec@icir.org> Cc: Perforce Change Reviews Subject: Re: PERFORCE change 125520 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 18:48:36 -0000 On Monday 17 September 2007 20:03:59 Julian Elischer wrote: > Marko Zec wrote: > > http://perforce.freebsd.org/chv.cgi?CH=125520 > > > > Change 125520 by zec@zec_tpx32 on 2007/08/21 23:51:39 > > > > Given that ng_pipe nodes can be connected into arbitrary > > topologies, and therefore it is possible for ngp_rcvdata() > > to be recursively called from a single thread, it is > > necessary to explicitly allow for the ng_pipe_giant mutex > > to be recursively acquireable. > > OR use a different locking scheme. That's right, but I'm just wondering is there anything fundamentally wrong with lock recursing (both in general as well as in this particular case)? Marko > i.e. reference counts or something. > > > Affected files ... > > > > .. //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 edit > > > > Differences ... > > > > ==== //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 (text+ko) > > ==== > > > > @@ -1028,7 +1028,7 @@ > > error = EEXIST; > > else { > > mtx_init(&ng_pipe_giant, "ng_pipe_giant", NULL, > > - MTX_DEF); > > + MTX_DEF | MTX_RECURSE); > > LIST_INIT(&node_head); > > LIST_INIT(&hook_head); > > ds_handle = timeout((timeout_t *) &pipe_scheduler, From owner-p4-projects@FreeBSD.ORG Mon Sep 17 19:21:02 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3585D16A420; Mon, 17 Sep 2007 19:21:02 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0F5916A418 for ; Mon, 17 Sep 2007 19:21:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outE.internet-mail-service.net (outE.internet-mail-service.net [216.240.47.228]) by mx1.freebsd.org (Postfix) with ESMTP id BD6B713C4CE for ; Mon, 17 Sep 2007 19:21:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Mon, 17 Sep 2007 12:20:59 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id ED84C126400; Mon, 17 Sep 2007 12:20:58 -0700 (PDT) Message-ID: <46EED397.3040700@elischer.org> Date: Mon, 17 Sep 2007 12:20:55 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Marko Zec References: <200708212351.l7LNpi6Q006480@repoman.freebsd.org> <46EEC18F.6000809@elischer.org> <200709172048.29253.zec@icir.org> In-Reply-To: <200709172048.29253.zec@icir.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Perforce Change Reviews Subject: Re: PERFORCE change 125520 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 19:21:02 -0000 Marko Zec wrote: > On Monday 17 September 2007 20:03:59 Julian Elischer wrote: >> Marko Zec wrote: >>> http://perforce.freebsd.org/chv.cgi?CH=125520 >>> >>> Change 125520 by zec@zec_tpx32 on 2007/08/21 23:51:39 >>> >>> Given that ng_pipe nodes can be connected into arbitrary >>> topologies, and therefore it is possible for ngp_rcvdata() >>> to be recursively called from a single thread, it is >>> necessary to explicitly allow for the ng_pipe_giant mutex >>> to be recursively acquireable. >> OR use a different locking scheme. > > That's right, but I'm just wondering is there anything fundamentally > wrong with lock recursing (both in general as well as in this > particular case)? we are trying as a general rule trying to keep lock recursion to an absolute minimum. It can make debugging other things very hard. and can introduce bugs that are hard to find.. Generally a bad idea. If you don't know you are recursing, how can you avoid the problems you don't know about? (sounds silly but..) > > Marko > >> i.e. reference counts or something. >> >>> Affected files ... >>> >>> .. //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 edit >>> >>> Differences ... >>> >>> ==== //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 (text+ko) >>> ==== >>> >>> @@ -1028,7 +1028,7 @@ >>> error = EEXIST; >>> else { >>> mtx_init(&ng_pipe_giant, "ng_pipe_giant", NULL, >>> - MTX_DEF); >>> + MTX_DEF | MTX_RECURSE); >>> LIST_INIT(&node_head); >>> LIST_INIT(&hook_head); >>> ds_handle = timeout((timeout_t *) &pipe_scheduler, > From owner-p4-projects@FreeBSD.ORG Mon Sep 17 19:43:52 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D2D5316A420; Mon, 17 Sep 2007 19:43:51 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1845416A419 for ; Mon, 17 Sep 2007 19:43:51 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.189]) by mx1.freebsd.org (Postfix) with ESMTP id 033F613C474 for ; Mon, 17 Sep 2007 19:43:50 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by rv-out-0910.google.com with SMTP id l15so1295547rvb for ; Mon, 17 Sep 2007 12:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=a6W2rb3Tg+FfncW/p4ix31yNFU1JKBYwodvzb8wqpgE=; b=KG0MWaKKFin0BWau5lZYAlPIlSMOyyyPXR+IH0ewAPTc2OvIWyq7GAwGVd3bfFZ2V8TTuVte8GGoXUScdeGsSbq0ZrpiO0DYCzqOXrUC2i05pQsnmJPKDza4/Nv3nOiJ+KkCFPDUV4ANFOb5hpCqaJjXpJMZD2k+XealGO5aF1M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=H4YocwQfM8Q7isWock78r5wEmtFnC0xELYq/YTOG9BZ8ld2zQ8VWxNKvJ52tqxp4qjLN16jgMlBZdYbd77yo1TQJsB296zv1oAkb+HI8qV/JpuHysZhu1Yc5lT3yz/1yGaTlLPTSgXwbeaMITDv0dveD3Y4D7KwyCd5DvyB1SP8= Received: by 10.114.146.1 with SMTP id t1mr3713575wad.1190058230092; Mon, 17 Sep 2007 12:43:50 -0700 (PDT) Received: by 10.114.13.15 with HTTP; Mon, 17 Sep 2007 12:43:50 -0700 (PDT) Message-ID: Date: Mon, 17 Sep 2007 12:43:50 -0700 From: "Kip Macy" To: "Julian Elischer" In-Reply-To: <46EED397.3040700@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200708212351.l7LNpi6Q006480@repoman.freebsd.org> <46EEC18F.6000809@elischer.org> <200709172048.29253.zec@icir.org> <46EED397.3040700@elischer.org> Cc: Marko Zec , Perforce Change Reviews Subject: Re: PERFORCE change 125520 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 19:43:52 -0000 On 9/17/07, Julian Elischer wrote: > Marko Zec wrote: > > On Monday 17 September 2007 20:03:59 Julian Elischer wrote: > >> Marko Zec wrote: > >>> http://perforce.freebsd.org/chv.cgi?CH=125520 > >>> > >>> Change 125520 by zec@zec_tpx32 on 2007/08/21 23:51:39 > >>> > >>> Given that ng_pipe nodes can be connected into arbitrary > >>> topologies, and therefore it is possible for ngp_rcvdata() > >>> to be recursively called from a single thread, it is > >>> necessary to explicitly allow for the ng_pipe_giant mutex > >>> to be recursively acquireable. > >> OR use a different locking scheme. > > > > That's right, but I'm just wondering is there anything fundamentally > > wrong with lock recursing (both in general as well as in this > > particular case)? > > we are trying as a general rule trying to keep lock recursion to an absolute > minimum. It can make debugging other things very hard. and can introduce > bugs that are hard to find.. > > Generally a bad idea. If you don't know you are recursing, how can you > avoid the problems you don't know about? (sounds silly but..) Just to add my 0.02$ from recent experiences ... Lock recursion creates the following problems: - lock is often held much longer than it really needs to be - it is no longer possible from code inspection to determine where the lock is or is not held - it makes it near impossible to mix shared and exclusive access to a lock, acquiring an exclusive lock that you already hold shared results in a deadlock and vice versa - it makes lock ordering more complicated to infer and work with So ... from code reading experience recently recursive locks are typically needed for code where the control flow pre-dates any thoughts of locking. -Kip > > > > > > Marko > > > >> i.e. reference counts or something. > >> > >>> Affected files ... > >>> > >>> .. //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 edit > >>> > >>> Differences ... > >>> > >>> ==== //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 (text+ko) > >>> ==== > >>> > >>> @@ -1028,7 +1028,7 @@ > >>> error = EEXIST; > >>> else { > >>> mtx_init(&ng_pipe_giant, "ng_pipe_giant", NULL, > >>> - MTX_DEF); > >>> + MTX_DEF | MTX_RECURSE); > >>> LIST_INIT(&node_head); > >>> LIST_INIT(&hook_head); > >>> ds_handle = timeout((timeout_t *) &pipe_scheduler, > > > > From owner-p4-projects@FreeBSD.ORG Mon Sep 17 20:15:58 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A151A16A46B; Mon, 17 Sep 2007 20:15:58 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5869516A419 for ; Mon, 17 Sep 2007 20:15:58 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5CEB013C46C for ; Mon, 17 Sep 2007 20:15:58 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8HKFwHX076842 for ; Mon, 17 Sep 2007 20:15:58 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8HKFtLR076799 for perforce@freebsd.org; Mon, 17 Sep 2007 20:15:55 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Sep 2007 20:15:55 GMT Message-Id: <200709172015.l8HKFtLR076799@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126528 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 20:15:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=126528 Change 126528 by kmacy@kmacy:storage:toestack on 2007/09/17 20:15:46 IFC 126500 Affected files ... .. //depot/projects/toestack/release/doc/en_US.ISO8859-1/hardware/article.sgml#3 integrate .. //depot/projects/toestack/release/doc/en_US.ISO8859-1/relnotes/article.sgml#3 integrate .. //depot/projects/toestack/release/doc/share/misc/dev.archlist.txt#3 integrate .. //depot/projects/toestack/share/man/man4/ata.4#2 integrate .. //depot/projects/toestack/share/man/man4/ral.4#2 integrate .. //depot/projects/toestack/share/man/man4/ural.4#2 integrate .. //depot/projects/toestack/share/man/man4/wlan.4#3 integrate .. //depot/projects/toestack/share/man/man4/wlan_amrr.4#2 integrate .. //depot/projects/toestack/sys/amd64/amd64/local_apic.c#2 integrate .. //depot/projects/toestack/sys/amd64/amd64/vm_machdep.c#2 integrate .. //depot/projects/toestack/sys/amd64/conf/MULTIQ#3 integrate .. //depot/projects/toestack/sys/amd64/include/vmparam.h#2 integrate .. //depot/projects/toestack/sys/conf/files.amd64#2 integrate .. //depot/projects/toestack/sys/conf/options#2 integrate .. //depot/projects/toestack/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c#2 integrate .. //depot/projects/toestack/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#2 integrate .. //depot/projects/toestack/sys/dev/an/if_an.c#2 integrate .. //depot/projects/toestack/sys/dev/ata/ata-chipset.c#2 integrate .. //depot/projects/toestack/sys/dev/ata/ata-pci.h#2 integrate .. //depot/projects/toestack/sys/dev/cxgb/cxgb_main.c#5 integrate .. //depot/projects/toestack/sys/dev/cxgb/cxgb_multiq.c#3 integrate .. //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.c#3 integrate .. //depot/projects/toestack/sys/dev/cxgb/cxgb_osdep.h#4 integrate .. //depot/projects/toestack/sys/dev/cxgb/sys/mbufq.h#2 integrate .. //depot/projects/toestack/sys/dev/cxgb/sys/mvec.h#2 integrate .. //depot/projects/toestack/sys/dev/cxgb/sys/uipc_mvec.c#2 integrate .. //depot/projects/toestack/sys/dev/em/if_em.c#2 integrate .. //depot/projects/toestack/sys/dev/em/if_em.h#2 integrate .. //depot/projects/toestack/sys/i386/acpica/madt.c#2 integrate .. //depot/projects/toestack/sys/i386/i386/local_apic.c#2 integrate .. //depot/projects/toestack/sys/kern/kern_mbuf.c#2 integrate .. //depot/projects/toestack/sys/kern/kern_rwlock.c#2 integrate .. //depot/projects/toestack/sys/kern/kern_switch.c#2 integrate .. //depot/projects/toestack/sys/kern/kern_timeout.c#2 integrate .. //depot/projects/toestack/sys/kern/subr_smp.c#2 integrate .. //depot/projects/toestack/sys/kern/subr_witness.c#2 integrate .. //depot/projects/toestack/sys/kern/uipc_mbuf.c#2 integrate .. //depot/projects/toestack/sys/kern/vfs_export.c#2 integrate .. //depot/projects/toestack/sys/modules/cxgb/Makefile#4 integrate .. //depot/projects/toestack/sys/modules/cxgb/cxgb/Makefile#2 edit .. //depot/projects/toestack/sys/net/if_ethersubr.c#2 integrate .. //depot/projects/toestack/sys/net/if_var.h#2 integrate .. //depot/projects/toestack/sys/net/radix.c#2 integrate .. //depot/projects/toestack/sys/net/radix.h#2 integrate .. //depot/projects/toestack/sys/net/route.c#2 integrate .. //depot/projects/toestack/sys/net/route.h#2 integrate .. //depot/projects/toestack/sys/net/rtsock.c#3 integrate .. //depot/projects/toestack/sys/netinet/if_ether.c#2 integrate .. //depot/projects/toestack/sys/netinet/in_pcb.c#3 integrate .. //depot/projects/toestack/sys/netinet/in_pcb.h#2 integrate .. //depot/projects/toestack/sys/netinet/sctp_asconf.c#3 integrate .. //depot/projects/toestack/sys/netinet/sctp_cc_functions.h#2 integrate .. //depot/projects/toestack/sys/netinet/sctp_input.c#3 integrate .. //depot/projects/toestack/sys/netinet/tcp_input.c#2 integrate .. //depot/projects/toestack/sys/netinet/tcp_output.c#2 integrate .. //depot/projects/toestack/sys/netinet/udp_usrreq.c#2 integrate .. //depot/projects/toestack/sys/netipsec/ipsec_input.c#2 integrate .. //depot/projects/toestack/sys/sun4v/mdesc/mdesc_init.c#2 integrate .. //depot/projects/toestack/sys/sys/callout.h#2 integrate .. //depot/projects/toestack/sys/sys/mbuf.h#2 integrate .. //depot/projects/toestack/sys/sys/proc.h#2 integrate .. //depot/projects/toestack/sys/sys/systm.h#2 integrate .. //depot/projects/toestack/sys/ufs/ffs/ffs_alloc.c#2 integrate .. //depot/projects/toestack/sys/vm/uma.h#2 integrate .. //depot/projects/toestack/sys/vm/uma_core.c#2 integrate .. //depot/projects/toestack/sys/vm/vm_contig.c#2 integrate .. //depot/projects/toestack/sys/vm/vm_extern.h#2 integrate .. //depot/projects/toestack/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c#2 integrate .. //depot/projects/toestack/usr.bin/systat/pigs.c#2 integrate .. //depot/projects/toestack/usr.sbin/cxgbtool/Makefile#2 integrate Differences ... ==== //depot/projects/toestack/release/doc/en_US.ISO8859-1/hardware/article.sgml#3 (text+ko) ==== @@ -18,7 +18,7 @@ The &os; Documentation Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/article.sgml,v 1.323 2007/09/09 01:32:36 bmah Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/article.sgml,v 1.325 2007/09/10 17:58:16 brueffer Exp $ 2000 @@ -766,11 +766,21 @@ &hwlist.cnw; + [&arch.i386;, &arch.amd64;] Intel PRO/Wireless 2100 MiniPCI network + adapter (&man.ipw.4; driver) + + [&arch.i386;, &arch.amd64;] Intel PRO/Wireless 2200BG/2915ABG MiniPCI + and 2225BG PCI network adapters (&man.iwi.4; driver) + + &hwlist.ral; + [&arch.i386;, &arch.pc98;] Raytheon Raylink 2.4GHz wireless adapters (&man.ray.4; driver) &hwlist.rum; + &hwlist.ural; + [&arch.amd64;, &arch.i386;, &arch.pc98;] Lucent Technologies WaveLAN/IEEE 802.11b wireless network adapters and workalikes using the Lucent Hermes, Intersil ==== //depot/projects/toestack/release/doc/en_US.ISO8859-1/relnotes/article.sgml#3 (text+ko) ==== @@ -20,7 +20,7 @@ The &os; Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/article.sgml,v 1.1062 2007/09/06 19:53:06 brueffer Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/article.sgml,v 1.1064 2007/09/11 23:31:14 bmah Exp $ 2000 @@ -1548,6 +1548,10 @@ The &man.bsnmpd.1; utility now supports the Host Resources MIB described in RFC 2790. &merged; + The &man.camcontrol.8; utility now supports + a readcap to display the size of + devices. + The &man.cmp.1; utility now supports an flag to compare the symbolic link itself rather than the file that the link points to. &merged; @@ -1829,7 +1833,8 @@ an architecture to pass through to the underlying makefiles. &merged; - The &man.mount.8; nodev option has + The &man.mount.8; dev + and nodev options have been removed. The &man.mount.8; utility now supports &man.mqueuefs.5;. @@ -1844,6 +1849,22 @@ that these late file systems should be mounted. &merged; + A number of the file + system-specific mount_* + utilities have been removed, in favor of the more general + &man.mount.8; command with a option. + Specifically, these commands are: + mount_devfs, + mount_ext2fs, + mount_fdescfs, + mount_linprocfs, + mount_procfs, + mount_std, + mount_linsysfs, + mount_reiserfs, and + mount_umapfs. + + The &man.moused.8; daemon now supports an flag to enable horizontal virtual scrolling similar to the flag for vertical virtual scrolling. ==== //depot/projects/toestack/release/doc/share/misc/dev.archlist.txt#3 (text+ko) ==== @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.98 2007/09/07 15:30:35 brueffer Exp $ +# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.99 2007/09/10 17:58:16 brueffer Exp $ # # @@ -104,6 +104,7 @@ pst i386 rc i386 rr232x i386,amd64 +ral i386,amd64 rue i386,pc98,amd64 rum i386,amd64 safe i386,pc98,amd64 @@ -163,6 +164,7 @@ umass i386,pc98,amd64,powerpc umodem i386,pc98,amd64 uplcom i386,pc98,amd64 +ural i386,amd64 urio i386,pc98,amd64,powerpc uscanner i386,pc98,amd64,powerpc uvisor i386,pc98,amd64 ==== //depot/projects/toestack/share/man/man4/ata.4#2 (text+ko) ==== @@ -25,9 +25,9 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/ata.4,v 1.72 2007/03/10 12:44:22 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/ata.4,v 1.73 2007/09/10 20:25:55 brueffer Exp $ .\" -.Dd March 10, 2007 +.Dd September 10, 2007 .Dt ATA 4 .Os .Sh NAME @@ -119,7 +119,7 @@ .It HighPoint: HPT302, HPT366, HPT368, HPT370, HPT371, HPT372, HPT372N, HPT374. .It Intel: -6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5, ICH6, ICH7, ICH8. +6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5, ICH6, ICH7, ICH8, ICH9. .It ITE: IT8211F, IT8212F. .It JMicron: ==== //depot/projects/toestack/share/man/man4/ral.4#2 (text+ko) ==== @@ -13,9 +13,9 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD: src/share/man/man4/ral.4,v 1.12 2007/02/03 19:29:31 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/ral.4,v 1.13 2007/09/10 17:54:14 brueffer Exp $ .\" -.Dd March 5, 2006 +.Dd September 10, 2007 .Os .Dt RAL 4 .Sh NAME @@ -66,95 +66,96 @@ .Sh HARDWARE The .Nm -driver supports the following adapters: +driver supports PCI/CardBus wireless adapters based on the Ralink Technology +RT2500, RT2501, and RT2600 chipsets, including: .Pp .Bl -column -compact ".Li Atlantis Land A02-PCM-W54" "RT2561S" "CardBus" .It Em Card Ta Em MAC/BBP Ta Em Bus -.It Li "A-Link WL54H" Ta RT2560 Ta PCI -.It Li "A-Link WL54PC" Ta RT2560 Ta CardBus -.It Li "AirLink101 AWLC5025" Ta RT2661 Ta CardBus -.It Li "AirLink101 AWLH5025" Ta RT2661 Ta PCI -.It Li "Amigo AWI-914W" Ta RT2560 Ta CardBus -.It Li "Amigo AWI-922W" Ta RT2560 Ta mini-PCI -.It Li "Amigo AWI-926W" Ta RT2560 Ta PCI -.It Li "AMIT WL531C" Ta RT2560 Ta CardBus -.It Li "AMIT WL531P" Ta RT2560 Ta PCI -.It Li "AOpen AOI-831" Ta RT2560 Ta PCI -.It Li "ASUS WL-107G" Ta RT2560 Ta CardBus -.It Li "ASUS WL-130g" Ta RT2560 Ta PCI -.It Li "Atlantis Land A02-PCI-W54" Ta RT2560 Ta PCI -.It Li "Atlantis Land A02-PCM-W54" Ta RT2560 Ta CardBus -.It Li "Belkin F5D7000 v3" Ta RT2560 Ta PCI -.It Li "Belkin F5D7010 v2" Ta RT2560 Ta CardBus -.It Li "Billionton MIWLGRL" Ta RT2560 Ta mini-PCI -.It Li "Canyon CN-WF511" Ta RT2560 Ta PCI -.It Li "Canyon CN-WF513" Ta RT2560 Ta CardBus -.It Li "CC&C WL-2102" Ta RT2560 Ta CardBus -.It Li "CNet CWC-854" Ta RT2560 Ta CardBus -.It Li "CNet CWP-854" Ta RT2560 Ta PCI -.It Li "Compex WL54G" Ta RT2560 Ta CardBus -.It Li "Compex WLP54G" Ta RT2560 Ta PCI -.It Li "Conceptronic C54RC" Ta RT2560 Ta CardBus -.It Li "Conceptronic C54Ri" Ta RT2560 Ta PCI -.It Li "Digitus DN-7001G-RA" Ta RT2560 Ta CardBus -.It Li "Digitus DN-7006G-RA" Ta RT2560 Ta PCI -.It Li "E-Tech WGPC02" Ta RT2560 Ta CardBus -.It Li "E-Tech WGPI02" Ta RT2560 Ta PCI -.It Li "Edimax EW-7108PCg" Ta RT2560 Ta CardBus -.It Li "Edimax EW-7128g" Ta RT2560 Ta PCI -.It Li "Eminent EM3036" Ta RT2560 Ta CardBus -.It Li "Eminent EM3037" Ta RT2560 Ta PCI -.It Li "Encore ENLWI-G-RLAM" Ta RT2560 Ta PCI -.It Li "Encore ENPWI-G-RLAM" Ta RT2560 Ta CardBus -.It Li "Fiberline WL-400P" Ta RT2560 Ta PCI -.It Li "Fibreline WL-400X" Ta RT2560 Ta CardBus -.It Li "Gigabyte GN-WI01GS" Ta RT2561S Ta mini-PCI -.It Li "Gigabyte GN-WIKG" Ta RT2560 Ta mini-PCI -.It Li "Gigabyte GN-WMKG" Ta RT2560 Ta CardBus -.It Li "Gigabyte GN-WP01GS" Ta RT2561S Ta PCI -.It Li "Gigabyte GN-WPKG" Ta RT2560 Ta PCI -.It Li "Hawking HWC54GR" Ta RT2560 Ta CardBus -.It Li "Hawking HWP54GR" Ta RT2560 Ta PCI -.It Li "iNexQ CR054g-009 (R03)" Ta RT2560 Ta PCI -.It Li "JAHT WN-4054P" Ta RT2560 Ta CardBus -.It Li "JAHT WN-4054PCI" Ta RT2560 Ta PCI -.It Li "LevelOne WNC-0301 v2" Ta RT2560 Ta PCI -.It Li "LevelOne WPC-0301 v2" Ta RT2560 Ta CardBus -.It Li "Linksys WMP54G v4" Ta RT2560 Ta PCI -.It Li "Micronet SP906GK" Ta RT2560 Ta PCI -.It Li "Micronet SP908GK V3" Ta RT2560 Ta CardBus -.It Li "Minitar MN54GCB-R" Ta RT2560 Ta CardBus -.It Li "Minitar MN54GPC-R" Ta RT2560 Ta PCI -.It Li "MSI CB54G2" Ta RT2560 Ta CardBus -.It Li "MSI MP54G2" Ta RT2560 Ta mini-PCI -.It Li "MSI PC54G2" Ta RT2560 Ta PCI -.It Li "OvisLink EVO-W54PCI" Ta RT2560 Ta PCI -.It Li "PheeNet HWL-PCIG/RA" Ta RT2560 Ta PCI -.It Li "Pro-Nets CB80211G" Ta RT2560 Ta CardBus -.It Li "Pro-Nets PC80211G" Ta RT2560 Ta PCI -.It Li "Repotec RP-WB7108" Ta RT2560 Ta CardBus -.It Li "Repotec RP-WP0854" Ta RT2560 Ta PCI -.It Li "SATech SN-54C" Ta RT2560 Ta CardBus -.It Li "SATech SN-54P" Ta RT2560 Ta PCI -.It Li "Sitecom WL-112" Ta RT2560 Ta CardBus -.It Li "Sitecom WL-115" Ta RT2560 Ta PCI -.It Li "SMC SMCWCB-GM" Ta RT2661 Ta CardBus -.It Li "SMC SMCWPCI-GM" Ta RT2661 Ta PCI -.It Li "SparkLAN WL-685R" Ta RT2560 Ta CardBus -.It Li "Surecom EP-9321-g" Ta RT2560 Ta PCI -.It Li "Surecom EP-9321-g1" Ta RT2560 Ta PCI -.It Li "Surecom EP-9428-g" Ta RT2560 Ta CardBus -.It Li "Sweex LC500050" Ta RT2560 Ta CardBus -.It Li "Sweex LC700030" Ta RT2560 Ta PCI -.It Li "TekComm NE-9321-g" Ta RT2560 Ta PCI -.It Li "TekComm NE-9428-g" Ta RT2560 Ta CardBus -.It Li "Unex CR054g-R02" Ta RT2560 Ta PCI -.It Li "Unex MR054g-R02" Ta RT2560 Ta CardBus -.It Li "Zinwell ZWX-G160" Ta RT2560 Ta CardBus -.It Li "Zinwell ZWX-G360" Ta RT2560 Ta mini-PCI -.It Li "Zinwell ZWX-G361" Ta RT2560 Ta PCI -.It Li "Zonet ZEW1500" Ta RT2560 Ta CardBus -.It Li "Zonet ZEW1600" Ta RT2560 Ta PCI +.It "A-Link WL54H" Ta RT2560 Ta PCI +.It "A-Link WL54PC" Ta RT2560 Ta CardBus +.It "AirLink101 AWLC5025" Ta RT2661 Ta CardBus +.It "AirLink101 AWLH5025" Ta RT2661 Ta PCI +.It "Amigo AWI-914W" Ta RT2560 Ta CardBus +.It "Amigo AWI-922W" Ta RT2560 Ta mini-PCI +.It "Amigo AWI-926W" Ta RT2560 Ta PCI +.It "AMIT WL531C" Ta RT2560 Ta CardBus +.It "AMIT WL531P" Ta RT2560 Ta PCI +.It "AOpen AOI-831" Ta RT2560 Ta PCI +.It "ASUS WL-107G" Ta RT2560 Ta CardBus +.It "ASUS WL-130g" Ta RT2560 Ta PCI +.It "Atlantis Land A02-PCI-W54" Ta RT2560 Ta PCI +.It "Atlantis Land A02-PCM-W54" Ta RT2560 Ta CardBus +.It "Belkin F5D7000 v3" Ta RT2560 Ta PCI +.It "Belkin F5D7010 v2" Ta RT2560 Ta CardBus +.It "Billionton MIWLGRL" Ta RT2560 Ta mini-PCI +.It "Canyon CN-WF511" Ta RT2560 Ta PCI +.It "Canyon CN-WF513" Ta RT2560 Ta CardBus +.It "CC&C WL-2102" Ta RT2560 Ta CardBus +.It "CNet CWC-854" Ta RT2560 Ta CardBus +.It "CNet CWP-854" Ta RT2560 Ta PCI +.It "Compex WL54G" Ta RT2560 Ta CardBus +.It "Compex WLP54G" Ta RT2560 Ta PCI +.It "Conceptronic C54RC" Ta RT2560 Ta CardBus +.It "Conceptronic C54Ri" Ta RT2560 Ta PCI +.It "Digitus DN-7001G-RA" Ta RT2560 Ta CardBus +.It "Digitus DN-7006G-RA" Ta RT2560 Ta PCI +.It "E-Tech WGPC02" Ta RT2560 Ta CardBus +.It "E-Tech WGPI02" Ta RT2560 Ta PCI +.It "Edimax EW-7108PCg" Ta RT2560 Ta CardBus +.It "Edimax EW-7128g" Ta RT2560 Ta PCI +.It "Eminent EM3036" Ta RT2560 Ta CardBus +.It "Eminent EM3037" Ta RT2560 Ta PCI +.It "Encore ENLWI-G-RLAM" Ta RT2560 Ta PCI +.It "Encore ENPWI-G-RLAM" Ta RT2560 Ta CardBus +.It "Fiberline WL-400P" Ta RT2560 Ta PCI +.It "Fibreline WL-400X" Ta RT2560 Ta CardBus +.It "Gigabyte GN-WI01GS" Ta RT2561S Ta mini-PCI +.It "Gigabyte GN-WIKG" Ta RT2560 Ta mini-PCI +.It "Gigabyte GN-WMKG" Ta RT2560 Ta CardBus +.It "Gigabyte GN-WP01GS" Ta RT2561S Ta PCI +.It "Gigabyte GN-WPKG" Ta RT2560 Ta PCI +.It "Hawking HWC54GR" Ta RT2560 Ta CardBus +.It "Hawking HWP54GR" Ta RT2560 Ta PCI +.It "iNexQ CR054g-009 (R03)" Ta RT2560 Ta PCI +.It "JAHT WN-4054P" Ta RT2560 Ta CardBus +.It "JAHT WN-4054PCI" Ta RT2560 Ta PCI +.It "LevelOne WNC-0301 v2" Ta RT2560 Ta PCI +.It "LevelOne WPC-0301 v2" Ta RT2560 Ta CardBus +.It "Linksys WMP54G v4" Ta RT2560 Ta PCI +.It "Micronet SP906GK" Ta RT2560 Ta PCI +.It "Micronet SP908GK V3" Ta RT2560 Ta CardBus +.It "Minitar MN54GCB-R" Ta RT2560 Ta CardBus +.It "Minitar MN54GPC-R" Ta RT2560 Ta PCI +.It "MSI CB54G2" Ta RT2560 Ta CardBus +.It "MSI MP54G2" Ta RT2560 Ta mini-PCI +.It "MSI PC54G2" Ta RT2560 Ta PCI +.It "OvisLink EVO-W54PCI" Ta RT2560 Ta PCI +.It "PheeNet HWL-PCIG/RA" Ta RT2560 Ta PCI +.It "Pro-Nets CB80211G" Ta RT2560 Ta CardBus +.It "Pro-Nets PC80211G" Ta RT2560 Ta PCI +.It "Repotec RP-WB7108" Ta RT2560 Ta CardBus +.It "Repotec RP-WP0854" Ta RT2560 Ta PCI +.It "SATech SN-54C" Ta RT2560 Ta CardBus +.It "SATech SN-54P" Ta RT2560 Ta PCI +.It "Sitecom WL-112" Ta RT2560 Ta CardBus +.It "Sitecom WL-115" Ta RT2560 Ta PCI +.It "SMC SMCWCB-GM" Ta RT2661 Ta CardBus +.It "SMC SMCWPCI-GM" Ta RT2661 Ta PCI +.It "SparkLAN WL-685R" Ta RT2560 Ta CardBus +.It "Surecom EP-9321-g" Ta RT2560 Ta PCI +.It "Surecom EP-9321-g1" Ta RT2560 Ta PCI +.It "Surecom EP-9428-g" Ta RT2560 Ta CardBus +.It "Sweex LC500050" Ta RT2560 Ta CardBus +.It "Sweex LC700030" Ta RT2560 Ta PCI +.It "TekComm NE-9321-g" Ta RT2560 Ta PCI +.It "TekComm NE-9428-g" Ta RT2560 Ta CardBus +.It "Unex CR054g-R02" Ta RT2560 Ta PCI +.It "Unex MR054g-R02" Ta RT2560 Ta CardBus +.It "Zinwell ZWX-G160" Ta RT2560 Ta CardBus +.It "Zinwell ZWX-G360" Ta RT2560 Ta mini-PCI +.It "Zinwell ZWX-G361" Ta RT2560 Ta PCI +.It "Zonet ZEW1500" Ta RT2560 Ta CardBus +.It "Zonet ZEW1600" Ta RT2560 Ta PCI .El .Pp An up to date list can be found at ==== //depot/projects/toestack/share/man/man4/ural.4#2 (text+ko) ==== @@ -13,9 +13,9 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD: src/share/man/man4/ural.4,v 1.14 2007/06/15 04:41:15 kevlo Exp $ +.\" $FreeBSD: src/share/man/man4/ural.4,v 1.15 2007/09/10 17:54:14 brueffer Exp $ .\" -.Dd October 7, 2006 +.Dd September 10, 2007 .Os .Dt URAL 4 .Sh NAME @@ -55,37 +55,38 @@ .Sh HARDWARE The .Nm -driver supports the following adapters: +driver supports USB 2.0 wireless adapters based on the Ralink Technology +RT2500USB chipset, including: .Pp .Bl -column -compact ".Li Atlantis Land A02-PCM-W54" "Bus" .It Em Card Ta Em Bus -.It Li "AMIT WL532U" Ta USB -.It Li "ASUS WL-167g" Ta USB -.It Li "Belkin F5D7050 v2000" Ta USB -.It Li "Buffalo WLI-U2-KG54-AI" Ta USB -.It Li "CNet CWD-854" Ta USB -.It Li "Compex WLU54G 2A1100" Ta USB -.It Li "Conceptronic C54RU" Ta USB -.It Li "D-Link DWL-G122 b1" Ta USB -.It Li "Dynalink WLG25USB" Ta USB -.It Li "E-Tech WGUS02" Ta USB -.It Li "Gigabyte GN-WBKG" Ta USB -.It Li "Hercules HWGUSB2-54" Ta USB -.It Li "KCORP LifeStyle KLS-685" Ta USB -.It Li "Linksys WUSB54G v4" Ta USB -.It Li "Linksys WUSB54GP v4" Ta USB -.It Li "MSI MS-6861" Ta USB -.It Li "MSI MS-6865" Ta USB -.It Li "MSI MS-6869" Ta USB -.It Li "NovaTech NV-902" Ta USB -.It Li "OvisLink Evo-W54USB" Ta USB -.It Li "SerComm UB801R" Ta USB -.It Li "SparkLAN WL-685R" Ta USB -.It Li "Surecom EP-9001-g" Ta USB -.It Li "Sweex LC100060" Ta USB -.It Li "Tonze UW-6200C" Ta USB -.It Li "Zinwell ZWX-G261" Ta USB -.It Li "Zonet ZEW2500P" Ta USB +.It "AMIT WL532U" Ta USB +.It "ASUS WL-167g" Ta USB +.It "Belkin F5D7050 v2000" Ta USB +.It "Buffalo WLI-U2-KG54-AI" Ta USB +.It "CNet CWD-854" Ta USB +.It "Compex WLU54G 2A1100" Ta USB +.It "Conceptronic C54RU" Ta USB +.It "D-Link DWL-G122 b1" Ta USB +.It "Dynalink WLG25USB" Ta USB +.It "E-Tech WGUS02" Ta USB +.It "Gigabyte GN-WBKG" Ta USB +.It "Hercules HWGUSB2-54" Ta USB +.It "KCORP LifeStyle KLS-685" Ta USB +.It "Linksys WUSB54G v4" Ta USB +.It "Linksys WUSB54GP v4" Ta USB +.It "MSI MS-6861" Ta USB +.It "MSI MS-6865" Ta USB +.It "MSI MS-6869" Ta USB +.It "NovaTech NV-902" Ta USB +.It "OvisLink Evo-W54USB" Ta USB +.It "SerComm UB801R" Ta USB +.It "SparkLAN WL-685R" Ta USB +.It "Surecom EP-9001-g" Ta USB +.It "Sweex LC100060" Ta USB +.It "Tonze UW-6200C" Ta USB +.It "Zinwell ZWX-G261" Ta USB +.It "Zonet ZEW2500P" Ta USB .El .Pp An up to date list can be found at ==== //depot/projects/toestack/share/man/man4/wlan.4#3 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/wlan.4,v 1.12 2007/09/06 20:15:04 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/wlan.4,v 1.13 2007/09/10 17:20:21 brueffer Exp $ .\" .Dd September 6, 2007 .Dt WLAN 4 @@ -50,8 +50,9 @@ .Xr ral 4 , .Xr rum 4 , .Xr ural 4 , +.Xr wi 4 , and -.Xr wi 4 +.Xr zyd 4 drivers, with other drivers to follow. .Pp The ==== //depot/projects/toestack/share/man/man4/wlan_amrr.4#2 (text+ko) ==== @@ -23,9 +23,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/wlan_amrr.4,v 1.1 2007/06/15 04:41:15 kevlo Exp $ +.\" $FreeBSD: src/share/man/man4/wlan_amrr.4,v 1.2 2007/09/10 18:17:50 brueffer Exp $ .\" -.Dd June 15, 2007 +.Dd September 10, 2007 .Dt WLAN_AMRR 4 .Os .Sh NAME @@ -36,7 +36,7 @@ .Sh DESCRIPTION The .Nm -module implements Adaptive Multi-Rate Retry tx rate control +module implements the Adaptive Multi-Rate Retry tx rate control algorithm for use with 802.11 devices. The .Nm @@ -45,7 +45,8 @@ .Sh SEE ALSO .Xr rum 4 , .Xr ural 4 , -.Xr wlan 4 +.Xr wlan 4 , +.Xr zyd 4 .Sh STANDARDS More information can be found in the paper describing the .Em AMRR ==== //depot/projects/toestack/sys/amd64/amd64/local_apic.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.41 2007/08/02 21:17:58 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.42 2007/09/11 22:54:08 attilio Exp $"); #include "opt_hwpmc_hooks.h" @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -1061,7 +1062,7 @@ printf("%s: Failed to setup the local APIC: returned %d\n", best_enum->apic_name, retval); } -SYSINIT(apic_setup_local, SI_SUB_CPU, SI_ORDER_FIRST, apic_setup_local, NULL) +SYSINIT(apic_setup_local, SI_SUB_CPU, SI_ORDER_SECOND, apic_setup_local, NULL) /* * Setup the I/O APICs. ==== //depot/projects/toestack/sys/amd64/amd64/vm_machdep.c#2 (text+ko) ==== @@ -566,3 +566,23 @@ return 1; } + +void * +contigmalloc2(vm_page_t m, vm_pindex_t npages, int flags) +{ + return (void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); +} + +void +contigfree(void *addr, unsigned long size, struct malloc_type *type) +{ + vm_pindex_t npgs; + vm_page_t m; + int i; + + npgs = round_page(size) >> PAGE_SHIFT; + m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)addr)); + for (i = 0; i < npgs; i++, m++) + vm_page_free(m); + malloc_type_freed(type, npgs << PAGE_SHIFT); +} ==== //depot/projects/toestack/sys/amd64/conf/MULTIQ#3 (text+ko) ==== @@ -23,7 +23,7 @@ # To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. -makeoptions MODULES_OVERRIDE="cxgb em if_vlan linux linprocfs hwpmc netgraph" +makeoptions MODULES_OVERRIDE="cxgb em if_vlan linux linprocfs netgraph hwpmc" makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols @@ -212,4 +212,7 @@ options IFNET_MULTIQUEUE # add support for using multiple tx queues to ifnet options ALT_BREAK_TO_DEBUGGER -#options BIND_ALL +#options LOCK_PROFILING +options HWPMC_HOOKS +options MINCLSIZE 48 + ==== //depot/projects/toestack/sys/amd64/include/vmparam.h#2 (text+ko) ==== @@ -185,4 +185,10 @@ #define VM_INITIAL_PAGEIN 16 #endif +/* + * We provide a machine specific contiguous mapping function + * which uses the direct map + */ +#define VM_MD_CONTIG + #endif /* _MACHINE_VMPARAM_H_ */ ==== //depot/projects/toestack/sys/conf/files.amd64#2 (text+ko) ==== @@ -180,6 +180,7 @@ dev/hptmv/ioctl.c optional hptmv dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc +dev/hwpmc/hwpmc_ppro.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc dev/kbd/kbd.c optional atkbd | sc | ukbd dev/mem/memutil.c optional mem ==== //depot/projects/toestack/sys/conf/options#2 (text+ko) ==== @@ -535,6 +535,7 @@ INVARIANT_SUPPORT opt_global.h INVARIANTS opt_global.h MCLSHIFT opt_global.h +MINCLSIZE opt_global.h MUTEX_DEBUG opt_global.h MUTEX_NOINLINE opt_global.h LOCK_PROFILING opt_global.h ==== //depot/projects/toestack/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c#2 (text+ko) ==== @@ -1439,7 +1439,7 @@ return (1); #endif #else - if (kmem_used() > kmem_size() / 2) + if (kmem_used() > (kmem_size() * 4) / 5) return (1); #endif @@ -2729,7 +2729,7 @@ arc_c_max = (arc_c * 8) - (1<<30); else arc_c_max = arc_c_min; - arc_c_max = MAX(arc_c * 4, arc_c_max); + arc_c_max = MAX(arc_c * 6, arc_c_max); #ifdef _KERNEL /* * Allow the tunables to override our calculations if they are ==== //depot/projects/toestack/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#2 (text+ko) ==== @@ -949,6 +949,39 @@ atomic_add_32(&zfs_active_fs_count, -1); } +#ifdef __i386__ +static int desiredvnodes_backup; +#endif + +static void +zfs_vnodes_adjust(void) +{ +#ifdef __i386__ + int val; + + desiredvnodes_backup = desiredvnodes; + + /* + * We calculate newdesiredvnodes the same way it is done in + * vntblinit(). If it is equal to desiredvnodes, it means that + * it wasn't tuned by the administrator and we can tune it down. + */ + val = min(maxproc + cnt.v_page_count / 4, 2 * vm_kmem_size / + (5 * (sizeof(struct vm_object) + sizeof(struct vnode)))); + if (desiredvnodes == val) + desiredvnodes = (3 * desiredvnodes) / 4; +#endif +} + +static void +zfs_vnodes_adjust_back(void) +{ + +#ifdef __i386__ + desiredvnodes = desiredvnodes_backup; +#endif +} + void zfs_init(void) { @@ -964,6 +997,13 @@ * Initialize znode cache, vnode ops, etc... */ zfs_znode_init(); + + /* + * Reduce number of vnodes. Originally number of vnodes is calculated + * with UFS inode in mind. We reduce it here, because it's too big for + * ZFS/i386. + */ + zfs_vnodes_adjust(); } void @@ -971,6 +1011,7 @@ { zfsctl_fini(); zfs_znode_fini(); + zfs_vnodes_adjust_back(); } int ==== //depot/projects/toestack/sys/dev/an/if_an.c#2 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.83 2007/08/07 12:26:19 avatar Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.84 2007/09/10 12:53:34 avatar Exp $"); /* * The Aironet 4500/4800 series cards come in PCMCIA, ISA and PCI form. @@ -1862,6 +1862,7 @@ struct ifreq *ifr; struct thread *td = curthread; struct ieee80211req *ireq; + struct ieee80211_channel ch; u_int8_t tmpstr[IEEE80211_NWID_LEN*2]; u_int8_t *tmpptr; struct an_ltv_genconfig *config; @@ -2217,6 +2218,22 @@ } ireq->i_val = status->an_cur_channel; break; + case IEEE80211_IOC_CURCHAN: + sc->areq.an_type = AN_RID_STATUS; + if (an_read_record(sc, + (struct an_ltv_gen *)&sc->areq)) { + error = EINVAL; + break; + } + bzero(&ch, sizeof(ch)); + ch.ic_freq = ieee80211_ieee2mhz(status->an_cur_channel, + IEEE80211_CHAN_B); + ch.ic_flags = IEEE80211_CHAN_B; + ch.ic_ieee = status->an_cur_channel; + AN_UNLOCK(sc); + error = copyout(&ch, ireq->i_data, sizeof(ch)); + AN_LOCK(sc); + break; case IEEE80211_IOC_POWERSAVE: sc->areq.an_type = AN_RID_ACTUALCFG; if (an_read_record(sc, ==== //depot/projects/toestack/sys/dev/ata/ata-chipset.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.198 2007/06/25 08:21:21 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.199 2007/09/10 19:16:39 simon Exp $"); #include "opt_ata.h" #include @@ -1710,6 +1710,10 @@ { ATA_I82801HB_AH6, 0, AHCI, 0x00, ATA_SA300, "ICH8" }, { ATA_I82801HBM_S1, 0, AHCI, 0x00, ATA_SA300, "ICH8M" }, { ATA_I82801HBM_S2, 0, AHCI, 0x00, ATA_SA300, "ICH8M" }, + { ATA_I82801IB_S1, 0, AHCI, 0x00, ATA_SA300, "ICH9" }, + { ATA_I82801IB_S2, 0, AHCI, 0x00, ATA_SA300, "ICH9" }, + { ATA_I82801IB_AH4, 0, AHCI, 0x00, ATA_SA300, "ICH9" }, + { ATA_I82801IB_AH6, 0, AHCI, 0x00, ATA_SA300, "ICH9" }, { ATA_I31244, 0, 0, 0x00, ATA_SA150, "31244" }, { 0, 0, 0, 0, 0, 0}}; char buffer[64]; ==== //depot/projects/toestack/sys/dev/ata/ata-pci.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.77 2007/06/25 08:21:21 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.78 2007/09/10 19:16:39 simon Exp $ */ /* structure holding chipset config info */ @@ -167,6 +167,10 @@ #define ATA_I82801HB_S2 0x28258086 #define ATA_I82801HBM_S1 0x28298086 #define ATA_I82801HBM_S2 0x282a8086 +#define ATA_I82801IB_S1 0x29208086 +#define ATA_I82801IB_AH6 0x29228086 +#define ATA_I82801IB_AH4 0x29238086 +#define ATA_I82801IB_S2 0x29268086 #define ATA_I31244 0x32008086 #define ATA_ITE_ID 0x1283 ==== //depot/projects/toestack/sys/dev/cxgb/cxgb_main.c#5 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_main.c,v 1.35 2007/09/10 00:59:51 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_main.c,v 1.36 2007/09/11 23:49:27 kmacy Exp $"); #include #include @@ -1238,10 +1238,6 @@ u_int nq[2]; uint8_t cpus[SGE_QSETS + 1]; uint16_t rspq_map[RSS_TABLE_SIZE]; - - - if ((adap->flags & USING_MSIX) == 0) - return; for (i = 0; i < SGE_QSETS; ++i) cpus[i] = i; @@ -2557,7 +2553,7 @@ * Read 256 bytes at a time as len can be large and we don't * want to use huge intermediate buffers. */ - useraddr = (uint8_t *)(t + 1); /* advance to start of buffer */ + useraddr = (uint8_t *)t->buf; while (t->len) { unsigned int chunk = min(t->len, sizeof(buf)); ==== //depot/projects/toestack/sys/dev/cxgb/cxgb_multiq.c#3 (text+ko) ==== @@ -87,7 +87,7 @@ #endif extern struct sysctl_oid_list sysctl__hw_cxgb_children; -static int cxgb_pcpu_tx_coalesce = 1; +static int cxgb_pcpu_tx_coalesce = 0; TUNABLE_INT("hw.cxgb.tx_coalesce", &cxgb_pcpu_tx_coalesce); SYSCTL_UINT(_hw_cxgb, OID_AUTO, tx_coalesce, CTLFLAG_RDTUN, &cxgb_pcpu_tx_coalesce, 0, "coalesce small packets into a single work request"); @@ -383,12 +383,13 @@ } static int -cxgb_pcpu_reclaim_tx(struct sge_txq *txq) +cxgb_pcpu_reclaim_tx(struct sge_txq *txq, struct mbuf_head *mbq) { int reclaimable, total_reclaimed, reclaimed, freed, i, j, n; struct mbuf *m_vec[TX_CLEAN_MAX_DESC]; struct sge_qset *qs = txq_to_qset(txq, TXQ_ETH); - + + KASSERT(qs->qs_cpuid == curcpu, ("cpu qset mismatch cpuid=%d curcpu=%d", qs->qs_cpuid, curcpu)); @@ -398,12 +399,18 @@ total_reclaimed += reclaimed; - if (j > 10 || cxgb_debug) + if (j > 20 || cxgb_debug) printf("n=%d reclaimable=%d txq->processed=%d txq->cleaned=%d txq->in_use=%d\n", n, reclaimable, txq->processed, txq->cleaned, txq->in_use); - - for (i = 0; i < n; i++) - m_freem_vec(m_vec[i]); + + for (i = 0; i < n; i++) + prefetch(m_vec[i]); + /* + * really want to use an mbuf_ring here to avoid touching touching the mbufs + * when all we want to do is store them for later + */ + for (i = 0; i < n; i++) + mbufq_tail(mbq, m_vec[i]); freed += n; j++; @@ -418,14 +425,14 @@ } static int -cxgb_pcpu_start_(struct sge_qset *qs, struct mbuf *immpkt, int tx_flush) +cxgb_pcpu_start_(struct sge_qset *qs, struct mbuf *immpkt, int tx_flush, struct mbuf_head *mbq) { int i, err, initerr, flush, reclaimed, stopped; struct port_info *pi; struct sge_txq *txq; adapter_t *sc; uint32_t max_desc; - + pi = qs->port; initerr = err = i = reclaimed = 0; sc = pi->adapter; @@ -447,7 +454,7 @@ m_freem_vec(immpkt); return (initerr); } - + if ((tx_flush && (desc_reclaimable(txq) > 0)) || (desc_reclaimable(txq) > (TX_ETH_Q_SIZE>>1))) { int reclaimed = 0; @@ -457,7 +464,7 @@ qs->qs_cpuid, curcpu, desc_reclaimable(txq), txq, txq->cidx, txq->pidx); } - reclaimed = cxgb_pcpu_reclaim_tx(txq); + reclaimed = cxgb_pcpu_reclaim_tx(txq, mbq); if (cxgb_debug) printf("reclaimed=%d\n", reclaimed); } @@ -494,6 +501,8 @@ struct port_info *pi; struct sge_qset *qs; struct sge_txq *txq = NULL /* gcc is dumb */; + struct mbuf_head mbq; + struct mbuf *m; pi = ifp->if_softc; qs = NULL; @@ -508,10 +517,11 @@ qs = &pi->adapter->sge.qs[pi->first_qset]; txq = &qs->txq[TXQ_ETH]; - + + mbufq_init(&mbq); if (mtx_trylock(&txq->lock)) { txq->flags |= TXQ_TRANSMITTING; - err = cxgb_pcpu_start_(qs, immpkt, FALSE); + err = cxgb_pcpu_start_(qs, immpkt, FALSE, &mbq); txq->flags &= ~TXQ_TRANSMITTING; resid = (mbufq_len(&txq->sendq) > 128) || (desc_reclaimable(txq) > 128); mtx_unlock(&txq->lock); @@ -521,6 +531,21 @@ if (resid && (txq->flags & TXQ_TRANSMITTING) == 0) wakeup(qs); + critical_enter(); + /* + * Are we on a cpu with a service thread? + */ + if (curcpu < SGE_QSETS) { + qs = &pi->adapter->sge.qs[curcpu]; + txq = &qs->txq[TXQ_ETH]; + mbufq_append(&txq->cleanq, &mbq); + critical_exit(); + } else { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Sep 17 20:22:07 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EEF8B16A468; Mon, 17 Sep 2007 20:22:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C53CC16A419 for ; Mon, 17 Sep 2007 20:22:06 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CBECF13C45A for ; Mon, 17 Sep 2007 20:22:06 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8HKM6Xa077719 for ; Mon, 17 Sep 2007 20:22:06 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8HKM6Wi077716 for perforce@freebsd.org; Mon, 17 Sep 2007 20:22:06 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Sep 2007 20:22:06 GMT Message-Id: <200709172022.l8HKM6Wi077716@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126529 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 20:22:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=126529 Change 126529 by kmacy@kmacy_home:ethng on 2007/09/17 20:21:38 add cleanq for deferring frees until after the tx lock is dropped, makes tx performance more consistent but rate limits it somewhat in high pps contexts due to all buffer having the left the cache Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#17 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#17 (text+ko) ==== @@ -275,6 +275,11 @@ bus_dmamap_t desc_map; bus_dma_tag_t entry_tag; struct mbuf_head sendq; + /* + * cleanq should really be an mbuf_ring to avoid extra + * mbuf touches + */ + struct mbuf_head cleanq; struct mbuf_ring txq_mr; uint32_t txq_drops; uint32_t txq_skipped; From owner-p4-projects@FreeBSD.ORG Mon Sep 17 20:24:11 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D0C7316A41B; Mon, 17 Sep 2007 20:24:10 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A28D616A418 for ; Mon, 17 Sep 2007 20:24:10 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A9CB113C468 for ; Mon, 17 Sep 2007 20:24:10 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8HKOAxH077883 for ; Mon, 17 Sep 2007 20:24:10 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8HKOArC077880 for perforce@freebsd.org; Mon, 17 Sep 2007 20:24:10 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Sep 2007 20:24:10 GMT Message-Id: <200709172024.l8HKOArC077880@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126531 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 20:24:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=126531 Change 126531 by kmacy@kmacy:storage:toestack on 2007/09/17 20:23:46 IFC 126529 pull in missed changed to adapter structure and comment out MINCLSIZE until mbuf free optimization complete Affected files ... .. //depot/projects/toestack/sys/amd64/conf/MULTIQ#4 edit .. //depot/projects/toestack/sys/dev/cxgb/cxgb_adapter.h#5 integrate Differences ... ==== //depot/projects/toestack/sys/amd64/conf/MULTIQ#4 (text+ko) ==== @@ -214,5 +214,5 @@ options ALT_BREAK_TO_DEBUGGER #options LOCK_PROFILING options HWPMC_HOOKS -options MINCLSIZE 48 +#options MINCLSIZE 48 ==== //depot/projects/toestack/sys/dev/cxgb/cxgb_adapter.h#5 (text+ko) ==== @@ -275,6 +275,11 @@ bus_dmamap_t desc_map; bus_dma_tag_t entry_tag; struct mbuf_head sendq; + /* + * cleanq should really be an mbuf_ring to avoid extra + * mbuf touches + */ + struct mbuf_head cleanq; struct mbuf_ring txq_mr; uint32_t txq_drops; uint32_t txq_skipped; From owner-p4-projects@FreeBSD.ORG Mon Sep 17 20:40:32 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C75AF16A41B; Mon, 17 Sep 2007 20:40:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8120816A419 for ; Mon, 17 Sep 2007 20:40:31 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8749E13C459 for ; Mon, 17 Sep 2007 20:40:31 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8HKeV9Z078856 for ; Mon, 17 Sep 2007 20:40:31 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8HKeVcQ078853 for perforce@freebsd.org; Mon, 17 Sep 2007 20:40:31 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 17 Sep 2007 20:40:31 GMT Message-Id: <200709172040.l8HKeVcQ078853@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126532 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 20:40:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=126532 Change 126532 by kmacy@kmacy:storage:toestack on 2007/09/17 20:39:57 fix compile errors from IFC Affected files ... .. //depot/projects/toestack/sys/dev/cxgb/cxgb_main.c#6 edit .. //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.c#4 edit .. //depot/projects/toestack/sys/dev/cxgb/cxgb_sge.c#3 edit .. //depot/projects/toestack/sys/dev/cxgb/ulp/toecore/toedev.c#2 edit Differences ... ==== //depot/projects/toestack/sys/dev/cxgb/cxgb_main.c#6 (text+ko) ==== @@ -51,6 +51,7 @@ #include #include #include +#include #include #include ==== //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.c#4 (text+ko) ==== @@ -109,7 +109,7 @@ TAILQ_INSERT_TAIL(&client_list, client, client_entry); if (client->add) { - TAILQ_FOREACH(tdev, &ofld_dev_list, ofld_entry) { + TAILQ_FOREACH(tdev, &ofld_dev_list, entry) { if (offload_activated(tdev)) client->add(tdev); } @@ -133,7 +133,7 @@ TAILQ_REMOVE(&client_list, client, client_entry); if (client->remove) { - TAILQ_FOREACH(tdev, &ofld_dev_list, ofld_entry) { + TAILQ_FOREACH(tdev, &ofld_dev_list, entry) { if (offload_activated(tdev)) client->remove(tdev); } @@ -481,7 +481,7 @@ cxgb_set_dummy_ops(struct toedev *dev) { dev->recv = rx_offload_blackhole; - dev->neigh_update = dummy_neigh_update; + dev->arp_update = dummy_neigh_update; } /* @@ -1410,7 +1410,7 @@ TOE_DATA(dev) = t; dev->recv = process_rx; - dev->neigh_update = t3_l2t_update; + dev->arp_update = t3_l2t_update; #if 0 offload_proc_dev_setup(dev); #endif @@ -1460,7 +1460,7 @@ mtx_lock(&cxgb_db_lock); snprintf(tdev->name, sizeof(tdev->name), "ofld_dev%d", unit++); - TAILQ_INSERT_TAIL(&ofld_dev_list, tdev, ofld_entry); + TAILQ_INSERT_TAIL(&ofld_dev_list, tdev, entry); mtx_unlock(&cxgb_db_lock); } @@ -1468,7 +1468,7 @@ unregister_tdev(struct toedev *tdev) { mtx_lock(&cxgb_db_lock); - TAILQ_REMOVE(&ofld_dev_list, tdev, ofld_entry); + TAILQ_REMOVE(&ofld_dev_list, tdev, entry); mtx_unlock(&cxgb_db_lock); } @@ -1498,7 +1498,7 @@ offload_proc_dev_exit(tdev); #endif tdev->recv = NULL; - tdev->neigh_update = NULL; + tdev->arp_update = NULL; unregister_tdev(tdev); } @@ -1620,7 +1620,7 @@ len = sprintf(buf, "Device Interfaces\n"); mtx_lock(&cxgb_db_lock); - TAILQ_FOREACH(dev, &ofld_dev_list, ofld_entry) { + TAILQ_FOREACH(dev, &ofld_dev_list, entry) { len += sprintf(buf + len, "%-16s", dev->name); read_lock(&dev_base_lock); for (ndev = dev_base; ndev; ndev = ndev->next) { ==== //depot/projects/toestack/sys/dev/cxgb/cxgb_sge.c#3 (text+ko) ==== @@ -83,7 +83,7 @@ #define SGE_RX_SM_BUF_SIZE 1536 #define SGE_RX_DROP_THRES 16 -#define SGE_RX_COPY_THRES 128 +#define SGE_RX_COPY_THRES MHLEN /* * Period of the Tx buffer reclaim timer. This timer does not need to run @@ -135,17 +135,25 @@ struct tx_sw_desc { /* SW state per Tx descriptor */ struct mbuf *m[TX_WR_COUNT_MAX]; + int count; bus_dmamap_t map; int flags; }; struct rx_sw_desc { /* SW state per Rx descriptor */ - void *cl; - bus_dmamap_t map; - int flags; + union { + void *cl; + uint32_t *ref; + } u; + uint8_t *data; + bus_dmamap_t map; + int flags; }; +#define rxsd_cl u.cl +#define rxsd_ref u.ref + struct txq_state { unsigned int compl; unsigned int gen; @@ -356,8 +364,12 @@ memcpy(mtod(m, uint8_t *), resp->imm_data, len); break; case RSPQ_EOP: - memcpy(cl, resp->imm_data, len); - m_iovappend(m, cl, MSIZE, len, 0); + memcpy(cl, resp->imm_data, len); + /* + * XXX + */ + panic("bad append"); + m_iovappend(m, cl, MSIZE, len, 0, NULL); break; default: bogus_imm++; @@ -507,6 +519,7 @@ qs->rspq.polling = 0 /* p->polling */; } +#if !defined(__i386__) && !defined(__amd64__) static void refill_fl_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error) { @@ -517,7 +530,7 @@ cb_arg->nseg = nseg; } - +#endif /** * refill_fl - refill an SGE free-buffer list * @sc: the controller softc @@ -534,6 +547,7 @@ struct rx_desc *d = &q->desc[q->pidx]; struct refill_fl_cb_arg cb_arg; void *cl; + uint32_t *ref; int err; cb_arg.error = 0; @@ -541,10 +555,12 @@ /* * We only allocate a cluster, mbuf allocation happens after rx */ - if ((cl = m_cljget(NULL, M_DONTWAIT, q->buf_size)) == NULL) { + if ((cl = m_cljget(NULL, M_DONTWAIT, q->zone)) == NULL) { log(LOG_WARNING, "Failed to allocate cluster\n"); goto done; } + ref = cl; + if ((sd->flags & RX_SW_DESC_MAP_CREATED) == 0) { if ((err = bus_dmamap_create(q->entry_tag, 0, &sd->map))) { log(LOG_WARNING, "bus_dmamap_create failed %d\n", err); @@ -553,7 +569,8 @@ } sd->flags |= RX_SW_DESC_MAP_CREATED; } - err = bus_dmamap_load(q->entry_tag, sd->map, cl, q->buf_size, +#if !defined(__i386__) && !defined(__amd64__) + err = bus_dmamap_load(q->entry_tag, sd->map, (uint32_t *)cl + 1, q->buf_size, refill_fl_cb, &cb_arg, 0); if (err != 0 || cb_arg.error) { @@ -563,9 +580,12 @@ */ return; } - +#else + cb_arg.seg.ds_addr = pmap_kextract((vm_offset_t)((uint32_t *)cl + 1)); +#endif sd->flags |= RX_SW_DESC_INUSE; - sd->cl = cl; + sd->rxsd_cl = cl; + sd->data = (uint8_t *)(sd->rxsd_ref + 1); d->addr_lo = htobe32(cb_arg.seg.ds_addr & 0xffffffff); d->addr_hi = htobe32(((uint64_t)cb_arg.seg.ds_addr >>32) & 0xffffffff); d->len_gen = htobe32(V_FLD_GEN1(q->gen)); @@ -607,9 +627,9 @@ if (d->flags & RX_SW_DESC_INUSE) { bus_dmamap_unload(q->entry_tag, d->map); bus_dmamap_destroy(q->entry_tag, d->map); - uma_zfree(q->zone, d->cl); + uma_zfree(q->zone, d->rxsd_cl); } - d->cl = NULL; + d->rxsd_cl = NULL; if (++cidx == q->size) cidx = 0; } @@ -621,11 +641,17 @@ refill_fl(adap, fl, min(16U, fl->size - fl->credits)); } +static __inline void +__refill_fl_lt(adapter_t *adap, struct sge_fl *fl, int max) +{ + if ((fl->size - fl->credits) < max) + refill_fl(adap, fl, min(max, fl->size - fl->credits)); +} + void refill_fl_service(adapter_t *adap, struct sge_fl *fl) { - return; /* XXX no-op for now */ - __refill_fl(adap, fl); + __refill_fl_lt(adap, fl, 512); } #ifndef DISABLE_MBUF_IOVEC @@ -759,7 +785,7 @@ { adapter_t *sc = arg; #ifndef IFNET_MULTIQUEUE - struct port_info *p; + struct port_info *pi; struct sge_qset *qs; struct sge_txq *txq; int i, j; @@ -775,7 +801,7 @@ (qs->fl[1].credits < qs->fl[1].size)); if (reclaim_eth || reclaim_ofl || refill_rx) { p = &sc->port[i]; - taskqueue_enqueue(p->tq, &p->timer_reclaim_task); + taskqueue_enqueue(pi->tq, &pi->timer_reclaim_task); break; } } @@ -810,9 +836,9 @@ } int -t3_sge_init_port(struct port_info *p) +t3_sge_init_port(struct port_info *pi) { - TASK_INIT(&p->timer_reclaim_task, 0, sge_timer_reclaim, p); + TASK_INIT(&pi->timer_reclaim_task, 0, sge_timer_reclaim, pi); return (0); } @@ -852,9 +878,9 @@ { int reclaimable, i, n; struct mbuf *m_vec[TX_CLEAN_MAX_DESC]; - struct port_info *p; + struct port_info *pi; - p = txq->port; + pi = txq->port; reclaim_more: n = 0; reclaimable = desc_reclaimable(txq); @@ -868,11 +894,11 @@ for (i = 0; i < n; i++) { m_freem_vec(m_vec[i]); } - if (p && p->ifp->if_drv_flags & IFF_DRV_OACTIVE && + if (pi && pi->ifp->if_drv_flags & IFF_DRV_OACTIVE && txq->size - txq->in_use >= TX_START_MAX_DESC) { txq_fills++; - p->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - taskqueue_enqueue(p->tq, &p->start_task); + pi->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + taskqueue_enqueue(pi->tq, &pi->start_task); } if (n) @@ -890,9 +916,9 @@ static void sge_timer_reclaim(void *arg, int ncount) { - struct port_info *p = arg; - int i, nqsets = p->nqsets; - adapter_t *sc = p->adapter; + struct port_info *pi = arg; + int i, nqsets = pi->nqsets; + adapter_t *sc = pi->adapter; struct sge_qset *qs; struct sge_txq *txq; struct mtx *lock; @@ -1231,7 +1257,6 @@ #define GET_VTAG(cntrl, m) #endif - int t3_encap(struct sge_qset *qs, struct mbuf **m, int count, int *free) { @@ -1239,7 +1264,7 @@ struct mbuf *m0; struct sge_txq *txq; struct txq_state txqs; - struct port_info *p; + struct port_info *pi; unsigned int ndesc, flits, cntrl, mlen; int err, nsegs, tso_info = 0; @@ -1250,25 +1275,26 @@ uint32_t wr_hi, wr_lo, sgl_flits; struct tx_desc *txd; - DPRINTF("t3_encap port_id=%d qsidx=%d ", p->port_id, p->first_qset); + #if defined(IFNET_MULTIQUEUE) && defined(STRICT_AFFINITY) KASSERT(qs->qs_cpuid == curcpu, ("cpu qset mismatch cpuid=%d curcpu=%d", qs->qs_cpuid, curcpu)); #endif DPRINTF("t3_encap cpu=%d ", curcpu); - p = qs->port; - sc = p->adapter; + pi = qs->port; + sc = pi->adapter; txq = &qs->txq[TXQ_ETH]; txsd = &txq->sdesc[txq->pidx]; txd = &txq->desc[txq->pidx]; - DPRINTF("mlen=%d txpkt_intf=%d tx_chan=%d\n", mlen, p->txpkt_intf, p->tx_chan); + DPRINTF("t3_encap port_id=%d qsidx=%d ", pi->port_id, pi->first_qset); + DPRINTF("mlen=%d txpkt_intf=%d tx_chan=%d\n", m[0]->m_pkthdr.len, pi->txpkt_intf, pi->tx_chan); /* * XXX handle checksum, TSO, and VLAN here * */ - cntrl = V_TXPKT_INTF(p->txpkt_intf); + cntrl = V_TXPKT_INTF(pi->txpkt_intf); /* * XXX need to add VLAN support for 6.x @@ -1291,7 +1317,7 @@ for (i = 0; i < count; i++) { struct cpl_tx_pkt_batch_entry *cbe = &cpl_batch->pkt_entry[i]; - cntrl = V_TXPKT_INTF(p->port_id); + cntrl = V_TXPKT_INTF(pi->txpkt_intf); GET_VTAG(cntrl, m[i]); cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT) | (1 << 24); cbe->cntrl = htonl(cntrl); @@ -1370,7 +1396,6 @@ memcpy(&txd->flit[2], mtod(m0, uint8_t *), mlen); else m_copydata(m0, 0, mlen, (caddr_t)&txd->flit[2]); - *free = 1; flits = (mlen + 7) / 8 + 2; cpl->wr.wr_hi = htonl(V_WR_BCNTLFLT(mlen & 7) | @@ -1409,7 +1434,7 @@ m_set_priority(m0, txqs.pidx); write_wr_hdr_sgl(ndesc, txd, &txqs, txq, sgl, flits, sgl_flits, wr_hi, wr_lo); - check_ring_tx_db(p->adapter, txq); + check_ring_tx_db(pi->adapter, txq); return (0); } @@ -1779,7 +1804,7 @@ { struct tx_sw_desc *txsd; unsigned int cidx; - int i, reclaimed, nbufs; + int i, iter, reclaimed, nbufs; #ifdef T3_TRACE T3_TRACE2(sc->tb[q->cntxt_id & 7], @@ -1787,10 +1812,16 @@ #endif cidx = q->cidx; txsd = &q->sdesc[cidx]; + prefetch(txsd); reclaimed = nbufs = 0; - - for (reclaimed = 0; reclaimed < reclaimable;) { - DPRINTF("cidx=%d d=%p\n", cidx, d); + for (iter = reclaimed = 0; reclaimed < reclaimable; iter++) { + if ((iter & 0x1) == 0) { + prefetch(txsd + 1); + prefetch(txsd + 2); + prefetch(txsd + 3); + prefetch(txsd + 4); + } + DPRINTF("cidx=%d d=%p\n", cidx, txsd); if (txsd->count > 0) { if (nbufs + txsd->count > m_vec_size) break; @@ -1798,13 +1829,17 @@ bus_dmamap_unload(q->entry_tag, txsd->map); txsd->flags &= ~TX_SW_DESC_MAPPED; } - if (m_get_priority(txsd->m[0]) == cidx) { - for (i = 0; i < txsd->count; i++, nbufs++) - m_vec[nbufs] = txsd->m[i]; - txsd->count = 0; - } else { + for (i = 0; i < txsd->count; i++, nbufs++) { + prefetch(txsd->m[i]); + m_vec[nbufs] = txsd->m[i]; + } + txsd->count = 0; + +#ifdef DIAGNOSTIC + if (m_get_priority(txsd->m[0]) != cidx) printf("pri=%d cidx=%d\n", (int)m_get_priority(txsd->m[0]), cidx); - } +#endif + } else q->txq_skipped++; @@ -2254,13 +2289,18 @@ q->txq[TXQ_ETH].stop_thres = nports * flits_to_desc(sgl_len(TX_MAX_SEGS + 1) + 3); - q->fl[0].buf_size = MCLBYTES; + q->fl[0].buf_size = MCLBYTES - sizeof(uint32_t); q->fl[0].zone = zone_clust; q->fl[0].type = EXT_CLUSTER; - q->fl[1].buf_size = MJUMPAGESIZE; - q->fl[1].zone = zone_jumbop; - q->fl[1].type = EXT_JUMBOP; - + if (jumbo_phys_contig) { + q->fl[1].buf_size = MJUM9BYTES - sizeof(uint32_t); + q->fl[1].zone = zone_jumbo9; + q->fl[1].type = EXT_JUMBO9; + } else { + q->fl[1].buf_size = MJUMPAGESIZE - sizeof(uint32_t); + q->fl[1].zone = zone_jumbop; + q->fl[1].type = EXT_JUMBOP; + } q->lro.enabled = lro_default; mtx_lock(&sc->sge.reg_lock); @@ -2372,7 +2412,9 @@ /* * adjust after conversion to mbuf chain */ - m_adj(m, sizeof(*cpl) + ethpad); + m->m_pkthdr.len -= (sizeof(*cpl) + ethpad); + m->m_len -= (sizeof(*cpl) + ethpad); + m->m_data += (sizeof(*cpl) + ethpad); (*ifp->if_input)(ifp, m); } @@ -2406,17 +2448,24 @@ uint32_t len = G_RSPD_LEN(len_cq); uint32_t flags = ntohl(r->flags); uint8_t sopeop = G_RSPD_SOP_EOP(flags); + uint32_t *ref; int ret = 0; - prefetch(sd->cl); + prefetch(sd->rxsd_cl); fl->credits--; bus_dmamap_sync(fl->entry_tag, sd->map, BUS_DMASYNC_POSTREAD); bus_dmamap_unload(fl->entry_tag, sd->map); - m_cljset(m, sd->cl, fl->type); + ref = sd->rxsd_ref; + m_cljset(m, sd->rxsd_cl, fl->type, sd->rxsd_ref); + *ref = 1; m->m_len = len; - + /* + * bump past the refcnt address + */ + m->m_data = sd->data; + switch(sopeop) { case RSPQ_SOP_EOP: DBG(DBG_RX, ("get_packet: SOP-EOP m %p\n", m)); @@ -2474,9 +2523,11 @@ uint32_t flags = ntohl(r->flags); uint8_t sopeop = G_RSPD_SOP_EOP(flags); void *cl; + uint32_t *ref = NULL; int ret = 0; - - prefetch(sd->cl); + + prefetch((sd + 1)->rxsd_cl); + prefetch((sd + 2)->rxsd_cl); DPRINTF("rx cpu=%d\n", curcpu); fl->credits--; @@ -2484,17 +2535,22 @@ if (recycle_enable && len <= SGE_RX_COPY_THRES && sopeop == RSPQ_SOP_EOP) { cl = mtod(m, void *); - memcpy(cl, sd->cl, len); + memcpy(cl, sd->data, len); recycle_rx_buf(adap, fl, fl->cidx); } else { - cl = sd->cl; bus_dmamap_unload(fl->entry_tag, sd->map); + cl = sd->rxsd_cl; + ref = sd->rxsd_ref; } + switch(sopeop) { case RSPQ_SOP_EOP: DBG(DBG_RX, ("get_packet: SOP-EOP m %p\n", m)); - if (cl == sd->cl) - m_cljset(m, cl, fl->type); + if (cl == sd->rxsd_cl) { + m_cljset(m, cl, fl->type, ref); + *ref = 1; + m->m_data = sd->data; + } m->m_len = m->m_pkthdr.len = len; ret = 1; goto done; @@ -2513,8 +2569,8 @@ ret = 1; break; } - m_iovappend(m, cl, fl->buf_size, len, 0); - + m_iovappend(m, cl, fl->buf_size, len, sizeof(uint32_t), ref); + *ref = 1; done: if (++fl->cidx == fl->size) fl->cidx = 0; @@ -2710,7 +2766,7 @@ if (eop) { prefetch(mtod(rspq->rspq_mh.mh_head, uint8_t *)); - prefetch(mtod(rspq->rspq_mh.mh_head, uint8_t *) + L1_CACHE_BYTES); + prefetch(mtod(rspq->rspq_mh.mh_head, uint8_t *) + L1_CACHE_BYTES); if (eth) { t3_rx_eth_lro(adap, rspq, rspq->rspq_mh.mh_head, ethpad, @@ -2727,10 +2783,10 @@ ngathered = rx_offload(&adap->tdev, rspq, rspq->rspq_mh.mh_head, offload_mbufs, ngathered); } - __refill_fl(adap, &qs->fl[0]); - __refill_fl(adap, &qs->fl[1]); } + __refill_fl_lt(adap, &qs->fl[0], 32); + __refill_fl_lt(adap, &qs->fl[1], 32); --budget_left; } @@ -2744,6 +2800,8 @@ if (__predict_false(qs->txq_stopped != 0)) restart_tx(qs); + __refill_fl_lt(adap, &qs->fl[0], 512); + __refill_fl_lt(adap, &qs->fl[1], 512); budget -= budget_left; return (budget); } ==== //depot/projects/toestack/sys/dev/cxgb/ulp/toecore/toedev.c#2 (text+ko) ==== @@ -38,6 +38,7 @@ #include #include #include +#include #include #include From owner-p4-projects@FreeBSD.ORG Mon Sep 17 22:28:31 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 25FE916A41B; Mon, 17 Sep 2007 22:28:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B822416A41A for ; Mon, 17 Sep 2007 22:28:30 +0000 (UTC) (envelope-from zec@icir.org) Received: from xaqua.tel.fer.hr (xaqua.tel.fer.hr [161.53.19.25]) by mx1.freebsd.org (Postfix) with ESMTP id 6139813C474 for ; Mon, 17 Sep 2007 22:28:30 +0000 (UTC) (envelope-from zec@icir.org) Received: by xaqua.tel.fer.hr (Postfix, from userid 20006) id 194A39B645; Tue, 18 Sep 2007 00:28:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on xaqua.tel.fer.hr X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.7 Received: from localhost (imunes.tel.fer.hr [161.53.19.8]) by xaqua.tel.fer.hr (Postfix) with ESMTP id A8BBA9B644; Tue, 18 Sep 2007 00:28:27 +0200 (CEST) From: Marko Zec To: "Kip Macy" Date: Tue, 18 Sep 2007 00:28:23 +0200 User-Agent: KMail/1.9.7 References: <200708212351.l7LNpi6Q006480@repoman.freebsd.org> <46EED397.3040700@elischer.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200709180028.24481.zec@icir.org> Cc: Perforce Change Reviews , Julian Elischer Subject: Re: PERFORCE change 125520 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 22:28:31 -0000 On Monday 17 September 2007 21:43:50 Kip Macy wrote: > On 9/17/07, Julian Elischer wrote: > > Marko Zec wrote: > > > On Monday 17 September 2007 20:03:59 Julian Elischer wrote: > > >> Marko Zec wrote: > > >>> http://perforce.freebsd.org/chv.cgi?CH=125520 > > >>> > > >>> Change 125520 by zec@zec_tpx32 on 2007/08/21 23:51:39 > > >>> > > >>> Given that ng_pipe nodes can be connected into arbitrary > > >>> topologies, and therefore it is possible for ngp_rcvdata() > > >>> to be recursively called from a single thread, it is > > >>> necessary to explicitly allow for the ng_pipe_giant mutex > > >>> to be recursively acquireable. > > >> > > >> OR use a different locking scheme. > > > > > > That's right, but I'm just wondering is there anything > > > fundamentally wrong with lock recursing (both in general as well > > > as in this particular case)? > > > > we are trying as a general rule trying to keep lock recursion to an > > absolute minimum. It can make debugging other things very hard. and > > can introduce bugs that are hard to find.. > > > > Generally a bad idea. If you don't know you are recursing, how can > > you avoid the problems you don't know about? (sounds silly but..) > > Just to add my 0.02$ from recent experiences ... > Lock recursion creates the following problems: > - lock is often held much longer than it really needs to be > - it is no longer possible from code inspection to determine > where the lock is or is not held > - it makes it near impossible to mix shared and exclusive access > to a lock, acquiring an exclusive lock that you already hold shared > results in a deadlock and vice versa > - it makes lock ordering more complicated to infer and work with > > So ... from code reading experience recently recursive locks are > typically needed for code where the control flow pre-dates any > thoughts of locking. ...which precisely might often be the case with netgraph, where it is impossible to know beforehand how the interconnection topology would look like, nor can it be always determined upfront which paths through the topology (i.e. translating to a call graph) would or would not be taken. Anyhow, point taken. Though given that ng_pipe is not really a critical part of our infrastructure, but more like a toy I'm occassionaly playing with, I'll take some time before more thoroughly thinking of and implementing an alternative locking scheme. Marko > -Kip > > > > Marko > > > > > >> i.e. reference counts or something. > > >> > > >>> Affected files ... > > >>> > > >>> .. //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 edit > > >>> > > >>> Differences ... > > >>> > > >>> ==== //depot/projects/vimage/src/sys/netgraph/ng_pipe.c#2 > > >>> (text+ko) ==== > > >>> > > >>> @@ -1028,7 +1028,7 @@ > > >>> error = EEXIST; > > >>> else { > > >>> mtx_init(&ng_pipe_giant, "ng_pipe_giant", > > >>> NULL, - MTX_DEF); > > >>> + MTX_DEF | MTX_RECURSE); > > >>> LIST_INIT(&node_head); > > >>> LIST_INIT(&hook_head); > > >>> ds_handle = timeout((timeout_t *) > > >>> &pipe_scheduler, From owner-p4-projects@FreeBSD.ORG Mon Sep 17 22:37:13 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F225416A41B; Mon, 17 Sep 2007 22:37:12 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4D0516A417 for ; Mon, 17 Sep 2007 22:37:12 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A994C13C457 for ; Mon, 17 Sep 2007 22:37:12 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8HMbClT019049 for ; Mon, 17 Sep 2007 22:37:12 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8HMb8HS019044 for perforce@freebsd.org; Mon, 17 Sep 2007 22:37:08 GMT (envelope-from peter@freebsd.org) Date: Mon, 17 Sep 2007 22:37:08 GMT Message-Id: <200709172237.l8HMb8HS019044@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 126540 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 22:37:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=126540 Change 126540 by peter@peter_daintree on 2007/09/17 22:36:51 IFC @126539 Affected files ... .. //depot/projects/hammer/ObsoleteFiles.inc#34 integrate .. //depot/projects/hammer/bin/ps/print.c#16 integrate .. //depot/projects/hammer/bin/ps/ps.c#20 integrate .. //depot/projects/hammer/contrib/less/main.c#8 integrate .. //depot/projects/hammer/etc/defaults/rc.conf#78 integrate .. //depot/projects/hammer/etc/rc.d/Makefile#54 integrate .. //depot/projects/hammer/etc/rc.d/ftp-proxy#1 branch .. //depot/projects/hammer/etc/rc.d/lockd#3 integrate .. //depot/projects/hammer/etc/services#15 integrate .. //depot/projects/hammer/lib/libc/net/getaddrinfo.c#32 integrate .. //depot/projects/hammer/lib/libc/stdlib/getenv.c#6 integrate .. //depot/projects/hammer/lib/libc/sys/Makefile.inc#29 integrate .. //depot/projects/hammer/lib/libc/sys/kqueue.2#12 integrate .. //depot/projects/hammer/lib/libc/sys/ntp_adjtime.2#4 integrate .. //depot/projects/hammer/lib/libc/sys/ntp_gettime.2#5 delete .. //depot/projects/hammer/lib/libelf/elf_update.3#2 integrate .. //depot/projects/hammer/lib/libelf/elf_update.c#2 integrate .. //depot/projects/hammer/lib/libelf/libelf_convert.m4#2 integrate .. //depot/projects/hammer/lib/libkvm/kvm_proc.c#35 integrate .. //depot/projects/hammer/lib/libutil/Makefile#16 integrate .. //depot/projects/hammer/lib/libutil/expand_number.3#1 branch .. //depot/projects/hammer/lib/libutil/expand_number.c#1 branch .. //depot/projects/hammer/lib/libutil/humanize_number.3#7 integrate .. //depot/projects/hammer/lib/libutil/libutil.h#8 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/article.sgml#6 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/relnotes/article.sgml#18 integrate .. //depot/projects/hammer/release/doc/share/misc/dev.archlist.txt#46 integrate .. //depot/projects/hammer/sbin/camcontrol/Makefile#7 integrate .. //depot/projects/hammer/sbin/camcontrol/camcontrol.8#9 integrate .. //depot/projects/hammer/sbin/camcontrol/camcontrol.c#10 integrate .. //depot/projects/hammer/sbin/geom/class/eli/geli.8#9 integrate .. //depot/projects/hammer/sbin/ipfw/ipfw2.c#57 integrate .. //depot/projects/hammer/sbin/quotacheck/preen.c#5 integrate .. //depot/projects/hammer/sbin/quotacheck/quotacheck.c#12 integrate .. //depot/projects/hammer/share/examples/cvsup/cvs-supfile#11 integrate .. //depot/projects/hammer/share/examples/cvsup/doc-supfile#4 integrate .. //depot/projects/hammer/share/examples/cvsup/gnats-supfile#4 integrate .. //depot/projects/hammer/share/examples/cvsup/ports-supfile#13 integrate .. //depot/projects/hammer/share/examples/cvsup/stable-supfile#7 integrate .. //depot/projects/hammer/share/examples/cvsup/standard-supfile#5 integrate .. //depot/projects/hammer/share/examples/cvsup/www-supfile#4 integrate .. //depot/projects/hammer/share/man/man4/Makefile#96 integrate .. //depot/projects/hammer/share/man/man4/ata.4#30 integrate .. //depot/projects/hammer/share/man/man4/if_bridge.4#15 integrate .. //depot/projects/hammer/share/man/man4/ral.4#11 integrate .. //depot/projects/hammer/share/man/man4/rum.4#3 integrate .. //depot/projects/hammer/share/man/man4/snd_emu10kx.4#2 integrate .. //depot/projects/hammer/share/man/man4/ural.4#12 integrate .. //depot/projects/hammer/share/man/man4/wlan.4#10 integrate .. //depot/projects/hammer/share/man/man4/wlan_amrr.4#2 integrate .. //depot/projects/hammer/share/man/man4/zyd.4#1 branch .. //depot/projects/hammer/share/man/man5/Makefile#23 integrate .. //depot/projects/hammer/share/man/man5/ar.5#1 branch .. //depot/projects/hammer/share/man/man5/elf.5#12 integrate .. //depot/projects/hammer/share/man/man5/rc.conf.5#81 integrate .. //depot/projects/hammer/share/man/man5/src.conf.5#11 integrate .. //depot/projects/hammer/share/man/man9/Makefile#70 integrate .. //depot/projects/hammer/share/man/man9/suser.9#13 integrate .. //depot/projects/hammer/share/misc/committers-ports.dot#5 integrate .. //depot/projects/hammer/sys/amd64/amd64/genassym.c#47 integrate .. //depot/projects/hammer/sys/amd64/amd64/local_apic.c#77 integrate .. //depot/projects/hammer/sys/amd64/amd64/uma_machdep.c#5 integrate .. //depot/projects/hammer/sys/amd64/isa/clock.c#64 integrate .. //depot/projects/hammer/sys/amd64/linux32/linux32_proto.h#12 integrate .. //depot/projects/hammer/sys/amd64/linux32/linux32_syscall.h#12 integrate .. //depot/projects/hammer/sys/amd64/linux32/linux32_sysent.c#12 integrate .. //depot/projects/hammer/sys/amd64/linux32/syscalls.master#12 integrate .. //depot/projects/hammer/sys/arm/arm/vm_machdep.c#27 integrate .. //depot/projects/hammer/sys/arm/at91/at91_mci.c#3 integrate .. //depot/projects/hammer/sys/arm/at91/at91_pmc.c#4 integrate .. //depot/projects/hammer/sys/arm/include/endian.h#11 integrate .. //depot/projects/hammer/sys/arm/sa11x0/uart_dev_sa1110.c#7 integrate .. //depot/projects/hammer/sys/arm/xscale/i80321/i80321.c#7 integrate .. //depot/projects/hammer/sys/compat/freebsd32/freebsd32_misc.c#51 integrate .. //depot/projects/hammer/sys/compat/linux/linux_misc.c#42 integrate .. //depot/projects/hammer/sys/conf/NOTES#126 integrate .. //depot/projects/hammer/sys/conf/options#114 integrate .. //depot/projects/hammer/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c#3 integrate .. //depot/projects/hammer/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#5 integrate .. //depot/projects/hammer/sys/ddb/db_ps.c#20 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi.c#78 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_cpu.c#38 integrate .. //depot/projects/hammer/sys/dev/an/if_an.c#36 integrate .. //depot/projects/hammer/sys/dev/ata/ata-chipset.c#79 integrate .. //depot/projects/hammer/sys/dev/ata/ata-pci.h#48 integrate .. //depot/projects/hammer/sys/dev/ath/ath_rate/sample/sample.c#11 integrate .. //depot/projects/hammer/sys/dev/ath/if_ath.c#55 integrate .. //depot/projects/hammer/sys/dev/awi/awi.c#21 integrate .. //depot/projects/hammer/sys/dev/cxgb/common/cxgb_common.h#5 integrate .. //depot/projects/hammer/sys/dev/cxgb/common/cxgb_ctl_defs.h#3 integrate .. //depot/projects/hammer/sys/dev/cxgb/common/cxgb_sge_defs.h#3 integrate .. //depot/projects/hammer/sys/dev/cxgb/common/cxgb_t3_hw.c#6 integrate .. //depot/projects/hammer/sys/dev/cxgb/common/cxgb_vsc7323.c#3 integrate .. //depot/projects/hammer/sys/dev/cxgb/common/cxgb_xgmac.c#5 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_adapter.h#10 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_include.h#2 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_main.c#10 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_offload.h#5 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_osdep.h#5 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_sge.c#11 integrate .. //depot/projects/hammer/sys/dev/cxgb/t3fw-4.5.0.bin.gz.uu#2 delete .. //depot/projects/hammer/sys/dev/cxgb/t3fw-4.7.0.bin.gz.uu#1 branch .. //depot/projects/hammer/sys/dev/em/if_em.c#69 integrate .. //depot/projects/hammer/sys/dev/em/if_em.h#33 integrate .. //depot/projects/hammer/sys/dev/ipw/if_ipw.c#20 integrate .. //depot/projects/hammer/sys/dev/isp/isp_freebsd.h#23 integrate .. //depot/projects/hammer/sys/dev/iwi/if_iwi.c#25 integrate .. //depot/projects/hammer/sys/dev/ixgbe/ixgbe.c#2 integrate .. //depot/projects/hammer/sys/dev/ixgbe/ixgbe.h#2 integrate .. //depot/projects/hammer/sys/dev/ixgbe/ixgbe_82598.c#2 integrate .. //depot/projects/hammer/sys/dev/ixgbe/ixgbe_api.c#2 integrate .. //depot/projects/hammer/sys/dev/ixgbe/ixgbe_api.h#2 integrate .. //depot/projects/hammer/sys/dev/ixgbe/ixgbe_common.c#2 integrate .. //depot/projects/hammer/sys/dev/ixgbe/ixgbe_common.h#2 integrate .. //depot/projects/hammer/sys/dev/ixgbe/ixgbe_osdep.h#2 integrate .. //depot/projects/hammer/sys/dev/ixgbe/ixgbe_phy.c#2 integrate .. //depot/projects/hammer/sys/dev/ixgbe/ixgbe_phy.h#2 integrate .. //depot/projects/hammer/sys/dev/ixgbe/ixgbe_type.h#2 integrate .. //depot/projects/hammer/sys/dev/mxge/if_mxge.c#12 integrate .. //depot/projects/hammer/sys/dev/mxge/if_mxge_var.h#8 integrate .. //depot/projects/hammer/sys/dev/nfe/if_nfe.c#6 integrate .. //depot/projects/hammer/sys/dev/ral/rt2560.c#10 integrate .. //depot/projects/hammer/sys/dev/ral/rt2661.c#9 integrate .. //depot/projects/hammer/sys/dev/ray/if_ray.c#25 integrate .. //depot/projects/hammer/sys/dev/sound/pci/emu10kx-midi.c#2 integrate .. //depot/projects/hammer/sys/dev/sound/pci/emu10kx-pcm.c#6 integrate .. //depot/projects/hammer/sys/dev/sound/pci/emu10kx.c#5 integrate .. //depot/projects/hammer/sys/dev/sound/pci/emu10kx.h#2 integrate .. //depot/projects/hammer/sys/dev/usb/if_rum.c#3 integrate .. //depot/projects/hammer/sys/dev/usb/if_ural.c#25 integrate .. //depot/projects/hammer/sys/dev/usb/if_zyd.c#1 branch .. //depot/projects/hammer/sys/dev/usb/if_zydfw.h#1 branch .. //depot/projects/hammer/sys/dev/usb/if_zydreg.h#1 branch .. //depot/projects/hammer/sys/dev/usb/usbdevs#85 integrate .. //depot/projects/hammer/sys/dev/wi/if_wi.c#55 integrate .. //depot/projects/hammer/sys/fs/msdosfs/direntry.h#8 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_conv.c#16 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_lookup.c#12 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_vnops.c#31 integrate .. //depot/projects/hammer/sys/fs/procfs/procfs_status.c#18 integrate .. //depot/projects/hammer/sys/geom/eli/g_eli.h#8 integrate .. //depot/projects/hammer/sys/geom/eli/g_eli_crypto.c#5 integrate .. //depot/projects/hammer/sys/i386/acpica/madt.c#22 integrate .. //depot/projects/hammer/sys/i386/i386/genassym.c#21 integrate .. //depot/projects/hammer/sys/i386/i386/local_apic.c#34 integrate .. //depot/projects/hammer/sys/i386/isa/isa.c#10 integrate .. //depot/projects/hammer/sys/i386/linux/linux_proto.h#23 integrate .. //depot/projects/hammer/sys/i386/linux/linux_ptrace.c#12 integrate .. //depot/projects/hammer/sys/i386/linux/linux_syscall.h#23 integrate .. //depot/projects/hammer/sys/i386/linux/linux_sysent.c#24 integrate .. //depot/projects/hammer/sys/i386/linux/syscalls.master#23 integrate .. //depot/projects/hammer/sys/ia64/ia64/uma_machdep.c#4 integrate .. //depot/projects/hammer/sys/kern/init_main.c#45 integrate .. //depot/projects/hammer/sys/kern/kern_acct.c#29 integrate .. //depot/projects/hammer/sys/kern/kern_clock.c#40 integrate .. //depot/projects/hammer/sys/kern/kern_fork.c#62 integrate .. //depot/projects/hammer/sys/kern/kern_kse.c#37 integrate .. //depot/projects/hammer/sys/kern/kern_ktrace.c#32 integrate .. //depot/projects/hammer/sys/kern/kern_proc.c#58 integrate .. //depot/projects/hammer/sys/kern/kern_switch.c#56 integrate .. //depot/projects/hammer/sys/kern/kern_synch.c#61 integrate .. //depot/projects/hammer/sys/kern/kern_sysctl.c#32 integrate .. //depot/projects/hammer/sys/kern/kern_thread.c#97 integrate .. //depot/projects/hammer/sys/kern/kern_timeout.c#25 integrate .. //depot/projects/hammer/sys/kern/sched_4bsd.c#50 integrate .. //depot/projects/hammer/sys/kern/sched_ule.c#81 integrate .. //depot/projects/hammer/sys/kern/subr_kdb.c#20 integrate .. //depot/projects/hammer/sys/kern/subr_lock.c#7 integrate .. //depot/projects/hammer/sys/kern/subr_sleepqueue.c#25 integrate .. //depot/projects/hammer/sys/kern/subr_smp.c#31 integrate .. //depot/projects/hammer/sys/kern/subr_trap.c#39 integrate .. //depot/projects/hammer/sys/kern/sys_process.c#40 integrate .. //depot/projects/hammer/sys/kern/uipc_syscalls.c#65 integrate .. //depot/projects/hammer/sys/kern/vfs_mount.c#81 integrate .. //depot/projects/hammer/sys/kern/vfs_subr.c#115 integrate .. //depot/projects/hammer/sys/kern/vfs_syscalls.c#73 integrate .. //depot/projects/hammer/sys/modules/cxgb/Makefile#6 integrate .. //depot/projects/hammer/sys/modules/ixgbe/Makefile#1 branch .. //depot/projects/hammer/sys/modules/sound/driver/emu10kx/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/zyd/Makefile#1 branch .. //depot/projects/hammer/sys/net/bpf.c#51 integrate .. //depot/projects/hammer/sys/net/bpf_filter.c#7 integrate .. //depot/projects/hammer/sys/net/if_bridge.c#35 integrate .. //depot/projects/hammer/sys/net/if_ethersubr.c#66 integrate .. //depot/projects/hammer/sys/net/if_lagg.c#7 integrate .. //depot/projects/hammer/sys/net/rtsock.c#34 integrate .. //depot/projects/hammer/sys/net80211/_ieee80211.h#11 integrate .. //depot/projects/hammer/sys/net80211/ieee80211.h#13 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_freebsd.c#13 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_freebsd.h#12 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_ht.c#2 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_ht.h#2 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_input.c#39 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_ioctl.c#34 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_ioctl.h#18 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_node.c#41 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_node.h#23 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_output.c#30 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_power.c#2 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_proto.c#29 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_proto.h#18 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_regdomain.c#2 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_var.h#30 integrate .. //depot/projects/hammer/sys/netgraph/ng_ppp.c#20 integrate .. //depot/projects/hammer/sys/netinet/ip_fw2.c#86 integrate .. //depot/projects/hammer/sys/netinet/sctp.h#8 integrate .. //depot/projects/hammer/sys/netinet/sctp_asconf.c#13 integrate .. //depot/projects/hammer/sys/netinet/sctp_asconf.h#7 integrate .. //depot/projects/hammer/sys/netinet/sctp_auth.c#10 integrate .. //depot/projects/hammer/sys/netinet/sctp_bsd_addr.c#7 integrate .. //depot/projects/hammer/sys/netinet/sctp_cc_functions.c#2 integrate .. //depot/projects/hammer/sys/netinet/sctp_cc_functions.h#2 integrate .. //depot/projects/hammer/sys/netinet/sctp_constants.h#12 integrate .. //depot/projects/hammer/sys/netinet/sctp_indata.c#14 integrate .. //depot/projects/hammer/sys/netinet/sctp_input.c#14 integrate .. //depot/projects/hammer/sys/netinet/sctp_lock_bsd.h#6 integrate .. //depot/projects/hammer/sys/netinet/sctp_os_bsd.h#13 integrate .. //depot/projects/hammer/sys/netinet/sctp_output.c#14 integrate .. //depot/projects/hammer/sys/netinet/sctp_output.h#7 integrate .. //depot/projects/hammer/sys/netinet/sctp_pcb.c#14 integrate .. //depot/projects/hammer/sys/netinet/sctp_pcb.h#11 integrate .. //depot/projects/hammer/sys/netinet/sctp_peeloff.c#10 integrate .. //depot/projects/hammer/sys/netinet/sctp_structs.h#12 integrate .. //depot/projects/hammer/sys/netinet/sctp_sysctl.c#9 integrate .. //depot/projects/hammer/sys/netinet/sctp_sysctl.h#7 integrate .. //depot/projects/hammer/sys/netinet/sctp_timer.c#13 integrate .. //depot/projects/hammer/sys/netinet/sctp_timer.h#6 integrate .. //depot/projects/hammer/sys/netinet/sctp_uio.h#10 integrate .. //depot/projects/hammer/sys/netinet/sctp_usrreq.c#14 integrate .. //depot/projects/hammer/sys/netinet/sctp_var.h#9 integrate .. //depot/projects/hammer/sys/netinet/sctputil.c#16 integrate .. //depot/projects/hammer/sys/netinet/sctputil.h#11 integrate .. //depot/projects/hammer/sys/netinet/tcp_input.c#79 integrate .. //depot/projects/hammer/sys/netinet/tcp_subr.c#74 integrate .. //depot/projects/hammer/sys/netinet/tcp_timer.c#28 integrate .. //depot/projects/hammer/sys/netinet/tcp_timer.h#14 integrate .. //depot/projects/hammer/sys/netinet/tcp_usrreq.c#49 integrate .. //depot/projects/hammer/sys/netinet/tcp_var.h#47 integrate .. //depot/projects/hammer/sys/netinet/udp_usrreq.c#50 integrate .. //depot/projects/hammer/sys/netinet6/sctp6_usrreq.c#14 integrate .. //depot/projects/hammer/sys/netinet6/sctp6_var.h#7 integrate .. //depot/projects/hammer/sys/netinet6/udp6_usrreq.c#31 integrate .. //depot/projects/hammer/sys/netipsec/ipsec_input.c#13 integrate .. //depot/projects/hammer/sys/pci/agp_i810.c#24 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/uma_machdep.c#4 integrate .. //depot/projects/hammer/sys/security/mac/mac_framework.h#5 integrate .. //depot/projects/hammer/sys/security/mac/mac_policy.h#6 integrate .. //depot/projects/hammer/sys/security/mac/mac_vfs.c#14 integrate .. //depot/projects/hammer/sys/security/mac_biba/mac_biba.c#42 integrate .. //depot/projects/hammer/sys/security/mac_bsdextended/mac_bsdextended.c#26 integrate .. //depot/projects/hammer/sys/security/mac_lomac/mac_lomac.c#31 integrate .. //depot/projects/hammer/sys/security/mac_mls/mac_mls.c#40 integrate .. //depot/projects/hammer/sys/security/mac_stub/mac_stub.c#24 integrate .. //depot/projects/hammer/sys/security/mac_test/mac_test.c#42 integrate .. //depot/projects/hammer/sys/sparc64/fhc/fhc.c#11 integrate .. //depot/projects/hammer/sys/sparc64/include/bus_common.h#5 integrate .. //depot/projects/hammer/sys/sparc64/include/intr_machdep.h#7 integrate .. //depot/projects/hammer/sys/sparc64/pci/psycho.c#34 integrate .. //depot/projects/hammer/sys/sparc64/pci/psychoreg.h#10 integrate .. //depot/projects/hammer/sys/sparc64/sbus/sbus.c#28 integrate .. //depot/projects/hammer/sys/sparc64/sbus/sbusreg.h#4 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/exception.S#20 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/genassym.c#15 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/intr_machdep.c#15 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/tick.c#13 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/upa.c#5 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/vm_machdep.c#25 integrate .. //depot/projects/hammer/sys/sun4v/mdesc/mdesc_init.c#2 integrate .. //depot/projects/hammer/sys/sun4v/sun4v/vm_machdep.c#3 integrate .. //depot/projects/hammer/sys/sys/callout.h#8 integrate .. //depot/projects/hammer/sys/sys/lock_profile.h#6 integrate .. //depot/projects/hammer/sys/sys/mount.h#51 integrate .. //depot/projects/hammer/sys/sys/proc.h#107 integrate .. //depot/projects/hammer/sys/sys/user.h#22 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_alloc.c#31 integrate .. //depot/projects/hammer/sys/vm/vm_glue.c#47 integrate .. //depot/projects/hammer/sys/vm/vm_pageout.c#45 integrate .. //depot/projects/hammer/tools/build/options/WITHOUT_ZONEINFO#1 branch .. //depot/projects/hammer/tools/regression/geom_eli/init-a.t#2 integrate .. //depot/projects/hammer/tools/regression/geom_eli/init.t#3 integrate .. //depot/projects/hammer/tools/regression/geom_eli/integrity-copy.t#2 integrate .. //depot/projects/hammer/tools/regression/geom_eli/integrity-data.t#2 integrate .. //depot/projects/hammer/tools/regression/geom_eli/integrity-hmac.t#2 integrate .. //depot/projects/hammer/tools/regression/geom_eli/onetime-a.t#2 integrate .. //depot/projects/hammer/tools/regression/geom_eli/onetime.t#3 integrate .. //depot/projects/hammer/tools/regression/priv/Makefile#2 integrate .. //depot/projects/hammer/tools/regression/priv/main.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/main.h#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_acct.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_adjtime.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_audit_control.c#1 branch .. //depot/projects/hammer/tools/regression/priv/priv_audit_getaudit.c#1 branch .. //depot/projects/hammer/tools/regression/priv/priv_audit_setaudit.c#1 branch .. //depot/projects/hammer/tools/regression/priv/priv_audit_submit.c#1 branch .. //depot/projects/hammer/tools/regression/priv/priv_clock_settime.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_cred.c#1 branch .. //depot/projects/hammer/tools/regression/priv/priv_io.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_kenv_set.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_kenv_unset.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_msgbuf.c#1 branch .. //depot/projects/hammer/tools/regression/priv/priv_netinet_raw.c#1 branch .. //depot/projects/hammer/tools/regression/priv/priv_proc_setlogin.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_proc_setrlimit.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_sched_rtprio.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_sched_setpriority.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_settimeofday.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_sysctl_write.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vfs_admin.c#2 delete .. //depot/projects/hammer/tools/regression/priv/priv_vfs_chflags.c#1 branch .. //depot/projects/hammer/tools/regression/priv/priv_vfs_chmod.c#1 branch .. //depot/projects/hammer/tools/regression/priv/priv_vfs_chown.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vfs_chroot.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vfs_clearsugid.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vfs_extattr_system.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vfs_fhopen.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vfs_fhstat.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vfs_fhstatfs.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vfs_generation.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vfs_getfh.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vfs_read_write.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vfs_setgid.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vfs_stickyfile.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vfs_utimes.c#1 branch .. //depot/projects/hammer/tools/regression/priv/priv_vm_madv_protect.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vm_mlock.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/priv_vm_munlock.c#2 integrate .. //depot/projects/hammer/tools/regression/priv/test_utimes.c#2 delete .. //depot/projects/hammer/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c#9 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.computer#4 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.dutch#2 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.holiday#13 integrate .. //depot/projects/hammer/usr.bin/netstat/sctp.c#4 integrate .. //depot/projects/hammer/usr.bin/systat/pigs.c#7 integrate .. //depot/projects/hammer/usr.bin/tar/bsdtar.c#34 integrate .. //depot/projects/hammer/usr.bin/top/machine.c#19 integrate .. //depot/projects/hammer/usr.bin/top/top.local.1#3 integrate .. //depot/projects/hammer/usr.sbin/kbdmap/kbdmap.c#6 integrate .. //depot/projects/hammer/usr.sbin/periodic/periodic.8#5 integrate .. //depot/projects/hammer/usr.sbin/wpa/ndis_events/ndis_events.8#5 integrate Differences ... ==== //depot/projects/hammer/ObsoleteFiles.inc#34 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.109 2007/08/07 23:48:30 marcel Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.111 2007/09/14 03:07:22 jkoshy Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -797,6 +797,10 @@ OLD_FILES+=usr/share/man/man1/omshell.1.gz OLD_FILES+=usr/share/man/man5/dhcp-eval.5.gz # 200504XX: ipf tools moved from /usr to / +OLD_FILES+=rescue/ipfs +OLD_FILES+=rescue/ipfstat +OLD_FILES+=rescue/ipmon +OLD_FILES+=rescue/ipnat OLD_FILES+=usr/sbin/ipftest OLD_FILES+=usr/sbin/ipresend OLD_FILES+=usr/sbin/ipsend @@ -828,6 +832,7 @@ OLD_FILES+=usr/libexec/getNAME # 200411XX: gvinum replaces vinum OLD_FILES+=bin/vinum +OLD_FILES+=rescue/vinum OLD_FILES+=sbin/vinum OLD_FILES+=usr/share/man/man8/vinum.8.gz # 200411XX: libxpg4 removal @@ -3296,7 +3301,6 @@ OLD_FILES+=usr/share/man/man4/uaudio.4.gz OLD_FILES+=usr/share/man/man4/utf2.4.gz OLD_FILES+=usr/share/man/man4/vinumdebug.4.gz -OLD_FILES+=usr/share/man/man5/ar.5.gz OLD_FILES+=usr/share/man/man5/disklabel.5.gz OLD_FILES+=usr/share/man/man5/dm.conf.5.gz OLD_FILES+=usr/share/man/man5/ranlib.5.gz ==== //depot/projects/hammer/bin/ps/print.c#16 (text+ko) ==== @@ -34,7 +34,7 @@ #endif #include -__FBSDID("$FreeBSD: src/bin/ps/print.c,v 1.94 2006/02/21 13:02:18 cognet Exp $"); +__FBSDID("$FreeBSD: src/bin/ps/print.c,v 1.95 2007/09/17 05:27:18 jeff Exp $"); #include #include @@ -197,14 +197,13 @@ void state(KINFO *k, VARENT *ve) { - int flag, sflag, tdflags; + int flag, tdflags; char *cp; VAR *v; char buf[16]; v = ve->var; flag = k->ki_p->ki_flag; - sflag = k->ki_p->ki_sflag; tdflags = k->ki_p->ki_tdflags; /* XXXKSE */ cp = buf; @@ -242,7 +241,7 @@ *cp = '?'; } cp++; - if (!(sflag & PS_INMEM)) + if (!(flag & P_INMEM)) *cp++ = 'W'; if (k->ki_p->ki_nice < NZERO) *cp++ = '<'; @@ -591,7 +590,7 @@ #define fxtofl(fixpt) ((double)(fixpt) / fscale) /* XXX - I don't like this */ - if (k->ki_p->ki_swtime == 0 || (k->ki_p->ki_sflag & PS_INMEM) == 0) + if (k->ki_p->ki_swtime == 0 || (k->ki_p->ki_flag & P_INMEM) == 0) return (0.0); if (rawcpu) return (100.0 * fxtofl(k->ki_p->ki_pctcpu)); @@ -619,7 +618,7 @@ if (failure) return (0.0); - if ((k->ki_p->ki_sflag & PS_INMEM) == 0) + if ((k->ki_p->ki_flag & P_INMEM) == 0) return (0.0); /* XXX want pmap ptpages, segtab, etc. (per architecture) */ /* XXX don't have info about shared */ ==== //depot/projects/hammer/bin/ps/ps.c#20 (text+ko) ==== @@ -47,7 +47,7 @@ #endif #include -__FBSDID("$FreeBSD: src/bin/ps/ps.c,v 1.110 2005/02/09 17:37:38 ru Exp $"); +__FBSDID("$FreeBSD: src/bin/ps/ps.c,v 1.111 2007/09/17 05:27:18 jeff Exp $"); #include #include @@ -994,13 +994,13 @@ return (s); } -#define UREADOK(ki) (forceuread || (ki->ki_p->ki_sflag & PS_INMEM)) +#define UREADOK(ki) (forceuread || (ki->ki_p->ki_flag & P_INMEM)) static void saveuser(KINFO *ki) { - if (ki->ki_p->ki_sflag & PS_INMEM) { + if (ki->ki_p->ki_flag & P_INMEM) { /* * The u-area might be swapped out, and we can't get * at it because we have a crashdump and no swap. ==== //depot/projects/hammer/contrib/less/main.c#8 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/contrib/less/main.c,v 1.11 2007/08/13 16:15:26 delphij Exp $ */ +/* $FreeBSD: src/contrib/less/main.c,v 1.12 2007/09/04 13:54:09 delphij Exp $ */ /* * Copyright (C) 1984-2007 Mark Nudelman * @@ -244,7 +244,7 @@ quit(QUIT_OK); } - if (missing_cap && !know_dumb) + if (missing_cap && !know_dumb && !less_is_more) error("WARNING: terminal is not fully functional", NULL_PARG); init_mark(); open_getchr(); ==== //depot/projects/hammer/etc/defaults/rc.conf#78 (text+ko) ==== @@ -15,7 +15,7 @@ # For a more detailed explanation of all the rc.conf variables, please # refer to the rc.conf(5) manual page. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.316 2007/06/12 17:33:23 gshapiro Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.317 2007/09/06 21:00:48 mlaier Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -154,6 +154,8 @@ pflog_logfile="/var/log/pflog" # where pflogd should store the logfile pflog_program="/sbin/pflogd" # where the pflogd program lives pflog_flags="" # additional flags for pflogd +ftpproxy_enable="NO" # Set to YES to enable ftp-proxy(8) for pf +ftpproxy_flags="" # additional flags for ftp-proxy(8) pfsync_enable="NO" # Expose pf state to other hosts for syncing pfsync_syncdev="" # Interface for pfsync to work through pfsync_syncpeer="" # IP address of pfsync peer host ==== //depot/projects/hammer/etc/rc.d/Makefile#54 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.82 2007/08/17 07:58:26 mtm Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.83 2007/09/07 15:44:09 mlaier Exp $ .include @@ -11,7 +11,7 @@ devd devfs dhclient \ dmesg dumpon \ early.sh encswap \ - fsck ftpd \ + fsck ftp-proxy ftpd \ gbde geli geli2 \ hcsecd \ hostapd hostid hostname \ ==== //depot/projects/hammer/etc/rc.d/lockd#3 (text+ko) ==== @@ -2,11 +2,11 @@ # # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ # FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm -# $FreeBSD: src/etc/rc.d/lockd,v 1.17 2007/08/18 04:08:53 mtm Exp $ +# $FreeBSD: src/etc/rc.d/lockd,v 1.18 2007/09/03 02:02:31 mtm Exp $ # # PROVIDE: lockd -# REQUIRE: nfsserver nfsclient nfsd rpcbind +# REQUIRE: nfsserver nfsclient nfsd rpcbind statd # BEFORE: DAEMON # KEYWORD: nojail ==== //depot/projects/hammer/etc/services#15 (text+ko) ==== @@ -16,7 +16,7 @@ # Kerberos services are for Kerberos v4, and are unofficial. Sites running # v5 should uncomment v5 entries and comment v4 entries. # -# $FreeBSD: src/etc/services,v 1.110 2007/05/20 03:57:47 grog Exp $ +# $FreeBSD: src/etc/services,v 1.112 2007/09/08 08:56:01 mr Exp $ # From: @(#)services 5.8 (Berkeley) 5/9/91 # # WELL KNOWN PORT NUMBERS @@ -2186,6 +2186,8 @@ sj3 3086/tcp #SJ3 (kanji input) vmodem 3141/tcp vmodem 3141/udp +iscsi-target 3260/tcp # iSCSI port +iscsi-target 3260/udp # iSCSI port ccmail 3264/tcp #cc:mail/lotus ccmail 3264/udp #cc:mail/lotus dec-notes 3333/tcp #DEC Notes @@ -2326,6 +2328,10 @@ montage-lm 6147/udp #Montage License Manager ricardo-lm 6148/tcp #Ricardo North America License Manager ricardo-lm 6148/udp #Ricardo North America License Manager +sge_qmaster 6444/tcp #Grid Engine Qmaster Service +sge_qmaster 6444/udp #Grid Engine Qmaster Service +sge_execd 6445/tcp #Grid Engine Execution Service +sge_execd 6445/upd #Grid Engine Execution Service xdsxdm 6558/tcp xdsxdm 6558/udp ircd 6667/tcp #Internet Relay Chat (unoffical) ==== //depot/projects/hammer/lib/libc/net/getaddrinfo.c#32 (text+ko) ==== @@ -54,7 +54,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/net/getaddrinfo.c,v 1.85 2006/07/23 15:31:03 ume Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/getaddrinfo.c,v 1.86 2007/09/05 18:08:14 jinmei Exp $"); #include "namespace.h" #include @@ -575,11 +575,28 @@ * If the returned entry is for an active connection, * and the given name is not numeric, reorder the * list, so that the application would try the list - * in the most efficient order. + * in the most efficient order. Since the head entry + * of the original list may contain ai_canonname and + * that entry may be moved elsewhere in the new list, + * we keep the pointer and will restore it in the new + * head entry. (Note that RFC3493 requires the head + * entry store it when requested by the caller). */ if (hints == NULL || !(hints->ai_flags & AI_PASSIVE)) { - if (!numeric) + if (!numeric) { + char *canonname; + + canonname = + sentinel.ai_next->ai_canonname; + sentinel.ai_next->ai_canonname = NULL; (void)reorder(&sentinel); + if (sentinel.ai_next->ai_canonname == + NULL) { + sentinel.ai_next->ai_canonname + = canonname; + } else if (canonname != NULL) + free(canonname); + } } *res = sentinel.ai_next; return SUCCESS; ==== //depot/projects/hammer/lib/libc/stdlib/getenv.c#6 (text+ko) ==== @@ -33,7 +33,7 @@ #include -__FBSDID("$FreeBSD: src/lib/libc/stdlib/getenv.c,v 1.10 2007/07/20 23:30:13 scf Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdlib/getenv.c,v 1.11 2007/09/15 21:48:54 scf Exp $"); static const char CorruptEnvFindMsg[] = @@ -491,8 +491,8 @@ envVars[envNdx].active = true; newEnvActive++; - /* No need to rebuild environ if the variable was reused. */ - if (reuse) + /* No need to rebuild environ if an active variable was reused. */ + if (reuse && newEnvActive == envActive) return (0); else return (__rebuild_environ(newEnvActive)); ==== //depot/projects/hammer/lib/libc/sys/Makefile.inc#29 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.3 (Berkeley) 10/24/94 -# $FreeBSD: src/lib/libc/sys/Makefile.inc,v 1.126 2007/07/04 23:22:59 peter Exp $ +# $FreeBSD: src/lib/libc/sys/Makefile.inc,v 1.127 2007/09/15 14:33:55 imp Exp $ # sys sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/sys ${.CURDIR}/sys @@ -78,7 +78,7 @@ mlockall.2 mmap.2 modfind.2 modnext.2 modstat.2 mount.2 mprotect.2 \ mq_close.2 mq_getattr.2 mq_notify.2 mq_open.2 mq_receive.2 mq_send.2 \ mq_setattr.2 \ - msync.2 munmap.2 nanosleep.2 ntp_adjtime.2 ntp_gettime.2 \ + msync.2 munmap.2 nanosleep.2 ntp_adjtime.2 \ nfssvc.2 open.2 pathconf.2 pipe.2 poll.2 profil.2 ptrace.2 quotactl.2 \ read.2 readlink.2 reboot.2 recv.2 rename.2 revoke.2 rfork.2 rmdir.2 \ rtprio.2 select.2 semctl.2 semget.2 semop.2 send.2 sendfile.2 \ @@ -143,6 +143,7 @@ MLINKS+=mount.2 nmount.2 mount.2 unmount.2 MLINKS+=mq_send.2 mq_timedsend.2 MLINKS+=mq_receive.2 mq_timedreceive.2 +MLINKS+=ntp_adjtime.2 ntp_gettime.2 MLINKS+=pathconf.2 fpathconf.2 MLINKS+=read.2 pread.2 read.2 readv.2 read.2 preadv.2 MLINKS+=recv.2 recvfrom.2 recv.2 recvmsg.2 ==== //depot/projects/hammer/lib/libc/sys/kqueue.2#12 (text+ko) ==== @@ -22,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/sys/kqueue.2,v 1.45 2006/11/20 22:20:04 jhb Exp $ +.\" $FreeBSD: src/lib/libc/sys/kqueue.2,v 1.46 2007/09/07 13:10:09 ru Exp $ .\" -.Dd August 25, 2006 +.Dd September 6, 2007 .Dt KQUEUE 2 .Os .Sh NAME @@ -542,11 +542,6 @@ system and this manual page were written by .An Jonathan Lemon Aq jlemon@FreeBSD.org . .Sh BUGS -It is currently not possible to watch a -.Xr vnode 9 -that resides on anything but -a UFS file system. -.Pp The .Dv EVFILT_NETDEV filter is currently only implemented for devices that use the ==== //depot/projects/hammer/lib/libc/sys/ntp_adjtime.2#4 (text+ko) ==== @@ -1,7 +1,11 @@ +.\" $NetBSD: ntp_adjtime.2,v 1.6 2003/04/16 13:34:55 wiz Exp $ .\" -.\" Copyright (c) 2003 Tom Rhodes +.\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. .\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Thomas Klausner. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -10,6 +14,13 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the NetBSD +.\" Foundation, Inc. and its contributors. +.\" 4. Neither the name of The NetBSD Foundation nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -23,116 +34,265 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/sys/ntp_adjtime.2,v 1.3 2007/02/17 01:54:00 trhodes Exp $ +.\" $FreeBSD: src/lib/libc/sys/ntp_adjtime.2,v 1.4 2007/09/15 14:33:55 imp Exp $ .\" -.Dd April 1, 2003 +.Dd July 13, 2005 .Dt NTP_ADJTIME 2 .Os .Sh NAME -.Nm ntp_adjtime -.Nd NTP daemon application interface +.Nm ntp_adjtime , +.Nm ntp_gettime +.Nd Network Time Protocol (NTP) daemon interface system calls +.Sh LIBRARY +.Lb libc .Sh SYNOPSIS -.In sys/types.h .In sys/timex.h .Ft int -.Fn ntp_adjtime "struct timex *tp" +.Fn ntp_adjtime "struct timex *" +.Ft int +.Fn ntp_gettime "struct ntptimeval *" .Sh DESCRIPTION -The +The two system calls .Fn ntp_adjtime -system call is used as a kernel interface -for the Network Time Protocol daemon, +and +.Fn ntp_gettime +are the kernel interface to the Network Time Protocol (NTP) daemon .Xr ntpd 8 . -Certain fields of the -.Vt timex -structure are interpreted in either -microseconds or nanoseconds, according to the state of the -.Dv STA_NANO -bit in the -.Va status -word. .Pp -In the -.Fx -kernel, the +The +.Fn ntp_adjtime +function is used by the NTP daemon to adjust the system clock to an +externally derived time. +The time offset and related variables which are set by .Fn ntp_adjtime -and -.Xr ntp_gettime 2 -system calls can be used to determine which -resolution is in use, and to select either one at any time. -The resolution selected affects the scaling of certain fields in the +are used by +.Fn hardclock +to adjust the phase and frequency of the phase- or frequency-lock loop +(PLL resp. FLL) which controls the system clock. +.Pp +The .Fn ntp_gettime -and +function provides the time, maximum error (sync distance) and +estimated error (dispersion) to client user application programs. +.Pp +In the following, all variables that refer PPS are only relevant if +the +.Em PPS_SYNC +option is enabled in the kernel. +.Pp .Fn ntp_adjtime -system calls. -.Pp -Take note that this -.Tn API -is extremely complex and stateful. -Users should not attempt modification without first -reviewing the -.Xr ntpd 8 -sources in depth. +has as argument a +.Va struct timex * +of the following form: .Bd -literal -/* - * NTP daemon interface (ntp_adjtime()) - used to discipline CPU clock - * oscillator and determine status. - * - * Note: The offset, precision and jitter members are in microseconds if - * STA_NANO is zero and nanoseconds if not. - */ struct timex { unsigned int modes; /* clock mode bits (wo) */ - long offset; /* time offset (ns/us) (rw) */ - long freq; /* frequency offset (scaled PPM) (rw) */ - long maxerror; /* maximum error (us) (rw) */ - long esterror; /* estimated error (us) (rw) */ - int status; /* clock status bits (rw) */ - long constant; /* poll interval (log2 s) (rw) */ - long precision; /* clock precision (ns/us) (ro) */ - long tolerance; /* clock frequency tolerance (scaled - * PPM) (ro) */ + long offset; /* time offset (us) (rw) */ + long freq; /* frequency offset (scaled ppm) (rw) */ + long maxerror; /* maximum error (us) (rw) */ + long esterror; /* estimated error (us) (rw) */ + int status; /* clock status bits (rw) */ + long constant; /* pll time constant (rw) */ + long precision; /* clock precision (us) (ro) */ + long tolerance; /* clock frequency tolerance (scaled + * ppm) (ro) */ /* * The following read-only structure members are implemented * only if the PPS signal discipline is configured in the - * kernel. They are included in all configurations to insure - * portability. + * kernel. */ - long ppsfreq; /* PPS frequency (scaled PPM) (ro) */ - long jitter; /* PPS jitter (ns/us) (ro) */ - int shift; /* interval duration (s) (shift) (ro) */ - long stabil; /* PPS stability (scaled PPM) (ro) */ - long jitcnt; /* jitter limit exceeded (ro) */ - long calcnt; /* calibration intervals (ro) */ - long errcnt; /* calibration errors (ro) */ - long stbcnt; /* stability limit exceeded (ro) */ + long ppsfreq; /* pps frequency (scaled ppm) (ro) */ + long jitter; /* pps jitter (us) (ro) */ + int shift; /* interval duration (s) (shift) (ro) */ + long stabil; /* pps stability (scaled ppm) (ro) */ + long jitcnt; /* jitter limit exceeded (ro) */ + long calcnt; /* calibration intervals (ro) */ + long errcnt; /* calibration errors (ro) */ + long stbcnt; /* stability limit exceeded (ro) */ }; .Ed .Pp -Upon successful completion, +The members of this struct have the following meanings when used as +argument for +.Fn ntp_adjtime : +.Bl -tag -width tolerance -compact +.It Fa modes +Defines what settings should be changed with the current +.Fn ntp_adjtime +call (write-only). +Bitwise OR of the following: +.Bl -tag -width MOD_TIMECONST -compact -offset indent +.It MOD_OFFSET +set time offset +.It MOD_FREQUENCY +set frequency offset +.It MOD_MAXERROR +set maximum time error +.It MOD_ESTERROR +set estimated time error +.It MOD_STATUS +set clock status bits +.It MOD_TIMECONST +set PLL time constant +.It MOD_CLKA +set clock A +.It MOD_CLKB +set clock B +.El +.It Fa offset +Time offset (in microseconds), used by the PLL/FLL to adjust the +system time in small increments (read-write). +.It Fa freq +Frequency offset (scaled ppm) (read-write). +.It Fa maxerror +Maximum error (in microseconds). +Initialized by an +.Fn ntp_adjtime +call, and increased by the kernel once each second to reflect the maximum +error bound growth (read-write). +.It Fa esterror +Estimated error (in microseconds). +Set and read by +.Fn ntp_adjtime , +but unused by the kernel (read-write). +.It Fa status +System clock status bits (read-write). +Bitwise OR of the following: +.Bl -tag -width STA_PPSJITTER -compact -offset indent +.It STA_PLL +Enable PLL updates (read-write). +.It STA_PPSFREQ +Enable PPS freq discipline (read-write). +.It STA_PPSTIME +Enable PPS time discipline (read-write). +.It STA_FLL +Select frequency-lock mode (read-write). +.It STA_INS +Insert leap (read-write). +.It STA_DEL +Delete leap (read-write). +.It STA_UNSYNC +Clock unsynchronized (read-write). +.It STA_FREQHOLD +Hold frequency (read-write). +.It STA_PPSSIGNAL +PPS signal present (read-only). +.It STA_PPSJITTER +PPS signal jitter exceeded (read-only). +.It STA_PPSWANDER +PPS signal wander exceeded (read-only). +.It STA_PPSERROR +PPS signal calibration error (read-only). +.It STA_CLOCKERR +Clock hardware fault (read-only). +.El +.It Fa constant +PLL time constant, determines the bandwidth, or +.Dq stiffness , +of the PLL (read-write). +.It Fa precision +Clock precision (in microseconds). +In most cases the same as the kernel tick variable (see +.Xr hz 9 ) . +If a precision clock counter or external time-keeping signal is available, +it could be much lower (and depend on the state of the signal) +(read-only). +.It Fa tolerance +Maximum frequency error, or tolerance of the CPU clock oscillator (scaled +ppm). +Ordinarily a property of the architecture, but could change under +the influence of external time-keeping signals (read-only). +.It Fa ppsfreq +PPS frequency offset produced by the frequency median filter (scaled +ppm) (read-only). +.It Fa jitter +PPS jitter measured by the time median filter in microseconds +(read-only). +.It Fa shift +Logarithm to base 2 of the interval duration in seconds (PPS, +read-only). +.It Fa stabil +PPS stability (scaled ppm); dispersion (wander) measured by the +frequency median filter (read-only). +.It Fa jitcnt +Number of seconds that have been discarded because the jitter measured +by the time median filter exceeded the limit +.Em MAXTIME +(PPS, read-only). +.It Fa calcnt +Count of calibration intervals (PPS, read-only). +.It Fa errcnt +Number of calibration intervals that have been discarded because the +wander exceeded the limit +.Em MAXFREQ +or where the calibration interval jitter exceeded two ticks (PPS, +read-only). +.It Fa stbcnt +Number of calibration intervals that have been discarded because the +frequency wander exceeded the limit +.Em MAXFREQ Ns /4 +(PPS, read-only). +.El +After the .Fn ntp_adjtime -will fill the -.Fa tp -argument with the current clock state. +call, the +.Va struct timex * +structure contains the current values of the corresponding variables. +.Pp +.Fn ntp_gettime +has as argument a >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Sep 18 12:43:38 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1C38816A469; Tue, 18 Sep 2007 12:43:38 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D119216A417 for ; Tue, 18 Sep 2007 12:43:37 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C1F1A13C4A8 for ; Tue, 18 Sep 2007 12:43:37 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8IChbMj019275 for ; Tue, 18 Sep 2007 12:43:37 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8IChbc4019272 for perforce@freebsd.org; Tue, 18 Sep 2007 12:43:37 GMT (envelope-from zec@FreeBSD.org) Date: Tue, 18 Sep 2007 12:43:37 GMT Message-Id: <200709181243.l8IChbc4019272@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@FreeBSD.org using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 126550 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2007 12:43:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=126550 Change 126550 by zec@zec_tpx32 on 2007/09/18 12:43:14 Attempt to extend SCHED_ULE to allow for per-vprocg load average accounting, in a followup to the previous change adding such capability to SCHED_4BSD. Affected files ... .. //depot/projects/vimage/src/sys/kern/kern_exit.c#7 edit .. //depot/projects/vimage/src/sys/kern/sched_4bsd.c#9 edit .. //depot/projects/vimage/src/sys/kern/sched_ule.c#11 edit .. //depot/projects/vimage/src/sys/sys/vimage.h#39 edit Differences ... ==== //depot/projects/vimage/src/sys/kern/kern_exit.c#7 (text+ko) ==== @@ -40,6 +40,7 @@ #include "opt_compat.h" #include "opt_ktrace.h" #include "opt_mac.h" +#include "opt_sched.h" #include "opt_vimage.h" #include @@ -189,6 +190,10 @@ crhold(p->p_pptr->p_ucred); oldcred = p->p_ucred; p->p_ucred = p->p_pptr->p_ucred; +#ifdef SCHED_4BSD + sched_load_reassign(oldcred->cr_vimage->v_procg, + p->p_ucred->cr_vimage->v_procg); +#endif PROC_UNLOCK(p); sx_xlock(&allproc_lock); oldcred->cr_vimage->v_procg->nprocs--; ==== //depot/projects/vimage/src/sys/kern/sched_4bsd.c#9 (text+ko) ==== @@ -391,7 +391,7 @@ #ifndef VIMAGE register fixpt_t loadfac = loadfactor(averunnable.ldavg[0]); #else - #define loadfac loadfactor(p->p_ucred->cr_vimage->v_procg->_averunnable.ldavg[0]) + #define loadfac loadfactor(td->td_ucred->cr_vimage->v_procg->_averunnable.ldavg[0]) #endif struct thread *td; struct proc *p; ==== //depot/projects/vimage/src/sys/kern/sched_ule.c#11 (text+ko) ==== @@ -40,6 +40,7 @@ #include "opt_hwpmc_hooks.h" #include "opt_sched.h" +#include "opt_vimage.h" #include #include @@ -59,6 +60,7 @@ #include #include #include +#include #ifdef KTRACE #include #include @@ -278,8 +280,13 @@ /* Operations on per processor queues */ static struct td_sched * tdq_choose(struct tdq *); static void tdq_setup(struct tdq *); +#ifndef VIMAGE static void tdq_load_add(struct tdq *, struct td_sched *); static void tdq_load_rem(struct tdq *, struct td_sched *); +#else +static void tdq_load_add(struct tdq *, struct td_sched *, struct vprocg *); +static void tdq_load_rem(struct tdq *, struct td_sched *, struct vprocg *); +#endif static __inline void tdq_runq_add(struct tdq *, struct td_sched *, int); static __inline void tdq_runq_rem(struct tdq *, struct td_sched *); void tdq_print(int cpu); @@ -451,7 +458,11 @@ * for this thread to the referenced thread queue. */ static void +#ifndef VIMAGE tdq_load_add(struct tdq *tdq, struct td_sched *ts) +#else +tdq_load_add(struct tdq *tdq, struct td_sched *ts, struct vprocg *vprocg) +#endif { int class; @@ -461,12 +472,16 @@ tdq->tdq_load++; CTR2(KTR_SCHED, "cpu %d load: %d", TDQ_ID(tdq), tdq->tdq_load); if (class != PRI_ITHD && - (ts->ts_thread->td_proc->p_flag & P_NOLOAD) == 0) + (ts->ts_thread->td_proc->p_flag & P_NOLOAD) == 0) { #ifdef SMP tdq->tdq_group->tdg_load++; #else tdq->tdq_sysload++; #endif +#ifdef VIMAGE + V_tdq_load[curcpu]++; +#endif + } } /* @@ -474,7 +489,11 @@ * exiting. */ static void +#ifndef VIMAGE tdq_load_rem(struct tdq *tdq, struct td_sched *ts) +#else +tdq_load_rem(struct tdq *tdq, struct td_sched *ts, struct vprocg *vprocg) +#endif { int class; @@ -482,12 +501,16 @@ TDQ_LOCK_ASSERT(tdq, MA_OWNED); class = PRI_BASE(ts->ts_thread->td_pri_class); if (class != PRI_ITHD && - (ts->ts_thread->td_proc->p_flag & P_NOLOAD) == 0) + (ts->ts_thread->td_proc->p_flag & P_NOLOAD) == 0) { #ifdef SMP tdq->tdq_group->tdg_load--; #else tdq->tdq_sysload--; #endif +#ifdef VIMAGE + V_tdq_load[curcpu]--; +#endif + } KASSERT(tdq->tdq_load != 0, ("tdq_load_rem: Removing with 0 load on queue %d", TDQ_ID(tdq))); tdq->tdq_load--; @@ -1299,7 +1322,11 @@ /* Add thread0's load since it's running. */ TDQ_LOCK(tdq); thread0.td_lock = TDQ_LOCKPTR(TDQ_SELF()); +#ifndef VIMAGE tdq_load_add(tdq, &td_sched0); +#else + tdq_load_add(tdq, &td_sched0, thread0.td_ucred->cr_vimage->v_procg); +#endif TDQ_UNLOCK(tdq); } @@ -1823,7 +1850,11 @@ TD_SET_CAN_RUN(td); } else if (TD_IS_RUNNING(td)) { MPASS(td->td_lock == TDQ_LOCKPTR(tdq)); +#ifndef VIMAGE tdq_load_rem(tdq, ts); +#else + tdq_load_rem(tdq, ts, td->td_ucred->cr_vimage->v_procg); +#endif srqflag = (flags & SW_PREEMPT) ? SRQ_OURSELF|SRQ_YIELDING|SRQ_PREEMPTED : SRQ_OURSELF|SRQ_YIELDING; @@ -1835,7 +1866,11 @@ /* This thread must be going to sleep. */ TDQ_LOCK(tdq); mtx = thread_block_switch(td); +#ifndef VIMAGE tdq_load_rem(tdq, ts); +#else + tdq_load_rem(tdq, ts, td->td_ucred->cr_vimage->v_procg); +#endif } /* * We enter here with the thread blocked and assigned to the @@ -2328,7 +2363,11 @@ tdq->tdq_lowpri = td->td_priority; #endif tdq_runq_add(tdq, ts, flags); +#ifndef VIMAGE tdq_load_add(tdq, ts); +#else + tdq_load_add(tdq, ts, td->td_ucred->cr_vimage->v_procg); +#endif } /* @@ -2408,7 +2447,11 @@ KASSERT(TD_ON_RUNQ(td), ("sched_rem: thread not on run queue")); tdq_runq_rem(tdq, ts); +#ifndef VIMAGE tdq_load_rem(tdq, ts); +#else + tdq_load_rem(tdq, ts, td->td_ucred->cr_vimage->v_procg); +#endif TD_SET_CAN_RUN(td); } @@ -2507,7 +2550,11 @@ * Return the total system load. */ int +#ifdef VIMAGE +sched_load(struct vprocg *vprocg) +#else sched_load(void) +#endif { #ifdef SMP int total; @@ -2515,13 +2562,31 @@ total = 0; for (i = 0; i <= tdg_maxid; i++) +#ifndef VIMAGE total += TDQ_GROUP(i)->tdg_load; +#else + total += V_tdg_load[i]; +#endif return (total); #else +#ifndef VIMAGE return (TDQ_SELF()->tdq_sysload); +#else + return (V_tdq_load[0]); +#endif #endif } +#ifdef VIMAGE +void +sched_load_reassign(struct vprocg *old, struct vprocg *new) +{ + /* XXX locking! */ + old->_tdq_load[curcpu]--; + new->_tdq_load[curcpu]++; +} +#endif + int sched_sizeof_proc(void) { @@ -2572,7 +2637,12 @@ spinlock_exit(); } else { MPASS(td->td_lock == TDQ_LOCKPTR(tdq)); +#ifndef VIMAGE tdq_load_rem(tdq, td->td_sched); +#else + tdq_load_rem(tdq, td->td_sched, + td->td_ucred->cr_vimage->v_procg); +#endif } KASSERT(curthread->td_md.md_spinlock_count == 1, ("invalid count")); PCPU_SET(switchtime, cpu_ticks()); ==== //depot/projects/vimage/src/sys/sys/vimage.h#39 (text+ko) ==== @@ -301,6 +301,7 @@ #define V_morphing_symlinks VPROCG(morphing_symlinks) #define V_averunnable VPROCG(averunnable) #define V_sched_tdcnt VPROCG(sched_tdcnt) +#define V_tdq_load VPROCG(tdq_load) #ifdef VIMAGE void vnet_mod_register(const struct vnet_modinfo *); @@ -377,6 +378,7 @@ struct loadavg _averunnable; /* from kern/kern_synch.c */ int _sched_tdcnt; /* from kern/sched_4bsd.c */ + int _tdq_load[32]; /* XXX MAXCPUS from kern/sched_ule.c (SMP) */ #if 0 u_int proc_limit; /* max. number of processes */ From owner-p4-projects@FreeBSD.ORG Wed Sep 19 02:34:51 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 37A2016A420; Wed, 19 Sep 2007 02:34:51 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9CB416A41A for ; Wed, 19 Sep 2007 02:34:50 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 998DC13C46A for ; Wed, 19 Sep 2007 02:34:50 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8J2YoBq052663 for ; Wed, 19 Sep 2007 02:34:50 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8J2YW52052660 for perforce@freebsd.org; Wed, 19 Sep 2007 02:34:32 GMT (envelope-from thompsa@freebsd.org) Date: Wed, 19 Sep 2007 02:34:32 GMT Message-Id: <200709190234.l8J2YW52052660@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 126587 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2007 02:34:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=126587 Change 126587 by thompsa@thompsa_heff on 2007/09/19 02:34:12 IFC Affected files ... .. //depot/projects/wifi/ObsoleteFiles.inc#23 integrate .. //depot/projects/wifi/bin/ps/print.c#3 integrate .. //depot/projects/wifi/bin/ps/ps.c#5 integrate .. //depot/projects/wifi/contrib/less/main.c#8 integrate .. //depot/projects/wifi/etc/defaults/rc.conf#32 integrate .. //depot/projects/wifi/etc/namedb/named.conf#7 integrate .. //depot/projects/wifi/etc/rc.d/Makefile#20 integrate .. //depot/projects/wifi/etc/rc.d/ftp-proxy#1 branch .. //depot/projects/wifi/etc/rc.d/lockd#2 integrate .. //depot/projects/wifi/etc/rc.d/mdconfig#3 integrate .. //depot/projects/wifi/etc/rc.d/nfslocking#4 integrate .. //depot/projects/wifi/etc/rc.d/statd#2 integrate .. //depot/projects/wifi/etc/services#5 integrate .. //depot/projects/wifi/gnu/lib/libdialog/dialog.h#2 integrate .. //depot/projects/wifi/gnu/lib/libstdc++/Makefile#8 integrate .. //depot/projects/wifi/gnu/usr.bin/cc/cc_int/Makefile#7 integrate .. //depot/projects/wifi/gnu/usr.bin/gdb/kgdb/trgt_amd64.c#6 integrate .. //depot/projects/wifi/include/arpa/inet.h#6 integrate .. //depot/projects/wifi/lib/libarchive/archive_read_support_format_tar.c#22 integrate .. //depot/projects/wifi/lib/libarchive/archive_write_disk.c#8 integrate .. //depot/projects/wifi/lib/libarchive/test/test_read_format_gtar_sparse.c#5 integrate .. //depot/projects/wifi/lib/libarchive/test/test_write_disk.c#4 integrate .. //depot/projects/wifi/lib/libc/gen/fts-compat.c#1 branch .. //depot/projects/wifi/lib/libc/gen/fts-compat.h#1 branch .. //depot/projects/wifi/lib/libc/net/getaddrinfo.c#12 integrate .. //depot/projects/wifi/lib/libc/stdlib/getenv.c#6 integrate .. //depot/projects/wifi/lib/libc/sys/Makefile.inc#11 integrate .. //depot/projects/wifi/lib/libc/sys/Symbol.map#7 integrate .. //depot/projects/wifi/lib/libc/sys/kqueue.2#4 integrate .. //depot/projects/wifi/lib/libc/sys/ntp_adjtime.2#3 integrate .. //depot/projects/wifi/lib/libc/sys/ntp_gettime.2#2 delete .. //depot/projects/wifi/lib/libelf/elf_update.3#2 integrate .. //depot/projects/wifi/lib/libelf/elf_update.c#2 integrate .. //depot/projects/wifi/lib/libelf/libelf_convert.m4#2 integrate .. //depot/projects/wifi/lib/libkvm/kvm_proc.c#10 integrate .. //depot/projects/wifi/lib/libutil/Makefile#7 integrate .. //depot/projects/wifi/lib/libutil/expand_number.3#1 branch .. //depot/projects/wifi/lib/libutil/expand_number.c#1 branch .. //depot/projects/wifi/lib/libutil/humanize_number.3#5 integrate .. //depot/projects/wifi/lib/libutil/libutil.h#5 integrate .. //depot/projects/wifi/release/Makefile#21 integrate .. //depot/projects/wifi/release/doc/Makefile#2 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/article.sgml#5 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/readme/article.sgml#5 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/relnotes/article.sgml#18 integrate .. //depot/projects/wifi/release/doc/share/misc/dev.archlist.txt#25 integrate .. //depot/projects/wifi/release/doc/share/sgml/release.ent#8 integrate .. //depot/projects/wifi/sbin/camcontrol/Makefile#2 integrate .. //depot/projects/wifi/sbin/camcontrol/camcontrol.8#6 integrate .. //depot/projects/wifi/sbin/camcontrol/camcontrol.c#5 integrate .. //depot/projects/wifi/sbin/geom/class/eli/geli.8#8 integrate .. //depot/projects/wifi/sbin/ipfw/ipfw2.c#21 integrate .. //depot/projects/wifi/sbin/quotacheck/preen.c#2 integrate .. //depot/projects/wifi/sbin/quotacheck/quotacheck.c#6 integrate .. //depot/projects/wifi/sbin/reboot/boot_i386.8#10 integrate .. //depot/projects/wifi/sbin/sysctl/sysctl.8#8 integrate .. //depot/projects/wifi/share/examples/cvsup/cvs-supfile#4 integrate .. //depot/projects/wifi/share/examples/cvsup/doc-supfile#2 integrate .. //depot/projects/wifi/share/examples/cvsup/gnats-supfile#2 integrate .. //depot/projects/wifi/share/examples/cvsup/ports-supfile#7 integrate .. //depot/projects/wifi/share/examples/cvsup/stable-supfile#5 integrate .. //depot/projects/wifi/share/examples/cvsup/standard-supfile#3 integrate .. //depot/projects/wifi/share/examples/cvsup/www-supfile#2 integrate .. //depot/projects/wifi/share/man/man4/Makefile#42 integrate .. //depot/projects/wifi/share/man/man4/aac.4#8 integrate .. //depot/projects/wifi/share/man/man4/ata.4#16 integrate .. //depot/projects/wifi/share/man/man4/coretemp.4#1 branch .. //depot/projects/wifi/share/man/man4/ichwd.4#1 branch .. //depot/projects/wifi/share/man/man4/if_bridge.4#10 integrate .. //depot/projects/wifi/share/man/man4/nfe.4#7 integrate .. //depot/projects/wifi/share/man/man4/ral.4#10 integrate .. //depot/projects/wifi/share/man/man4/rum.4#3 integrate .. //depot/projects/wifi/share/man/man4/snd_emu10kx.4#3 integrate .. //depot/projects/wifi/share/man/man4/umodem.4#5 integrate .. //depot/projects/wifi/share/man/man4/ural.4#13 integrate .. //depot/projects/wifi/share/man/man4/wlan.4#7 integrate .. //depot/projects/wifi/share/man/man4/wlan_amrr.4#2 integrate .. //depot/projects/wifi/share/man/man4/zyd.4#1 branch .. //depot/projects/wifi/share/man/man5/Makefile#12 integrate .. //depot/projects/wifi/share/man/man5/ar.5#1 branch .. //depot/projects/wifi/share/man/man5/elf.5#6 integrate .. //depot/projects/wifi/share/man/man5/msdosfs.5#3 integrate .. //depot/projects/wifi/share/man/man5/rc.conf.5#32 integrate .. //depot/projects/wifi/share/man/man5/src.conf.5#8 integrate .. //depot/projects/wifi/share/man/man7/ports.7#11 integrate .. //depot/projects/wifi/share/man/man9/Makefile#23 integrate .. //depot/projects/wifi/share/man/man9/suser.9#8 integrate .. //depot/projects/wifi/share/misc/committers-ports.dot#9 integrate .. //depot/projects/wifi/share/zoneinfo/africa#7 integrate .. //depot/projects/wifi/share/zoneinfo/antarctica#6 integrate .. //depot/projects/wifi/share/zoneinfo/australasia#7 integrate .. //depot/projects/wifi/share/zoneinfo/europe#8 integrate .. //depot/projects/wifi/share/zoneinfo/leapseconds#9 integrate .. //depot/projects/wifi/share/zoneinfo/northamerica#8 integrate .. //depot/projects/wifi/share/zoneinfo/zone.tab#6 integrate .. //depot/projects/wifi/sys/amd64/amd64/cpu_switch.S#8 integrate .. //depot/projects/wifi/sys/amd64/amd64/genassym.c#8 integrate .. //depot/projects/wifi/sys/amd64/amd64/local_apic.c#17 integrate .. //depot/projects/wifi/sys/amd64/amd64/pmap.c#23 integrate .. //depot/projects/wifi/sys/amd64/amd64/support.S#8 integrate .. //depot/projects/wifi/sys/amd64/amd64/uma_machdep.c#4 integrate .. //depot/projects/wifi/sys/amd64/include/asm.h#3 integrate .. //depot/projects/wifi/sys/amd64/include/asmacros.h#5 integrate .. //depot/projects/wifi/sys/amd64/isa/clock.c#15 integrate .. //depot/projects/wifi/sys/amd64/linux32/linux.h#7 integrate .. //depot/projects/wifi/sys/amd64/linux32/linux32_proto.h#9 integrate .. //depot/projects/wifi/sys/amd64/linux32/linux32_syscall.h#9 integrate .. //depot/projects/wifi/sys/amd64/linux32/linux32_sysent.c#9 integrate .. //depot/projects/wifi/sys/amd64/linux32/syscalls.master#9 integrate .. //depot/projects/wifi/sys/arm/arm/busdma_machdep.c#22 integrate .. //depot/projects/wifi/sys/arm/arm/vm_machdep.c#19 integrate .. //depot/projects/wifi/sys/arm/at91/at91_mci.c#4 integrate .. //depot/projects/wifi/sys/arm/at91/at91_pmc.c#3 integrate .. //depot/projects/wifi/sys/arm/include/endian.h#7 integrate .. //depot/projects/wifi/sys/arm/sa11x0/uart_dev_sa1110.c#6 integrate .. //depot/projects/wifi/sys/arm/xscale/i80321/i80321.c#7 integrate .. //depot/projects/wifi/sys/boot/arm/at91/boot2/boot2.c#4 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_misc.c#18 integrate .. //depot/projects/wifi/sys/compat/linux/linux_misc.c#21 integrate .. //depot/projects/wifi/sys/compat/linux/linux_stats.c#12 integrate .. //depot/projects/wifi/sys/compat/opensolaris/sys/proc.h#2 integrate .. //depot/projects/wifi/sys/conf/NOTES#48 integrate .. //depot/projects/wifi/sys/conf/options#41 integrate .. //depot/projects/wifi/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c#4 integrate .. //depot/projects/wifi/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#6 integrate .. //depot/projects/wifi/sys/contrib/pf/net/pf.c#18 integrate .. //depot/projects/wifi/sys/ddb/db_ps.c#6 integrate .. //depot/projects/wifi/sys/dev/aac/aac_pci.c#12 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi.c#30 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_cpu.c#12 integrate .. //depot/projects/wifi/sys/dev/an/if_an.c#18 integrate .. //depot/projects/wifi/sys/dev/ata/ata-chipset.c#29 integrate .. //depot/projects/wifi/sys/dev/ata/ata-pci.h#21 integrate .. //depot/projects/wifi/sys/dev/ath/ath_rate/sample/sample.c#15 integrate .. //depot/projects/wifi/sys/dev/ath/if_ath.c#151 integrate .. //depot/projects/wifi/sys/dev/awi/awi.c#19 integrate .. //depot/projects/wifi/sys/dev/coretemp/coretemp.c#2 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_common.h#5 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_ctl_defs.h#3 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_sge_defs.h#3 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_t3_hw.c#5 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_vsc7323.c#3 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_vsc8211.c#3 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_xgmac.c#5 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_adapter.h#8 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_include.h#2 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_ioctl.h#4 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_l2t.c#2 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_l2t.h#2 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_lro.c#5 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_main.c#11 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_offload.c#5 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_offload.h#4 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_osdep.h#5 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_sge.c#11 integrate .. //depot/projects/wifi/sys/dev/cxgb/t3fw-4.5.0.bin.gz.uu#2 delete .. //depot/projects/wifi/sys/dev/cxgb/t3fw-4.7.0.bin.gz.uu#1 branch .. //depot/projects/wifi/sys/dev/dcons/dcons_os.c#12 integrate .. //depot/projects/wifi/sys/dev/drm/i915_dma.c#6 integrate .. //depot/projects/wifi/sys/dev/em/if_em.c#28 integrate .. //depot/projects/wifi/sys/dev/em/if_em.h#13 integrate .. //depot/projects/wifi/sys/dev/ipw/if_ipw.c#25 integrate .. //depot/projects/wifi/sys/dev/isp/isp_freebsd.c#19 integrate .. //depot/projects/wifi/sys/dev/isp/isp_freebsd.h#14 integrate .. //depot/projects/wifi/sys/dev/iwi/if_iwi.c#56 integrate .. //depot/projects/wifi/sys/dev/ixgbe/ixgbe.c#2 integrate .. //depot/projects/wifi/sys/dev/ixgbe/ixgbe.h#2 integrate .. //depot/projects/wifi/sys/dev/ixgbe/ixgbe_82598.c#2 integrate .. //depot/projects/wifi/sys/dev/ixgbe/ixgbe_api.c#2 integrate .. //depot/projects/wifi/sys/dev/ixgbe/ixgbe_api.h#2 integrate .. //depot/projects/wifi/sys/dev/ixgbe/ixgbe_common.c#2 integrate .. //depot/projects/wifi/sys/dev/ixgbe/ixgbe_common.h#2 integrate .. //depot/projects/wifi/sys/dev/ixgbe/ixgbe_osdep.h#2 integrate .. //depot/projects/wifi/sys/dev/ixgbe/ixgbe_phy.c#2 integrate .. //depot/projects/wifi/sys/dev/ixgbe/ixgbe_phy.h#2 integrate .. //depot/projects/wifi/sys/dev/ixgbe/ixgbe_type.h#2 integrate .. //depot/projects/wifi/sys/dev/mfi/mfi.c#9 integrate .. //depot/projects/wifi/sys/dev/mfi/mfi_pci.c#6 integrate .. //depot/projects/wifi/sys/dev/mfi/mfireg.h#5 integrate .. //depot/projects/wifi/sys/dev/mfi/mfivar.h#7 integrate .. //depot/projects/wifi/sys/dev/mpt/mpt_pci.c#12 integrate .. //depot/projects/wifi/sys/dev/mxge/eth_z8e.h#2 integrate .. //depot/projects/wifi/sys/dev/mxge/ethp_z8e.h#2 integrate .. //depot/projects/wifi/sys/dev/mxge/if_mxge.c#17 integrate .. //depot/projects/wifi/sys/dev/mxge/if_mxge_var.h#8 integrate .. //depot/projects/wifi/sys/dev/mxge/mxge_mcp.h#6 integrate .. //depot/projects/wifi/sys/dev/nfe/if_nfe.c#6 integrate .. //depot/projects/wifi/sys/dev/ral/rt2560.c#26 integrate .. //depot/projects/wifi/sys/dev/ral/rt2661.c#17 integrate .. //depot/projects/wifi/sys/dev/ray/if_ray.c#14 integrate .. //depot/projects/wifi/sys/dev/sound/pci/emu10kx-midi.c#2 integrate .. //depot/projects/wifi/sys/dev/sound/pci/emu10kx-pcm.c#8 integrate .. //depot/projects/wifi/sys/dev/sound/pci/emu10kx.c#7 integrate .. //depot/projects/wifi/sys/dev/sound/pci/emu10kx.h#4 integrate .. //depot/projects/wifi/sys/dev/usb/if_rum.c#8 integrate .. //depot/projects/wifi/sys/dev/usb/if_ural.c#35 integrate .. //depot/projects/wifi/sys/dev/usb/if_zyd.c#1 branch .. //depot/projects/wifi/sys/dev/usb/if_zydfw.h#1 branch .. //depot/projects/wifi/sys/dev/usb/if_zydreg.h#1 branch .. //depot/projects/wifi/sys/dev/usb/usbdevs#33 integrate .. //depot/projects/wifi/sys/dev/wi/if_wi.c#43 integrate .. //depot/projects/wifi/sys/fs/msdosfs/direntry.h#5 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_conv.c#10 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_lookup.c#7 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_vnops.c#16 integrate .. //depot/projects/wifi/sys/fs/procfs/procfs_status.c#9 integrate .. //depot/projects/wifi/sys/geom/eli/g_eli.h#6 integrate .. //depot/projects/wifi/sys/geom/eli/g_eli_crypto.c#4 integrate .. //depot/projects/wifi/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c#6 integrate .. //depot/projects/wifi/sys/i386/acpica/madt.c#11 integrate .. //depot/projects/wifi/sys/i386/i386/genassym.c#8 integrate .. //depot/projects/wifi/sys/i386/i386/geode.c#5 integrate .. //depot/projects/wifi/sys/i386/i386/local_apic.c#20 integrate .. //depot/projects/wifi/sys/i386/i386/pmap.c#26 integrate .. //depot/projects/wifi/sys/i386/i386/support.s#7 integrate .. //depot/projects/wifi/sys/i386/i386/swtch.s#8 integrate .. //depot/projects/wifi/sys/i386/include/asm.h#2 integrate .. //depot/projects/wifi/sys/i386/include/asmacros.h#4 integrate .. //depot/projects/wifi/sys/i386/isa/isa.c#6 integrate .. //depot/projects/wifi/sys/i386/linux/linux.h#8 integrate .. //depot/projects/wifi/sys/i386/linux/linux_proto.h#9 integrate .. //depot/projects/wifi/sys/i386/linux/linux_ptrace.c#5 integrate .. //depot/projects/wifi/sys/i386/linux/linux_syscall.h#9 integrate .. //depot/projects/wifi/sys/i386/linux/linux_sysent.c#9 integrate .. //depot/projects/wifi/sys/i386/linux/syscalls.master#9 integrate .. //depot/projects/wifi/sys/ia64/ia64/uma_machdep.c#4 integrate .. //depot/projects/wifi/sys/kern/init_main.c#21 integrate .. //depot/projects/wifi/sys/kern/kern_acct.c#16 integrate .. //depot/projects/wifi/sys/kern/kern_clock.c#16 integrate .. //depot/projects/wifi/sys/kern/kern_cpu.c#11 integrate .. //depot/projects/wifi/sys/kern/kern_fork.c#22 integrate .. //depot/projects/wifi/sys/kern/kern_kse.c#19 integrate .. //depot/projects/wifi/sys/kern/kern_ktrace.c#14 integrate .. //depot/projects/wifi/sys/kern/kern_proc.c#18 integrate .. //depot/projects/wifi/sys/kern/kern_switch.c#21 integrate .. //depot/projects/wifi/sys/kern/kern_synch.c#18 integrate .. //depot/projects/wifi/sys/kern/kern_sysctl.c#13 integrate .. //depot/projects/wifi/sys/kern/kern_thread.c#24 integrate .. //depot/projects/wifi/sys/kern/kern_timeout.c#11 integrate .. //depot/projects/wifi/sys/kern/sched_4bsd.c#18 integrate .. //depot/projects/wifi/sys/kern/sched_ule.c#29 integrate .. //depot/projects/wifi/sys/kern/subr_kdb.c#8 integrate .. //depot/projects/wifi/sys/kern/subr_lock.c#7 integrate .. //depot/projects/wifi/sys/kern/subr_sleepqueue.c#15 integrate .. //depot/projects/wifi/sys/kern/subr_smp.c#9 integrate .. //depot/projects/wifi/sys/kern/subr_trap.c#14 integrate .. //depot/projects/wifi/sys/kern/sys_process.c#13 integrate .. //depot/projects/wifi/sys/kern/uipc_syscalls.c#27 integrate .. //depot/projects/wifi/sys/kern/vfs_aio.c#19 integrate .. //depot/projects/wifi/sys/kern/vfs_mount.c#35 integrate .. //depot/projects/wifi/sys/kern/vfs_subr.c#44 integrate .. //depot/projects/wifi/sys/kern/vfs_syscalls.c#26 integrate .. //depot/projects/wifi/sys/modules/cxgb/Makefile#6 integrate .. //depot/projects/wifi/sys/modules/ixgbe/Makefile#1 branch .. //depot/projects/wifi/sys/modules/sound/driver/emu10kx/Makefile#3 integrate .. //depot/projects/wifi/sys/modules/zyd/Makefile#1 branch .. //depot/projects/wifi/sys/net/bpf.c#26 integrate .. //depot/projects/wifi/sys/net/bpf_filter.c#5 integrate .. //depot/projects/wifi/sys/net/bridgestp.c#14 integrate .. //depot/projects/wifi/sys/net/if_bridge.c#17 integrate .. //depot/projects/wifi/sys/net/if_ethersubr.c#26 integrate .. //depot/projects/wifi/sys/net/if_lagg.c#8 integrate .. //depot/projects/wifi/sys/net/if_media.h#12 integrate .. //depot/projects/wifi/sys/net/rtsock.c#15 integrate .. //depot/projects/wifi/sys/net80211/_ieee80211.h#26 integrate .. //depot/projects/wifi/sys/net80211/ieee80211.c#57 integrate .. //depot/projects/wifi/sys/net80211/ieee80211.h#25 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_freebsd.c#30 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_freebsd.h#33 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_ht.c#6 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_ht.h#5 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_input.c#111 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#83 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.h#44 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_node.c#97 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_node.h#50 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_output.c#78 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_power.c#10 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_proto.c#62 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_proto.h#40 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_regdomain.c#8 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_var.h#61 integrate .. //depot/projects/wifi/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c#9 integrate .. //depot/projects/wifi/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#10 integrate .. //depot/projects/wifi/sys/netgraph/ng_base.c#26 integrate .. //depot/projects/wifi/sys/netgraph/ng_ppp.c#12 integrate .. //depot/projects/wifi/sys/netinet/ip_fw2.c#31 integrate .. //depot/projects/wifi/sys/netinet/sctp.h#13 integrate .. //depot/projects/wifi/sys/netinet/sctp_asconf.c#13 integrate .. //depot/projects/wifi/sys/netinet/sctp_asconf.h#7 integrate .. //depot/projects/wifi/sys/netinet/sctp_auth.c#11 integrate .. //depot/projects/wifi/sys/netinet/sctp_bsd_addr.c#10 integrate .. //depot/projects/wifi/sys/netinet/sctp_cc_functions.c#3 integrate .. //depot/projects/wifi/sys/netinet/sctp_cc_functions.h#2 integrate .. //depot/projects/wifi/sys/netinet/sctp_constants.h#17 integrate .. //depot/projects/wifi/sys/netinet/sctp_header.h#6 integrate .. //depot/projects/wifi/sys/netinet/sctp_indata.c#19 integrate .. //depot/projects/wifi/sys/netinet/sctp_input.c#21 integrate .. //depot/projects/wifi/sys/netinet/sctp_lock_bsd.h#7 integrate .. //depot/projects/wifi/sys/netinet/sctp_os.h#7 integrate .. //depot/projects/wifi/sys/netinet/sctp_os_bsd.h#16 integrate .. //depot/projects/wifi/sys/netinet/sctp_output.c#19 integrate .. //depot/projects/wifi/sys/netinet/sctp_output.h#7 integrate .. //depot/projects/wifi/sys/netinet/sctp_pcb.c#22 integrate .. //depot/projects/wifi/sys/netinet/sctp_pcb.h#13 integrate .. //depot/projects/wifi/sys/netinet/sctp_peeloff.c#11 integrate .. //depot/projects/wifi/sys/netinet/sctp_structs.h#13 integrate .. //depot/projects/wifi/sys/netinet/sctp_sysctl.c#9 integrate .. //depot/projects/wifi/sys/netinet/sctp_sysctl.h#6 integrate .. //depot/projects/wifi/sys/netinet/sctp_timer.c#15 integrate .. //depot/projects/wifi/sys/netinet/sctp_timer.h#6 integrate .. //depot/projects/wifi/sys/netinet/sctp_uio.h#14 integrate .. //depot/projects/wifi/sys/netinet/sctp_usrreq.c#19 integrate .. //depot/projects/wifi/sys/netinet/sctp_var.h#10 integrate .. //depot/projects/wifi/sys/netinet/sctputil.c#21 integrate .. //depot/projects/wifi/sys/netinet/sctputil.h#14 integrate .. //depot/projects/wifi/sys/netinet/tcp_input.c#32 integrate .. //depot/projects/wifi/sys/netinet/tcp_subr.c#36 integrate .. //depot/projects/wifi/sys/netinet/tcp_timer.c#18 integrate .. //depot/projects/wifi/sys/netinet/tcp_timer.h#9 integrate .. //depot/projects/wifi/sys/netinet/tcp_usrreq.c#29 integrate .. //depot/projects/wifi/sys/netinet/tcp_var.h#24 integrate .. //depot/projects/wifi/sys/netinet/udp_usrreq.c#25 integrate .. //depot/projects/wifi/sys/netinet6/sctp6_usrreq.c#18 integrate .. //depot/projects/wifi/sys/netinet6/sctp6_var.h#7 integrate .. //depot/projects/wifi/sys/netinet6/udp6_usrreq.c#13 integrate .. //depot/projects/wifi/sys/netipsec/ipsec_input.c#7 integrate .. //depot/projects/wifi/sys/pci/agp_i810.c#8 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/uma_machdep.c#3 integrate .. //depot/projects/wifi/sys/security/mac/mac_framework.h#6 integrate .. //depot/projects/wifi/sys/security/mac/mac_policy.h#7 integrate .. //depot/projects/wifi/sys/security/mac/mac_vfs.c#10 integrate .. //depot/projects/wifi/sys/security/mac_biba/mac_biba.c#14 integrate .. //depot/projects/wifi/sys/security/mac_bsdextended/mac_bsdextended.c#12 integrate .. //depot/projects/wifi/sys/security/mac_lomac/mac_lomac.c#12 integrate .. //depot/projects/wifi/sys/security/mac_mls/mac_mls.c#13 integrate .. //depot/projects/wifi/sys/security/mac_stub/mac_stub.c#15 integrate .. //depot/projects/wifi/sys/security/mac_test/mac_test.c#14 integrate .. //depot/projects/wifi/sys/sparc64/fhc/fhc.c#9 integrate .. //depot/projects/wifi/sys/sparc64/include/bus_common.h#3 integrate .. //depot/projects/wifi/sys/sparc64/include/intr_machdep.h#5 integrate .. //depot/projects/wifi/sys/sparc64/pci/psycho.c#13 integrate .. //depot/projects/wifi/sys/sparc64/pci/psychoreg.h#7 integrate .. //depot/projects/wifi/sys/sparc64/sbus/sbus.c#14 integrate .. //depot/projects/wifi/sys/sparc64/sbus/sbusreg.h#4 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/exception.S#7 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/genassym.c#7 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/intr_machdep.c#7 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/tick.c#7 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/upa.c#5 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/vm_machdep.c#9 integrate .. //depot/projects/wifi/sys/sun4v/mdesc/mdesc_init.c#2 integrate .. //depot/projects/wifi/sys/sun4v/sun4v/vm_machdep.c#4 integrate .. //depot/projects/wifi/sys/sys/callout.h#5 integrate .. //depot/projects/wifi/sys/sys/lock_profile.h#6 integrate .. //depot/projects/wifi/sys/sys/mbuf.h#26 integrate .. //depot/projects/wifi/sys/sys/mount.h#22 integrate .. //depot/projects/wifi/sys/sys/proc.h#35 integrate .. //depot/projects/wifi/sys/sys/socket.h#11 integrate .. //depot/projects/wifi/sys/sys/user.h#9 integrate .. //depot/projects/wifi/sys/ufs/ffs/ffs_alloc.c#15 integrate .. //depot/projects/wifi/sys/vm/device_pager.c#6 integrate .. //depot/projects/wifi/sys/vm/phys_pager.c#7 integrate .. //depot/projects/wifi/sys/vm/vm_glue.c#16 integrate .. //depot/projects/wifi/sys/vm/vm_map.c#20 integrate .. //depot/projects/wifi/sys/vm/vm_map.h#5 integrate .. //depot/projects/wifi/sys/vm/vm_mmap.c#15 integrate .. //depot/projects/wifi/sys/vm/vm_pageout.c#20 integrate .. //depot/projects/wifi/tools/build/options/WITHOUT_ZONEINFO#1 branch .. //depot/projects/wifi/tools/regression/geom_eli/init-a.t#2 integrate .. //depot/projects/wifi/tools/regression/geom_eli/init.t#3 integrate .. //depot/projects/wifi/tools/regression/geom_eli/integrity-copy.t#2 integrate .. //depot/projects/wifi/tools/regression/geom_eli/integrity-data.t#2 integrate .. //depot/projects/wifi/tools/regression/geom_eli/integrity-hmac.t#2 integrate .. //depot/projects/wifi/tools/regression/geom_eli/onetime-a.t#2 integrate .. //depot/projects/wifi/tools/regression/geom_eli/onetime.t#3 integrate .. //depot/projects/wifi/tools/regression/priv/Makefile#2 integrate .. //depot/projects/wifi/tools/regression/priv/main.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/main.h#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_acct.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_adjtime.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_audit_control.c#1 branch .. //depot/projects/wifi/tools/regression/priv/priv_audit_getaudit.c#1 branch .. //depot/projects/wifi/tools/regression/priv/priv_audit_setaudit.c#1 branch .. //depot/projects/wifi/tools/regression/priv/priv_audit_submit.c#1 branch .. //depot/projects/wifi/tools/regression/priv/priv_clock_settime.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_cred.c#1 branch .. //depot/projects/wifi/tools/regression/priv/priv_io.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_kenv_set.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_kenv_unset.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_msgbuf.c#1 branch .. //depot/projects/wifi/tools/regression/priv/priv_netinet_raw.c#1 branch .. //depot/projects/wifi/tools/regression/priv/priv_proc_setlogin.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_proc_setrlimit.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_sched_rtprio.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_sched_setpriority.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_settimeofday.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_sysctl_write.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vfs_admin.c#2 delete .. //depot/projects/wifi/tools/regression/priv/priv_vfs_chflags.c#1 branch .. //depot/projects/wifi/tools/regression/priv/priv_vfs_chmod.c#1 branch .. //depot/projects/wifi/tools/regression/priv/priv_vfs_chown.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vfs_chroot.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vfs_clearsugid.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vfs_extattr_system.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vfs_fhopen.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vfs_fhstat.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vfs_fhstatfs.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vfs_generation.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vfs_getfh.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vfs_read_write.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vfs_setgid.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vfs_stickyfile.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vfs_utimes.c#1 branch .. //depot/projects/wifi/tools/regression/priv/priv_vm_madv_protect.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vm_mlock.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/priv_vm_munlock.c#2 integrate .. //depot/projects/wifi/tools/regression/priv/test_utimes.c#2 delete .. //depot/projects/wifi/tools/tools/tinybsd/conf/bridge/TINYBSD#2 integrate .. //depot/projects/wifi/tools/tools/tinybsd/conf/default/TINYBSD#2 integrate .. //depot/projects/wifi/tools/tools/tinybsd/conf/firewall/TINYBSD#2 integrate .. //depot/projects/wifi/tools/tools/tinybsd/conf/minimal/TINYBSD#2 integrate .. //depot/projects/wifi/tools/tools/tinybsd/conf/vpn/TINYBSD#2 integrate .. //depot/projects/wifi/tools/tools/tinybsd/conf/wireless/TINYBSD#2 integrate .. //depot/projects/wifi/tools/tools/tinybsd/conf/wrap/TINYBSD#2 integrate .. //depot/projects/wifi/tools/tools/tinybsd/tinybsd#2 integrate .. //depot/projects/wifi/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c#4 integrate .. //depot/projects/wifi/usr.bin/calendar/calendars/calendar.computer#2 integrate .. //depot/projects/wifi/usr.bin/calendar/calendars/calendar.dutch#2 integrate .. //depot/projects/wifi/usr.bin/calendar/calendars/calendar.holiday#7 integrate .. //depot/projects/wifi/usr.bin/netstat/sctp.c#5 integrate .. //depot/projects/wifi/usr.bin/rpcgen/rpc_main.c#6 integrate .. //depot/projects/wifi/usr.bin/rpcgen/rpc_svcout.c#7 integrate .. //depot/projects/wifi/usr.bin/systat/pigs.c#5 integrate .. //depot/projects/wifi/usr.bin/tar/bsdtar.c#13 integrate .. //depot/projects/wifi/usr.bin/top/machine.c#9 integrate .. //depot/projects/wifi/usr.bin/top/top.local.1#2 integrate .. //depot/projects/wifi/usr.sbin/kbdmap/kbdmap.c#5 integrate .. //depot/projects/wifi/usr.sbin/periodic/periodic.8#5 integrate .. //depot/projects/wifi/usr.sbin/pkg_install/add/extract.c#4 integrate .. //depot/projects/wifi/usr.sbin/wpa/ndis_events/ndis_events.8#5 integrate Differences ... ==== //depot/projects/wifi/ObsoleteFiles.inc#23 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.94 2007/06/05 01:10:47 delphij Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.111 2007/09/14 03:07:22 jkoshy Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -399,6 +399,10 @@ OLD_FILES+=usr/share/man/man1/omshell.1.gz OLD_FILES+=usr/share/man/man5/dhcp-eval.5.gz # 200504XX: ipf tools moved from /usr to / +OLD_FILES+=rescue/ipfs +OLD_FILES+=rescue/ipfstat +OLD_FILES+=rescue/ipmon +OLD_FILES+=rescue/ipnat OLD_FILES+=usr/sbin/ipftest OLD_FILES+=usr/sbin/ipresend OLD_FILES+=usr/sbin/ipsend @@ -430,6 +434,7 @@ OLD_FILES+=usr/libexec/getNAME # 200411XX: gvinum replaces vinum OLD_FILES+=bin/vinum +OLD_FILES+=rescue/vinum OLD_FILES+=sbin/vinum OLD_FILES+=usr/share/man/man8/vinum.8.gz # 200411XX: libxpg4 removal @@ -2898,7 +2903,6 @@ OLD_FILES+=usr/share/man/man4/uaudio.4.gz OLD_FILES+=usr/share/man/man4/utf2.4.gz OLD_FILES+=usr/share/man/man4/vinumdebug.4.gz -OLD_FILES+=usr/share/man/man5/ar.5.gz OLD_FILES+=usr/share/man/man5/disklabel.5.gz OLD_FILES+=usr/share/man/man5/dm.conf.5.gz OLD_FILES+=usr/share/man/man5/ranlib.5.gz ==== //depot/projects/wifi/bin/ps/print.c#3 (text+ko) ==== @@ -34,7 +34,7 @@ #endif #include -__FBSDID("$FreeBSD: src/bin/ps/print.c,v 1.94 2006/02/21 13:02:18 cognet Exp $"); +__FBSDID("$FreeBSD: src/bin/ps/print.c,v 1.95 2007/09/17 05:27:18 jeff Exp $"); #include #include @@ -197,14 +197,13 @@ void state(KINFO *k, VARENT *ve) { - int flag, sflag, tdflags; + int flag, tdflags; char *cp; VAR *v; char buf[16]; v = ve->var; flag = k->ki_p->ki_flag; - sflag = k->ki_p->ki_sflag; tdflags = k->ki_p->ki_tdflags; /* XXXKSE */ cp = buf; @@ -242,7 +241,7 @@ *cp = '?'; } cp++; - if (!(sflag & PS_INMEM)) + if (!(flag & P_INMEM)) *cp++ = 'W'; if (k->ki_p->ki_nice < NZERO) *cp++ = '<'; @@ -591,7 +590,7 @@ #define fxtofl(fixpt) ((double)(fixpt) / fscale) /* XXX - I don't like this */ - if (k->ki_p->ki_swtime == 0 || (k->ki_p->ki_sflag & PS_INMEM) == 0) + if (k->ki_p->ki_swtime == 0 || (k->ki_p->ki_flag & P_INMEM) == 0) return (0.0); if (rawcpu) return (100.0 * fxtofl(k->ki_p->ki_pctcpu)); @@ -619,7 +618,7 @@ if (failure) return (0.0); - if ((k->ki_p->ki_sflag & PS_INMEM) == 0) + if ((k->ki_p->ki_flag & P_INMEM) == 0) return (0.0); /* XXX want pmap ptpages, segtab, etc. (per architecture) */ /* XXX don't have info about shared */ ==== //depot/projects/wifi/bin/ps/ps.c#5 (text+ko) ==== @@ -47,7 +47,7 @@ #endif #include -__FBSDID("$FreeBSD: src/bin/ps/ps.c,v 1.110 2005/02/09 17:37:38 ru Exp $"); +__FBSDID("$FreeBSD: src/bin/ps/ps.c,v 1.111 2007/09/17 05:27:18 jeff Exp $"); #include #include @@ -994,13 +994,13 @@ return (s); } -#define UREADOK(ki) (forceuread || (ki->ki_p->ki_sflag & PS_INMEM)) +#define UREADOK(ki) (forceuread || (ki->ki_p->ki_flag & P_INMEM)) static void saveuser(KINFO *ki) { - if (ki->ki_p->ki_sflag & PS_INMEM) { + if (ki->ki_p->ki_flag & P_INMEM) { /* * The u-area might be swapped out, and we can't get * at it because we have a crashdump and no swap. ==== //depot/projects/wifi/contrib/less/main.c#8 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/contrib/less/main.c,v 1.11 2007/08/13 16:15:26 delphij Exp $ */ +/* $FreeBSD: src/contrib/less/main.c,v 1.12 2007/09/04 13:54:09 delphij Exp $ */ /* * Copyright (C) 1984-2007 Mark Nudelman * @@ -244,7 +244,7 @@ quit(QUIT_OK); } - if (missing_cap && !know_dumb) + if (missing_cap && !know_dumb && !less_is_more) error("WARNING: terminal is not fully functional", NULL_PARG); init_mark(); open_getchr(); ==== //depot/projects/wifi/etc/defaults/rc.conf#32 (text+ko) ==== @@ -15,7 +15,7 @@ # For a more detailed explanation of all the rc.conf variables, please # refer to the rc.conf(5) manual page. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.316 2007/06/12 17:33:23 gshapiro Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.317 2007/09/06 21:00:48 mlaier Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -154,6 +154,8 @@ pflog_logfile="/var/log/pflog" # where pflogd should store the logfile pflog_program="/sbin/pflogd" # where the pflogd program lives pflog_flags="" # additional flags for pflogd +ftpproxy_enable="NO" # Set to YES to enable ftp-proxy(8) for pf +ftpproxy_flags="" # additional flags for ftp-proxy(8) pfsync_enable="NO" # Expose pf state to other hosts for syncing pfsync_syncdev="" # Interface for pfsync to work through pfsync_syncpeer="" # IP address of pfsync peer host ==== //depot/projects/wifi/etc/namedb/named.conf#7 (text+ko) ==== @@ -1,4 +1,4 @@ -// $FreeBSD: src/etc/namedb/named.conf,v 1.25 2007/08/02 09:18:53 dougb Exp $ +// $FreeBSD: src/etc/namedb/named.conf,v 1.26 2007/08/17 04:37:02 dougb Exp $ // // Refer to the named.conf(5) and named(8) man pages, and the documentation // in /usr/share/doc/bind9 for more details. @@ -68,6 +68,12 @@ 2. No spurious traffic will be sent from your network to the roots 3. Greater resilience to any potential root server failure/DDoS + On the other hand, this method requires more monitoring than the + hints file to be sure that an unexpected failure mode has not + incapacitated your server. Name servers that are serving a lot + of clients will benefit more from this approach than individual + hosts. Use with caution. + To use this mechanism, uncomment the entries below, and comment the hint zone above. */ @@ -76,9 +82,7 @@ type slave; file "slave/root.slave"; masters { - 192.33.4.12; // C.ROOT-SERVERS.NET. - 192.112.36.4; // G.ROOT-SERVERS.NET. - 193.0.14.129; // K.ROOT-SERVERS.NET. + 192.5.5.241; // F.ROOT-SERVERS.NET. }; notify no; }; @@ -86,9 +90,7 @@ type slave; file "slave/arpa.slave"; masters { - 192.33.4.12; // C.ROOT-SERVERS.NET. - 192.112.36.4; // G.ROOT-SERVERS.NET. - 193.0.14.129; // K.ROOT-SERVERS.NET. + 192.5.5.241; // F.ROOT-SERVERS.NET. }; notify no; }; @@ -96,9 +98,7 @@ type slave; file "slave/in-addr.arpa.slave"; masters { - 192.33.4.12; // C.ROOT-SERVERS.NET. - 192.112.36.4; // G.ROOT-SERVERS.NET. - 193.0.14.129; // K.ROOT-SERVERS.NET. + 192.5.5.241; // F.ROOT-SERVERS.NET. }; notify no; }; @@ -155,9 +155,9 @@ // TEST-NET for Documentation (RFC 3330) zone "2.0.192.in-addr.arpa" { type master; file "master/empty.db"; }; -// Router Benchmark Testing (RFC 2544) -zone "18.192.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "19.192.in-addr.arpa" { type master; file "master/empty.db"; }; +// Router Benchmark Testing (RFC 3330) +zone "18.198.in-addr.arpa" { type master; file "master/empty.db"; }; +zone "19.198.in-addr.arpa" { type master; file "master/empty.db"; }; // IANA Reserved - Old Class E Space zone "240.in-addr.arpa" { type master; file "master/empty.db"; }; ==== //depot/projects/wifi/etc/rc.d/Makefile#20 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.81 2007/04/09 19:21:27 pjd Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.83 2007/09/07 15:44:09 mlaier Exp $ .include @@ -11,7 +11,7 @@ devd devfs dhclient \ dmesg dumpon \ early.sh encswap \ - fsck ftpd \ + fsck ftp-proxy ftpd \ gbde geli geli2 \ hcsecd \ hostapd hostid hostname \ @@ -20,7 +20,7 @@ ipnat ipsec ipxrouted isdnd \ jail \ kadmind kerberos kernel keyserv kldxref kpasswdd \ - ldconfig local localpkg lpd \ + ldconfig local localpkg lockd lpd \ mixer motd mountcritlocal mountcritremote mountlate \ mdconfig mdconfig2 mountd moused mroute6d mrouted msgs \ named natd netif netoptions \ @@ -33,7 +33,7 @@ random rarpd resolv root \ route6d routed routing rpcbind rtadvd rwho \ savecore sdpd securelevel sendmail \ - serial sppp swap1 \ + serial sppp statd swap1 \ syscons sysctl syslogd \ timed tmp \ ugidfw \ ==== //depot/projects/wifi/etc/rc.d/lockd#2 (text+ko) ==== @@ -1,22 +1,28 @@ #!/bin/sh # # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/lockd,v 1.14 2007/05/17 08:57:14 mtm Exp $ +# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm +# $FreeBSD: src/etc/rc.d/lockd,v 1.18 2007/09/03 02:02:31 mtm Exp $ # -# PROVIDE: nfslocking -# REQUIRE: nfsserver nfsclient nfsd rpcbind +# PROVIDE: lockd +# REQUIRE: nfsserver nfsclient nfsd rpcbind statd # BEFORE: DAEMON # KEYWORD: nojail . /etc/rc.subr -# Save the (one) commandline argument in case it gets clobbered. -arg=$1 +name="lockd" +rcvar=rpc_lockd_enable +command="/usr/sbin/rpc.${name}" +start_precmd='lockd_precmd' +stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' +status_precmd=$stop_precmd -# Either NFS client or server must be enabled and rpcbind(8) must be started. +# Make sure that we are either an NFS client or server, and that we get +# the correct flags from rc.conf(5). # -nfslocking_precmd() +lockd_precmd() { local ret ret=0 @@ -30,34 +36,9 @@ then force_depend rpcbind || ret=1 fi - - if [ $name = "statd" ] - then - rc_flags=${rpc_statd_flags} - elif [ $name = "lockd" ] - then - rc_flags=${rpc_lockd_flags} - fi - + rc_flags=${rpc_lockd_flags} return ${ret} } -start_precmd="nfslocking_precmd" -stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' -status_precmd=$stop_precmd - -# rpc.statd -# -name="statd" -rcvar=rpc_statd_enable -command="/usr/sbin/rpc.${name}" -load_rc_config $name -run_rc_command "$arg" - -# rpc.lockd -# -name="lockd" -rcvar=rpc_lockd_enable -command="/usr/sbin/rpc.${name}" load_rc_config $name -run_rc_command "$arg" +run_rc_command $1 ==== //depot/projects/wifi/etc/rc.d/mdconfig#3 (text) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.d/mdconfig,v 1.4 2006/12/31 10:37:18 yar Exp $ +# $FreeBSD: src/etc/rc.d/mdconfig,v 1.5 2007/08/25 00:19:17 matteo Exp $ # # PROVIDE: mdconfig @@ -115,6 +115,8 @@ fi if [ "${_file}" != "${_file%.uzip}" ]; then load_kld -m g_uzip geom_uzip || return 3 + # sleep a bit to allow creation of /dev/mdX.uzip + sleep 2 fi fi if mdconfig -l -u ${_md} >/dev/null 2>&1; then ==== //depot/projects/wifi/etc/rc.d/nfslocking#4 (text+ko) ==== @@ -1,13 +1,13 @@ #!/bin/sh # # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/nfslocking,v 1.14 2007/05/17 08:57:14 mtm Exp $ +# $FreeBSD: src/etc/rc.d/nfslocking,v 1.15 2007/08/17 07:58:26 mtm Exp $ # # PROVIDE: nfslocking # REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON -# KEYWORD: nojail +# KEYWORD: nojail nostart . /etc/rc.subr ==== //depot/projects/wifi/etc/rc.d/statd#2 (text+ko) ==== @@ -1,22 +1,28 @@ #!/bin/sh # # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/statd,v 1.14 2007/05/17 08:57:14 mtm Exp $ +# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm Exp +# $FreeBSD: src/etc/rc.d/statd,v 1.17 2007/08/18 04:08:53 mtm Exp $ # -# PROVIDE: nfslocking +# PROVIDE: statd # REQUIRE: nfsserver nfsclient nfsd rpcbind # BEFORE: DAEMON # KEYWORD: nojail . /etc/rc.subr -# Save the (one) commandline argument in case it gets clobbered. -arg=$1 +name="statd" +rcvar=rpc_statd_enable +command="/usr/sbin/rpc.${name}" +start_precmd='statd_precmd' +stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' +status_precmd=$stop_precmd -# Either NFS client or server must be enabled and rpcbind(8) must be started. +# Make sure that we are either an NFS client or server, and that we get +# the correct flags from rc.conf(5). # -nfslocking_precmd() +statd_precmd() { local ret ret=0 @@ -30,34 +36,9 @@ then force_depend rpcbind || ret=1 fi - - if [ $name = "statd" ] - then - rc_flags=${rpc_statd_flags} - elif [ $name = "lockd" ] - then - rc_flags=${rpc_lockd_flags} - fi - + rc_flags=${rpc_statd_flags} return ${ret} } -start_precmd="nfslocking_precmd" -stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' -status_precmd=$stop_precmd - -# rpc.statd -# -name="statd" -rcvar=rpc_statd_enable -command="/usr/sbin/rpc.${name}" load_rc_config $name -run_rc_command "$arg" - -# rpc.lockd -# -name="lockd" -rcvar=rpc_lockd_enable -command="/usr/sbin/rpc.${name}" -load_rc_config $name -run_rc_command "$arg" +run_rc_command $1 ==== //depot/projects/wifi/etc/services#5 (text+ko) ==== @@ -16,7 +16,7 @@ # Kerberos services are for Kerberos v4, and are unofficial. Sites running # v5 should uncomment v5 entries and comment v4 entries. # -# $FreeBSD: src/etc/services,v 1.110 2007/05/20 03:57:47 grog Exp $ +# $FreeBSD: src/etc/services,v 1.112 2007/09/08 08:56:01 mr Exp $ # From: @(#)services 5.8 (Berkeley) 5/9/91 # # WELL KNOWN PORT NUMBERS @@ -2186,6 +2186,8 @@ sj3 3086/tcp #SJ3 (kanji input) vmodem 3141/tcp vmodem 3141/udp +iscsi-target 3260/tcp # iSCSI port +iscsi-target 3260/udp # iSCSI port ccmail 3264/tcp #cc:mail/lotus ccmail 3264/udp #cc:mail/lotus dec-notes 3333/tcp #DEC Notes @@ -2326,6 +2328,10 @@ montage-lm 6147/udp #Montage License Manager ricardo-lm 6148/tcp #Ricardo North America License Manager ricardo-lm 6148/udp #Ricardo North America License Manager +sge_qmaster 6444/tcp #Grid Engine Qmaster Service +sge_qmaster 6444/udp #Grid Engine Qmaster Service +sge_execd 6445/tcp #Grid Engine Execution Service +sge_execd 6445/upd #Grid Engine Execution Service xdsxdm 6558/tcp xdsxdm 6558/udp ircd 6667/tcp #Internet Relay Chat (unoffical) ==== //depot/projects/wifi/gnu/lib/libdialog/dialog.h#2 (text+ko) ==== @@ -22,7 +22,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $FreeBSD: src/gnu/lib/libdialog/dialog.h,v 1.22 2000/12/14 02:35:22 jkh Exp $ + * $FreeBSD: src/gnu/lib/libdialog/dialog.h,v 1.23 2007/08/24 16:26:24 ache Exp $ * */ @@ -74,7 +74,7 @@ } dialogMenuItem; #define VERSION "0.4" -#define MAX_LEN 2048 +#define MAX_LEN 4096 #ifndef TRUE #define TRUE (1) ==== //depot/projects/wifi/gnu/lib/libstdc++/Makefile#8 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/lib/libstdc++/Makefile,v 1.60 2007/05/19 15:41:01 kan Exp $ +# $FreeBSD: src/gnu/lib/libstdc++/Makefile,v 1.61 2007/08/16 23:02:00 kan Exp $ GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs @@ -143,10 +143,10 @@ stdio_filebuf.h stdio_sync_filebuf.h functional \ hash_map hash_set hash_fun.h hashtable.h iterator \ malloc_allocator.h memory mt_allocator.h new_allocator.h \ - numeric pod_char_traits.h pool_allocator.h rb_tree rope \ - ropeimpl.h slist throw_allocator.h typelist.h type_traits.h \ - rc_string_base.h sso_string_base.h vstring.h vstring.tcc \ - vstring_fwd.h vstring_util.h + numeric numeric_traits.h pod_char_traits.h pool_allocator.h \ + rb_tree rope ropeimpl.h slist throw_allocator.h typelist.h \ + type_traits.h rc_string_base.h sso_string_base.h vstring.h \ + vstring.tcc vstring_fwd.h vstring_util.h EXTHDRS:= ${EXTHDRS:S;^;${SRCDIR}/include/ext/;} EXTHDRSDIR= ${CXXINCLUDEDIR}/ext ==== //depot/projects/wifi/gnu/usr.bin/cc/cc_int/Makefile#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/cc/cc_int/Makefile,v 1.51 2007/05/19 04:25:57 kan Exp $ +# $FreeBSD: src/gnu/usr.bin/cc/cc_int/Makefile,v 1.52 2007/09/18 23:34:42 cognet Exp $ .include "../Makefile.inc" .include "../Makefile.ver" @@ -75,6 +75,10 @@ # Target specific, C specific object file C_TARGET_OBJS= +.if ${TARGET_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN) +CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END +.endif + # Language-specific object files for C and Objective C. C_AND_OBJC_OBJS = attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Sep 19 05:02:01 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 920DD16A41A; Wed, 19 Sep 2007 05:02:01 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F39C16A418 for ; Wed, 19 Sep 2007 05:02:01 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D470D13C457 for ; Wed, 19 Sep 2007 05:02:00 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8J520kR075234 for ; Wed, 19 Sep 2007 05:02:00 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8J520k1075230 for perforce@freebsd.org; Wed, 19 Sep 2007 05:02:00 GMT (envelope-from sam@freebsd.org) Date: Wed, 19 Sep 2007 05:02:00 GMT Message-Id: <200709190502.l8J520k1075230@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 126590 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2007 05:02:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=126590 Change 126590 by sam@sam_ebb on 2007/09/19 05:01:27 revert experimental polling and sx lock stuff Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#152 edit .. //depot/projects/wifi/sys/dev/ath/if_ath_pci.c#16 edit .. //depot/projects/wifi/sys/dev/ath/if_athvar.h#60 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#152 (text+ko) ==== @@ -37,9 +37,6 @@ * is greatly appreciated. */ -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" -#endif #include "opt_inet.h" #include "opt_ath.h" @@ -49,7 +46,7 @@ #include #include #include -#include +#include #include #include #include @@ -104,6 +101,7 @@ static void ath_init(void *); static void ath_stop_locked(struct ifnet *); +static void ath_stop(struct ifnet *); static void ath_start(struct ifnet *); static int ath_reset(struct ifnet *); static int ath_media_change(struct ifnet *); @@ -497,7 +495,6 @@ IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; IFQ_SET_READY(&ifp->if_snd); - ifp->if_capabilities |= IFCAP_POLLING; ic->ic_ifp = ifp; ic->ic_reset = ath_reset; @@ -657,23 +654,14 @@ } int -ath_detach(struct ath_softc *sc, struct resource *irq, void *irq_handler) +ath_detach(struct ath_softc *sc) { struct ifnet *ifp = sc->sc_ifp; DPRINTF(sc, ATH_DEBUG_ANY, "%s: if_flags %x\n", __func__, ifp->if_flags); -#ifdef DEVICE_POLLING - if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); -#endif - ATH_LOCK(sc); - ath_stop_locked(ifp); - ATH_UNLOCK(sc); - - bus_teardown_intr(sc->sc_dev, irq, irq_handler); - + ath_stop(ifp); bpfdetach(ifp); /* * NB: the order of these is important: @@ -710,31 +698,25 @@ DPRINTF(sc, ATH_DEBUG_ANY, "%s: if_flags %x\n", __func__, ifp->if_flags); - ATH_LOCK(sc); - ath_stop_locked(ifp); - ath_hal_setpower(sc->sc_ah, HAL_PM_FULL_SLEEP); - ATH_UNLOCK(sc); + ath_stop(ifp); } void ath_resume(struct ath_softc *sc) { struct ifnet *ifp = sc->sc_ifp; - struct ath_hal *ah = sc->sc_ah; DPRINTF(sc, ATH_DEBUG_ANY, "%s: if_flags %x\n", __func__, ifp->if_flags); - ath_hal_setpower(ah, HAL_PM_AWAKE); - if (ifp->if_flags & IFF_UP) { ath_init(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) ath_start(ifp); } if (sc->sc_softled) { - ath_hal_gpioCfgOutput(ah, sc->sc_ledpin); - ath_hal_gpioset(ah, sc->sc_ledpin, !sc->sc_ledon); + ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin); + ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon); } } @@ -746,40 +728,16 @@ DPRINTF(sc, ATH_DEBUG_ANY, "%s: if_flags %x\n", __func__, ifp->if_flags); - ATH_LOCK(sc); - ath_stop_locked(ifp); - if (!sc->sc_invalid) { - /* - * Set the chip in full sleep mode. Note that we are - * careful to do this only when bringing the interface - * completely to a stop. When the chip is in this state - * it must be carefully woken up or references to - * registers in the PCI clock domain may freeze the bus - * (and system). This varies by chip and is mostly an - * issue with newer parts that go to sleep more quickly. - */ - ath_hal_setpower(sc->sc_ah, HAL_PM_FULL_SLEEP); - } - ATH_UNLOCK(sc); + ath_stop(ifp); } /* - * Set/enable interrupts. We actually enable - * interrupts only if we are not polling. + * Interrupt handler. Most of the actual processing is deferred. */ -static __inline void -ath_intrset(struct ath_softc *sc, u_int32_t mask) +void +ath_intr(void *arg) { - struct ath_hal *ah = sc->sc_ah; - - if (sc->sc_ifp->if_capenable & IFCAP_POLLING) - mask &= ~HAL_INT_GLOBAL; - ath_hal_intrset(ah, mask); -} - -static void -ath_intr_body(struct ath_softc *sc, int count) -{ + struct ath_softc *sc = arg; struct ifnet *ifp = sc->sc_ifp; struct ath_hal *ah = sc->sc_ah; HAL_INT status; @@ -865,60 +823,11 @@ * clear whatever condition caused the interrupt. */ ath_hal_mibevent(ah, &sc->sc_halstats); - ath_intrset(sc, sc->sc_imask); + ath_hal_intrset(ah, sc->sc_imask); } } } -/* - * Interrupt handler. Most of the actual processing is deferred. - */ -void -ath_intr(void *arg) -{ - struct ath_softc *sc = arg; - struct ifnet *ifp = sc->sc_ifp; - struct ath_hal *ah = sc->sc_ah; - - if (ifp->if_capenable & IFCAP_POLLING) - return; - if (sc->sc_invalid) { - /* - * The hardware is not ready/present, don't touch anything. - * Note this can happen early on if the IRQ is shared. - */ - DPRINTF(sc, ATH_DEBUG_ANY, "%s: invalid; ignored\n", __func__); - return; - } - if (!ath_hal_intrpend(ah)) /* shared irq, not for us */ - return; - if ((ifp->if_flags & IFF_UP) == 0 || - (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { - HAL_INT status; - - DPRINTF(sc, ATH_DEBUG_ANY, "%s: if_flags 0x%x\n", - __func__, ifp->if_flags); - ath_hal_getisr(ah, &status); /* clear ISR */ - ath_hal_intrset(ah, 0); /* disable further intr's */ - return; - } - ath_intr_body(sc, 1); -} - -#ifdef DEVICE_POLLING -/* - * Polling callback. - */ -static void -ath_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) -{ - struct ath_softc *sc = ifp->if_softc; - - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - ath_intr_body(sc, count); -} -#endif - static void ath_fatal_proc(void *arg, int pending) { @@ -1100,7 +1009,7 @@ */ if (sc->sc_needmib && ic->ic_opmode == IEEE80211_M_STA) sc->sc_imask |= HAL_INT_MIB; - ath_intrset(sc, sc->sc_imask); + ath_hal_intrset(ah, sc->sc_imask); ifp->if_drv_flags |= IFF_DRV_RUNNING; ic->ic_state = IEEE80211_S_INIT; @@ -1179,6 +1088,28 @@ } } +static void +ath_stop(struct ifnet *ifp) +{ + struct ath_softc *sc = ifp->if_softc; + + ATH_LOCK(sc); + ath_stop_locked(ifp); + if (!sc->sc_invalid) { + /* + * Set the chip in full sleep mode. Note that we are + * careful to do this only when bringing the interface + * completely to a stop. When the chip is in this state + * it must be carefully woken up or references to + * registers in the PCI clock domain may freeze the bus + * (and system). This varies by chip and is mostly an + * issue with newer parts that go to sleep more quickly. + */ + ath_hal_setpower(sc->sc_ah, HAL_PM_FULL_SLEEP); + } + ATH_UNLOCK(sc); +} + /* * Reset the hardware w/o losing operational state. This is * basically a more efficient way of doing ath_stop, ath_init, @@ -1221,7 +1152,7 @@ ath_chan_change(sc, ic->ic_curchan); if (ic->ic_state == IEEE80211_S_RUN) ath_beacon_config(sc); /* restart beacons */ - ath_intrset(sc, sc->sc_imask); + ath_hal_intrset(ah, sc->sc_imask); ath_start(ifp); /* restart xmit */ return 0; @@ -2977,7 +2908,7 @@ ath_hal_intrset(ah, 0); ath_hal_beacontimers(ah, &bs); sc->sc_imask |= HAL_INT_BMISS; - ath_intrset(sc, sc->sc_imask); + ath_hal_intrset(ah, sc->sc_imask); } else { ath_hal_intrset(ah, 0); if (nexttbtt == intval) @@ -3016,7 +2947,7 @@ } ath_hal_beaconinit(ah, nexttbtt, intval); sc->sc_bmisscount = 0; - ath_intrset(sc, sc->sc_imask); + ath_hal_intrset(ah, sc->sc_imask); /* * When using a self-linked beacon descriptor in * ibss mode load it once here. @@ -5169,7 +5100,7 @@ /* * Re-enable interrupts. */ - ath_intrset(sc, sc->sc_imask); + ath_hal_intrset(ah, sc->sc_imask); } return 0; } @@ -5326,12 +5257,14 @@ * o notify the rate control algorithm */ sc->sc_imask &= ~(HAL_INT_SWBA | HAL_INT_BMISS); - ath_intrset(sc, sc->sc_imask &~ HAL_INT_GLOBAL); + ath_hal_intrset(ah, sc->sc_imask &~ HAL_INT_GLOBAL); +#if 0 + /* XXX can't use taskqueue_drain 'cuz we're holding sc_mtx */ taskqueue_drain(sc->sc_tq, &sc->sc_rxtask); - taskqueue_drain(sc->sc_tq, &sc->sc_txtask); taskqueue_drain(sc->sc_tq, &sc->sc_rxorntask); taskqueue_drain(sc->sc_tq, &sc->sc_bmisstask); taskqueue_drain(sc->sc_tq, &sc->sc_bstucktask); +#endif ath_rate_newstate(sc, nstate); goto done; } @@ -5975,22 +5908,6 @@ ATH_LOCK(sc); break; #endif - case SIOCSIFCAP: -#ifdef DEVICE_POLLING - if ((ifr->ifr_reqcap ^ ifp->if_capenable) & IFCAP_POLLING) { - if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register(ath_poll, ifp); - if (!error) - ifp->if_capenable |= IFCAP_POLLING; - } else { - error = ether_poll_deregister(ifp); - /* NB: enable interrupts even if error */ - ifp->if_capenable &= ~IFCAP_POLLING; - } - ath_intrset(sc, sc->sc_imask); - } -#endif - break; default: error = ieee80211_ioctl(ic, cmd, data); if (error == ENETRESET) { @@ -6192,14 +6109,18 @@ { struct ath_softc *sc = arg1; struct ifnet *ifp = sc->sc_ifp; - u_int rfkill = ath_hal_getrfkill(sc->sc_ah); + struct ath_hal *ah = sc->sc_ah; + u_int rfkill = ath_hal_getrfkill(ah); int error; error = sysctl_handle_int(oidp, &rfkill, 0, req); if (error || !req->newptr) return error; - return !ath_hal_setrfkill(sc->sc_ah, rfkill) ? EINVAL : - (ifp->if_drv_flags & IFF_DRV_RUNNING) ? ath_reset(ifp) : 0; + if (rfkill == ath_hal_getrfkill(ah)) /* unchanged */ + return 0; + if (!ath_hal_setrfkill(ah, rfkill)) + return EINVAL; + return (ifp->if_drv_flags & IFF_DRV_RUNNING) ? ath_reset(ifp) : 0; } static int @@ -6213,7 +6134,11 @@ error = sysctl_handle_int(oidp, &rfsilent, 0, req); if (error || !req->newptr) return error; - return !ath_hal_setrfsilent(sc->sc_ah, rfsilent) ? EINVAL : 0; + if (!ath_hal_setrfsilent(sc->sc_ah, rfsilent)) + return EINVAL; + sc->sc_rfsilentpin = rfsilent & 0x1c; + sc->sc_rfsilentpol = (rfsilent & 0x2) != 0; + return 0; } static int ==== //depot/projects/wifi/sys/dev/ath/if_ath_pci.c#16 (text+ko) ==== @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include @@ -213,9 +213,10 @@ /* check if device was removed */ sc->sc_invalid = !bus_child_present(dev); - ath_detach(sc, psc->sc_irq, psc->sc_ih); + ath_detach(sc); bus_generic_detach(dev); + bus_teardown_intr(dev, psc->sc_irq, psc->sc_ih); bus_release_resource(dev, SYS_RES_IRQ, 0, psc->sc_irq); bus_dma_tag_destroy(sc->sc_dmat); ==== //depot/projects/wifi/sys/dev/ath/if_athvar.h#60 (text+ko) ==== @@ -197,7 +197,7 @@ HAL_BUS_TAG sc_st; /* bus space tag */ HAL_BUS_HANDLE sc_sh; /* bus space handle */ bus_dma_tag_t sc_dmat; /* bus DMA tag */ - struct sx sc_mtx; /* master lock (recursive) */ + struct mtx sc_mtx; /* master lock (recursive) */ struct taskqueue *sc_tq; /* private task queue */ struct ath_hal *sc_ah; /* Atheros HAL */ struct ath_ratectrl *sc_rc; /* tx rate control support */ @@ -321,12 +321,12 @@ #define sc_rx_th u_rx_rt.th #define ATH_LOCK_INIT(_sc) \ - sx_init_flags(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ - SX_RECURSE) -#define ATH_LOCK_DESTROY(_sc) sx_destroy(&(_sc)->sc_mtx) -#define ATH_LOCK(_sc) sx_xlock(&(_sc)->sc_mtx) -#define ATH_UNLOCK(_sc) sx_xunlock(&(_sc)->sc_mtx) -#define ATH_LOCK_ASSERT(_sc) sx_assert(&(_sc)->sc_mtx, SA_LOCKED) + mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ + NULL, MTX_DEF | MTX_RECURSE) +#define ATH_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) +#define ATH_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define ATH_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define ATH_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) #define ATH_TXQ_SETUP(sc, i) ((sc)->sc_txqsetup & (1<sc_txbuflock, MA_OWNED) int ath_attach(u_int16_t, struct ath_softc *); -int ath_detach(struct ath_softc *, struct resource *, void *); +int ath_detach(struct ath_softc *); void ath_resume(struct ath_softc *); void ath_suspend(struct ath_softc *); void ath_shutdown(struct ath_softc *); From owner-p4-projects@FreeBSD.ORG Wed Sep 19 18:03:39 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AD75316A474; Wed, 19 Sep 2007 18:03:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7087516A46C for ; Wed, 19 Sep 2007 18:03:39 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 57A2713C467 for ; Wed, 19 Sep 2007 18:03:39 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8JI3duK068267 for ; Wed, 19 Sep 2007 18:03:39 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8JI3d7R068264 for perforce@freebsd.org; Wed, 19 Sep 2007 18:03:39 GMT (envelope-from sam@freebsd.org) Date: Wed, 19 Sep 2007 18:03:39 GMT Message-Id: <200709191803.l8JI3d7R068264@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 126605 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2007 18:03:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=126605 Change 126605 by sam@sam_ebb on 2007/09/19 18:03:25 Import sephe's broadcom driver. To use it you need v3 firwmare. Stick the uuencoded'd firmware image in sys/contrib/dev/bwi and build the bwifw module. Need to update the bwifw Makefile to craft links so auto-loading works; if you don't do that you must manually load the fw module. Tested only with a 4309 card on amd64. No rate control yet but seems functional in sta and monitor mode. 2.4G only. Beware this is a very hack+slash job; needs lots of tlc before it's a candidate for cvs. Obtained from: dflybsd Affected files ... .. //depot/projects/wifi/sys/conf/files#61 edit .. //depot/projects/wifi/sys/dev/bwi/bitops.h#1 add .. //depot/projects/wifi/sys/dev/bwi/bwimac.c#1 add .. //depot/projects/wifi/sys/dev/bwi/bwimac.h#1 add .. //depot/projects/wifi/sys/dev/bwi/bwiphy.c#1 add .. //depot/projects/wifi/sys/dev/bwi/bwiphy.h#1 add .. //depot/projects/wifi/sys/dev/bwi/bwirf.c#1 add .. //depot/projects/wifi/sys/dev/bwi/bwirf.h#1 add .. //depot/projects/wifi/sys/dev/bwi/if_bwi.c#1 add .. //depot/projects/wifi/sys/dev/bwi/if_bwi_pci.c#1 add .. //depot/projects/wifi/sys/dev/bwi/if_bwireg.h#1 add .. //depot/projects/wifi/sys/dev/bwi/if_bwivar.h#1 add .. //depot/projects/wifi/sys/gnu/dev/bwi/COPYING#1 add .. //depot/projects/wifi/sys/gnu/dev/bwi/README#1 add .. //depot/projects/wifi/sys/gnu/dev/bwi/b43-fwcutter.1#1 add .. //depot/projects/wifi/sys/gnu/dev/bwi/fwcutter.c#1 add .. //depot/projects/wifi/sys/gnu/dev/bwi/fwcutter.h#1 add .. //depot/projects/wifi/sys/gnu/dev/bwi/fwcutter_list.h#1 add .. //depot/projects/wifi/sys/gnu/dev/bwi/md5.c#1 add .. //depot/projects/wifi/sys/gnu/dev/bwi/md5.h#1 add .. //depot/projects/wifi/sys/modules/Makefile#44 edit .. //depot/projects/wifi/sys/modules/bwi/Makefile#1 add .. //depot/projects/wifi/sys/modules/bwifw/Makefile#1 add .. //depot/projects/wifi/sys/modules/bwifw/fwcutter/Makefile#1 add Differences ... ==== //depot/projects/wifi/sys/conf/files#61 (text+ko) ==== @@ -494,6 +494,11 @@ dev/bktr/bktr_os.c optional bktr pci dev/bktr/bktr_tuner.c optional bktr pci dev/bktr/msp34xx.c optional bktr pci +dev/bwi/if_bwi.c optional bwi +dev/bwi/if_bwi_pci.c optional bwi pci +dev/bwi/bwimac.c optional bwi +dev/bwi/bwiphy.c optional bwi +dev/bwi/bwirf.c optional bwi dev/buslogic/bt.c optional bt dev/buslogic/bt_eisa.c optional bt eisa dev/buslogic/bt_isa.c optional bt isa ==== //depot/projects/wifi/sys/modules/Makefile#44 (text+ko) ==== @@ -40,6 +40,7 @@ ${_bios} \ ${_bktr} \ bridgestp \ + bwi \ cam \ ${_canbepm} \ ${_canbus} \ From owner-p4-projects@FreeBSD.ORG Wed Sep 19 18:04:41 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 81E8316A421; Wed, 19 Sep 2007 18:04:41 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FD5D16A41B for ; Wed, 19 Sep 2007 18:04:41 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2731513C467 for ; Wed, 19 Sep 2007 18:04:41 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8JI4fNY068298 for ; Wed, 19 Sep 2007 18:04:41 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8JI4ewr068295 for perforce@freebsd.org; Wed, 19 Sep 2007 18:04:40 GMT (envelope-from sam@freebsd.org) Date: Wed, 19 Sep 2007 18:04:40 GMT Message-Id: <200709191804.l8JI4ewr068295@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 126606 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2007 18:04:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=126606 Change 126606 by sam@sam_ebb on 2007/09/19 18:04:08 update and add bwi Affected files ... .. //depot/projects/wifi/sys/i386/conf/WIFI_DEBUG#2 edit Differences ... ==== //depot/projects/wifi/sys/i386/conf/WIFI_DEBUG#2 (text+ko) ==== @@ -25,7 +25,7 @@ #hints "GENERIC.hints" # Default places to look for devices. -makeoptions MODULES_OVERRIDE="acpi linprocfs procfs ral ural iwi ndis if_ndis wi linux wlan_scan_sta wlan_scan_ap wlan_ifp wlan wlan_wep wlan_ccmp wlan_tkip ath ath_hal ath_rate_sample" +makeoptions MODULES_OVERRIDE="acpi linprocfs procfs ral ural iwi ndis if_ndis wi linux wlan_scan_sta wlan_scan_ap wlan wlan_wep wlan_ccmp wlan_tkip ath ath_hal ath_rate_sample bwi" makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_4BSD # 4BSD scheduler @@ -44,7 +44,7 @@ options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework -options GEOM_GPT # GUID Partition Tables. +#options GEOM_GPT # GUID Partition Tables. options COMPAT_43TTY # BSD 4.3 TTY compat [KEEP THIS!] options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 @@ -203,6 +203,9 @@ # Wireless NIC cards +#device bwi +#device wlan + # Pseudo devices. device loop # Network loopback device random # Entropy device From owner-p4-projects@FreeBSD.ORG Wed Sep 19 18:07:46 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4A12616A421; Wed, 19 Sep 2007 18:07:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D510A16A418 for ; Wed, 19 Sep 2007 18:07:45 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 647A613C46A for ; Wed, 19 Sep 2007 18:07:45 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8JI7jrN068473 for ; Wed, 19 Sep 2007 18:07:45 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8JI7jpo068470 for perforce@freebsd.org; Wed, 19 Sep 2007 18:07:45 GMT (envelope-from sam@freebsd.org) Date: Wed, 19 Sep 2007 18:07:45 GMT Message-Id: <200709191807.l8JI7jpo068470@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 126607 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2007 18:07:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=126607 Change 126607 by sam@sam_ebb on 2007/09/19 18:07:14 placeholder so directory gets created Affected files ... .. //depot/projects/wifi/sys/contrib/dev/bwi/README#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Thu Sep 20 08:29:11 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8AC5716A41B; Thu, 20 Sep 2007 08:29:11 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BB3E16A418 for ; Thu, 20 Sep 2007 08:29:11 +0000 (UTC) (envelope-from anchie@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ED12613C4D9 for ; Thu, 20 Sep 2007 08:29:10 +0000 (UTC) (envelope-from anchie@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8K8TAge098282 for ; Thu, 20 Sep 2007 08:29:10 GMT (envelope-from anchie@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8K8TA6h098278 for perforce@freebsd.org; Thu, 20 Sep 2007 08:29:10 GMT (envelope-from anchie@FreeBSD.org) Date: Thu, 20 Sep 2007 08:29:10 GMT Message-Id: <200709200829.l8K8TA6h098278@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to anchie@FreeBSD.org using -f From: Ana Kukec To: Perforce Change Reviews Cc: Subject: PERFORCE change 126614 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2007 08:29:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=126614 Change 126614 by anchie@anchie_malimis on 2007/09/20 08:28:13 Virtualized structure with control options for Multicast Listener Discovery outgoing packets. Affected files ... .. //depot/projects/vimage/src/sys/netinet6/mld6.c#8 edit .. //depot/projects/vimage/src/sys/netinet6/vinet6.h#13 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet6/mld6.c#8 (text+ko) ==== @@ -105,7 +105,9 @@ */ #define MLD_UNSOLICITED_REPORT_INTERVAL 10 +#ifndef VIMAGE static struct ip6_pktopts ip6_opts; +#endif static void mld6_sendpkt(struct in6_multi *, int, const struct in6_addr *); static void mld_starttimer(struct in6_multi *); @@ -116,6 +118,7 @@ void mld6_init(void) { + INIT_VNET_INET6(curvnet); static u_int8_t hbh_buf[8]; struct ip6_hbh *hbh = (struct ip6_hbh *)hbh_buf; u_int16_t rtalert_code = htons((u_int16_t)IP6OPT_RTALERT_MLD); @@ -130,8 +133,8 @@ hbh_buf[5] = IP6OPT_RTALERT_LEN - 2; bcopy((caddr_t)&rtalert_code, &hbh_buf[6], sizeof(u_int16_t)); - ip6_initpktopts(&ip6_opts); - ip6_opts.ip6po_hbh = hbh; + ip6_initpktopts(&V_ip6_opts); + V_ip6_opts.ip6po_hbh = hbh; } static void @@ -518,7 +521,7 @@ /* increment output statictics */ V_icmp6stat.icp6s_outhist[type]++; - ip6_output(mh, &ip6_opts, NULL, 0, &im6o, &outif, NULL); + ip6_output(mh, &V_ip6_opts, NULL, 0, &im6o, &outif, NULL); if (outif) { icmp6_ifstat_inc(outif, ifs6_out_msg); switch (type) { ==== //depot/projects/vimage/src/sys/netinet6/vinet6.h#13 (text+ko) ==== @@ -154,6 +154,8 @@ int _ip6_temp_regen_advance; int _ip6_use_defzone; + + struct ip6_pktopts _ip6_opts; }; #endif @@ -263,4 +265,6 @@ #define V_ip6_use_defzone VNET_INET6(ip6_use_defzone) +#define V_ip6_opts VNET_INET6(ip6_opts) + #endif /* !_NETINET6_VINET6_H_ */ From owner-p4-projects@FreeBSD.ORG Thu Sep 20 21:22:31 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8F1DC16A4E0; Thu, 20 Sep 2007 21:22:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56F9216A474 for ; Thu, 20 Sep 2007 21:22:31 +0000 (UTC) (envelope-from anchie@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CD90F13C4BD for ; Thu, 20 Sep 2007 21:22:28 +0000 (UTC) (envelope-from anchie@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8KGGeHT057047 for ; Thu, 20 Sep 2007 16:16:40 GMT (envelope-from anchie@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8KGGemb057044 for perforce@freebsd.org; Thu, 20 Sep 2007 16:16:40 GMT (envelope-from anchie@FreeBSD.org) Date: Thu, 20 Sep 2007 16:16:40 GMT Message-Id: <200709201616.l8KGGemb057044@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to anchie@FreeBSD.org using -f From: Ana Kukec To: Perforce Change Reviews Cc: Subject: PERFORCE change 126627 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2007 21:22:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=126627 Change 126627 by anchie@anchie_malimis on 2007/09/20 16:16:36 Added declaration of ip6_gif_hlim variable used in generic kernel. Added macro which supstitutes SYSCTL_V_OID with SYSCTL_OID in case of generic kernel. Affected files ... .. //depot/projects/vimage/src/sys/netinet6/in6_proto.c#21 edit .. //depot/projects/vimage/src/sys/sys/sysctl.h#9 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet6/in6_proto.c#21 (text+ko) ==== @@ -376,6 +376,7 @@ int ip6_hdrnestlimit; /* How many header options will we process? */ int ip6_dad_count; /* DupAddrDetectionTransmits */ int ip6_auto_flowlabel; +int ip6_gif_hlim = 0; int ip6_use_deprecated; /* allow deprecated addr (RFC2462 5.5.4) */ int ip6_rr_prune; /* router renumbering prefix * walk list every 5 sec. */ @@ -527,21 +528,12 @@ rr_prune, CTLFLAG_RW, ip6_rr_prune, 0, ""); SYSCTL_V_INT(V_NET, vnet_inet6, _net_inet6_ip6, IPV6CTL_USETEMPADDR, use_tempaddr, CTLFLAG_RW, ip6_use_tempaddr, 0, ""); -#ifdef VIMAGE SYSCTL_V_OID(V_NET, vnet_inet6, _net_inet6_ip6, IPV6CTL_TEMPPLTIME, temppltime, CTLTYPE_INT|CTLFLAG_RW, ip6_temp_preferred_lifetime, 0, sysctl_ip6_temppltime, "I", ""); SYSCTL_V_OID(V_NET, vnet_inet6, _net_inet6_ip6, IPV6CTL_TEMPVLTIME, tempvltime, CTLTYPE_INT|CTLFLAG_RW, ip6_temp_valid_lifetime, 0, sysctl_ip6_tempvltime, "I", ""); -#else -SYSCTL_OID(_net_inet6_ip6, IPV6CTL_TEMPPLTIME, temppltime, - CTLTYPE_INT|CTLFLAG_RW, &ip6_temp_preferred_lifetime, 0, - sysctl_ip6_temppltime, "I", ""); -SYSCTL_OID(_net_inet6_ip6, IPV6CTL_TEMPVLTIME, tempvltime, - CTLTYPE_INT|CTLFLAG_RW, &ip6_temp_valid_lifetime, 0, - sysctl_ip6_tempvltime, "I", ""); -#endif SYSCTL_V_INT(V_NET, vnet_inet6, _net_inet6_ip6, IPV6CTL_V6ONLY, v6only, CTLFLAG_RW, ip6_v6only, 0, ""); #ifndef VIMAGE ==== //depot/projects/vimage/src/sys/sys/sysctl.h#9 (text+ko) ==== @@ -244,13 +244,19 @@ a1, a2, #name, handler, fmt, 0, __DESCR(descr), 0, 0 }; \ DATA_SET(sysctl_set, sysctl__##parent##_##name) +#ifdef VIMAGE +#define SYSCTL_V_OID(subs, mod, parent, nbr, name, kind, a1, a2, \ + handler, fmt, descr) \ + static struct sysctl_v_oid sysctl__##parent##_##name = { \ + &sysctl_##parent##_children, { 0 }, nbr, kind, \ + (void *) offsetof(struct mod, _##a1), a2, #name, \ + handler, fmt, 0, __DESCR(descr), subs, V_MOD_##mod }; \ + DATA_SET(sysctl_set, sysctl__##parent##_##name) +#else #define SYSCTL_V_OID(subs, mod, parent, nbr, name, kind, a1, a2, \ - handler, fmt, descr) \ - static struct sysctl_v_oid sysctl__##parent##_##name = { \ - &sysctl_##parent##_children, { 0 }, nbr, kind, \ - (void *) offsetof(struct mod, _##a1), a2, #name, \ - handler, fmt, 0, __DESCR(descr), subs, V_MOD_##mod }; \ - DATA_SET(sysctl_set, sysctl__##parent##_##name) + handler, fmt, descr) \ + SYSCTL_OID(parent, nbr, name, kind, &a1, a2, handler, fmt, descr) +#endif #define SYSCTL_ADD_OID(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, descr) \ sysctl_add_oid(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, __DESCR(descr)) From owner-p4-projects@FreeBSD.ORG Sat Sep 22 09:37:49 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6B98116A46E; Sat, 22 Sep 2007 09:37:49 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FFB316A469 for ; Sat, 22 Sep 2007 09:37:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F2B4413C459 for ; Sat, 22 Sep 2007 09:37:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8M9bm3v073016 for ; Sat, 22 Sep 2007 09:37:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8M9bm5d073013 for perforce@freebsd.org; Sat, 22 Sep 2007 09:37:48 GMT (envelope-from hselasky@FreeBSD.org) Date: Sat, 22 Sep 2007 09:37:48 GMT Message-Id: <200709220937.l8M9bm5d073013@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 126687 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2007 09:37:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=126687 Change 126687 by hselasky@hselasky_laptop001 on 2007/09/22 09:36:58 Pre-commit overview (dummy commit) ================================== This is the first of a series of patches for the USB P4 project by me. Be aware that the USB P4 project will not be compilable until I am finished due to USB API / structure changes. Functional changes ================== - multi sub-frame USB transfers (currently only the EHCI + WHCI has hardware support for this) - USB device side support (no real drivers yet, though the framework has been hammered out) - stricter "wMaxPacketSize" filtering - the ucom and usb_cdev layer now supports transferring data directly to/from USB DMA buffers. - factored out MS_TO_TICKS into USBD_MS_TO_TICKS which has 1024 milliseconds per second instead of 1000 to save redundant division. Technical changes ================= - convert kernel USB flags into a bitmap (scripted) - "usbd_transfer_done()" is now part of "usbd_transfer_dequeue()" - remove internal data bounching framework - using DMA'able buffers is now a requirement for all USB drivers - factored out USB root control transfers into "usbd_std_root_transfer()" - passing a mutex to "usbd_do_request_flags()" and all "usbreq_xxx()" functions is now mandatory. - stack usage reduction in general - factored out ADD_BYTES() into USBD_ADD_BYTES() - refactor function parameter passing - use structs instead of passing actual values - pass pointers first then elements decreasing by size, to optimize stack on embedded systems, when possible - cache some string descriptors in "struct usbd_device" - use a common USB control transfer to proxy all USB control transactions per "struct usbd_device". This speeds up USB control transactions alot, hence there is no need to allocate/setup anything when executing a USB control transaction. Style changes (in separate patches) =================================== - subsitute all "u_intXXX" into "uintXXX" - stylish "s/if\(/if \(/g", "s/for\(/for \(/g", "s/while\(/while \(/g", "s/do\(/do \(/g" - tab after "#define" Patches for all of the above and more will follow in pieces with detailed comments. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/README#16 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/README#16 (text+ko) ==== @@ -1,3 +1,10 @@ +Hi, + +The USB P4 project does currently not compile due to ongoing work, +which is expected to be complete by the end of Sunday the 23rd 2007. + +--HPS + DESCRIPTION OF THE NEW USB API The new USB 2.0 API consists of 4 functions. All transfer types are managed From owner-p4-projects@FreeBSD.ORG Sat Sep 22 10:57:33 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C92F616A41B; Sat, 22 Sep 2007 10:57:32 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 982C216A418 for ; Sat, 22 Sep 2007 10:57:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 82E7313C465 for ; Sat, 22 Sep 2007 10:57:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8MAvWjx079110 for ; Sat, 22 Sep 2007 10:57:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8MAvWVM079107 for perforce@freebsd.org; Sat, 22 Sep 2007 10:57:32 GMT (envelope-from hselasky@FreeBSD.org) Date: Sat, 22 Sep 2007 10:57:32 GMT Message-Id: <200709221057.l8MAvWVM079107@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 126689 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2007 10:57:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=126689 Change 126689 by hselasky@hselasky_laptop001 on 2007/09/22 10:57:10 Changes to USB mass storage drivers: - Removed watchdog and reset count, use the "interval" field in "struct usbd_xfer" instead to limit infinite loops. - Factor out command cancel code into "atausb_cancel_request()" and "umass_cancel_request()" - Convert kernel USB flags into a bitmap (scripted) - Add transfer pre-delay to not stress the mass storage device when something goes wrong: - add 500ms delay before BBB reset - add 50ms delay before each clear stall command - Enable new "proxy_buffer" flag on data transport BULK transfers, so that we can use a smaller buffer to transfer large data transfers seamlessly. The proxy buffer size to use is kept in "xfer->max_data_length". - Passing a mutex to "usbd_do_request_flags()" and all "usbreq_xxx()" functions is now mandatory. - New UMASS/ATA-USB statemachine teardown mechanism: - If "sc->sc_xfer[...]" is NULL when a transfer is started the current mass storage command, if any, will be aborted. See "atausb_transfer_start()" and "umass_transfer_start()". - Transform "xfer->length" into "xfer->frlenghts[]". This is the new way to set the transfer length. - "xfer->actlen < xfer->sumlen" is the new way to check if a USB transfer is short. - One space to tab conversion. - "usbreq_set_interface()" has been renamed "usbd_set_alt_interface_index()" to clearly show that this function does more than just an USB control request. Affected files ... .. //depot/projects/usb/src/sys/dev/ata/ata-usb.c#16 edit .. //depot/projects/usb/src/sys/dev/usb/umass.c#21 edit Differences ... ==== //depot/projects/usb/src/sys/dev/ata/ata-usb.c#16 (text) ==== @@ -86,7 +86,6 @@ struct bbb_cbw cbw; struct bbb_csw csw; struct mtx locked_mtx; - struct __callout watchdog; struct ata_channel *locked_ch; struct ata_channel *restart_ch; @@ -114,7 +113,6 @@ u_int32_t ata_bytecount; u_int8_t last_xfer_no; - u_int8_t reset_count; u_int8_t usb_speed; u_int8_t intr_stalled; u_int8_t maxlun; @@ -141,8 +139,7 @@ static usbd_callback_t atausb_t_bbb_status_callback; static usbd_callback_t atausb_tr_error; -static void -atausb_watchdog(void *arg); +static void atausb_cancel_request(struct atausb_softc *sc); static void atausb_transfer_start(struct atausb_softc *sc, u_int8_t xfer_no); @@ -175,9 +172,10 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &atausb_t_bbb_reset1_callback, .timeout = 5000, /* 5 seconds */ + .interval = 500, /* 500 milliseconds */ }, [ATAUSB_T_BBB_RESET2] = { @@ -185,9 +183,10 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &atausb_t_bbb_reset2_callback, .timeout = 5000, /* 5 seconds */ + .interval = 50, /* 50 milliseconds */ }, [ATAUSB_T_BBB_RESET3] = { @@ -195,9 +194,10 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &atausb_t_bbb_reset3_callback, .timeout = 5000, /* 5 seconds */ + .interval = 50, /* 50 milliseconds */ }, [ATAUSB_T_BBB_COMMAND] = { @@ -205,7 +205,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = sizeof(struct bbb_cbw), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &atausb_t_bbb_command_callback, .timeout = 5000, /* 5 seconds */ }, @@ -215,7 +215,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = ATAUSB_BULK_SIZE, - .flags = (USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .proxy_buffer = 1, .short_xfer_ok = 1, }, .callback = &atausb_t_bbb_data_read_callback, .timeout = 0, /* overwritten later */ }, @@ -225,7 +225,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &atausb_t_bbb_data_rd_cs_callback, .timeout = 5000, /* 5 seconds */ }, @@ -235,7 +235,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = ATAUSB_BULK_SIZE, - .flags = USBD_USE_DMA, + .flags = { .proxy_buffer = 1, .short_xfer_ok = 1, }, .callback = &atausb_t_bbb_data_write_callback, .timeout = 0, /* overwritten later */ }, @@ -245,7 +245,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &atausb_t_bbb_data_wr_cs_callback, .timeout = 5000, /* 5 seconds */ }, @@ -255,7 +255,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = sizeof(struct bbb_csw), - .flags = (USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .short_xfer_ok = 1, }, .callback = &atausb_t_bbb_status_callback, .timeout = 5000, /* ms */ }, @@ -343,9 +343,6 @@ sc->usb_speed = usbd_get_speed(uaa->device); mtx_init(&(sc->locked_mtx), "ATAUSB lock", NULL, (MTX_DEF|MTX_RECURSE)); - __callout_init_mtx(&(sc->watchdog), - &(sc->locked_mtx), CALLOUT_RETURNUNLOCKED); - id = usbd_get_interface_descriptor(uaa->iface); switch (id->bInterfaceProtocol) { case UIPROTO_MASS_BBB: @@ -409,7 +406,7 @@ USETW(request.wValue, 0); USETW(request.wIndex, sc->iface_no); USETW(request.wLength, sizeof(maxlun)); - err = usbd_do_request(uaa->device, &request, &maxlun); + err = usbd_do_request(uaa->device, &usb_global_lock, &request, &maxlun); if (err) { if (bootverbose) { @@ -433,12 +430,6 @@ } bus_generic_attach(sc->dev); - /* start the watchdog */ - - mtx_lock(&(sc->locked_mtx)); - - atausb_watchdog(sc); - return 0; detach: @@ -453,23 +444,10 @@ device_t *children; int nchildren, i; - mtx_lock(&(sc->locked_mtx)); + /* teardown our statemachine */ - /* stop watchdog */ - __callout_stop(&(sc->watchdog)); + usbd_transfer_unsetup(sc->xfer, ATAUSB_T_MAX); - /* signal that device is going away */ - sc->last_xfer_no = ATAUSB_T_MAX; - - /* stop all transfers, if any */ - for (i = 0; i < ATAUSB_T_MAX; i++) { - if (sc->xfer[i]) { - usbd_transfer_stop(sc->xfer[i]); - } - } - - mtx_unlock(&(sc->locked_mtx)); - /* detach & delete all children, if any */ if (!device_get_children(dev, &children, &nchildren)) { @@ -479,38 +457,23 @@ free(children, M_TEMP); } - usbd_transfer_unsetup(sc->xfer, ATAUSB_T_MAX); - - __callout_drain(&(sc->watchdog)); - mtx_destroy(&sc->locked_mtx); return 0; } static void -atausb_watchdog(void *arg) -{ - struct atausb_softc *sc = arg; - - mtx_assert(&(sc->locked_mtx), MA_OWNED); - -#if 0 - __callout_reset(&(sc->watchdog), - hz, &atausb_watchdog, sc); -#endif - - mtx_unlock(&(sc->locked_mtx)); - return; -} - -static void atausb_transfer_start(struct atausb_softc *sc, u_int8_t xfer_no) { if (atausbdebug) { device_printf(sc->dev, "BBB transfer %d\n", xfer_no); } - sc->last_xfer_no = xfer_no; - usbd_transfer_start(sc->xfer[xfer_no]); + + if (sc->xfer[xfer_no]) { + sc->last_xfer_no = xfer_no; + usbd_transfer_start(sc->xfer[xfer_no]); + } else { + atausb_cancel_request(sc); + } return; } @@ -531,9 +494,6 @@ return; tr_setup: - - sc->reset_count ++; - req.bmRequestType = UT_WRITE_CLASS_INTERFACE; req.bRequest = 0xff; /* bulk-only reset */ USETW(req.wValue, 0); @@ -541,7 +501,10 @@ req.wIndex[1] = 0; USETW(req.wLength, 0); - usbd_copy_in(&(xfer->buf_data), 0, &req, sizeof(req)); + usbd_copy_in(xfer->frbuffers + 0, 0, &req, sizeof(req)); + + xfer->frlengths[0] = sizeof(req); + xfer->frlengths[1] = 0; usbd_start_hardware(xfer); return; @@ -610,7 +573,6 @@ tr_setup: - sc->reset_count = 0; sc->status_try = 0; if (request) { @@ -631,6 +593,7 @@ usbd_copy_in(&(xfer->buf_data), 0, &(sc->cbw), sizeof(sc->cbw)); + xfer->frlengths[0] = sizeof(sc->cbw); usbd_start_hardware(xfer); } return; @@ -640,8 +603,8 @@ atausb_t_bbb_data_read_callback(struct usbd_xfer *xfer) { struct atausb_softc *sc = xfer->priv_sc; - u_int32_t max_bulk = (ATAUSB_BULK_SIZE - - (ATAUSB_BULK_SIZE % xfer->max_packet_size)); + u_int32_t max_bulk = xfer->max_data_length; + USBD_CHECK_STATUS(xfer); tr_error: @@ -661,7 +624,7 @@ sc->ata_data += xfer->actlen; sc->ata_donecount += xfer->actlen; - if (xfer->actlen < xfer->length) { + if (xfer->actlen < xfer->sumlen) { /* short transfer */ sc->ata_bytecount = 0; } @@ -683,7 +646,7 @@ } xfer->timeout = sc->timeout; - xfer->length = max_bulk; + xfer->frlengths[0] = max_bulk; usbd_start_hardware(xfer); return; @@ -701,8 +664,8 @@ atausb_t_bbb_data_write_callback(struct usbd_xfer *xfer) { struct atausb_softc *sc = xfer->priv_sc; - u_int32_t max_bulk = (ATAUSB_BULK_SIZE - - (ATAUSB_BULK_SIZE % xfer->max_packet_size)); + u_int32_t max_bulk = xfer->max_data_length; + USBD_CHECK_STATUS(xfer); tr_error: @@ -736,7 +699,7 @@ } xfer->timeout = sc->timeout; - xfer->length = max_bulk; + xfer->frlengths[0] = max_bulk; usbd_copy_in(&(xfer->buf_data), 0, sc->ata_data, max_bulk); @@ -845,28 +808,46 @@ sc->ata_request = NULL; - if (atausbdebug > 1) { - device_printf(sc->dev, "%s: depreciated unlock!\n", - __FUNCTION__); - } + mtx_unlock(xfer->priv_mtx); - mtx_unlock(xfer->priv_mtx); /* XXX depreciated! */ - ata_interrupt(device_get_softc(request->parent)); mtx_lock(xfer->priv_mtx); return; tr_setup: + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); return; } static void +atausb_cancel_request(struct atausb_softc *sc) +{ + struct ata_request *request; + + mtx_assert(&(sc->locked_mtx), MA_OWNED); + + request = sc->ata_request; + sc->ata_request = NULL; + sc->last_xfer_no = ATAUSB_T_BBB_RESET1; + + if (request) { + request->error = ATA_E_ATAPI_SENSE_MASK; + + mtx_unlock(&(sc->locked_mtx)); + + ata_interrupt(device_get_softc(request->parent)); + + mtx_lock(&(sc->locked_mtx)); + } + return; +} + +static void atausb_tr_error(struct usbd_xfer *xfer) { struct atausb_softc *sc = xfer->priv_sc; - struct ata_request *request = sc->ata_request; if (xfer->error != USBD_CANCELLED) { @@ -875,38 +856,10 @@ "-> BULK reset\n", usbd_errstr(xfer->error), sc->last_xfer_no); } - - if (sc->reset_count < 16) { - - /* start reset before any callback */ - - atausb_transfer_start(sc, ATAUSB_T_BBB_RESET1); - } else { - - /* suspend reset until next command */ - - sc->last_xfer_no = ATAUSB_T_BBB_RESET1; - sc->reset_count = 0; - - device_printf(sc->dev, "timeout: giving up reset!\n"); - } } - if (request) { - request->result = (xfer->error == USBD_CANCELLED) ? ENXIO : EIO; - sc->ata_request = NULL; - - if (atausbdebug > 1) { - device_printf(sc->dev, "%s: depreciated unlock!\n", - __FUNCTION__); - } + atausb_cancel_request(sc); - mtx_unlock(xfer->priv_mtx); /* XXX depreciated! */ - - ata_interrupt(device_get_softc(request->parent)); - - mtx_lock(xfer->priv_mtx); - } return; } @@ -971,9 +924,9 @@ request->bytecount = 255; /* sizeof(struct atapi_inquiry); */ } - if (sc->last_xfer_no < ATAUSB_T_MAX) { + if (sc->xfer[sc->last_xfer_no]) { - sc->ata_request = request; + sc->ata_request = request; sc->ata_bytecount = request->bytecount; sc->ata_data = request->data; sc->ata_donecount = 0; ==== //depot/projects/usb/src/sys/dev/usb/umass.c#21 (text+ko) ==== @@ -908,7 +908,6 @@ u_int8_t sc_iface_no; /* interface number */ u_int8_t sc_maxlun; /* maximum LUN number, inclusive */ u_int8_t sc_last_xfer_index; - u_int8_t sc_reset_count; u_int8_t sc_status_try; }; @@ -946,6 +945,8 @@ static usbd_callback_t umass_t_cbi_data_wr_cs_callback; static usbd_callback_t umass_t_cbi_status_callback; +static void umass_cancel_ccb(struct umass_softc *sc); + static void umass_init_shuttle(struct umass_softc *sc); @@ -1041,9 +1042,10 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umass_t_bbb_reset1_callback, .timeout = 5000, /* 5 seconds */ + .interval = 500, /* 500 milliseconds */ }, [UMASS_T_BBB_RESET2] = { @@ -1051,9 +1053,10 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umass_t_bbb_reset2_callback, .timeout = 5000, /* 5 seconds */ + .interval = 50, /* 50 milliseconds */ }, [UMASS_T_BBB_RESET3] = { @@ -1061,9 +1064,10 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umass_t_bbb_reset3_callback, .timeout = 5000, /* 5 seconds */ + .interval = 50, /* 50 milliseconds */ }, [UMASS_T_BBB_COMMAND] = { @@ -1071,7 +1075,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = sizeof(umass_bbb_cbw_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umass_t_bbb_command_callback, .timeout = 5000, /* 5 seconds */ }, @@ -1081,7 +1085,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = UMASS_BULK_SIZE, - .flags = (USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .proxy_buffer = 1, .short_xfer_ok = 1, }, .callback = &umass_t_bbb_data_read_callback, .timeout = 0, /* overwritten later */ }, @@ -1091,7 +1095,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umass_t_bbb_data_rd_cs_callback, .timeout = 5000, /* 5 seconds */ }, @@ -1101,7 +1105,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = UMASS_BULK_SIZE, - .flags = (USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .proxy_buffer = 1, .short_xfer_ok = 1, }, .callback = &umass_t_bbb_data_write_callback, .timeout = 0, /* overwritten later */ }, @@ -1111,7 +1115,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umass_t_bbb_data_wr_cs_callback, .timeout = 5000, /* 5 seconds */ }, @@ -1121,7 +1125,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = sizeof(umass_bbb_csw_t), - .flags = (USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .short_xfer_ok = 1, }, .callback = &umass_t_bbb_status_callback, .timeout = 5000, /* ms */ }, @@ -1135,9 +1139,10 @@ .direction = UE_DIR_ANY, .bufsize = (sizeof(usb_device_request_t) + UMASS_CBI_DIAGNOSTIC_CMDLEN), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umass_t_cbi_reset1_callback, .timeout = 5000, /* 5 seconds */ + .interval = 500, /* 500 milliseconds */ }, [UMASS_T_CBI_RESET2] = { @@ -1145,9 +1150,10 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umass_t_cbi_reset2_callback, .timeout = 5000, /* 5 seconds */ + .interval = 50, /* 50 milliseconds */ }, [UMASS_T_CBI_RESET3] = { @@ -1155,9 +1161,10 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umass_t_cbi_reset3_callback, .timeout = 5000, /* 5 seconds */ + .interval = 50, /* 50 milliseconds */ }, [UMASS_T_CBI_COMMAND] = { @@ -1166,7 +1173,7 @@ .direction = UE_DIR_ANY, .bufsize = (sizeof(usb_device_request_t) + UMASS_MAX_CMDLEN), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umass_t_cbi_command_callback, .timeout = 5000, /* 5 seconds */ }, @@ -1176,7 +1183,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = UMASS_BULK_SIZE, - .flags = (USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .proxy_buffer = 1, .short_xfer_ok = 1, }, .callback = &umass_t_cbi_data_read_callback, .timeout = 0, /* overwritten later */ }, @@ -1186,7 +1193,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umass_t_cbi_data_rd_cs_callback, .timeout = 5000, /* 5 seconds */ }, @@ -1196,7 +1203,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = UMASS_BULK_SIZE, - .flags = (USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .proxy_buffer = 1, .short_xfer_ok = 1, }, .callback = &umass_t_cbi_data_write_callback, .timeout = 0, /* overwritten later */ }, @@ -1206,7 +1213,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umass_t_cbi_data_wr_cs_callback, .timeout = 5000, /* 5 seconds */ }, @@ -1215,7 +1222,7 @@ .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .flags = (USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .short_xfer_ok = 1, }, .bufsize = sizeof(umass_cbi_sbl_t), .callback = &umass_t_cbi_status_callback, .timeout = 5000, /* ms */ @@ -1226,7 +1233,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umass_t_cbi_reset4_callback, .timeout = 5000, /* ms */ }, @@ -1489,8 +1496,9 @@ #endif if (sc->sc_quirks & ALT_IFACE_1) { - err = usbreq_set_interface(uaa->device, - uaa->iface_index, 1); + err = usbd_set_alt_interface_index + (uaa->device, uaa->iface_index, 1); + if (err) { DPRINTF(sc, UDMASS_USB, "could not switch to " "Alt Interface 1\n"); @@ -1585,21 +1593,15 @@ umass_detach(device_t dev) { struct umass_softc *sc = device_get_softc(dev); - u_int8_t i; DPRINTF(sc, UDMASS_USB, "\n"); - mtx_lock(&(sc->sc_mtx)); + /* teardown our statemachine */ - /* signal that the device is going away */ - sc->sc_last_xfer_index = UMASS_T_MAX; + usbd_transfer_unsetup(sc->sc_xfer, UMASS_T_MAX); - for (i = 0; i < UMASS_T_MAX; i++) { - usbd_transfer_stop(sc->sc_xfer[i]); - } - -#if (__FreeBSD_version < 700037) - mtx_unlock(&(sc->sc_mtx)); +#if (__FreeBSD_version >= 700037) + mtx_lock(&(sc->sc_mtx)); #endif umass_cam_detach_sim(sc); @@ -1607,8 +1609,6 @@ mtx_unlock(&(sc->sc_mtx)); #endif - usbd_transfer_unsetup(sc->sc_xfer, UMASS_T_MAX); - mtx_destroy(&(sc->sc_mtx)); return 0; /* success */ @@ -1618,6 +1618,7 @@ umass_init_shuttle(struct umass_softc *sc) { usb_device_request_t req; + usbd_status err; u_int8_t status[2] = { 0, 0 }; /* The Linux driver does this, but no one can tell us what the @@ -1629,7 +1630,7 @@ req.wIndex[0] = sc->sc_iface_no; req.wIndex[1] = 0; USETW(req.wLength, sizeof(status)); - (void) usbd_do_request(sc->sc_udev, &req, &status); + err = usbd_do_request(sc->sc_udev, &Giant, &req, &status); DPRINTF(sc, UDMASS_GEN, "Shuttle init returned 0x%02x%02x\n", status[0], status[1]); @@ -1645,8 +1646,13 @@ { DPRINTF(sc, UDMASS_GEN, "transfer index = " "%d\n", xfer_index); - sc->sc_last_xfer_index = xfer_index; - usbd_transfer_start(sc->sc_xfer[xfer_index]); + + if (sc->sc_xfer[xfer_index]) { + sc->sc_last_xfer_index = xfer_index; + usbd_transfer_start(sc->sc_xfer[xfer_index]); + } else { + umass_cancel_ccb(sc); + } return; } @@ -1658,10 +1664,26 @@ /* stop the last transfer, * if not already stopped: */ - if (sc->sc_last_xfer_index < UMASS_T_MAX) { - usbd_transfer_stop(sc->sc_xfer[sc->sc_last_xfer_index]); - sc->sc_reset_count = 0; - umass_transfer_start(sc, 0); + usbd_transfer_stop(sc->sc_xfer[sc->sc_last_xfer_index]); + umass_transfer_start(sc, 0); + return; +} + +static void +umass_cancel_ccb(struct umass_softc *sc) +{ + union ccb *ccb; + + mtx_assert(&(sc->sc_mtx), MA_OWNED); + + ccb = sc->sc_transfer.ccb; + sc->sc_transfer.ccb = NULL; + sc->sc_last_xfer_index = 0; + + if (ccb) { + (sc->sc_transfer.callback) + (sc, ccb, (sc->sc_transfer.data_len - + sc->sc_transfer.actlen), STATUS_WIRE_FAILED); } return; } @@ -1670,38 +1692,14 @@ umass_tr_error(struct usbd_xfer *xfer) { struct umass_softc *sc = xfer->priv_sc; - union ccb *ccb = sc->sc_transfer.ccb; if (xfer->error != USBD_CANCELLED) { DPRINTF(sc, UDMASS_GEN, "transfer error, %s -> " "reset\n", usbd_errstr(xfer->error)); - - if (sc->sc_reset_count < 16) { - - /* start reset before any callback */ - - umass_transfer_start(sc, 0); - } else { - - /* suspend reset until next command */ - - sc->sc_last_xfer_index = 0; - sc->sc_reset_count = 0; - - printf("%s: timeout: giving up " - "reset!\n", sc->sc_name); - } } - if (ccb) { - - sc->sc_transfer.ccb = NULL; - - (sc->sc_transfer.callback) - (sc, ccb, (sc->sc_transfer.data_len - - sc->sc_transfer.actlen), STATUS_WIRE_FAILED); - } + umass_cancel_ccb(sc); return; } @@ -1742,8 +1740,6 @@ DPRINTF(sc, UDMASS_BBB, "BBB reset!\n"); - sc->sc_reset_count ++; - req.bmRequestType = UT_WRITE_CLASS_INTERFACE; req.bRequest = UR_BBB_RESET; /* bulk only reset */ USETW(req.wValue, 0); @@ -1751,8 +1747,10 @@ req.wIndex[1] = 0; USETW(req.wLength, 0); - usbd_copy_in(&(xfer->buf_data), 0, &req, sizeof(req)); + usbd_copy_in(xfer->frbuffers + 0, 0, &req, sizeof(req)); + xfer->frlengths[0] = sizeof(req); + xfer->frlengths[1] = 0; usbd_start_hardware(xfer); return; } @@ -1819,7 +1817,6 @@ tr_setup: - sc->sc_reset_count = 0; sc->sc_status_try = 0; if (ccb) { @@ -1874,6 +1871,7 @@ usbd_copy_in(&(xfer->buf_data), 0, &(sc->cbw), sizeof(sc->cbw)); + xfer->frlengths[0] = sizeof(sc->cbw); usbd_start_hardware(xfer); } return; @@ -1883,8 +1881,8 @@ umass_t_bbb_data_read_callback(struct usbd_xfer *xfer) { struct umass_softc *sc = xfer->priv_sc; - u_int32_t max_bulk = (UMASS_BULK_SIZE - - (UMASS_BULK_SIZE % xfer->max_packet_size)); + u_int32_t max_bulk = xfer->max_data_length; + USBD_CHECK_STATUS(xfer); tr_error: @@ -1903,7 +1901,7 @@ sc->sc_transfer.data_ptr += xfer->actlen; sc->sc_transfer.actlen += xfer->actlen; - if (xfer->actlen < xfer->length) { + if (xfer->actlen < xfer->sumlen) { /* short transfer */ sc->sc_transfer.data_rem = 0; } @@ -1922,7 +1920,7 @@ } xfer->timeout = sc->sc_transfer.data_timeout; - xfer->length = max_bulk; + xfer->frlengths[0] = max_bulk; usbd_start_hardware(xfer); return; @@ -1940,8 +1938,8 @@ umass_t_bbb_data_write_callback(struct usbd_xfer *xfer) { struct umass_softc *sc = xfer->priv_sc; - u_int32_t max_bulk = (UMASS_BULK_SIZE - - (UMASS_BULK_SIZE % xfer->max_packet_size)); + u_int32_t max_bulk = xfer->max_data_length; + USBD_CHECK_STATUS(xfer); tr_error: @@ -1957,7 +1955,7 @@ sc->sc_transfer.data_ptr += xfer->actlen; sc->sc_transfer.actlen += xfer->actlen; - if (xfer->actlen < xfer->length) { + if (xfer->actlen < xfer->sumlen) { /* short transfer */ sc->sc_transfer.data_rem = 0; } @@ -1976,7 +1974,7 @@ } xfer->timeout = sc->sc_transfer.data_timeout; - xfer->length = max_bulk; + xfer->frlengths[0] = max_bulk; usbd_copy_in(&(xfer->buf_data), 0, sc->sc_transfer.data_ptr, max_bulk); @@ -2108,6 +2106,7 @@ return; tr_setup: + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); return; } @@ -2136,7 +2135,7 @@ sc->sc_transfer.callback = callback; sc->sc_transfer.ccb = ccb; - if (sc->sc_last_xfer_index < UMASS_T_MAX) { + if (sc->sc_xfer[sc->sc_last_xfer_index]) { usbd_transfer_start(sc->sc_xfer[sc->sc_last_xfer_index]); } else { ccb->ccb_h.status = CAM_TID_INVALID; @@ -2160,7 +2159,7 @@ req.wIndex[1] = 0; USETW(req.wLength, 1); - err = usbd_do_request(sc->sc_udev, &req, &buf); + err = usbd_do_request(sc->sc_udev, &Giant, &req, &buf); if (err) { buf = 0; @@ -2198,10 +2197,8 @@ umass_t_cbi_reset1_callback(struct usbd_xfer *xfer) { struct umass_softc *sc = xfer->priv_sc; - struct { - usb_device_request_t req; - u_int8_t buf[UMASS_CBI_DIAGNOSTIC_CMDLEN]; - } UPACKED rst; + usb_device_request_t req; + uint8_t buf[UMASS_CBI_DIAGNOSTIC_CMDLEN]; u_int8_t i; @@ -2231,28 +2228,30 @@ DPRINTF(sc, UDMASS_CBI, "CBI reset!\n"); - sc->sc_reset_count ++; - - rst.req.bmRequestType = UT_WRITE_CLASS_INTERFACE; - rst.req.bRequest = UR_CBI_ADSC; - USETW(rst.req.wValue, 0); - rst.req.wIndex[0] = sc->sc_iface_no; - rst.req.wIndex[1] = 0; - USETW(rst.req.wLength, UMASS_CBI_DIAGNOSTIC_CMDLEN); + req.bmRequestType = UT_WRITE_CLASS_INTERFACE; + req.bRequest = UR_CBI_ADSC; + USETW(req.wValue, 0); + req.wIndex[0] = sc->sc_iface_no; + req.wIndex[1] = 0; + USETW(req.wLength, UMASS_CBI_DIAGNOSTIC_CMDLEN); /* The 0x1d code is the SEND DIAGNOSTIC command. * To distinguish between the two, the last 10 bytes * of the CBL is filled with 0xff (section 2.2 of * the CBI specification) */ - rst.req.bData[0] = 0x1d; /* Command Block Reset */ - rst.req.bData[1] = 0x04; + buf[0] = 0x1d; /* Command Block Reset */ + buf[1] = 0x04; for (i = 2; i < UMASS_CBI_DIAGNOSTIC_CMDLEN; i++) { - rst.req.bData[i] = 0xff; + buf[i] = 0xff; } - usbd_copy_in(&(xfer->buf_data), 0, &rst, sizeof(rst)); + usbd_copy_in(xfer->frbuffers + 0, 0, &req, sizeof(req)); + usbd_copy_in(xfer->frbuffers + 1, 0, buf, sizeof(buf)); + + xfer->frlengths[0] = sizeof(req); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Sep 22 12:34:37 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CCF3016A41A; Sat, 22 Sep 2007 12:34:36 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94F5816A417 for ; Sat, 22 Sep 2007 12:34:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7DFEF13C44B for ; Sat, 22 Sep 2007 12:34:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8MCYaMq087234 for ; Sat, 22 Sep 2007 12:34:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8MCYa1U087231 for perforce@freebsd.org; Sat, 22 Sep 2007 12:34:36 GMT (envelope-from hselasky@FreeBSD.org) Date: Sat, 22 Sep 2007 12:34:36 GMT Message-Id: <200709221234.l8MCYa1U087231@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 126690 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2007 12:34:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=126690 Change 126690 by hselasky@hselasky_laptop001 on 2007/09/22 12:33:43 - convert kernel USB flags into a bitmap (scripted) - "xfer->frlengths" now has the type "uint32_t *" - "xfer->actlen < xfer->sumlen" is the new way to check if a USB transfer is short. - new check for mismatch between "wMaxPacketSize" and the configured data transfer rate. See "ch->bytes_per_frame > xfer->max_frame_size". Observe that high-speed isochronous transfers can have multiple "wMaxPacketSize" packets per 125us. Therefore we compare against "max_frame_size" and not "max_packet_size". - use ("xfer->frbuffers + 0" or "&xfer->buf_data") and ("usbd_copy_in()" or "usbd_copy_out()") to transfer Isochronous USB data, hence "xfer->buffer" is now gone! - "usbreq_set_interface()" has been renamed "usbd_set_alt_interface_index()" to clearly show that this function does more than just an USB control request. - passing a mutex to "usbd_do_request_flags()" and all "usbreq_xxx()" functions is now mandatory. - transform "xfer->length" into "xfer->frlengths[]". This is the new way to set the transfer length. Additional notes: Control transfers get "xfer->nframes = 2" when "frames" is zero in the USB config structure. Else "xfer->nframes" defaults to 1 for BULK and INTERRUPT. For ISOCHRONOUS a non zero value must be specified. Affected files ... .. //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#15 edit Differences ... ==== //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#15 (text+ko) ==== @@ -459,7 +459,7 @@ .direction = UE_DIR_IN, .bufsize = 0, /* use "wMaxPacketSize * frames" */ .frames = UAUDIO_NFRAMES, - .flags = USBD_SHORT_XFER_OK, + .flags = { .short_xfer_ok = 1, }, .callback = &uaudio_chan_record_callback, }, @@ -469,7 +469,7 @@ .direction = UE_DIR_IN, .bufsize = 0, /* use "wMaxPacketSize * frames" */ .frames = UAUDIO_NFRAMES, - .flags = USBD_SHORT_XFER_OK, + .flags = { .short_xfer_ok = 1, }, .callback = &uaudio_chan_record_callback, }, }; @@ -482,7 +482,7 @@ .direction = UE_DIR_IN, .bufsize = 0, /* use "wMaxPacketSize * frames" */ .frames = (UAUDIO_NFRAMES * 8), - .flags = USBD_SHORT_XFER_OK, + .flags = { .short_xfer_ok = 1, }, .callback = &uaudio_chan_record_callback, }, @@ -492,7 +492,7 @@ .direction = UE_DIR_IN, .bufsize = 0, /* use "wMaxPacketSize * frames" */ .frames = (UAUDIO_NFRAMES * 8), - .flags = USBD_SHORT_XFER_OK, + .flags = { .short_xfer_ok = 1, }, .callback = &uaudio_chan_record_callback, }, }; @@ -505,7 +505,7 @@ .direction = UE_DIR_OUT, .bufsize = 0, /* use "wMaxPacketSize * frames" */ .frames = UAUDIO_NFRAMES, - .flags = USBD_SHORT_XFER_OK, + .flags = { .short_xfer_ok = 1, }, .callback = &uaudio_chan_play_callback, }, @@ -515,7 +515,7 @@ .direction = UE_DIR_OUT, .bufsize = 0, /* use "wMaxPacketSize * frames" */ .frames = UAUDIO_NFRAMES, - .flags = USBD_SHORT_XFER_OK, + .flags = { .short_xfer_ok = 1, }, .callback = &uaudio_chan_play_callback, }, }; @@ -528,7 +528,7 @@ .direction = UE_DIR_OUT, .bufsize = 0, /* use "wMaxPacketSize * frames" */ .frames = (UAUDIO_NFRAMES * 8), - .flags = USBD_SHORT_XFER_OK, + .flags = { .short_xfer_ok = 1, }, .callback = &uaudio_chan_play_callback, }, @@ -538,7 +538,7 @@ .direction = UE_DIR_OUT, .bufsize = 0, /* use "wMaxPacketSize * frames" */ .frames = (UAUDIO_NFRAMES * 8), - .flags = USBD_SHORT_XFER_OK, + .flags = { .short_xfer_ok = 1, }, .callback = &uaudio_chan_play_callback, }, }; @@ -582,7 +582,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = UMIDI_BULK_SIZE, - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .callback = &umidi_bulk_write_callback, }, @@ -591,7 +591,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = UMIDI_BULK_SIZE, - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .callback = &umidi_bulk_read_callback, }, @@ -600,7 +600,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umidi_write_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -611,7 +611,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &umidi_read_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -1221,10 +1221,10 @@ uaudio_chan_play_callback(struct usbd_xfer *xfer) { struct uaudio_chan *ch = xfer->priv_sc; - u_int16_t * p_len = xfer->frlengths; - u_int8_t * buf = xfer->buffer; + uint32_t * p_len = xfer->frlengths; u_int32_t n; u_int32_t total = (ch->bytes_per_frame * xfer->nframes); + uint32_t offset; USBD_CHECK_STATUS(xfer); @@ -1234,7 +1234,7 @@ } tr_transferred: - if (xfer->actlen < total) { + if (xfer->actlen < xfer->sumlen) { DPRINTF(0, "short transfer, " "%d of %d bytes\n", xfer->actlen, total); } @@ -1242,17 +1242,18 @@ chn_intr(ch->pcm_ch); tr_setup: - for (n = 0; n < xfer->nframes; n++) { - p_len[n] = ch->bytes_per_frame; - } - - if (total > xfer->length) { + if (ch->bytes_per_frame > xfer->max_frame_size) { DPRINTF(0, "bytes per transfer, %d, " "exceeds maximum, %d!\n", - total, xfer->length); + ch->bytes_per_frame, + xfer->max_frame_size); return; } + for (n = 0; n < xfer->nframes; n++) { + p_len[n] = ch->bytes_per_frame; + } + if (ch->end == ch->start) { DPRINTF(0, "no buffer!\n"); return; @@ -1260,6 +1261,8 @@ DPRINTF(5, "transfer %d bytes\n", total); + offset = 0; + while (total > 0) { n = (ch->end - ch->cur); @@ -1267,11 +1270,11 @@ n = total; } - bcopy(ch->cur, buf, n); + usbd_copy_in(xfer->frbuffers + 0, offset, ch->cur, n); total -= n; ch->cur += n; - buf += n; + offset += n; if (ch->cur >= ch->end) { ch->cur = ch->start; @@ -1286,12 +1289,12 @@ uaudio_chan_record_callback(struct usbd_xfer *xfer) { struct uaudio_chan *ch = xfer->priv_sc; - u_int8_t * buf1 = xfer->buffer; - u_int8_t * buf2 = xfer->buffer; - u_int16_t * p_len = xfer->frlengths; + uint32_t * p_len = xfer->frlengths; u_int32_t n; u_int32_t m; u_int32_t total = (xfer->nframes * ch->bytes_per_frame); + uint32_t offset0; + uint32_t offset1; USBD_CHECK_STATUS(xfer); @@ -1308,8 +1311,12 @@ DPRINTF(5, "transferred %d bytes\n", xfer->actlen); } + offset0 = 0; + for (n = 0; n < xfer->nframes; n++) { + offset1 = offset0; + while (p_len[n] > 0) { m = (ch->end - ch->cur); @@ -1318,10 +1325,10 @@ m = p_len[n]; } - bcopy(buf1, ch->cur, m); + usbd_copy_out(xfer->frbuffers + 0, offset1, ch->cur, m); p_len[n] -= m; - buf1 += m; + offset1 += m; ch->cur += m; if (ch->cur >= ch->end) { @@ -1329,24 +1336,24 @@ } } - buf2 += ch->bytes_per_frame; - buf1 = buf2; + offset0 += ch->bytes_per_frame; } chn_intr(ch->pcm_ch); tr_setup: - for (n = 0; n < xfer->nframes; n++) { - p_len[n] = ch->bytes_per_frame; - } - - if (total > xfer->length) { + if (ch->bytes_per_frame > xfer->max_frame_size) { DPRINTF(0, "bytes per transfer, %d, " "exceeds maximum, %d!\n", - total, xfer->length); + ch->bytes_per_frame, + xfer->max_frame_size); return; } + for (n = 0; n < xfer->nframes; n++) { + p_len[n] = ch->bytes_per_frame; + } + if (ch->end == ch->start) { DPRINTF(0, "no buffer!\n"); return; @@ -1417,7 +1424,7 @@ DPRINTF(0, "endpoint=0x%02x, speed=%d, iface=%d alt=%d\n", endpoint, ch->sample_rate, iface_index, alt_index); - err = usbreq_set_interface(sc->sc_udev, iface_index, alt_index); + err = usbd_set_alt_interface_index(sc->sc_udev, iface_index, alt_index); if (err) { DPRINTF(0, "setting of alternate index failed: %s!\n", usbd_errstr(err)); @@ -3016,7 +3023,7 @@ USETW(req.wIndex, mc->wIndex); USETW(req.wLength, len); - err = usbd_do_request(udev, &req, data); + err = usbd_do_request(udev, &Giant, &req, data); if (err) { DPRINTF(0, "err=%s\n", usbd_errstr(err)); return 0; @@ -3038,13 +3045,14 @@ static void uaudio_mixer_write_cfg_callback(struct usbd_xfer *xfer) { - usb_device_request_t *req = xfer->buffer; + usb_device_request_t req; struct uaudio_softc *sc = xfer->priv_sc; struct uaudio_mixer_node *mc = sc->sc_mixer_curr; u_int16_t len; u_int8_t repeat = 1; u_int8_t update; u_int8_t chan; + uint8_t buf[2]; USBD_CHECK_STATUS(xfer); @@ -3077,20 +3085,24 @@ if (update) { - req->bmRequestType = UT_WRITE_CLASS_INTERFACE; - req->bRequest = SET_CUR; - USETW(req->wValue, mc->wValue[chan]); - USETW(req->wIndex, mc->wIndex); - USETW(req->wLength, len); + req.bmRequestType = UT_WRITE_CLASS_INTERFACE; + req.bRequest = SET_CUR; + USETW(req.wValue, mc->wValue[chan]); + USETW(req.wIndex, mc->wIndex); + USETW(req.wLength, len); if (len > 0) { - req->bData[0] = (mc->wData[chan] & 0xFF); + buf[0] = (mc->wData[chan] & 0xFF); } if (len > 1) { - req->bData[1] = (mc->wData[chan] >> 8) & 0xFF; + buf[1] = (mc->wData[chan] >> 8) & 0xFF; } - xfer->length = (sizeof(*req)+len); + usbd_copy_in(xfer->frbuffers + 0, 0, &req, sizeof(req)); + usbd_copy_in(xfer->frbuffers + 1, 0, buf, len); + + xfer->frlengths[0] = sizeof(req); + xfer->frlengths[1] = len; usbd_start_hardware(xfer); return; } @@ -3124,7 +3136,7 @@ data[1] = speed >> 8; data[2] = speed >> 16; - return usbd_do_request(udev, &req, data); + return usbd_do_request(udev, &Giant, &req, data); } static int @@ -3310,7 +3322,7 @@ { struct umidi_chan *chan = xfer->priv_sc; struct umidi_sub_chan *sub; - u_int8_t buf[4]; + u_int8_t buf[1]; u_int8_t cmd_len; u_int8_t cn; u_int16_t pos; @@ -3341,14 +3353,15 @@ while (xfer->actlen >= 4) { - usbd_copy_out(&(xfer->buf_data), pos, buf, 4); + usbd_copy_out(&(xfer->buf_data), pos, buf, 1); cmd_len = umidi_cmd_to_len[buf[0] & 0xF]; /* command length */ cn = buf[0] >> 4; /* cable number */ sub = &(chan->sub[cn]); if (cmd_len && (cn < chan->max_cable) && sub->read_open) { - usb_cdev_put_data(&(sub->cdev), buf+1, cmd_len, 1); + usb_cdev_put_data(&(sub->cdev), &(xfer->buf_data), + pos+1, cmd_len, 1); } else { /* ignore the command */ } @@ -3364,6 +3377,7 @@ usbd_transfer_start(chan->xfer[3]); return; } + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); return; } @@ -3564,12 +3578,15 @@ sub = &(chan->sub[chan->curr_cable]); if (sub->write_open) { - usb_cdev_get_data(&(sub->cdev), &buf, 1, &actlen, 0); + usb_cdev_get_data(&(sub->cdev), &(xfer->buf_data), + total_length, 1, &actlen, 0); } else { actlen = 0; } if (actlen) { + usbd_copy_out(&(xfer->buf_data), total_length, &buf, 1); + tr_any = 1; DPRINTF(0, "byte=0x%02x\n", buf); @@ -3607,7 +3624,7 @@ } if (total_length) { - xfer->length = total_length; + xfer->frlengths[0] = total_length; usbd_start_hardware(xfer); } return; @@ -3741,7 +3758,7 @@ u_int32_t n; u_int8_t buf[32]; - if (usbreq_set_interface(sc->sc_udev, chan->iface_index, + if (usbd_set_alt_interface_index(sc->sc_udev, chan->iface_index, chan->iface_alt_index)) { DPRINTF(0, "setting of alternate index failed!\n"); goto detach; From owner-p4-projects@FreeBSD.ORG Sat Sep 22 13:23:41 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AD1F816A420; Sat, 22 Sep 2007 13:23:41 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82DAD16A41A for ; Sat, 22 Sep 2007 13:23:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6B12B13C45B for ; Sat, 22 Sep 2007 13:23:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8MDNfbo000338 for ; Sat, 22 Sep 2007 13:23:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8MDNfMV000333 for perforce@freebsd.org; Sat, 22 Sep 2007 13:23:41 GMT (envelope-from hselasky@FreeBSD.org) Date: Sat, 22 Sep 2007 13:23:41 GMT Message-Id: <200709221323.l8MDNfMV000333@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 126691 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2007 13:23:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=126691 Change 126691 by hselasky@hselasky_laptop001 on 2007/09/22 13:23:03 FYI; The comments follow the P4 diff from top to bottom. - replace ADD_BYTES() by USBD_ADD_BYTES() - move a detach DELAY outside holding a mutex - new function "ehci_non_isoc_done_sub()". The main puropose of this function is to scan an USB BULK/INTERRUPT/CONTROL descriptor chain and extract information. This function will update "xfer->frlengths[]" to the actual transfer length. This function will compute the next data toggle based on the written back Data Toggle in the EHCI Transfer Descriptor structure. - update "ehci_non_isoc_done()" to use "ehci_non_isoc_done_sub()" instead of scanning the TD chain by itself. - updates to "ehci_check_transfer()", mainly to add support for the Alternative Next pointer, which is followed in case of a short USB frame, for sake of completeness. - updated "ehci_pcd_enable()" to use factored out code in "usbd_std_root_transfer()". - new function "ehci_setup_standard_chain_sub()". The main purpose of this function is to build up DMA chains for BULK, INTERRUPT and CONTROL transfers. This function will queue 4*4K bytes worth of data per transfer descriptor, contrary to 1*4K in the old version. Result; Less transfer descriptors required. - changes to "ehci_setup_standard_chain()". The code is doing exactly the same, just refactored a little bit. - new elements to "struct usbd_device" which are setup when "struct usbd_device" is allocated to hold the correct values. - "udev->hs_hub_addr" - "udev->hs_port_no" - "ehci_root_intr_done()" is doing the same like before, only now using a temporary scratch buffer in the "struct ehci_softc" which is called "sc->sc_hub_idata". - some small changes to "ehci_isoc_fs_done()" and "ehci_isoc_hs_done()" - "usbd_transfer_done()" is now part of "usbd_transfer_dequeue()" - updated several "flags & XXX" to "flags{_int}.xxx". - substituted MS_TO_TICKS by USBD_MS_TO_TICKS. - removed all data bouncing stuff (copy_out/copy_in) - "usbd_std_ctrl_enter()" is now factored out like a standard part of "usbd_start_hardware()". - check for "nframes == 0" has been factored out as a part of "usbd_start_hardware()". - the new function "ehci_root_ctrl_task_td_sub()" does the same as "ehci_root_ctrl_task_td()", but through the standard root transfer framework. - major parts of "ehci_xfer_setup()" has been factored out and only the EHCI specific part is left. Across all the Host Controller Drivers this saves some code. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ehci.c#37 edit .. //depot/projects/usb/src/sys/dev/usb/ehci.h#14 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ehci.c#37 (text+ko) ==== @@ -71,7 +71,6 @@ #include #include -#define MS_TO_TICKS(ms) (((ms) * hz) / 1000) #define EHCI_BUS2SC(bus) ((ehci_softc_t *)(((u_int8_t *)(bus)) - \ POINTER_TO_UNSIGNED(&(((ehci_softc_t *)0)->sc_bus)))) @@ -109,10 +108,26 @@ static void ehci_root_ctrl_task_td(struct ehci_softc *sc, struct thread *ctd); static void ehci_do_poll(struct usbd_bus *bus); +static usbd_std_root_transfer_func_t ehci_root_intr_done; +static usbd_std_root_transfer_func_t ehci_root_ctrl_task_td_sub; + #define SC_HW_PHYSADDR(sc,what) \ ((sc)->sc_hw_page.physaddr + \ POINTER_TO_UNSIGNED(&(((struct ehci_hw_softc *)0)->what))) +struct ehci_std_temp { + struct usbd_page_cache *pc; + ehci_qtd_t *td; + ehci_qtd_t *td_next; + uint32_t average; + uint32_t qtd_status; + uint32_t len; + uint16_t max_frame_size; + uint8_t shortpkt; + uint8_t auto_data_toggle; + uint8_t setup_alt_next; +}; + usbd_status ehci_init(ehci_softc_t *sc) { @@ -398,10 +413,10 @@ EOWRITE4(sc, EHCI_USBCMD, 0); EOWRITE4(sc, EHCI_USBCMD, EHCI_CMD_HCRESET); + mtx_unlock(&sc->sc_bus.mtx); + DELAY(1000*300); /* XXX let stray task complete */ - mtx_unlock(&sc->sc_bus.mtx); - __callout_drain(&(sc->sc_tmo_pcd)); return; @@ -1054,84 +1069,150 @@ return(last); } +static uint32_t +ehci_non_isoc_done_sub(struct usbd_xfer *xfer) +{ + ehci_qtd_t *td; + ehci_qtd_t *td_alt_next; + uint32_t status; + uint16_t len; + uint8_t last_toggle; + + td = xfer->td_transfer_cache; + td_alt_next = td->alt_next; + status = EHCI_QTD_HALTED; + last_toggle = 0; + + while (1) { + + usbd_page_dma_exit(td->page); + status = le32toh(td->qtd_status); + usbd_page_dma_enter(td->page); + + len = EHCI_QTD_GET_BYTES(status); + + /* + * Verify the status length and subtract + * the remainderfrom "frlengths[]": + */ + if (len > td->len) { + /* should not happen */ + DPRINTFN(0, ("Invalid status length, " + "0x%04x/0x%04x bytes\n", len, td->len)); + status |= EHCI_QTD_HALTED; + } else { + xfer->frlengths[xfer->aframes] -= len; + } + + /* Make a copy of the data toggle */ + last_toggle = (status & EHCI_QTD_TOGGLE_MASK) ? 1 : 0; + + /* Check for last transfer */ + if (((void *)td) == xfer->td_transfer_last) { + if (len == 0) { + /* + * Halt is ok if descriptor is last, + * and complete: + */ + status &= ~EHCI_QTD_HALTED; + } + td = NULL; + break; + } + + /* Check for transfer error */ + if (status & EHCI_QTD_HALTED) { + td = NULL; + break; + } + + /* Check for short transfer */ + if (len > 0) { + td = td->alt_next; + break; + } + + td = td->obj_next; + + if (td->alt_next != td_alt_next) { + /* we are finished */ + break; + } + } + + /* update transfer cache */ + + xfer->td_transfer_cache = td; + + /* update data toggle */ + + xfer->pipe->toggle_next = last_toggle; + + return status; +} + static void ehci_device_done(struct usbd_xfer *xfer, usbd_status error); static void ehci_non_isoc_done(struct usbd_xfer *xfer) { - uint32_t temp; u_int32_t status = 0; - u_int32_t actlen = 0; - u_int16_t len = 0; - u_int16_t last_len = 0; - u_int8_t last_toggle = 0; - ehci_qtd_t *td = xfer->td_transfer_first; DPRINTFN(12, ("xfer=%p pipe=%p transfer done\n", xfer, xfer->pipe)); #ifdef USB_DEBUG - if(ehcidebug > 10) - { - ehci_dump_sqtds(td); + if (ehcidebug > 10) { + ehci_dump_sqtds(xfer->td_transfer_first); } #endif - /* the transfer is done, compute actual length and status */ - for (; - td != NULL; - td = td->obj_next) - { - usbd_page_dma_exit(td->page); - temp = le32toh(td->qtd_status); - usbd_page_dma_enter(td->page); + /* reset scanner */ + + xfer->td_transfer_cache = xfer->td_transfer_first; + + if (xfer->flags_int.control_xfr && + xfer->flags_int.control_hdr) { + + status = ehci_non_isoc_done_sub(xfer); - if (temp & EHCI_QTD_ACTIVE) { - break; - } + if (status & EHCI_QTD_HALTED) { + goto done; + } - status = temp; + xfer->aframes = 1; + } - len = EHCI_QTD_GET_BYTES(status); + while (xfer->aframes != xfer->nframes) { - /* The status length should always be - * less than or equal to the setup - * length! - */ - if (len <= td->len) { - last_len = td->len - len; - actlen += last_len; - } else { - /* should not happen */ - DPRINTFN(0, ("Invalid status length, " - "0x%04x/0x%04x bytes\n", len, td->len)); - last_len = 0; - } + if ((!xfer->flags_int.control_xfr) || + (xfer->frlengths[xfer->aframes] > 0)) { - /* Make a copy of the data toggle */ - last_toggle = (status & EHCI_QTD_TOGGLE_MASK) ? 1 : 0; + status = ehci_non_isoc_done_sub(xfer); - /* Check if this is the last transfer */ - if (((void *)td) == xfer->td_transfer_last) { - if (len == 0) { - /* halt is ok if descriptor is last, - * and complete: - */ - status &= ~EHCI_QTD_HALTED; - } - td = NULL; - break; + if (status & EHCI_QTD_HALTED) { + goto done; } + } + + xfer->aframes ++; } - /* update data toggle */ + if (xfer->flags_int.control_xfr && + !xfer->flags_int.control_act) { - xfer->pipe->toggle_next = last_toggle; + status = ehci_non_isoc_done_sub(xfer); - DPRINTFN(10, ("actlen=%d\n", actlen)); + if (status & EHCI_QTD_HALTED) { + if (xfer->frlengths[xfer->nframes-1] == 0) { + xfer->aframes--; + } + goto done; + } + } - xfer->actlen = actlen; + done: #ifdef USB_DEBUG if (status & EHCI_QTD_STATERRS) { @@ -1162,6 +1243,8 @@ static u_int8_t ehci_check_transfer(struct usbd_xfer *xfer, struct thread *ctd) { + struct usbd_pipe_methods *methods = xfer->pipe->methods; + uint32_t status; if(xfer->usb_thread != ctd) @@ -1174,7 +1257,7 @@ DPRINTFN(12, ("xfer=%p checking transfer\n", xfer)); - if(xfer->pipe->methods == &ehci_device_isoc_fs_methods) + if(methods == &ehci_device_isoc_fs_methods) { ehci_sitd_t *td = xfer->td_transfer_last; @@ -1191,7 +1274,7 @@ goto transferred; } } - else if(xfer->pipe->methods == &ehci_device_isoc_hs_methods) + else if(methods == &ehci_device_isoc_hs_methods) { ehci_itd_t *td = xfer->td_transfer_last; @@ -1225,14 +1308,11 @@ * in the middle, or whether there was a short * packet (SPD and not ACTIVE) */ - for (td = xfer->td_transfer_cache; - td != NULL; - td = td->obj_next) - { + td = xfer->td_transfer_cache; + + while (1) { usbd_page_dma_exit(td->page); - status = le32toh(td->qtd_status); - usbd_page_dma_enter(td->page); /* if there is an active TD @@ -1243,6 +1323,13 @@ xfer->td_transfer_cache = td; goto done; } + + /* last transfer descriptor makes + * the transfer done + */ + if (((void *)td) == xfer->td_transfer_last) { + break; + } /* any kind of error makes * the transfer done @@ -1251,17 +1338,22 @@ break; } - /* a short packet also makes - * the transfer done + /* if there is no alternate + * next transfer, a short packet + * also makes the transfer done */ if (EHCI_QTD_GET_BYTES(status)) { + if (xfer->flags_int.short_frames_ok) { + /* follow alt next */ + if (td->alt_next) { + td = td->alt_next; + continue; + } + } + /* transfer is done */ break; } - - if (((void *)td) == xfer->td_transfer_last) { - td = NULL; - break; - } + td = td->obj_next; } ehci_non_isoc_done(xfer); goto transferred; @@ -1278,12 +1370,6 @@ static void ehci_pcd_enable(ehci_softc_t *sc) { - struct thread *td; - struct usbd_xfer *xfer; - struct usbd_xfer *xlist[2]; - - td = curthread; - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); sc->sc_eintrs |= EHCI_STS_PCD; @@ -1292,28 +1378,10 @@ /* acknowledge any PCD interrupt */ EOWRITE4(sc, EHCI_USBSTS, EHCI_STS_PCD); - xfer = sc->sc_intrxfer; - - if(xfer) - { - /* transfer is transferred */ - ehci_device_done(xfer, USBD_NORMAL_COMPLETION); - - /* queue callback */ - xlist[0] = xfer; - xlist[1] = NULL; - - xfer->usb_thread = td; - xfer->usb_root->memory_refcount++; - - mtx_unlock(&sc->sc_bus.mtx); - - usbd_do_callback(xlist, td); + if (usbd_std_root_transfer(&(sc->sc_root_intr), NULL, + &ehci_root_intr_done)) { + mtx_unlock(&(sc->sc_bus.mtx)); } - else - { - mtx_unlock(&sc->sc_bus.mtx); - } return; } @@ -1403,20 +1471,6 @@ if(status & EHCI_STS_PCD) { - xfer = sc->sc_intrxfer; - - if(xfer) - { - ehci_device_done(xfer, USBD_NORMAL_COMPLETION); - - /* queue callback */ - - *(xptr++) = xfer; - - xfer->usb_thread = td; - xfer->usb_root->memory_refcount++; - } - /* * Disable PCD interrupt for now, because it will be * on until the port has been reset. @@ -1424,6 +1478,11 @@ sc->sc_eintrs &= ~EHCI_STS_PCD; EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); + if (!usbd_std_root_transfer(&(sc->sc_root_intr), ctd, + &ehci_root_intr_done)) { + mtx_lock(&(sc->sc_bus.mtx)); + } + /* do not allow RHSC interrupts > 1 per second */ __callout_reset(&sc->sc_tmo_pcd, hz, (void *)(void *)ehci_pcd_enable, sc); @@ -1552,248 +1611,339 @@ } static void -ehci_setup_standard_chain(struct usbd_xfer *xfer, ehci_qh_t **qh_last) +ehci_setup_standard_chain_sub(struct ehci_std_temp *temp) { struct usbd_page_search buf_res; - /* the EHCI hardware can handle at most five 4k crossing per TD */ - u_int32_t average = (EHCI_PAGE_SIZE - (EHCI_PAGE_SIZE % - xfer->max_packet_size)); - u_int32_t qtd_status; - uint32_t qh_endp; - uint32_t qh_endphub; - u_int32_t buf_offset; - u_int32_t len; - u_int32_t c_error = - (usbd_get_speed(xfer->udev) == USB_SPEED_HIGH) ? 0 : - htole32(EHCI_QTD_SET_CERR(3)); - u_int8_t isread; - u_int8_t shortpkt = 0; - u_int8_t force_short; - struct usbd_pipe_methods *methods = xfer->pipe->methods; ehci_qtd_t *td; - ehci_qtd_t *td_last = NULL; - ehci_qh_t *qh; + ehci_qtd_t *td_next; + ehci_qtd_t *td_alt_next; + uint32_t qtd_altnext; + uint32_t buf_offset; + uint32_t average; + uint32_t len_old; + uint8_t shortpkt_old; + uint8_t precompute; + + qtd_altnext = htole32(EHCI_LINK_TERMINATE); + td_alt_next = NULL; + buf_offset = 0; + shortpkt_old = temp->shortpkt; + len_old = temp->len; + precompute = 1; + + restart: + + td = temp->td; + td_next = temp->td_next; + + while (1) { + + if (temp->len == 0) { + + if (temp->shortpkt) { + break; + } + + /* send a Zero Length Packet, ZLP, last */ + + temp->shortpkt = 1; + average = 0; + + } else { + + average = temp->average; + + if (temp->len < average) { + if (temp->len % temp->max_frame_size) { + temp->shortpkt = 1; + } + average = temp->len; + } + } + + if (td_next == NULL) { + panic("%s: out of EHCI transfer descriptors!", __FUNCTION__); + } + + /* get next TD */ + + td = td_next; + td_next = td->obj_next; + + /* check if we are pre-computing */ + + if (precompute) { - DPRINTFN(8, ("addr=%d endpt=%d len=%d speed=%d\n", - xfer->address, UE_GET_ADDR(xfer->endpoint), - xfer->length, usbd_get_speed(xfer->udev))); + /* update remaining length */ - td = (xfer->td_transfer_first = - xfer->td_transfer_cache = xfer->td_start); + temp->len -= average; - buf_offset = 0; - usbd_get_page(&(xfer->buf_data), buf_offset, &buf_res); + continue; + } - force_short = (xfer->flags & USBD_FORCE_SHORT_XFER) ? 1 : 0; + usbd_page_dma_exit(td->page); - len = xfer->length; + /* fill out current TD */ - if(methods == &ehci_device_ctrl_methods) - { - isread = xfer->control_isread; + td->qtd_status = + temp->qtd_status | htole32(EHCI_QTD_SET_BYTES(average)); - if (xfer->flags & USBD_DEV_CONTROL_HEADER) { + if (average == 0) { - xfer->pipe->toggle_next = 1; + if (temp->auto_data_toggle == 0) { - usbd_page_dma_exit(td->page); + /* update data toggle, ZLP case */ - /* SETUP message */ + temp->qtd_status ^= htole32(EHCI_QTD_TOGGLE_MASK); + } - td->qtd_status = c_error | htole32 - (EHCI_QTD_ACTIVE | - EHCI_QTD_SET_PID(EHCI_QTD_PID_SETUP) | - EHCI_QTD_SET_TOGGLE(0) | - EHCI_QTD_SET_BYTES(sizeof(usb_device_request_t))); + td->len = 0; - td->qtd_buffer[0] = htole32(buf_res.physaddr); + td->qtd_buffer[0] = 0; td->qtd_buffer_hi[0] = 0; - buf_offset += sizeof(usb_device_request_t); - usbd_get_page(&(xfer->buf_data), buf_offset, &buf_res); + td->qtd_buffer[1] = 0; + td->qtd_buffer_hi[1] = 0; + + } else { + + uint8_t x; - td->qtd_buffer[1] = - htole32(buf_res.physaddr & (~0xFFF)); - td->qtd_buffer_hi[1] = 0; + if (temp->auto_data_toggle == 0) { - td->len = sizeof(usb_device_request_t); - len -= sizeof(usb_device_request_t); - td_last = td; - td = td->obj_next; + /* update data toggle */ - if (td) { - /* link the last TD with the next one */ - td_last->qtd_next = td->qtd_self; - /* short transfers should terminate the transfer: */ - td_last->qtd_altnext = htole32(EHCI_LINK_TERMINATE); + if (((average + temp->max_frame_size - 1) / + temp->max_frame_size) & 1) { + temp->qtd_status ^= htole32(EHCI_QTD_TOGGLE_MASK); + } } - usbd_page_dma_enter(td_last->page); - } else { - if (len == 0) { - /* When the length is zero we - * queue a short packet! - * This also makes "td_last" - * non-zero. - */ - DPRINTFN(0, ("short transfer!\n")); - force_short = 1; + td->len = average; + + /* update remaining length */ + + temp->len -= average; + + /* fill out buffer pointers */ + + usbd_get_page(temp->pc, buf_offset, &buf_res); + td->qtd_buffer[0] = htole32(buf_res.physaddr); + td->qtd_buffer_hi[0] = 0; + + x = 1; + + while (average > EHCI_PAGE_SIZE) { + average -= EHCI_PAGE_SIZE; + buf_offset += EHCI_PAGE_SIZE; + usbd_get_page(temp->pc, buf_offset, &buf_res); + td->qtd_buffer[x] = htole32(buf_res.physaddr & (~0xFFF)); + td->qtd_buffer_hi[x] = 0; + x++; } + + /* + * NOTE: The "average" variable is + * never zero after exiting the loop + * above ! + * + * NOTE: We have to subtract one from the + * offset to ensure that we are computing + * the physical address of a valid page ! + */ + buf_offset += average; + usbd_get_page(temp->pc, buf_offset-1, &buf_res); + td->qtd_buffer[x] = htole32(buf_res.physaddr & (~0xFFF)); + td->qtd_buffer_hi[x] = 0; + } + + if (td_next) { + /* link the current TD with the next one */ + td->qtd_next = td_next->qtd_self; } + + td->qtd_altnext = qtd_altnext; + td->alt_next = td_alt_next; + + usbd_page_dma_enter(td->page); } - else - { - isread = (UE_GET_DIR(xfer->endpoint) == UE_DIR_IN); + + if (precompute) { + precompute = 0; - if (len == 0) { - /* When the length is zero we - * queue a short packet! - * This also makes "td_last" - * non-zero. - */ - DPRINTFN(0, ("short transfer!\n")); - force_short = 1; + /* setup alt next pointer, if any */ + if (td_next) { + td_alt_next = td_next; + if (temp->setup_alt_next) { + qtd_altnext = td_alt_next->qtd_self; } + } + + /* restore */ + temp->shortpkt = shortpkt_old; + temp->len = len_old; + goto restart; } - qtd_status = c_error | (isread ? - htole32 - (EHCI_QTD_ACTIVE | - EHCI_QTD_SET_PID(EHCI_QTD_PID_IN)) : - htole32 - (EHCI_QTD_ACTIVE | - EHCI_QTD_SET_PID(EHCI_QTD_PID_OUT))); + temp->td = td; + temp->td_next = td_next; + + return; +} + +static void +ehci_setup_standard_chain(struct usbd_xfer *xfer, ehci_qh_t **qh_last) +{ + struct ehci_std_temp temp; + struct usbd_pipe_methods *methods; + ehci_qh_t *qh; + ehci_qtd_t *td; + uint32_t qh_endp; + uint32_t qh_endphub; + uint32_t x; + + DPRINTFN(8, ("addr=%d endpt=%d sumlen=%d speed=%d\n", + xfer->address, UE_GET_ADDR(xfer->endpoint), + xfer->sumlen, usbd_get_speed(xfer->udev))); + + temp.average = xfer->max_usb_frame_size; + temp.max_frame_size = xfer->max_frame_size; + + xfer->td_transfer_first = xfer->td_start; + xfer->td_transfer_cache = xfer->td_start; + + temp.td = NULL; + temp.td_next = xfer->td_start; + temp.qtd_status = 0; + temp.setup_alt_next = xfer->flags_int.short_frames_ok; - if(xfer->pipe->toggle_next) - { - qtd_status |= htole32(EHCI_QTD_SET_TOGGLE(1)); + if (xfer->flags_int.control_xfr) { + if (xfer->pipe->toggle_next) { + /* DATA1 is next */ + temp.qtd_status |= htole32(EHCI_QTD_SET_TOGGLE(1)); + } + temp.auto_data_toggle = 0; + } else { + temp.auto_data_toggle = 1; } - while(1) - { - if(len == 0) - { - if (force_short) - { - if(shortpkt) - { - break; - } - } - else - { - break; - } - } + if (usbd_get_speed(xfer->udev) != USB_SPEED_HIGH) { + /* max 3 retries */ + temp.qtd_status |= htole32(EHCI_QTD_SET_CERR(3)); + } - if(len < average) - { - if((len % xfer->max_packet_size) || - (len == 0)) - { - shortpkt = 1; - } + x = 0; - average = len; - } + /* check if we should prepend a setup message */ - if(td == NULL) - { - panic("%s: software wants to write more data " - "than there is in the buffer!", __FUNCTION__); - } + if (xfer->flags_int.control_xfr && + xfer->flags_int.control_hdr) { - usbd_page_dma_exit(td->page); + temp.qtd_status &= htole32(EHCI_QTD_SET_CERR(3)); + temp.qtd_status |= htole32 + (EHCI_QTD_ACTIVE | + EHCI_QTD_SET_PID(EHCI_QTD_PID_SETUP) | + EHCI_QTD_SET_TOGGLE(0)); - /* fill out current TD */ + temp.len = xfer->frlengths[0]; + temp.pc = xfer->frbuffers + 0; + temp.shortpkt = temp.len ? 1 : 0; - td->qtd_status = - qtd_status | htole32(EHCI_QTD_SET_BYTES(average)); + ehci_setup_standard_chain_sub(&temp); - td->qtd_buffer[0] = htole32(buf_res.physaddr); - td->qtd_buffer_hi[0] = 0; + x = 1; + } - buf_offset += average; - usbd_get_page(&(xfer->buf_data), buf_offset, &buf_res); + while (x != xfer->nframes) { - td->qtd_buffer[1] = - htole32(buf_res.physaddr & (~0xFFF)); - td->qtd_buffer_hi[1] = 0; + /* DATA0 / DATA1 message */ - td->len = average; + temp.len = xfer->frlengths[x]; + temp.pc = xfer->frbuffers + x; - /* adjust the toggle based on the - * number of packets in this qtd - */ - if ((average == 0) || - (((average + xfer->max_packet_size - 1) / - xfer->max_packet_size) & 1)) - { - xfer->pipe->toggle_next = - xfer->pipe->toggle_next ? 0 : 1; + x++; - qtd_status ^= htole32(EHCI_QTD_TOGGLE_MASK); + if (x == xfer->nframes) { + temp.setup_alt_next = 0; } - len -= average; - td_last = td; - td = td->obj_next; + /* keep previous data toggle and error count */ + + temp.qtd_status &= htole32(EHCI_QTD_SET_CERR(3)| + EHCI_QTD_SET_TOGGLE(1)); + + if (temp.len == 0) { + + /* make sure that we send an USB packet */ + + temp.shortpkt = 0; + + if (xfer->flags_int.control_xfr) { + /* we ignore zero length frames */ + continue; + } + + } else { + + /* regular data transfer */ - if (td) { - /* link the last TD with the next one */ - td_last->qtd_next = td->qtd_self; - /* short transfers should terminate the transfer: */ - td_last->qtd_altnext = htole32(EHCI_LINK_TERMINATE); + temp.shortpkt = (xfer->flags.force_short_xfer) ? 0 : 1; } - usbd_page_dma_enter(td_last->page); - } + /* set endpoint direction */ - if(methods == &ehci_device_ctrl_methods) - { - if (xfer->control_remainder == 0) { + temp.qtd_status |= + (UE_GET_DIR(xfer->endpoint) == UE_DIR_IN) ? + htole32(EHCI_QTD_ACTIVE | + EHCI_QTD_SET_PID(EHCI_QTD_PID_IN)) : + htole32(EHCI_QTD_ACTIVE | + EHCI_QTD_SET_PID(EHCI_QTD_PID_OUT)); - usbd_page_dma_exit(td->page); + ehci_setup_standard_chain_sub(&temp); + } - /* STATUS message */ + /* check if we should append a status stage */ - td->qtd_status = c_error | (isread ? - htole32 - (EHCI_QTD_ACTIVE | - EHCI_QTD_SET_PID(EHCI_QTD_PID_OUT) | - EHCI_QTD_SET_TOGGLE(1) | - EHCI_QTD_IOC) : - htole32 - (EHCI_QTD_ACTIVE | - EHCI_QTD_SET_PID(EHCI_QTD_PID_IN) | - EHCI_QTD_SET_TOGGLE(1) | - EHCI_QTD_IOC)); + if (xfer->flags_int.control_xfr && + !xfer->flags_int.control_act) { - td->qtd_buffer[0] = 0; - td->qtd_buffer_hi[0] = 0; + /* + * Send a DATA1 message and invert + * the current endpoint direction. + */ - td->qtd_buffer[1] = 0; - td->qtd_buffer_hi[1] = 0; + temp.qtd_status &= htole32(EHCI_QTD_SET_CERR(3)| + EHCI_QTD_SET_TOGGLE(1)); + temp.qtd_status |= + (UE_GET_DIR(xfer->endpoint) == UE_DIR_OUT) ? + htole32(EHCI_QTD_ACTIVE | + EHCI_QTD_SET_PID(EHCI_QTD_PID_IN) | + EHCI_QTD_SET_TOGGLE(1)) : + htole32(EHCI_QTD_ACTIVE | + EHCI_QTD_SET_PID(EHCI_QTD_PID_OUT) | + EHCI_QTD_SET_TOGGLE(1)); - td->len = 0; - td_last = td; + temp.len = 0; + temp.pc = NULL; + temp.shortpkt = 0; - usbd_page_dma_enter(td_last->page); - } + ehci_setup_standard_chain_sub(&temp); } - usbd_page_dma_exit(td_last->page); + td = temp.td; + + usbd_page_dma_exit(td->page); /* the last TD terminates the transfer: */ - td_last->qtd_next = htole32(EHCI_LINK_TERMINATE); - td_last->qtd_altnext = htole32(EHCI_LINK_TERMINATE); - td_last->qtd_status |= htole32(EHCI_QTD_IOC); + td->qtd_next = htole32(EHCI_LINK_TERMINATE); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Sep 22 15:10:59 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8DD3C16A420; Sat, 22 Sep 2007 15:10:59 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 666CF16A418 for ; Sat, 22 Sep 2007 15:10:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 46E2C13C494 for ; Sat, 22 Sep 2007 15:10:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8MFAxJC015724 for ; Sat, 22 Sep 2007 15:10:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8MFAwZg015717 for perforce@freebsd.org; Sat, 22 Sep 2007 15:10:58 GMT (envelope-from hselasky@FreeBSD.org) Date: Sat, 22 Sep 2007 15:10:58 GMT Message-Id: <200709221510.l8MFAwZg015717@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 126695 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2007 15:10:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=126695 Change 126695 by hselasky@hselasky_laptop001 on 2007/09/22 15:10:53 FYI; The comments follow the P4 diff from top to bottom. - convert kernel USB flags (USBD_XXX) into a bitfield (scripted) - passing a mutex to "usbd_do_request_flags()" and all "usbreq_xxx()" functions is now mandatory. - "xfer->buffer" eliminated. Some times a temporary buffer is used for quick parsing of information. Typically in relation to USB interrupt endpoints. - All USB BULK/ISOC/INTR IN-transfers must setup "xfer->frlengths[]" before calling "usbd_start_hardware()". Else the actual length of the previous transfer will be used for transfer length of the next USB transfer. - "usbd_find_descriptor()" has got two new mask parameters. The mask enables only certain bits to be compared when searching for an USB descriptor by ID. The most commonly masks used are 0 and 0-1. Note that there is a "0" in front of the minus sign. This might look strange, but it actually kills some C++ compiler warnings. - "usbreq_set_interface()" has been renamed "usbd_set_alt_interface_index()" to clearly show that this function does more than just an USB control request. - several serial port drivers have been added the flag "force_short_xfer" to ensure that the data is flushed at the receiving side. You would maybe think that USB dongles read USB packet by USB packet, but that is not always the case. They can have larger buffers, and then you need a short packet last to terminate the transfer. - the maximum "if_ural" frame size has been increased from 0x780 to 0x980 and factored out into a the macro "RAL_FRAME_SIZE". Even though we currently cannot actually transmit or receive that large frames due to the MCLBYTES limit, it is nice to support it. - "if_ural.c" and "if_rum.c" replaced; *(u_int16_t *)(wh->i_dur) = htole16(dur); by; USETW(wh->i_dur, dur); So that we don't hit any alignment issues in the future on embedded platforms. - the "ubser.c" driver now searches the cached "manufacturer" USB string to speed up the probe process. - the actlen variable pointer which can be passed to "usbd_do_request_flags()" has changed type to "uint16_t *" to match the USB specification. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_aue.c#28 edit .. //depot/projects/usb/src/sys/dev/usb/if_axe.c#29 edit .. //depot/projects/usb/src/sys/dev/usb/if_cdce.c#22 edit .. //depot/projects/usb/src/sys/dev/usb/if_cue.c#24 edit .. //depot/projects/usb/src/sys/dev/usb/if_kue.c#26 edit .. //depot/projects/usb/src/sys/dev/usb/if_rue.c#25 edit .. //depot/projects/usb/src/sys/dev/usb/if_rum.c#8 edit .. //depot/projects/usb/src/sys/dev/usb/if_udav.c#25 edit .. //depot/projects/usb/src/sys/dev/usb/if_ural.c#31 edit .. //depot/projects/usb/src/sys/dev/usb/if_uralreg.h#13 edit .. //depot/projects/usb/src/sys/dev/usb/if_zyd.c#14 edit .. //depot/projects/usb/src/sys/dev/usb/uark.c#6 edit .. //depot/projects/usb/src/sys/dev/usb/ubsa.c#21 edit .. //depot/projects/usb/src/sys/dev/usb/ubser.c#15 edit .. //depot/projects/usb/src/sys/dev/usb/ucycom.c#14 edit .. //depot/projects/usb/src/sys/dev/usb/udbp.c#11 edit .. //depot/projects/usb/src/sys/dev/usb/ufoma.c#21 edit .. //depot/projects/usb/src/sys/dev/usb/uftdi.c#19 edit .. //depot/projects/usb/src/sys/dev/usb/ugensa.c#7 edit .. //depot/projects/usb/src/sys/dev/usb/uipaq.c#6 edit .. //depot/projects/usb/src/sys/dev/usb/ukbd.c#20 edit .. //depot/projects/usb/src/sys/dev/usb/ulpt.c#21 edit .. //depot/projects/usb/src/sys/dev/usb/umct.c#15 edit .. //depot/projects/usb/src/sys/dev/usb/umodem.c#24 edit .. //depot/projects/usb/src/sys/dev/usb/umoscom.c#5 edit .. //depot/projects/usb/src/sys/dev/usb/uplcom.c#22 edit .. //depot/projects/usb/src/sys/dev/usb/urio.c#11 edit .. //depot/projects/usb/src/sys/dev/usb/uscanner.c#11 edit .. //depot/projects/usb/src/sys/dev/usb/uvisor.c#17 edit .. //depot/projects/usb/src/sys/dev/usb/uvscom.c#22 edit .. //depot/projects/usb/src/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c#13 edit .. //depot/projects/usb/src/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#8 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_aue.c#28 (text+ko) ==== @@ -285,7 +285,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = (MCLBYTES + 2), - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_FORCE_SHORT_XFER), + .flags = { .pipe_bof = 1, .force_short_xfer = 1, }, .callback = &aue_bulk_write_callback, .timeout = 10000, /* 10 seconds */ }, @@ -295,7 +295,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = (MCLBYTES + 4 + ETHER_CRC_LEN), - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .callback = &aue_bulk_read_callback, }, @@ -304,7 +304,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &aue_bulk_write_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -315,7 +315,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &aue_bulk_read_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -325,7 +325,7 @@ .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .flags = (USBD_PIPE_BOF|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .bufsize = 0, /* use wMaxPacketSize */ .callback = &aue_intr_callback, }, @@ -335,7 +335,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &aue_intr_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -383,8 +383,8 @@ goto error; } - err = usbd_do_request_flags_mtx(sc->sc_udev, &(sc->sc_mtx), req, - data, 0, NULL, 1000); + err = usbd_do_request_flags + (sc->sc_udev, &(sc->sc_mtx), req, data, 0, NULL, 1000); if (err) { @@ -1012,21 +1012,23 @@ { struct aue_softc *sc = xfer->priv_sc; struct ifnet *ifp = sc->sc_ifp; - struct aue_intrpkt *p = xfer->buffer; + struct aue_intrpkt pkt; USBD_CHECK_STATUS(xfer); tr_transferred: if (ifp && (ifp->if_drv_flags & IFF_DRV_RUNNING) && - (xfer->actlen >= sizeof(*p))) { + (xfer->actlen >= sizeof(pkt))) { + + usbd_copy_out(&(xfer->buf_data), 0, &pkt, sizeof(pkt)); - if (p->aue_txstat0) { + if (pkt.aue_txstat0) { ifp->if_oerrors++; } - if (p->aue_txstat0 & (AUE_TXSTAT0_LATECOLL & - AUE_TXSTAT0_EXCESSCOLL)) { + if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL & + AUE_TXSTAT0_EXCESSCOLL)) { ifp->if_collisions++; } } @@ -1035,6 +1037,7 @@ if (sc->sc_flags & AUE_FLAG_INTR_STALL) { usbd_transfer_start(sc->sc_xfer[5]); } else { + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); } return; @@ -1135,6 +1138,7 @@ if (sc->sc_flags & AUE_FLAG_READ_STALL) { usbd_transfer_start(sc->sc_xfer[3]); } else { + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); } @@ -1219,14 +1223,14 @@ if (sc->sc_flags & AUE_FLAG_VER_2) { - xfer->length = m->m_pkthdr.len; + xfer->frlengths[0] = m->m_pkthdr.len; usbd_m_copy_in(&(xfer->buf_data), 0, m, 0, m->m_pkthdr.len); } else { - xfer->length = (m->m_pkthdr.len + 2); + xfer->frlengths[0] = (m->m_pkthdr.len + 2); /* * The ADMtek documentation says that the packet length is ==== //depot/projects/usb/src/sys/dev/usb/if_axe.c#29 (text+ko) ==== @@ -234,7 +234,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = AXE_BULK_BUF_SIZE, - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_FORCE_SHORT_XFER), + .flags = { .pipe_bof = 1, .force_short_xfer = 1, }, .callback = &axe_bulk_write_callback, .timeout = 10000, /* 10 seconds */ }, @@ -247,7 +247,7 @@ #error "(MCLBYTES < 2048)" #endif .bufsize = MCLBYTES, - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .callback = &axe_bulk_read_callback, .timeout = 0, /* no timeout */ }, @@ -257,7 +257,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &axe_bulk_write_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -268,7 +268,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &axe_bulk_read_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -278,7 +278,7 @@ .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .flags = (USBD_PIPE_BOF|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .bufsize = 0, /* use wMaxPacketSize */ .callback = &axe_intr_callback, }, @@ -288,7 +288,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &axe_intr_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -345,8 +345,8 @@ goto error; } - err = usbd_do_request_flags_mtx(sc->sc_udev, &(sc->sc_mtx), &req, - buf, 0, NULL, 1000); + err = usbd_do_request_flags + (sc->sc_udev, &(sc->sc_mtx), &req, buf, 0, NULL, 1000); if (err) { @@ -590,16 +590,8 @@ { usbd_status err; - mtx_unlock(&(sc->sc_mtx)); - - mtx_lock(&Giant); - - err = usbreq_set_config(sc->sc_udev, AXE_CONFIG_NO); - - mtx_unlock(&Giant); + err = usbreq_set_config(sc->sc_udev, &(sc->sc_mtx), AXE_CONFIG_NO); - mtx_lock(&(sc->sc_mtx)); - if (err) { DPRINTF(sc, 0, "reset failed (ignored)\n"); } @@ -998,6 +990,7 @@ if (sc->sc_flags & AXE_FLAG_INTR_STALL) { usbd_transfer_start(sc->sc_xfer[5]); } else { + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); } return; @@ -1139,6 +1132,7 @@ if (sc->sc_flags & AXE_FLAG_READ_STALL) { usbd_transfer_start(sc->sc_xfer[3]); } else { + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); } @@ -1284,8 +1278,7 @@ } } - xfer->length = pos; - + xfer->frlengths[0] = pos; usbd_start_hardware(xfer); done: ==== //depot/projects/usb/src/sys/dev/usb/if_cdce.c#22 (text+ko) ==== @@ -112,7 +112,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = (MCLBYTES + 4), - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_FORCE_SHORT_XFER), + .flags = { .pipe_bof = 1, .force_short_xfer = 1, }, .callback = &cdce_bulk_write_callback, .timeout = 10000, /* 10 seconds */ }, @@ -122,7 +122,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = (MCLBYTES + 4), - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .callback = &cdce_bulk_read_callback, }, @@ -131,7 +131,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &cdce_bulk_write_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -142,7 +142,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &cdce_bulk_read_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -231,7 +231,7 @@ int error; u_int8_t i; u_int8_t eaddr[ETHER_ADDR_LEN]; - u_int8_t eaddr_str[(ETHER_ADDR_LEN * 2) + 1]; + u_int8_t eaddr_str[USB_STRING_DESC_LEN(ETHER_ADDR_LEN * 2) + 1]; if (sc == NULL) { return ENOMEM; @@ -261,7 +261,7 @@ ud = usbd_find_descriptor (uaa->device, NULL, uaa->iface_index, - UDESC_CS_INTERFACE, UDESCSUB_CDC_UNION); + UDESC_CS_INTERFACE, 0-1, UDESCSUB_CDC_UNION, 0-1); if ((ud == NULL) || (ud->bLength < sizeof(*ud))) { device_printf(dev, "no union descriptor!\n"); @@ -312,7 +312,7 @@ for (i = 0; i < 32; i++) { - error = usbreq_set_interface + error = usbd_set_alt_interface_index (uaa->device, sc->sc_data_iface_index, i); if (error) { @@ -336,11 +336,17 @@ ue = usbd_find_descriptor (uaa->device, NULL, uaa->iface_index, - UDESC_CS_INTERFACE, UDESCSUB_CDC_ENF); + UDESC_CS_INTERFACE, 0-1, UDESCSUB_CDC_ENF, 0-1); + + if ((ue == NULL) || (ue->bLength < sizeof(*ue))) { + error = USBD_INVAL; + } else { + error = usbreq_get_string_any + (uaa->device, &Giant, eaddr_str, + sizeof(eaddr_str), ue->iMacAddress); + } - if ((ue == NULL) || (ue->bLength < sizeof(*ue)) || - usbreq_get_string_any(uaa->device, ue->iMacAddress, - eaddr_str, sizeof(eaddr_str))) { + if (error) { /* fake MAC address */ @@ -528,7 +534,7 @@ m->m_pkthdr.len = MCLBYTES; } - xfer->length = m->m_pkthdr.len; + xfer->frlengths[0] = m->m_pkthdr.len; usbd_m_copy_in(&(xfer->buf_data), 0, m, 0, m->m_pkthdr.len); @@ -541,7 +547,7 @@ usbd_copy_in(&(xfer->buf_data), m->m_pkthdr.len, &crc, 4); - xfer->length += 4; + xfer->frlengths[0] += 4; } /* @@ -750,6 +756,7 @@ if (sc->sc_flags & CDCE_FLAG_READ_STALL) { usbd_transfer_start(sc->sc_xfer[3]); } else { + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); } ==== //depot/projects/usb/src/sys/dev/usb/if_cue.c#24 (text+ko) ==== @@ -168,7 +168,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = (MCLBYTES + 2), - .flags = (USBD_PIPE_BOF|USBD_USE_DMA), + .flags = { .pipe_bof = 1, }, .callback = &cue_bulk_write_callback, .timeout = 10000, /* 10 seconds */ }, @@ -178,7 +178,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = (MCLBYTES + 2), - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .callback = &cue_bulk_read_callback, }, @@ -187,7 +187,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &cue_bulk_write_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -198,7 +198,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &cue_bulk_read_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -238,8 +238,8 @@ goto error; } - err = usbd_do_request_flags_mtx(sc->sc_udev, &(sc->sc_mtx), req, - data, 0, NULL, 1000); + err = usbd_do_request_flags + (sc->sc_udev, &(sc->sc_mtx), req, data, 0, NULL, 1000); if (err) { @@ -695,6 +695,7 @@ if (sc->sc_flags & CUE_FLAG_READ_STALL) { usbd_transfer_start(sc->sc_xfer[3]); } else { + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); } @@ -825,7 +826,7 @@ m->m_pkthdr.len = MCLBYTES; } - xfer->length = (m->m_pkthdr.len + 2); + xfer->frlengths[0] = (m->m_pkthdr.len + 2); /* the first two bytes are the frame length */ ==== //depot/projects/usb/src/sys/dev/usb/if_kue.c#26 (text+ko) ==== @@ -202,7 +202,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = (MCLBYTES + 2 + 64), - .flags = (USBD_PIPE_BOF|USBD_USE_DMA), + .flags = { .pipe_bof = 1, }, .callback = &kue_bulk_write_callback, .timeout = 10000, /* 10 seconds */ }, @@ -212,7 +212,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = (MCLBYTES + 2), - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .callback = &kue_bulk_read_callback, .timeout = 0, /* no timeout */ }, @@ -222,7 +222,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &kue_bulk_write_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -233,7 +233,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &kue_bulk_read_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -280,8 +280,8 @@ goto error; } - err = usbd_do_request_flags_mtx(sc->sc_udev, &(sc->sc_mtx), req, - data, 0, NULL, 60000); + err = usbd_do_request_flags + (sc->sc_udev, &(sc->sc_mtx), req, data, 0, NULL, 60000); if (err) { DPRINTF(sc, 0, "device request failed, err=%s " @@ -460,15 +460,7 @@ { usbd_status err; - mtx_unlock(&(sc->sc_mtx)); - - mtx_lock(&Giant); - - err = usbreq_set_config(sc->sc_udev, KUE_CONFIG_NO); - - mtx_unlock(&Giant); - - mtx_lock(&(sc->sc_mtx)); + err = usbreq_set_config(sc->sc_udev, &(sc->sc_mtx), KUE_CONFIG_NO); if (err) { DPRINTF(sc, 0, "reset failed (ignored)\n"); @@ -747,6 +739,7 @@ if (sc->sc_flags & KUE_FLAG_READ_STALL) { usbd_transfer_start(sc->sc_xfer[3]); } else { + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); } @@ -784,6 +777,7 @@ struct ifnet *ifp = sc->sc_ifp; struct mbuf *m; u_int32_t total_len; + uint32_t temp_len; u_int8_t buf[2]; USBD_CHECK_STATUS(xfer); @@ -823,8 +817,8 @@ m->m_pkthdr.len = MCLBYTES; } - xfer->length = (m->m_pkthdr.len + 2); - total_len = (xfer->length + (64 - (xfer->length % 64))); + temp_len = (m->m_pkthdr.len + 2); + total_len = (temp_len + (64 - (temp_len % 64))); /* the first two bytes are the frame length */ @@ -836,10 +830,10 @@ usbd_m_copy_in(&(xfer->buf_data), 2, m, 0, m->m_pkthdr.len); - usbd_bzero(&(xfer->buf_data), xfer->length, - total_len - xfer->length); + usbd_bzero(&(xfer->buf_data), temp_len, + total_len - temp_len); - xfer->length = total_len; + xfer->frlengths[0] = total_len; /* * if there's a BPF listener, bounce a copy ==== //depot/projects/usb/src/sys/dev/usb/if_rue.c#25 (text+ko) ==== @@ -214,7 +214,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = MCLBYTES, - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_FORCE_SHORT_XFER), + .flags = { .pipe_bof = 1, .force_short_xfer = 1, }, .callback = &rue_bulk_write_callback, .timeout = 10000, /* 10 seconds */ }, @@ -224,7 +224,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = (MCLBYTES + 4), - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .callback = &rue_bulk_read_callback, .timeout = 0, /* no timeout */ }, @@ -234,7 +234,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &rue_bulk_write_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -245,7 +245,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &rue_bulk_read_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -255,7 +255,7 @@ .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .flags = (USBD_PIPE_BOF|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .bufsize = 0, /* use wMaxPacketSize */ .callback = &rue_intr_callback, }, @@ -265,7 +265,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &rue_intr_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -316,8 +316,8 @@ goto error; } - err = usbd_do_request_flags_mtx(sc->sc_udev, &(sc->sc_mtx), req, - data, 0, NULL, 1000); + err = usbd_do_request_flags + (sc->sc_udev, &(sc->sc_mtx), req, data, 0, NULL, 1000); if (err) { @@ -897,24 +897,27 @@ { struct rue_softc *sc = xfer->priv_sc; struct ifnet *ifp = sc->sc_ifp; - struct rue_intrpkt *p = xfer->buffer; + struct rue_intrpkt pkt; USBD_CHECK_STATUS(xfer); tr_transferred: if (ifp && (ifp->if_drv_flags & IFF_DRV_RUNNING) && - (xfer->actlen >= sizeof(*p))) { + (xfer->actlen >= sizeof(pkt))) { + + usbd_copy_out(&(xfer->buf_data), 0, &pkt, sizeof(pkt)); - ifp->if_ierrors += p->rue_rxlost_cnt; - ifp->if_ierrors += p->rue_crcerr_cnt; - ifp->if_collisions += p->rue_col_cnt; + ifp->if_ierrors += pkt.rue_rxlost_cnt; + ifp->if_ierrors += pkt.rue_crcerr_cnt; + ifp->if_collisions += pkt.rue_col_cnt; } tr_setup: if (sc->sc_flags & RUE_FLAG_INTR_STALL) { usbd_transfer_start(sc->sc_xfer[5]); } else { + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); } return; @@ -1008,6 +1011,7 @@ if (sc->sc_flags & RUE_FLAG_READ_STALL) { usbd_transfer_start(sc->sc_xfer[3]); } else { + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); } @@ -1044,6 +1048,7 @@ struct rue_softc *sc = xfer->priv_sc; struct ifnet *ifp = sc->sc_ifp; struct mbuf *m; + uint32_t temp_len; USBD_CHECK_STATUS(xfer); @@ -1089,7 +1094,7 @@ m->m_pkthdr.len = MCLBYTES; } - xfer->length = m->m_pkthdr.len; + temp_len = m->m_pkthdr.len; usbd_m_copy_in(&(xfer->buf_data), 0, m, 0, m->m_pkthdr.len); @@ -1099,12 +1104,14 @@ * RTL8150 chip doesn't send frame length smaller than * RUE_MIN_FRAMELEN (60) byte packet. */ - if (xfer->length < RUE_MIN_FRAMELEN) { - usbd_bzero(&(xfer->buf_data), xfer->length, - RUE_MIN_FRAMELEN - xfer->length); - xfer->length = RUE_MIN_FRAMELEN; + if (temp_len < RUE_MIN_FRAMELEN) { + usbd_bzero(&(xfer->buf_data), temp_len, + RUE_MIN_FRAMELEN - temp_len); + temp_len = RUE_MIN_FRAMELEN; } + xfer->frlengths[0] = temp_len; + /* * if there's a BPF listener, bounce a copy * of this frame to him: ==== //depot/projects/usb/src/sys/dev/usb/if_rum.c#8 (text+ko) ==== @@ -372,7 +372,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = (MCLBYTES + RT2573_TX_DESC_SIZE + 8), - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_FORCE_SHORT_XFER), + .flags = { .pipe_bof = 1, .force_short_xfer = 1, }, .callback = &rum_bulk_write_callback, .timeout = 5000, /* ms */ }, @@ -382,7 +382,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = (MCLBYTES + RT2573_RX_DESC_SIZE), - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .callback = &rum_bulk_read_callback, }, @@ -563,7 +563,7 @@ goto error; } - err = usbd_do_request_flags_mtx + err = usbd_do_request_flags (sc->sc_udev, &(sc->sc_mtx), req, data, 0, NULL, 1000); if (err) { @@ -1124,6 +1124,7 @@ if (sc->sc_flags & RUM_FLAG_READ_STALL) { usbd_transfer_start(sc->sc_xfer[3]); } else { + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); } @@ -1312,6 +1313,7 @@ { struct rum_softc *sc = xfer->priv_sc; struct ieee80211com *ic = &(sc->sc_ic); + uint32_t temp_len; uint8_t align; if (m->m_pkthdr.len > MCLBYTES) { @@ -1341,25 +1343,25 @@ m, 0, m->m_pkthdr.len); /* compute transfer length */ - xfer->length = (RT2573_TX_DESC_SIZE + m->m_pkthdr.len); + temp_len = (RT2573_TX_DESC_SIZE + m->m_pkthdr.len); /* make transfer length 32-bit aligned */ - if (xfer->length & 3) { - align = (-(xfer->length)) & 3; + if (temp_len & 3) { + align = (-(temp_len)) & 3; /* zero the extra byte(s) */ - usbd_bzero(&(xfer->buf_data), xfer->length, align); - xfer->length += align; + usbd_bzero(&(xfer->buf_data), temp_len, align); + temp_len += align; } /* check if we need to add four extra bytes */ - if ((xfer->length % 64) == 0) { + if ((temp_len % 64) == 0) { /* zero the extra bytes */ - usbd_bzero(&(xfer->buf_data), xfer->length, 4); - xfer->length += 4; + usbd_bzero(&(xfer->buf_data), temp_len, 4); + temp_len += 4; } DPRINTF(sc, 10, "sending frame len=%u rate=%u xferlen=%u\n", - m->m_pkthdr.len, rate, xfer->length); + m->m_pkthdr.len, rate, temp_len); if (m->m_flags & M_TXCB) { ieee80211_process_callback(ni, m, 0); @@ -1371,6 +1373,7 @@ ieee80211_free_node(ni); } + xfer->frlengths[0] = temp_len; usbd_start_hardware(xfer); return; } @@ -1447,7 +1450,7 @@ dur = rum_txtime(sc, RUM_ACK_SIZE, rum_ack_rate(ic, rate), ic->ic_flags) + sc->sc_sifs; - *(uint16_t *)(wh->i_dur) = htole16(dur); + USETW(wh->i_dur, dur); /* tell hardware to add timestamp for probe responses */ if ((wh->i_fc[0] & @@ -1523,7 +1526,7 @@ dur = rum_txtime(sc, RUM_ACK_SIZE, rum_ack_rate(ic,rate), ic->ic_flags) + sc->sc_sifs; - *(uint16_t *)(wh->i_dur) = htole16(dur); + USETW(wh->i_dur, dur); } rum_bulk_write_callback_sub(xfer, m, ni, flags, rate); ==== //depot/projects/usb/src/sys/dev/usb/if_udav.c#25 (text+ko) ==== @@ -161,7 +161,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = (MCLBYTES + 2), - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_FORCE_SHORT_XFER), + .flags = { .pipe_bof = 1, .force_short_xfer = 1, }, .callback = &udav_bulk_write_callback, .timeout = 10000, /* 10 seconds */ }, @@ -171,7 +171,7 @@ .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = (MCLBYTES + 3), - .flags = (USBD_PIPE_BOF|USBD_USE_DMA|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .callback = &udav_bulk_read_callback, .timeout = 0, /* no timeout */ }, @@ -181,7 +181,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &udav_bulk_write_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -192,7 +192,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &udav_bulk_read_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -202,7 +202,7 @@ .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .flags = (USBD_PIPE_BOF|USBD_SHORT_XFER_OK), + .flags = { .pipe_bof = 1, .short_xfer_ok = 1, }, .bufsize = 0, /* use wMaxPacketSize */ .callback = &udav_intr_callback, }, @@ -212,7 +212,7 @@ .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, .bufsize = sizeof(usb_device_request_t), - .flags = USBD_USE_DMA, + .flags = { }, .callback = &udav_intr_clear_stall_callback, .timeout = 1000, /* 1 second */ .interval = 50, /* 50ms */ @@ -499,8 +499,8 @@ goto error; } - err = usbd_do_request_flags_mtx(sc->sc_udev, &(sc->sc_mtx), req, - data, 0, NULL, 1000); + err = usbd_do_request_flags + (sc->sc_udev, &(sc->sc_mtx), req, data, 0, NULL, 1000); if (err) { @@ -879,6 +879,7 @@ struct ifnet *ifp = sc->sc_ifp; struct mbuf *m; u_int32_t extra_len; + uint32_t temp_len; u_int8_t buf[2]; USBD_CHECK_STATUS(xfer); @@ -931,16 +932,16 @@ extra_len = 0; } - xfer->length = (m->m_pkthdr.len + extra_len); + temp_len = (m->m_pkthdr.len + extra_len); /* * the frame length is specified * in the first 2 bytes of the buffer */ - buf[0] = (u_int8_t)(xfer->length); - buf[1] = (u_int8_t)(xfer->length >> 8); + buf[0] = (u_int8_t)(temp_len); + buf[1] = (u_int8_t)(temp_len >> 8); - xfer->length += 2; + temp_len += 2; usbd_copy_in(&(xfer->buf_data), 0, buf, 2); @@ -948,7 +949,7 @@ m, 0, m->m_pkthdr.len); if (extra_len) { - usbd_bzero(&(xfer->buf_data), xfer->length - extra_len, + usbd_bzero(&(xfer->buf_data), temp_len - extra_len, extra_len); } @@ -960,6 +961,7 @@ m_freem(m); + xfer->frlengths[0] = temp_len; usbd_start_hardware(xfer); done: @@ -1057,6 +1059,7 @@ if (sc->sc_flags & UDAV_FLAG_READ_STALL) { usbd_transfer_start(sc->sc_xfer[3]); } else { + xfer->frlengths[0] = xfer->max_data_length; usbd_start_hardware(xfer); } @@ -1100,6 +1103,7 @@ if (sc->sc_flags & UDAV_FLAG_INTR_STALL) { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Sep 22 17:35:06 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DA42116A421; Sat, 22 Sep 2007 17:35:05 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BF4416A417 for ; Sat, 22 Sep 2007 17:35:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5B66713C4B6 for ; Sat, 22 Sep 2007 17:35:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8MHZ5Hu035574 for ; Sat, 22 Sep 2007 17:35:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8MHZ5ut035571 for perforce@freebsd.org; Sat, 22 Sep 2007 17:35:05 GMT (envelope-from hselasky@FreeBSD.org) Date: Sat, 22 Sep 2007 17:35:05 GMT Message-Id: <200709221735.l8MHZ5ut035571@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 126697 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2007 17:35:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=126697 Change 126697 by hselasky@hselasky_laptop001 on 2007/09/22 17:34:22 - change UCOM layer to accept USB DMA buffers instead of linear buffers Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ucom.c#17 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ucom.c#17 (text+ko) ==== @@ -1060,12 +1060,14 @@ * 1 if data is available, else 0 */ -u_int8_t -ucom_get_data(struct ucom_softc *sc, u_int8_t *buf, u_int32_t len, - u_int32_t *actlen) +uint8_t +ucom_get_data(struct ucom_softc *sc, struct usbd_page_cache *pc, + uint32_t offset, uint32_t len, uint32_t *actlen) { + struct usbd_page_search res; struct tty *tp = sc->sc_tty; - u_int32_t cnt; + uint32_t cnt; + uint32_t offset_orig; mtx_assert(sc->sc_parent_mtx, MA_OWNED); @@ -1097,21 +1099,35 @@ goto done; } - cnt = q_to_b(&(tp->t_outq), buf, len); + offset_orig = offset; + + while (len > 0) { + + usbd_get_page(pc, offset, &res); + + if (res.length > len) { + res.length = len; + } + + cnt = q_to_b(&(tp->t_outq), res.buffer, res.length); + + offset += cnt; + len -= cnt; - if (cnt > len) { - DPRINTF(0, "invalid length, %d bytes\n", cnt); - goto done; + if (cnt < res.length) { + /* end of buffer */ + break; + } } - DPRINTF(0, "cnt=%d\n", cnt); + actlen[0] = offset - offset_orig; + + DPRINTF(0, "cnt=%d\n", actlen[0]); - if (cnt == 0) { + if (actlen[0] == 0) { goto done; } - actlen[0] = cnt; - ttwwakeup(tp); return 1; @@ -1125,10 +1141,12 @@ } void -ucom_put_data(struct ucom_softc *sc, u_int8_t *ptr, u_int16_t len) +ucom_put_data(struct ucom_softc *sc, struct usbd_page_cache *pc, + uint32_t offset, uint32_t len) { + struct usbd_page_search res; struct tty *tp = sc->sc_tty; - u_int16_t lostcc; + uint32_t cnt; mtx_assert(sc->sc_parent_mtx, MA_OWNED); @@ -1137,53 +1155,62 @@ return; /* multiport device polling */ } - /* set a flag to prevent recursation */ + /* set a flag to prevent recursation ? */ + + while (len > 0) { - if (len == 0) { - goto done; - } + usbd_get_page(pc, offset, &res); - if (tp->t_state & TS_CAN_BYPASS_L_RINT) { - if (((tp->t_rawq.c_cc + len) > tp->t_ihiwat) && - ((sc->sc_flag & UCOM_FLAG_RTS_IFLOW) || - (tp->t_iflag & IXOFF)) && - (!(tp->t_state & TS_TBLOCK))) { - ttyblock(tp); + if (res.length > len) { + res.length = len; } - lostcc = b_to_q(ptr, len, &(tp->t_rawq)); + len -= res.length; + offset += res.length; - tp->t_rawcc += len; + if (tp->t_state & TS_CAN_BYPASS_L_RINT) { - ttwakeup(tp); + if (((tp->t_rawq.c_cc + res.length) > tp->t_ihiwat) && + ((sc->sc_flag & UCOM_FLAG_RTS_IFLOW) || + (tp->t_iflag & IXOFF)) && + (!(tp->t_state & TS_TBLOCK))) { + ttyblock(tp); + } - if ((tp->t_state & TS_TTSTOP) && - ((tp->t_iflag & IXANY) || - (tp->t_cc[VSTART] == tp->t_cc[VSTOP]))) { - tp->t_state &= ~TS_TTSTOP; - tp->t_lflag &= ~FLUSHO; - ucom_start_write(tp); - } + cnt = b_to_q(res.buffer, res.length, &(tp->t_rawq)); - if (lostcc > 0) { - DPRINTF(0, "tp=%p, lost %d " - "chars\n", tp, lostcc); - } - } else { - /* pass characters to tty layer */ - while (len) { - DPRINTF(7, "char = 0x%02x\n", *ptr); + tp->t_rawcc += res.length; - if (ttyld_rint(tp, *ptr) == -1) { + ttwakeup(tp); - /* XXX what should we do? */ + if ((tp->t_state & TS_TTSTOP) && + ((tp->t_iflag & IXANY) || + (tp->t_cc[VSTART] == tp->t_cc[VSTOP]))) { + tp->t_state &= ~TS_TTSTOP; + tp->t_lflag &= ~FLUSHO; + ucom_start_write(tp); + } + if (cnt > 0) { DPRINTF(0, "tp=%p, lost %d " - "chars\n", tp, len); - break; + "chars\n", tp, cnt); + } + + } else { + + /* pass characters to tty layer */ + + for (cnt = 0; cnt < res.length; cnt++) { + + if (ttyld_rint(tp, ((uint8_t *)res.buffer)[cnt]) == -1) { + + /* XXX what should we do? */ + + DPRINTF(0, "tp=%p, lost %d " + "chars\n", tp, res.length - cnt); + break; + } } - len--; - ptr++; } } From owner-p4-projects@FreeBSD.ORG Sat Sep 22 17:36:07 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6C9C116A46C; Sat, 22 Sep 2007 17:36:07 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D9EC16A469 for ; Sat, 22 Sep 2007 17:36:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2D03D13C4BC for ; Sat, 22 Sep 2007 17:36:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8MHa7RH035666 for ; Sat, 22 Sep 2007 17:36:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8MHa6Mi035663 for perforce@freebsd.org; Sat, 22 Sep 2007 17:36:06 GMT (envelope-from hselasky@FreeBSD.org) Date: Sat, 22 Sep 2007 17:36:06 GMT Message-Id: <200709221736.l8MHa6Mi035663@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 126698 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2007 17:36:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=126698 Change 126698 by hselasky@hselasky_laptop001 on 2007/09/22 17:35:54 - change UCOM layer to accept USB DMA buffers instead of linear buffers (update prototypes) Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ucomvar.h#12 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ucomvar.h#12 (text+ko) ==== @@ -143,8 +143,8 @@ int ucom_attach(struct ucom_super_softc *ssc, struct ucom_softc *sc, uint32_t sub_units, void *parent, const struct ucom_callback *callback, struct mtx *p_mtx); void ucom_detach(struct ucom_super_softc *ssc, struct ucom_softc *sc, uint32_t sub_units); void ucom_status_change(struct ucom_softc *); -uint8_t ucom_get_data(struct ucom_softc *sc, uint8_t *buf, uint32_t len, uint32_t *actlen); -void ucom_put_data(struct ucom_softc *sc, uint8_t *ptr, uint16_t len); +uint8_t ucom_get_data(struct ucom_softc *sc, struct usbd_page_cache *pc, uint32_t offset, uint32_t len, uint32_t *actlen); +void ucom_put_data(struct ucom_softc *sc, struct usbd_page_cache *pc, uint32_t offset, uint32_t len); uint8_t ucom_cfg_sleep(struct ucom_softc *sc, uint32_t timeout); uint8_t ucom_cfg_is_gone(struct ucom_softc *sc); From owner-p4-projects@FreeBSD.ORG Sat Sep 22 17:42:16 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4966316A469; Sat, 22 Sep 2007 17:42:16 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE8EA16A41B for ; Sat, 22 Sep 2007 17:42:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B39EF13C48A for ; Sat, 22 Sep 2007 17:42:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8MHgFTm036084 for ; Sat, 22 Sep 2007 17:42:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8MHgF6A036081 for perforce@freebsd.org; Sat, 22 Sep 2007 17:42:15 GMT (envelope-from hselasky@FreeBSD.org) Date: Sat, 22 Sep 2007 17:42:15 GMT Message-Id: <200709221742.l8MHgF6A036081@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 126699 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2007 17:42:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=126699 Change 126699 by hselasky@hselasky_laptop001 on 2007/09/22 17:41:46 - use "usbd_do_request()" to perform USB control requests instead of a custom allocated USB transfer. This makes the driver more identical to the origin and saves some code. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ufm.c#13 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ufm.c#13 (text+ko) ==== @@ -63,8 +63,6 @@ #define DPRINTF(...) do { } while (0) #endif -#define UFM_N_TRANSFER 1 /* units */ -#define UFM_BUF_SIZE (sizeof(usb_device_request_t) + 1) /* bytes */ #define UFM_CMD0 0x00 #define UFM_CMD_SET_FREQ 0x01 #define UFM_CMD2 0x02 @@ -74,15 +72,10 @@ struct mtx sc_mtx; struct usbd_device *sc_udev; - struct usbd_xfer *sc_xfer[UFM_N_TRANSFER]; u_int32_t sc_unit; u_int32_t sc_freq; - u_int16_t sc_flags; -#define UFM_FLAG_COMMAND_ERR 0x0001 - - u_int8_t sc_transfer_buf[UFM_BUF_SIZE]; u_int8_t sc_name[16]; }; @@ -96,9 +89,6 @@ ufm_open(struct usb_cdev *dev, int32_t fflags, int32_t devtype, struct thread *td); -static void -ufm_ioctl_callback(struct usbd_xfer *xfer); - static int ufm_do_req(struct ufm_softc *sc, int32_t fflags, u_int8_t request, u_int16_t value, u_int16_t index, u_int8_t *retbuf); @@ -121,18 +111,6 @@ ufm_ioctl(struct usb_cdev *dev, u_long cmd, caddr_t addr, int32_t fflags, struct thread *td); -static const struct usbd_config ufm_config[UFM_N_TRANSFER] = { - [0] = { - .type = UE_CONTROL, - .endpoint = 0x00, /* Control pipe */ - .direction = UE_DIR_ANY, - .bufsize = UFM_BUF_SIZE, - .flags = USBD_USE_DMA, - .callback = &ufm_ioctl_callback, - .timeout = 1000, /* 1 second */ - }, -}; - static devclass_t ufm_devclass; static device_method_t ufm_methods[] = { @@ -190,14 +168,6 @@ usbd_set_desc(dev, uaa->device); - error = usbd_transfer_setup(uaa->device, uaa->iface_index, - sc->sc_xfer, ufm_config, UFM_N_TRANSFER, - sc, &(sc->sc_mtx)); - if (error) { - DPRINTF(sc, 0, "error=%s\n", usbd_errstr(error)) ; - goto detach; - } - snprintf(buf, sizeof(buf), "ufm%d", sc->sc_unit); p_buf[0] = buf; @@ -225,8 +195,6 @@ usb_cdev_detach(&(sc->sc_cdev)); - usbd_transfer_unsetup(sc->sc_xfer, UFM_N_TRANSFER); - mtx_destroy(&(sc->sc_mtx)); return 0; @@ -242,65 +210,28 @@ return 0; } -static void -ufm_ioctl_callback(struct usbd_xfer *xfer) -{ - struct ufm_softc *sc = xfer->priv_sc; - - USBD_CHECK_STATUS(xfer); - - tr_transferred: - usbd_copy_out(&(xfer->buf_data), 0, - sc->sc_transfer_buf, UFM_BUF_SIZE); - sc->sc_flags &= ~UFM_FLAG_COMMAND_ERR; - usb_cdev_wakeup(&(sc->sc_cdev)); - return; - - tr_error: - DPRINTF(sc, 0, "error=%s\n", usbd_errstr(xfer->error)); - sc->sc_flags |= UFM_FLAG_COMMAND_ERR; - usb_cdev_wakeup(&(sc->sc_cdev)); - return; - - tr_setup: - usbd_copy_in(&(xfer->buf_data), 0, - sc->sc_transfer_buf, UFM_BUF_SIZE); - xfer->length = UFM_BUF_SIZE; - usbd_start_hardware(xfer); - return; -} - static int ufm_do_req(struct ufm_softc *sc, int32_t fflags, u_int8_t request, u_int16_t value, u_int16_t index, u_int8_t *retbuf) { int32_t error; - usb_device_request_t *req = (void *)(sc->sc_transfer_buf); + usb_device_request_t req; + uint8_t buf[1]; - req->bmRequestType = UT_READ_VENDOR_DEVICE; - req->bRequest = request; - USETW(req->wValue, value); - USETW(req->wIndex, index); - USETW(req->wLength, 1); + req.bmRequestType = UT_READ_VENDOR_DEVICE; + req.bRequest = request; + USETW(req.wValue, value); + USETW(req.wIndex, index); + USETW(req.wLength, 1); - sc->sc_flags |= UFM_FLAG_COMMAND_ERR; - - usbd_transfer_start(sc->sc_xfer[0]); - - error = usb_cdev_sleep(&(sc->sc_cdev), fflags, 0); + error = usbd_do_request(sc->sc_udev, NULL, &req, buf); - usbd_transfer_stop(sc->sc_xfer[0]); - if (retbuf) { - *retbuf = req->bData[0]; + *retbuf = buf[0]; } if (error) { - return error; - } - - if (sc->sc_flags & UFM_FLAG_COMMAND_ERR) { return ENXIO; } return 0; @@ -318,7 +249,10 @@ * units of 12.5kHz. We add one to the IFM to make rounding * easier. */ + mtx_lock(&(sc->sc_mtx)); sc->sc_freq = freq; + mtx_unlock(&(sc->sc_mtx)); + freq = (freq + 10700001) / 12500; /* This appears to set the frequency */ @@ -339,7 +273,9 @@ ufm_get_freq(struct ufm_softc *sc, caddr_t addr, int32_t fflags) { int *valp = (int *)addr; + mtx_lock(&(sc->sc_mtx)); *valp = sc->sc_freq; + mtx_unlock(&(sc->sc_mtx)); return (0); } @@ -380,21 +316,13 @@ ufm_get_stat(struct ufm_softc *sc, caddr_t addr, int32_t fflags) { u_int8_t ret; - u_int32_t timeout = (hz / 4); - - if (timeout == 0) { - timeout = 1; - } /* * Note, there's a 240ms settle time before the status - * will be valid, so sleep that amount. hz/4 is a good - * approximation of that. + * will be valid, so sleep that amount. */ - if (usb_cdev_sleep(&(sc->sc_cdev), fflags, timeout)) { - return EIO; - } + usbd_pause_mtx(NULL, 250); if (ufm_do_req(sc, fflags, UFM_CMD0, 0x00, 0x24, &ret)) { @@ -413,6 +341,8 @@ struct ufm_softc *sc = dev->sc_priv_ptr; int error = 0; + usb_cdev_unlock(dev, fflags); + switch (cmd) { case FM_SET_FREQ: error = ufm_set_freq(sc, addr, fflags); @@ -430,8 +360,8 @@ error = ufm_get_stat(sc, addr, fflags); break; default: - return ENOTTY; + error = ENOTTY; break; } - return error; + return usb_cdev_lock(dev, fflags, error); }