From owner-p4-projects@FreeBSD.ORG Sun Aug 12 01:01:08 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 436E816A420; Sun, 12 Aug 2007 01:01:08 +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 E879B16A418 for ; Sun, 12 Aug 2007 01:01:07 +0000 (UTC) (envelope-from loafier@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D884313C45E for ; Sun, 12 Aug 2007 01:01:07 +0000 (UTC) (envelope-from loafier@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 l7C117qn080667 for ; Sun, 12 Aug 2007 01:01:07 GMT (envelope-from loafier@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7C117Rx080661 for perforce@freebsd.org; Sun, 12 Aug 2007 01:01:07 GMT (envelope-from loafier@FreeBSD.org) Date: Sun, 12 Aug 2007 01:01:07 GMT Message-Id: <200708120101.l7C117Rx080661@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to loafier@FreeBSD.org using -f From: Christopher Davis To: Perforce Change Reviews Cc: Subject: PERFORCE change 125072 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, 12 Aug 2007 01:01:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=125072 Change 125072 by loafier@chrisdsoc on 2007/08/12 01:00:38 Use bus_alloc_resources() and pci_enable_io and busmaster() Affected files ... .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/amr/amr_pci.c#2 edit .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/amr/amrreg.h#2 edit .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/amr/amrvar.h#2 edit Differences ... ==== //depot/projects/soc2007/loafier_busalloc/src/sys/dev/amr/amr_pci.c#2 (text+ko) ==== @@ -97,6 +97,18 @@ SYSCTL_UINT(_hw_amr, OID_AUTO, force_sg32, CTLFLAG_RDTUN, &amr_force_sg32, 0, "Force the AMR driver to use 32bit scatter gather"); +static struct resource_spec amr_res_spec_quartz[] = { + {SYS_RES_MEMORY, PCIR_BAR(0), RF_ACTIVE}, + {SYS_RES_IRQ, 0, RF_ACTIVE | RF_SHAREABLE}, + {-1, 0, 0} +}; + +static struct resource_spec amr_res_spec[] = { + {SYS_RES_IOPORT, PCIR_BAR(0), RF_ACTIVE}, + {SYS_RES_IRQ, 0, RF_ACTIVE | RF_SHAREABLE}, + {-1, 0, 0} +}; + static device_method_t amr_methods[] = { /* Device interface */ DEVMETHOD(device_probe, amr_pci_probe), @@ -183,10 +195,10 @@ static int amr_pci_attach(device_t dev) { + struct resource_spec *rtype; struct amr_softc *sc; struct amr_ident *id; - int rid, rtype, error; - u_int32_t command; + int error; debug_called(1); @@ -206,12 +218,11 @@ if ((id = amr_find_ident(dev)) == NULL) return (ENXIO); - command = pci_read_config(dev, PCIR_COMMAND, 1); if (id->flags & AMR_ID_QUARTZ) { /* * Make sure we are going to be able to talk to this board. */ - if ((command & PCIM_CMD_MEMEN) == 0) { + if (pci_enable_io(dev, SYS_RES_MEMORY) != 0) { device_printf(dev, "memory window not available\n"); return (ENXIO); } @@ -220,7 +231,7 @@ /* * Make sure we are going to be able to talk to this board. */ - if ((command & PCIM_CMD_PORTEN) == 0) { + if (pci_enable_io(dev, SYS_RES_IOPORT) != 0) { device_printf(dev, "I/O window not available\n"); return (ENXIO); } @@ -233,36 +244,21 @@ } /* force the busmaster enable bit on */ - if (!(command & PCIM_CMD_BUSMASTEREN)) { - device_printf(dev, "busmaster bit not set, enabling\n"); - command |= PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, command, 2); - } + pci_enable_busmaster(dev); /* * Allocate the PCI register window. */ - rid = PCIR_BAR(0); - rtype = AMR_IS_QUARTZ(sc) ? SYS_RES_MEMORY : SYS_RES_IOPORT; - sc->amr_reg = bus_alloc_resource_any(dev, rtype, &rid, RF_ACTIVE); - if (sc->amr_reg == NULL) { - device_printf(sc->amr_dev, "can't allocate register window\n"); - goto out; + rtype = AMR_IS_QUARTZ(sc) ? amr_res_spec_quartz : amr_res_spec; + if (bus_alloc_resources(dev, rtype, sc->amr_res) != 0) { + device_printf(sc->amr_dev, "can't allocate resources\n"); + goto out; } - sc->amr_btag = rman_get_bustag(sc->amr_reg); - sc->amr_bhandle = rman_get_bushandle(sc->amr_reg); /* - * Allocate and connect our interrupt. + * Connect our interrupt. */ - rid = 0; - sc->amr_irq = bus_alloc_resource_any(sc->amr_dev, SYS_RES_IRQ, &rid, - RF_SHAREABLE | RF_ACTIVE); - if (sc->amr_irq == NULL) { - device_printf(sc->amr_dev, "can't allocate interrupt\n"); - goto out; - } - if (bus_setup_intr(sc->amr_dev, sc->amr_irq, + if (bus_setup_intr(sc->amr_dev, sc->amr_res[RES_IRQ], INTR_TYPE_BIO | INTR_ENTROPY | INTR_MPSAFE, NULL, amr_pci_intr, sc, &sc->amr_intr)) { device_printf(sc->amr_dev, "can't set up interrupt\n"); @@ -511,19 +507,16 @@ /* disconnect the interrupt handler */ if (sc->amr_intr) - bus_teardown_intr(sc->amr_dev, sc->amr_irq, sc->amr_intr); - if (sc->amr_irq != NULL) - bus_release_resource(sc->amr_dev, SYS_RES_IRQ, 0, sc->amr_irq); + bus_teardown_intr(sc->amr_dev, sc->amr_res[RES_IRQ], sc->amr_intr); /* destroy the parent DMA tag */ if (sc->amr_parent_dmat) bus_dma_tag_destroy(sc->amr_parent_dmat); - /* release the register window mapping */ - if (sc->amr_reg != NULL) - bus_release_resource(sc->amr_dev, - AMR_IS_QUARTZ(sc) ? SYS_RES_MEMORY : SYS_RES_IOPORT, - PCIR_BAR(0), sc->amr_reg); + /* release resources */ + bus_release_resources(sc->amr_dev, + AMR_IS_QUARTZ(sc) ? amr_res_spec_quartz : amr_res_spec, + sc->amr_res); } /******************************************************************************** ==== //depot/projects/soc2007/loafier_busalloc/src/sys/dev/amr/amrreg.h#2 (text+ko) ==== @@ -568,10 +568,10 @@ /* * I/O primitives */ -#define AMR_QPUT_IDB(sc, val) bus_space_write_4(sc->amr_btag, sc->amr_bhandle, AMR_QIDB, val) -#define AMR_QGET_IDB(sc) bus_space_read_4 (sc->amr_btag, sc->amr_bhandle, AMR_QIDB) -#define AMR_QPUT_ODB(sc, val) bus_space_write_4(sc->amr_btag, sc->amr_bhandle, AMR_QODB, val) -#define AMR_QGET_ODB(sc) bus_space_read_4 (sc->amr_btag, sc->amr_bhandle, AMR_QODB) +#define AMR_QPUT_IDB(sc, val) bus_write_4(sc->amr_res[RES_REG], AMR_QIDB, val) +#define AMR_QGET_IDB(sc) bus_read_4(sc->amr_res[RES_REG], AMR_QIDB) +#define AMR_QPUT_ODB(sc, val) bus_write_4(sc->amr_res[RES_REG], AMR_QODB, val) +#define AMR_QGET_ODB(sc) bus_read_4(sc->amr_res[RES_REG], AMR_QODB) #ifdef AMR_BOARD_INIT #define AMR_QRESET(sc) \ @@ -626,25 +626,25 @@ /* * I/O primitives */ -#define AMR_SPUT_ISTAT(sc, val) bus_space_write_1(sc->amr_btag, sc->amr_bhandle, AMR_SINTR, val) -#define AMR_SGET_ISTAT(sc) bus_space_read_1 (sc->amr_btag, sc->amr_bhandle, AMR_SINTR) -#define AMR_SACK_INTERRUPT(sc) bus_space_write_1(sc->amr_btag, sc->amr_bhandle, AMR_SCMD, AMR_SCMD_ACKINTR) -#define AMR_SPOST_COMMAND(sc) bus_space_write_1(sc->amr_btag, sc->amr_bhandle, AMR_SCMD, AMR_SCMD_POST) -#define AMR_SGET_MBSTAT(sc) bus_space_read_1 (sc->amr_btag, sc->amr_bhandle, AMR_SMBOX_BUSY) -#define AMR_SENABLE_INTR(sc) \ - bus_space_write_1(sc->amr_btag, sc->amr_bhandle, AMR_STOGGLE, \ - bus_space_read_1(sc->amr_btag, sc->amr_bhandle, AMR_STOGGLE) | AMR_STOGL_IENABLE) -#define AMR_SDISABLE_INTR(sc) \ - bus_space_write_1(sc->amr_btag, sc->amr_bhandle, AMR_STOGGLE, \ - bus_space_read_1(sc->amr_btag, sc->amr_bhandle, AMR_STOGGLE) & ~AMR_STOGL_IENABLE) -#define AMR_SBYTE_SET(sc, reg, val) bus_space_write_1(sc->amr_btag, sc->amr_bhandle, reg, val) +#define AMR_SPUT_ISTAT(sc, val) bus_write_1(sc->amr_res[RES_REG], AMR_SINTR, val) +#define AMR_SGET_ISTAT(sc) bus_read_1(sc->amr_res[RES_REG], AMR_SINTR) +#define AMR_SACK_INTERRUPT(sc) bus_write_1(sc->amr_res[RES_REG], AMR_SCMD, AMR_SCMD_ACKINTR) +#define AMR_SPOST_COMMAND(sc) bus_write_1(sc->amr_res[RES_REG], AMR_SCMD, AMR_SCMD_POST) +#define AMR_SGET_MBSTAT(sc) bus_read_1(sc->amr_res[RES_REG], AMR_SMBOX_BUSY) +#define AMR_SENABLE_INTR(sc) \ + bus_write_1(sc->amr_res[RES_REG], AMR_STOGGLE, \ + bus_read_1(sc->amr_res[RES_REG], AMR_STOGGLE) | AMR_STOGL_IENABLE) +#define AMR_SDISABLE_INTR(sc) \ + bus_write_1(sc->amr_res[RES_REG], AMR_STOGGLE, \ + bus_read_1(sc->amr_res[RES_REG], AMR_STOGGLE) & ~AMR_STOGL_IENABLE) +#define AMR_SBYTE_SET(sc, reg, val) bus_write_1(sc->amr_res[RES_REG], reg, val) #ifdef AMR_BOARD_INIT -#define AMR_SRESET(sc) bus_space_write_1(sc->amr_btag, sc->amr_bhandle, 0, 0x80) -#define AMR_SGET_INITSTATUS(sc) bus_space_read_1 (sc->amr_btag, sc->amr_bhandle, AMR_SMBOX_ENABLE) -#define AMR_SGET_FAILDRIVE(sc) bus_space_read_1 (sc->amr_btag, sc->amr_bhandle, AMR_SMBOX_ENABLE + 1) -#define AMR_SGET_INITCHAN(sc) bus_space_read_1 (sc->amr_btag, sc->amr_bhandle, AMR_SMBOX_ENABLE + 2) -#define AMR_SGET_INITTARG(sc) bus_space_read_1 (sc->amr_btag, sc->amr_bhandle, AMR_SMBOX_ENABLE + 3) +#define AMR_SRESET(sc) bus_write_1(sc->amr_res[RES_REG], 0, 0x80) +#define AMR_SGET_INITSTATUS(sc) bus_read_1(sc->amr_res[RES_REG], AMR_SMBOX_ENABLE) +#define AMR_SGET_FAILDRIVE(sc) bus_read_1(sc->amr_res[RES_REG], AMR_SMBOX_ENABLE + 1) +#define AMR_SGET_INITCHAN(sc) bus_read_1(sc->amr_res[RES_REG], AMR_SMBOX_ENABLE + 2) +#define AMR_SGET_INITTARG(sc) bus_read_1(sc->amr_res[RES_REG], AMR_SMBOX_ENABLE + 3) #endif #endif /* _KERNEL */ ==== //depot/projects/soc2007/loafier_busalloc/src/sys/dev/amr/amrvar.h#2 (text+ko) ==== @@ -158,17 +158,20 @@ /* * Per-controller-instance data */ +enum { + RES_REG, + RES_IRQ, + RES_SZ +}; + struct amr_softc { /* bus attachments */ device_t amr_dev; - struct resource *amr_reg; /* control registers */ - bus_space_handle_t amr_bhandle; - bus_space_tag_t amr_btag; + struct resource *amr_res[RES_SZ]; /* irq & control registers */ bus_dma_tag_t amr_parent_dmat; /* parent DMA tag */ bus_dma_tag_t amr_buffer_dmat; /* data buffer DMA tag */ bus_dma_tag_t amr_buffer64_dmat; - struct resource *amr_irq; /* interrupt */ void *amr_intr; /* mailbox */ From owner-p4-projects@FreeBSD.ORG Sun Aug 12 01:26:42 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DD65E16A41A; Sun, 12 Aug 2007 01:26: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 8BFCD16A418 for ; Sun, 12 Aug 2007 01:26:41 +0000 (UTC) (envelope-from loafier@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7C7FD13C467 for ; Sun, 12 Aug 2007 01:26:41 +0000 (UTC) (envelope-from loafier@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 l7C1QeE9083416 for ; Sun, 12 Aug 2007 01:26:40 GMT (envelope-from loafier@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7C1QdMv083413 for perforce@freebsd.org; Sun, 12 Aug 2007 01:26:39 GMT (envelope-from loafier@FreeBSD.org) Date: Sun, 12 Aug 2007 01:26:39 GMT Message-Id: <200708120126.l7C1QdMv083413@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to loafier@FreeBSD.org using -f From: Christopher Davis To: Perforce Change Reviews Cc: Subject: PERFORCE change 125073 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, 12 Aug 2007 01:26:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=125073 Change 125073 by loafier@chrisdsoc on 2007/08/12 01:26:37 Remove bus_space_tags and handles. Affected files ... .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_sr.c#2 edit .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_sr_isa.c#2 edit .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_sr_pci.c#2 edit .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_srregs.h#2 edit Differences ... ==== //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_sr.c#2 (text+ko) ==== @@ -495,8 +495,6 @@ if (hc->res_ioport == NULL) { goto errexit; } - hc->bt_ioport = rman_get_bustag(hc->res_ioport); - hc->bh_ioport = rman_get_bushandle(hc->res_ioport); return (0); @@ -534,8 +532,6 @@ if (hc->res_memory == NULL) { goto errexit; } - hc->bt_memory = rman_get_bustag(hc->res_memory); - hc->bh_memory = rman_get_bushandle(hc->res_memory); return (0); ==== //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_sr_isa.c#2 (text+ko) ==== @@ -323,25 +323,25 @@ static u_int src_get8_io(struct sr_hardc *hc, u_int off) { - return bus_space_read_1(hc->bt_ioport, hc->bh_ioport, SRC_REG(off)); + return bus_read_1(hc->res_ioport, SRC_REG(off)); } static u_int src_get16_io(struct sr_hardc *hc, u_int off) { - return bus_space_read_2(hc->bt_ioport, hc->bh_ioport, SRC_REG(off)); + return bus_read_2(hc->res_ioport, SRC_REG(off)); } static void src_put8_io(struct sr_hardc *hc, u_int off, u_int val) { - bus_space_write_1(hc->bt_ioport, hc->bh_ioport, SRC_REG(off), val); + bus_write_1(hc->res_ioport, SRC_REG(off), val); } static void src_put16_io(struct sr_hardc *hc, u_int off, u_int val) { - bus_space_write_2(hc->bt_ioport, hc->bh_ioport, SRC_REG(off), val); + bus_write_2(hc->res_ioport, SRC_REG(off), val); } static u_int ==== //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_sr_pci.c#2 (text+ko) ==== @@ -106,16 +106,12 @@ int numports; u_int fecr; struct sr_hardc *hc; - bus_space_tag_t bt_plx; - bus_space_handle_t bh_plx; hc = (struct sr_hardc *)device_get_softc(device); bzero(hc, sizeof(struct sr_hardc)); if (sr_allocate_plx_memory(device, 0x10, 1)) goto errexit; - bt_plx = rman_get_bustag(hc->res_plx_memory); - bh_plx = rman_get_bushandle(hc->res_plx_memory); if (sr_allocate_memory(device, 0x18, 1)) goto errexit; @@ -140,13 +136,13 @@ * * Note: This is "cargo cult" stuff. - jrc */ - bus_space_write_4(bt_plx, bh_plx, 0x00, 0xfffff000); - bus_space_write_4(bt_plx, bh_plx, 0x04, 0x00000001); - bus_space_write_4(bt_plx, bh_plx, 0x18, 0x40030043); - bus_space_write_4(bt_plx, bh_plx, 0x1c, 0xff000000); - bus_space_write_4(bt_plx, bh_plx, 0x20, 0x00000000); - bus_space_write_4(bt_plx, bh_plx, 0x28, 0x000000e9); - bus_space_write_4(bt_plx, bh_plx, 0x68, 0x00010900); + bus_write_4(hc->res_plx_memory, 0x00, 0xfffff000); + bus_write_4(hc->res_plx_memory, 0x04, 0x00000001); + bus_write_4(hc->res_plx_memory, 0x18, 0x40030043); + bus_write_4(hc->res_plx_memory, 0x1c, 0xff000000); + bus_write_4(hc->res_plx_memory, 0x20, 0x00000000); + bus_write_4(hc->res_plx_memory, 0x28, 0x000000e9); + bus_write_4(hc->res_plx_memory, 0x68, 0x00010900); /* * Get info from card. @@ -223,27 +219,23 @@ static u_int src_get8_mem(struct sr_hardc *hc, u_int off) { - return bus_space_read_1(hc->bt_memory, hc->bh_memory, - SRC_PCI_SCA_REG(off)); + return bus_read_1(hc->res_memory, SRC_PCI_SCA_REG(off)); } static u_int src_get16_mem(struct sr_hardc *hc, u_int off) { - return bus_space_read_2(hc->bt_memory, hc->bh_memory, - SRC_PCI_SCA_REG(off)); + return bus_read_2(hc->res_memory, SRC_PCI_SCA_REG(off)); } static void src_put8_mem(struct sr_hardc *hc, u_int off, u_int val) { - bus_space_write_1(hc->bt_memory, hc->bh_memory, - SRC_PCI_SCA_REG(off), val); + bus_write_1(hc->res_memory, SRC_PCI_SCA_REG(off), val); } static void src_put16_mem(struct sr_hardc *hc, u_int off, u_int val) { - bus_space_write_2(hc->bt_memory, hc->bh_memory, - SRC_PCI_SCA_REG(off), val); + bus_write_2(hc->res_memory, SRC_PCI_SCA_REG(off), val); } ==== //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_srregs.h#2 (text+ko) ==== @@ -162,10 +162,6 @@ sca_regs *sca; /* register array */ - bus_space_tag_t bt_ioport; - bus_space_tag_t bt_memory; - bus_space_handle_t bh_ioport; - bus_space_handle_t bh_memory; int rid_ioport; int rid_memory; int rid_plx_memory; @@ -197,15 +193,15 @@ int sr_detach(device_t device); #define sr_inb(hc, port) \ - bus_space_read_1((hc)->bt_ioport, (hc)->bh_ioport, (port)) + bus_read_1((hc)->res_ioport, (port)) #define sr_outb(hc, port, value) \ - bus_space_write_1((hc)->bt_ioport, (hc)->bh_ioport, (port), (value)) + bus_write_1((hc)->res_ioport, (port), (value)) #define sr_read_fecr(hc) \ - bus_space_read_4((hc)->bt_memory, (hc)->bh_memory, SR_FECR) + bus_read_4((hc)->res_memory, SR_FECR) #define sr_write_fecr(hc, value) \ - bus_space_write_4((hc)->bt_memory, (hc)->bh_memory, SR_FECR, (value)) + bus_write_4((hc)->res_memory, SR_FECR, (value)) #endif /* _IF_SRREGS_H_ */ From owner-p4-projects@FreeBSD.ORG Sun Aug 12 11:11:40 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AB58916A420; Sun, 12 Aug 2007 11:11:40 +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 7B41116A418 for ; Sun, 12 Aug 2007 11:11:40 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6F6E313C474 for ; Sun, 12 Aug 2007 11:11:40 +0000 (UTC) (envelope-from andrew@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 l7CBBeKp051866 for ; Sun, 12 Aug 2007 11:11:40 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7CBBe8u051863 for perforce@freebsd.org; Sun, 12 Aug 2007 11:11:40 GMT (envelope-from andrew@freebsd.org) Date: Sun, 12 Aug 2007 11:11:40 GMT Message-Id: <200708121111.l7CBBe8u051863@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 125077 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, 12 Aug 2007 11:11:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=125077 Change 125077 by andrew@andrew_hermies on 2007/08/12 11:11:39 Remove debugging output from the comms library Affected files ... .. //depot/projects/soc2007/andrew-update/lib/facund_server.c#12 edit Differences ... ==== //depot/projects/soc2007/andrew-update/lib/facund_server.c#12 (text+ko) ==== @@ -190,7 +190,6 @@ struct facund_conn *conn; char *str; - printf("> %s\n", name); conn = data; if (conn->current_call[0] == '\0' && strcmp(name, "call") == 0) { @@ -282,7 +281,6 @@ { struct facund_conn *conn; - printf("< %s\n", name); conn = data; if (strcmp(name, "call") == 0) { From owner-p4-projects@FreeBSD.ORG Sun Aug 12 11:27:01 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CDAAD16A468; Sun, 12 Aug 2007 11:27:00 +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 9479116A420 for ; Sun, 12 Aug 2007 11:27:00 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 85DDA13C469 for ; Sun, 12 Aug 2007 11:27:00 +0000 (UTC) (envelope-from andrew@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 l7CBR0Gj052827 for ; Sun, 12 Aug 2007 11:27:00 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7CBR0BG052816 for perforce@freebsd.org; Sun, 12 Aug 2007 11:27:00 GMT (envelope-from andrew@freebsd.org) Date: Sun, 12 Aug 2007 11:27:00 GMT Message-Id: <200708121127.l7CBR0BG052816@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 125078 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, 12 Aug 2007 11:27:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=125078 Change 125078 by andrew@andrew_hermies on 2007/08/12 11:26:49 Syncronise reation of a connection Create a seperate class to commiunicate over a socket Create a new class with the same interface to communicate over a pipe to nc over an ssh tunnel. This will be used to communicate remotely with the back end Ignore parse errors when closing the connection When we get a parse error in the communication loop return False to exit it Affected files ... .. //depot/projects/soc2007/andrew-update/frontend/facund/computer.py#11 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/network/__init__.py#10 edit Differences ... ==== //depot/projects/soc2007/andrew-update/frontend/facund/computer.py#11 (text+ko) ==== @@ -161,6 +161,9 @@ # Start the communication thread self.start() + self.__connection.startLock.acquire() + self.__connection.startLock.release() + # Get a list of directories the server offers call = facund.Call("get_directories", None) self.__connection.doCall(call) ==== //depot/projects/soc2007/andrew-update/frontend/facund/network/__init__.py#10 (text+ko) ==== @@ -25,40 +25,70 @@ # import facund +import fcntl +import os import socket +import subprocess import threading import xml.sax.handler +class PipeComms: + def __init__(self, server): + self.popen = subprocess.Popen(["/usr/bin/ssh", server, "/usr/bin/nc -oU /tmp/facund"], stdin=subprocess.PIPE, stdout=subprocess.PIPE) + print self.popen.stdout + self.stdout = self.popen.stdout.fileno() + + def read(self, len): + return os.read(self.stdout, len) + + def write(self, buf): + self.popen.stdin.write(buf) + +class SocketComms: + def __init__(self, server): + self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + self.socket.connect(server) + + def read(self, len): + return self.socket.recv(len) + + def write(self, buf): + self.socket.send(buf) + class Connection(xml.sax.handler.ContentHandler): '''A class that works as a client with the Facund XML IPC''' def __init__(self, server): self.isReady = False + self.connectionType = "pipe" self.__data = None self.__calls = {} self.bufSize = 1024 - self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) - self.socket.connect(server) - self.socket.send("") + if self.connectionType == "unix": + self.__connection = SocketComms(server) + elif self.connectionType == "pipe": + self.__connection = PipeComms(server) + + self.send("") self.parser = xml.sax.make_parser() self.parser.setContentHandler(self) self.__connected_lock = threading.Lock() + self.startLock = threading.Lock() + self.startLock.acquire() self.canClose = False # Mark the class as ready and able to disconnect self.isReady = True - #self.socket.send("") - def disconnect(self): if self.isReady: self.isReady = False # Send a connection close try: - self.socket.send("") + self.send("") except socket.error: pass @@ -66,20 +96,32 @@ self.__connected_lock.acquire() self.__connected_lock.release() - self.parser.close() + try: + self.parser.close() + except xml.sax._exceptions.SAXParseException: + pass def doCall(self, call): print call.getID() call.acquireLock() self.__calls[str(call.getID())] = call - self.socket.send(call.getCall()) + self.send(call.getCall()) + + def send(self, buf): + self.__connection.write(buf) + + def recv(self, len): + return self.__connection.read(len) def interact(self): '''Reads data from the connection and passes it to the XML parser''' if not self.canClose: - data = self.socket.recv(self.bufSize) - self.parser.feed(data) + data = self.recv(self.bufSize) + try: + self.parser.feed(data) + except xml.sax._exceptions.SAXParseException: + return False return True return False @@ -126,6 +168,7 @@ elif name == "facund-server": self.__connected_lock.acquire() + self.startLock.release() def endElement(self, name): print "< " + name From owner-p4-projects@FreeBSD.ORG Sun Aug 12 11:44:22 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8B9E516A41A; Sun, 12 Aug 2007 11:44:22 +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 3030C16A417 for ; Sun, 12 Aug 2007 11:44:22 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 22D8A13C457 for ; Sun, 12 Aug 2007 11:44:22 +0000 (UTC) (envelope-from andrew@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 l7CBiM4O053878 for ; Sun, 12 Aug 2007 11:44:22 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7CBiLDs053875 for perforce@freebsd.org; Sun, 12 Aug 2007 11:44:21 GMT (envelope-from andrew@freebsd.org) Date: Sun, 12 Aug 2007 11:44:21 GMT Message-Id: <200708121144.l7CBiLDs053875@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 125079 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, 12 Aug 2007 11:44:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=125079 Change 125079 by andrew@andrew_hermies on 2007/08/12 11:43:52 Always reread the tag file when looking at the db directory Get a count of the number of -rollback directories there are When we receive a SIGPIPE in the communications thread finish the current loop and wait for a new connection Use uname to get the release version of the kernel for update name Remove debugging output on stdout Implement the list_installed call Implement most of the rollback_patches call. The only part missing is the execution of freebsd-update Drop privileges when executing to allow the back end to be setuid as some of the directories in the freebsd-update require us to be root to access Affected files ... .. //depot/projects/soc2007/andrew-update/backend/facund-be.c#23 edit Differences ... ==== //depot/projects/soc2007/andrew-update/backend/facund-be.c#23 (text+ko) ==== @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -53,7 +54,8 @@ /* Check if there are updates every 30min */ static const time_t default_check_period = 30 * 60; -static int facund_in_loop = 1; +static volatile int facund_in_loop = 1; +static volatile int facund_comms_in_loop = 1; #define DEFAULT_CONFIG_FILE "/etc/freebsd-update-control.conf" #define UPDATE_DATA_DIR "/var/db/freebsd-update" @@ -89,6 +91,16 @@ static int facund_signals[] = { SIGHUP, SIGINT, SIGTERM }; static void facund_signal_handler(int, siginfo_t *, void *); +static void facund_comms_signal_handler(int, siginfo_t *, void *); + +struct fbsd_tag_line { + char *tag_platform; + char *tag_release; + unsigned int tag_patch; + char tag_tindexhash[65]; + char tag_eol[11]; +}; + /* * Structure describing the current state of * the freebsd-update database directory @@ -99,20 +111,16 @@ int db_fd; unsigned int db_next_patch; + unsigned int db_rollback_count; char *db_tag_file; + struct fbsd_tag_line *db_tag_line; }; static unsigned int watched_db_count = 0; static struct fbsd_update_db *watched_db = NULL; -struct fbsd_tag_line { - char *tag_platform; - char *tag_release; - unsigned int tag_patch; - char tag_tindexhash[65]; - char tag_eol[11]; -}; +struct utsname facund_uname; /* * Decodes the data in a line from the tag file @@ -223,30 +231,63 @@ struct stat sb; FILE *tag_fd; char install_link[PATH_MAX], sha_base[PATH_MAX], sum[65], buf[1024]; + char link_target[PATH_MAX]; struct fbsd_tag_line *line; + unsigned int rollback_count; + int link_len; assert(pos < watched_db_count); snprintf(sha_base, PATH_MAX, "%s\n", watched_db[pos].db_base); SHA256_Data(sha_base, strlen(sha_base), sum); + + /* Read in the tag file */ + tag_fd = fopen(watched_db[pos].db_tag_file, "r"); + if (tag_fd != NULL) { + if (watched_db[pos].db_tag_line != NULL) + facund_tag_free(watched_db[pos].db_tag_line); + + while (fgets(buf, sizeof buf, tag_fd) != NULL) { + line = facund_tag_decode_line(buf); + watched_db[pos].db_tag_line = line; + } + fclose(tag_fd); + } + + seteuid(0); + + /* Look for the install link and check if it is a symlink */ snprintf(install_link, PATH_MAX, "%s/%s-install", watched_db[pos].db_dir, sum); + if (watched_db[pos].db_tag_line != NULL && + lstat(install_link, &sb) == 0 && S_ISLNK(sb.st_mode)) { + watched_db[pos].db_next_patch = + watched_db[pos].db_tag_line->tag_patch; + } - /* Look for the install link and check if it is a symlink */ - if (lstat(install_link, &sb) == 0) { - if (S_ISLNK(sb.st_mode)) { - tag_fd = fopen(watched_db[pos].db_tag_file, "r"); - while (fgets(buf, sizeof buf, tag_fd) != NULL) { - line = facund_tag_decode_line(buf); - if (line != NULL) { - watched_db[pos].db_next_patch = - line->tag_patch; - facund_tag_free(line); - } - } - fclose(tag_fd); - return 1; + /* Look for the rollback link and check if it is a symlink */ + snprintf(install_link, PATH_MAX, "%s/%s-rollback", + watched_db[pos].db_dir, sum); + rollback_count = 0; + errno = 0; + while ((lstat(install_link, &sb) == 0) && S_ISLNK(sb.st_mode)) { + rollback_count++; + link_len = readlink(install_link, link_target, + (sizeof link_target) - 1); + if (link_len == -1) { + return -1; } + link_target[link_len] = '\0'; + snprintf(install_link, PATH_MAX, "%s/%s/rollback", + watched_db[pos].db_dir, link_target); + errno = 0; } + if (errno != 0 && errno != ENOENT) + return -1; + + seteuid(getuid()); + + watched_db[pos].db_rollback_count = rollback_count; + return 0; } @@ -264,7 +305,7 @@ look_for_updates(void *data __unused) { struct timespec timeout; - int kq, use_kqueue, found_updates; + int kq, use_kqueue; struct kevent event, changes; size_t pos, signals; int error, first_loop; @@ -297,7 +338,6 @@ } use_kqueue = 1; - found_updates = 0; timeout.tv_sec = default_check_period; timeout.tv_nsec = 0; @@ -322,11 +362,7 @@ * all directories to see if they have an update. */ for (pos = 0; pos < watched_db_count; pos++) { - if (facund_has_update(pos)) { - printf("Updates found in %s\n", - watched_db[pos].db_base); - found_updates = 1; - } + facund_has_update(pos); } /* Check we have looked at all directories */ assert(pos == watched_db_count); @@ -337,11 +373,7 @@ * the directory that had file system activity. */ if (pos < watched_db_count) { - if (facund_has_update(pos)) { - printf("Updates found in %s\n", - watched_db[pos].db_base); - found_updates = 1; - } + facund_has_update(pos); } } pos = watched_db_count; @@ -357,10 +389,9 @@ * Wait for any disk activity to * quieten down before waiting again */ - if (found_updates && use_kqueue) { + if (use_kqueue) { sleep(10); } - found_updates = 0; /* Wait for posible updates */ if (use_kqueue == 1) { @@ -477,13 +508,33 @@ return -1; } +/* When called the front end died without disconnecting + * Cleanup and wait for a new connection + */ +static void +facund_comms_signal_handler(int sig __unused, siginfo_t *info __unused, + void *uap __unused) +{ + facund_comms_in_loop = 0; +} + static void * do_communication(void *data) { + struct sigaction sa; struct facund_conn *conn = (struct facund_conn *)data; + sa.sa_sigaction = facund_comms_signal_handler; + sigemptyset(&sa.sa_mask); + sa.sa_flags = SA_SIGINFO; + sigaction(SIGPIPE, &sa, NULL); + while(1) { int ret = 0; + + /* We are now in the loop. This will change on SIGPIPE */ + facund_comms_in_loop = 1; + if(facund_server_start(conn) == -1) { if (facund_in_loop != 0) { /* @@ -495,6 +546,8 @@ } break; } + if (facund_comms_in_loop == 0) + continue; while(ret == 0) { ret = facund_server_get_request(conn); @@ -504,9 +557,15 @@ "data from network\n"); } } + if (facund_comms_in_loop == 0) + break; } + if (facund_comms_in_loop == 0) + continue; facund_server_finish(conn); + if (facund_comms_in_loop == 0) + continue; if (ret == -1) break; } @@ -730,7 +789,6 @@ if (strcmp(watched_db[i].db_base, base_dirs[pos]) != 0) continue; - printf("= %u\n", watched_db[i].db_next_patch); if (watched_db[i].db_next_patch == 0) break; @@ -744,7 +802,8 @@ /* Add a list of updates to the array */ updates = facund_object_new_array(); item = facund_object_new_string(); - asprintf(&buf, "6.2-p%u", watched_db[i].db_next_patch); + asprintf(&buf, "%s-p%u", facund_uname.release, + watched_db[i].db_next_patch); if (buf == NULL) return facund_response_new(id, 1, "Malloc failed", NULL); @@ -762,7 +821,7 @@ break; } } - facund_object_print(args); + if (facund_object_array_size(args) == 0) { facund_object_free(args); args = NULL; @@ -810,30 +869,71 @@ args = facund_object_new_array(); for (pos = 0; base_dirs[pos] != NULL; pos++) { struct facund_object *pair, *item, *updates; + unsigned int i; + char *buf; + + for (i = 0; i < watched_db_count; i++) { + unsigned int rollback_pos; + + if (strcmp(watched_db[i].db_base, base_dirs[pos]) != 0) + continue; + + if (watched_db[i].db_rollback_count == 0) + break; + + pair = facund_object_new_array(); + + /* Add the directory to the start of the array */ + item = facund_object_new_string(); + facund_object_set_string(item, base_dirs[pos]); + facund_object_array_append(pair, item); + + /* Add a list of updates to the array */ + updates = facund_object_new_array(); + + for (rollback_pos = 0; + rollback_pos < watched_db[i].db_rollback_count; + rollback_pos++) { + unsigned int level; + + /* Calculate the patch level */ + level = watched_db[i].db_tag_line->tag_patch; + level -= rollback_pos + 1; + if (watched_db[i].db_next_patch > 0) + level--; + + asprintf(&buf, "%s-p%u", facund_uname.release, + level); + if (buf == NULL) + return facund_response_new(id, 1, + "Malloc failed", NULL); - pair = facund_object_new_array(); + /* Create the item and add it to the array */ + item = facund_object_new_string(); + facund_object_set_string(item, buf); + facund_object_array_append(updates, item); - /* Add the directory to the start of the array */ - item = facund_object_new_string(); - facund_object_set_string(item, base_dirs[pos]); - facund_object_array_append(pair, item); + free(buf); + } + /* If there were no rollbacks we shouldn't be here */ + assert(rollback_pos > 0); - /* Add a list of updates to the array */ - updates = facund_object_new_array(); - item = facund_object_new_string(); - facund_object_set_string(item, "6.2-p1"); - facund_object_array_append(updates, item); - facund_object_array_append(pair, updates); + facund_object_array_append(pair, updates); - /* Add the directory on to the end of the arguments to return */ - facund_object_array_append(args, pair); + /* + * Add the directory on to the + * end of the arguments to return + */ + facund_object_array_append(args, pair); + break; + } + } + /* There are no updates avaliable */ + if (facund_object_array_size(args) == 0) { + facund_object_free(args); + args = NULL; } - printf("STUB: %s (base: %s, ports: %s)\n", __func__, - (get_base ? "yes" : "no"), (get_ports ? "yes" : "no")); - for (pos = 0; base_dirs[pos] != NULL; pos++) { - printf("Dir: %s\n", base_dirs[pos]); - } free(base_dirs); return facund_response_new(id, RESP_GOOD, "Success", args); } @@ -955,6 +1055,8 @@ { const char *base_dir, **patches; struct facund_response *ret; + unsigned int pos; + int failed; if (obj == NULL) { /* TODO: Don't use magic numbers */ @@ -967,14 +1069,38 @@ if (ret != NULL) return ret; - printf("STUB: %s\n", __func__); - return NULL; + /* Check the directory is being watched */ + for (pos = 0; pos < watched_db_count; pos++) { + if (strcmp(watched_db[pos].db_base, base_dir) == 0) { + break; + } + } + if (pos == watched_db_count) { + return facund_response_new(id, 1, "Incorrect directory", NULL); + } + + failed = 0; + + if (strcmp(patches[0], "base") == 0) { + /* Rollback the top most base patch */ + if (facund_run_update("rollback", base_dir) != 0) { + failed = 1; + } + } else { + return facund_response_new(id, 1, "Unsupported patch", NULL); + } + + if (failed != 0) { + return facund_response_new(id, 1, + "Some patches failed to rollback", NULL); + } + return facund_response_new(id, 0, "Success", NULL); } static struct facund_response * facund_call_restart_services(const char *id __unused, struct facund_object *obj __unused) { - printf("STUB: %s\n", __func__); + fprintf(stderr, "STUB: %s\n", __func__); return NULL; } @@ -998,6 +1124,9 @@ properties config_data; char ch; + /* Drop privileges */ + seteuid(getuid()); + config_file = DEFAULT_CONFIG_FILE; while ((ch = getopt(argc, argv, "c:h")) != -1) { @@ -1058,6 +1187,11 @@ errx(1, "Could not open a socket: %s\n", strerror(errno)); } + /* Get the uname data */ + if (uname(&facund_uname) != 0) { + errx(1, "Could not get the Operating System version\n"); + } + /* Add the callbacks for each call */ facund_server_add_call("ping", facund_call_ping); facund_server_add_call("get_directories", facund_get_directories); From owner-p4-projects@FreeBSD.ORG Sun Aug 12 11:47:27 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 07D8D16A41A; Sun, 12 Aug 2007 11:47:27 +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 ABAF616A41B for ; Sun, 12 Aug 2007 11:47:26 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9F31613C4A6 for ; Sun, 12 Aug 2007 11:47:26 +0000 (UTC) (envelope-from andrew@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 l7CBlQ0U054040 for ; Sun, 12 Aug 2007 11:47:26 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7CBlQv8054037 for perforce@freebsd.org; Sun, 12 Aug 2007 11:47:26 GMT (envelope-from andrew@freebsd.org) Date: Sun, 12 Aug 2007 11:47:26 GMT Message-Id: <200708121147.l7CBlQv8054037@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 125080 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, 12 Aug 2007 11:47:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=125080 Change 125080 by andrew@andrew_hermies on 2007/08/12 11:47:17 Empty the update list when changing what item is selected on the computer tree When no updates are avaliable on the back end don't raise an exception When asking to remove updates get the directory correctly and call removeUpdates rather than installUpdates Affected files ... .. //depot/projects/soc2007/andrew-update/frontend/facund/controller.py#6 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#10 edit Differences ... ==== //depot/projects/soc2007/andrew-update/frontend/facund/controller.py#6 (text+ko) ==== @@ -40,6 +40,7 @@ def onComputerTreeSelect(self, position): self.__currentDirectory = None + self.__updateModel.empty() computer = self.__computersModel.getComputer(position[0]) self.__view.setConnected(computer.getConnectionStatus()) @@ -60,12 +61,15 @@ command = dir.getCommands()[position[2]] response = dir.runCommand(position[2]) data = response.getData() + if data is None: + # We can't to an install or remove when we have nothing + self.__view.setInstallable(False, False) + return item = data.getData()[0] # Each item will be a pair of pair = item.getData() theDir = pair[0].getData() - self.__updateModel.empty() for update in pair[1].getData(): self.__updateModel.addUpdate(update) ==== //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#10 (text+ko) ==== @@ -114,7 +114,8 @@ self.__controller.installUpdates((dir.getName(), 'base')) def onRemoveClick(self, widget): - self.__controller.installUpdates((dir.getName(), 'all')) + dir = self.__controller.getCurrentDirectory() + self.__controller.removeUpdates((dir.getName(), 'base')) def onSelectComputer(self, widget): '''Signal handler for when the selected item is changed''' From owner-p4-projects@FreeBSD.ORG Sun Aug 12 11:54:36 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A866E16A420; Sun, 12 Aug 2007 11:54: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 80C3816A418 for ; Sun, 12 Aug 2007 11:54:36 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 72FBB13C46B for ; Sun, 12 Aug 2007 11:54:36 +0000 (UTC) (envelope-from andrew@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 l7CBsaXV054543 for ; Sun, 12 Aug 2007 11:54:36 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7CBsZei054533 for perforce@freebsd.org; Sun, 12 Aug 2007 11:54:35 GMT (envelope-from andrew@freebsd.org) Date: Sun, 12 Aug 2007 11:54:35 GMT Message-Id: <200708121154.l7CBsZei054533@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 125081 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, 12 Aug 2007 11:54:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=125081 Change 125081 by andrew@andrew_hermies on 2007/08/12 11:54:13 Use a unix socket by default as the pipe code is not ready (it locks up on failure) Affected files ... .. //depot/projects/soc2007/andrew-update/frontend/facund/network/__init__.py#11 edit Differences ... ==== //depot/projects/soc2007/andrew-update/frontend/facund/network/__init__.py#11 (text+ko) ==== @@ -59,7 +59,7 @@ '''A class that works as a client with the Facund XML IPC''' def __init__(self, server): self.isReady = False - self.connectionType = "pipe" + self.connectionType = "unix" self.__data = None self.__calls = {} From owner-p4-projects@FreeBSD.ORG Sun Aug 12 16:56:10 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A5AF016A41B; Sun, 12 Aug 2007 16:56: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 5F1C916A419 for ; Sun, 12 Aug 2007 16:56:10 +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 4D3BC13C45B for ; Sun, 12 Aug 2007 16:56:10 +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 l7CGuALj000822 for ; Sun, 12 Aug 2007 16:56:10 GMT (envelope-from gabor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7CGuA9P000819 for perforce@freebsd.org; Sun, 12 Aug 2007 16:56:10 GMT (envelope-from gabor@freebsd.org) Date: Sun, 12 Aug 2007 16:56:10 GMT Message-Id: <200708121656.l7CGuA9P000819@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 125086 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, 12 Aug 2007 16:56:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=125086 Change 125086 by gabor@gabor_server on 2007/08/12 16:55:09 - Make PERL_CONFIGURE, PERL_MODBUILD, USE_PERL5_BUILD and USE_PERL5_RUN accept the new versioned syntax. Affected files ... .. //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#19 edit Differences ... ==== //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#19 (text+ko) ==== @@ -130,6 +130,13 @@ .endif .endif #defined(USE_PERL5) && ${USE_PERL5} != "yes" +.if defined(USE_PERL5_RUN) +USE_PERL5= ${USE_PERL5_RUN} +.endif +.if defined(USE_PERL5_BUILD) +USE_PERL5= ${USE_PERL5_BUILD} +.endif + SITE_PERL_REL?= lib/perl5/site_perl/${PERL_VER} SITE_PERL?= ${LOCALBASE}/${SITE_PERL_REL} @@ -142,7 +149,7 @@ SITE_PERL=${SITE_PERL_REL} .if defined(PERL_MODBUILD) -PERL_CONFIGURE= yes +PERL_CONFIGURE= ${PERL_MODBUILD} CONFIGURE_SCRIPT?= Build.PL .if ${PORTNAME} != Module-Build BUILD_DEPENDS+= ${SITE_PERL}/Module/Build.pm:${PORTSDIR}/devel/p5-Module-Build @@ -162,7 +169,7 @@ .endif .if defined(PERL_CONFIGURE) -USE_PERL5= yes +USE_PERL5= ${PERL_CONFIGURE} .if defined(BATCH) && !defined(IS_INTERACTIVE) CONFIGURE_ENV+= PERL_MM_USE_DEFAULT="YES" .endif # defined(BATCH) && !defined(IS_INTERACTIVE) From owner-p4-projects@FreeBSD.ORG Mon Aug 13 00:19:16 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2C5F716A41A; Mon, 13 Aug 2007 00:19: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 ECF0616A419 for ; Mon, 13 Aug 2007 00:19:15 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D990D13C467 for ; Mon, 13 Aug 2007 00:19:15 +0000 (UTC) (envelope-from cnst@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 l7D0JF7W051809 for ; Mon, 13 Aug 2007 00:19:15 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7D0JF96051806 for perforce@freebsd.org; Mon, 13 Aug 2007 00:19:15 GMT (envelope-from cnst@FreeBSD.org) Date: Mon, 13 Aug 2007 00:19:15 GMT Message-Id: <200708130019.l7D0JF96051806@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125092 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, 13 Aug 2007 00:19:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=125092 Change 125092 by cnst@dale on 2007/08/13 00:18:58 integrate files Affected files ... .. //depot/projects/soc2007/cnst-sensors/sys.conf/files#6 integrate Differences ... ==== //depot/projects/soc2007/cnst-sensors/sys.conf/files#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1241 2007/07/24 15:35:01 scottl Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1242 2007/08/09 01:11:21 marcel Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -259,7 +259,7 @@ contrib/ipfilter/netinet/ip_state.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-error -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \ From owner-p4-projects@FreeBSD.ORG Mon Aug 13 01:07:14 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B050316A468; Mon, 13 Aug 2007 01:07: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 8024016A420 for ; Mon, 13 Aug 2007 01:07: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 6D3DE13C45D for ; Mon, 13 Aug 2007 01:07: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 l7D17Eht064328 for ; Mon, 13 Aug 2007 01:07:14 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7D17DJs064325 for perforce@freebsd.org; Mon, 13 Aug 2007 01:07:13 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 13 Aug 2007 01:07:13 GMT Message-Id: <200708130107.l7D17DJs064325@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 125093 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, 13 Aug 2007 01:07:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=125093 Change 125093 by kmacy@kmacy_home:ethng on 2007/08/13 01:06:28 rss_hash is a crc of the ip/port 4-tuple used by hardware for choosing a queue - add rss_hash to inpcb and mbuf pkthdr - initialize to counter value initially for the case where UDP never receives a packet and we just need to pick a tx queue Affected files ... .. //depot/projects/ethng/src/sys/kern/kern_mbuf.c#2 edit .. //depot/projects/ethng/src/sys/netinet/in_pcb.c#2 edit .. //depot/projects/ethng/src/sys/netinet/in_pcb.h#2 edit .. //depot/projects/ethng/src/sys/sys/mbuf.h#2 edit Differences ... ==== //depot/projects/ethng/src/sys/kern/kern_mbuf.c#2 (text+ko) ==== @@ -321,6 +321,7 @@ m->m_pkthdr.tso_segsz = 0; m->m_pkthdr.ether_vtag = 0; SLIST_INIT(&m->m_pkthdr.tags); + m->m_pkthdr.rss_hash = 0; #ifdef MAC /* If the label init fails, fail the alloc */ error = mac_init_mbuf(m, how); ==== //depot/projects/ethng/src/sys/netinet/in_pcb.c#2 (text+ko) ==== @@ -175,7 +175,8 @@ { struct inpcb *inp; int error; - + static int rss_hash = 1; + INP_INFO_WLOCK_ASSERT(pcbinfo); error = 0; inp = uma_zalloc(pcbinfo->ipi_zone, M_NOWAIT); @@ -184,6 +185,7 @@ bzero(inp, inp_zero_size); inp->inp_pcbinfo = pcbinfo; inp->inp_socket = so; + inp->inp_rss_hash = rss_hash++; #ifdef MAC error = mac_init_inpcb(inp, M_NOWAIT); if (error != 0) ==== //depot/projects/ethng/src/sys/netinet/in_pcb.h#2 (text+ko) ==== @@ -168,6 +168,7 @@ 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; #define in6p_faddr inp_inc.inc6_faddr ==== //depot/projects/ethng/src/sys/sys/mbuf.h#2 (text+ko) ==== @@ -78,7 +78,7 @@ #endif /* _KERNEL */ #if defined(__LP64__) -#define M_HDR_PAD 6 +#define M_HDR_PAD 2 #else #define M_HDR_PAD 2 #endif @@ -92,7 +92,7 @@ caddr_t mh_data; /* location of data */ int mh_len; /* amount of data in this mbuf */ int mh_flags; /* flags; see below */ - short mh_type; /* type of data in this mbuf */ + short mh_type; /* type of data in this mbuf */ uint8_t pad[M_HDR_PAD];/* word align */ }; @@ -121,6 +121,7 @@ u_int16_t tso_segsz; /* TSO segment size */ u_int16_t ether_vtag; /* Ethernet 802.1p+q vlan tag */ SLIST_HEAD(packet_tags, m_tag) tags; /* list of packet tags */ + uint32_t rss_hash; /* RSS hash for this 4-tuple */ }; /* @@ -161,6 +162,7 @@ #define m_flags m_hdr.mh_flags #define m_nextpkt m_hdr.mh_nextpkt #define m_act m_nextpkt +#define m_rss_hash m_hdr.mh_rss_hash #define m_pkthdr M_dat.MH.MH_pkthdr #define m_ext M_dat.MH.MH_dat.MH_ext #define m_pktdat M_dat.MH.MH_dat.MH_databuf From owner-p4-projects@FreeBSD.ORG Mon Aug 13 01:08:16 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5926116A41B; Mon, 13 Aug 2007 01:08: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 1E00A16A417 for ; Mon, 13 Aug 2007 01:08:16 +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 0B86313C467 for ; Mon, 13 Aug 2007 01:08:16 +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 l7D18F6C064398 for ; Mon, 13 Aug 2007 01:08:15 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7D18Feq064395 for perforce@freebsd.org; Mon, 13 Aug 2007 01:08:15 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 13 Aug 2007 01:08:15 GMT Message-Id: <200708130108.l7D18Feq064395@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 125094 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, 13 Aug 2007 01:08:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=125094 Change 125094 by kmacy@kmacy_home:ethng on 2007/08/13 01:07:21 since the rss hash is passed in the mbuf we no longer need to pass a cookie Affected files ... .. //depot/projects/ethng/src/sys/net/if.c#3 edit .. //depot/projects/ethng/src/sys/net/if_var.h#4 edit Differences ... ==== //depot/projects/ethng/src/sys/net/if.c#3 (text+ko) ==== @@ -2684,22 +2684,22 @@ int ifnet_multiqueue = 1; int -if_mq_start(struct ifnet *ifp, int32_t cookie, struct mbuf *m) +if_mq_start(struct ifnet *ifp, struct mbuf *m) { KASSERT((ifp->if_flags & IFF_NEEDSGIANT) == 0, ("IFF_NEEDSGIANT set on multi queue interface")); - return (*(ifp)->if_mq_start)(ifp, cookie, m); + return (*(ifp)->if_mq_start)(ifp, m); } int -if_mq_enqueue_packet(struct ifnet *ifp, int32_t cookie, struct mbuf *m) +if_mq_enqueue_packet(struct ifnet *ifp, struct mbuf *m) { KASSERT((ifp->if_flags & IFF_NEEDSGIANT) == 0, ("IFF_NEEDSGIANT set on multi queue interface")); - return (*(ifp)->if_mq_enqueue_packet)(ifp, cookie, m); + return (*(ifp)->if_mq_enqueue_packet)(ifp, m); } int32_t ==== //depot/projects/ethng/src/sys/net/if_var.h#4 (text+ko) ==== @@ -192,9 +192,9 @@ void *if_lagg; /* lagg glue */ #ifdef IFNET_MULTIQUEUE int (*if_mq_start) /* initiate output routine with immediate */ - (struct ifnet *, int32_t, struct mbuf *); + (struct ifnet *, struct mbuf *); int (*if_mq_enqueue_packet) /* enqueue packet to the appropriate queue */ - (struct ifnet *, int32_t, struct mbuf *); + (struct ifnet *, struct mbuf *); int32_t (*if_mq_get_cookie) /* calculate the txq cookie for this connection */ (struct ifnet *, struct in6_addr *, uint16_t, struct in6_addr *, uint16_t, int); #endif @@ -390,8 +390,8 @@ void if_start(struct ifnet *); #ifdef IFNET_MULTIQUEUE -int if_mq_start(struct ifnet *, int32_t, struct mbuf *); -int if_mq_enqueue_packet(struct ifnet *, int32_t, struct mbuf *); +int if_mq_start(struct ifnet *, struct mbuf *); +int if_mq_enqueue_packet(struct ifnet *, struct mbuf *); int32_t if_mq_get_cookie(struct ifnet *ifp, struct in6_addr *lip, uint16_t lport, struct in6_addr *rip, uint16_t rport, int ipv6); #endif extern int ifnet_multiqueue; /* allow driver module to confirm that multiqueue is supported */ @@ -486,7 +486,7 @@ \ len = (m)->m_pkthdr.len; \ mflags = (m)->m_flags; \ - err = if_mq_start((ifp), cookie, m); \ + err = if_mq_start((ifp), m); \ if ((err) == 0) { \ (ifp)->if_obytes += len + (adj); \ if (mflags & M_MCAST) \ @@ -510,7 +510,7 @@ len = (m)->m_pkthdr.len; \ mflags = (m)->m_flags; \ if ((ifp)->if_flags & IFF_MULTIQ) \ - err = if_mq_start((ifp), -1, m); \ + err = if_mq_start((ifp), m); \ else \ IFQ_ENQUEUE(&(ifp)->if_snd, m, err); \ if ((err) == 0) { \ From owner-p4-projects@FreeBSD.ORG Mon Aug 13 01:24:37 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EF02416A419; Mon, 13 Aug 2007 01:24: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 7AEF816A417 for ; Mon, 13 Aug 2007 01:24:36 +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 67AD713C458 for ; Mon, 13 Aug 2007 01:24:36 +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 l7D1Oawd066916 for ; Mon, 13 Aug 2007 01:24:36 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7D1OaHf066913 for perforce@freebsd.org; Mon, 13 Aug 2007 01:24:36 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 13 Aug 2007 01:24:36 GMT Message-Id: <200708130124.l7D1OaHf066913@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 125095 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, 13 Aug 2007 01:24:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=125095 Change 125095 by kmacy@kmacy_home:ethng on 2007/08/13 01:24:15 - only explicitly bind the interrupt for a qset when using multiple queues - set queue stopped bit when the hardware queue is full and clear when descriptors have been reclaimed - remove use of OACTIVE flag - return ENOBUFS when queues are full - only coalesce packets from ring onto sendq while the thread has exclusive access to the txq - make sure to free mbuf when enqueueing is not possible - free remaining mbufs on sendq and ring when service thread exits - reclaim as many descriptors as possible in reclaim_tx - simplify logic in cxgb_pcpu_start_ to ensure packet is always either queued or freed - don't start tx if running on a cpu for which the ifnet has no active qset - save rss_hash in incoming mbuf - avoid panic by disallowing change of intr_coal until initialization has happened Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#7 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#10 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#5 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#8 edit .. //depot/projects/ethng/src/sys/dev/cxgb/sys/mvec.h#2 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#7 (text+ko) ==== @@ -573,16 +573,16 @@ } #ifdef IFNET_MULTIQUEUE -int cxgb_pcpu_enqueue_packet(struct ifnet *ifp, int32_t cpuid, struct mbuf *m); -int cxgb_pcpu_start(struct ifnet *ifp, int32_t cpuid, struct mbuf *m); +int cxgb_pcpu_enqueue_packet(struct ifnet *ifp, struct mbuf *m); +int cxgb_pcpu_start(struct ifnet *ifp, struct mbuf *m); int32_t cxgb_pcpu_get_cookie(struct ifnet *ifp, struct in6_addr *lip, uint16_t lport, struct in6_addr *rip, uint16_t rport, int ipv6); void cxgb_pcpu_shutdown_threads(struct adapter *sc); void cxgb_pcpu_startup_threads(struct adapter *sc); +int cxgb_tx_common(struct ifnet *ifp, struct sge_qset *qs, uint32_t txmax); #endif void t3_free_qset(adapter_t *sc, struct sge_qset *q); -int cxgb_tx_common(struct ifnet *ifp, struct sge_qset *qs, uint32_t txmax); struct mbuf *cxgb_dequeue_packet(struct ifnet *ifp, struct sge_txq *unused); void cxgb_start(struct ifnet *ifp); void refill_fl_service(adapter_t *adap, struct sge_fl *fl); ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#10 (text+ko) ==== @@ -91,7 +91,6 @@ static void cxgb_stop_locked(struct port_info *); static void cxgb_set_rxmode(struct port_info *); static int cxgb_ioctl(struct ifnet *, unsigned long, caddr_t); -static void cxgb_start_proc(void *, int ncount); static int cxgb_media_change(struct ifnet *); static void cxgb_media_status(struct ifnet *, struct ifmediareq *); static int setup_sge_qsets(adapter_t *); @@ -102,6 +101,10 @@ static void cxgb_tick(void *); static void setup_rss(adapter_t *sc); +#ifndef IFNET_MULTIQUEUE +static void cxgb_start_proc(void *, int ncount); +#endif + /* Attachment glue for the PCI controller end of the device. Each port of * the device is attached separately, as defined later. */ @@ -118,7 +121,6 @@ static int offload_close(struct toedev *tdev); #endif - static device_method_t cxgb_controller_methods[] = { DEVMETHOD(device_probe, cxgb_controller_probe), DEVMETHOD(device_attach, cxgb_controller_attach), @@ -860,7 +862,7 @@ static int cxgb_setup_msix(adapter_t *sc, int msix_count) { - int i, j, k, nqsets, rid, vector; + int i, j, k, nqsets, rid; /* The first message indicates link changes and error conditions */ sc->irq_rid = 1; @@ -904,12 +906,14 @@ "interrupt for message %d\n", rid); return (EINVAL); } - if (singleq) { - vector = rman_get_start(sc->msix_irq_res[k]); +#ifdef IFNET_MULTIQUEUE + if (singleq == 0) { + int vector = rman_get_start(sc->msix_irq_res[k]); if (bootverbose) device_printf(sc->dev, "binding vector=%d to cpu=%d\n", vector, k % mp_ncpus); intr_bind(vector, k % mp_ncpus); } +#endif } } @@ -1073,15 +1077,16 @@ p->tq = taskqueue_create_fast(buf, M_NOWAIT, taskqueue_thread_enqueue, &p->tq); #endif - +#ifndef IFNET_MULTIQUEUE if (p->tq == NULL) { device_printf(dev, "failed to allocate port task queue\n"); return (ENOMEM); } taskqueue_start_threads(&p->tq, 1, PI_NET, "%s taskq", device_get_nameunit(dev)); + TASK_INIT(&p->start_task, 0, cxgb_start_proc, ifp); - +#endif t3_sge_init_port(p); return (0); @@ -1925,10 +1930,11 @@ txq = &qs->txq[TXQ_ETH]; in_use_init = txq->in_use; + err = 0; while ((txq->in_use - in_use_init < txmax) && (txq->size > txq->in_use + TX_MAX_DESC)) { m = cxgb_dequeue_packet(ifp, txq); - if (m == NULL) + if (m == NULL) break; /* * Convert chain to M_IOVEC @@ -1978,10 +1984,16 @@ ifp->if_drv_flags |= IFF_DRV_OACTIVE; err = ENOSPC; } +#else + if ((err == 0) && (txq->size <= txq->in_use + TX_MAX_DESC)) { + err = ENOSPC; + setbit(&qs->txq_stopped, TXQ_ETH); + } #endif return (err); } +#ifndef IFNET_MULTIQUEUE static int cxgb_start_tx(struct ifnet *ifp, uint32_t txmax) { @@ -2002,7 +2014,7 @@ if (txq->flags & TXQ_TRANSMITTING) return (EINPROGRESS); - + mtx_lock(&txq->lock); txq->flags |= TXQ_TRANSMITTING; cxgb_tx_common(ifp, qs, txmax); @@ -2032,7 +2044,6 @@ } while (error == 0); } -#ifndef IFNET_MULTIQUEUE struct mbuf * cxgb_dequeue_packet(struct ifnet *ifp, struct sge_txq *unused) { ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#5 (text+ko) ==== @@ -97,7 +97,7 @@ SYSCTL_UINT(_hw_cxgb, OID_AUTO, sleep_ticks, CTLFLAG_RDTUN, &sleep_ticks, 0, "ticks to sleep between checking pcpu queues"); -int cxgb_txq_mbuf_ring_size = 2048; +int cxgb_txq_mbuf_ring_size = 8192; TUNABLE_INT("hw.cxgb.txq_mr_size", &cxgb_txq_mbuf_ring_size); SYSCTL_UINT(_hw_cxgb, OID_AUTO, txq_mr_size, CTLFLAG_RDTUN, &cxgb_txq_mbuf_ring_size, 0, "size of per-queue mbuf ring"); @@ -105,7 +105,7 @@ static inline int32_t cxgb_pcpu_calc_cookie(struct ifnet *ifp, struct mbuf *immpkt); static void cxgb_pcpu_start_proc(void *arg); -static int cxgb_pcpu_cookie_to_qidx(struct port_info *, int32_t cookie); +static int cxgb_pcpu_cookie_to_qidx(struct port_info *, uint32_t cookie); static inline int cxgb_pcpu_enqueue_packet_(struct sge_qset *qs, struct mbuf *m) @@ -113,11 +113,11 @@ struct sge_txq *txq; struct mbuf_ring *mr; struct mbuf_head *mbq; - int dropped = 0; + int err = 0; if (qs->qs_flags & QS_EXITING) { - m_freem(m); - return (0); + m_freem_vec(m); + return (ENXIO); } txq = &qs->txq[TXQ_ETH]; @@ -131,7 +131,7 @@ critical_exit(); } else { int prod, cons, mask; - + mr = &txq->txq_mr; mtx_lock(&txq->lock); cons = mr->mr_cons; @@ -142,23 +142,20 @@ mr->mr_prod = (prod + 1) & mask; } else { txq->txq_drops++; - atomic_set_acq_int(&qs->port->ifp->if_drv_flags, IFF_DRV_OACTIVE); - dropped = 1; + err = ENOBUFS; } mtx_unlock(&txq->lock); - if ((qs->txq[TXQ_ETH].flags & TXQ_TRANSMITTING) == 0) wakeup(qs); - - if (dropped) + if (err) m_freem(m); } - return (0); + return (err); } int -cxgb_pcpu_enqueue_packet(struct ifnet *ifp, int32_t cookie, struct mbuf *m) +cxgb_pcpu_enqueue_packet(struct ifnet *ifp, struct mbuf *m) { struct port_info *pi; struct sge_qset *qs; @@ -168,7 +165,7 @@ pi = ifp->if_softc; err = 0; - calc_cookie = (cookie != -1) ? cookie : cxgb_pcpu_calc_cookie(ifp, m); + calc_cookie = m->m_pkthdr.rss_hash; qidx = cxgb_pcpu_cookie_to_qidx(pi, calc_cookie); qs = &pi->adapter->sge.qs[qidx]; @@ -222,6 +219,7 @@ int count; int32_t cookie; + critical_enter(); /* * Can definitely bypass bcopy XXX */ @@ -249,7 +247,8 @@ * -> RSS map maps queue to CPU */ cookie = (base & (RSS_TABLE_SIZE-1)); - + critical_exit(); + return (cookie); } @@ -267,10 +266,16 @@ struct sctphdr *sh; uint8_t *next, proto; int etype; - + if (immpkt == NULL) return -1; +#if 1 + /* + * XXX perf test + */ + return (0); +#endif rport = lport = 0; cookie = -1; next = NULL; @@ -337,23 +342,24 @@ static inline int cxgb_pcpu_pkt_coalesce(struct sge_txq *txq, struct mbuf *imm, int *complete) { - int prod, cons, mask, transferred; + int prod, cons, mask, err; struct mbuf_head *mbq; struct mbuf_ring *mr; struct mbuf **ring, *m; - mbq = &txq->sendq; mr = &txq->txq_mr; ring = mr->mr_ring; mask = mr->mr_size - 1; - + err = 0; /* * Arbitrary threshold at which to apply backpressure */ if (mbufq_len(mbq) > cxgb_txq_mbuf_ring_size) { + if (imm) + m_freem_vec(imm); *complete = 1; - return (0); + return (ENOBUFS); } critical_enter(); @@ -363,157 +369,206 @@ m = ring[cons]; cons = (cons + 1) & mask; mbufq_tail(mbq, m); - transferred++; } mr->mr_cons = cons; if (imm) mbufq_tail(mbq, imm); + *complete = ((mbufq_size(mbq) > TX_WR_SIZE_MAX) || (mbufq_len(mbq) >= TX_WR_COUNT_MAX)); critical_exit(); - return (transferred); + return (err); } static void +cxgb_pcpu_free(struct sge_qset *qs) +{ + struct mbuf *m; + struct sge_txq *txq = &qs->txq[TXQ_ETH]; + int complete; + + while ((m = mbufq_dequeue(&txq->sendq)) != NULL) + m_freem_vec(m); + cxgb_pcpu_pkt_coalesce(txq, NULL, &complete); + while ((m = mbufq_dequeue(&txq->sendq)) != NULL) + m_freem_vec(m); +} + +static int cxgb_pcpu_reclaim_tx(struct sge_txq *txq) { - int reclaimable, i, j, n; + int reclaimable, reclaimed, i, j, n; struct mbuf *m_vec[TX_CLEAN_MAX_DESC]; - - reclaimable = desc_reclaimable(txq); - j = 0; - while (reclaimable > 0) { - + 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)); + + reclaimed = j = 0; + while ((reclaimable = desc_reclaimable(txq)) > 0) { critical_enter(); + n = t3_free_tx_desc(txq, min(reclaimable, TX_CLEAN_MAX_DESC), m_vec); - - txq->cleaned += n; - txq->in_use -= n; - /* - * In case this is called while mbufs are being freed - */ - reclaimable = desc_reclaimable(txq); critical_exit(); - - if (n == 0) - return; + + reclaimed += min(reclaimable, TX_CLEAN_MAX_DESC); + if (j > 5 || cxgb_debug) - printf("n=%d reclaimable=%d txq->cleaned=%d txq->in_use=%d\n", - n, reclaimable, txq->cleaned, txq->in_use); + 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++) + for (i = 0; i < n; i++) m_freem_vec(m_vec[i]); - j++; + j++; + + critical_enter(); + txq->cleaned += reclaimed; + txq->in_use -= reclaimed; + if (isset(&qs->txq_stopped, TXQ_ETH)) + clrbit(&qs->txq_stopped, TXQ_ETH); + critical_exit(); } + + return (reclaimed); } static int -cxgb_pcpu_start_(struct port_info *pi, int32_t cookie, struct mbuf *immpkt, int tx_flush) +cxgb_pcpu_start_(struct sge_qset *qs, struct mbuf *immpkt, int tx_flush) { - int32_t calc_cookie; - int err, flush, complete, qidx, i = 0; - struct sge_qset *immqs, *curqs; + int i, err, flush, complete, reclaimed, stopped; + struct port_info *pi; struct sge_txq *txq; adapter_t *sc; uint32_t max_desc; + + pi = qs->port; + err = 0; + sc = pi->adapter; + i = reclaimed = 0; - if (!pi->link_config.link_ok) { - return (ENXIO); + retry: + if (!pi->link_config.link_ok) + err = ENXIO; + else if (qs->qs_flags & QS_EXITING) + err = ENXIO; + else { + txq = &qs->txq[TXQ_ETH]; + err = cxgb_pcpu_pkt_coalesce(txq, immpkt, &complete); } - sc = pi->adapter; - calc_cookie = ((cookie == -1) && immpkt) ? cxgb_pcpu_calc_cookie(pi->ifp, immpkt) : cookie; - qidx = cxgb_pcpu_cookie_to_qidx(pi, calc_cookie); - immqs = &pi->adapter->sge.qs[qidx]; - curqs = (curcpu < SGE_QSETS) ? &pi->adapter->sge.qs[curcpu] : NULL; - - if (immqs->qs_flags & QS_EXITING) { - printf("exting\n"); + if (err) { + if (cxgb_debug) + printf("cxgb link down\n"); if (immpkt) - m_freem(immpkt); - return (0); - } - if (immpkt != NULL && tx_flush == 0) - DPRINTF("calc_cookie=%d\n", calc_cookie); - - err = 0; - /* - * If we're passed a packet and it isn't outbound from this cpu - * we need to enqueue it be transmitted from the appropriate CPU - */ - if (immpkt && immqs != curqs) { - err = cxgb_pcpu_enqueue_packet_(immqs, immpkt); - immpkt = NULL; - + m_freem_vec(immpkt); + return (err); } - if (err || curqs == NULL) - return (err); - txq = &curqs->txq[TXQ_ETH]; + immpkt = NULL; - if (curqs->qs_flags & QS_EXITING) - return (0); + if (desc_reclaimable(txq) > 0) { + int reclaimed = 0; - /* - * A transmitter is already running on the current cpu - */ - critical_enter(); - if (txq->flags & TXQ_TRANSMITTING) { - critical_exit(); - DPRINTF("transmit in progress\n"); - return (0); + if (cxgb_debug) { + device_printf(qs->port->adapter->dev, + "cpuid=%d curcpu=%d reclaimable=%d txq=%p txq->cidx=%d txq->pidx=%d ", + qs->qs_cpuid, curcpu, desc_reclaimable(txq), + txq, txq->cidx, txq->pidx); + } + reclaimed = cxgb_pcpu_reclaim_tx(txq); + if (cxgb_debug) + printf("reclaimed=%d\n", reclaimed); } - txq->flags |= TXQ_TRANSMITTING; - critical_exit(); - if (immpkt != NULL || tx_flush == 0) { - DPRINTF("immpkt=%p qidx=%d\n", immpkt, qidx); - DPRINTF("curcpu=%d sc->sge.qs[%d].cpuid=%d\n", curcpu, - qidx, sc->sge.qs[qidx].cpuid); - } -retry: - cxgb_pcpu_pkt_coalesce(txq, immpkt, &complete); - /* + /* * If coalescing is disabled OR a complete packet is ready OR we're being called from the flush thread */ - flush = (!mbufq_empty(&txq->sendq)) && ((cxgb_pcpu_tx_coalesce == 0) || complete || tx_flush); + stopped = isset(&qs->txq_stopped, TXQ_ETH); + flush = (!mbufq_empty(&txq->sendq)) && !stopped && ((cxgb_pcpu_tx_coalesce == 0) || complete || tx_flush); max_desc = tx_flush ? 0xffffff : TX_START_MAX_DESC; + err = flush ? cxgb_tx_common(qs->port->ifp, qs, max_desc) : ENOSPC; - err = flush ? cxgb_tx_common(curqs->port->ifp, curqs, max_desc) : 0; - - if (desc_reclaimable(txq) > 0) { - if (cxgb_debug) { - device_printf(curqs->port->adapter->dev, - "cpuid=%d reclaimable=%d\n", curcpu, desc_reclaimable(txq)); - } - cxgb_pcpu_reclaim_tx(txq); - if (curqs->port->ifp->if_drv_flags & IFF_DRV_OACTIVE) - atomic_clear_acq_int(&curqs->port->ifp->if_drv_flags, IFF_DRV_OACTIVE); - - } - if (tx_flush && err == 0 && !mbufq_empty(&txq->sendq)) { + if ((tx_flush && flush && err == 0) && !mbufq_empty(&txq->sendq)) { +#if 0 + struct thread *td = curthread; + thread_lock(td); + sched_prio(td, PRI_MIN_TIMESHARE); + thread_unlock(td); +#endif if (i++ > 5000) - device_printf(curqs->port->adapter->dev, + device_printf(qs->port->adapter->dev, "mbuf head=%p qsize=%d qlen=%d\n", txq->sendq.head, txq->sendq.qsize, txq->sendq.qlen); goto retry; } + return (err); +} +static int +cxgb_pcpu_txq_trylock(struct sge_txq *txq) +{ + critical_enter(); + if (txq->flags & TXQ_TRANSMITTING) { + critical_exit(); + DPRINTF("transmit in progress\n"); + return (0); + } + txq->flags |= TXQ_TRANSMITTING; + critical_exit(); + return (1); +} + +static void +cxgb_pcpu_txq_unlock(struct sge_txq *txq) +{ + critical_enter(); txq->flags &= ~TXQ_TRANSMITTING; - return (err); + critical_exit(); } - int -cxgb_pcpu_start(struct ifnet *ifp, int32_t cookie, struct mbuf *immpkt) +cxgb_pcpu_start(struct ifnet *ifp, struct mbuf *immpkt) { - int err; + uint32_t cookie; + int err, qidx, locked; struct port_info *pi; + struct sge_qset *immqs, *curqs; + struct sge_txq *txq = NULL /* gcc is dumb */; + pi = ifp->if_softc; + immqs = curqs = NULL; + err = cookie = locked = 0; sched_pin(); - err = cxgb_pcpu_start_(pi, cookie, immpkt, FALSE); + if (immpkt && (immpkt->m_pkthdr.rss_hash != 0)) { + cookie = immpkt->m_pkthdr.rss_hash; + qidx = cxgb_pcpu_cookie_to_qidx(pi, cookie); + DPRINTF("hash=0x%x qidx=%d cpu=%d\n", immpkt->m_pkthdr.rss_hash, qidx, curcpu); + immqs = &pi->adapter->sge.qs[qidx]; + if (immqs->qs_cpuid != curcpu) { + cxgb_pcpu_enqueue_packet_(immqs, immpkt); + immpkt = NULL; + } + } + if (curcpu < pi->first_qset || curcpu >= (pi->first_qset + pi->nqsets)) { + /* + * If packet isn't tagged and there is no queue for this cpu + */ + if (immpkt) { + immqs = &pi->adapter->sge.qs[pi->first_qset]; + cxgb_pcpu_enqueue_packet_(immqs, immpkt); + } + goto done; + } + curqs = &pi->adapter->sge.qs[curcpu]; + txq = &curqs->txq[TXQ_ETH]; + if (cxgb_pcpu_txq_trylock(txq)) { + err = cxgb_pcpu_start_(curqs, immpkt, FALSE); + cxgb_pcpu_txq_unlock(txq); + } else if (immpkt) + err = cxgb_pcpu_enqueue_packet_(curqs, immpkt); +done: sched_unpin(); - return (err); + return ((err == ENOSPC) ? 0 : err); } void @@ -556,13 +611,21 @@ } } if (curcpu < SGE_QSETS) { - int32_t cookie; - + qs = &pi->adapter->sge.qs[curcpu]; /* * Assume one-to-one mapping of qset to CPU for now XXX */ - cookie = pi->adapter->rrss_map[curcpu]; - (void)cxgb_pcpu_start_(pi, cookie, lhead, 0); + + if (cxgb_pcpu_txq_trylock(&qs->txq[TXQ_ETH])) { + (void)cxgb_pcpu_start_(qs, NULL, TRUE); + cxgb_pcpu_txq_unlock(&qs->txq[TXQ_ETH]); + } else { + /* + * XXX multiple packets + */ + cxgb_pcpu_enqueue_packet_(qs, lhead); + + } } sched_unpin(); } @@ -572,7 +635,9 @@ { struct sge_qset *qs = arg; struct thread *td; - + struct adapter *sc = qs->port->adapter; + int err = 0; + td = curthread; qs->qs_flags |= QS_RUNNING; @@ -580,38 +645,64 @@ sched_bind(td, qs->qs_cpuid); thread_unlock(td); + DELAY(qs->qs_cpuid*100000); + printf("bound to %d running on %d\n", qs->qs_cpuid, curcpu); + for (;;) { if (qs->qs_flags & QS_EXITING) break; - cxgb_pcpu_start_(qs->port, qs->qs_cpuid, NULL, TRUE); - - refill_fl_service(qs->port->adapter, &qs->fl[0]); - refill_fl_service(qs->port->adapter, &qs->fl[1]); + if (cxgb_pcpu_txq_trylock(&qs->txq[TXQ_ETH])) { + err = cxgb_pcpu_start_(qs, NULL, TRUE); + cxgb_pcpu_txq_unlock(&qs->txq[TXQ_ETH]); + } else + err = EINPROGRESS; + + if (mtx_trylock(&qs->rspq.lock)) { + process_responses(sc, qs, -1); + + refill_fl_service(sc, &qs->fl[0]); + refill_fl_service(sc, &qs->fl[1]); + t3_write_reg(sc, A_SG_GTS, V_RSPQ(qs->rspq.cntxt_id) | + V_NEWTIMER(qs->rspq.next_holdoff) | V_NEWINDEX(qs->rspq.cidx)); + + mtx_unlock(&qs->rspq.lock); + } + if ((!mbufq_empty(&qs->txq[TXQ_ETH].sendq) || + (qs->txq[TXQ_ETH].txq_mr.mr_cons != qs->txq[TXQ_ETH].txq_mr.mr_prod)) && + err == 0) { + if (cxgb_debug) + printf("head=%p cons=%d prod=%d\n", + qs->txq[TXQ_ETH].sendq.head, qs->txq[TXQ_ETH].txq_mr.mr_cons, + qs->txq[TXQ_ETH].txq_mr.mr_prod); + continue; + } tsleep(qs, 1, "cxgbidle", sleep_ticks); } - thread_lock(td); - sched_unbind(td); - thread_unlock(td); if (bootverbose) device_printf(qs->port->adapter->dev, "exiting thread for cpu%d\n", qs->qs_cpuid); + + cxgb_pcpu_free(qs); t3_free_qset(qs->port->adapter, qs); + qs->qs_flags &= ~QS_RUNNING; kthread_exit(0); } static int -cxgb_pcpu_cookie_to_qidx(struct port_info *pi, int32_t cookie) +cxgb_pcpu_cookie_to_qidx(struct port_info *pi, uint32_t cookie) { - int qidx, tmp; - + int qidx; + uint32_t tmp; + /* * Will probably need to be changed for 4-port XXX */ tmp = pi->tx_chan ? cookie : cookie & ((RSS_TABLE_SIZE>>1)-1); - qidx = pi->adapter->rspq_map[tmp]; + DPRINTF(" tmp=%d ", tmp); + qidx = (tmp & (pi->nqsets -1)) + pi->first_qset; return (qidx); } @@ -654,11 +745,11 @@ qs->qs_flags |= QS_EXITING; wakeup(qs); - tsleep(&sc, 0, "cxgb unload 0", hz>>2); + tsleep(&sc, PRI_MIN_TIMESHARE, "cxgb unload 0", hz>>2); while (qs->qs_flags & QS_RUNNING) { qs->qs_flags |= QS_EXITING; device_printf(sc->dev, "qset thread %d still running - sleeping\n", first + j); - tsleep(&sc, 0, "cxgb unload 1", 2*hz); + tsleep(&sc, PRI_MIN_TIMESHARE, "cxgb unload 1", 2*hz); } } } ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#8 (text+ko) ==== @@ -1197,7 +1197,10 @@ struct tx_desc *txd; struct cpl_tx_pkt *cpl; - DPRINTF("t3_encap "); +#ifdef IFNET_MULTIQUEUE + KASSERT(qs->qs_cpuid == curcpu, ("cpu qset mismatch cpuid=%d curcpu=%d", qs->qs_cpuid, curcpu)); +#endif + DPRINTF("t3_encap cpu=%d ", curcpu); m0 = *m; p = qs->port; sc = p->adapter; @@ -1672,13 +1675,14 @@ t3_free_tx_desc(struct sge_txq *q, int n, struct mbuf **m_vec) { struct tx_sw_desc *d; - unsigned int cidx = q->cidx; + unsigned int cidx; int nbufs = 0; #ifdef T3_TRACE T3_TRACE2(sc->tb[q->cntxt_id & 7], "reclaiming %u Tx descriptors at cidx %u", n, cidx); #endif + cidx = q->cidx; d = &q->sdesc[cidx]; while (n-- > 0) { @@ -2298,6 +2302,7 @@ prefetch(sd->cl); + DPRINTF("rx cpu=%d\n", curcpu); fl->credits--; bus_dmamap_sync(fl->entry_tag, sd->map, BUS_DMASYNC_POSTREAD); @@ -2366,6 +2371,8 @@ if (desc_reclaimable(&qs->txq[TXQ_ETH]) > TX_START_MAX_DESC) taskqueue_enqueue(qs->port->adapter->tq, &qs->port->timer_reclaim_task); +#else + wakeup(qs); #endif } @@ -2404,7 +2411,7 @@ * on this queue. If the system is under memory shortage use a fairly * long delay to help recovery. */ -static int +int process_responses(adapter_t *adap, struct sge_qset *qs, int budget) { struct sge_rspq *rspq = &qs->rspq; @@ -2427,7 +2434,7 @@ int eth, eop = 0, ethpad = 0; uint32_t flags = ntohl(r->flags); uint32_t rss_csum = *(const uint32_t *)r; - uint32_t rss_hash = r->rss_hdr.rss_hash_val; + uint32_t rss_hash = be32toh(r->rss_hdr.rss_hash_val); eth = (r->rss_hdr.opcode == CPL_RX_PKT); @@ -2460,13 +2467,14 @@ } else if (r->len_cq) { int drop_thresh = eth ? SGE_RX_DROP_THRES : 0; - if (rspq->m == NULL) - rspq->m = m_gethdr(M_DONTWAIT, MT_DATA); - if (rspq->m == NULL) { - log(LOG_WARNING, "failed to get mbuf for packet\n"); - break; + if (rspq->m == NULL) { + if ((rspq->m = m_gethdr(M_DONTWAIT, MT_DATA)) == NULL) { + DPRINTF("0x%x:%d\n", rss_hash & ((1<<7)-1), curcpu); + rspq->next_holdoff = NOMEM_INTR_DELAY; + break; + } else + rspq->m->m_pkthdr.rss_hash = rss_hash; } - ethpad = 2; eop = get_packet(adap, drop_thresh, qs, rspq->m, r); } else { @@ -2625,10 +2633,11 @@ adapter_t *adap = qs->port->adapter; struct sge_rspq *rspq = &qs->rspq; - mtx_lock(&rspq->lock); - if (process_responses_gts(adap, rspq) == 0) - rspq->unhandled_irqs++; - mtx_unlock(&rspq->lock); + if (mtx_trylock(&rspq->lock)) { + if (process_responses_gts(adap, rspq) == 0) + rspq->unhandled_irqs++; + mtx_unlock(&rspq->lock); + } } /* @@ -2672,7 +2681,10 @@ struct sge_qset *qs; int i, j, err, nqsets = 0; struct mtx *lock; - + + if ((sc->flags & FULL_INIT_DONE) == 0) + return (ENXIO); + coalesce_nsecs = qsp->coalesce_nsecs; err = sysctl_handle_int(oidp, &coalesce_nsecs, arg2, req); ==== //depot/projects/ethng/src/sys/dev/cxgb/sys/mvec.h#2 (text+ko) ==== @@ -128,6 +128,8 @@ { struct mbuf *n = m->m_next; + m->m_pkthdr.rss_hash = 0; + if (m->m_flags & M_IOVEC) mb_free_vec(m); else if (m->m_flags & M_EXT) From owner-p4-projects@FreeBSD.ORG Mon Aug 13 04:32:30 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C9AEB16A41A; Mon, 13 Aug 2007 04:32:30 +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 8223616A419 for ; Mon, 13 Aug 2007 04:32:30 +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 711A313C46B for ; Mon, 13 Aug 2007 04:32:30 +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 l7D4WU5H081236 for ; Mon, 13 Aug 2007 04:32:30 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7D4WUJw081233 for perforce@freebsd.org; Mon, 13 Aug 2007 04:32:30 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 13 Aug 2007 04:32:30 GMT Message-Id: <200708130432.l7D4WUJw081233@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 125097 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, 13 Aug 2007 04:32:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=125097 Change 125097 by kmacy@kmacy_home:ethng on 2007/08/13 04:31:46 move to using lock embedded in mbuf_ring for protecting producer side Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#6 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_osdep.h#3 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#9 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#6 (text+ko) ==== @@ -113,43 +113,36 @@ struct sge_txq *txq; struct mbuf_ring *mr; struct mbuf_head *mbq; + int prod, cons, mask; int err = 0; if (qs->qs_flags & QS_EXITING) { m_freem_vec(m); return (ENXIO); } - txq = &qs->txq[TXQ_ETH]; DPRINTF("enqueueing packet to cpuid=%d\n", qs->qs_cpuid); mbq = &txq->sendq; - if (curcpu == qs->qs_cpuid) { - critical_enter(); - mbufq_tail(mbq, m); - critical_exit(); + + mr = &txq->txq_mr; + mtx_lock(&mr->mr_lock); + cons = mr->mr_cons; + prod = mr->mr_prod; + mask = mr->mr_size - 1; + if (((prod + 1) & mask) != cons) { + mr->mr_ring[prod] = m; + mr->mr_prod = (prod + 1) & mask; } else { - int prod, cons, mask; - - mr = &txq->txq_mr; - mtx_lock(&txq->lock); - cons = mr->mr_cons; - prod = mr->mr_prod; - mask = mr->mr_size - 1; - if (((prod + 1) & mask) != cons) { - mr->mr_ring[prod] = m; - mr->mr_prod = (prod + 1) & mask; - } else { - txq->txq_drops++; - err = ENOBUFS; - } - mtx_unlock(&txq->lock); - if ((qs->txq[TXQ_ETH].flags & TXQ_TRANSMITTING) == 0) - wakeup(qs); - if (err) - m_freem(m); + txq->txq_drops++; + err = ENOBUFS; } + mtx_unlock(&mr->mr_lock); + if ((qs->txq[TXQ_ETH].flags & TXQ_TRANSMITTING) == 0) + wakeup(qs); + if (err) + m_freem(m); return (err); } @@ -362,7 +355,6 @@ return (ENOBUFS); } - critical_enter(); cons = mr->mr_cons; prod = mr->mr_prod; while (cons != prod) { @@ -375,7 +367,6 @@ mbufq_tail(mbq, imm); *complete = ((mbufq_size(mbq) > TX_WR_SIZE_MAX) || (mbufq_len(mbq) >= TX_WR_COUNT_MAX)); - critical_exit(); return (err); } ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_osdep.h#3 (text+ko) ==== @@ -36,6 +36,9 @@ #include #include +#include +#include + #include #ifdef CONFIG_DEFINED @@ -57,6 +60,7 @@ volatile uint32_t mr_cons; volatile uint32_t mr_prod; int mr_size; + struct mtx mr_lock; }; #define PANIC_IF(exp) do { \ ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#9 (text+ko) ==== @@ -1540,9 +1540,10 @@ int i; for (i = 0; i < SGE_TXQ_PER_SET; i++) - if (q->txq[i].txq_mr.mr_ring != NULL) + if (q->txq[i].txq_mr.mr_ring != NULL) { free(q->txq[i].txq_mr.mr_ring, M_DEVBUF); - + mtx_destroy(&q->txq[i].txq_mr.mr_lock); + } for (i = 0; i < SGE_RXQ_PER_SET; ++i) { if (q->fl[i].desc) { mtx_lock(&sc->sge.reg_lock); @@ -2070,6 +2071,7 @@ } q->txq[i].txq_mr.mr_prod = q->txq[i].txq_mr.mr_cons = 0; q->txq[i].txq_mr.mr_size = cxgb_txq_mbuf_ring_size; + mtx_init(&q->txq[i].txq_mr.mr_lock, "txq mbuf ring", NULL, MTX_DEF); } init_qset_cntxt(q, id); From owner-p4-projects@FreeBSD.ORG Mon Aug 13 06:00:19 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C0EAE16A420; Mon, 13 Aug 2007 06:00:18 +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 7225516A419 for ; Mon, 13 Aug 2007 06:00:18 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6152313C46E for ; Mon, 13 Aug 2007 06:00:18 +0000 (UTC) (envelope-from zhouzhouyi@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 l7D60ISs095912 for ; Mon, 13 Aug 2007 06:00:18 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7D60Iet095909 for perforce@freebsd.org; Mon, 13 Aug 2007 06:00:18 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Mon, 13 Aug 2007 06:00:18 GMT Message-Id: <200708130600.l7D60Iet095909@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 125098 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, 13 Aug 2007 06:00:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=125098 Change 125098 by zhouzhouyi@zhouzhouyi_mactest on 2007/08/13 06:00:10 The test case for check_ifnet_relabel, a bug of mac_mls_check_ifnet_relabel is discovered Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/netinet/00.t#1 add .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/pipe/00.t#2 edit Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/pipe/00.t#2 (text+ko) ==== @@ -7,7 +7,7 @@ dir=`dirname $0` . ${dir}/../misc.sh -echo "1..1" +echo "1..2" #turn off all the switches @@ -54,7 +54,7 @@ #cleanup: t=`sysctl security.mac.mls.enabled=0` echo "disabling mac/mls!" - rm -fr ${n3} + rm ${mactest_conf} fi From owner-p4-projects@FreeBSD.ORG Mon Aug 13 07:02:37 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 45E2616A419; Mon, 13 Aug 2007 07:02:37 +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 E2A5B16A421 for ; Mon, 13 Aug 2007 07:02:36 +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 D1FF713C4B6 for ; Mon, 13 Aug 2007 07:02:36 +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 l7D72a1q000776 for ; Mon, 13 Aug 2007 07:02:36 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7D72aHi000773 for perforce@freebsd.org; Mon, 13 Aug 2007 07:02:36 GMT (envelope-from zec@FreeBSD.org) Date: Mon, 13 Aug 2007 07:02:36 GMT Message-Id: <200708130702.l7D72aHi000773@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 125099 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, 13 Aug 2007 07:02:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=125099 Change 125099 by zec@zec_tpx32 on 2007/08/13 07:01:54 A hack to resolve character "@" to vimage name when following symbolic links. This is controlled on per-vimage basis via the new vfs.morphing_symlinks sysctl and is off by default. The primary use of this will be in IMUNES network topology emulator to allow running of multiple instances of unmodified applications with some hard coded filesystem paths, most notably quagga. While here, slightly change the format of warning messages displayed if / when vnet "stacking" occurs. Affected files ... .. //depot/projects/vimage/src/sys/kern/vfs_lookup.c#6 edit .. //depot/projects/vimage/src/sys/sys/vimage.h#33 edit Differences ... ==== //depot/projects/vimage/src/sys/kern/vfs_lookup.c#6 (text+ko) ==== @@ -40,6 +40,7 @@ #include "opt_ktrace.h" #include "opt_mac.h" #include "opt_vfs.h" +#include "opt_vimage.h" #include #include @@ -53,6 +54,7 @@ #include #include #include +#include #ifdef KTRACE #include #endif @@ -65,6 +67,15 @@ #define NAMEI_DIAGNOSTIC 1 #undef NAMEI_DIAGNOSTIC +#ifdef VIMAGE +#define IMUNES_SYMLINK_HACK +#endif + +#ifdef IMUNES_SYMLINK_HACK +SYSCTL_V_INT(V_PROCG, vprocg, _vfs, OID_AUTO, morphing_symlinks, CTLFLAG_RW, + morphing_symlinks, 0, "Resolve @ to vimage name in symlinks"); +#endif + /* * Allocation zone for namei */ @@ -129,6 +140,9 @@ struct thread *td = cnp->cn_thread; struct proc *p = td->td_proc; int vfslocked; +#ifdef IMUNES_SYMLINK_HACK + INIT_VPROCG(td->td_ucred->cr_vimage->v_procg); +#endif KASSERT((cnp->cn_flags & MPSAFE) != 0 || mtx_owned(&Giant) != 0, ("NOT MPSAFE and Giant not held")); @@ -284,6 +298,26 @@ error = ENOENT; break; } +#ifdef IMUNES_SYMLINK_HACK + if (V_morphing_symlinks) { + char *sp = strchr(cp, '@'); + int vnamelen = strlen(td->td_ucred->cr_vimage->vi_name); + + if (sp) { + if (vnamelen >= auio.uio_resid) { + if (ndp->ni_pathlen > 1) + uma_zfree(namei_zone, cp); + error = ENAMETOOLONG; + break; + } + bcopy(sp + 1, sp + vnamelen, + vnamelen - (sp - cp)); + bcopy(td->td_ucred->cr_vimage->vi_name, sp, + vnamelen); + linklen += (vnamelen - 1); + } + } +#endif /* IMUNES_SYMLINK_HACK */ if (linklen + ndp->ni_pathlen >= MAXPATHLEN) { if (ndp->ni_pathlen > 1) uma_zfree(namei_zone, cp); ==== //depot/projects/vimage/src/sys/sys/vimage.h#33 (text+ko) ==== @@ -197,9 +197,9 @@ #define CURVNET_SET_VERBOSE(arg) \ CURVNET_SET_QUIET(arg) \ if (saved_vnet) \ - printf("curvnet_set(%p) in %s() on cpu %d, prev %s(%p)\n", \ + printf("curvnet_set(%p) in %s() on cpu %d, prev %p in %s()\n", \ curvnet, curthread->td_vnet_lpush, curcpu, \ - saved_vnet_lpush, saved_vnet); + saved_vnet, saved_vnet_lpush); #define CURVNET_SET(arg) CURVNET_SET_VERBOSE(arg) @@ -291,6 +291,7 @@ #define V_cp_time VPROCG(cp_time) #define V_hostname VPROCG(hostname) #define V_domainname VPROCG(domainname) +#define V_morphing_symlinks VPROCG(morphing_symlinks) #ifdef VIMAGE void vnet_mod_register(const struct vnet_modinfo *); @@ -355,6 +356,8 @@ char _hostname[MAXHOSTNAMELEN]; char _domainname[MAXHOSTNAMELEN]; + int _morphing_symlinks; + #if 0 struct loadavg averunnable; /* from kern/kern_synch.c */ int nrun; @@ -374,9 +377,6 @@ struct timeval boottime; long boottdelta_sec; - int hostnamelen; - int domainnamelen; - char chroot[MAXPATHLEN]; /* assigned/inherited from parent */ int big_brother; /* manage procs in all child vprocgs */ From owner-p4-projects@FreeBSD.ORG Mon Aug 13 18:39:03 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1895216A420; Mon, 13 Aug 2007 18:39:03 +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 B29BB16A417 for ; Mon, 13 Aug 2007 18:39:02 +0000 (UTC) (envelope-from smilicic@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A074B13C45A for ; Mon, 13 Aug 2007 18:39:02 +0000 (UTC) (envelope-from smilicic@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 l7DId24x088091 for ; Mon, 13 Aug 2007 18:39:02 GMT (envelope-from smilicic@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7DId2SJ088088 for perforce@freebsd.org; Mon, 13 Aug 2007 18:39:02 GMT (envelope-from smilicic@FreeBSD.org) Date: Mon, 13 Aug 2007 18:39:02 GMT Message-Id: <200708131839.l7DId2SJ088088@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to smilicic@FreeBSD.org using -f From: Sonja Milicic To: Perforce Change Reviews Cc: Subject: PERFORCE change 125109 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, 13 Aug 2007 18:39:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=125109 Change 125109 by smilicic@tanarri_marilith on 2007/08/13 18:38:46 allocation table structure for keeping track of what's in the log file reading (from log and disk) and committing to disk fixed memory leaks Affected files ... .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/geom_log_so.c#3 edit .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog.c#8 edit .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog.h#3 edit .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_alloctable.c#1 add .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_alloctable.h#1 add .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_fileops.c#3 edit .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_fileops.h#3 edit Differences ... ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/geom_log_so.c#3 (text+ko) ==== @@ -76,7 +76,13 @@ }, "[-v] prov ..." }, - + { "dump", G_FLAG_VERBOSE, NULL, + { + { 'n', "nidx", NULL, G_TYPE_NUMBER }, + G_OPT_SENTINEL + }, + "[-n nidx] prov ..." + }, G_CMD_SENTINEL }; ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog.c#8 (text+ko) ==== @@ -44,16 +44,15 @@ #include #include #include +#include #include #include "glog.h" #include "glog_fileops.h" - +#include "glog_alloctable.h" static MALLOC_DEFINE(M_GLOG, "glog", "GEOM_LOG Data"); +static uma_zone_t g_log_alloctable_zone; -static uma_zone_t g_log_io_zone; -/*static uma_zone_t g_log_hl_zone;*/ - static void g_log_ctlreq(struct gctl_req *req, struct g_class *mp, const char *verb); static enum gctl_verb g_log_verb_id(const char* verb); @@ -73,6 +72,8 @@ static struct g_log_event* g_log_get_event(struct g_log_event_sink *es); static void g_log_write(struct bio *bp); static void g_log_read(struct bio *bp); +static void g_log_rollback(struct g_log_softc *sc); +static void g_log_commit(struct g_log_softc *sc); static void g_log_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp); static void g_log_ctl_destroy(struct gctl_req *req, struct g_class *mp); @@ -82,7 +83,7 @@ SYSCTL_DECL(_kern_geom); SYSCTL_NODE(_kern_geom, OID_AUTO, log, CTLFLAG_RW, 0, "GEOM_LOG information"); -static u_int g_log_debug = 10; /* XXX: lower when released to public */ +u_int g_log_debug; TUNABLE_INT("kern.geom.log.debug", &g_log_debug); SYSCTL_UINT(_kern_geom_log, OID_AUTO, debug, CTLFLAG_RW, &g_log_debug, 0, "Debug level"); @@ -96,12 +97,7 @@ TUNABLE_INT("kern.geom.log.maxmem", &g_log_maxmem); SYSCTL_UINT(_kern_geom_log, OID_AUTO, maxmem, CTLFLAG_RD, &g_log_maxmem, 0, "Maximum memory that can be allocated for I/O (in bytes)"); -/* -extern u_int _hl_stat_hinted_lookups; -SYSCTL_UINT(_kern_geom_log, OID_AUTO, hl_hinted_lookups, - CTLFLAG_RD, &_hl_stat_hinted_lookups, 0, - "Number of hint cache hits for hinted interval list"); -*/ + static u_int g_log_alloc_failed = 0; SYSCTL_UINT(_kern_geom_log, OID_AUTO, alloc_failed, CTLFLAG_RD, &g_log_alloc_failed, 0, "How many times I/O allocation failed"); @@ -118,25 +114,23 @@ /* gctl verb IDs */ enum gctl_verb { GCTL_INVALID, GCTL_COMMIT, GCTL_ROLLBACK, GCTL_START, - GCTL_STOP}; + GCTL_STOP, GCTL_DUMP}; static void g_log_init(struct g_class *mp __unused) { - g_log_io_zone = uma_zcreate("glog.io", MAXPHYS, NULL, NULL, NULL, NULL, - 0, UMA_ALIGN_CACHE); + g_log_debug = 10; + g_log_alloctable_zone = uma_zcreate("glog.alloctable", MAXPHYS, NULL, + NULL, NULL, NULL, 0, UMA_ALIGN_CACHE); g_log_maxmem -= g_log_maxmem % MAXPHYS; - uma_zone_set_max(g_log_io_zone, g_log_maxmem / MAXPHYS); - /* g_log_hl_zone = uma_zcreate("glog.hl", sizeof(struct hl_entry), NULL, NULL, - NULL, NULL, UMA_ALIGN_PTR, 0);*/ + uma_zone_set_max(g_log_alloctable_zone, g_log_maxmem / MAXPHYS); G_LOG_DEBUG(DBG_NOTICE, "%s", __func__); } static void g_log_fini(struct g_class *mp __unused) { - uma_zdestroy(g_log_io_zone); - /*uma_zdestroy(g_log_hl_zone);*/ + uma_zdestroy(g_log_alloctable_zone); G_LOG_DEBUG(DBG_NOTICE, "%s", __func__); } @@ -155,16 +149,18 @@ } static struct g_geom * -g_log_create_geom(const char *prov, const char *file, struct g_class *mp, int *err) +g_log_create_geom(const char *prov, const char *file, struct g_class *mp, + int *err) { struct g_geom *gp; struct g_provider *pp_log, *pp_disk; - struct g_consumer *cp_disk; + struct g_consumer *cp_disk; struct g_log_softc *sc; - + struct g_log_header head; + int max_elements; /*initialize softc*/ sc = malloc(sizeof(*sc), M_GLOG, M_WAITOK | M_ZERO); - + /*create geom for log*/ gp = g_new_geomf(mp, "%s.log", prov); @@ -173,38 +169,98 @@ gp->orphan = g_log_orphan; gp->access = g_log_access; gp->dumpconf = g_log_dumpconf; - if (gp == NULL) + if (gp == NULL) { *err=3; + return (NULL); + } /* get provider and consumer for disk*/ + G_LOG_DEBUG(0, "Getting provider and consumer for disk"); if (strncmp(prov, "/dev/", strlen("/dev/")) == 0) prov += strlen("/dev/"); pp_disk = g_provider_by_name(prov); - if (pp_disk == NULL) + if (pp_disk == NULL){ *err = 1; + return (NULL); + } cp_disk = g_new_consumer(gp); - if (g_attach(cp_disk, pp_disk) != 0) + if (g_attach(cp_disk, pp_disk) != 0) { *err = 2; + return (NULL); + } + g_error_provider(pp_disk, 0); sc->sc_prov_disk = pp_disk; sc->sc_cons_disk = cp_disk; - /*create provider and consumer for log*/ + /*create provider for log*/ + G_LOG_DEBUG(0, "Creating provider for log"); pp_log = g_new_providerf(gp, "%s.log", prov); pp_log->mediasize = pp_disk->mediasize; pp_log->sectorsize = pp_disk->sectorsize; g_error_provider(pp_log, 0); + sc->sc_prov_log = pp_log; - sc->sc_prov_log = pp_log; - if (g_log_event_sink_init(sc, &sc->sc_events, g_log_worker, "events") !=0){ - *err=4; - g_log_event_sink_destroy(&sc->sc_events); + /*initialize alloc table*/ + G_LOG_DEBUG(0, "Initializing allocation table"); + sc->sc_alloctable = malloc(sizeof(*sc->sc_alloctable), M_GLOG, + M_WAITOK | M_ZERO); + g_log_alloctable_init(sc, M_GLOG); + + /*initialize request sublist*/ + G_LOG_DEBUG(0, "Initializing request sublist"); + max_elements = (int)(MAXPHYS / sc->sc_prov_log->sectorsize); + sc->sc_req_sublist = malloc (max_elements * sizeof( + struct g_log_data), M_GLOG, M_WAITOK | M_ZERO); + sc->sc_req_sublist_size = 0; + + /*open file*/ + G_LOG_DEBUG(0, "Opening log file"); + sc->sc_vn = g_log_open_file(file, FWRITE | FREAD | O_CREAT | O_TRUNC, + S_IRUSR | S_IWUSR); + /*see if the file can be used as a log file (has to be either empty or + *have geom log header), add header if the file's empty, exit with an + *error if file is neither empty nor has header + */ + G_LOG_DEBUG(0, "Checking log file"); + if (g_log_get_size(sc->sc_vn) > 0) { + G_LOG_DEBUG(0, "Reading header"); + g_log_read_data(sc->sc_vn, &head, sizeof(head), 0); + if (strcmp(head.text,"GEOM_LOG")!=0) { + *err = 1; + return (NULL); + } + /*warn if the log file was made with different version of glog*/ + if (head.version != G_LOG_VERSION) + G_LOG_DEBUG(0, "Header version: %d\nCurrent version: %d" + , head.version, G_LOG_VERSION); + /*restore alloc table from file*/ + G_LOG_DEBUG(0, "Restoring alloctable from file"); + sc->sc_curr_offset = sizeof(head); + g_log_alloctable_restore(sc, M_GLOG); + } + else { + G_LOG_DEBUG(0, "Writing header"); + G_LOG_DEBUG(0, "Log file empty, writing header."); + g_log_write_header(sc->sc_vn); + sc->sc_curr_offset = sizeof(head); + } + + if (sc->sc_vn == NULL) { + *err = 5; + return (NULL); } - /*open file*/ - sc->sc_vn = glog_open_file(file, FWRITE | O_TRUNC | O_CREAT); + sc->sc_file_name = strdup(file, M_GLOG); + sc->sc_geom_log = gp; gp->softc = sc; G_LOG_DEBUG(0, "Created geom %s", gp->name); - + /*initialize worker thread*/ + if (g_log_event_sink_init(sc, &sc->sc_events, g_log_worker, "events") + != 0){ + *err=4; + g_log_event_sink_destroy(&sc->sc_events); + return (NULL); + } return gp; } @@ -217,8 +273,8 @@ es->sc = sc; mtx_init(&es->eventq_mtx, "glog:event_sink", NULL, MTX_DEF); TAILQ_INIT(&es->eventq); - if ((err = kthread_create(func, es, &es->worker_thread, 0, 0, "g_log %s", - name)) != 0) + if ((err = kthread_create(func, es, &es->worker_thread, 0, 0, "g_log %s" + , name)) != 0) return err; es->flags = 0; @@ -229,22 +285,73 @@ static void g_log_event_sink_destroy(struct g_log_event_sink *es) { - g_log_post_event(es, GLOG_EVSTOP, GLOG_FLAG_WAKEUP_SC, NULL, 0); - while (es->worker_thread != NULL) /* wait for the worker thread to die */ - tsleep(&es->worker_thread, PRIBIO, "wrkoff", hz/5); - mtx_destroy(&es->eventq_mtx); - bzero(es, sizeof(*es)); + g_log_post_event(es, GLOG_EVSTOP, GLOG_FLAG_WAKEUP_SC, NULL, 0); + + /* wait for the worker thread to die */ + while (es->worker_thread != NULL) + tsleep(&es->worker_thread, PRIBIO, "wrkoff", hz/5); + + mtx_destroy(&es->eventq_mtx); + bzero(es, sizeof(*es)); +} + +/* Find the geom we handle */ +static struct g_log_softc * +g_log_find(struct g_class *mp, const char *name) +{ + struct g_geom *gp; + + LIST_FOREACH(gp, &mp->geom, geom) { + if (strcmp(gp->name, name) == 0) + return (gp->softc); + } + return (NULL); +} + + +static char * +g_log_dump_alloctable(struct g_log_softc *sc, int icp) +{ + struct g_log_alloc_element *ae; + struct g_log_alloc_table_element *te; + + KASSERT ( sc != NULL, ("sc is null in %s", __func__)); + if ((icp < 0) || (icp > sc->sc_alloctable->tablesize)) + return "Offset out of range."; + + G_LOG_DEBUG(0, "Dumping compartment #%d", icp); + te = &sc->sc_alloctable->table[icp]; + SLIST_FOREACH(ae, &te->allocq, linkage) { + if (ae->offset_log != -1) + G_LOG_DEBUG(0, " %p: LOG: offset_disk=%d\t" + "offset_log=%d\tdata_size=%d", + ae, + (int)ae->offset_disk, + (int)ae->offset_log, + (int)ae->data_size); + else + G_LOG_DEBUG(0, " %p: DISK: offset_disk=%d\t" + "data_size=%d", + ae, + (int)ae->offset_disk, + (int)ae->data_size); + } + return NULL; } + /*process ctl requests*/ static void g_log_ctlreq(struct gctl_req *req, struct g_class *mp, const char *verb) { struct g_geom *gp=NULL; + struct g_log_softc *sc; const char *prov, *file; + long long *icp; int *num_arg; int err = 0; char *err_text=NULL; + /*char confirm;*/ g_topology_assert(); num_arg = gctl_get_paraml(req, "nargs", sizeof(*num_arg)); @@ -253,37 +360,70 @@ if (*num_arg == 2) { prov = gctl_get_asciiparam(req, "arg0"); file = gctl_get_asciiparam(req, "arg1"); + G_LOG_DEBUG(0, "Start"); gp = g_log_create_geom(prov, file, mp, &err); - + sc = gp->softc; + KASSERT(sc != NULL, ("%s: sc is null", __func__)); if (err != 0){ switch (err){ case 1: - err_text="Cannot open provider"; + err_text = "Can not open provider"; break; case 2: - err_text="Cannot attach consumer to provider"; + err_text = "Can not attach consumer to " + "provider"; break; case 3: - err_text="Can not create geom"; + err_text = "Can not create geom"; break; case 4: - err_text="Can not start worker thread"; + err_text = "Can not start worker " + "thread"; + break; + case 5: + err_text = "Can not open log file."; break; } - gctl_error(req, "Error starting geom log: %s", err_text); + gctl_error(req, "Error starting geom log: %s", + err_text); } } else gctl_error(req, "Wrong number of parameters."); break; case GCTL_COMMIT: if (*num_arg == 1) { + /*printf("Are you sure (y/n)?"); + scanf("%c", &confirm); + if (confirm != 'y') + break;*/ prov = gctl_get_asciiparam(req, "arg0"); + sc = g_log_find(mp, prov); + if (sc == NULL) { + G_LOG_DEBUG(0, "Geom not found."); + break; + } + g_log_post_event(&sc->sc_events, GLOG_EVCOMMIT, + GLOG_FLAG_WAKEUP_SC, sc, 0); - } else gctl_error(req, "Wrong number of parameters."); break; case GCTL_ROLLBACK: + if (*num_arg ==1){ + /*printf("Are you sure (y/n)?"); + scanf("%c", &confirm); + if (confirm != 'y') + break;*/ + prov = gctl_get_asciiparam(req, "arg0"); + sc = g_log_find(mp, prov); + if (sc == NULL) { + G_LOG_DEBUG(0, "Geom not found."); + break; + } + g_log_post_event(&sc->sc_events, GLOG_EVROLLBACK, + GLOG_FLAG_WAKEUP_SC, sc, 0); + } else + gctl_error(req, "Wrong number of parameters."); break; case GCTL_STOP: if (*num_arg == 1) { @@ -291,10 +431,25 @@ } else gctl_error(req, "Wrong number of parameters."); break; + case GCTL_DUMP: + prov = gctl_get_asciiparam(req, "arg0"); + icp = gctl_get_paraml(req, "nidx", sizeof(*icp)); + if (icp == NULL) { + gctl_error(req, "Missing argument: nidx"); + return; + } + sc = g_log_find(mp, prov); + if (sc == NULL) { + G_LOG_DEBUG(0, "Geom %s not found", prov); + gctl_error(req, "Geom %s not found", prov); + break; + } + g_log_dump_alloctable(sc, *icp); + break; default: - panic("Unknown verb!"); + gctl_error(req, "Unknown verb."); + break; } - G_LOG_DEBUG(0, "ctlreq done"); } /*start geom*/ @@ -302,23 +457,22 @@ g_log_start(struct bio *bp) { struct g_log_softc *sc; - G_LOG_DEBUG(0, "request received."); sc = bp->bio_to->geom->softc; KASSERT(sc != NULL, ("Provider's error should be set (error=%d)(device=%s).", bp->bio_to->error, bp->bio_to->name)); - G_LOG_LOGREQ(DBG_NOTICE, bp, "Request received."); switch(bp->bio_cmd) { case BIO_WRITE: G_LOG_DEBUG(0, "Write request received."); - g_log_post_event(&sc->sc_events, GLOG_EVWRITE, GLOG_FLAG_WAKEUP_SC, bp, 0); + g_log_post_event(&sc->sc_events, GLOG_EVWRITE, + GLOG_FLAG_WAKEUP_SC, bp, 0); break; case BIO_READ: - g_io_deliver(bp, ENXIO); - return; - g_log_post_event(&sc->sc_events, GLOG_EVREAD, GLOG_FLAG_WAKEUP_SC, bp, 0); + G_LOG_DEBUG(0, "Read request received."); + g_log_post_event(&sc->sc_events, GLOG_EVREAD, + GLOG_FLAG_WAKEUP_SC, bp, 0); break; default: g_io_deliver(bp, ENXIO); @@ -334,9 +488,10 @@ struct g_log_softc *sc; struct g_provider *pp_disk, *pp_log; struct g_consumer *cp_disk; + sc=gp->softc; - g_topology_assert(); + g_topology_assert(); if (sc==NULL) return (ENXIO); @@ -345,9 +500,11 @@ pp_disk = sc->sc_prov_disk; cp_disk = sc->sc_cons_disk; - if (pp_log != NULL && (pp_log->acr != 0 || pp_log->acw !=0 || pp_log->ace != 0)){ + if (pp_log != NULL && (pp_log->acr != 0 || pp_log->acw !=0 || + pp_log->ace != 0)){ if (force) - G_LOG_DEBUG(0, "Device %s is still open.", pp_log->name); + G_LOG_DEBUG(0, "Device %s is still open.", + pp_log->name); else { G_LOG_DEBUG(1, "Device %s is still open(r%d, w%d, e%d)", pp_log->name,pp_log->acr,pp_log->acw,pp_log->ace); @@ -355,14 +512,15 @@ } } /*close log file*/ - G_LOG_DEBUG(0, "Closing log file."); - glog_close_file(sc->sc_vn, FWRITE); + g_log_close_file(sc->sc_vn, FWRITE | FREAD); /*destory worker thread*/ g_log_event_sink_destroy(&sc->sc_events); + /*free allocation table*/ + g_log_alloctable_free(sc->sc_alloctable, M_GLOG); + /*clean up memory*/ - G_LOG_DEBUG(0,"cleaning up mem."); g_orphan_provider(pp_log, ENXIO); if (cp_disk->acr > 0 ||cp_disk->acw > 0 ||cp_disk->ace > 0) g_access(cp_disk, -cp_disk->acr, -cp_disk->acw, -cp_disk->ace); @@ -370,10 +528,13 @@ g_detach(cp_disk); g_destroy_consumer(cp_disk); gp->softc = NULL; + free (sc->sc_alloctable, M_GLOG); + free (sc->sc_req_sublist, M_GLOG); free(sc, M_GLOG); - + /*destroy geom*/ - if (pp_log == NULL || (pp_log->acr == 0 && pp_log->acw == 0 && pp_log->ace == 0)) + if (pp_log == NULL || (pp_log->acr == 0 && pp_log->acw == 0 && + pp_log->ace == 0)) G_LOG_DEBUG(0, "Device %s destroyed.", gp->name); g_wither_geom(gp, ENXIO); @@ -392,7 +553,7 @@ gp = pp->geom; sc = gp->softc; cp = sc->sc_cons_disk; - G_LOG_DEBUG(DBG_IMPORTANT, "%s: %d %d %d", __func__, dr, dw, de); + G_LOG_DEBUG(DBG_IMPORTANT, "Access: %d %d %d", dr, dw, de); if (sc == NULL) { /* @@ -403,36 +564,35 @@ ("Positive access request (device=%s).", pp->name)); if ((pp->acr + dr) == 0 && (pp->acw + dw) == 0 && (pp->ace + de) == 0) { - G_LOG_DEBUG(0, "Device %s definitely destroyed.", gp->name); + G_LOG_DEBUG(0, "Device %s definitely destroyed.", + gp->name); } return (0); } err = g_access(cp, dr ,dw, de); - - G_LOG_DEBUG(0, "access done, %d", err); + return err; } /* Empty the worker queue */ static void g_log_empty_event_queue(struct g_log_event_sink *es) { - struct g_log_softc *sc; - struct g_log_event *ev; + struct g_log_softc *sc; + struct g_log_event *ev; - KASSERT(es != NULL, ("%s: event_sink is null", __func__)); - sc = es->sc; - KASSERT(sc != NULL, ("%s: softc is null", __func__)); + KASSERT(es != NULL, ("%s: event_sink is null", __func__)); + sc = es->sc; + KASSERT(sc != NULL, ("%s: softc is null", __func__)); - mtx_lock(&es->eventq_mtx); - while (!TAILQ_EMPTY(&es->eventq)) { - ev = TAILQ_FIRST(&es->eventq); - TAILQ_REMOVE(&es->eventq, ev, linkage); - free(ev, M_GLOG); - } - mtx_unlock(&es->eventq_mtx); - + mtx_lock(&es->eventq_mtx); + while (!TAILQ_EMPTY(&es->eventq)) { + ev = TAILQ_FIRST(&es->eventq); + TAILQ_REMOVE(&es->eventq, ev, linkage); + free(ev, M_GLOG); + } + mtx_unlock(&es->eventq_mtx); } /*worker thread*/ @@ -454,22 +614,21 @@ ev = g_log_get_event(es); else goto sleep; - G_LOG_DEBUG(0, "event: %d", ev->type); bp = ev->data1; switch (ev->type) { case GLOG_EVCOMMIT: + g_log_commit(sc); break; case GLOG_EVROLLBACK: + g_log_rollback(sc); break; case GLOG_EVREAD: g_log_read(bp); break; case GLOG_EVWRITE: - G_LOG_DEBUG(0, "About to write data"); g_log_write(bp); break; case GLOG_EVSTOP: - G_LOG_DEBUG(DBG_DEBUG, "Worker thread exiting"); g_log_empty_event_queue(es); es->worker_thread = NULL; kthread_exit(0); @@ -485,7 +644,7 @@ /* adds event to event queue */ static int g_log_post_event(struct g_log_event_sink *es, u_int type, u_int flags, - void* data1, int data2) + void* data1, int data2) { struct g_log_softc *sc; struct g_log_event *ev; @@ -506,7 +665,6 @@ mtx_lock(&es->eventq_mtx); TAILQ_INSERT_TAIL(&es->eventq, ev, linkage); mtx_unlock(&es->eventq_mtx); - G_LOG_DEBUG (0, "posted event %d", ev->type); if ( (flags & GLOG_FLAG_WAKEUP_SC) != 0) wakeup(es); return 0; @@ -537,37 +695,153 @@ g_log_write(struct bio *bp) { struct g_log_softc *sc; - void *data; + struct g_log_alloc_element ae; + struct g_log_data *gd; int err; - G_LOG_DEBUG(0, "starting to write"); + sc = bp->bio_to->geom->softc; - data = bp->bio_data; - err = glog_write_file(sc->sc_vn, data, bp->bio_length, 0); + + KASSERT(sc != NULL, ("%s: softc is null", __func__)); + + /*create a g_log_data structure from bio*/ + gd = malloc(sizeof(*gd), M_GLOG, M_WAITOK | M_ZERO); + gd->offset_disk = bp->bio_offset; + gd->offset_log = sc->sc_curr_offset+sizeof(*gd); + gd->data_size = bp->bio_length; + + /*add to allocation list*/ + ae.offset_disk = bp->bio_offset; + ae.offset_log = sc->sc_curr_offset+sizeof(*gd); + ae.data_size = bp->bio_length; + g_log_alloctable_add(&ae, sc->sc_alloctable, M_GLOG); + + /*write g_log_data to file so we can later reconstruct an alloc table + from it*/ + err = g_log_write_file(sc->sc_vn, gd, sizeof(*gd), sc->sc_curr_offset); + if (err != 0) + G_LOG_DEBUG(0, "Write error: g_log_data"); + sc->sc_curr_offset += sizeof(*gd); + /*write actual data to file*/ + err = g_log_write_file(sc->sc_vn, bp->bio_data, bp->bio_length, + sc->sc_curr_offset); if (err != 0) - G_LOG_DEBUG(0, "write error"); - G_LOG_DEBUG(0, "done writing."); + G_LOG_DEBUG(0, "Write error: data"); + sc->sc_curr_offset += bp->bio_length; + free(gd, M_GLOG); + bp->bio_completed = bp->bio_length; + g_io_deliver(bp,0); } /*reads data from log file and/or disk*/ static void g_log_read(struct bio *bp) { - G_LOG_DEBUG(0,"Got a read request."); + struct g_log_softc *sc; + struct g_log_data *gd; + int err, i, max_elements, offset_buf; + + sc = bp->bio_to->geom->softc; + KASSERT(sc != NULL, ("%s: softc is null", __func__)); + + /*clean up request sublist*/ + free(sc->sc_req_sublist, M_GLOG); + max_elements = (int)(MAXPHYS / sc->sc_prov_log->sectorsize); + sc->sc_req_sublist = malloc (max_elements * sizeof( + struct g_log_data), M_GLOG, M_WAITOK | M_ZERO); + sc->sc_req_sublist_size = 0; + + /*reset buffer offset*/ + offset_buf = 0; + + G_LOG_DEBUG(0, "Requested %jd, %jd", bp->bio_offset, bp->bio_length); + + /*retrieve request sublist*/ + err = g_log_alloctable_get(sc, bp->bio_offset, (ssize_t)bp->bio_length); + /*read requested data*/ + for (i = 0; i < sc->sc_req_sublist_size; i++) { + gd = &sc->sc_req_sublist[i]; + /*in case of first or last element, check if only a part of + element was requested*/ + if ((i == 0) && (gd->offset_disk < bp->bio_offset)) { + if (gd->offset_log != -1) + gd->offset_log += bp->bio_offset - + gd->offset_log; + gd->data_size = gd->offset_log + gd->data_size - + bp->bio_offset; + gd->offset_disk = bp->bio_offset; + } + if ((i == sc->sc_req_sublist_size -1) && (gd->offset_disk + + gd->data_size > bp->bio_length + bp->bio_offset)){ + gd->data_size = bp->bio_offset + bp->bio_length - + gd->offset_disk; + } + g_log_read_element(sc, gd, (char *) bp->bio_data, &offset_buf, + M_GLOG); + + } + /*dumping bio_data*/ + G_LOG_DEBUG(0, "Dumping bio data"); + for (i = 0; i < bp->bio_length; i++) + printf("%c", (char)(bp->bio_data[i])); + bp->bio_completed = bp->bio_length; + g_io_deliver(bp, 0); + printf("\nDone."); } /*commits the log file*/ -/*static void +static void g_log_commit(struct g_log_softc *sc) { -}*/ + struct g_log_alloc_table_element *te; + struct g_log_alloc_element *ae; + char *data; + int i, err; + + KASSERT(sc != NULL, ("%s: sc is null!", __func__)); + G_LOG_DEBUG(0, "Starting commit..."); + g_topology_assert(); + err = g_access(sc->sc_cons_disk, 0, 1, 0); + g_topology_unlock(); + if (err != 0) { + G_LOG_DEBUG(0, "Error accessing provider %s", sc->sc_cons_disk->provider->name); + return; + } + /*write contents of all compartments to disk*/ + for (i = 0; i < sc->sc_alloctable->tablesize; i++) { + te = &sc->sc_alloctable->table[i]; + SLIST_FOREACH(ae, &te->allocq, linkage) { + if (ae->offset_log != -1) { + data = malloc(ae->data_size * sizeof(char), M_GLOG, M_WAITOK | M_ZERO); + G_LOG_DEBUG(0, "Committing %jd, %jd, %d", ae->offset_disk, ae->offset_log, ae->data_size); + /*get data from log file*/ + g_log_read_data(sc->sc_vn, (void*)data, ae->data_size, ae->offset_log); + + /*write it to disk*/ + err = g_write_data(sc->sc_cons_disk, ae->offset_disk, data, ae->data_size); + g_topology_lock(); + err = g_access(sc->sc_cons_disk, 0, -1, 0); + G_LOG_DEBUG(0, "Write error %d", err); + free(data, M_GLOG); + } + } + } +} -/*deletes the log file*/ -/*static void +/*drop the changes*/ +static void g_log_rollback(struct g_log_softc *sc) { + /*reset log file*/ + sc->sc_vn = g_log_empty_file(sc->sc_vn, sc->sc_file_name); + g_log_write_header(sc->sc_vn); + sc->sc_curr_offset = sizeof(struct g_log_header); + + /*reset alloc table*/ + g_log_alloctable_free(sc->sc_alloctable, M_GLOG); + g_log_alloctable_init(sc, M_GLOG); } -*/ + static int g_log_destroy_geom(struct gctl_req *req __unused, struct g_class *mp __unused, @@ -577,20 +851,6 @@ return 0; } -/* Find the geom we handle */ -static struct g_log_softc * -g_log_find(struct g_class *mp, const char *name) -{ - struct g_geom *gp; - - G_LOG_DEBUG(DBG_DEBUG, "%s: %s", __func__, name); - LIST_FOREACH(gp, &mp->geom, geom) { - if (strcmp(gp->name, name) == 0) - return (gp->softc); - } - return (NULL); -} - static void g_log_ctl_destroy(struct gctl_req *req, struct g_class *mp) { @@ -609,7 +869,7 @@ force = gctl_get_paraml(req, "force", sizeof(int)); sc = g_log_find(mp, prov); - KASSERT (sc != NULL, ("Softc is null in %s!", __func__)); + KASSERT(sc != NULL, ("%s: softc is null", __func__)); g_log_stop(sc->sc_geom_log, *force); } @@ -636,10 +896,8 @@ sbuf_printf(sb, "UP"); else sbuf_printf(sb, "DOWN"); - G_LOG_DEBUG(0, "error=%d", sc->sc_prov_log->error); sbuf_printf(sb, "\n"); } - } /* Convert verb to number */ @@ -654,9 +912,9 @@ return GCTL_START; else if (strcmp(verb, "stop") == 0) return GCTL_STOP; + else if (strcmp(verb, "dump") == 0) + return GCTL_DUMP; else return GCTL_INVALID; }; - DECLARE_GEOM_CLASS(g_log_class, g_log); - ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog.h#3 (text+ko) ==== @@ -2,6 +2,7 @@ #define G_LOG_CLASS_NAME "LOG" #ifdef _KERNEL + #define G_LOG_BFLAG_FIRST 0x1 #define G_LOG_DEBUG(lvl, ...) do { \ @@ -32,7 +33,6 @@ #define DBG_IMPORTANT 7 #define DBG_DEBUG 10 #define DBG_NOTICE 15 -#endif struct g_log_event { unsigned short int type; @@ -58,11 +58,33 @@ }; struct g_log_softc { - struct g_geom *sc_geom_log; + struct g_geom *sc_geom_log; struct g_provider *sc_prov_log; struct g_provider *sc_prov_disk; struct g_consumer *sc_cons_disk; - char *sc_file_name; struct vnode *sc_vn; struct g_log_event_sink sc_events; + struct g_log_alloc_table *sc_alloctable; + struct g_log_data *sc_req_sublist; + size_t sc_req_sublist_size; + off_t sc_curr_offset; + char *sc_file_name; +}; + +/*this is the structure that's written to the log file*/ +struct g_log_data { + off_t offset_disk; + off_t offset_log; + size_t data_size; +}; + +#endif /* _KERNEL */ + +/*a header that's written at the start of log file, so that geom log can + * recognize the file later*/ +struct g_log_header { + char text[9]; + int version; }; + + ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_fileops.c#3 (text+ko) ==== @@ -33,17 +33,25 @@ #include #include #include +#include +#include #include #include #include #include #include #include +#include + +#include "glog.h" +#include "glog_alloctable.h" #include "glog_fileops.h" +extern u_int g_log_debug; + struct vnode * -glog_open_file(const char *file, int uiflags) +g_log_open_file(const char *file, int uiflags, int cmode) { struct thread *td = curthread; struct nameidata nd; @@ -55,27 +63,40 @@ td->td_proc->p_fd->fd_cdir = rootvnode; NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, file, td); - err = vn_open_cred(&nd, &uiflags, 0, td->td_ucred, -1); + KASSERT (file != NULL, ("No filename specified")); + err = vn_open_cred(&nd, &uiflags, cmode, td->td_ucred, -1); NDFREE(&nd, NDF_ONLY_PNBUF); if (err != 0) return (NULL); VOP_UNLOCK(nd.ni_vp, 0, td); + + if (err == 1) + return (NULL); return (nd.ni_vp); } - +void +g_log_write_header(struct vnode *vp) +{ + struct g_log_header head; + + strcpy(head.text, "GEOM_LOG"); + head.version = G_LOG_VERSION; + G_LOG_DEBUG(0, "Writing %s %d", head.text, head.version); + g_log_write_file(vp, &head, sizeof(head),0); +} int -glog_close_file(struct vnode *vp, int uiflags) +g_log_close_file(struct vnode *vp, int uiflags) { /*closes a file*/ int err; err = vn_close(vp, uiflags, curthread->td_ucred, curthread); - return err; + return (err); } int -glog_write_file(struct vnode *vp, void *buf, size_t size, off_t off) +g_log_write_file(struct vnode *vp, void *buf, size_t size, off_t off) { struct thread *td = curthread; struct mount *mp; @@ -103,11 +124,11 @@ err = VOP_WRITE(vp, &auio, IO_UNIT | IO_SYNC, td->td_ucred); VOP_UNLOCK(vp, 0, td); vn_finished_write(mp); - return err; + return (err); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 13 19:46:31 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 761AD16A46E; Mon, 13 Aug 2007 19:46: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 51FEA16A46C for ; Mon, 13 Aug 2007 19:46:31 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3BA9313C4A3 for ; Mon, 13 Aug 2007 19:46:31 +0000 (UTC) (envelope-from lulf@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 l7DJkVEa094040 for ; Mon, 13 Aug 2007 19:46:31 GMT (envelope-from lulf@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7DJkUBM094036 for perforce@freebsd.org; Mon, 13 Aug 2007 19:46:30 GMT (envelope-from lulf@FreeBSD.org) Date: Mon, 13 Aug 2007 19:46:30 GMT Message-Id: <200708131946.l7DJkUBM094036@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to lulf@FreeBSD.org using -f From: Ulf Lilleengen To: Perforce Change Reviews Cc: Subject: PERFORCE change 125117 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, 13 Aug 2007 19:46:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=125117 Change 125117 by lulf@lulf_carrot on 2007/08/13 19:45:30 - Improve gv_is_newer hack by adding the drive to check as parameter. There was a case where gvinum didn't have the actual drive first in the list, which ended in comparing the wrong timestamps. - Re-add the growable state of a plex. - Fix a bug where GV_SD_CANGOUP was set instead of checked. - Make raid5 growing depend on that a raid-5 plex is not degraded. I've added some awareness to the fact that a subdisk could be added to degraded raid-5 plex, but I don't allow it for now, since it also requires a rewrite of how degraded writes and reads are done. However, the idea is that all of gvinum should be aware that they can be in a growing phase. - Make sure plex doesn't get the grown size before after the grow. This prevents writes outside the actual plex-size. - Use gv_start_plex in gv_start_vol since it basically does the same. Affected files ... .. //depot/projects/soc2007/lulf/gvinum_fixup/sbin/gvinum/gvinum.c#20 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum.c#35 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum.h#28 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_create.c#10 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_events.c#14 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_init.c#24 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_list.c#5 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_plex.c#26 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_raid5.c#14 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_share.c#6 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_state.c#23 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_subr.c#29 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_var.h#25 edit Differences ... ==== //depot/projects/soc2007/lulf/gvinum_fixup/sbin/gvinum/gvinum.c#20 (text+ko) ==== ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum.c#35 (text+ko) ==== ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum.h#28 (text+ko) ==== @@ -93,9 +93,10 @@ int gv_consumer_is_open(struct g_consumer *); int gv_provider_is_open(struct g_provider *); int gv_object_type(struct gv_softc *, char *); -void gv_parse_config(struct gv_softc *, char *); +void gv_parse_config(struct gv_softc *, char *, struct gv_drive *); int gv_sd_to_drive(struct gv_sd *, struct gv_drive *); int gv_sd_to_plex(struct gv_sd *, struct gv_plex *); +int gv_sdcount(struct gv_plex *, int); void gv_update_plex_config(struct gv_plex *); void gv_update_vol_size(struct gv_volume *, off_t); off_t gv_vol_size(struct gv_volume *); ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_create.c#10 (text+ko) ==== @@ -253,6 +253,13 @@ return (GV_ERR_CREATE); } + if (p->org == GV_PLEX_RAID5 && p->state == GV_PLEX_DEGRADED) { + printf("VINUM: can't add subdisk to %s, rebuild plex before " + " adding subdisks\n", p->name); + g_free(s); + return (0); + } + /* * First we give the subdisk to the drive, to handle autosized * values ... ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_events.c#14 (text+ko) ==== @@ -126,7 +126,7 @@ g_free(hdr); goto failed; } - gv_parse_config(sc, buf); + gv_parse_config(sc, buf, d); g_free(buf); g_topology_lock(); @@ -213,4 +213,5 @@ LIST_INSERT_HEAD(&sc->drives, d, drive); else LIST_INSERT_AFTER(d2, d, drive); + gv_save_config(sc); } ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_init.c#24 (text+ko) ==== @@ -104,14 +104,14 @@ KASSERT(p != NULL, ("gv_start_plex: NULL p")); - if (p->state == GV_PLEX_UP) - return (0); +/* if (p->state == GV_PLEX_UP) + return (0);*/ error = 0; v = p->vol_sc; - if ((v != NULL) && (v->plexcount > 1)) - error = gv_sync(v); - else if (p->org == GV_PLEX_STRIPED) { +/* if ((v != NULL) && (v->plexcount > 1)) + error = gv_sync(v);*/ + if (p->org == GV_PLEX_STRIPED) { grow = 0; LIST_FOREACH(s, &p->subdisks, in_plex) { if (s->flags & GV_SD_GROW) { @@ -122,18 +122,15 @@ if (grow) error = gv_grow_plex(p); } else if (p->org == GV_PLEX_RAID5) { - if (p->state == GV_PLEX_DEGRADED) { - rebuild = 0; + if (p->state > GV_PLEX_DEGRADED) { LIST_FOREACH(s, &p->subdisks, in_plex) { - if (s->state < GV_SD_UP) { - rebuild = 1; - break; + if (s->flags & GV_SD_GROW) { + error = gv_grow_plex(p); + return (error); } } - if (rebuild) - error = gv_rebuild_plex(p); - else - error = gv_grow_plex(p); + } else if (p->state == GV_PLEX_DEGRADED) { + error = gv_rebuild_plex(p); } else error = gv_init_plex(p); } @@ -158,23 +155,7 @@ else if (v->plexcount == 1) { p = LIST_FIRST(&v->plexes); KASSERT(p != NULL, ("gv_start_vol: NULL p on %s", v->name)); - if (p->org == GV_PLEX_RAID5) { - switch (p->state) { - case GV_PLEX_DOWN: - error = gv_init_plex(p); - break; - case GV_PLEX_DEGRADED: - error = gv_rebuild_plex(p); - break; - default: - return (0); - } - } else { - LIST_FOREACH(s, &p->subdisks, in_plex) { - gv_set_sd_state(s, GV_SD_UP, - GV_SETSTATE_CONFIG); - } - } + error = gv_start_plex(p); } else error = gv_sync(v); @@ -239,6 +220,8 @@ static int gv_rebuild_plex(struct gv_plex *p) { + struct gv_drive *d; + struct gv_sd *s; /* XXX: Is this safe? (Allows for mounted rebuild)*/ /* if (gv_provider_is_open(p->vol_sc->provider)) @@ -248,6 +231,18 @@ p->flags & GV_PLEX_REBUILDING || p->flags & GV_PLEX_GROWING) return (EINPROGRESS); + /* + * Make sure that all subdisks have consumers. We won't allow a rebuild + * unless every subdisk have one. + */ + LIST_FOREACH(s, &p->subdisks, in_plex) { + d = s->drive_sc; + if (d == NULL || (d->flags & GV_DRIVE_REFERENCED)) { + printf("VINUM: can't rebuild %s, subdisk(s) have no " + "drives\n", p->name); + return (ENXIO); + } + } p->flags |= GV_PLEX_REBUILDING; p->synced = 0; ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_list.c#5 (text+ko) ==== @@ -300,7 +300,7 @@ (intmax_t)p->synced, (int)((p->synced * 100) / p->size)); } - printf("\t\tOrganization: %s", gv_plexorg(p->org)); + sbuf_printf(sb, "\t\tOrganization: %s", gv_plexorg(p->org)); if (gv_is_striped(p)) { sbuf_printf(sb, "\tStripe size: %s\n", gv_roughlength(p->stripesize, 1)); ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_plex.c#26 (text+ko) ==== @@ -161,15 +161,9 @@ KASSERT(stripeno >= 0, ("gv_plex_offset: stripeno < 0")); /* Take growing subdisks into account when calculating. */ - sdcount = p->sdcount; - if (boff >= p->synced) { - LIST_FOREACH(s, &p->subdisks, in_plex) { - if (s->flags & GV_SD_GROW) - sdcount--; - } - } else if (!(boff + bcount <= p->synced)){ + sdcount = gv_sdcount(p, (boff >= p->synced)); + if (!(boff + bcount <= p->synced)) return (GV_ERR_ISBUSY); - } /* The number of the subdisk where the stripe resides. */ *sdno = stripeno % sdcount; @@ -712,11 +706,7 @@ g_free(bp->bio_data); /* Find the real size of the plex. */ - sdcount = p->sdcount; - LIST_FOREACH(s, &p->subdisks, in_plex) { - if (s->flags & GV_SD_GROW) - sdcount--; - } + sdcount = gv_sdcount(p, 1); s = LIST_FIRST(&p->subdisks); /* XXX: should not ever happen */ if (s == NULL) { @@ -731,6 +721,7 @@ s->flags &= ~GV_SD_GROW; gv_set_sd_state(s, GV_SD_UP, 0); } + p->size = gv_plex_size(p); gv_set_plex_state(p, GV_PLEX_UP, 0); g_topology_lock(); gv_access(v->provider, -1, -1, 0); @@ -974,7 +965,7 @@ { struct gv_sd *s; int error, flags; - off_t offset; + off_t offset, plexsize; error = bp->bio_error; flags = bp->bio_cflags; @@ -1000,7 +991,7 @@ return; } - offset += (p->stripesize * (p->sdcount - 1)); + offset += (p->stripesize * (gv_sdcount(p, 1) - 1)); if (offset >= p->size) { /* We're finished. */ printf("VINUM: rebuild of %s finished\n", p->name); ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_raid5.c#14 (text+ko) ==== @@ -165,7 +165,7 @@ if (p == NULL || LIST_EMPTY(&p->subdisks)) return (ENXIO); - gv_raid5_offset(p, boff, bcount, &real_off, &real_len, NULL, &psdno, 0); + gv_raid5_offset(p, boff, bcount, &real_off, &real_len, NULL, &psdno, 1); /* Find the right subdisk. */ parity = NULL; @@ -239,7 +239,7 @@ if (p == NULL || LIST_EMPTY(&p->subdisks)) return (ENXIO); - gv_raid5_offset(p, boff, bcount, &real_off, &real_len, NULL, NULL, 0); + gv_raid5_offset(p, boff, bcount, &real_off, &real_len, NULL, NULL, 1); /* Find the right subdisk. */ broken = NULL; @@ -553,7 +553,7 @@ off_t len_left, stripeend, stripeoff, stripestart; sdcount = p->sdcount; - if (growing) { + if (growing) { LIST_FOREACH(s, &p->subdisks, in_plex) { if (s->flags & GV_SD_GROW) sdcount--; ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_share.c#6 (text+ko) ==== @@ -270,6 +270,8 @@ return (GV_PLEX_INITIALIZING); else if (!strcmp(buf, "degraded")) return (GV_PLEX_DEGRADED); + else if (!strcmp(buf, "growable")) + return (GV_PLEX_GROWABLE); else return (GV_PLEX_DOWN); } @@ -285,6 +287,8 @@ return "initializing"; case GV_PLEX_DEGRADED: return "degraded"; + case GV_PLEX_GROWABLE: + return "growable"; case GV_PLEX_UP: return "up"; default: ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_state.c#23 (text+ko) ==== @@ -220,7 +220,7 @@ if (p->org != GV_PLEX_RAID5) break; - else if (s->flags |= GV_SD_CANGOUP) { + else if (s->flags & GV_SD_CANGOUP) { s->flags &= ~GV_SD_CANGOUP; break; } else if (flags & GV_SETSTATE_FORCE) @@ -412,6 +412,7 @@ void gv_update_plex_state(struct gv_plex *p) { + struct gv_sd *s; int sdstates; int oldstate; @@ -425,6 +426,7 @@ /* If all subdisks are up, our plex can be up, too. */ if (sdstates == GV_SD_UPSTATE) p->state = GV_PLEX_UP; + /* One or more of our subdisks are down. */ else if (sdstates & GV_SD_DOWNSTATE) { /* A RAID5 plex can handle one dead subdisk. */ @@ -435,15 +437,24 @@ /* Some of our subdisks are initializing. */ } else if (sdstates & GV_SD_INITSTATE) { + if (p->flags & GV_PLEX_SYNCING || - p->flags & GV_PLEX_REBUILDING || - p->flags & GV_PLEX_GROWING) + p->flags & GV_PLEX_REBUILDING) p->state = GV_PLEX_DEGRADED; else p->state = GV_PLEX_DOWN; } else p->state = GV_PLEX_DOWN; + if (p->state == GV_PLEX_UP) { + LIST_FOREACH(s, &p->subdisks, in_plex) { + if (s->flags & GV_SD_GROW) { + p->state = GV_PLEX_GROWABLE; + break; + } + } + } + if (p->state != oldstate) printf("VINUM: plex %s state change: %s -> %s\n", p->name, gv_plexstate(oldstate), gv_plexstate(p->state)); ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_subr.c#29 (text+ko) ==== @@ -51,11 +51,11 @@ #include #include -int gv_drive_is_newer(struct gv_softc *); +int gv_drive_is_newer(struct gv_softc *, struct gv_drive *); static off_t gv_plex_smallest_sd(struct gv_plex *); void -gv_parse_config(struct gv_softc *sc, char *buf) +gv_parse_config(struct gv_softc *sc, char *buf, struct gv_drive *d) { char *aptr, *bptr, *cptr; struct gv_volume *v, *v2; @@ -64,7 +64,7 @@ int error, is_newer, tokens; char *token[GV_MAXARGS]; - is_newer = gv_drive_is_newer(sc); + is_newer = gv_drive_is_newer(sc, d); /* Until the end of the string *buf. */ for (aptr = buf; *aptr != '\0'; aptr = bptr) { @@ -377,9 +377,9 @@ } else { if ((p->org == GV_PLEX_RAID5 || p->org == GV_PLEX_STRIPED) && - !(p->flags & GV_PLEX_NEWBORN)) { + !(p->flags & GV_PLEX_NEWBORN) && + p->state >= GV_PLEX_DEGRADED) { s->flags |= GV_SD_GROW; - s->state = GV_SD_UP; } p->sdcount++; } @@ -397,12 +397,31 @@ v->size = size; } +/* Return how many subdisks that constitute the original plex. */ +int +gv_sdcount(struct gv_plex *p, int growing) +{ + struct gv_sd *s; + int sdcount; + + sdcount = p->sdcount; + if (growing) { + LIST_FOREACH(s, &p->subdisks, in_plex) { + if (s->flags & GV_SD_GROW) + sdcount--; + } + } + + return (sdcount); +} + /* Calculates the plex size. */ off_t gv_plex_size(struct gv_plex *p) { struct gv_sd *s; off_t size; + int sdcount; KASSERT(p != NULL, ("gv_plex_size: NULL p")); @@ -411,6 +430,7 @@ /* Adjust the size of our plex. */ size = 0; + sdcount = gv_sdcount(p, 1); switch (p->org) { case GV_PLEX_CONCAT: LIST_FOREACH(s, &p->subdisks, in_plex) @@ -418,11 +438,11 @@ break; case GV_PLEX_STRIPED: s = LIST_FIRST(&p->subdisks); - size = p->sdcount * s->size; + size = sdcount * s->size; break; case GV_PLEX_RAID5: s = LIST_FIRST(&p->subdisks); - size = (p->sdcount - 1) * s->size; + size = (sdcount - 1) * s->size; break; } @@ -521,11 +541,10 @@ gv_set_sd_state(s, GV_SD_STALE, GV_SETSTATE_FORCE); p->flags &= ~GV_PLEX_ADDED; gv_set_plex_state(p, GV_PLEX_DOWN, GV_SETSTATE_FORCE); - } else { + } else if (p->state == GV_PLEX_UP) { LIST_FOREACH(s, &p->subdisks, in_plex) { if (s->flags & GV_SD_GROW) { - gv_set_plex_state(p, GV_PLEX_DEGRADED, - GV_SETSTATE_FORCE); + p->state = GV_PLEX_GROWABLE; break; } } @@ -938,19 +957,14 @@ * Return 1 if a > b, 0 otherwise. */ int -gv_drive_is_newer(struct gv_softc *sc) +gv_drive_is_newer(struct gv_softc *sc, struct gv_drive *d) { - struct gv_drive *d, *d2; + struct gv_drive *d2; struct timeval *a, *b; KASSERT(!LIST_EMPTY(&sc->drives), ("gv_is_drive_newer: empty drive list")); - /* - * We assume that the first drive on the list is the one to be compared - * with the others. - */ - d = LIST_FIRST(&sc->drives); a = &d->hdr->label.last_update; LIST_FOREACH(d2, &sc->drives, drive) { if ((d == d2) || (d2->state != GV_DRIVE_UP) || ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_var.h#25 (text+ko) ==== @@ -312,7 +312,7 @@ #define GV_PLEX_DOWN 0 #define GV_PLEX_INITIALIZING 1 #define GV_PLEX_DEGRADED 2 -#define GV_PLEX_RESIZING 3 +#define GV_PLEX_GROWABLE 3 #define GV_PLEX_UP 4 int org; /* The plex organisation. */ From owner-p4-projects@FreeBSD.ORG Mon Aug 13 20:12:06 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4A64316A468; Mon, 13 Aug 2007 20:12: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 0317616A421 for ; Mon, 13 Aug 2007 20:12:06 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E51E413C4D3 for ; Mon, 13 Aug 2007 20:12:05 +0000 (UTC) (envelope-from lulf@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 l7DKC5ju098533 for ; Mon, 13 Aug 2007 20:12:05 GMT (envelope-from lulf@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7DKC5it098530 for perforce@freebsd.org; Mon, 13 Aug 2007 20:12:05 GMT (envelope-from lulf@FreeBSD.org) Date: Mon, 13 Aug 2007 20:12:05 GMT Message-Id: <200708132012.l7DKC5it098530@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to lulf@FreeBSD.org using -f From: Ulf Lilleengen To: Perforce Change Reviews Cc: Subject: PERFORCE change 125119 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, 13 Aug 2007 20:12:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=125119 Change 125119 by lulf@lulf_carrot on 2007/08/13 20:11:11 - Okay, it wasn't that hard. Rebuild with added subdisk for growing works now. - Also cleanup some warnings. Affected files ... .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_create.c#11 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_init.c#25 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_plex.c#27 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_raid5.c#15 edit Differences ... ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_create.c#11 (text+ko) ==== @@ -253,12 +253,12 @@ return (GV_ERR_CREATE); } - if (p->org == GV_PLEX_RAID5 && p->state == GV_PLEX_DEGRADED) { +/* if (p->org == GV_PLEX_RAID5 && p->state == GV_PLEX_DEGRADED) { printf("VINUM: can't add subdisk to %s, rebuild plex before " " adding subdisks\n", p->name); g_free(s); return (0); - } + }*/ /* * First we give the subdisk to the drive, to handle autosized ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_init.c#25 (text+ko) ==== @@ -100,7 +100,7 @@ { struct gv_volume *v; struct gv_sd *s; - int error, grow, rebuild; + int error, grow; KASSERT(p != NULL, ("gv_start_plex: NULL p")); @@ -142,7 +142,6 @@ gv_start_vol(struct gv_volume *v) { struct gv_plex *p; - struct gv_sd *s; int error; KASSERT(v != NULL, ("gv_start_vol: NULL v")); ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_plex.c#27 (text+ko) ==== @@ -965,7 +965,7 @@ { struct gv_sd *s; int error, flags; - off_t offset, plexsize; + off_t offset; error = bp->bio_error; flags = bp->bio_cflags; ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_raid5.c#15 (text+ko) ==== @@ -194,6 +194,9 @@ /* Skip the parity subdisk. */ if (s == parity) continue; + /* Skip growing subdisks. */ + if (s->flags & GV_SD_GROW) + continue; cbp = gv_raid5_clone_bio(bp, s, wp, NULL, 1); if (cbp == NULL) @@ -286,6 +289,10 @@ if (s == broken) continue; + /* Skip growing subdisks. */ + if (s->flags & GV_SD_GROW) + continue; + cbp = gv_raid5_clone_bio(bp, s, wp, NULL, 1); if (cbp == NULL) return (ENOMEM); @@ -320,7 +327,7 @@ struct gv_sd *broken, *original, *parity, *s; struct gv_bioq *bq; struct bio *cbp; - int i, psdno, sdno, type; + int i, psdno, sdno, type, grow; off_t real_len, real_off; gp = bp->bio_to->geom; @@ -342,17 +349,17 @@ */ /* If we're over, we must use the old. */ if (boff >= p->synced) { - gv_raid5_offset(p, boff, bcount, &real_off, &real_len, - &sdno, &psdno, 1); + grow = 1; /* Or if over the resized offset, we use all drives. */ } else if (boff + bcount <= p->synced) { - gv_raid5_offset(p, boff, bcount, &real_off, &real_len, - &sdno, &psdno, 0); + grow = 0; /* Else, we're in the middle, and must wait a bit. */ } else { bioq_disksort(p->rqueue, bp); return (0); } + gv_raid5_offset(p, boff, bcount, &real_off, &real_len, + &sdno, &psdno, grow); /* Find the right subdisks. */ i = 0; @@ -408,6 +415,9 @@ /* Skip the broken subdisk. */ if (s == broken) continue; + /* Skip growing if within offset. */ + if (grow && s->flags & GV_SD_GROW) + continue; cbp = gv_raid5_clone_bio(bp, s, wp, NULL, 1); if (cbp == NULL) return (ENOMEM); @@ -444,6 +454,9 @@ /* Skip the broken and the parity subdisk. */ if ((s == broken) || (s == parity)) continue; + /* Skip growing if within offset. */ + if (grow && s->flags & GV_SD_GROW) + continue; cbp = gv_raid5_clone_bio(bp, s, wp, NULL, 1); if (cbp == NULL) From owner-p4-projects@FreeBSD.ORG Mon Aug 13 22:21:48 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C776216A418; Mon, 13 Aug 2007 22:21: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 5D7A016A475 for ; Mon, 13 Aug 2007 22:21:47 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4706313C4CC for ; Mon, 13 Aug 2007 22:21:47 +0000 (UTC) (envelope-from mharvan@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 l7DMLlOB018042 for ; Mon, 13 Aug 2007 22:21:47 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7DMLk3t018039 for perforce@freebsd.org; Mon, 13 Aug 2007 22:21:46 GMT (envelope-from mharvan@FreeBSD.org) Date: Mon, 13 Aug 2007 22:21:46 GMT Message-Id: <200708132221.l7DMLk3t018039@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125122 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, 13 Aug 2007 22:21:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=125122 Change 125122 by mharvan@mharvan_bike-planet on 2007/08/13 22:20:46 return EBUSY if trying to set TCP_CATCHALL on multiple sockets silently succeed if disabling TCP_CATCHALL on a socket where it was not enabled Affected files ... .. //depot/projects/soc2007/mharvan-mtund/sys.patches/catchall_tcp_udp/catchall.sys.patch#3 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/sys.patches/catchall_tcp_udp/catchall.sys.patch#3 (text+ko) ==== @@ -4,7 +4,7 @@ retrieving revision 1.90.2.5 diff -u -r1.90.2.5 in.h --- in.h 14 Feb 2007 13:39:01 -0000 1.90.2.5 -+++ in.h 11 Aug 2007 17:43:22 -0000 ++++ in.h 13 Aug 2007 22:17:19 -0000 @@ -429,6 +429,11 @@ #define IP_MINTTL 66 /* minimum TTL for packet or drop */ #define IP_DONTFRAG 67 /* don't fragment packet */ @@ -23,7 +23,7 @@ retrieving revision 1.31.2.2 diff -u -r1.31.2.2 tcp.h --- tcp.h 5 Mar 2007 10:21:52 -0000 1.31.2.2 -+++ tcp.h 11 Aug 2007 17:43:23 -0000 ++++ tcp.h 13 Aug 2007 22:17:20 -0000 @@ -160,6 +160,7 @@ #define TCP_NOOPT 0x08 /* don't use TCP options */ #define TCP_MD5SIG 0x10 /* use MD5 digests (RFC2385) */ @@ -38,7 +38,7 @@ retrieving revision 1.281.2.13 diff -u -r1.281.2.13 tcp_input.c --- tcp_input.c 12 Jun 2007 18:53:32 -0000 1.281.2.13 -+++ tcp_input.c 11 Aug 2007 17:43:25 -0000 ++++ tcp_input.c 13 Aug 2007 22:17:24 -0000 @@ -159,10 +159,16 @@ &tcp_reass_overflows, 0, "Global number of TCP Segment Reassembly Queue Overflows"); @@ -107,7 +107,7 @@ retrieving revision 1.228.2.14 diff -u -r1.228.2.14 tcp_subr.c --- tcp_subr.c 30 Dec 2006 17:58:46 -0000 1.228.2.14 -+++ tcp_subr.c 11 Aug 2007 17:43:28 -0000 ++++ tcp_subr.c 13 Aug 2007 22:17:26 -0000 @@ -324,6 +324,10 @@ tcp_rexmit_slop = TCPTV_CPU_VAR; tcp_inflight_rttthresh = TCPTV_INFLIGHT_RTTTHRESH; @@ -125,7 +125,7 @@ retrieving revision 1.124.2.6 diff -u -r1.124.2.6 tcp_usrreq.c --- tcp_usrreq.c 8 Jan 2007 18:10:12 -0000 1.124.2.6 -+++ tcp_usrreq.c 11 Aug 2007 17:43:29 -0000 ++++ tcp_usrreq.c 13 Aug 2007 22:17:27 -0000 @@ -162,6 +162,12 @@ INP_INFO_WUNLOCK(&tcbinfo); return error; @@ -139,7 +139,7 @@ INP_LOCK(inp); tp = intotcpcb(inp); TCPDEBUG1(); -@@ -1112,6 +1118,37 @@ +@@ -1112,6 +1118,36 @@ error = EINVAL; break; @@ -159,7 +159,7 @@ + } else { + printf("TCP_CATCHALL already enabled, " + "ignoring setsockopt()\n"); -+ error = EINVAL; ++ error = EBUSY; + } + } else {/* disable CATCHALL */ + printf("request to disable TCP_CATCHALL\n"); @@ -169,7 +169,6 @@ + } else { + printf("TCP_CATCHALL already disabled" + ", ignoring setsockopt()\n"); -+ error = EINVAL; + } + } + break; @@ -177,7 +176,7 @@ default: error = ENOPROTOOPT; break; -@@ -1145,6 +1182,13 @@ +@@ -1145,6 +1181,13 @@ case TCP_INFO: tcp_fill_info(tp, &ti); error = sooptcopyout(sopt, &ti, sizeof ti); @@ -197,7 +196,7 @@ retrieving revision 1.126.2.3 diff -u -r1.126.2.3 tcp_var.h --- tcp_var.h 19 Sep 2006 12:58:40 -0000 1.126.2.3 -+++ tcp_var.h 11 Aug 2007 17:43:30 -0000 ++++ tcp_var.h 13 Aug 2007 22:17:29 -0000 @@ -504,6 +504,7 @@ extern struct inpcbhead tcb; /* head of queue of active tcpcb's */ @@ -212,7 +211,7 @@ retrieving revision 1.175.2.11 diff -u -r1.175.2.11 udp_usrreq.c --- udp_usrreq.c 10 Jun 2007 07:28:29 -0000 1.175.2.11 -+++ udp_usrreq.c 11 Aug 2007 17:43:30 -0000 ++++ udp_usrreq.c 13 Aug 2007 22:17:29 -0000 @@ -110,6 +110,15 @@ SYSCTL_INT(_net_inet_udp, OID_AUTO, strict_mcast_mship, CTLFLAG_RW, &strict_mcast_mship, 0, "Only send multicast to member sockets"); From owner-p4-projects@FreeBSD.ORG Tue Aug 14 00:06:16 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 29E9B16A4E9; Tue, 14 Aug 2007 00:06: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 CF4AA16A4DE for ; Tue, 14 Aug 2007 00:06:15 +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 1724113C504 for ; Tue, 14 Aug 2007 00:06: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 l7E06DKx026785 for ; Tue, 14 Aug 2007 00:06:13 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7E05vwZ026757 for perforce@freebsd.org; Tue, 14 Aug 2007 00:05:57 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 14 Aug 2007 00:05:57 GMT Message-Id: <200708140005.l7E05vwZ026757@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 125123 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, 14 Aug 2007 00:06:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=125123 Change 125123 by kmacy@kmacy_home:opentoe on 2007/08/14 00:04:57 IFC Affected files ... .. //depot/projects/opentoe/ObsoleteFiles.inc#13 integrate .. //depot/projects/opentoe/contrib/bind9/CHANGES#3 integrate .. //depot/projects/opentoe/contrib/bind9/README#3 integrate .. //depot/projects/opentoe/contrib/bind9/bin/named/client.c#3 integrate .. //depot/projects/opentoe/contrib/bind9/bin/named/server.c#3 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/Bv9ARM-book.xml#3 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/Bv9ARM.ch01.html#3 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/Bv9ARM.ch02.html#3 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/Bv9ARM.ch03.html#3 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/Bv9ARM.ch04.html#3 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/Bv9ARM.ch05.html#3 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/Bv9ARM.ch06.html#3 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/Bv9ARM.ch07.html#3 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/Bv9ARM.ch08.html#3 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/Bv9ARM.ch09.html#3 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/Bv9ARM.ch10.html#2 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/Bv9ARM.html#3 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/Bv9ARM.pdf#3 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/man.dig.html#2 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/man.dnssec-keygen.html#2 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/man.dnssec-signzone.html#2 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/man.host.html#2 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/man.named-checkconf.html#2 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/man.named-checkzone.html#2 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/man.named.html#2 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/man.rndc-confgen.html#2 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/man.rndc.conf.html#2 integrate .. //depot/projects/opentoe/contrib/bind9/doc/arm/man.rndc.html#2 integrate .. //depot/projects/opentoe/contrib/bind9/lib/dns/dispatch.c#3 integrate .. //depot/projects/opentoe/contrib/bind9/lib/dns/include/dns/dispatch.h#3 integrate .. //depot/projects/opentoe/contrib/bind9/version#3 integrate .. //depot/projects/opentoe/contrib/diff/FREEBSD-Xlist#2 integrate .. //depot/projects/opentoe/contrib/diff/Makefile.am#2 delete .. //depot/projects/opentoe/contrib/diff/bootstrap#2 delete .. //depot/projects/opentoe/contrib/diff/doc/Makefile.am#2 delete .. //depot/projects/opentoe/contrib/diff/doc/diagmeet.note#2 delete .. //depot/projects/opentoe/contrib/diff/exgettext#2 delete .. //depot/projects/opentoe/contrib/diff/lib/Makefile.am#2 delete .. //depot/projects/opentoe/contrib/diff/lib/alloca.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/alloca_.h#2 delete .. //depot/projects/opentoe/contrib/diff/lib/dirname.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/fnmatch.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/fnmatch_.h#2 delete .. //depot/projects/opentoe/contrib/diff/lib/fnmatch_loop.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/getopt.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/getopt1.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/getopt_int.h#2 delete .. //depot/projects/opentoe/contrib/diff/lib/gettimeofday.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/imaxtostr.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/inttostr.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/malloc.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/mkstemp.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/offtostr.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/realloc.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/regex.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/regex.h#2 delete .. //depot/projects/opentoe/contrib/diff/lib/setmode.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/stdbool_.h#2 delete .. //depot/projects/opentoe/contrib/diff/lib/strcasecmp.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/stripslash.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/strncasecmp.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/strtol.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/strtoll.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/strtoul.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/strtoull.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/tempname.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/time_r.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/time_r.h#2 delete .. //depot/projects/opentoe/contrib/diff/lib/umaxtostr.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/waitpid.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/xstrdup.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/xstrtol.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/xstrtoul.c#2 delete .. //depot/projects/opentoe/contrib/diff/lib/xstrtoumax.c#2 delete .. //depot/projects/opentoe/contrib/diff/man/Makefile.am#2 delete .. //depot/projects/opentoe/contrib/diff/src/Makefile.am#2 delete .. //depot/projects/opentoe/contrib/less/main.c#5 integrate .. //depot/projects/opentoe/contrib/openbsm/HISTORY#3 integrate .. //depot/projects/opentoe/contrib/openbsm/README#3 integrate .. //depot/projects/opentoe/contrib/openbsm/VERSION#3 integrate .. //depot/projects/opentoe/contrib/openbsm/bin/audit/audit.8#3 integrate .. //depot/projects/opentoe/contrib/openbsm/bin/audit/audit.c#2 integrate .. //depot/projects/opentoe/contrib/openbsm/bin/auditd/audit_warn.c#2 integrate .. //depot/projects/opentoe/contrib/openbsm/bin/auditd/auditd.8#3 integrate .. //depot/projects/opentoe/contrib/openbsm/bin/auditd/auditd.c#3 integrate .. //depot/projects/opentoe/contrib/openbsm/bin/auditd/auditd.h#2 integrate .. //depot/projects/opentoe/contrib/openbsm/bin/auditreduce/auditreduce.c#2 integrate .. //depot/projects/opentoe/contrib/openbsm/config/config.h#3 integrate .. //depot/projects/opentoe/contrib/openbsm/configure#3 integrate .. //depot/projects/opentoe/contrib/openbsm/configure.ac#3 integrate .. //depot/projects/opentoe/contrib/openbsm/etc/audit_event#3 integrate .. //depot/projects/opentoe/contrib/openbsm/libbsm/au_control.3#3 integrate .. //depot/projects/opentoe/contrib/openbsm/libbsm/au_event.3#3 integrate .. //depot/projects/opentoe/contrib/openbsm/libbsm/audit_submit.3#3 integrate .. //depot/projects/opentoe/contrib/openbsm/libbsm/bsm_io.c#3 integrate .. //depot/projects/opentoe/contrib/openbsm/libbsm/bsm_token.c#3 integrate .. //depot/projects/opentoe/contrib/opensolaris/cmd/zdb/zdb.c#3 integrate .. //depot/projects/opentoe/contrib/pf/pflogd/pidfile.c#2 integrate .. //depot/projects/opentoe/contrib/pf/pflogd/pidfile.h#2 integrate .. //depot/projects/opentoe/contrib/tcpdump/print-bgp.c#2 integrate .. //depot/projects/opentoe/etc/Makefile#3 integrate .. //depot/projects/opentoe/etc/etc.arm/ttys#3 integrate .. //depot/projects/opentoe/etc/mtree/BSD.include.dist#8 integrate .. //depot/projects/opentoe/etc/mtree/BSD.usr.dist#2 integrate .. //depot/projects/opentoe/etc/namedb/named.conf#3 integrate .. //depot/projects/opentoe/etc/rc.d/netif#3 integrate .. //depot/projects/opentoe/etc/rc.d/nscd#1 branch .. //depot/projects/opentoe/include/Makefile#6 integrate .. //depot/projects/opentoe/include/arpa/tftp.h#2 integrate .. //depot/projects/opentoe/lib/Makefile#3 integrate .. //depot/projects/opentoe/lib/libarchive/Makefile#9 integrate .. //depot/projects/opentoe/lib/libarchive/archive_entry.3#3 integrate .. //depot/projects/opentoe/lib/libarchive/archive_entry.c#4 integrate .. //depot/projects/opentoe/lib/libarchive/archive_entry.h#3 integrate .. //depot/projects/opentoe/lib/libarchive/archive_read_support_compression_program.c#2 integrate .. //depot/projects/opentoe/lib/libarchive/archive_read_support_format_tar.c#8 integrate .. //depot/projects/opentoe/lib/libarchive/archive_read_support_format_zip.c#4 integrate .. //depot/projects/opentoe/lib/libarchive/archive_string.c#3 integrate .. //depot/projects/opentoe/lib/libarchive/archive_string_sprintf.c#2 integrate .. //depot/projects/opentoe/lib/libarchive/archive_write_disk.c#7 integrate .. //depot/projects/opentoe/lib/libarchive/test/Makefile#6 integrate .. //depot/projects/opentoe/lib/libarchive/test/main.c#6 integrate .. //depot/projects/opentoe/lib/libarchive/test/read_open_memory.c#1 branch .. //depot/projects/opentoe/lib/libarchive/test/test.h#4 integrate .. //depot/projects/opentoe/lib/libarchive/test/test_read_format_gtar_sparse.c#3 integrate .. //depot/projects/opentoe/lib/libarchive/test/test_read_format_tar.c#2 integrate .. //depot/projects/opentoe/lib/libarchive/test/test_read_pax_truncated.c#1 branch .. //depot/projects/opentoe/lib/libarchive/test/test_tar_filenames.c#5 integrate .. //depot/projects/opentoe/lib/libarchive/test/test_write_disk_perms.c#6 integrate .. //depot/projects/opentoe/lib/libc/net/name6.c#2 integrate .. //depot/projects/opentoe/lib/libc/net/sctp_sys_calls.c#7 integrate .. //depot/projects/opentoe/lib/libc/stdlib/getenv.c#4 integrate .. //depot/projects/opentoe/lib/libc/sys/ioctl.2#2 integrate .. //depot/projects/opentoe/lib/libc/yp/yplib.c#2 integrate .. //depot/projects/opentoe/lib/libdisk/open_disk.c#2 integrate .. //depot/projects/opentoe/lib/libelf/elf_begin.3#2 integrate .. //depot/projects/opentoe/lib/libelf/elf_memory.3#2 integrate .. //depot/projects/opentoe/lib/libpam/modules/pam_lastlog/pam_lastlog.c#2 integrate .. //depot/projects/opentoe/lib/libthr/thread/thr_private.h#2 integrate .. //depot/projects/opentoe/lib/libutil/flopen.3#2 integrate .. //depot/projects/opentoe/lib/libutil/flopen.c#2 integrate .. //depot/projects/opentoe/lib/libutil/pidfile.c#3 integrate .. //depot/projects/opentoe/lib/ncurses/config.mk#2 integrate .. //depot/projects/opentoe/lib/ncurses/ncurses/Makefile#5 integrate .. //depot/projects/opentoe/libexec/getty/ttys.5#2 integrate .. //depot/projects/opentoe/libexec/rtld-elf/powerpc/reloc.c#2 integrate .. //depot/projects/opentoe/libexec/rtld-elf/sparc64/reloc.c#2 integrate .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/hardware/article.sgml#4 integrate .. //depot/projects/opentoe/release/doc/en_US.ISO8859-1/relnotes/article.sgml#13 integrate .. //depot/projects/opentoe/rescue/rescue/Makefile#3 integrate .. //depot/projects/opentoe/sbin/Makefile#4 integrate .. //depot/projects/opentoe/sbin/atacontrol/atacontrol.c#2 integrate .. //depot/projects/opentoe/sbin/atm/Makefile#2 integrate .. //depot/projects/opentoe/sbin/fsck_ffs/main.c#2 integrate .. //depot/projects/opentoe/sbin/ifconfig/ifbridge.c#3 integrate .. //depot/projects/opentoe/sbin/ifconfig/ifconfig.8#7 integrate .. //depot/projects/opentoe/sbin/ipfw/ipfw.8#4 integrate .. //depot/projects/opentoe/sbin/iscontrol/Makefile#1 branch .. //depot/projects/opentoe/sbin/iscontrol/auth_subr.c#1 branch .. //depot/projects/opentoe/sbin/iscontrol/config.c#1 branch .. //depot/projects/opentoe/sbin/iscontrol/fsm.c#1 branch .. //depot/projects/opentoe/sbin/iscontrol/iscontrol.8#1 branch .. //depot/projects/opentoe/sbin/iscontrol/iscontrol.c#1 branch .. //depot/projects/opentoe/sbin/iscontrol/iscontrol.h#1 branch .. //depot/projects/opentoe/sbin/iscontrol/iscsi.conf.5#1 branch .. //depot/projects/opentoe/sbin/iscontrol/login.c#1 branch .. //depot/projects/opentoe/sbin/iscontrol/misc.c#1 branch .. //depot/projects/opentoe/sbin/iscontrol/pdu.c#1 branch .. //depot/projects/opentoe/sbin/iscontrol/pdu.h#1 branch .. //depot/projects/opentoe/sbin/tunefs/tunefs.8#2 integrate .. //depot/projects/opentoe/share/examples/Makefile#3 integrate .. //depot/projects/opentoe/share/examples/kld/syscall/module/syscall.c#2 integrate .. //depot/projects/opentoe/share/man/man4/Makefile#9 integrate .. //depot/projects/opentoe/share/man/man4/crypto.4#2 integrate .. //depot/projects/opentoe/share/man/man4/ddb.4#2 integrate .. //depot/projects/opentoe/share/man/man4/enc.4#2 integrate .. //depot/projects/opentoe/share/man/man4/fast_ipsec.4#2 delete .. //depot/projects/opentoe/share/man/man4/ipmi.4#2 integrate .. //depot/projects/opentoe/share/man/man4/ipsec.4#2 integrate .. //depot/projects/opentoe/share/man/man4/iscsi_initiator.4#1 branch .. //depot/projects/opentoe/share/man/man4/lagg.4#2 integrate .. //depot/projects/opentoe/share/man/man4/man4.i386/padlock.4#2 integrate .. //depot/projects/opentoe/share/man/man4/mfi.4#2 integrate .. //depot/projects/opentoe/share/man/man4/ng_fec.4#3 integrate .. //depot/projects/opentoe/share/man/man4/ng_ppp.4#2 integrate .. //depot/projects/opentoe/share/man/man4/snd_hda.4#4 integrate .. //depot/projects/opentoe/share/man/man4/udav.4#2 integrate .. //depot/projects/opentoe/share/man/man4/usb.4#2 integrate .. //depot/projects/opentoe/share/man/man4/vpo.4#2 integrate .. //depot/projects/opentoe/share/man/man5/src.conf.5#5 integrate .. //depot/projects/opentoe/share/man/man7/ports.7#2 integrate .. //depot/projects/opentoe/share/man/man8/rc.8#3 integrate .. //depot/projects/opentoe/share/man/man9/contigmalloc.9#2 integrate .. //depot/projects/opentoe/share/man/man9/locking.9#5 integrate .. //depot/projects/opentoe/share/man/man9/module.9#2 integrate .. //depot/projects/opentoe/share/man/man9/rtentry.9#2 integrate .. //depot/projects/opentoe/share/man/man9/sysctl_ctx_init.9#2 integrate .. //depot/projects/opentoe/share/misc/bsd-family-tree#4 integrate .. //depot/projects/opentoe/share/misc/committers-doc.dot#3 integrate .. //depot/projects/opentoe/share/mk/version_gen.awk#3 integrate .. //depot/projects/opentoe/share/syscons/keymaps/INDEX.keymaps#2 integrate .. //depot/projects/opentoe/share/syscons/keymaps/Makefile#2 integrate .. //depot/projects/opentoe/share/syscons/keymaps/fr.macbook.acc.kbd#1 branch .. //depot/projects/opentoe/share/zoneinfo/leapseconds#3 integrate .. //depot/projects/opentoe/sys/Makefile#6 integrate .. //depot/projects/opentoe/sys/amd64/amd64/cpu_switch.S#4 integrate .. //depot/projects/opentoe/sys/amd64/amd64/local_apic.c#5 integrate .. //depot/projects/opentoe/sys/amd64/amd64/mp_machdep.c#4 integrate .. //depot/projects/opentoe/sys/amd64/amd64/trap.c#5 integrate .. //depot/projects/opentoe/sys/amd64/isa/clock.c#3 integrate .. //depot/projects/opentoe/sys/arm/arm/busdma_machdep.c#5 integrate .. //depot/projects/opentoe/sys/arm/arm/cpufunc.c#2 integrate .. //depot/projects/opentoe/sys/arm/arm/cpufunc_asm_xscale_c3.S#1 branch .. //depot/projects/opentoe/sys/arm/arm/elf_trampoline.c#2 integrate .. //depot/projects/opentoe/sys/arm/arm/genassym.c#3 integrate .. //depot/projects/opentoe/sys/arm/arm/identcpu.c#2 integrate .. //depot/projects/opentoe/sys/arm/arm/intr.c#4 integrate .. //depot/projects/opentoe/sys/arm/arm/pmap.c#5 integrate .. //depot/projects/opentoe/sys/arm/arm/swtch.S#2 integrate .. //depot/projects/opentoe/sys/arm/arm/trap.c#3 integrate .. //depot/projects/opentoe/sys/arm/arm/vm_machdep.c#4 integrate .. //depot/projects/opentoe/sys/arm/at91/at91rm92reg.h#2 integrate .. //depot/projects/opentoe/sys/arm/at91/kb920x_machdep.c#4 integrate .. //depot/projects/opentoe/sys/arm/at91/ohci_atmelarm.c#2 integrate .. //depot/projects/opentoe/sys/arm/conf/CRB#1 branch .. //depot/projects/opentoe/sys/arm/conf/KB920X#3 integrate .. //depot/projects/opentoe/sys/arm/include/armreg.h#2 integrate .. //depot/projects/opentoe/sys/arm/include/cpufunc.h#3 integrate .. //depot/projects/opentoe/sys/arm/include/pmap.h#4 integrate .. //depot/projects/opentoe/sys/arm/include/pte.h#3 integrate .. //depot/projects/opentoe/sys/arm/xscale/i80321/i80321_pci.c#2 integrate .. //depot/projects/opentoe/sys/arm/xscale/i80321/i80321_timer.c#2 integrate .. //depot/projects/opentoe/sys/arm/xscale/i80321/i80321_wdog.c#3 integrate .. //depot/projects/opentoe/sys/arm/xscale/i80321/i80321var.h#2 integrate .. //depot/projects/opentoe/sys/arm/xscale/i80321/obio.c#2 integrate .. //depot/projects/opentoe/sys/arm/xscale/i8134x/crb_machdep.c#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/files.crb#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/files.i81342#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/i81342.c#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/i81342_mcu.c#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/i81342_pci.c#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/i81342_space.c#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/i81342reg.h#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/i81342var.h#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/obio.c#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/obio_space.c#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/obiovar.h#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/std.crb#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/std.i81342#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/uart_bus_i81342.c#1 branch .. //depot/projects/opentoe/sys/arm/xscale/i8134x/uart_cpu_i81342.c#1 branch .. //depot/projects/opentoe/sys/boot/arm/at91/Makefile.inc#2 integrate .. //depot/projects/opentoe/sys/boot/arm/at91/boot2/board.h#2 integrate .. //depot/projects/opentoe/sys/boot/arm/at91/boot2/boot2.c#4 integrate .. //depot/projects/opentoe/sys/boot/arm/at91/boot2/bwct_board.c#1 branch .. //depot/projects/opentoe/sys/boot/arm/at91/boot2/centipad_board.c#1 branch .. //depot/projects/opentoe/sys/boot/arm/at91/boot2/kb920x_board.c#2 integrate .. //depot/projects/opentoe/sys/boot/arm/at91/libat91/Makefile#2 integrate .. //depot/projects/opentoe/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#3 integrate .. //depot/projects/opentoe/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#3 integrate .. //depot/projects/opentoe/sys/boot/arm/at91/libat91/emac.c#3 integrate .. //depot/projects/opentoe/sys/boot/arm/at91/libat91/emac.h#2 integrate .. //depot/projects/opentoe/sys/bsm/audit.h#3 integrate .. //depot/projects/opentoe/sys/bsm/audit_internal.h#3 integrate .. //depot/projects/opentoe/sys/bsm/audit_kevents.h#3 integrate .. //depot/projects/opentoe/sys/bsm/audit_record.h#3 integrate .. //depot/projects/opentoe/sys/cam/scsi/scsi_cd.c#4 integrate .. //depot/projects/opentoe/sys/coda/README#2 delete .. //depot/projects/opentoe/sys/coda/TODO#2 delete .. //depot/projects/opentoe/sys/coda/cnode.h#3 delete .. //depot/projects/opentoe/sys/coda/coda.h#3 delete .. //depot/projects/opentoe/sys/coda/coda_fbsd.c#3 delete .. //depot/projects/opentoe/sys/coda/coda_io.h#2 delete .. //depot/projects/opentoe/sys/coda/coda_kernel.h#2 delete .. //depot/projects/opentoe/sys/coda/coda_namecache.c#2 delete .. //depot/projects/opentoe/sys/coda/coda_namecache.h#2 delete .. //depot/projects/opentoe/sys/coda/coda_opstats.h#2 delete .. //depot/projects/opentoe/sys/coda/coda_pioctl.h#2 delete .. //depot/projects/opentoe/sys/coda/coda_psdev.c#3 delete .. //depot/projects/opentoe/sys/coda/coda_psdev.h#2 delete .. //depot/projects/opentoe/sys/coda/coda_subr.c#2 delete .. //depot/projects/opentoe/sys/coda/coda_subr.h#2 delete .. //depot/projects/opentoe/sys/coda/coda_venus.c#3 delete .. //depot/projects/opentoe/sys/coda/coda_venus.h#3 delete .. //depot/projects/opentoe/sys/coda/coda_vfsops.c#3 delete .. //depot/projects/opentoe/sys/coda/coda_vfsops.h#2 delete .. //depot/projects/opentoe/sys/coda/coda_vnops.c#5 delete .. //depot/projects/opentoe/sys/coda/coda_vnops.h#3 delete .. //depot/projects/opentoe/sys/compat/linux/linux_socket.c#3 integrate .. //depot/projects/opentoe/sys/compat/ndis/subr_ntoskrnl.c#3 integrate .. //depot/projects/opentoe/sys/conf/Makefile.arm#3 integrate .. //depot/projects/opentoe/sys/conf/NOTES#11 integrate .. //depot/projects/opentoe/sys/conf/files#14 integrate .. //depot/projects/opentoe/sys/conf/kern.pre.mk#5 integrate .. //depot/projects/opentoe/sys/conf/options#12 integrate .. //depot/projects/opentoe/sys/conf/options.ia64#2 integrate .. //depot/projects/opentoe/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#8 integrate .. //depot/projects/opentoe/sys/contrib/pf/net/if_pfsync.c#5 integrate .. //depot/projects/opentoe/sys/dev/acpica/acpi_hpet.c#5 integrate .. //depot/projects/opentoe/sys/dev/acpica/acpi_timer.c#4 integrate .. //depot/projects/opentoe/sys/dev/adlink/adlink.c#2 integrate .. //depot/projects/opentoe/sys/dev/aic7xxx/aic7xxx.c#4 integrate .. //depot/projects/opentoe/sys/dev/aic7xxx/aic_osm_lib.c#3 integrate .. //depot/projects/opentoe/sys/dev/an/if_an.c#3 integrate .. //depot/projects/opentoe/sys/dev/arcmsr/arcmsr.c#5 integrate .. //depot/projects/opentoe/sys/dev/ata/ata-raid.c#2 integrate .. //depot/projects/opentoe/sys/dev/ath/ath_rate/amrr/amrr.c#3 integrate .. //depot/projects/opentoe/sys/dev/ath/ath_rate/onoe/onoe.c#3 integrate .. //depot/projects/opentoe/sys/dev/ath/if_ath.c#9 integrate .. //depot/projects/opentoe/sys/dev/bce/if_bce.c#4 integrate .. //depot/projects/opentoe/sys/dev/bce/if_bcefw.h#3 integrate .. //depot/projects/opentoe/sys/dev/bce/if_bcereg.h#4 integrate .. //depot/projects/opentoe/sys/dev/ce/if_ce.c#3 integrate .. //depot/projects/opentoe/sys/dev/cp/if_cp.c#3 integrate .. //depot/projects/opentoe/sys/dev/ctau/if_ct.c#3 integrate .. //depot/projects/opentoe/sys/dev/cx/if_cx.c#3 integrate .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_common.h#7 integrate .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_ctl_defs.h#2 integrate .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_mc5.c#6 integrate .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_t3_cpl.h#5 integrate .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_t3_hw.c#7 integrate .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_vsc7323.c#2 integrate .. //depot/projects/opentoe/sys/dev/cxgb/common/cxgb_xgmac.c#7 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_adapter.h#22 edit .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_ioctl.h#5 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_main.c#15 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_offload.c#13 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_offload.h#11 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_osdep.h#12 integrate .. //depot/projects/opentoe/sys/dev/cxgb/cxgb_sge.c#26 integrate .. //depot/projects/opentoe/sys/dev/cxgb/sys/mvec.h#4 integrate .. //depot/projects/opentoe/sys/dev/cxgb/t3b_protocol_sram-1.1.0.bin.gz.uu#1 branch .. //depot/projects/opentoe/sys/dev/cxgb/t3b_tp_eeprom-1.1.0.bin.gz.uu#1 branch .. //depot/projects/opentoe/sys/dev/cxgb/t3fw-4.1.0.bin.gz.uu#2 delete .. //depot/projects/opentoe/sys/dev/cxgb/t3fw-4.5.0.bin.gz.uu#1 branch .. //depot/projects/opentoe/sys/dev/dc/if_dc.c#2 integrate .. //depot/projects/opentoe/sys/dev/dc/if_dcreg.h#2 integrate .. //depot/projects/opentoe/sys/dev/em/if_em.c#4 integrate .. //depot/projects/opentoe/sys/dev/firewire/firewire.c#6 integrate .. //depot/projects/opentoe/sys/dev/firewire/firewirereg.h#4 integrate .. //depot/projects/opentoe/sys/dev/ichwd/ichwd.c#3 integrate .. //depot/projects/opentoe/sys/dev/ichwd/ichwd.h#2 integrate .. //depot/projects/opentoe/sys/dev/if_ndis/if_ndis.c#5 integrate .. //depot/projects/opentoe/sys/dev/ipmi/ipmi_isa.c#2 integrate .. //depot/projects/opentoe/sys/dev/iscsi/initiator/isc_cam.c#1 branch .. //depot/projects/opentoe/sys/dev/iscsi/initiator/isc_sm.c#1 branch .. //depot/projects/opentoe/sys/dev/iscsi/initiator/isc_soc.c#1 branch .. //depot/projects/opentoe/sys/dev/iscsi/initiator/isc_subr.c#1 branch .. //depot/projects/opentoe/sys/dev/iscsi/initiator/iscsi.c#1 branch .. //depot/projects/opentoe/sys/dev/iscsi/initiator/iscsi.h#1 branch .. //depot/projects/opentoe/sys/dev/iscsi/initiator/iscsi_subr.c#1 branch .. //depot/projects/opentoe/sys/dev/iscsi/initiator/iscsivar.h#1 branch .. //depot/projects/opentoe/sys/dev/mfi/mfi.c#4 integrate .. //depot/projects/opentoe/sys/dev/mfi/mfi_disk.c#3 integrate .. //depot/projects/opentoe/sys/dev/mfi/mfi_pci.c#3 integrate .. //depot/projects/opentoe/sys/dev/mfi/mfireg.h#3 integrate .. //depot/projects/opentoe/sys/dev/mfi/mfivar.h#4 integrate .. //depot/projects/opentoe/sys/dev/msk/if_msk.c#5 integrate .. //depot/projects/opentoe/sys/dev/mxge/eth_z8e.dat.gz.uu#4 delete .. //depot/projects/opentoe/sys/dev/mxge/eth_z8e.h#1 branch .. //depot/projects/opentoe/sys/dev/mxge/ethp_z8e.dat.gz.uu#4 delete .. //depot/projects/opentoe/sys/dev/mxge/ethp_z8e.h#1 branch .. //depot/projects/opentoe/sys/dev/mxge/if_mxge.c#8 integrate .. //depot/projects/opentoe/sys/dev/mxge/mxge_eth_z8e.c#1 branch .. //depot/projects/opentoe/sys/dev/mxge/mxge_ethp_z8e.c#1 branch .. //depot/projects/opentoe/sys/dev/nfe/if_nfe.c#3 integrate .. //depot/projects/opentoe/sys/dev/nfe/if_nfevar.h#3 integrate .. //depot/projects/opentoe/sys/dev/nmdm/nmdm.c#2 integrate .. //depot/projects/opentoe/sys/dev/pci/pci.c#6 integrate .. //depot/projects/opentoe/sys/dev/ral/rt2560.c#5 integrate .. //depot/projects/opentoe/sys/dev/ral/rt2661.c#4 integrate .. //depot/projects/opentoe/sys/dev/re/if_re.c#6 integrate .. //depot/projects/opentoe/sys/dev/streams/streams.c#3 integrate .. //depot/projects/opentoe/sys/dev/sym/sym_hipd.c#5 integrate .. //depot/projects/opentoe/sys/dev/usb/ehci.c#3 integrate .. //depot/projects/opentoe/sys/dev/usb/if_axe.c#6 integrate .. //depot/projects/opentoe/sys/dev/usb/if_axereg.h#5 integrate .. //depot/projects/opentoe/sys/dev/usb/if_udav.c#4 integrate .. //depot/projects/opentoe/sys/dev/usb/if_ural.c#11 integrate .. //depot/projects/opentoe/sys/dev/usb/ufoma.c#5 integrate .. //depot/projects/opentoe/sys/dev/usb/ukbd.c#6 integrate .. //depot/projects/opentoe/sys/dev/usb/umodem.c#6 integrate .. //depot/projects/opentoe/sys/dev/usb/ums.c#6 integrate .. //depot/projects/opentoe/sys/dev/usb/usb_quirks.c#7 integrate .. //depot/projects/opentoe/sys/dev/usb/usbdevs#12 integrate .. //depot/projects/opentoe/sys/dev/wi/if_wi.c#6 integrate .. //depot/projects/opentoe/sys/fs/coda/cnode.h#2 integrate .. //depot/projects/opentoe/sys/fs/coda/coda_fbsd.c#2 integrate .. //depot/projects/opentoe/sys/fs/coda/coda_namecache.c#2 integrate .. //depot/projects/opentoe/sys/fs/coda/coda_psdev.c#2 integrate .. //depot/projects/opentoe/sys/fs/coda/coda_subr.c#2 integrate .. //depot/projects/opentoe/sys/fs/coda/coda_venus.c#2 integrate .. //depot/projects/opentoe/sys/fs/coda/coda_vfsops.c#2 integrate .. //depot/projects/opentoe/sys/fs/coda/coda_vnops.c#2 integrate .. //depot/projects/opentoe/sys/fs/devfs/devfs_vnops.c#9 integrate .. //depot/projects/opentoe/sys/fs/fifofs/fifo_vnops.c#4 integrate .. //depot/projects/opentoe/sys/fs/msdosfs/denode.h#2 integrate .. //depot/projects/opentoe/sys/fs/msdosfs/msdosfs_conv.c#2 integrate .. //depot/projects/opentoe/sys/fs/msdosfs/msdosfs_denode.c#2 integrate .. //depot/projects/opentoe/sys/fs/msdosfs/msdosfs_fat.c#3 integrate .. //depot/projects/opentoe/sys/fs/msdosfs/msdosfs_fileno.c#2 integrate .. //depot/projects/opentoe/sys/fs/msdosfs/msdosfs_iconv.c#2 integrate .. //depot/projects/opentoe/sys/fs/msdosfs/msdosfs_lookup.c#2 integrate .. //depot/projects/opentoe/sys/fs/msdosfs/msdosfs_vfsops.c#4 integrate .. //depot/projects/opentoe/sys/fs/msdosfs/msdosfs_vnops.c#3 integrate .. //depot/projects/opentoe/sys/fs/tmpfs/tmpfs.h#6 integrate .. //depot/projects/opentoe/sys/fs/tmpfs/tmpfs_subr.c#6 integrate .. //depot/projects/opentoe/sys/fs/tmpfs/tmpfs_vfsops.c#6 integrate .. //depot/projects/opentoe/sys/fs/tmpfs/tmpfs_vnops.c#5 integrate .. //depot/projects/opentoe/sys/gnu/fs/ext2fs/ext2_vfsops.c#2 integrate .. //depot/projects/opentoe/sys/i386/i386/genassym.c#3 integrate .. //depot/projects/opentoe/sys/i386/i386/local_apic.c#5 integrate .. //depot/projects/opentoe/sys/i386/i386/machdep.c#6 integrate .. //depot/projects/opentoe/sys/i386/i386/mp_machdep.c#5 integrate .. //depot/projects/opentoe/sys/i386/i386/swtch.s#3 integrate .. //depot/projects/opentoe/sys/i386/i386/trap.c#6 integrate .. //depot/projects/opentoe/sys/i386/include/cpufunc.h#2 integrate .. //depot/projects/opentoe/sys/i386/isa/clock.c#3 integrate .. //depot/projects/opentoe/sys/i386/linux/linux_machdep.c#5 integrate .. //depot/projects/opentoe/sys/ia64/ia64/clock.c#2 integrate .. //depot/projects/opentoe/sys/ia64/ia64/db_machdep.c#3 integrate .. //depot/projects/opentoe/sys/ia64/ia64/exception.S#4 integrate .. //depot/projects/opentoe/sys/ia64/ia64/interrupt.c#4 integrate .. //depot/projects/opentoe/sys/ia64/ia64/machdep.c#5 integrate .. //depot/projects/opentoe/sys/ia64/ia64/mp_machdep.c#3 integrate .. //depot/projects/opentoe/sys/ia64/ia64/nexus.c#3 integrate .. //depot/projects/opentoe/sys/ia64/ia64/pmap.c#6 integrate .. //depot/projects/opentoe/sys/ia64/ia64/sapic.c#2 integrate .. //depot/projects/opentoe/sys/ia64/ia64/syscall.S#2 integrate .. //depot/projects/opentoe/sys/ia64/include/atomic.h#2 integrate .. //depot/projects/opentoe/sys/ia64/include/ia64_cpu.h#3 integrate .. //depot/projects/opentoe/sys/ia64/include/intr.h#2 integrate .. //depot/projects/opentoe/sys/ia64/include/md_var.h#2 integrate .. //depot/projects/opentoe/sys/ia64/include/sapicvar.h#2 integrate .. //depot/projects/opentoe/sys/kern/kern_descrip.c#8 integrate .. //depot/projects/opentoe/sys/kern/kern_event.c#5 integrate .. //depot/projects/opentoe/sys/kern/kern_kse.c#4 integrate .. //depot/projects/opentoe/sys/kern/kern_lockf.c#4 integrate .. //depot/projects/opentoe/sys/kern/kern_mutex.c#6 integrate .. //depot/projects/opentoe/sys/kern/kern_poll.c#3 integrate .. //depot/projects/opentoe/sys/kern/kern_resource.c#7 integrate .. //depot/projects/opentoe/sys/kern/kern_rwlock.c#6 integrate .. //depot/projects/opentoe/sys/kern/kern_sig.c#6 integrate .. //depot/projects/opentoe/sys/kern/kern_switch.c#3 integrate .. //depot/projects/opentoe/sys/kern/kern_thread.c#6 integrate .. //depot/projects/opentoe/sys/kern/sched_4bsd.c#3 integrate .. //depot/projects/opentoe/sys/kern/sched_ule.c#5 integrate .. //depot/projects/opentoe/sys/kern/subr_bus.c#3 integrate .. //depot/projects/opentoe/sys/kern/subr_clock.c#2 integrate .. //depot/projects/opentoe/sys/kern/sys_socket.c#2 integrate .. //depot/projects/opentoe/sys/kern/tty.c#4 integrate .. //depot/projects/opentoe/sys/kern/uipc_domain.c#3 integrate .. //depot/projects/opentoe/sys/kern/uipc_syscalls.c#8 integrate .. //depot/projects/opentoe/sys/kern/uipc_usrreq.c#5 integrate .. //depot/projects/opentoe/sys/kern/vfs_mount.c#7 integrate .. //depot/projects/opentoe/sys/kern/vfs_subr.c#9 integrate .. //depot/projects/opentoe/sys/kern/vfs_vnops.c#4 integrate .. //depot/projects/opentoe/sys/modules/Makefile#7 integrate .. //depot/projects/opentoe/sys/modules/coda/Makefile#2 integrate .. //depot/projects/opentoe/sys/modules/coda5/Makefile#2 integrate .. //depot/projects/opentoe/sys/modules/cxgb/Makefile#12 integrate .. //depot/projects/opentoe/sys/modules/cxgb/cxgb/Makefile#3 edit .. //depot/projects/opentoe/sys/modules/iscsi/Makefile#1 branch .. //depot/projects/opentoe/sys/modules/iscsi/initiator/Makefile#1 branch .. //depot/projects/opentoe/sys/modules/mxge/mxge_eth_z8e/Makefile#2 integrate .. //depot/projects/opentoe/sys/modules/mxge/mxge_ethp_z8e/Makefile#2 integrate .. //depot/projects/opentoe/sys/modules/netgraph/atm/Makefile#2 integrate .. //depot/projects/opentoe/sys/modules/netgraph/bluetooth/Makefile#3 integrate .. //depot/projects/opentoe/sys/net/bpf.c#3 integrate .. //depot/projects/opentoe/sys/net/bpfdesc.h#2 integrate .. //depot/projects/opentoe/sys/net/bridgestp.c#3 integrate .. //depot/projects/opentoe/sys/net/bridgestp.h#2 integrate .. //depot/projects/opentoe/sys/net/if.c#6 integrate .. //depot/projects/opentoe/sys/net/if_bridge.c#5 integrate .. //depot/projects/opentoe/sys/net/if_bridgevar.h#3 integrate .. //depot/projects/opentoe/sys/net/if_ethersubr.c#8 integrate .. //depot/projects/opentoe/sys/net/if_lagg.c#5 integrate .. //depot/projects/opentoe/sys/net/if_lagg.h#5 integrate .. //depot/projects/opentoe/sys/net/netisr.c#2 integrate .. //depot/projects/opentoe/sys/net80211/ieee80211_scan_sta.c#4 integrate .. //depot/projects/opentoe/sys/netatm/atm_proto.c#2 integrate .. //depot/projects/opentoe/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/opentoe/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#3 integrate .. //depot/projects/opentoe/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/opentoe/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/opentoe/sys/netgraph/netflow/netflow.c#2 integrate .. //depot/projects/opentoe/sys/netgraph/netgraph.h#2 integrate .. //depot/projects/opentoe/sys/netgraph/ng_bpf.c#2 integrate .. //depot/projects/opentoe/sys/netgraph/ng_eiface.c#2 integrate .. //depot/projects/opentoe/sys/netgraph/ng_ppp.c#4 integrate .. //depot/projects/opentoe/sys/netgraph/ng_ppp.h#2 integrate .. //depot/projects/opentoe/sys/netinet/icmp_var.h#2 integrate .. //depot/projects/opentoe/sys/netinet/in_mcast.c#3 integrate .. //depot/projects/opentoe/sys/netinet/in_pcb.h#6 integrate .. //depot/projects/opentoe/sys/netinet/ip_carp.c#3 integrate .. //depot/projects/opentoe/sys/netinet/ip_divert.c#3 integrate .. //depot/projects/opentoe/sys/netinet/ip_dummynet.c#4 integrate .. //depot/projects/opentoe/sys/netinet/ip_fw2.c#7 integrate .. //depot/projects/opentoe/sys/netinet/ip_icmp.c#4 integrate .. //depot/projects/opentoe/sys/netinet/ip_input.c#7 integrate .. //depot/projects/opentoe/sys/netinet/ip_ipsec.c#4 integrate .. //depot/projects/opentoe/sys/netinet/ip_ipsec.h#2 integrate .. //depot/projects/opentoe/sys/netinet/ip_mroute.c#3 integrate .. //depot/projects/opentoe/sys/netinet/sctp.h#6 integrate .. //depot/projects/opentoe/sys/netinet/sctp_asconf.c#6 integrate .. //depot/projects/opentoe/sys/netinet/sctp_asconf.h#4 integrate .. //depot/projects/opentoe/sys/netinet/sctp_cc_functions.c#1 branch .. //depot/projects/opentoe/sys/netinet/sctp_cc_functions.h#1 branch .. //depot/projects/opentoe/sys/netinet/sctp_constants.h#9 integrate .. //depot/projects/opentoe/sys/netinet/sctp_indata.c#14 integrate .. //depot/projects/opentoe/sys/netinet/sctp_input.c#14 integrate .. //depot/projects/opentoe/sys/netinet/sctp_os.h#3 integrate .. //depot/projects/opentoe/sys/netinet/sctp_os_bsd.h#10 integrate .. //depot/projects/opentoe/sys/netinet/sctp_output.c#13 integrate .. //depot/projects/opentoe/sys/netinet/sctp_pcb.c#13 integrate .. //depot/projects/opentoe/sys/netinet/sctp_pcb.h#10 integrate .. //depot/projects/opentoe/sys/netinet/sctp_peeloff.c#6 integrate .. //depot/projects/opentoe/sys/netinet/sctp_structs.h#11 integrate .. //depot/projects/opentoe/sys/netinet/sctp_sysctl.c#7 integrate .. //depot/projects/opentoe/sys/netinet/sctp_sysctl.h#6 integrate .. //depot/projects/opentoe/sys/netinet/sctp_timer.c#9 integrate .. //depot/projects/opentoe/sys/netinet/sctp_timer.h#4 integrate .. //depot/projects/opentoe/sys/netinet/sctp_uio.h#11 integrate .. //depot/projects/opentoe/sys/netinet/sctp_usrreq.c#13 integrate .. //depot/projects/opentoe/sys/netinet/sctp_var.h#7 integrate .. //depot/projects/opentoe/sys/netinet/sctputil.c#15 integrate .. //depot/projects/opentoe/sys/netinet/sctputil.h#10 integrate .. //depot/projects/opentoe/sys/netinet/tcp_fsm.h#3 integrate .. //depot/projects/opentoe/sys/netinet/tcp_input.c#12 integrate .. //depot/projects/opentoe/sys/netinet/tcp_subr.c#10 integrate .. //depot/projects/opentoe/sys/netinet/tcp_syncache.c#8 integrate .. //depot/projects/opentoe/sys/netinet/tcp_syncache.h#1 branch .. //depot/projects/opentoe/sys/netinet/tcp_timer.h#4 integrate .. //depot/projects/opentoe/sys/netinet/tcp_usrreq.c#7 integrate .. //depot/projects/opentoe/sys/netinet/tcp_var.h#8 integrate .. //depot/projects/opentoe/sys/netinet6/in6.h#5 integrate .. //depot/projects/opentoe/sys/netinet6/ip6_ipsec.c#3 integrate .. //depot/projects/opentoe/sys/netinet6/ip6_ipsec.h#2 integrate .. //depot/projects/opentoe/sys/netinet6/sctp6_usrreq.c#12 integrate .. //depot/projects/opentoe/sys/netinet6/udp6_output.c#6 delete .. //depot/projects/opentoe/sys/netinet6/udp6_usrreq.c#6 integrate .. //depot/projects/opentoe/sys/netinet6/udp6_var.h#3 integrate .. //depot/projects/opentoe/sys/netipsec/ipsec_input.c#3 integrate .. //depot/projects/opentoe/sys/netipsec/ipsec_output.c#4 integrate .. //depot/projects/opentoe/sys/netipsec/xform_ah.c#3 integrate .. //depot/projects/opentoe/sys/netipsec/xform_esp.c#3 integrate .. //depot/projects/opentoe/sys/netipsec/xform_ipcomp.c#2 integrate .. //depot/projects/opentoe/sys/netipsec/xform_ipip.c#3 integrate .. //depot/projects/opentoe/sys/netipx/spx_debug.c#3 integrate .. //depot/projects/opentoe/sys/netipx/spx_debug.h#3 integrate .. //depot/projects/opentoe/sys/nfsclient/bootp_subr.c#2 integrate .. //depot/projects/opentoe/sys/nfsclient/krpc_subr.c#2 integrate .. //depot/projects/opentoe/sys/nfsclient/nfs_socket.c#3 integrate .. //depot/projects/opentoe/sys/nfsclient/nfs_vfsops.c#3 integrate .. //depot/projects/opentoe/sys/nfsserver/nfs_srvsock.c#3 integrate .. //depot/projects/opentoe/sys/nfsserver/nfs_srvsubs.c#3 integrate .. //depot/projects/opentoe/sys/nfsserver/nfs_syscalls.c#3 integrate .. //depot/projects/opentoe/sys/pc98/cbus/clock.c#3 integrate .. //depot/projects/opentoe/sys/pci/agp.c#2 integrate .. //depot/projects/opentoe/sys/pci/agp_i810.c#2 integrate .. //depot/projects/opentoe/sys/pci/agppriv.h#2 integrate .. //depot/projects/opentoe/sys/pci/agpreg.h#2 integrate .. //depot/projects/opentoe/sys/pci/if_rl.c#2 integrate .. //depot/projects/opentoe/sys/pci/if_rlreg.h#4 integrate .. //depot/projects/opentoe/sys/pci/if_xl.c#2 integrate .. //depot/projects/opentoe/sys/pci/viapm.c#2 integrate .. //depot/projects/opentoe/sys/powerpc/include/interruptvar.h#2 delete .. //depot/projects/opentoe/sys/powerpc/include/intr_machdep.h#2 integrate .. //depot/projects/opentoe/sys/powerpc/include/md_var.h#3 integrate .. //depot/projects/opentoe/sys/powerpc/include/openpicvar.h#2 integrate .. //depot/projects/opentoe/sys/powerpc/include/trap.h#2 integrate .. //depot/projects/opentoe/sys/powerpc/powermac/hrowpic.c#2 integrate .. //depot/projects/opentoe/sys/powerpc/powermac/hrowpicvar.h#2 integrate .. //depot/projects/opentoe/sys/powerpc/powermac/openpic_macio.c#2 integrate .. //depot/projects/opentoe/sys/powerpc/powerpc/autoconf.c#2 integrate .. //depot/projects/opentoe/sys/powerpc/powerpc/interrupt.c#2 integrate .. //depot/projects/opentoe/sys/powerpc/powerpc/intr_machdep.c#3 integrate .. //depot/projects/opentoe/sys/powerpc/powerpc/nexus.c#3 integrate .. //depot/projects/opentoe/sys/powerpc/powerpc/openpic.c#2 integrate .. //depot/projects/opentoe/sys/powerpc/powerpc/pic_if.m#2 integrate .. //depot/projects/opentoe/sys/powerpc/powerpc/trap.c#3 integrate .. //depot/projects/opentoe/sys/powerpc/psim/openpic_iobus.c#2 integrate .. //depot/projects/opentoe/sys/rpc/rpcclnt.c#4 integrate .. //depot/projects/opentoe/sys/security/mac/mac_syscalls.c#2 integrate .. //depot/projects/opentoe/sys/security/mac_mls/mac_mls.c#4 integrate .. //depot/projects/opentoe/sys/sparc64/include/iommureg.h#2 integrate .. //depot/projects/opentoe/sys/sparc64/include/iommuvar.h#2 integrate .. //depot/projects/opentoe/sys/sparc64/pci/psycho.c#3 integrate .. //depot/projects/opentoe/sys/sparc64/pci/psychoreg.h#2 integrate .. //depot/projects/opentoe/sys/sparc64/sbus/sbus.c#3 integrate .. //depot/projects/opentoe/sys/sparc64/sbus/sbusreg.h#2 integrate .. //depot/projects/opentoe/sys/sparc64/sparc64/eeprom.c#3 integrate .. //depot/projects/opentoe/sys/sparc64/sparc64/iommu.c#2 integrate .. //depot/projects/opentoe/sys/sparc64/sparc64/pmap.c#4 integrate .. //depot/projects/opentoe/sys/sparc64/sparc64/rtc.c#3 integrate .. //depot/projects/opentoe/sys/sys/ata.h#2 integrate .. //depot/projects/opentoe/sys/sys/kernel.h#3 integrate .. //depot/projects/opentoe/sys/sys/mutex.h#6 integrate .. //depot/projects/opentoe/sys/sys/proc.h#7 integrate .. //depot/projects/opentoe/sys/sys/rwlock.h#5 integrate .. //depot/projects/opentoe/sys/sys/vmmeter.h#5 integrate .. //depot/projects/opentoe/sys/ufs/ffs/ffs_vnops.c#6 integrate .. //depot/projects/opentoe/sys/vm/device_pager.c#2 integrate .. //depot/projects/opentoe/sys/vm/phys_pager.c#3 integrate .. //depot/projects/opentoe/sys/vm/swap_pager.c#7 integrate .. //depot/projects/opentoe/sys/vm/vm_fault.c#8 integrate .. //depot/projects/opentoe/sys/vm/vm_meter.c#5 integrate .. //depot/projects/opentoe/sys/vm/vm_page.c#6 integrate .. //depot/projects/opentoe/sys/vm/vm_page.h#4 integrate .. //depot/projects/opentoe/sys/vm/vm_pager.c#2 integrate .. //depot/projects/opentoe/sys/vm/vm_phys.c#2 integrate .. //depot/projects/opentoe/sys/vm/vm_phys.h#2 integrate .. //depot/projects/opentoe/sys/vm/vm_zeroidle.c#5 integrate .. //depot/projects/opentoe/sys/vm/vnode_pager.c#5 integrate .. //depot/projects/opentoe/tools/build/options/WITHOUT_TOOLCHAIN#2 integrate .. //depot/projects/opentoe/tools/regression/environ/envctl.c#2 integrate .. //depot/projects/opentoe/tools/regression/environ/envtest.t#2 integrate .. //depot/projects/opentoe/tools/regression/environ/timings.c#2 integrate .. //depot/projects/opentoe/tools/regression/fstest/fstest.c#2 integrate .. //depot/projects/opentoe/tools/regression/fstest/tests/open/16.t#2 integrate .. //depot/projects/opentoe/tools/regression/fstest/tests/open/18.t#2 integrate .. //depot/projects/opentoe/tools/regression/lib/libutil/Makefile#2 integrate .. //depot/projects/opentoe/tools/regression/lib/libutil/test-flopen.c#1 branch .. //depot/projects/opentoe/tools/regression/lib/libutil/test-flopen.t#1 branch .. //depot/projects/opentoe/tools/regression/tmpfs/h_tools.c#2 integrate .. //depot/projects/opentoe/tools/regression/tmpfs/t_mount#2 integrate .. //depot/projects/opentoe/tools/regression/tmpfs/t_rename#2 integrate .. //depot/projects/opentoe/tools/tools/net80211/Makefile#2 integrate .. //depot/projects/opentoe/tools/tools/net80211/README#2 integrate .. //depot/projects/opentoe/tools/tools/net80211/wlandebug/Makefile#2 delete .. //depot/projects/opentoe/tools/tools/net80211/wlandebug/wlandebug.8#2 delete .. //depot/projects/opentoe/tools/tools/net80211/wlandebug/wlandebug.c#3 delete .. //depot/projects/opentoe/usr.bin/calendar/calendars/calendar.holiday#2 integrate .. //depot/projects/opentoe/usr.bin/kdump/mkioctls#2 integrate .. //depot/projects/opentoe/usr.bin/locate/locate/locate.rc#2 integrate .. //depot/projects/opentoe/usr.bin/netstat/atalk.c#2 integrate .. //depot/projects/opentoe/usr.bin/netstat/bpf.c#2 integrate .. //depot/projects/opentoe/usr.bin/netstat/if.c#2 integrate .. //depot/projects/opentoe/usr.bin/netstat/inet.c#4 integrate .. //depot/projects/opentoe/usr.bin/netstat/inet6.c#2 integrate .. //depot/projects/opentoe/usr.bin/netstat/ipsec.c#3 integrate .. //depot/projects/opentoe/usr.bin/netstat/ipx.c#2 integrate .. //depot/projects/opentoe/usr.bin/netstat/main.c#4 integrate .. //depot/projects/opentoe/usr.bin/netstat/mbuf.c#2 integrate .. //depot/projects/opentoe/usr.bin/netstat/mcast.c#3 integrate .. //depot/projects/opentoe/usr.bin/netstat/mroute.c#2 integrate .. //depot/projects/opentoe/usr.bin/netstat/mroute6.c#2 integrate .. //depot/projects/opentoe/usr.bin/netstat/netgraph.c#2 integrate .. //depot/projects/opentoe/usr.bin/netstat/netstat.h#4 integrate .. //depot/projects/opentoe/usr.bin/netstat/pfkey.c#3 integrate .. //depot/projects/opentoe/usr.bin/netstat/route.c#2 integrate .. //depot/projects/opentoe/usr.bin/netstat/sctp.c#2 integrate .. //depot/projects/opentoe/usr.bin/netstat/unix.c#2 integrate .. //depot/projects/opentoe/usr.bin/su/su.1#2 integrate .. //depot/projects/opentoe/usr.bin/tar/Makefile#5 integrate .. //depot/projects/opentoe/usr.bin/tar/bsdtar.c#4 integrate .. //depot/projects/opentoe/usr.bin/tar/getdate.y#2 integrate .. //depot/projects/opentoe/usr.bin/tar/read.c#5 integrate .. //depot/projects/opentoe/usr.bin/truss/i386-fbsd.c#4 integrate .. //depot/projects/opentoe/usr.bin/truss/main.c#4 integrate .. //depot/projects/opentoe/usr.bin/truss/powerpc-fbsd.c#4 integrate .. //depot/projects/opentoe/usr.bin/truss/syscalls.c#3 integrate .. //depot/projects/opentoe/usr.bin/vmstat/vmstat.c#2 integrate .. //depot/projects/opentoe/usr.sbin/Makefile#3 integrate .. //depot/projects/opentoe/usr.sbin/acpi/acpidump/acpi_user.c#3 integrate .. //depot/projects/opentoe/usr.sbin/bsnmpd/modules/snmp_bridge/BEGEMOT-BRIDGE-MIB.txt#2 integrate .. //depot/projects/opentoe/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c#2 integrate .. //depot/projects/opentoe/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h#2 integrate .. //depot/projects/opentoe/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c#2 integrate .. //depot/projects/opentoe/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_tree.def#2 integrate .. //depot/projects/opentoe/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3#3 integrate .. //depot/projects/opentoe/usr.sbin/freebsd-update/freebsd-update.sh#3 integrate .. //depot/projects/opentoe/usr.sbin/iostat/iostat.c#3 integrate .. //depot/projects/opentoe/usr.sbin/nscd/Makefile#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/agent.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/agent.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/agents/Makefile.inc#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/agents/group.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/agents/group.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/agents/passwd.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/agents/passwd.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/agents/services.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/agents/services.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/cachelib.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/cachelib.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/cacheplcs.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/cacheplcs.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/config.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/config.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/debug.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/debug.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/hashtable.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/log.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/log.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/mp_rs_query.#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/mp_rs_query.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/mp_rs_query.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/mp_ws_query.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/mp_ws_query.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/nscd.8#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/nscd.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/nscd.conf.5#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/nscdcli.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/nscdcli.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/parser.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/parser.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/protocol.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/protocol.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/query.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/query.h#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/singletons.c#1 branch .. //depot/projects/opentoe/usr.sbin/nscd/singletons.h#1 branch .. //depot/projects/opentoe/usr.sbin/periodic/periodic.8#3 integrate .. //depot/projects/opentoe/usr.sbin/portsnap/portsnap/portsnap.sh#2 integrate .. //depot/projects/opentoe/usr.sbin/rpc.statd/file.c#2 integrate .. //depot/projects/opentoe/usr.sbin/rpc.statd/statd.c#3 integrate .. //depot/projects/opentoe/usr.sbin/wlandebug/Makefile#1 branch .. //depot/projects/opentoe/usr.sbin/wlandebug/wlandebug.8#1 branch .. //depot/projects/opentoe/usr.sbin/wlandebug/wlandebug.c#1 branch .. //depot/projects/opentoe/usr.sbin/wpa/wpa_passphrase/wpa_passphrase.8#2 integrate Differences ... ==== //depot/projects/opentoe/ObsoleteFiles.inc#13 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.105 2007/07/12 00:02:12 dougb Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.109 2007/08/07 23:48:30 marcel Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -14,6 +14,85 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20070807: removal of PowerPC specific header file. +.if ${TARGET_ARCH} == "powerpc" +OLD_FILES+=usr/include/machine/interruptvar.h +.endif +# 20070801: fast_ipsec.4 gone +OLD_FILES+=usr/share/man/man4/fast_ipsec.4.gz +# 20070715: netatm temporarily disconnected +OLD_FILES+=rescue/atm +OLD_FILES+=rescue/fore_dnld +OLD_FILES+=rescue/ilmid +OLD_FILES+=sbin/atm +OLD_FILES+=sbin/fore_dnld +OLD_FILES+=sbin/ilmid +OLD_FILES+=usr/include/libatm.h +OLD_FILES+=usr/include/netatm/atm.h +OLD_FILES+=usr/include/netatm/atm_cm.h +OLD_FILES+=usr/include/netatm/atm_if.h +OLD_FILES+=usr/include/netatm/atm_ioctl.h +OLD_FILES+=usr/include/netatm/atm_pcb.h +OLD_FILES+=usr/include/netatm/atm_sap.h +OLD_FILES+=usr/include/netatm/atm_sigmgr.h +OLD_FILES+=usr/include/netatm/atm_stack.h +OLD_FILES+=usr/include/netatm/atm_sys.h +OLD_FILES+=usr/include/netatm/atm_var.h +OLD_FILES+=usr/include/netatm/atm_vc.h +OLD_FILES+=usr/include/netatm/ipatm/ipatm.h +OLD_FILES+=usr/include/netatm/ipatm/ipatm_serv.h +OLD_FILES+=usr/include/netatm/ipatm/ipatm_var.h +OLD_FILES+=usr/include/netatm/port.h +OLD_FILES+=usr/include/netatm/queue.h +OLD_FILES+=usr/include/netatm/sigpvc/sigpvc_var.h +OLD_FILES+=usr/include/netatm/spans/spans_cls.h +OLD_FILES+=usr/include/netatm/spans/spans_kxdr.h +OLD_FILES+=usr/include/netatm/spans/spans_var.h +OLD_FILES+=usr/include/netatm/uni/sscf_uni.h +OLD_FILES+=usr/include/netatm/uni/sscf_uni_var.h +OLD_FILES+=usr/include/netatm/uni/sscop.h +OLD_FILES+=usr/include/netatm/uni/sscop_misc.h +OLD_FILES+=usr/include/netatm/uni/sscop_pdu.h +OLD_FILES+=usr/include/netatm/uni/sscop_var.h +OLD_FILES+=usr/include/netatm/uni/uni.h +OLD_FILES+=usr/include/netatm/uni/uniip_var.h +OLD_FILES+=usr/include/netatm/uni/unisig.h +OLD_FILES+=usr/include/netatm/uni/unisig_decode.h +OLD_FILES+=usr/include/netatm/uni/unisig_mbuf.h +OLD_FILES+=usr/include/netatm/uni/unisig_msg.h +OLD_FILES+=usr/include/netatm/uni/unisig_print.h +OLD_FILES+=usr/include/netatm/uni/unisig_var.h +OLD_FILES+=usr/lib/libatm.a +OLD_FILES+=usr/lib/libatm_p.a +OLD_FILES+=usr/sbin/atmarpd +OLD_FILES+=usr/sbin/scspd +OLD_FILES+=usr/share/man/en.ISO8859-1/man8/atm.8.gz +OLD_FILES+=usr/share/man/en.ISO8859-1/man8/atmarpd.8.gz +OLD_FILES+=usr/share/man/en.ISO8859-1/man8/fore_dnld.8.gz +OLD_FILES+=usr/share/man/en.ISO8859-1/man8/ilmid.8.gz +OLD_FILES+=usr/share/man/en.ISO8859-1/man8/scspd.8.gz +OLD_FILES+=usr/share/man/man8/atm.8.gz +OLD_FILES+=usr/share/man/man8/atmarpd.8.gz +OLD_FILES+=usr/share/man/man8/fore_dnld.8.gz +OLD_FILES+=usr/share/man/man8/ilmid.8.gz +OLD_FILES+=usr/share/man/man8/scspd.8.gz +OLD_FILES+=usr/share/examples/atm/NOTES +OLD_FILES+=usr/share/examples/atm/README +OLD_FILES+=usr/share/examples/atm/Startup +OLD_FILES+=usr/share/examples/atm/atm-config.sh +OLD_FILES+=usr/share/examples/atm/atm-sockets.txt +OLD_FILES+=usr/share/examples/atm/cpcs-design.txt +OLD_FILES+=usr/share/examples/atm/fore-microcode.txt +OLD_FILES+=usr/share/examples/atm/sscf-design.txt +OLD_FILES+=usr/share/examples/atm/sscop-design.txt +OLD_LIBS+=lib/libatm.so.5 +OLD_LIBS+=usr/lib/libatm.so +OLD_DIRS+=usr/include/netatm/sigpvc +OLD_DIRS+=usr/include/netatm/spans +OLD_DIRS+=usr/include/netatm/ipatm +OLD_DIRS+=usr/include/netatm/uni +OLD_DIRS+=usr/include/netatm +OLD_DIRS+=usr/share/examples/atm # 20070705: I4B headers repo-copied to include/i4b/ .if ${TARGET_ARCH} == "i386" OLD_FILES+=usr/include/machine/i4b_cause.h @@ -104,6 +183,8 @@ OLD_LIBS+=usr/lib/snmp_mibII.so.4 OLD_LIBS+=usr/lib/snmp_netgraph.so.4 OLD_LIBS+=usr/lib/snmp_pf.so.4 +# 20070613: IPX over IP tunnel removal +OLD_FILES+=usr/include/netipx/ipx_ip.h # 20070605: sched_core removal OLD_FILES+=usr/share/man/man4/sched_core.4.gz # 20070603: BIND 9.4.1 import @@ -242,6 +323,230 @@ OLD_FILES+=usr/libexec/f771 OLD_FILES+=usr/share/info/g77.info.gz OLD_FILES+=usr/share/man/man1/f77.1.gz +OLD_FILES+=usr/include/c++/3.4/algorithm +OLD_FILES+=usr/include/c++/3.4/backward/algo.h +OLD_FILES+=usr/include/c++/3.4/backward/algobase.h +OLD_FILES+=usr/include/c++/3.4/backward/alloc.h +OLD_FILES+=usr/include/c++/3.4/backward/backward_warning.h +OLD_FILES+=usr/include/c++/3.4/backward/bvector.h +OLD_FILES+=usr/include/c++/3.4/backward/complex.h +OLD_FILES+=usr/include/c++/3.4/backward/defalloc.h +OLD_FILES+=usr/include/c++/3.4/backward/deque.h +OLD_FILES+=usr/include/c++/3.4/backward/fstream.h +OLD_FILES+=usr/include/c++/3.4/backward/function.h +OLD_FILES+=usr/include/c++/3.4/backward/hash_map.h +OLD_FILES+=usr/include/c++/3.4/backward/hash_set.h +OLD_FILES+=usr/include/c++/3.4/backward/hashtable.h +OLD_FILES+=usr/include/c++/3.4/backward/heap.h +OLD_FILES+=usr/include/c++/3.4/backward/iomanip.h +OLD_FILES+=usr/include/c++/3.4/backward/iostream.h +OLD_FILES+=usr/include/c++/3.4/backward/istream.h +OLD_FILES+=usr/include/c++/3.4/backward/iterator.h +OLD_FILES+=usr/include/c++/3.4/backward/list.h +OLD_FILES+=usr/include/c++/3.4/backward/map.h +OLD_FILES+=usr/include/c++/3.4/backward/multimap.h +OLD_FILES+=usr/include/c++/3.4/backward/multiset.h +OLD_FILES+=usr/include/c++/3.4/backward/new.h +OLD_FILES+=usr/include/c++/3.4/backward/ostream.h +OLD_FILES+=usr/include/c++/3.4/backward/pair.h +OLD_FILES+=usr/include/c++/3.4/backward/queue.h +OLD_FILES+=usr/include/c++/3.4/backward/rope.h +OLD_FILES+=usr/include/c++/3.4/backward/set.h +OLD_FILES+=usr/include/c++/3.4/backward/slist.h +OLD_FILES+=usr/include/c++/3.4/backward/stack.h +OLD_FILES+=usr/include/c++/3.4/backward/stream.h +OLD_FILES+=usr/include/c++/3.4/backward/streambuf.h +OLD_FILES+=usr/include/c++/3.4/backward/strstream +OLD_FILES+=usr/include/c++/3.4/backward/tempbuf.h +OLD_FILES+=usr/include/c++/3.4/backward/tree.h +OLD_FILES+=usr/include/c++/3.4/backward/vector.h +OLD_FILES+=usr/include/c++/3.4/bits/allocator.h +OLD_FILES+=usr/include/c++/3.4/bits/atomic_word.h +OLD_FILES+=usr/include/c++/3.4/bits/atomicity.h +OLD_FILES+=usr/include/c++/3.4/bits/basic_file.h +OLD_FILES+=usr/include/c++/3.4/bits/basic_ios.h +OLD_FILES+=usr/include/c++/3.4/bits/basic_ios.tcc +OLD_FILES+=usr/include/c++/3.4/bits/basic_string.h +OLD_FILES+=usr/include/c++/3.4/bits/basic_string.tcc +OLD_FILES+=usr/include/c++/3.4/bits/boost_concept_check.h +OLD_FILES+=usr/include/c++/3.4/bits/c++allocator.h +OLD_FILES+=usr/include/c++/3.4/bits/c++config.h +OLD_FILES+=usr/include/c++/3.4/bits/c++io.h +OLD_FILES+=usr/include/c++/3.4/bits/c++locale.h +OLD_FILES+=usr/include/c++/3.4/bits/c++locale_internal.h +OLD_FILES+=usr/include/c++/3.4/bits/char_traits.h +OLD_FILES+=usr/include/c++/3.4/bits/cmath.tcc +OLD_FILES+=usr/include/c++/3.4/bits/codecvt.h +OLD_FILES+=usr/include/c++/3.4/bits/codecvt_specializations.h +OLD_FILES+=usr/include/c++/3.4/bits/concept_check.h +OLD_FILES+=usr/include/c++/3.4/bits/concurrence.h +OLD_FILES+=usr/include/c++/3.4/bits/cpp_type_traits.h +OLD_FILES+=usr/include/c++/3.4/bits/ctype_base.h +OLD_FILES+=usr/include/c++/3.4/bits/ctype_inline.h +OLD_FILES+=usr/include/c++/3.4/bits/ctype_noninline.h +OLD_FILES+=usr/include/c++/3.4/bits/deque.tcc +OLD_FILES+=usr/include/c++/3.4/bits/fstream.tcc +OLD_FILES+=usr/include/c++/3.4/bits/functexcept.h +OLD_FILES+=usr/include/c++/3.4/bits/gslice.h +OLD_FILES+=usr/include/c++/3.4/bits/gslice_array.h +OLD_FILES+=usr/include/c++/3.4/bits/gthr-default.h +OLD_FILES+=usr/include/c++/3.4/bits/gthr-posix.h +OLD_FILES+=usr/include/c++/3.4/bits/gthr-single.h +OLD_FILES+=usr/include/c++/3.4/bits/gthr.h +OLD_FILES+=usr/include/c++/3.4/bits/indirect_array.h +OLD_FILES+=usr/include/c++/3.4/bits/ios_base.h +OLD_FILES+=usr/include/c++/3.4/bits/istream.tcc +OLD_FILES+=usr/include/c++/3.4/bits/list.tcc +OLD_FILES+=usr/include/c++/3.4/bits/locale_classes.h +OLD_FILES+=usr/include/c++/3.4/bits/locale_facets.h +OLD_FILES+=usr/include/c++/3.4/bits/locale_facets.tcc +OLD_FILES+=usr/include/c++/3.4/bits/localefwd.h +OLD_FILES+=usr/include/c++/3.4/bits/mask_array.h +OLD_FILES+=usr/include/c++/3.4/bits/messages_members.h +OLD_FILES+=usr/include/c++/3.4/bits/os_defines.h +OLD_FILES+=usr/include/c++/3.4/bits/ostream.tcc +OLD_FILES+=usr/include/c++/3.4/bits/postypes.h +OLD_FILES+=usr/include/c++/3.4/bits/slice_array.h +OLD_FILES+=usr/include/c++/3.4/bits/sstream.tcc +OLD_FILES+=usr/include/c++/3.4/bits/stl_algo.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_algobase.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_bvector.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_construct.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_deque.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_function.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_heap.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_iterator.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_iterator_base_funcs.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_iterator_base_types.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_list.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_map.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_multimap.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_multiset.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_numeric.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_pair.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_queue.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_raw_storage_iter.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_relops.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_set.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_stack.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_tempbuf.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_threads.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_tree.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_uninitialized.h +OLD_FILES+=usr/include/c++/3.4/bits/stl_vector.h +OLD_FILES+=usr/include/c++/3.4/bits/stream_iterator.h +OLD_FILES+=usr/include/c++/3.4/bits/streambuf.tcc +OLD_FILES+=usr/include/c++/3.4/bits/streambuf_iterator.h +OLD_FILES+=usr/include/c++/3.4/bits/stringfwd.h +OLD_FILES+=usr/include/c++/3.4/bits/time_members.h +OLD_FILES+=usr/include/c++/3.4/bits/type_traits.h +OLD_FILES+=usr/include/c++/3.4/bits/valarray_after.h +OLD_FILES+=usr/include/c++/3.4/bits/valarray_array.h +OLD_FILES+=usr/include/c++/3.4/bits/valarray_array.tcc +OLD_FILES+=usr/include/c++/3.4/bits/valarray_before.h +OLD_FILES+=usr/include/c++/3.4/bits/vector.tcc +OLD_FILES+=usr/include/c++/3.4/bitset +OLD_FILES+=usr/include/c++/3.4/cassert +OLD_FILES+=usr/include/c++/3.4/cctype +OLD_FILES+=usr/include/c++/3.4/cerrno +OLD_FILES+=usr/include/c++/3.4/cfloat +OLD_FILES+=usr/include/c++/3.4/ciso646 +OLD_FILES+=usr/include/c++/3.4/climits +OLD_FILES+=usr/include/c++/3.4/clocale +OLD_FILES+=usr/include/c++/3.4/cmath +OLD_FILES+=usr/include/c++/3.4/complex +OLD_FILES+=usr/include/c++/3.4/csetjmp +OLD_FILES+=usr/include/c++/3.4/csignal +OLD_FILES+=usr/include/c++/3.4/cstdarg +OLD_FILES+=usr/include/c++/3.4/cstddef +OLD_FILES+=usr/include/c++/3.4/cstdio +OLD_FILES+=usr/include/c++/3.4/cstdlib +OLD_FILES+=usr/include/c++/3.4/cstring +OLD_FILES+=usr/include/c++/3.4/ctime +OLD_FILES+=usr/include/c++/3.4/cwchar +OLD_FILES+=usr/include/c++/3.4/cwctype +OLD_FILES+=usr/include/c++/3.4/cxxabi.h +OLD_FILES+=usr/include/c++/3.4/debug/bitset +OLD_FILES+=usr/include/c++/3.4/debug/debug.h +OLD_FILES+=usr/include/c++/3.4/debug/deque +OLD_FILES+=usr/include/c++/3.4/debug/formatter.h +OLD_FILES+=usr/include/c++/3.4/debug/hash_map +OLD_FILES+=usr/include/c++/3.4/debug/hash_map.h +OLD_FILES+=usr/include/c++/3.4/debug/hash_multimap.h +OLD_FILES+=usr/include/c++/3.4/debug/hash_multiset.h +OLD_FILES+=usr/include/c++/3.4/debug/hash_set +OLD_FILES+=usr/include/c++/3.4/debug/hash_set.h +OLD_FILES+=usr/include/c++/3.4/debug/list +OLD_FILES+=usr/include/c++/3.4/debug/map +OLD_FILES+=usr/include/c++/3.4/debug/map.h +OLD_FILES+=usr/include/c++/3.4/debug/multimap.h +OLD_FILES+=usr/include/c++/3.4/debug/multiset.h +OLD_FILES+=usr/include/c++/3.4/debug/safe_base.h +OLD_FILES+=usr/include/c++/3.4/debug/safe_iterator.h +OLD_FILES+=usr/include/c++/3.4/debug/safe_iterator.tcc +OLD_FILES+=usr/include/c++/3.4/debug/safe_sequence.h +OLD_FILES+=usr/include/c++/3.4/debug/set >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Aug 14 00:12:22 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 753C416A41B; Tue, 14 Aug 2007 00:12:22 +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 1D15F16A417 for ; Tue, 14 Aug 2007 00:12:22 +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 E4A1613C442 for ; Tue, 14 Aug 2007 00:12:21 +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 l7E0CLMu027368 for ; Tue, 14 Aug 2007 00:12:21 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7E0CL0K027365 for perforce@freebsd.org; Tue, 14 Aug 2007 00:12:21 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 14 Aug 2007 00:12:21 GMT Message-Id: <200708140012.l7E0CL0K027365@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 125124 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, 14 Aug 2007 00:12:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=125124 Change 125124 by kmacy@kmacy_home:ethng on 2007/08/14 00:12:14 Fix double free causing by double queueing Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#7 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#7 (text+ko) ==== @@ -445,6 +445,7 @@ else { txq = &qs->txq[TXQ_ETH]; err = cxgb_pcpu_pkt_coalesce(txq, immpkt, &complete); + immpkt = NULL; } if (err) { if (cxgb_debug) From owner-p4-projects@FreeBSD.ORG Tue Aug 14 00:16:31 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7430F16A41B; Tue, 14 Aug 2007 00:16: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 30C6416A418 for ; Tue, 14 Aug 2007 00:16: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 1CD5A13C45D for ; Tue, 14 Aug 2007 00:16: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 l7E0GU0o027631 for ; Tue, 14 Aug 2007 00:16:30 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7E0GUmV027628 for perforce@freebsd.org; Tue, 14 Aug 2007 00:16:30 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 14 Aug 2007 00:16:30 GMT Message-Id: <200708140016.l7E0GUmV027628@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 125126 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, 14 Aug 2007 00:16:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=125126 Change 125126 by kmacy@kmacy_home:ethng on 2007/08/14 00:15:29 track rss_hash as queue cookie so that tx goes out on the same cpu/queue as rx Affected files ... .. //depot/projects/ethng/src/sys/netinet/tcp_input.c#2 edit .. //depot/projects/ethng/src/sys/netinet/tcp_output.c#2 edit Differences ... ==== //depot/projects/ethng/src/sys/netinet/tcp_input.c#2 (text+ko) ==== @@ -632,6 +632,7 @@ INP_UNLOCK(inp); /* listen socket */ inp = sotoinpcb(so); INP_LOCK(inp); /* new connection */ + inp->inp_rss_hash = m->m_pkthdr.rss_hash; tp = intotcpcb(inp); KASSERT(tp->t_state == TCPS_SYN_RECEIVED, ("%s: ", __func__)); @@ -833,8 +834,8 @@ */ INP_INFO_UNLOCK_ASSERT(&tcbinfo); return; - } - + } else if (inp->inp_rss_hash != m->m_pkthdr.rss_hash && m->m_pkthdr.rss_hash) + inp->inp_rss_hash = m->m_pkthdr.rss_hash; /* * Segment belongs to a connection in SYN_SENT, ESTABLISHED or later * state. tcp_do_segment() always consumes the mbuf chain, unlocks ==== //depot/projects/ethng/src/sys/netinet/tcp_output.c#2 (text+ko) ==== @@ -1122,6 +1122,7 @@ if (path_mtu_discovery) ip->ip_off |= IP_DF; + m->m_pkthdr.rss_hash = tp->t_inpcb->inp_rss_hash; error = ip_output(m, tp->t_inpcb->inp_options, NULL, ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0, tp->t_inpcb); From owner-p4-projects@FreeBSD.ORG Tue Aug 14 00:24:42 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8032516A41A; Tue, 14 Aug 2007 00:24:42 +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 333BB16A41B for ; Tue, 14 Aug 2007 00:24:42 +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 E157113C46B for ; Tue, 14 Aug 2007 00:24:41 +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 l7E0OfqP028100 for ; Tue, 14 Aug 2007 00:24:41 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7E0Ofu5028097 for perforce@freebsd.org; Tue, 14 Aug 2007 00:24:41 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 14 Aug 2007 00:24:41 GMT Message-Id: <200708140024.l7E0Ofu5028097@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 125127 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, 14 Aug 2007 00:24:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=125127 Change 125127 by kmacy@kmacy_home:ethng on 2007/08/14 00:24:29 set rss_hash in mbuf to pass down to driver queue to use Affected files ... .. //depot/projects/ethng/src/sys/netinet/udp_usrreq.c#2 edit Differences ... ==== //depot/projects/ethng/src/sys/netinet/udp_usrreq.c#2 (text+ko) ==== @@ -967,6 +967,7 @@ if (unlock_udbinfo) INP_INFO_WUNLOCK(&udbinfo); + m->m_pkthdr.rss_hash = inp->inp_rss_hash; error = ip_output(m, inp->inp_options, NULL, ipflags, inp->inp_moptions, inp); INP_UNLOCK(inp); From owner-p4-projects@FreeBSD.ORG Tue Aug 14 00:44:06 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9636816A41A; Tue, 14 Aug 2007 00:44: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 30B3216A417 for ; Tue, 14 Aug 2007 00:44: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 1BEA313C465 for ; Tue, 14 Aug 2007 00:44: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 l7E0i5iS029273 for ; Tue, 14 Aug 2007 00:44:05 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7E0i5El029270 for perforce@freebsd.org; Tue, 14 Aug 2007 00:44:05 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 14 Aug 2007 00:44:05 GMT Message-Id: <200708140044.l7E0i5El029270@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 125128 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, 14 Aug 2007 00:44:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=125128 Change 125128 by kmacy@kmacy_home:ethng on 2007/08/14 00:43:10 Allow any cpu to use any tx queue by protecting the txq with its lock as opposed to cpu binding - it isn't clear how much the strong affinity buys us without complicating the scheduler and it doesn't really reduce locking because we still have to go through the motions of waking up the bound service thread + this greatly simplifies the logic because we don't have to special case the local queue any more the txq lock is either free and the queue is not stalled in which case the packet is directly transmitted or the queue is busy in which case the packet is enqueue on the packets ring buffer + this also eliminates the need for the rss_hash to be "correct" as an ack can always be transmitted directly without any queueing delay, the rss_hash simply ends up being there for load balancing and as an affinity hint + the one interesting thing that this approach brings up is the possibility of adding an interface that allows the TCP stack to tell the driver to put a packet at the *head* of a queue so that an inbound stream is not slowed down by an outbound stream Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#8 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#8 (text+ko) ==== @@ -396,11 +396,9 @@ qs->qs_cpuid, curcpu)); reclaimed = j = 0; - while ((reclaimable = desc_reclaimable(txq)) > 0) { - critical_enter(); - + reclaimable = desc_reclaimable(txq); + while (reclaimable > 0) { n = t3_free_tx_desc(txq, min(reclaimable, TX_CLEAN_MAX_DESC), m_vec); - critical_exit(); reclaimed += min(reclaimable, TX_CLEAN_MAX_DESC); @@ -412,12 +410,11 @@ m_freem_vec(m_vec[i]); j++; - critical_enter(); txq->cleaned += reclaimed; txq->in_use -= reclaimed; if (isset(&qs->txq_stopped, TXQ_ETH)) clrbit(&qs->txq_stopped, TXQ_ETH); - critical_exit(); + reclaimable = desc_reclaimable(txq); } return (reclaimed); @@ -455,7 +452,6 @@ return (err); } - immpkt = NULL; if (desc_reclaimable(txq) > 0) { int reclaimed = 0; @@ -495,70 +491,35 @@ return (err); } -static int -cxgb_pcpu_txq_trylock(struct sge_txq *txq) -{ - critical_enter(); - if (txq->flags & TXQ_TRANSMITTING) { - critical_exit(); - DPRINTF("transmit in progress\n"); - return (0); - } - txq->flags |= TXQ_TRANSMITTING; - critical_exit(); - return (1); -} - -static void -cxgb_pcpu_txq_unlock(struct sge_txq *txq) -{ - critical_enter(); - txq->flags &= ~TXQ_TRANSMITTING; - critical_exit(); -} int cxgb_pcpu_start(struct ifnet *ifp, struct mbuf *immpkt) { uint32_t cookie; int err, qidx, locked; struct port_info *pi; - struct sge_qset *immqs, *curqs; + struct sge_qset *qs; struct sge_txq *txq = NULL /* gcc is dumb */; pi = ifp->if_softc; - immqs = curqs = NULL; + qs = NULL; err = cookie = locked = 0; - sched_pin(); + if (immpkt && (immpkt->m_pkthdr.rss_hash != 0)) { cookie = immpkt->m_pkthdr.rss_hash; qidx = cxgb_pcpu_cookie_to_qidx(pi, cookie); DPRINTF("hash=0x%x qidx=%d cpu=%d\n", immpkt->m_pkthdr.rss_hash, qidx, curcpu); - immqs = &pi->adapter->sge.qs[qidx]; - if (immqs->qs_cpuid != curcpu) { - cxgb_pcpu_enqueue_packet_(immqs, immpkt); - immpkt = NULL; - } - } - if (curcpu < pi->first_qset || curcpu >= (pi->first_qset + pi->nqsets)) { - /* - * If packet isn't tagged and there is no queue for this cpu - */ - if (immpkt) { - immqs = &pi->adapter->sge.qs[pi->first_qset]; - cxgb_pcpu_enqueue_packet_(immqs, immpkt); - } - goto done; - } - curqs = &pi->adapter->sge.qs[curcpu]; - txq = &curqs->txq[TXQ_ETH]; - if (cxgb_pcpu_txq_trylock(txq)) { - err = cxgb_pcpu_start_(curqs, immpkt, FALSE); - cxgb_pcpu_txq_unlock(txq); + qs = &pi->adapter->sge.qs[qidx]; + } else + qs = &pi->adapter->sge.qs[pi->first_qset]; + + txq = &qs->txq[TXQ_ETH]; + + if (mtx_trylock(&txq->lock)) { + err = cxgb_pcpu_start_(qs, immpkt, FALSE); + mtx_unlock(&txq->lock); } else if (immpkt) - err = cxgb_pcpu_enqueue_packet_(curqs, immpkt); -done: - sched_unpin(); + err = cxgb_pcpu_enqueue_packet_(qs, immpkt); return ((err == ENOSPC) ? 0 : err); } @@ -584,7 +545,6 @@ IFQ_UNLOCK(&ifp->if_snd); printf("dequeued %d packets\n", i); lhead = ltail = NULL; - sched_pin(); for (m = head; m != NULL; m = head->m_nextpkt) { calc_cookie = cxgb_pcpu_calc_cookie(ifp, m); qidx = cxgb_pcpu_cookie_to_qidx(pi, calc_cookie); @@ -608,18 +568,12 @@ * Assume one-to-one mapping of qset to CPU for now XXX */ - if (cxgb_pcpu_txq_trylock(&qs->txq[TXQ_ETH])) { - (void)cxgb_pcpu_start_(qs, NULL, TRUE); - cxgb_pcpu_txq_unlock(&qs->txq[TXQ_ETH]); - } else { - /* + (void)cxgb_pcpu_start_(qs, NULL, TRUE); + /* * XXX multiple packets */ cxgb_pcpu_enqueue_packet_(qs, lhead); - - } } - sched_unpin(); } static void @@ -638,15 +592,16 @@ thread_unlock(td); DELAY(qs->qs_cpuid*100000); - printf("bound to %d running on %d\n", qs->qs_cpuid, curcpu); + if (bootverbose) + printf("bound to %d running on %d\n", qs->qs_cpuid, curcpu); for (;;) { if (qs->qs_flags & QS_EXITING) break; - if (cxgb_pcpu_txq_trylock(&qs->txq[TXQ_ETH])) { + if (mtx_trylock(&qs->txq[TXQ_ETH].lock)) { err = cxgb_pcpu_start_(qs, NULL, TRUE); - cxgb_pcpu_txq_unlock(&qs->txq[TXQ_ETH]); + mtx_unlock(&qs->txq[TXQ_ETH].lock); } else err = EINPROGRESS; From owner-p4-projects@FreeBSD.ORG Tue Aug 14 08:45:04 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5A39516A418; Tue, 14 Aug 2007 08:45:04 +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 164DE16A41B for ; Tue, 14 Aug 2007 08:45:04 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 02D2C13C45E for ; Tue, 14 Aug 2007 08:45:04 +0000 (UTC) (envelope-from dongmei@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 l7E8j3KX086103 for ; Tue, 14 Aug 2007 08:45:03 GMT (envelope-from dongmei@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7E8j33I086100 for perforce@freebsd.org; Tue, 14 Aug 2007 08:45:03 GMT (envelope-from dongmei@FreeBSD.org) Date: Tue, 14 Aug 2007 08:45:03 GMT Message-Id: <200708140845.l7E8j33I086100@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to dongmei@FreeBSD.org using -f From: dongmei To: Perforce Change Reviews Cc: Subject: PERFORCE change 125131 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, 14 Aug 2007 08:45:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=125131 Change 125131 by dongmei@dongmei2007 on 2007/08/14 08:44:27 add the support for lively audit log reading Affected files ... .. //depot/projects/soc2007/dongmei-auditanalyzer/Makefile#3 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/capture.c#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/capture.h#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/menu.c#3 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/tfile.c#3 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/tfile.h#2 edit Differences ... ==== //depot/projects/soc2007/dongmei-auditanalyzer/Makefile#3 (text+ko) ==== @@ -3,15 +3,15 @@ .PATH: ${.CURDIR}/gtk .PATH: ${.CURDIR}/image -SOURCES = main.c menu.c list_view.c tree_view.c file_dlg.c gui_utils.c simple_dialog.c trail_file_dlg.c filesystem.c buffer.c except.c file_access.c strerror.c tfile.c tsess.c file_util.c +SOURCES = main.c menu.c list_view.c tree_view.c file_dlg.c gui_utils.c simple_dialog.c trail_file_dlg.c filesystem.c buffer.c except.c file_access.c strerror.c tfile.c tsess.c file_util.c capture.c OBJS = ${SOURCES:.c=.o} CFLAGS = `pkg-config gtk+-2.0 --cflags` -D_U_="" -LDADD = `pkg-config gtk+-2.0 --libs` -lbsm +LDADD = `pkg-config gtk+-2.0 gthread-2.0 --libs` -lbsm CC = gcc PACKAGE = auanalyzer all: ${OBJS} - ${CC} -o ${PACKAGE} ${OBJS} ${LDADD} + ${CC} -g -o ${PACKAGE} ${OBJS} ${LDADD} .c.o: ${CC} ${CFLAGS} -c $< @@ -19,3 +19,4 @@ rm ${PACKAGE} ${OBJS} # end of file +#gthread-2.0 ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/menu.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ #include #include "compat_macros.h" #include "trail_file_dlg.h" - +#include "../capture.h" #define GTK_MENU_FUNC(a) ((GtkItemFactoryCallback)(a)) /* main menu */ @@ -33,6 +33,11 @@ // ITEM_FACTORY_ENTRY("/View/log _Details", NULL, tree_view_show_cb, 0, "", NULL), // ITEM_FACTORY_ENTRY("/View/log _Bytes", NULL, byte_view_show_cb, 0, "", NULL), ITEM_FACTORY_ENTRY("/_Capture", NULL, NULL, 0, "", NULL), + ITEM_FACTORY_STOCK_ENTRY("/Capture/_Start...", "O", capture_start_cb, + 0, GTK_STOCK_OPEN), + ITEM_FACTORY_STOCK_ENTRY("/Capture/_Stop...", "O", capture_stop_cb, + 0, GTK_STOCK_OPEN), + ITEM_FACTORY_ENTRY("/_Analyze", NULL, NULL, 0, "", NULL), ITEM_FACTORY_ENTRY("/_Statistics", NULL, NULL, 0, "", NULL), ITEM_FACTORY_ENTRY("/_Help", NULL, NULL, 0, "", NULL) ==== //depot/projects/soc2007/dongmei-auditanalyzer/tfile.c#3 (text+ko) ==== @@ -8,11 +8,20 @@ #include #include "exceptions.h" #include "gtk/tree_view.h" +#include /* Update the progress bar this many times when reading a file. */ #define N_PROGBAR_UPDATES 100 #define RECORD_DATA_CHUNK_SIZE 1024 +extern bool fstop; +typedef struct _carg carg; +struct _carg { + trailer_file *tf; + gint64 offset; + u_char *buf; + int reclen; +}; static guint32 cum_bytes = 0; void @@ -108,11 +117,46 @@ return CF_ERROR; } +tf_status_t +tf_open_auditpipe(trailer_file *tf, gboolean is_tempfile, int *err) +{ + gchar *err_info; + tsess *ts; -void -record_list_append_test(tokenstr_t *data,gint32 number) -{ - printf("%d\n",data->tt.hdr32.size); + ts=tsess_open_online(err,&err_info,FALSE); + if (ts==NULL) + goto fail; + + tf_reset_state(tf); + /* We're about to start reading the file. */ + tf->state = FILE_READ_IN_PROGRESS; + + tf->f_datalen = 0; + + /* Set the file name because we need it to set the follow stream filter. + XXX - is that still true? We need it for other reasons, though, + in any case. */ + tf->filename = g_strdup(DEFAULT_AUDIT_TRAIL); + + /* Indicate whether it's a permanent or temporary file. */ + tf->is_tempfile = is_tempfile; + + /* If it's a temporary capture buffer file, mark it as not saved. */ + tf->user_saved = !is_tempfile; + + tf->count = 0; + + tf->rlist_chunk = g_mem_chunk_new("record_data_chunk", + sizeof(record_data), + RECORD_DATA_CHUNK_SIZE * sizeof(record_data), + G_ALLOC_AND_FREE); + g_assert(tf->rlist_chunk); + tf->ts=ts; + return CF_OK; + +fail: + return CF_ERROR; + } /* */ @@ -173,7 +217,9 @@ tf->count++; rdata->num = tf->count; + gdk_threads_enter(); add_record_to_record_list(rdata,tf); + gdk_threads_leave(); return 0; } @@ -182,7 +228,86 @@ { main_window_exit(); } +/* read in a new record */ +/* returns the row of the new record in the record list or -1 if not displayed */ +int read_record_thread(carg *arg) +{ + record_data *rdata; + record_data *rlist_end; + int recsize=0; + //Allocate the next list entry, and add it to the list. + rdata = g_mem_chunk_alloc(arg->tf->rlist_chunk); + rdata->num = 0; + rdata->next = NULL; + rdata->prev = NULL; + rdata->record_len = arg->reclen; + + recsize=arg->reclen*sizeof(u_char); + if (arg->buf == NULL) + return (-1); + rdata->buf=(u_char *) malloc(recsize); + memcpy(rdata->buf,arg->buf,recsize); + + rdata->file_off = arg->offset; + + //construct double link list record_data + + rlist_end =arg->tf->rlist_end; + rdata->prev = rlist_end; + if (rlist_end != NULL) + rlist_end->next = rdata; + else + arg->tf->rlist = rdata; + arg->tf->rlist_end = rdata; + + arg->tf->count++; + rdata->num = arg->tf->count; + gdk_threads_enter(); + add_record_to_record_list(rdata,arg->tf); + gdk_threads_leave(); + return 0; + +} +/* +int read_record_thread(trailer_file *tf,gint64 offset,u_char *buf,int reclen) +{ + record_data *rdata; + record_data *rlist_end; + int recsize=0; + // Allocate the next list entry, and add it to the list. + rdata = g_mem_chunk_alloc(tf->rlist_chunk); + rdata->num = 0; + rdata->next = NULL; + rdata->prev = NULL; + rdata->record_len = reclen; + recsize=reclen*sizeof(u_char); + if (buf == NULL) + return (-1); + rdata->buf=(u_char *) malloc(recsize); + memcpy(rdata->buf,buf,recsize); + + rdata->file_off = offset; + + //construct double link list record_data + + rlist_end =tf->rlist_end; + rdata->prev = rlist_end; + if (rlist_end != NULL) + rlist_end->next = rdata; + else + tf->rlist = rdata; + tf->rlist_end = rdata; + + tf->count++; + rdata->num = tf->count; + gdk_threads_enter(); + add_record_to_record_list(rdata,tf); + gdk_threads_leave(); + return 0; + +} +*/ tf_read_status_t tf_read(trailer_file *tf) { @@ -265,6 +390,92 @@ } else return CF_READ_OK; } + +tf_read_status_t +tf_read_auditpipe(trailer_file *tf) +{ + int err=0; + gchar *err_info; + const gchar *name_ptr; + const char *errmsg; + char errmsg_errno[1024+1]; + gchar err_str[2048+1]; + gint64 data_offset; + gboolean stop_flag; + gint64 size, file_pos; + GTimeVal start_time; + gchar status_str[100]; + + cum_bytes=0; + printf("1\n"); + name_ptr = get_basename(tf->filename); + + /* Find the size of the file. */ + size = tsess_file_size(tf->ts, NULL); + printf("size=%d\n",size); + stop_flag = FALSE; + g_get_current_time(&start_time); + + u_char *buf; + tokenstr_t tok; + int reclen; + data_offset=0; + while ((reclen = au_read_rec(tf->ts->fh, &buf)) != -1 && !fstop) { + data_offset = data_offset+reclen; + TRY { + printf("%d\n",reclen); + gdk_threads_enter(); + read_record(tf,data_offset,buf,reclen); + gdk_threads_leave(); + free(buf); + } + CATCH(OutOfMemoryError) { + gpointer dialog; + + dialog = simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, + "%sOut Of Memory!%s\n" + "\n" + "Sorry, but Wireshark has to terminate now!\n" + "\n" + "Some infos / workarounds can be found at:\n" + "http://wiki.wireshark.org/KnownBugs/OutOfMemory", + simple_dialog_primary_start(), simple_dialog_primary_end()); + /* we have to terminate, as we cannot recover from the memory error */ + simple_dialog_set_cb(dialog, outofmemory_cb, NULL); + while(1) { + main_window_update(); + /* XXX - how to avoid a busy wait? */ + /* Sleep(100); */ + }; + break; + } + ENDTRY; + } + /* We're done reading sequentially through the file. */ + tf->state = FILE_READ_DONE; + + tf->current_record = tf->first_displayed; + + if (err != 0) { + /* Put up a message box noting that the read failed somewhere along + the line. Don't throw out the stuff we managed to read, though, + if any. */ + switch (err) { + default: + g_snprintf(errmsg_errno, sizeof(errmsg_errno), + "An error occurred while reading the" + " capture file: %s.", strerror(err)); + errmsg = errmsg_errno; + break; + } + g_snprintf(err_str, sizeof err_str, errmsg); + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, err_str); + return CF_READ_ERROR; + } else + return CF_READ_OK; + +} + /* Select the record on a given num. */ void tf_select_record(trailer_file *tf, int num) ==== //depot/projects/soc2007/dongmei-auditanalyzer/tfile.h#2 (text+ko) ==== @@ -52,3 +52,5 @@ CF_READ_ABORTED /**< operation aborted by user */ } tf_read_status_t; +tf_read_status_t tf_read_auditpipe(trailer_file *tf); + From owner-p4-projects@FreeBSD.ORG Tue Aug 14 08:50:11 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5269116A421; Tue, 14 Aug 2007 08:50: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 2069B16A468 for ; Tue, 14 Aug 2007 08:50:11 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0C6D813C469 for ; Tue, 14 Aug 2007 08:50:11 +0000 (UTC) (envelope-from dongmei@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 l7E8oAQi094905 for ; Tue, 14 Aug 2007 08:50:10 GMT (envelope-from dongmei@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7E8oAVV094902 for perforce@freebsd.org; Tue, 14 Aug 2007 08:50:10 GMT (envelope-from dongmei@FreeBSD.org) Date: Tue, 14 Aug 2007 08:50:10 GMT Message-Id: <200708140850.l7E8oAVV094902@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to dongmei@FreeBSD.org using -f From: dongmei To: Perforce Change Reviews Cc: Subject: PERFORCE change 125132 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, 14 Aug 2007 08:50:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=125132 Change 125132 by dongmei@dongmei2007 on 2007/08/14 08:49:24 padding the before submit Affected files ... .. //depot/projects/soc2007/dongmei-auditanalyzer/file_access.c#2 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/list_view.c#5 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/tsess.h#2 edit Differences ... ==== //depot/projects/soc2007/dongmei-auditanalyzer/file_access.c#2 (text+ko) ==== @@ -101,4 +101,89 @@ buffer_init(ts->record_buffer, 1500); return ts; } +/* Opens auditpipe and prepares a tsess struct. + */ +tsess* tsess_open_online(int *err, char **err_info,gboolean do_random) +{ + struct stat statb; + tsess *ts; + unsigned int i; + gboolean use_stdin = FALSE; + if (eth_stat(DEFAULT_AUDIT_TRAIL, &statb) < 0) { + *err = errno; + return NULL; + } + if (S_ISFIFO(statb.st_mode)) { + /* + * Opens of FIFOs are allowed only when not opening + * for random access. + * + * XXX - currently, we do seeking when trying to find + * out the file type, so we don't actually support + * opening FIFOs. However, we may eventually + * do buffering that allows us to do at least some + * file type determination even on pipes, so we + * allow FIFO opens and let things fail later when + * we try to seek. + */ + if (do_random) { + *err = TSESS_ERR_RANDOM_OPEN_PIPE; + return NULL; + } + } else if (S_ISDIR(statb.st_mode)) { + /* + * Return different errors for "this is a directory" + * and "this is some random special file type", so + * the user can get a potentially more helpful error. + */ + *err = EISDIR; + return NULL; + } + + /* + * We need two independent descriptors for random access, so + * they have different file positions. If we're opening the + * standard input, we can only dup it to get additional + * descriptors, so we can't have two independent descriptors, + * and thus can't do random access. + */ + errno = ENOMEM; + ts = g_malloc(sizeof(ts)); + if (ts == NULL) { + *err = errno; + return NULL; + } + + /* Open the file */ + errno =TSESS_ERR_CANT_OPEN; + ts->fd = eth_open(DEFAULT_AUDIT_TRAIL, O_RDONLY|O_BINARY, 0000 /* no creation so don't matter */); + if (ts->fd < 0) { + *err = errno; + g_free(ts); + return NULL; + } + if (!(ts->fh = filed_open(ts->fd, "rb"))) { + *err = errno; + eth_close(ts->fd); + g_free(ts); + return NULL; + } + + if (do_random) { + if (!(ts->random_fh = file_open(DEFAULT_AUDIT_TRAIL, "rb"))) { + *err = errno; + file_close(ts->fh); + g_free(ts); + return NULL; + } + } else + ts->random_fh = NULL; + + /* initialization */ + ts->data_offset = 0; + + ts->record_buffer = g_malloc(sizeof(struct Buffer)); + buffer_init(ts->record_buffer, 1500); + return ts; +} ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/list_view.c#5 (text+ko) ==== @@ -169,6 +169,23 @@ timestr[24] = '\0'; /* No new line */ return 0; } +void +record_list_append_test(gint32 number) +{ + GtkTreeIter iter; + /* add data to the list store */ + + gtk_list_store_append (record_list, &iter); + + gtk_list_store_set (record_list, &iter, + COLUMN_NUMBER, number, + COLUMN_CREATE_TIME,"", + COLUMN_MS,"", + COLUMN_EVENT,"", + COLUMN_VERSION,"", + COLUMN_RECORD_LEN,0, + -1); +} void record_list_append(tokenstr_t *data,gint number) ==== //depot/projects/soc2007/dongmei-auditanalyzer/tsess.h#2 (text+ko) ==== @@ -4,6 +4,7 @@ #include #define FILE_T FILE * +#define DEFAULT_AUDIT_TRAIL "/dev/auditpipe" typedef struct tsess { FILE_T fh; @@ -17,6 +18,7 @@ tsess* tsess_open_offline(const char *filename, int *err, char **err_info,gboolean do_random); gint64 tsess_file_size(tsess *ts, int *err); +tsess* tsess_open_online(int *err, char **err_info,gboolean do_random); /* * tsess error codes. From owner-p4-projects@FreeBSD.ORG Tue Aug 14 12:22:38 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 64BBD16A421; Tue, 14 Aug 2007 12:22: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 2104216A41B for ; Tue, 14 Aug 2007 12:22:38 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 079CC13C45E for ; Tue, 14 Aug 2007 12:22:38 +0000 (UTC) (envelope-from lulf@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 l7ECMbal019526 for ; Tue, 14 Aug 2007 12:22:37 GMT (envelope-from lulf@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7ECMbDZ019523 for perforce@freebsd.org; Tue, 14 Aug 2007 12:22:37 GMT (envelope-from lulf@FreeBSD.org) Date: Tue, 14 Aug 2007 12:22:37 GMT Message-Id: <200708141222.l7ECMbDZ019523@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to lulf@FreeBSD.org using -f From: Ulf Lilleengen To: Perforce Change Reviews Cc: Subject: PERFORCE change 125136 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, 14 Aug 2007 12:22:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=125136 Change 125136 by lulf@lulf_carrot on 2007/08/14 12:22:18 - Modify rebuild and parity routines to increase providers access counts before starting and after finishing rebuild instead of doing it for each rebuild bio. This caused the rest of gvinum to lock up while rebuild since the topology lock was aquired all the time. - Change output of list to show how far we're in the rebuild process. Affected files ... .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum.c#36 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_init.c#26 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_list.c#6 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_plex.c#28 edit Differences ... ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum.c#36 (text+ko) ==== @@ -745,6 +745,15 @@ break; } p->synced = 0; + g_topology_assert_not(); + g_topology_lock(); + err = gv_access(p->vol_sc->provider, 1, 1, 0); + if (err) { + printf("VINUM: unable to access " + "provider\n"); + break; + } + g_topology_unlock(); gv_parity_request(p, GV_BIO_CHECK | GV_BIO_PARITY, 0); break; @@ -759,6 +768,15 @@ break; } p->synced = 0; + g_topology_assert_not(); + g_topology_lock(); + err = gv_access(p->vol_sc->provider, 1, 1, 0); + if (err) { + printf("VINUM: unable to access " + "provider\n"); + break; + } + g_topology_unlock(); gv_parity_request(p, GV_BIO_CHECK, 0); break; ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_init.c#26 (text+ko) ==== @@ -221,6 +221,7 @@ { struct gv_drive *d; struct gv_sd *s; + int error; /* XXX: Is this safe? (Allows for mounted rebuild)*/ /* if (gv_provider_is_open(p->vol_sc->provider)) @@ -245,6 +246,15 @@ p->flags |= GV_PLEX_REBUILDING; p->synced = 0; + g_topology_assert_not(); + g_topology_lock(); + error = gv_access(p->vol_sc->provider, 1, 1, 0); + if (error) { + printf("VINUM: unable to access provider\n"); + return (0); + } + g_topology_unlock(); + gv_parity_request(p, GV_BIO_REBUILD, 0); return (0); } ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_list.c#6 (text+ko) ==== @@ -294,7 +294,9 @@ p->name, (intmax_t)p->size, (intmax_t)p->size / MEGABYTE); sbuf_printf(sb, "\t\tSubdisks: %8d\n", p->sdcount); sbuf_printf(sb, "\t\tState: %s\n", gv_plexstate(p->state)); - if ((p->flags & GV_PLEX_SYNCING) || (p->flags & GV_PLEX_GROWING)) { + if ((p->flags & GV_PLEX_SYNCING) || + (p->flags & GV_PLEX_GROWING) || + (p->flags & GV_PLEX_REBUILDING)) { sbuf_printf(sb, "\t\tSynced: "); sbuf_printf(sb, "%16jd bytes (%d%%)\n", (intmax_t)p->synced, @@ -312,7 +314,9 @@ } else { sbuf_printf(sb, "P %-18s %2s State: ", p->name, gv_plexorg_short(p->org)); - if ((p->flags & GV_PLEX_SYNCING) || (p->flags & GV_PLEX_GROWING)) { + if ((p->flags & GV_PLEX_SYNCING) || + (p->flags & GV_PLEX_GROWING) || + (p->flags & GV_PLEX_REBUILDING)) { sbuf_printf(sb, "S %d%%\t", (int)((p->synced * 100) / p->size)); } else { ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_plex.c#28 (text+ko) ==== @@ -856,27 +856,15 @@ gv_parity_request(struct gv_plex *p, int flags, off_t offset) { struct bio *bp; - int error; KASSERT(p != NULL, ("gv_parity_request: NULL p")); - /* Make sure we don't have the lock. */ - g_topology_assert_not(); - g_topology_lock(); - error = gv_access(p->vol_sc->provider, 1, 1, 0); - if (error) { - printf("VINUM: unable to access provider\n"); - goto bad; - } - bp = g_new_bio(); if (bp == NULL) { printf("VINUM: rebuild of %s failed creating bio: " "out of memory\n", p->name); - gv_access(p->vol_sc->provider, -1, -1, 0); - goto bad; + return; } - g_topology_unlock(); bp->bio_cmd = BIO_WRITE; bp->bio_done = gv_done; @@ -903,9 +891,6 @@ bp->bio_offset = offset; gv_plex_start(p, bp); /* Send it down to the plex. */ - return; -bad: - g_topology_unlock(); } /* @@ -925,12 +910,13 @@ g_free(bp->bio_data); g_destroy_bio(bp); - /* Make sure we don't have the lock. */ - g_topology_assert_not(); - g_topology_lock(); - gv_access(p->vol_sc->provider, -1, -1, 0); - g_topology_unlock(); if (error) { + /* Make sure we don't have the lock. */ + g_topology_assert_not(); + g_topology_lock(); + gv_access(p->vol_sc->provider, -1, -1, 0); + g_topology_unlock(); + if (error == EAGAIN) { printf("VINUM: Parity incorrect at offset 0x%jx\n", (intmax_t)p->synced); @@ -942,11 +928,14 @@ } else { p->synced += p->stripesize; } - printf("VINUM: Parity operation at 0x%jx finished\n", - (intmax_t)p->synced); + if (p->synced >= p->size) { + /* Make sure we don't have the lock. */ + g_topology_assert_not(); + g_topology_lock(); + gv_access(p->vol_sc->provider, -1, -1, 0); + g_topology_unlock(); - if (p->synced >= p->size) { /* We're finished. */ printf("VINUM: Parity operation on %s finished\n", p->name); p->synced = 0; @@ -977,12 +966,12 @@ g_free(bp->bio_data); g_destroy_bio(bp); - /* Make sure we don't have the lock. */ - g_topology_assert_not(); - g_topology_lock(); - gv_access(p->vol_sc->provider, -1, -1, 0); - g_topology_unlock(); if (error) { + g_topology_assert_not(); + g_topology_lock(); + gv_access(p->vol_sc->provider, -1, -1, 0); + g_topology_unlock(); + printf("VINUM: rebuild of %s failed at offset %jd errno: %d\n", p->name, (intmax_t)offset, error); p->flags &= ~GV_PLEX_REBUILDING; @@ -994,6 +983,11 @@ offset += (p->stripesize * (gv_sdcount(p, 1) - 1)); if (offset >= p->size) { /* We're finished. */ + g_topology_assert_not(); + g_topology_lock(); + gv_access(p->vol_sc->provider, -1, -1, 0); + g_topology_unlock(); + printf("VINUM: rebuild of %s finished\n", p->name); gv_save_config(p->vinumconf); p->flags &= ~GV_PLEX_REBUILDING; From owner-p4-projects@FreeBSD.ORG Tue Aug 14 15:23:23 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 53A1816A41B; Tue, 14 Aug 2007 15:23:23 +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 2832F16A417 for ; Tue, 14 Aug 2007 15:23:23 +0000 (UTC) (envelope-from karma@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1D76B13C469 for ; Tue, 14 Aug 2007 15:23:23 +0000 (UTC) (envelope-from karma@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 l7EFNNEq043148 for ; Tue, 14 Aug 2007 15:23:23 GMT (envelope-from karma@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7EFNMqg043145 for perforce@freebsd.org; Tue, 14 Aug 2007 15:23:22 GMT (envelope-from karma@FreeBSD.org) Date: Tue, 14 Aug 2007 15:23:22 GMT Message-Id: <200708141523.l7EFNMqg043145@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to karma@FreeBSD.org using -f From: Alexey Mikhailov To: Perforce Change Reviews Cc: Subject: PERFORCE change 125139 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, 14 Aug 2007 15:23:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=125139 Change 125139 by karma@karma_ez on 2007/08/14 15:22:50 * Server side SSL implementation * Host are resolved while config parsing and we hold sockaddr-s for future use * Worker thread skeleton Affected files ... .. //depot/projects/soc2007/karma_audit/dlog/config.h#5 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/client.c#4 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/config.c#4 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/config.h#4 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/dummy_certificate.pem#1 add .. //depot/projects/soc2007/karma_audit/dlog/daemon/server.c#4 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/util.c#2 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/util.h#2 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/worker.c#1 add .. //depot/projects/soc2007/karma_audit/dlog/daemon/worker.h#1 add .. //depot/projects/soc2007/karma_audit/dlog/lib/libdlogd.c#4 edit Differences ... ==== //depot/projects/soc2007/karma_audit/dlog/config.h#5 (text+ko) ==== @@ -12,8 +12,15 @@ #define CLIENT_CONFIG "client.conf" #define SERVER_CONFIG "server.conf" -#define SERVER_PORT "9991" +#define SERVER_PORT 9991 #define QLEN 10 +#define SPOOL_DIR "/tmp/dlogd" + +#define SERVER_CERT "dummy_certificate.pem" +#define SERVER_KEY "dummy_certificate.pem" + +#define WORKER_PERIOD 120 + #endif ==== //depot/projects/soc2007/karma_audit/dlog/daemon/client.c#4 (text+ko) ==== @@ -1,6 +1,7 @@ #include "../config.h" #include #include +#include #include #include #include @@ -18,6 +19,7 @@ char buf[KEYWORD_MAX+PATH_MAX+1]; char keyword[KEYWORD_MAX]; char pathname[PATH_MAX]; + char pathbuf[PATH_MAX]; struct msghdr msg; struct iovec iov[2]; union { @@ -93,14 +95,22 @@ #ifdef DEBUG printf("UID %d, GID %d\n", cr.uc.sc_uid, cr.uc.sc_gid); #endif - if ((verify_client_access(cr.uc.sc_uid, cr.uc.sc_gid)) == 0) - { + if ((verify_client_access(cr.uc.sc_uid, cr.uc.sc_gid)) == 0) { /* TODO: add logfile to spool here */ + /* TODO: umask? */ + snprintf(pathbuf, PATH_MAX, "%s/%s", SPOOL_DIR, keyword); + if (mkdir(pathbuf, "0700") == -1 && errno != EEXIST) { + fprintf(stderr, "can't create spool dir for keyword"); + } + else + { + snprintf(pathbuf, PATH_MAX, "%s/%ld.%s"); + } } } else { /* TODO: can't check permissions. wrong query */ - printf("can't check permissions"); + fprintf(stderr,"can't check permissions"); } close(cs); } ==== //depot/projects/soc2007/karma_audit/dlog/daemon/config.c#4 (text+ko) ==== @@ -7,6 +7,10 @@ #include #include #include +#include +#include +#include +#include cl_kw_access * cka = NULL; cl_kw_access * pcka = NULL; @@ -14,6 +18,8 @@ cl_kw_hosts * pckh = NULL; sv_kw_hostdir * svhd = NULL; sv_kw_hostdir * psvhd = NULL; +host_ll * clh = NULL; +host_ll * pclh = NULL; extern int errno; extern FILE * yyin; @@ -24,10 +30,13 @@ { client_kw_tree = allocate_ttree(); server_kw_tree = allocate_ttree(); + client_host_tree = allocate_ttree(); + server_host_tree = allocate_ttree(); (void)parse_client_config(); } #endif +/* Parse client configuration file */ void parse_client_config (void) { @@ -48,6 +57,7 @@ } } +/* Parse server configuration file */ void parse_server_config (void) { @@ -68,6 +78,7 @@ } } +/* Add keyword to client tree and insert linked list there */ int add_client_keyword (char * keyword) { @@ -82,10 +93,12 @@ pcka = NULL; ckh = NULL; pckh = NULL; + clh = NULL; return 0; } +/* Build linked list of user permissions */ int add_client_kw_access (char * id, char * val) { @@ -168,9 +181,41 @@ return 1; } +/* Build linked list of hosts */ int add_client_kw_host (char * host) { + struct addrinfo hints, *h, *hh; + int r; + + bzero(&hints, sizeof(hints)); + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; + + r = getaddrinfo(host, NULL, &hints, &h); + + if (r != 0) { + fprintf(stderr, "Failed getaddrinfo() for host \"%s\": %s", + host, gai_strerror(r)); + return 1; + } + + clh = xmalloc(sizeof(host_ll)); + pclh = clh; + hh = h; + + for ( ; hh != NULL; hh = hh -> ai_next) + { + memcpy(&(pclh -> s), hh -> ai_addr, sizeof(struct sockaddr)); + pclh -> next = xmalloc(sizeof(host_ll)); + pclh = pclh -> next; + } + + bzero(&(pclh -> s), sizeof(struct sockaddr)); + + freeaddrinfo(h); + if (ckh == NULL) { ckh = xmalloc(sizeof(cl_kw_hosts)); @@ -183,7 +228,8 @@ pckh -> next = NULL; } - pckh -> host = strdup (host); + pckh -> host = strdup (host); + pckh -> hs = clh; if (pckh -> host == NULL) { @@ -199,6 +245,7 @@ return 0; } +/* Add keyword to server tree and attach linked list to it */ int add_server_keyword (char * keyword) { @@ -214,9 +261,41 @@ return 0; } +/* Add hostname\directory pair to linked list */ int add_server_kw_host (char * hostname, char * dir) { + struct addrinfo hints, *h, *hh; + int r; + + bzero(&hints, sizeof(hints)); + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; + + r = getaddrinfo(hostname, NULL, &hints, &h); + + if (r != 0) { + fprintf(stderr, "Failed getaddrinfo() for host \"%s\": %s", + hostname, gai_strerror(r)); + return 1; + } + + clh = xmalloc(sizeof(host_ll)); + pclh = clh; + hh = h; + + for ( ; hh != NULL; hh = hh -> ai_next) + { + memcpy(&(pclh -> s), hh -> ai_addr, sizeof(struct sockaddr)); + pclh -> next = xmalloc(sizeof(host_ll)); + pclh = pclh -> next; + } + + bzero(&(pclh -> s), sizeof(struct sockaddr)); + + freeaddrinfo(h); + if (svhd == NULL) { svhd = xmalloc(sizeof(sv_kw_hostdir)); @@ -231,6 +310,7 @@ psvhd -> host = strdup (hostname); psvhd -> dir = strdup (dir); + psvhd -> hs = clh; if (psvhd -> host == NULL || psvhd -> dir == NULL) { @@ -290,3 +370,9 @@ return (-2); /* access denied */ } + +char * +verify_server_access (struct sockaddr * sa, const char * keyword) +{ + return 0; +} ==== //depot/projects/soc2007/karma_audit/dlog/daemon/config.h#4 (text+ko) ==== @@ -2,6 +2,7 @@ #define DLOG_CONFIG_H #include "ttree.h" #include +#include typedef struct client_kw_access { int id; @@ -10,13 +11,20 @@ struct client_kw_access * next; } cl_kw_access; +typedef struct host_ll { + struct sockaddr s; + struct host_ll *next; +} host_ll; + typedef struct client_kw_host { char *host; + host_ll *hs; struct client_kw_host * next; } cl_kw_hosts; typedef struct server_kw_host { - char *host; + char *host; + host_ll *hs; char *dir; struct server_kw_host * next; } sv_kw_hostdir; @@ -47,5 +55,5 @@ void parse_server_config(); int verify_client_access (const char * keyword, uid_t uid, gid_t gid); - +char * verify_server_access (struct sockaddr * sa, const char * keyword); #endif ==== //depot/projects/soc2007/karma_audit/dlog/daemon/server.c#4 (text+ko) ==== @@ -3,16 +3,21 @@ #include #include #include +#include +#include +#include +#include -void -server_serve (int s) -{ - return; -} +static SSL_CTX *sslContext = NULL; +extern int errno; + +static void serve_conn(int, struct sockaddr *); +static int myssl_accept(int, SSL*); void server_main() { +#if 0 int s,err; struct addrinfo *aip, *ailist; struct addrinfo hint; @@ -63,5 +68,125 @@ server_serve(s); return; } +#endif + int sockfd, clifd; + size_t l; + struct sockaddr_in sockaddr, sockaddr_cli; + + /* SSL initialization */ + SSL_load_error_strings(); + SSLeay_add_ssl_algorithms(); + sslContext = SSL_CTX_new(SSLv23_method()); + + if (sslContext == NULL) { + fprintf(stderr, "Error allocating context: %s\n", ERR_error_string(ERR_get_error(),NULL)); + exit(1); + } + + if(!SSL_CTX_use_certificate_file(sslContext, SERVER_CERT, SSL_FILETYPE_PEM)) { + fprintf(stderr, "SSL: error reading certificate from file %s: %s\n", SERVER_CERT, ERR_error_string(ERR_get_error(), NULL)); + exit(1); + } + +#ifdef KEY + if (!SSL_CTX_use_PrivateKey_file(sslContext, SERVER_KEY, SSL_FILETYPE_PEM)) { + fprintf(stderr, "SSL: error reading key from file %s: %s\n", SERVER_KEY, ERR_error_string(ERR_get_error(), NULL)); + exit(1); + } + + if (!SSL_CTX_check_private_key(sslContext)) { + fprintf(stderr,"SSL: private key does not match the certificate public key\n"); + exit(1); + } +#endif + + SSL_CTX_set_client_CA_list(sslContext, SSL_load_client_CA_file(SERVER_CERT)); + + /* Socket initialization */ + if ((sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) + err_fatal("Can't create server socket"); + + bzero(&sockaddr, sizeof(sockaddr)); + sockaddr.sin_family = AF_INET; + sockaddr.sin_addr.s_addr = INADDR_ANY; + sockaddr.sin_port = htons(SERVER_PORT); + + if ((bind(sockfd, (struct sockaddr *) &sockaddr, sizeof(sockaddr))) < 0) + err_fatal("Can't bind server socket"); + + if ((listen(sockfd, QLEN)) < 0) + err_fatal("Can't listen server socket"); + + l = sizeof(sockaddr_cli); + + /* Go loop */ + for (;;) { + clifd = accept(sockfd, (struct sockaddr *)&sockaddr_cli, &l); + if (clifd < 0) + { + if (errno = EINTR) + continue; + err_fatal("accept()"); + } + printf("%d\n",clifd); + serve_conn(clifd, (struct sockaddr *)&sockaddr_cli); + } } +static void +serve_conn (int clifd, struct sockaddr *sacli) +{ + SSL *ssl; + size_t e; + char buf[KEYWORD_MAX+FILENAME_MAX+2]; + char filename[FILENAME_MAX+1]; + char keyword[KEYWORD_MAX+1]; +#ifdef DEBUG + printf("got connection from %lx\n", ((struct sockaddr_in *)sacli)->sin_addr.s_addr); +#endif + if (myssl_accept(clifd, ssl) != 0) { + fprintf(stderr, "Failed SSL negotitation\n"); + return; + } + + /* Great, we're here already :) SSL handshake done */ + printf("%d\n", sizeof(buf)); + e = SSL_read(ssl, buf, sizeof(buf) - 1); + buf[e] = '\0'; + + if (search_bad_chars(buf) != 0) + { + SSL_write(ssl, "Malformed request", strlen("Malformed request")); + SSL_shutdown(ssl); + close(clifd); + SSL_free(ssl); + return; + } + + /* TODO: Could go bad here? */ + e = sscanf(buf, "%s\n%s", keyword, filename); + +#ifdef DEBUG + printf("received keyword %s with filename %s", keyword, filename); +#endif +} + +static int +myssl_accept (int clifd, SSL *ssl) +{ + if ((ssl = SSL_new(sslContext)) == NULL) { + fprintf(stderr, "SSL_new(): %s\n", ERR_error_string(ERR_get_error(), NULL)); + return -1; + } + + SSL_set_fd(ssl, clifd); + + if (SSL_accept(ssl) <= 0) { + fprintf(stderr, "SSL_accept(): %s\n", ERR_error_string(ERR_get_error(), NULL)); + return -1; + } +#ifdef DEBUG + fprintf(stderr, "SSL_get_cipher(): %s\n", SSL_get_cipher(ssl)); +#endif + return 0; +} ==== //depot/projects/soc2007/karma_audit/dlog/daemon/util.c#2 (text+ko) ==== @@ -21,3 +21,17 @@ fprintf(stderr, "Fatal error: %s\n", msg); exit(1); } + +int +search_bad_chars (const char * msg) +{ + int i, nl = 0; + for (i = 0; i < strlen(msg) - 1; i++) { + if (msg[i] == '\n' && ++nl > 1) + return 1; + if (msg[i] == '/') + return 1; + } + if (nl == 0) return 1; + return 0; +} ==== //depot/projects/soc2007/karma_audit/dlog/daemon/util.h#2 (text+ko) ==== ==== //depot/projects/soc2007/karma_audit/dlog/lib/libdlogd.c#4 (text+ko) ==== @@ -24,7 +24,7 @@ int dlogd_submit (const char * pathname, const char * keyword) { - int fd, rc; + int fd, rc, an = -1; size_t len; char buf[KEYWORD_MAX + PATH_MAX + 1]; struct msghdr msg; @@ -77,10 +77,19 @@ return (-5); /* can't sendmsg */ } + if ((read (fd, an, sizeof(int))) < 0) + { + close(fd); + return (-6); /* can't read */ + } + + if (an != 0) + { + return (-7); /* bad server response */ + } + rc = close(fd); - printf("close returned %d\n", rc); - return 0; } From owner-p4-projects@FreeBSD.ORG Tue Aug 14 16:02:35 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5C3C916A41A; Tue, 14 Aug 2007 16:02: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 C4ECF16A417 for ; Tue, 14 Aug 2007 16:02:34 +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 B815213C465 for ; Tue, 14 Aug 2007 16:02:34 +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 l7EG2Yx7053093 for ; Tue, 14 Aug 2007 16:02:34 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7EG2TrY053088 for perforce@freebsd.org; Tue, 14 Aug 2007 16:02:29 GMT (envelope-from gonzo@FreeBSD.org) Date: Tue, 14 Aug 2007 16:02:29 GMT Message-Id: <200708141602.l7EG2TrY053088@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 125144 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, 14 Aug 2007 16:02:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=125144 Change 125144 by gonzo@gonzo_jeeves on 2007/08/14 16:01:29 o IFC Affected files ... .. //depot/projects/mips2/src/contrib/gcc/BASE-VER#2 integrate .. //depot/projects/mips2/src/contrib/gcc/ChangeLog#4 integrate .. //depot/projects/mips2/src/contrib/gcc/DATESTAMP#2 integrate .. //depot/projects/mips2/src/contrib/gcc/Makefile.in#3 integrate .. //depot/projects/mips2/src/contrib/gcc/calls.c#3 integrate .. //depot/projects/mips2/src/contrib/gcc/combine.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/config/arm/arm.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/config/arm/cirrus.md#3 integrate .. //depot/projects/mips2/src/contrib/gcc/config/i386/i386.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/config/i386/i386.h#3 integrate .. //depot/projects/mips2/src/contrib/gcc/config/i386/i386.md#4 integrate .. //depot/projects/mips2/src/contrib/gcc/config/i386/sse.md#2 integrate .. //depot/projects/mips2/src/contrib/gcc/config/rs6000/predicates.md#2 integrate .. //depot/projects/mips2/src/contrib/gcc/config/rs6000/rs6000.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/config/soft-fp/double.h#2 integrate .. //depot/projects/mips2/src/contrib/gcc/config/soft-fp/extended.h#2 integrate .. //depot/projects/mips2/src/contrib/gcc/config/soft-fp/floatundidf.c#2 integrate .. //depot/projects/mips2/src/contrib/gcc/config/soft-fp/floatundisf.c#2 integrate .. //depot/projects/mips2/src/contrib/gcc/config/soft-fp/floatunsidf.c#2 integrate .. //depot/projects/mips2/src/contrib/gcc/config/soft-fp/floatunsisf.c#2 integrate .. //depot/projects/mips2/src/contrib/gcc/config/soft-fp/op-2.h#2 integrate .. //depot/projects/mips2/src/contrib/gcc/config/soft-fp/op-4.h#2 integrate .. //depot/projects/mips2/src/contrib/gcc/config/soft-fp/op-common.h#2 integrate .. //depot/projects/mips2/src/contrib/gcc/config/soft-fp/quad.h#2 integrate .. //depot/projects/mips2/src/contrib/gcc/config/sparc/sparc.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/cp/ChangeLog#4 integrate .. //depot/projects/mips2/src/contrib/gcc/cp/call.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/cp/class.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/cp/cp-tree.h#4 integrate .. //depot/projects/mips2/src/contrib/gcc/cp/decl.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/cp/decl2.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/cp/init.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/cp/parser.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/cp/pt.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/cp/semantics.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/cp/typeck.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/cp/typeck2.c#3 integrate .. //depot/projects/mips2/src/contrib/gcc/doc/cpp.1#3 integrate .. //depot/projects/mips2/src/contrib/gcc/doc/gcc.1#3 integrate .. //depot/projects/mips2/src/contrib/gcc/doc/gcov.1#3 integrate .. //depot/projects/mips2/src/contrib/gcc/dwarf2out.c#3 integrate .. //depot/projects/mips2/src/contrib/gcc/except.c#3 integrate .. //depot/projects/mips2/src/contrib/gcc/fold-const.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/function.c#4 integrate .. //depot/projects/mips2/src/contrib/gcc/gimplify.c#2 integrate .. //depot/projects/mips2/src/contrib/gcc/gthr-posix.c#3 integrate .. //depot/projects/mips2/src/contrib/gcc/gthr-posix.h#3 integrate .. //depot/projects/mips2/src/contrib/gcc/loop-iv.c#2 integrate .. //depot/projects/mips2/src/contrib/gcc/objc/ChangeLog#2 integrate .. //depot/projects/mips2/src/contrib/gcc/omp-low.c#2 integrate .. //depot/projects/mips2/src/contrib/gcc/pointer-set.c#2 integrate .. //depot/projects/mips2/src/contrib/gcc/pointer-set.h#2 integrate .. //depot/projects/mips2/src/contrib/gcc/reload.c#3 integrate .. //depot/projects/mips2/src/contrib/gcc/tree-if-conv.c#2 integrate .. //depot/projects/mips2/src/contrib/gcc/tree-ssa-loop-niter.c#2 integrate .. //depot/projects/mips2/src/contrib/gcc/tree-ssa-operands.c#2 integrate .. //depot/projects/mips2/src/contrib/gcc/tree-ssa-structalias.c#2 integrate .. //depot/projects/mips2/src/contrib/gcc/tree-vrp.c#2 integrate .. //depot/projects/mips2/src/contrib/gcc/version.c#4 integrate .. //depot/projects/mips2/src/contrib/gcclibs/include/ChangeLog#2 integrate .. //depot/projects/mips2/src/contrib/gcclibs/libcpp/ChangeLog#2 integrate .. //depot/projects/mips2/src/contrib/gcclibs/libdecnumber/ChangeLog#2 integrate .. //depot/projects/mips2/src/contrib/gcclibs/libgomp/ChangeLog#2 integrate .. //depot/projects/mips2/src/contrib/gcclibs/libgomp/config/posix/lock.c#2 integrate .. //depot/projects/mips2/src/contrib/gcclibs/libgomp/sections.c#2 integrate .. //depot/projects/mips2/src/contrib/gcclibs/libiberty/ChangeLog#2 integrate .. //depot/projects/mips2/src/contrib/gcclibs/libmudflap/ChangeLog#2 integrate .. //depot/projects/mips2/src/contrib/gcclibs/libssp/ChangeLog#2 integrate .. //depot/projects/mips2/src/contrib/less/main.c#5 integrate .. //depot/projects/mips2/src/contrib/libobjc/ChangeLog#4 integrate .. //depot/projects/mips2/src/contrib/libstdc++/ChangeLog#4 integrate .. //depot/projects/mips2/src/contrib/libstdc++/acinclude.m4#3 integrate .. //depot/projects/mips2/src/contrib/libstdc++/config.h.in#3 integrate .. //depot/projects/mips2/src/contrib/libstdc++/configure#3 integrate .. //depot/projects/mips2/src/contrib/libstdc++/include/Makefile.am#3 integrate .. //depot/projects/mips2/src/contrib/libstdc++/include/Makefile.in#3 integrate .. //depot/projects/mips2/src/contrib/libstdc++/include/bits/ostream.tcc#3 integrate .. //depot/projects/mips2/src/contrib/libstdc++/include/bits/ostream_insert.h#2 integrate .. //depot/projects/mips2/src/contrib/libstdc++/include/ext/throw_allocator.h#2 integrate .. //depot/projects/mips2/src/contrib/libstdc++/include/std/std_fstream.h#3 integrate .. //depot/projects/mips2/src/contrib/libstdc++/libsupc++/exception#3 integrate .. //depot/projects/mips2/src/contrib/libstdc++/libsupc++/new#3 integrate .. //depot/projects/mips2/src/contrib/libstdc++/libsupc++/typeinfo#3 integrate .. //depot/projects/mips2/src/etc/etc.arm/ttys#3 integrate .. //depot/projects/mips2/src/lib/libarchive/archive_write_disk.c#4 integrate .. //depot/projects/mips2/src/lib/libarchive/test/test_read_format_gtar_sparse.c#2 integrate .. //depot/projects/mips2/src/lib/libarchive/test/test_write_disk_perms.c#4 integrate .. //depot/projects/mips2/src/release/doc/en_US.ISO8859-1/hardware/article.sgml#3 integrate .. //depot/projects/mips2/src/sbin/atacontrol/atacontrol.c#2 integrate .. //depot/projects/mips2/src/sbin/tunefs/tunefs.8#3 integrate .. //depot/projects/mips2/src/share/man/man4/mfi.4#3 integrate .. //depot/projects/mips2/src/share/man/man4/ng_fec.4#3 integrate .. //depot/projects/mips2/src/share/mk/sys.mk#4 integrate .. //depot/projects/mips2/src/sys/conf/NOTES#8 integrate .. //depot/projects/mips2/src/sys/dev/ata/ata-raid.c#3 integrate .. //depot/projects/mips2/src/sys/dev/cxgb/cxgb_adapter.h#4 integrate .. //depot/projects/mips2/src/sys/dev/cxgb/cxgb_main.c#4 integrate .. //depot/projects/mips2/src/sys/dev/cxgb/cxgb_offload.c#2 integrate .. //depot/projects/mips2/src/sys/dev/cxgb/cxgb_sge.c#5 integrate .. //depot/projects/mips2/src/sys/dev/ichwd/ichwd.c#3 integrate .. //depot/projects/mips2/src/sys/dev/ichwd/ichwd.h#2 integrate .. //depot/projects/mips2/src/sys/dev/mfi/mfi.c#4 integrate .. //depot/projects/mips2/src/sys/dev/mfi/mfi_disk.c#4 integrate .. //depot/projects/mips2/src/sys/dev/mfi/mfi_pci.c#4 integrate .. //depot/projects/mips2/src/sys/dev/mfi/mfireg.h#4 integrate .. //depot/projects/mips2/src/sys/dev/mfi/mfivar.h#4 integrate .. //depot/projects/mips2/src/sys/dev/re/if_re.c#7 integrate .. //depot/projects/mips2/src/sys/dev/usb/ehci.c#4 integrate .. //depot/projects/mips2/src/sys/fs/tmpfs/tmpfs.h#3 integrate .. //depot/projects/mips2/src/sys/fs/tmpfs/tmpfs_subr.c#3 integrate .. //depot/projects/mips2/src/sys/fs/tmpfs/tmpfs_vnops.c#3 integrate .. //depot/projects/mips2/src/sys/kern/vfs_subr.c#7 integrate .. //depot/projects/mips2/src/sys/modules/netgraph/bluetooth/Makefile#3 integrate .. //depot/projects/mips2/src/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/mips2/src/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#4 integrate .. //depot/projects/mips2/src/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/mips2/src/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/mips2/src/sys/powerpc/include/intr_machdep.h#4 integrate .. //depot/projects/mips2/src/sys/powerpc/include/md_var.h#4 integrate .. //depot/projects/mips2/src/sys/powerpc/include/openpicvar.h#3 integrate .. //depot/projects/mips2/src/sys/powerpc/powermac/hrowpic.c#3 integrate .. //depot/projects/mips2/src/sys/powerpc/powermac/hrowpicvar.h#2 integrate .. //depot/projects/mips2/src/sys/powerpc/powermac/openpic_macio.c#2 integrate .. //depot/projects/mips2/src/sys/powerpc/powerpc/autoconf.c#2 integrate .. //depot/projects/mips2/src/sys/powerpc/powerpc/interrupt.c#3 integrate .. //depot/projects/mips2/src/sys/powerpc/powerpc/intr_machdep.c#5 integrate .. //depot/projects/mips2/src/sys/powerpc/powerpc/nexus.c#4 integrate .. //depot/projects/mips2/src/sys/powerpc/powerpc/openpic.c#3 integrate .. //depot/projects/mips2/src/sys/powerpc/powerpc/pic_if.m#3 integrate .. //depot/projects/mips2/src/sys/powerpc/psim/openpic_iobus.c#2 integrate .. //depot/projects/mips2/src/sys/sys/ata.h#3 integrate .. //depot/projects/mips2/src/tools/regression/tmpfs/h_tools.c#2 integrate .. //depot/projects/mips2/src/tools/regression/tmpfs/t_mount#2 integrate .. //depot/projects/mips2/src/tools/regression/tmpfs/t_rename#2 integrate .. //depot/projects/mips2/src/usr.sbin/rpc.statd/file.c#2 integrate .. //depot/projects/mips2/src/usr.sbin/sysinstall/menus.c#4 integrate Differences ... ==== //depot/projects/mips2/src/contrib/gcc/BASE-VER#2 (text+ko) ==== @@ -1,1 +1,1 @@ -4.2.0 +4.2.1 ==== //depot/projects/mips2/src/contrib/gcc/ChangeLog#4 (text+ko) ==== @@ -1,3 +1,441 @@ +2007-07-19 Release Manager + + * GCC 4.2.1 released. + +2007-07-18 Paolo Bonzini + + Revert: + + 2007-07-09 Paolo Bonzini + + PR middle-end/32004 + * function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO. + + 2007-07-06 Paolo Bonzini + + PR middle-end/32004 + * function.c (match_asm_constraints_1, rest_of_match_asm_constraints, + pass_match_asm_constraints): New. + * passes.c (init_optimization_passes): Add new pass. + * stmt.c (expand_asm_operands): Set cfun->has_asm_statement. + * function.h (struct function): Add has_asm_statement bit. + (current_function_has_asm_statement): New. + * tree-pass.h (pass_match_asm_constraints): New. + +2007-07-16 Paul Brook + + PR target/32753 + gcc/ + * config/arm/cirrus.md (cirrus_arm_movsi_insn): Remove dead insn. + +2007-07-10 Rainer Orth + + PR target/32538 + * config/mips/iris6.h (LIBGCC_SPEC): Add libm. + +2007-07-09 Paolo Bonzini + + PR middle-end/32004 + * function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO. + +2007-07-09 Uros Bizjak + + PR tree-optimization/32681 + * tree-if-conv.c (find_phi_replacement_condition): Use the condition + saved in second_edge->aux when first_bb is a loop header. + +2007-07-07 Anatoly Sokolov + + PR target/31331 + * config/avr/avr.c (avr_naked_function_p): Handle receiving a type + rather than a decl. + (avr_attribute_table): Make "naked" attribute apply to function types + rather than to decls. + (avr_handle_fntype_attribute): New function. + +2007-07-06 Paolo Bonzini + + PR middle-end/32004 + * function.c (match_asm_constraints_1, rest_of_match_asm_constraints, + pass_match_asm_constraints): New. + * passes.c (init_optimization_passes): Add new pass. + * stmt.c (expand_asm_operands): Set cfun->has_asm_statement. + * function.h (struct function): Add has_asm_statement bit. + (current_function_has_asm_statement): New. + * tree-pass.h (pass_match_asm_constraints): New. + +2007-07-06 Uros Bizjak + + PR rtl-optimization/32450 + * function.c (thread_prologue_and_epilogue_insns): Emit blockage insn + to ensure that instructions are not moved into the prologue when + profiling is on. + +2007-07-04 Richard Guenther + + PR tree-optimization/32500 + * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): + Only use basic blocks that are always executed to infer loop bounds. + +2007-07-04 Uros Bizjak + + PR tree-optimization/31966 + PR tree-optimization/32533 + * tree-if-conv.c (add_to_dst_predicate_list): Use "edge", not + "basic_block" description as its third argument. Update function + calls to get destination bb from "edge" argument. Save "cond" into + aux field of the edge. Update prototype for changed arguments. + (if_convertible_loop_p): Clear aux field of incoming edges if bb + contains phi node. + (find_phi_replacement_condition): Operate on incoming edges, not + on predecessor blocks. If there is a condition saved in the + incoming edge aux field, AND it with incoming bb predicate. + Return source bb of the first edge. + (clean_predicate_lists): Clean aux field of outgoing node edges. + (tree_if_conversion): Do not initialize cond variable. Move + variable declaration into the loop. + (replace_phi_with_cond_gimple_modify_stmt): Remove unneded + initializations of new_stmt, arg0 and arg1 variables. + +2007-07-04 Kaz Kojima + + PR target/32506 + Backport from mainline. + * config/sh/sh.md (udivsi3_i1_media): Use target_reg_operand + predicate instead of target_operand. + (divsi3_i1_media, divsi3_media_2): Likewise. + +2007-07-03 Richard Guenther + + Backport from mainline: + 2006-12-11 Zdenek Dvorak + + PR rtl-optimization/30113 + * loop-iv.c (implies_p): Require the mode of the operands to be + scalar. + +2007-07-03 Rainer Orth + + PR target/28307 + * gthr-posix.h [SUPPORTS_WEAK && GTHREAD_USE_WEAK] + (__gthrw_pragma): Provide default definition. + (__gthrw2): Use it. + * gthr-posix.c (__gthrw_pragma): Define. + +2007-07-02 Jakub Jelinek + + PR libgomp/32468 + * omp-low.c (check_combined_parallel): New function. + (lower_omp_parallel): Call it via walk_stmts, set + OMP_PARALLEL_COMBINED if appropriate. + (determine_parallel_type): If OMP_FOR resp. OMP_SECTIONS + isn't the only statement in WS_ENTRY_BB or OMP_RETURN + the only one in PAR_EXIT_BB and not OMP_PARALLEL_COMBINED, + don't consider it as combined parallel. + +2007-06-30 Alexandre Oliva + + * dwarf2out.c (dwarf2out_finish): Accept namespaces as context of + limbo die nodes. + +2007-06-28 Seongbae Park + + * config/arm/arm.c (arm_get_frame_offsets): Set + offsets->locals_base to avoid negative stack size. + (thumb_expand_prologue): Assert on negative stack size. + +2007-06-28 Jakub Jelinek + + * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Ensure + decl is non-external for AIX ABI. + +2007-06-28 David Edelsohn + + * config/rs6000/predicates.md (current_file_function_operand): + Ensure the symbol is non-external for AIX ABI. + +2007-06-21 H.J. Lu + + * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_VEC_EXT_V16QI. + (ix86_init_mmx_sse_builtins): Add __builtin_ia32_vec_ext_v16qi. + (ix86_expand_builtin): Handle IX86_BUILTIN_VEC_EXT_V16QI. + +2007-06-21 Jakub Jelinek + + PR middle-end/32362 + * omp-low.c (lookup_decl_in_outer_ctx): Don't ICE if t is NULL, + but decl is a global var, instead return decl. + * gimplify.c (gimplify_adjust_omp_clauses_1): Add shared clauses + even for is_global_var decls, if they are private in some outer + context. + +2007-06-21 Uros Bizjak + + PR target/32389 + * config/i386/i386.h (enum ix86_stack_slot): Add SLOT_VIRTUAL. + * config/i386/i386.c (assign_386_stack_local): Assert that + SLOT_VIRTUAL is valid only before virtual regs are instantiated. + (ix86_expand_builtin) [IX86_BUILTIN_LDMXCSR, IX86_BUILTIN_STMXCSR]: + Use SLOT_VIRTUAL stack slot instead of SLOT_TEMP. + * config/i386/i386.md (truncdfsf2, truncxfsf2, truncxfdf2): Ditto. + +2007-06-20 Jakub Jelinek + + PR inline-asm/32109 + * gimplify.c (gimplify_asm_expr): Issue error if type is addressable + and !allows_mem. + + PR middle-end/32285 + * calls.c (precompute_arguments): Also precompute CALL_EXPR arguments + if ACCUMULATE_OUTGOING_ARGS. + +2007-06-20 Kaz Kojima + + PR rtl-optimization/28011 + Backport from mainline. + * reload.c (push_reload): Set dont_share if IN appears in OUT + also when IN is a PLUS rtx. + (reg_overlap_mentioned_for_reload_p): Return true if X and IN + are same PLUS rtx. + +2007-06-19 Richard Guenther + Michael Matz + + PR tree-optimization/30252 + * tree-ssa-structalias.c (solution_set_add): Make sure to + preserve all relevant vars. + (handle_ptr_arith): Make sure to only handle positive + offsets. + (push_fields_onto_fieldstack): Create fields for empty + bases. + +2007-06-19 Jakub Jelinek + + PR tree-optimization/32353 + * tree-ssa-structalias.c (set_uids_in_ptset): Also handle RESULT_DECL. + +2007-06-17 Eric Botcazou + + * config/sparc/sparc.c (sparc_vis_init_builtins): Retrieve the + return mode from the builtin itself. + (sparc_fold_builtin): Fix cast of zero constant. + +2007-06-15 Diego Novillo + + PR 32327 + * tree-ssa-operands.c (build_ssa_operands): Initially assume + that the statement does not take any addresses. + +2007-06-13 Eric Botcazou + + * config/sparc/sparc.c (sparc_override_options): Initialize + fpu mask correctly. + +2007-06-09 Ian Lance Taylor + + PR tree-optimization/32169 + * tree-vrp.c (extract_range_from_unary_expr): For NOP_EXPR and + CONVERT_EXPR, check whether min and max both converted to an + overflow infinity representation. + +2007-06-08 Kaz Kojima + + PR target/32163 + Backport from mainline. + * config/sh/sh.md (symGOT_load): Don't schedule insns when + the symbol is generated with the stack protector. + +2007-06-06 Ian Lance Taylor + + * fold-const.c (merge_ranges): If range_successor or + range_predecessor fail, just return 0. + +2007-06-05 Ian Lance Taylor + + * tree-vrp.c (compare_values_warnv): Check TREE_NO_WARNING on a + PLUS_EXPR or MINUS_EXPR node before setting *strict_overflow_p. + (extract_range_from_assert): Set TREE_NO_WARNING when creating an + expression. + (test_for_singularity): Likewise. + +2007-06-04 Ian Lance Taylor + + * tree-vrp.c (adjust_range_with_scev): When loop is not expected + to overflow, reduce overflow infinity to regular infinity. + (vrp_var_may_overflow): New static function. + (vrp_visit_phi_node): Check vrp_var_may_overflow. + +2007-05-31 H.J. Lu + + Backport from mainline: + 2007-05-25 H.J. Lu + + * config/i386/i386.c (__builtin_ia32_vec_ext_v2df): Mark it + with MASK_SSE2. + (__builtin_ia32_vec_ext_v2di): Likewise. + (__builtin_ia32_vec_ext_v4si): Likewise. + (__builtin_ia32_vec_ext_v8hi): Likewise. + (__builtin_ia32_vec_set_v8hi): Likewise. + +2007-05-31 John David Anglin + + Backport from mainline: + 2007-05-05 Aurelien Jarno + + * config/pa/pa.md: Split tgd_load, tld_load and tie_load + into pic and non-pic versions. Mark r19 as used for + tgd_load_pic, tld_load_pic and tie_load_pic. Mark r27 as used + for tgd_load, tld_load and tie_load . + * config/pa/pa.c (legitimize_tls_address): Emit pic or non-pic + version of tgd_load, tld_load and tie_load depending on the + value of flag_pic. + +2007-05-27 Daniel Berlin + + Fix PR/30052 + Backport PTA solver from mainline + + * pointer-set.c: Copy from mainline + * pointer-set.h: Ditto. + * tree-ssa-structalias.c: Copy solver portions from mainline. + * Makefile.in (tree-ssa-structalias.o): Update dependencies + +2007-05-30 Ralf Wildenhues + + * tree-vrp.c (compare_names): Initialize sop. + +2007-05-30 Jakub Jelinek + + PR tree-optimization/31769 + * except.c (duplicate_eh_regions): Clear prev_try if + ERT_MUST_NOT_THROW region is inside of ERT_TRY region. + +2007-05-28 Andrew Pinski + + PR tree-opt/32100 + * fold-const.c (tree_expr_nonnegative_warnv_p): Don't + return true when truth_value_p is true and the type + is of signed:1. + +2007-05-27 H.J. Lu + + Backport from mainline: + 2007-05-25 Uros Bizjak + + * config/i386/sse.md (*vec_extractv2di_1_sse2): Do not calculate + "memory" attribute for "sseishft" type insn without operands[2]. + + 2007-05-25 H.J. Lu + + * config/i386/sse.md (*vec_extractv2di_1_sse2): Correct shift. + +2007-05-22 Ian Lance Taylor + + * tree-vrp.c (avoid_overflow_infinity): New static function, + broken out of set_value_range_to_value. + (set_value_range_to_value): Call avoid_overflow_infinity. + (extract_range_from_assert): Likewise. + +2007-05-23 Chen Liqin + + PR target/30987 + * config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove. + * config/score/predicate.md (const_pow2, const_npow2): remove. + * config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL undef. + PR target/30474 + * config/score/score.c (score_print_operand): makes sure that only lower + bits are used. + +2007-05-21 Uros Bizjak + + PR target/31167 + Backport from mainline. + * config/i386/i386.md (*addti3_1, *addti3_1 splitter): Use + x86_64_general_operand as operand[2] predicate. Remove "iF" + from operand constraints and use "e" constraint instead. + (*subti3_1, *subti3_1 splitter): Ditto. + (*negti2_1, *negti2_1 splitter): Use nonimmediate_operand as + operand[1] predicate. + +2007-05-21 Uros Bizjak + + PR target/30041 + Backport from mainline. + * config/i386/sse.md ("*sse3_movddup"): Use operands[0] and + operands[1] in insn constraint. Correct type attribute to sselog1. + +2007-05-20 Kaz Kojima + + PR target/31701 + Backport from mainline. + * config/sh/sh.c (output_stack_adjust): Avoid using the frame + register itself to hold the offset constant. Tell flow the use + of r4 and r5 when they are used. + +2007-05-20 Kaz Kojima + + PR target/31480 + Backport from mainline. + * config/sh/sh.md (length): Check if prev_nonnote_insn (insn) + is null. + +2007-05-20 Kaz Kojima + + PR target/31022 + Backport from mainline. + * config/sh/sh.c (sh_adjust_cost): Use the result of single_set + instead of PATTERN. + +2007-05-20 Kaz Kojima + + PR target/27405 + Backport from mainline. + * config/sh/sh.md (cmp{eq,gt,gtu}{si,di}_media): Remove. + (cmpsi{eq,gt,gtu}{si,di}_media): Rename to + cmp{eq,gt,gtu}{si,di}_media. + (*cmpne0si_media): Remove. + (*movsicc_umin): Adjust gen_cmp*_media call. + (unordered): Change the mode of unordered and operands[1] to + SImode. + (seq): Adjust gen_cmp*_media calls. Make the mode of + a temporary result of compare SImode if needed. If the mode + of operands[0] is DImode, extend the temporary result to DImode. + (slt, sle, sgt, sge, sgtu, sltu, sleu, sgue, sne): Likewise. + (sunorderd): Change the mode of match_operand and unorderd to + SImode. + (cmpeq{sf,df}_media): Remove. + (cmpsieq{sf,df}_media): Rename to cmpeq{sf,df}_media. + (cmp{gt,ge,un}{sf,df}_media): Change the mode of match_operand + and compare operation to SImode. + +2007-05-18 Joseph Myers + + * config/soft-fp/double.h, config/soft-fp/extended.h, + config/soft-fp/floatundidf.c, config/soft-fp/floatundisf.c, + config/soft-fp/floatunsidf.c, config/soft-fp/floatunsisf.c, + config/soft-fp/op-2.h, config/soft-fp/op-4.h, + config/soft-fp/op-common.h, config/soft-fp/quad.h: Update from + glibc CVS. + +2007-05-17 Ian Lance Taylor + + PR tree-optimization/31953 + * tree-vrp.c (set_value_range_to_value): Add equiv parameter. + Change all callers. + (set_value_range_to_null): Call set_value_range_to_value. + (extract_range_from_comparison): Likewise. + +2007-05-17 Eric Botcazou + + PR rtl-optimization/31691 + * combine.c (simplify_set): Build a new src pattern instead of + substituting its operands in the COMPARE case. + +2007-05-14 Mark Mitchell + + * BASE-VER: Set to 4.2.1. + * DEV-PHASE: Set to prerelease. + 2007-05-13 Release Manager * GCC 4.2.0 released. @@ -307,7 +745,8 @@ 2007-04-03 Stuart Hastings PR 31281 - * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl. + * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile + from rethrow decl. * cse.c (record_jump_equiv): Bail out on CCmode comparisons. 2007-04-03 Jakub Jelinek ==== //depot/projects/mips2/src/contrib/gcc/DATESTAMP#2 (text+ko) ==== @@ -1,1 +1,1 @@ -20070514 +20070719 ==== //depot/projects/mips2/src/contrib/gcc/Makefile.in#3 (text+ko) ==== @@ -1839,7 +1839,7 @@ tree-ssa-structalias.o: tree-ssa-structalias.c tree-ssa-structalias.h \ $(SYSTEM_H) $(CONFIG_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \ $(TM_H) coretypes.h $(CGRAPH_H) tree-pass.h $(TIMEVAR_H) \ - gt-tree-ssa-structalias.h $(PARAMS_H) + gt-tree-ssa-structalias.h $(PARAMS_H) pointer-set.h tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \ toplev.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ ==== //depot/projects/mips2/src/contrib/gcc/calls.c#3 (text+ko) ==== @@ -1238,13 +1238,25 @@ /* If this is a libcall, then precompute all arguments so that we do not get extraneous instructions emitted as part of the libcall sequence. */ - if ((flags & ECF_LIBCALL_BLOCK) == 0) + + /* If we preallocated the stack space, and some arguments must be passed + on the stack, then we must precompute any parameter which contains a + function call which will store arguments on the stack. + Otherwise, evaluating the parameter may clobber previous parameters + which have already been stored into the stack. (we have code to avoid + such case by saving the outgoing stack arguments, but it results in + worse code) */ + if ((flags & ECF_LIBCALL_BLOCK) == 0 && !ACCUMULATE_OUTGOING_ARGS) return; for (i = 0; i < num_actuals; i++) { enum machine_mode mode; + if ((flags & ECF_LIBCALL_BLOCK) == 0 + && TREE_CODE (args[i].tree_value) != CALL_EXPR) + continue; + /* If this is an addressable type, we cannot pre-evaluate it. */ gcc_assert (!TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value))); ==== //depot/projects/mips2/src/contrib/gcc/combine.c#4 (text+ko) ==== @@ -5341,14 +5341,14 @@ } else if (GET_MODE (op0) == compare_mode && op1 == const0_rtx) { - SUBST(SET_SRC (x), op0); + SUBST (SET_SRC (x), op0); src = SET_SRC (x); } - else + /* Otherwise, update the COMPARE if needed. */ + else if (XEXP (src, 0) != op0 || XEXP (src, 1) != op1) { - /* Otherwise, update the COMPARE if needed. */ - SUBST (XEXP (src, 0), op0); - SUBST (XEXP (src, 1), op1); + SUBST (SET_SRC (x), gen_rtx_COMPARE (compare_mode, op0, op1)); + src = SET_SRC (x); } } else ==== //depot/projects/mips2/src/contrib/gcc/config/arm/arm.c#4 (text+ko) ==== @@ -10555,6 +10555,7 @@ if (leaf && frame_size == 0) { offsets->outgoing_args = offsets->soft_frame; + offsets->locals_base = offsets->soft_frame; return offsets; } @@ -13874,6 +13875,7 @@ amount = offsets->locals_base - offsets->saved_regs; } + gcc_assert (amount >= 0); if (amount) { if (amount < 512) ==== //depot/projects/mips2/src/contrib/gcc/config/arm/cirrus.md#3 (text+ko) ==== @@ -404,28 +404,6 @@ ;; Cirrus SI values have been outlawed. Look in arm.h for the comment ;; on HARD_REGNO_MODE_OK. -(define_insn "*cirrus_arm_movsi_insn" - [(set (match_operand:SI 0 "general_operand" "=r,r,r,m,*v,r,*v,T,*v") - (match_operand:SI 1 "general_operand" "rI,K,mi,r,r,*v,T,*v,*v"))] - "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0 - && (register_operand (operands[0], SImode) - || register_operand (operands[1], SImode))" - "@ - mov%?\\t%0, %1 - mvn%?\\t%0, #%B1 - ldr%?\\t%0, %1 - str%?\\t%1, %0 - cfmv64lr%?\\t%Z0, %1 - cfmvr64l%?\\t%0, %Z1 - cfldr32%?\\t%V0, %1 - cfstr32%?\\t%V1, %0 - cfsh32%?\\t%V0, %V1, #0" - [(set_attr "type" "*, *, load1,store1, *, *, load1,store1, *") - (set_attr "pool_range" "*, *, 4096, *, *, *, 1024, *, *") - (set_attr "neg_pool_range" "*, *, 4084, *, *, *, 1012, *, *") - (set_attr "cirrus" "not,not, not, not,move,normal,normal,normal,normal")] -) - (define_insn "*cirrus_movsf_hard_insn" [(set (match_operand:SF 0 "nonimmediate_operand" "=v,v,v,r,m,r,r,m") (match_operand:SF 1 "general_operand" "v,mE,r,v,v,r,mE,r"))] ==== //depot/projects/mips2/src/contrib/gcc/config/i386/i386.c#4 (text+ko) ==== @@ -19,7 +19,7 @@ the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.24 2007/05/19 02:26:26 kan Exp $ */ +/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.25 2007/08/14 03:04:42 kan Exp $ */ #include "config.h" #include "system.h" @@ -13480,6 +13480,9 @@ gcc_assert (n < MAX_386_STACK_LOCALS); + /* Virtual slot is valid only before vregs are instantiated. */ + gcc_assert ((n == SLOT_VIRTUAL) == !virtuals_instantiated); + for (s = ix86_stack_locals; s; s = s->next) if (s->mode == mode && s->n == n) return s->rtl; @@ -14570,6 +14573,7 @@ IX86_BUILTIN_VEC_EXT_V4SF, IX86_BUILTIN_VEC_EXT_V4SI, IX86_BUILTIN_VEC_EXT_V8HI, + IX86_BUILTIN_VEC_EXT_V16QI, IX86_BUILTIN_VEC_EXT_V2SI, IX86_BUILTIN_VEC_EXT_V4HI, IX86_BUILTIN_VEC_SET_V8HI, @@ -15542,13 +15546,13 @@ /* Access to the vec_extract patterns. */ ftype = build_function_type_list (double_type_node, V2DF_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2df", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2df", ftype, IX86_BUILTIN_VEC_EXT_V2DF); ftype = build_function_type_list (long_long_integer_type_node, V2DI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2di", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2di", ftype, IX86_BUILTIN_VEC_EXT_V2DI); ftype = build_function_type_list (float_type_node, V4SF_type_node, @@ -15558,12 +15562,12 @@ ftype = build_function_type_list (intSI_type_node, V4SI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v4si", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v4si", ftype, IX86_BUILTIN_VEC_EXT_V4SI); ftype = build_function_type_list (intHI_type_node, V8HI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v8hi", ftype, IX86_BUILTIN_VEC_EXT_V8HI); ftype = build_function_type_list (intHI_type_node, V4HI_type_node, @@ -15576,11 +15580,15 @@ def_builtin (MASK_MMX, "__builtin_ia32_vec_ext_v2si", ftype, IX86_BUILTIN_VEC_EXT_V2SI); + ftype = build_function_type_list (intQI_type_node, V16QI_type_node, + integer_type_node, NULL_TREE); + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v16qi", ftype, IX86_BUILTIN_VEC_EXT_V16QI); + /* Access to the vec_set patterns. */ ftype = build_function_type_list (V8HI_type_node, V8HI_type_node, intHI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_set_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_set_v8hi", ftype, IX86_BUILTIN_VEC_SET_V8HI); ftype = build_function_type_list (V4HI_type_node, V4HI_type_node, @@ -16124,13 +16132,13 @@ case IX86_BUILTIN_LDMXCSR: op0 = expand_normal (TREE_VALUE (arglist)); - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_move_insn (target, op0); emit_insn (gen_sse_ldmxcsr (target)); return 0; case IX86_BUILTIN_STMXCSR: - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_insn (gen_sse_stmxcsr (target)); return copy_to_mode_reg (SImode, target); @@ -16492,6 +16500,7 @@ case IX86_BUILTIN_VEC_EXT_V4SF: case IX86_BUILTIN_VEC_EXT_V4SI: case IX86_BUILTIN_VEC_EXT_V8HI: + case IX86_BUILTIN_VEC_EXT_V16QI: case IX86_BUILTIN_VEC_EXT_V2SI: case IX86_BUILTIN_VEC_EXT_V4HI: return ix86_expand_vec_ext_builtin (arglist, target); ==== //depot/projects/mips2/src/contrib/gcc/config/i386/i386.h#3 (text+ko) ==== @@ -2166,7 +2166,8 @@ enum ix86_stack_slot { - SLOT_TEMP = 0, + SLOT_VIRTUAL = 0, + SLOT_TEMP, SLOT_CW_STORED, SLOT_CW_TRUNC, SLOT_CW_FLOOR, ==== //depot/projects/mips2/src/contrib/gcc/config/i386/i386.md#4 (text+ko) ==== @@ -3716,7 +3716,7 @@ ; else { - rtx temp = assign_386_stack_local (SFmode, SLOT_TEMP); + rtx temp = assign_386_stack_local (SFmode, SLOT_VIRTUAL); emit_insn (gen_truncdfsf2_with_temp (operands[0], operands[1], temp)); DONE; } @@ -3868,7 +3868,7 @@ DONE; } else - operands[2] = assign_386_stack_local (SFmode, SLOT_TEMP); + operands[2] = assign_386_stack_local (SFmode, SLOT_VIRTUAL); }) (define_insn "*truncxfsf2_mixed" @@ -3966,7 +3966,7 @@ DONE; } else - operands[2] = assign_386_stack_local (DFmode, SLOT_TEMP); + operands[2] = assign_386_stack_local (DFmode, SLOT_VIRTUAL); }) (define_insn "*truncxfdf2_mixed" @@ -4749,7 +4749,7 @@ (define_insn "*addti3_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o") (plus:TI (match_operand:TI 1 "nonimmediate_operand" "%0,0") - (match_operand:TI 2 "general_operand" "roiF,riF"))) + (match_operand:TI 2 "x86_64_general_operand" "roe,re"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_binary_operator_ok (PLUS, TImode, operands)" "#") @@ -4757,7 +4757,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") (plus:TI (match_operand:TI 1 "nonimmediate_operand" "") - (match_operand:TI 2 "general_operand" ""))) + (match_operand:TI 2 "x86_64_general_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel [(set (reg:CC FLAGS_REG) (unspec:CC [(match_dup 1) (match_dup 2)] @@ -6483,7 +6483,7 @@ (define_insn "*subti3_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o") (minus:TI (match_operand:TI 1 "nonimmediate_operand" "0,0") - (match_operand:TI 2 "general_operand" "roiF,riF"))) + (match_operand:TI 2 "x86_64_general_operand" "roe,re"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_binary_operator_ok (MINUS, TImode, operands)" "#") @@ -6491,7 +6491,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") (minus:TI (match_operand:TI 1 "nonimmediate_operand" "") - (match_operand:TI 2 "general_operand" ""))) + (match_operand:TI 2 "x86_64_general_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel [(set (reg:CC FLAGS_REG) (compare:CC (match_dup 1) (match_dup 2))) @@ -9326,7 +9326,7 @@ (define_insn "*negti2_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=ro") - (neg:TI (match_operand:TI 1 "general_operand" "0"))) + (neg:TI (match_operand:TI 1 "nonimmediate_operand" "0"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_unary_operator_ok (NEG, TImode, operands)" @@ -9334,7 +9334,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") - (neg:TI (match_operand:TI 1 "general_operand" ""))) + (neg:TI (match_operand:TI 1 "nonimmediate_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel ==== //depot/projects/mips2/src/contrib/gcc/config/i386/sse.md#2 (text+ko) ==== @@ -2055,11 +2055,11 @@ (match_dup 1)) (parallel [(const_int 0) (const_int 2)])))] - "TARGET_SSE3 && !(MEM_P (operands[1]) && MEM_P (operands[2]))" + "TARGET_SSE3 && !(MEM_P (operands[0]) && MEM_P (operands[1]))" "@ movddup\t{%1, %0|%0, %1} #" - [(set_attr "type" "sselog,ssemov") + [(set_attr "type" "sselog1,ssemov") (set_attr "mode" "V2DF")]) (define_split @@ -3494,9 +3494,10 @@ "TARGET_SSE2 && !(MEM_P (operands[0]) && MEM_P (operands[1]))" "@ movhps\t{%1, %0|%0, %1} - psrldq\t{$4, %0|%0, 4} + psrldq\t{$8, %0|%0, 8} movq\t{%H1, %0|%0, %H1}" [(set_attr "type" "ssemov,sseishft,ssemov") + (set_attr "memory" "*,none,*") (set_attr "mode" "V2SF,TI,TI")]) ;; Not sure this is ever used, but it doesn't hurt to have it. -aoliva ==== //depot/projects/mips2/src/contrib/gcc/config/rs6000/predicates.md#2 (text+ko) ==== @@ -694,7 +694,9 @@ (define_predicate "current_file_function_operand" (and (match_code "symbol_ref") (match_test "(DEFAULT_ABI != ABI_AIX || SYMBOL_REF_FUNCTION_P (op)) - && (SYMBOL_REF_LOCAL_P (op) + && ((SYMBOL_REF_LOCAL_P (op) + && (DEFAULT_ABI != ABI_AIX + || !SYMBOL_REF_EXTERNAL_P (op))) || (op == XEXP (DECL_RTL (current_function_decl), 0)))"))) ==== //depot/projects/mips2/src/contrib/gcc/config/rs6000/rs6000.c#4 (text+ko) ==== @@ -13515,7 +13515,8 @@ } } if (DEFAULT_ABI == ABI_DARWIN - || (*targetm.binds_local_p) (decl)) + || ((*targetm.binds_local_p) (decl) + && (DEFAULT_ABI != ABI_AIX || !DECL_EXTERNAL (decl)))) { tree attr_list = TYPE_ATTRIBUTES (TREE_TYPE (decl)); ==== //depot/projects/mips2/src/contrib/gcc/config/soft-fp/double.h#2 (text+ko) ==== @@ -1,6 +1,6 @@ /* Software floating-point emulation. Definitions for IEEE Double Precision - Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz), @@ -168,13 +168,13 @@ DFtype flt; struct { #if __BYTE_ORDER == __BIG_ENDIAN - unsigned sign : 1; - unsigned exp : _FP_EXPBITS_D; - unsigned long frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Aug 14 17:07:55 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8240716A46C; Tue, 14 Aug 2007 17:07:55 +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 434B616A469 for ; Tue, 14 Aug 2007 17:07:55 +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 3A09513C4B5 for ; Tue, 14 Aug 2007 17:07:55 +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 l7EH7tSb068193 for ; Tue, 14 Aug 2007 17:07:55 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7EH7sPE068190 for perforce@freebsd.org; Tue, 14 Aug 2007 17:07:54 GMT (envelope-from gonzo@FreeBSD.org) Date: Tue, 14 Aug 2007 17:07:54 GMT Message-Id: <200708141707.l7EH7sPE068190@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 125145 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, 14 Aug 2007 17:07:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=125145 Change 125145 by gonzo@gonzo_jeeves on 2007/08/14 17:07:49 o Overlapping TX/AX registers are different for different ABIs Affected files ... .. //depot/projects/mips2/src/sys/mips/include/asm.h#12 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/include/asm.h#12 (text+ko) ==== @@ -129,10 +129,17 @@ * Because they overlap with the last 4 arg regs in the new ABI, ta0-ta3 * should be used only when we need more than t0-t3. */ -#define ta0 $8 -#define ta1 $9 -#define ta2 $10 -#define ta3 $11 +#if defined(__mips_n32) || defined(__mips_n64) +#define ta0 $8 +#define ta1 $9 +#define ta2 $10 +#define ta3 $11 +#else +#define ta0 $12 +#define ta1 $13 +#define ta2 $14 +#define ta3 $15 +#endif /* __mips_n32 || __mips_n64 */ #ifdef __ELF__ # define _C_LABEL(x) x From owner-p4-projects@FreeBSD.ORG Tue Aug 14 18:19:25 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4745516A41A; Tue, 14 Aug 2007 18:19:25 +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 F0B4A16A418 for ; Tue, 14 Aug 2007 18:19:24 +0000 (UTC) (envelope-from phk@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E7D6013C461 for ; Tue, 14 Aug 2007 18:19:24 +0000 (UTC) (envelope-from phk@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 l7EIJOg1074416 for ; Tue, 14 Aug 2007 18:19:24 GMT (envelope-from phk@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7EIJO6S074413 for perforce@freebsd.org; Tue, 14 Aug 2007 18:19:24 GMT (envelope-from phk@freebsd.org) Date: Tue, 14 Aug 2007 18:19:24 GMT Message-Id: <200708141819.l7EIJO6S074413@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to phk@freebsd.org using -f From: Poul-Henning Kamp To: Perforce Change Reviews Cc: Subject: PERFORCE change 125147 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, 14 Aug 2007 18:19:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=125147 Change 125147 by phk@phk_critter on 2007/08/14 18:19:05 add three more syscalls: sys_thr_self sys_thr_set_name sys_rtprio_thread Affected files ... .. //depot/projects/valgrind/coregrind/m_syswrap/priv_syswrap-freebsd.h#3 edit .. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd.c#4 edit .. //depot/projects/valgrind/include/vki-freebsd.h#2 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_syswrap/priv_syswrap-freebsd.h#3 (text+ko) ==== @@ -197,6 +197,9 @@ DECL_TEMPLATE(freebsd, sys_statfs6); DECL_TEMPLATE(freebsd, sys_fstatfs6); DECL_TEMPLATE(freebsd, sys_fhstatfs6); +DECL_TEMPLATE(freebsd, sys_thr_self); +DECL_TEMPLATE(freebsd, sys_thr_set_name); +DECL_TEMPLATE(freebsd, sys_rtprio_thread); DECL_TEMPLATE(freebsd, sys_fork); DECL_TEMPLATE(freebsd, sys_vfork); DECL_TEMPLATE(freebsd, sys_modfind); ==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd.c#4 (text+ko) ==== @@ -1724,6 +1724,47 @@ #endif /* --------------------------------------------------------------------- + thr* wrappers + ------------------------------------------------------------------ */ + +PRE(sys_thr_self) +{ + PRINT( "sys_thr_self ( %p )", ARG1 ); + PRE_REG_READ1(long, "thr_self", long *, "id"); + PRE_MEM_WRITE( "thr_self()", ARG1, sizeof(long)); +} +POST(sys_thr_self) +{ + POST_MEM_WRITE( ARG1, sizeof(long)); +} + +PRE(sys_thr_set_name) +{ + PRINT( "sys_thr_set_name ( %d, %p )", ARG1, ARG2 ); + PRE_REG_READ2(long, "thr_set_name", long, "id", const char *, "name"); + PRE_MEM_RASCIIZ( "sys_thr_set_name(threadname)", ARG2); +} + +PRE(sys_rtprio_thread) +{ + PRINT( "sys_rtprio_thread ( %d, %d, %p )", ARG1, ARG2, ARG3 ); + PRE_REG_READ3(long, "rtprio_thread", + int, "function", __vki_lwpid_t, "lwpid", struct vki_rtprio *, "rtp"); + if (ARG1 == VKI_RTP_SET) { + PRE_MEM_READ( "rtprio_thread(set)", ARG3, sizeof(struct vki_rtprio)); + } else if (ARG1 == VKI_RTP_LOOKUP) { + PRE_MEM_WRITE( "rtprio_thread(lookup)", ARG3, sizeof(struct vki_rtprio)); + } else { + /* PHK ?? */ + } +} +POST(sys_rtprio_thread) +{ + if (ARG1 == VKI_RTP_LOOKUP && RES == 0) + POST_MEM_WRITE( ARG3, sizeof(struct vki_rtprio)); +} + +/* --------------------------------------------------------------------- sig* wrappers ------------------------------------------------------------------ */ @@ -2628,7 +2669,7 @@ // thr_create 430 // thr_exit 431 - // thr_self 432 + BSDXY(__NR_thr_self, sys_thr_self), // 432 // thr_kill 433 // _umtx_lock 434 // _umtx_unlock 435 @@ -2668,9 +2709,9 @@ // kmq_unlink 462 // abort2 463 - // thr_set_name 464 + BSDX_(__NR_thr_set_name, sys_thr_set_name), // 464 // aio_fsync 465 - // rtprio_thread 466 + BSDXY(__NR_rtprio_thread, sys_rtprio_thread), // 466 // nosys 467 // nosys 468 ==== //depot/projects/valgrind/include/vki-freebsd.h#2 (text+ko) ==== @@ -1658,6 +1658,18 @@ vki_modspecific_t data; }; +//---------------------------------------------------------------------- +// From sys/rtprio.h +//---------------------------------------------------------------------- + +struct vki_rtprio { + vki_uint16_t type; + vki_uint16_t prio; +}; + +#define VKI_RTP_LOOKUP 0 +#define VKI_RTP_SET 1 + /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ From owner-p4-projects@FreeBSD.ORG Tue Aug 14 18:25:51 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C60516A41A; Tue, 14 Aug 2007 18:25: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 1BAC416A417 for ; Tue, 14 Aug 2007 18:25:51 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1269513C457 for ; Tue, 14 Aug 2007 18:25:51 +0000 (UTC) (envelope-from jbr@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 l7EIPokp074921 for ; Tue, 14 Aug 2007 18:25:50 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7EIPoLY074918 for perforce@freebsd.org; Tue, 14 Aug 2007 18:25:50 GMT (envelope-from jbr@FreeBSD.org) Date: Tue, 14 Aug 2007 18:25:50 GMT Message-Id: <200708141825.l7EIPoLY074918@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125148 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, 14 Aug 2007 18:25:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=125148 Change 125148 by jbr@jbr_bob on 2007/08/14 18:24:52 now with access from userspace Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#11 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#7 edit Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#11 (text+ko) ==== ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#7 (text+ko) ==== @@ -2999,8 +2999,8 @@ lim_cur(curthread->td_proc, RLIMIT_DATA); PROC_UNLOCK(curthread->td_proc); - error = vm_map_find(map, NULL, 0, addr, size, TRUE, VM_PROT_NONE, - VM_PROT_ALL, 0); + error = vm_map_find(map, NULL, 0, addr, size, TRUE, VM_PROT_RW, + VM_PROT_RW, 0); return (error); } From owner-p4-projects@FreeBSD.ORG Tue Aug 14 20:34:46 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C59C16A41A; Tue, 14 Aug 2007 20:34: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 0B44616A418 for ; Tue, 14 Aug 2007 20:34:46 +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 F3C0113C45B for ; Tue, 14 Aug 2007 20:34:45 +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 l7EKYjfI089177 for ; Tue, 14 Aug 2007 20:34:45 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7EKYjqG089174 for perforce@freebsd.org; Tue, 14 Aug 2007 20:34:45 GMT (envelope-from zec@FreeBSD.org) Date: Tue, 14 Aug 2007 20:34:45 GMT Message-Id: <200708142034.l7EKYjqG089174@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 125152 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, 14 Aug 2007 20:34:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=125152 Change 125152 by zec@zec_tpx32 on 2007/08/14 20:34:19 When substituting the "@" sign with vimage name, correctly compute the number of characters that need to be copied. Affected files ... .. //depot/projects/vimage/src/sys/kern/vfs_lookup.c#7 edit Differences ... ==== //depot/projects/vimage/src/sys/kern/vfs_lookup.c#7 (text+ko) ==== @@ -311,13 +311,13 @@ break; } bcopy(sp + 1, sp + vnamelen, - vnamelen - (sp - cp)); + linklen - (sp - cp)); bcopy(td->td_ucred->cr_vimage->vi_name, sp, vnamelen); linklen += (vnamelen - 1); } } -#endif /* IMUNES_SYMLINK_HACK */ +#endif if (linklen + ndp->ni_pathlen >= MAXPATHLEN) { if (ndp->ni_pathlen > 1) uma_zfree(namei_zone, cp); From owner-p4-projects@FreeBSD.ORG Tue Aug 14 21:32:00 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BDB6A16A420; Tue, 14 Aug 2007 21:31: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 914EC16A418 for ; Tue, 14 Aug 2007 21:31:59 +0000 (UTC) (envelope-from phk@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6C25513C46C for ; Tue, 14 Aug 2007 21:31:59 +0000 (UTC) (envelope-from phk@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 l7ELVxr1002641 for ; Tue, 14 Aug 2007 21:31:59 GMT (envelope-from phk@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7ELVxRG002638 for perforce@freebsd.org; Tue, 14 Aug 2007 21:31:59 GMT (envelope-from phk@freebsd.org) Date: Tue, 14 Aug 2007 21:31:59 GMT Message-Id: <200708142131.l7ELVxRG002638@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to phk@freebsd.org using -f From: Poul-Henning Kamp To: Perforce Change Reviews Cc: Subject: PERFORCE change 125154 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, 14 Aug 2007 21:32:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=125154 Change 125154 by phk@phk_critter on 2007/08/14 21:30:58 POST_MEM_WRITE the correct ARG2 instead of ARG1 Affected files ... .. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-x86-freebsd.c#3 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-x86-freebsd.c#3 (text+ko) ==== @@ -536,7 +536,7 @@ SET_STATUS_from_SysRes( sys_get_thread_area( tid, 2, (void **)ARG2 ) ); if (SUCCESS) { - POST_MEM_WRITE( ARG1, sizeof(void *) ); + POST_MEM_WRITE( ARG2, sizeof(void *) ); } break; default: From owner-p4-projects@FreeBSD.ORG Tue Aug 14 21:34:03 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E5A8D16A469; Tue, 14 Aug 2007 21:34: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 BD96916A421 for ; Tue, 14 Aug 2007 21:34:02 +0000 (UTC) (envelope-from phk@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B069513C45A for ; Tue, 14 Aug 2007 21:34:02 +0000 (UTC) (envelope-from phk@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 l7ELY25i002790 for ; Tue, 14 Aug 2007 21:34:02 GMT (envelope-from phk@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7ELY2MK002787 for perforce@freebsd.org; Tue, 14 Aug 2007 21:34:02 GMT (envelope-from phk@freebsd.org) Date: Tue, 14 Aug 2007 21:34:02 GMT Message-Id: <200708142134.l7ELY2MK002787@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to phk@freebsd.org using -f From: Poul-Henning Kamp To: Perforce Change Reviews Cc: Subject: PERFORCE change 125155 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, 14 Aug 2007 21:34:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=125155 Change 125155 by phk@phk_critter on 2007/08/14 21:33:36 sysarch(I386_SET_GSBASE)'s argument is a pointer to the address, not the address itself. Affected files ... .. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-x86-freebsd.c#4 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-x86-freebsd.c#4 (text+ko) ==== @@ -511,6 +511,7 @@ PRE(sys_sysarch) { ThreadState *tst; + void **p; PRINT("sys_sysarch ( %d, %p )", ARG1, ARG2); PRE_REG_READ2(int, "sysarch", @@ -522,9 +523,10 @@ /* On FreeBSD, the syscall loads the %gs selector for us, so do it now. */ tst = VG_(get_ThreadState)(tid); + p = ARG2; tst->arch.vex.guest_GS = (2 << 3) | 3; /* GSEL(GUGS_SEL, SEL_UPL) */ /* "do" the syscall ourselves; the kernel never sees it */ - SET_STATUS_from_SysRes( sys_set_thread_area( tid, 2, (void *)ARG2 ) ); + SET_STATUS_from_SysRes( sys_set_thread_area( tid, 2, *p ) ); break; case VKI_I386_GET_GSBASE: From owner-p4-projects@FreeBSD.ORG Tue Aug 14 21:35:05 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EE93016A421; Tue, 14 Aug 2007 21:35:04 +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 A7ED316A419 for ; Tue, 14 Aug 2007 21:35:04 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9A44C13C45E for ; Tue, 14 Aug 2007 21:35:04 +0000 (UTC) (envelope-from jbr@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 l7ELZ4dx002850 for ; Tue, 14 Aug 2007 21:35:04 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7ELZ4T5002847 for perforce@freebsd.org; Tue, 14 Aug 2007 21:35:04 GMT (envelope-from jbr@FreeBSD.org) Date: Tue, 14 Aug 2007 21:35:04 GMT Message-Id: <200708142135.l7ELZ4T5002847@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125156 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, 14 Aug 2007 21:35:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=125156 Change 125156 by jbr@jbr_bob on 2007/08/14 21:34:29 Moved the address of usrsyshm to proc Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/i386/i386/elf_machdep.c#4 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/init_main.c#4 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#12 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/proc.h#3 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/sysent.h#4 edit Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/i386/i386/elf_machdep.c#4 (text+ko) ==== @@ -68,7 +68,6 @@ VM_MAXUSER_ADDRESS, USRSTACK, PS_STRINGS, - 0, VM_PROT_ALL, exec_copyout_strings, exec_setregs, ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/init_main.c#4 (text+ko) ==== @@ -341,7 +341,6 @@ VM_MAXUSER_ADDRESS, USRSTACK, PS_STRINGS, - 0, VM_PROT_ALL, NULL, NULL, ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#12 (text+ko) ==== @@ -158,12 +158,12 @@ #ifdef SCTL_MASK32 if (req->flags & SCTL_MASK32) { unsigned int val; - val = (unsigned int)p->p_sysent->sv_sysshm; + val = (unsigned int)p->p_sysshm; error = SYSCTL_OUT(req, &val, sizeof(val)); } else #endif - error = SYSCTL_OUT(req, &p->p_sysent->sv_sysshm, - sizeof(p->p_sysent->sv_sysshm)); + error = SYSCTL_OUT(req, &p->p_sysshm, + sizeof(p->p_sysshm)); return error; } @@ -915,13 +915,23 @@ { int error; vm_map_t map = &imgp->proc->p_vmspace->vm_map; - vm_offset_t *addr = &imgp->proc->p_sysent->sv_sysshm; - + vm_offset_t *addr = &imgp->proc->p_sysshm; +/* + vm_map_t tmap; + vm_object_t object; + vm_map_entry_t entry; + vm_pindex_t pindex; +*/ if (imgp->sysshm != NULL) exec_unmap_sysshm(imgp); error = vm_map_sysshm(map, addr, 42); - +/* + tmap = map; + vm_map_lookup(&tmap, *addr, VM_PROT_READ, &entry, &object, &pindex, NULL, + NULL); + vm_map_lookup_done(tmap, entry); +*/ return(error); } ==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/proc.h#3 (text+ko) ==== @@ -576,6 +576,7 @@ void *p_emuldata; /* (c) Emulator state data. */ struct label *p_label; /* (*) Proc (not subject) MAC label. */ struct p_sched *p_sched; /* (*) Scheduler-specific data. */ + vm_offset_t p_sysshm; STAILQ_HEAD(, ktr_request) p_ktr; /* (o) KTR event queue. */ LIST_HEAD(, mqueue_notifier) p_mqnotifier; /* (c) mqueue notifiers.*/ }; ==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/sysent.h#4 (text+ko) ==== @@ -95,8 +95,6 @@ vm_offset_t sv_maxuser; /* VM_MAXUSER_ADDRESS */ vm_offset_t sv_usrstack; /* USRSTACK */ vm_offset_t sv_psstrings; /* PS_STRINGS */ - vm_offset_t sv_sysshm; /* memory shared between proccess and - kernel */ int sv_stackprot; /* vm protection for stack */ register_t *(*sv_copyout_strings)(struct image_params *); void (*sv_setregs)(struct thread *, u_long, u_long, u_long); From owner-p4-projects@FreeBSD.ORG Tue Aug 14 21:43:16 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C8D9016A41B; Tue, 14 Aug 2007 21:43:15 +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 5F3F816A419 for ; Tue, 14 Aug 2007 21:43:15 +0000 (UTC) (envelope-from phk@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 511B513C45E for ; Tue, 14 Aug 2007 21:43:15 +0000 (UTC) (envelope-from phk@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 l7ELhFPq003387 for ; Tue, 14 Aug 2007 21:43:15 GMT (envelope-from phk@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7ELhEvo003384 for perforce@freebsd.org; Tue, 14 Aug 2007 21:43:14 GMT (envelope-from phk@freebsd.org) Date: Tue, 14 Aug 2007 21:43:14 GMT Message-Id: <200708142143.l7ELhEvo003384@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to phk@freebsd.org using -f From: Poul-Henning Kamp To: Perforce Change Reviews Cc: Subject: PERFORCE change 125157 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, 14 Aug 2007 21:43:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=125157 Change 125157 by phk@phk_critter on 2007/08/14 21:42:21 install handler for sigaction6 (seems to work) start implementing _umtx_op Affected files ... .. //depot/projects/valgrind/coregrind/m_syswrap/priv_syswrap-freebsd.h#4 edit .. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd-variants.c#2 edit .. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd.c#5 edit .. //depot/projects/valgrind/coregrind/m_syswrap/syswrap-x86-freebsd.c#5 edit .. //depot/projects/valgrind/include/vki-freebsd.h#3 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_syswrap/priv_syswrap-freebsd.h#4 (text+ko) ==== @@ -220,6 +220,7 @@ DECL_TEMPLATE(freebsd, sys_ftruncate7); DECL_TEMPLATE(freebsd, sys_pread7); DECL_TEMPLATE(freebsd, sys_pwrite7); +DECL_TEMPLATE(freebsd, sys__umtx_op); #endif // __PRIV_SYSWRAP_FREEBSD_H /*--------------------------------------------------------------------*/ ==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd-variants.c#2 (text+ko) ==== ==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-freebsd.c#5 (text+ko) ==== @@ -1745,6 +1745,62 @@ PRE_MEM_RASCIIZ( "sys_thr_set_name(threadname)", ARG2); } +/* --------------------------------------------------------------------- + umtx* wrappers + ------------------------------------------------------------------ */ + +PRE(sys__umtx_op) +{ + switch(ARG2) { + case VKI_UMTX_OP_LOCK: + PRINT( "sys__umtx_op ( %p, LOCK, %d, %p, %p)", ARG1, ARG3, ARG4, ARG5); + break; + case VKI_UMTX_OP_UNLOCK: + PRINT( "sys__umtx_op ( %p, UNLOCK, %d, %p, %p)", ARG1, ARG3, ARG4, ARG5); + break; + case VKI_UMTX_OP_WAIT: + PRINT( "sys__umtx_op ( %p, WAIT, %d, %p, %p)", ARG1, ARG3, ARG4, ARG5); + break; + case VKI_UMTX_OP_WAKE: + PRINT( "sys__umtx_op ( %p, WAKE, %d, %p, %p)", ARG1, ARG3, ARG4, ARG5); + break; + case VKI_UMTX_OP_MUTEX_TRYLOCK: + PRINT( "sys__umtx_op ( %p, MUTEX_TRYLOCK, %d, %p, %p)", + ARG1, ARG3, ARG4, ARG5); + break; + case VKI_UMTX_OP_MUTEX_LOCK: + PRINT( "sys__umtx_op ( %p, MUTEX_LOCK, %d, %p, %p)", + ARG1, ARG3, ARG4, ARG5); + break; + case VKI_UMTX_OP_MUTEX_UNLOCK: + PRINT( "sys__umtx_op ( %p, MUTEX_UNLOCK, %d, %p, %p)", + ARG1, ARG3, ARG4, ARG5); + break; + case VKI_UMTX_OP_SET_CEILING: + PRINT( "sys__umtx_op ( %p, SET_CEILING, %d, %p, %p)", + ARG1, ARG3, ARG4, ARG5); + break; + case VKI_UMTX_OP_CV_WAIT: + PRINT( "sys__umtx_op ( %p, CV_WAIT, %d, %p, %p)", ARG1, ARG3, ARG4, ARG5); + break; + case VKI_UMTX_OP_CV_SIGNAL: + PRINT( "sys__umtx_op ( %p, CV_SIGNAL, %d, %p, %p)", + ARG1, ARG3, ARG4, ARG5); + break; + case VKI_UMTX_OP_CV_BROADCAST: + PRINT( "sys__umtx_op ( %p, CV_BROADCAST, %d, %p, %p)", + ARG1, ARG3, ARG4, ARG5); + break; + default: + /* XXX: PHK ?? */ + break; + } +} + +POST(sys__umtx_op) +{ +} + PRE(sys_rtprio_thread) { PRINT( "sys_rtprio_thread ( %d, %d, %p )", ARG1, ARG2, ARG3 ); @@ -2650,6 +2706,11 @@ // __mac_execve 415 //!sigaction 416 +/* + * XXX: not sure what peter indicates with the '!' + * but this call below seems to work /phk + */ + BSDXY(__NR_sigaction6, sys_sigaction6), // 416 //!sigreturn 417 // __xstat 418 // __xfstat 419 @@ -2696,7 +2757,7 @@ // setaudit_addr 452 // auditctl 453 - // _umtx_op 454 + BSDXY(__NR__umtx_op, sys__umtx_op), // 454 // thr_new 455 // sigqueue 456 ==== //depot/projects/valgrind/coregrind/m_syswrap/syswrap-x86-freebsd.c#5 (text+ko) ==== @@ -523,7 +523,7 @@ /* On FreeBSD, the syscall loads the %gs selector for us, so do it now. */ tst = VG_(get_ThreadState)(tid); - p = ARG2; + p = (void**)ARG2; tst->arch.vex.guest_GS = (2 << 3) | 3; /* GSEL(GUGS_SEL, SEL_UPL) */ /* "do" the syscall ourselves; the kernel never sees it */ SET_STATUS_from_SysRes( sys_set_thread_area( tid, 2, *p ) ); ==== //depot/projects/valgrind/include/vki-freebsd.h#3 (text+ko) ==== @@ -1670,6 +1670,28 @@ #define VKI_RTP_LOOKUP 0 #define VKI_RTP_SET 1 +//---------------------------------------------------------------------- +// From sys/umtx.h +//---------------------------------------------------------------------- + +struct vki_umtx { + unsigned long u_owner; +}; + +#define VKI_UMTX_OP_LOCK 0 +#define VKI_UMTX_OP_UNLOCK 1 +#define VKI_UMTX_OP_WAIT 2 +#define VKI_UMTX_OP_WAKE 3 +#define VKI_UMTX_OP_MUTEX_TRYLOCK 4 +#define VKI_UMTX_OP_MUTEX_LOCK 5 +#define VKI_UMTX_OP_MUTEX_UNLOCK 6 +#define VKI_UMTX_OP_SET_CEILING 7 +#define VKI_UMTX_OP_CV_WAIT 8 +#define VKI_UMTX_OP_CV_SIGNAL 9 +#define VKI_UMTX_OP_CV_BROADCAST 10 +#define VKI_UMTX_OP_MAX 11 + + /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ From owner-p4-projects@FreeBSD.ORG Wed Aug 15 02:08:44 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A9C8B16A41B; Wed, 15 Aug 2007 02:08:44 +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 6F29616A417 for ; Wed, 15 Aug 2007 02:08:44 +0000 (UTC) (envelope-from gcooper@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5FC3A13C458 for ; Wed, 15 Aug 2007 02:08:44 +0000 (UTC) (envelope-from gcooper@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 l7F28iGP034817 for ; Wed, 15 Aug 2007 02:08:44 GMT (envelope-from gcooper@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7F28i9N034814 for perforce@freebsd.org; Wed, 15 Aug 2007 02:08:44 GMT (envelope-from gcooper@FreeBSD.org) Date: Wed, 15 Aug 2007 02:08:44 GMT Message-Id: <200708150208.l7F28i9N034814@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gcooper@FreeBSD.org using -f From: Garrett Cooper To: Perforce Change Reviews Cc: Subject: PERFORCE change 125159 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, 15 Aug 2007 02:08:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=125159 Change 125159 by gcooper@optimus-revised_pkgtools on 2007/08/15 02:08:38 lib/db/*: - Add initial BDB database API items. lib/file/*: - style(7) updates. Affected files ... .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.c#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.h#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/file/api.c#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/file/api.h#3 edit Differences ... ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/file/api.c#2 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/file/api.h#3 (text+ko) ==== @@ -22,12 +22,12 @@ SHA256 } checksum_type_e; -int checksum_matches(const file_info_t *, const checksum_type_e); +int checksum_matches(const file_info_t *, const checksum_type_e); #define OPEN(PATH, OPEN_FLAGS) open(PATH, OPEN_FLAGS | O_DIRECT) -int Fexists(const file_info_t *, const int); -int Exists(const file_info_t *); -int Chmod(const file_info_t *, const int, const int); +int Fexists(const file_info_t *, const int); +int Exists(const file_info_t *); +int Chmod(const file_info_t *, const int, const int); #endif From owner-p4-projects@FreeBSD.ORG Wed Aug 15 05:59:35 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1C1E016A41B; Wed, 15 Aug 2007 05:59: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 C1A2316A419 for ; Wed, 15 Aug 2007 05:59:34 +0000 (UTC) (envelope-from gcooper@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B09B813C478 for ; Wed, 15 Aug 2007 05:59:34 +0000 (UTC) (envelope-from gcooper@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 l7F5xYu3063258 for ; Wed, 15 Aug 2007 05:59:34 GMT (envelope-from gcooper@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7F5xXW2063255 for perforce@freebsd.org; Wed, 15 Aug 2007 05:59:33 GMT (envelope-from gcooper@FreeBSD.org) Date: Wed, 15 Aug 2007 05:59:33 GMT Message-Id: <200708150559.l7F5xXW2063255@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gcooper@FreeBSD.org using -f From: Garrett Cooper To: Perforce Change Reviews Cc: Subject: PERFORCE change 125164 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, 15 Aug 2007 05:59:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=125164 Change 125164 by gcooper@optimus-revised_pkgtools on 2007/08/15 05:59:15 Filling in more blanks with the BDB DB API. Affected files ... .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.c#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.h#2 edit Differences ... ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.c#2 (text+ko) ==== @@ -1,42 +1,229 @@ #include "lib/db/api.h" +/** + * @brief: Merge +CONTENTS information or similar output into file database + * @return 0 on success + * @return 1 on failure + */ +int +build_filedb(DB *database, const char *filedb_filename, const char **file_manifest_filenames) +{ + + int build_db_exit_status; + + /** + * Create temporary store for output conversion, + * and convert. + */ + char *file_data; + + /** + * Convert all entries to strings. + */ + build_db_exit_status = build_db(database, filedb_filename, file_data); + + return build_db_exit_status; + +} + +/** + * @brief Merge INDEX information into pkg database. + * @return 0 on success + * @return 1 on failure + */ int -build_filedb(DB *database, const char *filedb_filename, const char *file_manifest_filename) +build_pkgdb(DB *database, const char *pkgdb_filename, const char **index_filenames) { + int build_db_exit_status; + + /** + * Create temporary store for output conversion, + * and convert. + */ + char *pkg_data; + /** + * Convert all entries to strings. + */ + build_db_exit_status = build_db(database, pkgdb_filename, pkg_data); + return build_db_exit_status; } +/** + * @brief Create a database by first creating the header, then the + * cache, and return the database. + * @return 0 on success + * @return 1 on failure + */ int -build_pkgdb(DB *database, const char *pkgdb_filename, const char *index_filename) +build_db(DB *database, const char *db_filename, const char *data) { + int build_db_exit_status; + + build_db_exit_status = + dbopen(db_filename, O_CREAT | O_EXLOCK | O_EXCL | O_WRLOCK, 0644, DB_HASH, NULL); + + /** + * dbopen was successful. + */ + if(0 == build_db_exit_status) { + + /** + * Try initializing the database header. + */ + build_db_exit_status = initialize_database_header(database); + + /** + * Database header creation was good. Continue by trying to + * create the cache. + */ + if(0 == build_db_exit_status) { + + build_db_exit_status = initialize_entry_cache(database); + + /** + * Database is fully built if build_db_exit_status == 0. + */ + + } + + } + /** + * Else dbopen was bunk -- return exit status. + */ + return build_db_exit_status; + } +/** + * @brief Cache recent entry into file database, substituting the + * current entry for the least recently cached one. + * @return 0 on success + * @return 1 on failure + */ int cache_file_entry(DB *database, const void *entry, const size_t entry_size) { + int cache_exit_status; + + + remove_lru_cache_entry(database, entry_size); + return cache_exit_status; } +/** + * @brief Cache recent entry into pkg database, substituting + * the current entry for the least recently cached one. + * @return 0 on success + * @return 1 on failure + */ int cache_pkg_entry(DB *database, const void *entry, const size_t entry_size) { + int cache_exit_status; + + + remove_lru_cache_entry(database, entry_size); + return cache_exit_status; } +/** + * @brief Remove least recently used cache entry to make room + * for another entry (the most recently used entry). + * @return -1 on no change + * @return 0 on success + * @return 1 on failure + */ int -flush_changes(DB *database, const void *entry_list, const size_t entry_size) +remove_lru_cache_entry(DB *database, const size_t entry_size) +{ + + DBT + /** + * Cache updating related items. + * + * - cache_retrieved is the initial information. + * - cache_displaced is the information which will + * be copied and replace the old cache info. + */ + cache_query, + cache_retrieved, + cache_displaced, + /** + * Header related items. + * + * - header_query is the query info for the + * header. + * - header_retrieved is the returned header from + * the database + */ + header_query = { __HEADER_TITLE, sizeof(__HEADER_TITLE) }, + header_retrieved; + + int db_exit_status = database->get(, 0); + + /** + * Ok, there is a cache. Let's proceed. + */ + if(0 == db_exit_status) { + + + + } + + return db_exit_status; + +} + +/** + * @brief Setup the database header; this should only be + * executed after building the database. + * @return 0 on success + * @return 1 on failure + */ +int +initialize_database_header(DB *database) +{ + + + +} + +/** + * @brief Setup the entry cache; this should only be executed + * after building the database. + * @return 0 on success + * @return 1 on failure + */ +int +initialize_entry_cache(DB *database) +{ + + + +} + +/** + * @brief Cache recent entry into pkg database. + * @return 0 on success + * @return 1 on failure + */ +int +flush_changes(DB *database, const void **entry_list, const size_t entry_size) { @@ -44,20 +231,114 @@ } +/** + * @brief Search for file in file database. + * @return file_entry if found. + * @return NULL if not found. + */ void* file_search(DB *database, const char *key) { + file_entry *entry; + db_search(entry, sizeof(file_entry), DB, key); + return entry; } +/** + * @brief Search for package in pkg database. + * @return the pkg_entry if found. + * @return NULL if not found. + */ void* pkg_search(DB *database, const char *key) { + pkg_entry *entry; + + db_search(entry, sizeof(pkg_entry), DB, key); + return entry; + +} +/** + * @brief Generic search method through a database, common + * to both searching the file and pkg databases. + * @return 1 on successful find + * @return 0 on successful find. + * @return 1 on lack of resources (memset / malloc failed) + * or unknown BDB failure (check errno?) + * + */ + +/** + * Should the entries be globbable/pattern searchable? If + * so, then there would be more entires that would need to + * be returned than just 1. + */ +int +db_search(void *found_entry, const size_t found_entry_size, DB *database, const char *key) +{ + + DBT search_key = { key, sizeof(key) }; + DBT db_found_entry = calloc(1, sizeof(DBT)); + + int exit_status; + + /** + * The search subroutine. + */ + int db_get_exit_status = database->get(database, &search_key, &db_found_entry, 0); + + /** + * Success! We found it and everything passed in + * creating the DBT objects. + */ + if(0 == db_get_exit_status) { + + assert(found_entry_size == db_found_entry->size); + + exit_status = 1; + + /** + * If the malloc was successful, continue on + * with the memcpy. + */ + if( NULL != (found_entry = malloc(found_entry_size)) ) { + + /** + * If the memset was successful, then the + * copy was good and the retrieval was + * complete. + */ + if( NULL != (found_entry = memset( found_entry, + db_found_entry->data, + db_found_entry->size)) + ) { + exit_status = 0; + } + + } + + } + /** + * Else if the key's positive, there was an + * unknown BDB error. + */ + else if(0 < db_get_exit_status) { + exit_status = 1; + } + /** + * Else, the key wasn't found. + */ + else { + exit_status = -1; + } + + return exit_status; } ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.h#2 (text+ko) ==== @@ -7,11 +7,36 @@ #include #include +#include + +/** + * The database will appear something like this (abstractly): + * + * __HEADER + * __DATA_STORE (keyed) + * __ENTRY_CACHE (keyed) + * + * Where the __HEADER is like the following: + * + * + */ + +/** + * + * The title for the cache field. + */ +#define __CACHE_FIELD_TITLE "__CACHE" + +/** + * The title for the header field. + */ +#define __HEADER_FIELD_TITLE "__HEADER" + typedef struct { DB bdb_obj; - int (*build_db) (DB*, const char*, const char*); + int (*build_db) (DB*, const char*, const char**); int (*cache_entry) (DB*, const void*, const size_t); int (*flush_changes)(DB*, const void*, const size_t); int (*init_db) (DB*, const char*); @@ -19,19 +44,27 @@ } db; -/** BUILD DATABASES FROM FILES **/ -int build_filedb(DB*, const char*, const char*); -int build_pkgdb(DB*, const char*, const char*); +/** Database building functions **/ +int build_filedb(DB*, const char*, const char**); +int build_pkgdb(DB*, const char*, const char**); -/** CACHE ENTRIES **/ +/** Cache maintenance functions **/ int cache_file_entry(DB*, const void* const size_t); int cache_pkg_entry(DB*, const void*, const size_t); -/** FLUSH CHANGES **/ +int remove_lru_cache_entry(DB*, const size_t); + +/** For initializing required fields in the databases **/ +int initialize_database_header(DB*); +int initialize_entry_cache(DB*); + +/** Functions for flushing changes **/ int flush_changes(DB*, const void*, const size_t); -/** SEARCH **/ +/** Functions for search databases **/ void* file_search(DB*, const char*); void* pkg_search(DB*, const char*); +int db_search(void*, const size_t, DB*, const char *); + #endif From owner-p4-projects@FreeBSD.ORG Wed Aug 15 06:43:29 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AC74416A421; Wed, 15 Aug 2007 06:43: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 40DCD16A41A for ; Wed, 15 Aug 2007 06:43:29 +0000 (UTC) (envelope-from gcooper@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 267FE13C4B3 for ; Wed, 15 Aug 2007 06:43:29 +0000 (UTC) (envelope-from gcooper@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 l7F6hSVC072112 for ; Wed, 15 Aug 2007 06:43:29 GMT (envelope-from gcooper@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7F6hS7O072109 for perforce@freebsd.org; Wed, 15 Aug 2007 06:43:28 GMT (envelope-from gcooper@FreeBSD.org) Date: Wed, 15 Aug 2007 06:43:28 GMT Message-Id: <200708150643.l7F6hS7O072109@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gcooper@FreeBSD.org using -f From: Garrett Cooper To: Perforce Change Reviews Cc: Subject: PERFORCE change 125165 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, 15 Aug 2007 06:43:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=125165 Change 125165 by gcooper@optimus-revised_pkgtools on 2007/08/15 06:43:07 - Fill in more DB API blanks, in particular a 'constructor' and 'destructor'. - Convert all DB arguments to db arguments. Need to pass in the database object to all called 'methods' (currently it doesn't do much, but just in case..). Affected files ... .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.c#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.h#3 edit Differences ... ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.c#3 (text+ko) ==== @@ -6,7 +6,7 @@ * @return 1 on failure */ int -build_filedb(DB *database, const char *filedb_filename, const char **file_manifest_filenames) +build_filedb(db *database, const char *filedb_filename, const char **file_manifest_filenames) { int build_db_exit_status; @@ -32,7 +32,7 @@ * @return 1 on failure */ int -build_pkgdb(DB *database, const char *pkgdb_filename, const char **index_filenames) +build_pkgdb(db *database, const char *pkgdb_filename, const char **index_filenames) { int build_db_exit_status; @@ -59,18 +59,18 @@ * @return 1 on failure */ int -build_db(DB *database, const char *db_filename, const char *data) +build_db(db *database, const char *db_filename, const char *data) { int build_db_exit_status; - build_db_exit_status = + database->bdb_obj = dbopen(db_filename, O_CREAT | O_EXLOCK | O_EXCL | O_WRLOCK, 0644, DB_HASH, NULL); /** * dbopen was successful. */ - if(0 == build_db_exit_status) { + if(NULL != build_db_exit_status) { /** * Try initializing the database header. @@ -91,6 +91,8 @@ } + } else { + build_db_exit_status = 1; } /** @@ -108,7 +110,7 @@ * @return 1 on failure */ int -cache_file_entry(DB *database, const void *entry, const size_t entry_size) +cache_file_entry(db *database, const void *entry, const size_t entry_size) { int cache_exit_status; @@ -128,7 +130,7 @@ * @return 1 on failure */ int -cache_pkg_entry(DB *database, const void *entry, const size_t entry_size) +cache_pkg_entry(db *database, const void *entry, const size_t entry_size) { int cache_exit_status; @@ -149,7 +151,7 @@ * @return 1 on failure */ int -remove_lru_cache_entry(DB *database, const size_t entry_size) +remove_lru_cache_entry(db *database, const size_t entry_size) { DBT @@ -174,7 +176,7 @@ header_query = { __HEADER_TITLE, sizeof(__HEADER_TITLE) }, header_retrieved; - int db_exit_status = database->get(, 0); +// int db_exit_status = database->bdb_obj->get(, 0); /** * Ok, there is a cache. Let's proceed. @@ -196,7 +198,7 @@ * @return 1 on failure */ int -initialize_database_header(DB *database) +initialize_database_header(db *database) { @@ -210,7 +212,7 @@ * @return 1 on failure */ int -initialize_entry_cache(DB *database) +initialize_entry_cache(db *database) { @@ -223,7 +225,7 @@ * @return 1 on failure */ int -flush_changes(DB *database, const void **entry_list, const size_t entry_size) +flush_changes(db *database, const void **entry_list, const size_t entry_size) { @@ -237,12 +239,12 @@ * @return NULL if not found. */ void* -file_search(DB *database, const char *key) +file_search(db *database, const char *key) { file_entry *entry; - db_search(entry, sizeof(file_entry), DB, key); + db_search(entry, sizeof(file_entry), database, key); return entry; @@ -254,12 +256,12 @@ * @return NULL if not found. */ void* -pkg_search(DB *database, const char *key) +pkg_search(db *database, const char *key) { pkg_entry *entry; - db_search(entry, sizeof(pkg_entry), DB, key); + db_search(entry, sizeof(pkg_entry), db, key); return entry; @@ -281,7 +283,7 @@ * be returned than just 1. */ int -db_search(void *found_entry, const size_t found_entry_size, DB *database, const char *key) +db_search(void *found_entry, const size_t found_entry_size, db *database, const char *key) { DBT search_key = { key, sizeof(key) }; @@ -292,13 +294,14 @@ /** * The search subroutine. */ - int db_get_exit_status = database->get(database, &search_key, &db_found_entry, 0); + exit_status = + database->bdb_obj->get(database->bdb_obj, &search_key, &db_found_entry, 0); /** * Success! We found it and everything passed in * creating the DBT objects. */ - if(0 == db_get_exit_status) { + if(0 == exit_status) { assert(found_entry_size == db_found_entry->size); @@ -325,20 +328,50 @@ } } - /** - * Else if the key's positive, there was an - * unknown BDB error. - */ - else if(0 < db_get_exit_status) { - exit_status = 1; + + return exit_status; + +} + +void* +initialize_db(const char *filename, __DB_TYPE_e db_type) { + + db *database; + + switch(db_type) { + + case FILEDB: + + database->__build = build_filedb; + database->__cache_entry = cache_file_entry; + database->__flush = flush_changes; + database->__free = free_db; + database->__search = file_search; + + break; + + case PKGDB: + + database->__build = build_pkgdb; + database->__cache_entry = cache_pkg_entry; + database->__flush = flush_changes; + database->__free = free_db; + database->__search = pkg_search; + + break; + + default: + errx(-1, "Unknown package database type\n"); + } - /** - * Else, the key wasn't found. - */ - else { - exit_status = -1; - } + + return database; + +} + +int +free_db(db* db_obj) +{ - return exit_status; } ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.h#3 (text+ko) ==== @@ -1,6 +1,6 @@ -#ifndef __DB_API_H +#ifndef __db_API_H -#define __DB_API_H +#define __db_API_H #include #include @@ -9,6 +9,10 @@ #include +typedef enum { + FILEDB, PKGDB +} __DB_TYPE_e; + /** * The database will appear something like this (abstractly): * @@ -32,39 +36,61 @@ */ #define __HEADER_FIELD_TITLE "__HEADER" +/** + * The generalized database object. Used for the file and pkg + * databases. + */ typedef struct { - DB bdb_obj; + /** 'OBJECTS' **/ + /** The base database store object **/ + DB *bdb_obj; + /** End 'OBJECTS' **/ + + + /** 'METHODS' **/ + /** Build the database **/ + int (*__build) (db*, const char*, const char**); + /** Cache an entry**/ + int (*__cache_entry)(db*, const void*, const size_t); + /** Flush all changes **/ + int (*__flush) (db*, const void*, const size_t); + + int (*__free) (db*); + /** Query the database **/ + void* (*__search) (db*, const char*); - int (*build_db) (DB*, const char*, const char**); - int (*cache_entry) (DB*, const void*, const size_t); - int (*flush_changes)(DB*, const void*, const size_t); - int (*init_db) (DB*, const char*); - void* (*search) (DB*, const char*); + /** End 'METHODS' **/ } db; /** Database building functions **/ -int build_filedb(DB*, const char*, const char**); -int build_pkgdb(DB*, const char*, const char**); +int build_filedb(db*, const char*, const char**); +int build_pkgdb(db*, const char*, const char**); + +int build_db(db*, const char*, const char *); /** Cache maintenance functions **/ -int cache_file_entry(DB*, const void* const size_t); -int cache_pkg_entry(DB*, const void*, const size_t); +int cache_file_entry(db*, const void* const size_t); +int cache_pkg_entry(db*, const void*, const size_t); -int remove_lru_cache_entry(DB*, const size_t); +int remove_lru_cache_entry(db*, const size_t); /** For initializing required fields in the databases **/ -int initialize_database_header(DB*); -int initialize_entry_cache(DB*); +int initialize_database_header(db*); +int initialize_entry_cache(db*); /** Functions for flushing changes **/ -int flush_changes(DB*, const void*, const size_t); +int flush_changes(db*, const void*, const size_t); /** Functions for search databases **/ -void* file_search(DB*, const char*); -void* pkg_search(DB*, const char*); +void* file_search(db*, const char*); +void* pkg_search(db*, const char*); + +int db_search(void*, const size_t, db*, const char *); + +void* initialize_db(const char*, __DB_TYPE_e); -int db_search(void*, const size_t, DB*, const char *); +int free_db(db*); #endif From owner-p4-projects@FreeBSD.ORG Wed Aug 15 06:55:45 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 941A716A4C8; Wed, 15 Aug 2007 06:55: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 4E3F816A4C6 for ; Wed, 15 Aug 2007 06:55:45 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3DB5213C469 for ; Wed, 15 Aug 2007 06:55:45 +0000 (UTC) (envelope-from zhouzhouyi@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 l7F6tjSo072979 for ; Wed, 15 Aug 2007 06:55:45 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7F6tjep072976 for perforce@freebsd.org; Wed, 15 Aug 2007 06:55:45 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Wed, 15 Aug 2007 06:55:45 GMT Message-Id: <200708150655.l7F6tjep072976@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 125167 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, 15 Aug 2007 06:55:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=125167 Change 125167 by zhouzhouyi@zhouzhouyi_mactest on 2007/08/15 06:55:12 modified ping program to test Mandatory Access Control of netinet Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/Makefile#6 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/macping.c#1 add Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/Makefile#6 (text+ko) ==== @@ -6,7 +6,7 @@ #CFLAGS+=-DHAS_TRUNCATE64 #CFLAGS+=-DHAS_STAT64 -all: macproc mactest mdconfigopenrdonly fifo_io pipe_io +all: macproc mactest mdconfigopenrdonly fifo_io pipe_io macping macproc: macproc.c gcc -Wall ${CFLAGS} macproc.c -o macproc -lutil @@ -15,10 +15,13 @@ gcc ${CFLAGS} mactest.c mactestparser.tab.c macconf.c -o mactest mdconfigopenrdonly: mdconfig.c gcc ${CFLAGS} -o mdconfigopenrdonly mdconfig.c -lutil -lgeom -lbsdxml -lsbuf -fifo_io: fifo_io.c +fifo_io: fifo_io.c macconf.c mactestparser.tab.c gcc ${CFLAGS} -o fifo_io fifo_io.c mactestparser.tab.c macconf.c -pipe_io: pipe_io.c +pipe_io: pipe_io.c macconf.c mactestparser.tab.c gcc ${CFLAGS} -o pipe_io pipe_io.c mactestparser.tab.c macconf.c +macping: macping.c macconf.c mactestparser.tab.c + gcc ${CFLAGS} -o macping macping.c macconf.c mactestparser.tab.c + chmod 4555 macping clean: rm -f macproc @@ -26,3 +29,4 @@ rm -f mdconfigopenrdonly rm -f fifo_io rm -f pipe_io + rm -f macping From owner-p4-projects@FreeBSD.ORG Wed Aug 15 11:29:45 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 034A316A46D; Wed, 15 Aug 2007 11:29: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 CC30D16A418 for ; Wed, 15 Aug 2007 11:29:44 +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 B890E13C4A5 for ; Wed, 15 Aug 2007 11:29:44 +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 l7FBTiSw005376 for ; Wed, 15 Aug 2007 11:29:44 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7FBTiaU005370 for perforce@freebsd.org; Wed, 15 Aug 2007 11:29:44 GMT (envelope-from zec@FreeBSD.org) Date: Wed, 15 Aug 2007 11:29:44 GMT Message-Id: <200708151129.l7FBTiaU005370@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 125169 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, 15 Aug 2007 11:29:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=125169 Change 125169 by zec@zec_tpx32 on 2007/08/15 11:28:57 Defer dispatching of netisr handlers for mbufs which have crossed a boundary between two vnets. Direct dispatching in such cases could lead to various LORs, or in most extreme circumstances cause the kernel stack to overflow. This is accomplished by the introduction of a new mbuf flag, M_REMOTE_VNET, which must be set by any kernel entity moving a mbuf from one vnet context to another. So far only ng_eiface and ng_wormhole can operate across a boundary between vnets, so update those two accordingly. The flag is then evaluated in netisr_dispatch(), and if set, the mbuf is queued for later processing instead of direct dispatching of netisr handler. Affected files ... .. //depot/projects/vimage/src/sys/net/netisr.c#6 edit .. //depot/projects/vimage/src/sys/netgraph/ng_eiface.c#7 edit .. //depot/projects/vimage/src/sys/netgraph/ng_wormhole.c#2 edit .. //depot/projects/vimage/src/sys/sys/mbuf.h#6 edit Differences ... ==== //depot/projects/vimage/src/sys/net/netisr.c#6 (text+ko) ==== @@ -178,8 +178,19 @@ * from an interface but does not guarantee ordering * between multiple places in the system (e.g. IP * dispatched from interfaces vs. IP queued from IPSec). + * + * If the kernel was compiled with options VIMAGE, also defer + * dispatch of netisr handlers for mbufs that have crossed a + * boundary between two vnets. Direct dispatching in such + * cases could lead to various LORs, or in most extreme + * circumstances cause the kernel stack to overflow. */ +#ifndef VIMAGE if (netisr_direct && (ni->ni_flags & NETISR_MPSAFE)) { +#else + if (netisr_direct && (ni->ni_flags & NETISR_MPSAFE) && + !(m->m_flags & M_REMOTE_VNET)) { +#endif isrstat.isrs_directed++; /* * NB: We used to drain the queue before handling ==== //depot/projects/vimage/src/sys/netgraph/ng_eiface.c#7 (text+ko) ==== @@ -253,6 +253,12 @@ continue; } +#ifdef VIMAGE + /* Mark up the mbuf if crossing vnet boundary */ + if (ifp->if_vnet != node->nd_vnet) + m->m_flags |= M_REMOTE_VNET; +#endif + /* * Send packet; if hook is not connected, mbuf will get * freed. @@ -542,6 +548,12 @@ /* Update interface stats */ ifp->if_ipackets++; +#ifdef VIMAGE + /* Mark up the mbuf if crossing vnet boundary */ + if (ifp->if_vnet != hook->hk_node->nd_vnet) + m->m_flags |= M_REMOTE_VNET; +#endif + (*ifp->if_input)(ifp, m); /* Done */ ==== //depot/projects/vimage/src/sys/netgraph/ng_wormhole.c#2 (text+ko) ==== @@ -378,11 +378,14 @@ priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); int error = 0; priv_p remote_priv = priv->remote_priv; + struct mbuf *m; if (priv->status != NG_WORMHOLE_ACTIVE) { NG_FREE_ITEM(item); error = ENOTCONN; } else { + m = NGI_M(item); + m->m_flags |= M_REMOTE_VNET; CURVNET_SET_QUIET(remote_priv->vnet); NG_FWD_ITEM_HOOK(error, item, remote_priv->hook); CURVNET_RESTORE(); ==== //depot/projects/vimage/src/sys/sys/mbuf.h#6 (text+ko) ==== @@ -192,6 +192,7 @@ #define M_LASTFRAG 0x2000 /* packet is last fragment */ #define M_VLANTAG 0x10000 /* ether_vtag is valid */ #define M_PROMISC 0x20000 /* packet was not for us */ +#define M_REMOTE_VNET 0x40000 /* mbuf crossed boundary between two vnets */ /* * External buffer types: identify ext_buf type. @@ -214,7 +215,7 @@ #define M_COPYFLAGS (M_PKTHDR|M_EOR|M_RDONLY|M_PROTO1|M_PROTO1|M_PROTO2|\ M_PROTO3|M_PROTO4|M_PROTO5|M_SKIP_FIREWALL|\ M_BCAST|M_MCAST|M_FRAG|M_FIRSTFRAG|M_LASTFRAG|\ - M_VLANTAG|M_PROMISC) + M_VLANTAG|M_PROMISC|M_REMOTE_VNET) /* * Flags to purge when crossing layers. From owner-p4-projects@FreeBSD.ORG Wed Aug 15 12:16:43 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5550B16A421; Wed, 15 Aug 2007 12:16:43 +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 199A616A417 for ; Wed, 15 Aug 2007 12:16:43 +0000 (UTC) (envelope-from delphij@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0481713C468 for ; Wed, 15 Aug 2007 12:16:43 +0000 (UTC) (envelope-from delphij@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 l7FCGgfS025636 for ; Wed, 15 Aug 2007 12:16:42 GMT (envelope-from delphij@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7FCGfS4025624 for perforce@freebsd.org; Wed, 15 Aug 2007 12:16:41 GMT (envelope-from delphij@freebsd.org) Date: Wed, 15 Aug 2007 12:16:41 GMT Message-Id: <200708151216.l7FCGfS4025624@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to delphij@freebsd.org using -f From: Xin LI To: Perforce Change Reviews Cc: Subject: PERFORCE change 125170 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, 15 Aug 2007 12:16:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=125170 Change 125170 by delphij@tarsier on 2007/08/15 12:16:36 IFC Affected files ... .. //depot/projects/delphij_fork/sys/conf/NOTES#9 integrate .. //depot/projects/delphij_fork/sys/dev/ata/ata-raid.c#2 integrate .. //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_adapter.h#4 integrate .. //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_main.c#4 integrate .. //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_offload.c#3 integrate .. //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_sge.c#4 integrate .. //depot/projects/delphij_fork/sys/dev/ichwd/ichwd.c#2 integrate .. //depot/projects/delphij_fork/sys/dev/ichwd/ichwd.h#2 integrate .. //depot/projects/delphij_fork/sys/dev/mfi/mfi.c#2 integrate .. //depot/projects/delphij_fork/sys/dev/mfi/mfi_disk.c#2 integrate .. //depot/projects/delphij_fork/sys/dev/mfi/mfi_pci.c#2 integrate .. //depot/projects/delphij_fork/sys/dev/mfi/mfireg.h#2 integrate .. //depot/projects/delphij_fork/sys/dev/mfi/mfivar.h#2 integrate .. //depot/projects/delphij_fork/sys/dev/mpt/mpt.c#2 integrate .. //depot/projects/delphij_fork/sys/dev/mpt/mpt.h#2 integrate .. //depot/projects/delphij_fork/sys/dev/mpt/mpt_cam.c#2 integrate .. //depot/projects/delphij_fork/sys/dev/re/if_re.c#6 integrate .. //depot/projects/delphij_fork/sys/dev/usb/ehci.c#2 integrate .. //depot/projects/delphij_fork/sys/kern/vfs_subr.c#2 integrate .. //depot/projects/delphij_fork/sys/modules/netgraph/bluetooth/Makefile#3 integrate .. //depot/projects/delphij_fork/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/delphij_fork/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#3 integrate .. //depot/projects/delphij_fork/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/delphij_fork/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/delphij_fork/sys/powerpc/include/intr_machdep.h#3 integrate .. //depot/projects/delphij_fork/sys/powerpc/include/md_var.h#2 integrate .. //depot/projects/delphij_fork/sys/powerpc/include/openpicvar.h#2 integrate .. //depot/projects/delphij_fork/sys/powerpc/powermac/hrowpic.c#2 integrate .. //depot/projects/delphij_fork/sys/powerpc/powermac/hrowpicvar.h#2 integrate .. //depot/projects/delphij_fork/sys/powerpc/powermac/openpic_macio.c#2 integrate .. //depot/projects/delphij_fork/sys/powerpc/powerpc/autoconf.c#2 integrate .. //depot/projects/delphij_fork/sys/powerpc/powerpc/interrupt.c#3 integrate .. //depot/projects/delphij_fork/sys/powerpc/powerpc/intr_machdep.c#3 integrate .. //depot/projects/delphij_fork/sys/powerpc/powerpc/nexus.c#2 integrate .. //depot/projects/delphij_fork/sys/powerpc/powerpc/openpic.c#2 integrate .. //depot/projects/delphij_fork/sys/powerpc/powerpc/pic_if.m#2 integrate .. //depot/projects/delphij_fork/sys/powerpc/psim/openpic_iobus.c#2 integrate .. //depot/projects/delphij_fork/sys/sys/ata.h#2 integrate Differences ... ==== //depot/projects/delphij_fork/sys/conf/NOTES#9 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1448 2007/08/05 16:16:15 bz Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1449 2007/08/13 17:19:27 emax Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -627,7 +627,7 @@ options NETGRAPH_ATM_ATMPIF options NETGRAPH_BLUETOOTH # ng_bluetooth(4) options NETGRAPH_BLUETOOTH_BT3C # ng_bt3c(4) -# options NETGRAPH_BLUETOOTH_H4 # ng_h4(4) - not MPSAFE +options NETGRAPH_BLUETOOTH_H4 # ng_h4(4) options NETGRAPH_BLUETOOTH_HCI # ng_hci(4) options NETGRAPH_BLUETOOTH_L2CAP # ng_l2cap(4) options NETGRAPH_BLUETOOTH_SOCKET # ng_btsocket(4) ==== //depot/projects/delphij_fork/sys/dev/ata/ata-raid.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.123 2007/02/21 19:07:18 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.124 2007/08/13 18:46:31 jhb Exp $"); #include "opt_ata.h" #include @@ -56,7 +56,7 @@ /* prototypes */ static void ata_raid_done(struct ata_request *request); static void ata_raid_config_changed(struct ar_softc *rdp, int writeback); -static int ata_raid_status(struct ata_ioc_raid_config *config); +static int ata_raid_status(struct ata_ioc_raid_status *status); static int ata_raid_create(struct ata_ioc_raid_config *config); static int ata_raid_delete(int array); static int ata_raid_addspare(struct ata_ioc_raid_config *config); @@ -216,13 +216,14 @@ static int ata_raid_ioctl(u_long cmd, caddr_t data) { + struct ata_ioc_raid_status *status = (struct ata_ioc_raid_status *)data; struct ata_ioc_raid_config *config = (struct ata_ioc_raid_config *)data; int *lun = (int *)data; int error = EOPNOTSUPP; switch (cmd) { case IOCATARAIDSTATUS: - error = ata_raid_status(config); + error = ata_raid_status(status); break; case IOCATARAIDCREATE: @@ -929,25 +930,32 @@ } static int -ata_raid_status(struct ata_ioc_raid_config *config) +ata_raid_status(struct ata_ioc_raid_status *status) { struct ar_softc *rdp; int i; - if (!(rdp = ata_raid_arrays[config->lun])) + if (!(rdp = ata_raid_arrays[status->lun])) return ENXIO; - config->type = rdp->type; - config->total_disks = rdp->total_disks; + status->type = rdp->type; + status->total_disks = rdp->total_disks; for (i = 0; i < rdp->total_disks; i++ ) { - if ((rdp->disks[i].flags & AR_DF_PRESENT) && rdp->disks[i].dev) - config->disks[i] = device_get_unit(rdp->disks[i].dev); - else - config->disks[i] = -1; + status->disks[i].state = 0; + if ((rdp->disks[i].flags & AR_DF_PRESENT) && rdp->disks[i].dev) { + status->disks[i].lun = device_get_unit(rdp->disks[i].dev); + if (rdp->disks[i].flags & AR_DF_PRESENT) + status->disks[i].state |= AR_DISK_PRESENT; + if (rdp->disks[i].flags & AR_DF_ONLINE) + status->disks[i].state |= AR_DISK_ONLINE; + if (rdp->disks[i].flags & AR_DF_SPARE) + status->disks[i].state |= AR_DISK_SPARE; + } else + status->disks[i].lun = -1; } - config->interleave = rdp->interleave; - config->status = rdp->status; - config->progress = 100 * rdp->rebuild_lba / rdp->total_sectors; + status->interleave = rdp->interleave; + status->status = rdp->status; + status->progress = 100 * rdp->rebuild_lba / rdp->total_sectors; return 0; } ==== //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_adapter.h#4 (text+ko) ==== @@ -26,7 +26,7 @@ POSSIBILITY OF SUCH DAMAGE. -$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.14 2007/07/17 06:50:33 kmacy Exp $ +$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.15 2007/08/10 23:33:34 kmacy Exp $ ***************************************************************************/ @@ -36,7 +36,7 @@ #define _CXGB_ADAPTER_H_ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.14 2007/07/17 06:50:33 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_adapter.h,v 1.15 2007/08/10 23:33:34 kmacy Exp $"); #include #include @@ -117,7 +117,7 @@ #else struct mtx lock; #endif - int port; + int port_id; uint8_t hw_addr[ETHER_ADDR_LEN]; uint8_t nqsets; uint8_t first_qset; ==== //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_main.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_main.c,v 1.28 2007/07/17 06:50:33 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_main.c,v 1.30 2007/08/10 23:47:39 kmacy Exp $"); #include #include @@ -509,7 +509,7 @@ device_printf(dev, "failed to allocate controller task queue\n"); goto out; } - + taskqueue_start_threads(&sc->tq, 1, PI_NET, "%s taskq", device_get_nameunit(dev)); TASK_INIT(&sc->ext_intr_task, 0, cxgb_ext_intr_handler, sc); @@ -557,7 +557,7 @@ sc->port[i].adapter = sc; sc->port[i].nqsets = port_qsets; sc->port[i].first_qset = i*port_qsets; - sc->port[i].port = i; + sc->port[i].port_id = i; sc->portdev[i] = child; device_set_softc(child, &sc->port[i]); } @@ -653,7 +653,8 @@ if (isset(&sc->open_device_map, OFFLOAD_DEVMAP_BIT)) offload_close(&sc->tdev); } -#endif +#endif + t3_free_sge_resources(sc); free(sc->filters, M_DEVBUF); t3_sge_free(sc); @@ -672,8 +673,6 @@ return; } - - static int alloc_filters(struct adapter *adap) { @@ -868,7 +867,7 @@ nqsets = sc->port[i].nqsets; for (j = 0; j < nqsets; j++, k++) { struct sge_qset *qs = &sc->sge.qs[k]; - + rid = k + 2; if (cxgb_debug) printf("rid=%d ", rid); @@ -905,7 +904,7 @@ p = device_get_softc(dev); - snprintf(buf, sizeof(buf), "Port %d %s", p->port, p->port_type->desc); + snprintf(buf, sizeof(buf), "Port %d %s", p->port_id, p->port_type->desc); device_set_desc_copy(dev, buf); return (0); } @@ -950,7 +949,7 @@ p = device_get_softc(dev); snprintf(p->lockbuf, PORT_NAME_LEN, "cxgb port lock %d:%d", - device_get_unit(device_get_parent(dev)), p->port); + device_get_unit(device_get_parent(dev)), p->port_id); PORT_LOCK_INIT(p, p->lockbuf); /* Allocate an ifnet object and set it up */ @@ -1032,7 +1031,7 @@ } - snprintf(p->taskqbuf, TASKQ_NAME_LEN, "cxgb_port_taskq%d", p->port); + snprintf(p->taskqbuf, TASKQ_NAME_LEN, "cxgb_port_taskq%d", p->port_id); #ifdef TASKQUEUE_CURRENT /* Create a port for handling TX without starvation */ p->tq = taskqueue_create(p->taskqbuf, M_NOWAIT, @@ -1049,6 +1048,7 @@ } taskqueue_start_threads(&p->tq, 1, PI_NET, "%s taskq", device_get_nameunit(dev)); + TASK_INIT(&p->start_task, 0, cxgb_start_proc, ifp); t3_sge_init_port(p); @@ -1195,7 +1195,6 @@ } } - /* * Interrupt-context handler for external (PHY) interrupts. */ @@ -1704,7 +1703,7 @@ t3_intr_clear(sc); t3_sge_init_adapter(sc); } - setbit(&p->adapter->open_device_map, p->port); + setbit(&p->adapter->open_device_map, p->port_id); ADAPTER_UNLOCK(p->adapter); if (is_offload(sc) && !ofld_disable) { @@ -1714,10 +1713,10 @@ "Could not initialize offload capabilities\n"); } cxgb_link_start(p); - t3_link_changed(sc, p->port); + t3_link_changed(sc, p->port_id); ifp->if_baudrate = p->link_config.speed * 1000000; - t3_port_intr_enable(sc, p->port); + t3_port_intr_enable(sc, p->port_id); callout_reset(&sc->cxgb_tick_ch, sc->params.stats_update_period * hz, cxgb_tick, sc); @@ -1748,13 +1747,13 @@ ifp = p->ifp; - t3_port_intr_disable(p->adapter, p->port); + t3_port_intr_disable(p->adapter, p->port_id); ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); p->phy.ops->power_down(&p->phy, 1); t3_mac_disable(&p->mac, MAC_DIRECTION_TX | MAC_DIRECTION_RX); ADAPTER_LOCK(p->adapter); - clrbit(&p->adapter->open_device_map, p->port); + clrbit(&p->adapter->open_device_map, p->port_id); if (p->adapter->open_device_map == 0) { @@ -1936,7 +1935,7 @@ m = m0; m_collapse(m, TX_MAX_SEGS, &m0); } else - break; + break; } m = m0; if ((err = t3_encap(p, &m)) != 0) @@ -2119,7 +2118,7 @@ cxgb_set_rxmode(p); t3_link_start(&p->phy, mac, &p->link_config); t3_mac_enable(mac, MAC_DIRECTION_RX | MAC_DIRECTION_TX); - t3_port_intr_enable(adapter, p->port); + t3_port_intr_enable(adapter, p->port_id); p->mac.stats.num_resets++; } PORT_UNLOCK(p); @@ -2527,7 +2526,7 @@ } case CHELSIO_SET_QSET_NUM: { struct ch_reg *edata = (struct ch_reg *)data; - unsigned int port_idx = pi->port; + unsigned int port_idx = pi->port_id; if (sc->flags & FULL_INIT_DONE) return (EBUSY); ==== //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_offload.c#3 (text+ko) ==== @@ -31,7 +31,7 @@ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_offload.c,v 1.6 2007/07/17 06:50:33 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_offload.c,v 1.7 2007/08/10 23:33:34 kmacy Exp $"); #include #include @@ -1250,7 +1250,7 @@ } /* Add new L2T entry */ - e = t3_l2t_get(tdev, new, ((struct port_info *)new->rt_ifp->if_softc)->port); + e = t3_l2t_get(tdev, new, ((struct port_info *)new->rt_ifp->if_softc)->port_id); if (!e) { log(LOG_ERR, "%s: couldn't allocate new l2t entry!\n", __FUNCTION__); ==== //depot/projects/delphij_fork/sys/dev/cxgb/cxgb_sge.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_sge.c,v 1.24 2007/07/17 06:50:33 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_sge.c,v 1.26 2007/08/10 23:47:39 kmacy Exp $"); #include #include @@ -1196,7 +1196,7 @@ * XXX handle checksum, TSO, and VLAN here * */ - cntrl = V_TXPKT_INTF(p->port); + cntrl = V_TXPKT_INTF(p->port_id); /* * XXX need to add VLAN support for 6.x @@ -2094,9 +2094,6 @@ TASK_INIT(&q->txq[TXQ_ETH].qreclaim_task, 0, sge_txq_reclaim_handler, &q->txq[TXQ_ETH]); TASK_INIT(&q->txq[TXQ_OFLD].qreclaim_task, 0, sge_txq_reclaim_handler, &q->txq[TXQ_OFLD]); - - - q->fl[0].gen = q->fl[1].gen = 1; q->fl[0].size = p->fl_size; q->fl[1].size = p->jumbo_size; ==== //depot/projects/delphij_fork/sys/dev/ichwd/ichwd.c#2 (text+ko) ==== @@ -51,10 +51,12 @@ * (document no. 292273-001). The WDT is also described in the individual * chipset datasheets, e.g. Intel82801EB ICH5 / 82801ER ICH5R Datasheet * (document no. 252516-001) sections 9.10 and 9.11. + * + * ICH6/7/8 support by Takeharu KATO */ #include -__FBSDID("$FreeBSD: src/sys/dev/ichwd/ichwd.c,v 1.9 2007/03/27 21:03:36 n_hibma Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ichwd/ichwd.c,v 1.10 2007/08/13 18:52:37 des Exp $"); #include #include @@ -71,20 +73,27 @@ #include static struct ichwd_device ichwd_devices[] = { - { VENDORID_INTEL, DEVICEID_82801AA, "Intel 82801AA watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801AB, "Intel 82801AB watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801BA, "Intel 82801BA watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801BAM, "Intel 82801BAM watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801CA, "Intel 82801CA watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801CAM, "Intel 82801CAM watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801DB, "Intel 82801DB watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801DBM, "Intel 82801DBM watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801E, "Intel 82801E watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801EBR, "Intel 82801EB/ER watchdog timer" }, - { VENDORID_INTEL, DEVICEID_82801FBR, "Intel 82801FB/FR watchdog timer" }, - { VENDORID_INTEL, DEVICEID_ICH5, "Intel ICH5 watchdog timer"}, - { VENDORID_INTEL, DEVICEID_6300ESB, "Intel 6300ESB watchdog timer"}, - { 0, 0, NULL }, + { DEVICEID_82801AA, "Intel 82801AA watchdog timer", 1 }, + { DEVICEID_82801AB, "Intel 82801AB watchdog timer", 1 }, + { DEVICEID_82801BA, "Intel 82801BA watchdog timer", 2 }, + { DEVICEID_82801BAM, "Intel 82801BAM watchdog timer", 2 }, + { DEVICEID_82801CA, "Intel 82801CA watchdog timer", 3 }, + { DEVICEID_82801CAM, "Intel 82801CAM watchdog timer", 3 }, + { DEVICEID_82801DB, "Intel 82801DB watchdog timer", 4 }, + { DEVICEID_82801DBM, "Intel 82801DBM watchdog timer", 4 }, + { DEVICEID_82801E, "Intel 82801E watchdog timer", 5 }, + { DEVICEID_82801EBR, "Intel 82801EB/ER watchdog timer", 5 }, + { DEVICEID_6300ESB, "Intel 6300ESB watchdog timer", 5 }, + { DEVICEID_82801FBR, "Intel 82801FB/FR watchdog timer", 6 }, + { DEVICEID_ICH6M, "Intel ICH6M watchdog timer", 6 }, + { DEVICEID_ICH6W, "Intel ICH6W watchdog timer", 6 }, + { DEVICEID_ICH7, "Intel ICH7 watchdog timer", 7 }, + { DEVICEID_ICH7M, "Intel ICH7M watchdog timer", 7 }, + { DEVICEID_ICH7MDH, "Intel ICH7MDH watchdog timer", 7 }, + { DEVICEID_ICH8, "Intel ICH8 watchdog timer", 8 }, + { DEVICEID_ICH8DH, "Intel ICH8DH watchdog timer", 8 }, + { DEVICEID_ICH8DO, "Intel ICH8DO watchdog timer", 8 }, + { 0, NULL, 0 }, }; static devclass_t ichwd_devclass; @@ -95,6 +104,10 @@ bus_space_read_2((sc)->tco_bst, (sc)->tco_bsh, (off)) #define ichwd_read_tco_4(sc, off) \ bus_space_read_4((sc)->tco_bst, (sc)->tco_bsh, (off)) +#define ichwd_read_smi_4(sc, off) \ + bus_space_read_4((sc)->smi_bst, (sc)->smi_bsh, (off)) +#define ichwd_read_gcs_4(sc, off) \ + bus_space_read_4((sc)->gcs_bst, (sc)->gcs_bsh, (off)) #define ichwd_write_tco_1(sc, off, val) \ bus_space_write_1((sc)->tco_bst, (sc)->tco_bsh, (off), (val)) @@ -102,12 +115,17 @@ bus_space_write_2((sc)->tco_bst, (sc)->tco_bsh, (off), (val)) #define ichwd_write_tco_4(sc, off, val) \ bus_space_write_4((sc)->tco_bst, (sc)->tco_bsh, (off), (val)) - -#define ichwd_read_smi_4(sc, off) \ - bus_space_read_4((sc)->smi_bst, (sc)->smi_bsh, (off)) #define ichwd_write_smi_4(sc, off, val) \ bus_space_write_4((sc)->smi_bst, (sc)->smi_bsh, (off), (val)) +#define ichwd_write_gcs_4(sc, off, val) \ + bus_space_write_4((sc)->gcs_bst, (sc)->gcs_bsh, (off), (val)) +#define ichwd_verbose_printf(dev, ...) \ + do { \ + if (bootverbose) \ + device_printf(dev, __VA_ARGS__);\ + } while (0) + static __inline void ichwd_intr_enable(struct ichwd_softc *sc) { @@ -136,8 +154,7 @@ cnt = ichwd_read_tco_2(sc, TCO1_CNT) & TCO_CNT_PRESERVE; ichwd_write_tco_2(sc, TCO1_CNT, cnt & ~TCO_TMR_HALT); sc->active = 1; - if (bootverbose) - device_printf(sc->device, "timer enabled\n"); + ichwd_verbose_printf(sc->device, "timer enabled\n"); } static __inline void @@ -148,25 +165,85 @@ cnt = ichwd_read_tco_2(sc, TCO1_CNT) & TCO_CNT_PRESERVE; ichwd_write_tco_2(sc, TCO1_CNT, cnt | TCO_TMR_HALT); sc->active = 0; - if (bootverbose) - device_printf(sc->device, "timer disabled\n"); + ichwd_verbose_printf(sc->device, "timer disabled\n"); } static __inline void ichwd_tmr_reload(struct ichwd_softc *sc) { - ichwd_write_tco_1(sc, TCO_RLD, 1); - if (bootverbose) - device_printf(sc->device, "timer reloaded\n"); + if (sc->ich_version <= 5) + ichwd_write_tco_1(sc, TCO_RLD, 1); + else + ichwd_write_tco_2(sc, TCO_RLD, 1); + + ichwd_verbose_printf(sc->device, "timer reloaded\n"); } static __inline void -ichwd_tmr_set(struct ichwd_softc *sc, uint8_t timeout) +ichwd_tmr_set(struct ichwd_softc *sc, unsigned int timeout) { - ichwd_write_tco_1(sc, TCO_TMR, timeout); + + /* + * If the datasheets are to be believed, the minimum value + * actually varies from chipset to chipset - 4 for ICH5 and 2 for + * all other chipsets. I suspect this is a bug in the ICH5 + * datasheet and that the minimum is uniformly 2, but I'd rather + * err on the side of caution. + */ + if (timeout < 4) + timeout = 4; + + if (sc->ich_version <= 5) { + uint8_t tmr_val8 = ichwd_read_tco_1(sc, TCO_TMR1); + + tmr_val8 &= 0xc0; + if (timeout > 0xbf) + timeout = 0xbf; + tmr_val8 |= timeout; + ichwd_write_tco_1(sc, TCO_TMR1, tmr_val8); + } else { + uint16_t tmr_val16 = ichwd_read_tco_2(sc, TCO_TMR2); + + tmr_val16 &= 0xfc00; + if (timeout > 0x0bff) + timeout = 0x0bff; + tmr_val16 |= timeout; + ichwd_write_tco_2(sc, TCO_TMR2, tmr_val16); + } + sc->timeout = timeout; - if (bootverbose) - device_printf(sc->device, "timeout set to %u ticks\n", timeout); + + ichwd_verbose_printf(sc->device, "timeout set to %u ticks\n", timeout); +} + +static __inline int +ichwd_clear_noreboot(struct ichwd_softc *sc) +{ + uint32_t status; + int rc = 0; + + /* try to clear the NO_REBOOT bit */ + if (sc->ich_version <= 5) { + status = pci_read_config(sc->ich, ICH_GEN_STA, 1); + status &= ~ICH_GEN_STA_NO_REBOOT; + pci_write_config(sc->ich, ICH_GEN_STA, status, 1); + status = pci_read_config(sc->ich, ICH_GEN_STA, 1); + if (status & ICH_GEN_STA_NO_REBOOT) + rc = EIO; + } else { + status = ichwd_read_gcs_4(sc, 0); + status &= ~ICH_GCS_NO_REBOOT; + ichwd_write_gcs_4(sc, 0, status); + status = ichwd_read_gcs_4(sc, 0); + if (status & ICH_GCS_NO_REBOOT) + rc = EIO; + } + + if (rc) + device_printf(sc->device, + "ICH WDT present but disabled in BIOS or hardware\n"); + + return (rc); } /* @@ -181,14 +258,12 @@ /* convert from power-of-two-ns to WDT ticks */ cmd &= WD_INTERVAL; timeout = ((uint64_t)1 << cmd) / ICHWD_TICK; - if (cmd > 0 && cmd <= 63 - && timeout >= ICHWD_MIN_TIMEOUT && timeout <= ICHWD_MAX_TIMEOUT) { + if (cmd) { if (timeout != sc->timeout) { if (!sc->active) ichwd_tmr_enable(sc); ichwd_tmr_set(sc, timeout); } - ichwd_tmr_reload(sc); *error = 0; } else { @@ -197,7 +272,28 @@ } } -static unsigned int pmbase = 0; +static device_t +ichwd_find_ich_lpc_bridge(struct ichwd_device **id_p) +{ + struct ichwd_device *id; + device_t ich = NULL; + + /* look for an ICH LPC interface bridge */ + for (id = ichwd_devices; id->desc != NULL; ++id) + if ((ich = pci_find_device(VENDORID_INTEL, id->device)) != NULL) + break; + + if (ich == NULL) + return (NULL); + + ichwd_verbose_printf(ich, "found ICH%d or equivalent chipset: %s\n", + id->version, id->desc); + + if (id_p) + *id_p = id; + + return (ich); +} /* * Look for an ICH LPC interface bridge. If one is found, register an @@ -206,49 +302,40 @@ static void ichwd_identify(driver_t *driver, device_t parent) { - struct ichwd_device *id; + struct ichwd_device *id_p; device_t ich = NULL; device_t dev; + uint32_t rcba; + int rc; - /* look for an ICH LPC interface bridge */ - for (id = ichwd_devices; id->desc != NULL; ++id) - if ((ich = pci_find_device(id->vendor, id->device)) != NULL) - break; + ich = ichwd_find_ich_lpc_bridge(&id_p); if (ich == NULL) return; - if (bootverbose) - printf("%s(): found ICH chipset: %s\n", __func__, id->desc); + /* good, add child to bus */ + if ((dev = device_find_child(parent, driver->name, 0)) == NULL) + dev = BUS_ADD_CHILD(parent, 0, driver->name, 0); - /* get for ACPI base address */ - pmbase = pci_read_config(ich, ICH_PMBASE, 2) & ICH_PMBASE_MASK; - if (pmbase == 0) { - if (bootverbose) - printf("%s(): ICH PMBASE register is empty\n", - __func__); + if (dev == NULL) return; - } + + device_set_desc_copy(dev, id_p->desc); - /* try to clear the NO_REBOOT bit */ - pci_write_config(ich, ICH_GEN_STA, 0x00, 1); - if (pci_read_config(ich, ICH_GEN_STA, 1) & ICH_GEN_STA_NO_REBOOT) { - if (bootverbose) - printf("%s(): ICH WDT present but disabled\n", - __func__); - return; + if (id_p->version >= 6) { + /* get RCBA (root complex base address) */ + rcba = pci_read_config(ich, ICH_RCBA, 4); + rc = bus_set_resource(ich, SYS_RES_MEMORY, 0, + (rcba & 0xffffc000) + ICH_GCS_OFFSET, ICH_GCS_SIZE); + if (rc) + ichwd_verbose_printf(dev, + "Can not set memory resource for RCBA\n"); } - - /* good, add child to bus */ - if ((dev = device_find_child(parent, driver->name, 0)) == NULL) - dev = BUS_ADD_CHILD(parent, 0, driver->name, 0); - - if (dev != NULL) - device_set_desc_copy(dev, id->desc); } static int ichwd_probe(device_t dev) { + (void)dev; return (0); } @@ -257,18 +344,32 @@ ichwd_attach(device_t dev) { struct ichwd_softc *sc; + struct ichwd_device *id_p; + device_t ich; + unsigned int pmbase = 0; sc = device_get_softc(dev); sc->device = dev; + ich = ichwd_find_ich_lpc_bridge(&id_p); + if (ich == NULL) { + device_printf(sc->device, "Can not find ICH device.\n"); + goto fail; + } + sc->ich = ich; + sc->ich_version = id_p->version; + + /* get ACPI base address */ + pmbase = pci_read_config(ich, ICH_PMBASE, 2) & ICH_PMBASE_MASK; if (pmbase == 0) { - printf("Not found\n"); + device_printf(dev, "ICH PMBASE register is empty\n"); + goto fail; } /* allocate I/O register space */ sc->smi_rid = 0; sc->smi_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->smi_rid, - pmbase + SMI_BASE, ~0ul, SMI_LEN, + pmbase + SMI_BASE, pmbase + SMI_BASE + SMI_LEN - 1, SMI_LEN, RF_ACTIVE | RF_SHAREABLE); if (sc->smi_res == NULL) { device_printf(dev, "unable to reserve SMI registers\n"); @@ -279,7 +380,7 @@ sc->tco_rid = 1; sc->tco_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->tco_rid, - pmbase + TCO_BASE, ~0ul, TCO_LEN, + pmbase + TCO_BASE, pmbase + TCO_BASE + TCO_LEN - 1, TCO_LEN, RF_ACTIVE | RF_SHAREABLE); if (sc->tco_res == NULL) { device_printf(dev, "unable to reserve TCO registers\n"); @@ -287,8 +388,30 @@ } sc->tco_bst = rman_get_bustag(sc->tco_res); sc->tco_bsh = rman_get_bushandle(sc->tco_res); + + sc->gcs_rid = 0; + if (sc->ich_version >= 6) { + sc->gcs_res = bus_alloc_resource_any(ich, SYS_RES_MEMORY, + &sc->gcs_rid, RF_ACTIVE|RF_SHAREABLE); + if (sc->gcs_res == NULL) { + device_printf(dev, "unable to reserve GCS registers\n"); + goto fail; + } + sc->gcs_bst = rman_get_bustag(sc->gcs_res); + sc->gcs_bsh = rman_get_bushandle(sc->gcs_res); + } else { + sc->gcs_res = 0; + sc->gcs_bst = 0; + sc->gcs_bsh = 0; + } + + if (ichwd_clear_noreboot(sc) != 0) + goto fail; + + device_printf(dev, "%s (ICH%d or equivalent)\n", + device_get_desc(dev), sc->ich_version); + /* reset the watchdog status registers */ - ichwd_sts_reset(sc); /* make sure the WDT starts out inactive */ @@ -309,6 +432,10 @@ if (sc->smi_res != NULL) bus_release_resource(dev, SYS_RES_IOPORT, sc->smi_rid, sc->smi_res); + if (sc->gcs_res != NULL) + bus_release_resource(ich, SYS_RES_MEMORY, + sc->gcs_rid, sc->gcs_res); + return (ENXIO); } @@ -316,6 +443,7 @@ ichwd_detach(device_t dev) { struct ichwd_softc *sc; + device_t ich = NULL; sc = device_get_softc(dev); @@ -338,6 +466,11 @@ bus_release_resource(dev, SYS_RES_IOPORT, sc->tco_rid, sc->tco_res); bus_release_resource(dev, SYS_RES_IOPORT, sc->smi_rid, sc->smi_res); + /* deallocate memory resource */ + ich = ichwd_find_ich_lpc_bridge(NULL); + if (sc->gcs_res && ich) + bus_release_resource(ich, SYS_RES_MEMORY, sc->gcs_rid, sc->gcs_res); + return (0); } ==== //depot/projects/delphij_fork/sys/dev/ichwd/ichwd.h#2 (text+ko) ==== @@ -25,20 +25,22 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ichwd/ichwd.h,v 1.3 2006/02/17 18:46:18 ambrisko Exp $ + * $FreeBSD: src/sys/dev/ichwd/ichwd.h,v 1.4 2007/08/13 18:52:37 des Exp $ */ #ifndef _ICHWD_H_ #define _ICHWD_H_ struct ichwd_device { - uint16_t vendor; uint16_t device; char *desc; + unsigned int version; }; struct ichwd_softc { device_t device; + device_t ich; + int ich_version; int active; unsigned int timeout; @@ -53,6 +55,11 @@ bus_space_tag_t tco_bst; bus_space_handle_t tco_bsh; + int gcs_rid; + struct resource *gcs_res; + bus_space_tag_t gcs_bst; + bus_space_handle_t gcs_bsh; + eventhandler_tag ev_tag; }; @@ -69,28 +76,45 @@ #define DEVICEID_82801EBR 0x24d0 #define DEVICEID_6300ESB 0x25a1 #define DEVICEID_82801FBR 0x2640 -#define DEVICEID_ICH5 0x27b8 +#define DEVICEID_ICH6M 0x2641 +#define DEVICEID_ICH6W 0x2642 +#define DEVICEID_ICH7 0x27b8 +#define DEVICEID_ICH7M 0x27b9 +#define DEVICEID_ICH7MDH 0x27bd +#define DEVICEID_ICH8 0x2810 +#define DEVICEID_ICH8DH 0x2812 +#define DEVICEID_ICH8DO 0x2814 -/* ICH LPC Interface Bridge Registers */ +/* ICH LPC Interface Bridge Registers (ICH5 and older) */ #define ICH_GEN_STA 0xd4 #define ICH_GEN_STA_NO_REBOOT 0x02 #define ICH_PMBASE 0x40 /* ACPI base address register */ #define ICH_PMBASE_MASK 0x7f80 /* bits 7-15 */ +/* ICH Chipset Configuration Registers (ICH6 and newer) */ +#define ICH_RCBA 0xf0 +#define ICH_GCS_OFFSET 0x3410 +#define ICH_GCS_SIZE 0x4 +#define ICH_GCS_NO_REBOOT 0x20 + /* register names and locations (relative to PMBASE) */ #define SMI_BASE 0x30 /* base address for SMI registers */ #define SMI_LEN 0x08 #define SMI_EN 0x00 /* SMI Control and Enable Register */ #define SMI_STS 0x04 /* SMI Status Register */ #define TCO_BASE 0x60 /* base address for TCO registers */ -#define TCO_LEN 0x0a +#define TCO_LEN 0x20 #define TCO_RLD 0x00 /* TCO Reload and Current Value */ -#define TCO_TMR 0x01 /* TCO Timer Initial Value */ +#define TCO_TMR1 0x01 /* TCO Timer Initial Value + (ICH5 and older, 8 bits) */ +#define TCO_TMR2 0x12 /* TCO Timer Initial Value + (ICH6 and newer, 16 bits) */ #define TCO_DAT_IN 0x02 /* TCO Data In (DO NOT USE) */ #define TCO_DAT_OUT 0x03 /* TCO Data Out (DO NOT USE) */ #define TCO1_STS 0x04 /* TCO Status 1 */ #define TCO2_STS 0x06 /* TCO Status 2 */ #define TCO1_CNT 0x08 /* TCO Control 1 */ +#define TCO2_CNT 0x08 /* TCO Control 2 */ /* bit definitions for SMI_EN and SMI_STS */ #define SMI_TCO_EN 0x2000 @@ -112,11 +136,7 @@ #define TCO_TMR_HALT 0x0800 /* clear to enable WDT */ #define TCO_CNT_PRESERVE 0x0200 /* preserve these bits */ -/* approximate length in nanoseconds of one WDT tick */ -#define ICHWD_TICK 1800000000 - -/* minimum / maximum timeout in WDT ticks */ -#define ICHWD_MIN_TIMEOUT 2 -#define ICHWD_MAX_TIMEOUT 63 +/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) */ +#define ICHWD_TICK 600000000 #endif ==== //depot/projects/delphij_fork/sys/dev/mfi/mfi.c#2 (text) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi.c,v 1.30 2007/06/04 16:39:22 ambrisko Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi.c,v 1.32 2007/08/13 21:14:15 jhb Exp $"); #include "opt_mfi.h" @@ -185,6 +185,7 @@ int frames, unit, max_fw_sge; mtx_init(&sc->mfi_io_lock, "MFI I/O lock", NULL, MTX_DEF); + sx_init(&sc->mfi_config_lock, "MFI config"); TAILQ_INIT(&sc->mfi_ld_tqh); TAILQ_INIT(&sc->mfi_aen_pids); TAILQ_INIT(&sc->mfi_cam_ccbq); @@ -393,6 +394,15 @@ make_dev_alias(sc->mfi_cdev, "megaraid_sas_ioctl_node"); if (sc->mfi_cdev != NULL) sc->mfi_cdev->si_drv1 = sc; + SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->mfi_dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(sc->mfi_dev)), + OID_AUTO, "delete_busy_volumes", CTLFLAG_RW, + &sc->mfi_delete_busy_volumes, 0, "Allow removal of busy volumes"); + SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->mfi_dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(sc->mfi_dev)), + OID_AUTO, "keep_deleted_volumes", CTLFLAG_RW, + &sc->mfi_keep_deleted_volumes, 0, + "Don't detach the mfid device for a busy volume that is deleted"); device_add_child(sc->mfi_dev, "mfip", -1); bus_generic_attach(sc->mfi_dev); @@ -750,8 +760,10 @@ if (sc->mfi_parent_dmat != NULL) bus_dma_tag_destroy(sc->mfi_parent_dmat); - if (mtx_initialized(&sc->mfi_io_lock)) + if (mtx_initialized(&sc->mfi_io_lock)) { mtx_destroy(&sc->mfi_io_lock); + sx_destroy(&sc->mfi_config_lock); + } return; } @@ -766,9 +778,11 @@ config_intrhook_disestablish(&sc->mfi_ich); mfi_enable_intr(sc); + sx_xlock(&sc->mfi_config_lock); mtx_lock(&sc->mfi_io_lock); mfi_ldprobe(sc); mtx_unlock(&sc->mfi_io_lock); + sx_xunlock(&sc->mfi_config_lock); } static void @@ -857,8 +871,10 @@ struct mfi_frame_header *hdr; struct mfi_command *cm = NULL; struct mfi_ld_list *list = NULL; + struct mfi_disk *ld; int error, i; + sx_assert(&sc->mfi_config_lock, SA_XLOCKED); mtx_assert(&sc->mfi_io_lock, MA_OWNED); error = mfi_dcmd_command(sc, &cm, MFI_DCMD_LD_GET_LIST, @@ -879,8 +895,14 @@ goto out; } - for (i = 0; i < list->ld_count; i++) + for (i = 0; i < list->ld_count; i++) { + TAILQ_FOREACH(ld, &sc->mfi_ld_tqh, ld_link) { + if (ld->ld_id == list->ld_list[i].ld.v.target_id) + goto skip_add; + } mfi_add_ld(sc, list->ld_list[i].ld.v.target_id); + skip_add:; + } out: >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Aug 15 13:07:47 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A786F16A419; Wed, 15 Aug 2007 13:07: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 3FB2E16A417 for ; Wed, 15 Aug 2007 13:07:47 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2A06713C458 for ; Wed, 15 Aug 2007 13:07:47 +0000 (UTC) (envelope-from lulf@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 l7FD7kiS056241 for ; Wed, 15 Aug 2007 13:07:47 GMT (envelope-from lulf@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7FD7k4R056232 for perforce@freebsd.org; Wed, 15 Aug 2007 13:07:46 GMT (envelope-from lulf@FreeBSD.org) Date: Wed, 15 Aug 2007 13:07:46 GMT Message-Id: <200708151307.l7FD7k4R056232@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to lulf@FreeBSD.org using -f From: Ulf Lilleengen To: Perforce Change Reviews Cc: Subject: PERFORCE change 125171 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, 15 Aug 2007 13:07:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=125171 Change 125171 by lulf@lulf_carrot on 2007/08/15 13:07:39 IFC Affected files ... .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/NOTES#13 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files#14 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/kern.pre.mk#5 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/options#11 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/options.ia64#2 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/local_apic.c#4 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/machdep.c#4 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/mp_machdep.c#5 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/include/cpufunc.h#2 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_descrip.c#7 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_lockf.c#4 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_poll.c#3 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_switch.c#5 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/sched_ule.c#8 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/sys_socket.c#2 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/uipc_domain.c#4 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/uipc_syscalls.c#6 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/sys/mutex.h#5 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/device_pager.c#2 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/phys_pager.c#2 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/swap_pager.c#6 integrate .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/vm/vm_pager.c#2 integrate Differences ... ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/NOTES#13 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1447 2007/07/24 15:35:01 scottl Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1448 2007/08/05 16:16:15 bz Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -501,15 +501,15 @@ options IPSEC #IP security (requires device crypto) #options IPSEC_DEBUG #debug for IP security # -# Set IPSEC_FILTERGIF to force packets coming through a gif tunnel -# to be processed by any configured packet filtering (ipfw, ipf). -# The default is that packets coming from a tunnel are _not_ processed; +# Set IPSEC_FILTERTUNNEL to force packets coming through a tunnel +# to be processed by any configured packet filtering twice. +# The default is that packets coming out of a tunnel are _not_ processed; # they are assumed trusted. # # IPSEC history is preserved for such packets, and can be filtered # using ipfw(8)'s 'ipsec' keyword, when this option is enabled. # -#options IPSEC_FILTERGIF #filter ipsec packets from a tunnel +#options IPSEC_FILTERTUNNEL #filter ipsec packets from a tunnel options IPX #IPX/SPX communications protocols ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/files#14 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1241 2007/07/24 15:35:01 scottl Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1242 2007/08/09 01:11:21 marcel Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -259,7 +259,7 @@ contrib/ipfilter/netinet/ip_state.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-error -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \ ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/kern.pre.mk#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.90 2007/07/12 00:01:53 jfv Exp $ +# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.92 2007/08/08 19:12:06 marcel Exp $ # Part of a unified Makefile for building kernels. This part contains all # of the definitions that need to be before %BEFORE_DEPEND. @@ -88,7 +88,8 @@ CFLAGS+= --param inline-unit-growth=100 CFLAGS+= --param large-function-growth=1000 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE} == "i386" || \ - ${MACHINE_ARCH} == "sparc64" + ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "powerpc" || \ + ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" WERROR?= -Werror .endif .endif ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/options#11 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.603 2007/07/24 15:35:01 scottl Exp $ +# $FreeBSD: src/sys/conf/options,v 1.605 2007/08/06 14:25:59 rwatson Exp $ # # On the handling of kernel options # @@ -362,7 +362,7 @@ INET6 opt_inet6.h IPSEC opt_ipsec.h IPSEC_DEBUG opt_ipsec.h -IPSEC_FILTERGIF opt_ipsec.h +IPSEC_FILTERTUNNEL opt_ipsec.h IPDIVERT DUMMYNET opt_ipdn.h IPFILTER opt_ipfilter.h @@ -383,7 +383,6 @@ MBUF_STRESS_TEST NCP NETATALK opt_atalk.h -NET_WITH_GIANT opt_net.h PPP_BSDCOMP opt_ppp.h PPP_DEFLATE opt_ppp.h PPP_FILTER opt_ppp.h ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/conf/options.ia64#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options.ia64,v 1.27 2006/04/24 23:31:50 marcel Exp $ +# $FreeBSD: src/sys/conf/options.ia64,v 1.28 2007/07/30 22:42:33 marcel Exp $ # Options specific to the ia64 platform kernels ITANIUM opt_global.h @@ -11,6 +11,8 @@ COMPAT_IA32 opt_compat.h +EXCEPTION_TRACING opt_xtrace.h + VGA_ALT_SEQACCESS opt_vga.h VGA_DEBUG opt_vga.h VGA_NO_FONT_LOADING opt_vga.h ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/local_apic.c#4 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/local_apic.c,v 1.42 2007/05/08 22:01:03 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/local_apic.c,v 1.43 2007/08/02 21:17:57 peter Exp $"); #include "opt_hwpmc_hooks.h" @@ -1064,10 +1064,6 @@ if (retval != 0) printf("%s: Failed to setup the local APIC: returned %d\n", best_enum->apic_name, retval); -#ifdef SMP - /* Last, setup the cpu topology now that we have probed CPUs */ - mp_topology(); -#endif } SYSINIT(apic_init, SI_SUB_CPU, SI_ORDER_FIRST, apic_init, NULL) ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/machdep.c#4 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.657 2007/06/06 07:35:07 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.658 2007/08/09 20:14:34 njl Exp $"); #include "opt_apic.h" #include "opt_atalk.h" @@ -1587,6 +1587,25 @@ ip++; } } + +/* Show privileged registers. */ +DB_SHOW_COMMAND(sysregs, db_show_sysregs) +{ + uint64_t idtr, gdtr; + + idtr = ridt(); + db_printf("idtr\t0x%08x/%04x\n", + (u_int)(idtr >> 16), (u_int)idtr & 0xffff); + gdtr = rgdt(); + db_printf("gdtr\t0x%08x/%04x\n", + (u_int)(gdtr >> 16), (u_int)gdtr & 0xffff); + db_printf("ldtr\t0x%04x\n", rldt()); + db_printf("tr\t0x%04x\n", rtr()); + db_printf("cr0\t0x%08x\n", rcr0()); + db_printf("cr2\t0x%08x\n", rcr2()); + db_printf("cr3\t0x%08x\n", rcr3()); + db_printf("cr4\t0x%08x\n", rcr4()); +} #endif void ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/i386/mp_machdep.c#5 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/mp_machdep.c,v 1.280 2007/06/04 23:56:07 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/mp_machdep.c,v 1.281 2007/08/02 21:17:57 peter Exp $"); #include "opt_apic.h" #include "opt_cpu.h" @@ -241,26 +241,14 @@ mp_topology(void) { struct cpu_group *group; - u_int regs[4]; - int logical_cpus; int apic_id; int groups; int cpu; /* Build the smp_topology map. */ /* Nothing to do if there is no HTT support. */ - if ((cpu_feature & CPUID_HTT) == 0) + if (hyperthreading_cpus <= 1) return; - logical_cpus = (cpu_procinfo & CPUID_HTT_CORES) >> 16; - if (logical_cpus <= 1) - return; - /* Nothing to do if reported cores are physical cores. */ - if (strcmp(cpu_vendor, "GenuineIntel") == 0 && cpu_high >= 4) { - cpuid_count(4, 0, regs); - if ((regs[0] & 0x1f) != 0 && - logical_cpus <= ((regs[0] >> 26) & 0x3f) + 1) - return; - } group = &mp_groups[0]; groups = 1; for (cpu = 0, apic_id = 0; apic_id <= MAX_APIC_ID; apic_id++) { @@ -270,7 +258,8 @@ * If the current group has members and we're not a logical * cpu, create a new group. */ - if (group->cg_count != 0 && (apic_id % logical_cpus) == 0) { + if (group->cg_count != 0 && + (apic_id % hyperthreading_cpus) == 0) { group++; groups++; } @@ -469,6 +458,9 @@ } set_interrupt_apic_ids(); + + /* Last, setup the cpu topology now that we have probed CPUs */ + mp_topology(); } ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/i386/include/cpufunc.h#2 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/include/cpufunc.h,v 1.144 2005/05/13 00:05:56 nectar Exp $ + * $FreeBSD: src/sys/i386/include/cpufunc.h,v 1.145 2007/08/09 20:14:35 njl Exp $ */ /* @@ -326,28 +326,28 @@ return (ef); } -static __inline u_int64_t +static __inline uint64_t rdmsr(u_int msr) { - u_int64_t rv; + uint64_t rv; __asm __volatile("rdmsr" : "=A" (rv) : "c" (msr)); return (rv); } -static __inline u_int64_t +static __inline uint64_t rdpmc(u_int pmc) { - u_int64_t rv; + uint64_t rv; __asm __volatile("rdpmc" : "=A" (rv) : "c" (pmc)); return (rv); } -static __inline u_int64_t +static __inline uint64_t rdtsc(void) { - u_int64_t rv; + uint64_t rv; __asm __volatile("rdtsc" : "=A" (rv)); return (rv); @@ -366,7 +366,7 @@ } static __inline void -wrmsr(u_int msr, u_int64_t newval) +wrmsr(u_int msr, uint64_t newval) { __asm __volatile("wrmsr" : : "A" (newval), "c" (msr)); } @@ -456,6 +456,14 @@ return (sel); } +static __inline uint64_t +rgdt(void) +{ + uint64_t gdtr; + __asm __volatile("sgdt %0" : "=m" (gdtr)); + return (gdtr); +} + static __inline u_int rgs(void) { @@ -464,6 +472,22 @@ return (sel); } +static __inline uint64_t +ridt(void) +{ + uint64_t idtr; + __asm __volatile("sidt %0" : "=m" (idtr)); + return (idtr); +} + +static __inline u_short +rldt(void) +{ + u_short ldtr; + __asm __volatile("sldt %0" : "=g" (ldtr)); + return (ldtr); +} + static __inline u_int rss(void) { @@ -472,6 +496,14 @@ return (sel); } +static __inline u_short +rtr(void) +{ + u_short tr; + __asm __volatile("str %0" : "=g" (tr)); + return (tr); +} + static __inline void load_fs(u_int sel) { @@ -677,8 +709,8 @@ u_int rcr2(void); u_int rcr3(void); u_int rcr4(void); -u_int64_t rdmsr(u_int msr); -u_int64_t rdpmc(u_int pmc); +uint64_t rdmsr(u_int msr); +uint64_t rdpmc(u_int pmc); u_int rdr0(void); u_int rdr1(void); u_int rdr2(void); @@ -687,13 +719,17 @@ u_int rdr5(void); u_int rdr6(void); u_int rdr7(void); -u_int64_t rdtsc(void); +uint64_t rdtsc(void); u_int read_eflags(void); u_int rfs(void); +uint64_t rgdt(void); u_int rgs(void); +uint64_t ridt(void); +u_short rldt(void); +u_short rtr(void); void wbinvd(void); void write_eflags(u_int ef); -void wrmsr(u_int msr, u_int64_t newval); +void wrmsr(u_int msr, uint64_t newval); #endif /* __GNUCLIKE_ASM && __CC_SUPPORTS___INLINE */ ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_descrip.c#7 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_descrip.c,v 1.312 2007/07/03 21:26:06 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_descrip.c,v 1.313 2007/08/06 14:26:00 rwatson Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -2098,8 +2098,6 @@ struct file *fp; int error; - NET_ASSERT_GIANT(); - *spp = NULL; if (fflagp != NULL) *fflagp = 0; @@ -2129,7 +2127,6 @@ fputsock(struct socket *so) { - NET_ASSERT_GIANT(); ACCEPT_LOCK(); SOCK_LOCK(so); sorele(so); ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_lockf.c#4 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_lockf.c,v 1.56 2007/07/03 21:22:58 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_lockf.c,v 1.57 2007/08/07 09:04:50 kib Exp $"); #include "opt_debug_lockf.h" @@ -106,7 +106,7 @@ struct lockf *lock; struct vnode *vp = ap->a_vp; off_t start, end, oadd; - struct lockf *split; + struct lockf *clean, *n; int error; /* @@ -162,9 +162,11 @@ /* * Allocate a spare structure in case we have to split. */ - split = NULL; - if (ap->a_op == F_SETLK || ap->a_op == F_UNLCK) - MALLOC(split, struct lockf *, sizeof *lock, M_LOCKF, M_WAITOK); + clean = NULL; + if (ap->a_op == F_SETLK || ap->a_op == F_UNLCK) { + MALLOC(clean, struct lockf *, sizeof *lock, M_LOCKF, M_WAITOK); + clean->lf_next = NULL; + } /* * Create the lockf structure */ @@ -190,27 +192,33 @@ VI_LOCK(vp); switch(ap->a_op) { case F_SETLK: - error = lf_setlock(lock, vp, &split); + error = lf_setlock(lock, vp, &clean); break; case F_UNLCK: - error = lf_clearlock(lock, &split); - FREE(lock, M_LOCKF); + error = lf_clearlock(lock, &clean); + lock->lf_next = clean; + clean = lock; break; case F_GETLK: error = lf_getlock(lock, fl); - FREE(lock, M_LOCKF); + lock->lf_next = clean; + clean = lock; break; default: - free(lock, M_LOCKF); + lock->lf_next = clean; + clean = lock; error = EINVAL; break; } VI_UNLOCK(vp); - if (split) - FREE(split, M_LOCKF); + for (lock = clean; lock != NULL; ) { + n = lock->lf_next; + free(lock, M_LOCKF); + lock = n; + } return (error); } @@ -218,10 +226,10 @@ * Set a byte-range lock. */ static int -lf_setlock(lock, vp, split) +lf_setlock(lock, vp, clean) struct lockf *lock; struct vnode *vp; - struct lockf **split; + struct lockf **clean; { struct lockf *block; struct lockf **head = lock->lf_head; @@ -249,7 +257,8 @@ * Free the structure and return if nonblocking. */ if ((lock->lf_flags & F_WAIT) == 0) { - FREE(lock, M_LOCKF); + lock->lf_next = *clean; + *clean = lock; return (EAGAIN); } /* @@ -289,7 +298,8 @@ if (nproc == (struct proc *)lock->lf_id) { PROC_SUNLOCK(wproc); thread_unlock(td); - free(lock, M_LOCKF); + lock->lf_next = *clean; + *clean = lock; return (EDEADLK); } } @@ -308,7 +318,7 @@ if ((lock->lf_flags & F_FLOCK) && lock->lf_type == F_WRLCK) { lock->lf_type = F_UNLCK; - (void) lf_clearlock(lock, split); + (void) lf_clearlock(lock, clean); lock->lf_type = F_WRLCK; } /* @@ -337,7 +347,8 @@ lock->lf_next = NOLOCKF; } if (error) { - free(lock, M_LOCKF); + lock->lf_next = *clean; + *clean = lock; return (error); } } @@ -382,7 +393,8 @@ overlap->lf_type == F_WRLCK) lf_wakelock(overlap); overlap->lf_type = lock->lf_type; - FREE(lock, M_LOCKF); + lock->lf_next = *clean; + *clean = lock; lock = overlap; /* for debug output below */ break; @@ -391,7 +403,8 @@ * Check for common starting point and different types. */ if (overlap->lf_type == lock->lf_type) { - free(lock, M_LOCKF); + lock->lf_next = *clean; + *clean = lock; lock = overlap; /* for debug output below */ break; } @@ -400,7 +413,7 @@ lock->lf_next = overlap; overlap->lf_start = lock->lf_end + 1; } else - lf_split(overlap, lock, split); + lf_split(overlap, lock, clean); lf_wakelock(overlap); break; @@ -432,7 +445,8 @@ needtolink = 0; } else *prev = overlap->lf_next; - free(overlap, M_LOCKF); + overlap->lf_next = *clean; + *clean = overlap; continue; case 4: /* overlap starts before lock */ @@ -477,9 +491,9 @@ * and remove it (or shrink it), then wakeup anyone we can. */ static int -lf_clearlock(unlock, split) +lf_clearlock(unlock, clean) struct lockf *unlock; - struct lockf **split; + struct lockf **clean; { struct lockf **head = unlock->lf_head; register struct lockf *lf = *head; @@ -505,7 +519,8 @@ case 1: /* overlap == lock */ *prev = overlap->lf_next; - FREE(overlap, M_LOCKF); + overlap->lf_next = *clean; + *clean = overlap; break; case 2: /* overlap contains lock: split it */ @@ -513,14 +528,15 @@ overlap->lf_start = unlock->lf_end + 1; break; } - lf_split(overlap, unlock, split); + lf_split(overlap, unlock, clean); overlap->lf_next = unlock->lf_next; break; case 3: /* lock contains overlap */ *prev = overlap->lf_next; lf = overlap->lf_next; - free(overlap, M_LOCKF); + overlap->lf_next = *clean; + *clean = overlap; continue; case 4: /* overlap starts before lock */ @@ -754,7 +770,8 @@ * splitlock so we don't have to block. */ splitlock = *split; - *split = NULL; + KASSERT(splitlock != NULL, ("no split")); + *split = splitlock->lf_next; bcopy(lock1, splitlock, sizeof *splitlock); splitlock->lf_start = lock2->lf_end + 1; TAILQ_INIT(&splitlock->lf_blkhd); ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_poll.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_poll.c,v 1.30 2007/06/05 00:00:54 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_poll.c,v 1.31 2007/08/06 14:26:00 rwatson Exp $"); #include "opt_device_polling.h" @@ -329,7 +329,6 @@ { int i; - NET_LOCK_GIANT(); mtx_lock(&poll_mtx); if (count > poll_each_burst) @@ -339,7 +338,6 @@ pr[i].handler(pr[i].ifp, POLL_ONLY, count); mtx_unlock(&poll_mtx); - NET_UNLOCK_GIANT(); } /* @@ -366,8 +364,6 @@ struct timeval t; int kern_load; - NET_ASSERT_GIANT(); - mtx_lock(&poll_mtx); phase = 5; if (residual_burst > 0) { @@ -417,8 +413,6 @@ int i, cycles; enum poll_cmd arg = POLL_ONLY; - NET_ASSERT_GIANT(); - mtx_lock(&poll_mtx); phase = 3; if (residual_burst == 0) { /* first call in this tick */ @@ -456,8 +450,6 @@ KASSERT(h != NULL, ("%s: handler is NULL", __func__)); KASSERT(ifp != NULL, ("%s: ifp is NULL", __func__)); - NET_ASSERT_GIANT(); - mtx_lock(&poll_mtx); if (poll_handlers >= POLL_LIST_LEN) { /* @@ -504,7 +496,6 @@ KASSERT(ifp != NULL, ("%s: ifp is NULL", __func__)); - NET_ASSERT_GIANT(); mtx_lock(&poll_mtx); for (i = 0 ; i < poll_handlers ; i++) @@ -547,7 +538,6 @@ polling = val; - NET_LOCK_GIANT(); IFNET_RLOCK(); TAILQ_FOREACH(ifp, &ifnet, if_link) { if (ifp->if_capabilities & IFCAP_POLLING) { @@ -565,7 +555,6 @@ } } IFNET_RUNLOCK(); - NET_UNLOCK_GIANT(); log(LOG_ERR, "kern.polling.enable is deprecated. Use ifconfig(8)"); ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/kern_switch.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.132 2007/07/19 08:58:40 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.133 2007/08/03 23:35:35 jeff Exp $"); #include "opt_sched.h" @@ -192,7 +192,7 @@ thread_lock(td); td->td_critnest--; SCHED_STAT_INC(switch_owepreempt); - mi_switch(SW_INVOL, NULL); + mi_switch(SW_INVOL|SW_PREEMPT, NULL); thread_unlock(td); } } else ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/kern/sched_ule.c#8 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.202 2007/07/19 20:03:15 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.204 2007/08/04 01:21:28 jeff Exp $"); #include "opt_hwpmc_hooks.h" #include "opt_sched.h" @@ -183,7 +183,7 @@ * locking in sched_pickcpu(); */ struct tdq { - struct mtx tdq_lock; /* Protects all fields below. */ + struct mtx *tdq_lock; /* Pointer to group lock. */ struct runq tdq_realtime; /* real-time run queue. */ struct runq tdq_timeshare; /* timeshare run queue. */ struct runq tdq_idle; /* Queue of IDLE threads. */ @@ -198,7 +198,6 @@ #else int tdq_sysload; /* For loadavg, !ITHD load. */ #endif - char tdq_name[16]; /* lock name. */ } __aligned(64); @@ -212,13 +211,15 @@ * load balancer. */ struct tdq_group { - int tdg_cpus; /* Count of CPUs in this tdq group. */ - cpumask_t tdg_cpumask; /* Mask of cpus in this group. */ - cpumask_t tdg_idlemask; /* Idle cpus in this group. */ - cpumask_t tdg_mask; /* Bit mask for first cpu. */ - int tdg_load; /* Total load of this group. */ + struct mtx tdg_lock; /* Protects all fields below. */ + int tdg_cpus; /* Count of CPUs in this tdq group. */ + cpumask_t tdg_cpumask; /* Mask of cpus in this group. */ + cpumask_t tdg_idlemask; /* Idle cpus in this group. */ + cpumask_t tdg_mask; /* Bit mask for first cpu. */ + int tdg_load; /* Total load of this group. */ int tdg_transferable; /* Transferable load of this group. */ LIST_HEAD(, tdq) tdg_members; /* Linked list of all members. */ + char tdg_name[16]; /* lock name. */ } __aligned(64); #define SCHED_AFFINITY_DEFAULT (max(1, hz / 300)) @@ -249,10 +250,12 @@ #define TDQ_SELF() (&tdq_cpu[PCPU_GET(cpuid)]) #define TDQ_CPU(x) (&tdq_cpu[(x)]) -#define TDQ_ID(x) ((x) - tdq_cpu) +#define TDQ_ID(x) ((int)((x) - tdq_cpu)) #define TDQ_GROUP(x) (&tdq_groups[(x)]) +#define TDG_ID(x) ((int)((x) - tdq_groups)) #else /* !SMP */ static struct tdq tdq_cpu; +static struct mtx tdq_lock; #define TDQ_ID(x) (0) #define TDQ_SELF() (&tdq_cpu) @@ -263,7 +266,7 @@ #define TDQ_LOCK(t) mtx_lock_spin(TDQ_LOCKPTR((t))) #define TDQ_LOCK_FLAGS(t, f) mtx_lock_spin_flags(TDQ_LOCKPTR((t)), (f)) #define TDQ_UNLOCK(t) mtx_unlock_spin(TDQ_LOCKPTR((t))) -#define TDQ_LOCKPTR(t) (&(t)->tdq_lock) +#define TDQ_LOCKPTR(t) ((t)->tdq_lock) static void sched_priority(struct thread *); static void sched_thread_priority(struct thread *, u_char); @@ -296,6 +299,7 @@ static inline struct tdq *sched_setcpu(struct td_sched *, int, int); static inline struct mtx *thread_block_switch(struct thread *); static inline void thread_unblock_switch(struct thread *, struct mtx *); +static struct mtx *sched_switch_migrate(struct tdq *, struct thread *, int); #define THREAD_CAN_MIGRATE(td) ((td)->td_pinned == 0) #endif @@ -343,9 +347,8 @@ tdq = TDQ_CPU(cpu); - printf("tdq:\n"); + printf("tdq %d:\n", TDQ_ID(tdq)); printf("\tlockptr %p\n", TDQ_LOCKPTR(tdq)); - printf("\tlock name %s\n", tdq->tdq_name); printf("\tload: %d\n", tdq->tdq_load); printf("\ttimeshare idx: %d\n", tdq->tdq_idx); printf("\ttimeshare ridx: %d\n", tdq->tdq_ridx); @@ -357,7 +360,9 @@ runq_print(&tdq->tdq_idle); #ifdef SMP printf("\tload transferable: %d\n", tdq->tdq_transferable); - printf("\tlowest priority: %d\n", tdq->tdq_lowpri); + printf("\tlowest priority: %d\n", tdq->tdq_lowpri); + printf("\tgroup: %d\n", TDG_ID(tdq->tdq_group)); + printf("\tLock name: %s\n", tdq->tdq_group->tdg_name); #endif } @@ -389,7 +394,7 @@ * This queue contains only priorities between MIN and MAX * realtime. Use the whole queue to represent these values. */ - if ((flags & SRQ_BORROWING) == 0) { + if ((flags & (SRQ_BORROWING|SRQ_PREEMPTED)) == 0) { pri = (pri - PRI_MIN_TIMESHARE) / TS_RQ_PPQ; pri = (pri + tdq->tdq_idx) % RQ_NQS; /* @@ -454,7 +459,7 @@ THREAD_LOCK_ASSERT(ts->ts_thread, MA_OWNED); class = PRI_BASE(ts->ts_thread->td_pri_class); tdq->tdq_load++; - CTR2(KTR_SCHED, "cpu %jd load: %d", TDQ_ID(tdq), 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) #ifdef SMP @@ -484,7 +489,7 @@ tdq->tdq_sysload--; #endif KASSERT(tdq->tdq_load != 0, - ("tdq_load_rem: Removing with 0 load on queue %d", (int)TDQ_ID(tdq))); + ("tdq_load_rem: Removing with 0 load on queue %d", TDQ_ID(tdq))); tdq->tdq_load--; CTR1(KTR_SCHED, "load: %d", tdq->tdq_load); ts->ts_runq = NULL; @@ -916,6 +921,8 @@ tdq = TDQ_CPU(cpu); td = ts->ts_thread; ts->ts_cpu = cpu; + + /* If the lock matches just return the queue. */ if (td->td_lock == TDQ_LOCKPTR(tdq)) return (tdq); #ifdef notyet @@ -936,9 +943,7 @@ */ thread_lock_block(td); TDQ_LOCK(tdq); - /* Return to sched_switch() with the lock still blocked */ - if ((flags & SRQ_OURSELF) == 0) - thread_lock_unblock(td, TDQ_LOCKPTR(tdq)); + thread_lock_unblock(td, TDQ_LOCKPTR(tdq)); return (tdq); } @@ -1129,107 +1134,159 @@ tdq_setup(struct tdq *tdq) { - snprintf(tdq->tdq_name, sizeof(tdq->tdq_name), - "sched lock %d", (int)TDQ_ID(tdq)); - mtx_init(&tdq->tdq_lock, tdq->tdq_name, "sched lock", - MTX_SPIN | MTX_RECURSE); + if (bootverbose) + printf("ULE: setup cpu %d\n", TDQ_ID(tdq)); runq_init(&tdq->tdq_realtime); runq_init(&tdq->tdq_timeshare); runq_init(&tdq->tdq_idle); tdq->tdq_load = 0; } -/* - * Setup the thread queues and initialize the topology based on MD - * information. - */ +#ifdef SMP +static void +tdg_setup(struct tdq_group *tdg) +{ + if (bootverbose) + printf("ULE: setup cpu group %d\n", TDG_ID(tdg)); + snprintf(tdg->tdg_name, sizeof(tdg->tdg_name), + "sched lock %d", (int)TDG_ID(tdg)); + mtx_init(&tdg->tdg_lock, tdg->tdg_name, "sched lock", + MTX_SPIN | MTX_RECURSE); + LIST_INIT(&tdg->tdg_members); + tdg->tdg_load = 0; + tdg->tdg_transferable = 0; + tdg->tdg_cpus = 0; + tdg->tdg_mask = 0; + tdg->tdg_cpumask = 0; + tdg->tdg_idlemask = 0; +} + +static void +tdg_add(struct tdq_group *tdg, struct tdq *tdq) +{ + if (tdg->tdg_mask == 0) + tdg->tdg_mask |= 1 << TDQ_ID(tdq); + tdg->tdg_cpumask |= 1 << TDQ_ID(tdq); + tdg->tdg_cpus++; + tdq->tdq_group = tdg; + tdq->tdq_lock = &tdg->tdg_lock; + LIST_INSERT_HEAD(&tdg->tdg_members, tdq, tdq_siblings); + if (bootverbose) + printf("ULE: adding cpu %d to group %d: cpus %d mask 0x%X\n", + TDQ_ID(tdq), TDG_ID(tdg), tdg->tdg_cpus, tdg->tdg_cpumask); +} + static void -sched_setup(void *dummy) +sched_setup_topology(void) { + struct tdq_group *tdg; + struct cpu_group *cg; + int balance_groups; struct tdq *tdq; -#ifdef SMP - int balance_groups; int i; + int j; + topology = 1; balance_groups = 0; - /* - * Initialize the tdqs. - */ - for (i = 0; i < MAXCPU; i++) { + for (i = 0; i < smp_topology->ct_count; i++) { + cg = &smp_topology->ct_group[i]; + tdg = &tdq_groups[i]; + /* + * Initialize the group. + */ + tdg_setup(tdg); + /* + * Find all of the group members and add them. + */ + for (j = 0; j < MAXCPU; j++) { + if ((cg->cg_mask & (1 << j)) != 0) { + tdq = TDQ_CPU(j); + tdq_setup(tdq); + tdg_add(tdg, tdq); + } + } + if (tdg->tdg_cpus > 1) + balance_groups = 1; + } + tdg_maxid = smp_topology->ct_count - 1; + if (balance_groups) + sched_balance_groups(NULL); +} + +static void +sched_setup_smp(void) +{ + struct tdq_group *tdg; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Aug 15 14:33:33 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F3A1716A41A; Wed, 15 Aug 2007 14:33: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 C957716A418 for ; Wed, 15 Aug 2007 14:33:32 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B410E13C467 for ; Wed, 15 Aug 2007 14:33:32 +0000 (UTC) (envelope-from fli@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 l7FEXWUP087762 for ; Wed, 15 Aug 2007 14:33:32 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7FEXWs1087759 for perforce@freebsd.org; Wed, 15 Aug 2007 14:33:32 GMT (envelope-from fli@FreeBSD.org) Date: Wed, 15 Aug 2007 14:33:32 GMT Message-Id: <200708151433.l7FEXWs1087759@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125174 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, 15 Aug 2007 14:33:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=125174 Change 125174 by fli@fli_nexus on 2007/08/15 14:32:34 Add nss_mdns. It implements gethostby{name,name2,addr}, getaddrinfo and ghby{addr,name} (used by getipnodeby{name,addr} and getnameinfo). There is also a configurable ruleset which controls what types of names that might be subject to lookup, the default is to allow dot-local, private ipv4 and link-local ipv6. It also implements a search facility to auto-append tlds to dot-less hosts in case of lookup failure. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/nss_mdns/Makefile#1 add .. //depot/projects/soc2007/fli-mdns_sd/nss_mdns/mdns.conf.sample#1 add .. //depot/projects/soc2007/fli-mdns_sd/nss_mdns/nss_mdns.c#1 add .. //depot/projects/soc2007/fli-mdns_sd/nss_mdns/nss_mdns.h#1 add .. //depot/projects/soc2007/fli-mdns_sd/nss_mdns/parse.y#1 add .. //depot/projects/soc2007/fli-mdns_sd/nss_mdns/token.l#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Wed Aug 15 14:53:58 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 32E7316A46E; Wed, 15 Aug 2007 14:53: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 E837916A46C for ; Wed, 15 Aug 2007 14:53:57 +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 D381E13C48D for ; Wed, 15 Aug 2007 14:53:57 +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 l7FErvip089307 for ; Wed, 15 Aug 2007 14:53:57 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7FErviu089304 for perforce@freebsd.org; Wed, 15 Aug 2007 14:53:57 GMT (envelope-from zec@FreeBSD.org) Date: Wed, 15 Aug 2007 14:53:57 GMT Message-Id: <200708151453.l7FErviu089304@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 125175 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, 15 Aug 2007 14:53:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=125175 Change 125175 by zec@zec_tpx32 on 2007/08/15 14:53:40 Clear the M_REMOTE_VNET mbuf flag once it has been used for defering the direct netisr dispatch. While here, do style-fixing on a few asserts. Affected files ... .. //depot/projects/vimage/src/sys/net/netisr.c#7 edit Differences ... ==== //depot/projects/vimage/src/sys/net/netisr.c#7 (text+ko) ==== @@ -143,7 +143,7 @@ IF_DEQUEUE(ni->ni_queue, m); if (m == NULL) break; - VNET_ASSERT(m->m_pkthdr.rcvif); + VNET_ASSERT(m->m_pkthdr.rcvif != NULL); CURVNET_SET(m->m_pkthdr.rcvif->if_vnet); ni->ni_handler(m); CURVNET_RESTORE(); @@ -167,6 +167,7 @@ m_freem(m); return; } + VNET_ASSERT(m->m_pkthdr.rcvif != NULL) /* * Do direct dispatch only for MPSAFE netisrs (and * only when enabled). Note that when a netisr is @@ -201,6 +202,15 @@ */ ni->ni_handler(m); } else { +#ifdef VIMAGE + /* + * Once direct netisr dispatching is avoided using the + * M_REMOTE_VNET flag, it should not be observed any + * more, so clear it here in order to avoid further + * defering of direct netisr dispatching. + */ + m->m_flags &= ~M_REMOTE_VNET; +#endif isrstat.isrs_deferred++; if (IF_HANDOFF(ni->ni_queue, m, NULL)) schednetisr(num); @@ -227,7 +237,10 @@ m_freem(m); return (ENXIO); } - VNET_ASSERT(m->m_pkthdr.rcvif) + VNET_ASSERT(m->m_pkthdr.rcvif != NULL) +#ifdef VIMAGE + m->m_flags &= ~M_REMOTE_VNET; +#endif isrstat.isrs_queued++; if (!IF_HANDOFF(ni->ni_queue, m, NULL)) return (ENOBUFS); /* IF_HANDOFF has free'd the mbuf */ From owner-p4-projects@FreeBSD.ORG Wed Aug 15 15:05:21 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A921E16A41B; Wed, 15 Aug 2007 15:05: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 3BB8516A419 for ; Wed, 15 Aug 2007 15:05:21 +0000 (UTC) (envelope-from delphij@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 23B8013C4B4 for ; Wed, 15 Aug 2007 15:05:16 +0000 (UTC) (envelope-from delphij@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 l7FF5GOw092982 for ; Wed, 15 Aug 2007 15:05:16 GMT (envelope-from delphij@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7FF5CUn092974 for perforce@freebsd.org; Wed, 15 Aug 2007 15:05:12 GMT (envelope-from delphij@freebsd.org) Date: Wed, 15 Aug 2007 15:05:12 GMT Message-Id: <200708151505.l7FF5CUn092974@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to delphij@freebsd.org using -f From: Xin LI To: Perforce Change Reviews Cc: Subject: PERFORCE change 125176 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, 15 Aug 2007 15:05:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=125176 Change 125176 by delphij@charlie on 2007/08/15 15:05:06 IFC Affected files ... .. //depot/projects/delphij_fork/contrib/gcc/BASE-VER#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/ChangeLog#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/DATESTAMP#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/Makefile.in#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/calls.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/combine.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/arm/arm.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/arm/cirrus.md#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/i386/i386.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/i386/i386.h#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/i386/i386.md#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/i386/sse.md#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/mips/iris6.h#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/rs6000/predicates.md#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/rs6000/rs6000.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/soft-fp/double.h#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/soft-fp/extended.h#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/soft-fp/floatundidf.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/soft-fp/floatundisf.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/soft-fp/floatunsidf.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/soft-fp/floatunsisf.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/soft-fp/op-2.h#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/soft-fp/op-4.h#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/soft-fp/op-common.h#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/soft-fp/quad.h#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/config/sparc/sparc.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/cp/ChangeLog#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/cp/call.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/cp/class.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/cp/cp-tree.h#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/cp/decl.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/cp/decl2.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/cp/init.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/cp/parser.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/cp/pt.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/cp/semantics.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/cp/typeck.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/cp/typeck2.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/doc/cpp.1#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/doc/gcc.1#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/doc/gcov.1#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/dwarf2out.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/except.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/fold-const.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/function.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/gimplify.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/gthr-posix.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/gthr-posix.h#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/loop-iv.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/objc/ChangeLog#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/omp-low.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/pointer-set.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/pointer-set.h#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/reload.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/tree-if-conv.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/tree-ssa-loop-niter.c#4 integrate .. //depot/projects/delphij_fork/contrib/gcc/tree-ssa-operands.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/tree-ssa-structalias.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/tree-vrp.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcc/version.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcclibs/include/ChangeLog#2 integrate .. //depot/projects/delphij_fork/contrib/gcclibs/libcpp/ChangeLog#2 integrate .. //depot/projects/delphij_fork/contrib/gcclibs/libdecnumber/ChangeLog#2 integrate .. //depot/projects/delphij_fork/contrib/gcclibs/libgomp/ChangeLog#2 integrate .. //depot/projects/delphij_fork/contrib/gcclibs/libgomp/config/posix/lock.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcclibs/libgomp/sections.c#2 integrate .. //depot/projects/delphij_fork/contrib/gcclibs/libiberty/ChangeLog#2 integrate .. //depot/projects/delphij_fork/contrib/gcclibs/libmudflap/ChangeLog#2 integrate .. //depot/projects/delphij_fork/contrib/gcclibs/libssp/ChangeLog#2 integrate .. //depot/projects/delphij_fork/contrib/less/main.c#3 integrate .. //depot/projects/delphij_fork/contrib/libobjc/ChangeLog#2 integrate .. //depot/projects/delphij_fork/contrib/libstdc++/ChangeLog#2 integrate .. //depot/projects/delphij_fork/contrib/libstdc++/acinclude.m4#2 integrate .. //depot/projects/delphij_fork/contrib/libstdc++/config.h.in#2 integrate .. //depot/projects/delphij_fork/contrib/libstdc++/configure#2 integrate .. //depot/projects/delphij_fork/contrib/libstdc++/include/Makefile.am#2 integrate .. //depot/projects/delphij_fork/contrib/libstdc++/include/Makefile.in#2 integrate .. //depot/projects/delphij_fork/contrib/libstdc++/include/bits/ostream.tcc#2 integrate .. //depot/projects/delphij_fork/contrib/libstdc++/include/bits/ostream_insert.h#2 integrate .. //depot/projects/delphij_fork/contrib/libstdc++/include/ext/throw_allocator.h#2 integrate .. //depot/projects/delphij_fork/contrib/libstdc++/include/std/std_fstream.h#2 integrate .. //depot/projects/delphij_fork/contrib/libstdc++/libsupc++/exception#2 integrate .. //depot/projects/delphij_fork/contrib/libstdc++/libsupc++/new#2 integrate .. //depot/projects/delphij_fork/contrib/libstdc++/libsupc++/typeinfo#2 integrate .. //depot/projects/delphij_fork/etc/etc.arm/ttys#2 integrate .. //depot/projects/delphij_fork/gnu/lib/libgcc/Makefile#2 integrate .. //depot/projects/delphij_fork/lib/libarchive/archive_write_disk.c#3 integrate .. //depot/projects/delphij_fork/lib/libarchive/test/test_read_format_gtar_sparse.c#5 integrate .. //depot/projects/delphij_fork/lib/libarchive/test/test_write_disk_perms.c#4 integrate .. //depot/projects/delphij_fork/release/Makefile#2 integrate .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/Makefile#2 integrate .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/hardware/article.sgml#2 integrate .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/Makefile#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/Makefile.inc#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/amd64/Makefile#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/amd64/article.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/common/abstract.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/common/artheader.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/common/install.ent#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/common/install.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/common/layout.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/common/trouble.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/common/upgrade.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/i386/Makefile#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/i386/article.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/ia64/Makefile#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/ia64/article.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/pc98/Makefile#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/pc98/article.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/powerpc/Makefile#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/powerpc/article.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/sparc64/Makefile#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/sparc64/article.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/installation/sparc64/install.sgml#2 delete .. //depot/projects/delphij_fork/release/doc/en_US.ISO8859-1/relnotes/article.sgml#9 integrate .. //depot/projects/delphij_fork/release/doc/share/examples/Makefile.relnotesng#2 integrate .. //depot/projects/delphij_fork/release/doc/share/misc/dev.archlist.txt#2 integrate .. //depot/projects/delphij_fork/sbin/atacontrol/atacontrol.c#2 integrate .. //depot/projects/delphij_fork/sbin/tunefs/tunefs.8#2 integrate .. //depot/projects/delphij_fork/share/man/man4/mfi.4#2 integrate .. //depot/projects/delphij_fork/share/man/man4/ng_fec.4#2 integrate .. //depot/projects/delphij_fork/share/man/man5/Makefile#2 integrate .. //depot/projects/delphij_fork/share/man/man5/boot.config.5#1 branch .. //depot/projects/delphij_fork/share/mk/sys.mk#2 integrate .. //depot/projects/delphij_fork/usr.sbin/freebsd-update/freebsd-update.sh#3 integrate .. //depot/projects/delphij_fork/usr.sbin/rpc.statd/file.c#2 integrate .. //depot/projects/delphij_fork/usr.sbin/sysinstall/menus.c#2 integrate Differences ... ==== //depot/projects/delphij_fork/contrib/gcc/BASE-VER#2 (text+ko) ==== @@ -1,1 +1,1 @@ -4.2.0 +4.2.1 ==== //depot/projects/delphij_fork/contrib/gcc/ChangeLog#2 (text+ko) ==== @@ -1,3 +1,441 @@ +2007-07-19 Release Manager + + * GCC 4.2.1 released. + +2007-07-18 Paolo Bonzini + + Revert: + + 2007-07-09 Paolo Bonzini + + PR middle-end/32004 + * function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO. + + 2007-07-06 Paolo Bonzini + + PR middle-end/32004 + * function.c (match_asm_constraints_1, rest_of_match_asm_constraints, + pass_match_asm_constraints): New. + * passes.c (init_optimization_passes): Add new pass. + * stmt.c (expand_asm_operands): Set cfun->has_asm_statement. + * function.h (struct function): Add has_asm_statement bit. + (current_function_has_asm_statement): New. + * tree-pass.h (pass_match_asm_constraints): New. + +2007-07-16 Paul Brook + + PR target/32753 + gcc/ + * config/arm/cirrus.md (cirrus_arm_movsi_insn): Remove dead insn. + +2007-07-10 Rainer Orth + + PR target/32538 + * config/mips/iris6.h (LIBGCC_SPEC): Add libm. + +2007-07-09 Paolo Bonzini + + PR middle-end/32004 + * function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO. + +2007-07-09 Uros Bizjak + + PR tree-optimization/32681 + * tree-if-conv.c (find_phi_replacement_condition): Use the condition + saved in second_edge->aux when first_bb is a loop header. + +2007-07-07 Anatoly Sokolov + + PR target/31331 + * config/avr/avr.c (avr_naked_function_p): Handle receiving a type + rather than a decl. + (avr_attribute_table): Make "naked" attribute apply to function types + rather than to decls. + (avr_handle_fntype_attribute): New function. + +2007-07-06 Paolo Bonzini + + PR middle-end/32004 + * function.c (match_asm_constraints_1, rest_of_match_asm_constraints, + pass_match_asm_constraints): New. + * passes.c (init_optimization_passes): Add new pass. + * stmt.c (expand_asm_operands): Set cfun->has_asm_statement. + * function.h (struct function): Add has_asm_statement bit. + (current_function_has_asm_statement): New. + * tree-pass.h (pass_match_asm_constraints): New. + +2007-07-06 Uros Bizjak + + PR rtl-optimization/32450 + * function.c (thread_prologue_and_epilogue_insns): Emit blockage insn + to ensure that instructions are not moved into the prologue when + profiling is on. + +2007-07-04 Richard Guenther + + PR tree-optimization/32500 + * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): + Only use basic blocks that are always executed to infer loop bounds. + +2007-07-04 Uros Bizjak + + PR tree-optimization/31966 + PR tree-optimization/32533 + * tree-if-conv.c (add_to_dst_predicate_list): Use "edge", not + "basic_block" description as its third argument. Update function + calls to get destination bb from "edge" argument. Save "cond" into + aux field of the edge. Update prototype for changed arguments. + (if_convertible_loop_p): Clear aux field of incoming edges if bb + contains phi node. + (find_phi_replacement_condition): Operate on incoming edges, not + on predecessor blocks. If there is a condition saved in the + incoming edge aux field, AND it with incoming bb predicate. + Return source bb of the first edge. + (clean_predicate_lists): Clean aux field of outgoing node edges. + (tree_if_conversion): Do not initialize cond variable. Move + variable declaration into the loop. + (replace_phi_with_cond_gimple_modify_stmt): Remove unneded + initializations of new_stmt, arg0 and arg1 variables. + +2007-07-04 Kaz Kojima + + PR target/32506 + Backport from mainline. + * config/sh/sh.md (udivsi3_i1_media): Use target_reg_operand + predicate instead of target_operand. + (divsi3_i1_media, divsi3_media_2): Likewise. + +2007-07-03 Richard Guenther + + Backport from mainline: + 2006-12-11 Zdenek Dvorak + + PR rtl-optimization/30113 + * loop-iv.c (implies_p): Require the mode of the operands to be + scalar. + +2007-07-03 Rainer Orth + + PR target/28307 + * gthr-posix.h [SUPPORTS_WEAK && GTHREAD_USE_WEAK] + (__gthrw_pragma): Provide default definition. + (__gthrw2): Use it. + * gthr-posix.c (__gthrw_pragma): Define. + +2007-07-02 Jakub Jelinek + + PR libgomp/32468 + * omp-low.c (check_combined_parallel): New function. + (lower_omp_parallel): Call it via walk_stmts, set + OMP_PARALLEL_COMBINED if appropriate. + (determine_parallel_type): If OMP_FOR resp. OMP_SECTIONS + isn't the only statement in WS_ENTRY_BB or OMP_RETURN + the only one in PAR_EXIT_BB and not OMP_PARALLEL_COMBINED, + don't consider it as combined parallel. + +2007-06-30 Alexandre Oliva + + * dwarf2out.c (dwarf2out_finish): Accept namespaces as context of + limbo die nodes. + +2007-06-28 Seongbae Park + + * config/arm/arm.c (arm_get_frame_offsets): Set + offsets->locals_base to avoid negative stack size. + (thumb_expand_prologue): Assert on negative stack size. + +2007-06-28 Jakub Jelinek + + * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Ensure + decl is non-external for AIX ABI. + +2007-06-28 David Edelsohn + + * config/rs6000/predicates.md (current_file_function_operand): + Ensure the symbol is non-external for AIX ABI. + +2007-06-21 H.J. Lu + + * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_VEC_EXT_V16QI. + (ix86_init_mmx_sse_builtins): Add __builtin_ia32_vec_ext_v16qi. + (ix86_expand_builtin): Handle IX86_BUILTIN_VEC_EXT_V16QI. + +2007-06-21 Jakub Jelinek + + PR middle-end/32362 + * omp-low.c (lookup_decl_in_outer_ctx): Don't ICE if t is NULL, + but decl is a global var, instead return decl. + * gimplify.c (gimplify_adjust_omp_clauses_1): Add shared clauses + even for is_global_var decls, if they are private in some outer + context. + +2007-06-21 Uros Bizjak + + PR target/32389 + * config/i386/i386.h (enum ix86_stack_slot): Add SLOT_VIRTUAL. + * config/i386/i386.c (assign_386_stack_local): Assert that + SLOT_VIRTUAL is valid only before virtual regs are instantiated. + (ix86_expand_builtin) [IX86_BUILTIN_LDMXCSR, IX86_BUILTIN_STMXCSR]: + Use SLOT_VIRTUAL stack slot instead of SLOT_TEMP. + * config/i386/i386.md (truncdfsf2, truncxfsf2, truncxfdf2): Ditto. + +2007-06-20 Jakub Jelinek + + PR inline-asm/32109 + * gimplify.c (gimplify_asm_expr): Issue error if type is addressable + and !allows_mem. + + PR middle-end/32285 + * calls.c (precompute_arguments): Also precompute CALL_EXPR arguments + if ACCUMULATE_OUTGOING_ARGS. + +2007-06-20 Kaz Kojima + + PR rtl-optimization/28011 + Backport from mainline. + * reload.c (push_reload): Set dont_share if IN appears in OUT + also when IN is a PLUS rtx. + (reg_overlap_mentioned_for_reload_p): Return true if X and IN + are same PLUS rtx. + +2007-06-19 Richard Guenther + Michael Matz + + PR tree-optimization/30252 + * tree-ssa-structalias.c (solution_set_add): Make sure to + preserve all relevant vars. + (handle_ptr_arith): Make sure to only handle positive + offsets. + (push_fields_onto_fieldstack): Create fields for empty + bases. + +2007-06-19 Jakub Jelinek + + PR tree-optimization/32353 + * tree-ssa-structalias.c (set_uids_in_ptset): Also handle RESULT_DECL. + +2007-06-17 Eric Botcazou + + * config/sparc/sparc.c (sparc_vis_init_builtins): Retrieve the + return mode from the builtin itself. + (sparc_fold_builtin): Fix cast of zero constant. + +2007-06-15 Diego Novillo + + PR 32327 + * tree-ssa-operands.c (build_ssa_operands): Initially assume + that the statement does not take any addresses. + +2007-06-13 Eric Botcazou + + * config/sparc/sparc.c (sparc_override_options): Initialize + fpu mask correctly. + +2007-06-09 Ian Lance Taylor + + PR tree-optimization/32169 + * tree-vrp.c (extract_range_from_unary_expr): For NOP_EXPR and + CONVERT_EXPR, check whether min and max both converted to an + overflow infinity representation. + +2007-06-08 Kaz Kojima + + PR target/32163 + Backport from mainline. + * config/sh/sh.md (symGOT_load): Don't schedule insns when + the symbol is generated with the stack protector. + +2007-06-06 Ian Lance Taylor + + * fold-const.c (merge_ranges): If range_successor or + range_predecessor fail, just return 0. + +2007-06-05 Ian Lance Taylor + + * tree-vrp.c (compare_values_warnv): Check TREE_NO_WARNING on a + PLUS_EXPR or MINUS_EXPR node before setting *strict_overflow_p. + (extract_range_from_assert): Set TREE_NO_WARNING when creating an + expression. + (test_for_singularity): Likewise. + +2007-06-04 Ian Lance Taylor + + * tree-vrp.c (adjust_range_with_scev): When loop is not expected + to overflow, reduce overflow infinity to regular infinity. + (vrp_var_may_overflow): New static function. + (vrp_visit_phi_node): Check vrp_var_may_overflow. + +2007-05-31 H.J. Lu + + Backport from mainline: + 2007-05-25 H.J. Lu + + * config/i386/i386.c (__builtin_ia32_vec_ext_v2df): Mark it + with MASK_SSE2. + (__builtin_ia32_vec_ext_v2di): Likewise. + (__builtin_ia32_vec_ext_v4si): Likewise. + (__builtin_ia32_vec_ext_v8hi): Likewise. + (__builtin_ia32_vec_set_v8hi): Likewise. + +2007-05-31 John David Anglin + + Backport from mainline: + 2007-05-05 Aurelien Jarno + + * config/pa/pa.md: Split tgd_load, tld_load and tie_load + into pic and non-pic versions. Mark r19 as used for + tgd_load_pic, tld_load_pic and tie_load_pic. Mark r27 as used + for tgd_load, tld_load and tie_load . + * config/pa/pa.c (legitimize_tls_address): Emit pic or non-pic + version of tgd_load, tld_load and tie_load depending on the + value of flag_pic. + +2007-05-27 Daniel Berlin + + Fix PR/30052 + Backport PTA solver from mainline + + * pointer-set.c: Copy from mainline + * pointer-set.h: Ditto. + * tree-ssa-structalias.c: Copy solver portions from mainline. + * Makefile.in (tree-ssa-structalias.o): Update dependencies + +2007-05-30 Ralf Wildenhues + + * tree-vrp.c (compare_names): Initialize sop. + +2007-05-30 Jakub Jelinek + + PR tree-optimization/31769 + * except.c (duplicate_eh_regions): Clear prev_try if + ERT_MUST_NOT_THROW region is inside of ERT_TRY region. + +2007-05-28 Andrew Pinski + + PR tree-opt/32100 + * fold-const.c (tree_expr_nonnegative_warnv_p): Don't + return true when truth_value_p is true and the type + is of signed:1. + +2007-05-27 H.J. Lu + + Backport from mainline: + 2007-05-25 Uros Bizjak + + * config/i386/sse.md (*vec_extractv2di_1_sse2): Do not calculate + "memory" attribute for "sseishft" type insn without operands[2]. + + 2007-05-25 H.J. Lu + + * config/i386/sse.md (*vec_extractv2di_1_sse2): Correct shift. + +2007-05-22 Ian Lance Taylor + + * tree-vrp.c (avoid_overflow_infinity): New static function, + broken out of set_value_range_to_value. + (set_value_range_to_value): Call avoid_overflow_infinity. + (extract_range_from_assert): Likewise. + +2007-05-23 Chen Liqin + + PR target/30987 + * config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove. + * config/score/predicate.md (const_pow2, const_npow2): remove. + * config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL undef. + PR target/30474 + * config/score/score.c (score_print_operand): makes sure that only lower + bits are used. + +2007-05-21 Uros Bizjak + + PR target/31167 + Backport from mainline. + * config/i386/i386.md (*addti3_1, *addti3_1 splitter): Use + x86_64_general_operand as operand[2] predicate. Remove "iF" + from operand constraints and use "e" constraint instead. + (*subti3_1, *subti3_1 splitter): Ditto. + (*negti2_1, *negti2_1 splitter): Use nonimmediate_operand as + operand[1] predicate. + +2007-05-21 Uros Bizjak + + PR target/30041 + Backport from mainline. + * config/i386/sse.md ("*sse3_movddup"): Use operands[0] and + operands[1] in insn constraint. Correct type attribute to sselog1. + +2007-05-20 Kaz Kojima + + PR target/31701 + Backport from mainline. + * config/sh/sh.c (output_stack_adjust): Avoid using the frame + register itself to hold the offset constant. Tell flow the use + of r4 and r5 when they are used. + +2007-05-20 Kaz Kojima + + PR target/31480 + Backport from mainline. + * config/sh/sh.md (length): Check if prev_nonnote_insn (insn) + is null. + +2007-05-20 Kaz Kojima + + PR target/31022 + Backport from mainline. + * config/sh/sh.c (sh_adjust_cost): Use the result of single_set + instead of PATTERN. + +2007-05-20 Kaz Kojima + + PR target/27405 + Backport from mainline. + * config/sh/sh.md (cmp{eq,gt,gtu}{si,di}_media): Remove. + (cmpsi{eq,gt,gtu}{si,di}_media): Rename to + cmp{eq,gt,gtu}{si,di}_media. + (*cmpne0si_media): Remove. + (*movsicc_umin): Adjust gen_cmp*_media call. + (unordered): Change the mode of unordered and operands[1] to + SImode. + (seq): Adjust gen_cmp*_media calls. Make the mode of + a temporary result of compare SImode if needed. If the mode + of operands[0] is DImode, extend the temporary result to DImode. + (slt, sle, sgt, sge, sgtu, sltu, sleu, sgue, sne): Likewise. + (sunorderd): Change the mode of match_operand and unorderd to + SImode. + (cmpeq{sf,df}_media): Remove. + (cmpsieq{sf,df}_media): Rename to cmpeq{sf,df}_media. + (cmp{gt,ge,un}{sf,df}_media): Change the mode of match_operand + and compare operation to SImode. + +2007-05-18 Joseph Myers + + * config/soft-fp/double.h, config/soft-fp/extended.h, + config/soft-fp/floatundidf.c, config/soft-fp/floatundisf.c, + config/soft-fp/floatunsidf.c, config/soft-fp/floatunsisf.c, + config/soft-fp/op-2.h, config/soft-fp/op-4.h, + config/soft-fp/op-common.h, config/soft-fp/quad.h: Update from + glibc CVS. + +2007-05-17 Ian Lance Taylor + + PR tree-optimization/31953 + * tree-vrp.c (set_value_range_to_value): Add equiv parameter. + Change all callers. + (set_value_range_to_null): Call set_value_range_to_value. + (extract_range_from_comparison): Likewise. + +2007-05-17 Eric Botcazou + + PR rtl-optimization/31691 + * combine.c (simplify_set): Build a new src pattern instead of + substituting its operands in the COMPARE case. + +2007-05-14 Mark Mitchell + + * BASE-VER: Set to 4.2.1. + * DEV-PHASE: Set to prerelease. + 2007-05-13 Release Manager * GCC 4.2.0 released. @@ -307,7 +745,8 @@ 2007-04-03 Stuart Hastings PR 31281 - * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl. + * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile + from rethrow decl. * cse.c (record_jump_equiv): Bail out on CCmode comparisons. 2007-04-03 Jakub Jelinek ==== //depot/projects/delphij_fork/contrib/gcc/DATESTAMP#2 (text+ko) ==== @@ -1,1 +1,1 @@ -20070514 +20070719 ==== //depot/projects/delphij_fork/contrib/gcc/Makefile.in#2 (text+ko) ==== @@ -1839,7 +1839,7 @@ tree-ssa-structalias.o: tree-ssa-structalias.c tree-ssa-structalias.h \ $(SYSTEM_H) $(CONFIG_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \ $(TM_H) coretypes.h $(CGRAPH_H) tree-pass.h $(TIMEVAR_H) \ - gt-tree-ssa-structalias.h $(PARAMS_H) + gt-tree-ssa-structalias.h $(PARAMS_H) pointer-set.h tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \ toplev.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ ==== //depot/projects/delphij_fork/contrib/gcc/calls.c#2 (text+ko) ==== @@ -1238,13 +1238,25 @@ /* If this is a libcall, then precompute all arguments so that we do not get extraneous instructions emitted as part of the libcall sequence. */ - if ((flags & ECF_LIBCALL_BLOCK) == 0) + + /* If we preallocated the stack space, and some arguments must be passed + on the stack, then we must precompute any parameter which contains a + function call which will store arguments on the stack. + Otherwise, evaluating the parameter may clobber previous parameters + which have already been stored into the stack. (we have code to avoid + such case by saving the outgoing stack arguments, but it results in + worse code) */ + if ((flags & ECF_LIBCALL_BLOCK) == 0 && !ACCUMULATE_OUTGOING_ARGS) return; for (i = 0; i < num_actuals; i++) { enum machine_mode mode; + if ((flags & ECF_LIBCALL_BLOCK) == 0 + && TREE_CODE (args[i].tree_value) != CALL_EXPR) + continue; + /* If this is an addressable type, we cannot pre-evaluate it. */ gcc_assert (!TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value))); ==== //depot/projects/delphij_fork/contrib/gcc/combine.c#2 (text+ko) ==== @@ -5341,14 +5341,14 @@ } else if (GET_MODE (op0) == compare_mode && op1 == const0_rtx) { - SUBST(SET_SRC (x), op0); + SUBST (SET_SRC (x), op0); src = SET_SRC (x); } - else + /* Otherwise, update the COMPARE if needed. */ + else if (XEXP (src, 0) != op0 || XEXP (src, 1) != op1) { - /* Otherwise, update the COMPARE if needed. */ - SUBST (XEXP (src, 0), op0); - SUBST (XEXP (src, 1), op1); + SUBST (SET_SRC (x), gen_rtx_COMPARE (compare_mode, op0, op1)); + src = SET_SRC (x); } } else ==== //depot/projects/delphij_fork/contrib/gcc/config/arm/arm.c#2 (text+ko) ==== @@ -10555,6 +10555,7 @@ if (leaf && frame_size == 0) { offsets->outgoing_args = offsets->soft_frame; + offsets->locals_base = offsets->soft_frame; return offsets; } @@ -13874,6 +13875,7 @@ amount = offsets->locals_base - offsets->saved_regs; } + gcc_assert (amount >= 0); if (amount) { if (amount < 512) ==== //depot/projects/delphij_fork/contrib/gcc/config/arm/cirrus.md#2 (text+ko) ==== @@ -404,28 +404,6 @@ ;; Cirrus SI values have been outlawed. Look in arm.h for the comment ;; on HARD_REGNO_MODE_OK. -(define_insn "*cirrus_arm_movsi_insn" - [(set (match_operand:SI 0 "general_operand" "=r,r,r,m,*v,r,*v,T,*v") - (match_operand:SI 1 "general_operand" "rI,K,mi,r,r,*v,T,*v,*v"))] - "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0 - && (register_operand (operands[0], SImode) - || register_operand (operands[1], SImode))" - "@ - mov%?\\t%0, %1 - mvn%?\\t%0, #%B1 - ldr%?\\t%0, %1 - str%?\\t%1, %0 - cfmv64lr%?\\t%Z0, %1 - cfmvr64l%?\\t%0, %Z1 - cfldr32%?\\t%V0, %1 - cfstr32%?\\t%V1, %0 - cfsh32%?\\t%V0, %V1, #0" - [(set_attr "type" "*, *, load1,store1, *, *, load1,store1, *") - (set_attr "pool_range" "*, *, 4096, *, *, *, 1024, *, *") - (set_attr "neg_pool_range" "*, *, 4084, *, *, *, 1012, *, *") - (set_attr "cirrus" "not,not, not, not,move,normal,normal,normal,normal")] -) - (define_insn "*cirrus_movsf_hard_insn" [(set (match_operand:SF 0 "nonimmediate_operand" "=v,v,v,r,m,r,r,m") (match_operand:SF 1 "general_operand" "v,mE,r,v,v,r,mE,r"))] ==== //depot/projects/delphij_fork/contrib/gcc/config/i386/i386.c#2 (text+ko) ==== @@ -19,7 +19,7 @@ the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.24 2007/05/19 02:26:26 kan Exp $ */ +/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.25 2007/08/14 03:04:42 kan Exp $ */ #include "config.h" #include "system.h" @@ -13480,6 +13480,9 @@ gcc_assert (n < MAX_386_STACK_LOCALS); + /* Virtual slot is valid only before vregs are instantiated. */ + gcc_assert ((n == SLOT_VIRTUAL) == !virtuals_instantiated); + for (s = ix86_stack_locals; s; s = s->next) if (s->mode == mode && s->n == n) return s->rtl; @@ -14570,6 +14573,7 @@ IX86_BUILTIN_VEC_EXT_V4SF, IX86_BUILTIN_VEC_EXT_V4SI, IX86_BUILTIN_VEC_EXT_V8HI, + IX86_BUILTIN_VEC_EXT_V16QI, IX86_BUILTIN_VEC_EXT_V2SI, IX86_BUILTIN_VEC_EXT_V4HI, IX86_BUILTIN_VEC_SET_V8HI, @@ -15542,13 +15546,13 @@ /* Access to the vec_extract patterns. */ ftype = build_function_type_list (double_type_node, V2DF_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2df", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2df", ftype, IX86_BUILTIN_VEC_EXT_V2DF); ftype = build_function_type_list (long_long_integer_type_node, V2DI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2di", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2di", ftype, IX86_BUILTIN_VEC_EXT_V2DI); ftype = build_function_type_list (float_type_node, V4SF_type_node, @@ -15558,12 +15562,12 @@ ftype = build_function_type_list (intSI_type_node, V4SI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v4si", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v4si", ftype, IX86_BUILTIN_VEC_EXT_V4SI); ftype = build_function_type_list (intHI_type_node, V8HI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v8hi", ftype, IX86_BUILTIN_VEC_EXT_V8HI); ftype = build_function_type_list (intHI_type_node, V4HI_type_node, @@ -15576,11 +15580,15 @@ def_builtin (MASK_MMX, "__builtin_ia32_vec_ext_v2si", ftype, IX86_BUILTIN_VEC_EXT_V2SI); + ftype = build_function_type_list (intQI_type_node, V16QI_type_node, + integer_type_node, NULL_TREE); + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v16qi", ftype, IX86_BUILTIN_VEC_EXT_V16QI); + /* Access to the vec_set patterns. */ ftype = build_function_type_list (V8HI_type_node, V8HI_type_node, intHI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_set_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_set_v8hi", ftype, IX86_BUILTIN_VEC_SET_V8HI); ftype = build_function_type_list (V4HI_type_node, V4HI_type_node, @@ -16124,13 +16132,13 @@ case IX86_BUILTIN_LDMXCSR: op0 = expand_normal (TREE_VALUE (arglist)); - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_move_insn (target, op0); emit_insn (gen_sse_ldmxcsr (target)); return 0; case IX86_BUILTIN_STMXCSR: - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_insn (gen_sse_stmxcsr (target)); return copy_to_mode_reg (SImode, target); @@ -16492,6 +16500,7 @@ case IX86_BUILTIN_VEC_EXT_V4SF: case IX86_BUILTIN_VEC_EXT_V4SI: case IX86_BUILTIN_VEC_EXT_V8HI: + case IX86_BUILTIN_VEC_EXT_V16QI: case IX86_BUILTIN_VEC_EXT_V2SI: case IX86_BUILTIN_VEC_EXT_V4HI: return ix86_expand_vec_ext_builtin (arglist, target); ==== //depot/projects/delphij_fork/contrib/gcc/config/i386/i386.h#2 (text+ko) ==== @@ -2166,7 +2166,8 @@ enum ix86_stack_slot { - SLOT_TEMP = 0, + SLOT_VIRTUAL = 0, + SLOT_TEMP, SLOT_CW_STORED, SLOT_CW_TRUNC, SLOT_CW_FLOOR, ==== //depot/projects/delphij_fork/contrib/gcc/config/i386/i386.md#2 (text+ko) ==== @@ -3716,7 +3716,7 @@ ; else { - rtx temp = assign_386_stack_local (SFmode, SLOT_TEMP); + rtx temp = assign_386_stack_local (SFmode, SLOT_VIRTUAL); emit_insn (gen_truncdfsf2_with_temp (operands[0], operands[1], temp)); DONE; } @@ -3868,7 +3868,7 @@ DONE; } else - operands[2] = assign_386_stack_local (SFmode, SLOT_TEMP); + operands[2] = assign_386_stack_local (SFmode, SLOT_VIRTUAL); }) (define_insn "*truncxfsf2_mixed" @@ -3966,7 +3966,7 @@ DONE; } else - operands[2] = assign_386_stack_local (DFmode, SLOT_TEMP); + operands[2] = assign_386_stack_local (DFmode, SLOT_VIRTUAL); }) (define_insn "*truncxfdf2_mixed" @@ -4749,7 +4749,7 @@ (define_insn "*addti3_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o") (plus:TI (match_operand:TI 1 "nonimmediate_operand" "%0,0") - (match_operand:TI 2 "general_operand" "roiF,riF"))) + (match_operand:TI 2 "x86_64_general_operand" "roe,re"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_binary_operator_ok (PLUS, TImode, operands)" "#") @@ -4757,7 +4757,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") (plus:TI (match_operand:TI 1 "nonimmediate_operand" "") - (match_operand:TI 2 "general_operand" ""))) + (match_operand:TI 2 "x86_64_general_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel [(set (reg:CC FLAGS_REG) (unspec:CC [(match_dup 1) (match_dup 2)] @@ -6483,7 +6483,7 @@ (define_insn "*subti3_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=r,o") (minus:TI (match_operand:TI 1 "nonimmediate_operand" "0,0") - (match_operand:TI 2 "general_operand" "roiF,riF"))) + (match_operand:TI 2 "x86_64_general_operand" "roe,re"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_binary_operator_ok (MINUS, TImode, operands)" "#") @@ -6491,7 +6491,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") (minus:TI (match_operand:TI 1 "nonimmediate_operand" "") - (match_operand:TI 2 "general_operand" ""))) + (match_operand:TI 2 "x86_64_general_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel [(set (reg:CC FLAGS_REG) (compare:CC (match_dup 1) (match_dup 2))) @@ -9326,7 +9326,7 @@ (define_insn "*negti2_1" [(set (match_operand:TI 0 "nonimmediate_operand" "=ro") - (neg:TI (match_operand:TI 1 "general_operand" "0"))) + (neg:TI (match_operand:TI 1 "nonimmediate_operand" "0"))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && ix86_unary_operator_ok (NEG, TImode, operands)" @@ -9334,7 +9334,7 @@ (define_split [(set (match_operand:TI 0 "nonimmediate_operand" "") - (neg:TI (match_operand:TI 1 "general_operand" ""))) + (neg:TI (match_operand:TI 1 "nonimmediate_operand" ""))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed" [(parallel ==== //depot/projects/delphij_fork/contrib/gcc/config/i386/sse.md#2 (text+ko) ==== @@ -2055,11 +2055,11 @@ (match_dup 1)) (parallel [(const_int 0) (const_int 2)])))] - "TARGET_SSE3 && !(MEM_P (operands[1]) && MEM_P (operands[2]))" + "TARGET_SSE3 && !(MEM_P (operands[0]) && MEM_P (operands[1]))" "@ movddup\t{%1, %0|%0, %1} #" - [(set_attr "type" "sselog,ssemov") + [(set_attr "type" "sselog1,ssemov") (set_attr "mode" "V2DF")]) (define_split @@ -3494,9 +3494,10 @@ "TARGET_SSE2 && !(MEM_P (operands[0]) && MEM_P (operands[1]))" "@ movhps\t{%1, %0|%0, %1} - psrldq\t{$4, %0|%0, 4} + psrldq\t{$8, %0|%0, 8} movq\t{%H1, %0|%0, %H1}" [(set_attr "type" "ssemov,sseishft,ssemov") + (set_attr "memory" "*,none,*") (set_attr "mode" "V2SF,TI,TI")]) ;; Not sure this is ever used, but it doesn't hurt to have it. -aoliva ==== //depot/projects/delphij_fork/contrib/gcc/config/mips/iris6.h#2 (text+ko) ==== @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler. IRIX version 6. Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, - 2005, 2006 + 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GCC. @@ -96,10 +96,11 @@ " %{pthread:-lpthread} %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \ SUBTARGET_WARN_UNUSED_SPEC "}" -/* Avoid getting two warnings for libgcc.a everytime we link. */ +/* Avoid getting two warnings for libgcc.a everytime we link. libgcc.a + contains references to copysignl, so link with libm to resolve them. */ #undef LIBGCC_SPEC #define LIBGCC_SPEC \ - SUBTARGET_DONT_WARN_UNUSED_SPEC " -lgcc " SUBTARGET_WARN_UNUSED_SPEC + SUBTARGET_DONT_WARN_UNUSED_SPEC " -lgcc -lm " SUBTARGET_WARN_UNUSED_SPEC #undef ENDFILE_SPEC #define ENDFILE_SPEC \ ==== //depot/projects/delphij_fork/contrib/gcc/config/rs6000/predicates.md#2 (text+ko) ==== @@ -694,7 +694,9 @@ (define_predicate "current_file_function_operand" (and (match_code "symbol_ref") (match_test "(DEFAULT_ABI != ABI_AIX || SYMBOL_REF_FUNCTION_P (op)) - && (SYMBOL_REF_LOCAL_P (op) + && ((SYMBOL_REF_LOCAL_P (op) + && (DEFAULT_ABI != ABI_AIX + || !SYMBOL_REF_EXTERNAL_P (op))) || (op == XEXP (DECL_RTL (current_function_decl), 0)))"))) ==== //depot/projects/delphij_fork/contrib/gcc/config/rs6000/rs6000.c#2 (text+ko) ==== @@ -13515,7 +13515,8 @@ } } if (DEFAULT_ABI == ABI_DARWIN - || (*targetm.binds_local_p) (decl)) + || ((*targetm.binds_local_p) (decl) + && (DEFAULT_ABI != ABI_AIX || !DECL_EXTERNAL (decl)))) { tree attr_list = TYPE_ATTRIBUTES (TREE_TYPE (decl)); ==== //depot/projects/delphij_fork/contrib/gcc/config/soft-fp/double.h#2 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Aug 15 15:46:07 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5893C16A41B; Wed, 15 Aug 2007 15:46: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 2BD7516A419 for ; Wed, 15 Aug 2007 15:46:07 +0000 (UTC) (envelope-from karma@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 14F1013C48E for ; Wed, 15 Aug 2007 15:46:07 +0000 (UTC) (envelope-from karma@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 l7FFk7m8000792 for ; Wed, 15 Aug 2007 15:46:07 GMT (envelope-from karma@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7FFk62i000789 for perforce@freebsd.org; Wed, 15 Aug 2007 15:46:06 GMT (envelope-from karma@FreeBSD.org) Date: Wed, 15 Aug 2007 15:46:06 GMT Message-Id: <200708151546.l7FFk62i000789@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to karma@FreeBSD.org using -f From: Alexey Mikhailov To: Perforce Change Reviews Cc: Subject: PERFORCE change 125177 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, 15 Aug 2007 15:46:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=125177 Change 125177 by karma@karma_ez on 2007/08/15 15:45:20 Continue merging of new code in. In this serie, you'll see: - Basic client SSL stuff - Get rid of warnings, now it compiles clean with -pedantic and -Wall - Code is more readable now - Fixed some stupidness from last commit Affected files ... .. //depot/projects/soc2007/karma_audit/dlog/config.h#6 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/build#1 add .. //depot/projects/soc2007/karma_audit/dlog/daemon/client.c#5 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/client.h#3 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/config.c#5 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/config.h#5 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/config_client.y#2 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/config_server.y#2 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/dlogd.c#2 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/server.c#5 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/server.h#3 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/util.c#3 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/util.h#3 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/worker.c#2 edit .. //depot/projects/soc2007/karma_audit/dlog/daemon/worker.h#2 edit Differences ... ==== //depot/projects/soc2007/karma_audit/dlog/config.h#6 (text+ko) ==== @@ -1,5 +1,5 @@ -#ifndef DLOG_CONFIG_H -#define DLOG_CONFIG_H +#ifndef _CONFIG_H +#define _CONFIG_H #define DL_SOCKET "/tmp/dlogd.socket" #define DL_SOCKET_DIR "/tmp/" ==== //depot/projects/soc2007/karma_audit/dlog/daemon/client.c#5 (text+ko) ==== @@ -1,8 +1,13 @@ #include "../config.h" +#include "config.h" +#include "util.h" #include +#include #include +#include #include #include +#include #include #include #include @@ -10,7 +15,7 @@ extern int errno; -void +void * client_main() { int s, cs, opt = 1; @@ -54,13 +59,13 @@ s = socket(PF_LOCAL, SOCK_STREAM, 0); if (s < 0) { - err_fatal("can't create PF_LOCAL socket"); + err_fatal("client: can't create PF_LOCAL socket"); } unlink(DL_SOCKET); if ((setsockopt(s, 0, LOCAL_CREDS, &opt, sizeof(opt))) < 0) { - err_fatal("can't receive credentials from PF_LOCAL socket"); + err_fatal("client: can't receive credentials from PF_LOCAL socket"); } bzero(&n, sizeof(n)); @@ -68,11 +73,11 @@ strcpy(n.sun_path, DL_SOCKET); if ((bind(s, (struct sockaddr *) &n, SUN_LEN (&n))) < 0) { - err_fatal("can't bind PF_LOCAL socket. Another instance is running?"); + err_fatal("client: can't bind PF_LOCAL socket. Another instance is running?"); } if (listen(s, QLEN) < 0) { - err_fatal("cat't listen() on PF_LOCAL socket."); + err_fatal("client: cat't listen() on PF_LOCAL socket."); } while ((cs = accept(s, (struct sockaddr *) NULL, NULL)) >= 0) { @@ -81,7 +86,7 @@ /* TODO: could go bad here.. fix later.. */ if ((sscanf(buf, "%s\n%s", pathname, keyword)) < 2) { - printf("ouch!"); + /* TODO: wrong query */ } @@ -95,23 +100,26 @@ #ifdef DEBUG printf("UID %d, GID %d\n", cr.uc.sc_uid, cr.uc.sc_gid); #endif - if ((verify_client_access(cr.uc.sc_uid, cr.uc.sc_gid)) == 0) { + if ((verify_client_access(keyword, cr.uc.sc_uid, cr.uc.sc_gid)) == 0) { /* TODO: add logfile to spool here */ /* TODO: umask? */ snprintf(pathbuf, PATH_MAX, "%s/%s", SPOOL_DIR, keyword); - if (mkdir(pathbuf, "0700") == -1 && errno != EEXIST) { - fprintf(stderr, "can't create spool dir for keyword"); + if (mkdir(pathbuf, 0700) == -1 && errno != EEXIST) { + err_fatal("client: can't create spool dir for keyword"); } else { +#if 0 snprintf(pathbuf, PATH_MAX, "%s/%ld.%s"); +#endif } } } else { /* TODO: can't check permissions. wrong query */ - fprintf(stderr,"can't check permissions"); + fprintf(stderr,"client: can't check permissions"); } close(cs); } + return 0; } ==== //depot/projects/soc2007/karma_audit/dlog/daemon/client.h#3 (text+ko) ==== @@ -1,6 +1,6 @@ #ifndef DLOG_CLIENT_H #define DLOG_CLIENT_H -void client_main(); +void * client_main(); #endif ==== //depot/projects/soc2007/karma_audit/dlog/daemon/config.c#5 (text+ko) ==== @@ -7,11 +7,47 @@ #include #include #include +#include +#include #include #include #include #include +typedef struct client_kw_access { + int id; + uid_t uid; + gid_t gid; + struct client_kw_access * next; +} cl_kw_access; + +typedef struct host_ll { + struct sockaddr s; + struct host_ll *next; +} host_ll; + +typedef struct client_kw_host { + char *host; + host_ll *hs; + struct client_kw_host * next; +} cl_kw_hosts; + +typedef struct server_kw_host { + char *host; + host_ll *hs; + char *dir; + struct server_kw_host * next; +} sv_kw_hostdir; + +typedef struct keyword_cli_data { + cl_kw_access *access; + cl_kw_hosts *hosts; +} cl_kw_data; + +typedef struct keyword_srv_data { + sv_kw_hostdir *hds; +} sv_kw_data; + cl_kw_access * cka = NULL; cl_kw_access * pcka = NULL; cl_kw_hosts * ckh = NULL; @@ -24,6 +60,8 @@ extern int errno; extern FILE * yyin; +int yyparse (void); + #if 0 int main (int argc, char **argv) @@ -44,15 +82,13 @@ yyin = fopen("client.conf", "r"); - if (yyin == NULL) - { + if (yyin == NULL) { err_fatal("cannot open client configuration file"); } error = yyparse(); - if (error) - { + if (error) { err_fatal("cannot parse client configuration file"); } } @@ -102,6 +138,9 @@ int add_client_kw_access (char * id, char * val) { + struct passwd * psw; + struct group * grp; + if (cka == NULL) { cka = xmalloc(sizeof(cl_kw_access)); @@ -123,7 +162,7 @@ err_fatal("wrong UID."); } - struct passwd * psw = getpwuid(pcka -> uid); + psw = getpwuid(pcka -> uid); if (psw == NULL) { @@ -141,9 +180,9 @@ err_fatal("wrong gid"); } - struct group * grp = getgrgid (pcka -> gid); + grp = getgrgid (pcka -> gid); - if (grp = NULL) + if (grp == NULL) { err_fatal("getgrgid() failed. Probably wrong GID."); } @@ -155,7 +194,7 @@ { pcka -> id = 1; - struct passwd * psw = getpwnam(val); + psw = getpwnam(val); if (psw == NULL) { err_fatal("getpwnam() failed. Probably wrong username."); @@ -168,7 +207,7 @@ if (strcmp(id, "group") == 0) { pcka -> id = 2; - struct group * grp = getgrnam(val); + grp = getgrnam(val); if (grp == NULL) { err_fatal("getgrnam() failed. Probably wrong groupname."); ==== //depot/projects/soc2007/karma_audit/dlog/daemon/config.h#5 (text+ko) ==== @@ -4,41 +4,6 @@ #include #include -typedef struct client_kw_access { - int id; - uid_t uid; - gid_t gid; - struct client_kw_access * next; -} cl_kw_access; - -typedef struct host_ll { - struct sockaddr s; - struct host_ll *next; -} host_ll; - -typedef struct client_kw_host { - char *host; - host_ll *hs; - struct client_kw_host * next; -} cl_kw_hosts; - -typedef struct server_kw_host { - char *host; - host_ll *hs; - char *dir; - struct server_kw_host * next; -} sv_kw_hostdir; - -typedef struct keyword_cli_data { - cl_kw_access *access; - cl_kw_hosts *hosts; -} cl_kw_data; - -typedef struct keyword_srv_data { - sv_kw_hostdir *hds; -} sv_kw_data; - - TTree * client_kw_tree; TTree * server_kw_tree; TTree * client_host_tree; @@ -54,6 +19,9 @@ void parse_client_config(); void parse_server_config(); +int add_client_host(char * host); +int add_server_host(char * host); + int verify_client_access (const char * keyword, uid_t uid, gid_t gid); char * verify_server_access (struct sockaddr * sa, const char * keyword); #endif ==== //depot/projects/soc2007/karma_audit/dlog/daemon/config_client.y#2 (text+ko) ==== @@ -1,6 +1,10 @@ //%start commands %{ #include +#include "config.h" + +void yyerror(const char *); +int yylex(void); %} %union { ==== //depot/projects/soc2007/karma_audit/dlog/daemon/config_server.y#2 (text+ko) ==== @@ -1,6 +1,10 @@ //%start commands %{ #include +#include "config.h" + +void yyerror(const char *); +int yylex(void); %} %union { ==== //depot/projects/soc2007/karma_audit/dlog/daemon/dlogd.c#2 (text+ko) ==== @@ -1,0 +1,79 @@ +#include "config.h" +#include "ttree.h" +#include "util.h" +#include "client.h" +#include "server.h" +#include "worker.h" + +#include +#include + +extern int optind; + +int +main (int argc, char **argv) +{ + int ch,cli=0,srv=0,err; + pthread_t tid1=0, tid2=0, tid3=0; + void *tret; + + while ((ch = getopt(argc, argv, "cs")) != -1) + { + switch (ch) { + case 'c': + client_kw_tree = allocate_ttree(); + client_host_tree = allocate_ttree(); + parse_client_config(); + cli = 1; + break; + case 's': + server_kw_tree = allocate_ttree(); + server_host_tree = allocate_ttree(); + parse_server_config(); + srv = 1; + break; + default: + err_fatal("unknown argument"); + } + + } + argc -= optind; + argv += optind; + + if (cli == 0 && srv == 0) + err_fatal("nothing to do"); + + if (cli) + { + err = pthread_create(&tid1, NULL, client_main, NULL); + if (err != 0) + { + err_fatal("can't create client thread"); + } + err = pthread_create(&tid3, NULL, worker_main, NULL); + if (err != 0) + { + err_fatal("can't create worker thread"); + } + } + + if (srv) + { + err = pthread_create(&tid2, NULL, server_main, NULL); + if (err != 0) + { + err_fatal("can't create server thread"); + } + } + + if (tid1 != 0) + { + err = pthread_join(tid1, &tret); + } + else + { + err = pthread_join(tid2, &tret); + } + + return 0; +} ==== //depot/projects/soc2007/karma_audit/dlog/daemon/server.c#5 (text+ko) ==== @@ -1,9 +1,14 @@ #include "../config.h" +#include "config.h" +#include "util.h" #include #include #include #include #include +#include +#include +#include #include #include #include @@ -14,7 +19,8 @@ static void serve_conn(int, struct sockaddr *); static int myssl_accept(int, SSL*); -void +/* Thread entry point */ +void * server_main() { #if 0 @@ -122,9 +128,8 @@ /* Go loop */ for (;;) { clifd = accept(sockfd, (struct sockaddr *)&sockaddr_cli, &l); - if (clifd < 0) - { - if (errno = EINTR) + if (clifd < 0) { + if (errno == EINTR) continue; err_fatal("accept()"); } @@ -133,6 +138,7 @@ } } +/* Server connection from sacli at clifd */ static void serve_conn (int clifd, struct sockaddr *sacli) { @@ -141,9 +147,7 @@ char buf[KEYWORD_MAX+FILENAME_MAX+2]; char filename[FILENAME_MAX+1]; char keyword[KEYWORD_MAX+1]; -#ifdef DEBUG - printf("got connection from %lx\n", ((struct sockaddr_in *)sacli)->sin_addr.s_addr); -#endif + if (myssl_accept(clifd, ssl) != 0) { fprintf(stderr, "Failed SSL negotitation\n"); return; @@ -166,27 +170,34 @@ /* TODO: Could go bad here? */ e = sscanf(buf, "%s\n%s", keyword, filename); + /* TODO: Verify access + receive file */ + if (verify_server_access(sacli, keyword)) + { + + } + #ifdef DEBUG printf("received keyword %s with filename %s", keyword, filename); #endif } +/* Try to perform SSL handshake at clifd */ static int myssl_accept (int clifd, SSL *ssl) { if ((ssl = SSL_new(sslContext)) == NULL) { - fprintf(stderr, "SSL_new(): %s\n", ERR_error_string(ERR_get_error(), NULL)); + fprintf(stderr, "server: SSL_new(): %s\n", ERR_error_string(ERR_get_error(), NULL)); return -1; } SSL_set_fd(ssl, clifd); if (SSL_accept(ssl) <= 0) { - fprintf(stderr, "SSL_accept(): %s\n", ERR_error_string(ERR_get_error(), NULL)); + fprintf(stderr, "server: SSL_accept(): %s\n", ERR_error_string(ERR_get_error(), NULL)); return -1; } #ifdef DEBUG - fprintf(stderr, "SSL_get_cipher(): %s\n", SSL_get_cipher(ssl)); + fprintf(stderr, "server: SSL_get_cipher(): %s\n", SSL_get_cipher(ssl)); #endif return 0; } ==== //depot/projects/soc2007/karma_audit/dlog/daemon/server.h#3 (text+ko) ==== @@ -1,6 +1,6 @@ #ifndef DLOG_SERVER_H #define DLOG_SERVER_H -void server_main(); +void * server_main(); #endif ==== //depot/projects/soc2007/karma_audit/dlog/daemon/util.c#3 (text+ko) ==== @@ -1,5 +1,6 @@ #include #include +#include #include "util.h" @@ -15,13 +16,15 @@ return p; } -void +/* Fatal error */ +inline void err_fatal (const char * msg) { fprintf(stderr, "Fatal error: %s\n", msg); exit(1); } +/* Check for "bad" chars in received message ie more than one '\n' or '/' */ int search_bad_chars (const char * msg) { ==== //depot/projects/soc2007/karma_audit/dlog/daemon/util.h#3 (text+ko) ==== @@ -1,9 +1,11 @@ #ifndef _UTIL_H #define _UTIL_H +#include /* Wrapper for malloc() */ void * xmalloc (size_t size); void err_fatal (const char * msg); +int search_bad_chars (const char * msg); #endif ==== //depot/projects/soc2007/karma_audit/dlog/daemon/worker.c#2 (text+ko) ==== @@ -1,19 +1,110 @@ #include "../config.h" +#include "util.h" #include +#include +#include +#include +#include +#include +#include +#include +#include +#include static sigset_t mask; +static SSL_CTX *sslContext=NULL; -void +/* Go through spool and perform pending tasks */ +static void go_queue() { + +} + +/* Perform sending log file out */ +static int +ssl_sendfile (const char * pathname, const char * keyword, struct sockaddr * to) +{ + int sock, r, ans; + SSL* ssl; + X509* cert; + char buf[FILENAME_MAX + KEYWORD_MAX + 2]; + sock = socket (AF_INET, SOCK_STREAM, 0); + + if (sock < 0) + err_fatal("worker: socket()"); + + r = connect(sock, to, sizeof(*to)); + + if (r < 0) { + fprintf(stderr,"worker: connect()"); + return 1; + } + + /* SSL handshake */ + ssl = SSL_new(sslContext); + SSL_set_fd (ssl, sock); + +#ifdef DEBUG + fprintf(stderr, "worker: cipher %s", SSL_get_cipher(ssl)); +#endif + + /* Catch server's certificate */ + cert = SSL_get_peer_certificate (ssl); + + if (cert == NULL) { + fprintf(stderr, "worker: can't get server's certificate"); + SSL_shutdown(ssl); + close(sock); + return 1; + } + + /* TODO: certificate validation goes here. Think of having TA in config */ + + /* Don't need certificate anymore */ + X509_free(cert); + + /* Send filename\keyword */ + snprintf(buf, sizeof(buf),"%s\n%s", keyword, basename(pathname)); + + r = SSL_write (ssl, buf, strlen(buf)); + if (r < 0) { + fprintf(stderr, "worker: SSL_write()"); + SSL_shutdown(ssl); + close(sock); + return 1; + } + + r = SSL_read (ssl, &ans, sizeof(ans)); + if (r < 0) { + fprintf(stderr, "worker: SSL_read()"); + SSL_shutdown(ssl); + close(sock); + return 1; + } + + if (ans < 0) { + fprintf(stderr, "worker: server returned %d", ans); + SSL_shutdown(ssl); + close(sock); + return 1; + } + + /* TODO: OK, sending flle goes here */ + return 0; } -void +void * worker_main() { - int signo, r; + int signo; sigset_t oldmask; + + SSL_load_error_strings(); + SSLeay_add_ssl_algorithms(); + sslContext = SSL_CTX_new(SSLv23_client_method()); + sigemptyset(&mask); sigaddset(&mask, SIGALRM); if (pthread_sigmask(SIG_BLOCK, &mask, &oldmask) < 0) ==== //depot/projects/soc2007/karma_audit/dlog/daemon/worker.h#2 (text+ko) ==== @@ -1,0 +1,6 @@ +#ifndef DLOG_WORKER_H +#define DLOG_WORKER_H + +void * worker_main(); + +#endif From owner-p4-projects@FreeBSD.ORG Wed Aug 15 15:50:19 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 295C816A421; Wed, 15 Aug 2007 15: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 8E4B416A419 for ; Wed, 15 Aug 2007 15:50:18 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outL.internet-mail-service.net (outL.internet-mail-service.net [216.240.47.235]) by mx1.freebsd.org (Postfix) with ESMTP id 69A9413C481 for ; Wed, 15 Aug 2007 15:50:18 +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; Wed, 15 Aug 2007 08:50:17 -0700 Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id DD406125FA5; Wed, 15 Aug 2007 08:50:07 -0700 (PDT) Message-ID: <46C320B4.7070008@elischer.org> Date: Wed, 15 Aug 2007 08:50:12 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Marko Zec References: <200708151129.l7FBTiaU005370@repoman.freebsd.org> In-Reply-To: <200708151129.l7FBTiaU005370@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 125169 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, 15 Aug 2007 15:50:19 -0000 Marko Zec wrote: > http://perforce.freebsd.org/chv.cgi?CH=125169 > > Change 125169 by zec@zec_tpx32 on 2007/08/15 11:28:57 > > Defer dispatching of netisr handlers for mbufs which have > crossed a boundary between two vnets. Direct dispatching > in such cases could lead to various LORs, or in most > extreme circumstances cause the kernel stack to overflow. > > This is accomplished by the introduction of a new mbuf > flag, M_REMOTE_VNET, which must be set by any kernel entity > moving a mbuf from one vnet context to another. So far > only ng_eiface and ng_wormhole can operate across a > boundary between vnets, so update those two accordingly. > The flag is then evaluated in netisr_dispatch(), and if > set, the mbuf is queued for later processing instead of > direct dispatching of netisr handler. > Is it not possible for unix domain sockets to do so if the file descriptor as an a part of the filesystem that is shared? I hope soon (within a year) to have several vimages from a networking perspective but with a common filesystem root. the processes will communicate between themselves using Unix domain sockets. (That's what they currently do but I want to make them have separate routing tables etc. > Affected files ... > > .. //depot/projects/vimage/src/sys/net/netisr.c#6 edit > .. //depot/projects/vimage/src/sys/netgraph/ng_eiface.c#7 edit > .. //depot/projects/vimage/src/sys/netgraph/ng_wormhole.c#2 edit > .. //depot/projects/vimage/src/sys/sys/mbuf.h#6 edit > > Differences ... > > ==== //depot/projects/vimage/src/sys/net/netisr.c#6 (text+ko) ==== > > @@ -178,8 +178,19 @@ > * from an interface but does not guarantee ordering > * between multiple places in the system (e.g. IP > * dispatched from interfaces vs. IP queued from IPSec). > + * > + * If the kernel was compiled with options VIMAGE, also defer > + * dispatch of netisr handlers for mbufs that have crossed a > + * boundary between two vnets. Direct dispatching in such > + * cases could lead to various LORs, or in most extreme > + * circumstances cause the kernel stack to overflow. > */ > +#ifndef VIMAGE > if (netisr_direct && (ni->ni_flags & NETISR_MPSAFE)) { > +#else > + if (netisr_direct && (ni->ni_flags & NETISR_MPSAFE) && > + !(m->m_flags & M_REMOTE_VNET)) { > +#endif > isrstat.isrs_directed++; > /* > * NB: We used to drain the queue before handling > > ==== //depot/projects/vimage/src/sys/netgraph/ng_eiface.c#7 (text+ko) ==== > > @@ -253,6 +253,12 @@ > continue; > } > > +#ifdef VIMAGE > + /* Mark up the mbuf if crossing vnet boundary */ > + if (ifp->if_vnet != node->nd_vnet) > + m->m_flags |= M_REMOTE_VNET; > +#endif > + > /* > * Send packet; if hook is not connected, mbuf will get > * freed. > @@ -542,6 +548,12 @@ > /* Update interface stats */ > ifp->if_ipackets++; > > +#ifdef VIMAGE > + /* Mark up the mbuf if crossing vnet boundary */ > + if (ifp->if_vnet != hook->hk_node->nd_vnet) > + m->m_flags |= M_REMOTE_VNET; > +#endif > + > (*ifp->if_input)(ifp, m); > > /* Done */ > > ==== //depot/projects/vimage/src/sys/netgraph/ng_wormhole.c#2 (text+ko) ==== > > @@ -378,11 +378,14 @@ > priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); > int error = 0; > priv_p remote_priv = priv->remote_priv; > + struct mbuf *m; > > if (priv->status != NG_WORMHOLE_ACTIVE) { > NG_FREE_ITEM(item); > error = ENOTCONN; > } else { > + m = NGI_M(item); > + m->m_flags |= M_REMOTE_VNET; > CURVNET_SET_QUIET(remote_priv->vnet); > NG_FWD_ITEM_HOOK(error, item, remote_priv->hook); > CURVNET_RESTORE(); > > ==== //depot/projects/vimage/src/sys/sys/mbuf.h#6 (text+ko) ==== > > @@ -192,6 +192,7 @@ > #define M_LASTFRAG 0x2000 /* packet is last fragment */ > #define M_VLANTAG 0x10000 /* ether_vtag is valid */ > #define M_PROMISC 0x20000 /* packet was not for us */ > +#define M_REMOTE_VNET 0x40000 /* mbuf crossed boundary between two vnets */ > > /* > * External buffer types: identify ext_buf type. > @@ -214,7 +215,7 @@ > #define M_COPYFLAGS (M_PKTHDR|M_EOR|M_RDONLY|M_PROTO1|M_PROTO1|M_PROTO2|\ > M_PROTO3|M_PROTO4|M_PROTO5|M_SKIP_FIREWALL|\ > M_BCAST|M_MCAST|M_FRAG|M_FIRSTFRAG|M_LASTFRAG|\ > - M_VLANTAG|M_PROMISC) > + M_VLANTAG|M_PROMISC|M_REMOTE_VNET) > > /* > * Flags to purge when crossing layers. From owner-p4-projects@FreeBSD.ORG Wed Aug 15 16:07:34 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6C35016A420; Wed, 15 Aug 2007 16:07:34 +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 17A6916A41B for ; Wed, 15 Aug 2007 16:07:34 +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 023B113C457 for ; Wed, 15 Aug 2007 16:07:34 +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 l7FG7XRw004863 for ; Wed, 15 Aug 2007 16:07:33 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7FG7Xwp004860 for perforce@freebsd.org; Wed, 15 Aug 2007 16:07:33 GMT (envelope-from gonzo@FreeBSD.org) Date: Wed, 15 Aug 2007 16:07:33 GMT Message-Id: <200708151607.l7FG7Xwp004860@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 125178 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, 15 Aug 2007 16:07:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=125178 Change 125178 by gonzo@gonzo_jeeves on 2007/08/15 16:07:11 o Fix stupid bug in DO_AST. td_flags value was extracted using td->td_frame address not td itself. Affected files ... .. //depot/projects/mips2/src/sys/mips/include/asm.h#13 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/include/asm.h#13 (text+ko) ==== @@ -249,15 +249,15 @@ #define DO_AST \ lw k1, pcpup; \ lw k1, PC_CURTHREAD(k1); \ + lw t0, TD_FLAGS(k1); \ + and t0, t0, (TDF_ASTPENDING|TDF_NEEDRESCHED); \ + beq t0, zero, 27f; \ + nop; \ lw k1, TD_FRAME(k1); \ lw t0, TF_REG_SR(k1); \ and t0, t0, MIPS_SR_KSU_USER; \ beq t0, zero, 27f; \ nop; \ - lw t0, TD_FLAGS(k1); \ - and t0, t0, (TDF_ASTPENDING|TDF_NEEDRESCHED); \ - beq t0, zero, 27f; \ - nop; \ move a0, k1; \ jal ast; \ nop; \ From owner-p4-projects@FreeBSD.ORG Wed Aug 15 16:18:51 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1640316A418; Wed, 15 Aug 2007 16:18:50 +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 7B01A16A420 for ; Wed, 15 Aug 2007 16:18:50 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6484813C469 for ; Wed, 15 Aug 2007 16:18:50 +0000 (UTC) (envelope-from thioretic@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 l7FGIoUJ005510 for ; Wed, 15 Aug 2007 16:18:50 GMT (envelope-from thioretic@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7FGIoXS005507 for perforce@freebsd.org; Wed, 15 Aug 2007 16:18:50 GMT (envelope-from thioretic@FreeBSD.org) Date: Wed, 15 Aug 2007 16:18:50 GMT Message-Id: <200708151618.l7FGIoXS005507@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thioretic@FreeBSD.org using -f From: Maxim Zhuravlev To: Perforce Change Reviews Cc: Subject: PERFORCE change 125180 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, 15 Aug 2007 16:18:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=125180 Change 125180 by thioretic@thioretic on 2007/08/15 16:17:50 Some more io stuff. Affected files ... .. //depot/projects/soc2007/thioretic_gidl2/kern/subr_busio.c#4 edit .. //depot/projects/soc2007/thioretic_gidl2/sys/bus.h#4 edit Differences ... ==== //depot/projects/soc2007/thioretic_gidl2/kern/subr_busio.c#4 (text+ko) ==== @@ -7,6 +7,9 @@ #include #include #include +#include +#include +#include static MALLOC_DEFINE(M_BUS_IO, "bus_io", "Bus io subsystem data structures"); @@ -23,6 +26,8 @@ static struct mtx work_kthreads_list_mtx; +int work_kthreads_to_wait_on; + struct ior { #define OPEN 1 #define FDOPEN 2 @@ -39,17 +44,21 @@ #define SPARE2 13 u_int32_t type; void* data; -#define IORS_DONE 1<<0 -#define IORS_INVALIDATE 1<<1 -#define IORS_RETRY 1<<2 +#define IORS_NONE 0 +#define IORS_ENQUEUED 1<<0 +#define IORS_OWNED 1<<1 u_int32_t state; +#define IORF_DONE 1<<0 +#define IORF_INVALIDATE 1<<1 +#define IORF_RETRY 1<<2 u_int32_t flags; ior_link_list_t parents; - ior_link_list_t children; + /*ior_link_list_t*/ int children; device_t origin; devicelink_list_t path; + int queue_id; - struct mtx guard_mtx; + struct mtx guard_spin_mtx; TAILQ_ENTRY (ior) link; }; @@ -63,7 +72,16 @@ typedef TAILQ_HEAD(ior_link_list, ior_link) ior_link_list_t; typedef TAILQ_HEAD(ior_list, ior) ior_list_t; -static ior_list_t iors = TAILQ_HEAD_INITIALIZER(iors); + +struct ior_queue { + ior_list_t iors; + ior_t todo; + int flags; + + struct mtx guard_spin_mtx; +}; + +static ior_queue ior_queues[IOR_QUEUES_NUM]; static struct mtx iors_list_mtx; @@ -86,6 +104,7 @@ work_kthread_proc (void *arg){ static work_kthread_t my_pwk = ((work_kthread_t)arg); struct thread *tp = FIRST_THREAD_IN_PROC(my_pwk->kthread); + int towait; mtx_lock_spin (&sched_lock); sched_prio (tp, ); /*TODO*/ @@ -100,7 +119,9 @@ kthread_exit (0); return (); } - bus_io_process_next_irp (my_pwk); + if (towait = bus_io_process_next_ior (my_pwk)) + tsleep (&work_kthreads_to_wait_on, + , "no ior", 0); /*TODO*/ } } @@ -167,19 +188,60 @@ void bus_io_init (void){ + int i = 0; + mtx_init (&iors_list_mtx, "bus_io_iors_list_mtx", NULL, MTX_DEF); + + for (i = 0; i < IOR_QUEUES_NUM; i++){ + ior_queues[i]->iors = TAILQ_HEAD_INITIALIZER(ior_queues[i]->iors); + mtx_init (&ior_queues[i]->guard_spin_mtx, + "ior_queue_mtx", + NULL, MTX_SPIN); + } + reset_work_kthreads(); } -static void +static int bus_io_process_next_ior (work_kthread_t wkt){ + int qid = 0; + ior_queue q; + ior_t r; + +retry: + for (qid; qid < IOR_QUEUES_NUM; qid++){ + q = ior_queues[qid]; + if (r = q.todo) + break; + } + if (qid = IOR_QUEUES_NUM) + return (1); + + ior_lock (r); + mtx_lock_spin(&q.guard_spin_mtx); + + if (r->state != IORS_ENQUEUED){ + mtx_unlock_spin (&q.guard_spin_mtx); + ior_unlock (r); + goto retry; + } + + q.todo = TAILQ_NEXT(r, link); + mtx_unlock_spin (&q.guard_spin_mtx); + + r->state = IORS_OWNED; + ior_unlock (r); + + //deliver ior to first in path driver + + return (0); } ior_t create_ior (device_t origin, int type, void* data, - ior_t* parents, int pcount, char* path){ + ior_t* parents, int pcount, char* path, int enqueue){ ior_t new_ior; ior_link_t il, il2, cil, *ils; int i = 0, error = 0, path_len; @@ -190,23 +252,21 @@ if (!new_ior) return (NULL); - ils = malloc (sizeof(struct ior_link) * pcount * 2, M_BUS_IO, + ils = malloc (sizeof(struct ior_link) * pcount /* * 2*/, M_BUS_IO, //REMOVE COMMENTS on type(ior->children) == ior_link_list_t M_NOWAIT|M_ZERO); if (!ils){ free (new_ior); return (NULL); } - mtx_init (&new_ior->guard_mtx, - "ior_mtx", NULL, MTX_DEF); + mtx_init (&new_ior->guard_spin_mtx, + "ior_mtx", NULL, MTX_SPIN); if (error = ior_set_path (new_ior, origin, path)){ free (new_ior); free (ils); return (NULL); } -// mtx_lock (&new_ior->guard_mtx); - new_ior->type = type; new_ior->data = data; for (i = 0; i < pcount; i++){ @@ -214,13 +274,17 @@ il->iorp = parents[i]; TAILQ_INSERT_TAIL (&new_ior->parents, il, link); - il = ils++; + parents[i]->children++; +/* il = ils++; il->iorp = new_ior; TAILQ_INSERT_TAIL (&(parents[i])->children, il, link); +*/ //REMOVE COMMENTS on type(ior->children) == ior_link_list_t } new_ior->origin = origin; -// mtx_unlock (&new_ior->guard_mtx); + if (enqueue){ + ior_enqueue (new_ior); + } return (new_ior); @@ -237,7 +301,7 @@ } void -ior_get_flags (ior_t r, u_int32_t val){ +ior_set_flags (ior_t r, u_int32_t val){ r->flags = val; } @@ -263,7 +327,7 @@ return (ENOMEM); } - mtx_lock (&r->guard_mtx); + mtx_lock_spin (&r->guard_spin_mtx); for (i = 0; i < path_len; i++){ dl->device_ptr = dev_path[i]; @@ -271,7 +335,7 @@ dl++; } - mtx_unlock (&r->guard_mtx); + mtx_unlock_spin (&r->guard_spin_mtx); free (dev_path); return (0); @@ -303,4 +367,78 @@ mtx_unlock (&r->path); return (0); -}+} + +static void //static for now +ior_enqueue_adv (ior_t r, int queue_id){ + ior_queue q = ior_queues[queue_id]; + + ior_lock (r); + + if (r->state >= IORS_ENQUEUED){ + ior_unlock (r); + return (); + } + + mtx_lock_spin (&q.guard_spin_mtx); + + TAILQ_INSERT_TAIL (&q.iors, r, link); + if (q.todo == NULL) + q.todo = r; + + mtx_unlock_spin (&q.guard_spin_mtx); + + r->queue_id = queue_id; + r->state = IORS_ENQUEUED; + + ior_unlock (r); + + wakeup_one (&work_kthreads_to_wait_on); +} + +void +ior_enqueue (ior_t r) { + return (ior_enqueue_adv (r, IOR_QUEUE_DEF)); +} + +static int +ior_dequeue_adv (ior_t r, int queue_id){ + int error = 0; + ior_queue q = ior_queues[queue_id]; + + ior_lock (r); + + if (r->state == IORS_NONE || r->children){ + ior_unlock (r); + return (1); + } + + mtx_lock_spin (&q.guard_spin_mtx); + + if (q.todo == r) + q.todo = TAILQ_NEXT (r, link); + TAILQ_REMOVE (&q.iors, r, link); + + mtx_unlock_spin (&q.quard_spin_mtx); + + r->state = IORS_NONE; + + ior_unlock (r); + + return (error); +} + +int +ior_dequeue (ior_t r) { + return (ior_dequeue_adv (r, r->queue_id)); +} + +void +ior_lock (ior_t r){ + mtx_lock_spin (&r->guard_spin_mtx); +} + +void +ior_unlock (ior_t r){ + mtx_unlock_spin (&r->guard_spin_mtx); +} ==== //depot/projects/soc2007/thioretic_gidl2/sys/bus.h#4 (text+ko) ==== @@ -706,14 +706,22 @@ #define bus_write_region_stream_8(r, o, d, c) \ bus_space_write_region_stream_8(rman_get_bustag(r), rman_get_bushandle(r), (o), (d), (c)) +#define IOR_QUEUES_NUM 1 +#define IOR_QUEUE_DEF 0 + int resolve_path (device_t origin, char* path, device_t **dev_path, int *path_len); -ior_t create_ior (device_t origin, int type, void* data, ior_t* parents, int pcount, char* path) -void ior_set_state (ior_t r, u_int32_t val); -u_int32_t ior_get_state (ior_t r); -void ior_get_flags (ior_t r, u_int32_t val); -u_int32_t ior_get_flags (ior_t r); +ior_t create_ior (device_t origin, int type, void* data, ior_t* parents, int pcount, char* path) +void ior_set_state (ior_t r, u_int32_t val); +u_int32_t ior_get_state (ior_t r); +void ior_set_flags (ior_t r, u_int32_t val); +u_int32_t ior_get_flags (ior_t r); int ior_set_path (ior_t r, device_t origin, char* path); int ior_get_path (ior_t r, device_t **dev_path, int *path_len); +void ior_enqueue (ior_t r); +int ior_dequeue (ior_t r); +void ior_lock (ior_t r); +void ior_unlock (ior_t r); + #endif /* _KERNEL */ From owner-p4-projects@FreeBSD.ORG Wed Aug 15 17:41:34 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A175616A420; Wed, 15 Aug 2007 17:41:34 +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 7F17F16A41A for ; Wed, 15 Aug 2007 17:41:34 +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 6985713C45A for ; Wed, 15 Aug 2007 17:41:34 +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 l7FHfYKK020506 for ; Wed, 15 Aug 2007 17:41:34 GMT (envelope-from gabor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7FHfXo8020503 for perforce@freebsd.org; Wed, 15 Aug 2007 17:41:33 GMT (envelope-from gabor@freebsd.org) Date: Wed, 15 Aug 2007 17:41:33 GMT Message-Id: <200708151741.l7FHfXo8020503@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 125183 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, 15 Aug 2007 17:41:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=125183 Change 125183 by gabor@gabor_server on 2007/08/15 17:40:44 - Add some more docs - Note that the version requirement can be used with other knobs, as well Affected files ... .. //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#20 edit Differences ... ==== //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#20 (text+ko) ==== @@ -56,6 +56,22 @@ # # USE_PERL5_REASON= this module is already part of your Perl version # +# PERL_CONFIGURE - Configure using Perl's MakeMaker. Implies USE_PERL5. +# The version requirement can be specified here, +# as well. +# USE_PERL5_BUILD - If set, this port uses perl5 in one or more of the +# extract, patch, build or install phases. +# The version requirement can be specified here, +# as well. +# +# USE_PERL5_RUN - If set, this port uses perl5 for running. The +# version requirement can be specified here, +# as well. +# +# PERL_MODBUILD - Use Module::Build to configure, build and install +# port. The version requirement can be specified +# here, as well. +# # $FreeBSD$ # From owner-p4-projects@FreeBSD.ORG Wed Aug 15 17:50:47 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6E86516A46B; Wed, 15 Aug 2007 17:50: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 1F6B916A468 for ; Wed, 15 Aug 2007 17:50:47 +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 09CB213C45B for ; Wed, 15 Aug 2007 17:50:47 +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 l7FHokSS021118 for ; Wed, 15 Aug 2007 17:50:46 GMT (envelope-from gabor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7FHokIP021115 for perforce@freebsd.org; Wed, 15 Aug 2007 17:50:46 GMT (envelope-from gabor@freebsd.org) Date: Wed, 15 Aug 2007 17:50:46 GMT Message-Id: <200708151750.l7FHokIP021115@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 125185 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, 15 Aug 2007 17:50:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=125185 Change 125185 by gabor@gabor_server on 2007/08/15 17:50:32 - Whitespace - Comments to ease readability Affected files ... .. //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#21 edit Differences ... ==== //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#21 (text+ko) ==== @@ -79,7 +79,7 @@ PERL_Include_MAINTAINER= perl@FreeBSD.org -_PERLPREMKINCLUDED= yes +_PERLPREMKINCLUDED= yes PERL_VERSION?= 5.8.8 PERL_VER?= 5.8.8 @@ -104,7 +104,7 @@ .if ${PERL_LEVEL} >= 500800 PERL_PORT?= perl5.8 -.else +.else # ${PERL_LEVEL} < 500800 PERL_PORT?= perl5 .endif @@ -128,18 +128,18 @@ .if ${USE_PERL5_LEVEL} > ${PERL_LEVEL} USE_PERL5_REASON?= requires Perl ${__prefix} or later, install lang/perl5.8 and try again IGNORE= ${USE_PERL5_REASON} -.endif +.endif # ${USE_PERL5_LEVEL} > ${PERL_LEVEL} .elif ${__suffix} == "" .if ${USE_PERL5_LEVEL} != ${PERL_LEVEL} USE_PERL5_REASON?= requires Perl ${__prefix} exactly IGNORE= ${USE_PERL5_REASON} -.endif +.endif # ${USE_PERL5_LEVEL} != ${PERL_LEVEL} .elif ${__suffix} == "-" .if ${USE_PERL5_LEVEL} <= ${PERL_LEVEL} USE_PERL5_REASON?= requires a Perl version earlier than ${__prefix} IGNORE= ${USE_PERL5_REASON} -.endif -.else +.endif # ${USE_PERL5_LEVEL} <= ${PERL_LEVEL} +.else # wrong suffix .BEGIN: @${ECHO_MSG} "${PKGNAME}: Makefile error: inproper use of USE_PERL5" @${FALSE} @@ -182,7 +182,7 @@ install_path=bindoc="${MAN1PREFIX}/man/man1" .elif defined(PERL_CONFIGURE) CONFIGURE_ARGS+= INSTALLDIRS="site" -.endif +.endif # defined(PERL_MODBUILD) .if defined(PERL_CONFIGURE) USE_PERL5= ${PERL_CONFIGURE} @@ -227,7 +227,7 @@ .if defined(PERL_MODBUILD) .if !target(do-build) do-build: - @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${MAKE_ARGS} ${ALL_TARGET}) + @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${MAKE_ARGS} ${ALL_TARGET}) .endif # !target(do-build) .if !defined(USE_GMAKE) From owner-p4-projects@FreeBSD.ORG Wed Aug 15 18:45:09 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 88EDB16A421; Wed, 15 Aug 2007 18:45: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 42BD116A417 for ; Wed, 15 Aug 2007 18:45:09 +0000 (UTC) (envelope-from zec@icir.org) Received: from mail.srv.carnet.hr (unknown [IPv6:2001:b68:e160:0:211:43ff:fecd:6374]) by mx1.freebsd.org (Postfix) with ESMTP id A759C13C481 for ; Wed, 15 Aug 2007 18:45:07 +0000 (UTC) (envelope-from zec@icir.org) Received: from vipnet26-165.mobile.carnet.hr ([193.198.165.26]:58086) by mail.srv.carnet.hr with esmtp (Exim 4.50) id 1ILNrX-0001th-FV; Wed, 15 Aug 2007 20:45:03 +0200 From: Marko Zec To: Julian Elischer Date: Wed, 15 Aug 2007 20:44:38 +0200 User-Agent: KMail/1.9.4 References: <200708151129.l7FBTiaU005370@repoman.freebsd.org> <46C320B4.7070008@elischer.org> In-Reply-To: <46C320B4.7070008@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708152044.38580.zec@icir.org> X-SA-Exim-Connect-IP: 193.198.165.26 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-26) on nihal.carnet.hr X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=ham version=3.1.4 X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100) Cc: Perforce Change Reviews Subject: Re: PERFORCE change 125169 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, 15 Aug 2007 18:45:09 -0000 On Wednesday 15 August 2007 17:50, Julian Elischer wrote: > Marko Zec wrote: > > http://perforce.freebsd.org/chv.cgi?CH=125169 > > > > Change 125169 by zec@zec_tpx32 on 2007/08/15 11:28:57 > > > > Defer dispatching of netisr handlers for mbufs which have > > crossed a boundary between two vnets. Direct dispatching > > in such cases could lead to various LORs, or in most > > extreme circumstances cause the kernel stack to overflow. > > > > This is accomplished by the introduction of a new mbuf > > flag, M_REMOTE_VNET, which must be set by any kernel entity > > moving a mbuf from one vnet context to another. So far > > only ng_eiface and ng_wormhole can operate across a > > boundary between vnets, so update those two accordingly. > > The flag is then evaluated in netisr_dispatch(), and if > > set, the mbuf is queued for later processing instead of > > direct dispatching of netisr handler. > > Is it not possible for unix domain sockets to do so if the file > descriptor as an a part of the filesystem that is shared? As of now AF_LOCAL sockets in different vnets are hidden from each other using some existing jail magic infrastructure, so crossing a vnet boundary using AF_LOCAL sockets could be somewhat difficult now. However, in private communication several people have already expressed a wish to separate the AF_LOCAL virtualization from the rest of the networking subsystems, and I agree that this option should be provided soon, so this is in my todo pipeline. In any case, AF_LOCAL sockets are not affected by this change if that was a part of your question, i.e. all AF_LOCAL communication will still be direct dispatched in netisr_dispatch()... > I hope soon (within a year) to have several vimages from a > networking perspective but with a common filesystem root. > the processes will communicate between themselves using > Unix domain sockets. (That's what they currently do but I want to > make them have separate routing tables etc. Yes that's why we do need separate virtualization of AF_LOCAL and other protocol familes... Cheers, Marko > > Affected files ... > > > > .. //depot/projects/vimage/src/sys/net/netisr.c#6 edit > > .. //depot/projects/vimage/src/sys/netgraph/ng_eiface.c#7 edit > > .. //depot/projects/vimage/src/sys/netgraph/ng_wormhole.c#2 edit > > .. //depot/projects/vimage/src/sys/sys/mbuf.h#6 edit > > > > Differences ... > > > > ==== //depot/projects/vimage/src/sys/net/netisr.c#6 (text+ko) ==== > > > > @@ -178,8 +178,19 @@ > > * from an interface but does not guarantee ordering > > * between multiple places in the system (e.g. IP > > * dispatched from interfaces vs. IP queued from IPSec). > > + * > > + * If the kernel was compiled with options VIMAGE, also defer > > + * dispatch of netisr handlers for mbufs that have crossed a > > + * boundary between two vnets. Direct dispatching in such > > + * cases could lead to various LORs, or in most extreme > > + * circumstances cause the kernel stack to overflow. > > */ > > +#ifndef VIMAGE > > if (netisr_direct && (ni->ni_flags & NETISR_MPSAFE)) { > > +#else > > + if (netisr_direct && (ni->ni_flags & NETISR_MPSAFE) && > > + !(m->m_flags & M_REMOTE_VNET)) { > > +#endif > > isrstat.isrs_directed++; > > /* > > * NB: We used to drain the queue before handling > > > > ==== //depot/projects/vimage/src/sys/netgraph/ng_eiface.c#7 > > (text+ko) ==== > > > > @@ -253,6 +253,12 @@ > > continue; > > } > > > > +#ifdef VIMAGE > > + /* Mark up the mbuf if crossing vnet boundary */ > > + if (ifp->if_vnet != node->nd_vnet) > > + m->m_flags |= M_REMOTE_VNET; > > +#endif > > + > > /* > > * Send packet; if hook is not connected, mbuf will get > > * freed. > > @@ -542,6 +548,12 @@ > > /* Update interface stats */ > > ifp->if_ipackets++; > > > > +#ifdef VIMAGE > > + /* Mark up the mbuf if crossing vnet boundary */ > > + if (ifp->if_vnet != hook->hk_node->nd_vnet) > > + m->m_flags |= M_REMOTE_VNET; > > +#endif > > + > > (*ifp->if_input)(ifp, m); > > > > /* Done */ > > > > ==== //depot/projects/vimage/src/sys/netgraph/ng_wormhole.c#2 > > (text+ko) ==== > > > > @@ -378,11 +378,14 @@ > > priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); > > int error = 0; > > priv_p remote_priv = priv->remote_priv; > > + struct mbuf *m; > > > > if (priv->status != NG_WORMHOLE_ACTIVE) { > > NG_FREE_ITEM(item); > > error = ENOTCONN; > > } else { > > + m = NGI_M(item); > > + m->m_flags |= M_REMOTE_VNET; > > CURVNET_SET_QUIET(remote_priv->vnet); > > NG_FWD_ITEM_HOOK(error, item, remote_priv->hook); > > CURVNET_RESTORE(); > > > > ==== //depot/projects/vimage/src/sys/sys/mbuf.h#6 (text+ko) ==== > > > > @@ -192,6 +192,7 @@ > > #define M_LASTFRAG 0x2000 /* packet is last fragment */ > > #define M_VLANTAG 0x10000 /* ether_vtag is valid */ > > #define M_PROMISC 0x20000 /* packet was not for us */ > > +#define M_REMOTE_VNET 0x40000 /* mbuf crossed boundary between two > > vnets */ > > > > /* > > * External buffer types: identify ext_buf type. > > @@ -214,7 +215,7 @@ > > > > #define M_COPYFLAGS (M_PKTHDR|M_EOR|M_RDONLY|M_PROTO1|M_PROTO1|M_PR > >OTO2|\ M_PROTO3|M_PROTO4|M_PROTO5|M_SKIP_FIREWALL|\ > > M_BCAST|M_MCAST|M_FRAG|M_FIRSTFRAG|M_LASTFRAG|\ > > - M_VLANTAG|M_PROMISC) > > + M_VLANTAG|M_PROMISC|M_REMOTE_VNET) > > > > /* > > * Flags to purge when crossing layers. From owner-p4-projects@FreeBSD.ORG Thu Aug 16 03:40:32 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D6D0216A41A; Thu, 16 Aug 2007 03: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 4096916A417 for ; Thu, 16 Aug 2007 03:40:31 +0000 (UTC) (envelope-from gcooper@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 333A213C45B for ; Thu, 16 Aug 2007 03:40:31 +0000 (UTC) (envelope-from gcooper@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 l7G3eV2W089667 for ; Thu, 16 Aug 2007 03:40:31 GMT (envelope-from gcooper@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7G3eUFA089664 for perforce@freebsd.org; Thu, 16 Aug 2007 03:40:30 GMT (envelope-from gcooper@FreeBSD.org) Date: Thu, 16 Aug 2007 03:40:30 GMT Message-Id: <200708160340.l7G3eUFA089664@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gcooper@FreeBSD.org using -f From: Garrett Cooper To: Perforce Change Reviews Cc: Subject: PERFORCE change 125200 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, 16 Aug 2007 03:40:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=125200 Change 125200 by gcooper@optimus-revised_pkgtools on 2007/08/16 03:40:25 Move some of the libpkg contributed library files to a more local directory, and delete their subsequent copies from the svn trunk directory. Affected files ... .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/archive_read_open_stream.c#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg.c#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg.h#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db.c#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db.h#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db_match.c#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db_private.h#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_manifest.c#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_private.h#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo.c#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo.h#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_files.c#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_ftp.c#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_private.h#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_util.c#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkgfile.c#1 add .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/archive_read_open_stream.c#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg.c#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg.h#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg_db.c#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg_db.h#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg_db_match.c#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg_db_private.h#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg_manifest.c#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg_private.h#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg_repo.c#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg_repo.h#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg_repo_files.c#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg_repo_ftp.c#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg_repo_private.h#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkg_util.c#2 delete .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/trunk/src/pkgfile.c#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Thu Aug 16 06:00:27 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 28DFA16A41B; Thu, 16 Aug 2007 06:00:27 +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 CF51E16A417 for ; Thu, 16 Aug 2007 06:00:26 +0000 (UTC) (envelope-from gcooper@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C214513C45B for ; Thu, 16 Aug 2007 06:00:26 +0000 (UTC) (envelope-from gcooper@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 l7G60QX5010639 for ; Thu, 16 Aug 2007 06:00:26 GMT (envelope-from gcooper@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7G60Qqt010636 for perforce@freebsd.org; Thu, 16 Aug 2007 06:00:26 GMT (envelope-from gcooper@FreeBSD.org) Date: Thu, 16 Aug 2007 06:00:26 GMT Message-Id: <200708160600.l7G60Qqt010636@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gcooper@FreeBSD.org using -f From: Garrett Cooper To: Perforce Change Reviews Cc: Subject: PERFORCE change 125204 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, 16 Aug 2007 06:00:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=125204 Change 125204 by gcooper@optimus-revised_pkgtools on 2007/08/16 05:59:33 Make libpkg contrib code style(7) friendly. See scripts/styleify.pl. This script converts double tabs to single tabs, and single tabs to 4 spaces, skipping over comments, thus conforming to style(7)'s simpler whitespace requirements. Affected files ... .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/archive_read_open_stream.c#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg.c#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg.h#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db.c#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db.h#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db_match.c#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db_private.h#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_manifest.c#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_private.h#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo.c#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo.h#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_files.c#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_ftp.c#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_private.h#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_util.c#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkgfile.c#2 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/scripts/styleify.pl#1 add Differences ... ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/archive_read_open_stream.c#2 (text+ko) ==== @@ -35,70 +35,70 @@ #include "archive.h" struct read_stream_data { - FILE *fd; - size_t block_size; - void *buffer; + FILE *fd; + size_t block_size; + void *buffer; }; int archive_read_open_stream(struct archive *, FILE *, size_t); -static int stream_close(struct archive *, void *); -static int stream_open(struct archive *, void *); -static ssize_t stream_read(struct archive *, void *, const void **buff); +static int stream_close(struct archive *, void *); +static int stream_open(struct archive *, void *); +static ssize_t stream_read(struct archive *, void *, const void **buff); int archive_read_open_stream(struct archive *a, FILE *fd, size_t block_size) { - struct read_stream_data *mine; + struct read_stream_data *mine; - mine = malloc(sizeof(*mine)); - if (mine == NULL) { - archive_set_error(a, ENOMEM, "No memory"); - return (ARCHIVE_FATAL); - } - mine->block_size = block_size; - mine->buffer = malloc(mine->block_size); - if (mine->buffer == NULL) { - archive_set_error(a, ENOMEM, "No memory"); - free(mine); - return (ARCHIVE_FATAL); - } - mine->fd = fd; - return (archive_read_open(a, mine, stream_open, stream_read, stream_close)); + mine = malloc(sizeof(*mine)); + if (mine == NULL) { + archive_set_error(a, ENOMEM, "No memory"); + return (ARCHIVE_FATAL); + } + mine->block_size = block_size; + mine->buffer = malloc(mine->block_size); + if (mine->buffer == NULL) { + archive_set_error(a, ENOMEM, "No memory"); + free(mine); + return (ARCHIVE_FATAL); + } + mine->fd = fd; + return (archive_read_open(a, mine, stream_open, stream_read, stream_close)); } static int stream_open(struct archive *a, void *client_data) { - struct read_stream_data *mine = client_data; + struct read_stream_data *mine = client_data; - (void)a; /* UNUSED */ - if (mine->fd == NULL) { - archive_set_error(a, EINVAL, "Bad FILE pointer"); - free(mine->buffer); - free(mine); - return (ARCHIVE_FATAL); - } - return (ARCHIVE_OK); + (void)a; /* UNUSED */ + if (mine->fd == NULL) { + archive_set_error(a, EINVAL, "Bad FILE pointer"); + free(mine->buffer); + free(mine); + return (ARCHIVE_FATAL); + } + return (ARCHIVE_OK); } static ssize_t stream_read(struct archive *a, void *client_data, const void **buff) { - struct read_stream_data *mine = client_data; + struct read_stream_data *mine = client_data; - (void)a; /* UNUSED */ - *buff = mine->buffer; - return fread(mine->buffer, 1, mine->block_size, mine->fd); + (void)a; /* UNUSED */ + *buff = mine->buffer; + return fread(mine->buffer, 1, mine->block_size, mine->fd); } static int stream_close(struct archive *a, void *client_data) { - struct read_stream_data *mine = client_data; + struct read_stream_data *mine = client_data; - (void)a; /* UNUSED */ - free(mine->buffer); - free(mine); - return (ARCHIVE_OK); -} + (void)a; /* UNUSED */ + free(mine->buffer); + free(mine); + return (ARCHIVE_OK); +} ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg.c#2 (text+ko) ==== @@ -55,57 +55,57 @@ */ struct pkg * pkg_new(const char *pkg_name, - pkg_get_control_files_callback *control_files, - pkg_get_control_file_callback *control_file, - pkg_get_manifest_callback *get_manifest, - pkg_get_dependencies_callback *get_deps, - pkg_get_dependencies_callback *get_rdeps, - pkg_free_callback *free_pkg) + pkg_get_control_files_callback *control_files, + pkg_get_control_file_callback *control_file, + pkg_get_manifest_callback *get_manifest, + pkg_get_dependencies_callback *get_deps, + pkg_get_dependencies_callback *get_rdeps, + pkg_free_callback *free_pkg) { - struct pkg *pkg; + struct pkg *pkg; - /* A package must have a name */ - if (pkg_name == NULL) - return NULL; + /* A package must have a name */ + if (pkg_name == NULL) + return NULL; - pkg = malloc(sizeof(struct pkg)); - if (!pkg) { - return NULL; - } + pkg = malloc(sizeof(struct pkg)); + if (!pkg) { + return NULL; + } - pkg->pkg_name = strdup(pkg_name); - if (!pkg->pkg_name) { - free(pkg); - return NULL; - } + pkg->pkg_name = strdup(pkg_name); + if (!pkg->pkg_name) { + free(pkg); + return NULL; + } - /* Set the manifest to NULL */ - pkg->pkg_manifest = NULL; + /* Set the manifest to NULL */ + pkg->pkg_manifest = NULL; - /* Add the given callbacks to the struct */ - pkg->pkg_get_control_files = control_files; - pkg->pkg_get_control_file = control_file; - pkg->pkg_get_manifest = get_manifest; - pkg->pkg_get_deps = get_deps; - pkg->pkg_get_rdeps = get_rdeps; - pkg->pkg_free = free_pkg; + /* Add the given callbacks to the struct */ + pkg->pkg_get_control_files = control_files; + pkg->pkg_get_control_file = control_file; + pkg->pkg_get_manifest = get_manifest; + pkg->pkg_get_deps = get_deps; + pkg->pkg_get_rdeps = get_rdeps; + pkg->pkg_free = free_pkg; - /* Set the other callbacks to NULL */ - pkg->pkg_get_version = NULL; - pkg->pkg_get_origin = NULL; - pkg->pkg_set_origin = NULL; - pkg->pkg_add_depend = NULL; - pkg->pkg_add_file = NULL; - pkg->pkg_get_next_file = NULL; - pkg->pkg_run_script = NULL; - pkg->pkg_install = NULL; - pkg->pkg_deinstall = NULL; + /* Set the other callbacks to NULL */ + pkg->pkg_get_version = NULL; + pkg->pkg_get_origin = NULL; + pkg->pkg_set_origin = NULL; + pkg->pkg_add_depend = NULL; + pkg->pkg_add_file = NULL; + pkg->pkg_get_next_file = NULL; + pkg->pkg_run_script = NULL; + pkg->pkg_install = NULL; + pkg->pkg_deinstall = NULL; - /* The data is unknown so set to NULL */ - pkg->pkg_prefix = NULL; - pkg->data = NULL; + /* The data is unknown so set to NULL */ + pkg->pkg_prefix = NULL; + pkg->data = NULL; - return pkg; + return pkg; } /** @@ -120,17 +120,17 @@ */ int pkg_add_callbacks_data(struct pkg *pkg, - pkg_get_version_callback *get_version, - pkg_get_origin_callback *get_origin, - pkg_set_origin_callback *set_origin) + pkg_get_version_callback *get_version, + pkg_get_origin_callback *get_origin, + pkg_set_origin_callback *set_origin) { - if (pkg == NULL) - return -1; + if (pkg == NULL) + return -1; - pkg->pkg_get_version = get_version; - pkg->pkg_get_origin = get_origin; - pkg->pkg_set_origin = set_origin; - return 0; + pkg->pkg_get_version = get_version; + pkg->pkg_get_origin = get_origin; + pkg->pkg_set_origin = set_origin; + return 0; } /** @@ -143,16 +143,16 @@ */ int pkg_add_callbacks_empty(struct pkg *pkg, - pkg_add_dependency_callback *add_depend, - pkg_add_file_callback *add_file) + pkg_add_dependency_callback *add_depend, + pkg_add_file_callback *add_file) { - if (pkg == NULL) - return -1; + if (pkg == NULL) + return -1; - pkg->pkg_add_depend = add_depend; - pkg->pkg_add_file = add_file; + pkg->pkg_add_depend = add_depend; + pkg->pkg_add_file = add_file; - return 0; + return 0; } /** @@ -167,19 +167,19 @@ */ int pkg_add_callbacks_install (struct pkg *pkg, - pkg_install_callback *install, - pkg_deinstall_callback *deinstall, - pkg_get_next_file_callback *next_file, - pkg_run_script_callback *run_script) + pkg_install_callback *install, + pkg_deinstall_callback *deinstall, + pkg_get_next_file_callback *next_file, + pkg_run_script_callback *run_script) { - if (pkg == NULL) - return -1; + if (pkg == NULL) + return -1; - pkg->pkg_install = install; - pkg->pkg_deinstall = deinstall; - pkg->pkg_get_next_file = next_file; - pkg->pkg_run_script = run_script; - return 0; + pkg->pkg_install = install; + pkg->pkg_deinstall = deinstall; + pkg->pkg_get_next_file = next_file; + pkg->pkg_run_script = run_script; + return 0; } /** @@ -208,7 +208,7 @@ struct pkg* pkg_new_empty(const char *pkg_name) { - return pkg_new(pkg_name, NULL, NULL, NULL, NULL, NULL, NULL); + return pkg_new(pkg_name, NULL, NULL, NULL, NULL, NULL, NULL); } /** @@ -225,8 +225,8 @@ int pkg_compare(const void *pkg_a, const void *pkg_b) { - return strcmp((*(struct pkg * const *)pkg_a)->pkg_name, - (*(struct pkg * const *)pkg_b)->pkg_name); + return strcmp((*(struct pkg * const *)pkg_a)->pkg_name, + (*(struct pkg * const *)pkg_b)->pkg_name); } /** @@ -241,23 +241,23 @@ int pkg_set_prefix(struct pkg *pkg, const char *prefix) { - char *old_prefix; - if (pkg == NULL) - return -1; + char *old_prefix; + if (pkg == NULL) + return -1; - if (prefix == NULL) - return -1; + if (prefix == NULL) + return -1; - old_prefix = pkg->pkg_prefix; - pkg->pkg_prefix = strdup(prefix); - if (pkg->pkg_prefix == NULL) { - pkg->pkg_prefix = old_prefix; - return -1; - } - if (old_prefix != NULL) - free(old_prefix); + old_prefix = pkg->pkg_prefix; + pkg->pkg_prefix = strdup(prefix); + if (pkg->pkg_prefix == NULL) { + pkg->pkg_prefix = old_prefix; + return -1; + } + if (old_prefix != NULL) + free(old_prefix); - return 0; + return 0; } /** @@ -268,19 +268,19 @@ const char * pkg_get_prefix(struct pkg *pkg) { - if (pkg == NULL) - return NULL; + if (pkg == NULL) + return NULL; - /* Read the prefix from the manifest */ - if (pkg->pkg_prefix == NULL && pkg->pkg_manifest != NULL) { - const char *prefix; + /* Read the prefix from the manifest */ + if (pkg->pkg_prefix == NULL && pkg->pkg_manifest != NULL) { + const char *prefix; - prefix = (const char *)pkg_manifest_get_attr(pkg->pkg_manifest, - pkgm_prefix); - pkg_set_prefix(pkg, prefix); - } + prefix = (const char *)pkg_manifest_get_attr(pkg->pkg_manifest, + pkgm_prefix); + pkg_set_prefix(pkg, prefix); + } - return pkg->pkg_prefix; + return pkg->pkg_prefix; } /** @@ -292,14 +292,14 @@ const char ** pkg_get_conflicts(struct pkg *pkg) { - if (pkg == NULL) - return NULL; + if (pkg == NULL) + return NULL; - /* Read the manifest */ - pkg_get_manifest(pkg); + /* Read the manifest */ + pkg_get_manifest(pkg); - /* Get the conflicts */ - return pkg_manifest_get_conflicts(pkg->pkg_manifest); + /* Get the conflicts */ + return pkg_manifest_get_conflicts(pkg->pkg_manifest); } /** @@ -311,13 +311,13 @@ struct pkgfile ** pkg_get_control_files(struct pkg *pkg) { - if (!pkg) - return NULL; + if (!pkg) + return NULL; - if (!pkg->pkg_get_control_files) - return NULL; + if (!pkg->pkg_get_control_files) + return NULL; - return pkg->pkg_get_control_files(pkg); + return pkg->pkg_get_control_files(pkg); } /** @@ -329,13 +329,13 @@ struct pkgfile * pkg_get_control_file(struct pkg *pkg, const char *pkg_name) { - if (!pkg || !pkg_name) - return NULL; + if (!pkg || !pkg_name) + return NULL; - if (pkg->pkg_get_control_file) - return pkg->pkg_get_control_file(pkg, pkg_name); + if (pkg->pkg_get_control_file) + return pkg->pkg_get_control_file(pkg, pkg_name); - return NULL; + return NULL; } /** @@ -348,16 +348,16 @@ struct pkg ** pkg_get_dependencies(struct pkg *pkg) { - if (!pkg) - return NULL; + if (!pkg) + return NULL; - assert(pkg->pkg_get_deps == NULL || - pkg->pkg_get_deps != pkg->pkg_get_rdeps); + assert(pkg->pkg_get_deps == NULL || + pkg->pkg_get_deps != pkg->pkg_get_rdeps); - if (pkg->pkg_get_deps) - return pkg->pkg_get_deps(pkg); + if (pkg->pkg_get_deps) + return pkg->pkg_get_deps(pkg); - return NULL; + return NULL; } /** @@ -374,15 +374,15 @@ struct pkg ** pkg_get_reverse_dependencies(struct pkg *pkg) { - if (!pkg) - return NULL; + if (!pkg) + return NULL; - assert(pkg->pkg_get_rdeps == NULL || - pkg->pkg_get_deps != pkg->pkg_get_rdeps); - if (pkg->pkg_get_rdeps != NULL) - return pkg->pkg_get_rdeps(pkg); + assert(pkg->pkg_get_rdeps == NULL || + pkg->pkg_get_deps != pkg->pkg_get_rdeps); + if (pkg->pkg_get_rdeps != NULL) + return pkg->pkg_get_rdeps(pkg); - return NULL; + return NULL; } /** @@ -394,13 +394,13 @@ struct pkg_manifest * pkg_get_manifest(struct pkg *pkg) { - if (pkg == NULL) - return NULL; + if (pkg == NULL) + return NULL; - if (pkg->pkg_manifest == NULL && pkg->pkg_get_manifest != NULL) - pkg->pkg_get_manifest(pkg); + if (pkg->pkg_manifest == NULL && pkg->pkg_get_manifest != NULL) + pkg->pkg_get_manifest(pkg); - return pkg->pkg_manifest; + return pkg->pkg_manifest; } /** @@ -412,9 +412,9 @@ const char * pkg_get_name(struct pkg *pkg) { - if (!pkg) - return NULL; - return pkg->pkg_name; + if (!pkg) + return NULL; + return pkg->pkg_name; } /** @@ -428,13 +428,13 @@ struct pkgfile * pkg_get_next_file(struct pkg *pkg) { - if (!pkg) - return NULL; + if (!pkg) + return NULL; - if (!pkg->pkg_get_next_file) - return NULL; + if (!pkg->pkg_get_next_file) + return NULL; - return pkg->pkg_get_next_file(pkg); + return pkg->pkg_get_next_file(pkg); } /** @@ -448,13 +448,13 @@ const char * pkg_get_origin(struct pkg *pkg) { - if (pkg == NULL) - return NULL; + if (pkg == NULL) + return NULL; - if (pkg->pkg_get_origin != NULL) - return pkg->pkg_get_origin(pkg); + if (pkg->pkg_get_origin != NULL) + return pkg->pkg_get_origin(pkg); - return NULL; + return NULL; } /** @@ -471,13 +471,13 @@ int pkg_set_origin(struct pkg *pkg, const char *origin) { - if (pkg == NULL || origin == NULL) - return -1; + if (pkg == NULL || origin == NULL) + return -1; - if (pkg->pkg_set_origin) - return pkg->pkg_set_origin(pkg, origin); + if (pkg->pkg_set_origin) + return pkg->pkg_set_origin(pkg, origin); - return -1; + return -1; } /** @@ -491,13 +491,13 @@ const char * pkg_get_version(struct pkg *pkg) { - if (pkg == NULL) - return NULL; + if (pkg == NULL) + return NULL; - if (pkg->pkg_get_version != NULL) - return pkg->pkg_get_version(pkg); + if (pkg->pkg_get_version != NULL) + return pkg->pkg_get_version(pkg); - return NULL; + return NULL; } /** @@ -510,13 +510,13 @@ int pkg_run_script(struct pkg *pkg, const char *prefix, pkg_script script) { - if (pkg == NULL) - return -1; + if (pkg == NULL) + return -1; - if (pkg->pkg_run_script == NULL) - return -1; + if (pkg->pkg_run_script == NULL) + return -1; - return pkg->pkg_run_script(pkg, prefix, script); + return pkg->pkg_run_script(pkg, prefix, script); } /** @@ -528,13 +528,13 @@ int pkg_add_dependency(struct pkg *pkg, struct pkg *depend) { - if (!pkg || !depend) - return -1; + if (!pkg || !depend) + return -1; - if (pkg->pkg_add_depend) - return pkg->pkg_add_depend(pkg, depend); + if (pkg->pkg_add_depend) + return pkg->pkg_add_depend(pkg, depend); - return -1; + return -1; } /** @@ -546,13 +546,13 @@ int pkg_add_file(struct pkg *pkg, struct pkgfile *file) { - if (!pkg || !file) - return -1; + if (!pkg || !file) + return -1; - if (pkg->pkg_add_file) - return pkg->pkg_add_file(pkg, file); + if (pkg->pkg_add_file) + return pkg->pkg_add_file(pkg, file); - return -1; + return -1; } /** @@ -578,19 +578,19 @@ */ int pkg_install(struct pkg *pkg, const char *prefix, int reg, - pkg_db_action *pkg_action, void *data, pkg_db_chdir *db_chdir, - pkg_db_install_file *install_file, pkg_db_exec *do_exec, - pkg_db_register *pkg_register) + pkg_db_action *pkg_action, void *data, pkg_db_chdir *db_chdir, + pkg_db_install_file *install_file, pkg_db_exec *do_exec, + pkg_db_register *pkg_register) { - if (pkg == NULL || data == NULL || db_chdir == NULL || - install_file == NULL || do_exec == NULL || pkg_register == NULL) - return -1; + if (pkg == NULL || data == NULL || db_chdir == NULL || + install_file == NULL || do_exec == NULL || pkg_register == NULL) + return -1; - if (pkg->pkg_install == NULL) - return -1; + if (pkg->pkg_install == NULL) + return -1; - return pkg->pkg_install(pkg, prefix, reg, pkg_action, data, db_chdir, - install_file, do_exec, pkg_register); + return pkg->pkg_install(pkg, prefix, reg, pkg_action, data, db_chdir, + install_file, do_exec, pkg_register); } /** @@ -615,18 +615,18 @@ */ int pkg_deinstall(struct pkg *pkg, pkg_db_action *pkg_action, void *data, - pkg_db_chdir *db_chdir, pkg_db_install_file *deinstall_file, - pkg_db_exec *do_exec, pkg_db_deregister *pkg_deregister) + pkg_db_chdir *db_chdir, pkg_db_install_file *deinstall_file, + pkg_db_exec *do_exec, pkg_db_deregister *pkg_deregister) { - if (pkg == NULL || data == NULL || db_chdir == NULL || - deinstall_file == NULL || do_exec == NULL || pkg_deregister == NULL) - return -1; + if (pkg == NULL || data == NULL || db_chdir == NULL || + deinstall_file == NULL || do_exec == NULL || pkg_deregister == NULL) + return -1; - if (pkg->pkg_deinstall == NULL) - return -1; + if (pkg->pkg_deinstall == NULL) + return -1; - return pkg->pkg_deinstall(pkg, pkg_action, data, db_chdir, - deinstall_file, do_exec, pkg_deregister); + return pkg->pkg_deinstall(pkg, pkg_action, data, db_chdir, + deinstall_file, do_exec, pkg_deregister); } /** @@ -640,16 +640,16 @@ int pkg_list_free(struct pkg **pkgs) { - unsigned int cur; + unsigned int cur; - if (!pkgs) - return -1; + if (!pkgs) + return -1; - for (cur = 0; pkgs[cur] != NULL; cur++) - pkg_free(pkgs[cur]); + for (cur = 0; pkgs[cur] != NULL; cur++) + pkg_free(pkgs[cur]); - free(pkgs); - return 0; + free(pkgs); + return 0; } /** @@ -660,26 +660,26 @@ int pkg_free(struct pkg *pkg) { - if (!pkg) - return -1; + if (!pkg) + return -1; - if (pkg->pkg_name != NULL) - free(pkg->pkg_name); + if (pkg->pkg_name != NULL) + free(pkg->pkg_name); - if (pkg->pkg_prefix != NULL) - free(pkg->pkg_prefix); + if (pkg->pkg_prefix != NULL) + free(pkg->pkg_prefix); - if (pkg->pkg_manifest != NULL) - pkg_manifest_free(pkg->pkg_manifest); + if (pkg->pkg_manifest != NULL) + pkg_manifest_free(pkg->pkg_manifest); - if (pkg->pkg_free != NULL) - pkg->pkg_free(pkg); + if (pkg->pkg_free != NULL) + pkg->pkg_free(pkg); - free(pkg); + free(pkg); - return 0; + return 0; } /** * @} - */ + */ ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg.h#2 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db.c#2 (text+ko) ==== @@ -54,56 +54,56 @@ */ struct pkg_db* pkg_db_open(const char *base, pkg_db_install_pkg_callback *install_pkg, - pkg_db_is_installed_callback *is_installed, - pkg_db_get_installed_match_callback *get_installed_match, - pkg_db_get_package_callback *get_package, - pkg_db_deinstall_pkg_callback* deinstall) + pkg_db_is_installed_callback *is_installed, + pkg_db_get_installed_match_callback *get_installed_match, + pkg_db_get_package_callback *get_package, + pkg_db_deinstall_pkg_callback* deinstall) { - struct pkg_db *db; - struct stat sb; + struct pkg_db *db; + struct stat sb; - db = malloc(sizeof(struct pkg_db)); - if (!db) { - return NULL; - } + db = malloc(sizeof(struct pkg_db)); + if (!db) { + return NULL; + } - /* Make a relative path into an absolute path */ - if (base == NULL) { - db->db_base = strdup("/"); - } else if (base[0] != '/') { - char *cwd; + /* Make a relative path into an absolute path */ + if (base == NULL) { + db->db_base = strdup("/"); + } else if (base[0] != '/') { + char *cwd; - cwd = getcwd(NULL, 0); - asprintf(&db->db_base, "%s/%s", cwd, base); - free(cwd); - } else { - db->db_base = strdup(base); - } + cwd = getcwd(NULL, 0); + asprintf(&db->db_base, "%s/%s", cwd, base); + free(cwd); + } else { + db->db_base = strdup(base); + } - if (!db->db_base) { - free(db); - return NULL; - } + if (!db->db_base) { + free(db); + return NULL; + } - /* Check the directory exists and is a directory */ - if (stat(db->db_base, &sb) == -1) { - pkg_db_free(db); - return NULL; - } else if (!S_ISDIR(sb.st_mode)) { - pkg_db_free(db); - return NULL; - } + /* Check the directory exists and is a directory */ + if (stat(db->db_base, &sb) == -1) { + pkg_db_free(db); + return NULL; + } else if (!S_ISDIR(sb.st_mode)) { + pkg_db_free(db); + return NULL; + } - /* Add the callbacks */ - db->pkg_install = install_pkg; - db->pkg_is_installed = is_installed; - db->pkg_get_installed_match = get_installed_match; - db->pkg_get_package = get_package; - db->pkg_deinstall = deinstall; + /* Add the callbacks */ + db->pkg_install = install_pkg; + db->pkg_is_installed = is_installed; + db->pkg_get_installed_match = get_installed_match; + db->pkg_get_package = get_package; + db->pkg_deinstall = deinstall; - db->data = NULL; + db->data = NULL; - return db; + return db; } /** @@ -115,7 +115,7 @@ */ void pkg_action_null(enum pkg_action_level level __unused, const char *fmt __unused, - ...) + ...) { } @@ -151,22 +151,22 @@ pkg_db_install_pkg_action(struct pkg_db *db, struct pkg *pkg, const char *prefix, int reg, int scripts, int fake, pkg_db_action *action) { - if (!db) { - return -1; - } + if (!db) { + return -1; + } - if (!pkg) { - return -1; - } + if (!pkg) { + return -1; + } - if (!db->pkg_install) { - return -1; - } + if (!db->pkg_install) { + return -1; + } - if (action == NULL) - return -1; + if (action == NULL) + return -1; - return db->pkg_install(db, pkg, prefix, reg, scripts, fake, action); + return db->pkg_install(db, pkg, prefix, reg, scripts, fake, action); } /** @@ -176,15 +176,15 @@ int pkg_db_is_installed(struct pkg_db *db, struct pkg *pkg) { - if (!db) { - return -1; - } + if (!db) { + return -1; + } - if (!db->pkg_is_installed) { - return -1; - } + if (!db->pkg_is_installed) { + return -1; + } - return db->pkg_is_installed(db, pkg); + return db->pkg_is_installed(db, pkg); } /** @@ -194,7 +194,7 @@ struct pkg ** pkg_db_get_installed(struct pkg_db *db) { - return pkg_db_get_installed_match(db, NULL, NULL); + return pkg_db_get_installed_match(db, NULL, NULL); } /** @@ -210,7 +210,7 @@ pkg_db_get_installed_match(struct pkg_db *db, pkg_db_match *match, const void *data) { - return pkg_db_get_installed_match_count(db, match, 0, data); + return pkg_db_get_installed_match_count(db, match, 0, data); } /** @@ -227,16 +227,16 @@ pkg_db_get_installed_match_count(struct pkg_db *db, pkg_db_match *match, unsigned int count, const void *data) { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Aug 16 06:01:29 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ECF5D16A419; Thu, 16 Aug 2007 06:01:28 +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 B22B416A417 for ; Thu, 16 Aug 2007 06:01:28 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A47C513C45B for ; Thu, 16 Aug 2007 06:01:28 +0000 (UTC) (envelope-from zhouzhouyi@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 l7G61SuL011088 for ; Thu, 16 Aug 2007 06:01:28 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7G61S6d011085 for perforce@freebsd.org; Thu, 16 Aug 2007 06:01:28 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Thu, 16 Aug 2007 06:01:28 GMT Message-Id: <200708160601.l7G61S6d011085@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 125205 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, 16 Aug 2007 06:01:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=125205 Change 125205 by zhouzhouyi@zhouzhouyi_mactest on 2007/08/16 06:01:07 Test mandatory access control hooks for ifnet transmit Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/macping.c#2 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/mactest.c#12 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/pipe_io.c#2 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/misc.sh#16 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/netinet/00.t#2 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/netinet/01.t#1 add Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/macping.c#2 (text+ko) ==== @@ -91,7 +91,7 @@ char *hostname; long sntransmitted; /* # of packets we sent in this sweep */ volatile sig_atomic_t finish_up = 0; - +int logfd; static void usage(void) @@ -180,6 +180,8 @@ if (i < 0 || i != cc) { if (i < 0) { warn("sendto"); + close(logfd); + exit(1); } else { warn("%s: partial write: %d of %d bytes", hostname, i, cc); @@ -208,7 +210,6 @@ const char *label_string = NULL; char *target = NULL; const char *macconf_file = NULL; - int logfd; int pid; char buf[10]; int flags; @@ -270,6 +271,10 @@ mac_free(label); } + + logfd = open("/dev/mactest", O_RDWR); + ioctl(logfd, BEGINLOG, NULL); + s = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); outpack = outpackhdr + sizeof(struct ip); ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/mactest.c#12 (text+ko) ==== @@ -104,6 +104,8 @@ int sd_args[MAX_ARGS]; }; +int logfd; + static struct syscall_desc syscalls[] = { { "kill", ACTION_KILL, { TYPE_NUMBER, TYPE_NUMBER, TYPE_NONE } }, { "system", ACTION_SYSTEM, { TYPE_NONE }}, @@ -251,6 +253,7 @@ } if (tflags[i].f_str == NULL) { fprintf(stderr, "unknown flag '%s'\n", f); + close(logfd); exit(1); } flags |= tflags[i].f_flag; @@ -400,12 +403,14 @@ if (argv[i] == NULL || strcmp(argv[i], ":") == 0) break; fprintf(stderr, "too many arguments [%s]\n", argv[i]); + close(logfd); exit(1); } else { if (argv[i] == NULL || strcmp(argv[i], ":") == 0) { if (scall->sd_args[i] & TYPE_OPTIONAL) break; fprintf(stderr, "too few arguments\n"); + close(logfd); exit(1); } if (scall->sd_args[i] & TYPE_STRING) { @@ -419,6 +424,7 @@ args[i].num = strtoll(argv[i], &endp, 0); if (*endp != '\0' && !isspace((unsigned char)*endp)) { fprintf(stderr, "invalid argument %u, number expected [%s]\n", i, endp); + close(logfd); exit(1); } } @@ -444,12 +450,14 @@ if (flags & O_CREAT) { if (i == 2) { fprintf(stderr, "too few arguments\n"); + close(logfd); exit(1); } rval = open(STR(0), flags, (mode_t)NUM(2)); } else { if (i == 3) { fprintf(stderr, "too many arguments\n"); + close(logfd); exit(1); } rval = open(STR(0), flags); @@ -524,6 +532,7 @@ break; default: fprintf(stderr, "unsupported syscall\n"); + close(logfd); exit(1); } #undef STR @@ -551,7 +560,7 @@ const char *macconf_file = NULL; int pid,pid1; int error; - int mactestpipefd, logfd; + int mactestpipefd; char buf[2048]; int ch; @@ -609,6 +618,7 @@ scall = find_syscall(argv[0]); if (scall == NULL) { fprintf(stderr, "syscall '%s' not supported\n", argv[0]); + close(logfd); exit(1); } argc++; ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/pipe_io.c#2 (text+ko) ==== @@ -46,6 +46,7 @@ #include "mactest.h" #define BEGINLOG _IO('m',1) +int logfd; static void usage(void) @@ -79,6 +80,7 @@ if (i < 0) { if (errno != EAGAIN) perror("write"); + close(fd); exit(1); } buf += i; @@ -96,7 +98,6 @@ const char *label_string_writer = NULL; const char *label_string_pipe = NULL; const char *macconf_file = NULL; - int logfd; int pid , pid1; int fdreader , fdwriter; char buf [10]; @@ -134,11 +135,13 @@ if (pipe(fd) < 0) { perror("pipe"); + close(logfd); exit(1); } flags = fcntl(fd[1], F_GETFL); if (flags == -1 || fcntl(fd[1], F_SETFL, flags | O_NONBLOCK) == -1) { perror("fcntl"); + close(logfd); exit(1); } if (label_string_pipe) { @@ -151,19 +154,23 @@ error = errno; else error = 0; - if (error) + if (error){ + close(logfd); exit(1); + } mac_free(label); } switch (fork()) { case -1: perror("fork"); + close(logfd); exit(1); case 0: { mac_t label; if (mac_from_text(&label, label_string_reader) == -1) { + close(logfd); exit(-1); } if (mac_set_proc(label) == -1) @@ -173,6 +180,7 @@ mac_free(label); if (error != 0) { + close(logfd); exit(-1); } close(fd[1]); @@ -183,6 +191,7 @@ break; if (i < 0) { perror("read"); + close(logfd); exit(1); } } @@ -196,6 +205,7 @@ mac_t label; if (mac_from_text(&label, label_string_writer) == -1) { + close(logfd); exit(-1); } if (mac_set_proc(label) == -1) @@ -205,6 +215,7 @@ mac_free(label); if (error != 0) { + close(logfd); exit(-1); } } ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/misc.sh#16 (text+ko) ==== @@ -20,6 +20,7 @@ mdconfigopenrdonly="${maindir}/mdconfigopenrdonly" fifo_io="${maindir}/fifo_io" pipe_io="${maindir}/pipe_io" +macping="${maindir}/macping" . ${maindir}/tests/conf ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/netinet/00.t#2 (text+ko) ==== @@ -1,5 +1,5 @@ #!/bin/sh -# $FreeBSD: src/tools/regression/mactest/tests/pipe/00.t,v 1.2 2007/01/25 20:50:02 zhouzhouyi Exp $ +# $FreeBSD: src/tools/regression/mactest/tests/netinet/00.t,v 1.2 2007/01/25 20:50:02 zhouzhouyi Exp $ desc="manipulate fifo files" @@ -38,7 +38,7 @@ echo "enabling revoking" t=`sysctl security.mac.test.pseudoinit=1` t=`ifconfig mac_test0 192.167.0.33` - t=`ifconfig mac_test1 192.167.0.34` + t=`ifconfig mac_test1 192.167.1.34` echo "enabling mactest pseudo interface" #case 1,2,3: set the maclabel of the interface, effective, range or both is allowed, while # the subject should be priviledeged. From owner-p4-projects@FreeBSD.ORG Thu Aug 16 06:10:41 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DE0A716A41A; Thu, 16 Aug 2007 06:10:40 +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 AE15916A417 for ; Thu, 16 Aug 2007 06:10:40 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A02CF13C467 for ; Thu, 16 Aug 2007 06:10:40 +0000 (UTC) (envelope-from zhouzhouyi@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 l7G6Aes7012867 for ; Thu, 16 Aug 2007 06:10:40 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7G6AeIY012864 for perforce@freebsd.org; Thu, 16 Aug 2007 06:10:40 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Thu, 16 Aug 2007 06:10:40 GMT Message-Id: <200708160610.l7G6AeIY012864@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 125206 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, 16 Aug 2007 06:10:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=125206 Change 125206 by zhouzhouyi@zhouzhouyi_mactest on 2007/08/16 06:09:45 Only the mls label needs to be checked in ifnet relabel Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/netinet/00.t#3 edit Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/netinet/00.t#3 (text+ko) ==== @@ -42,12 +42,13 @@ echo "enabling mactest pseudo interface" #case 1,2,3: set the maclabel of the interface, effective, range or both is allowed, while # the subject should be priviledeged. + mactestexpect "setifmac:.Operation.not.permitted" "" -m "biba/high(high-high)" \ -f ${mactest_conf} system ifconfig mac_test0 maclabel "mls/low\(low-high\)" mactestexpect "setifmac:.Operation.not.permitted" "" -m "mls/low(low-low)" \ -f ${mactest_conf} system ifconfig mac_test0 maclabel "mls/low\(low-high\)" echo -n "pid = -2 mac_test_check_ifnet_relabel:" > ${mactest_conf} - echo "biba/high(low-high),mls/low(low-high) biba/low(low-low),mls/low(low-high) biba/,mls/low(low-high)" >> ${mactest_conf} + echo "biba/high(low-high),mls/low(low-high) mls/low(low-high) biba/,mls/low(low-high)" >> ${mactest_conf} mactestexpect "" "" -m "biba/high(low-high),mls/low(low-high)" \ -f ${mactest_conf} system ifconfig mac_test0 maclabel "mls/low\(low-high\)" From owner-p4-projects@FreeBSD.ORG Thu Aug 16 06:23:58 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E9C6116A41A; Thu, 16 Aug 2007 06:23:57 +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 B192A16A417 for ; Thu, 16 Aug 2007 06:23:57 +0000 (UTC) (envelope-from gcooper@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A089713C48D for ; Thu, 16 Aug 2007 06:23:57 +0000 (UTC) (envelope-from gcooper@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 l7G6Nv2a013794 for ; Thu, 16 Aug 2007 06:23:57 GMT (envelope-from gcooper@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7G6NvuT013791 for perforce@freebsd.org; Thu, 16 Aug 2007 06:23:57 GMT (envelope-from gcooper@FreeBSD.org) Date: Thu, 16 Aug 2007 06:23:57 GMT Message-Id: <200708160623.l7G6NvuT013791@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gcooper@FreeBSD.org using -f From: Garrett Cooper To: Perforce Change Reviews Cc: Subject: PERFORCE change 125207 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, 16 Aug 2007 06:23:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=125207 Change 125207 by gcooper@optimus-revised_pkgtools on 2007/08/16 06:22:59 - Fix whitespace on function prototypes. - Align columns properly. Affected files ... .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/archive_read_open_stream.c#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg.h#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db_private.h#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_files.c#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_ftp.c#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_private.h#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_util.c#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkgfile.c#3 edit Differences ... ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/archive_read_open_stream.c#3 (text+ko) ==== @@ -42,9 +42,9 @@ int archive_read_open_stream(struct archive *, FILE *, size_t); -static int stream_close(struct archive *, void *); -static int stream_open(struct archive *, void *); -static ssize_t stream_read(struct archive *, void *, const void **buff); +static int stream_close(struct archive *, void *); +static int stream_open(struct archive *, void *); +static ssize_t stream_read(struct archive *, void *, const void **buff); int archive_read_open_stream(struct archive *a, FILE *fd, size_t block_size) @@ -101,4 +101,4 @@ free(mine->buffer); free(mine); return (ARCHIVE_OK); -}+} ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg.h#3 (text+ko) ==== @@ -49,28 +49,28 @@ */ struct pkgfile; -struct pkgfile *pkgfile_new_from_disk(const char *, int); -struct pkgfile *pkgfile_new_regular(const char *, const char *, uint64_t); -struct pkgfile *pkgfile_new_symlink(const char *, const char *); -struct pkgfile *pkgfile_new_hardlink(const char *, const char *); -struct pkgfile *pkgfile_new_directory(const char *); -const char *pkgfile_get_name(struct pkgfile *); -uint64_t pkgfile_get_size(struct pkgfile *); -const char *pkgfile_get_data(struct pkgfile *); -FILE *pkgfile_get_fileptr(struct pkgfile *); -const char *pkgfile_get_type_string(struct pkgfile *); -int pkgfile_set_cwd(struct pkgfile *, const char *); -int pkgfile_set_checksum_md5(struct pkgfile *, const char *); -int pkgfile_compare_checksum_md5(struct pkgfile *); -int pkgfile_seek(struct pkgfile *, int64_t, int); -int pkgfile_set_mode(struct pkgfile *, mode_t); -int pkgfile_append(struct pkgfile *, const char *, uint64_t); -int pkgfile_append_string(struct pkgfile *, const char *, ...); -const char *pkgfile_find_line(struct pkgfile *, const char *); -int pkgfile_remove_line(struct pkgfile *, const char *); -int pkgfile_write(struct pkgfile *); -int pkgfile_unlink(struct pkgfile *); -int pkgfile_free(struct pkgfile *); +struct pkgfile *pkgfile_new_from_disk(const char *, int); +struct pkgfile *pkgfile_new_regular(const char *, const char *, uint64_t); +struct pkgfile *pkgfile_new_symlink(const char *, const char *); +struct pkgfile *pkgfile_new_hardlink(const char *, const char *); +struct pkgfile *pkgfile_new_directory(const char *); +const char *pkgfile_get_name(struct pkgfile *); +uint64_t pkgfile_get_size(struct pkgfile *); +const char *pkgfile_get_data(struct pkgfile *); +FILE *pkgfile_get_fileptr(struct pkgfile *); +const char *pkgfile_get_type_string(struct pkgfile *); +int pkgfile_set_cwd(struct pkgfile *, const char *); +int pkgfile_set_checksum_md5(struct pkgfile *, const char *); +int pkgfile_compare_checksum_md5(struct pkgfile *); +int pkgfile_seek(struct pkgfile *, int64_t, int); +int pkgfile_set_mode(struct pkgfile *, mode_t); +int pkgfile_append(struct pkgfile *, const char *, uint64_t); +int pkgfile_append_string(struct pkgfile *, const char *, ...); +const char *pkgfile_find_line(struct pkgfile *, const char *); +int pkgfile_remove_line(struct pkgfile *, const char *); +int pkgfile_write(struct pkgfile *); +int pkgfile_unlink(struct pkgfile *); +int pkgfile_free(struct pkgfile *); /** * @} ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db_private.h#3 (text+ko) ==== @@ -28,22 +28,23 @@ #ifndef __LIBPKG_PKG_DB_PRIVATE_H__ #define __LIBPKG_PKG_DB_PRIVATE_H__ -typedef int pkg_db_install_pkg_callback(struct pkg_db *, struct pkg *, - const char *, int, int, int, pkg_db_action *); -typedef int pkg_db_is_installed_callback(struct pkg_db *, struct pkg *); +typedef int pkg_db_install_pkg_callback(struct pkg_db *, struct pkg *, + const char *, int, int, int, pkg_db_action *); +typedef int pkg_db_is_installed_callback(struct pkg_db *, struct pkg *); typedef struct pkg *pkg_db_get_package_callback(struct pkg_db *, const char *); typedef struct pkg **pkg_db_get_installed_match_callback(struct pkg_db *, pkg_db_match *, unsigned int, const void *); -typedef int pkg_db_deinstall_pkg_callback(struct pkg_db *, struct pkg *, - int, int, int, int, pkg_db_action *); +typedef int pkg_db_deinstall_pkg_callback(struct pkg_db *, struct pkg *, + int, int, int, int, pkg_db_action *); -struct pkg_db *pkg_db_open(const char *, pkg_db_install_pkg_callback *, - pkg_db_is_installed_callback *, - pkg_db_get_installed_match_callback *, - pkg_db_get_package_callback *, - pkg_db_deinstall_pkg_callback *); +struct pkg_db *pkg_db_open(const char *, pkg_db_install_pkg_callback *, + pkg_db_is_installed_callback *, + pkg_db_get_installed_match_callback *, + pkg_db_get_package_callback *, + pkg_db_deinstall_pkg_callback *); + struct pkg_db { void *data; ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_files.c#3 (text+ko) ==== @@ -36,7 +36,7 @@ #include "pkg_private.h" #include "pkg_repo_private.h" -static struct pkg *file_repo_get_pkg(struct pkg_repo *, const char *); +static struct pkg* file_repo_get_pkg(struct pkg_repo *, const char *); /** * @defgroup PackageRepoFiles Local file repository @@ -100,4 +100,4 @@ /** * @} - */+ */ ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_ftp.c#3 (text+ko) ==== @@ -74,8 +74,8 @@ { 503100, 599000, "/packages-5-stable" }, { 600100, 699000, "/packages-6-stable" }, { 700000, 799000, "/packages-7-current" }, - { 0, MAX_VERSION, "packages-current" }, - { 0, 0, NULL } + { 0, MAX_VERSION, "packages-current" }, + { 0, 0, NULL } }; struct ftp_repo { @@ -91,9 +91,9 @@ static struct pkg *ftp_get_pkg(struct pkg_repo *, const char *); static int ftp_free(struct pkg_repo *); /* Internal */ -static FILE *ftp_get_fd(const char *, struct ftp_repo *); -static struct ftp_repo *ftp_create_repo(const char *, const char *, - const char *); +static FILE *ftp_get_fd(const char *, struct ftp_repo *); +static struct ftp_repo *ftp_create_repo(const char *, const char *, + const char *); /*pkg_static int pkg_in_All(const char *); */ static int pkg_name_has_extension(const char *); @@ -119,10 +119,9 @@ struct pkg_repo *repo; repo = pkg_repo_new(ftp_get_pkg, ftp_free); - if (!repo) { + if (!repo) return NULL; - } - + repo->data = ftp_create_repo(site, path, cache_dir); if (!repo->data) { ftp_free(repo); @@ -373,4 +372,4 @@ /** * @} - */+ */ ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_private.h#3 (text+ko) ==== @@ -28,11 +28,11 @@ #ifndef __LIBPKG_PKG_REPO_PRIVATE_H__ #define __LIBPKG_PKG_REPO_PRIVATE_H__ -typedef struct pkg *pkg_repo_get_pkg_callback(struct pkg_repo *, const char *); -typedef int pkg_repo_free_callback(struct pkg_repo *); +typedef struct pkg *pkg_repo_get_pkg_callback(struct pkg_repo *, const char *); +typedef int pkg_repo_free_callback(struct pkg_repo *); struct pkg_repo *pkg_repo_new(pkg_repo_get_pkg_callback *, - pkg_repo_free_callback *); + pkg_repo_free_callback *); struct pkg_repo { void *data; ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_util.c#3 (text+ko) ==== @@ -47,9 +47,9 @@ #include "pkg.h" #include "pkg_private.h" -static int pkg_cached_readfn(void *, char *, int); -static fpos_t pkg_cached_seekfn(void *, fpos_t, int); -static int pkg_cached_closefn(void *); +static int pkg_cached_readfn(void *, char *, int); +static fpos_t pkg_cached_seekfn(void *, fpos_t, int); +static int pkg_cached_closefn(void *); /** * @defgroup PackageUtil Miscellaneous utilities @@ -340,4 +340,4 @@ /** * @} - */+ */ ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkgfile.c#3 (text+ko) ==== @@ -43,10 +43,10 @@ #include "pkg.h" #include "pkg_private.h" -static struct pkgfile *pkgfile_new(const char *, pkgfile_type, pkgfile_loc); -static int pkgfile_open_fd(struct pkgfile *); -static int pkgfile_get_type(struct pkgfile *); -static const char *pkgfile_real_name(struct pkgfile *); +static struct pkgfile *pkgfile_new(const char *, pkgfile_type, pkgfile_loc); +static int pkgfile_open_fd(struct pkgfile *); +static int pkgfile_get_type(struct pkgfile *); +static const char *pkgfile_real_name(struct pkgfile *); static const char *pkgfile_types[] = { "none", "file", "hardlink", "symlink", "directory" }; @@ -996,4 +996,4 @@ /** * @} - */+ */ From owner-p4-projects@FreeBSD.ORG Thu Aug 16 12:34:40 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 421B616A46B; Thu, 16 Aug 2007 12:34:40 +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 0631A16A468 for ; Thu, 16 Aug 2007 12:34:40 +0000 (UTC) (envelope-from delphij@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EBE7B13C45B for ; Thu, 16 Aug 2007 12:34:39 +0000 (UTC) (envelope-from delphij@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 l7GCYd87052557 for ; Thu, 16 Aug 2007 12:34:39 GMT (envelope-from delphij@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GCYcxJ052554 for perforce@freebsd.org; Thu, 16 Aug 2007 12:34:38 GMT (envelope-from delphij@freebsd.org) Date: Thu, 16 Aug 2007 12:34:38 GMT Message-Id: <200708161234.l7GCYcxJ052554@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to delphij@freebsd.org using -f From: Xin LI To: Perforce Change Reviews Cc: Subject: PERFORCE change 125213 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, 16 Aug 2007 12:34:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=125213 Change 125213 by delphij@tarsier on 2007/08/16 12:34:01 IFC Affected files ... .. //depot/projects/delphij_fork/sys/amd64/conf/NOTES#2 integrate .. //depot/projects/delphij_fork/sys/amd64/include/specialreg.h#2 integrate .. //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_proto.h#3 integrate .. //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_syscall.h#3 integrate .. //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_syscalls.c#3 integrate .. //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_sysent.c#3 integrate .. //depot/projects/delphij_fork/sys/compat/freebsd32/syscalls.master#3 integrate .. //depot/projects/delphij_fork/sys/conf/files.amd64#3 integrate .. //depot/projects/delphij_fork/sys/conf/files.i386#3 integrate .. //depot/projects/delphij_fork/sys/dev/coretemp/coretemp.c#1 branch .. //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_vfsops.c#6 integrate .. //depot/projects/delphij_fork/sys/fs/tmpfs/tmpfs_vnops.c#5 integrate .. //depot/projects/delphij_fork/sys/gnu/fs/ext2fs/ext2_vfsops.c#3 integrate .. //depot/projects/delphij_fork/sys/i386/conf/NOTES#2 integrate .. //depot/projects/delphij_fork/sys/i386/include/specialreg.h#2 integrate .. //depot/projects/delphij_fork/sys/kern/init_sysent.c#3 integrate .. //depot/projects/delphij_fork/sys/kern/kern_thr.c#2 integrate .. //depot/projects/delphij_fork/sys/kern/syscalls.c#3 integrate .. //depot/projects/delphij_fork/sys/kern/syscalls.master#3 integrate .. //depot/projects/delphij_fork/sys/kern/systrace_args.c#3 integrate .. //depot/projects/delphij_fork/sys/kern/vfs_mount.c#4 integrate .. //depot/projects/delphij_fork/sys/modules/Makefile#5 integrate .. //depot/projects/delphij_fork/sys/modules/coretemp/Makefile#1 branch .. //depot/projects/delphij_fork/sys/netinet/sctp_asconf.c#6 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_input.c#7 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_output.c#6 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_pcb.c#6 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_timer.c#5 integrate .. //depot/projects/delphij_fork/sys/netinet/sctp_usrreq.c#7 integrate .. //depot/projects/delphij_fork/sys/netinet/sctputil.c#6 integrate .. //depot/projects/delphij_fork/sys/netinet/tcp_subr.c#5 integrate .. //depot/projects/delphij_fork/sys/sys/syscall.h#3 integrate .. //depot/projects/delphij_fork/sys/sys/syscall.mk#3 integrate .. //depot/projects/delphij_fork/sys/sys/sysproto.h#3 integrate .. //depot/projects/delphij_fork/sys/sys/thr.h#2 integrate Differences ... ==== //depot/projects/delphij_fork/sys/amd64/conf/NOTES#2 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.68 2007/07/04 00:18:38 bz Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.69 2007/08/15 19:26:02 des Exp $ # # @@ -446,6 +446,13 @@ # device ichwd +# +# Temperature sensors: +# +# coretemp: on-die sensor on Intel Core and newer CPUs +# +device coretemp + #--------------------------------------------------------------------------- # ISDN4BSD # ==== //depot/projects/delphij_fork/sys/amd64/include/specialreg.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.39 2007/05/31 11:26:44 des Exp $ + * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.40 2007/08/15 19:26:01 des Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -179,6 +179,7 @@ #define MSR_BIOS_SIGN 0x08b #define MSR_PERFCTR0 0x0c1 #define MSR_PERFCTR1 0x0c2 +#define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */ #define MSR_MTRRcap 0x0fe #define MSR_BBL_CR_ADDR 0x116 #define MSR_BBL_CR_DECC 0x118 ==== //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_proto.h#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.77 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.78 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ ==== //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_syscall.h#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.75 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.76 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -337,4 +337,5 @@ #define FREEBSD32_SYS_freebsd32_lseek 478 #define FREEBSD32_SYS_freebsd32_truncate 479 #define FREEBSD32_SYS_freebsd32_ftruncate 480 -#define FREEBSD32_SYS_MAXSYSCALL 481 +#define FREEBSD32_SYS_thr_kill2 481 +#define FREEBSD32_SYS_MAXSYSCALL 482 ==== //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_syscalls.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.66 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.67 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -488,4 +488,5 @@ "freebsd32_lseek", /* 478 = freebsd32_lseek */ "freebsd32_truncate", /* 479 = freebsd32_truncate */ "freebsd32_ftruncate", /* 480 = freebsd32_ftruncate */ + "thr_kill2", /* 481 = thr_kill2 */ }; ==== //depot/projects/delphij_fork/sys/compat/freebsd32/freebsd32_sysent.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.76 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.77 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -519,4 +519,5 @@ { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0 }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0 }, /* 479 = freebsd32_truncate */ { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0 }, /* 480 = freebsd32_ftruncate */ + { AS(thr_kill2_args), (sy_call_t *)thr_kill2, AUE_KILL, NULL, 0, 0 }, /* 481 = thr_kill2 */ }; ==== //depot/projects/delphij_fork/sys/compat/freebsd32/syscalls.master#3 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp $ + $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.91 2007/08/16 05:30:04 davidxu Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; from: src/sys/kern/syscalls.master 1.107 ; @@ -794,3 +794,4 @@ u_int32_t lengthlo, u_int32_t lengthhi); } 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ u_int32_t lengthlo, u_int32_t lengthhi); } +481 AUE_KILL NOPROTO { int thr_kill2(pid_t pid, long id, int sig); } ==== //depot/projects/delphij_fork/sys/conf/files.amd64#3 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.106 2007/07/05 06:12:40 peter Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.107 2007/08/15 19:26:01 des Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -145,6 +145,7 @@ dev/atkbdc/atkbdc_isa.c optional atkbdc isa dev/atkbdc/atkbdc_subr.c optional atkbdc dev/atkbdc/psm.c optional psm atkbdc +dev/coretemp/coretemp.c optional coretemp # There are no systems with isa slots, so all ed isa entries should go.. dev/ed/if_ed_3c503.c optional ed isa ed_3c503 dev/ed/if_ed_isa.c optional ed isa ==== //depot/projects/delphij_fork/sys/conf/files.i386#3 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.579 2007/07/05 06:12:40 peter Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.580 2007/08/15 19:26:01 des Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -158,6 +158,7 @@ dev/ce/if_ce.c optional ce dev/ce/tau32-ddk.c optional ce dev/cm/if_cm_isa.c optional cm isa +dev/coretemp/coretemp.c optional coretemp dev/cp/cpddk.c optional cp dev/cp/if_cp.c optional cp dev/ctau/ctau.c optional ctau ==== //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_vfsops.c#6 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.173 2007/08/07 03:38:36 bde Exp $ */ +/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.174 2007/08/15 17:40:09 jhb Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */ /*- @@ -77,7 +77,7 @@ /* List of mount options we support */ static const char *msdosfs_opts[] = { "from", - "atime", "export", "force", "sync", + "noatime", "export", "force", "sync", "uid", "gid", "mask", "dirmask", "shortname", "shortnames", "longname", "longnames", "nowin95", "win95", "kiconv", "cs_win", "cs_dos", "cs_local", "large", ==== //depot/projects/delphij_fork/sys/fs/tmpfs/tmpfs_vnops.c#5 (text+ko) ==== @@ -41,7 +41,7 @@ * tmpfs vnode interface. */ #include -__FBSDID("$FreeBSD: src/sys/fs/tmpfs/tmpfs_vnops.c,v 1.10 2007/08/10 11:00:30 delphij Exp $"); +__FBSDID("$FreeBSD: src/sys/fs/tmpfs/tmpfs_vnops.c,v 1.11 2007/08/16 11:00:07 delphij Exp $"); #include #include @@ -1219,22 +1219,25 @@ startoff = uio->uio_offset; - switch (startoff) { - case TMPFS_DIRCOOKIE_DOT: + if (uio->uio_offset == TMPFS_DIRCOOKIE_DOT) { error = tmpfs_dir_getdotdent(node, uio); - if (error == 0) - cnt++; - break; - case TMPFS_DIRCOOKIE_DOTDOT: + if (error != 0) + goto outok; + cnt++; + } + + if (uio->uio_offset == TMPFS_DIRCOOKIE_DOTDOT) { error = tmpfs_dir_getdotdotdent(node, uio); - if (error == 0) - cnt++; - break; - default: - error = tmpfs_dir_getdents(node, uio, &cnt); - MPASS(error >= -1); + if (error != 0) + goto outok; + cnt++; } + error = tmpfs_dir_getdents(node, uio, &cnt); + +outok: + MPASS(error >= -1); + if (error == -1) error = 0; ==== //depot/projects/delphij_fork/sys/gnu/fs/ext2fs/ext2_vfsops.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94 - * $FreeBSD: src/sys/gnu/fs/ext2fs/ext2_vfsops.c,v 1.164 2007/07/14 21:18:19 rodrigc Exp $ + * $FreeBSD: src/sys/gnu/fs/ext2fs/ext2_vfsops.c,v 1.165 2007/08/15 17:40:09 jhb Exp $ */ /*- @@ -118,8 +118,8 @@ struct ext2_super_block * es, struct ext2_sb_info * fs); static const char *ext2_opts[] = { "from", "export", "union", "acls", "exec", - "atime", "union", "suiddir", "multilabel", "symfollow", "clusterr", - "clusterw", "force", NULL }; + "noatime", "union", "suiddir", "multilabel", "nosymfollow", + "noclusterr", "noclusterw", "force", NULL }; /* * VFS Operations. ==== //depot/projects/delphij_fork/sys/i386/conf/NOTES#2 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1243 2007/07/04 00:18:38 bz Exp $ +# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1244 2007/08/15 19:26:03 des Exp $ # # @@ -853,6 +853,13 @@ # device ichwd +# +# Temperature sensors: +# +# coretemp: on-die sensor on Intel Core and newer CPUs +# +device coretemp + #--------------------------------------------------------------------------- # ISDN4BSD # ==== //depot/projects/delphij_fork/sys/i386/include/specialreg.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/i386/include/specialreg.h,v 1.41 2007/05/31 11:26:45 des Exp $ + * $FreeBSD: src/sys/i386/include/specialreg.h,v 1.42 2007/08/15 19:26:02 des Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -176,6 +176,7 @@ #define MSR_BIOS_SIGN 0x08b #define MSR_PERFCTR0 0x0c1 #define MSR_PERFCTR1 0x0c2 +#define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */ #define MSR_MTRRcap 0x0fe #define MSR_BBL_CR_ADDR 0x116 #define MSR_BBL_CR_DECC 0x118 ==== //depot/projects/delphij_fork/sys/kern/init_sysent.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/init_sysent.c,v 1.229 2007/07/04 22:49:54 peter Exp $ + * $FreeBSD: src/sys/kern/init_sysent.c,v 1.230 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.232 2007/07/04 22:47:37 peter Exp */ @@ -510,4 +510,5 @@ { AS(lseek_args), (sy_call_t *)lseek, AUE_LSEEK, NULL, 0, 0 }, /* 478 = lseek */ { AS(truncate_args), (sy_call_t *)truncate, AUE_TRUNCATE, NULL, 0, 0 }, /* 479 = truncate */ { AS(ftruncate_args), (sy_call_t *)ftruncate, AUE_FTRUNCATE, NULL, 0, 0 }, /* 480 = ftruncate */ + { AS(thr_kill2_args), (sy_call_t *)thr_kill2, AUE_KILL, NULL, 0, 0 }, /* 481 = thr_kill2 */ }; ==== //depot/projects/delphij_fork/sys/kern/kern_thr.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_thr.c,v 1.61 2007/06/07 19:45:19 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_thr.c,v 1.62 2007/08/16 05:26:41 davidxu Exp $"); #include "opt_compat.h" #include "opt_posix.h" @@ -53,6 +53,8 @@ #include +#include + #ifdef COMPAT_IA32 extern struct sysentvec ia32_freebsd_sysvec; @@ -337,6 +339,59 @@ } int +thr_kill2(struct thread *td, struct thr_kill2_args *uap) + /* pid_t pid, long id, int sig */ +{ + struct thread *ttd; + struct proc *p; + int error; + + AUDIT_ARG(signum, uap->sig); + + if (uap->pid == td->td_proc->p_pid) { + p = td->td_proc; + PROC_LOCK(p); + } else if ((p = pfind(uap->pid)) == NULL) { + return (ESRCH); + } + AUDIT_ARG(process, p); + + error = p_cansignal(td, p, uap->sig); + if (error == 0) { + if (uap->id == -1) { + if (uap->sig != 0 && !_SIG_VALID(uap->sig)) { + error = EINVAL; + } else { + error = ESRCH; + FOREACH_THREAD_IN_PROC(p, ttd) { + if (ttd != td) { + error = 0; + if (uap->sig == 0) + break; + tdsignal(p, ttd, uap->sig, NULL); + } + } + } + } else { + if (uap->id != td->td_tid) + ttd = thread_find(p, uap->id); + else + ttd = td; + if (ttd == NULL) + error = ESRCH; + else if (uap->sig == 0) + ; + else if (!_SIG_VALID(uap->sig)) + error = EINVAL; + else + tdsignal(p, ttd, uap->sig, NULL); + } + } + PROC_UNLOCK(p); + return (error); +} + +int thr_suspend(struct thread *td, struct thr_suspend_args *uap) /* const struct timespec *timeout */ { ==== //depot/projects/delphij_fork/sys/kern/syscalls.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/syscalls.c,v 1.213 2007/07/04 22:49:55 peter Exp $ + * $FreeBSD: src/sys/kern/syscalls.c,v 1.214 2007/08/16 05:32:26 davidxu Exp $ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.232 2007/07/04 22:47:37 peter Exp */ @@ -488,4 +488,5 @@ "lseek", /* 478 = lseek */ "truncate", /* 479 = truncate */ "ftruncate", /* 480 = ftruncate */ + "thr_kill2", /* 481 = thr_kill2 */ }; ==== //depot/projects/delphij_fork/sys/kern/syscalls.master#3 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/kern/syscalls.master,v 1.232 2007/07/04 22:47:37 peter Exp $ + $FreeBSD: src/sys/kern/syscalls.master,v 1.233 2007/08/16 05:26:41 davidxu Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; ; System call name/number master file. @@ -846,5 +846,6 @@ int whence); } 479 AUE_TRUNCATE STD { int truncate(char *path, off_t length); } 480 AUE_FTRUNCATE STD { int ftruncate(int fd, off_t length); } +481 AUE_KILL STD { int thr_kill2(pid_t pid, long id, int sig); } ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master ==== //depot/projects/delphij_fork/sys/kern/systrace_args.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call argument to DTrace register array converstion. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/systrace_args.c,v 1.13 2007/07/04 22:49:55 peter Exp $ + * $FreeBSD: src/sys/kern/systrace_args.c,v 1.14 2007/08/16 05:32:26 davidxu Exp $ * This file is part of the DTrace syscall provider. */ @@ -2862,6 +2862,15 @@ *n_args = 2; break; } + /* thr_kill2 */ + case 481: { + struct thr_kill2_args *p = params; + iarg[0] = p->pid; /* pid_t */ + iarg[1] = p->id; /* long */ + iarg[2] = p->sig; /* int */ + *n_args = 3; + break; + } default: *n_args = 0; break; ==== //depot/projects/delphij_fork/sys/kern/vfs_mount.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.263 2007/07/26 16:52:57 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.264 2007/08/15 17:40:09 jhb Exp $"); #include #include @@ -137,8 +137,8 @@ "rdonly", "ro", "rw", - "suid", - "exec", + "nosuid", + "noexec", "update", NULL }; @@ -638,16 +638,40 @@ fsflags &= ~MNT_ASYNC; else if (strcmp(opt->name, "noatime") == 0) fsflags |= MNT_NOATIME; + else if (strcmp(opt->name, "atime") == 0) { + free(opt->name, M_MOUNT); + opt->name = strdup("nonoatime", M_MOUNT); + } else if (strcmp(opt->name, "noclusterr") == 0) fsflags |= MNT_NOCLUSTERR; + else if (strcmp(opt->name, "clusterr") == 0) { + free(opt->name, M_MOUNT); + opt->name = strdup("nonoclusterr", M_MOUNT); + } else if (strcmp(opt->name, "noclusterw") == 0) fsflags |= MNT_NOCLUSTERW; + else if (strcmp(opt->name, "clusterw") == 0) { + free(opt->name, M_MOUNT); + opt->name = strdup("nonoclusterw", M_MOUNT); + } else if (strcmp(opt->name, "noexec") == 0) fsflags |= MNT_NOEXEC; + else if (strcmp(opt->name, "exec") == 0) { + free(opt->name, M_MOUNT); + opt->name = strdup("nonoexec", M_MOUNT); + } else if (strcmp(opt->name, "nosuid") == 0) fsflags |= MNT_NOSUID; + else if (strcmp(opt->name, "suid") == 0) { + free(opt->name, M_MOUNT); + opt->name = strdup("nonosuid", M_MOUNT); + } else if (strcmp(opt->name, "nosymfollow") == 0) fsflags |= MNT_NOSYMFOLLOW; + else if (strcmp(opt->name, "symfollow") == 0) { + free(opt->name, M_MOUNT); + opt->name = strdup("nonosymfollow", M_MOUNT); + } else if (strcmp(opt->name, "noro") == 0) { fsflags &= ~MNT_RDONLY; has_noro = 1; @@ -1760,26 +1784,47 @@ vfs_filteropt(struct vfsoptlist *opts, const char **legal) { struct vfsopt *opt; - const char **t, *p; + char errmsg[255]; + const char **t, *p, *q; + int ret = 0; TAILQ_FOREACH(opt, opts, link) { p = opt->name; + q = NULL; if (p[0] == 'n' && p[1] == 'o') - p += 2; - for(t = global_opts; *t != NULL; t++) - if (!strcmp(*t, p)) + q = p + 2; + for(t = global_opts; *t != NULL; t++) { + if (strcmp(*t, p) == 0) break; + if (q != NULL) { + if (strcmp(*t, q) == 0) + break; + } + } if (*t != NULL) continue; - for(t = legal; *t != NULL; t++) - if (!strcmp(*t, p)) + for(t = legal; *t != NULL; t++) { + if (strcmp(*t, p) == 0) break; + if (q != NULL) { + if (strcmp(*t, q) == 0) + break; + } + } if (*t != NULL) continue; - printf("mount option <%s> is unknown\n", p); - return (EINVAL); + sprintf(errmsg, "mount option <%s> is unknown", p); + printf("%s\n", errmsg); + ret = EINVAL; + } + if (ret != 0) { + TAILQ_FOREACH(opt, opts, link) { + if (strcmp(opt->name, "errmsg") == 0) { + strncpy((char *)opt->value, errmsg, opt->len); + } + } } - return (0); + return (ret); } /* ==== //depot/projects/delphij_fork/sys/modules/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/Makefile,v 1.538 2007/07/24 16:58:18 scottl Exp $ +# $FreeBSD: src/sys/modules/Makefile,v 1.539 2007/08/15 19:26:02 des Exp $ .include @@ -54,6 +54,7 @@ coda \ coda5 \ ${_coff} \ + ${_coretemp} \ ${_cp} \ ${_cpufreq} \ ${_crypto} \ @@ -370,6 +371,7 @@ _cbb= cbb _ce= ce _coff= coff +_coretemp= coretemp _cp= cp _cpufreq= cpufreq _cs= cs @@ -489,6 +491,7 @@ _cardbus= cardbus _cbb= cbb _ciss= ciss +_coretemp= coretemp _cpufreq= cpufreq _digi= digi _drm= drm ==== //depot/projects/delphij_fork/sys/netinet/sctp_asconf.c#6 (text+ko) ==== @@ -31,7 +31,7 @@ /* $KAME: sctp_asconf.c,v 1.24 2005/03/06 16:04:16 itojun Exp $ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/sctp_asconf.c,v 1.23 2007/07/24 20:06:01 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctp_asconf.c,v 1.24 2007/08/16 01:51:22 rrs Exp $"); #include #include #include @@ -872,6 +872,47 @@ } /* + * cleanup any cached source addresses that may be topologically + * incorrect after a new address has been added to this interface. + */ +static void +sctp_asconf_nets_cleanup(struct sctp_tcb *stcb, struct sctp_ifn *ifn) +{ + struct sctp_nets *net; + + /* + * Ideally, we want to only clear cached routes and source addresses + * that are topologically incorrect. But since there is no easy way + * to know whether the newly added address on the ifn would cause a + * routing change (i.e. a new egress interface would be chosen) + * without doing a new routing lookup and source address selection, + * we will (for now) just flush any cached route using a different + * ifn (and cached source addrs) and let output re-choose them + * during the next send on that net. + */ + TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { + /* + * clear any cached route (and cached source address) if the + * route's interface is NOT the same as the address change. + * If it's the same interface, just clear the cached source + * address. + */ + if (SCTP_ROUTE_HAS_VALID_IFN(&net->ro) && + SCTP_GET_IF_INDEX_FROM_ROUTE(&net->ro) != ifn->ifn_index) { + /* clear any cached route */ + RTFREE(net->ro.ro_rt); + net->ro.ro_rt = NULL; + } + /* clear any cached source address */ + if (net->src_addr_selected) { + sctp_free_ifa(net->ro._s_addr); + net->ro._s_addr = NULL; + net->src_addr_selected = 0; + } + } +} + +/* * process an ADD/DELETE IP ack from peer. * addr: corresponding sctp_ifa to the address being added/deleted. * type: SCTP_ADD_IP_ADDRESS or SCTP_DEL_IP_ADDRESS. @@ -883,8 +924,8 @@ { /* * do the necessary asoc list work- if we get a failure indication, - * leave the address on the "do not use" asoc list if we get a - * success indication, remove the address from the list + * leave the address on the assoc's restricted list. If we get a + * success indication, remove the address from the restricted list. */ /* * Note: this will only occur for ADD_IP_ADDRESS, since @@ -893,6 +934,12 @@ if (flag) { /* success case, so remove from the restricted list */ sctp_del_local_addr_restricted(stcb, addr); + + /* + * clear any cached, topologically incorrect source + * addresses + */ + sctp_asconf_nets_cleanup(stcb, addr->ifn_p); } /* else, leave it on the list */ } ==== //depot/projects/delphij_fork/sys/netinet/sctp_input.c#7 (text+ko) ==== @@ -31,7 +31,7 @@ /* $KAME: sctp_input.c,v 1.27 2005/03/06 16:04:17 itojun Exp $ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/sctp_input.c,v 1.55 2007/08/06 15:46:46 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctp_input.c,v 1.56 2007/08/16 01:51:22 rrs Exp $"); #include #include @@ -2186,16 +2186,13 @@ return (m); } oso = (*inp_p)->sctp_socket; - /* - * We do this to keep the sockets side happy durin - * the sonewcon ONLY. - */ + atomic_add_int(&(*stcb)->asoc.refcnt, 1); SCTP_TCB_UNLOCK((*stcb)); so = sonewconn(oso, 0 ); - SCTP_INP_WLOCK((*stcb)->sctp_ep); SCTP_TCB_LOCK((*stcb)); - SCTP_INP_WUNLOCK((*stcb)->sctp_ep); + atomic_subtract_int(&(*stcb)->asoc.refcnt, 1); + if (so == NULL) { struct mbuf *op_err; @@ -3968,7 +3965,6 @@ SCTP_TCB_UNLOCK(locked_tcb); } return (NULL); - } if (netp && *netp) { int abort_flag = 0; ==== //depot/projects/delphij_fork/sys/netinet/sctp_output.c#6 (text+ko) ==== @@ -31,7 +31,7 @@ /* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/sctp_output.c,v 1.48 2007/07/24 20:06:01 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctp_output.c,v 1.49 2007/08/16 01:51:22 rrs Exp $"); #include #include @@ -2692,11 +2692,11 @@ uint32_t ifn_index; struct sctp_vrf *vrf; - /* - * For boundall we can use any address in the association. If - * non_asoc_addr_ok is set we can use any address (at least in - * theory). So we look for preferred addresses first. If we find - * one, we use it. Otherwise we next try to get an address on the + /*- + * For boundall we can use any address in the association. + * If non_asoc_addr_ok is set we can use any address (at least in + * theory). So we look for preferred addresses first. If we find one, + * we use it. Otherwise we next try to get an address on the * interface, which we should be able to do (unless non_asoc_addr_ok * is false and we are routed out that way). In these cases where we * can't use the address of the interface we go through all the @@ -2898,43 +2898,51 @@ struct sctp_nets *net, int non_asoc_addr_ok, uint32_t vrf_id) { - struct sockaddr_in *to = (struct sockaddr_in *)&ro->ro_dst; struct sockaddr_in6 *to6 = (struct sockaddr_in6 *)&ro->ro_dst; struct sctp_ifa *answer; uint8_t dest_is_priv, dest_is_loop; sa_family_t fam; - /* + /*- * Rules: - Find the route if needed, cache if I can. - Look at * interface address in route, Is it in the bound list. If so we * have the best source. - If not we must rotate amongst the * addresses. - * + * * Cavets and issues - * + * * Do we need to pay attention to scope. We can have a private address * or a global address we are sourcing or sending to. So if we draw - * it out zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz - * For V4 ------------------------------------------ source * - * dest * result ----------------------------------------- - * Private * Global * NAT - * ----------------------------------------- Private * - * Private * No problem ----------------------------------------- - * Global * Private * Huh, How will this work? - * ----------------------------------------- Global * - * Global * No Problem ------------------------------------------ - * zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz For V6 - * ------------------------------------------ source * dest * - * result ----------------------------------------- Linklocal * - * Global * ----------------------------------------- - * Linklocal * Linklocal * No problem - * ----------------------------------------- Global * - * Linklocal * Huh, How will this work? - * ----------------------------------------- Global * - * Global * No Problem ------------------------------------------ + * it out + * zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz + * For V4 + *------------------------------------------ + * source * dest * result + * ----------------------------------------- + * Private * Global * NAT + * ----------------------------------------- + * Private * Private * No problem + * ----------------------------------------- + * Global * Private * Huh, How will this work? + * ----------------------------------------- + * Global * Global * No Problem + *------------------------------------------ + * zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz + * For V6 + *------------------------------------------ + * source * dest * result + * ----------------------------------------- + * Linklocal * Global * + * ----------------------------------------- + * Linklocal * Linklocal * No problem + * ----------------------------------------- + * Global * Linklocal * Huh, How will this work? + * ----------------------------------------- + * Global * Global * No Problem + *------------------------------------------ * zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz - * + * * And then we add to that what happens if there are multiple addresses * assigned to an interface. Remember the ifa on a ifn is a linked * list of addresses. So one interface can have more than one IP @@ -2943,18 +2951,20 @@ * one is best? And what about NAT's sending P->G may get you a NAT * translation, or should you select the G thats on the interface in * preference. - * + * * Decisions: - * - * - count the number of addresses on the interface. - if it is one, no - * problem except case . For we will assume a NAT out there. + * + * - count the number of addresses on the interface. + * - if it is one, no problem except case . + * For we will assume a NAT out there. * - if there are more than one, then we need to worry about scope P - * or G. We should prefer G -> G and P -> P if possible. Then as a - * secondary fall back to mixed types G->P being a last ditch one. - - * The above all works for bound all, but bound specific we need to - * use the same concept but instead only consider the bound - * addresses. If the bound set is NOT assigned to the interface then - * we must use rotation amongst the bound addresses.. + * or G. We should prefer G -> G and P -> P if possible. + * Then as a secondary fall back to mixed types G->P being a last + * ditch one. + * - The above all works for bound all, but bound specific we need to + * use the same concept but instead only consider the bound + * addresses. If the bound set is NOT assigned to the interface then + * we must use rotation amongst the bound addresses.. */ if (ro->ro_rt == NULL) { /* @@ -11535,7 +11545,6 @@ if ((net->flight_size > net->cwnd) && (sctp_cmt_on_off == 0)) { queue_only = 1; - } else if (asoc->ifp_had_enobuf) { SCTP_STAT_INCR(sctps_ifnomemqueued); if (net->flight_size > (net->mtu * 2)) { @@ -11624,7 +11633,6 @@ sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_USR_SEND); - } } else { sctp_chunk_output(inp, @@ -11835,7 +11843,6 @@ (stcb->asoc.total_flight > 0) && (un_sent < (int)(stcb->asoc.smallest_mtu - SCTP_MIN_OVERHEAD)) ) { - /*- * Ok, Nagle is set on and we have data outstanding. * Don't send anything and let SACKs drive out the ==== //depot/projects/delphij_fork/sys/netinet/sctp_pcb.c#6 (text+ko) ==== @@ -31,7 +31,7 @@ /* $KAME: sctp_pcb.c,v 1.38 2005/03/06 16:04:18 itojun Exp $ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/sctp_pcb.c,v 1.51 2007/07/24 20:06:01 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctp_pcb.c,v 1.52 2007/08/16 01:51:22 rrs Exp $"); #include #include @@ -1263,7 +1263,6 @@ /* Find the head of the ALLADDR chain */ if (have_lock == 0) { SCTP_INP_INFO_RLOCK(); - } head = &sctppcbinfo.sctp_ephash[SCTP_PCBHASH_ALLADDR(lport, sctppcbinfo.hashmark)]; @@ -3785,7 +3784,7 @@ /* Held for PD-API clear that. */ sq->pdapi_aborted = 1; sq->held_length = 0; - if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_PDAPIEVNT)) { + if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_PDAPIEVNT) && (so != NULL)) { /* * Need to add a PD-API * aborted indication. @@ -3917,7 +3916,6 @@ LIST_REMOVE(stcb, sctp_asocs); sctp_add_vtag_to_timewait(inp, asoc->my_vtag, SCTP_TIME_WAIT); - /* * Now restop the timers to be sure - this is paranoia at is finest! */ @@ -3929,7 +3927,6 @@ (void)SCTP_OS_TIMER_STOP(&asoc->shut_guard_timer.timer); (void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer); (void)SCTP_OS_TIMER_STOP(&asoc->delayed_event_timer.timer); - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { (void)SCTP_OS_TIMER_STOP(&net->fr_timer.timer); (void)SCTP_OS_TIMER_STOP(&net->rxt_timer.timer); ==== //depot/projects/delphij_fork/sys/netinet/sctp_timer.c#5 (text+ko) ==== @@ -31,7 +31,7 @@ /* $KAME: sctp_timer.c,v 1.29 2005/03/06 16:04:18 itojun Exp $ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/sctp_timer.c,v 1.25 2007/07/24 20:06:02 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctp_timer.c,v 1.26 2007/08/16 01:51:22 rrs Exp $"); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Aug 16 15:22:37 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EAA7216A418; Thu, 16 Aug 2007 15:22: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 A895216A469 for ; Thu, 16 Aug 2007 15:22:36 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 98D6913C49D for ; Thu, 16 Aug 2007 15:22:36 +0000 (UTC) (envelope-from jbr@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 l7GFMaDk080678 for ; Thu, 16 Aug 2007 15:22:36 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GFMa6s080675 for perforce@freebsd.org; Thu, 16 Aug 2007 15:22:36 GMT (envelope-from jbr@FreeBSD.org) Date: Thu, 16 Aug 2007 15:22:36 GMT Message-Id: <200708161522.l7GFMa6s080675@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125216 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, 16 Aug 2007 15:22:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=125216 Change 125216 by jbr@jbr_bob on 2007/08/16 15:21:38 now with wired page Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#13 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/imgact.h#3 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/proc.h#4 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#8 edit Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#13 (text+ko) ==== @@ -158,12 +158,12 @@ #ifdef SCTL_MASK32 if (req->flags & SCTL_MASK32) { unsigned int val; - val = (unsigned int)p->p_sysshm; + val = (unsigned int)p->p_usrsysshm; error = SYSCTL_OUT(req, &val, sizeof(val)); } else #endif - error = SYSCTL_OUT(req, &p->p_sysshm, - sizeof(p->p_sysshm)); + error = SYSCTL_OUT(req, &p->p_usrsysshm, + sizeof(p->p_usrsysshm)); return error; } @@ -789,7 +789,7 @@ if (imgp->firstpage != NULL) exec_unmap_first_page(imgp); - if (imgp->sysshm != NULL) + if (p->p_kernsysshm != NULL) exec_unmap_sysshm(imgp); if (imgp->vp != NULL) { @@ -914,24 +914,15 @@ struct image_params *imgp; { int error; + struct proc *p = imgp->proc; vm_map_t map = &imgp->proc->p_vmspace->vm_map; - vm_offset_t *addr = &imgp->proc->p_sysshm; -/* - vm_map_t tmap; - vm_object_t object; - vm_map_entry_t entry; - vm_pindex_t pindex; -*/ - if (imgp->sysshm != NULL) + vm_offset_t *addr = &imgp->proc->p_usrsysshm; + + if (p->p_kernsysshm != NULL) exec_unmap_sysshm(imgp); error = vm_map_sysshm(map, addr, 42); -/* - tmap = map; - vm_map_lookup(&tmap, *addr, VM_PROT_READ, &entry, &object, &pindex, NULL, - NULL); - vm_map_lookup_done(tmap, entry); -*/ + return(error); } ==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/imgact.h#3 (text+ko) ==== @@ -60,7 +60,6 @@ char *interpreter_name; /* name of the interpreter */ void *auxargs; /* ELF Auxinfo structure pointer */ struct sf_buf *firstpage; /* first page that we mapped */ - struct sf_buf *sysshm; unsigned long ps_strings; /* PS_STRINGS for BSD/OS binaries */ size_t auxarg_size; struct image_args *args; /* system call arguments */ ==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/proc.h#4 (text+ko) ==== @@ -576,7 +576,8 @@ void *p_emuldata; /* (c) Emulator state data. */ struct label *p_label; /* (*) Proc (not subject) MAC label. */ struct p_sched *p_sched; /* (*) Scheduler-specific data. */ - vm_offset_t p_sysshm; + vm_offset_t p_usrsysshm; + struct sf_buf *p_kernsysshm; STAILQ_HEAD(, ktr_request) p_ktr; /* (o) KTR event queue. */ LIST_HEAD(, mqueue_notifier) p_mqnotifier; /* (c) mqueue notifiers.*/ }; ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#8 (text+ko) ==== @@ -2989,20 +2989,51 @@ int vm_map_sysshm(vm_map_t map, vm_offset_t *addr, vm_size_t size) { - int error = 0; + vm_object_t object; + vm_page_t sysshm_page; size = round_page(size); + PROC_LOCK(curthread->td_proc); - PROC_LOCK(curthread->td_proc); *addr = round_page((vm_offset_t) curthread->td_proc->p_vmspace->vm_daddr) + lim_cur(curthread->td_proc, RLIMIT_DATA); PROC_UNLOCK(curthread->td_proc); + /* error = vm_map_find(map, NULL, 0, addr, size, TRUE, VM_PROT_RW, - VM_PROT_RW, 0); + VM_PROT_RW, MAP_NOFAULT); + */ + + object = vm_object_allocate(OBJT_DEFAULT, 1); + if (!object) + panic("vm_map_sysshm: cannot allocate object"); + + VM_OBJECT_LOCK(object); + sysshm_page = vm_page_alloc(object, 0, VM_ALLOC_NORMAL); + if (!sysshm_page) + panic("vm_page_alloc: cannot allocate sysshm_page"); + + sysshm_page->valid = VM_PAGE_BITS_ALL; + VM_OBJECT_UNLOCK(object); + + if (vm_map_findspace(map, *addr, size, addr)) + return (1); + + if (vm_map_insert(map, object, 0, *addr, *addr + size, VM_PROT_RW, + VM_PROT_RW, 0)) + panic("vm_map_sysshm: cannot insert object into vm_map."); + + pmap_enter(map->pmap, *addr, sysshm_page, VM_PROT_RW, TRUE); + + VM_OBJECT_LOCK(object); + vm_page_lock_queues(); + vm_page_activate(sysshm_page); + vm_page_unlock_queues(); + vm_page_wakeup(sysshm_page); + VM_OBJECT_UNLOCK(object); - return (error); + return (0); } /* From owner-p4-projects@FreeBSD.ORG Thu Aug 16 17:07:31 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 85D4B16A41A; Thu, 16 Aug 2007 17:07: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 5387C16A418 for ; Thu, 16 Aug 2007 17:07:31 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2B9BE13C45D for ; Thu, 16 Aug 2007 17:07:31 +0000 (UTC) (envelope-from lulf@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 l7GH7VIZ098888 for ; Thu, 16 Aug 2007 17:07:31 GMT (envelope-from lulf@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GH7VHw098884 for perforce@freebsd.org; Thu, 16 Aug 2007 17:07:31 GMT (envelope-from lulf@FreeBSD.org) Date: Thu, 16 Aug 2007 17:07:31 GMT Message-Id: <200708161707.l7GH7VHw098884@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to lulf@FreeBSD.org using -f From: Ulf Lilleengen To: Perforce Change Reviews Cc: Subject: PERFORCE change 125220 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, 16 Aug 2007 17:07:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=125220 Change 125220 by lulf@lulf_carrot on 2007/08/16 17:06:45 - Add a diff to the vinum-part of the handbook where I added some sections. Affected files ... .. //depot/projects/soc2007/lulf/vinum_doc.diff#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Thu Aug 16 17:22:53 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 88F6C16A421; Thu, 16 Aug 2007 17:22:53 +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 2F3DC16A41A for ; Thu, 16 Aug 2007 17:22:53 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1D2B713C474 for ; Thu, 16 Aug 2007 17:22:53 +0000 (UTC) (envelope-from rpaulo@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 l7GHMrTk099874 for ; Thu, 16 Aug 2007 17:22:53 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GHMoej099869 for perforce@freebsd.org; Thu, 16 Aug 2007 17:22:50 GMT (envelope-from rpaulo@FreeBSD.org) Date: Thu, 16 Aug 2007 17:22:50 GMT Message-Id: <200708161722.l7GHMoej099869@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo To: Perforce Change Reviews Cc: Subject: PERFORCE change 125221 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, 16 Aug 2007 17:22:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=125221 Change 125221 by rpaulo@rpaulo_alpha on 2007/08/16 17:22:03 IFC Affected files ... .. //depot/projects/soc2007/rpaulo-macbook/amd64/amd64/local_apic.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/amd64/amd64/mp_machdep.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/amd64/conf/NOTES#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/amd64/include/specialreg.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/arm/arm/cpufunc.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/arm/arm/genassym.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/arm/arm/swtch.S#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/boot/arm/at91/libat91/Makefile#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_proto.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_syscall.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_syscalls.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_sysent.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/syscalls.master#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/compat/linux/linux_socket.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/conf/NOTES#16 integrate .. //depot/projects/soc2007/rpaulo-macbook/conf/files#22 integrate .. //depot/projects/soc2007/rpaulo-macbook/conf/files.amd64#8 integrate .. //depot/projects/soc2007/rpaulo-macbook/conf/files.i386#8 integrate .. //depot/projects/soc2007/rpaulo-macbook/conf/kern.pre.mk#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/conf/options#13 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/adlink/adlink.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/an/if_an.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/ata/ata-raid.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/ath/if_ath.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/coretemp/coretemp.c#1 branch .. //depot/projects/soc2007/rpaulo-macbook/dev/cxgb/cxgb_adapter.h#6 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/cxgb/cxgb_main.c#8 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/cxgb/cxgb_offload.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/cxgb/cxgb_sge.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/dc/if_dc.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/dc/if_dcreg.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/em/if_em.c#9 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/ichwd/ichwd.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/ichwd/ichwd.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mfi/mfi.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mfi/mfi_disk.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mfi/mfi_pci.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mfi/mfireg.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mfi/mfivar.h#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mpt/mpt.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mpt/mpt.h#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mpt/mpt_cam.c#6 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/nmdm/nmdm.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/re/if_re.c#6 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/streams/streams.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/usb/ehci.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/usb/if_axe.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/usb/if_axereg.h#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/wi/if_wi.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/denode.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_conv.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_denode.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_fat.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_fileno.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_iconv.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_lookup.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_vfsops.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_vnops.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/tmpfs/tmpfs.h#6 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/tmpfs/tmpfs_subr.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/tmpfs/tmpfs_vfsops.c#8 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/tmpfs/tmpfs_vnops.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/gnu/fs/ext2fs/ext2_vfsops.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/i386/conf/NOTES#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/i386/i386/local_apic.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/i386/i386/machdep.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/i386/i386/mp_machdep.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/i386/include/cpufunc.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/i386/include/specialreg.h#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/ia64/clock.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/ia64/exception.S#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/ia64/interrupt.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/ia64/machdep.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/ia64/mp_machdep.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/ia64/pmap.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/include/ia64_cpu.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/include/md_var.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/init_sysent.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/kern_descrip.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/kern_lockf.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/kern_poll.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/kern_switch.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/kern_thr.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/sched_ule.c#8 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/sys_socket.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/syscalls.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/syscalls.master#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/systrace_args.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/uipc_domain.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/uipc_syscalls.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/vfs_mount.c#6 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/vfs_subr.c#6 integrate .. //depot/projects/soc2007/rpaulo-macbook/modules/Makefile#14 integrate .. //depot/projects/soc2007/rpaulo-macbook/modules/coretemp/Makefile#1 branch .. //depot/projects/soc2007/rpaulo-macbook/modules/netgraph/bluetooth/Makefile#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/net/bpf.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/net/bpfdesc.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/net/bridgestp.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/net/bridgestp.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/net/netisr.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/bluetooth/drivers/h4/ng_h4.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/netflow/netflow.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/ng_ppp.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/ng_ppp.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/in_mcast.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/in_pcb.h#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_divert.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_dummynet.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_fw2.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_input.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_ipsec.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_ipsec.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_mroute.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_asconf.c#11 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_constants.h#10 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_input.c#16 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_output.c#16 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_pcb.c#16 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_timer.c#11 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_uio.h#9 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_usrreq.c#15 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctputil.c#16 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/tcp_subr.c#13 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/tcp_syncache.c#10 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet6/ip6_ipsec.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet6/ip6_ipsec.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netipsec/xform_ah.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/netipsec/xform_esp.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/netipsec/xform_ipcomp.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsclient/bootp_subr.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsclient/krpc_subr.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsclient/nfs_socket.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsclient/nfs_vfsops.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsserver/nfs_srvsock.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsserver/nfs_srvsubs.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsserver/nfs_syscalls.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/pci/if_xl.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/pci/viapm.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/include/interruptvar.h#2 delete .. //depot/projects/soc2007/rpaulo-macbook/powerpc/include/intr_machdep.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/include/md_var.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/include/openpicvar.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/include/trap.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powermac/hrowpic.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powermac/hrowpicvar.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powermac/openpic_macio.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/autoconf.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/interrupt.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/intr_machdep.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/nexus.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/openpic.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/pic_if.m#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/trap.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/psim/openpic_iobus.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/rpc/rpcclnt.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/security/mac/mac_syscalls.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/include/iommureg.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/include/iommuvar.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/pci/psycho.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/pci/psychoreg.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/sbus/sbus.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/sbus/sbusreg.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/sparc64/iommu.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sys/ata.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sys/mutex.h#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/sys/syscall.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/sys/syscall.mk#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/sys/sysproto.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/sys/thr.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/vm/device_pager.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/vm/phys_pager.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/vm/swap_pager.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/vm/vm_pager.c#2 integrate Differences ... ==== //depot/projects/soc2007/rpaulo-macbook/amd64/amd64/local_apic.c#4 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.40 2007/05/08 22:01:02 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.41 2007/08/02 21:17:58 peter Exp $"); #include "opt_hwpmc_hooks.h" @@ -1060,10 +1060,6 @@ if (retval != 0) printf("%s: Failed to setup the local APIC: returned %d\n", best_enum->apic_name, retval); -#ifdef SMP - /* Last, setup the cpu topology now that we have probed CPUs */ - mp_topology(); -#endif } SYSINIT(apic_setup_local, SI_SUB_CPU, SI_ORDER_FIRST, apic_setup_local, NULL) ==== //depot/projects/soc2007/rpaulo-macbook/amd64/amd64/mp_machdep.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.286 2007/06/04 23:56:07 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.287 2007/08/02 21:17:58 peter Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -186,26 +186,14 @@ mp_topology(void) { struct cpu_group *group; - u_int regs[4]; - int logical_cpus; int apic_id; int groups; int cpu; /* Build the smp_topology map. */ /* Nothing to do if there is no HTT support. */ - if ((cpu_feature & CPUID_HTT) == 0) + if (hyperthreading_cpus <= 1) return; - logical_cpus = (cpu_procinfo & CPUID_HTT_CORES) >> 16; - if (logical_cpus <= 1) - return; - /* Nothing to do if reported cores are physical cores. */ - if (strcmp(cpu_vendor, "GenuineIntel") == 0 && cpu_high >= 4) { - cpuid_count(4, 0, regs); - if ((regs[0] & 0x1f) != 0 && - logical_cpus <= ((regs[0] >> 26) & 0x3f) + 1) - return; - } group = &mp_groups[0]; groups = 1; for (cpu = 0, apic_id = 0; apic_id <= MAX_APIC_ID; apic_id++) { @@ -215,7 +203,8 @@ * If the current group has members and we're not a logical * cpu, create a new group. */ - if (group->cg_count != 0 && (apic_id % logical_cpus) == 0) { + if (group->cg_count != 0 && + (apic_id % hyperthreading_cpus) == 0) { group++; groups++; } @@ -420,6 +409,9 @@ } set_interrupt_apic_ids(); + + /* Last, setup the cpu topology now that we have probed CPUs */ + mp_topology(); } ==== //depot/projects/soc2007/rpaulo-macbook/amd64/conf/NOTES#4 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.68 2007/07/04 00:18:38 bz Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.69 2007/08/15 19:26:02 des Exp $ # # @@ -446,6 +446,13 @@ # device ichwd +# +# Temperature sensors: +# +# coretemp: on-die sensor on Intel Core and newer CPUs +# +device coretemp + #--------------------------------------------------------------------------- # ISDN4BSD # ==== //depot/projects/soc2007/rpaulo-macbook/amd64/include/specialreg.h#3 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.39 2007/05/31 11:26:44 des Exp $ + * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.40 2007/08/15 19:26:01 des Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -179,6 +179,7 @@ #define MSR_BIOS_SIGN 0x08b #define MSR_PERFCTR0 0x0c1 #define MSR_PERFCTR1 0x0c2 +#define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */ #define MSR_MTRRcap 0x0fe #define MSR_BBL_CR_ADDR 0x116 #define MSR_BBL_CR_DECC 0x118 ==== //depot/projects/soc2007/rpaulo-macbook/arm/arm/cpufunc.c#3 (text+ko) ==== @@ -45,7 +45,7 @@ * Created : 30/01/97 */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.17 2007/07/27 14:39:41 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.18 2007/08/07 18:37:21 cognet Exp $"); #include #include @@ -148,9 +148,9 @@ arm7tdmi_cache_flushID, /* idcache_wbinv_all */ (void *)arm7tdmi_cache_flushID, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -210,9 +210,9 @@ arm8_cache_purgeID, /* idcache_wbinv_all */ (void *)arm8_cache_purgeID, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -271,9 +271,9 @@ arm9_idcache_wbinv_all, /* idcache_wbinv_all */ arm9_idcache_wbinv_range, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -333,9 +333,9 @@ arm10_idcache_wbinv_all, /* idcache_wbinv_all */ arm10_idcache_wbinv_range, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -395,9 +395,9 @@ sa1_cache_purgeID, /* idcache_wbinv_all */ sa1_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -456,9 +456,9 @@ sa1_cache_purgeID, /* idcache_wbinv_all */ sa1_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -517,9 +517,9 @@ sa1_cache_purgeID, /* idcache_wbinv_all */ sa1_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -581,9 +581,9 @@ xscale_cache_purgeID, /* idcache_wbinv_all */ xscale_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ ==== //depot/projects/soc2007/rpaulo-macbook/arm/arm/genassym.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.9 2007/05/23 13:21:57 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.10 2007/08/08 09:27:52 cognet Exp $"); #include #include #include @@ -92,6 +92,7 @@ ASSYM(TD_PROC, offsetof(struct thread, td_proc)); ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); ASSYM(TD_MD, offsetof(struct thread, td_md)); +ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); ASSYM(MD_TP, offsetof(struct mdthread, md_tp)); ASSYM(TF_R0, offsetof(struct trapframe, tf_r0)); ==== //depot/projects/soc2007/rpaulo-macbook/arm/arm/swtch.S#2 (text+ko) ==== @@ -83,7 +83,7 @@ #include #include #include -__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.19 2006/04/09 20:16:47 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.20 2007/08/07 18:20:55 cognet Exp $"); /* @@ -127,6 +127,8 @@ .word _C_LABEL(block_userspace_access) .Lcpu_do_powersave: .word _C_LABEL(cpu_do_powersave) +.Lblocked_lock: + .word _C_LABEL(blocked_lock) ENTRY(cpu_throw) mov r5, r1 @@ -214,6 +216,7 @@ ENTRY(cpu_switch) stmfd sp!, {r4-r7, lr} + mov r6, r2 /* Save the mutex */ .Lswitch_resume: /* rem: r0 = old lwp */ @@ -241,10 +244,11 @@ /* Stage two : Save old context */ - /* Get the user structure for the old lwp. */ + /* Get the user structure for the old thread. */ ldr r2, [r0, #(TD_PCB)] + mov r4, r0 /* Save the old thread. */ - /* Save all the registers in the old lwp's pcb */ + /* Save all the registers in the old thread's pcb */ #ifndef __XSCALE__ add r7, r2, #(PCB_R8) stmia r7, {r8-r13} @@ -324,8 +328,7 @@ mov lr, pc ldr pc, [r1, #CF_IDCACHE_WBINV_ALL] .Lcs_cache_purge_skipped: - /* rem: r4 = &block_userspace_access */ - /* rem: r6 = new lwp */ + /* rem: r6 = lock */ /* rem: r9 = new PCB */ /* rem: r10 = old L1 */ /* rem: r11 = new L1 */ @@ -389,6 +392,17 @@ .Lcs_context_switched: + /* Release the old thread */ + str r6, [r4, #TD_LOCK] + ldr r6, .Lblocked_lock + ldr r3, .Lcurthread + ldr r3, [r3] + +1: + ldr r4, [r3, #TD_LOCK] + cmp r4, r6 + beq 1b + /* XXXSCW: Safe to re-enable FIQs here */ /* rem: r9 = new PCB */ @@ -419,7 +433,7 @@ ldr r13, [r7, #(PCB_SP)] #endif - /* rem: r6 = new lwp */ + /* rem: r6 = lock */ /* rem: r7 = new pcb */ #ifdef ARMFPE @@ -429,7 +443,7 @@ #endif /* rem: r5 = new lwp's proc */ - /* rem: r6 = new lwp */ + /* rem: r6 = lock */ /* rem: r7 = new PCB */ .Lswitch_return: ==== //depot/projects/soc2007/rpaulo-macbook/boot/arm/at91/libat91/Makefile#3 (text) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/arm/at91/libat91/Makefile,v 1.9 2007/07/13 14:27:04 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/libat91/Makefile,v 1.10 2007/08/09 05:16:55 imp Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -8,7 +8,7 @@ putchar.c printf.c reset.c spi_flash.c xmodem.c \ sd-card.c strcvt.c strlen.c strcmp.c memcpy.c strcpy.c \ memset.c memcmp.c -SRCS+=ashldi3.c divsi3.c +SRCS+=ashldi3.c divsi3.S NO_MAN= .if ${MK_TAG_LIST} != "no" ==== //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_proto.h#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.77 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.78 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ ==== //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_syscall.h#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.75 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.76 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -337,4 +337,5 @@ #define FREEBSD32_SYS_freebsd32_lseek 478 #define FREEBSD32_SYS_freebsd32_truncate 479 #define FREEBSD32_SYS_freebsd32_ftruncate 480 -#define FREEBSD32_SYS_MAXSYSCALL 481 +#define FREEBSD32_SYS_thr_kill2 481 +#define FREEBSD32_SYS_MAXSYSCALL 482 ==== //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_syscalls.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.66 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.67 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -488,4 +488,5 @@ "freebsd32_lseek", /* 478 = freebsd32_lseek */ "freebsd32_truncate", /* 479 = freebsd32_truncate */ "freebsd32_ftruncate", /* 480 = freebsd32_ftruncate */ + "thr_kill2", /* 481 = thr_kill2 */ }; ==== //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_sysent.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.76 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.77 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -519,4 +519,5 @@ { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0 }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0 }, /* 479 = freebsd32_truncate */ { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0 }, /* 480 = freebsd32_ftruncate */ + { AS(thr_kill2_args), (sy_call_t *)thr_kill2, AUE_KILL, NULL, 0, 0 }, /* 481 = thr_kill2 */ }; ==== //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/syscalls.master#4 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp $ + $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.91 2007/08/16 05:30:04 davidxu Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; from: src/sys/kern/syscalls.master 1.107 ; @@ -794,3 +794,4 @@ u_int32_t lengthlo, u_int32_t lengthhi); } 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ u_int32_t lengthlo, u_int32_t lengthhi); } +481 AUE_KILL NOPROTO { int thr_kill2(pid_t pid, long id, int sig); } ==== //depot/projects/soc2007/rpaulo-macbook/compat/linux/linux_socket.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.73 2007/04/14 10:35:09 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.74 2007/08/06 14:25:59 rwatson Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -670,7 +670,6 @@ * socket and use the file descriptor reference instead of * creating a new one. */ - NET_LOCK_GIANT(); error = fgetsock(td, linux_args.s, &so, &fflag); if (error == 0) { error = EISCONN; @@ -683,7 +682,6 @@ } fputsock(so); } - NET_UNLOCK_GIANT(); return (error); } ==== //depot/projects/soc2007/rpaulo-macbook/conf/NOTES#16 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1447 2007/07/24 15:35:01 scottl Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1449 2007/08/13 17:19:27 emax Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -501,15 +501,15 @@ options IPSEC #IP security (requires device crypto) #options IPSEC_DEBUG #debug for IP security # -# Set IPSEC_FILTERGIF to force packets coming through a gif tunnel -# to be processed by any configured packet filtering (ipfw, ipf). -# The default is that packets coming from a tunnel are _not_ processed; +# Set IPSEC_FILTERTUNNEL to force packets coming through a tunnel +# to be processed by any configured packet filtering twice. +# The default is that packets coming out of a tunnel are _not_ processed; # they are assumed trusted. # # IPSEC history is preserved for such packets, and can be filtered # using ipfw(8)'s 'ipsec' keyword, when this option is enabled. # -#options IPSEC_FILTERGIF #filter ipsec packets from a tunnel +#options IPSEC_FILTERTUNNEL #filter ipsec packets from a tunnel options IPX #IPX/SPX communications protocols @@ -627,7 +627,7 @@ options NETGRAPH_ATM_ATMPIF options NETGRAPH_BLUETOOTH # ng_bluetooth(4) options NETGRAPH_BLUETOOTH_BT3C # ng_bt3c(4) -# options NETGRAPH_BLUETOOTH_H4 # ng_h4(4) - not MPSAFE +options NETGRAPH_BLUETOOTH_H4 # ng_h4(4) options NETGRAPH_BLUETOOTH_HCI # ng_hci(4) options NETGRAPH_BLUETOOTH_L2CAP # ng_l2cap(4) options NETGRAPH_BLUETOOTH_SOCKET # ng_btsocket(4) ==== //depot/projects/soc2007/rpaulo-macbook/conf/files#22 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1241 2007/07/24 15:35:01 scottl Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1242 2007/08/09 01:11:21 marcel Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -259,7 +259,7 @@ contrib/ipfilter/netinet/ip_state.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-error -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \ ==== //depot/projects/soc2007/rpaulo-macbook/conf/files.amd64#8 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.106 2007/07/05 06:12:40 peter Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.107 2007/08/15 19:26:01 des Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -147,6 +147,7 @@ dev/atkbdc/atkbdc_subr.c optional atkbdc dev/atkbdc/psm.c optional psm atkbdc dev/backlight/backlight.c optional backlight +dev/coretemp/coretemp.c optional coretemp # There are no systems with isa slots, so all ed isa entries should go.. dev/ed/if_ed_3c503.c optional ed isa ed_3c503 dev/ed/if_ed_isa.c optional ed isa ==== //depot/projects/soc2007/rpaulo-macbook/conf/files.i386#8 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.579 2007/07/05 06:12:40 peter Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.580 2007/08/15 19:26:01 des Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -160,6 +160,7 @@ dev/ce/if_ce.c optional ce dev/ce/tau32-ddk.c optional ce dev/cm/if_cm_isa.c optional cm isa +dev/coretemp/coretemp.c optional coretemp dev/cp/cpddk.c optional cp dev/cp/if_cp.c optional cp dev/ctau/ctau.c optional ctau ==== //depot/projects/soc2007/rpaulo-macbook/conf/kern.pre.mk#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.91 2007/07/31 03:15:32 marcel Exp $ +# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.92 2007/08/08 19:12:06 marcel Exp $ # Part of a unified Makefile for building kernels. This part contains all # of the definitions that need to be before %BEFORE_DEPEND. @@ -88,7 +88,8 @@ CFLAGS+= --param inline-unit-growth=100 CFLAGS+= --param large-function-growth=1000 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE} == "i386" || \ - ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" + ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "powerpc" || \ + ${MACHINE_ARCH} == "sparc64" WERROR?= -Werror .endif .endif ==== //depot/projects/soc2007/rpaulo-macbook/conf/options#13 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.603 2007/07/24 15:35:01 scottl Exp $ +# $FreeBSD: src/sys/conf/options,v 1.605 2007/08/06 14:25:59 rwatson Exp $ # # On the handling of kernel options # @@ -362,7 +362,7 @@ INET6 opt_inet6.h IPSEC opt_ipsec.h IPSEC_DEBUG opt_ipsec.h -IPSEC_FILTERGIF opt_ipsec.h +IPSEC_FILTERTUNNEL opt_ipsec.h IPDIVERT DUMMYNET opt_ipdn.h IPFILTER opt_ipfilter.h @@ -383,7 +383,6 @@ MBUF_STRESS_TEST NCP NETATALK opt_atalk.h -NET_WITH_GIANT opt_net.h PPP_BSDCOMP opt_ppp.h PPP_DEFLATE opt_ppp.h PPP_FILTER opt_ppp.h ==== //depot/projects/soc2007/rpaulo-macbook/dev/adlink/adlink.c#2 (text+ko) ==== @@ -43,7 +43,7 @@ #ifdef _KERNEL #include -__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.16 2007/02/23 12:18:29 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.17 2007/08/04 17:43:11 kib Exp $"); #include #include @@ -119,6 +119,7 @@ static struct cdevsw adlink_cdevsw = { .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_ioctl = adlink_ioctl, .d_mmap = adlink_mmap, .d_name = "adlink", ==== //depot/projects/soc2007/rpaulo-macbook/dev/an/if_an.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.81 2007/06/08 01:21:20 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.83 2007/08/07 12:26:19 avatar Exp $"); /* * The Aironet 4500/4800 series cards come in PCMCIA, ISA and PCI form. @@ -1065,8 +1065,10 @@ rx_frame.an_rsvd0); #endif #endif + AN_UNLOCK(sc); (*ifp->if_input)(ifp, m); - + AN_LOCK(sc); + an_rx_desc.an_valid = 1; an_rx_desc.an_len = AN_RX_BUFFER_SIZE; an_rx_desc.an_done = 0; @@ -1914,7 +1916,9 @@ error = 0; break; case SIOCGAIRONET: + AN_UNLOCK(sc); error = copyin(ifr->ifr_data, &sc->areq, sizeof(sc->areq)); + AN_LOCK(sc); if (error != 0) break; #ifdef ANCACHE @@ -1940,12 +1944,16 @@ error = EINVAL; break; } + AN_UNLOCK(sc); error = copyout(&sc->areq, ifr->ifr_data, sizeof(sc->areq)); + AN_LOCK(sc); break; case SIOCSAIRONET: if ((error = priv_check(td, PRIV_DRIVER))) goto out; + AN_UNLOCK(sc); error = copyin(ifr->ifr_data, &sc->areq, sizeof(sc->areq)); + AN_LOCK(sc); if (error != 0) break; an_setdef(sc, &sc->areq); @@ -1953,7 +1961,9 @@ case SIOCGPRIVATE_0: /* used by Cisco client utility */ if ((error = priv_check(td, PRIV_DRIVER))) goto out; + AN_UNLOCK(sc); error = copyin(ifr->ifr_data, &l_ioctl, sizeof(l_ioctl)); + AN_LOCK(sc); if (error) goto out; mode = l_ioctl.command; @@ -1969,18 +1979,24 @@ } if (!error) { /* copy out the updated command info */ + AN_UNLOCK(sc); error = copyout(&l_ioctl, ifr->ifr_data, sizeof(l_ioctl)); + AN_LOCK(sc); } break; case SIOCGPRIVATE_1: /* used by Cisco client utility */ if ((error = priv_check(td, PRIV_DRIVER))) goto out; + AN_UNLOCK(sc); error = copyin(ifr->ifr_data, &l_ioctl, sizeof(l_ioctl)); + AN_LOCK(sc); if (error) goto out; l_ioctl.command = 0; error = AIROMAGIC; + AN_UNLOCK(sc); (void) copyout(&error, l_ioctl.data, sizeof(error)); + AN_LOCK(sc); error = 0; break; case SIOCG80211: @@ -2030,8 +2046,10 @@ ireq->i_len = len; bzero(tmpstr, IEEE80211_NWID_LEN); bcopy(tmpptr, tmpstr, len); + AN_UNLOCK(sc); error = copyout(tmpstr, ireq->i_data, IEEE80211_NWID_LEN); + AN_LOCK(sc); break; case IEEE80211_IOC_NUMSSIDS: sc->areq.an_len = sizeof(sc->areq); @@ -2105,7 +2123,9 @@ */ bzero(tmpstr, len); ireq->i_len = len; + AN_UNLOCK(sc); error = copyout(tmpstr, ireq->i_data, len); + AN_LOCK(sc); break; case IEEE80211_IOC_NUMWEPKEYS: ireq->i_val = 9; /* include home key */ @@ -2183,8 +2203,10 @@ tmpptr = config->an_nodename; bzero(tmpstr, IEEE80211_NWID_LEN); bcopy(tmpptr, tmpstr, ireq->i_len); + AN_UNLOCK(sc); error = copyout(tmpstr, ireq->i_data, IEEE80211_NWID_LEN); + AN_LOCK(sc); break; case IEEE80211_IOC_CHANNEL: sc->areq.an_type = AN_RID_STATUS; @@ -2268,9 +2290,11 @@ error = EINVAL; break; } else { + AN_UNLOCK(sc); error = copyin(ireq->i_data, ssids->an_entry[ireq->i_val].an_ssid, ireq->i_len); + AN_LOCK(sc); ssids->an_entry[ireq->i_val].an_len = ireq->i_len; break; @@ -2305,7 +2329,9 @@ error = EINVAL; break; } + AN_UNLOCK(sc); error = copyin(ireq->i_data, tmpstr, 13); + AN_LOCK(sc); if (error != 0) break; /* @@ -2387,8 +2413,10 @@ break; } bzero(config->an_nodename, 16); + AN_UNLOCK(sc); error = copyin(ireq->i_data, config->an_nodename, ireq->i_len); + AN_LOCK(sc); break; case IEEE80211_IOC_CHANNEL: /* @@ -2430,7 +2458,9 @@ an_setdef(sc, &sc->areq); break; default: + AN_UNLOCK(sc); error = ether_ioctl(ifp, command, data); + AN_LOCK(sc); break; } out: @@ -3159,6 +3189,7 @@ { unsigned short rid; struct an_softc *sc; + int error; switch (l_ioctl->command) { case AIROGCAP: @@ -3210,24 +3241,30 @@ l_ioctl->len = sc->areq.an_len - 4; /* just data */ + AN_UNLOCK(sc); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Aug 16 17:25:57 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C94A816A420; Thu, 16 Aug 2007 17:25:57 +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 9FB9216A41A for ; Thu, 16 Aug 2007 17:25:57 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8F77C13C442 for ; Thu, 16 Aug 2007 17:25:57 +0000 (UTC) (envelope-from rpaulo@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 l7GHPv5E000111 for ; Thu, 16 Aug 2007 17:25:57 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GHPvWK000108 for perforce@freebsd.org; Thu, 16 Aug 2007 17:25:57 GMT (envelope-from rpaulo@FreeBSD.org) Date: Thu, 16 Aug 2007 17:25:57 GMT Message-Id: <200708161725.l7GHPvWK000108@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo To: Perforce Change Reviews Cc: Subject: PERFORCE change 125222 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, 16 Aug 2007 17:25:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=125222 Change 125222 by rpaulo@rpaulo_alpha on 2007/08/16 17:25:50 Remove msrtemp driver. Replaced by coretemp driver in HEAD. Affected files ... .. //depot/projects/soc2007/rpaulo-macbook/conf/files.i386#9 edit .. //depot/projects/soc2007/rpaulo-macbook/dev/msrtemp/msrtemp.c#13 delete .. //depot/projects/soc2007/rpaulo-macbook/modules/Makefile#15 edit .. //depot/projects/soc2007/rpaulo-macbook/modules/msrtemp/Makefile#2 delete Differences ... ==== //depot/projects/soc2007/rpaulo-macbook/conf/files.i386#9 (text+ko) ==== @@ -211,7 +211,6 @@ dev/mem/memutil.c optional mem dev/mse/mse.c optional mse dev/mse/mse_isa.c optional mse isa -dev/msrtemp/msrtemp.c optional msrtemp dev/nfe/if_nfe.c optional nfe pci dev/nve/if_nve.c optional nve pci dev/pcf/pcf_isa.c optional pcf ==== //depot/projects/soc2007/rpaulo-macbook/modules/Makefile#15 (text+ko) ==== @@ -175,7 +175,6 @@ msdosfs_iconv \ ${_mse} \ msk \ - ${_msrtemp} \ mxge \ my \ ${_ncp} \ @@ -400,7 +399,6 @@ _linsysfs= linsysfs _linux= linux _mse= mse -_msrtemp= msrtemp .if ${MK_NCP} != "no" _ncp= ncp .endif From owner-p4-projects@FreeBSD.ORG Thu Aug 16 17:33:07 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A035316A41B; Thu, 16 Aug 2007 17:33: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 45ABD16A419 for ; Thu, 16 Aug 2007 17:33:07 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3544913C461 for ; Thu, 16 Aug 2007 17:33:07 +0000 (UTC) (envelope-from jbr@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 l7GHX7Tc000579 for ; Thu, 16 Aug 2007 17:33:07 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GHX6ku000575 for perforce@freebsd.org; Thu, 16 Aug 2007 17:33:06 GMT (envelope-from jbr@FreeBSD.org) Date: Thu, 16 Aug 2007 17:33:06 GMT Message-Id: <200708161733.l7GHX6ku000575@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125223 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, 16 Aug 2007 17:33:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=125223 Change 125223 by jbr@jbr_bob on 2007/08/16 17:32:20 backup Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#14 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#9 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.h#5 edit Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#14 (text+ko) ==== @@ -917,11 +917,15 @@ struct proc *p = imgp->proc; vm_map_t map = &imgp->proc->p_vmspace->vm_map; vm_offset_t *addr = &imgp->proc->p_usrsysshm; + struct sf_buf *kern_buf = p->p_kernsysshm;; + int test = 42; if (p->p_kernsysshm != NULL) exec_unmap_sysshm(imgp); - error = vm_map_sysshm(map, addr, 42); + error = vm_map_sysshm(map, addr, kern_buf, 42); + + copyout((caddr_t) &test, (caddr_t) *addr, sizeof(int)); return(error); } ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#9 (text+ko) ==== @@ -76,6 +76,7 @@ #include #include #include +#include #include #include @@ -2987,7 +2988,8 @@ * process. */ int -vm_map_sysshm(vm_map_t map, vm_offset_t *addr, vm_size_t size) +vm_map_sysshm(vm_map_t map, vm_offset_t *usr_addr, struct sf_buf *kern_buf, + vm_size_t size) { vm_object_t object; vm_page_t sysshm_page; @@ -2995,16 +2997,11 @@ size = round_page(size); PROC_LOCK(curthread->td_proc); - *addr = round_page((vm_offset_t) + *usr_addr = round_page((vm_offset_t) curthread->td_proc->p_vmspace->vm_daddr) + lim_cur(curthread->td_proc, RLIMIT_DATA); PROC_UNLOCK(curthread->td_proc); - /* - error = vm_map_find(map, NULL, 0, addr, size, TRUE, VM_PROT_RW, - VM_PROT_RW, MAP_NOFAULT); - */ - object = vm_object_allocate(OBJT_DEFAULT, 1); if (!object) panic("vm_map_sysshm: cannot allocate object"); @@ -3017,22 +3014,27 @@ sysshm_page->valid = VM_PAGE_BITS_ALL; VM_OBJECT_UNLOCK(object); - if (vm_map_findspace(map, *addr, size, addr)) + if (vm_map_findspace(map, *usr_addr, size, usr_addr)) return (1); - if (vm_map_insert(map, object, 0, *addr, *addr + size, VM_PROT_RW, - VM_PROT_RW, 0)) + if (vm_map_insert(map, object, 0, *usr_addr, *usr_addr + size, + VM_PROT_RW, VM_PROT_RW, 0)) panic("vm_map_sysshm: cannot insert object into vm_map."); - pmap_enter(map->pmap, *addr, sysshm_page, VM_PROT_RW, TRUE); + pmap_enter(map->pmap, *usr_addr, sysshm_page, VM_PROT_RW, TRUE); VM_OBJECT_LOCK(object); vm_page_lock_queues(); + vm_page_wire(sysshm_page); vm_page_activate(sysshm_page); vm_page_unlock_queues(); vm_page_wakeup(sysshm_page); VM_OBJECT_UNLOCK(object); + kern_buf = sf_buf_alloc(sysshm_page, SFB_NOWAIT); + if (!kern_buf) + return 1; + return (0); } ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.h#5 (text+ko) ==== @@ -354,7 +354,7 @@ void vm_map_simplify_entry (vm_map_t, vm_map_entry_t); void vm_init2 (void); int vm_map_stack (vm_map_t, vm_offset_t, vm_size_t, vm_prot_t, vm_prot_t, int); -int vm_map_sysshm(vm_map_t, vm_offset_t *, vm_size_t); +int vm_map_sysshm(vm_map_t, vm_offset_t *, struct sf_buf *, vm_size_t); int vm_map_growstack (struct proc *p, vm_offset_t addr); int vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offset_t end, int flags); From owner-p4-projects@FreeBSD.ORG Thu Aug 16 17:41:18 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8F63716A419; Thu, 16 Aug 2007 17:41:18 +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 2E3A316A46B for ; Thu, 16 Aug 2007 17:41:18 +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 1B40513C46E for ; Thu, 16 Aug 2007 17:41:18 +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 l7GHfHIo001087 for ; Thu, 16 Aug 2007 17:41:17 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GHfHfv001084 for perforce@freebsd.org; Thu, 16 Aug 2007 17:41:17 GMT (envelope-from zec@FreeBSD.org) Date: Thu, 16 Aug 2007 17:41:17 GMT Message-Id: <200708161741.l7GHfHfv001084@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 125224 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, 16 Aug 2007 17:41:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=125224 Change 125224 by zec@zec_tpx32 on 2007/08/16 17:40:55 Initial attempt at locking of the global vnet list. The global vnet list is quite static, i.e. it is being read-only traversed relatively often, mostly from timers, currently at around 110 times per second regardless of HZ setting; will be more in HZ range once dummynet gets loaded. It only needs to be updated when new vnets are created or existing ones are deleted. Hence, the vnet list might look like an ideal candidate for read-often write-seldom type of locks, such as sx(9) or rwlock(9). However, so far my experiments with locking the vnet list while processing timers using sx, rwlock, or default mutexes, have been futile; each variant leading to a different LOR storm and / or to temporary system lockups. Therefore I'm attempting to protect the vnet list using a handcrafted shared / exclusive locking scheme... The basic idea is to allow shared read-only access to the vnet list using a refcounted scheme, with the refcount itself being protected by a mutex, while for granting exclusive access the shared refcount must be zero and the mutex must be held during the entire critical section. I.e. the mutex is not held during the shared access sections, but only while bumping the refcount. A condvar(9) is used by read-only threads to wake up the thread(s) waiting to enter an exclusively-locked section. The extra overhead this scheme introduces is that for each read-only section we need two mtx_lock() and two mtx_unlock() calls plus one cv_signal() invocation. This mechanism has yet to be stress-tested on a SMP machine. Given that those are basically my first steps in the strange world of kernel-level multithreading, any comments from more knowledgeable people would be much appreciated... Affected files ... .. //depot/projects/vimage/src/sys/kern/kern_vimage.c#34 edit .. //depot/projects/vimage/src/sys/sys/vimage.h#34 edit Differences ... ==== //depot/projects/vimage/src/sys/kern/kern_vimage.c#34 (text+ko) ==== @@ -33,31 +33,19 @@ #include "opt_ddb.h" #include "opt_vimage.h" -#include #include -#include +#include +#include #include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include #include #include -#include #ifdef DDB #include #endif #include -#include #include #include #include @@ -121,6 +109,21 @@ struct vprocg_list_head vprocg_head; struct vcpu_list_head vcpu_head; +struct cv vnet_list_condvar; +struct mtx vnet_list_refc_mtx; +int vnet_list_refc = 0; + +#define VNET_LIST_LOCK() \ + mtx_lock(&vnet_list_refc_mtx); \ + while (vnet_list_refc != 0) { \ + cv_wait(&vnet_list_condvar, &vnet_list_refc_mtx); \ + printf("XXX vnet_list_refc = %d in %s\n", \ + vnet_list_refc, __FUNCTION__); \ + } + +#define VNET_LIST_UNLOCK() \ + mtx_unlock(&vnet_list_refc_mtx); + static int last_vi_id = 0; static TAILQ_HEAD(vnet_modlink_head, vnet_modlink) vnet_modlink_head; @@ -430,6 +433,7 @@ if (error) return (error); + VNET_LIST_LOCK(); /* XXX should lock vimage list... */ if (strlen(vi_req->vi_name)) { LIST_FOREACH(tvip, &vimage_head, vi_le) if (strcmp(vi_req->vi_name, tvip->vi_name)==0) { @@ -437,9 +441,11 @@ break; } if (vip_r == NULL && !(vi_req->req_action & VI_CREATE)) { + VNET_LIST_UNLOCK(); /* XXX */ return (ESRCH); } if (vip_r != NULL && vi_req->req_action & VI_CREATE) { + VNET_LIST_UNLOCK(); /* XXX */ return (EADDRINUSE); } if (vi_req->req_action == VI_GETNEXT) { @@ -447,6 +453,7 @@ if ((vip_r = LIST_NEXT(vip_r, vi_le)) == 0) vip_r = LIST_FIRST(&vimage_head); if (vip_r == vip) { + VNET_LIST_UNLOCK(); /* XXX */ return (ESRCH); } if (!vi_child_of(vip, vip_r)) @@ -455,6 +462,7 @@ } else vip_r = vip; + VNET_LIST_UNLOCK(); /* XXX */ if (vip_r && !vi_child_of(vip, vip_r) && vi_req->req_action != VI_GET && vi_req->req_action != VI_GETNEXT) @@ -515,9 +523,8 @@ vip_r->vi_parent = vip; } - if (vip == vip_r && vip != &vimage_0) { + if (vip == vip_r && vip != &vimage_0) return (EPERM); - } } return (error); @@ -606,10 +613,12 @@ CURVNET_RESTORE(); - LIST_INSERT_HEAD(&vimage_head, vip, vi_le); + VNET_LIST_LOCK(); /* XXX should lock other lists separately */ LIST_INSERT_HEAD(&vnet_head, vnet, vnet_le); LIST_INSERT_HEAD(&vprocg_head, vprocg, vprocg_le); LIST_INSERT_HEAD(&vcpu_head, vcpu, vcpu_le); + LIST_INSERT_HEAD(&vimage_head, vip, vi_le); + VNET_LIST_UNLOCK(); vi_alloc_done: return (vip); @@ -630,8 +639,9 @@ struct ifnet *ifp, *nifp; struct vnet_modlink *vml; - /* XXX should have the vnet list locked here!!! */ + VNET_LIST_LOCK(); LIST_REMOVE(vnet, vnet_le); + VNET_LIST_UNLOCK(); CURVNET_SET_QUIET(vnet); INIT_VNET_NET(vnet); @@ -663,6 +673,7 @@ vnet->vnet_magic_n = -1; vi_free(vnet, M_VNET); + /* XXX lock those bellow... */ LIST_REMOVE(vprocg, vprocg_le); vi_free(vprocg, M_VPROCG); @@ -772,6 +783,9 @@ 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"); + /* We MUST clear curvnet in vi_init_done before going SMP. */ curvnet = &vnet_0; } ==== //depot/projects/vimage/src/sys/sys/vimage.h#34 (text+ko) ==== @@ -30,17 +30,13 @@ * XXX RCS tag goes here */ - #ifndef _NET_VIMAGE_H_ #define _NET_VIMAGE_H_ - -#include -#include -#include -#include -#include +#include #include +#include +#include #ifdef INVARIANTS #define VNET_DEBUG @@ -218,20 +214,20 @@ #define VNET_ITERLOOP_BEGIN() \ struct vnet *vnet_iter; \ - /* XXX LOCK vnet list */ \ + VNET_LIST_REF(); \ LIST_FOREACH(vnet_iter, &vnet_head, vnet_le) { \ CURVNET_SET(vnet_iter); #define VNET_ITERLOOP_BEGIN_QUIET() \ struct vnet *vnet_iter; \ - /* XXX LOCK vnet list */ \ + VNET_LIST_REF(); \ LIST_FOREACH(vnet_iter, &vnet_head, vnet_le) { \ CURVNET_SET_QUIET(vnet_iter); #define VNET_ITERLOOP_END() \ CURVNET_RESTORE(); \ } \ - /* XXX UNLOCK vnet list */ + VNET_LIST_UNREF(); #else /* !VNET_DEBUG */ @@ -252,7 +248,7 @@ #define VNET_ITERLOOP_BEGIN() \ struct vnet *vnet_iter; \ - /* XXX LOCK vnet list */ \ + VNET_LIST_REF(); \ LIST_FOREACH(vnet_iter, &vnet_head, vnet_le) { \ CURVNET_SET(vnet_iter); @@ -261,7 +257,7 @@ #define VNET_ITERLOOP_END() \ CURVNET_RESTORE(); \ } \ - /* XXX UNLOCK vnet list */ + VNET_LIST_UNREF(); #endif /* !VNET_DEBUG */ @@ -326,7 +322,24 @@ extern struct vnet vnet_0; LIST_HEAD(vnet_list_head, vnet); extern struct vnet_list_head vnet_head; +extern int vnet_list_refc; +extern struct mtx vnet_list_refc_mtx; +extern struct cv vnet_list_condvar; +#define VNET_LIST_REF() \ + mtx_lock(&vnet_list_refc_mtx); \ + vnet_list_refc++; \ + if (vnet_list_refc > 1) \ + printf ("XXX vnet_list_refc = %d in %s\n", \ + vnet_list_refc, __FUNCTION__); \ + mtx_unlock(&vnet_list_refc_mtx); + +#define VNET_LIST_UNREF() \ + mtx_lock(&vnet_list_refc_mtx); \ + vnet_list_refc--; \ + mtx_unlock(&vnet_list_refc_mtx); \ + cv_signal(&vnet_list_condvar); + #define IS_VNET_0(arg) ((arg) == &vnet_0 ? 1 : 0) /* @@ -345,7 +358,6 @@ struct vnet *v_vnet; }; - struct vprocg { LIST_ENTRY(vprocg) vprocg_le; @@ -383,7 +395,6 @@ #endif }; - struct vcpu { LIST_ENTRY(vcpu) vcpu_le; From owner-p4-projects@FreeBSD.ORG Thu Aug 16 17:46:25 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 142EA16A46C; Thu, 16 Aug 2007 17:46:25 +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 BF42D16A469 for ; Thu, 16 Aug 2007 17:46:24 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AE59813C428 for ; Thu, 16 Aug 2007 17:46:24 +0000 (UTC) (envelope-from rpaulo@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 l7GHkOAJ001342 for ; Thu, 16 Aug 2007 17:46:24 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GHkOej001339 for perforce@freebsd.org; Thu, 16 Aug 2007 17:46:24 GMT (envelope-from rpaulo@FreeBSD.org) Date: Thu, 16 Aug 2007 17:46:24 GMT Message-Id: <200708161746.l7GHkOej001339@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo To: Perforce Change Reviews Cc: Subject: PERFORCE change 125225 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, 16 Aug 2007 17:46:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=125225 Change 125225 by rpaulo@rpaulo_alpha on 2007/08/16 17:46:20 Add MacBook Pro support. Doesn't work yet. Affected files ... .. //depot/projects/soc2007/rpaulo-macbook/dev/backlight/backlight.c#12 edit .. //depot/projects/soc2007/rpaulo-macbook/dev/backlight/backlightvar.h#4 edit Differences ... ==== //depot/projects/soc2007/rpaulo-macbook/dev/backlight/backlight.c#12 (text+ko) ==== @@ -23,7 +23,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/soc2007/rpaulo-macbook/dev/backlight/backlight.c#11 $ + * $P4: //depot/projects/soc2007/rpaulo-macbook/dev/backlight/backlight.c#12 $ * */ @@ -64,8 +64,14 @@ static int macbook_attach(device_t); static int macbook_enable(SYSCTL_HANDLER_ARGS); static int macbook_level(SYSCTL_HANDLER_ARGS); +static int macbookpro_attach(device_t); +static int macbookpro_enable(SYSCTL_HANDLER_ARGS); +static int macbookpro_level(SYSCTL_HANDLER_ARGS); struct backlight_model backlight_models[] = { + /* + * MacBook. + */ { "MacBook1,1", 0x8086, 0x27a2, "MacBook Core Duo Backlight Control", macbook_attach, macbook_enable, macbook_level }, @@ -74,6 +80,25 @@ "MacBook Core 2 Duo Backlight Control", macbook_attach, macbook_enable, macbook_level }, + /* + * MacBook Pro. + */ + { "MacBookPro1,1", 0x1002, 0x71c5, + "MacBook Pro Core Duo (15-inch) Backlight Control", + macbookpro_attach, macbookpro_enable, macbookpro_level }, + + { "MacBookPro1,2", 0x1002, 0x71c5, + "MacBook Pro Core Duo (17-inch) Backlight Control", + macbookpro_attach, macbookpro_enable, macbookpro_level }, + + { "MacBookPro2,1", 0x1002, 0x71c5, + "MacBook Pro Core 2 Duo (17-inch) Backlight Control", + macbookpro_attach, macbookpro_enable, macbookpro_level }, + + { "MacBookPro2,2", 0x1002, 0x71c5, + "MacBook Pro Core 2 Duo (15-inch) Backlight Control", + macbookpro_attach, macbookpro_enable, macbookpro_level }, + { NULL, 0, 0 } }; @@ -339,3 +364,110 @@ return (error); } + +/* + * Apple's MacBook Pro specific functions. + */ +static uint32_t +macbookpro_get_current(struct backlight_softc *sc) +{ + uint32_t level; + + level = bus_read_4(sc->sc_res, BACKLIGHT_MBP_OFFSET); + level = level >> BACKLIGHT_MBP_CUR_SHIFT; + + return (level); +} + +static void +macbookpro_set_current(struct backlight_softc *sc, uint32_t value) +{ + uint32_t newlevel; + + newlevel = 0x00000001 | (value << BACKLIGHT_MBP_CUR_SHIFT); + + bus_write_4(sc->sc_res, BACKLIGHT_MBP_OFFSET, newlevel); + + return; +} + +static int +macbookpro_attach(device_t dev) +{ + struct backlight_softc *sc = device_get_softc(dev); + int rid; + + rid = PCIR_BAR(0); + sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + + if (sc->sc_res == NULL) + return (ENOMEM); + + sc->sc_enable = macbookpro_get_current(sc) >= BACKLIGHT_MBP_MIN ? + 1 : 0; + sc->sc_level = macbookpro_get_current(sc); + + return (0); +} + +static int +macbookpro_enable(SYSCTL_HANDLER_ARGS) +{ + struct backlight_softc *sc = (struct backlight_softc *) arg1; + int error; + unsigned int enable; + + enable = macbookpro_get_current(sc) >= BACKLIGHT_MBP_MIN ? 1 : 0; + + error = sysctl_handle_int(oidp, &enable, 0, req); + if (error == 0 && req->newptr != NULL) { + enable = *(unsigned int *)req->newptr; + + switch (enable) { + case 0: + macbookpro_set_current(sc, 0); + break; + case 1: + macbookpro_set_current(sc, sc->sc_level); + break; + default: + return EINVAL; + } + *(unsigned int *)oidp->oid_arg1 = enable; + } + + return (error); +} + +static int +macbookpro_level(SYSCTL_HANDLER_ARGS) +{ + struct backlight_softc *sc = (struct backlight_softc *) arg1; + int error; + uint32_t curlevel; + unsigned int level; + + curlevel = macbookpro_get_current(sc); + + level = (curlevel - BACKLIGHT_MBP_MIN) * 100 / + (BACKLIGHT_MBP_MAX - BACKLIGHT_MBP_MIN); + + error = sysctl_handle_int(oidp, &level, 0, req); + + if (error == 0 && req->newptr != NULL) { + level = *(unsigned int *)req->newptr; + + if (level > 100) + return (EINVAL); + + curlevel = (level * (BACKLIGHT_MBP_MAX - BACKLIGHT_MBP_MIN) + / 100) + BACKLIGHT_MBP_MIN; + macbookpro_set_current(sc, curlevel); + + *(unsigned int *)oidp->oid_arg1 = level; + sc->sc_level = curlevel; + } + + return (error); +} ==== //depot/projects/soc2007/rpaulo-macbook/dev/backlight/backlightvar.h#4 (text+ko) ==== @@ -23,7 +23,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/soc2007/rpaulo-macbook/dev/backlight/backlightvar.h#3 $ + * $P4: //depot/projects/soc2007/rpaulo-macbook/dev/backlight/backlightvar.h#4 $ * */ @@ -62,3 +62,11 @@ #define BACKLIGHT_MB_MAX 0x94 #define BACKLIGHT_MB_OFF 0x12 #define BACKLIGHT_MB_ON 0x1f + +/* + * MacBook Pro specific. + */ +#define BACKLIGHT_MBP_OFFSET 0x7af8 /* register offset */ +#define BACKLIGHT_MBP_CUR_SHIFT 0x08 +#define BACKLIGHT_MBP_MIN 0x00 +#define BACKLIGHT_MBP_MAX 0xff From owner-p4-projects@FreeBSD.ORG Thu Aug 16 18:02:46 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 332FC16A468; Thu, 16 Aug 2007 18:02: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 E8D5A16A419 for ; Thu, 16 Aug 2007 18:02:45 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CCB4713C45B for ; Thu, 16 Aug 2007 18:02:45 +0000 (UTC) (envelope-from rpaulo@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 l7GI2j35002355 for ; Thu, 16 Aug 2007 18:02:45 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GI2jrD002352 for perforce@freebsd.org; Thu, 16 Aug 2007 18:02:45 GMT (envelope-from rpaulo@FreeBSD.org) Date: Thu, 16 Aug 2007 18:02:45 GMT Message-Id: <200708161802.l7GI2jrD002352@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo To: Perforce Change Reviews Cc: Subject: PERFORCE change 125226 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, 16 Aug 2007 18:02:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=125226 Change 125226 by rpaulo@rpaulo_alpha on 2007/08/16 18:02:36 Add some new comments, fix others. Do some kind of initialization routine that's likely to be needed for MacBook Pros. Affected files ... .. //depot/projects/soc2007/rpaulo-macbook/dev/backlight/backlight.c#13 edit Differences ... ==== //depot/projects/soc2007/rpaulo-macbook/dev/backlight/backlight.c#13 (text+ko) ==== @@ -23,10 +23,19 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/soc2007/rpaulo-macbook/dev/backlight/backlight.c#12 $ + * $P4: //depot/projects/soc2007/rpaulo-macbook/dev/backlight/backlight.c#13 $ * */ +/* + * Driver to control LCD backlight on the MacBook and MacBook Pro + * Apple laptops. + * + * All the technical information regarding to register offsets and + * modus operadi (see the big MacBook comment) came from the + * userland utilities for Linux. + */ + #include __FBSDID("$FreeBSD$"); @@ -218,7 +227,7 @@ * Apple's MacBook specific functions. * * This code was inspired on the MacBook backlight control utility by - * Ryan Lortie. The whole reverse engineering was done by him. + * Ryan Lortie. * * There's a register at BACKLIGHT_MB_OFFSET on PCI_BAR(0) that controls * the LCD backlight. @@ -228,7 +237,6 @@ * * The y bits are the maximum brightness level, the x bits are the * current brightness level. - * Apple's firmware sets the x bits to BACKLIGHT_MB_DEF. * There are two thresholds: BACKLIGHT_MB_OFF and BACKLIGHT_MB_ON that * turn off and on the backlight respectively. * @@ -396,6 +404,7 @@ { struct backlight_softc *sc = device_get_softc(dev); int rid; + int32_t state; rid = PCIR_BAR(0); sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, @@ -404,6 +413,14 @@ if (sc->sc_res == NULL) return (ENOMEM); + /* + * Magic values came from backlight.c written by Nicolas + * Boichat. + */ + bus_write_4(sc->sc_res, 0x4dc, 0x00000005); + state = bus_read_4(sc->sc_res, 0x7ae4); + bus_write_4(sc->sc_res, 0x7ae4, state); + sc->sc_enable = macbookpro_get_current(sc) >= BACKLIGHT_MBP_MIN ? 1 : 0; sc->sc_level = macbookpro_get_current(sc); From owner-p4-projects@FreeBSD.ORG Thu Aug 16 18:52:56 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 22ED316A41A; Thu, 16 Aug 2007 18:52: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 A2A1A16A418 for ; Thu, 16 Aug 2007 18:52:55 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8E98C13C457 for ; Thu, 16 Aug 2007 18:52:55 +0000 (UTC) (envelope-from csjp@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 l7GIqt4J006571 for ; Thu, 16 Aug 2007 18:52:55 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GIqmJc006564 for perforce@freebsd.org; Thu, 16 Aug 2007 18:52:48 GMT (envelope-from csjp@freebsd.org) Date: Thu, 16 Aug 2007 18:52:48 GMT Message-Id: <200708161852.l7GIqmJc006564@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125227 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, 16 Aug 2007 18:52:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=125227 Change 125227 by csjp@push on 2007/08/16 18:52:10 IFC the zero copy bpf branch Affected files ... .. //depot/projects/zcopybpf/src/contrib/tcpdump/print-bgp.c#2 integrate .. //depot/projects/zcopybpf/src/sys/Makefile#5 integrate .. //depot/projects/zcopybpf/src/sys/amd64/amd64/cpu_switch.S#4 integrate .. //depot/projects/zcopybpf/src/sys/amd64/amd64/local_apic.c#5 integrate .. //depot/projects/zcopybpf/src/sys/amd64/amd64/mp_machdep.c#6 integrate .. //depot/projects/zcopybpf/src/sys/amd64/amd64/trap.c#4 integrate .. //depot/projects/zcopybpf/src/sys/amd64/conf/NOTES#5 integrate .. //depot/projects/zcopybpf/src/sys/amd64/include/specialreg.h#4 integrate .. //depot/projects/zcopybpf/src/sys/amd64/isa/clock.c#4 integrate .. //depot/projects/zcopybpf/src/sys/amd64/linux32/linux32_sysvec.c#4 integrate .. //depot/projects/zcopybpf/src/sys/arm/arm/busdma_machdep.c#4 integrate .. //depot/projects/zcopybpf/src/sys/arm/arm/cpufunc.c#3 integrate .. //depot/projects/zcopybpf/src/sys/arm/arm/cpufunc_asm_xscale_c3.S#1 branch .. //depot/projects/zcopybpf/src/sys/arm/arm/elf_trampoline.c#3 integrate .. //depot/projects/zcopybpf/src/sys/arm/arm/genassym.c#3 integrate .. //depot/projects/zcopybpf/src/sys/arm/arm/identcpu.c#2 integrate .. //depot/projects/zcopybpf/src/sys/arm/arm/intr.c#4 integrate .. //depot/projects/zcopybpf/src/sys/arm/arm/pmap.c#4 integrate .. //depot/projects/zcopybpf/src/sys/arm/arm/swtch.S#2 integrate .. //depot/projects/zcopybpf/src/sys/arm/arm/trap.c#4 integrate .. //depot/projects/zcopybpf/src/sys/arm/arm/vm_machdep.c#3 integrate .. //depot/projects/zcopybpf/src/sys/arm/at91/at91rm92reg.h#2 integrate .. //depot/projects/zcopybpf/src/sys/arm/at91/kb920x_machdep.c#4 integrate .. //depot/projects/zcopybpf/src/sys/arm/at91/ohci_atmelarm.c#3 integrate .. //depot/projects/zcopybpf/src/sys/arm/conf/CRB#1 branch .. //depot/projects/zcopybpf/src/sys/arm/conf/KB920X#3 integrate .. //depot/projects/zcopybpf/src/sys/arm/include/armreg.h#2 integrate .. //depot/projects/zcopybpf/src/sys/arm/include/cpufunc.h#3 integrate .. //depot/projects/zcopybpf/src/sys/arm/include/pmap.h#3 integrate .. //depot/projects/zcopybpf/src/sys/arm/include/pte.h#3 integrate .. //depot/projects/zcopybpf/src/sys/arm/xscale/i80321/i80321_pci.c#3 integrate .. //depot/projects/zcopybpf/src/sys/arm/xscale/i80321/i80321_timer.c#3 integrate .. //depot/projects/zcopybpf/src/sys/arm/xscale/i80321/i80321_wdog.c#3 integrate .. //depot/projects/zcopybpf/src/sys/arm/xscale/i80321/i80321var.h#2 integrate .. //depot/projects/zcopybpf/src/sys/arm/xscale/i80321/obio.c#2 integrate .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/crb_machdep.c#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/files.crb#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/files.i81342#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/i81342.c#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/i81342_mcu.c#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/i81342_pci.c#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/i81342_space.c#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/i81342reg.h#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/i81342var.h#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/obio.c#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/obio_space.c#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/obiovar.h#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/std.crb#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/std.i81342#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/uart_bus_i81342.c#1 branch .. //depot/projects/zcopybpf/src/sys/arm/xscale/i8134x/uart_cpu_i81342.c#1 branch .. //depot/projects/zcopybpf/src/sys/boot/arm/at91/Makefile.inc#2 integrate .. //depot/projects/zcopybpf/src/sys/boot/arm/at91/boot2/board.h#2 integrate .. //depot/projects/zcopybpf/src/sys/boot/arm/at91/boot2/boot2.c#3 integrate .. //depot/projects/zcopybpf/src/sys/boot/arm/at91/boot2/bwct_board.c#1 branch .. //depot/projects/zcopybpf/src/sys/boot/arm/at91/boot2/centipad_board.c#1 branch .. //depot/projects/zcopybpf/src/sys/boot/arm/at91/boot2/kb920x_board.c#2 integrate .. //depot/projects/zcopybpf/src/sys/boot/arm/at91/libat91/Makefile#3 integrate .. //depot/projects/zcopybpf/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#3 integrate .. //depot/projects/zcopybpf/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#3 integrate .. //depot/projects/zcopybpf/src/sys/boot/arm/at91/libat91/emac.c#3 integrate .. //depot/projects/zcopybpf/src/sys/boot/arm/at91/libat91/emac.h#2 integrate .. //depot/projects/zcopybpf/src/sys/bsm/audit.h#3 integrate .. //depot/projects/zcopybpf/src/sys/bsm/audit_internal.h#3 integrate .. //depot/projects/zcopybpf/src/sys/bsm/audit_kevents.h#3 integrate .. //depot/projects/zcopybpf/src/sys/bsm/audit_record.h#3 integrate .. //depot/projects/zcopybpf/src/sys/cam/scsi/scsi_cd.c#5 integrate .. //depot/projects/zcopybpf/src/sys/coda/00READ#2 delete .. //depot/projects/zcopybpf/src/sys/coda/README#2 delete .. //depot/projects/zcopybpf/src/sys/coda/TODO#2 delete .. //depot/projects/zcopybpf/src/sys/coda/cnode.h#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda.h#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_fbsd.c#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_io.h#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_kernel.h#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_namecache.c#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_namecache.h#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_opstats.h#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_pioctl.h#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_psdev.c#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_psdev.h#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_subr.c#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_subr.h#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_venus.c#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_venus.h#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_vfsops.c#2 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_vfsops.h#3 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_vnops.c#4 delete .. //depot/projects/zcopybpf/src/sys/coda/coda_vnops.h#3 delete .. //depot/projects/zcopybpf/src/sys/compat/freebsd32/freebsd32_proto.h#3 integrate .. //depot/projects/zcopybpf/src/sys/compat/freebsd32/freebsd32_syscall.h#3 integrate .. //depot/projects/zcopybpf/src/sys/compat/freebsd32/freebsd32_syscalls.c#3 integrate .. //depot/projects/zcopybpf/src/sys/compat/freebsd32/freebsd32_sysent.c#3 integrate .. //depot/projects/zcopybpf/src/sys/compat/freebsd32/syscalls.master#3 integrate .. //depot/projects/zcopybpf/src/sys/compat/ia32/ia32_sysvec.c#3 integrate .. //depot/projects/zcopybpf/src/sys/compat/linux/linux_socket.c#4 integrate .. //depot/projects/zcopybpf/src/sys/compat/ndis/subr_ntoskrnl.c#3 integrate .. //depot/projects/zcopybpf/src/sys/conf/Makefile.arm#4 integrate .. //depot/projects/zcopybpf/src/sys/conf/NOTES#9 integrate .. //depot/projects/zcopybpf/src/sys/conf/files#10 integrate .. //depot/projects/zcopybpf/src/sys/conf/files.amd64#4 integrate .. //depot/projects/zcopybpf/src/sys/conf/files.i386#4 integrate .. //depot/projects/zcopybpf/src/sys/conf/kern.pre.mk#4 integrate .. //depot/projects/zcopybpf/src/sys/conf/kmod.mk#5 integrate .. //depot/projects/zcopybpf/src/sys/conf/options#8 integrate .. //depot/projects/zcopybpf/src/sys/conf/options.ia64#2 integrate .. //depot/projects/zcopybpf/src/sys/contrib/altq/altq/altq_subr.c#3 integrate .. //depot/projects/zcopybpf/src/sys/contrib/ngatm/netnatm/api/cc_conn.c#2 integrate .. //depot/projects/zcopybpf/src/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#6 integrate .. //depot/projects/zcopybpf/src/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c#5 integrate .. //depot/projects/zcopybpf/src/sys/contrib/pf/net/if_pfsync.c#5 integrate .. //depot/projects/zcopybpf/src/sys/dev/acpica/acpi_hpet.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/acpica/acpi_timer.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/adlink/adlink.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/aic7xxx/aic7xxx.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/aic7xxx/aic_osm_lib.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/an/if_an.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/arcmsr/arcmsr.c#6 integrate .. //depot/projects/zcopybpf/src/sys/dev/ata/ata-raid.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/ath/ath_rate/amrr/amrr.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/ath/ath_rate/onoe/onoe.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/ath/if_ath.c#6 integrate .. //depot/projects/zcopybpf/src/sys/dev/bce/if_bce.c#7 integrate .. //depot/projects/zcopybpf/src/sys/dev/bce/if_bcefw.h#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/bce/if_bcereg.h#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/ce/if_ce.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/coretemp/coretemp.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/cp/if_cp.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/ctau/if_ct.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/cx/if_cx.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/common/cxgb_common.h#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/common/cxgb_ctl_defs.h#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/common/cxgb_mc5.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/common/cxgb_t3_cpl.h#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/common/cxgb_t3_hw.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/common/cxgb_vsc7323.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/common/cxgb_xgmac.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/cxgb_adapter.h#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/cxgb_ioctl.h#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/cxgb_main.c#5 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/cxgb_offload.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/cxgb_offload.h#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/cxgb_osdep.h#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/cxgb_sge.c#5 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/sys/mvec.h#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/cxgb/t3b_protocol_sram-1.1.0.bin.gz.uu#1 branch .. //depot/projects/zcopybpf/src/sys/dev/cxgb/t3b_tp_eeprom-1.1.0.bin.gz.uu#1 branch .. //depot/projects/zcopybpf/src/sys/dev/cxgb/t3fw-4.1.0.bin.gz.uu#2 delete .. //depot/projects/zcopybpf/src/sys/dev/cxgb/t3fw-4.5.0.bin.gz.uu#1 branch .. //depot/projects/zcopybpf/src/sys/dev/dc/if_dc.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/dc/if_dcreg.h#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/drm/i915_dma.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/ed/if_ed_pccard.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/em/if_em.c#5 integrate .. //depot/projects/zcopybpf/src/sys/dev/fb/splash_bmp.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/firewire/firewire.c#5 integrate .. //depot/projects/zcopybpf/src/sys/dev/firewire/firewirereg.h#5 integrate .. //depot/projects/zcopybpf/src/sys/dev/ichwd/ichwd.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/ichwd/ichwd.h#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/if_ndis/if_ndis.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/if_ndis/if_ndisvar.h#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/ipmi/ipmi_isa.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/iscsi/initiator/isc_cam.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/iscsi/initiator/isc_sm.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/iscsi/initiator/isc_soc.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/iscsi/initiator/isc_subr.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/iscsi/initiator/iscsi.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/iscsi/initiator/iscsi.h#1 branch .. //depot/projects/zcopybpf/src/sys/dev/iscsi/initiator/iscsi_subr.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/iscsi/initiator/iscsivar.h#1 branch .. //depot/projects/zcopybpf/src/sys/dev/isp/isp.c#6 integrate .. //depot/projects/zcopybpf/src/sys/dev/isp/isp_freebsd.c#8 integrate .. //depot/projects/zcopybpf/src/sys/dev/ixgbe/LICENSE#1 branch .. //depot/projects/zcopybpf/src/sys/dev/ixgbe/ixgbe.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/ixgbe/ixgbe.h#1 branch .. //depot/projects/zcopybpf/src/sys/dev/ixgbe/ixgbe_82598.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/ixgbe/ixgbe_api.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/ixgbe/ixgbe_api.h#1 branch .. //depot/projects/zcopybpf/src/sys/dev/ixgbe/ixgbe_common.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/ixgbe/ixgbe_common.h#1 branch .. //depot/projects/zcopybpf/src/sys/dev/ixgbe/ixgbe_osdep.h#1 branch .. //depot/projects/zcopybpf/src/sys/dev/ixgbe/ixgbe_phy.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/ixgbe/ixgbe_phy.h#1 branch .. //depot/projects/zcopybpf/src/sys/dev/ixgbe/ixgbe_type.h#1 branch .. //depot/projects/zcopybpf/src/sys/dev/kbdmux/kbdmux.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/mfi/mfi.c#5 integrate .. //depot/projects/zcopybpf/src/sys/dev/mfi/mfi_disk.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/mfi/mfi_pci.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/mfi/mfireg.h#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/mfi/mfivar.h#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/mpt/mpt.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/mpt/mpt.h#6 integrate .. //depot/projects/zcopybpf/src/sys/dev/mpt/mpt_cam.c#9 integrate .. //depot/projects/zcopybpf/src/sys/dev/msk/if_msk.c#7 integrate .. //depot/projects/zcopybpf/src/sys/dev/mxge/eth_z8e.dat.gz.uu#5 delete .. //depot/projects/zcopybpf/src/sys/dev/mxge/eth_z8e.h#1 branch .. //depot/projects/zcopybpf/src/sys/dev/mxge/ethp_z8e.dat.gz.uu#5 delete .. //depot/projects/zcopybpf/src/sys/dev/mxge/ethp_z8e.h#1 branch .. //depot/projects/zcopybpf/src/sys/dev/mxge/if_mxge.c#7 integrate .. //depot/projects/zcopybpf/src/sys/dev/mxge/if_mxge_var.h#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/mxge/mcp_gen_header.h#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/mxge/mxge_eth_z8e.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/mxge/mxge_ethp_z8e.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/mxge/mxge_lro.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/mxge/mxge_mcp.h#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/nfe/if_nfe.c#5 integrate .. //depot/projects/zcopybpf/src/sys/dev/nfe/if_nfevar.h#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/nmdm/nmdm.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/nxge/if_nxge.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/pccard/pccarddevs#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/pci/pci.c#8 integrate .. //depot/projects/zcopybpf/src/sys/dev/ral/rt2560.c#5 integrate .. //depot/projects/zcopybpf/src/sys/dev/ral/rt2661.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/re/if_re.c#7 integrate .. //depot/projects/zcopybpf/src/sys/dev/sound/pci/atiixp.c#6 integrate .. //depot/projects/zcopybpf/src/sys/dev/sound/pci/hda/hdac.c#8 integrate .. //depot/projects/zcopybpf/src/sys/dev/sound/pci/hda/hdac_private.h#5 integrate .. //depot/projects/zcopybpf/src/sys/dev/sound/pci/ich.c#7 integrate .. //depot/projects/zcopybpf/src/sys/dev/streams/streams.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/sym/sym_hipd.c#6 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/ehci.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/if_axe.c#5 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/if_axereg.h#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/if_rue.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/if_ruereg.h#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/if_udav.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/if_ural.c#6 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/ufoma.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/ukbd.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/umodem.c#3 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/ums.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/usb_quirks.c#4 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/usbdevs#8 integrate .. //depot/projects/zcopybpf/src/sys/dev/wi/if_wavelan_ieee.h#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/wi/if_wi.c#5 integrate .. //depot/projects/zcopybpf/src/sys/fs/coda/README#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/TODO#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/cnode.h#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda.h#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_fbsd.c#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_io.h#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_kernel.h#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_namecache.c#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_namecache.h#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_opstats.h#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_pioctl.h#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_psdev.c#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_psdev.h#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_subr.c#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_subr.h#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_venus.c#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_venus.h#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_vfsops.c#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_vfsops.h#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_vnops.c#1 branch .. //depot/projects/zcopybpf/src/sys/fs/coda/coda_vnops.h#1 branch .. //depot/projects/zcopybpf/src/sys/fs/devfs/devfs_vnops.c#5 integrate .. //depot/projects/zcopybpf/src/sys/fs/fifofs/fifo_vnops.c#5 integrate .. //depot/projects/zcopybpf/src/sys/fs/msdosfs/bpb.h#2 integrate .. //depot/projects/zcopybpf/src/sys/fs/msdosfs/denode.h#2 integrate .. //depot/projects/zcopybpf/src/sys/fs/msdosfs/msdosfs_conv.c#2 integrate .. //depot/projects/zcopybpf/src/sys/fs/msdosfs/msdosfs_denode.c#3 integrate .. //depot/projects/zcopybpf/src/sys/fs/msdosfs/msdosfs_fat.c#3 integrate .. //depot/projects/zcopybpf/src/sys/fs/msdosfs/msdosfs_fileno.c#2 integrate .. //depot/projects/zcopybpf/src/sys/fs/msdosfs/msdosfs_iconv.c#2 integrate .. //depot/projects/zcopybpf/src/sys/fs/msdosfs/msdosfs_lookup.c#2 integrate .. //depot/projects/zcopybpf/src/sys/fs/msdosfs/msdosfs_vfsops.c#4 integrate .. //depot/projects/zcopybpf/src/sys/fs/msdosfs/msdosfs_vnops.c#4 integrate .. //depot/projects/zcopybpf/src/sys/fs/msdosfs/msdosfsmount.h#2 integrate .. //depot/projects/zcopybpf/src/sys/fs/tmpfs/tmpfs.h#2 integrate .. //depot/projects/zcopybpf/src/sys/fs/tmpfs/tmpfs_subr.c#2 integrate .. //depot/projects/zcopybpf/src/sys/fs/tmpfs/tmpfs_vfsops.c#2 integrate .. //depot/projects/zcopybpf/src/sys/fs/tmpfs/tmpfs_vnops.c#2 integrate .. //depot/projects/zcopybpf/src/sys/gnu/fs/ext2fs/ext2_vfsops.c#4 integrate .. //depot/projects/zcopybpf/src/sys/i386/conf/NOTES#5 integrate .. //depot/projects/zcopybpf/src/sys/i386/i386/genassym.c#3 integrate .. //depot/projects/zcopybpf/src/sys/i386/i386/local_apic.c#5 integrate .. //depot/projects/zcopybpf/src/sys/i386/i386/machdep.c#4 integrate .. //depot/projects/zcopybpf/src/sys/i386/i386/mp_machdep.c#7 integrate .. //depot/projects/zcopybpf/src/sys/i386/i386/swtch.s#3 integrate .. //depot/projects/zcopybpf/src/sys/i386/i386/sys_machdep.c#4 integrate .. //depot/projects/zcopybpf/src/sys/i386/i386/trap.c#5 integrate .. //depot/projects/zcopybpf/src/sys/i386/include/cpufunc.h#2 integrate .. //depot/projects/zcopybpf/src/sys/i386/include/pc/vesa.h#3 integrate .. //depot/projects/zcopybpf/src/sys/i386/include/specialreg.h#5 integrate .. //depot/projects/zcopybpf/src/sys/i386/isa/clock.c#5 integrate .. //depot/projects/zcopybpf/src/sys/i386/linux/linux_machdep.c#5 integrate .. //depot/projects/zcopybpf/src/sys/ia64/ia64/clock.c#2 integrate .. //depot/projects/zcopybpf/src/sys/ia64/ia64/db_machdep.c#3 integrate .. //depot/projects/zcopybpf/src/sys/ia64/ia64/exception.S#3 integrate .. //depot/projects/zcopybpf/src/sys/ia64/ia64/interrupt.c#4 integrate .. //depot/projects/zcopybpf/src/sys/ia64/ia64/machdep.c#4 integrate .. //depot/projects/zcopybpf/src/sys/ia64/ia64/mp_machdep.c#3 integrate .. //depot/projects/zcopybpf/src/sys/ia64/ia64/nexus.c#4 integrate .. //depot/projects/zcopybpf/src/sys/ia64/ia64/pmap.c#4 integrate .. //depot/projects/zcopybpf/src/sys/ia64/ia64/sapic.c#2 integrate .. //depot/projects/zcopybpf/src/sys/ia64/ia64/syscall.S#2 integrate .. //depot/projects/zcopybpf/src/sys/ia64/include/atomic.h#2 integrate .. //depot/projects/zcopybpf/src/sys/ia64/include/ia64_cpu.h#3 integrate .. //depot/projects/zcopybpf/src/sys/ia64/include/intr.h#3 integrate .. //depot/projects/zcopybpf/src/sys/ia64/include/md_var.h#2 integrate .. //depot/projects/zcopybpf/src/sys/ia64/include/sapicvar.h#2 integrate .. //depot/projects/zcopybpf/src/sys/ia64/isa/isa_dma.c#2 integrate .. //depot/projects/zcopybpf/src/sys/kern/init_sysent.c#3 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_descrip.c#7 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_event.c#4 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_exec.c#4 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_kse.c#4 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_lockf.c#3 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_mutex.c#6 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_poll.c#3 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_resource.c#5 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_rwlock.c#6 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_sig.c#5 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_switch.c#4 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_thr.c#3 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_thread.c#4 integrate .. //depot/projects/zcopybpf/src/sys/kern/sched_4bsd.c#4 integrate .. //depot/projects/zcopybpf/src/sys/kern/sched_ule.c#7 integrate .. //depot/projects/zcopybpf/src/sys/kern/subr_bus.c#4 integrate .. //depot/projects/zcopybpf/src/sys/kern/subr_clock.c#2 integrate .. //depot/projects/zcopybpf/src/sys/kern/sys_socket.c#3 integrate .. //depot/projects/zcopybpf/src/sys/kern/syscalls.c#3 integrate .. //depot/projects/zcopybpf/src/sys/kern/syscalls.master#3 integrate .. //depot/projects/zcopybpf/src/sys/kern/systrace_args.c#3 integrate .. //depot/projects/zcopybpf/src/sys/kern/tty.c#3 integrate .. //depot/projects/zcopybpf/src/sys/kern/uipc_domain.c#3 integrate .. //depot/projects/zcopybpf/src/sys/kern/uipc_syscalls.c#8 integrate .. //depot/projects/zcopybpf/src/sys/kern/uipc_usrreq.c#6 integrate .. //depot/projects/zcopybpf/src/sys/kern/vfs_mount.c#7 integrate .. //depot/projects/zcopybpf/src/sys/kern/vfs_subr.c#5 integrate .. //depot/projects/zcopybpf/src/sys/kern/vfs_vnops.c#4 integrate .. //depot/projects/zcopybpf/src/sys/modules/Makefile#8 integrate .. //depot/projects/zcopybpf/src/sys/modules/coda/Makefile#2 integrate .. //depot/projects/zcopybpf/src/sys/modules/coda5/Makefile#2 integrate .. //depot/projects/zcopybpf/src/sys/modules/coretemp/Makefile#1 branch .. //depot/projects/zcopybpf/src/sys/modules/cxgb/Makefile#4 integrate .. //depot/projects/zcopybpf/src/sys/modules/iscsi/Makefile#1 branch .. //depot/projects/zcopybpf/src/sys/modules/iscsi/initiator/Makefile#1 branch .. //depot/projects/zcopybpf/src/sys/modules/mxge/mxge_eth_z8e/Makefile#2 integrate .. //depot/projects/zcopybpf/src/sys/modules/mxge/mxge_ethp_z8e/Makefile#2 integrate .. //depot/projects/zcopybpf/src/sys/modules/netgraph/atm/Makefile#2 integrate .. //depot/projects/zcopybpf/src/sys/modules/netgraph/bluetooth/Makefile#2 integrate .. //depot/projects/zcopybpf/src/sys/net/bpf.c#22 integrate .. //depot/projects/zcopybpf/src/sys/net/bpfdesc.h#7 integrate .. //depot/projects/zcopybpf/src/sys/net/bridgestp.c#4 integrate .. //depot/projects/zcopybpf/src/sys/net/bridgestp.h#3 integrate .. //depot/projects/zcopybpf/src/sys/net/if.c#7 integrate .. //depot/projects/zcopybpf/src/sys/net/if_bridge.c#5 integrate .. //depot/projects/zcopybpf/src/sys/net/if_bridgevar.h#3 integrate .. //depot/projects/zcopybpf/src/sys/net/if_ethersubr.c#7 integrate .. //depot/projects/zcopybpf/src/sys/net/if_lagg.c#4 integrate .. //depot/projects/zcopybpf/src/sys/net/if_lagg.h#4 integrate .. //depot/projects/zcopybpf/src/sys/net/netisr.c#2 integrate .. //depot/projects/zcopybpf/src/sys/net80211/ieee80211_scan_sta.c#2 integrate .. //depot/projects/zcopybpf/src/sys/netatm/atm_proto.c#2 integrate .. //depot/projects/zcopybpf/src/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/zcopybpf/src/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#2 integrate .. //depot/projects/zcopybpf/src/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/zcopybpf/src/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/zcopybpf/src/sys/netgraph/netflow/netflow.c#2 integrate .. //depot/projects/zcopybpf/src/sys/netgraph/netgraph.h#2 integrate .. //depot/projects/zcopybpf/src/sys/netgraph/ng_bpf.c#2 integrate .. //depot/projects/zcopybpf/src/sys/netgraph/ng_eiface.c#3 integrate .. //depot/projects/zcopybpf/src/sys/netgraph/ng_ppp.c#5 integrate .. //depot/projects/zcopybpf/src/sys/netgraph/ng_ppp.h#2 integrate .. //depot/projects/zcopybpf/src/sys/netinet/icmp_var.h#2 integrate .. //depot/projects/zcopybpf/src/sys/netinet/in_mcast.c#2 integrate .. //depot/projects/zcopybpf/src/sys/netinet/in_pcb.h#6 integrate .. //depot/projects/zcopybpf/src/sys/netinet/ip_carp.c#5 integrate .. //depot/projects/zcopybpf/src/sys/netinet/ip_divert.c#3 integrate .. //depot/projects/zcopybpf/src/sys/netinet/ip_dummynet.c#4 integrate .. //depot/projects/zcopybpf/src/sys/netinet/ip_fw2.c#7 integrate .. //depot/projects/zcopybpf/src/sys/netinet/ip_icmp.c#4 integrate .. //depot/projects/zcopybpf/src/sys/netinet/ip_input.c#6 integrate .. //depot/projects/zcopybpf/src/sys/netinet/ip_ipsec.c#4 integrate .. //depot/projects/zcopybpf/src/sys/netinet/ip_ipsec.h#2 integrate .. //depot/projects/zcopybpf/src/sys/netinet/ip_mroute.c#5 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp.h#6 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_asconf.c#6 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_asconf.h#5 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_cc_functions.c#1 branch .. //depot/projects/zcopybpf/src/sys/netinet/sctp_cc_functions.h#1 branch .. //depot/projects/zcopybpf/src/sys/netinet/sctp_constants.h#7 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_indata.c#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_input.c#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_os.h#5 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_os_bsd.h#6 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_output.c#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_pcb.c#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_pcb.h#6 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_peeloff.c#7 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_structs.h#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_sysctl.c#4 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_sysctl.h#4 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_timer.c#7 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_timer.h#4 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_uio.h#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_usrreq.c#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctp_var.h#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctputil.c#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/sctputil.h#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/tcp_fsm.h#3 integrate .. //depot/projects/zcopybpf/src/sys/netinet/tcp_input.c#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/tcp_subr.c#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/tcp_syncache.c#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/tcp_syncache.h#1 branch .. //depot/projects/zcopybpf/src/sys/netinet/tcp_timer.h#5 integrate .. //depot/projects/zcopybpf/src/sys/netinet/tcp_usrreq.c#7 integrate .. //depot/projects/zcopybpf/src/sys/netinet/tcp_var.h#8 integrate .. //depot/projects/zcopybpf/src/sys/netinet/udp_usrreq.c#6 integrate .. //depot/projects/zcopybpf/src/sys/netinet/udp_var.h#4 integrate .. //depot/projects/zcopybpf/src/sys/netinet6/in6.h#3 integrate .. //depot/projects/zcopybpf/src/sys/netinet6/ip6_ipsec.c#2 integrate .. //depot/projects/zcopybpf/src/sys/netinet6/ip6_ipsec.h#2 integrate .. //depot/projects/zcopybpf/src/sys/netinet6/sctp6_usrreq.c#7 integrate .. //depot/projects/zcopybpf/src/sys/netinet6/udp6_output.c#3 delete .. //depot/projects/zcopybpf/src/sys/netinet6/udp6_usrreq.c#4 integrate .. //depot/projects/zcopybpf/src/sys/netinet6/udp6_var.h#2 integrate .. //depot/projects/zcopybpf/src/sys/netipsec/ipsec_input.c#3 integrate .. //depot/projects/zcopybpf/src/sys/netipsec/ipsec_output.c#3 integrate .. //depot/projects/zcopybpf/src/sys/netipsec/xform_ah.c#3 integrate .. //depot/projects/zcopybpf/src/sys/netipsec/xform_esp.c#3 integrate .. //depot/projects/zcopybpf/src/sys/netipsec/xform_ipcomp.c#2 integrate .. //depot/projects/zcopybpf/src/sys/netipsec/xform_ipip.c#3 integrate .. //depot/projects/zcopybpf/src/sys/netipx/spx_debug.c#3 integrate .. //depot/projects/zcopybpf/src/sys/netipx/spx_debug.h#3 integrate .. //depot/projects/zcopybpf/src/sys/netsmb/smb_dev.c#4 integrate .. //depot/projects/zcopybpf/src/sys/nfsclient/bootp_subr.c#3 integrate .. //depot/projects/zcopybpf/src/sys/nfsclient/krpc_subr.c#2 integrate .. //depot/projects/zcopybpf/src/sys/nfsclient/nfs_socket.c#5 integrate .. //depot/projects/zcopybpf/src/sys/nfsclient/nfs_vfsops.c#5 integrate .. //depot/projects/zcopybpf/src/sys/nfsserver/nfs_srvsock.c#4 integrate .. //depot/projects/zcopybpf/src/sys/nfsserver/nfs_srvsubs.c#3 integrate .. //depot/projects/zcopybpf/src/sys/nfsserver/nfs_syscalls.c#4 integrate .. //depot/projects/zcopybpf/src/sys/pc98/cbus/clock.c#5 integrate .. //depot/projects/zcopybpf/src/sys/pc98/cbus/sio.c#3 integrate .. //depot/projects/zcopybpf/src/sys/pci/agp.c#2 integrate .. //depot/projects/zcopybpf/src/sys/pci/agp_i810.c#2 integrate .. //depot/projects/zcopybpf/src/sys/pci/agppriv.h#2 integrate .. //depot/projects/zcopybpf/src/sys/pci/agpreg.h#2 integrate .. //depot/projects/zcopybpf/src/sys/pci/if_rl.c#3 integrate .. //depot/projects/zcopybpf/src/sys/pci/if_rlreg.h#4 integrate .. //depot/projects/zcopybpf/src/sys/pci/if_xl.c#3 integrate .. //depot/projects/zcopybpf/src/sys/pci/viapm.c#2 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/include/atomic.h#2 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/include/interruptvar.h#2 delete .. //depot/projects/zcopybpf/src/sys/powerpc/include/intr_machdep.h#3 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/include/md_var.h#3 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/include/openpicvar.h#3 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/include/trap.h#2 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/powermac/hrowpic.c#3 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/powermac/hrowpicvar.h#2 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/powermac/openpic_macio.c#2 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/powerpc/autoconf.c#2 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/powerpc/interrupt.c#2 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/powerpc/intr_machdep.c#4 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/powerpc/nexus.c#4 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/powerpc/openpic.c#3 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/powerpc/pic_if.m#3 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/powerpc/trap.c#4 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/psim/openpic_iobus.c#2 integrate .. //depot/projects/zcopybpf/src/sys/rpc/rpcclnt.c#4 integrate .. //depot/projects/zcopybpf/src/sys/security/mac/mac_syscalls.c#3 integrate .. //depot/projects/zcopybpf/src/sys/security/mac_mls/mac_mls.c#4 integrate .. //depot/projects/zcopybpf/src/sys/sparc64/include/iommureg.h#3 integrate .. //depot/projects/zcopybpf/src/sys/sparc64/include/iommuvar.h#2 integrate .. //depot/projects/zcopybpf/src/sys/sparc64/pci/psycho.c#5 integrate .. //depot/projects/zcopybpf/src/sys/sparc64/pci/psychoreg.h#2 integrate .. //depot/projects/zcopybpf/src/sys/sparc64/sbus/sbus.c#5 integrate .. //depot/projects/zcopybpf/src/sys/sparc64/sbus/sbusreg.h#2 integrate .. //depot/projects/zcopybpf/src/sys/sparc64/sparc64/eeprom.c#3 integrate .. //depot/projects/zcopybpf/src/sys/sparc64/sparc64/iommu.c#3 integrate .. //depot/projects/zcopybpf/src/sys/sparc64/sparc64/pmap.c#3 integrate .. //depot/projects/zcopybpf/src/sys/sparc64/sparc64/rtc.c#3 integrate .. //depot/projects/zcopybpf/src/sys/sys/ata.h#3 integrate .. //depot/projects/zcopybpf/src/sys/sys/kernel.h#4 integrate .. //depot/projects/zcopybpf/src/sys/sys/lock_profile.h#5 integrate .. //depot/projects/zcopybpf/src/sys/sys/mutex.h#6 integrate .. //depot/projects/zcopybpf/src/sys/sys/proc.h#6 integrate .. //depot/projects/zcopybpf/src/sys/sys/rwlock.h#6 integrate .. //depot/projects/zcopybpf/src/sys/sys/syscall.h#3 integrate .. //depot/projects/zcopybpf/src/sys/sys/syscall.mk#3 integrate .. //depot/projects/zcopybpf/src/sys/sys/sysent.h#4 integrate .. //depot/projects/zcopybpf/src/sys/sys/sysproto.h#3 integrate .. //depot/projects/zcopybpf/src/sys/sys/thr.h#3 integrate .. //depot/projects/zcopybpf/src/sys/sys/vmmeter.h#3 integrate .. //depot/projects/zcopybpf/src/sys/ufs/ffs/ffs_vnops.c#5 integrate .. //depot/projects/zcopybpf/src/sys/vm/device_pager.c#2 integrate .. //depot/projects/zcopybpf/src/sys/vm/phys_pager.c#4 integrate .. //depot/projects/zcopybpf/src/sys/vm/swap_pager.c#5 integrate .. //depot/projects/zcopybpf/src/sys/vm/vm_fault.c#4 integrate .. //depot/projects/zcopybpf/src/sys/vm/vm_meter.c#3 integrate .. //depot/projects/zcopybpf/src/sys/vm/vm_page.c#5 integrate .. //depot/projects/zcopybpf/src/sys/vm/vm_page.h#5 integrate .. //depot/projects/zcopybpf/src/sys/vm/vm_pager.c#2 integrate .. //depot/projects/zcopybpf/src/sys/vm/vm_phys.c#2 integrate .. //depot/projects/zcopybpf/src/sys/vm/vm_phys.h#2 integrate .. //depot/projects/zcopybpf/src/sys/vm/vm_zeroidle.c#4 integrate .. //depot/projects/zcopybpf/src/sys/vm/vnode_pager.c#3 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/atalk.c#2 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/bpf.c#6 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/if.c#3 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/inet.c#5 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/inet6.c#3 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/ipsec.c#3 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/ipx.c#2 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/main.c#4 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/mbuf.c#2 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/mcast.c#4 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/mroute.c#3 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/mroute6.c#3 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/netgraph.c#2 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/netstat.h#4 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/pfkey.c#3 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/route.c#3 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/sctp.c#2 integrate .. //depot/projects/zcopybpf/src/usr.sbin/netstat/unix.c#2 integrate Differences ... ==== //depot/projects/zcopybpf/src/contrib/tcpdump/print-bgp.c#2 (text+ko) ==== @@ -622,6 +622,26 @@ return -2; } +/* + * As I remember, some versions of systems have an snprintf() that + * returns -1 if the buffer would have overflowed. If the return + * value is negative, set buflen to 0, to indicate that we've filled + * the buffer up. + * + * If the return value is greater than buflen, that means that + * the buffer would have overflowed; again, set buflen to 0 in + * that case. + */ +#define UPDATE_BUF_BUFLEN(buf, buflen, strlen) \ + if (strlen<0) \ + buflen=0; \ + else if ((u_int)strlen>buflen) \ + buflen=0; \ + else { \ + buflen-=strlen; \ + buf+=strlen; \ + } + static int decode_labeled_vpn_l2(const u_char *pptr, char *buf, u_int buflen) { @@ -632,11 +652,13 @@ tlen=plen; pptr+=2; TCHECK2(pptr[0],15); + buf[0]='\0'; strlen=snprintf(buf, buflen, "RD: %s, CE-ID: %u, Label-Block Offset: %u, Label Base %u", bgp_vpn_rd_print(pptr), EXTRACT_16BITS(pptr+8), EXTRACT_16BITS(pptr+10), EXTRACT_24BITS(pptr+12)>>4); /* the label is offsetted by 4 bits so lets shift it right */ + UPDATE_BUF_BUFLEN(buf, buflen, strlen); pptr+=15; tlen-=15; @@ -652,23 +674,32 @@ switch(tlv_type) { case 1: - strlen+=snprintf(buf+strlen,buflen-strlen, "\n\t\tcircuit status vector (%u) length: %u: 0x", - tlv_type, - tlv_len); + if (buflen!=0) { + strlen=snprintf(buf,buflen, "\n\t\tcircuit status vector (%u) length: %u: 0x", + tlv_type, + tlv_len); + UPDATE_BUF_BUFLEN(buf, buflen, strlen); + } ttlv_len=ttlv_len/8+1; /* how many bytes do we need to read ? */ while (ttlv_len>0) { TCHECK(pptr[0]); - strlen+=snprintf(buf+strlen,buflen-strlen, "%02x",*pptr++); + if (buflen!=0) { + strlen=snprintf(buf,buflen, "%02x",*pptr++); + UPDATE_BUF_BUFLEN(buf, buflen, strlen); + } ttlv_len--; } break; default: - snprintf(buf+strlen,buflen-strlen, "\n\t\tunknown TLV #%u, length: %u", - tlv_type, - tlv_len); + if (buflen!=0) { + strlen=snprintf(buf,buflen, "\n\t\tunknown TLV #%u, length: %u", + tlv_type, + tlv_len); + UPDATE_BUF_BUFLEN(buf, buflen, strlen); + } break; } - tlen-=(tlv_len<<3); /* the tlv-length is expressed in bits so lets shift it tright */ + tlen-=(tlv_len<<3); /* the tlv-length is expressed in bits so lets shift it right */ } return plen+2; ==== //depot/projects/zcopybpf/src/sys/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/Makefile,v 1.44 2007/07/05 08:55:13 bz Exp $ +# $FreeBSD: src/sys/Makefile,v 1.45 2007/07/12 21:04:55 rwatson Exp $ .include @@ -8,7 +8,7 @@ .endif # Directories to include in cscope name file and TAGS. -CSCOPEDIRS= bsm cam coda compat conf contrib crypto ddb dev fs geom gnu \ +CSCOPEDIRS= bsm cam compat conf contrib crypto ddb dev fs geom gnu \ i4b isa kern libkern modules net net80211 netatalk netatm \ netgraph netinet netinet6 netipsec netipx netnatm netncp \ netsmb nfs nfsclient nfs4client rpc pccard pci security sys \ ==== //depot/projects/zcopybpf/src/sys/amd64/amd64/cpu_switch.S#4 (text+ko) ==== @@ -30,13 +30,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.158 2007/06/06 07:35:07 davidxu Exp $ + * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.159 2007/07/17 22:36:56 jeff Exp $ */ #include #include #include "assym.s" +#include "opt_sched.h" /*****************************************************************************/ /* Scheduling */ @@ -50,6 +51,12 @@ #define LK #endif +#if defined(SCHED_ULE) && defined(SMP) +#define SETLK xchgq +#else +#define SETLK movq +#endif + /* * cpu_throw() * @@ -148,13 +155,7 @@ movq %cr3,%rax cmpq %rcx,%rax /* Same address space? */ jne swinact - movq %rdx, TD_LOCK(%rdi) /* Release the old thread */ - /* Wait for the new thread to become unblocked */ - movq $blocked_lock, %rdx -1: - movq TD_LOCK(%rsi),%rcx - cmpq %rcx, %rdx - je 1b + SETLK %rdx, TD_LOCK(%rdi) /* Release the old thread */ jmp sw1 swinact: movq %rcx,%cr3 /* new address space */ @@ -163,21 +164,24 @@ movq TD_PROC(%rdi), %rcx /* oldproc */ movq P_VMSPACE(%rcx), %rcx LK btrl %eax, VM_PMAP+PM_ACTIVE(%rcx) /* clear old */ - movq %rdx, TD_LOCK(%rdi) /* Release the old thread */ + SETLK %rdx, TD_LOCK(%rdi) /* Release the old thread */ swact: + /* Set bit in new pmap->pm_active */ + movq TD_PROC(%rsi),%rdx /* newproc */ + movq P_VMSPACE(%rdx), %rdx + LK btsl %eax, VM_PMAP+PM_ACTIVE(%rdx) /* set new */ + +sw1: +#if defined(SCHED_ULE) && defined(SMP) /* Wait for the new thread to become unblocked */ movq $blocked_lock, %rdx 1: movq TD_LOCK(%rsi),%rcx cmpq %rcx, %rdx + pause je 1b - - /* Set bit in new pmap->pm_active */ - movq TD_PROC(%rsi),%rdx /* newproc */ - movq P_VMSPACE(%rdx), %rdx - LK btsl %eax, VM_PMAP+PM_ACTIVE(%rdx) /* set new */ - -sw1: + lfence +#endif /* * At this point, we've switched address spaces and are ready * to load up the rest of the next context. ==== //depot/projects/zcopybpf/src/sys/amd64/amd64/local_apic.c#5 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.40 2007/05/08 22:01:02 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.41 2007/08/02 21:17:58 peter Exp $"); #include "opt_hwpmc_hooks.h" @@ -1060,10 +1060,6 @@ if (retval != 0) printf("%s: Failed to setup the local APIC: returned %d\n", best_enum->apic_name, retval); -#ifdef SMP - /* Last, setup the cpu topology now that we have probed CPUs */ - mp_topology(); -#endif } SYSINIT(apic_setup_local, SI_SUB_CPU, SI_ORDER_FIRST, apic_setup_local, NULL) ==== //depot/projects/zcopybpf/src/sys/amd64/amd64/mp_machdep.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.286 2007/06/04 23:56:07 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.287 2007/08/02 21:17:58 peter Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -186,26 +186,14 @@ mp_topology(void) { struct cpu_group *group; - u_int regs[4]; - int logical_cpus; int apic_id; int groups; int cpu; /* Build the smp_topology map. */ /* Nothing to do if there is no HTT support. */ - if ((cpu_feature & CPUID_HTT) == 0) + if (hyperthreading_cpus <= 1) return; - logical_cpus = (cpu_procinfo & CPUID_HTT_CORES) >> 16; - if (logical_cpus <= 1) - return; - /* Nothing to do if reported cores are physical cores. */ - if (strcmp(cpu_vendor, "GenuineIntel") == 0 && cpu_high >= 4) { - cpuid_count(4, 0, regs); - if ((regs[0] & 0x1f) != 0 && - logical_cpus <= ((regs[0] >> 26) & 0x3f) + 1) - return; - } group = &mp_groups[0]; groups = 1; for (cpu = 0, apic_id = 0; apic_id <= MAX_APIC_ID; apic_id++) { @@ -215,7 +203,8 @@ * If the current group has members and we're not a logical * cpu, create a new group. */ - if (group->cg_count != 0 && (apic_id % logical_cpus) == 0) { + if (group->cg_count != 0 && + (apic_id % hyperthreading_cpus) == 0) { group++; groups++; } @@ -420,6 +409,9 @@ } set_interrupt_apic_ids(); + + /* Last, setup the cpu topology now that we have probed CPUs */ + mp_topology(); } ==== //depot/projects/zcopybpf/src/sys/amd64/amd64/trap.c#4 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.318 2007/06/10 21:59:12 attilio Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.319 2007/07/26 15:32:54 jhb Exp $"); /* * AMD64 Trap and System call handling @@ -159,7 +159,8 @@ { struct thread *td = curthread; struct proc *p = td->td_proc; - int i = 0, ucode = 0, type, code; + int i = 0, ucode = 0, code; + u_int type; register_t addr = 0; ksiginfo_t ksi; @@ -622,7 +623,8 @@ struct trapframe *frame; vm_offset_t eva; { - int code, type, ss; + int code, ss; + u_int type; long esp; struct soft_segment_descriptor softseg; char *msg; ==== //depot/projects/zcopybpf/src/sys/amd64/conf/NOTES#5 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.68 2007/07/04 00:18:38 bz Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.69 2007/08/15 19:26:02 des Exp $ # # @@ -446,6 +446,13 @@ # device ichwd +# +# Temperature sensors: +# +# coretemp: on-die sensor on Intel Core and newer CPUs +# +device coretemp + #--------------------------------------------------------------------------- # ISDN4BSD # ==== //depot/projects/zcopybpf/src/sys/amd64/include/specialreg.h#4 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.39 2007/05/31 11:26:44 des Exp $ + * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.40 2007/08/15 19:26:01 des Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -179,6 +179,7 @@ #define MSR_BIOS_SIGN 0x08b #define MSR_PERFCTR0 0x0c1 #define MSR_PERFCTR1 0x0c2 +#define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */ #define MSR_MTRRcap 0x0fe #define MSR_BBL_CR_ADDR 0x116 #define MSR_BBL_CR_DECC 0x118 ==== //depot/projects/zcopybpf/src/sys/amd64/isa/clock.c#4 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.232 2007/06/15 22:58:14 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.233 2007/07/23 09:42:30 dwmalone Exp $"); /* * Routines to handle clock hardware. @@ -686,8 +686,7 @@ return; wrong_time: - printf("Invalid time in real time clock.\n"); - printf("Check and reset the date immediately!\n"); + printf("Invalid time in clock: check and reset the date!\n"); } /* ==== //depot/projects/zcopybpf/src/sys/amd64/linux32/linux32_sysvec.c#4 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.29 2007/05/14 22:40:04 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.30 2007/07/12 18:01:30 jhb Exp $"); #include "opt_compat.h" #ifndef COMPAT_IA32 @@ -1023,7 +1023,8 @@ VM_PROT_ALL, linux_copyout_strings, exec_linux_setregs, - linux32_fixlimit + linux32_fixlimit, + &linux32_maxssiz, }; static Elf32_Brandinfo linux_brand = { ==== //depot/projects/zcopybpf/src/sys/arm/arm/busdma_machdep.c#4 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.33 2007/06/10 12:33:01 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.34 2007/07/27 14:46:43 cognet Exp $"); /* * ARM bus dma support routines @@ -763,8 +763,12 @@ if (__predict_true(pmap == pmap_kernel())) { (void) pmap_get_pde_pte(pmap, vaddr, &pde, &ptep); if (__predict_false(pmap_pde_section(pde))) { - curaddr = (*pde & L1_S_FRAME) | - (vaddr & L1_S_OFFSET); + if (*pde & L1_S_SUPERSEC) + curaddr = (*pde & L1_SUP_FRAME) | + (vaddr & L1_SUP_OFFSET); + else + curaddr = (*pde & L1_S_FRAME) | + (vaddr & L1_S_OFFSET); if (*pde & L1_S_CACHE_MASK) { map->flags &= ~DMAMAP_COHERENT; @@ -1087,36 +1091,36 @@ { char _tmp_cl[arm_dcache_align], _tmp_clend[arm_dcache_align]; - if (op & BUS_DMASYNC_PREWRITE) + if (op & BUS_DMASYNC_PREWRITE) { cpu_dcache_wb_range((vm_offset_t)buf, len); + cpu_l2cache_wb_range((vm_offset_t)buf, len); + } + if (op & BUS_DMASYNC_PREREAD) { + cpu_idcache_wbinv_range((vm_offset_t)buf, len); + cpu_l2cache_wbinv_range((vm_offset_t)buf, len); + } if (op & BUS_DMASYNC_POSTREAD) { - if ((vm_offset_t)buf & arm_dcache_align_mask) + if ((vm_offset_t)buf & arm_dcache_align_mask) { memcpy(_tmp_cl, (void *)((vm_offset_t)buf & ~ arm_dcache_align_mask), - (vm_offset_t)buf - ((vm_offset_t)buf &~ - arm_dcache_align_mask)); - if (((vm_offset_t)buf + len) & arm_dcache_align_mask) - memcpy(_tmp_cl, (void *)((vm_offset_t)buf & ~ - arm_dcache_align_mask), - (vm_offset_t)buf - ((vm_offset_t)buf &~ - arm_dcache_align_mask)); - if (((vm_offset_t)buf + len) & arm_dcache_align_mask) - memcpy(_tmp_clend, (void *)(((vm_offset_t)buf + len) & ~ - arm_dcache_align_mask), - (vm_offset_t)buf +len - (((vm_offset_t)buf + len) &~ - arm_dcache_align_mask)); + (vm_offset_t)buf & arm_dcache_align_mask); + } + if (((vm_offset_t)buf + len) & arm_dcache_align_mask) { + memcpy(_tmp_clend, (void *)((vm_offset_t)buf + len), + arm_dcache_align - (((vm_offset_t)(buf) + len) & + arm_dcache_align_mask)); + } cpu_dcache_inv_range((vm_offset_t)buf, len); + cpu_l2cache_inv_range((vm_offset_t)buf, len); + if ((vm_offset_t)buf & arm_dcache_align_mask) memcpy((void *)((vm_offset_t)buf & - ~arm_dcache_align_mask), - _tmp_cl, - (vm_offset_t)buf - ((vm_offset_t)buf &~ - arm_dcache_align_mask)); + ~arm_dcache_align_mask), _tmp_cl, + (vm_offset_t)buf & arm_dcache_align_mask); if (((vm_offset_t)buf + len) & arm_dcache_align_mask) - memcpy((void *)(((vm_offset_t)buf + len) & ~ - arm_dcache_align_mask), _tmp_clend, - (vm_offset_t)buf +len - (((vm_offset_t)buf + len) &~ - arm_dcache_align_mask)); + memcpy((void *)((vm_offset_t)buf + len), _tmp_clend, + arm_dcache_align - (((vm_offset_t)(buf) + len) & + arm_dcache_align_mask)); } } >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Aug 16 18:57:01 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5374516A46B; Thu, 16 Aug 2007 18:57: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 2676C16A418 for ; Thu, 16 Aug 2007 18:57:01 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1474E13C428 for ; Thu, 16 Aug 2007 18:57:01 +0000 (UTC) (envelope-from csjp@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 l7GIv0AH006976 for ; Thu, 16 Aug 2007 18:57:00 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GIv0jm006972 for perforce@freebsd.org; Thu, 16 Aug 2007 18:57:00 GMT (envelope-from csjp@freebsd.org) Date: Thu, 16 Aug 2007 18:57:00 GMT Message-Id: <200708161857.l7GIv0jm006972@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125228 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, 16 Aug 2007 18:57:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=125228 Change 125228 by csjp@push on 2007/08/16 18:56:44 Fix compilation warning. Spotted by: Eric Hall Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#50 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#50 (text+ko) ==== @@ -32,7 +32,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#49 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#50 $ */ #include @@ -3873,14 +3873,14 @@ * zonename size bytes; */ static int -fetch_zonename_tok(tokenstr_t *tok, char *buf, int len) +fetch_zonename_tok(tokenstr_t *tok, u_char *buf, int len) { int err = 0; READ_TOKEN_U_INT16(buf, len, tok->tt.zonename.len, tok->len, err); if (err) return (-1); - SET_PTR(buf, len, tok->tt.zonename.zonename, tok->tt.zonename.len, + SET_PTR((char *)buf, len, tok->tt.zonename.zonename, tok->tt.zonename.len, tok->len, err); if (err) return (-1); From owner-p4-projects@FreeBSD.ORG Thu Aug 16 19:09:17 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1771616A468; Thu, 16 Aug 2007 19:09: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 C9F7A16A41A for ; Thu, 16 Aug 2007 19:09:16 +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 B8A2B13C49D for ; Thu, 16 Aug 2007 19:09:16 +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 l7GJ9GVO008918 for ; Thu, 16 Aug 2007 19:09:16 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GJ9GFB008915 for perforce@freebsd.org; Thu, 16 Aug 2007 19:09:16 GMT (envelope-from zec@FreeBSD.org) Date: Thu, 16 Aug 2007 19:09:16 GMT Message-Id: <200708161909.l7GJ9GFB008915@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 125229 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, 16 Aug 2007 19:09:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=125229 Change 125229 by zec@zec_tca51 on 2007/08/16 19:08:27 Remove a debugging printf() in VNET_LIST_LOCK() that was triggered when acquisition of the exclusive access didn't succeed immediately. Resolving of this condition seems to work fine use the condvar signalling from the thread releasing the shared lock, hence trim down the debugging noise. Affected files ... .. //depot/projects/vimage/src/sys/kern/kern_vimage.c#35 edit Differences ... ==== //depot/projects/vimage/src/sys/kern/kern_vimage.c#35 (text+ko) ==== @@ -115,11 +115,8 @@ #define VNET_LIST_LOCK() \ mtx_lock(&vnet_list_refc_mtx); \ - while (vnet_list_refc != 0) { \ - cv_wait(&vnet_list_condvar, &vnet_list_refc_mtx); \ - printf("XXX vnet_list_refc = %d in %s\n", \ - vnet_list_refc, __FUNCTION__); \ - } + while (vnet_list_refc != 0) \ + cv_wait(&vnet_list_condvar, &vnet_list_refc_mtx); #define VNET_LIST_UNLOCK() \ mtx_unlock(&vnet_list_refc_mtx); From owner-p4-projects@FreeBSD.ORG Thu Aug 16 19:29:43 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E088416A41B; Thu, 16 Aug 2007 19:29:42 +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 BAB7616A417 for ; Thu, 16 Aug 2007 19:29:42 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A8C0513C461 for ; Thu, 16 Aug 2007 19:29:42 +0000 (UTC) (envelope-from fli@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 l7GJTgrm010144 for ; Thu, 16 Aug 2007 19:29:42 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GJTg4f010141 for perforce@freebsd.org; Thu, 16 Aug 2007 19:29:42 GMT (envelope-from fli@FreeBSD.org) Date: Thu, 16 Aug 2007 19:29:42 GMT Message-Id: <200708161929.l7GJTg4f010141@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125230 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, 16 Aug 2007 19:29:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=125230 Change 125230 by fli@fli_nexus on 2007/08/16 19:28:45 - Add a way to specify if a resource set is shared - Fix comments. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/shared/mdnsd_ipc.h#2 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/shared/mdnsd_ipc.h#2 (text+ko) ==== @@ -292,15 +292,17 @@ * no more records exists an CMP_ACK is returned. * * Message structure - * +----------------+-------//-------+ - * | ident length | ident string | - * +----------------+-------//-------+ + * +----------------+-+---------------+-------//-------+ + * | ident length |s| zero | ident string | + * +----------------+-+---------------+-------//-------+ * */ struct mipc_dbident { - uint32_t mii_ifidx; /* Interface index */ - uint32_t mii_len; /* ident length */ + uint32_t mii_ifidx; /* Interface index */ + uint32_t mii_len; /* Ident length */ + unsigned int mii_shared:1; /* Shared record set */ + unsigned int mii_zero:31; /* Ident follows (ascii) */ } __packed; From owner-p4-projects@FreeBSD.ORG Thu Aug 16 19:32:47 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1B5D816A420; Thu, 16 Aug 2007 19:32: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 E6DEE16A41A for ; Thu, 16 Aug 2007 19:32:46 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D4B9E13C46B for ; Thu, 16 Aug 2007 19:32:46 +0000 (UTC) (envelope-from fli@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 l7GJWkcA010471 for ; Thu, 16 Aug 2007 19:32:46 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GJWksU010468 for perforce@freebsd.org; Thu, 16 Aug 2007 19:32:46 GMT (envelope-from fli@FreeBSD.org) Date: Thu, 16 Aug 2007 19:32:46 GMT Message-Id: <200708161932.l7GJWksU010468@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125231 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, 16 Aug 2007 19:32:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=125231 Change 125231 by fli@fli_nexus on 2007/08/16 19:31:57 - Add a flags argument to dbr_ident_add() - Add some more debugging printouts. - Add a missing wcsdup Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/dbrec.c#4 edit .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/dbrec.h#3 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/dbrec.c#4 (text+ko) ==== @@ -297,9 +297,10 @@ * Create a record set identifier * dbr - Database record handle * ident - Record set identifier to create + * flags - Additional configuration flags */ int -dbr_ident_add(struct dbr *dbr, char *ident) +dbr_ident_add(struct dbr *dbr, char *ident, int flags) { struct dbr_ident *dbi; size_t ilen; @@ -311,6 +312,9 @@ if (dbi != NULL) { dprintf(DEBUG_DBR, "Record set %s does already exists dbi=%x", ident, dbi); + + dbi->dbi_flags &= flags; + dbi->dbi_flags |= flags; goto out; } @@ -321,6 +325,7 @@ MTX_INIT(dbi, dbi_mtx, NULL); dbi->dbi_dbr = dbr; dbi->dbi_ident = strdup(ident); + dbi->dbi_flags = flags; TAILQ_INIT(&dbi->dbi_rech); TAILQ_INIT(&dbi->dbi_res); TAILQ_INIT(&dbi->dbi_res_ptr); @@ -329,6 +334,8 @@ TAILQ_INSERT_TAIL(&dbr->dbr_ilist, dbi, dbi_next); hashtbl_add(&dbr->dbr_ident, dbi->dbi_ident, ilen, dbi, 0); + dprintf(DEBUG_DBR, "Added record set identifier %s, dbi=%x", + ident, dbi); RW_UNLOCK(dbr, dbr_lock); return (0); out: @@ -478,6 +485,9 @@ if (dbi->dbi_records == 0) ident_setname(dbi, i); + dprintf(DEBUG_DBR, "Added name %ls to identifier %s, dbi=%x", + name, ident, dbi); + MTX_UNLOCK(dbi, dbi_mtx); RW_UNLOCK(dbr, dbr_lock); return (0); @@ -544,11 +554,15 @@ dbi->dbi_names = NULL; } + dprintf(DEBUG_DBR, "Removed name %ls from identifier %s, dbi=%x", + name, ident, dbi); MTX_UNLOCK(dbi, dbi_mtx); RW_UNLOCK(dbr, dbr_lock); return (0); out: RW_UNLOCK(dbr, dbr_lock); + dprintf(DEBUG_DBR, "Failed to remove %ls from identifier %s, dbi=%x", + name, ident, dbi); return (-1); } @@ -682,7 +696,7 @@ dir->dir_data.dbi = dbip; } else { - dir->dir_data.wp = res; + dir->dir_data.wp = _wcsdup(res); } MTX_LOCK(dbi, dbi_mtx); ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/dbrec.h#3 (text+ko) ==== @@ -196,7 +196,7 @@ struct dbr_type * dbr_find_type(struct dbr *, char *, uint16_t); struct dbr_res * dbr_find_res(struct dbr *, char *, uint16_t, char *, size_t); -int dbr_ident_add(struct dbr *, char *); +int dbr_ident_add(struct dbr *, char *, int); int dbr_ident_del(struct dbr *, char *); char ** dbr_ident_list(struct dbr *); void dbr_ident_list_free(char **); From owner-p4-projects@FreeBSD.ORG Thu Aug 16 19:39:57 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4375416A41B; Thu, 16 Aug 2007 19:39:57 +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 132B116A419 for ; Thu, 16 Aug 2007 19:39:57 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 00D2113C494 for ; Thu, 16 Aug 2007 19:39:57 +0000 (UTC) (envelope-from fli@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 l7GJdul7010717 for ; Thu, 16 Aug 2007 19:39:56 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GJduet010714 for perforce@freebsd.org; Thu, 16 Aug 2007 19:39:56 GMT (envelope-from fli@FreeBSD.org) Date: Thu, 16 Aug 2007 19:39:56 GMT Message-Id: <200708161939.l7GJduet010714@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125232 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, 16 Aug 2007 19:39:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=125232 Change 125232 by fli@fli_nexus on 2007/08/16 19:39:02 - Pass shared-flag to dbr_ident_add() on shared resources. - Free memory allocated during parse. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/parse.y#4 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/parse.y#4 (text+ko) ==== @@ -220,10 +220,10 @@ cfg_rrset.cr_ident = $2; } rrset_content EBRACE { - struct cfg_name *cn; - struct cfg_res *cs; - struct cfg_resdata *csd; - int ttl; + struct cfg_name *cn, *cn2; + struct cfg_res *cs, *cs2; + struct cfg_resdata *csd, *csd2; + int flags, ttl; wchar_t *nam, *wp; size_t len; @@ -240,23 +240,30 @@ cfg_rrset.cr_ident, (cfg_rrset.cr_shared ? " (shared)" : ""), cfg_rrset.cr_namcount); - dbr_ident_add(dbr, cfg_rrset.cr_ident); - TAILQ_FOREACH(cn, &cfg_rrset.cr_names, cn_next) { + flags = 0; + if (cfg_rrset.cr_shared) + flags |= DBI_SHARED; + + dbr_ident_add(dbr, cfg_rrset.cr_ident, flags); + TAILQ_FOREACH_SAFE(cn, &cfg_rrset.cr_names, cn_next, cn2) { dprintf(DEBUG_CFGPARSE, " %s", cn->cn_name); len = strlen(cn->cn_name) + 1; nam = malloc(len * sizeof(wchar_t)); mbstowcs(nam, cn->cn_name, len); dbr_name_add(dbr, cfg_rrset.cr_ident, nam); free(nam); + + TAILQ_REMOVE(&cfg_rrset.cr_names, cn, cn_next); + free(cn); } dprintf(DEBUG_CFGPARSE, "rrset resources"); - TAILQ_FOREACH(cs, &cfg_rrset.cr_res, cs_next) { + TAILQ_FOREACH_SAFE(cs, &cfg_rrset.cr_res, cs_next, cs2) { dprintf(DEBUG_CFGPARSE, " type %d", cs->cs_type); ttl = cs->cs_ttl > 0 ? cs->cs_ttl : (cfg_rrset.cr_ttl > 0 ? cfg_rrset.cr_ttl : (cfg_rrset.cr_shared ? cfg_ttl_shared : cfg_ttl)); - TAILQ_FOREACH(csd, &cs->cs_data, csd_next) { + TAILQ_FOREACH_SAFE(csd, &cs->cs_data, csd_next, csd2) { dprintf(DEBUG_CFGPARSE, " data = %s, ttl = %d", csd->csd_data, ttl); @@ -272,10 +279,19 @@ dbr_res_add(dbr, cfg_rrset.cr_ident, mdns_c_in, cs->cs_type, ttl, wp, 0); + + free(wp); } + TAILQ_REMOVE(&cs->cs_data, csd, csd_next); + free(csd); } + + TAILQ_REMOVE(&cfg_rrset.cr_res, cs, cs_next); + free(cs); } + free(cfg_rrset.cr_ident); + dprintf(DEBUG_CFGPARSE, "end of rrset statement"); } ; From owner-p4-projects@FreeBSD.ORG Thu Aug 16 19:45:04 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4F9B716A41A; Thu, 16 Aug 2007 19:45:04 +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 1188416A420 for ; Thu, 16 Aug 2007 19:45:04 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F14E813C45D for ; Thu, 16 Aug 2007 19:45:03 +0000 (UTC) (envelope-from fli@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 l7GJj3WG011153 for ; Thu, 16 Aug 2007 19:45:03 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GJj3b9011150 for perforce@freebsd.org; Thu, 16 Aug 2007 19:45:03 GMT (envelope-from fli@FreeBSD.org) Date: Thu, 16 Aug 2007 19:45:03 GMT Message-Id: <200708161945.l7GJj3b9011150@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125233 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, 16 Aug 2007 19:45:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=125233 Change 125233 by fli@fli_nexus on 2007/08/16 19:44:52 - Fix LOCAL_CREDS which I somehow broke. - Make the message read more robust and properly handle message that are written using multiple write() calls. - Fix code that simply was broken. - Follow dbr_ident_add() changes. - Some minor whitespace and debugging fixes. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/clisrv.c#5 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/clisrv.c#5 (text+ko) ==== @@ -25,6 +25,7 @@ */ #include +#include #include #include #include @@ -215,7 +216,7 @@ struct clisrv *cs; struct cs_client *csc; struct md_glob *g; - int sock; + int sock, so, error; ev_arg eva; cs = arg.ptr; @@ -230,6 +231,12 @@ goto out; } + so = 1; + error = setsockopt(sock, 0, LOCAL_CREDS, &so, sizeof(so)); + if (error != 0) + logger(LOG_ERR, "setsockopt LOCAL_CREDS failed: %s", + strerror(errno)); + csc = obj_alloc(OBJ_CSC); MDNS_INIT_SET(csc, csc_magic); MTX_INIT(csc, csc_mtx, NULL); @@ -305,9 +312,13 @@ struct cmsghdr *cmptr; struct sockcred *cred; struct mipc_head *mih; - int n, sock, error, len; + int n, sock, error; + char *p; + size_t rlen, len, len2; struct msghdr msg; struct iovec iov[1]; + fd_set rfd; + struct timeval tv; char control[CMSG_LEN(SOCKCREDSIZE(1)) + sizeof(struct cmsghdr)]; char buf[MIPC_MAXPLEN]; @@ -324,10 +335,11 @@ msg.msg_control = control; msg.msg_controllen = sizeof(control); msg.msg_flags = 0; - iov[0].iov_base = buf + sizeof(struct mipc_head); + iov[0].iov_base = buf; + iov[0].iov_len = sizeof(struct mipc_head); for (;;) { - n = read(sock, buf, sizeof(struct mipc_head)); + n = recvmsg(sock, &msg, 0); if (n < (signed int)sizeof(struct mipc_head)) break; @@ -335,14 +347,6 @@ if (mih->mih_ver != MIPC_VERSION) continue; - len = mih->mih_msglen > MIPC_MAXPLEN ? - MIPC_MAXPLEN : mih->mih_msglen; - iov[0].iov_len = len - sizeof(struct mipc_head); - - n = recvmsg(sock, &msg, 0); - if ((unsigned int)n != iov[0].iov_len) - continue; - /* Check credentials */ cmptr = CMSG_FIRSTHDR(&msg); if (cmptr != NULL) { @@ -353,11 +357,42 @@ } } + len = mih->mih_msglen > MIPC_MAXPLEN ? + MIPC_MAXPLEN : mih->mih_msglen; + + rlen = len - sizeof(struct mipc_head); + p = buf + sizeof(struct mipc_head); + + tv.tv_sec = 0; + tv.tv_usec = 500000; + len2 = 0; + + do { + n = read(sock, p, rlen); + if (n > 0) { + rlen -= n; + p += n; + len2 += n; + } + else if (errno == EAGAIN) { + FD_ZERO(&rfd); + FD_SET(sock, &rfd); + error = select(sock + 1, &rfd, NULL, NULL, &tv); + if (error == 0) + break; + } + else { + break; + } + } while (rlen > 0); + + if (rlen > 0) + break; + dprintf(DEBUG_CS, "Received packet on UNIX pipe csc=%x, " "len=%d, suser=%d, sock=%d", csc, n, csc->csc_suser, sock); - n += sizeof(struct mipc_head); - error = cp_parse(csc, buf, n, csc->csc_suser); + error = cp_parse(csc, buf, len, csc->csc_suser); if (error != 0) dprintf(DEBUG_CS, "Failed to parse packet csc=%x", csc); } @@ -425,8 +460,8 @@ mih = (struct mipc_head *)buf; - dprintf(DEBUG_CS, "Header ver=%d, msgtype=%d", - mih->mih_ver, mih->mih_msgtype); + dprintf(DEBUG_CS, "Header ver=%d, msgtype=%d, msglen=%d", + mih->mih_ver, mih->mih_msgtype, mih->mih_msglen); if (mih->mih_ver != MIPC_VERSION) { error = MIE_IVAL; @@ -486,7 +521,7 @@ memcpy(name, wp, miq->miq_len * sizeof(wchar_t)); name[miq->miq_len] = L'\0'; - nam = mdns_name_encode(name, MDNS_RECORD_LEN, MDNS_ENC_AUTO); + nam = mdns_name_encode(name, MDNS_RECORD_LEN, MDNS_ENC_AUTO); if (nam == NULL) return (MIE_IVAL); @@ -648,7 +683,7 @@ struct md_glob *g; struct md_if *mif; char *ident, *p; - int error = 0; + int flags, error = 0; g = csc->csc_serv->cs_glob; @@ -662,7 +697,7 @@ if (mii->mii_ifidx > g->g_ifs_max) return (MIE_IVAL); - if (mii->mii_len > len) + if (mii->mii_len > len || mii->mii_len == 0) return (MIE_IVAL); ident = malloc(mii->mii_len + 1); @@ -674,6 +709,10 @@ dprintf(DEBUG_CS, "Request to add resource identifier %s, ifidx=%d " "csc=%x", ident, mii->mii_ifidx, csc); + flags = 0; + if (mii->mii_shared) + flags |= DBI_SHARED; + RW_RLOCK(g, g_lock); /* @@ -687,12 +726,12 @@ free(ident); return (MIE_IVAL); } - error = dbr_ident_add(&mif->mif_dbr, ident); + error = dbr_ident_add(&mif->mif_dbr, ident, flags); } else { /* We ignore errors in this case */ TAILQ_FOREACH(mif, &g->g_ifs_head, mif_next) { - dbr_ident_add(&mif->mif_dbr, ident); + dbr_ident_add(&mif->mif_dbr, ident, flags); } } @@ -772,26 +811,29 @@ parse_dbi_name(char *buf, size_t len, struct mipc_dbi_name **miin, char **ident, wchar_t **name) { - char *p; + char *p, *identp; struct mipc_dbi_name *miin2; + wchar_t *namp; if (len < sizeof(struct mipc_dbi_name)) return (MIE_IVAL); *miin = (struct mipc_dbi_name *)buf; + miin2 = *miin; + len -= sizeof(struct mipc_dbi_name); p = buf + sizeof(struct mipc_dbi_name); - miin2 = *miin; - if (len < miin2->miin_ilen) return (MIE_IVAL); - *ident = malloc(miin2->miin_ilen + 1); - if (*ident == NULL) + identp = malloc(miin2->miin_ilen + 1); + if (identp == NULL) return (MIE_INTE); - memcpy(*ident, p, miin2->miin_ilen); - *ident[miin2->miin_ilen] = '\0'; + memcpy(identp, p, miin2->miin_ilen); + identp[miin2->miin_ilen] = '\0'; + *ident = identp; + p += miin2->miin_ilen; len -= miin2->miin_ilen; @@ -800,13 +842,15 @@ return (MIE_IVAL); } - *name = malloc((miin2->miin_len + 1) * sizeof(wchar_t)); - if (*name == NULL) { + namp = malloc((miin2->miin_len + 1) * sizeof(wchar_t)); + if (namp == NULL) { free(*ident); return (MIE_IVAL); } - memcpy(*name, p, miin2->miin_len * sizeof(wchar_t)); - *name[miin2->miin_len] = L'\0'; + + memcpy(namp, p, miin2->miin_len * sizeof(wchar_t)); + namp[miin2->miin_len] = L'\0'; + *name = namp; return (0); } @@ -898,13 +942,13 @@ mif = g->g_ifs[miin->miin_ifidx]; if (mif == NULL) goto error; - error = dbr_name_add(&mif->mif_dbr, ident, name); + error = dbr_name_del(&mif->mif_dbr, ident, name); if (error != 0) retval = MIE_EXISTS; } else { TAILQ_FOREACH(mif, &g->g_ifs_head, mif_next) { - dbr_name_add(&mif->mif_dbr, ident, name); + dbr_name_del(&mif->mif_dbr, ident, name); } } @@ -1032,7 +1076,8 @@ char **ident, wchar_t **res, char **resptr) { struct mipc_dbi_res_set *mirs2; - char *p; + char *p, *identp, *tmp; + wchar_t *res2; if (len < sizeof(struct mipc_dbi_res_set)) return (MIE_IVAL); @@ -1046,11 +1091,12 @@ if (len < mirs2->mirs_ilen) return (MIE_IVAL); - *ident = malloc(mirs2->mirs_ilen + 1); - if (*ident == NULL) + identp = malloc(mirs2->mirs_ilen + 1); + if (identp == NULL) return (MIE_INTE); - memcpy(*ident, p, mirs2->mirs_ilen); - *ident[mirs2->mirs_ilen] = '\0'; + memcpy(identp, p, mirs2->mirs_ilen); + identp[mirs2->mirs_ilen] = '\0'; + *ident = identp; p += mirs2->mirs_ilen; len -= mirs2->mirs_ilen; @@ -1063,13 +1109,14 @@ return (MIE_IVAL); } - *resptr = malloc(mirs2->mirs_rlen + 1); - if (*resptr == NULL) { + tmp = malloc(mirs2->mirs_rlen + 1); + if (tmp == NULL) { free(*ident); return (MIE_IVAL); } - memcpy(*resptr, p, mirs2->mirs_rlen); - *resptr[mirs2->mirs_rlen] = '\0'; + memcpy(tmp, p, mirs2->mirs_rlen); + tmp[mirs2->mirs_rlen] = '\0'; + *resptr = tmp; } else { if (len < (mirs2->mirs_rlen * sizeof(wchar_t))) { @@ -1077,13 +1124,14 @@ return (MIE_IVAL); } - *res = malloc((mirs2->mirs_rlen + 1) * sizeof(wchar_t)); - if (*res == NULL) { + res2 = malloc((mirs2->mirs_rlen + 1) * sizeof(wchar_t)); + if (res2 == NULL) { free(*ident); return (MIE_INTE); } - memcpy(*res, p, mirs2->mirs_rlen * sizeof(wchar_t)); - *res[mirs2->mirs_rlen] = L'\0'; + memcpy(res2, p, mirs2->mirs_rlen * sizeof(wchar_t)); + res2[mirs2->mirs_rlen] = L'\0'; + *res = res2; } return (0); From owner-p4-projects@FreeBSD.ORG Thu Aug 16 19:51:12 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 637F716A420; Thu, 16 Aug 2007 19:51: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 268A116A419 for ; Thu, 16 Aug 2007 19:51:12 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 12A9213C481 for ; Thu, 16 Aug 2007 19:51:12 +0000 (UTC) (envelope-from fli@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 l7GJpCv3011523 for ; Thu, 16 Aug 2007 19:51:12 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GJpBgH011518 for perforce@freebsd.org; Thu, 16 Aug 2007 19:51:11 GMT (envelope-from fli@FreeBSD.org) Date: Thu, 16 Aug 2007 19:51:11 GMT Message-Id: <200708161951.l7GJpBgH011518@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125234 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, 16 Aug 2007 19:51:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=125234 Change 125234 by fli@fli_nexus on 2007/08/16 19:50:49 - Add mdns_freerrset(), free resources allocated to a rrset. - Add mdns_db_name_{add,del}() and mdns_db_res_{add,del}() which allows manipulation of the record database. - Make it possible to specify the default location of the daemon pipe at compile time. - General cleanup. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/libmdns/libmdns.c#2 edit .. //depot/projects/soc2007/fli-mdns_sd/libmdns/libmdns.h#2 edit .. //depot/projects/soc2007/fli-mdns_sd/libmdns/mdns.h#2 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/libmdns/libmdns.c#2 (text+ko) ==== @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -44,20 +45,22 @@ #include "libmdns.h" #include "mdnsd_ipc.h" -#include "../mdnsd/debug.h" - -#define MDNSD_PIPE "/var/run/mdnsd.pipe" - static int sock_open(struct mdns *); static void sock_close(struct mdns *); static inline int sock_verify(struct mdns *); static int sock_reconnect(struct mdns *); +static int doquery(struct mdns *, int, int, int, int, int, int, wchar_t *); static struct mdns_msg * sock_read(struct mdns *, int, struct timeval *); static struct mdns_msg * msg_wait(struct mdns *, int, struct timeval *); static void msg_free(struct mdns_msg *); struct mdns_wait * in_wqueue(struct mdns *, int); +static inline int ipc_sethdr(struct mdns *, struct mipc_head *, int); +static ssize_t utf8_decode(char *, size_t, wchar_t *, size_t); +static int docmd(struct mdns *, int, int, ...); +static int errormsg(struct mdns_msg *); -static inline int ipc_sethdr(struct mdns *, struct mipc_head *, int); +extern struct ctmap class_map[]; +extern int class_map_size; /* * Open a handle to the daemon @@ -66,6 +69,7 @@ mdns_open(void) { struct mdns *m; + int error; m = malloc(sizeof(struct mdns)); if (m == NULL) @@ -74,7 +78,11 @@ TAILQ_INIT(&m->m_recv); TAILQ_INIT(&m->m_wait); - sock_open(m); + error = sock_open(m); + if (error < 0) { + free(m); + return (NULL); + } MDNS_SETCOOKIE(m); return (m); } @@ -86,84 +94,29 @@ mdns_close(struct mdns *m) { struct mdns_msg *mm, *mm2; + struct mdns_wait *mw, *mw2; if (m == NULL) return; MDNS_ASSERT(m); + if (sock_verify(m)) + close(m->m_sock); + TAILQ_FOREACH_SAFE(mm, &m->m_recv, mm_next, mm2) { TAILQ_REMOVE(&m->m_recv, mm, mm_next); msg_free(mm); } + TAILQ_FOREACH_SAFE(mw, &m->m_wait, mw_next, mw2) { + TAILQ_REMOVE(&m->m_wait, mw, mw_next); + free(mw); + } MDNS_UNSETCOOKIE(m); free(m); } -/* - * Submit a query to the daemon - */ -static int -doquery(struct mdns *m, int cmd, int fam, int ifidx, int tmo, int class, - int type, wchar_t *rec) -{ - size_t rlen; - int n, mid, retval = 0; - struct mdns_msg *mm; - struct mdns_wait *mw; - struct mipc_head mih; - struct mipc_query miq; - struct iovec iov[3]; - - rlen = wcslen(rec); - if (rlen >= MDNS_NAME_LEN) - return (-1); - - mid = ipc_sethdr(m, &mih, MIM_QUERY); - miq.miq_cmd = cmd; - miq.miq_len = rlen; - miq.miq_timeout = tmo; - miq.miq_fam = fam; - miq.miq_ifidx = ifidx; - miq.miq_class = class; - miq.miq_type = type; - iov[0].iov_base = &mih; - iov[0].iov_len = sizeof(struct mipc_head); - iov[1].iov_base = &miq; - iov[1].iov_len = sizeof(struct mipc_query); - iov[2].iov_base = rec; - iov[2].iov_len = rlen * sizeof(wchar_t); - mih.mih_msglen += sizeof(struct mipc_query) + (rlen * sizeof(wchar_t)); - - do { - n = writev(m->m_sock, iov, 3); - } while (n < 0 && errno == EINTR); - - if (n < 0) - return (-1); - - retval = mid; - mm = sock_read(m, mid, NULL); - if (mm->mm_msgtype == MIM_ERROR) - retval = -1; - msg_free(mm); - - if (retval >= 0 && (cmd == MIQ_CMD_CREG || cmd == MIQ_CMD_ONESHOT)) { - mw = malloc(sizeof(struct mdns_wait)); - mw->mw_seqid = mid; - mw->mw_msgtype = MIM_QUERY; - mw->mw_rrset.mr_class = class; - mw->mw_rrset.mr_type = type; - mw->mw_rrset.mr_ifidx = ifidx; - mw->mw_rrset.mr_family = fam; - wcscpy(mw->mw_rrset.mr_name, rec); - TAILQ_INSERT_TAIL(&m->m_wait, mw, mw_next); - } - - return (retval); -} - /* * Dispatch a query to the daemon */ @@ -231,6 +184,8 @@ char *p; size_t len; + MDNS_ASSERT(m); + again: do { mm = msg_wait(m, mid, tv); @@ -286,6 +241,585 @@ return (rmid); } +void +mdns_freerrset(struct mdns_rrset *mr) +{ + + free(mr->mr_res); +} + +/* + * Array to class (integer) translation + */ +int +mdns_atoc(const char *class) +{ + int i; + + for (i = 0; i < class_map_size; i++) { + if (strcasecmp(class_map[i].ctm_str, class) == 0) + return (class_map[i].ctm_int); + } + return (-1); +} + +/* + * Class to array translation + */ +const char * +mdns_ctoa(int class) +{ + int i; + + for (i = 0; i < class_map_size; i++) { + if (class == class_map[i].ctm_int) + return (class_map[i].ctm_str); + } + return (NULL); +} + + +/* + * Array to type (integer) translation + */ +int +mdns_atot(int class, const char *type) +{ + int i; + struct ctmap *type_map = NULL; + + for (i = 0; i < class_map_size; i++) { + if (class == class_map[i].ctm_int) { + type_map = class_map[i].ctm_child; + break; + } + } + + if (type_map == NULL) + return (-1); + + for (i = 0; type_map[i].ctm_int != -1; i++) { + if (strcasecmp(type_map[i].ctm_str, type) == 0) + return (type_map[i].ctm_int); + } + return (-1); +} + +/* + * Type to array translation + */ +const char * +mdns_ttoa(int class, int type) +{ + int i; + struct ctmap *type_map = NULL; + + for (i = 0; i < class_map_size; i++) { + if (class == class_map[i].ctm_int) { + type_map = class_map[i].ctm_child; + break; + } + } + + if (type_map == NULL) + return (NULL); + + for (i = 0; type_map[i].ctm_int != -1; i++) { + if (type_map[i].ctm_int == type) + return (type_map[i].ctm_str); + } + return (NULL); +} + +/* + * Auto-convert the given resource set into a more readable format. The + * returned pointer must be passed to mdns_free_resource() + */ +void * +mdns_get_resource(struct mdns_rrset *mr) +{ + int error; + + if (mr->mr_class != mdns_c_in) + return (mr->mr_res); + else if (mr->mr_reslen == 0 || mr->mr_res == NULL) + return (NULL); + + switch (mr->mr_type) { + case mdns_in_a: + if (mr->mr_reslen != sizeof(struct in_addr)) + return (NULL); + return (mr->mr_res); + case mdns_in_aaaa: + if (mr->mr_reslen != sizeof(struct in6_addr)) + return (NULL); + return (mr->mr_res); + case mdns_in_ptr: + case mdns_in_cname: { + wchar_t *nam; + + nam = malloc((mr->mr_reslen + 1) * sizeof(wchar_t)); + if (nam == NULL) + return (NULL); + error = utf8_decode(mr->mr_res, mr->mr_reslen, nam, + mr->mr_reslen + 1); + if (error <= 0) { + free(nam); + return (NULL); + } + return (nam); + break; + } + case mdns_in_txt: { + char *p, *q, **txt; + size_t len; + uint8_t slen; + int num; + + num = 2; + txt = malloc(sizeof(char *) * num); + if (txt == NULL) + return (NULL); + + len = mr->mr_reslen; + p = mr->mr_res; + while (len != 0 && p < (mr->mr_res + mr->mr_reslen)) { + memcpy(&slen, p++, sizeof(uint8_t)); + if (slen > --len) { + free(txt); + return (NULL); + } + + q = malloc(slen + 1); + memcpy(q, p, slen); + q[slen] = '\0'; + txt[num - 2] = q; + txt[num - 1] = NULL; + txt = realloc(txt, sizeof(char *) * ++num); + p += slen; + len -= slen; + } + return (txt); + break; + } + case mdns_in_srv: { + struct mdns_res_in_srv *srv; + char *p; + uint16_t tmp; + size_t len; + + if (mr->mr_reslen < 6) + return (NULL); + + srv = malloc(sizeof(struct mdns_res_in_srv)); + if (srv == NULL) + return (NULL); + p = mr->mr_res; + len = mr->mr_reslen; + memcpy(&tmp, p, sizeof(uint16_t)); + p += sizeof(uint16_t); + srv->srv_pri = htons(tmp); + + memcpy(&tmp, p, sizeof(uint16_t)); + p += sizeof(uint16_t); + srv->srv_wei = htons(tmp); + + memcpy(&tmp, p, sizeof(uint16_t)); + p += sizeof(uint16_t); + srv->srv_prt = htons(tmp); + + len -= sizeof(uint16_t) * 3; + srv->srv_nam = malloc((len + 1) * sizeof(wchar_t)); + error = utf8_decode(p, len, srv->srv_nam, len + 1); + if (error <= 0) { + free(srv->srv_nam); + free(srv); + return (NULL); + } + return (srv); + } + default: + return (mr->mr_res); + } + return (NULL); +} + +/* + * Free readable resource format created by mdns_get_resource() + */ +void +mdns_free_resource(struct mdns_rrset *mr, void *res) +{ + + if (mr->mr_class != mdns_c_in) + return; + else if (res == NULL) + return; + + switch (mr->mr_type) { + case mdns_in_ptr: + case mdns_in_cname: + free(res); + break; + case mdns_in_txt: { + char **p; + int i; + + for (p = res, i = 0; p[i] != NULL; i++) + free(p[i]); + free(res); + break; + } + case mdns_in_srv: { + struct mdns_res_in_srv *srv; + + srv = res; + free(srv->srv_nam); + free(srv); + break; + } + default: + break; + } +} + +int +mdns_db_name_add(struct mdns *m, const char *ident, unsigned int ifidx, + int flags, const wchar_t *nam) +{ + int mid, error; + size_t ilen, nlen; + struct mdns_msg *mm; + struct mipc_dbident mii; + struct mipc_dbi_name miin; + + MDNS_ASSERT(m); + + ilen = strlen(ident); + if (ilen == 0) + return (-1); + nlen = wcslen(nam); + if (nlen == 0) + return (-1); + + mii.mii_ifidx = ifidx; + mii.mii_len = ilen; + if (flags & MDNS_NAM_SHARED) + mii.mii_shared = 1; + mii.mii_zero = 0; + mid = docmd(m, MIM_IDENT_ADD, 2, &mii, + sizeof(struct mipc_dbident), ident, ilen); + if (mid < 0) + return (-1); + mm = msg_wait(m, mid, NULL); + if (mm == NULL) + return (-1); + + if (mm->mm_msgtype == MIM_ERROR) { + if (errormsg(mm) != MIE_EXISTS) { + msg_free(mm); + return (-1); + } + } + msg_free(mm); + + miin.miin_ifidx = ifidx; + miin.miin_ilen = ilen; + miin.miin_len = nlen; + miin.miin_elen = 0; + miin.miin_active = 0; + miin.miin_zero = 0; + mid = docmd(m, MIM_IDENT_NAME_ADD, 3, &miin, + sizeof(struct mipc_dbi_name), ident, ilen, nam, + nlen * sizeof(wchar_t)); + if (mid < 0) + return (-1); + + mm = msg_wait(m, mid, NULL); + if (mm == NULL) + return (-1); + + error = errormsg(mm); + msg_free(mm); + if (error >= 0) + return (-1); + return (0); +} + +int +mdns_db_name_del(struct mdns *m, const char *ident, unsigned int ifidx, + const wchar_t *nam) +{ + size_t ilen, nlen; + int mid, error; + struct mdns_msg *mm; + struct mipc_dbi_name miin; + + MDNS_ASSERT(m); + + ilen = strlen(ident); + if (ilen == 0) + return (-1); + nlen = wcslen(nam); + if (nlen == 0) + return (-1); + + miin.miin_ifidx = ifidx; + miin.miin_ilen = ilen; + miin.miin_len = nlen; + miin.miin_elen = 0; + miin.miin_active = 0; + miin.miin_zero = 0; + mid = docmd(m, MIM_IDENT_NAME_DEL, 3, &miin, + sizeof(struct mipc_dbi_name), ident, ilen, nam, + nlen * sizeof(wchar_t)); + + mm = msg_wait(m, mid, NULL); + if (mm == NULL) + return (-1); + + error = errormsg(mm); + msg_free(mm); + if (error >= 0) + return (-1); + + /* FIXME Auto remove ident if this was the last name */ + + return (0); +} + +int +mdns_db_res_add(struct mdns *m, const char *ident, unsigned int ifidx, + uint16_t class, uint16_t type, uint32_t ttl, int rhint, const void *res) +{ + size_t ilen, rlen; + int mid, error, ptr; + struct mdns_msg *mm; + struct mipc_dbident mii; + struct mipc_dbi_res_set mirs; + + ilen = strlen(ident); + if (ilen == 0) + return (-1); + + if (rhint == MDNS_RES_DEFAULT) { + mirs.mirs_rlen = wcslen((const wchar_t *)res); + rlen = mirs.mirs_rlen * sizeof(wchar_t); + ptr = 0; + } + else if (rhint == MDNS_RES_POINTER) { + rlen = strlen((const char *)res); + mirs.mirs_rlen = rlen; + ptr = 1; + } + else + return (-1); + + mii.mii_ifidx = ifidx; + mii.mii_len = ilen; + mid = docmd(m, MIM_IDENT_ADD, 2, &mii, + sizeof(struct mipc_dbident), ident, ilen); + if (mid < 0) + return (-1); + mm = msg_wait(m, mid, NULL); + if (mm == NULL) + return (-1); + + if (mm->mm_msgtype == MIM_ERROR) { + if (errormsg(mm) != MIE_EXISTS) { + msg_free(mm); + return (-1); + } + } + msg_free(mm); + + mirs.mirs_ifidx = ifidx; + mirs.mirs_class = class; + mirs.mirs_type = type; + mirs.mirs_ttl = ttl; + mirs.mirs_ilen = ilen; + mirs.mirs_pointer = ptr; + mirs.mirs_zero = 0; + + mid = docmd(m, MIM_IDENT_RES_ADD, 3, + &mirs, sizeof(struct mipc_dbi_res_set), + ident, ilen, res, rlen); + if (mid < 0) + return (-1); + + mm = msg_wait(m, mid, NULL); + if (mm == NULL) + return (-1); + + error = errormsg(mm); + msg_free(mm); + if (error >= 0) + return (-1); + return (0); +} + +int +mdns_db_res_del(struct mdns *m, const char *ident, unsigned int ifidx, + uint16_t class, uint16_t type, int rhint, const void *res) +{ + size_t ilen, rlen; + int mid, error, ptr; + struct mdns_msg *mm; + struct mipc_dbi_res_set mirs; + + ilen = strlen(ident); + if (ilen == 0) + return (-1); + + if (rhint == MDNS_RES_DEFAULT) { + mirs.mirs_rlen = wcslen((const wchar_t *)res); + rlen = mirs.mirs_rlen * sizeof(wchar_t); + ptr = 0; + } + else if (rhint == MDNS_RES_POINTER) { + rlen = strlen((const char *)res); + mirs.mirs_rlen = rlen; + ptr = 1; + } + else + return (-1); + + mirs.mirs_ifidx = ifidx; + mirs.mirs_class = class; + mirs.mirs_type = type; + mirs.mirs_ttl = 0; + mirs.mirs_ilen = ilen; + mirs.mirs_pointer = ptr; + mirs.mirs_zero = 0; + + mid = docmd(m, MIM_IDENT_RES_DEL, 3, + &mirs, sizeof(struct mipc_dbi_res_set), + ident, ilen, res, rlen); + + mm = msg_wait(m, mid, NULL); + if (mm == NULL) + return (-1); + + error = errormsg(mm); + msg_free(mm); + if (error >= 0) + return (-1); + return (0); +} + +static int +errormsg(struct mdns_msg *mm) +{ + struct mipc_error *mie; + + if (mm->mm_msgtype != MIM_ERROR) + return (-1); + + mie = (struct mipc_error *)mm->mm_buf; + return (mie->mie_code); +} + +static int +docmd(struct mdns *m, int cmd, int count, ...) +{ + va_list ap; + int mid, i, n; + void *payload; + size_t plen, msglen; + struct mipc_head mih; + + msglen = sizeof(struct mipc_head); + + va_start(ap, count); + for (i = 0; i < count; i++) { + payload = va_arg(ap, void *); + plen = va_arg(ap, size_t); + msglen += plen; + } + va_end(ap); + + mid = ipc_sethdr(m, &mih, cmd); + mih.mih_msglen = msglen; + do { + n = write(m->m_sock, &mih, sizeof(struct mipc_head)); + } while (n < 0 && errno == EINTR); + if (n <= 0) + return (-1); + + va_start(ap, count); + for (i = 0; i < count; i++) { + payload = va_arg(ap, void *); + plen = va_arg(ap, size_t); + n = write(m->m_sock, payload, plen); + } + va_end(ap); + return (mid); +} + +/* + * Submit a query to the daemon + */ +static int +doquery(struct mdns *m, int cmd, int fam, int ifidx, int tmo, int class, + int type, wchar_t *rec) +{ + size_t rlen; + int n, mid, retval = 0; + struct mdns_msg *mm; + struct mdns_wait *mw; + struct mipc_head mih; + struct mipc_query miq; + struct iovec iov[3]; + + rlen = wcslen(rec); + if (rlen >= MDNS_NAME_LEN) + return (-1); + + mid = ipc_sethdr(m, &mih, MIM_QUERY); + miq.miq_cmd = cmd; + miq.miq_len = rlen; + miq.miq_timeout = tmo; + miq.miq_fam = fam; + miq.miq_ifidx = ifidx; + miq.miq_class = class; + miq.miq_type = type; + + iov[0].iov_base = &mih; + iov[0].iov_len = sizeof(struct mipc_head); + iov[1].iov_base = &miq; + iov[1].iov_len = sizeof(struct mipc_query); + iov[2].iov_base = rec; + iov[2].iov_len = rlen * sizeof(wchar_t); + mih.mih_msglen += sizeof(struct mipc_query) + (rlen * sizeof(wchar_t)); + + do { + n = writev(m->m_sock, iov, 3); + } while (n < 0 && errno == EINTR); + + if (n < 0) + return (-1); + + retval = mid; + mm = sock_read(m, mid, NULL); + if (mm->mm_msgtype == MIM_ERROR) + retval = -1; + msg_free(mm); + + if (retval >= 0 && (cmd == MIQ_CMD_CREG || cmd == MIQ_CMD_ONESHOT)) { + mw = malloc(sizeof(struct mdns_wait)); + mw->mw_seqid = mid; + mw->mw_msgtype = MIM_QUERY; + mw->mw_rrset.mr_class = class; + mw->mw_rrset.mr_type = type; + mw->mw_rrset.mr_ifidx = ifidx; + mw->mw_rrset.mr_family = fam; + wcscpy(mw->mw_rrset.mr_name, rec); + TAILQ_INSERT_TAIL(&m->m_wait, mw, mw_next); + } + + return (retval); +} + static void msg_free(struct mdns_msg *mm) { @@ -503,92 +1037,8 @@ return (mih->mih_id); } -extern struct ctmap class_map[]; -extern int class_map_size; - -/* - * Array to class (integer) translation - */ -int -mdns_atoc(const char *class) -{ - int i; - - for (i = 0; i < class_map_size; i++) { - if (strcasecmp(class_map[i].ctm_str, class) == 0) - return (class_map[i].ctm_int); - } - return (-1); -} - -/* - * Class to array translation - */ -const char * -mdns_ctoa(int class) -{ - int i; - - for (i = 0; i < class_map_size; i++) { - if (class == class_map[i].ctm_int) - return (class_map[i].ctm_str); - } - return (NULL); -} -/* - * Array to type (integer) translation - */ -int -mdns_atot(int class, const char *type) -{ - int i; - struct ctmap *type_map = NULL; - - for (i = 0; i < class_map_size; i++) { - if (class == class_map[i].ctm_int) { - type_map = class_map[i].ctm_child; - break; - } - } - - if (type_map == NULL) - return (-1); - - for (i = 0; type_map[i].ctm_int != -1; i++) { - if (strcasecmp(type_map[i].ctm_str, type) == 0) - return (type_map[i].ctm_int); - } - return (-1); -} - -/* - * Type to array translation - */ -const char * -mdns_ttoa(int class, int type) -{ - int i; - struct ctmap *type_map = NULL; - - for (i = 0; i < class_map_size; i++) { - if (class == class_map[i].ctm_int) { - type_map = class_map[i].ctm_child; - break; - } - } - - if (type_map == NULL) - return (NULL); - - for (i = 0; type_map[i].ctm_int != -1; i++) { - if (type_map[i].ctm_int == type) - return (type_map[i].ctm_str); - } - return (NULL); -} - static ssize_t utf8_decode(char *src, size_t slen, wchar_t *dst, size_t dlen) { @@ -633,147 +1083,3 @@ return (len); } -void * -mdns_get_resource(struct mdns_rrset *mr) -{ - int error; - - if (mr->mr_class != mdns_c_in) - return (mr->mr_res); - else if (mr->mr_reslen == 0 || mr->mr_res == NULL) - return (NULL); - - switch (mr->mr_type) { - case mdns_in_a: - if (mr->mr_reslen != sizeof(struct in_addr)) - return (NULL); - return (mr->mr_res); - case mdns_in_aaaa: - if (mr->mr_reslen != sizeof(struct in6_addr)) - return (NULL); - return (mr->mr_res); - case mdns_in_ptr: - case mdns_in_cname: { - wchar_t *nam; - - nam = malloc((mr->mr_reslen + 1) * sizeof(wchar_t)); - if (nam == NULL) - return (NULL); - error = utf8_decode(mr->mr_res, mr->mr_reslen, nam, - mr->mr_reslen + 1); - if (error <= 0) { - free(nam); - return (NULL); - } - return (nam); - break; - } - case mdns_in_txt: { - char *p, *q, **txt; - size_t len; - uint8_t slen; - int num; - - num = 2; - txt = malloc(sizeof(char *) * num); - if (txt == NULL) - return (NULL); - - len = mr->mr_reslen; - p = mr->mr_res; - while (len != 0 && p < (mr->mr_res + mr->mr_reslen)) { - memcpy(&slen, p++, sizeof(uint8_t)); - if (slen > --len) { - free(txt); - return (NULL); - } - - q = malloc(slen + 1); - memcpy(q, p, slen); - q[slen] = '\0'; - txt[num - 2] = q; - txt[num - 1] = NULL; - txt = realloc(txt, sizeof(char *) * ++num); - p += slen; - len -= slen; - } - return (txt); - break; - } - case mdns_in_srv: { - struct mdns_res_in_srv *srv; - char *p; - uint16_t tmp; - size_t len; - - if (mr->mr_reslen < 6) - return (NULL); - - srv = malloc(sizeof(struct mdns_res_in_srv)); - if (srv == NULL) - return (NULL); - p = mr->mr_res; - len = mr->mr_reslen; - memcpy(&tmp, p, sizeof(uint16_t)); - p += sizeof(uint16_t); - srv->srv_pri = htons(tmp); - - memcpy(&tmp, p, sizeof(uint16_t)); - p += sizeof(uint16_t); - srv->srv_wei = htons(tmp); - - memcpy(&tmp, p, sizeof(uint16_t)); - p += sizeof(uint16_t); - srv->srv_prt = htons(tmp); - - len -= sizeof(uint16_t) * 3; - srv->srv_nam = malloc((len + 1) * sizeof(wchar_t)); - error = utf8_decode(p, len, srv->srv_nam, len + 1); - if (error <= 0) { - free(srv->srv_nam); - free(srv); - return (NULL); - } - return (srv); - } - default: - return (mr->mr_res); - } - return (NULL); -} - -void -mdns_free_resource(struct mdns_rrset *mr, void *res) -{ - - if (mr->mr_class != mdns_c_in) - return; - else if (res == NULL) - return; - - switch (mr->mr_type) { - case mdns_in_ptr: - case mdns_in_cname: - free(res); - break; - case mdns_in_txt: { - char **p; - int i; - - for (p = res, i = 0; p[i] != NULL; i++) - free(p[i]); - free(res); - break; - } - case mdns_in_srv: { - struct mdns_res_in_srv *srv; - - srv = res; - free(srv->srv_nam); - free(srv); - break; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Aug 16 19:53:15 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 784F516A469; Thu, 16 Aug 2007 19:53:15 +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 43EDD16A419 for ; Thu, 16 Aug 2007 19:53:15 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3143113C469 for ; Thu, 16 Aug 2007 19:53:15 +0000 (UTC) (envelope-from fli@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 l7GJrFmQ011669 for ; Thu, 16 Aug 2007 19:53:15 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GJrEHp011666 for perforce@freebsd.org; Thu, 16 Aug 2007 19:53:14 GMT (envelope-from fli@FreeBSD.org) Date: Thu, 16 Aug 2007 19:53:14 GMT Message-Id: <200708161953.l7GJrEHp011666@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125235 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, 16 Aug 2007 19:53:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=125235 Change 125235 by fli@fli_nexus on 2007/08/16 19:52:24 Add commands to manipulate the record database. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdns/Makefile#2 edit .. //depot/projects/soc2007/fli-mdns_sd/mdns/db.c#1 add .. //depot/projects/soc2007/fli-mdns_sd/mdns/mdns.c#2 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdns/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -SRCS= mdns.c query.c +SRCS= mdns.c query.c db.c PROG= mdns WARNS?= 4 LDADD= -lmdns -L../libmdns -static ==== //depot/projects/soc2007/fli-mdns_sd/mdns/mdns.c#2 (text+ko) ==== @@ -36,6 +36,7 @@ #include int query(struct mdns *, int, char **); +int db(struct mdns *, int, char **); static void usage(char *exec) @@ -43,6 +44,10 @@ printf("%s query [-v] [-i ifnam] [-f family] [-w sec] " "[-c class] [-t type] name\n", exec); + + printf("%s db [-i ifnam] `ident' name [-s] add|del `host'\n", exec); + printf("%s db [-i ifnam] `ident' res [-p] [-t ttl] add|del " + "`class' `type' `res'\n", exec); } typedef int (*sub_func)(struct mdns *, int, char **); @@ -52,7 +57,8 @@ }; static struct subs subs[] = { - { .name = "query", .func = query } + { .name = "query", .func = query }, + { .name = "db", .func = db } }; static int subs_size = sizeof(subs) / sizeof(struct subs); From owner-p4-projects@FreeBSD.ORG Thu Aug 16 19:57:14 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 873D816A420; Thu, 16 Aug 2007 19:57: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 1BD4F16A47B for ; Thu, 16 Aug 2007 19:57:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id C2E3C13C48E for ; Thu, 16 Aug 2007 19:57:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8k) with ESMTP id 203710570-1834499 for multiple; Thu, 16 Aug 2007 15:57:11 -0400 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l7GJuuiV048042; Thu, 16 Aug 2007 15:56:57 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Marko Zec Date: Thu, 16 Aug 2007 14:31:15 -0400 User-Agent: KMail/1.9.6 References: <200707252320.l6PNKbjo098633@repoman.freebsd.org> In-Reply-To: <200707252320.l6PNKbjo098633@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708161431.16137.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Thu, 16 Aug 2007 15:56:57 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3967/Thu Aug 16 11:32:14 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Perforce Change Reviews Subject: Re: PERFORCE change 124103 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, 16 Aug 2007 19:57:14 -0000 On Wednesday 25 July 2007 07:20:37 pm Marko Zec wrote: > http://perforce.freebsd.org/chv.cgi?CH=124103 > > Change 124103 by zec@zec_tca51 on 2007/07/25 23:20:21 > > Introduce a macro for checking whether a vnet is the default > vnet (vnet_0) or not. This change will probably start making > more sense once vnet_0 gets nuked (soon). Maybe call it 'IS_DEFAULT_VNET'? -- John Baldwin From owner-p4-projects@FreeBSD.ORG Thu Aug 16 19:57:19 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AB1C516A469; Thu, 16 Aug 2007 19:57: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 4090616A418 for ; Thu, 16 Aug 2007 19:57:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id E6CF813C442 for ; Thu, 16 Aug 2007 19:57:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8k) with ESMTP id 203710589-1834499 for multiple; Thu, 16 Aug 2007 15:57:18 -0400 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l7GJuuiW048042; Thu, 16 Aug 2007 15:57:05 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Christopher Davis Date: Thu, 16 Aug 2007 14:36:52 -0400 User-Agent: KMail/1.9.6 References: <200707270543.l6R5hd4T033226@repoman.freebsd.org> In-Reply-To: <200707270543.l6R5hd4T033226@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708161436.52368.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Thu, 16 Aug 2007 15:57:05 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3967/Thu Aug 16 11:32:14 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Perforce Change Reviews Subject: Re: PERFORCE change 124155 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, 16 Aug 2007 19:57:20 -0000 On Friday 27 July 2007 01:43:39 am Christopher Davis wrote: > http://perforce.freebsd.org/chv.cgi?CH=124155 > > Change 124155 by loafier@chrisdsoc on 2007/07/27 05:43:02 > > Use return value from pci_enable_io() to help determine whether to > allocate memory or io ports. No. Drivers should not call this as you could enable decoding on BARs that aren't programmed yet. Generally as a device driver writer you should know what the BARs on your system are. Otherwise, you can read the BAR and test it like so: if (PCI_BAR_IO(pci_read_config(dev, PCIR_BAR(x), 4)) { It's I/O } else { It's memory } -- John Baldwin From owner-p4-projects@FreeBSD.ORG Thu Aug 16 20:51:29 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AAB1716A41B; Thu, 16 Aug 2007 20:51: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 7825216A418 for ; Thu, 16 Aug 2007 20:51:29 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4CAAA13C45D for ; Thu, 16 Aug 2007 20:51:29 +0000 (UTC) (envelope-from fli@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 l7GKpTl3025022 for ; Thu, 16 Aug 2007 20:51:29 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GKpSUj025019 for perforce@freebsd.org; Thu, 16 Aug 2007 20:51:28 GMT (envelope-from fli@FreeBSD.org) Date: Thu, 16 Aug 2007 20:51:28 GMT Message-Id: <200708162051.l7GKpSUj025019@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125239 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, 16 Aug 2007 20:51:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=125239 Change 125239 by fli@fli_manticore on 2007/08/16 20:50:43 sys/ucred.h complains on NGROUP on 6.x-systems, change sys/types.h to sys/param.h to fix that. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/clisrv.c#6 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/clisrv.c#6 (text+ko) ==== @@ -24,7 +24,7 @@ * */ -#include +#include #include #include #include From owner-p4-projects@FreeBSD.ORG Thu Aug 16 20:52:31 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6996C16A421; Thu, 16 Aug 2007 20:52: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 4722C16A41A for ; Thu, 16 Aug 2007 20:52:31 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 33ABD13C46A for ; Thu, 16 Aug 2007 20:52:31 +0000 (UTC) (envelope-from fli@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 l7GKqVsI025099 for ; Thu, 16 Aug 2007 20:52:31 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GKqV9t025096 for perforce@freebsd.org; Thu, 16 Aug 2007 20:52:31 GMT (envelope-from fli@FreeBSD.org) Date: Thu, 16 Aug 2007 20:52:31 GMT Message-Id: <200708162052.l7GKqV9t025096@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125240 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, 16 Aug 2007 20:52:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=125240 Change 125240 by fli@fli_manticore on 2007/08/16 20:52:12 Nuke stale code. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/dbrec.c#5 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/dbrec.c#5 (text+ko) ==== @@ -35,7 +35,6 @@ #include "log.h" #include "var.h" -static void record_type_del_cb(struct record_type *, void *); static void rec_update(struct dbr_ident *, struct vt_data *, size_t); static void rec_var_update(void *); static inline void rec_pastop(struct dbr_ident *); @@ -2083,7 +2082,6 @@ struct dbr_pac *pac; struct md_if *mif; struct record *r; - struct record_type *rt; struct record_res *rr; struct mdns_rrset *rs; int delay_time, count = 0; From owner-p4-projects@FreeBSD.ORG Thu Aug 16 20:59:41 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E19F816A418; Thu, 16 Aug 2007 20:59:40 +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 A762716A41B for ; Thu, 16 Aug 2007 20:59:40 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7CB2813C46B for ; Thu, 16 Aug 2007 20:59:40 +0000 (UTC) (envelope-from fli@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 l7GKxeU0025417 for ; Thu, 16 Aug 2007 20:59:40 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GKxe80025414 for perforce@freebsd.org; Thu, 16 Aug 2007 20:59:40 GMT (envelope-from fli@FreeBSD.org) Date: Thu, 16 Aug 2007 20:59:40 GMT Message-Id: <200708162059.l7GKxe80025414@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125241 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, 16 Aug 2007 20:59:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=125241 Change 125241 by fli@fli_manticore on 2007/08/16 20:59:30 Change int to size_t (the rest of the code uses size_t) Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/nss_mdns/nss_mdns.c#2 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/nss_mdns/nss_mdns.c#2 (text+ko) ==== @@ -80,7 +80,7 @@ struct cb_getby_arg { void *ca_base; /* hostent {} */ char **ca_buf; - int *ca_buflen; + size_t *ca_buflen; }; /* From owner-p4-projects@FreeBSD.ORG Thu Aug 16 21:08:32 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7FEEF16A542; Thu, 16 Aug 2007 21:08: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 3D10F16A53F; Thu, 16 Aug 2007 21:08:32 +0000 (UTC) (envelope-from zec@icir.org) Received: from mail.srv.carnet.hr (unknown [IPv6:2001:b68:e160:0:211:43ff:fecd:6374]) by mx1.freebsd.org (Postfix) with ESMTP id 6DEB913C4A7; Thu, 16 Aug 2007 21:08:31 +0000 (UTC) (envelope-from zec@icir.org) Received: from vipnet116-165.mobile.carnet.hr ([193.198.165.116]:51230) by mail.srv.carnet.hr with esmtp (Exim 4.50) id 1ILmZu-0004SN-Eq; Thu, 16 Aug 2007 23:08:28 +0200 From: Marko Zec To: John Baldwin Date: Thu, 16 Aug 2007 23:08:06 +0200 User-Agent: KMail/1.9.4 References: <200707252320.l6PNKbjo098633@repoman.freebsd.org> <200708161431.16137.jhb@freebsd.org> In-Reply-To: <200708161431.16137.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708162308.06387.zec@icir.org> X-SA-Exim-Connect-IP: 193.198.165.116 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-26) on nihal.carnet.hr X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=ham version=3.1.4 X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100) Cc: Perforce Change Reviews Subject: Re: PERFORCE change 124103 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, 16 Aug 2007 21:08:32 -0000 On Thursday 16 August 2007 20:31, John Baldwin wrote: > On Wednesday 25 July 2007 07:20:37 pm Marko Zec wrote: > > http://perforce.freebsd.org/chv.cgi?CH=124103 > > > > Change 124103 by zec@zec_tca51 on 2007/07/25 23:20:21 > > > > Introduce a macro for checking whether a vnet is the default > > vnet (vnet_0) or not. This change will probably start making > > more sense once vnet_0 gets nuked (soon). > > Maybe call it 'IS_DEFAULT_VNET'? Sure, that makes perfect sense -> will do... Marko From owner-p4-projects@FreeBSD.ORG Thu Aug 16 22:23:25 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DE2F616A41A; Thu, 16 Aug 2007 22:23:24 +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 9F8C416A418 for ; Thu, 16 Aug 2007 22:23:24 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8C9CD13C45D for ; Thu, 16 Aug 2007 22:23:24 +0000 (UTC) (envelope-from jbr@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 l7GMNOHL033304 for ; Thu, 16 Aug 2007 22:23:24 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GMNO8K033300 for perforce@freebsd.org; Thu, 16 Aug 2007 22:23:24 GMT (envelope-from jbr@FreeBSD.org) Date: Thu, 16 Aug 2007 22:23:24 GMT Message-Id: <200708162223.l7GMNO8K033300@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125242 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, 16 Aug 2007 22:23:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=125242 Change 125242 by jbr@jbr_bob on 2007/08/16 22:22:42 Clean up Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#15 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/proc.h#5 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#10 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.h#6 edit Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#15 (text+ko) ==== @@ -789,9 +789,6 @@ if (imgp->firstpage != NULL) exec_unmap_first_page(imgp); - if (p->p_kernsysshm != NULL) - exec_unmap_sysshm(imgp); - if (imgp->vp != NULL) { NDFREE(ndp, NDF_ONLY_PNBUF); vput(imgp->vp); @@ -914,16 +911,11 @@ struct image_params *imgp; { int error; - struct proc *p = imgp->proc; vm_map_t map = &imgp->proc->p_vmspace->vm_map; vm_offset_t *addr = &imgp->proc->p_usrsysshm; - struct sf_buf *kern_buf = p->p_kernsysshm;; int test = 42; - if (p->p_kernsysshm != NULL) - exec_unmap_sysshm(imgp); - - error = vm_map_sysshm(map, addr, kern_buf, 42); + error = vm_map_sysshm(map, addr, 42); copyout((caddr_t) &test, (caddr_t) *addr, sizeof(int)); ==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/proc.h#5 (text+ko) ==== @@ -577,7 +577,6 @@ struct label *p_label; /* (*) Proc (not subject) MAC label. */ struct p_sched *p_sched; /* (*) Scheduler-specific data. */ vm_offset_t p_usrsysshm; - struct sf_buf *p_kernsysshm; STAILQ_HEAD(, ktr_request) p_ktr; /* (o) KTR event queue. */ LIST_HEAD(, mqueue_notifier) p_mqnotifier; /* (c) mqueue notifiers.*/ }; ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.c#10 (text+ko) ==== @@ -2988,13 +2988,10 @@ * process. */ int -vm_map_sysshm(vm_map_t map, vm_offset_t *usr_addr, struct sf_buf *kern_buf, - vm_size_t size) +vm_map_sysshm(vm_map_t map, vm_offset_t *usr_addr, vm_size_t size) { - vm_object_t object; - vm_page_t sysshm_page; + size = round_page(size); - size = round_page(size); PROC_LOCK(curthread->td_proc); *usr_addr = round_page((vm_offset_t) @@ -3002,38 +2999,9 @@ lim_cur(curthread->td_proc, RLIMIT_DATA); PROC_UNLOCK(curthread->td_proc); - object = vm_object_allocate(OBJT_DEFAULT, 1); - if (!object) - panic("vm_map_sysshm: cannot allocate object"); - - VM_OBJECT_LOCK(object); - sysshm_page = vm_page_alloc(object, 0, VM_ALLOC_NORMAL); - if (!sysshm_page) - panic("vm_page_alloc: cannot allocate sysshm_page"); - - sysshm_page->valid = VM_PAGE_BITS_ALL; - VM_OBJECT_UNLOCK(object); - - if (vm_map_findspace(map, *usr_addr, size, usr_addr)) - return (1); - - if (vm_map_insert(map, object, 0, *usr_addr, *usr_addr + size, - VM_PROT_RW, VM_PROT_RW, 0)) - panic("vm_map_sysshm: cannot insert object into vm_map."); - - pmap_enter(map->pmap, *usr_addr, sysshm_page, VM_PROT_RW, TRUE); - - VM_OBJECT_LOCK(object); - vm_page_lock_queues(); - vm_page_wire(sysshm_page); - vm_page_activate(sysshm_page); - vm_page_unlock_queues(); - vm_page_wakeup(sysshm_page); - VM_OBJECT_UNLOCK(object); - - kern_buf = sf_buf_alloc(sysshm_page, SFB_NOWAIT); - if (!kern_buf) - return 1; + if (vm_map_find(map, NULL, *usr_addr, usr_addr, size, TRUE, VM_PROT_RW, + VM_PROT_RW, 0)) + panic("vm_map_sysshm: cannot allocated sysshm."); return (0); } ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_map.h#6 (text+ko) ==== @@ -354,7 +354,7 @@ void vm_map_simplify_entry (vm_map_t, vm_map_entry_t); void vm_init2 (void); int vm_map_stack (vm_map_t, vm_offset_t, vm_size_t, vm_prot_t, vm_prot_t, int); -int vm_map_sysshm(vm_map_t, vm_offset_t *, struct sf_buf *, vm_size_t); +int vm_map_sysshm(vm_map_t, vm_offset_t *, vm_size_t); int vm_map_growstack (struct proc *p, vm_offset_t addr); int vm_map_unwire(vm_map_t map, vm_offset_t start, vm_offset_t end, int flags); From owner-p4-projects@FreeBSD.ORG Thu Aug 16 23:21:37 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C738016A46B; Thu, 16 Aug 2007 23:21: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 7BFA316A421 for ; Thu, 16 Aug 2007 23:21:36 +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 5268B13C481 for ; Thu, 16 Aug 2007 23:21:36 +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 l7GNLapd038132 for ; Thu, 16 Aug 2007 23:21:36 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GNLZhx038119 for perforce@freebsd.org; Thu, 16 Aug 2007 23:21:35 GMT (envelope-from zec@FreeBSD.org) Date: Thu, 16 Aug 2007 23:21:35 GMT Message-Id: <200708162321.l7GNLZhx038119@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 125243 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, 16 Aug 2007 23:21:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=125243 Change 125243 by zec@zec_tpx32 on 2007/08/16 23:20:36 Unbreak ipfw (well, at least it can be kldloaded now) by taking care not to initialize a lock multiple times. Affected files ... .. //depot/projects/vimage/src/sys/netinet/ip_fw2.c#23 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet/ip_fw2.c#23 (text+ko) ==== @@ -4974,7 +4974,6 @@ sizeof(ipfw_dyn_rule), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); #endif - IPFW_DYN_LOCK_INIT(); callout_init(&V_ipfw_timeout, CALLOUT_MPSAFE); bzero(&default_rule, sizeof default_rule); From owner-p4-projects@FreeBSD.ORG Thu Aug 16 23:21:37 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2C4B116A50B; Thu, 16 Aug 2007 23:21:37 +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 DC88316A481 for ; Thu, 16 Aug 2007 23:21:36 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A6B1E13C48D for ; Thu, 16 Aug 2007 23:21:36 +0000 (UTC) (envelope-from fli@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 l7GNLaBv038139 for ; Thu, 16 Aug 2007 23:21:36 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GNLadd038135 for perforce@freebsd.org; Thu, 16 Aug 2007 23:21:36 GMT (envelope-from fli@FreeBSD.org) Date: Thu, 16 Aug 2007 23:21:36 GMT Message-Id: <200708162321.l7GNLadd038135@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125244 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, 16 Aug 2007 23:21:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=125244 Change 125244 by fli@fli_nexus on 2007/08/16 23:21:30 Reset creation time when we modify the ttl Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/cache.c#6 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/cache.c#6 (text+ko) ==== @@ -308,6 +308,7 @@ cr = record_res_getparent(rr); dequeue_ttl(c, cr); cr->cr_ttl_rel = ttl; + cr->cr_ctime = time(NULL); enqueue_ttl(c, cr); } From owner-p4-projects@FreeBSD.ORG Thu Aug 16 23:23:40 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 77FF016A469; Thu, 16 Aug 2007 23:23:40 +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 4C6C016A418 for ; Thu, 16 Aug 2007 23:23:40 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F08DB13C4B4 for ; Thu, 16 Aug 2007 23:23:39 +0000 (UTC) (envelope-from fli@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 l7GNNdLW038310 for ; Thu, 16 Aug 2007 23:23:39 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GNNdvo038305 for perforce@freebsd.org; Thu, 16 Aug 2007 23:23:39 GMT (envelope-from fli@FreeBSD.org) Date: Thu, 16 Aug 2007 23:23:39 GMT Message-Id: <200708162323.l7GNNdvo038305@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125245 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, 16 Aug 2007 23:23:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=125245 Change 125245 by fli@fli_nexus on 2007/08/16 23:23:35 Fix cache dump command (coding without testing is bad...) Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/clisrv.c#7 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/clisrv.c#7 (text+ko) ==== @@ -1390,13 +1390,13 @@ } RW_WLOCK(mif, mif_lock); cache_flush(&mif->mif_cache); - RW_WLOCK(mif, mif_lock); + RW_UNLOCK(mif, mif_lock); } else { TAILQ_FOREACH(mif, &g->g_ifs_head, mif_next) { RW_WLOCK(mif, mif_lock); cache_flush(&mif->mif_cache); - RW_WLOCK(mif, mif_lock); + RW_UNLOCK(mif, mif_lock); } } @@ -1477,6 +1477,8 @@ if (tmplen <= 0) continue; + mc.mc_reclen = tmplen; + tmplen *= sizeof(wchar_t); rmih.mih_msglen = sizeof(struct mipc_head) + sizeof(struct mipc_cache) + tmplen + rr->rr_len; From owner-p4-projects@FreeBSD.ORG Thu Aug 16 23:26:44 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 941E916A468; Thu, 16 Aug 2007 23:26:44 +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 5812B16A417 for ; Thu, 16 Aug 2007 23:26:44 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 467D613C442 for ; Thu, 16 Aug 2007 23:26:44 +0000 (UTC) (envelope-from fli@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 l7GNQi8t038434 for ; Thu, 16 Aug 2007 23:26:44 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GNQhd3038431 for perforce@freebsd.org; Thu, 16 Aug 2007 23:26:43 GMT (envelope-from fli@FreeBSD.org) Date: Thu, 16 Aug 2007 23:26:43 GMT Message-Id: <200708162326.l7GNQhd3038431@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125246 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, 16 Aug 2007 23:26:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=125246 Change 125246 by fli@fli_nexus on 2007/08/16 23:26:19 - Add mdns_cache_flush() - flushes the cache - Add mdns_cache_view() - view cache content Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/libmdns/libmdns.c#3 edit .. //depot/projects/soc2007/fli-mdns_sd/libmdns/mdns.h#3 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/libmdns/libmdns.c#3 (text+ko) ==== @@ -707,6 +707,94 @@ return (0); } +int +mdns_cache_flush(struct mdns *m, unsigned int ifidx) +{ + int mid, error; + struct mdns_msg *mm; + struct mipc_cache_flush mcf; + + mcf.mcf_ifidx = ifidx; + + mid = docmd(m, MIM_CACHE_FLUSH, 1, &mcf, + sizeof(struct mipc_cache_flush)); + if (mid < 0) + return (-1); + + mm = msg_wait(m, mid, NULL); + if (mm == NULL) + return (-1); + + error = errormsg(mm); + msg_free(mm); + if (error >= 0) + return (-1); + return (0); +} + +int +mdns_cache_list(struct mdns *m, unsigned int ifidx, struct mdns_cache **mc) +{ + int mid, offset, error, validres; + char *pkg; + size_t sz; + struct mdns_msg *mm; + struct mdns_cache *mcp; + struct mipc_cache *mic; + struct mipc_cache_list mcl; + + if (ifidx == 0) + return (-1); + + mcl.mcl_ifidx = ifidx; + mid = docmd(m, MIM_CACHE_LIST, 1, &mcl, sizeof(struct mipc_cache_list)); + if (mid < 0) + return (-1); + + sz = 0; + offset = 0; + mcp = NULL; + validres = 1; + do { + mm = msg_wait(m, mid, NULL); + + if (mm->mm_msgtype == MIM_CACHE) { + mic = (struct mipc_cache *)mm->mm_buf; + pkg = mm->mm_buf + sizeof(struct mipc_cache); + + mcp = realloc(mcp, + (offset + 1) * sizeof(struct mdns_cache)); + mcp[offset].mc_rrset.mr_class = mic->mc_class; + mcp[offset].mc_rrset.mr_type = mic->mc_type; + mcp[offset].mc_rrset.mr_ttl = mic->mc_ttl; + mcp[offset].mc_rrset.mr_reslen = mic->mc_reslen; + mcp[offset].mc_rrset.mr_ifidx = ifidx; + mcp[offset].mc_rrset.mr_family = AF_UNSPEC; + mcp[offset].mc_ttl_left = mic->mc_ttl_left; + + memcpy(mcp[offset].mc_rrset.mr_name, pkg, + mic->mc_reclen * sizeof(wchar_t)); + mcp[offset].mc_rrset.mr_name[mic->mc_reclen] = L'\0'; + + pkg += (mic->mc_reclen * sizeof(wchar_t)); + + mcp[offset].mc_rrset.mr_res = malloc(mic->mc_reslen); + memcpy(mcp[offset].mc_rrset.mr_res, pkg, + mic->mc_reslen); + + offset++; + } + else if (mm->mm_msgtype == MIM_ACK) + validres = 0; + else if ((error = errormsg(mm)) >= 0) + validres = 0; + msg_free(mm); + } while (validres); + + *mc = mcp; + return (offset); +} + static int errormsg(struct mdns_msg *mm) { ==== //depot/projects/soc2007/fli-mdns_sd/libmdns/mdns.h#3 (text+ko) ==== @@ -86,6 +86,17 @@ #define MDNS_RES_DEFAULT (0) /* Default resource type */ #define MDNS_RES_POINTER (-1) /* Resource is a resource set pointer */ +/* Cache entry */ +struct mdns_cache { + uint32_t mc_ttl_left; + struct mdns_rrset mc_rrset; +}; + +int mdns_cache_list(struct mdns *, unsigned int, + struct mdns_cache **); +/* Request to flush cache */ +int mdns_cache_flush(struct mdns *, unsigned int); + /* Array to class (integer) translation */ int mdns_atoc(const char *); /* Class (integer) to array translation */ From owner-p4-projects@FreeBSD.ORG Thu Aug 16 23:28:48 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D943B16A41B; Thu, 16 Aug 2007 23:28: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 AD77E16A418 for ; Thu, 16 Aug 2007 23:28:47 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9C64313C458 for ; Thu, 16 Aug 2007 23:28:47 +0000 (UTC) (envelope-from fli@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 l7GNSl8Z038531 for ; Thu, 16 Aug 2007 23:28:47 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GNSluW038528 for perforce@freebsd.org; Thu, 16 Aug 2007 23:28:47 GMT (envelope-from fli@FreeBSD.org) Date: Thu, 16 Aug 2007 23:28:47 GMT Message-Id: <200708162328.l7GNSluW038528@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 125247 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, 16 Aug 2007 23:28:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=125247 Change 125247 by fli@fli_nexus on 2007/08/16 23:27:47 Add cache flush/view commands. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdns/Makefile#3 edit .. //depot/projects/soc2007/fli-mdns_sd/mdns/cache.c#1 add .. //depot/projects/soc2007/fli-mdns_sd/mdns/mdns.c#3 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdns/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -SRCS= mdns.c query.c db.c +SRCS= mdns.c query.c db.c cache.c PROG= mdns WARNS?= 4 LDADD= -lmdns -L../libmdns -static ==== //depot/projects/soc2007/fli-mdns_sd/mdns/mdns.c#3 (text+ko) ==== @@ -37,6 +37,7 @@ int query(struct mdns *, int, char **); int db(struct mdns *, int, char **); +int cache(struct mdns *, int, char **); static void usage(char *exec) @@ -48,6 +49,8 @@ printf("%s db [-i ifnam] `ident' name [-s] add|del `host'\n", exec); printf("%s db [-i ifnam] `ident' res [-p] [-t ttl] add|del " "`class' `type' `res'\n", exec); + + printf("%s cache [-i ifnam] view|flush\n", exec); } typedef int (*sub_func)(struct mdns *, int, char **); @@ -58,7 +61,8 @@ static struct subs subs[] = { { .name = "query", .func = query }, - { .name = "db", .func = db } + { .name = "db", .func = db }, + { .name = "cache", .func = cache } }; static int subs_size = sizeof(subs) / sizeof(struct subs); From owner-p4-projects@FreeBSD.ORG Thu Aug 16 23:36:59 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9459716A420; Thu, 16 Aug 2007 23:36: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 33E5E16A41A for ; Thu, 16 Aug 2007 23:36:59 +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 2256213C45E for ; Thu, 16 Aug 2007 23:36:59 +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 l7GNawFK039058 for ; Thu, 16 Aug 2007 23:36:59 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7GNawXC039055 for perforce@freebsd.org; Thu, 16 Aug 2007 23:36:58 GMT (envelope-from zec@FreeBSD.org) Date: Thu, 16 Aug 2007 23:36:58 GMT Message-Id: <200708162336.l7GNawXC039055@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 125248 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, 16 Aug 2007 23:37:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=125248 Change 125248 by zec@zec_tpx32 on 2007/08/16 23:35:59 Rename macro IS_VNET_0() to IS_DEFAULT_VNET(). Suggested by: jhb@ Affected files ... .. //depot/projects/vimage/src/sys/kern/uipc_usrreq.c#11 edit .. //depot/projects/vimage/src/sys/net/if.c#20 edit .. //depot/projects/vimage/src/sys/net/if_loop.c#17 edit .. //depot/projects/vimage/src/sys/netgraph/ng_ether.c#10 edit .. //depot/projects/vimage/src/sys/netinet/igmp.c#10 edit .. //depot/projects/vimage/src/sys/netinet/ip_input.c#22 edit .. //depot/projects/vimage/src/sys/netinet/tcp_hostcache.c#15 edit .. //depot/projects/vimage/src/sys/netinet/tcp_subr.c#26 edit .. //depot/projects/vimage/src/sys/netinet/tcp_timewait.c#9 edit .. //depot/projects/vimage/src/sys/netinet/udp_usrreq.c#17 edit .. //depot/projects/vimage/src/sys/netinet6/frag6.c#8 edit .. //depot/projects/vimage/src/sys/netinet6/in6_src.c#11 edit .. //depot/projects/vimage/src/sys/netinet6/ip6_input.c#18 edit .. //depot/projects/vimage/src/sys/netinet6/scope6.c#10 edit .. //depot/projects/vimage/src/sys/netipsec/key.c#14 edit .. //depot/projects/vimage/src/sys/netipsec/xform_ipip.c#11 edit .. //depot/projects/vimage/src/sys/sys/vimage.h#35 edit Differences ... ==== //depot/projects/vimage/src/sys/kern/uipc_usrreq.c#11 (text+ko) ==== @@ -1654,7 +1654,7 @@ { #ifdef VIMAGE - if (!IS_VNET_0(curvnet)) + if (!IS_DEFAULT_VNET(curvnet)) return; #endif unp_zone = uma_zcreate("unpcb", sizeof(struct unpcb), NULL, NULL, ==== //depot/projects/vimage/src/sys/net/if.c#20 (text+ko) ==== @@ -326,7 +326,7 @@ #endif IFNET_LOCK_INIT(); #ifdef VIMAGE - if (IS_VNET_0(curvnet)) { + if (IS_DEFAULT_VNET(curvnet)) { INIT_VNET_NET(curvnet); #endif ifdev_byindex(0) = make_dev(&net_cdevsw, 0, @@ -397,7 +397,7 @@ int s; #ifdef VIMAGE - if (!IS_VNET_0(curvnet)) + if (!IS_DEFAULT_VNET(curvnet)) panic("if_check() called for a non-default vimage!?!"); #endif @@ -565,7 +565,7 @@ #endif #ifdef VIMAGE - if (IS_VNET_0(curvnet)) { + if (IS_DEFAULT_VNET(curvnet)) { #endif ifdev_byindex(ifp->if_index) = make_dev(&net_cdevsw, unit2minor(ifp->if_index), @@ -632,7 +632,7 @@ EVENTHANDLER_INVOKE(ifnet_arrival_event, ifp); #ifdef VIMAGE - if (IS_VNET_0(curvnet)) + if (IS_DEFAULT_VNET(curvnet)) #endif devctl_notify("IFNET", ifp->if_xname, "ATTACH", NULL); @@ -821,7 +821,7 @@ */ ifp->if_addr = NULL; #ifdef VIMAGE - if (IS_VNET_0(curvnet)) { + if (IS_DEFAULT_VNET(curvnet)) { #endif destroy_dev(ifdev_byindex(ifp->if_index)); #ifdef VIMAGE @@ -854,7 +854,7 @@ rt_ifannouncemsg(ifp, IFAN_DEPARTURE); EVENTHANDLER_INVOKE(ifnet_departure_event, ifp); #ifdef VIMAGE - if (IS_VNET_0(curvnet)) + if (IS_DEFAULT_VNET(curvnet)) #endif devctl_notify("IFNET", ifp->if_xname, "DETACH", NULL); @@ -1519,7 +1519,7 @@ } #ifdef VIMAGE - if (IS_VNET_0(curvnet)) + if (IS_DEFAULT_VNET(curvnet)) #endif devctl_notify("IFNET", ifp->if_xname, (link_state == LINK_STATE_UP) ? "LINK_UP" : "LINK_DOWN", NULL); ==== //depot/projects/vimage/src/sys/net/if_loop.c#17 (text+ko) ==== @@ -190,7 +190,7 @@ LIST_INIT(&V_lo_list); #ifdef VIMAGE - if (IS_VNET_0(curvnet)) + if (IS_DEFAULT_VNET(curvnet)) if_clone_attach(&lo_cloner); else lo_cloner.ifc_attach(&lo_cloner); ==== //depot/projects/vimage/src/sys/netgraph/ng_ether.c#10 (text+ko) ==== @@ -786,7 +786,7 @@ struct ifnet *ifp; #ifdef VIMAGE - if (IS_VNET_0(curvnet)){ + if (IS_DEFAULT_VNET(curvnet)){ #endif /* Register function hooks */ if (ng_ether_attach_p != NULL) @@ -824,7 +824,7 @@ */ #ifdef VIMAGE - if (!IS_VNET_0(curvnet)) + if (!IS_DEFAULT_VNET(curvnet)) return(0); #endif ==== //depot/projects/vimage/src/sys/netinet/igmp.c#10 (text+ko) ==== @@ -125,7 +125,7 @@ struct ipoption *ra; #ifdef VIMAGE - if (IS_VNET_0(curvnet)) { + if (IS_DEFAULT_VNET(curvnet)) { #endif /* * To avoid byte-swapping the same value over and over again. ==== //depot/projects/vimage/src/sys/netinet/ip_input.c#22 (text+ko) ==== @@ -280,7 +280,7 @@ #ifdef VIMAGE /* Skip initialization of globals for non-default instances. */ - if (!IS_VNET_0(curvnet)) + if (!IS_DEFAULT_VNET(curvnet)) return; #endif ==== //depot/projects/vimage/src/sys/netinet/tcp_hostcache.c#15 (text+ko) ==== @@ -223,7 +223,7 @@ uma_zone_set_max(V_tcp_hostcache.zone, V_tcp_hostcache.cache_limit); #ifdef VIMAGE - if (!IS_VNET_0(curvnet)) + if (!IS_DEFAULT_VNET(curvnet)) return; #endif ==== //depot/projects/vimage/src/sys/netinet/tcp_subr.c#26 (text+ko) ==== @@ -273,7 +273,7 @@ INIT_VNET_INET(curvnet); #ifdef VIMAGE - if (IS_VNET_0(curvnet)) { + if (IS_DEFAULT_VNET(curvnet)) { #endif tcp_ipi_zone = uma_zcreate("inpcb", sizeof(struct inpcb), NULL, NULL, tcp_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); @@ -370,7 +370,7 @@ tcp_hc_init(); #ifdef VIMAGE - if (!IS_VNET_0(curvnet)) + if (!IS_DEFAULT_VNET(curvnet)) return; #endif ==== //depot/projects/vimage/src/sys/netinet/tcp_timewait.c#9 (text+ko) ==== @@ -170,7 +170,7 @@ TAILQ_INIT(&V_twq_2msl); #ifdef VIMAGE - if (!IS_VNET_0(curvnet)) + if (!IS_DEFAULT_VNET(curvnet)) return; #endif ==== //depot/projects/vimage/src/sys/netinet/udp_usrreq.c#17 (text+ko) ==== @@ -174,7 +174,7 @@ INIT_VNET_INET(curvnet); #ifdef VIMAGE - if (IS_VNET_0(curvnet)) { + if (IS_DEFAULT_VNET(curvnet)) { #endif udp_ipi_zone = uma_zcreate("udpcb", sizeof(struct inpcb), NULL, NULL, udp_inpcb_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); ==== //depot/projects/vimage/src/sys/netinet6/frag6.c#8 (text+ko) ==== @@ -108,7 +108,7 @@ V_ip6q.ip6q_next = V_ip6q.ip6q_prev = &V_ip6q; #ifdef VIMAGE - if (!IS_VNET_0(curvnet)) + if (!IS_DEFAULT_VNET(curvnet)) return; #endif ip6_maxfragpackets = nmbclusters / 4; ==== //depot/projects/vimage/src/sys/netinet6/in6_src.c#11 (text+ko) ==== @@ -855,7 +855,7 @@ V_defaultaddrpolicy.label = ADDR_LABEL_NOTAPP; #ifdef VIMAGE - if (!IS_VNET_0(curvnet)) + if (!IS_DEFAULT_VNET(curvnet)) return; #endif ==== //depot/projects/vimage/src/sys/netinet6/ip6_input.c#18 (text+ko) ==== @@ -175,7 +175,7 @@ #ifdef VIMAGE /* Skip global initialization stuff for non-default instances. */ - if (!IS_VNET_0(curvnet)) + if (!IS_DEFAULT_VNET(curvnet)) return; #endif ==== //depot/projects/vimage/src/sys/netinet6/scope6.c#10 (text+ko) ==== @@ -82,7 +82,7 @@ bzero(&V_sid_default, sizeof(V_sid_default)); #ifdef VIMAGE - if (!IS_VNET_0(curvnet)) + if (!IS_DEFAULT_VNET(curvnet)) return; #endif ==== //depot/projects/vimage/src/sys/netipsec/key.c#14 (text+ko) ==== @@ -7196,7 +7196,7 @@ V_ipsec_esp_auth = 0; V_ipsec_ah_keymin = 128; #ifdef VIMAGE - if (IS_VNET_0(curvnet)) { + if (IS_DEFAULT_VNET(curvnet)) { #endif SPTREE_LOCK_INIT(); REGTREE_LOCK_INIT(); @@ -7222,7 +7222,7 @@ V_ip4_def_policy.refcnt++; /*never reclaim this*/ #ifdef VIMAGE - if (!IS_VNET_0(curvnet)) + if (!IS_DEFAULT_VNET(curvnet)) return; #endif ==== //depot/projects/vimage/src/sys/netipsec/xform_ipip.c#11 (text+ko) ==== @@ -702,7 +702,7 @@ V_ipip_allow = 0; #ifdef VIMAGE - if (!IS_VNET_0(curvnet)) + if (!IS_DEFAULT_VNET(curvnet)) return 0; #endif ==== //depot/projects/vimage/src/sys/sys/vimage.h#35 (text+ko) ==== @@ -340,7 +340,7 @@ mtx_unlock(&vnet_list_refc_mtx); \ cv_signal(&vnet_list_condvar); -#define IS_VNET_0(arg) ((arg) == &vnet_0 ? 1 : 0) +#define IS_DEFAULT_VNET(arg) ((arg) == &vnet_0 ? 1 : 0) /* * XXX The stuff bellow needs a major cleanup / rewrite from scratch. From owner-p4-projects@FreeBSD.ORG Fri Aug 17 00:03:36 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B616416A421; Fri, 17 Aug 2007 00:03: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 7090616A41A for ; Fri, 17 Aug 2007 00:03:35 +0000 (UTC) (envelope-from smilicic@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1D34013C428 for ; Fri, 17 Aug 2007 00:03:35 +0000 (UTC) (envelope-from smilicic@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 l7H03ZfY042029 for ; Fri, 17 Aug 2007 00:03:35 GMT (envelope-from smilicic@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7H03ZDG042026 for perforce@freebsd.org; Fri, 17 Aug 2007 00:03:35 GMT (envelope-from smilicic@FreeBSD.org) Date: Fri, 17 Aug 2007 00:03:35 GMT Message-Id: <200708170003.l7H03ZDG042026@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to smilicic@FreeBSD.org using -f From: Sonja Milicic To: Perforce Change Reviews Cc: Subject: PERFORCE change 125250 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: Fri, 17 Aug 2007 00:03:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=125250 Change 125250 by smilicic@tanarri_marilith on 2007/08/17 00:02:48 added snapshot creation, rollback to snapshot, snapshot I/O fixed a bug with reading from disk fixed style errors in geom_log_so.c and glog.h Affected files ... .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/geom_log_so.c#4 edit .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog.c#9 edit .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog.h#4 edit .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_alloctable.c#2 edit .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_alloctable.h#2 edit .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_fileops.c#4 edit .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_fileops.h#4 edit Differences ... ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/geom_log_so.c#4 (text+ko) ==== @@ -6,10 +6,10 @@ * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 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. + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -51,57 +51,43 @@ /*static void log_main(struct gctl_req *req, unsigned flags);*/ struct g_command class_commands[] = { - { "stop", G_FLAG_VERBOSE, NULL, - { - { 'f', "force", NULL, G_TYPE_NONE }, - G_OPT_SENTINEL - }, - "[-fv] prov ..." - }, - { "start", G_FLAG_VERBOSE, NULL, - { - G_OPT_SENTINEL - }, - "[-v] prov file" - }, - { "commit", G_FLAG_VERBOSE, NULL, - { - G_OPT_SENTINEL - }, - "[-v] prov ..." - }, - { "rollback", G_FLAG_VERBOSE, NULL, - { - G_OPT_SENTINEL - }, - "[-v] prov ..." - }, - { "dump", G_FLAG_VERBOSE, NULL, - { - { 'n', "nidx", NULL, G_TYPE_NUMBER }, - G_OPT_SENTINEL - }, - "[-n nidx] prov ..." - }, - G_CMD_SENTINEL -}; - - -/*static void -log_main(struct gctl_req *req, unsigned flags) -{ - const char *name; - int verbose = 0; - - if ((flags & G_FLAG_VERBOSE) != 0) - verbose = 1; - - name = gctl_get_asciiparam(req, "verb"); - if (name == NULL) { - gctl_error(req, "Verb missing.", NULL); - return; - } - -}*/ - - + { "stop", G_FLAG_VERBOSE, NULL, + { + { 'f', "force", NULL, G_TYPE_NONE }, + G_OPT_SENTINEL + }, + "[-fv] provider ..." + }, + { "start", G_FLAG_VERBOSE, NULL, + { + G_OPT_SENTINEL + }, + "[-v] provider filename" + }, + { "commit", G_FLAG_VERBOSE, NULL, + { + G_OPT_SENTINEL + }, + "[-v] provider ..." + }, + { "rollback", G_FLAG_VERBOSE, NULL, + { + G_OPT_SENTINEL + }, + "[-v] provider filename ..." + }, + { "snapshot", G_FLAG_VERBOSE, NULL, + { + G_OPT_SENTINEL + }, + "[-v] provider filename ..." + }, + { "dump", G_FLAG_VERBOSE, NULL, + { + { 'n', "nidx", NULL, G_TYPE_NUMBER }, + G_OPT_SENTINEL + }, + "[-n compartment] provider ..." + }, + G_CMD_SENTINEL +}; ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog.c#9 (text+ko) ==== @@ -58,6 +58,7 @@ static enum gctl_verb g_log_verb_id(const char* verb); static struct g_geom * g_log_create_geom(const char *prov, const char *file, struct g_class *mp, int *err); +static int g_log_load_logfile(struct g_log_softc *sc, const char *file); static int g_log_destroy_geom(struct gctl_req *req __unused, struct g_class *mp __unused, struct g_geom *gp); static void g_log_start(struct bio *bp); @@ -74,6 +75,7 @@ static void g_log_read(struct bio *bp); static void g_log_rollback(struct g_log_softc *sc); static void g_log_commit(struct g_log_softc *sc); +static void g_log_snapshot(struct g_log_softc *sc); static void g_log_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp); static void g_log_ctl_destroy(struct gctl_req *req, struct g_class *mp); @@ -114,7 +116,7 @@ /* gctl verb IDs */ enum gctl_verb { GCTL_INVALID, GCTL_COMMIT, GCTL_ROLLBACK, GCTL_START, - GCTL_STOP, GCTL_DUMP}; + GCTL_STOP, GCTL_DUMP, GCTL_SNAPSHOT}; static void g_log_init(struct g_class *mp __unused) @@ -156,14 +158,13 @@ struct g_provider *pp_log, *pp_disk; struct g_consumer *cp_disk; struct g_log_softc *sc; - struct g_log_header head; int max_elements; + /*initialize softc*/ sc = malloc(sizeof(*sc), M_GLOG, M_WAITOK | M_ZERO); /*create geom for log*/ gp = g_new_geomf(mp, "%s.log", prov); - gp->start = g_log_start; gp->spoiled = g_log_orphan; gp->orphan = g_log_orphan; @@ -175,7 +176,6 @@ } /* get provider and consumer for disk*/ - G_LOG_DEBUG(0, "Getting provider and consumer for disk"); if (strncmp(prov, "/dev/", strlen("/dev/")) == 0) prov += strlen("/dev/"); pp_disk = g_provider_by_name(prov); @@ -189,11 +189,11 @@ return (NULL); } g_error_provider(pp_disk, 0); + g_access(cp_disk, 1, 1, 0); sc->sc_prov_disk = pp_disk; sc->sc_cons_disk = cp_disk; /*create provider for log*/ - G_LOG_DEBUG(0, "Creating provider for log"); pp_log = g_new_providerf(gp, "%s.log", prov); pp_log->mediasize = pp_disk->mediasize; pp_log->sectorsize = pp_disk->sectorsize; @@ -201,67 +201,71 @@ sc->sc_prov_log = pp_log; /*initialize alloc table*/ - G_LOG_DEBUG(0, "Initializing allocation table"); sc->sc_alloctable = malloc(sizeof(*sc->sc_alloctable), M_GLOG, M_WAITOK | M_ZERO); g_log_alloctable_init(sc, M_GLOG); /*initialize request sublist*/ - G_LOG_DEBUG(0, "Initializing request sublist"); max_elements = (int)(MAXPHYS / sc->sc_prov_log->sectorsize); sc->sc_req_sublist = malloc (max_elements * sizeof( struct g_log_data), M_GLOG, M_WAITOK | M_ZERO); sc->sc_req_sublist_size = 0; + /*load log file*/ + if (g_log_load_logfile(sc, file) == 1) { + *err = 5; + return (NULL); + } + sc->sc_file_name = strdup(file, M_GLOG); + + sc->sc_geom_log = gp; + gp->softc = sc; + G_LOG_DEBUG(0, "Created geom %s", gp->name); + + /*initialize worker thread*/ + if (g_log_event_sink_init(sc, &sc->sc_events, g_log_worker, "events") + != 0){ + *err=4; + g_log_event_sink_destroy(&sc->sc_events); + return (NULL); + } + return gp; +} + +/*load a log file*/ +static int +g_log_load_logfile(struct g_log_softc *sc, const char *file) +{ + struct g_log_header head; + /*open file*/ - G_LOG_DEBUG(0, "Opening log file"); sc->sc_vn = g_log_open_file(file, FWRITE | FREAD | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); + if (sc->sc_vn == NULL) + return(1); /*see if the file can be used as a log file (has to be either empty or *have geom log header), add header if the file's empty, exit with an *error if file is neither empty nor has header - */ - G_LOG_DEBUG(0, "Checking log file"); + */ if (g_log_get_size(sc->sc_vn) > 0) { - G_LOG_DEBUG(0, "Reading header"); g_log_read_data(sc->sc_vn, &head, sizeof(head), 0); if (strcmp(head.text,"GEOM_LOG")!=0) { - *err = 1; - return (NULL); + g_log_close_file(sc->sc_vn, FWRITE | FREAD); + return(1); } /*warn if the log file was made with different version of glog*/ if (head.version != G_LOG_VERSION) G_LOG_DEBUG(0, "Header version: %d\nCurrent version: %d" , head.version, G_LOG_VERSION); /*restore alloc table from file*/ - G_LOG_DEBUG(0, "Restoring alloctable from file"); sc->sc_curr_offset = sizeof(head); g_log_alloctable_restore(sc, M_GLOG); } - else { - G_LOG_DEBUG(0, "Writing header"); - G_LOG_DEBUG(0, "Log file empty, writing header."); + else { /*log file empty, write header*/ g_log_write_header(sc->sc_vn); sc->sc_curr_offset = sizeof(head); } - - if (sc->sc_vn == NULL) { - *err = 5; - return (NULL); - } - sc->sc_file_name = strdup(file, M_GLOG); - - sc->sc_geom_log = gp; - gp->softc = sc; - G_LOG_DEBUG(0, "Created geom %s", gp->name); - /*initialize worker thread*/ - if (g_log_event_sink_init(sc, &sc->sc_events, g_log_worker, "events") - != 0){ - *err=4; - g_log_event_sink_destroy(&sc->sc_events); - return (NULL); - } - return gp; + return(0); } /*initialize sink thread*/ @@ -392,10 +396,6 @@ break; case GCTL_COMMIT: if (*num_arg == 1) { - /*printf("Are you sure (y/n)?"); - scanf("%c", &confirm); - if (confirm != 'y') - break;*/ prov = gctl_get_asciiparam(req, "arg0"); sc = g_log_find(mp, prov); if (sc == NULL) { @@ -409,17 +409,20 @@ gctl_error(req, "Wrong number of parameters."); break; case GCTL_ROLLBACK: - if (*num_arg ==1){ - /*printf("Are you sure (y/n)?"); - scanf("%c", &confirm); - if (confirm != 'y') - break;*/ + if (*num_arg >= 1){ prov = gctl_get_asciiparam(req, "arg0"); sc = g_log_find(mp, prov); if (sc == NULL) { G_LOG_DEBUG(0, "Geom not found."); break; } + if (*num_arg == 2) { + file = gctl_get_asciiparam(req, "arg1"); + sc->sc_snapshot = strdup(file, M_GLOG); + } + else + file = NULL; + g_log_post_event(&sc->sc_events, GLOG_EVROLLBACK, GLOG_FLAG_WAKEUP_SC, sc, 0); } else @@ -446,6 +449,18 @@ } g_log_dump_alloctable(sc, *icp); break; + case GCTL_SNAPSHOT: + prov = gctl_get_asciiparam(req, "arg0"); + file = gctl_get_asciiparam(req, "arg1"); + sc = g_log_find(mp, prov); + if (sc == NULL) { + G_LOG_DEBUG(0, "Geom not found."); + break; + } + sc->sc_snapshot = strdup(file, M_GLOG); + g_log_post_event(&sc->sc_events, GLOG_EVSNAPSHOT, + GLOG_FLAG_WAKEUP_SC, sc, 0); + break; default: gctl_error(req, "Unknown verb."); break; @@ -499,7 +514,7 @@ pp_log = sc->sc_prov_log; pp_disk = sc->sc_prov_disk; cp_disk = sc->sc_cons_disk; - + g_access(cp_disk, -1, -1, 0); if (pp_log != NULL && (pp_log->acr != 0 || pp_log->acw !=0 || pp_log->ace != 0)){ if (force) @@ -633,13 +648,17 @@ es->worker_thread = NULL; kthread_exit(0); break; + case GLOG_EVSNAPSHOT: + g_log_snapshot(sc); + break; default: G_LOG_DEBUG(0, "unhandled event %d", ev->type); } free(ev,M_GLOG); -sleep: tsleep(es, PRIBIO, "glogidle", 1000); +sleep: tsleep(es, PRIBIO, "glogidle", hz); } - + G_LOG_DEBUG(0, "Worker died."); + } /* adds event to event queue */ static int @@ -738,11 +757,11 @@ { struct g_log_softc *sc; struct g_log_data *gd; - int err, i, max_elements, offset_buf; + int i, max_elements, offset_buf; sc = bp->bio_to->geom->softc; KASSERT(sc != NULL, ("%s: softc is null", __func__)); - + /*clean up request sublist*/ free(sc->sc_req_sublist, M_GLOG); max_elements = (int)(MAXPHYS / sc->sc_prov_log->sectorsize); @@ -756,7 +775,7 @@ G_LOG_DEBUG(0, "Requested %jd, %jd", bp->bio_offset, bp->bio_length); /*retrieve request sublist*/ - err = g_log_alloctable_get(sc, bp->bio_offset, (ssize_t)bp->bio_length); + g_log_alloctable_get(sc, bp->bio_offset, (ssize_t)bp->bio_length); /*read requested data*/ for (i = 0; i < sc->sc_req_sublist_size; i++) { @@ -799,50 +818,90 @@ int i, err; KASSERT(sc != NULL, ("%s: sc is null!", __func__)); - G_LOG_DEBUG(0, "Starting commit..."); - g_topology_assert(); - err = g_access(sc->sc_cons_disk, 0, 1, 0); - g_topology_unlock(); - if (err != 0) { - G_LOG_DEBUG(0, "Error accessing provider %s", sc->sc_cons_disk->provider->name); - return; - } + /*write contents of all compartments to disk*/ for (i = 0; i < sc->sc_alloctable->tablesize; i++) { te = &sc->sc_alloctable->table[i]; SLIST_FOREACH(ae, &te->allocq, linkage) { if (ae->offset_log != -1) { - data = malloc(ae->data_size * sizeof(char), M_GLOG, M_WAITOK | M_ZERO); - G_LOG_DEBUG(0, "Committing %jd, %jd, %d", ae->offset_disk, ae->offset_log, ae->data_size); + data = malloc(ae->data_size * sizeof(char), + M_GLOG, M_WAITOK | M_ZERO); + /*get data from log file*/ - g_log_read_data(sc->sc_vn, (void*)data, ae->data_size, ae->offset_log); + g_log_read_data(sc->sc_vn, (void*)data, + ae->data_size, ae->offset_log); /*write it to disk*/ - err = g_write_data(sc->sc_cons_disk, ae->offset_disk, data, ae->data_size); - g_topology_lock(); - err = g_access(sc->sc_cons_disk, 0, -1, 0); - G_LOG_DEBUG(0, "Write error %d", err); + err = g_write_data(sc->sc_cons_disk, + ae->offset_disk, data, ae->data_size); free(data, M_GLOG); } } } + /*reset log file and alloc table*/ + g_log_rollback(sc); } /*drop the changes*/ static void g_log_rollback(struct g_log_softc *sc) { - /*reset log file*/ - sc->sc_vn = g_log_empty_file(sc->sc_vn, sc->sc_file_name); - g_log_write_header(sc->sc_vn); - sc->sc_curr_offset = sizeof(struct g_log_header); /*reset alloc table*/ g_log_alloctable_free(sc->sc_alloctable, M_GLOG); g_log_alloctable_init(sc, M_GLOG); + + if (sc->sc_snapshot != NULL) { /*load snapshot*/ + g_log_close_file(sc->sc_vn, FREAD | FWRITE); + g_log_load_logfile(sc, sc->sc_snapshot); + sc->sc_snapshot=NULL; + + } + else { /*reset log file*/ + sc->sc_vn = g_log_empty_file(sc->sc_vn, sc->sc_file_name); + g_log_write_header(sc->sc_vn); + sc->sc_curr_offset = sizeof(struct g_log_header); + } } - +/*create a snapshot*/ +static void +g_log_snapshot(struct g_log_softc *sc) +{ + struct vnode *ss_vn; + struct g_log_header *head; + struct g_log_data *gd; + char *data; + size_t offset, filesize; + + ss_vn = g_log_open_file(sc->sc_snapshot, FWRITE | O_CREAT | O_TRUNC, S_IWUSR); + head = malloc(sizeof(*head), M_GLOG, M_WAITOK | M_ZERO); + gd = malloc(sizeof(*gd), M_GLOG, M_WAITOK | M_ZERO); + offset = 0; + filesize = g_log_get_size(sc->sc_vn); + /*copy the contents of current log file to snapshot file*/ + /*first, the header*/ + g_log_read_data(sc->sc_vn, head, sizeof(*head), 0); + g_log_write_file(ss_vn, head, sizeof(*head), 0); + offset += sizeof(*head); + /*then data*/ + while (offset < filesize) { + /*data header*/ + g_log_read_data(sc->sc_vn, gd, sizeof(*gd), offset); + g_log_write_file(ss_vn, gd, sizeof(*gd), offset); + offset += sizeof(*gd); + /*data*/ + data = malloc(gd->data_size, M_GLOG, M_WAITOK | + M_ZERO); + g_log_read_data(sc->sc_vn, (void *)data, gd->data_size, offset); + g_log_write_file(ss_vn, (void *)data, gd->data_size, offset); + free(data, M_GLOG); + offset += gd->data_size; + } + free(head, M_GLOG); + free(gd, M_GLOG); + g_log_close_file(ss_vn, FWRITE); +} static int g_log_destroy_geom(struct gctl_req *req __unused, struct g_class *mp __unused, struct g_geom *gp) @@ -914,6 +973,8 @@ return GCTL_STOP; else if (strcmp(verb, "dump") == 0) return GCTL_DUMP; + else if (strcmp(verb, "snapshot") == 0) + return GCTL_SNAPSHOT; else return GCTL_INVALID; }; ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog.h#4 (text+ko) ==== @@ -35,40 +35,41 @@ #define DBG_NOTICE 15 struct g_log_event { - unsigned short int type; - unsigned short int flags; + unsigned short int type; + unsigned short int flags; #define GLOG_EVCOMMIT 1 #define GLOG_EVROLLBACK 2 #define GLOG_EVREAD 3 #define GLOG_EVWRITE 4 #define GLOG_EVSTOP 5 -#define GLOG_FLAG_WAKEUP_SC 6 - - void* data1; - int data2; - TAILQ_ENTRY(g_log_event) linkage; +#define GLOG_EVSNAPSHOT 6 +#define GLOG_FLAG_WAKEUP_SC 7 + void* data1; + int data2; + TAILQ_ENTRY(g_log_event) linkage; }; struct g_log_event_sink { - struct proc *worker_thread; - struct g_log_softc *sc; - TAILQ_HEAD(, g_log_event) eventq; - struct mtx eventq_mtx; - uint32_t flags; + struct proc *worker_thread; + struct g_log_softc *sc; + TAILQ_HEAD(, g_log_event) eventq; + struct mtx eventq_mtx; + uint32_t flags; }; struct g_log_softc { - struct g_geom *sc_geom_log; - struct g_provider *sc_prov_log; - struct g_provider *sc_prov_disk; - struct g_consumer *sc_cons_disk; - struct vnode *sc_vn; - struct g_log_event_sink sc_events; + struct g_geom *sc_geom_log; + struct g_provider *sc_prov_log; + struct g_provider *sc_prov_disk; + struct g_consumer *sc_cons_disk; + struct vnode *sc_vn; + struct g_log_event_sink sc_events; struct g_log_alloc_table *sc_alloctable; struct g_log_data *sc_req_sublist; size_t sc_req_sublist_size; off_t sc_curr_offset; char *sc_file_name; + char *sc_snapshot; }; /*this is the structure that's written to the log file*/ @@ -78,8 +79,6 @@ size_t data_size; }; -#endif /* _KERNEL */ - /*a header that's written at the start of log file, so that geom log can * recognize the file later*/ struct g_log_header { @@ -87,4 +86,6 @@ int version; }; +#endif /* _KERNEL */ + ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_alloctable.c#2 (text+ko) ==== @@ -106,7 +106,7 @@ ae->offset_disk = gd->offset_disk; ae->offset_log = gd->offset_log; ae->data_size = gd->data_size; - sc->sc_curr_offset += gd->offset_log + gd->data_size; /*skip data*/ + sc->sc_curr_offset += gd->offset_log + gd->data_size; G_LOG_DEBUG(0, "Found element %jd %jd %d, adding, curr offset " "%jd", ae->offset_disk, ae->offset_log, ae->data_size, sc->sc_curr_offset); @@ -127,7 +127,6 @@ struct g_log_alloc_element *aePrev, *aePrevTmp, *aeNext, *aeNextTmp; off_t key, aePrevOriginalOffsetLog; size_t overlap_size, aePrevOriginalSize; - G_LOG_DEBUG(0, "Adding %jd %jd %d", ae->offset_disk, ae->offset_log, ae->data_size); /*find the key - offset range where the new element belongs*/ key = (off_t) (ae->offset_disk / OFFSET_RANGE); te = &at->table[key]; @@ -254,58 +253,48 @@ struct g_log_alloc_table_element *te; struct g_log_alloc_element *ae, *tmpae; struct g_log_data gd; - G_LOG_DEBUG(0, "Key is %jd", key); /*find the compartment*/ te = &sc->sc_alloctable->table[key]; /*if compartment is empty, exit*/ if ((te == NULL) || SLIST_EMPTY(&te->allocq)) return(1); - G_LOG_DEBUG(0, "Finding first"); /*find the first element of the request and add it*/ ae = SLIST_FIRST(&te->allocq); tmpae = ae; while (ae->offset_disk <= offset) { tmpae = ae; ae = SLIST_NEXT(tmpae, linkage); - G_LOG_DEBUG(0, "tmpae %jd %jd %d", tmpae->offset_disk, tmpae->offset_log, tmpae->data_size); if (ae == NULL) break; - G_LOG_DEBUG(0, "ae %jd %jd %d", ae->offset_disk, ae->offset_log, ae->data_size); } ae = tmpae; - G_LOG_DEBUG(0, "Found first"); gd.offset_disk = ae->offset_disk; gd.offset_log = ae->offset_log; gd.data_size = ae->data_size; sc->sc_req_sublist[pos] = gd; sc->sc_req_sublist_size++; size = size + offset - ae->offset_disk - ae->data_size; - G_LOG_DEBUG(0, "Adding rest"); - /*now keep adding until the request is complete (size is 0)*/ + + /*now keep adding until the request is complete (size is 0 or less)*/ while (size > 0) { - G_LOG_DEBUG(0, "Size is %d", size); pos++; ae = SLIST_NEXT(ae, linkage); if (ae == NULL){ /*part of requested sublist is in next compartment?*/ - G_LOG_DEBUG(0, "Recursion"); g_log_alloctable_get_rec(sc, 0, size, key+1, pos); - G_LOG_DEBUG(0, "Recursion over"); } else { - G_LOG_DEBUG(0, "Adding %jd %d", ae->offset_disk, ae->data_size); + G_LOG_DEBUG(0, "Adding %jd %d", ae->offset_disk, + ae->data_size); size -= ae->data_size; gd.offset_disk = ae->offset_disk; gd.offset_log = ae->offset_log; gd.data_size = ae->data_size; sc->sc_req_sublist[pos] = gd; sc->sc_req_sublist_size++; - G_LOG_DEBUG(0, "Added %jd %d", ae->offset_disk, ae->data_size); - } - G_LOG_DEBUG(0, "Done %d", size); + } } - G_LOG_DEBUG(0, "Added rest"); return (0); } /*free an alloc table*/ ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_alloctable.h#2 (text+ko) ==== ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_fileops.c#4 (text+ko) ==== @@ -182,29 +182,18 @@ int err, i; KASSERT(sc != 0, ("%s: sc is null", __func__)); - G_LOG_DEBUG(0, "Reading element %jd, %jd, %d", gd->offset_disk, gd->offset_log, gd->data_size); + G_LOG_DEBUG(0, "Reading element %jd, %jd, %d", gd->offset_disk, + gd->offset_log, gd->data_size); if (gd->offset_log == -1) {/*read from disk*/ - G_LOG_DEBUG(0, "Reading from disk %s", sc->sc_cons_disk->provider->name); - g_topology_lock(); - err = g_access(sc->sc_cons_disk, 1, 0, 0); - g_topology_unlock(); - if (err != 0) { - G_LOG_DEBUG(0, "Error accessing provider %s", sc->sc_cons_disk->provider->name); - return (err); - } - tmp_buf = g_read_data(sc->sc_cons_disk, gd->offset_disk, gd->data_size, &err); - g_topology_lock(); - g_access(sc->sc_cons_disk, -1, 0, 0); if (tmp_buf == NULL) { - G_LOG_DEBUG(0, "ENOENT"); return (ENOENT); } } else { /*read from log file*/ - G_LOG_DEBUG(0, "Reading from log"); - tmp_buf = malloc(gd->data_size * sizeof(char), type, M_WAITOK | M_ZERO); + tmp_buf = malloc(gd->data_size * sizeof(char), type, M_WAITOK | + M_ZERO); g_log_read_data(sc->sc_vn, (void*)tmp_buf, gd->data_size, gd->offset_log); } ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_fileops.h#4 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Fri Aug 17 02:55:19 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CF4B716A420; Fri, 17 Aug 2007 02:55:18 +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 5F6E716A41A for ; Fri, 17 Aug 2007 02:55:18 +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 168D013C459 for ; Fri, 17 Aug 2007 02:55:18 +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 l7H2tHIQ062899 for ; Fri, 17 Aug 2007 02:55:17 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7H2t42u062883 for perforce@freebsd.org; Fri, 17 Aug 2007 02:55:04 GMT (envelope-from peter@freebsd.org) Date: Fri, 17 Aug 2007 02:55:04 GMT Message-Id: <200708170255.l7H2t42u062883@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 125251 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: Fri, 17 Aug 2007 02:55:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=125251 Change 125251 by peter@peter_daintree on 2007/08/17 02:54:53 IFC @125249 Affected files ... .. //depot/projects/hammer/ObsoleteFiles.inc#33 integrate .. //depot/projects/hammer/contrib/gcc/BASE-VER#2 integrate .. //depot/projects/hammer/contrib/gcc/ChangeLog#13 integrate .. //depot/projects/hammer/contrib/gcc/DATESTAMP#2 integrate .. //depot/projects/hammer/contrib/gcc/Makefile.in#12 integrate .. //depot/projects/hammer/contrib/gcc/calls.c#11 integrate .. //depot/projects/hammer/contrib/gcc/combine.c#10 integrate .. //depot/projects/hammer/contrib/gcc/config/arm/arm.c#9 integrate .. //depot/projects/hammer/contrib/gcc/config/arm/cirrus.md#3 integrate .. //depot/projects/hammer/contrib/gcc/config/i386/i386.c#16 integrate .. //depot/projects/hammer/contrib/gcc/config/i386/i386.h#12 integrate .. //depot/projects/hammer/contrib/gcc/config/i386/i386.md#10 integrate .. //depot/projects/hammer/contrib/gcc/config/i386/sse.md#2 integrate .. //depot/projects/hammer/contrib/gcc/config/mips/iris6.h#2 integrate .. //depot/projects/hammer/contrib/gcc/config/rs6000/predicates.md#2 integrate .. //depot/projects/hammer/contrib/gcc/config/rs6000/rs6000.c#12 integrate .. //depot/projects/hammer/contrib/gcc/config/soft-fp/double.h#2 integrate .. //depot/projects/hammer/contrib/gcc/config/soft-fp/extended.h#2 integrate .. //depot/projects/hammer/contrib/gcc/config/soft-fp/floatundidf.c#2 integrate .. //depot/projects/hammer/contrib/gcc/config/soft-fp/floatundisf.c#2 integrate .. //depot/projects/hammer/contrib/gcc/config/soft-fp/floatunsidf.c#2 integrate .. //depot/projects/hammer/contrib/gcc/config/soft-fp/floatunsisf.c#2 integrate .. //depot/projects/hammer/contrib/gcc/config/soft-fp/op-2.h#2 integrate .. //depot/projects/hammer/contrib/gcc/config/soft-fp/op-4.h#2 integrate .. //depot/projects/hammer/contrib/gcc/config/soft-fp/op-common.h#2 integrate .. //depot/projects/hammer/contrib/gcc/config/soft-fp/quad.h#2 integrate .. //depot/projects/hammer/contrib/gcc/config/sparc/sparc.c#11 integrate .. //depot/projects/hammer/contrib/gcc/cp/ChangeLog#13 integrate .. //depot/projects/hammer/contrib/gcc/cp/call.c#10 integrate .. //depot/projects/hammer/contrib/gcc/cp/class.c#11 integrate .. //depot/projects/hammer/contrib/gcc/cp/cp-tree.h#12 integrate .. //depot/projects/hammer/contrib/gcc/cp/decl.c#13 integrate .. //depot/projects/hammer/contrib/gcc/cp/decl2.c#12 integrate .. //depot/projects/hammer/contrib/gcc/cp/init.c#12 integrate .. //depot/projects/hammer/contrib/gcc/cp/parser.c#5 integrate .. //depot/projects/hammer/contrib/gcc/cp/pt.c#12 integrate .. //depot/projects/hammer/contrib/gcc/cp/semantics.c#8 integrate .. //depot/projects/hammer/contrib/gcc/cp/typeck.c#10 integrate .. //depot/projects/hammer/contrib/gcc/cp/typeck2.c#9 integrate .. //depot/projects/hammer/contrib/gcc/doc/cpp.1#3 integrate .. //depot/projects/hammer/contrib/gcc/doc/gcc.1#3 integrate .. //depot/projects/hammer/contrib/gcc/doc/gcov.1#3 integrate .. //depot/projects/hammer/contrib/gcc/dwarf2out.c#9 integrate .. //depot/projects/hammer/contrib/gcc/except.c#5 integrate .. //depot/projects/hammer/contrib/gcc/fold-const.c#9 integrate .. //depot/projects/hammer/contrib/gcc/function.c#11 integrate .. //depot/projects/hammer/contrib/gcc/gimplify.c#2 integrate .. //depot/projects/hammer/contrib/gcc/gthr-posix.c#3 integrate .. //depot/projects/hammer/contrib/gcc/gthr-posix.h#5 integrate .. //depot/projects/hammer/contrib/gcc/loop-iv.c#2 integrate .. //depot/projects/hammer/contrib/gcc/objc/ChangeLog#2 integrate .. //depot/projects/hammer/contrib/gcc/omp-low.c#2 integrate .. //depot/projects/hammer/contrib/gcc/pointer-set.c#2 integrate .. //depot/projects/hammer/contrib/gcc/pointer-set.h#2 integrate .. //depot/projects/hammer/contrib/gcc/reload.c#10 integrate .. //depot/projects/hammer/contrib/gcc/tree-if-conv.c#2 integrate .. //depot/projects/hammer/contrib/gcc/tree-ssa-loop-niter.c#2 integrate .. //depot/projects/hammer/contrib/gcc/tree-ssa-operands.c#2 integrate .. //depot/projects/hammer/contrib/gcc/tree-ssa-structalias.c#2 integrate .. //depot/projects/hammer/contrib/gcc/tree-vrp.c#2 integrate .. //depot/projects/hammer/contrib/gcc/version.c#13 integrate .. //depot/projects/hammer/contrib/gcclibs/include/ChangeLog#2 integrate .. //depot/projects/hammer/contrib/gcclibs/libcpp/ChangeLog#2 integrate .. //depot/projects/hammer/contrib/gcclibs/libdecnumber/ChangeLog#2 integrate .. //depot/projects/hammer/contrib/gcclibs/libgomp/ChangeLog#2 integrate .. //depot/projects/hammer/contrib/gcclibs/libgomp/config/posix/lock.c#2 integrate .. //depot/projects/hammer/contrib/gcclibs/libgomp/sections.c#2 integrate .. //depot/projects/hammer/contrib/gcclibs/libiberty/ChangeLog#2 integrate .. //depot/projects/hammer/contrib/gcclibs/libmudflap/ChangeLog#2 integrate .. //depot/projects/hammer/contrib/gcclibs/libssp/ChangeLog#2 integrate .. //depot/projects/hammer/contrib/less/main.c#7 integrate .. //depot/projects/hammer/contrib/libobjc/ChangeLog#12 integrate .. //depot/projects/hammer/contrib/libstdc++/ChangeLog#13 integrate .. //depot/projects/hammer/contrib/libstdc++/acinclude.m4#10 integrate .. //depot/projects/hammer/contrib/libstdc++/config.h.in#8 integrate .. //depot/projects/hammer/contrib/libstdc++/configure#11 integrate .. //depot/projects/hammer/contrib/libstdc++/include/Makefile.am#9 integrate .. //depot/projects/hammer/contrib/libstdc++/include/Makefile.in#9 integrate .. //depot/projects/hammer/contrib/libstdc++/include/bits/ostream.tcc#6 integrate .. //depot/projects/hammer/contrib/libstdc++/include/bits/ostream_insert.h#2 integrate .. //depot/projects/hammer/contrib/libstdc++/include/ext/throw_allocator.h#2 integrate .. //depot/projects/hammer/contrib/libstdc++/include/std/std_fstream.h#8 integrate .. //depot/projects/hammer/contrib/libstdc++/libsupc++/exception#5 integrate .. //depot/projects/hammer/contrib/libstdc++/libsupc++/new#6 integrate .. //depot/projects/hammer/contrib/libstdc++/libsupc++/typeinfo#5 integrate .. //depot/projects/hammer/contrib/opensolaris/cmd/zdb/zdb.c#3 integrate .. //depot/projects/hammer/contrib/tcpdump/print-bgp.c#7 integrate .. //depot/projects/hammer/etc/etc.arm/ttys#4 integrate .. //depot/projects/hammer/etc/namedb/named.conf#11 integrate .. //depot/projects/hammer/etc/rc.d/nscd#2 integrate .. //depot/projects/hammer/gnu/lib/libgcc/Makefile#16 integrate .. //depot/projects/hammer/gnu/lib/libstdc++/Makefile#29 integrate .. //depot/projects/hammer/include/arpa/tftp.h#2 integrate .. //depot/projects/hammer/lib/libarchive/archive_write_disk.c#7 integrate .. //depot/projects/hammer/lib/libarchive/test/test_read_format_gtar_sparse.c#4 integrate .. //depot/projects/hammer/lib/libarchive/test/test_write_disk_perms.c#7 integrate .. //depot/projects/hammer/lib/libdisk/open_disk.c#9 integrate .. //depot/projects/hammer/lib/libthr/thread/thr_private.h#35 integrate .. //depot/projects/hammer/lib/libutil/flopen.3#2 integrate .. //depot/projects/hammer/lib/libutil/flopen.c#2 integrate .. //depot/projects/hammer/lib/libutil/pidfile.c#5 integrate .. //depot/projects/hammer/release/Makefile#92 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/Makefile#6 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/article.sgml#4 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/artheader.sgml#7 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#92 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/hw.ent#5 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/intro.sgml#5 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/Makefile#6 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/Makefile.inc#2 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/amd64/Makefile#2 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/amd64/article.sgml#3 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/common/abstract.sgml#2 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/common/artheader.sgml#7 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/common/install.ent#2 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/common/install.sgml#18 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/common/layout.sgml#9 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/common/trouble.sgml#12 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/common/upgrade.sgml#6 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/i386/Makefile#2 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/i386/article.sgml#4 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/ia64/Makefile#2 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/ia64/article.sgml#3 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/pc98/Makefile#2 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/pc98/article.sgml#3 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/powerpc/Makefile#2 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/powerpc/article.sgml#2 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/sparc64/Makefile#2 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/sparc64/article.sgml#4 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/sparc64/install.sgml#4 delete .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/relnotes/article.sgml#15 integrate .. //depot/projects/hammer/release/doc/share/examples/Makefile.relnotesng#11 integrate .. //depot/projects/hammer/release/doc/share/misc/dev.archlist.txt#45 integrate .. //depot/projects/hammer/sbin/atacontrol/atacontrol.c#23 integrate .. //depot/projects/hammer/sbin/fsck_ffs/main.c#12 integrate .. //depot/projects/hammer/sbin/ifconfig/ifbridge.c#6 integrate .. //depot/projects/hammer/sbin/ifconfig/ifconfig.8#45 integrate .. //depot/projects/hammer/sbin/ipfw/ipfw.8#59 integrate .. //depot/projects/hammer/sbin/tunefs/tunefs.8#10 integrate .. //depot/projects/hammer/share/man/man4/Makefile#94 integrate .. //depot/projects/hammer/share/man/man4/crypto.4#6 integrate .. //depot/projects/hammer/share/man/man4/ddb.4#11 integrate .. //depot/projects/hammer/share/man/man4/enc.4#4 integrate .. //depot/projects/hammer/share/man/man4/fast_ipsec.4#5 delete .. //depot/projects/hammer/share/man/man4/ipsec.4#6 integrate .. //depot/projects/hammer/share/man/man4/man4.i386/padlock.4#5 integrate .. //depot/projects/hammer/share/man/man4/mfi.4#4 integrate .. //depot/projects/hammer/share/man/man4/ng_fec.4#5 integrate .. //depot/projects/hammer/share/man/man4/ng_ppp.4#8 integrate .. //depot/projects/hammer/share/man/man4/vpo.4#8 integrate .. //depot/projects/hammer/share/man/man5/Makefile#22 integrate .. //depot/projects/hammer/share/man/man5/boot.config.5#1 branch .. //depot/projects/hammer/share/man/man9/locking.9#4 integrate .. //depot/projects/hammer/share/man/man9/rtentry.9#9 integrate .. //depot/projects/hammer/share/misc/bsd-family-tree#38 integrate .. //depot/projects/hammer/share/misc/committers-doc.dot#2 integrate .. //depot/projects/hammer/share/mk/sys.mk#24 integrate .. //depot/projects/hammer/sys/amd64/amd64/local_apic.c#76 integrate .. //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#129 integrate .. //depot/projects/hammer/sys/amd64/conf/NOTES#102 integrate .. //depot/projects/hammer/sys/amd64/include/specialreg.h#25 integrate .. //depot/projects/hammer/sys/arm/arm/cpufunc.c#13 integrate .. //depot/projects/hammer/sys/arm/arm/genassym.c#9 integrate .. //depot/projects/hammer/sys/arm/arm/swtch.S#18 integrate .. //depot/projects/hammer/sys/boot/arm/at91/libat91/Makefile#5 integrate .. //depot/projects/hammer/sys/compat/freebsd32/freebsd32_proto.h#48 integrate .. //depot/projects/hammer/sys/compat/freebsd32/freebsd32_syscall.h#45 integrate .. //depot/projects/hammer/sys/compat/freebsd32/freebsd32_syscalls.c#45 integrate .. //depot/projects/hammer/sys/compat/freebsd32/freebsd32_sysent.c#45 integrate .. //depot/projects/hammer/sys/compat/freebsd32/syscalls.master#50 integrate .. //depot/projects/hammer/sys/compat/linux/linux_socket.c#30 integrate .. //depot/projects/hammer/sys/compat/opensolaris/sys/proc.h#2 integrate .. //depot/projects/hammer/sys/conf/NOTES#125 integrate .. //depot/projects/hammer/sys/conf/files#158 integrate .. //depot/projects/hammer/sys/conf/files.amd64#94 integrate .. //depot/projects/hammer/sys/conf/files.i386#80 integrate .. //depot/projects/hammer/sys/conf/kern.pre.mk#50 integrate .. //depot/projects/hammer/sys/conf/options#113 integrate .. //depot/projects/hammer/sys/dev/adlink/adlink.c#15 integrate .. //depot/projects/hammer/sys/dev/an/if_an.c#35 integrate .. //depot/projects/hammer/sys/dev/ata/ata-raid.c#40 integrate .. //depot/projects/hammer/sys/dev/ath/if_ath.c#54 integrate .. //depot/projects/hammer/sys/dev/coretemp/coretemp.c#1 branch .. //depot/projects/hammer/sys/dev/cxgb/cxgb_adapter.h#7 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_main.c#7 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_offload.c#4 integrate .. //depot/projects/hammer/sys/dev/cxgb/cxgb_sge.c#8 integrate .. //depot/projects/hammer/sys/dev/dc/if_dc.c#12 integrate .. //depot/projects/hammer/sys/dev/dc/if_dcreg.h#7 integrate .. //depot/projects/hammer/sys/dev/em/if_em.c#68 integrate .. //depot/projects/hammer/sys/dev/ichwd/ichwd.c#10 integrate .. //depot/projects/hammer/sys/dev/ichwd/ichwd.h#4 integrate .. //depot/projects/hammer/sys/dev/mfi/mfi.c#8 integrate .. //depot/projects/hammer/sys/dev/mfi/mfi_disk.c#5 integrate .. //depot/projects/hammer/sys/dev/mfi/mfi_pci.c#5 integrate .. //depot/projects/hammer/sys/dev/mfi/mfireg.h#5 integrate .. //depot/projects/hammer/sys/dev/mfi/mfivar.h#5 integrate .. //depot/projects/hammer/sys/dev/mpt/mpt.c#20 integrate .. //depot/projects/hammer/sys/dev/mpt/mpt.h#17 integrate .. //depot/projects/hammer/sys/dev/mpt/mpt_cam.c#17 integrate .. //depot/projects/hammer/sys/dev/nmdm/nmdm.c#24 integrate .. //depot/projects/hammer/sys/dev/re/if_re.c#50 integrate .. //depot/projects/hammer/sys/dev/streams/streams.c#15 integrate .. //depot/projects/hammer/sys/dev/usb/ehci.c#29 integrate .. //depot/projects/hammer/sys/dev/usb/if_axe.c#35 integrate .. //depot/projects/hammer/sys/dev/usb/if_axereg.h#12 integrate .. //depot/projects/hammer/sys/dev/wi/if_wi.c#54 integrate .. //depot/projects/hammer/sys/fs/msdosfs/denode.h#13 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_conv.c#15 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_denode.c#27 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_fat.c#9 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_fileno.c#3 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_iconv.c#3 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_lookup.c#11 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_vfsops.c#45 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_vnops.c#30 integrate .. //depot/projects/hammer/sys/fs/tmpfs/tmpfs.h#5 integrate .. //depot/projects/hammer/sys/fs/tmpfs/tmpfs_subr.c#5 integrate .. //depot/projects/hammer/sys/fs/tmpfs/tmpfs_vfsops.c#6 integrate .. //depot/projects/hammer/sys/fs/tmpfs/tmpfs_vnops.c#5 integrate .. //depot/projects/hammer/sys/gnu/fs/ext2fs/ext2_vfsops.c#12 integrate .. //depot/projects/hammer/sys/i386/conf/NOTES#92 integrate .. //depot/projects/hammer/sys/i386/i386/local_apic.c#33 integrate .. //depot/projects/hammer/sys/i386/i386/machdep.c#78 integrate .. //depot/projects/hammer/sys/i386/i386/mp_machdep.c#65 integrate .. //depot/projects/hammer/sys/i386/include/cpufunc.h#13 integrate .. //depot/projects/hammer/sys/i386/include/specialreg.h#15 integrate .. //depot/projects/hammer/sys/ia64/ia64/clock.c#13 integrate .. //depot/projects/hammer/sys/ia64/ia64/exception.S#11 integrate .. //depot/projects/hammer/sys/ia64/ia64/interrupt.c#27 integrate .. //depot/projects/hammer/sys/ia64/ia64/machdep.c#63 integrate .. //depot/projects/hammer/sys/ia64/ia64/mp_machdep.c#20 integrate .. //depot/projects/hammer/sys/ia64/ia64/pmap.c#61 integrate .. //depot/projects/hammer/sys/ia64/include/ia64_cpu.h#6 integrate .. //depot/projects/hammer/sys/ia64/include/md_var.h#16 integrate .. //depot/projects/hammer/sys/kern/init_sysent.c#62 integrate .. //depot/projects/hammer/sys/kern/kern_descrip.c#70 integrate .. //depot/projects/hammer/sys/kern/kern_lockf.c#16 integrate .. //depot/projects/hammer/sys/kern/kern_poll.c#18 integrate .. //depot/projects/hammer/sys/kern/kern_switch.c#54 integrate .. //depot/projects/hammer/sys/kern/kern_thr.c#38 integrate .. //depot/projects/hammer/sys/kern/sched_ule.c#79 integrate .. //depot/projects/hammer/sys/kern/sys_socket.c#20 integrate .. //depot/projects/hammer/sys/kern/syscalls.c#60 integrate .. //depot/projects/hammer/sys/kern/syscalls.master#61 integrate .. //depot/projects/hammer/sys/kern/systrace_args.c#6 integrate .. //depot/projects/hammer/sys/kern/uipc_domain.c#20 integrate .. //depot/projects/hammer/sys/kern/uipc_syscalls.c#64 integrate .. //depot/projects/hammer/sys/kern/vfs_mount.c#80 integrate .. //depot/projects/hammer/sys/kern/vfs_subr.c#114 integrate .. //depot/projects/hammer/sys/modules/Makefile#112 integrate .. //depot/projects/hammer/sys/modules/coretemp/Makefile#1 branch .. //depot/projects/hammer/sys/modules/netgraph/bluetooth/Makefile#5 integrate .. //depot/projects/hammer/sys/net/bpf.c#50 integrate .. //depot/projects/hammer/sys/net/bpfdesc.h#18 integrate .. //depot/projects/hammer/sys/net/bridgestp.c#15 integrate .. //depot/projects/hammer/sys/net/bridgestp.h#3 integrate .. //depot/projects/hammer/sys/net/if_bridge.c#34 integrate .. //depot/projects/hammer/sys/net/if_bridgevar.h#12 integrate .. //depot/projects/hammer/sys/net/netisr.c#15 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/h4/TODO#3 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#15 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#5 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#6 integrate .. //depot/projects/hammer/sys/netgraph/netflow/netflow.c#16 integrate .. //depot/projects/hammer/sys/netgraph/ng_ppp.c#19 integrate .. //depot/projects/hammer/sys/netgraph/ng_ppp.h#6 integrate .. //depot/projects/hammer/sys/netinet/in_mcast.c#3 integrate .. //depot/projects/hammer/sys/netinet/in_pcb.h#35 integrate .. //depot/projects/hammer/sys/netinet/ip_divert.c#38 integrate .. //depot/projects/hammer/sys/netinet/ip_dummynet.c#42 integrate .. //depot/projects/hammer/sys/netinet/ip_fw2.c#85 integrate .. //depot/projects/hammer/sys/netinet/ip_input.c#67 integrate .. //depot/projects/hammer/sys/netinet/ip_ipsec.c#6 integrate .. //depot/projects/hammer/sys/netinet/ip_ipsec.h#2 integrate .. //depot/projects/hammer/sys/netinet/ip_mroute.c#40 integrate .. //depot/projects/hammer/sys/netinet/sctp_asconf.c#11 integrate .. //depot/projects/hammer/sys/netinet/sctp_constants.h#10 integrate .. //depot/projects/hammer/sys/netinet/sctp_input.c#12 integrate .. //depot/projects/hammer/sys/netinet/sctp_output.c#12 integrate .. //depot/projects/hammer/sys/netinet/sctp_pcb.c#12 integrate .. //depot/projects/hammer/sys/netinet/sctp_timer.c#11 integrate .. //depot/projects/hammer/sys/netinet/sctp_uio.h#9 integrate .. //depot/projects/hammer/sys/netinet/sctp_usrreq.c#12 integrate .. //depot/projects/hammer/sys/netinet/sctputil.c#14 integrate .. //depot/projects/hammer/sys/netinet/tcp_subr.c#73 integrate .. //depot/projects/hammer/sys/netinet/tcp_syncache.c#48 integrate .. //depot/projects/hammer/sys/netinet6/ip6_ipsec.c#3 integrate .. //depot/projects/hammer/sys/netinet6/ip6_ipsec.h#2 integrate .. //depot/projects/hammer/sys/netipsec/xform_ah.c#13 integrate .. //depot/projects/hammer/sys/netipsec/xform_esp.c#14 integrate .. //depot/projects/hammer/sys/netipsec/xform_ipcomp.c#10 integrate .. //depot/projects/hammer/sys/nfsclient/bootp_subr.c#21 integrate .. //depot/projects/hammer/sys/nfsclient/krpc_subr.c#11 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_socket.c#41 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_vfsops.c#48 integrate .. //depot/projects/hammer/sys/nfsserver/nfs_srvsock.c#22 integrate .. //depot/projects/hammer/sys/nfsserver/nfs_srvsubs.c#27 integrate .. //depot/projects/hammer/sys/nfsserver/nfs_syscalls.c#23 integrate .. //depot/projects/hammer/sys/pci/if_xl.c#66 integrate .. //depot/projects/hammer/sys/pci/viapm.c#15 integrate .. //depot/projects/hammer/sys/powerpc/include/interruptvar.h#3 delete .. //depot/projects/hammer/sys/powerpc/include/intr_machdep.h#10 integrate .. //depot/projects/hammer/sys/powerpc/include/md_var.h#7 integrate .. //depot/projects/hammer/sys/powerpc/include/openpicvar.h#6 integrate .. //depot/projects/hammer/sys/powerpc/include/trap.h#3 integrate .. //depot/projects/hammer/sys/powerpc/powermac/hrowpic.c#14 integrate .. //depot/projects/hammer/sys/powerpc/powermac/hrowpicvar.h#3 integrate .. //depot/projects/hammer/sys/powerpc/powermac/openpic_macio.c#8 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/autoconf.c#7 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/interrupt.c#6 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/intr_machdep.c#13 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/nexus.c#11 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/openpic.c#13 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/pic_if.m#4 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/trap.c#24 integrate .. //depot/projects/hammer/sys/powerpc/psim/openpic_iobus.c#7 integrate .. //depot/projects/hammer/sys/rpc/rpcclnt.c#16 integrate .. //depot/projects/hammer/sys/security/mac/mac_syscalls.c#3 integrate .. //depot/projects/hammer/sys/sparc64/include/iommureg.h#6 integrate .. //depot/projects/hammer/sys/sparc64/include/iommuvar.h#9 integrate .. //depot/projects/hammer/sys/sparc64/pci/psycho.c#33 integrate .. //depot/projects/hammer/sys/sparc64/pci/psychoreg.h#9 integrate .. //depot/projects/hammer/sys/sparc64/sbus/sbus.c#27 integrate .. //depot/projects/hammer/sys/sparc64/sbus/sbusreg.h#3 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/iommu.c#22 integrate .. //depot/projects/hammer/sys/sys/ata.h#18 integrate .. //depot/projects/hammer/sys/sys/mutex.h#33 integrate .. //depot/projects/hammer/sys/sys/syscall.h#59 integrate .. //depot/projects/hammer/sys/sys/syscall.mk#59 integrate .. //depot/projects/hammer/sys/sys/sysproto.h#60 integrate .. //depot/projects/hammer/sys/sys/thr.h#10 integrate .. //depot/projects/hammer/sys/vm/device_pager.c#16 integrate .. //depot/projects/hammer/sys/vm/phys_pager.c#12 integrate .. //depot/projects/hammer/sys/vm/swap_pager.c#53 integrate .. //depot/projects/hammer/sys/vm/vm_pager.c#22 integrate .. //depot/projects/hammer/tools/regression/lib/libutil/Makefile#2 integrate .. //depot/projects/hammer/tools/regression/lib/libutil/test-flopen.c#1 branch .. //depot/projects/hammer/tools/regression/lib/libutil/test-flopen.t#1 branch .. //depot/projects/hammer/tools/regression/tmpfs/h_tools.c#2 integrate .. //depot/projects/hammer/tools/regression/tmpfs/t_mount#2 integrate .. //depot/projects/hammer/tools/regression/tmpfs/t_rename#2 integrate .. //depot/projects/hammer/usr.bin/tar/bsdtar.c#33 integrate .. //depot/projects/hammer/usr.sbin/bsnmpd/modules/snmp_bridge/BEGEMOT-BRIDGE-MIB.txt#2 integrate .. //depot/projects/hammer/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c#2 integrate .. //depot/projects/hammer/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h#2 integrate .. //depot/projects/hammer/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c#3 integrate .. //depot/projects/hammer/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_tree.def#2 integrate .. //depot/projects/hammer/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3#3 integrate .. //depot/projects/hammer/usr.sbin/freebsd-update/freebsd-update.sh#4 integrate .. //depot/projects/hammer/usr.sbin/iostat/iostat.c#8 integrate .. //depot/projects/hammer/usr.sbin/nscd/Makefile#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/agent.h#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/cachelib.h#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/cacheplcs.h#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/config.h#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/debug.h#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/log.c#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/log.h#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/mp_rs_query.c#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/mp_rs_query.h#1 branch .. //depot/projects/hammer/usr.sbin/nscd/mp_ws_query.c#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/mp_ws_query.h#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/nscd.8#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/nscd.c#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/nscd.conf.5#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/nscdcli.c#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/nscdcli.h#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/parser.h#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/protocol.h#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/query.c#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/query.h#2 integrate .. //depot/projects/hammer/usr.sbin/nscd/singletons.h#2 integrate .. //depot/projects/hammer/usr.sbin/portsnap/portsnap/portsnap.sh#8 integrate .. //depot/projects/hammer/usr.sbin/rpc.statd/file.c#3 integrate .. //depot/projects/hammer/usr.sbin/rpc.statd/statd.c#6 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/menus.c#44 integrate Differences ... ==== //depot/projects/hammer/ObsoleteFiles.inc#33 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.107 2007/07/17 17:28:59 delphij Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.109 2007/08/07 23:48:30 marcel Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -14,6 +14,12 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20070807: removal of PowerPC specific header file. +.if ${TARGET_ARCH} == "powerpc" +OLD_FILES+=usr/include/machine/interruptvar.h +.endif +# 20070801: fast_ipsec.4 gone +OLD_FILES+=usr/share/man/man4/fast_ipsec.4.gz # 20070715: netatm temporarily disconnected OLD_FILES+=rescue/atm OLD_FILES+=rescue/fore_dnld ==== //depot/projects/hammer/contrib/gcc/BASE-VER#2 (text+ko) ==== @@ -1,1 +1,1 @@ -4.2.0 +4.2.1 ==== //depot/projects/hammer/contrib/gcc/ChangeLog#13 (text+ko) ==== @@ -1,3 +1,441 @@ +2007-07-19 Release Manager + + * GCC 4.2.1 released. + +2007-07-18 Paolo Bonzini + + Revert: + + 2007-07-09 Paolo Bonzini + + PR middle-end/32004 + * function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO. + + 2007-07-06 Paolo Bonzini + + PR middle-end/32004 + * function.c (match_asm_constraints_1, rest_of_match_asm_constraints, + pass_match_asm_constraints): New. + * passes.c (init_optimization_passes): Add new pass. + * stmt.c (expand_asm_operands): Set cfun->has_asm_statement. + * function.h (struct function): Add has_asm_statement bit. + (current_function_has_asm_statement): New. + * tree-pass.h (pass_match_asm_constraints): New. + +2007-07-16 Paul Brook + + PR target/32753 + gcc/ + * config/arm/cirrus.md (cirrus_arm_movsi_insn): Remove dead insn. + +2007-07-10 Rainer Orth + + PR target/32538 + * config/mips/iris6.h (LIBGCC_SPEC): Add libm. + +2007-07-09 Paolo Bonzini + + PR middle-end/32004 + * function.c (rest_of_match_asm_constraints): Pass PROP_REG_INFO. + +2007-07-09 Uros Bizjak + + PR tree-optimization/32681 + * tree-if-conv.c (find_phi_replacement_condition): Use the condition + saved in second_edge->aux when first_bb is a loop header. + +2007-07-07 Anatoly Sokolov + + PR target/31331 + * config/avr/avr.c (avr_naked_function_p): Handle receiving a type + rather than a decl. + (avr_attribute_table): Make "naked" attribute apply to function types + rather than to decls. + (avr_handle_fntype_attribute): New function. + +2007-07-06 Paolo Bonzini + + PR middle-end/32004 + * function.c (match_asm_constraints_1, rest_of_match_asm_constraints, + pass_match_asm_constraints): New. + * passes.c (init_optimization_passes): Add new pass. + * stmt.c (expand_asm_operands): Set cfun->has_asm_statement. + * function.h (struct function): Add has_asm_statement bit. + (current_function_has_asm_statement): New. + * tree-pass.h (pass_match_asm_constraints): New. + +2007-07-06 Uros Bizjak + + PR rtl-optimization/32450 + * function.c (thread_prologue_and_epilogue_insns): Emit blockage insn + to ensure that instructions are not moved into the prologue when + profiling is on. + +2007-07-04 Richard Guenther + + PR tree-optimization/32500 + * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): + Only use basic blocks that are always executed to infer loop bounds. + +2007-07-04 Uros Bizjak + + PR tree-optimization/31966 + PR tree-optimization/32533 + * tree-if-conv.c (add_to_dst_predicate_list): Use "edge", not + "basic_block" description as its third argument. Update function + calls to get destination bb from "edge" argument. Save "cond" into + aux field of the edge. Update prototype for changed arguments. + (if_convertible_loop_p): Clear aux field of incoming edges if bb + contains phi node. + (find_phi_replacement_condition): Operate on incoming edges, not + on predecessor blocks. If there is a condition saved in the + incoming edge aux field, AND it with incoming bb predicate. + Return source bb of the first edge. + (clean_predicate_lists): Clean aux field of outgoing node edges. + (tree_if_conversion): Do not initialize cond variable. Move + variable declaration into the loop. + (replace_phi_with_cond_gimple_modify_stmt): Remove unneded + initializations of new_stmt, arg0 and arg1 variables. + +2007-07-04 Kaz Kojima + + PR target/32506 + Backport from mainline. + * config/sh/sh.md (udivsi3_i1_media): Use target_reg_operand + predicate instead of target_operand. + (divsi3_i1_media, divsi3_media_2): Likewise. + +2007-07-03 Richard Guenther + + Backport from mainline: + 2006-12-11 Zdenek Dvorak + + PR rtl-optimization/30113 + * loop-iv.c (implies_p): Require the mode of the operands to be + scalar. + +2007-07-03 Rainer Orth + + PR target/28307 + * gthr-posix.h [SUPPORTS_WEAK && GTHREAD_USE_WEAK] + (__gthrw_pragma): Provide default definition. + (__gthrw2): Use it. + * gthr-posix.c (__gthrw_pragma): Define. + +2007-07-02 Jakub Jelinek + + PR libgomp/32468 + * omp-low.c (check_combined_parallel): New function. + (lower_omp_parallel): Call it via walk_stmts, set + OMP_PARALLEL_COMBINED if appropriate. + (determine_parallel_type): If OMP_FOR resp. OMP_SECTIONS + isn't the only statement in WS_ENTRY_BB or OMP_RETURN + the only one in PAR_EXIT_BB and not OMP_PARALLEL_COMBINED, + don't consider it as combined parallel. + +2007-06-30 Alexandre Oliva + + * dwarf2out.c (dwarf2out_finish): Accept namespaces as context of + limbo die nodes. + +2007-06-28 Seongbae Park + + * config/arm/arm.c (arm_get_frame_offsets): Set + offsets->locals_base to avoid negative stack size. + (thumb_expand_prologue): Assert on negative stack size. + +2007-06-28 Jakub Jelinek + + * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Ensure + decl is non-external for AIX ABI. + +2007-06-28 David Edelsohn + + * config/rs6000/predicates.md (current_file_function_operand): + Ensure the symbol is non-external for AIX ABI. + +2007-06-21 H.J. Lu + + * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_VEC_EXT_V16QI. + (ix86_init_mmx_sse_builtins): Add __builtin_ia32_vec_ext_v16qi. + (ix86_expand_builtin): Handle IX86_BUILTIN_VEC_EXT_V16QI. + +2007-06-21 Jakub Jelinek + + PR middle-end/32362 + * omp-low.c (lookup_decl_in_outer_ctx): Don't ICE if t is NULL, + but decl is a global var, instead return decl. + * gimplify.c (gimplify_adjust_omp_clauses_1): Add shared clauses + even for is_global_var decls, if they are private in some outer + context. + +2007-06-21 Uros Bizjak + + PR target/32389 + * config/i386/i386.h (enum ix86_stack_slot): Add SLOT_VIRTUAL. + * config/i386/i386.c (assign_386_stack_local): Assert that + SLOT_VIRTUAL is valid only before virtual regs are instantiated. + (ix86_expand_builtin) [IX86_BUILTIN_LDMXCSR, IX86_BUILTIN_STMXCSR]: + Use SLOT_VIRTUAL stack slot instead of SLOT_TEMP. + * config/i386/i386.md (truncdfsf2, truncxfsf2, truncxfdf2): Ditto. + +2007-06-20 Jakub Jelinek + + PR inline-asm/32109 + * gimplify.c (gimplify_asm_expr): Issue error if type is addressable + and !allows_mem. + + PR middle-end/32285 + * calls.c (precompute_arguments): Also precompute CALL_EXPR arguments + if ACCUMULATE_OUTGOING_ARGS. + +2007-06-20 Kaz Kojima + + PR rtl-optimization/28011 + Backport from mainline. + * reload.c (push_reload): Set dont_share if IN appears in OUT + also when IN is a PLUS rtx. + (reg_overlap_mentioned_for_reload_p): Return true if X and IN + are same PLUS rtx. + +2007-06-19 Richard Guenther + Michael Matz + + PR tree-optimization/30252 + * tree-ssa-structalias.c (solution_set_add): Make sure to + preserve all relevant vars. + (handle_ptr_arith): Make sure to only handle positive + offsets. + (push_fields_onto_fieldstack): Create fields for empty + bases. + +2007-06-19 Jakub Jelinek + + PR tree-optimization/32353 + * tree-ssa-structalias.c (set_uids_in_ptset): Also handle RESULT_DECL. + +2007-06-17 Eric Botcazou + + * config/sparc/sparc.c (sparc_vis_init_builtins): Retrieve the + return mode from the builtin itself. + (sparc_fold_builtin): Fix cast of zero constant. + +2007-06-15 Diego Novillo + + PR 32327 + * tree-ssa-operands.c (build_ssa_operands): Initially assume + that the statement does not take any addresses. + +2007-06-13 Eric Botcazou + + * config/sparc/sparc.c (sparc_override_options): Initialize + fpu mask correctly. + +2007-06-09 Ian Lance Taylor + + PR tree-optimization/32169 + * tree-vrp.c (extract_range_from_unary_expr): For NOP_EXPR and + CONVERT_EXPR, check whether min and max both converted to an + overflow infinity representation. + +2007-06-08 Kaz Kojima + + PR target/32163 + Backport from mainline. + * config/sh/sh.md (symGOT_load): Don't schedule insns when + the symbol is generated with the stack protector. + +2007-06-06 Ian Lance Taylor + + * fold-const.c (merge_ranges): If range_successor or + range_predecessor fail, just return 0. + +2007-06-05 Ian Lance Taylor + + * tree-vrp.c (compare_values_warnv): Check TREE_NO_WARNING on a + PLUS_EXPR or MINUS_EXPR node before setting *strict_overflow_p. + (extract_range_from_assert): Set TREE_NO_WARNING when creating an + expression. + (test_for_singularity): Likewise. + +2007-06-04 Ian Lance Taylor + + * tree-vrp.c (adjust_range_with_scev): When loop is not expected + to overflow, reduce overflow infinity to regular infinity. + (vrp_var_may_overflow): New static function. + (vrp_visit_phi_node): Check vrp_var_may_overflow. + +2007-05-31 H.J. Lu + + Backport from mainline: + 2007-05-25 H.J. Lu + + * config/i386/i386.c (__builtin_ia32_vec_ext_v2df): Mark it + with MASK_SSE2. + (__builtin_ia32_vec_ext_v2di): Likewise. + (__builtin_ia32_vec_ext_v4si): Likewise. + (__builtin_ia32_vec_ext_v8hi): Likewise. + (__builtin_ia32_vec_set_v8hi): Likewise. + +2007-05-31 John David Anglin + + Backport from mainline: + 2007-05-05 Aurelien Jarno + + * config/pa/pa.md: Split tgd_load, tld_load and tie_load + into pic and non-pic versions. Mark r19 as used for + tgd_load_pic, tld_load_pic and tie_load_pic. Mark r27 as used + for tgd_load, tld_load and tie_load . + * config/pa/pa.c (legitimize_tls_address): Emit pic or non-pic + version of tgd_load, tld_load and tie_load depending on the + value of flag_pic. + +2007-05-27 Daniel Berlin + + Fix PR/30052 + Backport PTA solver from mainline + + * pointer-set.c: Copy from mainline + * pointer-set.h: Ditto. + * tree-ssa-structalias.c: Copy solver portions from mainline. + * Makefile.in (tree-ssa-structalias.o): Update dependencies + +2007-05-30 Ralf Wildenhues + + * tree-vrp.c (compare_names): Initialize sop. + +2007-05-30 Jakub Jelinek + + PR tree-optimization/31769 + * except.c (duplicate_eh_regions): Clear prev_try if + ERT_MUST_NOT_THROW region is inside of ERT_TRY region. + +2007-05-28 Andrew Pinski + + PR tree-opt/32100 + * fold-const.c (tree_expr_nonnegative_warnv_p): Don't + return true when truth_value_p is true and the type + is of signed:1. + +2007-05-27 H.J. Lu + + Backport from mainline: + 2007-05-25 Uros Bizjak + + * config/i386/sse.md (*vec_extractv2di_1_sse2): Do not calculate + "memory" attribute for "sseishft" type insn without operands[2]. + + 2007-05-25 H.J. Lu + + * config/i386/sse.md (*vec_extractv2di_1_sse2): Correct shift. + +2007-05-22 Ian Lance Taylor + + * tree-vrp.c (avoid_overflow_infinity): New static function, + broken out of set_value_range_to_value. + (set_value_range_to_value): Call avoid_overflow_infinity. + (extract_range_from_assert): Likewise. + +2007-05-23 Chen Liqin + + PR target/30987 + * config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove. + * config/score/predicate.md (const_pow2, const_npow2): remove. + * config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL undef. + PR target/30474 + * config/score/score.c (score_print_operand): makes sure that only lower + bits are used. + +2007-05-21 Uros Bizjak + + PR target/31167 + Backport from mainline. + * config/i386/i386.md (*addti3_1, *addti3_1 splitter): Use + x86_64_general_operand as operand[2] predicate. Remove "iF" + from operand constraints and use "e" constraint instead. + (*subti3_1, *subti3_1 splitter): Ditto. + (*negti2_1, *negti2_1 splitter): Use nonimmediate_operand as + operand[1] predicate. + +2007-05-21 Uros Bizjak + + PR target/30041 + Backport from mainline. + * config/i386/sse.md ("*sse3_movddup"): Use operands[0] and + operands[1] in insn constraint. Correct type attribute to sselog1. + +2007-05-20 Kaz Kojima + + PR target/31701 + Backport from mainline. + * config/sh/sh.c (output_stack_adjust): Avoid using the frame + register itself to hold the offset constant. Tell flow the use + of r4 and r5 when they are used. + +2007-05-20 Kaz Kojima + + PR target/31480 + Backport from mainline. + * config/sh/sh.md (length): Check if prev_nonnote_insn (insn) + is null. + +2007-05-20 Kaz Kojima + + PR target/31022 + Backport from mainline. + * config/sh/sh.c (sh_adjust_cost): Use the result of single_set + instead of PATTERN. + +2007-05-20 Kaz Kojima + + PR target/27405 + Backport from mainline. + * config/sh/sh.md (cmp{eq,gt,gtu}{si,di}_media): Remove. + (cmpsi{eq,gt,gtu}{si,di}_media): Rename to + cmp{eq,gt,gtu}{si,di}_media. + (*cmpne0si_media): Remove. + (*movsicc_umin): Adjust gen_cmp*_media call. + (unordered): Change the mode of unordered and operands[1] to + SImode. + (seq): Adjust gen_cmp*_media calls. Make the mode of + a temporary result of compare SImode if needed. If the mode + of operands[0] is DImode, extend the temporary result to DImode. + (slt, sle, sgt, sge, sgtu, sltu, sleu, sgue, sne): Likewise. + (sunorderd): Change the mode of match_operand and unorderd to + SImode. + (cmpeq{sf,df}_media): Remove. + (cmpsieq{sf,df}_media): Rename to cmpeq{sf,df}_media. + (cmp{gt,ge,un}{sf,df}_media): Change the mode of match_operand + and compare operation to SImode. + +2007-05-18 Joseph Myers + + * config/soft-fp/double.h, config/soft-fp/extended.h, + config/soft-fp/floatundidf.c, config/soft-fp/floatundisf.c, + config/soft-fp/floatunsidf.c, config/soft-fp/floatunsisf.c, + config/soft-fp/op-2.h, config/soft-fp/op-4.h, + config/soft-fp/op-common.h, config/soft-fp/quad.h: Update from + glibc CVS. + +2007-05-17 Ian Lance Taylor + + PR tree-optimization/31953 + * tree-vrp.c (set_value_range_to_value): Add equiv parameter. + Change all callers. + (set_value_range_to_null): Call set_value_range_to_value. + (extract_range_from_comparison): Likewise. + +2007-05-17 Eric Botcazou + + PR rtl-optimization/31691 + * combine.c (simplify_set): Build a new src pattern instead of + substituting its operands in the COMPARE case. + +2007-05-14 Mark Mitchell + + * BASE-VER: Set to 4.2.1. + * DEV-PHASE: Set to prerelease. + 2007-05-13 Release Manager * GCC 4.2.0 released. @@ -307,7 +745,8 @@ 2007-04-03 Stuart Hastings PR 31281 - * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl. + * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile + from rethrow decl. * cse.c (record_jump_equiv): Bail out on CCmode comparisons. 2007-04-03 Jakub Jelinek ==== //depot/projects/hammer/contrib/gcc/DATESTAMP#2 (text+ko) ==== @@ -1,1 +1,1 @@ -20070514 +20070719 ==== //depot/projects/hammer/contrib/gcc/Makefile.in#12 (text+ko) ==== @@ -1839,7 +1839,7 @@ tree-ssa-structalias.o: tree-ssa-structalias.c tree-ssa-structalias.h \ $(SYSTEM_H) $(CONFIG_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \ $(TM_H) coretypes.h $(CGRAPH_H) tree-pass.h $(TIMEVAR_H) \ - gt-tree-ssa-structalias.h $(PARAMS_H) + gt-tree-ssa-structalias.h $(PARAMS_H) pointer-set.h tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \ toplev.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \ ==== //depot/projects/hammer/contrib/gcc/calls.c#11 (text+ko) ==== @@ -1238,13 +1238,25 @@ /* If this is a libcall, then precompute all arguments so that we do not get extraneous instructions emitted as part of the libcall sequence. */ - if ((flags & ECF_LIBCALL_BLOCK) == 0) + + /* If we preallocated the stack space, and some arguments must be passed + on the stack, then we must precompute any parameter which contains a + function call which will store arguments on the stack. + Otherwise, evaluating the parameter may clobber previous parameters + which have already been stored into the stack. (we have code to avoid + such case by saving the outgoing stack arguments, but it results in + worse code) */ + if ((flags & ECF_LIBCALL_BLOCK) == 0 && !ACCUMULATE_OUTGOING_ARGS) return; for (i = 0; i < num_actuals; i++) { enum machine_mode mode; + if ((flags & ECF_LIBCALL_BLOCK) == 0 + && TREE_CODE (args[i].tree_value) != CALL_EXPR) + continue; + /* If this is an addressable type, we cannot pre-evaluate it. */ gcc_assert (!TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value))); ==== //depot/projects/hammer/contrib/gcc/combine.c#10 (text+ko) ==== @@ -5341,14 +5341,14 @@ } else if (GET_MODE (op0) == compare_mode && op1 == const0_rtx) { - SUBST(SET_SRC (x), op0); + SUBST (SET_SRC (x), op0); src = SET_SRC (x); } - else + /* Otherwise, update the COMPARE if needed. */ + else if (XEXP (src, 0) != op0 || XEXP (src, 1) != op1) { - /* Otherwise, update the COMPARE if needed. */ - SUBST (XEXP (src, 0), op0); - SUBST (XEXP (src, 1), op1); + SUBST (SET_SRC (x), gen_rtx_COMPARE (compare_mode, op0, op1)); + src = SET_SRC (x); } } else ==== //depot/projects/hammer/contrib/gcc/config/arm/arm.c#9 (text+ko) ==== @@ -10555,6 +10555,7 @@ if (leaf && frame_size == 0) { offsets->outgoing_args = offsets->soft_frame; + offsets->locals_base = offsets->soft_frame; return offsets; } @@ -13874,6 +13875,7 @@ amount = offsets->locals_base - offsets->saved_regs; } + gcc_assert (amount >= 0); if (amount) { if (amount < 512) ==== //depot/projects/hammer/contrib/gcc/config/arm/cirrus.md#3 (text+ko) ==== @@ -404,28 +404,6 @@ ;; Cirrus SI values have been outlawed. Look in arm.h for the comment ;; on HARD_REGNO_MODE_OK. -(define_insn "*cirrus_arm_movsi_insn" - [(set (match_operand:SI 0 "general_operand" "=r,r,r,m,*v,r,*v,T,*v") - (match_operand:SI 1 "general_operand" "rI,K,mi,r,r,*v,T,*v,*v"))] - "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0 - && (register_operand (operands[0], SImode) - || register_operand (operands[1], SImode))" - "@ - mov%?\\t%0, %1 - mvn%?\\t%0, #%B1 - ldr%?\\t%0, %1 - str%?\\t%1, %0 - cfmv64lr%?\\t%Z0, %1 - cfmvr64l%?\\t%0, %Z1 - cfldr32%?\\t%V0, %1 - cfstr32%?\\t%V1, %0 - cfsh32%?\\t%V0, %V1, #0" - [(set_attr "type" "*, *, load1,store1, *, *, load1,store1, *") - (set_attr "pool_range" "*, *, 4096, *, *, *, 1024, *, *") - (set_attr "neg_pool_range" "*, *, 4084, *, *, *, 1012, *, *") - (set_attr "cirrus" "not,not, not, not,move,normal,normal,normal,normal")] -) - (define_insn "*cirrus_movsf_hard_insn" [(set (match_operand:SF 0 "nonimmediate_operand" "=v,v,v,r,m,r,r,m") (match_operand:SF 1 "general_operand" "v,mE,r,v,v,r,mE,r"))] ==== //depot/projects/hammer/contrib/gcc/config/i386/i386.c#16 (text+ko) ==== @@ -19,7 +19,7 @@ the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.24 2007/05/19 02:26:26 kan Exp $ */ +/* $FreeBSD: src/contrib/gcc/config/i386/i386.c,v 1.25 2007/08/14 03:04:42 kan Exp $ */ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Aug 17 05:38:16 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 215A616A421; Fri, 17 Aug 2007 05:38: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 D179816A41A for ; Fri, 17 Aug 2007 05:38:15 +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 C276413C49D for ; Fri, 17 Aug 2007 05:38:15 +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 l7H5cFsW085961 for ; Fri, 17 Aug 2007 05:38:15 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7H5bbRd085941 for perforce@freebsd.org; Fri, 17 Aug 2007 05:37:37 GMT (envelope-from sam@freebsd.org) Date: Fri, 17 Aug 2007 05:37:37 GMT Message-Id: <200708170537.l7H5bbRd085941@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 125255 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: Fri, 17 Aug 2007 05:38:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=125255 Change 125255 by sam@sam_ebb on 2007/08/17 05:37:27 IFC near 125254 Affected files ... .. //depot/projects/wifi/ObsoleteFiles.inc#22 integrate .. //depot/projects/wifi/bin/date/date.1#7 integrate .. //depot/projects/wifi/cddl/lib/Makefile#4 integrate .. //depot/projects/wifi/cddl/lib/libzpool/Makefile#4 integrate .. //depot/projects/wifi/cddl/usr.bin/Makefile#4 integrate .. //depot/projects/wifi/cddl/usr.sbin/Makefile#4 integrate .. //depot/projects/wifi/contrib/bind9/CHANGES#7 integrate .. //depot/projects/wifi/contrib/bind9/COPYRIGHT#5 integrate .. //depot/projects/wifi/contrib/bind9/FAQ#7 integrate .. //depot/projects/wifi/contrib/bind9/FAQ.xml#5 integrate .. //depot/projects/wifi/contrib/bind9/FREEBSD-Upgrade#8 integrate .. //depot/projects/wifi/contrib/bind9/Makefile.in#4 integrate .. //depot/projects/wifi/contrib/bind9/README#7 integrate .. //depot/projects/wifi/contrib/bind9/acconfig.h#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/Makefile.in#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/check/Makefile.in#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/check/check-tool.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/check/check-tool.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/check/named-checkconf.8#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/check/named-checkconf.c#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/check/named-checkconf.docbook#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/check/named-checkconf.html#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/check/named-checkzone.8#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/check/named-checkzone.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/check/named-checkzone.docbook#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/check/named-checkzone.html#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/Makefile.in#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/dig.1#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/dig.c#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/dig.docbook#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/dig.html#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/dighost.c#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/host.1#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/host.c#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/host.docbook#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/host.html#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/include/dig/dig.h#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/nslookup.1#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/nslookup.c#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/nslookup.docbook#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/dig/nslookup.html#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/dnssec/Makefile.in#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/dnssec/dnssec-keygen.8#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/dnssec/dnssec-keygen.c#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/dnssec/dnssec-keygen.docbook#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/dnssec/dnssec-keygen.html#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/dnssec/dnssec-signzone.8#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/dnssec/dnssec-signzone.c#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/dnssec/dnssec-signzone.docbook#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/dnssec/dnssec-signzone.html#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/dnssec/dnssectool.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/dnssec/dnssectool.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/Makefile.in#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/builtin.c#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/client.c#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/config.c#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/control.c#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/controlconf.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/builtin.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/client.h#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/config.h#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/control.h#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/globals.h#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/interfacemgr.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/listenlist.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/log.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/logconf.h#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/lwaddr.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/lwdclient.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/lwresd.h#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/lwsearch.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/main.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/notify.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/ns_smf_globals.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/query.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/server.h#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/sortlist.h#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/tkeyconf.h#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/tsigconf.h#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/types.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/update.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/xfrout.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/include/named/zoneconf.h#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/interfacemgr.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/listenlist.c#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/log.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/logconf.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/lwaddr.c#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/lwdclient.c#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/lwderror.c#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/lwdgabn.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/lwdgnba.c#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/lwdgrbn.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/lwdnoop.c#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/lwresd.8#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/lwresd.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/lwresd.docbook#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/lwresd.html#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/lwsearch.c#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/main.c#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/named.8#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/named.conf.5#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/named.conf.docbook#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/named.conf.html#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/named.docbook#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/named.html#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/notify.c#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/query.c#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/server.c#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/sortlist.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/tkeyconf.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/tsigconf.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/unix/Makefile.in#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/unix/include/named/os.h#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/unix/os.c#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/update.c#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/xfrout.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/named/zoneconf.c#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/nsupdate/Makefile.in#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/nsupdate/nsupdate.8#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/nsupdate/nsupdate.c#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/nsupdate/nsupdate.docbook#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/nsupdate/nsupdate.html#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/Makefile.in#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/include/rndc/os.h#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/rndc-confgen.8#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/rndc-confgen.c#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/rndc-confgen.docbook#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/rndc-confgen.html#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/rndc.8#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/rndc.c#6 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/rndc.conf#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/rndc.conf.5#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/rndc.conf.docbook#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/rndc.conf.html#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/rndc.docbook#4 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/rndc.html#5 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/unix/Makefile.in#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/unix/os.c#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/util.c#3 integrate .. //depot/projects/wifi/contrib/bind9/bin/rndc/util.h#3 integrate .. //depot/projects/wifi/contrib/bind9/configure.in#6 integrate .. //depot/projects/wifi/contrib/bind9/doc/Makefile.in#4 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Bv9ARM-book.xml#6 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Bv9ARM.ch01.html#5 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Bv9ARM.ch02.html#5 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Bv9ARM.ch03.html#6 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Bv9ARM.ch04.html#6 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Bv9ARM.ch05.html#6 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Bv9ARM.ch06.html#6 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Bv9ARM.ch07.html#6 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Bv9ARM.ch08.html#6 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Bv9ARM.ch09.html#6 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Bv9ARM.ch10.html#2 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Bv9ARM.html#6 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Bv9ARM.pdf#4 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/Makefile.in#4 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/README-SGML#3 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/man.dig.html#2 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/man.dnssec-keygen.html#2 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/man.dnssec-signzone.html#2 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/man.host.html#2 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/man.named-checkconf.html#2 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/man.named-checkzone.html#2 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/man.named.html#2 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/man.rndc-confgen.html#2 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/man.rndc.conf.html#2 integrate .. //depot/projects/wifi/contrib/bind9/doc/arm/man.rndc.html#2 integrate .. //depot/projects/wifi/contrib/bind9/lib/dns/dispatch.c#4 integrate .. //depot/projects/wifi/contrib/bind9/lib/dns/include/dns/dispatch.h#3 integrate .. //depot/projects/wifi/contrib/bind9/version#7 integrate .. //depot/projects/wifi/contrib/diff/FREEBSD-Xlist#2 integrate .. //depot/projects/wifi/contrib/diff/Makefile.am#2 delete .. //depot/projects/wifi/contrib/diff/bootstrap#2 delete .. //depot/projects/wifi/contrib/diff/doc/Makefile.am#2 delete .. //depot/projects/wifi/contrib/diff/doc/diagmeet.note#2 delete .. //depot/projects/wifi/contrib/diff/exgettext#2 delete .. //depot/projects/wifi/contrib/diff/lib/Makefile.am#2 delete .. //depot/projects/wifi/contrib/diff/lib/alloca.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/alloca_.h#2 delete .. //depot/projects/wifi/contrib/diff/lib/dirname.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/fnmatch.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/fnmatch_.h#2 delete .. //depot/projects/wifi/contrib/diff/lib/fnmatch_loop.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/getopt.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/getopt1.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/getopt_int.h#2 delete .. //depot/projects/wifi/contrib/diff/lib/gettimeofday.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/imaxtostr.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/inttostr.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/malloc.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/mkstemp.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/offtostr.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/realloc.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/regex.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/regex.h#2 delete .. //depot/projects/wifi/contrib/diff/lib/setmode.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/stdbool_.h#2 delete .. //depot/projects/wifi/contrib/diff/lib/strcasecmp.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/stripslash.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/strncasecmp.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/strtol.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/strtoll.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/strtoul.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/strtoull.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/tempname.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/time_r.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/time_r.h#2 delete .. //depot/projects/wifi/contrib/diff/lib/umaxtostr.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/waitpid.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/xstrdup.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/xstrtol.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/xstrtoul.c#2 delete .. //depot/projects/wifi/contrib/diff/lib/xstrtoumax.c#2 delete .. //depot/projects/wifi/contrib/diff/man/Makefile.am#2 delete .. //depot/projects/wifi/contrib/diff/src/Makefile.am#2 delete .. //depot/projects/wifi/contrib/gcc/BASE-VER#2 integrate .. //depot/projects/wifi/contrib/gcc/ChangeLog#5 integrate .. //depot/projects/wifi/contrib/gcc/DATESTAMP#2 integrate .. //depot/projects/wifi/contrib/gcc/Makefile.in#4 integrate .. //depot/projects/wifi/contrib/gcc/calls.c#4 integrate .. //depot/projects/wifi/contrib/gcc/combine.c#5 integrate .. //depot/projects/wifi/contrib/gcc/config/arm/arm.c#5 integrate .. //depot/projects/wifi/contrib/gcc/config/arm/cirrus.md#3 integrate .. //depot/projects/wifi/contrib/gcc/config/i386/i386.c#5 integrate .. //depot/projects/wifi/contrib/gcc/config/i386/i386.h#5 integrate .. //depot/projects/wifi/contrib/gcc/config/i386/i386.md#5 integrate .. //depot/projects/wifi/contrib/gcc/config/i386/sse.md#2 integrate .. //depot/projects/wifi/contrib/gcc/config/mips/iris6.h#2 integrate .. //depot/projects/wifi/contrib/gcc/config/rs6000/predicates.md#2 integrate .. //depot/projects/wifi/contrib/gcc/config/rs6000/rs6000.c#5 integrate .. //depot/projects/wifi/contrib/gcc/config/soft-fp/double.h#2 integrate .. //depot/projects/wifi/contrib/gcc/config/soft-fp/extended.h#2 integrate .. //depot/projects/wifi/contrib/gcc/config/soft-fp/floatundidf.c#2 integrate .. //depot/projects/wifi/contrib/gcc/config/soft-fp/floatundisf.c#2 integrate .. //depot/projects/wifi/contrib/gcc/config/soft-fp/floatunsidf.c#2 integrate .. //depot/projects/wifi/contrib/gcc/config/soft-fp/floatunsisf.c#2 integrate .. //depot/projects/wifi/contrib/gcc/config/soft-fp/op-2.h#2 integrate .. //depot/projects/wifi/contrib/gcc/config/soft-fp/op-4.h#2 integrate .. //depot/projects/wifi/contrib/gcc/config/soft-fp/op-common.h#2 integrate .. //depot/projects/wifi/contrib/gcc/config/soft-fp/quad.h#2 integrate .. //depot/projects/wifi/contrib/gcc/config/sparc/sparc.c#5 integrate .. //depot/projects/wifi/contrib/gcc/cp/ChangeLog#5 integrate .. //depot/projects/wifi/contrib/gcc/cp/call.c#5 integrate .. //depot/projects/wifi/contrib/gcc/cp/class.c#5 integrate .. //depot/projects/wifi/contrib/gcc/cp/cp-tree.h#5 integrate .. //depot/projects/wifi/contrib/gcc/cp/decl.c#5 integrate .. //depot/projects/wifi/contrib/gcc/cp/decl2.c#5 integrate .. //depot/projects/wifi/contrib/gcc/cp/init.c#5 integrate .. //depot/projects/wifi/contrib/gcc/cp/parser.c#5 integrate .. //depot/projects/wifi/contrib/gcc/cp/pt.c#5 integrate .. //depot/projects/wifi/contrib/gcc/cp/semantics.c#5 integrate .. //depot/projects/wifi/contrib/gcc/cp/typeck.c#5 integrate .. //depot/projects/wifi/contrib/gcc/cp/typeck2.c#4 integrate .. //depot/projects/wifi/contrib/gcc/doc/cpp.1#3 integrate .. //depot/projects/wifi/contrib/gcc/doc/gcc.1#3 integrate .. //depot/projects/wifi/contrib/gcc/doc/gcov.1#3 integrate .. //depot/projects/wifi/contrib/gcc/dwarf2out.c#4 integrate .. //depot/projects/wifi/contrib/gcc/except.c#3 integrate .. //depot/projects/wifi/contrib/gcc/fold-const.c#5 integrate .. //depot/projects/wifi/contrib/gcc/function.c#5 integrate .. //depot/projects/wifi/contrib/gcc/gimplify.c#2 integrate .. //depot/projects/wifi/contrib/gcc/gthr-posix.c#3 integrate .. //depot/projects/wifi/contrib/gcc/gthr-posix.h#3 integrate .. //depot/projects/wifi/contrib/gcc/loop-iv.c#2 integrate .. //depot/projects/wifi/contrib/gcc/objc/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/gcc/omp-low.c#2 integrate .. //depot/projects/wifi/contrib/gcc/pointer-set.c#2 integrate .. //depot/projects/wifi/contrib/gcc/pointer-set.h#2 integrate .. //depot/projects/wifi/contrib/gcc/reload.c#4 integrate .. //depot/projects/wifi/contrib/gcc/tree-if-conv.c#2 integrate .. //depot/projects/wifi/contrib/gcc/tree-ssa-loop-niter.c#2 integrate .. //depot/projects/wifi/contrib/gcc/tree-ssa-operands.c#2 integrate .. //depot/projects/wifi/contrib/gcc/tree-ssa-structalias.c#2 integrate .. //depot/projects/wifi/contrib/gcc/tree-vrp.c#2 integrate .. //depot/projects/wifi/contrib/gcc/version.c#5 integrate .. //depot/projects/wifi/contrib/gcclibs/include/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/gcclibs/libcpp/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/gcclibs/libdecnumber/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/gcclibs/libgomp/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/gcclibs/libgomp/config/posix/lock.c#2 integrate .. //depot/projects/wifi/contrib/gcclibs/libgomp/sections.c#2 integrate .. //depot/projects/wifi/contrib/gcclibs/libiberty/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/gcclibs/libmudflap/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/gcclibs/libssp/ChangeLog#2 integrate .. //depot/projects/wifi/contrib/less/main.c#7 integrate .. //depot/projects/wifi/contrib/libobjc/ChangeLog#5 integrate .. //depot/projects/wifi/contrib/libstdc++/ChangeLog#5 integrate .. //depot/projects/wifi/contrib/libstdc++/acinclude.m4#4 integrate .. //depot/projects/wifi/contrib/libstdc++/config.h.in#4 integrate .. //depot/projects/wifi/contrib/libstdc++/configure#4 integrate .. //depot/projects/wifi/contrib/libstdc++/include/Makefile.am#4 integrate .. //depot/projects/wifi/contrib/libstdc++/include/Makefile.in#4 integrate .. //depot/projects/wifi/contrib/libstdc++/include/bits/ostream.tcc#3 integrate .. //depot/projects/wifi/contrib/libstdc++/include/bits/ostream_insert.h#2 integrate .. //depot/projects/wifi/contrib/libstdc++/include/ext/throw_allocator.h#2 integrate .. //depot/projects/wifi/contrib/libstdc++/include/std/std_fstream.h#4 integrate .. //depot/projects/wifi/contrib/libstdc++/libsupc++/exception#3 integrate .. //depot/projects/wifi/contrib/libstdc++/libsupc++/new#3 integrate .. //depot/projects/wifi/contrib/libstdc++/libsupc++/typeinfo#3 integrate .. //depot/projects/wifi/contrib/openbsm/HISTORY#4 integrate .. //depot/projects/wifi/contrib/openbsm/README#4 integrate .. //depot/projects/wifi/contrib/openbsm/VERSION#4 integrate .. //depot/projects/wifi/contrib/openbsm/bin/audit/audit.8#3 integrate .. //depot/projects/wifi/contrib/openbsm/bin/audit/audit.c#3 integrate .. //depot/projects/wifi/contrib/openbsm/bin/auditd/audit_warn.c#3 integrate .. //depot/projects/wifi/contrib/openbsm/bin/auditd/auditd.8#4 integrate .. //depot/projects/wifi/contrib/openbsm/bin/auditd/auditd.c#4 integrate .. //depot/projects/wifi/contrib/openbsm/bin/auditd/auditd.h#3 integrate .. //depot/projects/wifi/contrib/openbsm/bin/auditreduce/auditreduce.c#3 integrate .. //depot/projects/wifi/contrib/openbsm/config/config.h#4 integrate .. //depot/projects/wifi/contrib/openbsm/configure#4 integrate .. //depot/projects/wifi/contrib/openbsm/configure.ac#4 integrate .. //depot/projects/wifi/contrib/openbsm/etc/audit_event#4 integrate .. //depot/projects/wifi/contrib/openbsm/libbsm/au_control.3#4 integrate .. //depot/projects/wifi/contrib/openbsm/libbsm/au_event.3#3 integrate .. //depot/projects/wifi/contrib/openbsm/libbsm/audit_submit.3#3 integrate .. //depot/projects/wifi/contrib/openbsm/libbsm/bsm_io.c#4 integrate .. //depot/projects/wifi/contrib/openbsm/libbsm/bsm_token.c#4 integrate .. //depot/projects/wifi/contrib/opensolaris/cmd/zdb/zdb.c#3 integrate .. //depot/projects/wifi/contrib/tcpdump/print-bgp.c#3 integrate .. //depot/projects/wifi/etc/etc.arm/ttys#3 integrate .. //depot/projects/wifi/etc/mtree/BSD.usr.dist#9 integrate .. //depot/projects/wifi/etc/namedb/named.conf#6 integrate .. //depot/projects/wifi/etc/rc.d/netif#10 integrate .. //depot/projects/wifi/etc/rc.d/nscd#1 branch .. //depot/projects/wifi/gnu/lib/libgcc/Makefile#7 integrate .. //depot/projects/wifi/include/arpa/tftp.h#2 integrate .. //depot/projects/wifi/lib/libarchive/Makefile#29 integrate .. //depot/projects/wifi/lib/libarchive/archive_entry.3#7 integrate .. //depot/projects/wifi/lib/libarchive/archive_entry.c#17 integrate .. //depot/projects/wifi/lib/libarchive/archive_entry.h#10 integrate .. //depot/projects/wifi/lib/libarchive/archive_read_support_compression_program.c#2 integrate .. //depot/projects/wifi/lib/libarchive/archive_read_support_format_tar.c#21 integrate .. //depot/projects/wifi/lib/libarchive/archive_read_support_format_zip.c#10 integrate .. //depot/projects/wifi/lib/libarchive/archive_string.c#6 integrate .. //depot/projects/wifi/lib/libarchive/archive_string_sprintf.c#5 integrate .. //depot/projects/wifi/lib/libarchive/archive_write_disk.c#7 integrate .. //depot/projects/wifi/lib/libarchive/test/main.c#7 integrate .. //depot/projects/wifi/lib/libarchive/test/test_read_format_gtar_sparse.c#4 integrate .. //depot/projects/wifi/lib/libarchive/test/test_write_disk_perms.c#6 integrate .. //depot/projects/wifi/lib/libc/net/name6.c#11 integrate .. //depot/projects/wifi/lib/libc/net/sctp_sys_calls.c#10 integrate .. //depot/projects/wifi/lib/libc/stdlib/getenv.c#5 integrate .. //depot/projects/wifi/lib/libc/yp/yplib.c#6 integrate .. //depot/projects/wifi/lib/libdisk/open_disk.c#4 integrate .. //depot/projects/wifi/lib/libelf/elf_begin.3#2 integrate .. //depot/projects/wifi/lib/libelf/elf_memory.3#2 integrate .. //depot/projects/wifi/lib/libpam/modules/pam_lastlog/pam_lastlog.c#3 integrate .. //depot/projects/wifi/lib/libthr/thread/thr_private.h#11 integrate .. //depot/projects/wifi/lib/libutil/flopen.3#2 integrate .. //depot/projects/wifi/lib/libutil/flopen.c#3 integrate .. //depot/projects/wifi/lib/libutil/pidfile.c#4 integrate .. //depot/projects/wifi/lib/ncurses/config.mk#3 integrate .. //depot/projects/wifi/lib/ncurses/ncurses/Makefile#7 integrate .. //depot/projects/wifi/libexec/getty/ttys.5#5 integrate .. //depot/projects/wifi/libexec/rtld-elf/powerpc/reloc.c#5 integrate .. //depot/projects/wifi/release/Makefile#20 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/Makefile#3 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/article.sgml#4 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/artheader.sgml#5 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#24 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/hw.ent#4 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/intro.sgml#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/Makefile#4 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/Makefile.inc#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/amd64/Makefile#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/amd64/article.sgml#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/common/abstract.sgml#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/common/artheader.sgml#4 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/common/install.ent#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/common/install.sgml#10 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/common/layout.sgml#4 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/common/trouble.sgml#5 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/common/upgrade.sgml#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/i386/Makefile#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/i386/article.sgml#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/ia64/Makefile#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/ia64/article.sgml#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/pc98/Makefile#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/pc98/article.sgml#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/powerpc/Makefile#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/powerpc/article.sgml#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/sparc64/Makefile#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/sparc64/article.sgml#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/sparc64/install.sgml#2 delete .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/relnotes/article.sgml#17 integrate .. //depot/projects/wifi/release/doc/share/examples/Makefile.relnotesng#6 integrate .. //depot/projects/wifi/release/doc/share/misc/dev.archlist.txt#24 integrate .. //depot/projects/wifi/sbin/Makefile#15 integrate .. //depot/projects/wifi/sbin/atacontrol/atacontrol.c#8 integrate .. //depot/projects/wifi/sbin/fsck_ffs/main.c#5 integrate .. //depot/projects/wifi/sbin/ifconfig/ifbridge.c#6 integrate .. //depot/projects/wifi/sbin/ifconfig/ifconfig.8#27 integrate .. //depot/projects/wifi/sbin/ipfw/ipfw.8#23 integrate .. //depot/projects/wifi/sbin/iscontrol/Makefile#1 branch .. //depot/projects/wifi/sbin/iscontrol/auth_subr.c#1 branch .. //depot/projects/wifi/sbin/iscontrol/config.c#1 branch .. //depot/projects/wifi/sbin/iscontrol/fsm.c#1 branch .. //depot/projects/wifi/sbin/iscontrol/iscontrol.8#1 branch .. //depot/projects/wifi/sbin/iscontrol/iscontrol.c#1 branch .. //depot/projects/wifi/sbin/iscontrol/iscontrol.h#1 branch .. //depot/projects/wifi/sbin/iscontrol/iscsi.conf.5#1 branch .. //depot/projects/wifi/sbin/iscontrol/login.c#1 branch .. //depot/projects/wifi/sbin/iscontrol/misc.c#1 branch .. //depot/projects/wifi/sbin/iscontrol/pdu.c#1 branch .. //depot/projects/wifi/sbin/iscontrol/pdu.h#1 branch .. //depot/projects/wifi/sbin/tunefs/tunefs.8#5 integrate .. //depot/projects/wifi/share/examples/kld/syscall/module/syscall.c#2 integrate .. //depot/projects/wifi/share/man/man4/Makefile#41 integrate .. //depot/projects/wifi/share/man/man4/crypto.4#3 integrate .. //depot/projects/wifi/share/man/man4/ddb.4#6 integrate .. //depot/projects/wifi/share/man/man4/enc.4#4 integrate .. //depot/projects/wifi/share/man/man4/fast_ipsec.4#5 delete .. //depot/projects/wifi/share/man/man4/ipmi.4#3 integrate .. //depot/projects/wifi/share/man/man4/ipsec.4#7 integrate .. //depot/projects/wifi/share/man/man4/iscsi_initiator.4#1 branch .. //depot/projects/wifi/share/man/man4/lagg.4#2 integrate .. //depot/projects/wifi/share/man/man4/man4.i386/padlock.4#4 integrate .. //depot/projects/wifi/share/man/man4/mfi.4#3 integrate .. //depot/projects/wifi/share/man/man4/ng_fec.4#4 integrate .. //depot/projects/wifi/share/man/man4/ng_ppp.4#5 integrate .. //depot/projects/wifi/share/man/man4/udav.4#7 integrate .. //depot/projects/wifi/share/man/man4/usb.4#5 integrate .. //depot/projects/wifi/share/man/man4/vpo.4#4 integrate .. //depot/projects/wifi/share/man/man5/Makefile#11 integrate .. //depot/projects/wifi/share/man/man5/boot.config.5#1 branch .. //depot/projects/wifi/share/man/man5/src.conf.5#7 integrate .. //depot/projects/wifi/share/man/man7/ports.7#10 integrate .. //depot/projects/wifi/share/man/man8/rc.8#6 integrate .. //depot/projects/wifi/share/man/man9/contigmalloc.9#4 integrate .. //depot/projects/wifi/share/man/man9/locking.9#4 integrate .. //depot/projects/wifi/share/man/man9/module.9#4 integrate .. //depot/projects/wifi/share/man/man9/rtentry.9#4 integrate .. //depot/projects/wifi/share/man/man9/sysctl_ctx_init.9#3 integrate .. //depot/projects/wifi/share/misc/bsd-family-tree#18 integrate .. //depot/projects/wifi/share/misc/committers-doc.dot#2 integrate .. //depot/projects/wifi/share/mk/sys.mk#9 integrate .. //depot/projects/wifi/share/mk/version_gen.awk#3 integrate .. //depot/projects/wifi/sys/amd64/amd64/cpu_switch.S#7 integrate .. //depot/projects/wifi/sys/amd64/amd64/local_apic.c#16 integrate .. //depot/projects/wifi/sys/amd64/amd64/mp_machdep.c#22 integrate .. //depot/projects/wifi/sys/amd64/amd64/trap.c#17 integrate .. //depot/projects/wifi/sys/amd64/conf/NOTES#24 integrate .. //depot/projects/wifi/sys/amd64/include/specialreg.h#7 integrate .. //depot/projects/wifi/sys/amd64/isa/clock.c#14 integrate .. //depot/projects/wifi/sys/arm/arm/busdma_machdep.c#21 integrate .. //depot/projects/wifi/sys/arm/arm/cpufunc.c#10 integrate .. //depot/projects/wifi/sys/arm/arm/cpufunc_asm_xscale_c3.S#1 branch .. //depot/projects/wifi/sys/arm/arm/elf_trampoline.c#6 integrate .. //depot/projects/wifi/sys/arm/arm/genassym.c#8 integrate .. //depot/projects/wifi/sys/arm/arm/identcpu.c#8 integrate .. //depot/projects/wifi/sys/arm/arm/intr.c#15 integrate .. //depot/projects/wifi/sys/arm/arm/pmap.c#23 integrate .. //depot/projects/wifi/sys/arm/arm/swtch.S#13 integrate .. //depot/projects/wifi/sys/arm/arm/trap.c#19 integrate .. //depot/projects/wifi/sys/arm/arm/vm_machdep.c#18 integrate .. //depot/projects/wifi/sys/arm/at91/at91rm92reg.h#3 integrate .. //depot/projects/wifi/sys/arm/at91/kb920x_machdep.c#5 integrate .. //depot/projects/wifi/sys/arm/at91/ohci_atmelarm.c#3 integrate .. //depot/projects/wifi/sys/arm/conf/CRB#1 branch .. //depot/projects/wifi/sys/arm/conf/KB920X#4 integrate .. //depot/projects/wifi/sys/arm/include/armreg.h#5 integrate .. //depot/projects/wifi/sys/arm/include/cpufunc.h#9 integrate .. //depot/projects/wifi/sys/arm/include/pmap.h#15 integrate .. //depot/projects/wifi/sys/arm/include/pte.h#4 integrate .. //depot/projects/wifi/sys/arm/xscale/i80321/i80321_pci.c#10 integrate .. //depot/projects/wifi/sys/arm/xscale/i80321/i80321_timer.c#10 integrate .. //depot/projects/wifi/sys/arm/xscale/i80321/i80321_wdog.c#4 integrate .. //depot/projects/wifi/sys/arm/xscale/i80321/i80321var.h#5 integrate .. //depot/projects/wifi/sys/arm/xscale/i80321/obio.c#5 integrate .. //depot/projects/wifi/sys/arm/xscale/i8134x/crb_machdep.c#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/files.crb#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/files.i81342#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/i81342.c#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/i81342_mcu.c#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/i81342_pci.c#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/i81342_space.c#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/i81342reg.h#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/i81342var.h#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/obio.c#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/obio_space.c#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/obiovar.h#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/std.crb#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/std.i81342#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/uart_bus_i81342.c#1 branch .. //depot/projects/wifi/sys/arm/xscale/i8134x/uart_cpu_i81342.c#1 branch .. //depot/projects/wifi/sys/boot/arm/at91/libat91/Makefile#5 integrate .. //depot/projects/wifi/sys/bsm/audit.h#6 integrate .. //depot/projects/wifi/sys/bsm/audit_internal.h#5 integrate .. //depot/projects/wifi/sys/bsm/audit_kevents.h#7 integrate .. //depot/projects/wifi/sys/bsm/audit_record.h#5 integrate .. //depot/projects/wifi/sys/cam/scsi/scsi_cd.c#10 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_proto.h#13 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_syscall.h#13 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_syscalls.c#13 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_sysent.c#13 integrate .. //depot/projects/wifi/sys/compat/freebsd32/syscalls.master#14 integrate .. //depot/projects/wifi/sys/compat/linux/linux_socket.c#12 integrate .. //depot/projects/wifi/sys/compat/ndis/subr_ntoskrnl.c#23 integrate .. //depot/projects/wifi/sys/conf/Makefile.arm#14 integrate .. //depot/projects/wifi/sys/conf/NOTES#47 integrate .. //depot/projects/wifi/sys/conf/files#60 integrate .. //depot/projects/wifi/sys/conf/files.amd64#26 integrate .. //depot/projects/wifi/sys/conf/files.i386#30 integrate .. //depot/projects/wifi/sys/conf/kern.pre.mk#19 integrate .. //depot/projects/wifi/sys/conf/options#40 integrate .. //depot/projects/wifi/sys/conf/options.ia64#3 integrate .. //depot/projects/wifi/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#7 integrate .. //depot/projects/wifi/sys/contrib/pf/net/if_pfsync.c#17 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_hpet.c#7 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi_timer.c#7 integrate .. //depot/projects/wifi/sys/dev/adlink/adlink.c#6 integrate .. //depot/projects/wifi/sys/dev/aic7xxx/aic7xxx.c#7 integrate .. //depot/projects/wifi/sys/dev/aic7xxx/aic_osm_lib.c#4 integrate .. //depot/projects/wifi/sys/dev/an/if_an.c#17 integrate .. //depot/projects/wifi/sys/dev/arcmsr/arcmsr.c#13 integrate .. //depot/projects/wifi/sys/dev/ata/ata-raid.c#19 integrate .. //depot/projects/wifi/sys/dev/ath/ath_rate/amrr/amrr.c#20 integrate .. //depot/projects/wifi/sys/dev/ath/ath_rate/onoe/onoe.c#21 integrate .. //depot/projects/wifi/sys/dev/ath/if_ath.c#150 integrate .. //depot/projects/wifi/sys/dev/bce/if_bce.c#10 integrate .. //depot/projects/wifi/sys/dev/bce/if_bcefw.h#4 integrate .. //depot/projects/wifi/sys/dev/bce/if_bcereg.h#8 integrate .. //depot/projects/wifi/sys/dev/ce/if_ce.c#7 integrate .. //depot/projects/wifi/sys/dev/coretemp/coretemp.c#1 branch .. //depot/projects/wifi/sys/dev/cp/if_cp.c#15 integrate .. //depot/projects/wifi/sys/dev/ctau/if_ct.c#16 integrate .. //depot/projects/wifi/sys/dev/cx/if_cx.c#16 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_common.h#4 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_ctl_defs.h#2 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_mc5.c#4 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_t3_cpl.h#3 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_t3_hw.c#4 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_vsc7323.c#2 integrate .. //depot/projects/wifi/sys/dev/cxgb/common/cxgb_xgmac.c#4 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_adapter.h#7 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_ioctl.h#3 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_main.c#10 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_offload.c#4 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_offload.h#3 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_osdep.h#4 integrate .. //depot/projects/wifi/sys/dev/cxgb/cxgb_sge.c#10 integrate .. //depot/projects/wifi/sys/dev/cxgb/sys/mvec.h#4 integrate .. //depot/projects/wifi/sys/dev/cxgb/t3b_protocol_sram-1.1.0.bin.gz.uu#1 branch .. //depot/projects/wifi/sys/dev/cxgb/t3b_tp_eeprom-1.1.0.bin.gz.uu#1 branch .. //depot/projects/wifi/sys/dev/cxgb/t3fw-4.1.0.bin.gz.uu#2 delete .. //depot/projects/wifi/sys/dev/cxgb/t3fw-4.5.0.bin.gz.uu#1 branch .. //depot/projects/wifi/sys/dev/dc/if_dc.c#7 integrate .. //depot/projects/wifi/sys/dev/dc/if_dcreg.h#6 integrate .. //depot/projects/wifi/sys/dev/em/if_em.c#27 integrate .. //depot/projects/wifi/sys/dev/firewire/firewire.c#9 integrate .. //depot/projects/wifi/sys/dev/firewire/firewirereg.h#8 integrate .. //depot/projects/wifi/sys/dev/ichwd/ichwd.c#6 integrate .. //depot/projects/wifi/sys/dev/ichwd/ichwd.h#4 integrate .. //depot/projects/wifi/sys/dev/if_ndis/if_ndis.c#32 integrate .. //depot/projects/wifi/sys/dev/ipmi/ipmi_isa.c#2 integrate .. //depot/projects/wifi/sys/dev/iscsi/initiator/isc_cam.c#1 branch .. //depot/projects/wifi/sys/dev/iscsi/initiator/isc_sm.c#1 branch .. //depot/projects/wifi/sys/dev/iscsi/initiator/isc_soc.c#1 branch .. //depot/projects/wifi/sys/dev/iscsi/initiator/isc_subr.c#1 branch .. //depot/projects/wifi/sys/dev/iscsi/initiator/iscsi.c#1 branch .. //depot/projects/wifi/sys/dev/iscsi/initiator/iscsi.h#1 branch .. //depot/projects/wifi/sys/dev/iscsi/initiator/iscsi_subr.c#1 branch .. //depot/projects/wifi/sys/dev/iscsi/initiator/iscsivar.h#1 branch .. //depot/projects/wifi/sys/dev/mfi/mfi.c#8 integrate .. //depot/projects/wifi/sys/dev/mfi/mfi_disk.c#4 integrate .. //depot/projects/wifi/sys/dev/mfi/mfi_pci.c#5 integrate .. //depot/projects/wifi/sys/dev/mfi/mfireg.h#4 integrate .. //depot/projects/wifi/sys/dev/mfi/mfivar.h#6 integrate .. //depot/projects/wifi/sys/dev/mpt/mpt.c#11 integrate .. //depot/projects/wifi/sys/dev/mpt/mpt.h#14 integrate .. //depot/projects/wifi/sys/dev/mpt/mpt_cam.c#15 integrate .. //depot/projects/wifi/sys/dev/msk/if_msk.c#8 integrate .. //depot/projects/wifi/sys/dev/mxge/eth_z8e.dat.gz.uu#7 delete .. //depot/projects/wifi/sys/dev/mxge/eth_z8e.h#1 branch .. //depot/projects/wifi/sys/dev/mxge/ethp_z8e.dat.gz.uu#7 delete .. //depot/projects/wifi/sys/dev/mxge/ethp_z8e.h#1 branch .. //depot/projects/wifi/sys/dev/mxge/if_mxge.c#16 integrate .. //depot/projects/wifi/sys/dev/mxge/mxge_eth_z8e.c#1 branch .. //depot/projects/wifi/sys/dev/mxge/mxge_ethp_z8e.c#1 branch .. //depot/projects/wifi/sys/dev/nfe/if_nfe.c#5 integrate .. //depot/projects/wifi/sys/dev/nfe/if_nfevar.h#4 integrate .. //depot/projects/wifi/sys/dev/nmdm/nmdm.c#9 integrate .. //depot/projects/wifi/sys/dev/pci/pci.c#30 integrate .. //depot/projects/wifi/sys/dev/ral/rt2560.c#24 integrate .. //depot/projects/wifi/sys/dev/ral/rt2661.c#16 integrate .. //depot/projects/wifi/sys/dev/re/if_re.c#23 integrate .. //depot/projects/wifi/sys/dev/streams/streams.c#7 integrate .. //depot/projects/wifi/sys/dev/sym/sym_hipd.c#14 integrate .. //depot/projects/wifi/sys/dev/usb/ehci.c#17 integrate .. //depot/projects/wifi/sys/dev/usb/if_axe.c#24 integrate .. //depot/projects/wifi/sys/dev/usb/if_axereg.h#12 integrate .. //depot/projects/wifi/sys/dev/usb/if_udav.c#18 integrate .. //depot/projects/wifi/sys/dev/usb/if_ural.c#33 integrate .. //depot/projects/wifi/sys/dev/usb/ufoma.c#8 integrate .. //depot/projects/wifi/sys/dev/usb/ukbd.c#14 integrate .. //depot/projects/wifi/sys/dev/usb/umodem.c#12 integrate .. //depot/projects/wifi/sys/dev/usb/ums.c#16 integrate .. //depot/projects/wifi/sys/dev/usb/usb_quirks.c#10 integrate .. //depot/projects/wifi/sys/dev/usb/usbdevs#32 integrate .. //depot/projects/wifi/sys/dev/wi/if_wi.c#41 integrate .. //depot/projects/wifi/sys/fs/coda/coda_vfsops.c#2 integrate .. //depot/projects/wifi/sys/fs/coda/coda_vnops.c#2 integrate .. //depot/projects/wifi/sys/fs/devfs/devfs_vnops.c#37 integrate .. //depot/projects/wifi/sys/fs/fifofs/fifo_vnops.c#17 integrate .. //depot/projects/wifi/sys/fs/msdosfs/denode.h#8 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_conv.c#9 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_denode.c#13 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_fat.c#6 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_fileno.c#3 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_iconv.c#2 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_lookup.c#6 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_vfsops.c#21 integrate .. //depot/projects/wifi/sys/fs/msdosfs/msdosfs_vnops.c#15 integrate .. //depot/projects/wifi/sys/fs/tmpfs/tmpfs.h#5 integrate .. //depot/projects/wifi/sys/fs/tmpfs/tmpfs_subr.c#6 integrate .. //depot/projects/wifi/sys/fs/tmpfs/tmpfs_vfsops.c#5 integrate .. //depot/projects/wifi/sys/fs/tmpfs/tmpfs_vnops.c#5 integrate .. //depot/projects/wifi/sys/gnu/fs/ext2fs/ext2_vfsops.c#10 integrate .. //depot/projects/wifi/sys/i386/conf/NOTES#29 integrate .. //depot/projects/wifi/sys/i386/i386/genassym.c#7 integrate .. //depot/projects/wifi/sys/i386/i386/local_apic.c#19 integrate .. //depot/projects/wifi/sys/i386/i386/machdep.c#26 integrate .. //depot/projects/wifi/sys/i386/i386/mp_machdep.c#26 integrate .. //depot/projects/wifi/sys/i386/i386/swtch.s#7 integrate .. //depot/projects/wifi/sys/i386/i386/trap.c#18 integrate .. //depot/projects/wifi/sys/i386/include/cpufunc.h#4 integrate .. //depot/projects/wifi/sys/i386/include/specialreg.h#8 integrate .. //depot/projects/wifi/sys/i386/isa/clock.c#14 integrate .. //depot/projects/wifi/sys/i386/linux/linux_machdep.c#14 integrate .. //depot/projects/wifi/sys/ia64/ia64/clock.c#6 integrate .. //depot/projects/wifi/sys/ia64/ia64/db_machdep.c#4 integrate .. //depot/projects/wifi/sys/ia64/ia64/exception.S#5 integrate .. //depot/projects/wifi/sys/ia64/ia64/interrupt.c#13 integrate .. //depot/projects/wifi/sys/ia64/ia64/machdep.c#20 integrate .. //depot/projects/wifi/sys/ia64/ia64/mp_machdep.c#9 integrate .. //depot/projects/wifi/sys/ia64/ia64/nexus.c#9 integrate .. //depot/projects/wifi/sys/ia64/ia64/pmap.c#19 integrate .. //depot/projects/wifi/sys/ia64/ia64/sapic.c#2 integrate .. //depot/projects/wifi/sys/ia64/ia64/syscall.S#3 integrate .. //depot/projects/wifi/sys/ia64/include/atomic.h#4 integrate .. //depot/projects/wifi/sys/ia64/include/ia64_cpu.h#4 integrate .. //depot/projects/wifi/sys/ia64/include/intr.h#3 integrate .. //depot/projects/wifi/sys/ia64/include/md_var.h#6 integrate .. //depot/projects/wifi/sys/ia64/include/sapicvar.h#2 integrate .. //depot/projects/wifi/sys/kern/init_sysent.c#18 integrate .. //depot/projects/wifi/sys/kern/kern_descrip.c#29 integrate .. //depot/projects/wifi/sys/kern/kern_kse.c#18 integrate .. //depot/projects/wifi/sys/kern/kern_lockf.c#8 integrate .. //depot/projects/wifi/sys/kern/kern_mutex.c#17 integrate .. //depot/projects/wifi/sys/kern/kern_poll.c#9 integrate .. //depot/projects/wifi/sys/kern/kern_resource.c#19 integrate .. //depot/projects/wifi/sys/kern/kern_rwlock.c#10 integrate .. //depot/projects/wifi/sys/kern/kern_sig.c#24 integrate .. //depot/projects/wifi/sys/kern/kern_switch.c#20 integrate .. //depot/projects/wifi/sys/kern/kern_thr.c#13 integrate .. //depot/projects/wifi/sys/kern/kern_thread.c#23 integrate .. //depot/projects/wifi/sys/kern/sched_4bsd.c#17 integrate .. //depot/projects/wifi/sys/kern/sched_ule.c#28 integrate .. //depot/projects/wifi/sys/kern/subr_bus.c#23 integrate .. //depot/projects/wifi/sys/kern/subr_clock.c#5 integrate .. //depot/projects/wifi/sys/kern/sys_socket.c#10 integrate .. //depot/projects/wifi/sys/kern/syscalls.c#18 integrate .. //depot/projects/wifi/sys/kern/syscalls.master#19 integrate .. //depot/projects/wifi/sys/kern/systrace_args.c#3 integrate .. //depot/projects/wifi/sys/kern/tty.c#17 integrate .. //depot/projects/wifi/sys/kern/uipc_domain.c#10 integrate .. //depot/projects/wifi/sys/kern/uipc_syscalls.c#26 integrate .. //depot/projects/wifi/sys/kern/uipc_usrreq.c#21 integrate .. //depot/projects/wifi/sys/kern/vfs_mount.c#34 integrate .. //depot/projects/wifi/sys/kern/vfs_subr.c#43 integrate .. //depot/projects/wifi/sys/kern/vfs_vnops.c#23 integrate .. //depot/projects/wifi/sys/modules/Makefile#43 integrate .. //depot/projects/wifi/sys/modules/coretemp/Makefile#1 branch .. //depot/projects/wifi/sys/modules/cxgb/Makefile#5 integrate .. //depot/projects/wifi/sys/modules/iscsi/Makefile#1 branch .. //depot/projects/wifi/sys/modules/iscsi/initiator/Makefile#1 branch .. //depot/projects/wifi/sys/modules/mxge/mxge_eth_z8e/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/mxge/mxge_ethp_z8e/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/netgraph/bluetooth/Makefile#4 integrate .. //depot/projects/wifi/sys/net/bpf.c#25 integrate .. //depot/projects/wifi/sys/net/bpfdesc.h#9 integrate .. //depot/projects/wifi/sys/net/bridgestp.c#13 integrate .. //depot/projects/wifi/sys/net/bridgestp.h#4 integrate .. //depot/projects/wifi/sys/net/if.c#29 integrate .. //depot/projects/wifi/sys/net/if_bridge.c#16 integrate .. //depot/projects/wifi/sys/net/if_bridgevar.h#8 integrate .. //depot/projects/wifi/sys/net/if_ethersubr.c#25 integrate .. //depot/projects/wifi/sys/net/if_lagg.c#7 integrate .. //depot/projects/wifi/sys/net/if_lagg.h#7 integrate .. //depot/projects/wifi/sys/net/netisr.c#4 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_scan_sta.c#25 integrate .. //depot/projects/wifi/sys/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/wifi/sys/netgraph/bluetooth/drivers/h4/ng_h4.c#7 integrate .. //depot/projects/wifi/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#3 integrate .. //depot/projects/wifi/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h#3 integrate .. //depot/projects/wifi/sys/netgraph/netflow/netflow.c#14 integrate .. //depot/projects/wifi/sys/netgraph/netgraph.h#17 integrate .. //depot/projects/wifi/sys/netgraph/ng_bpf.c#4 integrate .. //depot/projects/wifi/sys/netgraph/ng_eiface.c#13 integrate .. //depot/projects/wifi/sys/netgraph/ng_ppp.c#11 integrate .. //depot/projects/wifi/sys/netgraph/ng_ppp.h#5 integrate .. //depot/projects/wifi/sys/netinet/icmp_var.h#3 integrate .. //depot/projects/wifi/sys/netinet/in_mcast.c#3 integrate .. //depot/projects/wifi/sys/netinet/in_pcb.h#12 integrate .. //depot/projects/wifi/sys/netinet/ip_carp.c#18 integrate .. //depot/projects/wifi/sys/netinet/ip_divert.c#15 integrate .. //depot/projects/wifi/sys/netinet/ip_dummynet.c#15 integrate .. //depot/projects/wifi/sys/netinet/ip_fw2.c#30 integrate .. //depot/projects/wifi/sys/netinet/ip_icmp.c#14 integrate .. //depot/projects/wifi/sys/netinet/ip_input.c#21 integrate .. //depot/projects/wifi/sys/netinet/ip_ipsec.c#5 integrate .. //depot/projects/wifi/sys/netinet/ip_ipsec.h#2 integrate .. //depot/projects/wifi/sys/netinet/ip_mroute.c#12 integrate .. //depot/projects/wifi/sys/netinet/sctp.h#12 integrate .. //depot/projects/wifi/sys/netinet/sctp_asconf.c#12 integrate .. //depot/projects/wifi/sys/netinet/sctp_asconf.h#6 integrate .. //depot/projects/wifi/sys/netinet/sctp_cc_functions.c#2 integrate .. //depot/projects/wifi/sys/netinet/sctp_constants.h#16 integrate .. //depot/projects/wifi/sys/netinet/sctp_indata.c#18 integrate .. //depot/projects/wifi/sys/netinet/sctp_input.c#20 integrate .. //depot/projects/wifi/sys/netinet/sctp_os_bsd.h#15 integrate .. //depot/projects/wifi/sys/netinet/sctp_output.c#18 integrate .. //depot/projects/wifi/sys/netinet/sctp_pcb.c#21 integrate .. //depot/projects/wifi/sys/netinet/sctp_pcb.h#12 integrate .. //depot/projects/wifi/sys/netinet/sctp_peeloff.c#10 integrate .. //depot/projects/wifi/sys/netinet/sctp_structs.h#12 integrate .. //depot/projects/wifi/sys/netinet/sctp_timer.c#14 integrate .. //depot/projects/wifi/sys/netinet/sctp_uio.h#13 integrate .. //depot/projects/wifi/sys/netinet/sctp_usrreq.c#18 integrate .. //depot/projects/wifi/sys/netinet/sctp_var.h#9 integrate .. //depot/projects/wifi/sys/netinet/sctputil.c#20 integrate .. //depot/projects/wifi/sys/netinet/sctputil.h#13 integrate .. //depot/projects/wifi/sys/netinet/tcp_fsm.h#5 integrate .. //depot/projects/wifi/sys/netinet/tcp_input.c#31 integrate .. //depot/projects/wifi/sys/netinet/tcp_subr.c#35 integrate .. //depot/projects/wifi/sys/netinet/tcp_syncache.c#22 integrate .. //depot/projects/wifi/sys/netinet/tcp_syncache.h#1 branch .. //depot/projects/wifi/sys/netinet/tcp_timer.h#8 integrate .. //depot/projects/wifi/sys/netinet/tcp_usrreq.c#28 integrate .. //depot/projects/wifi/sys/netinet/tcp_var.h#23 integrate .. //depot/projects/wifi/sys/netinet6/in6.h#12 integrate .. //depot/projects/wifi/sys/netinet6/ip6_ipsec.c#3 integrate .. //depot/projects/wifi/sys/netinet6/ip6_ipsec.h#2 integrate .. //depot/projects/wifi/sys/netinet6/sctp6_usrreq.c#17 integrate .. //depot/projects/wifi/sys/netinet6/udp6_output.c#10 delete .. //depot/projects/wifi/sys/netinet6/udp6_usrreq.c#12 integrate .. //depot/projects/wifi/sys/netinet6/udp6_var.h#4 integrate .. //depot/projects/wifi/sys/netipsec/ipsec_input.c#6 integrate .. //depot/projects/wifi/sys/netipsec/ipsec_output.c#6 integrate .. //depot/projects/wifi/sys/netipsec/xform_ah.c#5 integrate .. //depot/projects/wifi/sys/netipsec/xform_esp.c#5 integrate .. //depot/projects/wifi/sys/netipsec/xform_ipcomp.c#4 integrate .. //depot/projects/wifi/sys/netipsec/xform_ipip.c#5 integrate .. //depot/projects/wifi/sys/netipx/spx_debug.c#5 integrate .. //depot/projects/wifi/sys/netipx/spx_debug.h#5 integrate .. //depot/projects/wifi/sys/nfsclient/bootp_subr.c#8 integrate .. //depot/projects/wifi/sys/nfsclient/krpc_subr.c#4 integrate .. //depot/projects/wifi/sys/nfsclient/nfs_socket.c#21 integrate .. //depot/projects/wifi/sys/nfsclient/nfs_vfsops.c#19 integrate .. //depot/projects/wifi/sys/nfsserver/nfs_srvsock.c#10 integrate .. //depot/projects/wifi/sys/nfsserver/nfs_srvsubs.c#12 integrate .. //depot/projects/wifi/sys/nfsserver/nfs_syscalls.c#11 integrate .. //depot/projects/wifi/sys/pc98/cbus/clock.c#8 integrate .. //depot/projects/wifi/sys/pci/if_rl.c#15 integrate .. //depot/projects/wifi/sys/pci/if_rlreg.h#13 integrate .. //depot/projects/wifi/sys/pci/if_xl.c#18 integrate .. //depot/projects/wifi/sys/pci/viapm.c#9 integrate .. //depot/projects/wifi/sys/powerpc/include/interruptvar.h#3 delete .. //depot/projects/wifi/sys/powerpc/include/intr_machdep.h#5 integrate .. //depot/projects/wifi/sys/powerpc/include/md_var.h#4 integrate .. //depot/projects/wifi/sys/powerpc/include/openpicvar.h#4 integrate .. //depot/projects/wifi/sys/powerpc/include/trap.h#3 integrate .. //depot/projects/wifi/sys/powerpc/powermac/hrowpic.c#5 integrate .. //depot/projects/wifi/sys/powerpc/powermac/hrowpicvar.h#3 integrate .. //depot/projects/wifi/sys/powerpc/powermac/openpic_macio.c#3 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/autoconf.c#4 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/interrupt.c#4 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/intr_machdep.c#6 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/nexus.c#5 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/openpic.c#5 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/pic_if.m#4 integrate .. //depot/projects/wifi/sys/powerpc/powerpc/trap.c#13 integrate .. //depot/projects/wifi/sys/powerpc/psim/openpic_iobus.c#3 integrate .. //depot/projects/wifi/sys/rpc/rpcclnt.c#8 integrate .. //depot/projects/wifi/sys/security/mac/mac_syscalls.c#3 integrate .. //depot/projects/wifi/sys/security/mac_mls/mac_mls.c#12 integrate .. //depot/projects/wifi/sys/sparc64/include/iommureg.h#4 integrate .. //depot/projects/wifi/sys/sparc64/include/iommuvar.h#3 integrate .. //depot/projects/wifi/sys/sparc64/pci/psycho.c#12 integrate .. //depot/projects/wifi/sys/sparc64/pci/psychoreg.h#6 integrate .. //depot/projects/wifi/sys/sparc64/sbus/sbus.c#13 integrate .. //depot/projects/wifi/sys/sparc64/sbus/sbusreg.h#3 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/eeprom.c#8 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/iommu.c#6 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/pmap.c#18 integrate .. //depot/projects/wifi/sys/sparc64/sparc64/rtc.c#7 integrate .. //depot/projects/wifi/sys/sys/ata.h#11 integrate .. //depot/projects/wifi/sys/sys/kernel.h#13 integrate .. //depot/projects/wifi/sys/sys/mutex.h#16 integrate .. //depot/projects/wifi/sys/sys/proc.h#34 integrate .. //depot/projects/wifi/sys/sys/rwlock.h#8 integrate .. //depot/projects/wifi/sys/sys/syscall.h#17 integrate .. //depot/projects/wifi/sys/sys/syscall.mk#17 integrate .. //depot/projects/wifi/sys/sys/sysproto.h#17 integrate .. //depot/projects/wifi/sys/sys/thr.h#7 integrate .. //depot/projects/wifi/sys/sys/vmmeter.h#6 integrate .. //depot/projects/wifi/sys/vm/device_pager.c#5 integrate .. //depot/projects/wifi/sys/vm/phys_pager.c#6 integrate .. //depot/projects/wifi/sys/vm/swap_pager.c#22 integrate .. //depot/projects/wifi/sys/vm/vm_fault.c#22 integrate .. //depot/projects/wifi/sys/vm/vm_meter.c#14 integrate .. //depot/projects/wifi/sys/vm/vm_page.c#25 integrate .. //depot/projects/wifi/sys/vm/vm_pager.c#10 integrate .. //depot/projects/wifi/sys/vm/vnode_pager.c#27 integrate .. //depot/projects/wifi/tools/build/options/WITHOUT_TOOLCHAIN#2 integrate .. //depot/projects/wifi/tools/regression/environ/envctl.c#2 integrate .. //depot/projects/wifi/tools/regression/environ/envtest.t#2 integrate .. //depot/projects/wifi/tools/regression/environ/timings.c#2 integrate .. //depot/projects/wifi/tools/regression/fstest/fstest.c#2 integrate .. //depot/projects/wifi/tools/regression/fstest/tests/open/16.t#2 integrate .. //depot/projects/wifi/tools/regression/fstest/tests/open/18.t#2 integrate .. //depot/projects/wifi/tools/regression/lib/libutil/Makefile#2 integrate .. //depot/projects/wifi/tools/regression/lib/libutil/test-flopen.c#1 branch .. //depot/projects/wifi/tools/regression/lib/libutil/test-flopen.t#1 branch .. //depot/projects/wifi/tools/regression/tmpfs/h_tools.c#2 integrate .. //depot/projects/wifi/tools/regression/tmpfs/t_mount#2 integrate .. //depot/projects/wifi/tools/regression/tmpfs/t_rename#2 integrate .. //depot/projects/wifi/tools/tools/net80211/Makefile#3 integrate .. //depot/projects/wifi/tools/tools/net80211/README#2 integrate .. //depot/projects/wifi/tools/tools/net80211/wlandebug/Makefile#3 delete .. //depot/projects/wifi/tools/tools/net80211/wlandebug/wlandebug.8#2 delete .. //depot/projects/wifi/tools/tools/net80211/wlandebug/wlandebug.c#5 delete .. //depot/projects/wifi/usr.bin/calendar/calendars/calendar.holiday#6 integrate .. //depot/projects/wifi/usr.bin/locate/locate/locate.rc#3 integrate .. //depot/projects/wifi/usr.bin/netstat/atalk.c#3 integrate .. //depot/projects/wifi/usr.bin/netstat/bpf.c#6 integrate .. //depot/projects/wifi/usr.bin/netstat/if.c#9 integrate .. //depot/projects/wifi/usr.bin/netstat/inet.c#11 integrate .. //depot/projects/wifi/usr.bin/netstat/inet6.c#4 integrate .. //depot/projects/wifi/usr.bin/netstat/ipsec.c#6 integrate .. //depot/projects/wifi/usr.bin/netstat/ipx.c#5 integrate .. //depot/projects/wifi/usr.bin/netstat/main.c#13 integrate .. //depot/projects/wifi/usr.bin/netstat/mbuf.c#7 integrate .. //depot/projects/wifi/usr.bin/netstat/mcast.c#5 integrate .. //depot/projects/wifi/usr.bin/netstat/mroute.c#5 integrate .. //depot/projects/wifi/usr.bin/netstat/mroute6.c#5 integrate .. //depot/projects/wifi/usr.bin/netstat/netgraph.c#3 integrate .. //depot/projects/wifi/usr.bin/netstat/netstat.h#11 integrate .. //depot/projects/wifi/usr.bin/netstat/pfkey.c#5 integrate .. //depot/projects/wifi/usr.bin/netstat/route.c#6 integrate .. //depot/projects/wifi/usr.bin/netstat/sctp.c#4 integrate .. //depot/projects/wifi/usr.bin/netstat/unix.c#3 integrate .. //depot/projects/wifi/usr.bin/su/su.1#5 integrate .. //depot/projects/wifi/usr.bin/tar/Makefile#13 integrate .. //depot/projects/wifi/usr.bin/tar/bsdtar.c#12 integrate .. //depot/projects/wifi/usr.bin/tar/getdate.y#7 integrate .. //depot/projects/wifi/usr.bin/tar/read.c#12 integrate .. //depot/projects/wifi/usr.bin/truss/i386-fbsd.c#6 integrate .. //depot/projects/wifi/usr.bin/truss/main.c#7 integrate .. //depot/projects/wifi/usr.bin/truss/powerpc-fbsd.c#4 integrate .. //depot/projects/wifi/usr.bin/truss/syscalls.c#9 integrate .. //depot/projects/wifi/usr.bin/vmstat/vmstat.c#11 integrate .. //depot/projects/wifi/usr.sbin/Makefile#25 integrate .. //depot/projects/wifi/usr.sbin/acpi/acpidump/acpi_user.c#3 integrate .. //depot/projects/wifi/usr.sbin/bsnmpd/modules/snmp_bridge/BEGEMOT-BRIDGE-MIB.txt#2 integrate .. //depot/projects/wifi/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c#2 integrate .. //depot/projects/wifi/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h#3 integrate .. //depot/projects/wifi/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c#4 integrate .. //depot/projects/wifi/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_tree.def#2 integrate .. //depot/projects/wifi/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3#3 integrate .. //depot/projects/wifi/usr.sbin/freebsd-update/freebsd-update.sh#4 integrate .. //depot/projects/wifi/usr.sbin/iostat/iostat.c#6 integrate .. //depot/projects/wifi/usr.sbin/nscd/Makefile#1 branch .. //depot/projects/wifi/usr.sbin/nscd/agent.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/agent.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/agents/Makefile.inc#1 branch .. //depot/projects/wifi/usr.sbin/nscd/agents/group.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/agents/group.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/agents/passwd.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/agents/passwd.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/agents/services.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/agents/services.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/cachelib.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/cachelib.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/cacheplcs.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/cacheplcs.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/config.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/config.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/debug.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/debug.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/hashtable.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/log.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/log.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/mp_rs_query.#1 branch .. //depot/projects/wifi/usr.sbin/nscd/mp_rs_query.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/mp_rs_query.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/mp_ws_query.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/mp_ws_query.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/nscd.8#1 branch .. //depot/projects/wifi/usr.sbin/nscd/nscd.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/nscd.conf.5#1 branch .. //depot/projects/wifi/usr.sbin/nscd/nscdcli.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/nscdcli.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/parser.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/parser.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/protocol.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/protocol.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/query.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/query.h#1 branch .. //depot/projects/wifi/usr.sbin/nscd/singletons.c#1 branch .. //depot/projects/wifi/usr.sbin/nscd/singletons.h#1 branch .. //depot/projects/wifi/usr.sbin/periodic/periodic.8#4 integrate .. //depot/projects/wifi/usr.sbin/portsnap/portsnap/portsnap.sh#7 integrate .. //depot/projects/wifi/usr.sbin/rpc.statd/file.c#2 integrate .. //depot/projects/wifi/usr.sbin/rpc.statd/statd.c#4 integrate .. //depot/projects/wifi/usr.sbin/sysinstall/menus.c#16 integrate .. //depot/projects/wifi/usr.sbin/wlandebug/Makefile#1 branch .. //depot/projects/wifi/usr.sbin/wlandebug/wlandebug.8#1 branch .. //depot/projects/wifi/usr.sbin/wlandebug/wlandebug.c#1 branch .. //depot/projects/wifi/usr.sbin/wpa/wpa_passphrase/wpa_passphrase.8#2 integrate Differences ... ==== //depot/projects/wifi/ObsoleteFiles.inc#22 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.105 2007/07/12 00:02:12 dougb Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.94 2007/06/05 01:10:47 delphij Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -14,100 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # -# 20070705: I4B headers repo-copied to include/i4b/ -.if ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/include/machine/i4b_cause.h -OLD_FILES+=usr/include/machine/i4b_debug.h -OLD_FILES+=usr/include/machine/i4b_ioctl.h -OLD_FILES+=usr/include/machine/i4b_rbch_ioctl.h -OLD_FILES+=usr/include/machine/i4b_tel_ioctl.h -OLD_FILES+=usr/include/machine/i4b_trace.h -.endif -# 20070704: I4B 'modules' temporary disconnected -.if ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/share/man/man4/i4bing.4.gz -OLD_FILES+=usr/share/man/man4/i4bipr.4.gz -OLD_FILES+=usr/share/man/man4/i4bisppp.4.gz -.endif -# 20070703: pf 4.1 import -OLD_FILES+=usr/libexec/ftp-proxy -# 20070701: KAME IPSec removal -OLD_FILES+=usr/include/netinet6/ah.h -OLD_FILES+=usr/include/netinet6/ah6.h -OLD_FILES+=usr/include/netinet6/ah_aesxcbcmac.h -OLD_FILES+=usr/include/netinet6/esp.h -OLD_FILES+=usr/include/netinet6/esp6.h -OLD_FILES+=usr/include/netinet6/esp_aesctr.h -OLD_FILES+=usr/include/netinet6/esp_camellia.h -OLD_FILES+=usr/include/netinet6/esp_rijndael.h -OLD_FILES+=usr/include/netinet6/ipsec.h -OLD_FILES+=usr/include/netinet6/ipsec6.h -OLD_FILES+=usr/include/netinet6/ipcomp.h -OLD_FILES+=usr/include/netinet6/ipcomp6.h -OLD_FILES+=usr/include/netkey/key.h -OLD_FILES+=usr/include/netkey/key_debug.h -OLD_FILES+=usr/include/netkey/key_var.h -OLD_FILES+=usr/include/netkey/keydb.h -OLD_FILES+=usr/include/netkey/keysock.h -OLD_DIRS+=usr/include/netkey -# 20070701: remove wicontrol -OLD_FILES+=usr/sbin/wicontrol -OLD_FILES+=usr/share/man/man8/wicontrol.8.gz -# 20070625: umapfs removal -OLD_FILES+=rescue/mount_umapfs -OLD_FILES+=sbin/mount_umapfs -OLD_FILES+=usr/include/fs/umapfs/umap.h -OLD_FILES+=usr/share/man/man8/mount_umapfs.8.gz -OLD_DIRS+=usr/include/fs/umapfs -# 20070618: Removal of the PROTO.localhost* files -OLD_FILES+=etc/namedb/PROTO.localhost-v6.rev -OLD_FILES+=etc/namedb/PROTO.localhost.rev -OLD_FILES+=etc/namedb/make-localhost -# 20070618: shared library version bump -OLD_LIBS+=lib/libalias.so.5 -OLD_LIBS+=lib/libbsnmp.so.3 -OLD_LIBS+=lib/libncurses.so.6 -OLD_LIBS+=lib/libncursesw.so.6 -OLD_LIBS+=lib/libreadline.so.6 -OLD_LIBS+=usr/lib/libdialog.so.5 >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Aug 17 06:49:45 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 59F0616A41B; Fri, 17 Aug 2007 06:49: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 D299216A417 for ; Fri, 17 Aug 2007 06:49:44 +0000 (UTC) (envelope-from zhouzhouyi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C551413C465 for ; Fri, 17 Aug 2007 06:49:44 +0000 (UTC) (envelope-from zhouzhouyi@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 l7H6niaW091509 for ; Fri, 17 Aug 2007 06:49:44 GMT (envelope-from zhouzhouyi@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7H6nikr091506 for perforce@freebsd.org; Fri, 17 Aug 2007 06:49:44 GMT (envelope-from zhouzhouyi@FreeBSD.org) Date: Fri, 17 Aug 2007 06:49:44 GMT Message-Id: <200708170649.l7H6nikr091506@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zhouzhouyi@FreeBSD.org using -f From: Zhouyi ZHOU To: Perforce Change Reviews Cc: Subject: PERFORCE change 125257 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: Fri, 17 Aug 2007 06:49:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=125257 Change 125257 by zhouzhouyi@zhouzhouyi_mactest on 2007/08/17 06:49:29 test cases for inpcb deliver, socket relabel Affected files ... .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/macping.c#3 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/netinet/01.t#2 edit .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/netinet/02.t#1 add .. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/netinet/03.t#1 add Differences ... ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/macping.c#3 (text+ko) ==== @@ -97,7 +97,7 @@ usage(void) { - fprintf(stderr, "usage: macping -m label_string " + fprintf(stderr, "usage: macping -m label_string -s socket_label " " -f macconf_file -t timeout target\n"); exit(1); } @@ -208,6 +208,7 @@ int ch; const char *label_string = NULL; + const char *socket_label = NULL; char *target = NULL; const char *macconf_file = NULL; int pid; @@ -228,7 +229,7 @@ struct iovec iov; struct sockaddr_in from; - while ((ch = getopt(argc, argv, "m:f:t:")) != -1) { + while ((ch = getopt(argc, argv, "m:f:t:s:")) != -1) { switch (ch) { case 'm': label_string = optarg; @@ -236,6 +237,9 @@ case 'f': macconf_file = optarg; break; + case 's': + socket_label = optarg; + break; case 't': alarmtimeout = strtoul(optarg, &ep, 0); if ((alarmtimeout < 1) || (alarmtimeout == ULONG_MAX)) @@ -277,6 +281,24 @@ s = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); + if (socket_label) { + mac_t label; + + if (mac_from_text(&label, socket_label) == -1) { + exit(-1); + } + if (mac_set_fd(s, label) == -1) + error = errno; + else + error = 0; + if (error){ + printf("error relabelling socket!\n"); + close(logfd); + exit(1); + } + mac_free(label); + } + outpack = outpackhdr + sizeof(struct ip); icmp_len = sizeof(struct ip) + ICMP_MINLEN + phdr_len; send_len = icmp_len + datalen; ==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/netinet/01.t#2 (text+ko) ==== @@ -1,7 +1,7 @@ #!/bin/sh # $FreeBSD: src/tools/regression/mactest/tests/netinet/01.t,v 1.2 2007/01/25 20:50:02 zhouzhouyi Exp $ -desc="manipulate fifo files" +desc="test the ifnet transmit" dir=`dirname $0` From owner-p4-projects@FreeBSD.ORG Fri Aug 17 07:34:43 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4888B16A418; Fri, 17 Aug 2007 07:34:43 +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 5E51A16A419 for ; Fri, 17 Aug 2007 07:34:42 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4FB8D13C4B4 for ; Fri, 17 Aug 2007 07:34:42 +0000 (UTC) (envelope-from dongmei@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 l7H7YgjJ095527 for ; Fri, 17 Aug 2007 07:34:42 GMT (envelope-from dongmei@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7H7YfQ7095524 for perforce@freebsd.org; Fri, 17 Aug 2007 07:34:41 GMT (envelope-from dongmei@FreeBSD.org) Date: Fri, 17 Aug 2007 07:34:41 GMT Message-Id: <200708170734.l7H7YfQ7095524@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to dongmei@FreeBSD.org using -f From: dongmei To: Perforce Change Reviews Cc: Subject: PERFORCE change 125259 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: Fri, 17 Aug 2007 07:34:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=125259 Change 125259 by dongmei@dongmei2007 on 2007/08/17 07:34:05 add the toolbar icons Affected files ... .. //depot/projects/soc2007/dongmei-auditanalyzer/Makefile#4 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/compat_macros.h#3 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/main.c#3 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/main.h#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/menu.c#4 edit .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/toolbar.c#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/toolbar.h#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/image/toolbar/capture_start_24.xpm#1 add .. //depot/projects/soc2007/dongmei-auditanalyzer/image/toolbar/capture_stop_24.xpm#1 add Differences ... ==== //depot/projects/soc2007/dongmei-auditanalyzer/Makefile#4 (text+ko) ==== @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/gtk .PATH: ${.CURDIR}/image -SOURCES = main.c menu.c list_view.c tree_view.c file_dlg.c gui_utils.c simple_dialog.c trail_file_dlg.c filesystem.c buffer.c except.c file_access.c strerror.c tfile.c tsess.c file_util.c capture.c +SOURCES = main.c menu.c list_view.c tree_view.c file_dlg.c gui_utils.c simple_dialog.c trail_file_dlg.c filesystem.c buffer.c except.c file_access.c strerror.c tfile.c tsess.c file_util.c capture.c toolbar.c OBJS = ${SOURCES:.c=.o} CFLAGS = `pkg-config gtk+-2.0 --cflags` -D_U_="" LDADD = `pkg-config gtk+-2.0 gthread-2.0 --libs` -lbsm ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/compat_macros.h#3 (text+ko) ==== @@ -22,10 +22,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef __COMPAT_MACROS_H__ -#define __COMPAT_MACROS_H__ - /** @file * * Helper macros for gtk1.x / gtk2.x compatibility. Use these macros instead of the GTK deprecated functions, @@ -36,7 +33,6 @@ * gtk_widget_set_size_request, ... */ -#if GTK_MAJOR_VERSION < 2 /** Connect a signal handler to a particular object. * @@ -146,79 +142,43 @@ #define ITEM_FACTORY_STOCK_ENTRY(path, accelerator, callback, action, data) \ {path, accelerator, GTK_MENU_FUNC(callback), action, NULL} -#define GTK_STOCK_APPLY "Apply" -#define GTK_STOCK_CANCEL "Cancel" -#define GTK_STOCK_CLEAR "Clear" -#define GTK_STOCK_CLOSE "Close" -#define GTK_STOCK_COPY "Copy" -#define GTK_STOCK_DELETE "Delete" -#define GTK_STOCK_FIND "Find" -#define GTK_STOCK_GO_BACK "Back" -#define GTK_STOCK_GO_DOWN "Down" -#define GTK_STOCK_GO_FORWARD "Next" -#define GTK_STOCK_GO_UP "Up" -#define GTK_STOCK_GOTO_BOTTOM "Bottom" -#define GTK_STOCK_GOTO_TOP "Top" -#define GTK_STOCK_HELP "Help" -#define GTK_STOCK_HOME "Home" -#define GTK_STOCK_JUMP_TO "GoTo" -#define GTK_STOCK_NEW "New" -#define GTK_STOCK_NO "No" -#define GTK_STOCK_OK "OK" -#define GTK_STOCK_OPEN "Open" -#define GTK_STOCK_PRINT "Print" -#define GTK_STOCK_PROPERTIES "Properties" -#define GTK_STOCK_REFRESH "Reload" -#define GTK_STOCK_REVERT_TO_SAVED "Revert" -#define GTK_STOCK_SAVE "Save" -#define GTK_STOCK_SAVE_AS "Save As" -#define GTK_STOCK_SELECT_COLOR "Color" -#define GTK_STOCK_SELECT_FONT "Font" -#define GTK_STOCK_STOP "Stop" -#define GTK_STOCK_YES "Yes" -#define GTK_STOCK_ZOOM_IN "Zoom In" -#define GTK_STOCK_ZOOM_OUT "Zoom Out" -#define GTK_STOCK_ZOOM_100 "Zoom 100%" - -#ifdef HAVE_LIBPCAP -#define WIRESHARK_STOCK_CAPTURE_INTERFACES "Interfaces" -#define WIRESHARK_STOCK_CAPTURE_AIRPCAP "Airpcap" -#define WIRESHARK_STOCK_CAPTURE_OPTIONS "Options" -#define WIRESHARK_STOCK_CAPTURE_START "Start" -#define WIRESHARK_STOCK_CAPTURE_STOP "Stop" -#define WIRESHARK_STOCK_CAPTURE_RESTART "Restart" -#define WIRESHARK_STOCK_CAPTURE_FILTER "CFilter" -#define WIRESHARK_STOCK_CAPTURE_FILTER_ENTRY "Capture Filter:" -#define WIRESHARK_STOCK_CAPTURE_DETAILS "Details" -#endif -#define WIRESHARK_STOCK_DISPLAY_FILTER "Filter" -#define WIRESHARK_STOCK_DISPLAY_FILTER_ENTRY "Filter:" -#define WIRESHARK_STOCK_PREFS "Prefs" -#define WIRESHARK_STOCK_BROWSE "Browse" -#define WIRESHARK_STOCK_CREATE_STAT "Create Stat" -#define WIRESHARK_STOCK_EXPORT "Export..." -#define WIRESHARK_STOCK_IMPORT "Import..." -#define WIRESHARK_STOCK_EDIT "Edit..." -#define WIRESHARK_STOCK_ADD_EXPRESSION "Add Expression..." -#define WIRESHARK_STOCK_DONT_SAVE "Continue without Saving" -#define WIRESHARK_STOCK_ABOUT "About" -#define WIRESHARK_STOCK_COLORIZE "Colorize" -#define WIRESHARK_STOCK_AUTOSCROLL "Auto Scroll" -#define WIRESHARK_STOCK_RESIZE_COLUMNS "Resize Columns" -#define WIRESHARK_STOCK_TIME "Time" -#define WIRESHARK_STOCK_INTERNET "Internet" -#define WIRESHARK_STOCK_WEB_SUPPORT "Web Support" -#define WIRESHARK_STOCK_WIKI "Wiki" -#define WIRESHARK_STOCK_CONVERSATIONS "Conversations" -#define WIRESHARK_STOCK_ENDPOINTS "Endpoints" -#define WIRESHARK_STOCK_GRAPHS "Graphs" -#define WIRESHARK_STOCK_TELEPHONY "Telephony" -#define WIRESHARK_STOCK_DECODE_AS "Decode As" -#define WIRESHARK_STOCK_CHECKBOX "Checkbox" -#define WIRESHARK_STOCK_FILE_SET_LIST "List Files" -#define WIRESHARK_STOCK_FILE_SET_NEXT "Next File" -#define WIRESHARK_STOCK_FILE_SET_PREVIOUS "Previous File" -#define WIRESHARK_STOCK_FILTER_OUT_STREAM "Filter Out This Stream" +#define AUANALYZER_STOCK_CAPTURE_INTERFACES "Interfaces" +#define AUANALYZER_STOCK_CAPTURE_AIRPCAP "Airpcap" +#define AUANALYZER_STOCK_CAPTURE_OPTIONS "Options" +#define AUANALYZER_STOCK_CAPTURE_START "Start" +#define AUANALYZER_STOCK_CAPTURE_STOP "Stop" +#define AUANALYZER_STOCK_CAPTURE_RESTART "Restart" +#define AUANALYZER_STOCK_CAPTURE_FILTER "CFilter" +#define AUANALYZER_STOCK_CAPTURE_FILTER_ENTRY "Capture Filter:" +#define AUANALYZER_STOCK_CAPTURE_DETAILS "Details" +#define AUANALYZER_STOCK_DISPLAY_FILTER "Filter" +#define AUANALYZER_STOCK_DISPLAY_FILTER_ENTRY "Filter:" +#define AUANALYZER_STOCK_PREFS "Prefs" +#define AUANALYZER_STOCK_BROWSE "Browse" +#define AUANALYZER_STOCK_CREATE_STAT "Create Stat" +#define AUANALYZER_STOCK_EXPORT "Export..." +#define AUANALYZER_STOCK_IMPORT "Import..." +#define AUANALYZER_STOCK_EDIT "Edit..." +#define AUANALYZER_STOCK_ADD_EXPRESSION "Add Expression..." +#define AUANALYZER_STOCK_DONT_SAVE "Continue without Saving" +#define AUANALYZER_STOCK_ABOUT "About" +#define AUANALYZER_STOCK_COLORIZE "Colorize" +#define AUANALYZER_STOCK_AUTOSCROLL "Auto Scroll" +#define AUANALYZER_STOCK_RESIZE_COLUMNS "Resize Columns" +#define AUANALYZER_STOCK_TIME "Time" +#define AUANALYZER_STOCK_INTERNET "Internet" +#define AUANALYZER_STOCK_WEB_SUPPORT "Web Support" +#define AUANALYZER_STOCK_WIKI "Wiki" +#define AUANALYZER_STOCK_CONVERSATIONS "Conversations" +#define AUANALYZER_STOCK_ENDPOINTS "Endpoints" +#define AUANALYZER_STOCK_GRAPHS "Graphs" +#define AUANALYZER_STOCK_TELEPHONY "Telephony" +#define AUANALYZER_STOCK_DECODE_AS "Decode As" +#define AUANALYZER_STOCK_CHECKBOX "Checkbox" +#define AUANALYZER_STOCK_FILE_SET_LIST "List Files" +#define AUANALYZER_STOCK_FILE_SET_NEXT "Next File" +#define AUANALYZER_STOCK_FILE_SET_PREVIOUS "Previous File" +#define AUANALYZER_STOCK_FILTER_OUT_STREAM "Filter Out This Stream" /** Create a stock button. Will create a "normal" button for GTK1. * @@ -278,7 +238,6 @@ /*************************************************************************/ -#else /* GTK_MAJOR_VERSION >= 2 */ #define SIGNAL_CONNECT(widget, name, callback, arg) \ g_signal_connect(G_OBJECT(widget), name, G_CALLBACK(callback), \ @@ -314,85 +273,44 @@ #define ITEM_FACTORY_STOCK_ENTRY(path, accelerator, callback, action, data) \ {path, accelerator, GTK_MENU_FUNC(callback), action, "", data} -#ifdef HAVE_LIBPCAP -#define WIRESHARK_STOCK_LABEL_CAPTURE_INTERFACES "_Interfaces" -#define WIRESHARK_STOCK_LABEL_CAPTURE_AIRPCAP "_Wireless" -#define WIRESHARK_STOCK_LABEL_CAPTURE_OPTIONS "_Options" -#define WIRESHARK_STOCK_LABEL_CAPTURE_START "_Start" -#define WIRESHARK_STOCK_LABEL_CAPTURE_STOP "S_top" -#define WIRESHARK_STOCK_LABEL_CAPTURE_RESTART "_Restart" -#define WIRESHARK_STOCK_LABEL_CAPTURE_FILTER "_CFilter" -#define WIRESHARK_STOCK_LABEL_CAPTURE_FILTER_ENTRY "_Capture Filter:" -#define WIRESHARK_STOCK_LABEL_CAPTURE_DETAILS "_Details" -#endif -#define WIRESHARK_STOCK_LABEL_DISPLAY_FILTER "_Filter" -#define WIRESHARK_STOCK_LABEL_DISPLAY_FILTER_ENTRY "_Filter:" -#define WIRESHARK_STOCK_LABEL_PREFS "_Prefs" -#define WIRESHARK_STOCK_LABEL_BROWSE "_Browse..." -#define WIRESHARK_STOCK_LABEL_CREATE_STAT "Create _Stat" -#define WIRESHARK_STOCK_LABEL_EXPORT "_Export..." -#define WIRESHARK_STOCK_LABEL_IMPORT "_Import..." -#define WIRESHARK_STOCK_LABEL_EDIT "_Edit..." -#define WIRESHARK_STOCK_LABEL_ADD_EXPRESSION "_Expression..." /* plus sign coming from icon */ -#define WIRESHARK_STOCK_LABEL_DONT_SAVE "Continue _without Saving" -#define WIRESHARK_STOCK_LABEL_ABOUT "_About" -#define WIRESHARK_STOCK_LABEL_COLORIZE "_Colorize" -#define WIRESHARK_STOCK_LABEL_AUTOSCROLL "_Auto Scroll in Live Capture" -#define WIRESHARK_STOCK_LABEL_RESIZE_COLUMNS "Resize Columns" -#define WIRESHARK_STOCK_LABEL_TIME "Time" -#define WIRESHARK_STOCK_LABEL_INTERNET "Internet" -#define WIRESHARK_STOCK_LABEL_WEB_SUPPORT "Web Support" -#define WIRESHARK_STOCK_LABEL_WIKI "Wiki" -#define WIRESHARK_STOCK_LABEL_CONVERSATIONS "Conversations" -#define WIRESHARK_STOCK_LABEL_ENDPOINTS "Endpoints" -#define WIRESHARK_STOCK_LABEL_GRAPHS "Graphs" -#define WIRESHARK_STOCK_LABEL_TELEPHONY "Telephony" -#define WIRESHARK_STOCK_LABEL_DECODE_AS "Decode As" -#define WIRESHARK_STOCK_LABEL_CHECKBOX "Checkbox" -#define WIRESHARK_STOCK_LABEL_FILE_SET_LIST "List Files" -#define WIRESHARK_STOCK_LABEL_FILE_SET_NEXT "Next File" -#define WIRESHARK_STOCK_LABEL_FILE_SET_PREVIOUS "Previous File" -#define WIRESHARK_STOCK_LABEL_FILTER_OUT_STREAM "Filter Out This Stream" +#define AUANALYZER_STOCK_LABEL_CAPTURE_INTERFACES "_Interfaces" +#define AUANALYZER_STOCK_LABEL_CAPTURE_AIRPCAP "_Wireless" +#define AUANALYZER_STOCK_LABEL_CAPTURE_OPTIONS "_Options" +#define AUANALYZER_STOCK_LABEL_CAPTURE_START "_Start" +#define AUANALYZER_STOCK_LABEL_CAPTURE_STOP "S_top" +#define AUANALYZER_STOCK_LABEL_CAPTURE_RESTART "_Restart" +#define AUANALYZER_STOCK_LABEL_CAPTURE_FILTER "_CFilter" +#define AUANALYZER_STOCK_LABEL_CAPTURE_FILTER_ENTRY "_Capture Filter:" +#define AUANALYZER_STOCK_LABEL_CAPTURE_DETAILS "_Details" +#define AUANALYZER_STOCK_LABEL_DISPLAY_FILTER "_Filter" +#define AUANALYZER_STOCK_LABEL_DISPLAY_FILTER_ENTRY "_Filter:" +#define AUANALYZER_STOCK_LABEL_PREFS "_Prefs" +#define AUANALYZER_STOCK_LABEL_BROWSE "_Browse..." +#define AUANALYZER_STOCK_LABEL_CREATE_STAT "Create _Stat" +#define AUANALYZER_STOCK_LABEL_EXPORT "_Export..." +#define AUANALYZER_STOCK_LABEL_IMPORT "_Import..." +#define AUANALYZER_STOCK_LABEL_EDIT "_Edit..." +#define AUANALYZER_STOCK_LABEL_ADD_EXPRESSION "_Expression..." /* plus sign coming from icon */ +#define AUANALYZER_STOCK_LABEL_DONT_SAVE "Continue _without Saving" +#define AUANALYZER_STOCK_LABEL_ABOUT "_About" +#define AUANALYZER_STOCK_LABEL_COLORIZE "_Colorize" +#define AUANALYZER_STOCK_LABEL_AUTOSCROLL "_Auto Scroll in Live Capture" +#define AUANALYZER_STOCK_LABEL_RESIZE_COLUMNS "Resize Columns" +#define AUANALYZER_STOCK_LABEL_TIME "Time" +#define AUANALYZER_STOCK_LABEL_INTERNET "Internet" +#define AUANALYZER_STOCK_LABEL_WEB_SUPPORT "Web Support" +#define AUANALYZER_STOCK_LABEL_WIKI "Wiki" +#define AUANALYZER_STOCK_LABEL_CONVERSATIONS "Conversations" +#define AUANALYZER_STOCK_LABEL_ENDPOINTS "Endpoints" +#define AUANALYZER_STOCK_LABEL_GRAPHS "Graphs" +#define AUANALYZER_STOCK_LABEL_TELEPHONY "Telephony" +#define AUANALYZER_STOCK_LABEL_DECODE_AS "Decode As" +#define AUANALYZER_STOCK_LABEL_CHECKBOX "Checkbox" +#define AUANALYZER_STOCK_LABEL_FILE_SET_LIST "List Files" +#define AUANALYZER_STOCK_LABEL_FILE_SET_NEXT "Next File" +#define AUANALYZER_STOCK_LABEL_FILE_SET_PREVIOUS "Previous File" +#define AUANALYZER_STOCK_LABEL_FILTER_OUT_STREAM "Filter Out This Stream" -#ifdef HAVE_LIBPCAP -#define WIRESHARK_STOCK_CAPTURE_INTERFACES "Wireshark_Stock_CaptureInterfaces" -#define WIRESHARK_STOCK_CAPTURE_AIRPCAP "Wireshark_Stock_CaptureAirpcap" -#define WIRESHARK_STOCK_CAPTURE_OPTIONS "Wireshark_Stock_CaptureOptionss" -#define WIRESHARK_STOCK_CAPTURE_START "Wireshark_Stock_CaptureStart" -#define WIRESHARK_STOCK_CAPTURE_STOP "Wireshark_Stock_CaptureStop" -#define WIRESHARK_STOCK_CAPTURE_RESTART "Wireshark_Stock_CaptureRestart" -#define WIRESHARK_STOCK_CAPTURE_FILTER "Wireshark_Stock_CaptureFilter" -#define WIRESHARK_STOCK_CAPTURE_FILTER_ENTRY "Wireshark_Stock_CaptureFilter_Entry" -#define WIRESHARK_STOCK_CAPTURE_DETAILS "Wireshark_Stock_CaptureDetails" -#endif -#define WIRESHARK_STOCK_DISPLAY_FILTER "Wireshark_Stock_DisplayFilter" -#define WIRESHARK_STOCK_DISPLAY_FILTER_ENTRY "Wireshark_Stock_DisplayFilter_Entry" -#define WIRESHARK_STOCK_PREFS "Wireshark_Stock_Prefs" -#define WIRESHARK_STOCK_BROWSE "Wireshark_Stock_Browse" -#define WIRESHARK_STOCK_CREATE_STAT "Wireshark_Stock_CreateStat" -#define WIRESHARK_STOCK_EXPORT "Wireshark_Stock_Export" -#define WIRESHARK_STOCK_IMPORT "Wireshark_Stock_Import" -#define WIRESHARK_STOCK_EDIT "Wireshark_Stock_Edit" -#define WIRESHARK_STOCK_ADD_EXPRESSION "Wireshark_Stock_Edit_Add_Expression" -#define WIRESHARK_STOCK_DONT_SAVE "Wireshark_Stock_Continue_without_Saving" -#define WIRESHARK_STOCK_ABOUT "Wireshark_Stock_About" -#define WIRESHARK_STOCK_COLORIZE "Wireshark_Stock_Colorize" -#define WIRESHARK_STOCK_AUTOSCROLL "Wireshark_Stock_Autoscroll" -#define WIRESHARK_STOCK_RESIZE_COLUMNS "Wireshark_Stock_Resize_Columns" -#define WIRESHARK_STOCK_TIME "Wireshark_Stock_Time" -#define WIRESHARK_STOCK_INTERNET "Wireshark_Stock_Internet" -#define WIRESHARK_STOCK_WEB_SUPPORT "Wireshark_Stock_Web_Support" -#define WIRESHARK_STOCK_WIKI "Wireshark_Stock_Wiki" -#define WIRESHARK_STOCK_CONVERSATIONS "Wireshark_Stock_Conversations" -#define WIRESHARK_STOCK_ENDPOINTS "Wireshark_Stock_Endpoints" -#define WIRESHARK_STOCK_GRAPHS "Wireshark_Stock_Graphs" -#define WIRESHARK_STOCK_TELEPHONY "Wireshark_Stock_Telephony" -#define WIRESHARK_STOCK_DECODE_AS "Wireshark_Stock_DecodeAs" -#define WIRESHARK_STOCK_CHECKBOX "Wireshark_Stock_Checkbox" -#define WIRESHARK_STOCK_FILE_SET_LIST "Wireshark_Stock_File_Set_List" -#define WIRESHARK_STOCK_FILE_SET_NEXT "Wireshark_Stock_File_Set_Next" -#define WIRESHARK_STOCK_FILE_SET_PREVIOUS "Wireshark_Stock_File_Set_Previous" -#define WIRESHARK_STOCK_FILTER_OUT_STREAM "Wireshark_Stock_Filter_Out_This_Stream" #define BUTTON_NEW_FROM_STOCK(stock_id) \ gtk_button_new_from_stock(stock_id); @@ -417,6 +335,3 @@ #define FONT_TYPE PangoFontDescription -#endif /* GTK_MAJOR_VERSION */ - -#endif /* __COMPAT_MACROS_H__ */ ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/main.c#3 (text+ko) ==== @@ -9,9 +9,11 @@ #include "../tfile.h" #include "list_view.h" #include "tree_view.h" +#include "stdbool.h" +#include "toolbar.h" trailer_file cfile; - +bool fstop=FALSE; GtkWidget *top_level = NULL,*list_view,*tree_view,*list_sw,*tree_sw; static GtkWidget *menubar, *main_vbox, *main_tb, *pkt_scrollw, *stat_hbox, *filter_tb; static GtkWidget *main_pane_v1, *main_pane_v2, *main_pane_h1, *main_pane_h2,*vpaned; @@ -19,12 +21,11 @@ /* This function is connected to the Close button or * closing the window from the WM */ -gint delete_event (GtkWidget *widget, GdkEvent *event, gpointer data) +gint file_quit_cmd_cb(GtkWidget *widget, GdkEvent *event, gpointer data) { gtk_main_quit (); return FALSE; } - static GtkWidget *create_toolbar(void) { GtkWidget *toolbar; @@ -47,11 +48,12 @@ "Closes this app", /* this button's tooltip */ "Private", /* tooltip private info */ iconw, /* icon widget */ - GTK_SIGNAL_FUNC (delete_event), /* a signal */ + GTK_SIGNAL_FUNC (file_quit_cmd_cb), /* a signal */ NULL); gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); /* space after item */ return toolbar; } + gchar * create_user_window_title(const gchar *caption) { @@ -104,7 +106,7 @@ gtk_window_add_accel_group(GTK_WINDOW(top_level), accel); /*Create main toolbar*/ - main_tb=create_toolbar(); + main_tb=toolbar_new(); /* Now create the contents of the two halves of the window */ @@ -179,12 +181,17 @@ main (int argc, char **argv) { GtkWidget *vpaned; - + + if (!g_thread_supported()) g_thread_init(NULL); + gdk_threads_init(); + gtk_init (&argc, &argv); init_trail_file(&cfile); create_main_window(); show_main_window(); + gdk_threads_enter(); gtk_main (); + gdk_threads_leave(); return 0; } ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/menu.c#4 (text+ko) ==== @@ -2,6 +2,7 @@ #include #include "compat_macros.h" #include "trail_file_dlg.h" +#include "main.h" #include "../capture.h" #define GTK_MENU_FUNC(a) ((GtkItemFactoryCallback)(a)) @@ -11,9 +12,9 @@ ITEM_FACTORY_ENTRY("/_File", NULL, NULL, 0, "", NULL), ITEM_FACTORY_STOCK_ENTRY("/File/_Open...", "O", file_open_cmd_cb, 0, GTK_STOCK_OPEN), -/* ITEM_FACTORY_STOCK_ENTRY("/File/_Quit", "Q", file_quit_cmd_cb, + ITEM_FACTORY_STOCK_ENTRY("/File/_Quit", "Q", file_quit_cmd_cb, 0, GTK_STOCK_QUIT), -*/ + ITEM_FACTORY_ENTRY("/_Edit", NULL, NULL, 0, "", NULL), #if 0 /* Un-#if this when we actually implement Cut/Copy/Paste. */ @@ -34,9 +35,9 @@ // ITEM_FACTORY_ENTRY("/View/log _Bytes", NULL, byte_view_show_cb, 0, "", NULL), ITEM_FACTORY_ENTRY("/_Capture", NULL, NULL, 0, "", NULL), ITEM_FACTORY_STOCK_ENTRY("/Capture/_Start...", "O", capture_start_cb, - 0, GTK_STOCK_OPEN), + 0, AUANALYZER_STOCK_CAPTURE_START), ITEM_FACTORY_STOCK_ENTRY("/Capture/_Stop...", "O", capture_stop_cb, - 0, GTK_STOCK_OPEN), + 0, AUANALYZER_STOCK_CAPTURE_STOP), ITEM_FACTORY_ENTRY("/_Analyze", NULL, NULL, 0, "", NULL), ITEM_FACTORY_ENTRY("/_Statistics", NULL, NULL, 0, "", NULL), From owner-p4-projects@FreeBSD.ORG Fri Aug 17 07:40:51 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D193916A421; Fri, 17 Aug 2007 07:40:50 +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 62D5816A41A for ; Fri, 17 Aug 2007 07:40:50 +0000 (UTC) (envelope-from dongmei@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 562C613C491 for ; Fri, 17 Aug 2007 07:40:50 +0000 (UTC) (envelope-from dongmei@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 l7H7eo9J095849 for ; Fri, 17 Aug 2007 07:40:50 GMT (envelope-from dongmei@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7H7enX2095846 for perforce@freebsd.org; Fri, 17 Aug 2007 07:40:49 GMT (envelope-from dongmei@FreeBSD.org) Date: Fri, 17 Aug 2007 07:40:49 GMT Message-Id: <200708170740.l7H7enX2095846@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to dongmei@FreeBSD.org using -f From: dongmei To: Perforce Change Reviews Cc: Subject: PERFORCE change 125260 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: Fri, 17 Aug 2007 07:40:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=125260 Change 125260 by dongmei@dongmei2007 on 2007/08/17 07:40:07 correct some error define Affected files ... .. //depot/projects/soc2007/dongmei-auditanalyzer/gtk/simple_dialog.c#2 edit Differences ... ==== //depot/projects/soc2007/dongmei-auditanalyzer/gtk/simple_dialog.c#2 (text+ko) ==== @@ -173,13 +173,13 @@ while(stock_id != NULL) { if (strcmp(stock_id, GTK_STOCK_OK) == 0) { ok = stock_id; - } else if (strcmp(stock_id, WIRESHARK_STOCK_CREATE_STAT) == 0) { + } else if (strcmp(stock_id, AUANALYZER_STOCK_CREATE_STAT) == 0) { create_stat = stock_id; } else if (strcmp(stock_id, GTK_STOCK_APPLY) == 0) { apply = stock_id; } else if (strcmp(stock_id, GTK_STOCK_SAVE) == 0) { save = stock_id; - } else if (strcmp(stock_id, WIRESHARK_STOCK_DONT_SAVE) == 0) { + } else if (strcmp(stock_id, AUANALYZER_STOCK_DONT_SAVE) == 0) { dont_save = stock_id; } else if (strcmp(stock_id, GTK_STOCK_CANCEL) == 0) { cancel = stock_id; @@ -188,9 +188,9 @@ } else if (strcmp(stock_id, GTK_STOCK_CLEAR) == 0) { clear = stock_id; #ifdef HAVE_LIBPCAP - } else if (strcmp(stock_id, WIRESHARK_STOCK_CAPTURE_START) == 0) { + } else if (strcmp(stock_id, AUANALYZER_STOCK_CAPTURE_START) == 0) { cap_start = stock_id; - } else if (strcmp(stock_id, WIRESHARK_STOCK_CAPTURE_STOP) == 0) { + } else if (strcmp(stock_id, AUANALYZER_STOCK_CAPTURE_STOP) == 0) { cap_stop = stock_id; #endif /* HAVE_LIBPCAP */ } else if (strcmp(stock_id, GTK_STOCK_STOP) == 0) { @@ -207,7 +207,7 @@ yes = stock_id; } else if (strcmp(stock_id, GTK_STOCK_NO) == 0) { no = stock_id; - } else if (strcmp(stock_id, WIRESHARK_STOCK_FILTER_OUT_STREAM) == 0) { + } else if (strcmp(stock_id, AUANALYZER_STOCK_FILTER_OUT_STREAM) == 0) { filter_stream = stock_id; } else { /* we don't know that button! */ @@ -591,7 +591,7 @@ bbox = dlg_button_row_new(GTK_STOCK_YES, GTK_STOCK_NO, GTK_STOCK_CANCEL, NULL); break; case(ESD_BTNS_SAVE_DONTSAVE_CANCEL): - bbox = dlg_button_row_new(GTK_STOCK_SAVE, WIRESHARK_STOCK_DONT_SAVE, GTK_STOCK_CANCEL, NULL); + bbox = dlg_button_row_new(GTK_STOCK_SAVE, AUANALYZER_STOCK_DONT_SAVE, GTK_STOCK_CANCEL, NULL); break; case(ESD_BTNS_YES_NO): bbox = dlg_button_row_new(GTK_STOCK_YES, GTK_STOCK_NO, NULL); @@ -616,7 +616,7 @@ SIGNAL_CONNECT(save_bt, "clicked", simple_dialog_cancel_cb, win); } - dont_save_bt = OBJECT_GET_DATA(bbox, WIRESHARK_STOCK_DONT_SAVE); + dont_save_bt = OBJECT_GET_DATA(bbox, AUANALYZER_STOCK_DONT_SAVE); if (dont_save_bt) { OBJECT_SET_DATA(dont_save_bt, CALLBACK_BTN_KEY, GINT_TO_POINTER(ESD_BTN_DONT_SAVE)); SIGNAL_CONNECT(dont_save_bt, "clicked", simple_dialog_cancel_cb, win); From owner-p4-projects@FreeBSD.ORG Fri Aug 17 12:45:08 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 89D8D16A473; Fri, 17 Aug 2007 12:45:08 +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 5AD2B16A46C for ; Fri, 17 Aug 2007 12:45:08 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1F7F813C4B4 for ; Fri, 17 Aug 2007 12:45:08 +0000 (UTC) (envelope-from rpaulo@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 l7HCj7RH031640 for ; Fri, 17 Aug 2007 12:45:07 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7HCj7wM031637 for perforce@freebsd.org; Fri, 17 Aug 2007 12:45:07 GMT (envelope-from rpaulo@FreeBSD.org) Date: Fri, 17 Aug 2007 12:45:07 GMT Message-Id: <200708171245.l7HCj7wM031637@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo To: Perforce Change Reviews Cc: Subject: PERFORCE change 125263 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: Fri, 17 Aug 2007 12:45:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=125263 Change 125263 by rpaulo@rpaulo_alpha on 2007/08/17 12:44:58 snprintf(3) doesn't need 'size - 1'. Affected files ... .. //depot/projects/soc2007/rpaulo-macbook/dev/asmc/asmc.c#30 edit Differences ... ==== //depot/projects/soc2007/rpaulo-macbook/dev/asmc/asmc.c#30 (text+ko) ==== @@ -23,7 +23,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/soc2007/rpaulo-macbook/dev/asmc/asmc.c#29 $ + * $P4: //depot/projects/soc2007/rpaulo-macbook/dev/asmc/asmc.c#30 $ * */ @@ -897,7 +897,7 @@ type = 255; } - snprintf(notify, sizeof(notify) - 1, " notify=0x%x", type); + snprintf(notify, sizeof(notify), " notify=0x%x", type); devctl_notify("ISA", "asmc", "SMS", notify); } From owner-p4-projects@FreeBSD.ORG Fri Aug 17 13:31:05 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B1A9316A420; Fri, 17 Aug 2007 13:31: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 7F57316A419 for ; Fri, 17 Aug 2007 13:31:05 +0000 (UTC) (envelope-from sat@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 701F813C461 for ; Fri, 17 Aug 2007 13:31:05 +0000 (UTC) (envelope-from sat@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 l7HDV5TC044202 for ; Fri, 17 Aug 2007 13:31:05 GMT (envelope-from sat@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7HDV5Yu044195 for perforce@freebsd.org; Fri, 17 Aug 2007 13:31:05 GMT (envelope-from sat@freebsd.org) Date: Fri, 17 Aug 2007 13:31:05 GMT Message-Id: <200708171331.l7HDV5Yu044195@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sat@freebsd.org using -f From: Andrew Pantyukhin To: Perforce Change Reviews Cc: Subject: PERFORCE change 125266 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: Fri, 17 Aug 2007 13:31:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=125266 Change 125266 by sat@sat_amilo on 2007/08/17 13:30:08 - Fix whitespace - Move $FreeBSD$ close to the top - Use Pre/Post_Include to match most other bsd.*.mk files Affected files ... .. //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#22 edit Differences ... ==== //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#22 (text+ko) ==== @@ -1,6 +1,8 @@ #-*- mode: makefile; tab-width: 4; -*- # ex:ts=4 # +# $FreeBSD$ +# # bsd.perl.mk - Support for Perl-based ports. # # Created by: Gabor Kovesdan @@ -9,41 +11,40 @@ # Please send all suggested changes to the maintainer instead of committing # them to CVS yourself. # -# # PERL5 - Set to full path of perl5, either in the system or -# installed from a port. +# installed from a port. # PERL - Set to full path of perl5, either in the system or -# installed from a port, but without the version number. -# Use this if you need to replace "#!" lines in scripts. -# PERL_VERSION - Full version of perl5 (see below for current value). +# installed from a port, but without the version number. +# Use this if you need to replace "#!" lines in scripts. +# PERL_VERSION - Full version of perl5 (see below for current value). # PERL_VER - Short version of perl5 (see below for current value). -# PERL_LEVEL - Perl version as an integer of the form MNNNPP, where -# M is major version, N is minor version, and P is -# the patch level. E.g., PERL_VERSION=5.6.1 would give -# a PERL_LEVEL of 500601. This can be used in comparisons -# to determine if the version of perl is high enough, -# whether a particular dependency is needed, etc. +# PERL_LEVEL - Perl version as an integer of the form MNNNPP, where +# M is major version, N is minor version, and P is +# the patch level. E.g., PERL_VERSION=5.6.1 would give +# a PERL_LEVEL of 500601. This can be used in comparisons +# to determine if the version of perl is high enough, +# whether a particular dependency is needed, etc. # PERL_ARCH - Directory name of architecture dependent libraries -# (value: ${ARCH}-freebsd). +# (value: ${ARCH}-freebsd). # PERL_PORT - Name of the perl port that is installed -# (value: perl5) +# (value: perl5) # SITE_PERL - Directory name where site specific perl packages go. -# This value is added to PLIST_SUB. +# This value is added to PLIST_SUB. # USE_PERL5 - If your port needs a specific version of Perl, you -# can easily specify that with this knob. If -# you need a certain minimal version, but don't -# care if about the upperversion, just put the -# + sign behind the version. If you want to -# specify a latest version your port can be used -# with, suffix the version number with a - sign. -# Exact version can also be specified if you just -# set USE_PERL5 to the desired version. If you -# just set USE_PERL5 to "yes", Perl will be -# pulled in as a dependency but no version check -# is done. -# -# USE_PERL5_REASON - Along with USE_PERL5, you can set a specific reason, -# why a given version is required. +# can easily specify that with this knob. If +# you need a certain minimal version, but don't +# care if about the upperversion, just put the +# + sign behind the version. If you want to +# specify a latest version your port can be used +# with, suffix the version number with a - sign. +# Exact version can also be specified if you just +# set USE_PERL5 to the desired version. If you +# just set USE_PERL5 to "yes", Perl will be +# pulled in as a dependency but no version check +# is done. +# USE_PERL5_REASON +# - Along with USE_PERL5, you can set a specific reason, +# why a given version is required. # # Examples: # USE_PERL5= yes # port requires any version of Perl5 to build. @@ -56,43 +57,40 @@ # # USE_PERL5_REASON= this module is already part of your Perl version # -# PERL_CONFIGURE - Configure using Perl's MakeMaker. Implies USE_PERL5. -# The version requirement can be specified here, -# as well. -# USE_PERL5_BUILD - If set, this port uses perl5 in one or more of the -# extract, patch, build or install phases. -# The version requirement can be specified here, -# as well. +# PERL_CONFIGURE +# - Configure using Perl's MakeMaker. Implies USE_PERL5. +# The version requirement can be specified here, +# as well. +# USE_PERL5_BUILD +# - If set, this port uses perl5 in one or more of the +# extract, patch, build or install phases. +# The version requirement can be specified here, +# as well. +# USE_PERL5_RUN - If set, this port uses perl5 for running. The +# version requirement can be specified here, +# as well. +# PERL_MODBUILD - Use Module::Build to configure, build and install +# port. The version requirement can be specified +# here, as well. # -# USE_PERL5_RUN - If set, this port uses perl5 for running. The -# version requirement can be specified here, -# as well. -# -# PERL_MODBUILD - Use Module::Build to configure, build and install -# port. The version requirement can be specified -# here, as well. -# -# $FreeBSD$ -# -.if !defined(_POSTMKINCLUDED) && !defined(_PERLPREMKINCLUDED) +.if !defined(_POSTMKINCLUDED) && !defined(Perl_Pre_Include) +Perl_Pre_Include= bsd.perl.mk PERL_Include_MAINTAINER= perl@FreeBSD.org -_PERLPREMKINCLUDED= yes - PERL_VERSION?= 5.8.8 -PERL_VER?= 5.8.8 +PERL_VER?= 5.8.8 .if !defined(PERL_LEVEL) && defined(PERL_VERSION) perl_major= ${PERL_VERSION:C|^([1-9]+).*|\1|} -_perl_minor= 00${PERL_VERSION:C|^([1-9]+)\.([0-9]+).*|\2|} +_perl_minor= 00${PERL_VERSION:C|^([1-9]+)\.([0-9]+).*|\2|} perl_minor= ${_perl_minor:C|^.*(...)|\1|} .if ${perl_minor} >= 100 perl_minor= ${PERL_VERSION:C|^([1-9]+)\.([0-9][0-9][0-9]).*|\2|} perl_patch= ${PERL_VERSION:C|^.*(..)|\1|} .else # ${perl_minor} < 100 -_perl_patch= 0${PERL_VERSION:C|^([1-9]+)\.([0-9]+)\.*|0|} +_perl_patch= 0${PERL_VERSION:C|^([1-9]+)\.([0-9]+)\.*|0|} perl_patch= ${_perl_patch:C|^.*(..)|\1|} .endif # ${perl_minor} < 100 PERL_LEVEL= ${perl_major}${perl_minor}${perl_patch} @@ -160,9 +158,9 @@ PERL= ${LOCALBASE}/bin/perl PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \ - PERL_VER=${PERL_VER} \ - PERL_ARCH=${PERL_ARCH} \ - SITE_PERL=${SITE_PERL_REL} + PERL_VER=${PERL_VER} \ + PERL_ARCH=${PERL_ARCH} \ + SITE_PERL=${SITE_PERL_REL} .if defined(PERL_MODBUILD) PERL_CONFIGURE= ${PERL_MODBUILD} @@ -205,11 +203,11 @@ MAN3PREFIX?= ${PREFIX}/lib/perl5/${PERL_VERSION} .undef HAS_CONFIGURE .endif # defined(PERL_CONFIGURE) -.endif # !defined(_POSTMKINCLUDED) && !defined(_PERLPREMKINCLUDED) +.endif # !defined(_POSTMKINCLUDED) && !defined(Perl_Pre_Include) -.if defined (_POSTMKINCLUDED) && !defined(_PERLPOSTMKINCLUDED) +.if defined(_POSTMKINCLUDED) && !defined(Perl_Post_Include) -_PERLPOSTMKINCLUDED= yes +Perl_Post_Include= bsd.perl.mk .if defined(PERL_CONFIGURE) .if !target(do-configure) @@ -237,4 +235,4 @@ .endif # !target(do-install) .endif # !defined(USE_GMAKE) .endif # defined(PERL_MODBUILD) -.endif # defined (_POSTMKINCLUDED) && !defined(_PERLPOSTMKINCLUDED) +.endif # defined(_POSTMKINCLUDED) && !defined(Perl_Post_Include) From owner-p4-projects@FreeBSD.ORG Fri Aug 17 13:32:07 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AEF9516A468; Fri, 17 Aug 2007 13:32: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 6B26F16A41B for ; Fri, 17 Aug 2007 13:32:07 +0000 (UTC) (envelope-from sat@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4482213C46A for ; Fri, 17 Aug 2007 13:32:07 +0000 (UTC) (envelope-from sat@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 l7HDW73S044326 for ; Fri, 17 Aug 2007 13:32:07 GMT (envelope-from sat@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7HDW6Ri044323 for perforce@freebsd.org; Fri, 17 Aug 2007 13:32:06 GMT (envelope-from sat@freebsd.org) Date: Fri, 17 Aug 2007 13:32:06 GMT Message-Id: <200708171332.l7HDW6Ri044323@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sat@freebsd.org using -f From: Andrew Pantyukhin To: Perforce Change Reviews Cc: Subject: PERFORCE change 125267 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: Fri, 17 Aug 2007 13:32:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=125267 Change 125267 by sat@sat_amilo on 2007/08/17 13:31:21 - Include bsd.perl.mk the second time Affected files ... .. //depot/projects/soc2007/gabor_perlmk/Mk/bsd.port.mk#10 edit Differences ... ==== //depot/projects/soc2007/gabor_perlmk/Mk/bsd.port.mk#10 (text+ko) ==== @@ -1911,6 +1911,10 @@ .include "${PORTSDIR}/Mk/bsd.sdl.mk" .endif +.if defined(USE_PERL5) || defined(USE_PERL5_BUILD) || defined(PERL_CONFIGURE) || defined(PERL_MODBUILD) +.include "${PORTSDIR}/Mk/bsd.perl.mk" +.endif + .if defined(USE_PHP) .include "${PORTSDIR}/Mk/bsd.php.mk" .endif From owner-p4-projects@FreeBSD.ORG Fri Aug 17 15:01:59 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CCB7F16A46D; Fri, 17 Aug 2007 15:01: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 57C9E16A468 for ; Fri, 17 Aug 2007 15:01:58 +0000 (UTC) (envelope-from thioretic@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 48E5C13C48D for ; Fri, 17 Aug 2007 15:01:58 +0000 (UTC) (envelope-from thioretic@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 l7HF1wqY054142 for ; Fri, 17 Aug 2007 15:01:58 GMT (envelope-from thioretic@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7HF1wa7054139 for perforce@freebsd.org; Fri, 17 Aug 2007 15:01:58 GMT (envelope-from thioretic@FreeBSD.org) Date: Fri, 17 Aug 2007 15:01:58 GMT Message-Id: <200708171501.l7HF1wa7054139@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thioretic@FreeBSD.org using -f From: Maxim Zhuravlev To: Perforce Change Reviews Cc: Subject: PERFORCE change 125269 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: Fri, 17 Aug 2007 15:01:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=125269 Change 125269 by thioretic@thioretic on 2007/08/17 15:01:26 Some io/driver interaction Affected files ... .. //depot/projects/soc2007/thioretic_gidl2/kern/ior_if.m#1 add .. //depot/projects/soc2007/thioretic_gidl2/kern/subr_bus.c#5 edit .. //depot/projects/soc2007/thioretic_gidl2/kern/subr_busio.c#5 edit Differences ... ==== //depot/projects/soc2007/thioretic_gidl2/kern/subr_bus.c#5 (text+ko) ==== @@ -1026,6 +1026,28 @@ if (returns_val) \ return (val); +#define FOR_ALL_DRIVERS_REV (exclude_raw, returns_val, return_on_non_zero, func, memb, ...) \ + int level; \ + driverinfolink_t dil; \ + int val = 0; \ + for (level = DRL_LOWEST; level <= DRL_TOPMOST; level++){ \ + if (TAILQ_EMPTY(&dev->drivers[level])) \ + continue; \ + TAILQ_FOREACH (dil, &dev->drivers[level], link){ \ + if (exclude_raw && dil->pdriver->state == DS_RAW) \ + continue; \ + if (returns_val){ \ + val = func (dil->pdriver->##memb , __VA_ARGS__); \ + if (val && return_on_non_zero) \ + return (val); \ + } \ + else \ + func (dil->pdriver->##memb , __VA_ARGS__); \ + } \ + } \ + if (returns_val) \ + return (val); + /** * device control multiplexing entries */ @@ -1192,6 +1214,18 @@ dname, dunit); } +/** + * ior control multiplexing entries + */ + +FUNC (void, PREFIX, do, device_t dev, ior_t r){ + FOR_ALL_DRIVERS (FALSE, FALSE, FALSE, IOR_DO, functional_ops, r); +} + +FUNC (void, PREFIX, done, device_t dev, ior_t r){ + FOR_ALL_DRIVERS_REV (FALSE, FALSE, FALSE, IOR_DO, functional_ops, r); +} + #define DRIVERMETHOD (name, if_prefix, driver_prefix) \ DEVMETHOD (if_prefix##_##name, driver_prefix##_##name) @@ -1226,7 +1260,10 @@ DRIVERMETHOD (child_pnpinfo_str, bus, PREFIX), DRIVERMETHOD (child_location_str, bus, PREFIX), DRIVERMETHOD (config_intr, bus, PREFIX), - DRIVERMETHOD (hinted_child, bus, PREFIX) + DRIVERMETHOD (hinted_child, bus, PREFIX), + + DRIVERMETHOD (do, ior, PREFIX), + DRIVERMETHOD (done, ior, PREFIX) }; static driver_t drv_compat_ctrl_driver = { /*TODO*/ ==== //depot/projects/soc2007/thioretic_gidl2/kern/subr_busio.c#5 (text+ko) ==== @@ -56,6 +56,7 @@ /*ior_link_list_t*/ int children; device_t origin; devicelink_list_t path; + devicelink_t curdev; int queue_id; struct mtx guard_spin_mtx; @@ -98,7 +99,9 @@ work_kthreads_set_number, "I", "Number of kernel threads" "to process queued io requests"); -static void bus_io_process_next_irp (work_kthread_t tp); +static void bus_io_process_next_ior (work_kthread_t tp); +static int ior_do (ior_t r); +static int ior_done (ior_t r); static void work_kthread_proc (void *arg){ @@ -216,7 +219,7 @@ if (r = q.todo) break; } - if (qid = IOR_QUEUES_NUM) + if (qid == IOR_QUEUES_NUM) return (1); ior_lock (r); @@ -234,7 +237,10 @@ r->state = IORS_OWNED; ior_unlock (r); - //deliver ior to first in path driver + if (ior_get_flags(r) &= IORS_DONE) + ior_do (r); + else + ior_done (r); return (0); } @@ -260,7 +266,7 @@ } mtx_init (&new_ior->guard_spin_mtx, - "ior_mtx", NULL, MTX_SPIN); + "ior_mtx", NULL, MTX_SPIN|MTX_RECURSE); if (error = ior_set_path (new_ior, origin, path)){ free (new_ior); free (ils); @@ -388,7 +394,7 @@ mtx_unlock_spin (&q.guard_spin_mtx); - r->queue_id = queue_id; + r->queue_id = queue_id + 1; r->state = IORS_ENQUEUED; ior_unlock (r); @@ -408,7 +414,7 @@ ior_lock (r); - if (r->state == IORS_NONE || r->children){ + if (r->state != IOR_ENQUEUED || r->children){ ior_unlock (r); return (1); } @@ -442,3 +448,39 @@ ior_unlock (ior_t r){ mtx_unlock_spin (&r->guard_spin_mtx); } + +static int +ior_do (ior_t r){ + devicelink_t nextdev; + + ior_lock (r); + + nextdev = TAILQ_NEXT(r->curdev, link); + if (!nextdev){ + return (1); + } + + ior_unlock (r); + + IOR_DO (nextdev->device_ptr, r); + + ior_enqueue_adv (r, r->queue_id); +} + +static int +ior_done (ior_t r){ + devicelink_t nextdev; + + ior_lock (r); + + nextdev = TAILQ_PREV(r->curdev, devicelink_list, link); + if (!nextdev){ + return (1); + } + + ior_unlock (r); + + IOR_DONE (nextdev->device_ptr, r); + + ior_enqueue_adv (r, r->queue_id); +} From owner-p4-projects@FreeBSD.ORG Fri Aug 17 15:37:43 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0762616A419; Fri, 17 Aug 2007 15:37:43 +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 B3AA916A417 for ; Fri, 17 Aug 2007 15:37:42 +0000 (UTC) (envelope-from sat@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A461013C428 for ; Fri, 17 Aug 2007 15:37:42 +0000 (UTC) (envelope-from sat@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 l7HFbg6k057321 for ; Fri, 17 Aug 2007 15:37:42 GMT (envelope-from sat@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7HFbgWv057318 for perforce@freebsd.org; Fri, 17 Aug 2007 15:37:42 GMT (envelope-from sat@freebsd.org) Date: Fri, 17 Aug 2007 15:37:42 GMT Message-Id: <200708171537.l7HFbgWv057318@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sat@freebsd.org using -f From: Andrew Pantyukhin To: Perforce Change Reviews Cc: Subject: PERFORCE change 125270 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: Fri, 17 Aug 2007 15:37:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=125270 Change 125270 by sat@sat_amilo on 2007/08/17 15:37:08 - Drop support for pre-5.6 versioning scheme to simplify perl_level generation - Be more determined when choosing a variable to look for wanted perl version - Rename some vars for more readability - Mask perl_level when minor or patch components are not specified in wanted perl version. E.g. this way 5.8 matches any 5.8.x version - Do not build_depend on perl if onlt use_perl5_run is set Affected files ... .. //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#23 edit Differences ... ==== //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#23 (text+ko) ==== @@ -83,16 +83,11 @@ PERL_VER?= 5.8.8 .if !defined(PERL_LEVEL) && defined(PERL_VERSION) -perl_major= ${PERL_VERSION:C|^([1-9]+).*|\1|} -_perl_minor= 00${PERL_VERSION:C|^([1-9]+)\.([0-9]+).*|\2|} -perl_minor= ${_perl_minor:C|^.*(...)|\1|} -.if ${perl_minor} >= 100 -perl_minor= ${PERL_VERSION:C|^([1-9]+)\.([0-9][0-9][0-9]).*|\2|} -perl_patch= ${PERL_VERSION:C|^.*(..)|\1|} -.else # ${perl_minor} < 100 -_perl_patch= 0${PERL_VERSION:C|^([1-9]+)\.([0-9]+)\.*|0|} -perl_patch= ${_perl_patch:C|^.*(..)|\1|} -.endif # ${perl_minor} < 100 +perl_major= ${PERL_VERSION:C|\..*||} +_perl_minor= ${PERL_VERSION:S|^${perl_major}||:S|^.||:C|\..*||} +_perl_patch= ${PERL_VERSION:S|^${perl_major}||:S|^.${_perl_minor}||:S|^.||:C|\..*||} +perl_minor= ${_perl_minor:S|^|000|:C|.*(...)|\1|} +perl_patch= ${_perl_patch:S|^|00|:C|.*(..)|\1|} PERL_LEVEL= ${perl_major}${perl_minor}${perl_patch} .else PERL_LEVEL= 0 @@ -106,51 +101,60 @@ PERL_PORT?= perl5 .endif -.if defined(USE_PERL5) && ${USE_PERL5} != "yes" -__prefix=${USE_PERL5:C/[^[:digit:].]+$//} -__suffix=${USE_PERL5:C/^[0-9.]+//} +# Decide where to look for the version string +.ifdef USE_PERL5 +USE_PERL5_STRING= ${USE_PERL5} +.elifdef USE_PERL5_BUILD +USE_PERL5_STRING= ${USE_PERL5_BUILD} +.elifdef USE_PERL5_RUN +USE_PERL5_STRING= ${USE_PERL5_RUN} +.elifdef PERL_CONFIGURE +USE_PERL5_STRING= ${PERL_CONFIGURE} +.elifdef PERL_MODBUILD +USE_PERL5_STRING= ${PERL_MODBUILD} +.else +USE_PERL5_STRING= yes +.endif + +.if ${USE_PERL5_STRING} != "yes" +want_perl_sign= ${USE_PERL5_STRING:C|^[0-9.]+||} +want_perl_ver= ${USE_PERL5_STRING:S|${want_perl_sign}$||} +want_perl_major= ${want_perl_ver:C|\..*||} +_want_perl_minor= ${want_perl_ver:S|^${want_perl_major}||:S|^.||:C|\..*||} +_want_perl_patch= ${want_perl_ver:S|^${want_perl_major}||:S|^.${_want_perl_minor}||:S|^.||:C|\..*||} +want_perl_minor= ${_want_perl_minor:S|^|000|:C|.*(...)|\1|} +want_perl_patch= ${_want_perl_patch:S|^|00|:C|.*(..)|\1|} +USE_PERL5_LEVEL= ${want_perl_major}${want_perl_minor}${want_perl_patch} -_u_perl_major= ${__prefix:C|^([1-9]+).*|\1|} -_u__perl_minor= 00${__prefix:C|^([1-9]+)\.([0-9]+).*|\2|} -_u_perl_minor= ${_u__perl_minor:C|^.*(...)|\1|} -.if ${_u_perl_minor} >= 100 -_u_perl_minor= ${__prefix:C|^([1-9]+)\.([0-9][0-9][0-9]).*|\2|} -_u_perl_patch= ${__prefix:C|^.*(..)|\1|} -.else # ${_u_perl_minor} < 100 -_u__perl_patch= 0${__prefix:C|^([1-9]+)\.([0-9]+)\.*|0|} -_u_perl_patch= ${_u__perl_patch:C|^.*(..)|\1|} -.endif # ${_u_perl_minor} < 100 -USE_PERL5_LEVEL= ${_u_perl_major}${_u_perl_minor}${_u_perl_patch} +# Mask unspecified components. E.g. this way "5" will match any "5.x.x". +.if empty(_want_perl_minor) +masked_PERL_LEVEL= ${PERL_LEVEL:C|(.....)$|00000|} +.elif empty(_want_perl_patch) +masked_PERL_LEVEL= ${PERL_LEVEL:C|(..)$|00|} +.else +masked_PERL_LEVEL= ${PERL_LEVEL} +.endif -.if ${__suffix} == "+" -.if ${USE_PERL5_LEVEL} > ${PERL_LEVEL} -USE_PERL5_REASON?= requires Perl ${__prefix} or later, install lang/perl5.8 and try again +.if ${want_perl_sign} == "+" +.if ${USE_PERL5_LEVEL} > ${masked_PERL_LEVEL} +USE_PERL5_REASON?= requires Perl ${want_perl_ver} or later, install lang/perl5.8 and try again IGNORE= ${USE_PERL5_REASON} -.endif # ${USE_PERL5_LEVEL} > ${PERL_LEVEL} -.elif ${__suffix} == "" -.if ${USE_PERL5_LEVEL} != ${PERL_LEVEL} -USE_PERL5_REASON?= requires Perl ${__prefix} exactly +.endif # ${USE_PERL5_LEVEL} > ${masked_PERL_LEVEL} +.elif ${want_perl_sign} == "" +.if ${USE_PERL5_LEVEL} != ${masked_PERL_LEVEL} +USE_PERL5_REASON?= requires Perl ${want_perl_ver} exactly IGNORE= ${USE_PERL5_REASON} -.endif # ${USE_PERL5_LEVEL} != ${PERL_LEVEL} -.elif ${__suffix} == "-" -.if ${USE_PERL5_LEVEL} <= ${PERL_LEVEL} -USE_PERL5_REASON?= requires a Perl version earlier than ${__prefix} +.endif # ${USE_PERL5_LEVEL} != ${masked_PERL_LEVEL} +.elif ${want_perl_sign} == "-" +.if ${USE_PERL5_LEVEL} <= ${masked_PERL_LEVEL} +USE_PERL5_REASON?= requires a Perl version earlier than ${want_perl_ver} IGNORE= ${USE_PERL5_REASON} -.endif # ${USE_PERL5_LEVEL} <= ${PERL_LEVEL} +.endif # ${USE_PERL5_LEVEL} <= ${masked_PERL_LEVEL} .else # wrong suffix -.BEGIN: - @${ECHO_MSG} "${PKGNAME}: Makefile error: inproper use of USE_PERL5" - @${FALSE} +IGNORE= improper use of USE_PERL5 .endif -.endif #defined(USE_PERL5) && ${USE_PERL5} != "yes" +.endif #${USE_PERL5_STRING} != "yes" -.if defined(USE_PERL5_RUN) -USE_PERL5= ${USE_PERL5_RUN} -.endif -.if defined(USE_PERL5_BUILD) -USE_PERL5= ${USE_PERL5_BUILD} -.endif - SITE_PERL_REL?= lib/perl5/site_perl/${PERL_VER} SITE_PERL?= ${LOCALBASE}/${SITE_PERL_REL} @@ -163,7 +167,7 @@ SITE_PERL=${SITE_PERL_REL} .if defined(PERL_MODBUILD) -PERL_CONFIGURE= ${PERL_MODBUILD} +PERL_CONFIGURE= yes CONFIGURE_SCRIPT?= Build.PL .if ${PORTNAME} != Module-Build BUILD_DEPENDS+= ${SITE_PERL}/Module/Build.pm:${PORTSDIR}/devel/p5-Module-Build @@ -183,15 +187,16 @@ .endif # defined(PERL_MODBUILD) .if defined(PERL_CONFIGURE) -USE_PERL5= ${PERL_CONFIGURE} .if defined(BATCH) && !defined(IS_INTERACTIVE) CONFIGURE_ENV+= PERL_MM_USE_DEFAULT="YES" .endif # defined(BATCH) && !defined(IS_INTERACTIVE) .endif # defined(PERL_CONFIGURE) +.if defined(USE_PERL5) || defined(USE_PERL5_BUILD) EXTRACT_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT} PATCH_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT} BUILD_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT} +.endif .if defined(USE_PERL5) || defined(USE_PERL5_RUN) RUN_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT} .endif From owner-p4-projects@FreeBSD.ORG Fri Aug 17 15:39:46 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EFE7A16A421; Fri, 17 Aug 2007 15:39: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 BDC8216A41B for ; Fri, 17 Aug 2007 15:39:45 +0000 (UTC) (envelope-from sat@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AF5CA13C474 for ; Fri, 17 Aug 2007 15:39:45 +0000 (UTC) (envelope-from sat@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 l7HFdjEU057388 for ; Fri, 17 Aug 2007 15:39:45 GMT (envelope-from sat@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7HFdjrf057385 for perforce@freebsd.org; Fri, 17 Aug 2007 15:39:45 GMT (envelope-from sat@freebsd.org) Date: Fri, 17 Aug 2007 15:39:45 GMT Message-Id: <200708171539.l7HFdjrf057385@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sat@freebsd.org using -f From: Andrew Pantyukhin To: Perforce Change Reviews Cc: Subject: PERFORCE change 125271 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: Fri, 17 Aug 2007 15:39:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=125271 Change 125271 by sat@sat_amilo on 2007/08/17 15:38:53 - Let perl_modbuild be more significant than perl_configure when looking for wanted perl version Affected files ... .. //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#24 edit Differences ... ==== //depot/projects/soc2007/gabor_perlmk/Mk/bsd.perl.mk#24 (text+ko) ==== @@ -108,10 +108,10 @@ USE_PERL5_STRING= ${USE_PERL5_BUILD} .elifdef USE_PERL5_RUN USE_PERL5_STRING= ${USE_PERL5_RUN} +.elifdef PERL_MODBUILD +USE_PERL5_STRING= ${PERL_MODBUILD} .elifdef PERL_CONFIGURE USE_PERL5_STRING= ${PERL_CONFIGURE} -.elifdef PERL_MODBUILD -USE_PERL5_STRING= ${PERL_MODBUILD} .else USE_PERL5_STRING= yes .endif From owner-p4-projects@FreeBSD.ORG Fri Aug 17 20:10:25 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D174416A41B; Fri, 17 Aug 2007 20:10:24 +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 AAA6C16A417 for ; Fri, 17 Aug 2007 20:10:24 +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 5629713C49D for ; Fri, 17 Aug 2007 20:10:24 +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 l7HKAOs9088855 for ; Fri, 17 Aug 2007 20:10:24 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7HKAO4D088852 for perforce@freebsd.org; Fri, 17 Aug 2007 20:10:24 GMT (envelope-from zec@FreeBSD.org) Date: Fri, 17 Aug 2007 20:10:24 GMT Message-Id: <200708172010.l7HKAO4D088852@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 125276 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: Fri, 17 Aug 2007 20:10:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=125276 Change 125276 by zec@zec_tpx32 on 2007/08/17 20:10:08 Restore support for RFC1724-style addressing of interfaces (where 0.0.0.0/8 is interpreted as interface index) in our IPv4 multicast API (well, at least in some code paths). Without this neither RIP nor OSPF can work with quagga, neither on a clean kernel nor with options VIMAGE builds - strange that I'm the only one who has been hit by this? Affected files ... .. //depot/projects/vimage/src/sys/netinet/in_mcast.c#5 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet/in_mcast.c#5 (text+ko) ==== @@ -120,6 +120,8 @@ static int inp_leave_group(struct inpcb *, struct sockopt *); static int inp_set_multicast_if(struct inpcb *, struct sockopt *); static int inp_set_source_filters(struct inpcb *, struct sockopt *); +static struct ifnet * + ip_multicast_if(struct in_addr *a); /* * Resize the ip_moptions vector to the next power-of-two minus 1. @@ -1032,9 +1034,9 @@ * If all of these conditions fail, return EADDRNOTAVAIL, and * reject the IPv4 multicast join. */ - if (mreqs.imr_interface.s_addr != INADDR_ANY) { - INADDR_TO_IFP(mreqs.imr_interface, ifp); - } else { + if (mreqs.imr_interface.s_addr != INADDR_ANY) + ifp = ip_multicast_if(&mreqs.imr_interface); + else { struct route ro; ro.ro_rt = NULL; @@ -1414,7 +1416,6 @@ inp_set_multicast_if(struct inpcb *inp, struct sockopt *sopt) { INIT_VNET_NET(curvnet); - INIT_VNET_INET(curvnet); struct in_addr addr; struct ip_mreqn mreqn; struct ifnet *ifp; @@ -1453,7 +1454,7 @@ if (addr.s_addr == INADDR_ANY) { ifp = NULL; } else { - INADDR_TO_IFP(addr, ifp); + ifp = ip_multicast_if(&addr); if (ifp == NULL) return (EADDRNOTAVAIL); } @@ -1839,3 +1840,25 @@ return (error); } + +/* + * following RFC1724 section 3.3, 0.0.0.0/8 is interpreted as interface index. + */ +static struct ifnet * +ip_multicast_if(struct in_addr *a) +{ + INIT_VNET_NET(curvnet); + INIT_VNET_INET(curvnet); + int ifindex; + struct ifnet *ifp; + + if (ntohl(a->s_addr) >> 24 == 0) { + ifindex = ntohl(a->s_addr) & 0xffffff; + if (ifindex < 0 || V_if_index < ifindex) + return NULL; + ifp = ifnet_byindex(ifindex); + } else + INADDR_TO_IFP(*a, ifp); + return ifp; +} + From owner-p4-projects@FreeBSD.ORG Fri Aug 17 20:57:23 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E22AB16A46B; Fri, 17 Aug 2007 20:57:22 +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 84A6E16A418 for ; Fri, 17 Aug 2007 20:57:22 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 71FB113C465 for ; Fri, 17 Aug 2007 20:57:22 +0000 (UTC) (envelope-from jbr@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 l7HKvMgg000827 for ; Fri, 17 Aug 2007 20:57:22 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7HKvMhw000824 for perforce@freebsd.org; Fri, 17 Aug 2007 20:57:22 GMT (envelope-from jbr@FreeBSD.org) Date: Fri, 17 Aug 2007 20:57:22 GMT Message-Id: <200708172057.l7HKvMhw000824@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125277 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: Fri, 17 Aug 2007 20:57:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=125277 Change 125277 by jbr@jbr_bob on 2007/08/17 20:56:31 now with getpid and fork Affected files ... .. //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#16 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/exec.h#4 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/sys/types.h#2 edit .. //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_glue.c#2 edit .. //depot/projects/soc2007/jbr-syscall/tests/fork.c#1 add .. //depot/projects/soc2007/jbr-syscall/tests/getpid.c#1 add Differences ... ==== //depot/projects/soc2007/jbr-syscall/src/sys/kern/kern_exec.c#16 (text+ko) ==== @@ -454,7 +454,6 @@ */ if (imgp->interpreted) { exec_unmap_first_page(imgp); - exec_unmap_sysshm(imgp); /* * VV_TEXT needs to be unset for scripts. There is a short * period before we determine that something is a script where @@ -911,24 +910,21 @@ struct image_params *imgp; { int error; + struct proc *p = imgp->proc; vm_map_t map = &imgp->proc->p_vmspace->vm_map; vm_offset_t *addr = &imgp->proc->p_usrsysshm; - int test = 42; + struct sysshm outsysshm; error = vm_map_sysshm(map, addr, 42); - copyout((caddr_t) &test, (caddr_t) *addr, sizeof(int)); + outsysshm.pid = p->p_pid; + strncpy(outsysshm.progtitle, p->p_comm, MAXCOMLEN); + strncpy(outsysshm.proctitle, "\0", 1); + copyout((caddr_t) &outsysshm, (caddr_t) *addr, sizeof(struct sysshm)); return(error); } -void -exec_unmap_sysshm(imgp) - struct image_params *imgp; -{ - -} - /* * Destroy old address space, and allocate a new stack * The new stack is only SGROWSIZ large because it is grown ==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/exec.h#4 (text+ko) ==== @@ -75,7 +75,6 @@ void exec_unmap_first_page(struct image_params *); int exec_map_sysshm(struct image_params *); -void exec_unmap_sysshm(struct image_params *); int exec_register(const struct execsw *); int exec_unregister(const struct execsw *); ==== //depot/projects/soc2007/jbr-syscall/src/sys/sys/types.h#2 (text+ko) ==== @@ -372,6 +372,12 @@ __END_DECLS #endif /* !_KERNEL */ +struct sysshm { + pid_t pid; + char progtitle[20]; + char proctitle[2048]; +}; + #endif /* __BSD_VISIBLE */ #endif /* !_SYS_TYPES_H_ */ ==== //depot/projects/soc2007/jbr-syscall/src/sys/vm/vm_glue.c#2 (text+ko) ==== @@ -511,6 +511,7 @@ int flags; { struct proc *p1 = td->td_proc; + struct sysshm sysshm; if ((flags & RFPROC) == 0) { /* @@ -542,6 +543,16 @@ shmfork(p1, p2); } + + p2->p_usrsysshm = p1->p_usrsysshm - + (vm_offset_t) p1->p_vmspace->vm_daddr + + (vm_offset_t) p2->p_vmspace->vm_daddr; + + copyin((caddr_t) p1->p_usrsysshm, (caddr_t) &sysshm, + sizeof(struct sysshm)); + sysshm.pid = p2->p_pid; + copyout((caddr_t) &sysshm, (caddr_t) p2->p_usrsysshm, + sizeof(struct sysshm)); /* * cpu_fork will copy and update the pcb, set up the kernel stack, * and make the child ready to run. From owner-p4-projects@FreeBSD.ORG Fri Aug 17 20:57:23 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C388F16A50A; Fri, 17 Aug 2007 20:57:23 +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 10BD516A4A6 for ; Fri, 17 Aug 2007 20:57:23 +0000 (UTC) (envelope-from jbr@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B202613C46A for ; Fri, 17 Aug 2007 20:57:22 +0000 (UTC) (envelope-from jbr@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 l7HKvMoO000833 for ; Fri, 17 Aug 2007 20:57:22 GMT (envelope-from jbr@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7HKvMH0000830 for perforce@freebsd.org; Fri, 17 Aug 2007 20:57:22 GMT (envelope-from jbr@FreeBSD.org) Date: Fri, 17 Aug 2007 20:57:22 GMT Message-Id: <200708172057.l7HKvMH0000830@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jbr@FreeBSD.org using -f From: Jesper Brix Rosenkilde To: Perforce Change Reviews Cc: Subject: PERFORCE change 125278 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: Fri, 17 Aug 2007 20:57:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=125278 Change 125278 by jbr@jbr_bob on 2007/08/17 20:57:04 forgot to add my small libc Affected files ... .. //depot/projects/soc2007/jbr-syscall/tests/mlibc/mlibc.c#1 add .. //depot/projects/soc2007/jbr-syscall/tests/mlibc/mlibc.h#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Fri Aug 17 23:52:37 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4524C16A41B; Fri, 17 Aug 2007 23:52:37 +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 F2E7016A419 for ; Fri, 17 Aug 2007 23:52:36 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DDB5C13C46B for ; Fri, 17 Aug 2007 23:52:36 +0000 (UTC) (envelope-from ivoras@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 l7HNqaux016172 for ; Fri, 17 Aug 2007 23:52:36 GMT (envelope-from ivoras@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7HNqaUI016169 for perforce@freebsd.org; Fri, 17 Aug 2007 23:52:36 GMT (envelope-from ivoras@FreeBSD.org) Date: Fri, 17 Aug 2007 23:52:36 GMT Message-Id: <200708172352.l7HNqaUI016169@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ivoras@FreeBSD.org using -f From: Ivan Voras To: Perforce Change Reviews Cc: Subject: PERFORCE change 125281 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: Fri, 17 Aug 2007 23:52:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=125281 Change 125281 by ivoras@ivoras_finstall on 2007/08/17 23:51:52 - Polished the UI a little - Started working on partitioning primitives Affected files ... .. //depot/projects/soc2007/ivoras_finstall/installer/basewin.py#4 edit .. //depot/projects/soc2007/ivoras_finstall/installer/finstall.py#10 edit .. //depot/projects/soc2007/ivoras_finstall/installer/glade/helpdialog.glade#2 edit .. //depot/projects/soc2007/ivoras_finstall/installer/glade/installprogress.glade#1 add .. //depot/projects/soc2007/ivoras_finstall/installer/glade/intro.glade#1 add .. //depot/projects/soc2007/ivoras_finstall/installer/glade/mainwin.glade#9 edit .. //depot/projects/soc2007/ivoras_finstall/installer/glade/ndefaultfs.glade#1 add .. //depot/projects/soc2007/ivoras_finstall/installer/glade/ndisks.glade#4 edit .. //depot/projects/soc2007/ivoras_finstall/installer/glade/nparts.glade#1 add .. //depot/projects/soc2007/ivoras_finstall/installer/glade/nverify.glade#1 add .. //depot/projects/soc2007/ivoras_finstall/installer/helpdialog.py#3 edit .. //depot/projects/soc2007/ivoras_finstall/installer/text/intro.txt#4 edit .. //depot/projects/soc2007/ivoras_finstall/installer/text/ndefaultfs.txt#1 add .. //depot/projects/soc2007/ivoras_finstall/installer/text/ndisks.txt#2 edit .. //depot/projects/soc2007/ivoras_finstall/installer/text/nverify.txt#1 add .. //depot/projects/soc2007/ivoras_finstall/installer/text/nverify_template.txt#1 add .. //depot/projects/soc2007/ivoras_finstall/pybackend/freebsd.py#5 edit .. //depot/projects/soc2007/ivoras_finstall/pybackend/systoold.py#6 edit .. //depot/projects/soc2007/ivoras_finstall/pybackend/systoolengine.py#7 edit .. //depot/projects/soc2007/ivoras_finstall/pybackend/xmldict.py#5 edit Differences ... ==== //depot/projects/soc2007/ivoras_finstall/installer/basewin.py#4 (text+ko) ==== @@ -40,12 +40,43 @@ def _load_label(self, label, file_name, dir="text"): - """Returns the content of a text/* file with formatting replacements - so it looks decent when Pango renders it""" - label.set_text(file("%s/%s" % (dir, file_name)).read().replace("\n", " ").replace("
", "\n").replace("\n ", "\n")) + """Retrieves the content of a text/* file with formatting replacements + so it looks decent when Pango renders it and sets the result to the + given label control""" + label.set_text(self._get_text(file_name, dir)) + label.set_use_markup(True) + + + def _set_label(self, label, txt): + """Sets the content of the given label-ish control to a text with + markup tags""" + label.set_text(txt) label.set_use_markup(True) + def _get_text(self, file_name, dir="text"): + return self._process_markup(file("%s/%s" % (dir, file_name)).read()) + + + def _process_markup(self, txt): + """Processes the text from a non-standard combination of wiki markup + and HTML (similar to that of WordPress) into HTML that can be rendered + by Gnome's Pango in label controls.""" + txt = txt.strip(" ") + buf = "" # This is not optimal performance-wise, but it's convenient + for para in txt.split("\n\n"): + if buf != "": + buf += "\n\n" + para = para.replace("\n", " ") + buf += self._process_markup_para(para).replace("
", "\n") + return buf + + + def _process_markup_para(self, txt): + """Processes a single paragraph for _process_markup()""" + return txt # TODO + + def _clear_container(self, cont): for child in cont.get_children(): cont.remove(child) @@ -55,8 +86,9 @@ """Displays a message box""" dlg = gtk.MessageDialog(self.window, flags=gtk.DIALOG_MODAL, type=p_type, buttons=p_buttons, message_format=text) dlg.set_title(title) - dlg.run() + result = dlg.run() dlg.destroy() + return result def _make_column(self, name, listid, sort=False): ==== //depot/projects/soc2007/ivoras_finstall/installer/finstall.py#10 (text+ko) ==== @@ -31,6 +31,11 @@ from basewin import BaseWin from helpdialog import HelpDialog + +class InstallerException(Exception): + pass + + class MainWin(BaseWin): # Configured tracks @@ -38,7 +43,9 @@ { "tile" : "intro" }, { "tile" : "ndisks" }, { "tile" : "nparts" }, - { "tile" : "nfilesys" } + { "tile" : "ndefaultfs" }, + { "tile" : "nverify" }, + { "tile" : "ninstall" } ] @@ -49,9 +56,10 @@ self["img_logo"].set_from_file("img/logo.jpg") # img_logo stretches the window vertically, so calling window.set_position() has no affect self._center_window(self.window) - self.step_current = 0 + self.step_current = -1 + self.step_next = 0 self.step_track = MainWin.Steps_Novice - self._load_tile_nr(self.step_current) + self._load_tile_nr(self.step_next) self.backtrack = [] @@ -89,14 +97,17 @@ def _load_tile_nr(self, tile_nr): """Loads a (numerated) tile from the current step_track""" self._load_tile(self.step_track[tile_nr]["tile"]) + self.step_current = tile_nr + self.step_next = tile_nr + 1 def _set_next_tile(self, tile): found = False for i, t in enumerate(self.step_track): if t["tile"] == tile: - self.step_current = i-1 # Actually this is not a clean hack, but it'll do for now + self.step_next = i # Actually this is not a clean hack, but it'll do for now found = True + break if not found: logging.error("_set_next_tile cannot set tile to %s. Bogosity ahead." % tile) @@ -122,7 +133,7 @@ def initial_tasks(self): """Perform initial tasks after the GUI is running. For now, set up connection to the SysToolD server""" - self.server = ServerProxy("http://localhost:1025") + self.server = ServerProxy("http://localhost:1025", allow_none=True) try: caps = self.server.GetCaps() except: @@ -150,10 +161,7 @@ logging.exception("Error executing on_next handler in %s" % self.step_track[self.step_current]["tile"]) return self.backtrack.append(self.step_track[self.step_current]["tile"]) - self.step_current += 1 - if self.step_current >= len(self.step_track): - self.step_current = 0 # XXX: Fix by disabling next/previous - self._load_tile_nr(self.step_current) + self._load_tile_nr(self.step_next) def on_button_previous_clicked(self, obj): @@ -172,6 +180,7 @@ return if len(self.backtrack) == 0: self.step_current = 0 + self.step_next = 1 else: tile = self.backtrack.pop() self.step_current = -1 @@ -180,12 +189,20 @@ self.step_current = i if self.step_current < 0: self._show_message("Cannot find tile %s" % tile, "Error", p_type.gtk.MESSAGE_ERROR) + else: + self.step_next = self.step_current + 1 self._load_tile_nr(self.step_current) def on_button_help_clicked(self, obj): help = HelpDialog(self.step_track[self.step_current]["tile"]) help.window.show() + + + def on_button_cancel_clicked(self, obj): + res = self._show_message("Do you really want to cancel?", "Cancel?", gtk.BUTTONS_YES_NO, gtk.MESSAGE_QUESTION) + if res == gtk.RESPONSE_YES: + sys.exit(0) # Handlers for "intro" tile @@ -230,19 +247,30 @@ def ndisks_on_next(self): row, col = self["disktree"].get_cursor() if row == None or type(row) != type((1,)): - self._show_message("You need to pick a drive onto which FreeBSD will be installed.", "User intervention required") + self._show_message("You need to pick a drive onto which FreeBSD will be installed.", + "User intervention required") return False model = self["disktree"].get_model() drive = model.get_value(model.get_iter(row), 0) - logging.info("ndisks.drive=%s" % drive) + size = model.get_value(model.get_iter(row), 2).split(" ")[0] + logging.info("ndisks.drive=%s, ndisks.size=%s" % (drive, size)) self.trackdata["drive"] = drive + self.trackdata["drive_size"] = int(size) + physmem = self.server.GetPhysMem() + if self.trackdata["drive_size"] < 2048+physmem: + self._show_message("The drive you want to install FreeBSD on (%s) is too small.\n" + "You will need at least %d MB of disk space to install FreeBSD and a selection of packages." % (self.trackdata["drive"], 2048+physmem), + "Drive too small") + return False parts = self.server.GetDrivePartitions(drive) if len(parts) == 0: # The drive is not partitioned, so mark it for default configuration self.trackdata["parts"] = None logging.info("Drive %s is not partitioned" % drive) - self._set_next_tile("nfilesys") + self._set_next_tile("ndefaultfs") else: + # The drive is partitioned, so it's either an upgrade or the user wants + # to install it in empty space. self.trackdata["parts"] = parts logging.info("Drive %s is partitioned" % drive) self._set_next_tile("nparts") @@ -266,7 +294,213 @@ return True -os.chdir(os.path.split(sys.argv[0])[0]) # attempt to chdir into the directory where the script is located + def ndefaultfs_on_load(self): + self._load_label(self["label2"], "ndefaultfs.txt") + return True + + + def ndefaultfs_on_next(self): + """ + We'll calculate the default partition scheme here. The overall goal is to make + the following separate file systems: + / + swap + /usr/local + /var + /home + and a symlink from /usr/ports to /usr/local/ports. + This is a slight deviation from the way FreeBSD is usually partitioned, but I feel + that having the whole base system on the root partition is a good thing for a novice + user. The only thing not belonging here is the ports tree, which can get huge, so + we'll move it to /usr/local. + We'll also not use the traditional BSD layout of bsdlabels (a=root, b=swap), except + for the unfortunately special "c" label. + """ + + if self["radio_ufs"].get_active(): + self.trackdata["default_fs"] = "UFS+SU" + elif self["radio_ufsgj"].get_active(): + self.trackdata["default_fs"] = "UFS+GJ" + elif self["radio_zfs"].get_active(): + self.trackdata["default_fs"] = "ZFS" + elif self["radio_ext2"].get_active(): + self.trackdata["default_fs"] = "Ext2" + else: + raise InstallerException, "Cannot determine what default fs the user wants" + fs = self.trackdata["default_fs"] + physmem = self.server.GetPhysMem() + # Do some sanity checking + if fs == "ZFS": + # Check for memory + if physmem < 1024: + self._show_message("The system on which you are installing FreeBSD has less than 1 GB of memory.\n" + "It's not recomended to use ZFS on systems with less then 1 GB of memory\n" + "because it can provoke a system crash in low memory situations." + "Proceed at your own risk.", "Not enough memory") + if fs == "UFS+GJ": + # gjournal is a specific beast because it needs 1 GB of additional space per file system. + # To avoid popular outrage, we'll use it only for /usr/local and /home, and + # silently fallback to UFS+SU for the rest. For the first approximation, assume we'll need + # around 2 GB for the FreeBSD base system + etcetera, two 1 GB gjournals, and a physmem-sized + # swap. + if self.trackdata["drive_size"] < 1024*4+physmem: + self._show_message("The drive you want to install FreeBSD on (%s) is too small to use with gjournal.\n" + "You will need at least 4 GB of disk space to use gjournal.", "Drive too small", p_type=gtk.MESSAGE_ERROR) + return False + if fs == "Ext2": + # Just warn the user + self._show_message("You have selected the Ext2 file system. This file system has NO DATA RELIABILITY FEATURES.\n" + "In case of unexpected system shutdown (e.g. a power outage, a system crash), you might not\n" + "find your data where you left it.", "Ext2 doesn't have data reliability features") + + # Calculate the partitioning scheme + var_size = min(2048, int(self.trackdata["drive_size"] * 0.1)) + usrlocal_size = min(10240, int(self.trackdata["drive_size"] * 0.3)) + + if fs in ("UFS+SU", "UFS+GJ", "Ext2"): + # "Normal" file systems, unix-like + if fs == "UFS+GJ" : # Don't use gjournal for all file systems + var_fs = "UFS+SU" + else: + var_fs = fs + parts = [] + self.trackdata["new_parts"] = parts # a reference + parts.append({ + "base" : self.trackdata["drive"], + "type" : "fdisk", + "size" : 512, + "name" : "%ss1" % self.trackdata["drive"], + "mount" : "/", + "fs" : "UFS+SU" + }) + parts.append({ + "base" : self.trackdata["drive"], + "type" : "fdisk", + "size" : physmem, + "name" : "%ss2" % self.trackdata["drive"], + "mount" : "swap", + "fs" : "swap" + }) + parts.append({ + "base" : self.trackdata["drive"], + "type" : "fdisk", + "size" : self.trackdata["drive_size"] - parts[0]["size"] - parts[1]["size"], # i.e. all the rest + "name" : "%ss3" % self.trackdata["drive"], + "mount" : None, + "fs" : None + }) + parts.append({ + "base" : parts[2]["name"], + "type" : "bsdlabel", + "size" : var_size, + "name" : "%sa" % parts[2]["name"], + "mount" : "/var", + "fs" : var_fs + }) + parts.append({ + "base" : parts[2]["name"], + "type" : "bsdlabel", + "size" : usrlocal_size, + "name" : "%sb" % parts[2]["name"], + "mount" : "/usr/local", + "fs" : fs + }) + parts.append({ + "base" : parts[2]["name"], + "type" : "bsdlabel", + "size" : parts[2]["size"] - parts[3]["size"] - parts[4]["size"], + "name" : "%sd" % parts[2]["name"], + "mount" : "/home", + "fs" : fs + }) + elif fs == "ZFS": + parts = [] + self.trackdata["new_parts"] = parts + # The root file system will be UFS, but all the rest we'll set to ZFS, + # including the swap. Since we'll boot from the root file system, + # we need to encapsulate ZFS in fdisk partition + parts.append({ + "base" : self.trackdata["drive"], + "type" : "fdisk", + "size" : 512, + "name" : "%ss1" % self.trackdata["drive"], + "mount" : "/", + "fs" : "UFS+SU" + }) + parts.append({ + "base" : self.trackdata["drive"], + "type" : "fdisk", + "size" : self.trackdata["drive_size"] - parts[0]["size"], + "name" : "%ss2" % self.trackdata["drive"], + "mount" : None, + "fs" : None + }) + parts.append({ + "base" : parts[1]["name"], + "type" : "zpool", + "size" : parts[1]["size"], + "name" : "FreeBSD", + "mount" : None, + "fs" : None + }) + parts.append({ + "base" : parts[2]["name"], + "type" : "zvol", + "size" : physmem, + "name" : "swap", + "mount" : "swap", + "fs" : "swap" + }) + parts.append({ + "base" : parts[2]["name"], + "type" : "zfs", + "size" : var_size, + "name" : "%s/var" % parts[2]["name"], + "mount" : "/var", + "fs" : "ZFS" + }) + parts.append({ + "base" : parts[2]["name"], + "type" : "zfs", + "size" : usrlocal_size, + "name" : "%s/usrlocal" % parts[2]["name"], + "mount" : "/usr/local", + "fs" : "ZFS" + }) + parts.append({ + "base" : parts[2]["name"], + "type" : "zfs", + "size" : None, + "name" : "%s/home" % parts[2]["name"], + "mount" : "/home", + "fs" : "ZFS" + }) + + return True + + + def nverify_on_load(self): + self._load_label(self["label2"], "nverify.txt") + txt = self._get_text("nverify_template.txt") + txt = txt.replace("{$drive}", self.trackdata["drive"]) + txt = txt.replace("{$drive_size}", str(self.trackdata["drive_size"])) + txt = txt.replace("{$default_fs}", self.trackdata["default_fs"]) + + parts_txt = "" + for part in self.trackdata["new_parts"]: + parts_txt += "\tName: %s\n\tSize: %d MB\n\tMount point: %s\n\tFile system: %s\n\n" % (part["name"], part["size"], part["mount"], part["fs"]) + txt = txt.replace("{$new_parts}", parts_txt) + + self._set_label(self["verifytext"], txt) + return True + + + + +my_dir = os.path.split(sys.argv[0])[0] +if my_dir != "": + # attempt to chdir into the directory where the script is located + os.chdir(my_dir) logging.basicConfig(level=logging.DEBUG) w = MainWin() ==== //depot/projects/soc2007/ivoras_finstall/installer/glade/helpdialog.glade#2 (text+ko) ==== ==== //depot/projects/soc2007/ivoras_finstall/installer/glade/mainwin.glade#9 (text+ko) ==== @@ -65,7 +65,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 0 - This installer application will guide you through FreeBSD's install and setup process. FreeBSD is a popular open source operating system, the result of volundeer work of hundreds of individuals... + This installer application will guide you through FreeBSD's install and setup process. FreeBSD is a popular open source operating system, the result of volunteer work of hundreds of individuals... True True @@ -99,6 +99,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 Novice + 0 True True @@ -113,6 +114,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 Standard + 0 True True radiobutton1 @@ -129,6 +131,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 Expert + 0 True True radiobutton1 @@ -171,6 +174,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-help True + 0 @@ -181,6 +185,8 @@ True gtk-cancel True + 0 + 1 @@ -193,6 +199,7 @@ True gtk-media-previous True + 0 @@ -206,6 +213,7 @@ True gtk-media-next True + 0 ==== //depot/projects/soc2007/ivoras_finstall/installer/glade/ndisks.glade#4 (text+ko) ==== @@ -1,6 +1,6 @@ - + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -47,7 +47,6 @@ True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 True @@ -55,9 +54,6 @@ 2 - - - ==== //depot/projects/soc2007/ivoras_finstall/installer/helpdialog.py#3 (text+ko) ==== ==== //depot/projects/soc2007/ivoras_finstall/installer/text/intro.txt#4 (text+ko) ==== @@ -1,6 +1,7 @@ Welcome to FreeBSD, a free and Open source operating system that is the result of hundreds of volunteers worldwide. FreeBSD is modern and high-performance -operating system that aims to do everything... -

-FreeBSD is licensed under the famous BSD license as presented on TV... -
+Unix-like operating system that can be used for various tasks, from network servers +to desktop systems. + +FreeBSD is Copyright (c) 2007., The FreeBSD Project, all rights reserved. +FreeBSD is distributed under the 2-clause BSD license. ==== //depot/projects/soc2007/ivoras_finstall/installer/text/ndisks.txt#2 (text+ko) ==== @@ -1,4 +1,3 @@ The first step to installing FreeBSD on your computer is choosing storage space for it on your hard drive. In the following table you'll need to select a hard drive to contain FreeBSD. - ==== //depot/projects/soc2007/ivoras_finstall/pybackend/freebsd.py#5 (text+ko) ==== @@ -22,6 +22,7 @@ # Interface to (most) FreeBSD's low-level utilities import os, sys +import re import xmldict cmd_sysctl = "/sbin/sysctl" @@ -32,10 +33,14 @@ file_dmesg = "/var/run/dmesg.boot" -def get_sysctl(name): +def get_sysctl(name, b_flag = False): global cmd_sysctl - str = os.popen("%s -b %s" % (cmd_sysctl, name)).read().strip() - while str[-1] == "\0": + if b_flag: + str = os.popen("%s -b %s" % (cmd_sysctl, name)).read().strip() + else: + str = os.popen("%s %s" % (cmd_sysctl, name)).read().strip() + str = str.split(": ")[1] + while len(str) > 0 and str[-1] == "\0": str = str[:-1] return str @@ -50,7 +55,7 @@ def get_geom_xml(): - return xmldict.buildxmldict(get_sysctl("kern.geom.confxml")) + return xmldict.buildxmldict(get_sysctl("kern.geom.confxml", True)) def guess_fs_type(dev): @@ -73,13 +78,26 @@ return "XFS" elif guess.find("ReiserFS") != -1: return "ReiserFS" - elif guess.find("Unix Fast File system v2") != -1: + elif guess.find("Unix Fast File system [v2]") != -1: return "UFS2" elif guess.find("Unix Fast File system") != -1: return "UFS" return "(unknown)" +def guess_fs_last_mount(dev, fs_type="UFS"): + global cmd_file + if not fs_type in ("UFS2", "UFS"): # For now, we only know how to handle UFS + return None + if not dev.startswith("/dev/"): + dev = "/dev/%s" % dev + guess = get_cmd_output("%s %s" % (cmd_file, dev)) + m = re.search("last mounted on (.+),", guess) + if m == None: + return None + return m.group(1) + + if __name__ == "__main__": xml = get_geom_xml() for cls in xml["mesh"]["class"]: ==== //depot/projects/soc2007/ivoras_finstall/pybackend/systoold.py#6 (text+ko) ==== @@ -72,7 +72,7 @@ engine = SysToolEngine() -server = SimpleXMLRPCServer((bind_host, bind_port), SimpleXMLRPCRequestHandler, globals.debug_level > 0) +server = SimpleXMLRPCServer((bind_host, bind_port), SimpleXMLRPCRequestHandler, globals.debug_level > 0, allow_none=True) server.register_introspection_functions() server.register_function(ToUpper) server.register_instance(engine) ==== //depot/projects/soc2007/ivoras_finstall/pybackend/systoolengine.py#7 (text+ko) ==== @@ -113,7 +113,7 @@ "mediasize": 300000 # (MB) } }""" - drive_list = freebsd.get_sysctl("kern.disks").split(" ") + drive_list = freebsd.get_sysctl("kern.disks", True).split(" ") dmesg = freebsd.get_dmesg() drive_dict = {} for drive in drive_list: @@ -155,14 +155,16 @@ RETURN VALUE: The return value is a dictionary whose keys are partition names and values are dictionaries containing keys: - name, mediasize, sectorsize, type + name, mediasize, sectorsize, type, fs_type, fs_last_mount For example: { "ad0s1a" : { "name" : "ad0s1a", "mediasize" : 100000, # MB "sectorsize" : 512, - "type" : "BSD" + "type" : "BSD", + "fs_type" : "UFS2", + "fs_last_mount", "/usr" } }""" parts = {} @@ -193,7 +195,7 @@ if num_msdos_parts != 0: logging.error("The impossible has happened: drive has both MSDOS and BSD partitions directly on it") continue - for prov in tolist(gerom["provider"]): + for prov in tolist(geom["provider"]): part = { "name" : prov["name"].data, "mediasize" : int(prov["mediasize"].data) / (1024*1024), @@ -219,12 +221,11 @@ # Try to divine file system types for the partitions for part in parts: parts[part]["fs_type"] = freebsd.guess_fs_type(part) + parts[part]["fs_last_mount"] = freebsd.guess_fs_last_mount(part, parts[part]["fs_type"]) return parts - - def GetMountPoints(self): """Returns a list of dictionaries containing information about currently mounted file systems""" @@ -243,5 +244,9 @@ return False - + @logexception + def GetPhysMem(self): + """Returns the amount of physical memory in the machine, in MB""" + physmem = int(freebsd.get_sysctl("hw.realmem")) + return int(physmem / (1024*1024)) ==== //depot/projects/soc2007/ivoras_finstall/pybackend/xmldict.py#5 (text+ko) ==== @@ -317,7 +317,11 @@ print d['clock'] for tick in d['clock']['tick']: # d['clock']['tick'] is a list of tags print tick - + if not 'clock' in d: + print "** no clock in d" + if not 'tick' in d['clock']: + print "** no tick in clock" + xml = "" d = buildxmldict(xml) print d["abcd"] From owner-p4-projects@FreeBSD.ORG Sat Aug 18 00:27:21 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2161916A41A; Sat, 18 Aug 2007 00:27: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 CDDCD16A417 for ; Sat, 18 Aug 2007 00:27:20 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BA00813C46A for ; Sat, 18 Aug 2007 00:27:20 +0000 (UTC) (envelope-from mharvan@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 l7I0RKnc019768 for ; Sat, 18 Aug 2007 00:27:20 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7I0RKCg019765 for perforce@freebsd.org; Sat, 18 Aug 2007 00:27:20 GMT (envelope-from mharvan@FreeBSD.org) Date: Sat, 18 Aug 2007 00:27:20 GMT Message-Id: <200708180027.l7I0RKCg019765@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125282 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, 18 Aug 2007 00:27:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=125282 Change 125282 by mharvan@mharvan_bike-planet on 2007/08/18 00:27:02 multi-user support * daemon * tcp plugin * udp plugin * icmp plugin - almost Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/Makefile#9 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#3 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.h#2 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin.h#6 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_icmp.c#9 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_tcp.c#11 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp.c#9 edit .. //depot/projects/soc2007/mharvan-mtund/sys.patches/tcp_catchall/catchalld.c#2 delete .. //depot/projects/soc2007/mharvan-mtund/sys.patches/tcp_catchall/dmesg_tail#2 delete .. //depot/projects/soc2007/mharvan-mtund/sys.patches/tcp_catchall/sys.patch#4 delete .. //depot/projects/soc2007/mharvan-mtund/sys.patches/tcp_catchall/usr.patch#2 delete Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/Makefile#9 (text+ko) ==== ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#3 (text+ko) ==== @@ -10,12 +10,15 @@ * > VTun - Virtual Tunnel over TCP/IP network. */ +#include +#include +#include #include -#include #include #include #include #include +#include #include #include #include @@ -29,110 +32,129 @@ //#include //#include +/* max transfered unit - encapsulated packet size */ +#define MTU 1500 +/* how many pings can fail before the plugin is declared broken */ +#define PING_INTERVAL 2 +#define PING_FAIL_PLUGIN 3 +#define PING_FAIL_COMPLETE 10 +#define IDREQUEST_RETRIES 3 + #define min(a,b) ( (a>b) ? b : a ) +/* DATA TYPES */ +/* fragment header */ +struct frag_hdr { + u_int8_t dispatch; + uint id; /* Id of the whole packet, same in each fragment */ + uint size; /* length of the whole packet, same in each fragment */ + uint offset; /* fragment offset (in bytes) from the beginning + * of the packet */ +}; + +/* info about a packet being reassembled from fragments */ +struct frag_info { + uint id; /* Id of the whole packet, same in each fragment */ + uint size; /* length of the whole packet, same in each fragment */ + time_t tv_sec; /* seconds after epoch when reassembly + * of this packet started */ + u_int8_t *bitmap; /* bitmap representing already + * received parts of the packet */ + char *buf; /* buffer into which the fragment is reassembled */ + LIST_ENTRY(frag_info) frag_infos; +}; + +struct client { + clientid_t clid; /* client ID */ + int used; /* client active or not */ + long reqid; /* request ID used for the client ID request */ + struct plugin* pl; + + /* tunnel device */ + char tun_dev[16]; + int tun_fd; + struct event tun_ev; + + /* ping */ + int ping_counter; + uint8_t echo_seq; + + /* fragmentation */ + struct frag_hdr frag_hdr; + char frag_data[MTU+sizeof(struct frag_hdr)]; + char *frag_datap; + int frag_data_len; + uint frag_id; /* id for the next packet to be fragmented */ + // TODO: randomize initial value of frag_id + + /* fragmentat reassembly */ + LIST_HEAD(frag_infos_head, frag_info) frag_infos; +}; +//TODO: init: frag_datap, frag_data_len, frag_id, echo_seq, client id, +// frag_info_list +// pl->ping_counter = PING_FAIL; + +struct client clients[MAXCLIENTS]; + +/* FUNCTION HEADERS */ /* * Pass data received from the tun interface to the daemon. */ -static int process_data_from_tun(char *data, int len); +static int process_data_from_tun(struct client *cl,char *data, int len); static int send_next_frag(); +static void cleanup(); -/* max transfered unit - encapsulated packet size */ -#define MTU 1500 -/* how many pings can fail before the plugin is declared broken */ -#define PING_INTERVAL 7 -#define PING_FAIL 3 - +/* GLOBAL VARIABLES */ int server = 0; /* are we a server or a client? */ -plugint *plugins = NULL; /* linked list of loaded plugins */ -int pl_fd = 0; /* plugin socket */ -plugint *current_pl = NULL; /* currently active plugin if we are a client */ -fd_set fdset; -char tun_dev[16]; -int tun_fd = 0; /* tunnel device */ -struct event tun_ev; +TAILQ_HEAD(plugins_head, plugin) plugins = + TAILQ_HEAD_INITIALIZER(plugins); -struct event timer_ev; +static struct event timer_ev; -/* sequence number for the echo request */ -uint8_t echo_seq = 0; - -/* fragment id for the next packet to be fragmented */ -frag_hdr_t frag_hdr; -char frag_data[MTU+sizeof(frag_hdr_t)]; -char *frag_datap = NULL; -int frag_data_len = 0; -uint frag_id = 0; // TODO: randomize +static uint8_t myclid = 0; /* client ID of this client (client only) */ -/* fragmentat reassembly info list */ -LIST_HEAD(frag_info_list_head, frag_info) frag_info_list = - LIST_HEAD_INITIALIZER(frag_info_list); - /* server host */ +struct addrinfo *ai; char *host; char *port = "12345"; - -/* - * helper function to register/unregisted/check file descriptors to be - * watched by select - */ +//static int client_state; -/* helper structure to put file descriptors into a linked list */ -typedef struct _fdlt { - int fd; - struct event ev; - struct _fdlt *next; -} fdlt; -fdlt *fdl; - -void -register_select_fd(int fd, - void (*ev_callback)(int, short, void *arg), - void *arg, long tv_sec) +static void +dump_data(char *data, int len) { - struct timeval tv; - - fdlt* nfdl = malloc(sizeof(fdlt)); - if (!nfdl) { - fprintf(stderr, "failed to malloc an fdlt: out of mem!\n"); - exit(EXIT_FAILURE); - } - nfdl->fd = fd; - nfdl->next = fdl; - fdl = nfdl; - - event_set(&nfdl->ev, fd, EV_PERSIST | EV_READ, ev_callback, arg); - - if (tv_sec > -1) { - tv.tv_sec = tv_sec; - tv.tv_usec = 0; - event_add(&nfdl->ev, &tv); - } else - event_add(&nfdl->ev, NULL); - + int i; + printf("(%d bytes) ", len); + for(i = 0; i < len; i++) + printf("%02hhx ", *(data+i)); + printf("\n"); } -void unregister_select_fd(int fd) { - fdlt *p, **q; - for(q = &fdl, p = fdl; p; q = &(p->next), p=p->next) { - if (p->fd == fd) { - *q = p->next; - - //event_set(&nfdl->ev, fd, EV_READ, ev_callback, arg); - //event_set(&p->ev, fd, EV_READ, NULL, NULL); - event_del(&p->ev); - - free(p); - break; - } - } - //update_fdset(); +int +mylog(const char *fmt, ...) +{ + int out; + va_list ap; + + va_start(ap, fmt); + out = vprintf(fmt, ap); + va_end(ap); + + return out; } -int fd_isset(int fd) { - return FD_ISSET(fd, &fdset); +int +debug(const char *fmt, ...) +{ + int out; + va_list ap; + + va_start(ap, fmt); + out = vprintf(fmt, ap); + va_end(ap); + + return out; } int @@ -144,60 +166,85 @@ vsnprintf(cmd, sizeof(cmd), fmt, ap); va_end(ap); fprintf(stderr, "%s\n", cmd); - //fflush(stderr); - //fflush(stdout); return system(cmd); } -void -set_current_pl(plugint* pl) +/* lookup client by ID */ +static struct client * +lookup_clid(clientid_t clid) +{ + if (server) + return &clients[clid]; + else + return clients; +} + +/* + * change the plugin a client is using - closes the connection in the + * old plugin and adds/deletes the tunnel event depending on the + * plugin type (polling or direct) + */ +static void +set_client_pl(struct client *cl, struct plugin* pl) { - if (current_pl) { - event_del(&tun_ev); - } - current_pl = pl; - if (pl) { - if (pl->is_ready_to_send() == WILL_SEND_IMMEDIATELY) - event_add(&tun_ev, NULL); - // otherwise the tun read is timed by the plugin - } + if (cl->pl == pl) + return; + + if (cl->pl != NULL) { + cl->pl->conn_close(pl, cl->clid); + if (cl->tun_fd != -1) + event_del(&cl->tun_ev); + } + + cl->pl = pl; + cl->ping_counter = 0; + + if (pl != NULL && cl->tun_fd != -1) { + if (cl->pl->is_ready_to_send(cl->pl, cl->clid) == + WILL_SEND_IMMEDIATELY) + event_add(&cl->tun_ev, NULL); + // else the tun read is timed by the plugin + } } -/* read data from the tun interface and pass it to the daemon */ +/* + * entry function if a polling plugin can send more data - if + * fragments pending, send these; otherwise read data from the tun + * interface and pass it to the daemon + */ static void -tun_receive() +request_tun_data(struct client *cl) { - char packet[PACKETLEN]; - int nread = 0; - int nwrite = 0; - - printf("tun_receive()\n"); - if (current_pl == NULL) - return; - - if (frag_datap != NULL) { - send_next_frag(); - return; - } - - do { - //memset(packet, 0, sizeof(packet)); - nread = tun_read(tun_fd, packet, PACKETLEN); - if (nread > 0) { - nwrite = process_data_from_tun(packet, nread); + char packet[PACKETLEN]; + int nread = 0; + int nwrite = 0; + + printf("request_tun_data()\n"); + if (cl->pl == NULL) + return; + + if (cl->frag_datap != NULL) { + send_next_frag(cl); + return; } - /* continue the loop if we read something - * and the plugin has sent it immediately - */ - printf("tun_receive: nread: %d, nwrite: %d\n", nread, nwrite); - } while (nread > 0 && nwrite == SEND_PKT_SENT); + + do { + nread = tun_read(cl->tun_fd, packet, PACKETLEN); + if (nread > 0) { + nwrite = process_data_from_tun(cl, packet, nread); + } + /* continue the loop if we read something + * and the plugin has sent it immediately + */ + printf("request_tun_data: nread: %d, nwrite: %d\n", nread, nwrite); + } while (nread > 0 && nwrite == SEND_PKT_SENT); } -/* send data via the tun interface */ +/* send data via the tun interface for the client */ static int -tun_send(char *data, int len) { +tun_send(struct client *cl, char *data, int len) { int n; - n = tun_write(tun_fd, data, len); + n = tun_write(cl->tun_fd, data, len); /* if (n != len) { fprintf(stderr, "tun_send: tun_write wrote less bytes (%d) than " @@ -209,66 +256,168 @@ } /* handler function for events on the tun device - called by libevent */ +void +tun_ev_handler(int fd, short ev_type, void *arg) +{ + struct client *cl = arg; + printf("tun_ev_handler(): ev_type: 0x%x\n", ev_type); + /* + * Only read from the tun device can send the data immediately. + * Otherwise, we will be notified via plugin_report() when data + * can be sent. + */ + if (cl->pl != NULL) + if (cl->pl->is_ready_to_send(cl->pl, cl->clid) == + WILL_SEND_IMMEDIATELY) + request_tun_data(cl); +} + + int +tun_init(struct client *cl) +{ + int tun_flags; + + /* create the tunnel device */ + sprintf(cl->tun_dev, "tun%i", cl->clid); + cl->tun_fd = tun_open(cl->tun_dev); + if (cl->tun_fd < 1) { + printf("Could not create tunnel device\n"); + return 1; + } + /* non-blocking i/o */ + tun_flags = fcntl(cl->tun_fd, F_GETFL, 0); + if (tun_flags == -1) + errx(EX_OSFILE, "Failed to get flags from the tun device\n"); + fcntl(cl->tun_fd, F_SETFL, tun_flags|O_NONBLOCK); + + event_set(&cl->tun_ev, cl->tun_fd, EV_PERSIST | EV_READ, + tun_ev_handler, cl); + + printf("Created tunnel device: %s\n", cl->tun_dev); + + /* configure the tun interface */ + char cmd[123]; + if (server) { +#ifdef __FreeBSD__ + sprintf(cmd, + "ifconfig %s mtu 1400 192.168.0.%d 192.168.0.%d", + cl->tun_dev, cl->clid * 2, cl->clid * 2 + 1); + ssystem(cmd); +#else + warnx("Please configure %s yourself...\n", cl->tun_dev); +#endif +/* #ifdef __linux */ +/* ssystem("ifconfig tun0 mtu 1400 192.168.0.1"); */ +/* ssystem("route add 192.168.0.2 tun0"); */ +/* #endif */ + + } else { +#ifdef __FreeBSD__ + sprintf(cmd, + "ifconfig %s mtu 1400 192.168.0.%d 192.168.0.%d", + cl->tun_dev, cl->clid * 2 + 1, cl->clid * 2); + ssystem(cmd); +#else + warnx("Please configure %s yourself...\n", cl->tun_dev); +#endif +/* #ifdef __linux */ +/* ssystem("ifconfig tun0 mtu 1400 192.168.0.2"); */ +/* ssystem("route add 192.168.0.1 tun0"); */ +/* #endif */ + } + + if (cl->pl != NULL) { + if (cl->pl->is_ready_to_send(cl->pl, cl->clid) == + WILL_SEND_IMMEDIATELY) + event_add(&cl->tun_ev, NULL); + // else the tun read is timed by the plugin + } + + return 0; +} + static void -tun_ev_handler(int fd, short ev_type, void *arg) +tun_deinit(struct client *cl) { - printf("tun_ev_handler(): ev_type: 0x%x\n", ev_type); - /* - * Only read from the tun device can send the data immediately. - * Otherwise, we will be notified via plugin_report() when data - * can be sent. - */ - if (current_pl != NULL) - if (current_pl->is_ready_to_send() == WILL_SEND_IMMEDIATELY) - tun_receive(); + if (!server) { + // TODO: fix routing table + } + + if (cl->tun_fd != -1) { + event_del(&cl->tun_ev); + tun_close(cl->tun_fd, cl->tun_dev); + } } -/* - * BUGS: if dlclose() is called, I get a segfault when trying to use - * the loaded functions. Maybe I'm not passing the right flags to - * dlopen()? Well, RTLD_NODELETE seems to help here, at least on - * linux. +/* + * load a plugin from file and register it + * returns a pointer to the plugin on success or NULL on failure */ -static int +static struct plugin * load_plugin(char *path) { - plugint *pl; - int (*plugin_register)(plugint*); + struct plugin *pl; + int (*plugin_register)(struct plugin*); void *handle; const char *error; - pl = (plugint*) malloc(sizeof(plugint)); + pl = malloc(sizeof(struct plugin)); if (!pl) { - fprintf(stderr, "failed to malloc plugint: out of memory!\n"); - return -1; + warnx("failed to malloc plugin: out of memory!\n"); + return NULL; } /* open the library */ handle = dlopen (path, RTLD_NOW); if (!handle) { fputs(dlerror(), stderr); - return 1; + return NULL; } - /* load the plugin */ - pl = (plugint *) malloc(sizeof(plugint)); plugin_register = dlsym(handle, "plugin_register"); - if ((error = dlerror()) != NULL) goto error; + if ((error = dlerror()) != NULL) + goto error; + /* prepare the plugin for registration */ plugin_register(pl); - //dlclose(handle); - /* add plugin to the list of loaded plugins */ - pl->next = plugins; - plugins = pl; - - pl->ping_counter = PING_FAIL; + TAILQ_INSERT_TAIL(&plugins, pl, plugins); fprintf(stderr, "successfully loaded plugin %s\n", pl->name); - return 0; + return pl; error: fputs(error, stderr); free(pl); - return 2; + return NULL; +} + +/* initialize the client datastructure */ +static struct client * +client_init(clientid_t clid) +{ + struct client *cl = lookup_clid(clid); + + if (cl->used) { + warnx("client_init: client ID already exists\n"); + return NULL; + } + + memset(cl, 0, sizeof(*cl)); + cl->clid = clid; + cl->tun_fd = -1; + cl->pl = NULL; + cl->used = 1; + + return cl; +} + +/* deinitialize the client datastructure, corresponding tun device,... */ +static void +client_deinit(struct client *cl) +{ + //TODO + //TODO close conn + tun_deinit(cl); + cl->used = 0; } /* @@ -276,50 +425,111 @@ * from ICMP echo. */ static void -send_echo_request() +send_echo_request(struct client *cl) +{ + int nwrite = 0; + char data[10]; + char *datap = data; + int len=0; + + cl->ping_counter++; + + if (cl->pl != NULL) { + /* client prepends the client ID */ + if (!server) { + *datap = cl->clid; + datap++; + len++; + } + + *datap = DISPATCH_ECHO_REQUEST; + datap++; + len++; + + *datap = cl->echo_seq++; + datap++; + len++; + + nwrite = cl->pl->send(cl->pl, cl->clid, + data, len, NORMAL_DATA); + printf("send_echo_request(): nwrite: 0x%x\n", nwrite); + } +} + +/* + * send a request for a client ID - used only by the client + */ +static void +send_id_request() { - int nwrite = 0; - char data[2]; - plugint *pl = current_pl; - if (pl) { - *data = DISPATCH_ECHO_REQUEST; - *(data+1) = echo_seq++; - nwrite = pl->send(pl, data, sizeof(data), NORMAL_DATA); - pl->ping_counter--; - printf("send_cho_request(): nwrite: 0x%x\n", nwrite); - } + struct client *cl = clients; + int nwrite = 0; + char data[10]; + char *pdata = data; + if (cl->pl != NULL) { + /* client ID */ + *pdata = 0; + pdata++; + + /* dispatch */ + *pdata = DISPATCH_ID_REQUEST; + pdata++; + + /* request ID */ + memcpy(pdata, &cl->reqid, sizeof(cl->reqid)); + pdata += sizeof(cl->reqid); + + nwrite = cl->pl->send(cl->pl, cl->clid, + data, pdata - data, NORMAL_DATA); + //pl->ping_counter--; + printf("send_id_request(): nwrite: 0x%x\n", nwrite); + } } + + /* handler function for the libevent timer event */ static void timer_ev_handler(int fd, short ev_type, void *arg) { struct timeval tv; struct frag_info *np, *np_temp; - plugint *pl = current_pl; + struct client *cl; + int i; /* check if too many ping requests have not failed */ - if (pl) { - printf("ping_counter: %d\n", pl->ping_counter); - if (pl->ping_counter <= 0) { - plugin_report(pl, REPORT_ERROR_PING); - } else { - send_echo_request(); - } + for(i = 0; i < MAXCLIENTS; i++) { + cl = &clients[i]; + if (cl->used == 0) + continue; + + printf("ping_counter: %d\n", cl->ping_counter); + if (cl->ping_counter > PING_FAIL_COMPLETE && + server) + client_deinit(cl); + else if (cl->pl) { + if (cl->ping_counter > PING_FAIL_PLUGIN) + plugin_report(cl->pl, cl->clid, + REPORT_ERROR_PING); + send_echo_request(cl); + } } /* fragment reassembly timeout */ - if (gettimeofday(&tv, NULL) != 0) { - err(EX_OSERR, "gettimeofday() failed"); - } else { - LIST_FOREACH_SAFE(np, &frag_info_list, frag_infos, np_temp) { - if (tv.tv_sec - np->tv_sec > FRAG_TIMEOUT) { - LIST_REMOVE(np, frag_infos); - free(np->bitmap); - free(np->buf); - free(np); + gettimeofday(&tv, NULL); + for(i = 0; i < MAXCLIENTS; i++) { + cl = &clients[i]; + if (cl->used == 0) + continue; + + LIST_FOREACH_SAFE(np, &cl->frag_infos, frag_infos, np_temp) { + if (tv.tv_sec - np->tv_sec > FRAG_TIMEOUT) { + LIST_REMOVE(np, frag_infos); + free(np->bitmap); + free(np->buf); + free(np); + } } - } } /* register a timer event again */ @@ -331,326 +541,566 @@ /* * Pass data received by the plugin to the daemon. + * + * called 1st time: *conn == NULL + * lookup client's conn by client ID and return + * + * called 2nd time: *conn != NULL + * */ void -process_data_from_plugin(plugint *pl, char *data, int len) +process_data_from_plugin(struct plugin *pl, char *data, int len, + uint8_t *clid, int *conn_flag) { - u_int8_t dispatch = *data; - frag_hdr_t *frag_hdr = NULL; - struct frag_info *p;/* pointer to frag info about the processed fragment */ - struct frag_info *np; - struct timeval tv; - int i; - int dgram_reassembled; - int nwrite; + u_int8_t dispatch; + int i; + int nwrite; + struct client *cl = NULL; + + /* fragment reassembly */ + struct frag_hdr *frag_hdr = NULL; + struct frag_info *p; /* pointer to frag info about the + * processed fragment */ + struct frag_info *np; + struct timeval tv; + int dgram_reassembled; + + printf("data from plugin: "); + dump_data(data, len); + + *conn_flag = CONN_DISCARD; - if (len <= 0) - return; + if (len <= 0) + return; - switch (dispatch) { - case DISPATCH_DATA: - printf("process_data_from_plugin(): DATA\n"); - tun_send(data+1, len-1); - goto plugin_ok; - break; - case DISPATCH_FRAG: - if (len <= sizeof(frag_hdr)) { - plugin_report(pl, REPORT_ERROR_RECEIVE); - return; + /* process the client ID */ + if (server) { + /* payload from the client starts with the client ID */ + *clid = *data; + data++; + len--; + } else { /* client */ + /* payload from the server does NOT contain the client ID */ + *clid = 0; } + cl = lookup_clid(*clid); - frag_hdr = (frag_hdr_t*) data; - data += sizeof(frag_hdr_t); - len -= sizeof(frag_hdr_t); + /* process the dispatch */ + dispatch = *data; + + printf("clid: %hhd, dispatch: 0x%02hhx\n", *clid, dispatch); + + switch (dispatch) { + case DISPATCH_DATA: + printf("process_data_from_plugin(): DATA\n"); + /* only associated clients can send DATA to the server */ + if (server && *clid == 0) { + *conn_flag = CONN_DISCARD; + pl->conn_map(pl, *clid, *conn_flag); + return; + } - /* debugging output */ - fprintf(stderr, "got a frag header: id %d, size %d, off %d, len %d\n", - frag_hdr->id, frag_hdr->size, frag_hdr->offset, len); + *conn_flag = CONN_PERM; + pl->conn_map(pl, *clid, CONN_PERM); + + /* update the current plugin for this client */ + set_client_pl(cl, pl); + + tun_send(cl, data+1, len-1); - /* check if reassembly for this fragment has already started */ - p = NULL; - LIST_FOREACH(np, &frag_info_list, frag_infos) { - if (np->id == frag_hdr->id && - np->size == frag_hdr->size) { - /* found in list */ - fprintf(stderr, "found frag info in list\n"); - p = np; break; - } - } + + case DISPATCH_FRAG: /* fragment reassembly */ + pl->conn_map(pl, *clid, CONN_PERM); + + if (len <= sizeof(*frag_hdr)) { + plugin_report(pl, *clid, REPORT_ERROR_RECEIVE); + return; + } + + frag_hdr = (struct frag_hdr*) data; + data += sizeof(struct frag_hdr); + len -= sizeof(struct frag_hdr); + + /* debugging output */ + debug("got a frag header: id %d, size %d, off %d, len %d\n", + frag_hdr->id, frag_hdr->size, frag_hdr->offset, len); + + /* check if reassembly for this fragment has already started */ + p = NULL; + LIST_FOREACH(np, &cl->frag_infos, frag_infos) { + if (np->id == frag_hdr->id && + np->size == frag_hdr->size) { + /* found in list */ + fprintf(stderr, "found frag info in list\n"); + p = np; + break; + } + } - /* fragment info not found in list, start a new reassembly */ - if (p == NULL) { - fprintf(stderr, "frag info NOT found in list\n"); - /* allocate memory */ - p = malloc(sizeof(struct frag_info)); - if (!p) { - fprintf(stderr, "process_data_from_plugin - " - "fragment reassembly: out of memory\n"); - return; - } - memset(p, 0, sizeof(*p)); - p->buf = malloc(frag_hdr->size); - if (!p->buf) { - free(p); - fprintf(stderr, "process_data_from_plugin - " - "fragment reassembly: out of memory\n"); - return; - } - p->bitmap = malloc(frag_hdr->size/8 + 1); - if (!p->bitmap) { - free(p->buf); - free(p); - fprintf(stderr, "process_data_from_plugin - " - "fragment reassembly: out of memory\n"); - return; - } - memset(p->bitmap, 0, sizeof(*(p->bitmap))); + /* fragment info not found in list, start a new reassembly */ + if (p == NULL) { + fprintf(stderr, "frag info NOT found in list\n"); + /* allocate memory */ + p = malloc(sizeof(struct frag_info)); + if (!p) { + warnx("process_data_from_plugin - " + "fragment reassembly: out of memory\n"); + return; + } + memset(p, 0, sizeof(*p)); + p->buf = malloc(frag_hdr->size); + if (!p->buf) { + free(p); + warnx("process_data_from_plugin - " + "fragment reassembly: out of memory\n"); + return; + } + p->bitmap = malloc(frag_hdr->size/8 + 1); + if (!p->bitmap) { + free(p->buf); + free(p); + warnx("process_data_from_plugin - " + "fragment reassembly: out of memory\n"); + return; + } + memset(p->bitmap, 0, sizeof(*(p->bitmap))); - /* collect information about the fragments */ - if (gettimeofday(&tv, NULL) != 0) { - err(EX_OSERR, "gettimeofday() failed"); - } - p->id = frag_hdr->id; - p->size = frag_hdr->size; - memcpy(&p->tv_sec, &tv.tv_sec, sizeof(tv.tv_sec)); - LIST_INSERT_HEAD(&frag_info_list, p, frag_infos); - } + /* collect information about the fragments */ + gettimeofday(&tv, NULL); + p->id = frag_hdr->id; + p->size = frag_hdr->size; + memcpy(&p->tv_sec, &tv.tv_sec, sizeof(tv.tv_sec)); + LIST_INSERT_HEAD(&cl->frag_infos, p, frag_infos); + } - if (frag_hdr->offset + len <= p->size) { - /* copy the data */ - memcpy(p->buf + frag_hdr->offset, data, len); - /* update the bitmap */ - // TODO: we ignore overlaps, but that should be caught - // by the upper layer checksum - for(i = frag_hdr->offset; ioffset+len; i++) { - p->bitmap[i/8] |= (0x1 << (i%8)); - } - } else { - fprintf(stderr, "fragment outside of packet payload\n"); - return; - } + if (frag_hdr->offset + len <= p->size) { + /* copy the data */ + memcpy(p->buf + frag_hdr->offset, data, len); + /* update the bitmap */ + // TODO: we ignore overlaps, but that should be caught + // by the upper layer checksum + for (i = frag_hdr->offset; i < frag_hdr->offset+len; + i++) + p->bitmap[i/8] |= (0x1 << (i%8)); + } else { + warnx("fragment outside of packet payload\n"); + return; + } + + set_client_pl(cl, pl); - /* check if the complete packet has been reassembled */ - dgram_reassembled = 1; - /* examine the bitmap */ - for(i=0; i < p->size/8 && dgram_reassembled; i++) { - if (p->bitmap[i] != 0xff) { - dgram_reassembled = 0; - } - } - for(i=0; i < p->size%8 && dgram_reassembled; i++) { - if (! (p->bitmap[p->size/8] & (1 << i))) { - dgram_reassembled=0; - } - } - /* packet completely reassembled */ - if (dgram_reassembled) { - fprintf(stderr, "frag reassembly: packet complete\n"); - set_current_pl(pl); - tun_send(p->buf, p->size); + /* check if the complete packet has been reassembled */ + dgram_reassembled = 1; + /* examine the bitmap */ + for(i=0; i < p->size/8 && dgram_reassembled; i++) { + if (p->bitmap[i] != 0xff) { + dgram_reassembled = 0; + } + } + for(i=0; i < p->size%8 && dgram_reassembled; i++) { + if (! (p->bitmap[p->size/8] & (1 << i))) { + dgram_reassembled=0; + } + } + + /* packet completely reassembled */ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Aug 18 02:25:47 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6894316A41B; Sat, 18 Aug 2007 02:25: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 2B10216A418 for ; Sat, 18 Aug 2007 02:25:47 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1867C13C465 for ; Sat, 18 Aug 2007 02:25:47 +0000 (UTC) (envelope-from ivoras@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 l7I2PkwF044879 for ; Sat, 18 Aug 2007 02:25:46 GMT (envelope-from ivoras@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7I2PkU5044876 for perforce@freebsd.org; Sat, 18 Aug 2007 02:25:46 GMT (envelope-from ivoras@FreeBSD.org) Date: Sat, 18 Aug 2007 02:25:46 GMT Message-Id: <200708180225.l7I2PkU5044876@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ivoras@FreeBSD.org using -f From: Ivan Voras To: Perforce Change Reviews Cc: Subject: PERFORCE change 125283 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, 18 Aug 2007 02:25:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=125283 Change 125283 by ivoras@ivoras_finstall on 2007/08/18 02:25:15 Framework for asynchronous backend jobs Affected files ... .. //depot/projects/soc2007/ivoras_finstall/pybackend/systoolengine.py#8 edit Differences ... ==== //depot/projects/soc2007/ivoras_finstall/pybackend/systoolengine.py#8 (text+ko) ==== @@ -24,6 +24,7 @@ import os, sys import re import logging +from threading import Thread, Lock import globals import freebsd @@ -51,12 +52,39 @@ return [e] +class SysToolJob(Thread): + """A generic asynchronous SysTool job""" + + def __init__(self): + Thread.__init__(self) + self.finished = False + self.percent_complete = 0 + self.error = None + self.result = None + + def _calc_percent(self, i, total): + return int((float(i+1) / total) * 100) + + +class PartitionJob(SysToolJob): + """A partitioning SysTool job. This one accept a list of partitions + to create and creates them one by one.""" + def __init__(self, part_spec): + SysToolJob.__init__(self) + self.part_spec = part_spec + + def run(self): + for i, part in enumerate(self.part_spec): + self.percent_complete = self._calc_percent(i, len(self.part_spec)) + + class SysToolEngine: - def __init__(self): self.root_dest = "" # Config file / "new" root, sans final slash self.root_live = "" # Live file system root (for binaries!) + self.job_list = [] + self.job_list_lock = Lock() def GetId(self): @@ -250,3 +278,41 @@ physmem = int(freebsd.get_sysctl("hw.realmem")) return int(physmem / (1024*1024)) + + @logexception + def StartPartitionJob(self, part_spec): + """Starts a job that executes a partition spec list. Returns + an integer job_id""" + self.job_list_lock.acquire() + job = PartitionJob(part_spec) + self.job_list.append(job) + job_id = len(self.job_list) # 1-based job IDs + job.start() # fires up a new thread + self.job_list_lock.release() + return job_id + + + @logexception + def QueryJobProgress(self, job_id): + """Queries the progress of a job, returns percent complete or None + if the job is in error""" + self.job_list_lock.acquire() + job = self.job_list[job_id-1] + self.job_list_lock.release() + if job.error != None: + return None + return job.percent_complete + + + @logexception + def QueryJobResult(self, job_id): + """Queries the result of a job, if the job is finished. Returns + a string with the job's status report or None if the job is not + yet finished.""" + self.job_list_lock.acquire() + job = self.job_list[job_id-1] + self.job_list_lock.release() + if not job.finished: + return None + return job.result + From owner-p4-projects@FreeBSD.ORG Sat Aug 18 02:37:01 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7B05E16A468; Sat, 18 Aug 2007 02:37: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 5049F16A418 for ; Sat, 18 Aug 2007 02:37:01 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3C60A13C465 for ; Sat, 18 Aug 2007 02:37:01 +0000 (UTC) (envelope-from mharvan@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 l7I2b1Ys045773 for ; Sat, 18 Aug 2007 02:37:01 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7I2b0UM045770 for perforce@freebsd.org; Sat, 18 Aug 2007 02:37:00 GMT (envelope-from mharvan@FreeBSD.org) Date: Sat, 18 Aug 2007 02:37:00 GMT Message-Id: <200708180237.l7I2b0UM045770@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125284 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, 18 Aug 2007 02:37:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=125284 Change 125284 by mharvan@mharvan_bike-planet on 2007/08/18 02:36:44 plugin_icmp works correctly with multi-user support Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#4 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.h#3 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin.h#7 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_icmp.c#10 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_tcp.c#12 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp.c#10 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ /* max transfered unit - encapsulated packet size */ #define MTU 1500 /* how many pings can fail before the plugin is declared broken */ -#define PING_INTERVAL 2 +#define PING_INTERVAL 5 #define PING_FAIL_PLUGIN 3 #define PING_FAIL_COMPLETE 10 #define IDREQUEST_RETRIES 3 @@ -100,7 +100,8 @@ /* * Pass data received from the tun interface to the daemon. */ -static int process_data_from_tun(struct client *cl,char *data, int len); +static int process_data_from_tun(struct client *cl, struct plugin *pl, + uint8_t dispatch, char *data, int len); static int send_next_frag(); static void cleanup(); @@ -231,7 +232,8 @@ do { nread = tun_read(cl->tun_fd, packet, PACKETLEN); if (nread > 0) { - nwrite = process_data_from_tun(cl, packet, nread); + nwrite = process_data_from_tun(cl, cl->pl, + DISPATCH_DATA, packet, nread); } /* continue the loop if we read something * and the plugin has sent it immediately @@ -845,6 +847,13 @@ break; + case DISPATCH_PLUGIN_DATA: + printf("process_data_from_plugin(): PLUGIN_DATA\n"); + pl->conn_map(pl, *clid, CONN_TEMP); + pl->custom_receive(pl, 0, data + 1, len - 1); + + break; + default: fprintf(stderr, "unknown dispatch 0x%X in data from plugin " "%s\n", dispatch, pl->name); @@ -856,30 +865,34 @@ * Pass data received from the tun interface to the daemon. */ static int -process_data_from_tun(struct client *cl, char *data, int len) +process_data_from_tun(struct client *cl, struct plugin *pl, uint8_t dispatch, + char *data, int len) { char ldata[MTU+3]; - if (cl->pl == NULL) { + if (pl == NULL) + pl = cl->pl; + + if (pl == NULL) { debug("no plugin connected yet, discarding tun data\n"); - plugin_report(cl->pl, cl->clid, REPORT_BOOTSTRAP); + plugin_report(pl, cl->clid, REPORT_BOOTSTRAP); return SEND_ERROR; } - printf("process_data_from_tun: len: %d, cl->pl->mtu: %d\n", - len, cl->pl->mtu); + printf("process_data_from_tun: len: %d, pl->mtu: %d\n", + len, pl->mtu); /* no need to add the fragmentation header */ - if (len < cl->pl->mtu) { + if (len < pl->mtu || dispatch == DISPATCH_PLUGIN_DATA) { if (server) { - *(ldata) = DISPATCH_DATA; + *(ldata) = dispatch; memcpy(ldata + 1, data, min(sizeof(ldata)-1, len)); - return (cl->pl->send(cl->pl, cl->clid, ldata, + return (pl->send(pl, cl->clid, ldata, min(sizeof(ldata), len + 1), NORMAL_DATA)); } else { /* client */ *ldata = myclid; - *(ldata + 1) = DISPATCH_DATA; + *(ldata + 1) = dispatch; memcpy(ldata+2, data, min(sizeof(ldata)-2, len)); - return (cl->pl->send(cl->pl, myclid, ldata, + return (pl->send(pl, myclid, ldata, min(sizeof(ldata), len + 2), NORMAL_DATA)); } /* add the fragmentation header */ @@ -909,6 +922,14 @@ } } +int +plugin_custom_send(struct plugin *pl, uint8_t clid, + char *data, int len) +{ + return process_data_from_tun(&clients[clid], pl, DISPATCH_PLUGIN_DATA, + data, len); +} + /* send the next fragment */ static int send_next_frag(struct client *cl) ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.h#3 (text+ko) ==== @@ -32,6 +32,7 @@ int (*is_ready_to_send)(struct plugin*, uint8_t); void (*conn_close)(struct plugin*, uint8_t); void (*conn_map)(struct plugin*, uint8_t, int); + void (*custom_receive)(struct plugin*, uint8_t, char*, int); char *name; int mtu; void* data; @@ -81,9 +82,10 @@ DISPATCH_ECHO_REQUEST = 1, DISPATCH_ECHO_REPLY = 2, DISPATCH_FRAG = 3, - DISPATCH_ID_REQUEST, /* client requesting an ID */ - DISPATCH_ID_OFFER, /* daemon offering an ID to the client */ - //DISPATCH_ID_CANCEL, /* client ending a session */ + DISPATCH_ID_REQUEST, /* client requesting an ID */ + DISPATCH_ID_OFFER, /* daemon offering an ID to the client */ + //DISPATCH_ID_CANCEL, /* client ending a session */ + DISPATCH_PLUGIN_DATA, /* plugin to plugin communication */ DISPATCH_DATA = 0x42, DIPATCH_PLUGIN_RESERVED_MIN = 128, /* dispatch values used by plugins, */ DIPATCH_PLUGIN_RESERVED_MAX = 255, /* i.e., not passed to the daemon */ @@ -112,6 +114,8 @@ */ void plugin_report(struct plugin *pl, uint8_t clid, int err); +int plugin_custom_send(struct plugin *pl, uint8_t clid, char *data, int len); + extern int server; /* are we a server (0) or a client (1)? */ #endif ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin.h#7 (text+ko) ==== @@ -84,6 +84,11 @@ int plugin_send(struct plugin *pl, uint8_t clid, char *data, int len, int data_type); +/* + * Data for the plugin from plugin to plugin communication. + */ +void +plugin_custom_receive(struct plugin *pl, uint8_t clid, + char *data, int len); #endif - ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_icmp.c#10 (text+ko) ==== @@ -85,6 +85,9 @@ }; +static void plugin_send_queued_data(); +static void plugin_send_empty_request(struct plugin *pl, struct conn *conn); + static u_int16_t in_cksum(u_int16_t *addr, int len) { @@ -146,6 +149,7 @@ pl->receive = plugin_receive; pl->conn_close = plugin_conn_close; pl->conn_map = plugin_conn_map; + pl->custom_receive = plugin_custom_receive; pl->data = malloc(sizeof(struct plugin_icmp_data)); if (!pl->data) { @@ -179,7 +183,7 @@ evtimer_add(ev, &tv); } -/* handler function for the libevent timer event */ +/* handler function for the libevent timer event - client only */ void plugin_icmp_timer_ev_handler(int fd, short ev_type, void *arg) { @@ -187,7 +191,8 @@ /* send a request to the server */ if (server == 0) { /* client */ - plugin_receive(data->fd, EV_TIMEOUT, arg); + plugin_send_empty_request(arg, data->conn); + //plugin_receive(data->fd, EV_TIMEOUT, arg); } /* register a timer event again */ @@ -303,8 +308,7 @@ } static int -send_icmp_pkt(struct plugin *pl, struct conn *conn, - int id, int seq, char *data, int len) +send_icmp_pkt(struct plugin *pl, struct conn *conn, char *data, int len) { struct plugin_icmp_data *datapl = pl->data; int n = 0; @@ -330,8 +334,8 @@ } icmp->code = 0; - icmp->id = htons(id); - icmp->seq = htons(seq); + icmp->id = htons(conn->id); + icmp->seq = htons(conn->seq); icmp->cksum = 0; icmp->cksum = in_cksum((u_int16_t*)packet, sizeof(struct my_icmp_hdr) + len); @@ -343,8 +347,15 @@ fprintf(stderr, "plugin_send: send returned %d\n", n); /* the client has to reset the timer for keep-alive requests */ - if (!server) /* client */ + if (!server) { /* client */ + /* increment the sequence number */ + if (conn->seq == 65535) + conn->seq = 0; + else + conn->seq++; + register_timer_ev(&datapl->timer_ev); + } return n; } @@ -370,7 +381,7 @@ (struct sockaddr *) &from, &fromlen); if (n == -1) { if (errno == EAGAIN) - return; + goto send_request; warn("plugin_cimp: plugin_receive(): recvfrom() returned %d", n); @@ -406,7 +417,9 @@ icmp = (void*)packetp; packetp += sizeof(struct my_icmp_hdr); n -= sizeof(struct my_icmp_hdr); - + data->conn->id = ntohs(icmp->id); + data->conn->seq = ntohs(icmp->seq); + /* check values in the ICMP header */ if (server) { if (icmp->type != ICMP_ECHO) // or 123 @@ -416,53 +429,24 @@ goto pkt_not_for_us; } - if (n <= 0) - return; - /* payload */ data->conn->data_sent_after_last_receive = 0; - process_data_from_plugin(pl, packetp, n, &clid, &conn_flag); + if (n > 0) + process_data_from_plugin(pl, packetp, n, &clid, &conn_flag); /* conn_map() called here */ - /* if no data was queued then ask the daemon for more data */ - if (data->conn->queued_urgent_data == NULL && - data->conn->queued_normal_data == NULL) - plugin_report(pl, data->conn->clid, REPORT_READY_TO_SEND); - /* use the reply to send data */ - if (data->conn->queued_urgent_data != NULL || - data->conn->queued_normal_data != NULL) { - if (data->conn->queued_urgent_data != NULL) { - send_icmp_pkt(pl, data->conn, - ntohs(icmp->id), ntohs(icmp->seq), - data->conn->queued_urgent_data, - data->conn->queued_urgent_data_len); - free(data->conn->queued_urgent_data); - data->conn->queued_urgent_data = NULL; - data->conn->queued_urgent_data_len = 0; - } else { - send_icmp_pkt(pl, data->conn, - ntohs(icmp->id), ntohs(icmp->seq), - data->conn->queued_normal_data, - data->conn->queued_normal_data_len); - free(data->conn->queued_normal_data); - data->conn->queued_normal_data = NULL; - data->conn->queued_normal_data_len = 0; - } - } + if (server) + plugin_send_queued_data(pl, data->conn); + /* * The client should send back an empty request if there was no * data to send. This allows the server to send more data back. */ + send_request: if (!server && !data->conn->data_sent_after_last_receive) { - /* increment the sequence number */ - if (data->conn->seq == 65535) - data->conn->seq = 0; - else - data->conn->seq++; - send_icmp_pkt(pl, data->conn, - data->conn->id, data->conn->seq, NULL, 0); + plugin_send_empty_request(pl, data->conn); } return; @@ -470,16 +454,67 @@ fprintf(stderr, "discarding data from a different client\n"); } +static void +plugin_send_empty_request(struct plugin *pl, struct conn *conn) +{ + plugin_custom_send(pl, conn->clid, NULL, 0); +} + +/* server only */ +static void +plugin_send_queued_data(struct plugin *pl, struct conn *conn) +{ + printf("plugin_icmp: plugin_send_queued_data(): clid: %hhu,\n" + "\turgent_data: %d, normal_data: %d\n", + conn->clid, + conn->queued_urgent_data_len, conn->queued_normal_data_len); + + /* if no data was queued then ask the daemon for more data */ + if (conn->queued_urgent_data == NULL && + conn->queued_normal_data == NULL) + plugin_report(pl, conn->clid, REPORT_READY_TO_SEND); + + printf("after plugin_report(READY_TO_SEND)...\n" + "\turgent_data: %d, normal_data: %d\n", + conn->queued_urgent_data_len, conn->queued_normal_data_len); + + /* send the queued data */ + if (conn->queued_urgent_data != NULL || + conn->queued_normal_data != NULL) { + if (conn->queued_urgent_data != NULL) { + send_icmp_pkt(pl, conn, + conn->queued_urgent_data, + conn->queued_urgent_data_len); + free(conn->queued_urgent_data); + conn->queued_urgent_data = NULL; + conn->queued_urgent_data_len = 0; + } else { + send_icmp_pkt(pl, conn, + conn->queued_normal_data, + conn->queued_normal_data_len); + free(conn->queued_normal_data); + conn->queued_normal_data = NULL; + conn->queued_normal_data_len = 0; + } + } + printf("after send_icmp_pkt()...\n" + "\turgent_data: %d, normal_data: %d\n", + conn->queued_urgent_data_len, conn->queued_normal_data_len); +} + int plugin_is_ready_to_send(struct plugin *pl, clientid_t clid) { struct plugin_icmp_data *data = pl->data; struct conn *conn = conn_by_clid(data, clid); - if (conn->queued_normal_data == NULL) - return WILL_QUEUE; - else - return QUEUE_FULL; + if (server) { + if (conn->queued_normal_data == NULL) + return WILL_QUEUE; + else + return QUEUE_FULL; + } else /* client */ + return WILL_SEND_IMMEDIATELY; } void @@ -507,7 +542,7 @@ struct plugin_icmp_data *data = pl->data; struct conn *conn = conn_by_clid(data, clid); - if (!server) + if (!server) /* client */ return; if (conn_flag == CONN_PERM && clid != 0) { @@ -515,11 +550,18 @@ printf("plugin_send: CONN_PERM, clid: %hhd, " "updating...\n", clid); conn_init(conn); + conn->used = 1; } - conn->used = 1; conn->clid = clid; memcpy(&conn->addr, &data->conn->addr, data->conn->addrlen); conn->addrlen = data->conn->addrlen; + conn->id = data->conn->id; + conn->seq = data->conn->seq; + data->conn = conn; + } + if (conn_flag == CONN_TEMP && clid != 0) { + conn->id = data->conn->id; + conn->seq = data->conn->seq; data->conn = conn; } } @@ -575,16 +617,7 @@ } } else { /* client - send the data straight away */ - /* increment the sequence number */ - if (pldata->conn->seq == 65535) - pldata->conns->seq = 0; - else - pldata->conns->seq++; - - n = send_icmp_pkt(pl, pldata->conns, - pldata->conns->id, pldata->conns->seq, - data, len); - pldata->conns->seq++; + n = send_icmp_pkt(pl, pldata->conns, data, len); fprintf(stderr, "send_icmp_pkt: send returned %d\n", n); if (n > 0) { conn->data_sent_after_last_receive = 1; @@ -593,3 +626,10 @@ return SEND_ERROR; } } + +void +plugin_custom_receive(struct plugin *pl, uint8_t clid, + char *data, int len) +{ + plugin_send_queued_data(pl, conn_by_clid(pl->data, clid)); +} ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_tcp.c#12 (text+ko) ==== @@ -236,6 +236,7 @@ pl->receive = plugin_receive; pl->conn_close = plugin_conn_close; pl->conn_map = plugin_conn_map; + pl->custom_receive = plugin_custom_receive; pl->data = malloc(sizeof(struct plugin_tcp_data)); if (!pl->data) @@ -544,3 +545,9 @@ return SEND_PKT_SENT; } + +void +plugin_custom_receive(struct plugin *pl, uint8_t clid, + char *data, int len) +{ +} ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_udp.c#10 (text+ko) ==== @@ -170,6 +170,7 @@ pl->receive = plugin_receive; pl->conn_close = plugin_conn_close; pl->conn_map = plugin_conn_map; + pl->custom_receive = plugin_custom_receive; pl->data = malloc(sizeof(struct plugin_udp_data)); if (!pl->data) { @@ -335,3 +336,9 @@ return (SEND_PKT_SENT); } } + +void +plugin_custom_receive(struct plugin *pl, uint8_t clid, + char *data, int len) +{ +} From owner-p4-projects@FreeBSD.ORG Sat Aug 18 03:04:36 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0862A16A41B; Sat, 18 Aug 2007 03:04: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 8592616A418 for ; Sat, 18 Aug 2007 03:04:35 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7131F13C480 for ; Sat, 18 Aug 2007 03:04:35 +0000 (UTC) (envelope-from mharvan@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 l7I34Zak051725 for ; Sat, 18 Aug 2007 03:04:35 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7I34Z1L051722 for perforce@freebsd.org; Sat, 18 Aug 2007 03:04:35 GMT (envelope-from mharvan@FreeBSD.org) Date: Sat, 18 Aug 2007 03:04:35 GMT Message-Id: <200708180304.l7I34Z1L051722@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 125285 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, 18 Aug 2007 03:04:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=125285 Change 125285 by mharvan@mharvan_bike-planet on 2007/08/18 03:03:36 tcp plugin uses TCP_CATCHALL, i.e., listens on all unused ports Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#5 edit .. //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_tcp.c#13 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/mtund.c#5 (text+ko) ==== @@ -1191,13 +1191,7 @@ /* pl = load_plugin("./plugin_udp.so"); */ /* pl->name = "udp_catchall_1234"; */ pl = load_plugin("./plugin_tcp.so"); - pl->name = "tcp_25"; - pl = load_plugin("./plugin_tcp.so"); - pl->name = "tcp_80"; - pl = load_plugin("./plugin_tcp.so"); - pl->name = "tcp_110"; -/* pl = load_plugin("./plugin_tcp.so"); */ -/* pl->name = "tcp_catchall_1234"; */ + pl->name = "tcp_1234"; pl = load_plugin("./plugin_icmp.so"); pl->name = "icmp"; ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/plugin_tcp.c#13 (text+ko) ==== @@ -12,11 +12,15 @@ #include #include +#include +#include + #include "mtund.h" #include "plugin.h" #define MAXTMPCONNS 10 #define TEMP_CONN_TIMEOUT 5 +#define USE_TCP_CATCHALL 1 enum { CONN_STATUS_FREE, /* connection not in use */ @@ -283,9 +287,17 @@ data->tmpconns[i].data = data; } data->conn = NULL; - + if (server) { data->conns->fd = tcp_listen(port); + /* enable TCP_CATCHALL */ + if (USE_TCP_CATCHALL != 0) { + int soval = 1; + if (0 != setsockopt(data->conns->fd, IPPROTO_TCP, + TCP_CATCHALL, &soval, sizeof(soval))) + warnx("setsockopt(TCP_CATCHALL) failed\n"); + } + event_set(&data->conns->ev, data->conns->fd, EV_PERSIST | EV_READ, plugin_accept_new_conn, data->conns); if (data->conns->fd != -1) { From owner-p4-projects@FreeBSD.ORG Sat Aug 18 03:52:36 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5D7F416A418; Sat, 18 Aug 2007 03:52: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 1696816A469 for ; Sat, 18 Aug 2007 03:52:36 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 03F5813C458 for ; Sat, 18 Aug 2007 03:52:36 +0000 (UTC) (envelope-from andrew@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 l7I3qZEF054545 for ; Sat, 18 Aug 2007 03:52:35 GMT (envelope-from andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7I3qZ4a054542 for perforce@freebsd.org; Sat, 18 Aug 2007 03:52:35 GMT (envelope-from andrew@freebsd.org) Date: Sat, 18 Aug 2007 03:52:35 GMT Message-Id: <200708180352.l7I3qZ4a054542@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andrew@freebsd.org using -f From: Andrew Turner To: Perforce Change Reviews Cc: Subject: PERFORCE change 125286 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, 18 Aug 2007 03:52:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=125286 Change 125286 by andrew@andrew_hermies on 2007/08/18 03:52:19 Remove most of the menu as it was unused Add a dialog box to add new computers Add a menu item to remove computers from the gui Affected files ... .. //depot/projects/soc2007/andrew-update/frontend/facund-fe.glade#5 edit .. //depot/projects/soc2007/andrew-update/frontend/facund.py#10 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/__init__.py#7 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/computer.py#12 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/gui/__init__.py#5 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/gui/computer_model.py#7 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#11 edit .. //depot/projects/soc2007/andrew-update/frontend/facund/network/__init__.py#12 edit Differences ... ==== //depot/projects/soc2007/andrew-update/frontend/facund-fe.glade#5 (text+ko) ==== @@ -1,6 +1,6 @@ - + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -23,7 +23,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-new @@ -32,40 +32,22 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-open - True - True - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-save + gtk-delete True True - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-save-as - True - True - - - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-quit @@ -77,87 +59,6 @@ - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - _Edit - True - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-cut - True - True - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-copy - True - True - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-paste - True - True - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-delete - True - True - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - _View - True - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - _Help - True - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-about - True - True - - - - - - False @@ -209,19 +110,27 @@ 5 5 - + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Connect + 0 + + + + True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Remove + Disconnect 0 1 2 - 1 - 2 @@ -239,29 +148,21 @@ - + True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Disconnect + Remove 0 1 2 + 1 + 2 - - - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Connect - 0 - - False @@ -339,4 +240,140 @@ + + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + GTK_WIN_POS_CENTER_ON_PARENT + GDK_WINDOW_TYPE_HINT_DIALOG + False + False + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 3 + 2 + 3 + 10 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Computer's description +This is a Human redable +name for the computer + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + 1 + 2 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + 2 + 3 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Computer's name +leave blank for the +local computer + + + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Socket location +Leave blank for +the default socket + + + 2 + 3 + + + + + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_BUTTONBOX_END + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-save + True + 0 + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-cancel + True + 0 + + + 1 + + + + + False + GTK_PACK_END + + + + + ==== //depot/projects/soc2007/andrew-update/frontend/facund.py#10 (text+ko) ==== @@ -38,9 +38,18 @@ # fc.interact() if __name__ == "__main__": + computerList = facund.ComputerList() + computers = computerList.getComputerList() + computerModel = facund.gui.ComputerTreeModel() - localComputer = facund.Computer("Local computer", '/tmp/facund') - computerModel.addComputer(localComputer) + for i in range(len(computers)): + computer = facund.Computer(computers[i][0], computers[i][1], + computers[i][2]) + computerModel.addComputer(computer) + + # If we nee the computer list again we gan get it in the same way + del computers + del computerList updateModel = facund.gui.UpdateListModel() ==== //depot/projects/soc2007/andrew-update/frontend/facund/__init__.py#7 (text+ko) ==== @@ -26,6 +26,7 @@ from call import * from computer import * +from computer_list import * from controller import * from data import * ==== //depot/projects/soc2007/andrew-update/frontend/facund/computer.py#12 (text+ko) ==== @@ -45,17 +45,18 @@ class Computer(threading.Thread): '''A class to describe each computer able to be connected to''' - def __init__(self, name, host): + def __init__(self, name, host, socket): threading.Thread.__init__(self) self.__name = name self.__host = host + self.__socket = socket self.__dirs = [] self.__connected = False self.__connection = None self.__commands = ['Avaliable', 'Installed'] def __str__(self): - return self.__name + ": " + self.__host + return self.__name + ": " + (self.__host or self.__socket) def addDir(self, dir): '''Adds a directory to the avaliable directories to update''' @@ -77,6 +78,9 @@ '''Returns the hostname/ip of the computer''' return self.__host + def getSocket(self): + return self.__socket + def getCommands(self, dir): return self.__commands @@ -156,7 +160,7 @@ try: self.__connection = \ - facund.network.Connection(self.__host) + facund.network.Connection(self.__host, self.__socket) # Start the communication thread self.start() @@ -173,7 +177,7 @@ for dir in dirs: self.addDir(dir.getData()) except socket.error: - print "Couldn't connect to " + self.__host + print "Couldn't connect to %s " % (self.__host or self.__socket) del self.__connection self.__connection = None ==== //depot/projects/soc2007/andrew-update/frontend/facund/gui/__init__.py#5 (text+ko) ==== @@ -25,5 +25,6 @@ # from computer_model import ComputerTreeModel +from connection_dialog import ConnectionDialog from main_window import MainWindow from update_model import UpdateListModel ==== //depot/projects/soc2007/andrew-update/frontend/facund/gui/computer_model.py#7 (text+ko) ==== @@ -75,15 +75,11 @@ return self.__computers[name] def removeComputer(self, computer): - '''Removes a computer from the computer tree. TODO: Implement''' - iter = self.get_iter_from_string(computer) - print iter - - def addBaseDir(self, computer, dir): - '''Adds a base directory to manage to a computer. TODO: Implement''' - pass - - def removeBaseDir(self, computer, dir): - '''Removes a base directory from a computer. TODO: Implement''' - pass + '''Removes a computer from the computer tree''' + computer_name = computer.getName() + if self.__computers.has_key(computer_name) and \ + self.__iterators.has_key(computer): + del self.__computers[computer_name] + iter = self.__iterators[computer] + self.remove(iter) ==== //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#11 (text+ko) ==== @@ -24,6 +24,7 @@ # SUCH DAMAGE. # +import facund import gtk import gtk.gdk import gtk.glade @@ -37,7 +38,79 @@ self.__xml = gtk.glade.XML(glade_file) self.__widget = self.__xml.get_widget('facundWindow') - self.__widget.connect('destroy', lambda *w: gtk.main_quit()) + self.__widget.connect('destroy', self.onQuit) + + # Open the new computer window on File > New + menuItem = self.__xml.get_widget('newConnection') + menuItem.connect('activate', self.newConnection) + + # Remove the selected computer on File > Delete + menuItem = self.__xml.get_widget('delConnection') + menuItem.connect('activate', self.delConnection) + + # Attach the quit signal to File > Quit + menuItem = self.__xml.get_widget('progQuit') + menuItem.connect('activate', self.onQuit) + + self.__newConnectionDialog = None + + # Connect the signals to the new connection dialog box + button = self.__xml.get_widget('newConnectionCancel') + button.connect('clicked', self.connectionCancel) + + button = self.__xml.get_widget('newConnectionSave') + button.connect('clicked', self.connectionSave) + + def onQuit(self, data): + gtk.main_quit() + + def newConnection(self, data): + widget = self.__xml.get_widget('newConnectionDialog') + self.__newConnectionDialog = widget + self.__newConnectionDialog.show() + + def delConnection(self, data): + # Make sure the we have disconnected + self.onDisconnectClick(data) + computer = self.__controller.getCurrentComputer() + computerList = facund.ComputerList() + computerList.delComputer(computer) + self.__computerTreeModel.removeComputer(computer) + del computerList + + def connectionCancel(self, data): + self.__newConnectionDialog.hide() + self.__newConnectionDialog = None + + self.__xml.get_widget('computerNameEntry').set_text('') + self.__xml.get_widget('computerEntry').set_text('') + self.__xml.get_widget('computerEntry').set_text('') + + def connectionSave(self, data): + item = self.__xml.get_widget('computerEntry') + server = item.get_text() + if server is '': + server = None + + item = self.__xml.get_widget('socketEntry') + socket = item.get_text() + if socket is '': + socket = '/tmp/facund' + + item = self.__xml.get_widget('computerNameEntry') + name = item.get_text() + if name is '': + name = server or 'Local Computer' + + computer = facund.Computer(name, server, socket) + computerList = facund.ComputerList() + computerList.addComputer(computer) + del computerList + self.__computerTreeModel.addComputer(computer) + + # Use the connectionCancel handler as it + # closes the dialog and cleans up the fields + self.connectionCancel(data) def setController(self, controller): self.__controller = controller ==== //depot/projects/soc2007/andrew-update/frontend/facund/network/__init__.py#12 (text+ko) ==== @@ -33,10 +33,10 @@ import xml.sax.handler class PipeComms: - def __init__(self, server): - self.popen = subprocess.Popen(["/usr/bin/ssh", server, "/usr/bin/nc -oU /tmp/facund"], stdin=subprocess.PIPE, stdout=subprocess.PIPE) - print self.popen.stdout + def __init__(self, server, socket): + self.popen = subprocess.Popen(["/usr/bin/ssh", server, "/usr/bin/nc -oU %s" % socket], stdin=subprocess.PIPE, stdout=subprocess.PIPE) self.stdout = self.popen.stdout.fileno() + print poll() def read(self, len): return os.read(self.stdout, len) @@ -57,7 +57,7 @@ class Connection(xml.sax.handler.ContentHandler): '''A class that works as a client with the Facund XML IPC''' - def __init__(self, server): + def __init__(self, server, socket): self.isReady = False self.connectionType = "unix" @@ -65,10 +65,10 @@ self.__calls = {} self.bufSize = 1024 - if self.connectionType == "unix": - self.__connection = SocketComms(server) - elif self.connectionType == "pipe": - self.__connection = PipeComms(server) + if server is None: + self.__connection = SocketComms(socket) + else: + self.__connection = PipeComms(server, socket) self.send("") From owner-p4-projects@FreeBSD.ORG Sat Aug 18 06:22:42 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2CA8316A41A; Sat, 18 Aug 2007 06:22:42 +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 CCAA316A418 for ; Sat, 18 Aug 2007 06:22:41 +0000 (UTC) (envelope-from gcooper@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BB46B13C45A for ; Sat, 18 Aug 2007 06:22:41 +0000 (UTC) (envelope-from gcooper@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 l7I6MfQE076815 for ; Sat, 18 Aug 2007 06:22:41 GMT (envelope-from gcooper@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7I6Mfxp076812 for perforce@freebsd.org; Sat, 18 Aug 2007 06:22:41 GMT (envelope-from gcooper@FreeBSD.org) Date: Sat, 18 Aug 2007 06:22:41 GMT Message-Id: <200708180622.l7I6Mfxp076812@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gcooper@FreeBSD.org using -f From: Garrett Cooper To: Perforce Change Reviews Cc: Subject: PERFORCE change 125288 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, 18 Aug 2007 06:22:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=125288 Change 125288 by gcooper@optimus-revised_pkgtools on 2007/08/18 06:22:15 Whitespace and minor comment update. Affected files ... .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg.c#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg.h#4 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db.c#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db.h#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db_match.c#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db_private.h#4 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_manifest.c#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_private.h#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo.c#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo.h#3 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_files.c#4 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_ftp.c#4 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_private.h#4 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_util.c#4 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkgfile.c#4 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.c#4 edit .. //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.h#4 edit Differences ... ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg.c#3 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg.h#4 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db.c#3 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db.h#3 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db_match.c#3 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_db_private.h#4 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_manifest.c#3 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_private.h#3 (text+ko) ==== @@ -224,7 +224,6 @@ pkg_run_script_callback *pkg_run_script; }; -int pkg_dir_build(const char *, mode_t); int pkg_dir_clean(const char *); int pkg_exec(const char *, ...); FILE *pkg_cached_file(FILE *, const char *); ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo.c#3 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo.h#3 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_files.c#4 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_ftp.c#4 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_repo_private.h#4 (text+ko) ==== ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkg_util.c#4 (text+ko) ==== @@ -58,60 +58,6 @@ */ /** - * @brief A simplified version of `mkdir -p path' - * @return 0 on success, -1 on error - */ -/* Based off src/bin/mkdir/mkdir.c 1.32 */ -int -pkg_dir_build(const char *path, mode_t mode) -{ - struct stat sb; - int last, retval; - char *str, *p; - - str = strdup(path); - if (!str) { - return -1; - } - p = str; - retval = 0; - if (p[0] == '/') /* Skip leading '/'. */ - ++p; - for (last = 0; !last ; ++p) { - if (p[0] == '\0') - last = 1; - else if (p[0] != '/') - continue; - *p = '\0'; - if (!last && p[1] == '\0') - last = 1; - if (mkdir(str, - (mode == 0) ? (S_IRWXU | S_IRWXG | S_IRWXO) : mode) < 0) { - if (errno == EEXIST || errno == EISDIR) { - if (stat(str, &sb) < 0) { - retval = -1; - break; - } else if (!S_ISDIR(sb.st_mode)) { - if (last) - errno = EEXIST; - else - errno = ENOTDIR; - retval = -1; - break; - } - } else { - retval = -1; - break; - } - } - if (!last) - *p = '/'; - } - free(str); - return (retval); -} - -/** * @brief Walks from the a child directory to the root removing all empty directories * @param child The directory to start from * @return 0 on success ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/contrib/libpkg/pkgfile.c#4 (text+ko) ==== @@ -67,7 +67,7 @@ { struct pkgfile *file; - file = malloc(sizeof(struct pkgfile)); + file = calloc(sizeof(struct pkgfile)); if (file == NULL) return NULL; @@ -77,18 +77,6 @@ return NULL; } - file->cwd = NULL; - file->real_name = NULL; - file->type = type; - file->loc = location; - file->follow_link = 0; - file->fd = NULL; - file->data = NULL; - file->length = 0; - file->offset = 0; - file->mode = 0; - file->md5[0] = '\0'; - return file; } @@ -133,7 +121,7 @@ * @brief Gets a file's type from disk * * This is to be used when the file's type in needed but - * the file dosn't need to be opened + * the file doesn't need to be opened * @return 0 on success * @return -1 on error */ @@ -376,34 +364,34 @@ assert(file->type != pkgfile_none); switch (file->type) { - case pkgfile_none: - break; - case pkgfile_dir: - if (file->length == 0) - file->length = strlen(file->name); + case pkgfile_none: + break; + case pkgfile_dir: + if (file->length == 0) + file->length = strlen(file->name); + return file->length; + break; + case pkgfile_hardlink: + assert(file->loc == pkgfile_loc_mem); + if (file->loc == pkgfile_loc_mem) { return file->length; - break; - case pkgfile_hardlink: - assert(file->loc == pkgfile_loc_mem); - if (file->loc == pkgfile_loc_mem) { - return file->length; - } - break; - case pkgfile_regular: - if (file->loc == pkgfile_loc_disk) { - struct stat sb; + } + break; + case pkgfile_regular: + if (file->loc == pkgfile_loc_disk) { + struct stat sb; - fstat(fileno(file->fd), &sb); - return sb.st_size; - } else if (file->data != NULL) { - return file->length; - } - break; - case pkgfile_symlink: - if (file->data != NULL) { - return strlen(file->data); - } - break; + fstat(fileno(file->fd), &sb); + return sb.st_size; + } else if (file->data != NULL) { + return file->length; + } + break; + case pkgfile_symlink: + if (file->data != NULL) { + return strlen(file->data); + } + break; } return 0; @@ -437,7 +425,9 @@ } break; case pkgfile_regular: + if (file->loc == pkgfile_loc_disk) { + /* Load the file to the data pointer */ if (file->data == NULL && file->length > 0) { file->data = malloc(file->length); @@ -450,7 +440,9 @@ /** @todo check length < size left in file */ fread(file->data, 1, file->length, file->fd); } + } + case pkgfile_symlink: return file->data; } @@ -762,6 +754,7 @@ file->length -= strlen(line) + 1; if (file->loc == pkgfile_loc_disk) { + fseek(file->fd, 0, SEEK_SET); if (fwrite(file->data, 1, file->length, file->fd) != file->length) { @@ -769,6 +762,7 @@ return -1; } ftruncate(fileno(file->fd), file->length); + } return 0; @@ -885,7 +879,7 @@ * on the dir and opening again */ dir_name = dirname(pkgfile_real_name(file)); - pkg_dir_build(dir_name, 0); + mkdir_p(dir_name, 0); fd = fopen(pkgfile_real_name(file), "a"); if (fd == NULL) { return -1; @@ -938,7 +932,7 @@ return -1; dir_name = dirname(pkgfile_real_name(file)); - pkg_dir_build(dir_name, 0); + mkdir_p(dir_name, 0); if (link(file->data, file->name) != 0) return -1; } @@ -950,13 +944,13 @@ return -1; dir_name = dirname(pkgfile_real_name(file)); - pkg_dir_build(dir_name, 0); + mkdir_p(dir_name, ""); if (symlink(file->data, file->name) != 0) return -1; } break; case pkgfile_dir: - if (pkg_dir_build(pkgfile_real_name(file), file->mode) != 0) + if (mkdir_p(pkgfile_real_name(file), file->mode) != 0) return -1; break; } ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.c#4 (text+ko) ==== @@ -9,7 +9,7 @@ build_filedb(db *database, const char *filedb_filename, const char **file_manifest_filenames) { - int build_db_exit_status; + int build_db_ret_code; /** * Create temporary store for output conversion, @@ -20,9 +20,9 @@ /** * Convert all entries to strings. */ - build_db_exit_status = build_db(database, filedb_filename, file_data); + build_db_ret_code = build_db(database, filedb_filename, file_data); - return build_db_exit_status; + return build_db_ret_code; } @@ -35,7 +35,7 @@ build_pkgdb(db *database, const char *pkgdb_filename, const char **index_filenames) { - int build_db_exit_status; + int build_db_ret_code; /** * Create temporary store for output conversion, @@ -46,9 +46,9 @@ /** * Convert all entries to strings. */ - build_db_exit_status = build_db(database, pkgdb_filename, pkg_data); + build_db_ret_code = build_db(database, pkgdb_filename, pkg_data); - return build_db_exit_status; + return build_db_ret_code; } @@ -62,7 +62,7 @@ build_db(db *database, const char *db_filename, const char *data) { - int build_db_exit_status; + int build_db_ret_code; database->bdb_obj = dbopen(db_filename, O_CREAT | O_EXLOCK | O_EXCL | O_WRLOCK, 0644, DB_HASH, NULL); @@ -70,36 +70,36 @@ /** * dbopen was successful. */ - if(NULL != build_db_exit_status) { + if(NULL != build_db_ret_code) { /** * Try initializing the database header. */ - build_db_exit_status = initialize_database_header(database); + build_db_ret_code = initialize_database_header(database); /** * Database header creation was good. Continue by trying to * create the cache. */ - if(0 == build_db_exit_status) { + if(0 == build_db_ret_code) { - build_db_exit_status = initialize_entry_cache(database); + build_db_ret_code = initialize_entry_cache(database); /** - * Database is fully built if build_db_exit_status == 0. + * Database is fully built if build_db_ret_code == 0. */ } } else { - build_db_exit_status = 1; + build_db_ret_code = 1; } /** * Else dbopen was bunk -- return exit status. */ - return build_db_exit_status; + return build_db_ret_code; } @@ -124,7 +124,9 @@ } /** - * @brief Cache recent entry into pkg database, substituting + * @brief Cache entry into pkg database. + * + * Cache pkg entry into pkg database, substituting * the current entry for the least recently cached one. * @return 0 on success * @return 1 on failure @@ -154,6 +156,8 @@ remove_lru_cache_entry(db *database, const size_t entry_size) { + int db_ret_code = -1; + DBT /** * Cache updating related items. @@ -176,24 +180,37 @@ header_query = { __HEADER_TITLE, sizeof(__HEADER_TITLE) }, header_retrieved; -// int db_exit_status = database->bdb_obj->get(, 0); + /** + * Get the header -- search to see if there's a cache. + */ + db_ret_code = database->bdb_obj->get(database->bdb_obj, &header_query, &header_retrieved, 0); /** * Ok, there is a cache. Let's proceed. */ - if(0 == db_exit_status) { + if(0 == db_ret_code) { } - return db_exit_status; + return db_ret_code; } /** - * @brief Setup the database header; this should only be - * executed after building the database. + * @brief Setup the database header + * + * This initializes a header with the following format: + * + * _______________________________________________________________ + * | | | | + * | has_cache (uchar) | type (uchar) | cache_entry_prefix (char*) | + * | | | | + * --------------------------------------------------------------- + * + * This should only be executed after building the database, + * and should consist of * @return 0 on success * @return 1 on failure */ @@ -206,8 +223,11 @@ } /** - * @brief Setup the entry cache; this should only be executed - * after building the database. + * @brief Setup the entry cache. + * + * + * + * This should only be executed after building the database. * @return 0 on success * @return 1 on failure */ @@ -221,6 +241,11 @@ /** * @brief Cache recent entry into pkg database. + * + * This will consist of iterating through a package list, one by one, + * updating entries in the overall database, and then update the + * cache, as the database type requires. + * * @return 0 on success * @return 1 on failure */ @@ -235,6 +260,9 @@ /** * @brief Search for file in file database. + * + * Search over the database for a file, and return its entry. + * * @return file_entry if found. * @return NULL if not found. */ @@ -252,6 +280,12 @@ /** * @brief Search for package in pkg database. + * + * Search over the database for a file, and return its entry. + * + * The pkg database will contain a cache, so let's check the + * cache first. + * * @return the pkg_entry if found. * @return NULL if not found. */ @@ -270,10 +304,12 @@ /** * @brief Generic search method through a database, common * to both searching the file and pkg databases. - * @return 1 on successful find - * @return 0 on successful find. - * @return 1 on lack of resources (memset / malloc failed) - * or unknown BDB failure (check errno?) + * + * + * @return -1 on unsuccessful find + * @return 0 on successful find + * @return 1 on lack of resources (memset / malloc failed) + * or unknown BDB failure (check errno?) * */ @@ -333,35 +369,45 @@ } +/** + * @brief db constructor + * + * Create a new database, assign proper methods to + * the object for caching, building, flushing, etc, + * and return the built object. + * + * @return NULL on fail or a db object when successful. + */ void* initialize_db(const char *filename, __DB_TYPE_e db_type) { - db *database; + db *database = malloc(sizeof(db)); switch(db_type) { - case FILEDB: + case FILEDB: - database->__build = build_filedb; - database->__cache_entry = cache_file_entry; - database->__flush = flush_changes; - database->__free = free_db; - database->__search = file_search; + database->__build = build_filedb; + database->__cache_entry = cache_file_entry; + database->__flush = flush_changes; + database->__free = free_db; + database->__search = file_search; - break; + break; - case PKGDB: + case PKGDB: - database->__build = build_pkgdb; - database->__cache_entry = cache_pkg_entry; - database->__flush = flush_changes; - database->__free = free_db; - database->__search = pkg_search; + database->__build = build_pkgdb; + database->__cache_entry = cache_pkg_entry; + database->__flush = flush_changes; + database->__free = free_db; + database->__search = pkg_search; - break; + break; - default: - errx(-1, "Unknown package database type\n"); + + default: + errx(-1, "Unknown database type\n"); } @@ -369,9 +415,26 @@ } +/** + * @brief db destructor + * + * Close the BDB DB object and free up any allocated resources + * + * [currently all that means is that we need to call free()]. + * + * @return -1 on fail, 0 on success. + * + */ int -free_db(db* db_obj) +free_db(db* database) { + int db_ret_code = 0; + + db_ret_code = database->bdb_obj->close(); + + free(database); + + return 0; } ==== //depot/projects/soc2007/revised_fbsd_pkgtools/v2/lib/db/api.h#4 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Sat Aug 18 08:29:17 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D4BBB16A41A; Sat, 18 Aug 2007 08:29: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 A6E0516A417 for ; Sat, 18 Aug 2007 08:29:16 +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 96A7013C491 for ; Sat, 18 Aug 2007 08:29:16 +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 l7I8TGee086255 for ; Sat, 18 Aug 2007 08:29:16 GMT (envelope-from gabor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7I8TG8g086252 for perforce@freebsd.org; Sat, 18 Aug 2007 08:29:16 GMT (envelope-from gabor@freebsd.org) Date: Sat, 18 Aug 2007 08:29:16 GMT Message-Id: <200708180829.l7I8TG8g086252@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 125290 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, 18 Aug 2007 08:29:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=125290 Change 125290 by gabor@gabor_server on 2007/08/18 08:28:47 IFC Affected files ... .. //depot/projects/soc2006/gabor_destdir/MOVED#18 integrate .. //depot/projects/soc2006/gabor_destdir/Mk/bsd.qt.mk#4 integrate .. //depot/projects/soc2006/gabor_destdir/Mk/bsd.sites.mk#11 integrate .. //depot/projects/soc2006/gabor_destdir/Tools/scripts/README#2 integrate .. //depot/projects/soc2006/gabor_destdir/Tools/scripts/neededlibs.sh#1 branch .. //depot/projects/soc2006/gabor_destdir/Tools/scripts/resolveportsfromlibs.sh#1 branch Differences ... ==== //depot/projects/soc2006/gabor_destdir/MOVED#18 (text+ko) ==== @@ -1,7 +1,7 @@ # # MOVED - a list of (recently) moved or removed ports # -# $FreeBSD: ports/MOVED,v 1.1445 2007/08/08 19:30:35 sat Exp $ +# $FreeBSD: ports/MOVED,v 1.1458 2007/08/14 17:13:48 sat Exp $ # # Each entry consists of a single line containing the following four # fields in the order named, separated with the pipe (`|') character: @@ -3142,3 +3142,15 @@ editors/flim113||2007-08-05|Expired: distfile no longer available editors/semi113||2007-08-05|Expired: distfile no longer available deskutils/intclock|x11-clocks/intclock|2007-08-08|Moved to a more appropriate category +net/smokeping|net-mgmt/smokeping|2007-08-10|Moved to a more appropriate category +net/rrdtool10|databases/rrdtool10|2007-08-11|Moved to a more appropriate category +net/jrobin|databases/jrobin|2007-08-11|Moved to a more appropriate category +net/p5-POE-Component-RRDTool|databases/p5-POE-Component-RRDTool|2007-08-11|Moved to a more appropriate category +net/p5-RRD-Simple|databases/p5-RRD-Simple|2007-08-11|Moved to a more appropriate category +net/php4-rrdtool|databases/php4-rrdtool|2007-08-11|Moved to a more appropriate category +net/py-rrdtool_lgpl|databases/py-rrdtool_lgpl|2007-08-11|Moved to a more appropriate category +games/gpuzzle|games/jigsaw|2007-08-11|Project renamed +devel/upnp104|devel/upnp|2007-08-12|Obsoleted by newer version +shells/perlsh|shells/psh|2007-08-13|Renamed to reflect correct project's name +mail/qmHandle|mail/qmhandle|2007-08-13|Renamed to reflect correct project's name +science/speedcrunch|math/speedcrunch|2007-08-14|Moved to a more appropriate category ==== //depot/projects/soc2006/gabor_destdir/Mk/bsd.qt.mk#4 (text+ko) ==== @@ -100,7 +100,6 @@ porting_DEPENDS= devel/qt4-porting qdbusviewer_DEPENDS= devel/qt4-qdbusviewer qmake_DEPENDS= devel/qmake4 -qmake_QT4_PREFIX= # empty qt3support_DEPENDS= devel/qt4-qt3support qtconfig_DEPENDS= devel/qtconfig qtestlib_DEPENDS= devel/qt4-qtestlib @@ -138,7 +137,6 @@ porting_build_DEPENDS= ${porting_DEPENDS} qdbusviewer_build_DEPENDS= ${qdbusviewer_DEPENDS} qmake_build_DEPENDS= ${qmake_DEPENDS} -qmake_build_QT4_PREFIX= ${qmake_QT4_PREFIX} qt3support_build_DEPENDS= ${qt3support_DEPENDS} qtconfig_build_DEPENDS= ${qtconfig_DEPENDS} qtestlib_build_DEPENDS= ${qtestlib_DEPENDS} @@ -176,7 +174,6 @@ porting_run_DEPENDS= ${porting_DEPENDS} qdbusviewer_run_DEPENDS= ${qdbusviewer_DEPENDS} qmake_run_DEPENDS= ${qmake_DEPENDS} -qmake_run_QT4_PREFIX= ${qmake_QT4_PREFIX} qt3support_run_DEPENDS= ${qt3support_DEPENDS} qtconfig_run_DEPENDS= ${qtconfig_DEPENDS} qtestlib_run_DEPENDS= ${qtestlib_DEPENDS} ==== //depot/projects/soc2006/gabor_destdir/Mk/bsd.sites.mk#11 (text+ko) ==== @@ -20,7 +20,7 @@ # # Note: all entries should terminate with a slash. # -# $FreeBSD: ports/Mk/bsd.sites.mk,v 1.424 2007/07/12 22:50:04 edwin Exp $ +# $FreeBSD: ports/Mk/bsd.sites.mk,v 1.426 2007/08/16 11:55:02 sat Exp $ # # Where to put distfiles that don't have any other master site @@ -1287,12 +1287,11 @@ ftp://ftp9.us.vim.org/pub/vim/unix/ \ ftp://ftp.ca.vim.org/pub/vim/unix/ \ ftp://ftp.nl.vim.org/pub/vim/unix/ \ - ftp://ftp.de.vim.org/pub/vim/unix/ \ + ftp://ftp.de.vim.org/unix/ \ ftp://ftp3.de.vim.org/pub/vim/unix/ \ ftp://ftp.uk.vim.org/pub/vim/unix/ \ ftp://ftp.ie.vim.org/pub/vim/unix/ \ ftp://ftp.at.vim.org/pub/vim/unix/ \ - ftp://ftp.se.vim.org/pub/vim/unix/ \ ftp://ftp.pt.vim.org/pub/vim/unix/ \ ftp://ftp.is.vim.org/pub/vim/unix/ \ ftp://ftp.il.vim.org/pub/vim/unix/ \ @@ -1430,6 +1429,7 @@ DEBIAN:pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME} \ GCC:releases/${DISTNAME} \ GNOME:sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} \ + GNU:${PORTNAME} \ HORDE:${PORTNAME} \ MOZDEV:${PORTNAME:L} \ PERL_CPAN:${PORTNAME:C/-.*//} \ ==== //depot/projects/soc2006/gabor_destdir/Tools/scripts/README#2 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: ports/Tools/scripts/README,v 1.17 2005/04/12 10:56:08 tobez Exp $ +$FreeBSD: ports/Tools/scripts/README,v 1.18 2007/08/12 12:49:23 netchild Exp $ addport - replacement for easy-import bump_revision.pl - Small script to bump the PORTREVISION variable of ports @@ -25,6 +25,7 @@ this probably needs to be checked for potential security problems. gnomedepends - Analyse pkg/PLIST and give an advice as to which GNOME ports should be listes in {RUN,LIB}_DEPENDS for this port +neededlibs.sh - Extract direct library dependencies from binaries. plist - automate (mostly, at least) pkg-plist generation prpatch - just does `patch $1 < pr-patch' (pr-patch is created by getpr) prdone - checks in the port, attempting to fill out the commit message using @@ -33,6 +34,8 @@ portsearch - A utility for searching the ports tree. It allows more detailed search criteria than ``make search key='' and accepts all perl(1) regular expressions. +resolveportsfromlibs.sh - Prints the name(s) of ports(s) given a library + filename, suitable for direct use in LIB_DEPENDS. splitpatch.pl - A small script to convert multi-file patches to several appropriately named single-file patches. tindex - script used to build INDEXes for supported FreeBSD branches, which From owner-p4-projects@FreeBSD.ORG Sat Aug 18 08:30:19 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0EDF516A420; Sat, 18 Aug 2007 08:30: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 D657416A417 for ; Sat, 18 Aug 2007 08:30:18 +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 C5DBB13C480 for ; Sat, 18 Aug 2007 08:30:18 +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 l7I8UIV8086368 for ; Sat, 18 Aug 2007 08:30:18 GMT (envelope-from gabor@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7I8UIv3086355 for perforce@freebsd.org; Sat, 18 Aug 2007 08:30:18 GMT (envelope-from gabor@freebsd.org) Date: Sat, 18 Aug 2007 08:30:18 GMT Message-Id: <200708180830.l7I8UIv3086355@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 125291 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, 18 Aug 2007 08:30:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=125291 Change 125291 by gabor@gabor_server on 2007/08/18 08:29:35 IFC Affected files ... .. //depot/projects/soc2007/gabor_perlmk/MOVED#4 integrate .. //depot/projects/soc2007/gabor_perlmk/Mk/bsd.qt.mk#3 integrate .. //depot/projects/soc2007/gabor_perlmk/Mk/bsd.sites.mk#2 integrate .. //depot/projects/soc2007/gabor_perlmk/Tools/scripts/README#2 integrate .. //depot/projects/soc2007/gabor_perlmk/Tools/scripts/neededlibs.sh#1 branch .. //depot/projects/soc2007/gabor_perlmk/Tools/scripts/resolveportsfromlibs.sh#1 branch Differences ... ==== //depot/projects/soc2007/gabor_perlmk/MOVED#4 (text+ko) ==== @@ -1,7 +1,7 @@ # # MOVED - a list of (recently) moved or removed ports # -# $FreeBSD: ports/MOVED,v 1.1445 2007/08/08 19:30:35 sat Exp $ +# $FreeBSD: ports/MOVED,v 1.1458 2007/08/14 17:13:48 sat Exp $ # # Each entry consists of a single line containing the following four # fields in the order named, separated with the pipe (`|') character: @@ -3142,3 +3142,15 @@ editors/flim113||2007-08-05|Expired: distfile no longer available editors/semi113||2007-08-05|Expired: distfile no longer available deskutils/intclock|x11-clocks/intclock|2007-08-08|Moved to a more appropriate category +net/smokeping|net-mgmt/smokeping|2007-08-10|Moved to a more appropriate category +net/rrdtool10|databases/rrdtool10|2007-08-11|Moved to a more appropriate category +net/jrobin|databases/jrobin|2007-08-11|Moved to a more appropriate category +net/p5-POE-Component-RRDTool|databases/p5-POE-Component-RRDTool|2007-08-11|Moved to a more appropriate category +net/p5-RRD-Simple|databases/p5-RRD-Simple|2007-08-11|Moved to a more appropriate category +net/php4-rrdtool|databases/php4-rrdtool|2007-08-11|Moved to a more appropriate category +net/py-rrdtool_lgpl|databases/py-rrdtool_lgpl|2007-08-11|Moved to a more appropriate category +games/gpuzzle|games/jigsaw|2007-08-11|Project renamed +devel/upnp104|devel/upnp|2007-08-12|Obsoleted by newer version +shells/perlsh|shells/psh|2007-08-13|Renamed to reflect correct project's name +mail/qmHandle|mail/qmhandle|2007-08-13|Renamed to reflect correct project's name +science/speedcrunch|math/speedcrunch|2007-08-14|Moved to a more appropriate category ==== //depot/projects/soc2007/gabor_perlmk/Mk/bsd.qt.mk#3 (text+ko) ==== @@ -100,7 +100,6 @@ porting_DEPENDS= devel/qt4-porting qdbusviewer_DEPENDS= devel/qt4-qdbusviewer qmake_DEPENDS= devel/qmake4 -qmake_QT4_PREFIX= # empty qt3support_DEPENDS= devel/qt4-qt3support qtconfig_DEPENDS= devel/qtconfig qtestlib_DEPENDS= devel/qt4-qtestlib @@ -138,7 +137,6 @@ porting_build_DEPENDS= ${porting_DEPENDS} qdbusviewer_build_DEPENDS= ${qdbusviewer_DEPENDS} qmake_build_DEPENDS= ${qmake_DEPENDS} -qmake_build_QT4_PREFIX= ${qmake_QT4_PREFIX} qt3support_build_DEPENDS= ${qt3support_DEPENDS} qtconfig_build_DEPENDS= ${qtconfig_DEPENDS} qtestlib_build_DEPENDS= ${qtestlib_DEPENDS} @@ -176,7 +174,6 @@ porting_run_DEPENDS= ${porting_DEPENDS} qdbusviewer_run_DEPENDS= ${qdbusviewer_DEPENDS} qmake_run_DEPENDS= ${qmake_DEPENDS} -qmake_run_QT4_PREFIX= ${qmake_QT4_PREFIX} qt3support_run_DEPENDS= ${qt3support_DEPENDS} qtconfig_run_DEPENDS= ${qtconfig_DEPENDS} qtestlib_run_DEPENDS= ${qtestlib_DEPENDS} ==== //depot/projects/soc2007/gabor_perlmk/Mk/bsd.sites.mk#2 (text+ko) ==== @@ -20,7 +20,7 @@ # # Note: all entries should terminate with a slash. # -# $FreeBSD: ports/Mk/bsd.sites.mk,v 1.424 2007/07/12 22:50:04 edwin Exp $ +# $FreeBSD: ports/Mk/bsd.sites.mk,v 1.426 2007/08/16 11:55:02 sat Exp $ # # Where to put distfiles that don't have any other master site @@ -1287,12 +1287,11 @@ ftp://ftp9.us.vim.org/pub/vim/unix/ \ ftp://ftp.ca.vim.org/pub/vim/unix/ \ ftp://ftp.nl.vim.org/pub/vim/unix/ \ - ftp://ftp.de.vim.org/pub/vim/unix/ \ + ftp://ftp.de.vim.org/unix/ \ ftp://ftp3.de.vim.org/pub/vim/unix/ \ ftp://ftp.uk.vim.org/pub/vim/unix/ \ ftp://ftp.ie.vim.org/pub/vim/unix/ \ ftp://ftp.at.vim.org/pub/vim/unix/ \ - ftp://ftp.se.vim.org/pub/vim/unix/ \ ftp://ftp.pt.vim.org/pub/vim/unix/ \ ftp://ftp.is.vim.org/pub/vim/unix/ \ ftp://ftp.il.vim.org/pub/vim/unix/ \ @@ -1430,6 +1429,7 @@ DEBIAN:pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME} \ GCC:releases/${DISTNAME} \ GNOME:sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} \ + GNU:${PORTNAME} \ HORDE:${PORTNAME} \ MOZDEV:${PORTNAME:L} \ PERL_CPAN:${PORTNAME:C/-.*//} \ ==== //depot/projects/soc2007/gabor_perlmk/Tools/scripts/README#2 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: ports/Tools/scripts/README,v 1.17 2005/04/12 10:56:08 tobez Exp $ +$FreeBSD: ports/Tools/scripts/README,v 1.18 2007/08/12 12:49:23 netchild Exp $ addport - replacement for easy-import bump_revision.pl - Small script to bump the PORTREVISION variable of ports @@ -25,6 +25,7 @@ this probably needs to be checked for potential security problems. gnomedepends - Analyse pkg/PLIST and give an advice as to which GNOME ports should be listes in {RUN,LIB}_DEPENDS for this port +neededlibs.sh - Extract direct library dependencies from binaries. plist - automate (mostly, at least) pkg-plist generation prpatch - just does `patch $1 < pr-patch' (pr-patch is created by getpr) prdone - checks in the port, attempting to fill out the commit message using @@ -33,6 +34,8 @@ portsearch - A utility for searching the ports tree. It allows more detailed search criteria than ``make search key='' and accepts all perl(1) regular expressions. +resolveportsfromlibs.sh - Prints the name(s) of ports(s) given a library + filename, suitable for direct use in LIB_DEPENDS. splitpatch.pl - A small script to convert multi-file patches to several appropriately named single-file patches. tindex - script used to build INDEXes for supported FreeBSD branches, which From owner-p4-projects@FreeBSD.ORG Sat Aug 18 08:46:15 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F3D4816A4A9; Sat, 18 Aug 2007 08:46: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 9369616A419 for ; Sat, 18 Aug 2007 08:46:14 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 4A55513C442 for ; Sat, 18 Aug 2007 08:46:13 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 3BE088C12F8; Sat, 18 Aug 2007 10:46:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nKYtC+ZpuVQN; Sat, 18 Aug 2007 10:46:08 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id E0CE98C12F7; Sat, 18 Aug 2007 10:46:08 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l7I8k8rU071163; Sat, 18 Aug 2007 10:46:08 +0200 (CEST) (envelope-from rdivacky) Date: Sat, 18 Aug 2007 10:46:08 +0200 From: Roman Divacky To: Jesper Brix Rosenkilde Message-ID: <20070818084608.GA70909@freebsd.org> References: <200708172057.l7HKvMhw000824@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200708172057.l7HKvMhw000824@repoman.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: Perforce Change Reviews Subject: Re: PERFORCE change 125277 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, 18 Aug 2007 08:46:15 -0000 > struct image_params *imgp; > { > int error; > + struct proc *p = imgp->proc; > vm_map_t map = &imgp->proc->p_vmspace->vm_map; > vm_offset_t *addr = &imgp->proc->p_usrsysshm; > - int test = 42; > + struct sysshm outsysshm; > > error = vm_map_sysshm(map, addr, 42); > > - copyout((caddr_t) &test, (caddr_t) *addr, sizeof(int)); > + outsysshm.pid = p->p_pid; > + strncpy(outsysshm.progtitle, p->p_comm, MAXCOMLEN); > + strncpy(outsysshm.proctitle, "\0", 1); > + copyout((caddr_t) &outsysshm, (caddr_t) *addr, sizeof(struct sysshm)); the p->p_comm can be changed under your hands. you need to lock "p" and obtain local copy and copyout the local copy. > +struct sysshm { > + pid_t pid; > + char progtitle[20]; > + char proctitle[2048]; > +}; please use some defines here... I think you want to use MAXCOMLEN+1 From owner-p4-projects@FreeBSD.ORG Sat Aug 18 12:32:25 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 52FC416A421; Sat, 18 Aug 2007 12:32:25 +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 26E2916A41B for ; Sat, 18 Aug 2007 12:32:25 +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 159AF13C45D for ; Sat, 18 Aug 2007 12:32:25 +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 l7ICWOnx018399 for ; Sat, 18 Aug 2007 12:32:24 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7ICWObU018394 for perforce@freebsd.org; Sat, 18 Aug 2007 12:32:24 GMT (envelope-from gonzo@FreeBSD.org) Date: Sat, 18 Aug 2007 12:32:24 GMT Message-Id: <200708181232.l7ICWObU018394@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 125296 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, 18 Aug 2007 12:32:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=125296 Change 125296 by gonzo@gonzo_jeeves on 2007/08/18 12:32:03 o Give TX intr enable/disable functions proper names: use enable/disable instead of start/stop o Speed up serial console by using RX/TX FIFOs. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips32/adm5120/uart_dev_adm5120.c#2 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips32/adm5120/uart_dev_adm5120.c#2 (text+ko) ==== @@ -185,7 +185,7 @@ * Disable TX interrupt. uart should be locked */ static __inline void -adm5120_uart_stop_tx(struct uart_softc *sc) +adm5120_uart_disable_txintr(struct uart_softc *sc) { uint8_t cr; @@ -198,7 +198,7 @@ * Enable TX interrupt. uart should be locked */ static __inline void -adm5120_uart_start_tx(struct uart_softc *sc) +adm5120_uart_enable_txintr(struct uart_softc *sc) { uint8_t cr; @@ -221,12 +221,12 @@ /* TODO: set parameters 115200, 8N1 */ } - sc->sc_rxfifosz = 1; - sc->sc_txfifosz = 1; + sc->sc_rxfifosz = 16; + sc->sc_txfifosz = 16; (void)adm5120_uart_bus_getsig(sc); -#if 0 +#if 1 /* Enable FIFO */ uart_setreg(bas, UART_LCR_H_REG, uart_getreg(bas, UART_LCR_H_REG) | UART_LCR_H_FEN); @@ -334,7 +334,7 @@ if (fr & UART_FR_TX_FIFO_EMPTY) { if (ir & UART_IR_TX_INT) { - adm5120_uart_stop_tx(sc); + adm5120_uart_disable_txintr(sc); ipend |= SER_INT_TXIDLE; } } @@ -438,15 +438,15 @@ bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - while (uart_getreg(bas, UART_FR_REG) & UART_FR_TX_FIFO_FULL) - ; - uart_setreg(bas, UART_DR_REG, sc->sc_txbuf[0]); - uart_barrier(bas); - sc->sc_txbusy = 1; + for (int i = 0; i < sc->sc_txdatasz; i++) { + if (uart_getreg(bas, UART_FR_REG) & UART_FR_TX_FIFO_FULL) + break; + uart_setreg(bas, UART_DR_REG, sc->sc_txbuf[i]); + } /* Enable TX interrupt */ - adm5120_uart_start_tx(sc); + adm5120_uart_enable_txintr(sc); uart_unlock(sc->sc_hwmtx); return (0); } From owner-p4-projects@FreeBSD.ORG Sat Aug 18 13:50:01 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ED86E16A420; Sat, 18 Aug 2007 13:50:00 +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 A96FB16A419 for ; Sat, 18 Aug 2007 13:50:00 +0000 (UTC) (envelope-from taleks@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9566D13C45D for ; Sat, 18 Aug 2007 13:50:00 +0000 (UTC) (envelope-from taleks@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 l7IDo02Y033154 for ; Sat, 18 Aug 2007 13:50:00 GMT (envelope-from taleks@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7IDnxTv033139 for perforce@freebsd.org; Sat, 18 Aug 2007 13:49:59 GMT (envelope-from taleks@FreeBSD.org) Date: Sat, 18 Aug 2007 13:49:59 GMT Message-Id: <200708181349.l7IDnxTv033139@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to taleks@FreeBSD.org using -f From: Alexey Tarasov To: Perforce Change Reviews Cc: Subject: PERFORCE change 125297 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, 18 Aug 2007 13:50:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=125297 Change 125297 by taleks@taleks_th on 2007/08/18 13:49:11 libi386/pxe.c: moved rootpath parsing to pxe_core_update_bootp() loader/main.c: updated for correct usage of PXE_IPADDR loader/Makefile: fixed double defining of macros, added PXE_MORE pxe_http: fixed usage of servername, DNS resolving for http server moved to pxe_core. Makefile: added PXE_TCP_AGRESSIVE macro pxe_await.h: made delay smaller pxe_core: added pxe_core_update_bootp() function for parsing rootpath and etc after BOOTP/DHCP session. pxe_dhcp: changed packet type to PXE_DHCPDISCOVER instead of PXE_DHCPREQUEST. Seems, more correct. pxe_segment: made segment acking more correct. pxe_sock: updated pxe_recv() by replacing values by macro. pxe_tcp: changed PXE_TCP_MSS to smaller size. Helps in tests with working in Internet . pxe_udp: fixed preprocessor misstype README: updated documentation. ----- Most probably last submit this summer. Testing is welcomed. Affected files ... .. //depot/projects/soc2007/taleks-pxe_http/Makefile#15 edit .. //depot/projects/soc2007/taleks-pxe_http/README#3 edit .. //depot/projects/soc2007/taleks-pxe_http/httpfs.c#8 edit .. //depot/projects/soc2007/taleks-pxe_http/libi386_mod/pxe.c#5 edit .. //depot/projects/soc2007/taleks-pxe_http/loader_mod/Makefile#3 edit .. //depot/projects/soc2007/taleks-pxe_http/loader_mod/main.c#3 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_await.h#5 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_core.c#26 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_core.h#22 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_dhcp.c#9 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_dhcp.h#9 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_http.c#12 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_icmp.c#15 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_segment.c#11 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_sock.c#20 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_tcp.c#14 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_tcp.h#9 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_udp.c#11 edit .. //depot/projects/soc2007/taleks-pxe_http/pxe_udp.h#8 edit Differences ... ==== //depot/projects/soc2007/taleks-pxe_http/Makefile#15 (text+ko) ==== @@ -35,9 +35,12 @@ #CFLAGS+= -DPXE_HTTP_DEBUG_HELL # define to get more PXE related code and testing functions -# CFLAGS+= -DPXE_MORE +#CFLAGS+= -DPXE_MORE # define to get some speed up by bigger requests CFLAGS+= -DPXE_HTTPFS_CACHING +# define to send packets freqently to speed up connection +#CFLAGS+= -DPXE_TCP_AGRESSIVE + .include ==== //depot/projects/soc2007/taleks-pxe_http/README#3 (text+ko) ==== @@ -1,30 +1,70 @@ +Contents +---------- 1. Introduction -1.2. Setting up -1.2.1. DHCP configuration -1.2.2. TFTP configuration -1.2.3. Web-server configuration -1.2.4. loader.rc configuratuion + + 1.2. Setting up + + 1.2.1. DHCP configuration + 1.2.2. TFTP configuration + 1.2.3. Web-server configuration + 1.2.4. loader.rc configuratuion + 2. Project organisation -2.1. Code modules -2.2. Naming conventions -2.3. Understanding logical structure of code + + 2.1. Code modules + 2.2. Naming conventions + 2.3. Understanding logical structure of code + 3. API usage -3.1. Base information -3.2. PXE sockets API overview -3.2.1. PXE API socket details -3.3. Quick Reference to API, available for user code -3.3.1. pxe_arp module -3.3.2. pxe_await module -3.3.3 pxe_buffer module -3.3.4. pxe_connection module -3.3.5. pxe_core module + + 3.1. Base information + 3.2. PXE sockets API overview + + 3.2.1. PXE API socket details + + 3.3. Quick Reference to API, available for user code + + 3.3.1. pxe_arp module + 3.3.2. pxe_await module + 3.3.3. pxe_buffer module + 3.3.4. pxe_connection module + 3.3.5. pxe_core module + 3.3.6. pxe_dhcp module + 3.3.7. pxe_dns module + 3.3.8. pxe_filter module + 3.3.9. pxe_http module + 3.3.10. httpfs module + 3.3.11. pxe_icmp module + 3.3.12. pxe_ip module + 3.3.13. pxe_isr module + 3.3.14. pxe_mem module + 3.3.15. pxe_sock module + 3.3.16. pxe_segment module + 3.3.17. pxe_tcp module + 3.3.18. pxe_udp module + +4. Debugging, testing and tuning pxe_http library. + + 4.1. Using 'pxe' loader's command + 4.2. Defining debug macroses + 4.3. Tuning + 4.4. NFS loading with pxe_http 1. Introduction ---------------- pxe_http library is user space implementation of simplified - TCP/IP4 stack with support of sockets. + TCP/IP4 stack with support of sockets. Socket implementation is similar + to common sockets, but differs, so I call this variant of sockets - + "PXE sockets" + + features (read: simpliest ever implementation of): + * supports TCP/UDP PXE sockets + * DHCP client + * DNS client + * http based filesystem + * ICMP echo 1.1. Requirements ------------------ @@ -175,7 +215,7 @@ /* end of example */ Of course, it's possible to set any other filesystem to work - as root, e,g, NFS. + as root, e,g, NFS and not use RAM drive. 2. Project organisation ------------------------ @@ -189,18 +229,20 @@ pxe_buffer - implements cyclic buffers (3.3.3) pxe_connection - TCP connection related functions (3.3.4) pxe_core - provides calls to PXE API (3.3.5) - pxe_dhcp - DHCP client - pxe_dns - DNS client - pxe_filter - incoming packet filters - pxe_http - HTTP related functions - pxe_icmp - ICMP protocol - pxe_ip - IP protocol - pxe_isr - assembler side support for PXE API calling - pxe_mem - memory work routines - pxe_sock - simple sockets - pxe_segment - TCP segments - pxe_tcp - TCP protocol - pxe_udp - UDP protocol + pxe_dhcp - DHCP client (3.3.6) + pxe_dns - DNS client (3.3.7) + pxe_filter - incoming packet filters (3.3.8) + pxe_http - HTTP related functions (3.3.9) + httpfs - http based file system (3.3.10) + pxe_icmp - ICMP protocol (3.3.11) + pxe_ip - IP protocol (3.3.12) + pxe_isr - assembler side support for PXE API + calling (3.3.13) + pxe_mem - memory work routines (3.3.14) + pxe_sock - simple sockets (3.3.15) + pxe_segment - TCP segments (3.3.16) + pxe_tcp - TCP protocol (3.3.17) + pxe_udp - UDP protocol (3.3.18) 2.2. Naming conventions ------------------------ @@ -239,8 +281,7 @@ stack protocol, other packets are ignored. Registration of handler (except ARP) is performed during initialisation time of module with usage of pxe_core_register() function, - which register handler for IP stack protocol - number. + which register handler for IP stack protocol number. So, packet is provided to handler, but it may be fragmented, thus before processing it must be recieved completely. But in some cases packet may be not interesting for protocol (unexpected packet, dublicated @@ -267,6 +308,9 @@ 3. API usage ------------- + Here much attention paid to sockets, other pxe_http API + may be used less frequently. + 3.1. Base information ----------------------- @@ -289,7 +333,7 @@ related functions are declared in pxe_sock.h header Socket is created by pxe_socket() call. After usage socket must - be closed by pxe_close() call. Result of pxe_call() is integer + be closed by pxe_close() call. Result of pxe_socket() is integer descriptor associated with socket. After creating socket is unbinded and not connected. pxe_sendto(), pxe_connect(), pxe_bind() functions performs @@ -305,6 +349,7 @@ that have default sizes 16Kb and 4Kb. If buffers are full, next calls related to writing or reading data will fail. + 3.2.1. PXE API socket details ------------------------------ @@ -384,6 +429,10 @@ 3.3 Quick Reference to API, available for user code ---------------------------------------------------- + This overview covers functions and macro definitions that + may be usefull for user code. + + 3.3.1 pxe_arp module --------------------- @@ -392,20 +441,21 @@ macro definitions: -MAX_ARP_ENTRIES - how much may be ARP table in size. If ARP table full and new - MAC must be placed, then one of older entry is replaced by new. Default - number is 4. +MAX_ARP_ENTRIES - how much may be ARP table in size. If ARP table full + and new MAC must be placed, then one of older entry is + replaced by new. Default number is 4. -PXE_MAX_ARP_TRY - how much trys will be peformed when sending ARP requests, - before say MAC search failed. Default: 3 +PXE_MAX_ARP_TRY - how much trys will be peformed when sending ARP + requests, before say MAC search failed. Default: 3 -PXE_TIME_TO_DIE - how much time to wait ARP reply in milliseconds. - Default: 5000 ms. +PXE_TIME_TO_DIE - how much time to wait ARP reply in milliseconds. + Default: 5000 ms. -PXE_ARP_SNIFF - sometimes it's usefull to get MACs from incoming requests - (this may save time, MAC may be found in table without requesting it by - ARP module itself). But if network is big enough - ARP table will be - updated too often. By default this option is defined. +PXE_ARP_SNIFF - sometimes it's usefull to get senders MACs from + incoming requests (this may save time, MAC may be found + in table without requesting it by ARP module itself). + But if network is big enough - ARP table will be + updated too often. By default this option is defined. functions: @@ -522,16 +572,20 @@ macro definitions: -TIME_DELTA_MS - delay between iterations during awaitng. At each iteration - are checked: - * receiving of new packet. If received - awaiting function with - PXE_AWAIT_NEWPACKETS function is called. - * try timeout. if timeout exceeds maximum timeout - awaiting - function with PXE_AWAIT_FINISHTRY and PXE_AWAIT_STARTTRY - flags sequentially are called. - * try count. if try count exceeds maximum - awaiting function - with PXE_AWAIT_ENDED flag is called. This means that await - failed. +TIME_DELTA_MS - delay between iterations during awaitng. At each + iteration are checked: + * receiving of new packet. If received - awaiting + function with PXE_AWAIT_NEWPACKETS function is called. + * try timeout. if timeout exceeds maximum timeout - + awaiting function with PXE_AWAIT_FINISHTRY and + PXE_AWAIT_STARTTRY flags sequentially are called. + * try count. if try count exceeds maximum - awaiting + function with PXE_AWAIT_ENDED flag is called. This + means that await failed. + Default: 1 + +TIME_DELTA - default: 1000, same as TIME_DELTA_MS, but in ticks + for delay. 3.3.3 pxe_buffer module @@ -542,19 +596,23 @@ macro definitions: -PXE_POOL_SLOTS - if defined, then statical allocation of buffers is used. - Otherwise buffers are allocated at run-time from heap with pxe_alloc() - function. Current statical allocation algorithm is simple and square, - there are two big buffers data storages divided in slots (by default 2). - Each slot has size equal to PXE_DEFAULT_RECV_BUFSIZE or - PXE_DEFAULT_SEND_BUFSIZE. Depending on requested size in - pxe_buffer_alloc() function data allocated from one of stoarge and - related slot marked busy. When pxe_buffer_free() called, slot marked - as free. - Default: undefined +PXE_POOL_SLOTS - if defined, then statical allocation of buffers is + used. Otherwise buffers are allocated at run-time from + heap with pxe_alloc() function. Current statical + allocation algorithm is simple and square, there are + two big buffers data storages divided in slots (by + default 2). + Each slot has size equal to + PXE_DEFAULT_RECV_BUFSIZE or PXE_DEFAULT_SEND_BUFSIZE. + Depending on requested size in pxe_buffer_alloc() + function data allocated from one of stoarge and + related slot marked busy. When pxe_buffer_free() called, + slot marked as free. + Default: undefined + +PXE_DEFAULT_RECV_BUFSIZE - size of receiving buffer. Default: 16392 -PXE_DEFAULT_RECV_BUFSIZE - size of receiving buffer. Default: 16392 -PXE_DEFAULT_SEND_BUFSIZE - size of sending buffer. Default: 4096 +PXE_DEFAULT_SEND_BUFSIZE - size of sending buffer. Default: 4096 3.3.4 pxe_connection module @@ -573,7 +631,8 @@ functions: void pxe_connection_stats() - - returns connections statistics. Available if defined PXE_MORE macro. + - returns connections statistics. Available if PXE_MORE macro is + defined. 3.3.5 pxe_core module @@ -587,8 +646,9 @@ PXE_BUFFER_SIZE - size of core buffers, used in PXE API calling, Default: 4096 -PXE_CORE_STATIC_BUFFERS - if defined, core buffers are allocated statically. - Otherwise they are allocated in heap. Default: defined + +PXE_CORE_STATIC_BUFFERS - if defined, core buffers are allocated statically. + Otherwise they are allocated in heap. Default: defined functions: @@ -622,11 +682,572 @@ void pxe_set_ip(uint8_t id, const PXE_IPADDR *ip) - sets value by it's id. -structures and types: +time_t pxe_get_secs() + - returns time in seconds. Used in timeout and resend checking. + +types: typedef int (*pxe_protocol_call)(PXE_PACKET *pack, uint8_t function) - protocol callback function type -time_t pxe_get_secs() - - returns time in seconds. Used in timeout and resend checking. + +3.3.6. pxe_dhcp module +----------------------- + + This module implements simple DHCP client, used to obtain + gateway, nameserver and other information. + + +macro definitions: + +PXE_BOOTP_USE_LIBSTAND - use bootp() function provided by libstand instead + of own DHCP client. NOTE: bootp() doesn't set nameip (nameserver ip + structure), thus DNS resolving will be impossible. Default: undefined + + NOTE: to use bootp(), also UDP_DEFAULT_SOCKET macro must be defined. + + +functions: + +void pxe_dhcp_query(uint32_t xid) + - sends DHCPDISCOVER packet and sets core_ips, if gets reply. + + +3.3.6. pxe_dns module +---------------------- + + This module provides domain name resolving. Actually + A and CNAME resource records are supported. + +macro definitions: + +PXE_MAX_DNS_TIMEOUT - max time to wait DNS reply in milliseconds. + Default: 10 seconds + +PXE_MAX_DNS_TRYS - how many times to try to resend request, + if there is no reply. Default: 3 + +PXE_DNS_MAX_PACKET_SIZE - maximum UDP packet size in bytes. Default: 512. + This DNS client doesn't support TCP for resolving. + +functions: + +const PXE_IPADDR *pxe_gethostbyname(char *name) + - returns IP, if resolved, for provided domain name. + +uint32_t pxe_convert_ipstr(char *str) + - converts string value of ipv4 to uint32_t value. + + +3.3.8. pxe_filter module +------------------------- + + This module is not supposed to be used by user code directly. + It implements filtering of incoming IP packets. It's used by UDP and + TCP modules for sorting packets in appropriate socket. + Module provides functions for adding and removing filters. + Each filter contains source/destination ip:port definition and masks + for all of them. Usage of masks gives opportunity to recieve data + from subnet, or subset of ports. + +functions: + +void pxe_filter_init() + - inits filter module structures such as list of free filter entries. + +void pxe_filter_stats() + - show active filters information. Used for debugging. Available if + PXE_MORE macro defined. + + +3.3.9. pxe_http module +----------------------- + + pxe_http implements functions for getting files via HTTP. + Most of it's functions are used only by httpfs module. + At opening file pxe_exists() function is called, which + gets filesize (if possible) by HEAD method of request and opens + connection to file. Result of pxe_exists() call is keep-alive + connection to file. + pxe_get() function gets needed data and reestablishes + connection if needed. + if PXE_MORE defined - pxe_get_close() function becomes + available. It opens connection, gets portion of data and closes + connection. It's rather not optimal usage of http connections, + but some times it may be needed (e.g. for servers, where keep + alive connections are prohibited). + +macro definitions: + +PXE_MAX_HTTP_HDRLEN - buffer size for generating/getting http header. + Default: 1024 bytes. + +functions: + +int pxe_fetch(char *server, char *filename, off_t from, size_t size) + - testing function, gets file from server ()may be partially) and + outputs received data to screen. Available if PXE_MORE defined. + + +3.3.10. httpfs module +---------------------- + + httpfs is filesystem, available via HTTP. It is read-only + filesystem, mainly with sequential access to files. It exports + file operations structure and is not used directly by user code. + httpfs module may support some kind of caching: it requests + more data per request then it's needed at http_read() call and + reads this data later. Such approach speed ups connections speed + and reduces server load. + This opportunity is available if PXE_HTTPFS_CACHING macro + is defined. + + +3.3.11. pxe_icmp module +------------------------ + + pxe_icmp module provides some basic functionality of ICMP + protocol: echo requesting/replying. + Module is unavailable, if PXE_MORE undefined. + + +macro definitions: + +PXE_ICMP_TIMEOUT - timeout in milliseconds when waiting echo reply. + Default: 5000 ms. + + +functions: + +int pxe_ping(const PXE_IPADDR *ip, int count, int flags) + - works similar to usual ping, sends echo request and shows timeout + before echo reply. + +int pxe_icmp_init() + - inits module + + +3.3.12. pxe_ip module +---------------------- + + This module implemets IP protocol functions, also it works + with routing table. It also declares PXE_IPADDR, that is used widely. + +macro definitions: + +PXE_MAX_ROUTES - route table size. Default: 4, usually used 2 entries. + + +functions: + +uint16_t pxe_ip_checksum(const void *data, size_t size) + - calculates checksum for provided block of data. + + +void pxe_ip_route_init(const PXE_IPADDR *def_gw) + - inits routing table, sets default gateway + + +int pxe_ip_route_add(const PXE_IPADDR *net, uint32_t mask, + const PXE_IPADDR *gw) + - adds route to routing table + +int pxe_ip_route_del(const PXE_IPADDR *net, uint32_t mask, + const PXE_IPADDR *gw) + - dels route from routing table + +uint32_t pxe_ip_get_netmask(const PXE_IPADDR *ip) + - returns class based netmask for ip. + +int pxe_ip_route_default(const PXE_IPADDR *gw) + - adds default gateway + +int pxe_ip_send(void *data, const PXE_IPADDR *dst, uint8_t protocol, + uint16_t size) + - sends ip packet with provided data. There must be space for + IP header in buffer, pointed by data. + +void pxe_ip_route_stat() + - show route table. Available if PXE_MORE defined + + +3.3.13. pxe_isr module +----------------------- + + Contains assembler side functions, used in pxe_core. + User code has no direct access to them. + There supported: installation/removing of interrupt handler, + interrupt handler and wrapper for PXE API calls. + + +3.3.14. pxe_mem module +----------------------- + + Actually this module just a wrapper to bcopy(), alloc() and free() + functions. That's done to make pxe_http library more portable. + But in fact, pxe_http depends much on other libstand functions, + such as printf(), strcpy() and etc. So this module is not very usefull and + will be probably removed in future. + + +3.3.15. pxe_sock module +------------------------ + + Most used by user code module. Contains implementation of + pxe_http sockets API. + + +macro definitions: + +PXE_DEFAULT_SOCKETS - count of sockets used at the same time. If all + socket structures are used, next socket creating calls + and API that depends on it, will fail. Default: 4 + + +PXE_SOCKET_TIMEOUT - how long pxe_recv() will be wiating incoming data per + call before return error. Default: 30000 ms + +PXE_SOCKET_CHECK_TIMEOUT - If pxe_recv() waits incoming data and have big free + space in buffer, and in case of TCP protocol it may notice + remote server about this by sending empty packet (with + no data) acking current state, so remote host updates + knowledge about receiving window of client and sends new + data. + That option specifies how long pxe_recv() will + be waiting before checking TCP connection. In fast + environments like LAN it speed ups connection when huge + amount of data is transmitted, in WAN it's not very + useful. + Default: 100 ms. This option works only if + PXE_TCP_AGRESSIVE macro is defined. + +PXE_SOCKET_ACCURATE - adds extra socket validating at head of every + socket related function, available to user. + By default: defined. + +functions: + +void pxe_sock_init() + - inits socket API module. + +void pxe_sock_stats() + - prints out to screen socket usage statistics. Available if PXE_MORE + macro defined. + +int pxe_sock_state(int socket) + - return current socket state. May be one of this states: + PXE_SOCKET_BINDED, PXE_SOCKET_CONNECTED, PXE_SOCKET_ESTABLISHED. + It may be used for checking, if connection was breaked. + + +int pxe_sendto(int socket, const PXE_IPADDR *dst, uint16_t port, + void *data, uint16_t size) + - sends to provided ip/port, updating filter for socket. If + socket is not connected, connects it. Blocking operation. + +int pxe_connect(int socket, const PXE_IPADDR *ip, uint16_t port, + uint8_t proto) + - establishes connection to remote host and updates needed filter + structures. + +int pxe_send(int socket, void *buf, uint16_t buflen) + - sends data to socket, blocking operation till successfull sending + or error. + +int pxe_recv(int socket, void *buf, uint16_t buflen) + - receives data from socket. Blocks till timeout, error or + successfull result. + +int pxe_socket() + - creates new socket. Every socket must be closed after usage by + pxe_close() call. + +int pxe_bind(int socket, const PXE_IPADDR *ip, uint16_t port, + uint8_t proto) + - binds local ip, port for socket. Used e,g, by DHCP. + +int pxe_flush(int socket) + - flushes sending buffer. After this call user code may be sure that + data was transmitted to network, but may be not received by remote + host yet. + +int pxe_close(int socket) + - closes socket. + +uint16_t pxe_next_port() + - returns next available local port. It just increments at each call. + + +3.3.16. pxe_segment module +--------------------------- + + Part of TCP related modules. Contains functions used internally + for creating and sending TCP segments. + pxe_segment module uses memory space of sending buffer manually + without buffer writing functions. + Buffer is divided to PXE_TCP_BLOCK_COUNT blocks, each block + is divided to PXE_TCP_CHUNK_COUNT chunks, by default 64 chunks at all + with size 64 bytes for each (for default buffer size 4096). + Packets may be "small" (e.g. system packets ACK, RST and etc) + and contain no user data. In such case usualy will be enough one chunk + for packet. Also packets may be "big", but not bigger than one block + size minus segment descriptor structure. If packet exclusevely uses + all chunks in block it gives about 460 user data per segment. + For client-side usage this must be enough. + +macro definitions: + +PXE_RESEND_TIME - if during this time segment was not acked, it will be + resent. At every resend try this value will be increased. + Default: 1 second + +PXE_RESEND_TRYS - how much resend trys to do. Default: 3 + +PXE_TCP_BLOCK_COUNT - how much blocks in memory buffer for segments. + +PXE_TCP_CHUNK_COUNT - how much chhunks in buffer for segments. + + +3.3.17. pxe_tcp module +----------------------- + + TCP related module. Implements handling of incoming packets, + it's functions are used internally. + +macro definitions: + +PXE_TCP_MSL - maximum segment life time in milliseconds. + Used only in TINE_WAIT state. Default: 60000 ms. + +PXE_TCP_SYSBUF_SIZE - buffer size used for system messages for packets + without real connection. It may be for closed or + unxexisting connections. In such case there is no + bufer for outcoming segments, but module needs to send + at least RST. Default: 64 bytes. + +PXE_TCP_MSS - maximum segment size. For Ethernet LAN it's 1460, + but for internet connections it may be useful to + use smaller segment size, e.g. 1260. Default: 1260 + +functions: + +void pxe_tcp_init() + - inits TCP module. Usually started automatically from pxe_core_init() + + +3.3.18. pxe_udp module +----------------------- + + Implements UDP protocol. May be used without sockets API. + +macro definitions: + +UDP_DEFAULT_SOCKET - if defined, "default UDP socket" is created. All + filtered out data goes to this socket. It was added + to support udpread() and udpsend() functions, used + by libstand itself. Also it may be used for working + with UDP module, skipping direct work with sockets API. + Default: undefined. + +functions: + +void pxe_udp_init() + - UDP module init + +void pxe_udp_shutdown() + - UDP module shutdown routine + +int pxe_udp_send(void *data, const PXE_IPADDR *dst, uint16_t dst_port, + uint16_t src_port, uint16_t size) + - sends udp packet. + + +int pxe_udp_read(PXE_SOCKET *sock, void *tobuf, uint16_t buflen, + PXE_UDP_DGRAM *dgram_out) + - reads data from udp socket. if sock == NULL, "default" + socket is assumed. + + +4. Debugging, testing and tuning pxe_http library. +-------------------------------------------------- + + pxe_http library has built-in testing functions, that may be + started from loader's console. For this PXE_MORE macro must be defined + while compiling loader and pxe_http itself. + After this 'pxe' command appears in list of available commands. + + +4.1. Using 'pxe' loader's command +---------------------------------- + + This commands helps to test working od pxe_http library and + contains one really usefull function ping. + While loading pxe_http gets gateway, nameserver & etc + information from DHCP server. In case if there is any error (e.g. + DHCP packet contains no information about nameserver) this must be + set manually for correct working of code. + + command 'arp': + - this command test ARP protocol related functions. + + Example: pxe arp stats + - shows current arp table. It contains same + values as usual. + pxe arp ip4.addres + - trys to get MAC address of provided ip using + ARP protocol. + + command 'await': + - used to test how implemented ICMP echo request and ARP + request replying. + + Example: pxe await + - starts infinte loop, in which will be + processed received packets. It's usefull for + testing ARP and ICMP request/replies. "Infinte" + means there is no exit from it without resetting + of PC. + + command 'filters': + - shows current filters usage information. + + Example: pxe filters + - shows current filters usage. If all is ok, + sockets closed correctly, filters are free - + you will see something like "0/8 filters". + If there is connected socket, or there was + error somewhere in implementation - you will + see filters related info (source/destination + ip/ports, binded socket). + + command 'ns': + - used to see and modify default nameserver. + + Example: pxe ns + - shows nameserver + + pxe ns ip4.addr + - sets nameserver to specified ip address. + + + command 'ping': + - performs similar actions to well known ping command. It sends + echo requests and gets replies, calculating timeouts. + + Example: pxe ping ip4.addr + - performs sending five icmp echo requests to + specified ip address. + + command 'resolve': + - performs sending DNS requests and extracts A or CNAME answers + from nameserver replies. + + Example: pxe resolve domain.name + - performs domain name resolution, using default + nameserver. + + command 'route': + - works with routing table and used for ip based protocols. + IP packet routed to first found route, routes are searched + sequentially from start of table to end.. + + Example: pxe route print + - shows current routing table. + + pxe route add default ip4.addr + - sets default gateway + + pxe route add net4.addr gw4.addr + - sets gateway for network. Mask for network is + generated automatically from net address, CIDR + is not supported. + + pxe route del net4.addf gw4.addr + - removes route from table. + + command 'socket': + - currently just shows statistics related to active sockets. + + Example: pxe socket stats + - show active sockets information. + + +4.2. Defining debug macroses +----------------------------- + + All debug macroses divided in groups to provide more flexible + debugging of exact module. There are two levels of debugging: + first just adds _DEBUG suffix to macro, next _DEBUG_HELL. Second one + as expected from it's naming - provides more information. + All this macro definitions are situated in project Makefile. + + +macro definitions: + +PXE_DEBUG +PXE_DEBUG_HELL - common modules debuging. This macroses adds debug + information output toi all modules, that are not + covered by macroses below. + + NOTE: defining PXE_DEBUG macro doesn't defines + e.g. PXE_CORE_DEBUG. It must be set manually. + +PXE_CORE_DEBUG +PXE_CORE_DEBUG_HELL - pxe_core module debuging + +PXE_TCP_DEBUG +PXE_TCP_DEBUG_HELL - related to TCP modules debuging + +PXE_IP_DEBUG +PXE_IP_DEBUG_HELL - IP module debug. Includes routing. + +PXE_ARP_DEBUG +PXE_ARP_DEBUG_HELL - ARP module debug + +PXE_HTTP_DEBUG +PXE_HTTP_DEBUG_HELL - httpfs and pxe_http module debugging + +PXE_MORE - adds functions, used to out to screen information + about filters, sockets and etc usage. + +4.3. Tuning +------------ + + Well, pxe_http library developed as library that implements + client sockets API. But, it may be used in different environments and + thus may have different behaviour e,g, in LAN and in WAN. + In most cases it works well in both cases, but if not - here is + some hints that may be usefull. + + In LAN usually packet loss is small and speed is fast, so + it may be good idea to define PXE_TCP_AGRRESIVE macro (see 3.3.15). + PXE_TCP_MSS may me set to 1460 without any doubts. + Buffer sizes may be set higher (3.3.3). 16K for incoming + traffic is good enough for WAN connections, but for LAN it may be set + higher. If big UDP datagrams are sended, send buffer must be set to + such space, in which it may fit. + Also all timeouts may be smaller. For example, first candidate + for it is TIME_DELTA (3.3.2) + + Next point - what buffers use: statically allocated or + dinamically. Default variant is best (at least, I think so) but + it may be not bad idea to play with PXE_CORE_STATIC_BUFFERS and + PXE_POOL_COUNT. + + It may be usefull to turn off httpfs caching. Using of + caching speed ups getting of file, but anyway undefining of + PXE_HTTPFS_CACHING still gives working code. + + +4.4. NFS loading with pxe_http +------------------------------- + + Original pxeboot has ability to load kernel, loader.rc and etc. + pke_http may provide udpread()/udpsend() functions needed for that. + + undefine: loader/Makefile: LOADER_HTTP_SUPPORT + define: pxe_http/pxe_udp.h: UDP_DEFAULT_SOCKET + pxe_http/pxe_dhcp.h: PXE_BOOTP_USE_LIBSTAND + libi386/Makefile: PXEHTTP_UDP_FOR_LIBSTAND + After that - NFS loader must work, as well as TFTP. ==== //depot/projects/soc2007/taleks-pxe_http/httpfs.c#8 (text+ko) ==== @@ -91,7 +91,7 @@ pxe_memset(httpfile, 0, sizeof(PXE_HTTP_HANDLE)); - pxe_memcpy(pxe_get_ip(PXE_IP_WWW), &httpfile->addr, sizeof(PXE_IPADDR)); + httpfile->offset = 0; httpfile->socket = -1; @@ -101,18 +101,22 @@ handle_cleanup(httpfile); return (ENOMEM); } - if (servername[0]) { httpfile->servername = servername; } else { - httpfile->servername = strdup(inet_ntoa(httpfile->addr.ip)); + httpfile->servername = strdup(inet_ntoa(httpfile->addr.ip)); } - + + pxe_memcpy(pxe_get_ip(PXE_IP_WWW), &httpfile->addr, sizeof(PXE_IPADDR)); + +#ifdef PXE_DEBUG_HELL + printf("servername: %s\n", httpfile->servername); +#endif if (httpfile->servername == NULL) { handle_cleanup(httpfile); } - + httpfile->buf = malloc(PXE_MAX_HTTP_HDRLEN); if (httpfile->buf == NULL) { @@ -132,6 +136,7 @@ #ifdef PXE_HTTP_DEBUG printf("http_open(): %s opened\n", httpfile->filename); #endif + return (0); } ==== //depot/projects/soc2007/taleks-pxe_http/libi386_mod/pxe.c#5 (text+ko) ==== @@ -185,8 +185,6 @@ { va_list args; char *devname = NULL; - char temp[20]; -/* char temp[FNAME_SIZE]; */ int i = 0; va_start(args, f); @@ -205,73 +203,13 @@ } >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Aug 18 15:53:50 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 64D8B16A469; Sat, 18 Aug 2007 15:53:50 +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 1F85916A420 for ; Sat, 18 Aug 2007 15:53:50 +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 099FD13C494 for ; Sat, 18 Aug 2007 15:53:50 +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 l7IFrnwh043244 for ; Sat, 18 Aug 2007 15:53:49 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7IFrnHx043241 for perforce@freebsd.org; Sat, 18 Aug 2007 15:53:49 GMT (envelope-from gonzo@FreeBSD.org) Date: Sat, 18 Aug 2007 15:53:49 GMT Message-Id: <200708181553.l7IFrnHx043241@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 125305 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, 18 Aug 2007 15:53:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=125305 Change 125305 by gonzo@gonzo_jeeves on 2007/08/18 15:53:14 o Make admsw function as interrupt filter Affected files ... .. //depot/projects/mips2/src/sys/mips/mips32/adm5120/if_admsw.c#2 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips32/adm5120/if_admsw.c#2 (text+ko) ==== @@ -147,7 +147,7 @@ static int admsw_mediachange(struct ifnet *); static void admsw_mediastatus(struct ifnet *, struct ifmediareq *); -static void admsw_intr(void *); +static int admsw_intr(void *); /* bus entry points */ static int admsw_probe(device_t dev); @@ -415,8 +415,8 @@ return (ENXIO); } - if ((error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET, NULL, - admsw_intr, sc, &sc->sc_ih)) != 0) { + if ((error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET, + admsw_intr, NULL, sc, &sc->sc_ih)) != 0) { device_printf(dev, "WARNING: unable to register interrupt handler\n"); return (error); @@ -847,7 +847,7 @@ * * Interrupt service routine. */ -static void +static int admsw_intr(void *arg) { struct admsw_softc *sc = arg; @@ -857,7 +857,7 @@ REG_WRITE(ADMSW_INT_ST, pending); if (sc->ndevs == 0) - return; + return (FILTER_STRAY); if ((pending & ADMSW_INTR_RHD) != 0) admsw_rxintr(sc, 1); @@ -871,6 +871,7 @@ if ((pending & ADMSW_INTR_SLD) != 0) admsw_txintr(sc, 0); + return (FILTER_HANDLED); } /* From owner-p4-projects@FreeBSD.ORG Sat Aug 18 16:32:38 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 66E5316A419; Sat, 18 Aug 2007 16:32: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 ED2E516A41A for ; Sat, 18 Aug 2007 16:32:37 +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 DB3C413C483 for ; Sat, 18 Aug 2007 16:32:37 +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 l7IGWbFQ047220 for ; Sat, 18 Aug 2007 16:32:37 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7IGWbZZ047217 for perforce@freebsd.org; Sat, 18 Aug 2007 16:32:37 GMT (envelope-from gonzo@FreeBSD.org) Date: Sat, 18 Aug 2007 16:32:37 GMT Message-Id: <200708181632.l7IGWbZZ047217@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 125306 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, 18 Aug 2007 16:32:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=125306 Change 125306 by gonzo@gonzo_jeeves on 2007/08/18 16:31:55 o Flush caches on bus_dma_sync Affected files ... .. //depot/projects/mips2/src/sys/mips/mips/busdma_machdep.c#5 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips/busdma_machdep.c#5 (text+ko) ==== @@ -699,18 +699,100 @@ return; } - - static __inline void bus_dmamap_sync_buf(void *buf, int len, bus_dmasync_op_t op) { - panic("Unimplemented %s at %s:%d\n", __func__, __FILE__, __LINE__); + switch (op) { + case BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE: + mips_dcache_wbinv_range((vm_offset_t)buf, len); + break; + + case BUS_DMASYNC_PREREAD: +#if 1 + mips_dcache_wbinv_range((vm_offset_t)buf, len); +#else + mips_dcache_inv_range((vm_offset_t)buf, len); +#endif + break; + + case BUS_DMASYNC_PREWRITE: + mips_dcache_wb_range((vm_offset_t)buf, len); + break; + } } void _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) { + struct mbuf *m; + struct uio *uio; + int resid; + struct iovec *iov; + + + /* + * Mixing PRE and POST operations is not allowed. + */ + if ((op & (BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE)) != 0 && + (op & (BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE)) != 0) + panic("_bus_dmamap_sync: mix PRE and POST"); + + /* + * Since we're dealing with a virtually-indexed, write-back + * cache, we need to do the following things: + * + * PREREAD -- Invalidate D-cache. Note we might have + * to also write-back here if we have to use an Index + * op, or if the buffer start/end is not cache-line aligned. + * + * PREWRITE -- Write-back the D-cache. If we have to use + * an Index op, we also have to invalidate. Note that if + * we are doing PREREAD|PREWRITE, we can collapse everything + * into a single op. + * + * POSTREAD -- Nothing. + * + * POSTWRITE -- Nothing. + */ + + /* + * Flush the write buffer. + * XXX Is this always necessary? + */ + mips_wbflush(); - /* XXXMIPS: flush caches or whatever */ + op &= (BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); + if (op == 0) + return; + + CTR3(KTR_BUSDMA, "%s: op %x flags %x", __func__, op, map->flags); + switch(map->flags & DMAMAP_TYPE_MASK) { + case DMAMAP_LINEAR: + bus_dmamap_sync_buf(map->buffer, map->len, op); + break; + case DMAMAP_MBUF: + m = map->buffer; + while (m) { + if (m->m_len > 0) + bus_dmamap_sync_buf(m->m_data, m->m_len, op); + m = m->m_next; + } + break; + case DMAMAP_UIO: + uio = map->buffer; + iov = uio->uio_iov; + resid = uio->uio_resid; + for (int i = 0; i < uio->uio_iovcnt && resid != 0; i++) { + bus_size_t minlen = resid < iov[i].iov_len ? resid : + iov[i].iov_len; + if (minlen > 0) { + bus_dmamap_sync_buf(iov[i].iov_base, minlen, op); + resid -= minlen; + } + } + break; + default: + break; + } } From owner-p4-projects@FreeBSD.ORG Sat Aug 18 16:42:51 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 77C1D16A468; Sat, 18 Aug 2007 16:42: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 3711A16A419 for ; Sat, 18 Aug 2007 16:42:51 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 24EC913C428 for ; Sat, 18 Aug 2007 16:42:51 +0000 (UTC) (envelope-from cnst@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 l7IGgp6Q047961 for ; Sat, 18 Aug 2007 16:42:51 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7IGgoTL047958 for perforce@freebsd.org; Sat, 18 Aug 2007 16:42:50 GMT (envelope-from cnst@FreeBSD.org) Date: Sat, 18 Aug 2007 16:42:50 GMT Message-Id: <200708181642.l7IGgoTL047958@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125307 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, 18 Aug 2007 16:42:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=125307 Change 125307 by cnst@dale on 2007/08/18 16:42:26 sync sensorsd with upstream Obtained from: OpenBSD -D2007-08-01 Affected files ... .. //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.8#3 edit .. //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.conf.5#3 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.8#3 (text+ko) ==== @@ -1,6 +1,6 @@ -.\" $P4: //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.8#2 $ +.\" $P4: //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.8#3 $ .\" $FreeBSD$ -.\" $OpenBSD: sensorsd.8,v 1.11 2007/05/31 19:20:29 jmc Exp $ +.\" $OpenBSD: sensorsd.8,v 1.13 2007/07/31 08:11:36 jmc Exp $ .\" .\" Copyright (c) 2003 Henning Brauer .\" Copyright (c) 2005 Matthew Gream @@ -17,7 +17,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate$ +.Dd $Mdocdate: July 31 2007 $ .Dt SENSORSD 8 .Os .Sh NAME @@ -25,6 +25,7 @@ .Nd monitor hardware sensors .Sh SYNOPSIS .Nm sensorsd +.Op Fl d .Sh DESCRIPTION The .Nm @@ -46,6 +47,15 @@ configuration file. This file is reloaded upon receiving .Dv SIGHUP . +.Pp +The options are as follows: +.Bl -tag -width Ds +.It Fl d +Do not daemonize. +If this option is specified, +.Nm +will run in the foreground. +.El .Sh FILES .Bl -tag -width "/etc/sensorsd.conf" .It /etc/sensorsd.conf ==== //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.conf.5#3 (text+ko) ==== @@ -1,6 +1,6 @@ -.\" $P4: //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.conf.5#2 $ +.\" $P4: //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.conf.5#3 $ .\" $FreeBSD$ -.\" $OpenBSD: sensorsd.conf.5,v 1.14 2007/05/31 19:20:29 jmc Exp $ +.\" $OpenBSD: sensorsd.conf.5,v 1.15 2007/06/05 04:10:56 jmc Exp $ .\" .\" Copyright (c) 2003 Henning Brauer .\" Copyright (c) 2005 Matthew Gream @@ -35,8 +35,8 @@ is matched by at most one entry in .Nm , which may specify high and low limits, -and whether sensor status changes provided by driver should be ignored. -If the limits are crossed or if status provided by the driver changes, +and whether sensor status changes provided by the driver should be ignored. +If the limits are crossed or if the status provided by the driver changes, .Xr sensorsd 8 's alert functionality is triggered and a command, if specified, is executed. @@ -44,17 +44,17 @@ .Nm follows the syntax of configuration databases as documented in .Xr getcap 3 . -Complete +Sensors may be specified by their full .Va hw.sensors .Xr sysctl 8 -variable names are used to find entries, -with a fallback to sensor types. -For example, if an entry with a full name of a certain temperature -sensor is not present in -.Nm , -then an entry -.Va temp -will be looked at to determine the settings. +variable name or by type, +with the full name taking precedence. +For example, if an entry +.Dq hw.sensors.lm0.temp1 +is not found, then an entry for +.Dq temp +will instead be looked for. +.Pp The following attributes may be used: .Pp .Bl -tag -width "commandXX" -offset indent -compact @@ -65,7 +65,7 @@ .It Li low Specify a lower limit. .It Li istatus -Specify to ignore status provided by the driver. +Ignore status provided by the driver. .El .Pp The values for temperature sensors can be given in degrees Celsius or @@ -103,9 +103,9 @@ monitors status changes on all sensors that keep their state. This behaviour may be altered by using the .Dq istatus -attribute, -for example, you may specify to ignore status changes of sensors with -certain type, or of any individual sensors. +attribute to ignore +status changes of sensors of a certain type +or individual sensors. .Sh FILES .Bl -tag -width "/etc/sensorsd.conf" .It /etc/sensorsd.conf @@ -130,7 +130,7 @@ will be executed, with the sensor number passed to it; however, no alerts will be generated for status changes on timedelta sensors. For all other sensors whose drivers automatically provide -sensor status updates, alerts will be generated +sensor status updates, alerts will be generated each time those sensors undergo status transitions. .Bd -literal -offset indent # Comments are allowed From owner-p4-projects@FreeBSD.ORG Sat Aug 18 17:02:17 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F1DBE16A41A; Sat, 18 Aug 2007 17:02: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 C17C616A46B for ; Sat, 18 Aug 2007 17:02:16 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ADCAD13C4A7 for ; Sat, 18 Aug 2007 17:02:16 +0000 (UTC) (envelope-from cnst@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 l7IH2GCT057685 for ; Sat, 18 Aug 2007 17:02:16 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7IH2Gjd057682 for perforce@freebsd.org; Sat, 18 Aug 2007 17:02:16 GMT (envelope-from cnst@FreeBSD.org) Date: Sat, 18 Aug 2007 17:02:16 GMT Message-Id: <200708181702.l7IH2Gjd057682@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125310 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, 18 Aug 2007 17:02:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=125310 Change 125310 by cnst@dale on 2007/08/18 17:01:35 update sensorsd documentation and sync sensor types I have submitted for review and then committed all of these changes upstream @ OpenBSD. Whilst here, also change the domain in my copyright, and remove OpenBSD's $Mdocdate$ from .Dd Affected files ... .. //depot/projects/soc2007/cnst-sensors/etc/sensorsd.conf#4 edit .. //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/Makefile#3 edit .. //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.8#4 edit .. //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.c#4 edit .. //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.conf.5#4 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/etc/sensorsd.conf#4 (text+ko) ==== @@ -1,6 +1,6 @@ -# $P4: //depot/projects/soc2007/cnst-sensors/etc/sensorsd.conf#3 $ +# $P4: //depot/projects/soc2007/cnst-sensors/etc/sensorsd.conf#4 $ # $FreeBSD$ -# $OpenBSD: sensorsd.conf,v 1.7 2007/05/30 07:49:37 cnst Exp $ +# $OpenBSD: sensorsd.conf,v 1.8 2007/08/14 19:02:02 cnst Exp $ # # Sample sensorsd.conf file. See sensorsd.conf(5) for details. @@ -31,7 +31,7 @@ # Warn if any temperature sensor is over 70 degC. # This entry will match only those temperature sensors -# that don't have their own entry and don't keep state. +# that don't have their own entry. #temp:high=70C ==== //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $P4: //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/Makefile#2 $ +# $P4: //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/Makefile#3 $ # $FreeBSD$ # $OpenBSD: Makefile,v 1.1 2003/09/24 20:32:49 henning Exp $ ==== //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.8#4 (text+ko) ==== @@ -1,9 +1,10 @@ -.\" $P4: //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.8#3 $ +.\" $P4: //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.8#4 $ .\" $FreeBSD$ -.\" $OpenBSD: sensorsd.8,v 1.13 2007/07/31 08:11:36 jmc Exp $ +.\" $OpenBSD: sensorsd.8,v 1.16 2007/08/11 20:45:35 cnst Exp $ .\" .\" Copyright (c) 2003 Henning Brauer .\" Copyright (c) 2005 Matthew Gream +.\" Copyright (c) 2007 Constantine A. Murenin .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -17,30 +18,38 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 31 2007 $ +.Dd August 11, 2007 .Dt SENSORSD 8 .Os .Sh NAME .Nm sensorsd -.Nd monitor hardware sensors +.Nd hardware sensors monitor .Sh SYNOPSIS .Nm sensorsd .Op Fl d .Sh DESCRIPTION The .Nm -utility retrieves sensor monitoring data like fan speeds, -temperatures, voltages, and +utility retrieves sensor monitoring data like fan speed, +temperature, voltage and .Xr ami 4 logical disk status via .Xr sysctl 3 . -If the data is out of given limits, an alert is sent using +When the state of any monitored sensor changes, an alert is sent using .Xr syslog 3 and a command, if specified, is executed. .Pp By default, .Nm -also monitors status changes on all sensors that keep their state. +monitors status changes on all sensors that keep their state, +thus sensors that automatically provide status do not require +any additional configuration. +In addition, for every sensor, +no matter whether it automatically provides its state or not, +custom low and high limits may be set, +so that a local notion of sensor status can be computed by +.Nm , +indicating whether the sensor is within or is exceeding its limits. .Pp Limit and command values for a particular sensor may be specified in the .Xr sensorsd.conf 5 @@ -72,3 +81,14 @@ .Nm program first appeared in .Ox 3.5 . +.Sh CAVEATS +Certain sensors may flip status from time to time. +To guard against false reports, +.Nm +implements a state dumping mechanism. +However, this inevitably introduces +an additional delay in status reporting and command execution, +e.g. one may notice that +.Nm +makes its initial report about the state of monitored sensors +not immediately, but either 1 or 2 minutes after it is being started up. ==== //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.c#4 (text+ko) ==== @@ -1,6 +1,6 @@ -/* $P4: //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.c#3 $ */ +/* $P4: //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.c#4 $ */ /* $FreeBSD$ */ -/* $OpenBSD: sensorsd.c,v 1.33 2007/06/01 22:41:12 cnst Exp $ */ +/* $OpenBSD: sensorsd.c,v 1.34 2007/08/14 17:10:02 cnst Exp $ */ /*- * Copyright (c) 2003 Henning Brauer @@ -490,11 +490,17 @@ case SENSOR_AMPS: snprintf(fbuf, RFBUFSIZ, "%.2f A", value / 1000000.0); break; + case SENSOR_WATTHOUR: + snprintf(fbuf, RFBUFSIZ, "%.2f Wh", value / 1000000.0); + break; + case SENSOR_AMPHOUR: + snprintf(fbuf, RFBUFSIZ, "%.2f Ah", value / 1000000.0); + break; case SENSOR_INDICATOR: snprintf(fbuf, RFBUFSIZ, "%s", value? "On" : "Off"); break; case SENSOR_INTEGER: - snprintf(fbuf, RFBUFSIZ, "%lld raw", value); + snprintf(fbuf, RFBUFSIZ, "%lld", value); break; case SENSOR_PERCENT: snprintf(fbuf, RFBUFSIZ, "%.2f%%", value / 1000.0); @@ -503,11 +509,14 @@ snprintf(fbuf, RFBUFSIZ, "%.2f lx", value / 1000000.0); break; case SENSOR_DRIVE: - if (0 < value && value < sizeof(drvstat)/sizeof(drvstat[0])) { + if (0 < value && value < sizeof(drvstat)/sizeof(drvstat[0])) snprintf(fbuf, RFBUFSIZ, "%s", drvstat[value]); - break; - } - /* FALLTHROUGH */ + else + snprintf(fbuf, RFBUFSIZ, "%lld ???", value); + break; + case SENSOR_TIMEDELTA: + snprintf(fbuf, RFBUFSIZ, "%.6f secs", value / 1000000000.0); + break; default: snprintf(fbuf, RFBUFSIZ, "%lld ???", value); } @@ -613,9 +622,15 @@ case SENSOR_DRIVE: rval = val; break; + case SENSOR_AMPS: + case SENSOR_WATTHOUR: + case SENSOR_AMPHOUR: case SENSOR_LUX: rval = val * 1000 * 1000; break; + case SENSOR_TIMEDELTA: + rval = val * 1000 * 1000 * 1000; + break; default: errx(1, "unsupported sensor type"); /* not reached */ ==== //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.conf.5#4 (text+ko) ==== @@ -1,9 +1,10 @@ -.\" $P4: //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.conf.5#3 $ +.\" $P4: //depot/projects/soc2007/cnst-sensors/usr.sbin.sensorsd/sensorsd.conf.5#4 $ .\" $FreeBSD$ -.\" $OpenBSD: sensorsd.conf.5,v 1.15 2007/06/05 04:10:56 jmc Exp $ +.\" $OpenBSD: sensorsd.conf.5,v 1.18 2007/08/14 17:10:02 cnst Exp $ .\" .\" Copyright (c) 2003 Henning Brauer .\" Copyright (c) 2005 Matthew Gream +.\" Copyright (c) 2007 Constantine A. Murenin .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -17,21 +18,19 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate$ +.Dd August 14, 2007 .Dt SENSORSD.CONF 5 .Os .Sh NAME .Nm sensorsd.conf .Nd configuration file for sensorsd -.Sh SYNOPSIS -.Nm sensorsd.conf .Sh DESCRIPTION The .Nm file is read by .Xr sensorsd 8 to configure hardware sensor monitoring. -Each valid sensor registered in the system +Each sensor registered in the system is matched by at most one entry in .Nm , which may specify high and low limits, @@ -59,7 +58,7 @@ .Pp .Bl -tag -width "commandXX" -offset indent -compact .It Li command -Specify a command to be executed if limits are crossed. +Specify a command to be executed on state change. .It Li high Specify an upper limit. .It Li low @@ -71,16 +70,26 @@ The values for temperature sensors can be given in degrees Celsius or Fahrenheit, for voltage sensors in volts, and fan speed sensors take a unit-less number representing RPM. +Values for all other types of sensors can be specified +in the same units as they appear under the +.Xr sysctl 8 +.Va hw.sensors +tree. .Pp -Sensors that provide status (such as from +Sensors that provide status (such as those from .Xr bio 4 , .Xr esm 4 , or .Xr ipmi 4 ) -do not require boundary values specified (that otherwise will be -ignored) and simply trigger on status transitions. +do not require boundary values specified +and simply trigger on status transitions. +If boundaries are specified nonetheless, +then they are used in addition to automatic status monitoring, +unless the +.Dq istatus +attribute is specified to ignore status values that are provided by the drivers. .Pp -The command is executed on transitions out of, and back into, given limits. +The command is executed when there is any change in sensor state. Tokens in the command are substituted as follows: .Pp .Bl -tag -width Ds -offset indent -compact @@ -114,18 +123,23 @@ .El .Sh EXAMPLES In the following configuration file, -if hw.sensors.ipmi0.temp0 goes above 80C, the command +if hw.sensors.ipmi0.temp0 transitions 80C or +if its status as provided by +.Xr ipmi 4 +changes, the command .Pa /etc/sensorsd/log_warning will be executed, with the sensor type, number and current value passed to it. -Alerts will be sent if hw.sensors.ipmi0.temp1 goes above 170F; -if hw.sensors.lm0.volt3 goes below 4.8V or above 5.2V; +Alerts will be sent +if hw.sensors.lm0.volt3 transitions to being within or outside +a range of 4.8V and 5.2V; if the speed of the fan attached to hw.sensors.lm0.fan1 -goes below 1000RPM or above 8000RPM; +transitions to being below or above 1000RPM; if any RAID volume drive -goes into a state other than +changes its status from, for example, .Dq OK , -such as drive failure, rebuild, or a complete failure, the command +such as in the case of drive failure, rebuild, or a complete failure, +the command .Pa /etc/sensorsd/drive will be executed, with the sensor number passed to it; however, no alerts will be generated for status changes on timedelta sensors. @@ -135,9 +149,8 @@ .Bd -literal -offset indent # Comments are allowed hw.sensors.ipmi0.temp0:high=80C:command=/etc/sensorsd/log_warning %t %n %2 -hw.sensors.ipmi0.temp1:high=170F hw.sensors.lm0.volt3:low=4.8V:high=5.2V -hw.sensors.lm0.fan1:low=1000:high=8000 +hw.sensors.lm0.fan1:low=1000 drive:command=/etc/sensorsd/drive %n timedelta:istatus #ignore status changes for timedelta .Ed @@ -153,3 +166,22 @@ .Nm file format first appeared in .Ox 3.5 . +The format was altered in +.Ox 4.1 +to accommodate hierarchical device-based sensor addressing. +The +.Dq istatus +attribute was introduced in +.Ox 4.2 . +.Sh CAVEATS +Alert functionality is triggered every time there is a change in sensor state; +for example, when +.Xr sensorsd 8 +is started, +the status of each monitored sensor changes +from undefined to whatever it is. +One must keep this in mind when using commands +that may unconditionally perform adverse actions (e.g.\& +.Xr shutdown 8 ) , +as they will be executed even when all sensors perform to specification. +If this is undesirable, then a wrapper shell script should be used instead. From owner-p4-projects@FreeBSD.ORG Sat Aug 18 18:12:59 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 081AC16A421; Sat, 18 Aug 2007 18:12: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 CFD7D16A418 for ; Sat, 18 Aug 2007 18:12:58 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A619213C458 for ; Sat, 18 Aug 2007 18:12:58 +0000 (UTC) (envelope-from cnst@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 l7IICwuD064464 for ; Sat, 18 Aug 2007 18:12:58 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7IICwnC064460 for perforce@freebsd.org; Sat, 18 Aug 2007 18:12:58 GMT (envelope-from cnst@FreeBSD.org) Date: Sat, 18 Aug 2007 18:12:58 GMT Message-Id: <200708181812.l7IICwnC064460@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125320 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, 18 Aug 2007 18:12:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=125320 Change 125320 by cnst@dale on 2007/08/18 18:12:29 branch coretemp Affected files ... .. //depot/projects/soc2007/cnst-sensors/sys.dev.coretemp/coretemp.c#1 branch Differences ... From owner-p4-projects@FreeBSD.ORG Sat Aug 18 18:19:07 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 411F916A420; Sat, 18 Aug 2007 18:19: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 DB36816A41B for ; Sat, 18 Aug 2007 18:19:06 +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 C9F5F13C474 for ; Sat, 18 Aug 2007 18:19:06 +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 l7IIJ628064687 for ; Sat, 18 Aug 2007 18:19:06 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7IIJ660064684 for perforce@freebsd.org; Sat, 18 Aug 2007 18:19:06 GMT (envelope-from zec@FreeBSD.org) Date: Sat, 18 Aug 2007 18:19:06 GMT Message-Id: <200708181819.l7IIJ660064684@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 125321 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, 18 Aug 2007 18:19:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=125321 Change 125321 by zec@zec_tpx32 on 2007/08/18 18:18:56 Allow ip6_auto_linklocal to be toggled on per vnet basis. While here, virtualize in6_maxmtu as well. Affected files ... .. //depot/projects/vimage/src/sys/netinet6/in6.c#10 edit .. //depot/projects/vimage/src/sys/netinet6/in6_ifattach.c#11 edit .. //depot/projects/vimage/src/sys/netinet6/in6_proto.c#10 edit .. //depot/projects/vimage/src/sys/netinet6/ip6_input.c#19 edit .. //depot/projects/vimage/src/sys/netinet6/nd6.c#16 edit .. //depot/projects/vimage/src/sys/netinet6/vinet6.h#9 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet6/in6.c#10 (text+ko) ==== @@ -2199,6 +2199,7 @@ in6_setmaxmtu(void) { INIT_VNET_NET(curvnet); + INIT_VNET_INET6(curvnet); unsigned long maxmtu = 0; struct ifnet *ifp; @@ -2214,7 +2215,7 @@ } IFNET_RUNLOCK(); if (maxmtu) /* update only when maxmtu is positive */ - in6_maxmtu = maxmtu; + V_in6_maxmtu = maxmtu; } /* ==== //depot/projects/vimage/src/sys/netinet6/in6_ifattach.c#11 (text+ko) ==== @@ -64,15 +64,9 @@ #include #include -unsigned long in6_maxmtu = 0; - -#ifdef IP6_AUTO_LINKLOCAL -int ip6_auto_linklocal = IP6_AUTO_LINKLOCAL; -#else -int ip6_auto_linklocal = 1; /* enable by default */ -#endif - #ifndef VIMAGE +unsigned long in6_maxmtu; +int ip6_auto_linklocal; struct callout in6_tmpaddrtimer_ch; extern struct inpcbinfo ripcbinfo; extern struct inpcbinfo udbinfo; @@ -652,6 +646,7 @@ void in6_ifattach(struct ifnet *ifp, struct ifnet *altifp) { + INIT_VNET_INET6(ifp->if_vnet); struct in6_ifaddr *ia; struct in6_addr in6; @@ -706,7 +701,7 @@ /* * assign a link-local address, if there's none. */ - if (ip6_auto_linklocal && ifp->if_type != IFT_BRIDGE) { + if (V_ip6_auto_linklocal && ifp->if_type != IFT_BRIDGE) { ia = in6ifa_ifpforlinklocal(ifp, 0); if (ia == NULL) { if (in6_ifattach_linklocal(ifp, altifp) == 0) { @@ -722,8 +717,8 @@ #endif /* update dynamically. */ - if (in6_maxmtu < ifp->if_mtu) - in6_maxmtu = ifp->if_mtu; + if (V_in6_maxmtu < ifp->if_mtu) + V_in6_maxmtu = ifp->if_mtu; } /* ==== //depot/projects/vimage/src/sys/netinet6/in6_proto.c#10 (text+ko) ==== @@ -534,9 +534,11 @@ sysctl_ip6_tempvltime, "I", ""); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_V6ONLY, v6only, CTLFLAG_RW, &ip6_v6only, 0, ""); +#ifndef VIMAGE TUNABLE_INT("net.inet6.ip6.auto_linklocal", &ip6_auto_linklocal); -SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_LINKLOCAL, - auto_linklocal, CTLFLAG_RW, &ip6_auto_linklocal, 0, ""); +#endif +SYSCTL_V_INT(V_NET, vnet_inet6, _net_inet6_ip6, IPV6CTL_AUTO_LINKLOCAL, + auto_linklocal, CTLFLAG_RW, ip6_auto_linklocal, 0, ""); SYSCTL_V_STRUCT(V_NET, vnet_inet6, _net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, CTLFLAG_RD, rip6stat, rip6stat, ""); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_PREFER_TEMPADDR, ==== //depot/projects/vimage/src/sys/netinet6/ip6_input.c#19 (text+ko) ==== @@ -165,9 +165,16 @@ void ip6_init(void) { + INIT_VNET_INET6(curvnet); struct ip6protosw *pr; int i; +#ifdef IP6_AUTO_LINKLOCAL + V_ip6_auto_linklocal = IP6_AUTO_LINKLOCAL; +#else + V_ip6_auto_linklocal = 1; /* enable by default */ +#endif + scope6_init(); addrsel_policy_init(); nd6_init(); ==== //depot/projects/vimage/src/sys/netinet6/nd6.c#16 (text+ko) ==== @@ -210,6 +210,7 @@ void nd6_setmtu0(struct ifnet *ifp, struct nd_ifinfo *ndi) { + INIT_VNET_INET6(ifp->if_vnet); u_int32_t omaxmtu; omaxmtu = ndi->maxmtu; @@ -241,7 +242,7 @@ if_name(ifp), (unsigned long)ndi->maxmtu); } - if (ndi->maxmtu > in6_maxmtu) + if (ndi->maxmtu > V_in6_maxmtu) in6_setmaxmtu(); /* check all interfaces just in case */ } ==== //depot/projects/vimage/src/sys/netinet6/vinet6.h#9 (text+ko) ==== @@ -64,6 +64,8 @@ struct in6_addrpolicy _defaultaddrpolicy; TAILQ_HEAD(, addrsel_policyent) _addrsel_policytab; + u_int _in6_maxmtu; + int _ip6_auto_linklocal; struct ip6stat _ip6stat; struct rip6stat _rip6stat; @@ -105,6 +107,8 @@ #define V_defaultaddrpolicy VNET_INET6(defaultaddrpolicy) #define V_addrsel_policytab VNET_INET6(addrsel_policytab) +#define V_in6_maxmtu VNET_INET6(in6_maxmtu) +#define V_ip6_auto_linklocal VNET_INET6(ip6_auto_linklocal) #define V_ip6stat VNET_INET6(ip6stat) #define V_rip6stat VNET_INET6(rip6stat) From owner-p4-projects@FreeBSD.ORG Sat Aug 18 20:27:49 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1CCEB16A421; Sat, 18 Aug 2007 20:27: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 CF0AC16A418 for ; Sat, 18 Aug 2007 20:27:48 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BF53D13C468 for ; Sat, 18 Aug 2007 20:27:48 +0000 (UTC) (envelope-from cnst@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 l7IKRmje074383 for ; Sat, 18 Aug 2007 20:27:48 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7IKRmdX074380 for perforce@freebsd.org; Sat, 18 Aug 2007 20:27:48 GMT (envelope-from cnst@FreeBSD.org) Date: Sat, 18 Aug 2007 20:27:48 GMT Message-Id: <200708182027.l7IKRmdX074380@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 125323 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, 18 Aug 2007 20:27:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=125323 Change 125323 by cnst@dale on 2007/08/18 20:27:10 declaring sc_dev as a member of softc and leaving it completely uninitialised is dangerous; in fact, it caused me a few page-traps and reboots when I was converting it to my framework Affected files ... .. //depot/projects/soc2007/cnst-sensors/sys.dev.coretemp/coretemp.c#2 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sys.dev.coretemp/coretemp.c#2 (text+ko) ==== @@ -136,6 +136,8 @@ int cpu_model; int cpu_mask; + sc->sc_dev = dev; + pdev = device_get_parent(dev); cpu_model = (cpu_id >> 4) & 15;