From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 00:40:10 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 28CD7106564A; Sun, 1 Jul 2012 00:40:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E723B8FC18; Sun, 1 Jul 2012 00:40:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q610e9Q1050837; Sun, 1 Jul 2012 00:40:09 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q610e9DJ050835; Sun, 1 Jul 2012 00:40:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207010040.q610e9DJ050835@svn.freebsd.org> From: Eitan Adler Date: Sun, 1 Jul 2012 00:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237861 - in stable/9: share/man/man4 sys/dev/hptrr X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 00:40:10 -0000 Author: eadler Date: Sun Jul 1 00:40:09 2012 New Revision: 237861 URL: http://svn.freebsd.org/changeset/base/237861 Log: MFC r237178: attach_generic causes missing devices in /dev when the driver interacts with some non-highpoint controollers. Change attach_generic to be off by default. PR: kern/168910 Approved by: cperciva (implicit) Modified: stable/9/share/man/man4/hptrr.4 stable/9/sys/dev/hptrr/hptrr_osm_bsd.c Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man4/hptrr.4 ============================================================================== --- stable/9/share/man/man4/hptrr.4 Sun Jul 1 00:36:07 2012 (r237860) +++ stable/9/share/man/man4/hptrr.4 Sun Jul 1 00:40:09 2012 (r237861) @@ -50,8 +50,8 @@ hptrr_load="YES" The following tunables are settable from the loader: .Bl -ohang .It Va hw.hptrr.attach_generic -set to 0 to deny driver attach to chips with generic Marvell (non-HighPoint) -PCI identification. These chips are also supported by ata(4). +set to 1 to permit driver attach to chips with generic Marvell (non-HighPoint) +PCI identification. These chips are also supported by ata(4) and mvs(4). Some vendors are using same chips, but without providing RAID BIOS. .El .Sh DESCRIPTION @@ -112,7 +112,8 @@ This driver supersedes the older rr232x .Xr ata 4 , .Xr cam 4 , .Xr hptmv 4 , -.Xr loader 8 +.Xr loader 8 , +.Xr mvs 4 .Sh HISTORY The .Nm Modified: stable/9/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- stable/9/sys/dev/hptrr/hptrr_osm_bsd.c Sun Jul 1 00:36:07 2012 (r237860) +++ stable/9/sys/dev/hptrr/hptrr_osm_bsd.c Sun Jul 1 00:40:09 2012 (r237861) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include -static int attach_generic = 1; +static int attach_generic = 0; TUNABLE_INT("hw.hptrr.attach_generic", &attach_generic); static int hpt_probe(device_t dev) From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 04:15:15 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 055E7106566C; Sun, 1 Jul 2012 04:15:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E01BD8FC0A; Sun, 1 Jul 2012 04:15:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q614FEuo064781; Sun, 1 Jul 2012 04:15:14 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q614FEEr064770; Sun, 1 Jul 2012 04:15:14 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201207010415.q614FEEr064770@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 1 Jul 2012 04:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237870 - in stable/9: cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/contrib/opensolaris/uts/common/sys X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 04:15:15 -0000 Author: pfg Date: Sun Jul 1 04:15:14 2012 New Revision: 237870 URL: http://svn.freebsd.org/changeset/base/237870 Log: MFC r237624, r237714, r237716, r237860: Bring llquantize support into Dtrace. Bryan Cantrill implemented the equivalent of semi-log graph paper for Dtrace so llquantize will use one logarithmic and one linear scale. Added: - copied from r237868, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/ Directory Properties: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Directory Properties: stable/9/cddl/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Sun Jul 1 04:15:14 2012 (r237870) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ #include #include @@ -209,6 +211,83 @@ dt_aggregate_lquantizedcmp(int64_t *lhs, return (0); } +static void +dt_aggregate_llquantize(int64_t *existing, int64_t *new, size_t size) +{ + int i; + + for (i = 1; i < size / sizeof (int64_t); i++) + existing[i] = existing[i] + new[i]; +} + +static long double +dt_aggregate_llquantizedsum(int64_t *llquanta) +{ + int64_t arg = *llquanta++; + uint16_t factor = DTRACE_LLQUANTIZE_FACTOR(arg); + uint16_t low = DTRACE_LLQUANTIZE_LOW(arg); + uint16_t high = DTRACE_LLQUANTIZE_HIGH(arg); + uint16_t nsteps = DTRACE_LLQUANTIZE_NSTEP(arg); + int bin = 0, order; + int64_t value = 1, next, step; + long double total; + + assert(nsteps >= factor); + assert(nsteps % factor == 0); + + for (order = 0; order < low; order++) + value *= factor; + + total = (long double)llquanta[bin++] * (long double)(value - 1); + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + + while (order <= high) { + assert(value < next); + total += (long double)llquanta[bin++] * (long double)(value); + + if ((value += step) != next) + continue; + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + order++; + } + + return (total + (long double)llquanta[bin] * (long double)value); +} + +static int +dt_aggregate_llquantizedcmp(int64_t *lhs, int64_t *rhs) +{ + long double lsum = dt_aggregate_llquantizedsum(lhs); + long double rsum = dt_aggregate_llquantizedsum(rhs); + int64_t lzero, rzero; + + if (lsum < rsum) + return (DT_LESSTHAN); + + if (lsum > rsum) + return (DT_GREATERTHAN); + + /* + * If they're both equal, then we will compare based on the weights at + * zero. If the weights at zero are equal, then this will be judged a + * tie and will be resolved based on the key comparison. + */ + lzero = lhs[1]; + rzero = rhs[1]; + + if (lzero < rzero) + return (DT_LESSTHAN); + + if (lzero > rzero) + return (DT_GREATERTHAN); + + return (0); +} + static int dt_aggregate_quantizedcmp(int64_t *lhs, int64_t *rhs) { @@ -592,6 +671,10 @@ hashnext: h->dtahe_aggregate = dt_aggregate_lquantize; break; + case DTRACEAGG_LLQUANTIZE: + h->dtahe_aggregate = dt_aggregate_llquantize; + break; + case DTRACEAGG_COUNT: case DTRACEAGG_SUM: case DTRACEAGG_AVG: @@ -859,6 +942,10 @@ dt_aggregate_valcmp(const void *lhs, con rval = dt_aggregate_lquantizedcmp(laddr, raddr); break; + case DTRACEAGG_LLQUANTIZE: + rval = dt_aggregate_llquantizedcmp(laddr, raddr); + break; + case DTRACEAGG_COUNT: case DTRACEAGG_SUM: case DTRACEAGG_MIN: Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sun Jul 1 04:15:14 2012 (r237870) @@ -82,6 +82,7 @@ #include #include +#include #include #include @@ -1369,6 +1370,146 @@ dt_compile_agg(dtrace_hdl_t *dtp, dt_nod argmax = 5; } + if (fid->di_id == DTRACEAGG_LLQUANTIZE) { + /* + * For log/linear quantizations, we have between one and five + * arguments in addition to the expression: + * + * arg1 => Factor + * arg2 => Low magnitude + * arg3 => High magnitude + * arg4 => Number of steps per magnitude + * arg5 => Quantization increment value (defaults to 1) + */ + dt_node_t *llarg = dnp->dn_aggfun->dn_args->dn_list; + uint64_t oarg, order, v; + dt_idsig_t *isp; + int i; + + struct { + char *str; /* string identifier */ + int badtype; /* error on bad type */ + int badval; /* error on bad value */ + int mismatch; /* error on bad match */ + int shift; /* shift value */ + uint16_t value; /* value itself */ + } args[] = { + { "factor", D_LLQUANT_FACTORTYPE, + D_LLQUANT_FACTORVAL, D_LLQUANT_FACTORMATCH, + DTRACE_LLQUANTIZE_FACTORSHIFT }, + { "low magnitude", D_LLQUANT_LOWTYPE, + D_LLQUANT_LOWVAL, D_LLQUANT_LOWMATCH, + DTRACE_LLQUANTIZE_LOWSHIFT }, + { "high magnitude", D_LLQUANT_HIGHTYPE, + D_LLQUANT_HIGHVAL, D_LLQUANT_HIGHMATCH, + DTRACE_LLQUANTIZE_HIGHSHIFT }, + { "linear steps per magnitude", D_LLQUANT_NSTEPTYPE, + D_LLQUANT_NSTEPVAL, D_LLQUANT_NSTEPMATCH, + DTRACE_LLQUANTIZE_NSTEPSHIFT }, + { NULL } + }; + + assert(arg == 0); + + for (i = 0; args[i].str != NULL; i++) { + if (llarg->dn_kind != DT_NODE_INT) { + dnerror(llarg, args[i].badtype, "llquantize( ) " + "argument #%d (%s) must be an " + "integer constant\n", i + 1, args[i].str); + } + + if ((uint64_t)llarg->dn_value > UINT16_MAX) { + dnerror(llarg, args[i].badval, "llquantize( ) " + "argument #%d (%s) must be an unsigned " + "16-bit quantity\n", i + 1, args[i].str); + } + + args[i].value = (uint16_t)llarg->dn_value; + + assert(!(arg & ((uint64_t)UINT16_MAX << + args[i].shift))); + arg |= ((uint64_t)args[i].value << args[i].shift); + llarg = llarg->dn_list; + } + + assert(arg != 0); + + if (args[0].value < 2) { + dnerror(dnp, D_LLQUANT_FACTORSMALL, "llquantize( ) " + "factor (argument #1) must be two or more\n"); + } + + if (args[1].value >= args[2].value) { + dnerror(dnp, D_LLQUANT_MAGRANGE, "llquantize( ) " + "high magnitude (argument #3) must be greater " + "than low magnitude (argument #2)\n"); + } + + if (args[3].value < args[0].value) { + dnerror(dnp, D_LLQUANT_FACTORNSTEPS, "llquantize( ) " + "factor (argument #1) must be less than or " + "equal to the number of linear steps per " + "magnitude (argument #4)\n"); + } + + for (v = args[0].value; v < args[3].value; v *= args[0].value) + continue; + + if ((args[3].value % args[0].value) || (v % args[3].value)) { + dnerror(dnp, D_LLQUANT_FACTOREVEN, "llquantize( ) " + "factor (argument #1) must evenly divide the " + "number of steps per magnitude (argument #4), " + "and the number of steps per magnitude must evenly " + "divide a power of the factor\n"); + } + + for (i = 0, order = 1; i < args[2].value; i++) { + if (order * args[0].value > order) { + order *= args[0].value; + continue; + } + + dnerror(dnp, D_LLQUANT_MAGTOOBIG, "llquantize( ) " + "factor (%d) raised to power of high magnitude " + "(%d) overflows 64-bits\n", args[0].value, + args[2].value); + } + + isp = (dt_idsig_t *)aid->di_data; + + if (isp->dis_auxinfo == 0) { + /* + * This is the first time we've seen an llquantize() + * for this aggregation; we'll store our argument + * as the auxiliary signature information. + */ + isp->dis_auxinfo = arg; + } else if ((oarg = isp->dis_auxinfo) != arg) { + /* + * If we have seen this llquantize() before and the + * argument doesn't match the original argument, pick + * the original argument apart to concisely report the + * mismatch. + */ + int expected = 0, found = 0; + + for (i = 0; expected == found; i++) { + assert(args[i].str != NULL); + + expected = (oarg >> args[i].shift) & UINT16_MAX; + found = (arg >> args[i].shift) & UINT16_MAX; + } + + dnerror(dnp, args[i - 1].mismatch, "llquantize( ) " + "%s (argument #%d) doesn't match previous " + "declaration: expected %d, found %d\n", + args[i - 1].str, i, expected, found); + } + + incr = llarg; + argmax = 6; + } + if (fid->di_id == DTRACEAGG_QUANTIZE) { incr = dnp->dn_aggfun->dn_args->dn_list; argmax = 2; Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sun Jul 1 04:15:14 2012 (r237870) @@ -23,6 +23,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #include #include #include @@ -686,6 +690,121 @@ dt_print_lquantize(dtrace_hdl_t *dtp, FI return (0); } +int +dt_print_llquantize(dtrace_hdl_t *dtp, FILE *fp, const void *addr, + size_t size, uint64_t normal) +{ + int i, first_bin, last_bin, bin = 1, order, levels; + uint16_t factor, low, high, nsteps; + const int64_t *data = addr; + int64_t value = 1, next, step; + char positives = 0, negatives = 0; + long double total = 0; + uint64_t arg; + char c[32]; + + if (size < sizeof (uint64_t)) + return (dt_set_errno(dtp, EDT_DMISMATCH)); + + arg = *data++; + size -= sizeof (uint64_t); + + factor = DTRACE_LLQUANTIZE_FACTOR(arg); + low = DTRACE_LLQUANTIZE_LOW(arg); + high = DTRACE_LLQUANTIZE_HIGH(arg); + nsteps = DTRACE_LLQUANTIZE_NSTEP(arg); + + /* + * We don't expect to be handed invalid llquantize() parameters here, + * but sanity check them (to a degree) nonetheless. + */ + if (size > INT32_MAX || factor < 2 || low >= high || + nsteps == 0 || factor > nsteps) + return (dt_set_errno(dtp, EDT_DMISMATCH)); + + levels = (int)size / sizeof (uint64_t); + + first_bin = 0; + last_bin = levels - 1; + + while (first_bin < levels && data[first_bin] == 0) + first_bin++; + + if (first_bin == levels) { + first_bin = 0; + last_bin = 1; + } else { + if (first_bin > 0) + first_bin--; + + while (last_bin > 0 && data[last_bin] == 0) + last_bin--; + + if (last_bin < levels - 1) + last_bin++; + } + + for (i = first_bin; i <= last_bin; i++) { + positives |= (data[i] > 0); + negatives |= (data[i] < 0); + total += dt_fabsl((long double)data[i]); + } + + if (dt_printf(dtp, fp, "\n%16s %41s %-9s\n", "value", + "------------- Distribution -------------", "count") < 0) + return (-1); + + for (order = 0; order < low; order++) + value *= factor; + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + + if (first_bin == 0) { + (void) snprintf(c, sizeof (c), "< %lld", (long long)value); + + if (dt_printf(dtp, fp, "%16s ", c) < 0) + return (-1); + + if (dt_print_quantline(dtp, fp, data[0], normal, + total, positives, negatives) < 0) + return (-1); + } + + while (order <= high) { + if (bin >= first_bin && bin <= last_bin) { + if (dt_printf(dtp, fp, "%16lld ", (long long)value) < 0) + return (-1); + + if (dt_print_quantline(dtp, fp, data[bin], + normal, total, positives, negatives) < 0) + return (-1); + } + + assert(value < next); + bin++; + + if ((value += step) != next) + continue; + + next = value * factor; + step = next > nsteps ? next / nsteps : 1; + order++; + } + + if (last_bin < bin) + return (0); + + assert(last_bin == bin); + (void) snprintf(c, sizeof (c), ">= %lld", value); + + if (dt_printf(dtp, fp, "%16s ", c) < 0) + return (-1); + + return (dt_print_quantline(dtp, fp, data[bin], normal, + total, positives, negatives)); +} + /*ARGSUSED*/ static int dt_print_average(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr, @@ -1711,6 +1830,9 @@ dt_print_datum(dtrace_hdl_t *dtp, FILE * case DTRACEAGG_LQUANTIZE: return (dt_print_lquantize(dtp, fp, addr, size, normal)); + case DTRACEAGG_LLQUANTIZE: + return (dt_print_llquantize(dtp, fp, addr, size, normal)); + case DTRACEAGG_AVG: return (dt_print_average(dtp, fp, addr, size, normal)); Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Sun Jul 1 04:15:14 2012 (r237870) @@ -236,6 +236,23 @@ typedef enum { D_LQUANT_MATCHBASE, /* lquantize() mismatch on base */ D_LQUANT_MATCHLIM, /* lquantize() mismatch on limit */ D_LQUANT_MATCHSTEP, /* lquantize() mismatch on step */ + D_LLQUANT_FACTORTYPE, /* llquantize() bad magnitude type */ + D_LLQUANT_FACTORVAL, /* llquantize() bad magnitude value */ + D_LLQUANT_FACTORMATCH, /* llquantize() mismatch on magnitude */ + D_LLQUANT_LOWTYPE, /* llquantize() bad low mag type */ + D_LLQUANT_LOWVAL, /* llquantize() bad low mag value */ + D_LLQUANT_LOWMATCH, /* llquantize() mismatch on low mag */ + D_LLQUANT_HIGHTYPE, /* llquantize() bad high mag type */ + D_LLQUANT_HIGHVAL, /* llquantize() bad high mag value */ + D_LLQUANT_HIGHMATCH, /* llquantize() mismatch on high mag */ + D_LLQUANT_NSTEPTYPE, /* llquantize() bad # steps type */ + D_LLQUANT_NSTEPVAL, /* llquantize() bad # steps value */ + D_LLQUANT_NSTEPMATCH, /* llquantize() mismatch on # steps */ + D_LLQUANT_MAGRANGE, /* llquantize() bad magnitude range */ + D_LLQUANT_FACTORNSTEPS, /* llquantize() # steps < factor */ + D_LLQUANT_FACTOREVEN, /* llquantize() bad # steps/factor */ + D_LLQUANT_FACTORSMALL, /* llquantize() magnitude too small */ + D_LLQUANT_MAGTOOBIG, /* llquantize() high mag too large */ D_PRINTM_ADDR, /* printm() memref bad type */ D_PRINTM_SIZE, /* printm() size bad type */ D_PRINTT_ADDR, /* printt() typeref bad type */ Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Sun Jul 1 04:15:14 2012 (r237870) @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #ifndef _DT_IMPL_H #define _DT_IMPL_H @@ -641,6 +645,8 @@ extern int dt_print_quantize(dtrace_hdl_ const void *, size_t, uint64_t); extern int dt_print_lquantize(dtrace_hdl_t *, FILE *, const void *, size_t, uint64_t); +extern int dt_print_llquantize(dtrace_hdl_t *, FILE *, + const void *, size_t, uint64_t); extern int dt_print_agg(const dtrace_aggdata_t *, void *); extern int dt_handle(dtrace_hdl_t *, dtrace_probedata_t *); Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sun Jul 1 04:15:14 2012 (r237870) @@ -21,6 +21,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, Joyent, Inc. All rights reserved. */ #include @@ -114,8 +115,9 @@ #define DT_VERS_1_6_1 DT_VERSION_NUMBER(1, 6, 1) #define DT_VERS_1_6_2 DT_VERSION_NUMBER(1, 6, 2) #define DT_VERS_1_6_3 DT_VERSION_NUMBER(1, 6, 3) -#define DT_VERS_LATEST DT_VERS_1_6_3 -#define DT_VERS_STRING "Sun D 1.6.3" +#define DT_VERS_1_7 DT_VERSION_NUMBER(1, 7, 0) +#define DT_VERS_LATEST DT_VERS_1_7 +#define DT_VERS_STRING "Sun D 1.7" const dt_version_t _dtrace_versions[] = { DT_VERS_1_0, /* D API 1.0.0 (PSARC 2001/466) Solaris 10 FCS */ @@ -131,6 +133,7 @@ const dt_version_t _dtrace_versions[] = DT_VERS_1_6_1, /* D API 1.6.1 */ DT_VERS_1_6_2, /* D API 1.6.2 */ DT_VERS_1_6_3, /* D API 1.6.3 */ + DT_VERS_1_7, /* D API 1.7 */ 0 }; @@ -287,6 +290,9 @@ static const dt_ident_t _dtrace_globals[ &dt_idops_func, "stack(...)" }, { "lltostr", DT_IDENT_FUNC, 0, DIF_SUBR_LLTOSTR, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "string(int64_t)" }, +{ "llquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LLQUANTIZE, DT_ATTR_STABCMN, + DT_VERS_1_7, &dt_idops_func, + "void(@, int32_t, int32_t, int32_t, int32_t, ...)" }, { "lquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LQUANTIZE, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(@, int32_t, int32_t, ...)" }, Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c Sun Jul 1 04:15:14 2012 (r237870) @@ -21,6 +21,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, Joyent, Inc. All rights reserved. */ #if defined(sun) @@ -1322,6 +1323,14 @@ pfprint_lquantize(dtrace_hdl_t *dtp, FIL return (dt_print_lquantize(dtp, fp, addr, size, normal)); } +/*ARGSUSED*/ +static int +pfprint_llquantize(dtrace_hdl_t *dtp, FILE *fp, const char *format, + const dt_pfargd_t *pfd, const void *addr, size_t size, uint64_t normal) +{ + return (dt_print_llquantize(dtp, fp, addr, size, normal)); +} + static int dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv, const dtrace_recdesc_t *recs, uint_t nrecs, const void *buf, @@ -1507,6 +1516,9 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE case DTRACEAGG_LQUANTIZE: func = pfprint_lquantize; break; + case DTRACEAGG_LLQUANTIZE: + func = pfprint_llquantize; + break; case DTRACEACT_MOD: func = pfprint_mod; break; Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h Sun Jul 1 04:15:14 2012 (r237870) @@ -24,11 +24,13 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #ifndef _DTRACE_H #define _DTRACE_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jul 1 04:15:14 2012 (r237870) @@ -1913,6 +1913,75 @@ dtrace_aggregate_lquantize(uint64_t *lqu lquanta[levels + 1] += incr; } +static int +dtrace_aggregate_llquantize_bucket(uint16_t factor, uint16_t low, + uint16_t high, uint16_t nsteps, int64_t value) +{ + int64_t this = 1, last, next; + int base = 1, order; + + ASSERT(factor <= nsteps); + ASSERT(nsteps % factor == 0); + + for (order = 0; order < low; order++) + this *= factor; + + /* + * If our value is less than our factor taken to the power of the + * low order of magnitude, it goes into the zeroth bucket. + */ + if (value < (last = this)) + return (0); + + for (this *= factor; order <= high; order++) { + int nbuckets = this > nsteps ? nsteps : this; + + if ((next = this * factor) < this) { + /* + * We should not generally get log/linear quantizations + * with a high magnitude that allows 64-bits to + * overflow, but we nonetheless protect against this + * by explicitly checking for overflow, and clamping + * our value accordingly. + */ + value = this - 1; + } + + if (value < this) { + /* + * If our value lies within this order of magnitude, + * determine its position by taking the offset within + * the order of magnitude, dividing by the bucket + * width, and adding to our (accumulated) base. + */ + return (base + (value - last) / (this / nbuckets)); + } + + base += nbuckets - (nbuckets / factor); + last = this; + this = next; + } + + /* + * Our value is greater than or equal to our factor taken to the + * power of one plus the high magnitude -- return the top bucket. + */ + return (base); +} + +static void +dtrace_aggregate_llquantize(uint64_t *llquanta, uint64_t nval, uint64_t incr) +{ + uint64_t arg = *llquanta++; + uint16_t factor = DTRACE_LLQUANTIZE_FACTOR(arg); + uint16_t low = DTRACE_LLQUANTIZE_LOW(arg); + uint16_t high = DTRACE_LLQUANTIZE_HIGH(arg); + uint16_t nsteps = DTRACE_LLQUANTIZE_NSTEP(arg); + + llquanta[dtrace_aggregate_llquantize_bucket(factor, + low, high, nsteps, nval)] += incr; +} + /*ARGSUSED*/ static void dtrace_aggregate_avg(uint64_t *data, uint64_t nval, uint64_t arg) @@ -9853,6 +9922,35 @@ dtrace_ecb_aggregation_create(dtrace_ecb break; } + case DTRACEAGG_LLQUANTIZE: { + uint16_t factor = DTRACE_LLQUANTIZE_FACTOR(desc->dtad_arg); + uint16_t low = DTRACE_LLQUANTIZE_LOW(desc->dtad_arg); + uint16_t high = DTRACE_LLQUANTIZE_HIGH(desc->dtad_arg); + uint16_t nsteps = DTRACE_LLQUANTIZE_NSTEP(desc->dtad_arg); + int64_t v; + + agg->dtag_initial = desc->dtad_arg; + agg->dtag_aggregate = dtrace_aggregate_llquantize; + + if (factor < 2 || low >= high || nsteps < factor) + goto err; + + /* + * Now check that the number of steps evenly divides a power + * of the factor. (This assures both integer bucket size and + * linearity within each magnitude.) + */ + for (v = factor; v < nsteps; v *= factor) + continue; + + if ((v % nsteps) || (nsteps % factor)) + goto err; + + size = (dtrace_aggregate_llquantize_bucket(factor, + low, high, nsteps, INT64_MAX) + 2) * sizeof (uint64_t); + break; + } + case DTRACEAGG_AVG: agg->dtag_aggregate = dtrace_aggregate_avg; size = sizeof (uint64_t) * 2; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sun Jul 1 04:09:42 2012 (r237869) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sun Jul 1 04:15:14 2012 (r237870) @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #ifndef _SYS_DTRACE_H #define _SYS_DTRACE_H @@ -481,6 +485,7 @@ typedef struct dtrace_difv { #define DTRACEAGG_STDDEV (DTRACEACT_AGGREGATION + 6) #define DTRACEAGG_QUANTIZE (DTRACEACT_AGGREGATION + 7) #define DTRACEAGG_LQUANTIZE (DTRACEACT_AGGREGATION + 8) +#define DTRACEAGG_LLQUANTIZE (DTRACEACT_AGGREGATION + 9) #define DTRACEACT_ISAGG(x) \ (DTRACEACT_CLASS(x) == DTRACEACT_AGGREGATION) @@ -515,6 +520,31 @@ typedef struct dtrace_difv { (int32_t)(((x) & DTRACE_LQUANTIZE_BASEMASK) >> \ DTRACE_LQUANTIZE_BASESHIFT) +#define DTRACE_LLQUANTIZE_FACTORSHIFT 48 +#define DTRACE_LLQUANTIZE_FACTORMASK ((uint64_t)UINT16_MAX << 48) +#define DTRACE_LLQUANTIZE_LOWSHIFT 32 +#define DTRACE_LLQUANTIZE_LOWMASK ((uint64_t)UINT16_MAX << 32) +#define DTRACE_LLQUANTIZE_HIGHSHIFT 16 +#define DTRACE_LLQUANTIZE_HIGHMASK ((uint64_t)UINT16_MAX << 16) +#define DTRACE_LLQUANTIZE_NSTEPSHIFT 0 +#define DTRACE_LLQUANTIZE_NSTEPMASK UINT16_MAX + +#define DTRACE_LLQUANTIZE_FACTOR(x) \ + (uint16_t)(((x) & DTRACE_LLQUANTIZE_FACTORMASK) >> \ + DTRACE_LLQUANTIZE_FACTORSHIFT) + +#define DTRACE_LLQUANTIZE_LOW(x) \ + (uint16_t)(((x) & DTRACE_LLQUANTIZE_LOWMASK) >> \ + DTRACE_LLQUANTIZE_LOWSHIFT) + +#define DTRACE_LLQUANTIZE_HIGH(x) \ + (uint16_t)(((x) & DTRACE_LLQUANTIZE_HIGHMASK) >> \ + DTRACE_LLQUANTIZE_HIGHSHIFT) + +#define DTRACE_LLQUANTIZE_NSTEP(x) \ + (uint16_t)(((x) & DTRACE_LLQUANTIZE_NSTEPMASK) >> \ + DTRACE_LLQUANTIZE_NSTEPSHIFT) + #define DTRACE_USTACK_NFRAMES(x) (uint32_t)((x) & UINT32_MAX) #define DTRACE_USTACK_STRSIZE(x) (uint32_t)((x) >> 32) #define DTRACE_USTACK_ARG(x, y) \ From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 05:14:31 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8852A1067F8F; Sun, 1 Jul 2012 05:13:51 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F5AE8FC1B; Sun, 1 Jul 2012 05:13:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q615DpOo067176; Sun, 1 Jul 2012 05:13:51 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q615Dp2F067167; Sun, 1 Jul 2012 05:13:51 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207010513.q615Dp2F067167@svn.freebsd.org> From: "Kenneth D. Merry" Date: Sun, 1 Jul 2012 05:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237873 - in stable/9: share/man/man9 sys/cam/scsi sys/dev/xen/blkfront sys/geom X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 05:14:31 -0000 Author: ken Date: Sun Jul 1 05:13:50 2012 New Revision: 237873 URL: http://svn.freebsd.org/changeset/base/237873 Log: MFC 237518, 237545, 237648: r237518 | ken | 2012-06-23 22:29:03 -0600 (Sat, 23 Jun 2012) | 72 lines Fix a bug which causes a panic in daopen(). The panic is caused by a da(4) instance going away while GEOM is still probing it. In this case, the GEOM disk class instance has been created by disk_create(), and the taste of the disk is queued in the GEOM event queue. While that event is queued, the da(4) instance goes away. When the open call comes into the da(4) driver, it dereferences the freed (but non-NULL) peripheral pointer provided by GEOM, which results in a panic. The solution is to add a callback to the GEOM disk code that is called when all of its resources are cleaned up. This is implemented inside GEOM by adding an optional callback that is called when all consumers have detached from a provider, and the provider is about to be deleted. scsi_cd.c, scsi_da.c: In the register routine for the cd(4) and da(4) routines, acquire a reference to the CAM peripheral instance just before we call disk_create(). Use the new GEOM disk d_gone() callback to register a callback (dadiskgonecb()/cddiskgonecb()) that decrements the peripheral reference count once GEOM has finished cleaning up its resources. In the cd(4) driver, clean up open and close behavior slightly. GEOM makes sure we only get one open() and one close call, so there is no need to set an open flag and decrement the reference count if we are not the first open. In the cd(4) driver, use cam_periph_release_locked() in a couple of error scenarios to avoid extra mutex calls. geom.h: Add a new, optional, providergone callback that is called when a provider is about to be deleted. geom_disk.h: Add a new d_gone() callback to the GEOM disk interface. Bump the DISK_VERSION to version 2. This probably should have been done after a couple of previous changes, especially the addition of the d_getattr() callback. geom_disk.c: Add a providergone callback for the disk class, g_disk_providergone(), that calls the user's d_gone() callback if it exists. Bump the DISK_VERSION to 2. geom_subr.c: In g_destroy_provider(), call the providergone callback if it has been provided. In g_new_geomf(), propagate the class's providergone callback to the new geom instance. blkfront.c: Callers of disk_create() are supposed to pass in DISK_VERSION, not an explicit disk API version number. Update the blkfront driver to do that. disk.9: Update the disk(9) man page to include information on the new d_gone() callback, as well as the previously added d_getattr() callback, d_descr field, and HBA PCI ID fields. r237545 | ken | 2012-06-24 22:26:10 -0600 (Sun, 24 Jun 2012) | 7 lines Consume spare fields for the providergone pointers added to the g_class and g_geom structures in change 237518. The original change would have broken the ABI. Suggested by: ae r237648 | ken | 2012-06-27 10:05:09 -0600 (Wed, 27 Jun 2012) | 6 lines In g_disk_providergone(), don't continue if the softc is NULL. This may be the case if we've already gone through g_disk_destroy(). Reported by: Michael Butler Modified: stable/9/share/man/man9/disk.9 stable/9/sys/cam/scsi/scsi_cd.c stable/9/sys/cam/scsi/scsi_da.c stable/9/sys/dev/xen/blkfront/blkfront.c stable/9/sys/geom/geom.h stable/9/sys/geom/geom_disk.c stable/9/sys/geom/geom_disk.h stable/9/sys/geom/geom_subr.c Directory Properties: stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man9/disk.9 ============================================================================== --- stable/9/share/man/man9/disk.9 Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/share/man/man9/disk.9 Sun Jul 1 05:13:50 2012 (r237873) @@ -145,6 +145,16 @@ Optional: if configured with .Xr dumpon 8 , this function is invoked from a very restricted system state after a kernel panic to record a copy of the system RAM to the disk. +.It Vt "disk_getattr_t *" Va d_getattr +Optional: if this method is provided, it gives the disk driver the +opportunity to override the default GEOM response to BIO_GETATTR requests. +This function should return -1 if the attribute is not handled, 0 if the +attribute is handled, or an errno to be passed to g_io_deliver(). +.It Vt "disk_gone_t *" Va d_gone +Optional: if this method is provided, it will be called after disk_gone() +is called, once GEOM has finished its cleanup process. +Once this callback is called, it is safe for the disk driver to free all of +its resources, as it will not be receiving further calls from GEOM. .El .Ss Mandatory Media Properties The following fields identify the size and granularity of the disk device. @@ -180,7 +190,23 @@ Please see .Pa src/sys/geom/notes for details. .It Vt char Va d_ident[DISK_IDENT_SIZE] -This field can and should be used to store disk's serial number. +This field can and should be used to store disk's serial number if the +d_getattr method described above isn't implemented, or if it does not +support the GEOM::ident attribute. +.It Vt char Va d_descr[DISK_IDENT_SIZE] +This field can be used to store the disk vendor and product description. +.It Vt uint16_t Va d_hba_vendor +This field can be used to store the PCI vendor ID for the HBA connected to +the disk. +.It Vt uint16_t Va d_hba_device +This field can be used to store the PCI device ID for the HBA connected to +the disk. +.It Vt uint16_t Va d_hba_subvendor +This field can be used to store the PCI subvendor ID for the HBA connected to +the disk. +.It Vt uint16_t Va d_hba_subdevice +This field can be used to store the PCI subdevice ID for the HBA connected to +the disk. .El .Ss Driver Private Data This field may be used by the device driver to store a pointer to Modified: stable/9/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_cd.c Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/cam/scsi/scsi_cd.c Sun Jul 1 05:13:50 2012 (r237873) @@ -103,8 +103,7 @@ typedef enum { CD_FLAG_RETRY_UA = 0x0200, CD_FLAG_VALID_MEDIA = 0x0400, CD_FLAG_VALID_TOC = 0x0800, - CD_FLAG_SCTX_INIT = 0x1000, - CD_FLAG_OPEN = 0x2000 + CD_FLAG_SCTX_INIT = 0x1000 } cd_flags; typedef enum { @@ -357,6 +356,20 @@ cdinit(void) } } +/* + * Callback from GEOM, called when it has finished cleaning up its + * resources. + */ +static void +cddiskgonecb(struct disk *dp) +{ + struct cam_periph *periph; + + periph = (struct cam_periph *)dp->d_drv1; + + cam_periph_release(periph); +} + static void cdoninvalidate(struct cam_periph *periph) { @@ -388,7 +401,7 @@ cdoninvalidate(struct cam_periph *periph camq_remove(&softc->changer->devq, softc->pinfo.index); disk_gone(softc->disk); - xpt_print(periph->path, "lost device\n"); + xpt_print(periph->path, "lost device, %d refs\n", periph->refcount); } static void @@ -725,6 +738,7 @@ cdregister(struct cam_periph *periph, vo softc->disk->d_open = cdopen; softc->disk->d_close = cdclose; softc->disk->d_strategy = cdstrategy; + softc->disk->d_gone = cddiskgonecb; softc->disk->d_ioctl = cdioctl; softc->disk->d_name = "cd"; cam_strvis(softc->disk->d_descr, cgd->inq_data.vendor, @@ -746,6 +760,19 @@ cdregister(struct cam_periph *periph, vo softc->disk->d_hba_device = cpi.hba_device; softc->disk->d_hba_subvendor = cpi.hba_subvendor; softc->disk->d_hba_subdevice = cpi.hba_subdevice; + + /* + * Acquire a reference to the periph before we register with GEOM. + * We'll release this reference once GEOM calls us back (via + * dadiskgonecb()) telling us that our provider has been freed. + */ + if (cam_periph_acquire(periph) != CAM_REQ_CMP) { + xpt_print(periph->path, "%s: lost periph during " + "registration!\n", __func__); + cam_periph_lock(periph); + return (CAM_REQ_CMP_ERR); + } + disk_create(softc->disk, DISK_VERSION); cam_periph_lock(periph); @@ -999,14 +1026,14 @@ cdopen(struct disk *dp) cam_periph_lock(periph); if (softc->flags & CD_FLAG_INVALID) { + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return(ENXIO); } if ((error = cam_periph_hold(periph, PRIBIO | PCATCH)) != 0) { + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return (error); } @@ -1023,14 +1050,7 @@ cdopen(struct disk *dp) CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("leaving cdopen\n")); cam_periph_unhold(periph); - /* Closes aren't symmetrical with opens, so fix up the refcounting. */ - if ((softc->flags & CD_FLAG_OPEN) == 0) { - softc->flags |= CD_FLAG_OPEN; - cam_periph_unlock(periph); - } else { - cam_periph_unlock(periph); - cam_periph_release(periph); - } + cam_periph_unlock(periph); return (0); } @@ -1069,11 +1089,11 @@ cdclose(struct disk *dp) /* * We'll check the media and toc again at the next open(). */ - softc->flags &= ~(CD_FLAG_VALID_MEDIA|CD_FLAG_VALID_TOC|CD_FLAG_OPEN); + softc->flags &= ~(CD_FLAG_VALID_MEDIA|CD_FLAG_VALID_TOC); cam_periph_unhold(periph); + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return (0); } Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/cam/scsi/scsi_da.c Sun Jul 1 05:13:50 2012 (r237873) @@ -1234,6 +1234,20 @@ dainit(void) } } +/* + * Callback from GEOM, called when it has finished cleaning up its + * resources. + */ +static void +dadiskgonecb(struct disk *dp) +{ + struct cam_periph *periph; + + periph = (struct cam_periph *)dp->d_drv1; + + cam_periph_release(periph); +} + static void daoninvalidate(struct cam_periph *periph) { @@ -1256,7 +1270,12 @@ daoninvalidate(struct cam_periph *periph bioq_flush(&softc->bio_queue, NULL, ENXIO); bioq_flush(&softc->delete_queue, NULL, ENXIO); + /* + * Tell GEOM that we've gone away, we'll get a callback when it is + * done cleaning up its resources. + */ disk_gone(softc->disk); + xpt_print(periph->path, "lost device - %d outstanding, %d refs\n", softc->outstanding_cmds, periph->refcount); } @@ -1634,6 +1653,7 @@ daregister(struct cam_periph *periph, vo softc->disk->d_strategy = dastrategy; softc->disk->d_dump = dadump; softc->disk->d_getattr = dagetattr; + softc->disk->d_gone = dadiskgonecb; softc->disk->d_name = "da"; softc->disk->d_drv1 = periph; if (cpi.maxio == 0) @@ -1656,6 +1676,19 @@ daregister(struct cam_periph *periph, vo softc->disk->d_hba_device = cpi.hba_device; softc->disk->d_hba_subvendor = cpi.hba_subvendor; softc->disk->d_hba_subdevice = cpi.hba_subdevice; + + /* + * Acquire a reference to the periph before we register with GEOM. + * We'll release this reference once GEOM calls us back (via + * dadiskgonecb()) telling us that our provider has been freed. + */ + if (cam_periph_acquire(periph) != CAM_REQ_CMP) { + xpt_print(periph->path, "%s: lost periph during " + "registration!\n", __func__); + mtx_lock(periph->sim->mtx); + return (CAM_REQ_CMP_ERR); + } + disk_create(softc->disk, DISK_VERSION); mtx_lock(periph->sim->mtx); Modified: stable/9/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- stable/9/sys/dev/xen/blkfront/blkfront.c Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/dev/xen/blkfront/blkfront.c Sun Jul 1 05:13:50 2012 (r237873) @@ -230,7 +230,7 @@ xlvbd_add(struct xb_softc *sc, blkif_sec sc->xb_disk->d_mediasize = sectors * sector_size; sc->xb_disk->d_maxsize = sc->max_request_size; sc->xb_disk->d_flags = 0; - disk_create(sc->xb_disk, DISK_VERSION_00); + disk_create(sc->xb_disk, DISK_VERSION); return error; } Modified: stable/9/sys/geom/geom.h ============================================================================== --- stable/9/sys/geom/geom.h Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/geom/geom.h Sun Jul 1 05:13:50 2012 (r237873) @@ -76,6 +76,7 @@ typedef void g_orphan_t (struct g_consum typedef void g_start_t (struct bio *); typedef void g_spoiled_t (struct g_consumer *); typedef void g_attrchanged_t (struct g_consumer *, const char *attr); +typedef void g_provgone_t (struct g_provider *); typedef void g_dumpconf_t (struct sbuf *, const char *indent, struct g_geom *, struct g_consumer *, struct g_provider *); @@ -106,7 +107,7 @@ struct g_class { g_access_t *access; g_orphan_t *orphan; g_ioctl_t *ioctl; - void *spare1; + g_provgone_t *providergone; void *spare2; /* * The remaining elements are private @@ -137,7 +138,7 @@ struct g_geom { g_access_t *access; g_orphan_t *orphan; g_ioctl_t *ioctl; - void *spare0; + g_provgone_t *providergone; void *spare1; void *softc; unsigned flags; Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/geom/geom_disk.c Sun Jul 1 05:13:50 2012 (r237873) @@ -75,6 +75,7 @@ static g_fini_t g_disk_fini; static g_start_t g_disk_start; static g_ioctl_t g_disk_ioctl; static g_dumpconf_t g_disk_dumpconf; +static g_provgone_t g_disk_providergone; static struct g_class g_disk_class = { .name = "DISK", @@ -84,6 +85,7 @@ static struct g_class g_disk_class = { .start = g_disk_start, .access = g_disk_access, .ioctl = g_disk_ioctl, + .providergone = g_disk_providergone, .dumpconf = g_disk_dumpconf, }; @@ -484,6 +486,33 @@ g_disk_create(void *arg, int flag) g_error_provider(pp, 0); } +/* + * We get this callback after all of the consumers have gone away, and just + * before the provider is freed. If the disk driver provided a d_gone + * callback, let them know that it is okay to free resources -- they won't + * be getting any more accesses from GEOM. + */ +static void +g_disk_providergone(struct g_provider *pp) +{ + struct disk *dp; + struct g_disk_softc *sc; + + sc = (struct g_disk_softc *)pp->geom->softc; + + /* + * If the softc is already NULL, then we've probably been through + * g_disk_destroy already; there is nothing for us to do anyway. + */ + if (sc == NULL) + return; + + dp = sc->dp; + + if (dp->d_gone != NULL) + dp->d_gone(dp); +} + static void g_disk_destroy(void *ptr, int flag) { @@ -548,7 +577,7 @@ disk_alloc() void disk_create(struct disk *dp, int version) { - if (version != DISK_VERSION_00 && version != DISK_VERSION_01) { + if (version != DISK_VERSION_02) { printf("WARNING: Attempt to add disk %s%d %s", dp->d_name, dp->d_unit, " using incompatible ABI version of disk(9)\n"); Modified: stable/9/sys/geom/geom_disk.h ============================================================================== --- stable/9/sys/geom/geom_disk.h Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/geom/geom_disk.h Sun Jul 1 05:13:50 2012 (r237873) @@ -50,6 +50,7 @@ typedef int disk_open_t(struct disk *); typedef int disk_close_t(struct disk *); typedef void disk_strategy_t(struct bio *bp); typedef int disk_getattr_t(struct bio *bp); +typedef void disk_gone_t(struct disk *); typedef int disk_ioctl_t(struct disk *, u_long cmd, void *data, int fflag, struct thread *td); /* NB: disk_ioctl_t SHALL be cast'able to d_ioctl_t */ @@ -77,6 +78,7 @@ struct disk { disk_ioctl_t *d_ioctl; dumper_t *d_dump; disk_getattr_t *d_getattr; + disk_gone_t *d_gone; /* Info fields from driver to geom_disk.c. Valid when open */ u_int d_sectorsize; @@ -110,7 +112,8 @@ void disk_attr_changed(struct disk *dp, #define DISK_VERSION_00 0x58561059 #define DISK_VERSION_01 0x5856105a -#define DISK_VERSION DISK_VERSION_01 +#define DISK_VERSION_02 0x5856105b +#define DISK_VERSION DISK_VERSION_02 #endif /* _KERNEL */ #endif /* _GEOM_GEOM_DISK_H_ */ Modified: stable/9/sys/geom/geom_subr.c ============================================================================== --- stable/9/sys/geom/geom_subr.c Sun Jul 1 04:26:51 2012 (r237872) +++ stable/9/sys/geom/geom_subr.c Sun Jul 1 05:13:50 2012 (r237873) @@ -351,6 +351,7 @@ g_new_geomf(struct g_class *mp, const ch gp->start = mp->start; gp->spoiled = mp->spoiled; gp->attrchanged = mp->attrchanged; + gp->providergone = mp->providergone; gp->dumpconf = mp->dumpconf; gp->access = mp->access; gp->orphan = mp->orphan; @@ -634,6 +635,13 @@ g_destroy_provider(struct g_provider *pp LIST_REMOVE(pp, provider); gp = pp->geom; devstat_remove_entry(pp->stat); + /* + * If a callback was provided, send notification that the provider + * is now gone. + */ + if (gp->providergone != NULL) + gp->providergone(pp); + g_free(pp); if ((gp->flags & G_GEOM_WITHER)) g_do_wither(); From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 05:24:02 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2106B1065E10; Sun, 1 Jul 2012 05:22:45 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C392C8FC16; Sun, 1 Jul 2012 05:22:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q615MjNm067675; Sun, 1 Jul 2012 05:22:45 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q615MjMu067660; Sun, 1 Jul 2012 05:22:45 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207010522.q615MjMu067660@svn.freebsd.org> From: "Kenneth D. Merry" Date: Sun, 1 Jul 2012 05:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237876 - in stable/9/sys/dev/mps: . mpi X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 05:24:02 -0000 Author: ken Date: Sun Jul 1 05:22:45 2012 New Revision: 237876 URL: http://svn.freebsd.org/changeset/base/237876 Log: MFC 237683: r237683 | ken | 2012-06-27 21:48:54 -0600 (Wed, 27 Jun 2012) | 129 lines Bring in LSI's latest mps(4) 6Gb SAS and WarpDrive driver, version 14.00.00.01-fbsd. Their description of the changes is as follows: 1. Copyright contents has been changed in all respective .c and .h files 2. Support for WRITE12 and READ12 for direct-io (warpdrive only) has been added. 3. Driver has added checks to see if Drive has READ_CAP_16 support before sending it down to the device. If SPC3_SID_PROTECT flag is set in the inquiry data, the device supports protection information, and must support the 16 byte read capacity command, otherwise continue without sending read cap 16. This will optimize driver performance, since it will not send READ_CAP_16 to the drive which does not have support of READ_CAP_16. 4. With new approach, "MPTIOCTL_RESET_ADAPTER" IOCTL will not use DELAY() which is busy loop implementation. It will use (Better way to sleep without busy loop). Also from the HBA reset code path and some other places, DELAY() is replaced with msleep() or "pause()", which is based on sleep/wakeup style calls. Driver use msleep()/pause() instead of DELAY based on CAN_SLEEP/NO_SLEEP flags to avoid busy loop which is not required all the time.e.a a. While driver is getting loaded, driver calls most of the commands with NO_SLEEP. b. When Driver is functional and it needs Reinit of HBA, CAN_SLEEP flag is used. 5. driver is not Endian safe. It will not work on Big Endian machines like Sparc and PowerPC platforms because it assumes it is running on a Little Endian machine. Driver code is modified such way that it does not assume CPU arch is Little Endian. a. All places where Driver interacts from HBA to Host, it converts Little Endian format to CPU format. b. All places where Driver interacts from Host to HBA, it converts CPU format to Little Endian. 6. Findout memory leaks in FreeBSD Driver and resolve those, such as memory leak in targ's luns creation/deletion. Also added additional checks to see memory allocation success/fail. 7. Add loginfo prints as debug message, i.e. When FW sends any loginfo, Driver should print those as debug message. This will help for debugging purpose. 8. There is possibility to get config request timeout. Current driver is able to detect config request timetout, but it does not do anything on config_request timeout. Driver should call mps_reinit() if any request_poll (which is called as part of config_request) is time out. 9. cdb length check is required for 32 byte CDB. Add correct mpi control value for 32 bit CDB as below while submitting SCSI IO Request to controller. mpi_control |= 4 << MPI2_SCSIIO_CONTROL_ADDCDBLEN_SHIFT; 10. Check the actual status of Message unit reset (mps_message_unit_reset).Previously FreeBSD Driver just writes MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET and never check the ack (it just wait for 50 millisecond). So, Driver now check the status of "MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET" after writing it to the FW. Now it also checking for whether doorbell ack uses msleep with proper sleep flags, instead of . 11. Previously CAM does not detect Multi-Lun Devices. In order to detect Multi-Lun Devices by CAM the driver needs following change set: a. There is "max_lun" field which Driver need to set based on hw/fw support. Currently LSI released driver does not set this field. b. Default of "max_lun" should not be 0 in OS, but it is currently set to 0 in CAM layer. c. Export max_lun capacity to 255 12. Driver will not reset target info after port enable complete and also do Device removal when Device remove from FW. The detail description is as follows a. When Driver receive WD PD add events, it will add all information in driver local data structure. b. Only for WD, we have below checks after port enable completes, where driver clear off all information retrieved at #1. if ((sc->WD_available && (sc->WD_hide_expose == MPS_WD_HIDE_ALWAYS)) || (sc->WD_valid_config && (sc->WD_hide_expose == MPS_WD_HIDE_IF_VOLUME)) { // clear off target data structure. } It is mainly not to attach PDs to OS. FreeBSD does bus rescan as older Parallel scsi style. So Driver needs to handle which Drive is visible to OS. That is a reason we have to clear off targ information for PDs. Again, above logic was implemented long time ago. Similar concept we have for non-wd also. For that, LSI have introduced different logic to hide PDs. Eventually, because of above gap, when Phy goes offline, we observe below failure. That is what Driver is not doing complete removal of device with FW. (which was pointed by Scott) Apr 5 02:39:24 Freebsd7 kernel: mpslsi0: mpssas_prepare_remove Apr 5 02:39:24 Freebsd7 kernel: mpssas_prepare_remove 497 : invalid handle 0xe Now Driver will not reset target info after port enable complete and also will do Device removal when Device remove from FW. 13. Returning "CAM_SEL_TIMEOUT" instead of "CAM_TID_INVALID" error code on request to the Target IDs that have no devices conected at that moment. As if "CAM_TID_INVALID" error code is returned to the CAM Layaer then it results in a huge chain of errors in verbose kernel messages on boot and every hot-plug event. Submitted by: Sreekanth Reddy Modified: stable/9/sys/dev/mps/mpi/mpi2.h stable/9/sys/dev/mps/mpi/mpi2_cnfg.h stable/9/sys/dev/mps/mpi/mpi2_hbd.h stable/9/sys/dev/mps/mpi/mpi2_history.txt stable/9/sys/dev/mps/mpi/mpi2_init.h stable/9/sys/dev/mps/mpi/mpi2_ioc.h stable/9/sys/dev/mps/mpi/mpi2_ra.h stable/9/sys/dev/mps/mpi/mpi2_raid.h stable/9/sys/dev/mps/mpi/mpi2_sas.h stable/9/sys/dev/mps/mpi/mpi2_targ.h stable/9/sys/dev/mps/mpi/mpi2_tool.h stable/9/sys/dev/mps/mpi/mpi2_type.h stable/9/sys/dev/mps/mps.c stable/9/sys/dev/mps/mps_config.c stable/9/sys/dev/mps/mps_ioctl.h stable/9/sys/dev/mps/mps_mapping.c stable/9/sys/dev/mps/mps_mapping.h stable/9/sys/dev/mps/mps_sas.c stable/9/sys/dev/mps/mps_sas.h stable/9/sys/dev/mps/mps_sas_lsi.c stable/9/sys/dev/mps/mps_user.c stable/9/sys/dev/mps/mpsvar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mps/mpi/mpi2.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2.h Modified: stable/9/sys/dev/mps/mpi/mpi2_cnfg.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_cnfg.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_cnfg.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_cnfg.h Modified: stable/9/sys/dev/mps/mpi/mpi2_hbd.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_hbd.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_hbd.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2009-2011 LSI Corporation. + * Copyright (c) 2009-2012 LSI Corporation. * * * Name: mpi2_hbd.h Modified: stable/9/sys/dev/mps/mpi/mpi2_history.txt ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_history.txt Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_history.txt Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ Fusion-MPT MPI 2.0 Header File Change History ============================== - Copyright (c) 2000-2011 LSI Corporation. + Copyright (c) 2000-2012 LSI Corporation. --------------------------------------- Header Set Release Version: 02.00.18 Modified: stable/9/sys/dev/mps/mpi/mpi2_init.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_init.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_init.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_init.h Modified: stable/9/sys/dev/mps/mpi/mpi2_ioc.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_ioc.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_ioc.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_ioc.h Modified: stable/9/sys/dev/mps/mpi/mpi2_ra.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_ra.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_ra.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2011 LSI Corporation. + * Copyright (c) 2012 LSI Corporation. * * * Name: mpi2_ra.h Modified: stable/9/sys/dev/mps/mpi/mpi2_raid.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_raid.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_raid.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_raid.h Modified: stable/9/sys/dev/mps/mpi/mpi2_sas.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_sas.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_sas.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_sas.h Modified: stable/9/sys/dev/mps/mpi/mpi2_targ.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_targ.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_targ.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_targ.h Modified: stable/9/sys/dev/mps/mpi/mpi2_tool.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_tool.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_tool.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_tool.h Modified: stable/9/sys/dev/mps/mpi/mpi2_type.h ============================================================================== --- stable/9/sys/dev/mps/mpi/mpi2_type.h Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mpi/mpi2_type.h Sun Jul 1 05:22:45 2012 (r237876) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_type.h Modified: stable/9/sys/dev/mps/mps.c ============================================================================== --- stable/9/sys/dev/mps/mps.c Sun Jul 1 05:22:13 2012 (r237875) +++ stable/9/sys/dev/mps/mps.c Sun Jul 1 05:22:45 2012 (r237876) @@ -1,31 +1,6 @@ /*- * Copyright (c) 2009 Yahoo! Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * 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. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ -/*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -82,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -98,9 +74,9 @@ __FBSDID("$FreeBSD$"); #include #include -static int mps_diag_reset(struct mps_softc *sc); +static int mps_diag_reset(struct mps_softc *sc, int sleep_flag); static int mps_init_queues(struct mps_softc *sc); -static int mps_message_unit_reset(struct mps_softc *sc); +static int mps_message_unit_reset(struct mps_softc *sc, int sleep_flag); static int mps_transition_operational(struct mps_softc *sc); static void mps_startup(void *arg); static int mps_send_iocinit(struct mps_softc *sc); @@ -112,7 +88,7 @@ static void mps_config_complete(struct m static void mps_periodic(void *); static int mps_reregister_events(struct mps_softc *sc); static void mps_enqueue_request(struct mps_softc *sc, struct mps_command *cm); - +static int mps_wait_db_ack(struct mps_softc *sc, int timeout, int sleep_flag); SYSCTL_NODE(_hw, OID_AUTO, mps, CTLFLAG_RD, 0, "MPS Driver Parameters"); MALLOC_DEFINE(M_MPT2, "mps", "mpt2 driver memory"); @@ -123,8 +99,32 @@ MALLOC_DEFINE(M_MPT2, "mps", "mpt2 drive */ static char mpt2_reset_magic[] = { 0x00, 0x0f, 0x04, 0x0b, 0x02, 0x07, 0x0d }; +/* Added this union to smoothly convert le64toh cm->cm_desc.Words. + * Compiler only support unint64_t to be passed as argument. + * Otherwise it will through below error + * "aggregate value used where an integer was expected" + */ + +typedef union _reply_descriptor { + u64 word; + struct { + u32 low; + u32 high; + } u; +}reply_descriptor,address_descriptor; + +/* + * sleep_flag can be either CAN_SLEEP or NO_SLEEP. + * If this function is called from process context, it can sleep + * and there is no harm to sleep, in case if this fuction is called + * from Interrupt handler, we can not sleep and need NO_SLEEP flag set. + * based on sleep flags driver will call either msleep, pause or DELAY. + * msleep and pause are of same variant, but pause is used when mps_mtx + * is not hold by driver. + * + */ static int -mps_diag_reset(struct mps_softc *sc) +mps_diag_reset(struct mps_softc *sc,int sleep_flag) { uint32_t reg; int i, error, tries = 0; @@ -134,14 +134,25 @@ mps_diag_reset(struct mps_softc *sc) /* Clear any pending interrupts */ mps_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); + /*Force NO_SLEEP for threads prohibited to sleep + * e.a Thread from interrupt handler are prohibited to sleep. + */ + if(curthread->td_pflags & TDP_NOSLEEPING) + sleep_flag = NO_SLEEP; + /* Push the magic sequence */ error = ETIMEDOUT; while (tries++ < 20) { for (i = 0; i < sizeof(mpt2_reset_magic); i++) mps_regwrite(sc, MPI2_WRITE_SEQUENCE_OFFSET, mpt2_reset_magic[i]); - - DELAY(100 * 1000); + /* wait 100 msec */ + if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, "mpsdiag", hz/10); + else if (sleep_flag == CAN_SLEEP) + pause("mpsdiag", hz/10); + else + DELAY(100 * 1000); reg = mps_regread(sc, MPI2_HOST_DIAGNOSTIC_OFFSET); if (reg & MPI2_DIAG_DIAG_WRITE_ENABLE) { @@ -159,7 +170,13 @@ mps_diag_reset(struct mps_softc *sc) /* Wait up to 300 seconds in 50ms intervals */ error = ETIMEDOUT; for (i = 0; i < 60000; i++) { - DELAY(50000); + /* wait 50 msec */ + if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, "mpsdiag", hz/20); + else if (sleep_flag == CAN_SLEEP) + pause("mpsdiag", hz/20); + else + DELAY(50 * 1000); reg = mps_regread(sc, MPI2_DOORBELL_OFFSET); if ((reg & MPI2_IOC_STATE_MASK) != MPI2_IOC_STATE_RESET) { error = 0; @@ -175,7 +192,7 @@ mps_diag_reset(struct mps_softc *sc) } static int -mps_message_unit_reset(struct mps_softc *sc) +mps_message_unit_reset(struct mps_softc *sc, int sleep_flag) { mps_dprint(sc, MPS_TRACE, "%s\n", __func__); @@ -183,7 +200,12 @@ mps_message_unit_reset(struct mps_softc mps_regwrite(sc, MPI2_DOORBELL_OFFSET, MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET << MPI2_DOORBELL_FUNCTION_SHIFT); - DELAY(50000); + + if (mps_wait_db_ack(sc, 5, sleep_flag) != 0) { + mps_dprint(sc, MPS_FAULT, "Doorbell handshake failed : <%s>\n", + __func__); + return (ETIMEDOUT); + } return (0); } @@ -193,9 +215,12 @@ mps_transition_ready(struct mps_softc *s { uint32_t reg, state; int error, tries = 0; + int sleep_flags; mps_dprint(sc, MPS_TRACE, "%s\n", __func__); - + /* If we are in attach call, do not sleep */ + sleep_flags = (sc->mps_flags & MPS_FLAGS_ATTACH_DONE) + ? CAN_SLEEP:NO_SLEEP; error = 0; while (tries++ < 5) { reg = mps_regread(sc, MPI2_DOORBELL_OFFSET); @@ -206,7 +231,7 @@ mps_transition_ready(struct mps_softc *s * resetting it. */ if (reg & MPI2_DOORBELL_USED) { - mps_diag_reset(sc); + mps_diag_reset(sc, sleep_flags); DELAY(50000); continue; } @@ -227,10 +252,10 @@ mps_transition_ready(struct mps_softc *s } else if (state == MPI2_IOC_STATE_FAULT) { mps_dprint(sc, MPS_INFO, "IOC in fault state 0x%x\n", state & MPI2_DOORBELL_FAULT_CODE_MASK); - mps_diag_reset(sc); + mps_diag_reset(sc, sleep_flags); } else if (state == MPI2_IOC_STATE_OPERATIONAL) { /* Need to take ownership */ - mps_message_unit_reset(sc); + mps_message_unit_reset(sc, sleep_flags); } else if (state == MPI2_IOC_STATE_RESET) { /* Wait a bit, IOC might be in transition */ mps_dprint(sc, MPS_FAULT, @@ -310,7 +335,7 @@ mps_reinit(struct mps_softc *sc) mps_printf(sc, "%s mask interrupts\n", __func__); mps_mask_intr(sc); - error = mps_diag_reset(sc); + error = mps_diag_reset(sc, CAN_SLEEP); if (error != 0) { panic("%s hard reset failed with error %d\n", __func__, error); @@ -368,19 +393,56 @@ mps_reinit(struct mps_softc *sc) return 0; } -/* Wait for the chip to ACK a word that we've put into its FIFO */ +/* Wait for the chip to ACK a word that we've put into its FIFO + * Wait for seconds. In single loop wait for busy loop + * for 500 microseconds. + * Total is [ 0.5 * (2000 * ) ] in miliseconds. + * */ static int -mps_wait_db_ack(struct mps_softc *sc) +mps_wait_db_ack(struct mps_softc *sc, int timeout, int sleep_flag) { - int retry; - for (retry = 0; retry < MPS_DB_MAX_WAIT; retry++) { - if ((mps_regread(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET) & - MPI2_HIS_SYS2IOC_DB_STATUS) == 0) - return (0); - DELAY(2000); - } + u32 cntdn, count; + u32 int_status; + u32 doorbell; + + count = 0; + cntdn = (sleep_flag == CAN_SLEEP) ? 1000*timeout : 2000*timeout; + do { + int_status = mps_regread(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET); + if (!(int_status & MPI2_HIS_SYS2IOC_DB_STATUS)) { + mps_dprint(sc, MPS_INFO, + "%s: successfull count(%d), timeout(%d)\n", + __func__, count, timeout); + return 0; + } else if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) { + doorbell = mps_regread(sc, MPI2_DOORBELL_OFFSET); + if ((doorbell & MPI2_IOC_STATE_MASK) == + MPI2_IOC_STATE_FAULT) { + mps_dprint(sc, MPS_FAULT, + "fault_state(0x%04x)!\n", doorbell); + return (EFAULT); + } + } else if (int_status == 0xFFFFFFFF) + goto out; + + /* If it can sleep, sleep for 1 milisecond, else busy loop for + * 0.5 milisecond */ + if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, + "mpsdba", hz/1000); + else if (sleep_flag == CAN_SLEEP) + pause("mpsdba", hz/1000); + else + DELAY(500); + count++; + } while (--cntdn); + + out: + mps_dprint(sc, MPS_FAULT, "%s: failed due to timeout count(%d), " + "int_status(%x)!\n", __func__, count, int_status); return (ETIMEDOUT); + } /* Wait for the chip to signal that the next word in its FIFO can be fetched */ @@ -406,6 +468,10 @@ mps_request_sync(struct mps_softc *sc, v uint32_t *data32; uint16_t *data16; int i, count, ioc_sz, residual; + int sleep_flags = CAN_SLEEP; + + if(curthread->td_pflags & TDP_NOSLEEPING) + sleep_flags = NO_SLEEP; /* Step 1 */ mps_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); @@ -430,7 +496,7 @@ mps_request_sync(struct mps_softc *sc, v return (ENXIO); } mps_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); - if (mps_wait_db_ack(sc) != 0) { + if (mps_wait_db_ack(sc, 5, sleep_flags) != 0) { mps_dprint(sc, MPS_FAULT, "Doorbell handshake failed\n"); return (ENXIO); } @@ -439,8 +505,8 @@ mps_request_sync(struct mps_softc *sc, v /* Clock out the message data synchronously in 32-bit dwords*/ data32 = (uint32_t *)req; for (i = 0; i < count; i++) { - mps_regwrite(sc, MPI2_DOORBELL_OFFSET, data32[i]); - if (mps_wait_db_ack(sc) != 0) { + mps_regwrite(sc, MPI2_DOORBELL_OFFSET, htole32(data32[i])); + if (mps_wait_db_ack(sc, 5, sleep_flags) != 0) { mps_dprint(sc, MPS_FAULT, "Timeout while writing doorbell\n"); return (ENXIO); @@ -525,7 +591,7 @@ mps_request_sync(struct mps_softc *sc, v static void mps_enqueue_request(struct mps_softc *sc, struct mps_command *cm) { - + reply_descriptor rd; mps_dprint(sc, MPS_TRACE, "%s SMID %u cm %p ccb %p\n", __func__, cm->cm_desc.Default.SMID, cm, cm->cm_ccb); @@ -534,11 +600,14 @@ mps_enqueue_request(struct mps_softc *sc if (++sc->io_cmds_active > sc->io_cmds_highwater) sc->io_cmds_highwater++; - + rd.u.low = cm->cm_desc.Words.Low; + rd.u.high = cm->cm_desc.Words.High; + rd.word = htole64(rd.word); + /* TODO-We may need to make below regwrite atomic */ mps_regwrite(sc, MPI2_REQUEST_DESCRIPTOR_POST_LOW_OFFSET, - cm->cm_desc.Words.Low); + rd.u.low); mps_regwrite(sc, MPI2_REQUEST_DESCRIPTOR_POST_HIGH_OFFSET, - cm->cm_desc.Words.High); + rd.u.high); } /* @@ -622,21 +691,21 @@ mps_send_iocinit(struct mps_softc *sc) */ init.Function = MPI2_FUNCTION_IOC_INIT; init.WhoInit = MPI2_WHOINIT_HOST_DRIVER; - init.MsgVersion = MPI2_VERSION; - init.HeaderVersion = MPI2_HEADER_VERSION; - init.SystemRequestFrameSize = sc->facts->IOCRequestFrameSize; - init.ReplyDescriptorPostQueueDepth = sc->pqdepth; - init.ReplyFreeQueueDepth = sc->fqdepth; + init.MsgVersion = htole16(MPI2_VERSION); + init.HeaderVersion = htole16(MPI2_HEADER_VERSION); + init.SystemRequestFrameSize = htole16(sc->facts->IOCRequestFrameSize); + init.ReplyDescriptorPostQueueDepth = htole16(sc->pqdepth); + init.ReplyFreeQueueDepth = htole16(sc->fqdepth); init.SenseBufferAddressHigh = 0; init.SystemReplyAddressHigh = 0; init.SystemRequestFrameBaseAddress.High = 0; - init.SystemRequestFrameBaseAddress.Low = (uint32_t)sc->req_busaddr; + init.SystemRequestFrameBaseAddress.Low = htole32((uint32_t)sc->req_busaddr); init.ReplyDescriptorPostQueueAddress.High = 0; - init.ReplyDescriptorPostQueueAddress.Low = (uint32_t)sc->post_busaddr; + init.ReplyDescriptorPostQueueAddress.Low = htole32((uint32_t)sc->post_busaddr); init.ReplyFreeQueueAddress.High = 0; - init.ReplyFreeQueueAddress.Low = (uint32_t)sc->free_busaddr; + init.ReplyFreeQueueAddress.Low = htole32((uint32_t)sc->free_busaddr); init.TimeStamp.High = 0; - init.TimeStamp.Low = (uint32_t)time_uptime; + init.TimeStamp.Low = htole32((uint32_t)time_uptime); error = mps_request_sync(sc, &init, &reply, req_sz, reply_sz, 5); if ((reply.IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) @@ -830,6 +899,12 @@ mps_alloc_requests(struct mps_softc *sc) sc->chains = malloc(sizeof(struct mps_chain) * sc->max_chains, M_MPT2, M_WAITOK | M_ZERO); + if(!sc->chains) { + device_printf(sc->mps_dev, + "Cannot allocate chains memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } for (i = 0; i < sc->max_chains; i++) { chain = &sc->chains[i]; chain->chain = (MPI2_SGE_IO_UNION *)(sc->chain_frames + @@ -864,6 +939,11 @@ mps_alloc_requests(struct mps_softc *sc) */ sc->commands = malloc(sizeof(struct mps_command) * sc->num_reqs, M_MPT2, M_WAITOK | M_ZERO); + if(!sc->commands) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } for (i = 1; i < sc->num_reqs; i++) { cm = &sc->commands[i]; cm->cm_req = sc->req_frames + @@ -1056,6 +1136,11 @@ mps_attach(struct mps_softc *sc) sc->facts = malloc(sizeof(MPI2_IOC_FACTS_REPLY), M_MPT2, M_ZERO|M_NOWAIT); + if(!sc->facts) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } if ((error = mps_get_iocfacts(sc, sc->facts)) != 0) return (error); @@ -1083,7 +1168,7 @@ mps_attach(struct mps_softc *sc) */ if ((sc->facts->IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY) == 0) { - mps_diag_reset(sc); + mps_diag_reset(sc, NO_SLEEP); if ((error = mps_transition_ready(sc)) != 0) return (error); } @@ -1163,6 +1248,11 @@ mps_attach(struct mps_softc *sc) sc->pfacts = malloc(sizeof(MPI2_PORT_FACTS_REPLY) * sc->facts->NumberOfPorts, M_MPT2, M_ZERO|M_WAITOK); + if(!sc->pfacts) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } for (i = 0; i < sc->facts->NumberOfPorts; i++) { if ((error = mps_get_portfacts(sc, &sc->pfacts[i], i)) != 0) { mps_printf(sc, "%s failed to get portfacts for port %d\n", @@ -1293,7 +1383,7 @@ mps_log_evt_handler(struct mps_softc *sc static int mps_attach_log(struct mps_softc *sc) { - uint8_t events[16]; + u32 events[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS]; bzero(events, 16); setbit(events, MPI2_EVENT_LOG_DATA); @@ -1441,6 +1531,64 @@ mps_complete_command(struct mps_command } } + +static void +mps_sas_log_info(struct mps_softc *sc , u32 log_info) +{ + union loginfo_type { + u32 loginfo; + struct { + u32 subcode:16; + u32 code:8; + u32 originator:4; + u32 bus_type:4; + } dw; + }; + union loginfo_type sas_loginfo; + char *originator_str = NULL; + + sas_loginfo.loginfo = log_info; + if (sas_loginfo.dw.bus_type != 3 /*SAS*/) + return; + + /* each nexus loss loginfo */ + if (log_info == 0x31170000) + return; + + /* eat the loginfos associated with task aborts */ + if ((log_info == 30050000 || log_info == + 0x31140000 || log_info == 0x31130000)) + return; + + switch (sas_loginfo.dw.originator) { + case 0: + originator_str = "IOP"; + break; + case 1: + originator_str = "PL"; + break; + case 2: + originator_str = "IR"; + break; +} + + mps_dprint(sc, MPS_INFO, "log_info(0x%08x): originator(%s), " + "code(0x%02x), sub_code(0x%04x)\n", log_info, + originator_str, sas_loginfo.dw.code, + sas_loginfo.dw.subcode); +} + +static void +mps_display_reply_info(struct mps_softc *sc, uint8_t *reply) +{ + MPI2DefaultReply_t *mpi_reply; + u16 sc_status; + + mpi_reply = (MPI2DefaultReply_t*)reply; + sc_status = le16toh(mpi_reply->IOCStatus); + if (sc_status & MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) + mps_sas_log_info(sc, le32toh(mpi_reply->IOCLogInfo)); +} void mps_intr(void *data) { @@ -1508,7 +1656,7 @@ mps_intr_locked(void *data) flags = desc->Default.ReplyFlags & MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK; if ((flags == MPI2_RPY_DESCRIPT_FLAGS_UNUSED) - || (desc->Words.High == 0xffffffff)) + || (le32toh(desc->Words.High) == 0xffffffff)) break; /* increment the replypostindex now, so that event handlers @@ -1523,7 +1671,7 @@ mps_intr_locked(void *data) switch (flags) { case MPI2_RPY_DESCRIPT_FLAGS_SCSI_IO_SUCCESS: - cm = &sc->commands[desc->SCSIIOSuccess.SMID]; + cm = &sc->commands[le16toh(desc->SCSIIOSuccess.SMID)]; cm->cm_reply = NULL; break; case MPI2_RPY_DESCRIPT_FLAGS_ADDRESS_REPLY: @@ -1559,9 +1707,10 @@ mps_intr_locked(void *data) sc->reply_frames, sc->fqdepth, sc->facts->ReplyFrameSize * 4); printf("%s: baddr %#x,\n", __func__, baddr); + /* LSI-TODO. See Linux Code. Need Gracefull exit*/ panic("Reply address out of range"); } - if (desc->AddressReply.SMID == 0) { + if (le16toh(desc->AddressReply.SMID) == 0) { if (((MPI2_DEFAULT_REPLY *)reply)->Function == MPI2_FUNCTION_DIAG_BUFFER_POST) { /* @@ -1573,7 +1722,7 @@ mps_intr_locked(void *data) */ rel_rep = (MPI2_DIAG_RELEASE_REPLY *)reply; - if (rel_rep->IOCStatus == + if (le16toh(rel_rep->IOCStatus) == MPI2_IOCSTATUS_DIAGNOSTIC_RELEASED) { pBuffer = @@ -1589,10 +1738,10 @@ mps_intr_locked(void *data) (MPI2_EVENT_NOTIFICATION_REPLY *) reply); } else { - cm = &sc->commands[desc->AddressReply.SMID]; + cm = &sc->commands[le16toh(desc->AddressReply.SMID)]; cm->cm_reply = reply; cm->cm_reply_data = - desc->AddressReply.ReplyFrameAddress; + le32toh(desc->AddressReply.ReplyFrameAddress); } break; } @@ -1606,9 +1755,14 @@ mps_intr_locked(void *data) cm = NULL; break; } + - if (cm != NULL) + if (cm != NULL) { + // Print Error reply frame + if (cm->cm_reply) + mps_display_reply_info(sc,cm->cm_reply); mps_complete_command(cm); + } desc->Words.Low = 0xffffffff; desc->Words.High = 0xffffffff; @@ -1631,7 +1785,7 @@ mps_dispatch_event(struct mps_softc *sc, struct mps_event_handle *eh; int event, handled = 0; - event = reply->Event; + event = le16toh(reply->Event); TAILQ_FOREACH(eh, &sc->event_list, eh_list) { if (isset(eh->mask, event)) { eh->callback(sc, data, reply); @@ -1640,7 +1794,7 @@ mps_dispatch_event(struct mps_softc *sc, } if (handled == 0) - device_printf(sc->mps_dev, "Unhandled event 0x%x\n", event); + device_printf(sc->mps_dev, "Unhandled event 0x%x\n", le16toh(event)); /* * This is the only place that the event/reply should be freed. @@ -1671,13 +1825,18 @@ mps_reregister_events_complete(struct mp * suitable for the controller. */ int -mps_register_events(struct mps_softc *sc, uint8_t *mask, +mps_register_events(struct mps_softc *sc, u32 *mask, mps_evt_callback_t *cb, void *data, struct mps_event_handle **handle) { struct mps_event_handle *eh; int error = 0; eh = malloc(sizeof(struct mps_event_handle), M_MPT2, M_WAITOK|M_ZERO); + if(!eh) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } eh->callback = cb; eh->data = data; TAILQ_INSERT_TAIL(&sc->event_list, eh, eh_list); @@ -1690,24 +1849,25 @@ mps_register_events(struct mps_softc *sc int mps_update_events(struct mps_softc *sc, struct mps_event_handle *handle, - uint8_t *mask) + u32 *mask) { MPI2_EVENT_NOTIFICATION_REQUEST *evtreq; MPI2_EVENT_NOTIFICATION_REPLY *reply; struct mps_command *cm; - struct mps_event_handle *eh; int error, i; mps_dprint(sc, MPS_TRACE, "%s\n", __func__); if ((mask != NULL) && (handle != NULL)) - bcopy(mask, &handle->mask[0], 16); - memset(sc->event_mask, 0xff, 16); + bcopy(mask, &handle->mask[0], sizeof(u32) * + MPI2_EVENT_NOTIFY_EVENTMASK_WORDS); + + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + sc->event_mask[i] = -1; + + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + sc->event_mask[i] &= ~handle->mask[i]; - TAILQ_FOREACH(eh, &sc->event_list, eh_list) { - for (i = 0; i < 16; i++) - sc->event_mask[i] &= ~eh->mask[i]; - } if ((cm = mps_alloc_command(sc)) == NULL) return (EBUSY); @@ -1719,10 +1879,13 @@ mps_update_events(struct mps_softc *sc, { u_char fullmask[16]; memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + bcopy(fullmask, &evtreq->EventMasks[0], sizeof(u32) * + MPI2_EVENT_NOTIFY_EVENTMASK_WORDS); } #else - bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + evtreq->EventMasks[i] = + htole32(sc->event_mask[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -1751,10 +1914,11 @@ mps_reregister_events(struct mps_softc * /* first, reregister events */ - memset(sc->event_mask, 0xff, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + sc->event_mask[i] = -1; TAILQ_FOREACH(eh, &sc->event_list, eh_list) { - for (i = 0; i < 16; i++) + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) sc->event_mask[i] &= ~eh->mask[i]; } @@ -1768,10 +1932,13 @@ mps_reregister_events(struct mps_softc * { u_char fullmask[16]; memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + bcopy(fullmask, &evtreq->EventMasks[0], sizeof(u32) * + MPI2_EVENT_NOTIFY_EVENTMASK_WORDS); } #else - bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + evtreq->EventMasks[i] = + htole32(sc->event_mask[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -1783,13 +1950,12 @@ mps_reregister_events(struct mps_softc * return (error); } -int +void mps_deregister_events(struct mps_softc *sc, struct mps_event_handle *handle) { TAILQ_REMOVE(&sc->event_list, handle, eh_list); free(handle, M_MPT2); - return (mps_update_events(sc, NULL, NULL)); } /* @@ -1819,10 +1985,16 @@ mps_add_chain(struct mps_command *cm) TAILQ_INSERT_TAIL(&cm->cm_chain_list, chain, chain_link); sgc = (MPI2_SGE_CHAIN32 *)&cm->cm_sge->MpiChain; - sgc->Length = space; + sgc->Length = htole16(space); sgc->NextChainOffset = 0; + /* TODO Looks like bug in Setting sgc->Flags. + * sgc->Flags = ( MPI2_SGE_FLAGS_CHAIN_ELEMENT | MPI2_SGE_FLAGS_64_BIT_ADDRESSING | + * MPI2_SGE_FLAGS_SYSTEM_ADDRESS) << MPI2_SGE_FLAGS_SHIFT + * This is fine.. because we are not using simple element. In case of + * MPI2_SGE_CHAIN32, we have seperate Length and Flags feild. + */ sgc->Flags = MPI2_SGE_FLAGS_CHAIN_ELEMENT; - sgc->Address = chain->chain_busaddr; + sgc->Address = htole32(chain->chain_busaddr); cm->cm_sge = (MPI2_SGE_IO_UNION *)&chain->chain->MpiSimple; cm->cm_sglsize = space; @@ -1842,6 +2014,7 @@ mps_push_sge(struct mps_command *cm, voi MPI2_SGE_SIMPLE64 *sge = sgep; int error, type; uint32_t saved_buf_len, saved_address_low, saved_address_high; + u32 sge_flags; type = (tc->Flags & MPI2_SGE_FLAGS_ELEMENT_MASK); @@ -1910,6 +2083,11 @@ mps_push_sge(struct mps_command *cm, voi * understanding the code. */ cm->cm_sglsize -= len; + /* Endian Safe code */ + sge_flags = sge->FlagsLength; + sge->FlagsLength = htole32(sge_flags); + sge->Address.High = htole32(sge->Address.High); + sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); return (mps_add_chain(cm)); @@ -1960,6 +2138,11 @@ mps_push_sge(struct mps_command *cm, voi MPI2_SGE_FLAGS_64_BIT_ADDRESSING) << MPI2_SGE_FLAGS_SHIFT); cm->cm_sglsize -= len; + /* Endian Safe code */ + sge_flags = sge->FlagsLength; + sge->FlagsLength = htole32(sge_flags); + sge->Address.High = htole32(sge->Address.High); + sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); @@ -1985,6 +2168,11 @@ mps_push_sge(struct mps_command *cm, voi } cm->cm_sglsize -= len; + /* Endian Safe code */ + sge_flags = sge->FlagsLength; + sge->FlagsLength = htole32(sge_flags); + sge->Address.High = htole32(sge->Address.High); + sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); return (0); @@ -2004,6 +2192,7 @@ mps_add_dmaseg(struct mps_command *cm, v */ flags |= MPI2_SGE_FLAGS_SIMPLE_ELEMENT | MPI2_SGE_FLAGS_64_BIT_ADDRESSING; + /* Set Endian safe macro in mps_push_sge */ sge.FlagsLength = len | (flags << MPI2_SGE_FLAGS_SHIFT); mps_from_u64(pa, &sge.Address); @@ -2114,11 +2303,11 @@ mps_map_command(struct mps_softc *sc, st /* Add a zero-length element as needed */ if (cm->cm_sge != NULL) { sge = (MPI2_SGE_SIMPLE32 *)cm->cm_sge; - sge->FlagsLength = (MPI2_SGE_FLAGS_LAST_ELEMENT | + sge->FlagsLength = htole32((MPI2_SGE_FLAGS_LAST_ELEMENT | MPI2_SGE_FLAGS_END_OF_BUFFER | MPI2_SGE_FLAGS_END_OF_LIST | MPI2_SGE_FLAGS_SIMPLE_ELEMENT) << - MPI2_SGE_FLAGS_SHIFT; + MPI2_SGE_FLAGS_SHIFT); sge->Address = 0; } mps_enqueue_request(sc, cm); @@ -2135,9 +2324,12 @@ mps_map_command(struct mps_softc *sc, st int *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 05:41:03 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17B5D1065672; Sun, 1 Jul 2012 05:39:50 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0227A8FC1A; Sun, 1 Jul 2012 05:39:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q615dnTc068581; Sun, 1 Jul 2012 05:39:49 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q615dnVS068579; Sun, 1 Jul 2012 05:39:49 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207010539.q615dnVS068579@svn.freebsd.org> From: "Kenneth D. Merry" Date: Sun, 1 Jul 2012 05:39:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237879 - stable/9/sys/cam X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 05:41:03 -0000 Author: ken Date: Sun Jul 1 05:39:49 2012 New Revision: 237879 URL: http://svn.freebsd.org/changeset/base/237879 Log: MFC 237682: r237682 | ken | 2012-06-27 21:36:13 -0600 (Wed, 27 Jun 2012) | 6 lines Fix a typo in a panic() call. PR: kern/169497 Submitted by: Steven Hartland Modified: stable/9/sys/cam/cam_periph.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_periph.c ============================================================================== --- stable/9/sys/cam/cam_periph.c Sun Jul 1 05:32:26 2012 (r237878) +++ stable/9/sys/cam/cam_periph.c Sun Jul 1 05:39:49 2012 (r237879) @@ -273,7 +273,7 @@ failure: /* No cleanup to perform. */ break; default: - panic("cam_periph_alloc: Unkown init level"); + panic("%s: Unknown init level", __func__); } return(status); } From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 06:41:39 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5147106564A; Sun, 1 Jul 2012 06:41:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFBF78FC0A; Sun, 1 Jul 2012 06:41:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q616fdwW071242; Sun, 1 Jul 2012 06:41:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q616fdjG071240; Sun, 1 Jul 2012 06:41:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207010641.q616fdjG071240@svn.freebsd.org> From: Alexander Motin Date: Sun, 1 Jul 2012 06:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237882 - stable/9/sys/dev/drm2 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 06:41:40 -0000 Author: mav Date: Sun Jul 1 06:41:39 2012 New Revision: 237882 URL: http://svn.freebsd.org/changeset/base/237882 Log: MFC r237718: Fix millisecond to ticks conversion in drm_msleep(). On systems with HZ=100 it caused Intel eDP video output initialization (and Xorg startup) to take several minutes instead of several seconds. Reviewed by: kib Modified: stable/9/sys/dev/drm2/drmP.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drmP.h ============================================================================== --- stable/9/sys/dev/drm2/drmP.h Sun Jul 1 06:34:17 2012 (r237881) +++ stable/9/sys/dev/drm2/drmP.h Sun Jul 1 06:41:39 2012 (r237882) @@ -250,7 +250,7 @@ enum { #define msecs_to_jiffies(x) (((int64_t)(x)) * hz / 1000) #define time_after(a,b) ((long)(b) - (long)(a) < 0) #define time_after_eq(a,b) ((long)(b) - (long)(a) <= 0) -#define drm_msleep(x, msg) pause((msg), ((int64_t)(x)) * 1000 / hz) +#define drm_msleep(x, msg) pause((msg), ((int64_t)(x)) * hz / 1000) typedef vm_paddr_t dma_addr_t; typedef uint64_t u64; From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 07:28:15 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B09B210657F1; Sun, 1 Jul 2012 07:28:15 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97E748FC1B; Sun, 1 Jul 2012 07:28:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617SF5b073250; Sun, 1 Jul 2012 07:28:15 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617SFd9073239; Sun, 1 Jul 2012 07:28:15 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010728.q617SFd9073239@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237884 - in stable/9/sys: netinet netinet6 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:28:15 -0000 Author: tuexen Date: Sun Jul 1 07:28:15 2012 New Revision: 237884 URL: http://svn.freebsd.org/changeset/base/237884 Log: MFC r235360: Provide in the association change notification the received ABORT chunk if case of SCTP_COMM_LOST or SCTP_CANT_STR_ASSOC as required by RFC 6458. Modified: stable/9/sys/netinet/sctp_asconf.c stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet/sctp_pcb.c stable/9/sys/netinet/sctp_timer.c stable/9/sys/netinet/sctp_usrreq.c stable/9/sys/netinet/sctputil.c stable/9/sys/netinet/sctputil.h stable/9/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 07:28:15 2012 (r237884) @@ -1789,8 +1789,7 @@ sctp_handle_asconf_ack(struct mbuf *m, i */ if (serial_num == (asoc->asconf_seq_out + 1)) { SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf_ack: got unexpected next serial number! Aborting asoc!\n"); - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_CAUSE_ILLEGAL_ASCONF_ACK, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, NULL, SCTP_SO_NOT_LOCKED); *abort_no_unlock = 1; return; } Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:28:15 2012 (r237884) @@ -607,9 +607,7 @@ protocol_error: *ippp = ((control->sinfo_stream << 16) | control->sinfo_ssn); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_1; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -892,8 +890,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_2; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if (asoc->fragmented_delivery_inprogress && (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) == SCTP_DATA_FIRST_FRAG) { @@ -924,8 +921,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_3; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if (asoc->fragmented_delivery_inprogress) { /* @@ -961,8 +957,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_4; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if ((asoc->fragment_flags & SCTP_DATA_UNORDERED) != SCTP_DATA_UNORDERED && @@ -995,8 +990,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_5; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } } @@ -1090,8 +1084,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_6; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1127,9 +1120,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_7; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1166,9 +1157,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_8; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1202,9 +1191,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_9; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1247,9 +1234,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_10; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1289,9 +1274,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_11; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1328,9 +1311,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_12; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1367,9 +1348,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_13; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1531,7 +1510,7 @@ sctp_process_a_data_chunk(struct sctp_tc struct mbuf *op_err; op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC); - sctp_abort_an_association(stcb->sctp_ep, stcb, 0, op_err, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -1678,8 +1657,7 @@ sctp_process_a_data_chunk(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_14; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -1942,9 +1920,7 @@ failed_pdapi_express_del: *ippp = ((strmno << 16) | strmseq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } else { @@ -1980,9 +1956,7 @@ failed_pdapi_express_del: *ippp = ((strmno << 16) | strmseq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -2027,9 +2001,7 @@ failed_pdapi_express_del: *ippp = ((strmno << 16) | strmseq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -3878,7 +3850,7 @@ sctp_express_handle_sack(struct sctp_tcb *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); return; #endif } @@ -4240,7 +4212,7 @@ again: *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_24); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_RESPONSE_TO_USER_REQ, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); } else { struct sctp_nets *netp; @@ -4463,7 +4435,7 @@ sctp_handle_sack(struct mbuf *m, int off *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); return; } } @@ -4966,7 +4938,7 @@ sctp_handle_sack(struct mbuf *m, int off *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_31); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_31; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_RESPONSE_TO_USER_REQ, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); return; } else { struct sctp_nets *netp; @@ -5421,8 +5393,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *ippp = new_cum_tsn; } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_33; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); return; } SCTP_STAT_INCR(sctps_fwdtsn_map_over); Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:28:15 2012 (r237884) @@ -428,7 +428,7 @@ sctp_process_init_ack(struct mbuf *m, in &abort_flag, (struct sctp_chunkhdr *)cp, &nat_friendly); if (abort_flag) { /* Send an abort and notify peer */ - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_CAUSE_PROTOCOL_VIOLATION, op_err, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_no_unlock = 1; return (-1); } @@ -739,7 +739,7 @@ sctp_handle_nat_missing_state(struct sct static void -sctp_handle_abort(struct sctp_abort_chunk *cp, +sctp_handle_abort(struct sctp_abort_chunk *abort, struct sctp_tcb *stcb, struct sctp_nets *net) { #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -747,43 +747,42 @@ sctp_handle_abort(struct sctp_abort_chun #endif uint16_t len; + uint16_t error; SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_abort: handling ABORT\n"); if (stcb == NULL) return; - len = ntohs(cp->ch.chunk_length); + len = ntohs(abort->ch.chunk_length); if (len > sizeof(struct sctp_chunkhdr)) { /* * Need to check the cause codes for our two magic nat * aborts which don't kill the assoc necessarily. */ - struct sctp_abort_chunk *cpnext; struct sctp_missing_nat_state *natc; - uint16_t cause; - cpnext = cp; - cpnext++; - natc = (struct sctp_missing_nat_state *)cpnext; - cause = ntohs(natc->cause); - if (cause == SCTP_CAUSE_NAT_COLLIDING_STATE) { + natc = (struct sctp_missing_nat_state *)(abort + 1); + error = ntohs(natc->cause); + if (error == SCTP_CAUSE_NAT_COLLIDING_STATE) { SCTPDBG(SCTP_DEBUG_INPUT2, "Received Colliding state abort flags:%x\n", - cp->ch.chunk_flags); + abort->ch.chunk_flags); if (sctp_handle_nat_colliding_state(stcb)) { return; } - } else if (cause == SCTP_CAUSE_NAT_MISSING_STATE) { + } else if (error == SCTP_CAUSE_NAT_MISSING_STATE) { SCTPDBG(SCTP_DEBUG_INPUT2, "Received missing state abort flags:%x\n", - cp->ch.chunk_flags); + abort->ch.chunk_flags); if (sctp_handle_nat_missing_state(stcb, net)) { return; } } + } else { + error = 0; } /* stop any receive timers */ sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_6); /* notify user of the abort and clean up... */ - sctp_abort_notification(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, error, abort, SCTP_SO_NOT_LOCKED); /* free the tcb */ SCTP_STAT_INCR_COUNTER32(sctps_aborted); if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || @@ -1174,7 +1173,7 @@ sctp_handle_error(struct sctp_chunkhdr * asoc->stale_cookie_count++; if (asoc->stale_cookie_count > asoc->max_init_times) { - sctp_abort_notification(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); /* now free the asoc */ #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:28:15 2012 (r237884) @@ -6573,9 +6573,7 @@ sctp_sendall_iterator(struct sctp_inpcb * dis-appearing on us. */ atomic_add_int(&stcb->asoc.refcnt, 1); - sctp_abort_an_association(inp, stcb, - SCTP_RESPONSE_TO_USER_REQ, - m, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(inp, stcb, m, SCTP_SO_NOT_LOCKED); /* * sctp_abort_an_association calls sctp_free_asoc() * free association will NOT free it since we @@ -6669,7 +6667,6 @@ sctp_sendall_iterator(struct sctp_inpcb abort_anyway: atomic_add_int(&stcb->asoc.refcnt, 1); sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_RESPONSE_TO_USER_REQ, NULL, SCTP_SO_NOT_LOCKED); atomic_add_int(&stcb->asoc.refcnt, -1); goto no_chunk_output; @@ -9504,7 +9501,7 @@ sctp_chunk_retransmission(struct sctp_in chk->snd_count, SCTP_BASE_SYSCTL(sctp_max_retran_chunk)); atomic_add_int(&stcb->asoc.refcnt, 1); - sctp_abort_an_association(stcb->sctp_ep, stcb, 0, NULL, so_locked); + sctp_abort_an_association(stcb->sctp_ep, stcb, NULL, so_locked); SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); return (SCTP_RETRAN_EXIT); @@ -13138,9 +13135,7 @@ sctp_lower_sosend(struct socket *so, atomic_add_int(&stcb->asoc.refcnt, -1); free_cnt_applied = 0; /* release this lock, otherwise we hang on ourselves */ - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_RESPONSE_TO_USER_REQ, - mm, SCTP_SO_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, mm, SCTP_SO_LOCKED); /* now relock the stcb so everything is sane */ hold_tcblock = 0; stcb = NULL; @@ -13695,7 +13690,6 @@ dataless_eof: free_cnt_applied = 0; } sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_RESPONSE_TO_USER_REQ, NULL, SCTP_SO_LOCKED); /* * now relock the stcb so everything Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 07:28:15 2012 (r237884) @@ -6347,7 +6347,7 @@ sctp_load_addresses_from_init(struct sct * abort this guy */ sctp_abort_an_association(stcb_tmp->sctp_ep, - stcb_tmp, 1, NULL, 0); + stcb_tmp, NULL, SCTP_SO_NOT_LOCKED); goto add_it_now; } SCTP_TCB_UNLOCK(stcb_tmp); @@ -6438,7 +6438,7 @@ sctp_load_addresses_from_init(struct sct * abort this guy */ sctp_abort_an_association(stcb_tmp->sctp_ep, - stcb_tmp, 1, NULL, 0); + stcb_tmp, NULL, SCTP_SO_NOT_LOCKED); goto add_it_now6; } SCTP_TCB_UNLOCK(stcb_tmp); Modified: stable/9/sys/netinet/sctp_timer.c ============================================================================== --- stable/9/sys/netinet/sctp_timer.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:28:15 2012 (r237884) @@ -167,7 +167,7 @@ sctp_threshold_management(struct sctp_in *ippp = htonl(SCTP_FROM_SCTP_TIMER + SCTP_LOC_1); } inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_1; - sctp_abort_an_association(inp, stcb, SCTP_FAILED_THRESHOLD, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(inp, stcb, oper, SCTP_SO_NOT_LOCKED); return (1); } return (0); @@ -1066,8 +1066,7 @@ sctp_cookie_timer(struct sctp_inpcb *inp *ippp = htonl(SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); } inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_4; - sctp_abort_an_association(inp, stcb, SCTP_INTERNAL_ERROR, - oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(inp, stcb, oper, SCTP_SO_NOT_LOCKED); } else { #ifdef INVARIANTS panic("Cookie timer expires in wrong state?"); Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:28:15 2012 (r237884) @@ -229,11 +229,9 @@ sctp_notify(struct sctp_inpcb *inp, struct socket *so; #endif - /* protection */ - int reason; struct icmp *icmph; - + /* protection */ if ((inp == NULL) || (stcb == NULL) || (net == NULL) || (sh == NULL) || (to == NULL)) { if (stcb) @@ -285,8 +283,7 @@ sctp_notify(struct sctp_inpcb *inp, * now is dead. In either case treat it like a OOTB abort * with no TCB */ - reason = SCTP_PEER_FAULTY; - sctp_abort_notification(stcb, reason, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); @@ -1098,7 +1095,6 @@ sctp_shutdown(struct socket *so) } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_USRREQ + SCTP_LOC_6; sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_RESPONSE_TO_USER_REQ, op_err, SCTP_SO_LOCKED); goto skip_unlock; } else { Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:28:15 2012 (r237884) @@ -1725,8 +1725,7 @@ sctp_timeout_handler(void *t) break; } SCTP_STAT_INCR(sctps_timoshutdownguard); - sctp_abort_an_association(inp, stcb, - SCTP_SHUTDOWN_GUARD_EXPIRES, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(inp, stcb, NULL, SCTP_SO_NOT_LOCKED); /* no need to unlock on tcb its gone */ goto out_decr; @@ -2593,7 +2592,7 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa static void sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, - uint16_t error, int so_locked + uint16_t error, struct sctp_abort_chunk *abort, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -2602,7 +2601,7 @@ sctp_notify_assoc_change(uint16_t state, struct mbuf *m_notify; struct sctp_assoc_change *sac; struct sctp_queued_to_read *control; - size_t len; + size_t notif_len, abort_len; unsigned int i; #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -2652,16 +2651,27 @@ sctp_notify_assoc_change(uint16_t state, /* event not enabled */ return; } - len = sizeof(struct sctp_assoc_change); + notif_len = sizeof(struct sctp_assoc_change); + if (abort != NULL) { + abort_len = htons(abort->ch.chunk_length); + } else { + abort_len = 0; + } if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { - len += SCTP_ASSOC_SUPPORTS_MAX; + notif_len += SCTP_ASSOC_SUPPORTS_MAX; + } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { + notif_len += abort_len; } - m_notify = sctp_get_mbuf_for_msg(len, 0, M_DONTWAIT, 1, MT_DATA); - if (m_notify == NULL) - /* no space left */ - return; - SCTP_BUF_LEN(m_notify) = 0; - + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + /* Retry with smaller value. */ + notif_len = sizeof(struct sctp_assoc_change); + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + return; + } + } + SCTP_BUF_NEXT(m_notify) = NULL; sac = mtod(m_notify, struct sctp_assoc_change *); sac->sac_type = SCTP_ASSOC_CHANGE; sac->sac_flags = 0; @@ -2672,25 +2682,29 @@ sctp_notify_assoc_change(uint16_t state, sac->sac_outbound_streams = stcb->asoc.streamoutcnt; sac->sac_inbound_streams = stcb->asoc.streamincnt; sac->sac_assoc_id = sctp_get_associd(stcb); - if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { - i = 0; - if (stcb->asoc.peer_supports_prsctp) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; - } - if (stcb->asoc.peer_supports_auth) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; + if (notif_len > sizeof(struct sctp_assoc_change)) { + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + i = 0; + if (stcb->asoc.peer_supports_prsctp) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; + } + if (stcb->asoc.peer_supports_auth) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; + } + if (stcb->asoc.peer_supports_asconf) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; + } + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; + if (stcb->asoc.peer_supports_strreset) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; + } + sac->sac_length += i; + } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { + memcpy(sac->sac_info, abort, abort_len); + sac->sac_length += abort_len; } - if (stcb->asoc.peer_supports_asconf) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; - } - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; - if (stcb->asoc.peer_supports_strreset) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; - } - sac->sac_length += i; } SCTP_BUF_LEN(m_notify) = sac->sac_length; - SCTP_BUF_NEXT(m_notify) = NULL; control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, 0, 0, stcb->asoc.context, 0, 0, 0, m_notify); @@ -3500,7 +3514,7 @@ sctp_ulp_notify(uint32_t notification, s switch (notification) { case SCTP_NOTIFY_ASSOC_UP: if (stcb->asoc.assoc_up_sent == 0) { - sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, NULL, so_locked); stcb->asoc.assoc_up_sent = 1; } if (stcb->asoc.adaptation_needed && (stcb->asoc.adaptation_sent == 0)) { @@ -3512,7 +3526,7 @@ sctp_ulp_notify(uint32_t notification, s } break; case SCTP_NOTIFY_ASSOC_DOWN: - sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, NULL, so_locked); break; case SCTP_NOTIFY_INTERFACE_DOWN: { @@ -3563,9 +3577,9 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_ASSOC_ABORTED: if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { - sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, so_locked); } else { - sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, so_locked); } break; case SCTP_NOTIFY_PEER_OPENED_STREAM: @@ -3573,7 +3587,7 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_STREAM_OPENED_OK: break; case SCTP_NOTIFY_ASSOC_RESTART: - sctp_notify_assoc_change(SCTP_RESTART, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, so_locked); if (stcb->asoc.peer_supports_auth == 0) { sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0, NULL, so_locked); @@ -3742,7 +3756,8 @@ sctp_report_all_outbound(struct sctp_tcb } void -sctp_abort_notification(struct sctp_tcb *stcb, int error, int so_locked +sctp_abort_notification(struct sctp_tcb *stcb, uint16_t error, + struct sctp_abort_chunk *abort, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -3763,7 +3778,7 @@ sctp_abort_notification(struct sctp_tcb } /* Tell them we lost the asoc */ sctp_report_all_outbound(stcb, 1, so_locked); - sctp_ulp_notify(SCTP_NOTIFY_ASSOC_ABORTED, stcb, error, NULL, so_locked); + sctp_ulp_notify(SCTP_NOTIFY_ASSOC_ABORTED, stcb, error, abort, so_locked); } void @@ -3782,7 +3797,7 @@ sctp_abort_association(struct sctp_inpcb if (stcb != NULL) { /* We have a TCB to abort, send notification too */ vtag = stcb->asoc.peer_vtag; - sctp_abort_notification(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); /* get the assoc vrf id and table id */ vrf_id = stcb->asoc.vrf_id; stcb->asoc.state |= SCTP_STATE_WAS_ABORTED; @@ -3876,7 +3891,7 @@ none_in: void sctp_abort_an_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, - int error, struct mbuf *op_err, + struct mbuf *op_err, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED @@ -3904,8 +3919,9 @@ sctp_abort_an_association(struct sctp_in stcb->asoc.state |= SCTP_STATE_WAS_ABORTED; } /* notify the ulp */ - if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) - sctp_abort_notification(stcb, error, so_locked); + if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) { + sctp_abort_notification(stcb, 0, NULL, so_locked); + } /* notify the peer */ sctp_send_abort_tcb(stcb, op_err, so_locked); SCTP_STAT_INCR_COUNTER32(sctps_aborted); Modified: stable/9/sys/netinet/sctputil.h ============================================================================== --- stable/9/sys/netinet/sctputil.h Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet/sctputil.h Sun Jul 1 07:28:15 2012 (r237884) @@ -179,7 +179,8 @@ sctp_report_all_outbound(struct sctp_tcb int sctp_expand_mapping_array(struct sctp_association *, uint32_t); void -sctp_abort_notification(struct sctp_tcb *, int, int +sctp_abort_notification(struct sctp_tcb *, uint16_t, + struct sctp_abort_chunk *, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -193,7 +194,7 @@ sctp_abort_association(struct sctp_inpcb /* We choose to abort via user input */ void -sctp_abort_an_association(struct sctp_inpcb *, struct sctp_tcb *, int, +sctp_abort_an_association(struct sctp_inpcb *, struct sctp_tcb *, struct mbuf *, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED Modified: stable/9/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 06:56:41 2012 (r237883) +++ stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:28:15 2012 (r237884) @@ -388,10 +388,8 @@ sctp6_notify(struct sctp_inpcb *inp, struct socket *so; #endif - /* protection */ - int reason; - + /* protection */ if ((inp == NULL) || (stcb == NULL) || (net == NULL) || (sh == NULL) || (to == NULL)) { if (stcb) @@ -441,8 +439,7 @@ sctp6_notify(struct sctp_inpcb *inp, * now is dead. In either case treat it like a OOTB abort * with no TCB */ - reason = SCTP_PEER_FAULTY; - sctp_abort_notification(stcb, reason, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 07:31:26 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BD67106568A; Sun, 1 Jul 2012 07:31:26 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D48758FC18; Sun, 1 Jul 2012 07:31:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617VPhL073434; Sun, 1 Jul 2012 07:31:25 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617VPaZ073432; Sun, 1 Jul 2012 07:31:25 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010731.q617VPaZ073432@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237885 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:31:26 -0000 Author: tuexen Date: Sun Jul 1 07:31:25 2012 New Revision: 237885 URL: http://svn.freebsd.org/changeset/base/237885 Log: MFC r235402: Ensure the user can read COMM_LOST notifications on 1-to-1 style sockets. Modified: stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 07:28:15 2012 (r237884) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:31:25 2012 (r237885) @@ -2609,10 +2609,82 @@ sctp_notify_assoc_change(uint16_t state, #endif + if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { + notif_len = sizeof(struct sctp_assoc_change); + if (abort != NULL) { + abort_len = htons(abort->ch.chunk_length); + } else { + abort_len = 0; + } + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + notif_len += SCTP_ASSOC_SUPPORTS_MAX; + } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { + notif_len += abort_len; + } + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + /* Retry with smaller value. */ + notif_len = sizeof(struct sctp_assoc_change); + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + goto set_error; + } + } + SCTP_BUF_NEXT(m_notify) = NULL; + sac = mtod(m_notify, struct sctp_assoc_change *); + sac->sac_type = SCTP_ASSOC_CHANGE; + sac->sac_flags = 0; + sac->sac_length = sizeof(struct sctp_assoc_change); + sac->sac_state = state; + sac->sac_error = error; + /* XXX verify these stream counts */ + sac->sac_outbound_streams = stcb->asoc.streamoutcnt; + sac->sac_inbound_streams = stcb->asoc.streamincnt; + sac->sac_assoc_id = sctp_get_associd(stcb); + if (notif_len > sizeof(struct sctp_assoc_change)) { + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + i = 0; + if (stcb->asoc.peer_supports_prsctp) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; + } + if (stcb->asoc.peer_supports_auth) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; + } + if (stcb->asoc.peer_supports_asconf) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; + } + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; + if (stcb->asoc.peer_supports_strreset) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; + } + sac->sac_length += i; + } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { + memcpy(sac->sac_info, abort, abort_len); + sac->sac_length += abort_len; + } + } + SCTP_BUF_LEN(m_notify) = sac->sac_length; + control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, + 0, 0, stcb->asoc.context, 0, 0, 0, + m_notify); + if (control != NULL) { + control->length = SCTP_BUF_LEN(m_notify); + /* not that we need this */ + control->tail_mbuf = m_notify; + control->spec_flags = M_NOTIFICATION; + sctp_add_to_readq(stcb->sctp_ep, stcb, + control, + &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, + so_locked); + } else { + sctp_m_freem(m_notify); + } + } /* - * For TCP model AND UDP connected sockets we will send an error up - * when an ABORT comes in. + * For 1-to-1 style sockets, we send up and error when an ABORT + * comes in. */ +set_error: if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { @@ -2623,127 +2695,34 @@ sctp_notify_assoc_change(uint16_t state, SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNRESET); stcb->sctp_socket->so_error = ECONNRESET; } - /* Wake ANY sleepers */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - if (!so_locked) { - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - SCTP_SOCKET_UNLOCK(so, 1); - return; - } - } -#endif - socantrcvmore(stcb->sctp_socket); - sorwakeup(stcb->sctp_socket); - sowwakeup(stcb->sctp_socket); + } + /* Wake ANY sleepers */ #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - if (!so_locked) { + so = SCTP_INP_SO(stcb->sctp_ep); + if (!so_locked) { + atomic_add_int(&stcb->asoc.refcnt, 1); + SCTP_TCB_UNLOCK(stcb); + SCTP_SOCKET_LOCK(so, 1); + SCTP_TCB_LOCK(stcb); + atomic_subtract_int(&stcb->asoc.refcnt, 1); + if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { SCTP_SOCKET_UNLOCK(so, 1); - } -#endif - } - if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { - /* event not enabled */ - return; - } - notif_len = sizeof(struct sctp_assoc_change); - if (abort != NULL) { - abort_len = htons(abort->ch.chunk_length); - } else { - abort_len = 0; - } - if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { - notif_len += SCTP_ASSOC_SUPPORTS_MAX; - } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { - notif_len += abort_len; - } - m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); - if (m_notify == NULL) { - /* Retry with smaller value. */ - notif_len = sizeof(struct sctp_assoc_change); - m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); - if (m_notify == NULL) { return; } } - SCTP_BUF_NEXT(m_notify) = NULL; - sac = mtod(m_notify, struct sctp_assoc_change *); - sac->sac_type = SCTP_ASSOC_CHANGE; - sac->sac_flags = 0; - sac->sac_length = sizeof(struct sctp_assoc_change); - sac->sac_state = state; - sac->sac_error = error; - /* XXX verify these stream counts */ - sac->sac_outbound_streams = stcb->asoc.streamoutcnt; - sac->sac_inbound_streams = stcb->asoc.streamincnt; - sac->sac_assoc_id = sctp_get_associd(stcb); - if (notif_len > sizeof(struct sctp_assoc_change)) { - if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { - i = 0; - if (stcb->asoc.peer_supports_prsctp) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; - } - if (stcb->asoc.peer_supports_auth) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; - } - if (stcb->asoc.peer_supports_asconf) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; - } - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; - if (stcb->asoc.peer_supports_strreset) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; - } - sac->sac_length += i; - } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { - memcpy(sac->sac_info, abort, abort_len); - sac->sac_length += abort_len; - } - } - SCTP_BUF_LEN(m_notify) = sac->sac_length; - control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, - 0, 0, stcb->asoc.context, 0, 0, 0, - m_notify); - if (control == NULL) { - /* no memory */ - sctp_m_freem(m_notify); - return; - } - control->length = SCTP_BUF_LEN(m_notify); - /* not that we need this */ - control->tail_mbuf = m_notify; - control->spec_flags = M_NOTIFICATION; - sctp_add_to_readq(stcb->sctp_ep, stcb, - control, - &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, - so_locked); - if (state == SCTP_COMM_LOST) { - /* Wake up any sleeper */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - if (!so_locked) { - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - SCTP_SOCKET_UNLOCK(so, 1); - return; - } - } #endif - sctp_sowwakeup(stcb->sctp_ep, stcb->sctp_socket); + if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || + (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && + ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { + socantrcvmore(stcb->sctp_socket); + } + sorwakeup(stcb->sctp_socket); + sowwakeup(stcb->sctp_socket); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - if (!so_locked) { - SCTP_SOCKET_UNLOCK(so, 1); - } -#endif + if (!so_locked) { + SCTP_SOCKET_UNLOCK(so, 1); } +#endif } static void @@ -5220,7 +5199,7 @@ restart_nosblocks: (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE)) { goto out; } - if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { + if ((so->so_rcv.sb_state & SBS_CANTRCVMORE) && (so->so_rcv.sb_cc == 0)) { if (so->so_error) { error = so->so_error; if ((in_flags & MSG_PEEK) == 0) @@ -5228,7 +5207,6 @@ restart_nosblocks: goto out; } else { if (so->so_rcv.sb_cc == 0) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, ENOTCONN); /* indicate EOF */ error = 0; goto out; From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 07:34:08 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0B4071065675; Sun, 1 Jul 2012 07:34:08 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E810D8FC12; Sun, 1 Jul 2012 07:34:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617Y7T7073617; Sun, 1 Jul 2012 07:34:07 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617Y7KT073610; Sun, 1 Jul 2012 07:34:07 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010734.q617Y7KT073610@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237886 - in stable/9/sys: netinet netinet6 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:34:08 -0000 Author: tuexen Date: Sun Jul 1 07:34:07 2012 New Revision: 237886 URL: http://svn.freebsd.org/changeset/base/237886 Log: MFC r235403: Use ECONNABORTED in cases where the ABORT was sent to the peer. Modified: stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_usrreq.c stable/9/sys/netinet/sctputil.c stable/9/sys/netinet/sctputil.h stable/9/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:31:25 2012 (r237885) +++ stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:34:07 2012 (r237886) @@ -757,7 +757,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_INTERFACE_UP 4 #define SCTP_NOTIFY_DG_FAIL 5 #define SCTP_NOTIFY_STRDATA_ERR 6 -#define SCTP_NOTIFY_ASSOC_ABORTED 7 +#define SCTP_NOTIFY_ASSOC_LOC_ABORTED 7 #define SCTP_NOTIFY_PEER_OPENED_STREAM 8 #define SCTP_NOTIFY_STREAM_OPENED_OK 9 #define SCTP_NOTIFY_ASSOC_RESTART 10 @@ -781,7 +781,8 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_SENDER_DRY 29 #define SCTP_NOTIFY_STR_RESET_DENIED_OUT 30 #define SCTP_NOTIFY_STR_RESET_DENIED_IN 31 -#define SCTP_NOTIFY_MAX 31 +#define SCTP_NOTIFY_ASSOC_REM_ABORTED 32 +#define SCTP_NOTIFY_MAX 32 /* This is the value for messages that are NOT completely Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:31:25 2012 (r237885) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:34:07 2012 (r237886) @@ -782,7 +782,7 @@ sctp_handle_abort(struct sctp_abort_chun /* stop any receive timers */ sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_6); /* notify user of the abort and clean up... */ - sctp_abort_notification(stcb, error, abort, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 1, error, abort, SCTP_SO_NOT_LOCKED); /* free the tcb */ SCTP_STAT_INCR_COUNTER32(sctps_aborted); if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || @@ -1173,7 +1173,7 @@ sctp_handle_error(struct sctp_chunkhdr * asoc->stale_cookie_count++; if (asoc->stale_cookie_count > asoc->max_init_times) { - sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, 0, NULL, SCTP_SO_NOT_LOCKED); /* now free the asoc */ #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:31:25 2012 (r237885) +++ stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:34:07 2012 (r237886) @@ -283,7 +283,7 @@ sctp_notify(struct sctp_inpcb *inp, * now is dead. In either case treat it like a OOTB abort * with no TCB */ - sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 1, 0, NULL, SCTP_SO_NOT_LOCKED); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 07:31:25 2012 (r237885) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:34:07 2012 (r237886) @@ -2592,7 +2592,7 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa static void sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, - uint16_t error, struct sctp_abort_chunk *abort, int so_locked + uint16_t error, struct sctp_abort_chunk *abort, uint8_t from_peer, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -2688,12 +2688,17 @@ set_error: if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { - if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_WAIT) { - SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNREFUSED); - stcb->sctp_socket->so_error = ECONNREFUSED; + if (from_peer) { + if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_WAIT) { + SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNREFUSED); + stcb->sctp_socket->so_error = ECONNREFUSED; + } else { + SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNRESET); + stcb->sctp_socket->so_error = ECONNRESET; + } } else { - SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNRESET); - stcb->sctp_socket->so_error = ECONNRESET; + SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNABORTED); + stcb->sctp_socket->so_error = ECONNABORTED; } } /* Wake ANY sleepers */ @@ -3493,7 +3498,7 @@ sctp_ulp_notify(uint32_t notification, s switch (notification) { case SCTP_NOTIFY_ASSOC_UP: if (stcb->asoc.assoc_up_sent == 0) { - sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, NULL, so_locked); + sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, NULL, 0, so_locked); stcb->asoc.assoc_up_sent = 1; } if (stcb->asoc.adaptation_needed && (stcb->asoc.adaptation_sent == 0)) { @@ -3505,7 +3510,7 @@ sctp_ulp_notify(uint32_t notification, s } break; case SCTP_NOTIFY_ASSOC_DOWN: - sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, NULL, so_locked); + sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, NULL, 0, so_locked); break; case SCTP_NOTIFY_INTERFACE_DOWN: { @@ -3553,12 +3558,20 @@ sctp_ulp_notify(uint32_t notification, s } case SCTP_NOTIFY_STRDATA_ERR: break; - case SCTP_NOTIFY_ASSOC_ABORTED: + case SCTP_NOTIFY_ASSOC_LOC_ABORTED: if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { - sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, so_locked); + sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, 0, so_locked); } else { - sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, so_locked); + sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, 0, so_locked); + } + break; + case SCTP_NOTIFY_ASSOC_REM_ABORTED: + if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || + ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { + sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, 1, so_locked); + } else { + sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, 1, so_locked); } break; case SCTP_NOTIFY_PEER_OPENED_STREAM: @@ -3566,7 +3579,7 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_STREAM_OPENED_OK: break; case SCTP_NOTIFY_ASSOC_RESTART: - sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, so_locked); + sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, 0, so_locked); if (stcb->asoc.peer_supports_auth == 0) { sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0, NULL, so_locked); @@ -3735,7 +3748,7 @@ sctp_report_all_outbound(struct sctp_tcb } void -sctp_abort_notification(struct sctp_tcb *stcb, uint16_t error, +sctp_abort_notification(struct sctp_tcb *stcb, uint8_t from_peer, uint16_t error, struct sctp_abort_chunk *abort, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED @@ -3757,7 +3770,11 @@ sctp_abort_notification(struct sctp_tcb } /* Tell them we lost the asoc */ sctp_report_all_outbound(stcb, 1, so_locked); - sctp_ulp_notify(SCTP_NOTIFY_ASSOC_ABORTED, stcb, error, abort, so_locked); + if (from_peer) { + sctp_ulp_notify(SCTP_NOTIFY_ASSOC_REM_ABORTED, stcb, error, abort, so_locked); + } else { + sctp_ulp_notify(SCTP_NOTIFY_ASSOC_LOC_ABORTED, stcb, error, abort, so_locked); + } } void @@ -3776,7 +3793,7 @@ sctp_abort_association(struct sctp_inpcb if (stcb != NULL) { /* We have a TCB to abort, send notification too */ vtag = stcb->asoc.peer_vtag; - sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, 0, NULL, SCTP_SO_NOT_LOCKED); /* get the assoc vrf id and table id */ vrf_id = stcb->asoc.vrf_id; stcb->asoc.state |= SCTP_STATE_WAS_ABORTED; @@ -3899,7 +3916,7 @@ sctp_abort_an_association(struct sctp_in } /* notify the ulp */ if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) { - sctp_abort_notification(stcb, 0, NULL, so_locked); + sctp_abort_notification(stcb, 0, 0, NULL, so_locked); } /* notify the peer */ sctp_send_abort_tcb(stcb, op_err, so_locked); Modified: stable/9/sys/netinet/sctputil.h ============================================================================== --- stable/9/sys/netinet/sctputil.h Sun Jul 1 07:31:25 2012 (r237885) +++ stable/9/sys/netinet/sctputil.h Sun Jul 1 07:34:07 2012 (r237886) @@ -179,7 +179,7 @@ sctp_report_all_outbound(struct sctp_tcb int sctp_expand_mapping_array(struct sctp_association *, uint32_t); void -sctp_abort_notification(struct sctp_tcb *, uint16_t, +sctp_abort_notification(struct sctp_tcb *, uint8_t, uint16_t, struct sctp_abort_chunk *, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED Modified: stable/9/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:31:25 2012 (r237885) +++ stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:34:07 2012 (r237886) @@ -439,7 +439,7 @@ sctp6_notify(struct sctp_inpcb *inp, * now is dead. In either case treat it like a OOTB abort * with no TCB */ - sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 1, 0, NULL, SCTP_SO_NOT_LOCKED); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 07:36:34 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4FEB4106564A; Sun, 1 Jul 2012 07:36:34 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F40F8FC0C; Sun, 1 Jul 2012 07:36:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617aYQB073775; Sun, 1 Jul 2012 07:36:34 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617aXoU073772; Sun, 1 Jul 2012 07:36:33 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010736.q617aXoU073772@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:36:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237887 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:36:34 -0000 Author: tuexen Date: Sun Jul 1 07:36:33 2012 New Revision: 237887 URL: http://svn.freebsd.org/changeset/base/237887 Log: MFC r235412: Remove unused constants. Modified: stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:34:07 2012 (r237886) +++ stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:36:33 2012 (r237887) @@ -756,34 +756,26 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_INTERFACE_DOWN 3 #define SCTP_NOTIFY_INTERFACE_UP 4 #define SCTP_NOTIFY_DG_FAIL 5 -#define SCTP_NOTIFY_STRDATA_ERR 6 +#define SCTP_NOTIFY_SPECIAL_SP_FAIL 6 #define SCTP_NOTIFY_ASSOC_LOC_ABORTED 7 -#define SCTP_NOTIFY_PEER_OPENED_STREAM 8 -#define SCTP_NOTIFY_STREAM_OPENED_OK 9 -#define SCTP_NOTIFY_ASSOC_RESTART 10 -#define SCTP_NOTIFY_HB_RESP 11 -#define SCTP_NOTIFY_ASCONF_SUCCESS 12 -#define SCTP_NOTIFY_ASCONF_FAILED 13 -#define SCTP_NOTIFY_PEER_SHUTDOWN 14 -#define SCTP_NOTIFY_ASCONF_ADD_IP 15 -#define SCTP_NOTIFY_ASCONF_DELETE_IP 16 -#define SCTP_NOTIFY_ASCONF_SET_PRIMARY 17 -#define SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION 18 -#define SCTP_NOTIFY_INTERFACE_CONFIRMED 20 -#define SCTP_NOTIFY_STR_RESET_RECV 21 -#define SCTP_NOTIFY_STR_RESET_SEND 22 -#define SCTP_NOTIFY_STR_RESET_FAILED_OUT 23 -#define SCTP_NOTIFY_STR_RESET_FAILED_IN 24 -#define SCTP_NOTIFY_AUTH_NEW_KEY 25 -#define SCTP_NOTIFY_AUTH_FREE_KEY 26 -#define SCTP_NOTIFY_SPECIAL_SP_FAIL 27 -#define SCTP_NOTIFY_NO_PEER_AUTH 28 -#define SCTP_NOTIFY_SENDER_DRY 29 -#define SCTP_NOTIFY_STR_RESET_DENIED_OUT 30 -#define SCTP_NOTIFY_STR_RESET_DENIED_IN 31 -#define SCTP_NOTIFY_ASSOC_REM_ABORTED 32 -#define SCTP_NOTIFY_MAX 32 - +#define SCTP_NOTIFY_ASSOC_REM_ABORTED 8 +#define SCTP_NOTIFY_ASSOC_RESTART 9 +#define SCTP_NOTIFY_PEER_SHUTDOWN 10 +#define SCTP_NOTIFY_ASCONF_ADD_IP 11 +#define SCTP_NOTIFY_ASCONF_DELETE_IP 12 +#define SCTP_NOTIFY_ASCONF_SET_PRIMARY 13 +#define SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION 14 +#define SCTP_NOTIFY_INTERFACE_CONFIRMED 15 +#define SCTP_NOTIFY_STR_RESET_RECV 16 +#define SCTP_NOTIFY_STR_RESET_SEND 17 +#define SCTP_NOTIFY_STR_RESET_FAILED_OUT 18 +#define SCTP_NOTIFY_STR_RESET_FAILED_IN 19 +#define SCTP_NOTIFY_STR_RESET_DENIED_OUT 20 +#define SCTP_NOTIFY_STR_RESET_DENIED_IN 21 +#define SCTP_NOTIFY_AUTH_NEW_KEY 22 +#define SCTP_NOTIFY_AUTH_FREE_KEY 23 +#define SCTP_NOTIFY_NO_PEER_AUTH 24 +#define SCTP_NOTIFY_SENDER_DRY 25 /* This is the value for messages that are NOT completely * copied down where we will start to split the message. Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 07:34:07 2012 (r237886) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:36:33 2012 (r237887) @@ -3556,8 +3556,6 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_partial_delivery_indication(stcb, error, val, so_locked); break; } - case SCTP_NOTIFY_STRDATA_ERR: - break; case SCTP_NOTIFY_ASSOC_LOC_ABORTED: if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { @@ -3574,10 +3572,6 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, 1, so_locked); } break; - case SCTP_NOTIFY_PEER_OPENED_STREAM: - break; - case SCTP_NOTIFY_STREAM_OPENED_OK: - break; case SCTP_NOTIFY_ASSOC_RESTART: sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, 0, so_locked); if (stcb->asoc.peer_supports_auth == 0) { @@ -3585,8 +3579,6 @@ sctp_ulp_notify(uint32_t notification, s NULL, so_locked); } break; - case SCTP_NOTIFY_HB_RESP: - break; case SCTP_NOTIFY_STR_RESET_SEND: sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_OUTGOING_SSN); break; @@ -3621,10 +3613,6 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_peer_addr_change(stcb, SCTP_ADDR_MADE_PRIM, data, error); break; - case SCTP_NOTIFY_ASCONF_SUCCESS: - break; - case SCTP_NOTIFY_ASCONF_FAILED: - break; case SCTP_NOTIFY_PEER_SHUTDOWN: sctp_notify_shutdown_event(stcb); break; From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 07:39:37 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1E3A106566B; Sun, 1 Jul 2012 07:39:37 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB5BD8FC15; Sun, 1 Jul 2012 07:39:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617db78073971; Sun, 1 Jul 2012 07:39:37 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617dbhZ073964; Sun, 1 Jul 2012 07:39:37 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010739.q617dbhZ073964@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:39:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237888 - in stable/9/sys: netinet netinet6 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:39:38 -0000 Author: tuexen Date: Sun Jul 1 07:39:37 2012 New Revision: 237888 URL: http://svn.freebsd.org/changeset/base/237888 Log: MFC r235414,r235415: Provide the error code in SCTP_PEER_ADDR_CHANGE notifications as specified in RFC 6458. Modified: stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet/sctp_timer.c stable/9/sys/netinet/sctp_usrreq.c stable/9/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:36:33 2012 (r237887) +++ stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:39:37 2012 (r237888) @@ -4024,7 +4024,7 @@ sctp_express_handle_sack(struct sctp_tcb /* addr came good */ net->dest_state |= SCTP_ADDR_REACHABLE; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, - SCTP_RECEIVED_SACK, (void *)net, SCTP_SO_NOT_LOCKED); + 0, (void *)net, SCTP_SO_NOT_LOCKED); } if (net == stcb->asoc.primary_destination) { if (stcb->asoc.alternate) { @@ -4831,7 +4831,7 @@ sctp_handle_sack(struct mbuf *m, int off /* addr came good */ net->dest_state |= SCTP_ADDR_REACHABLE; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, - SCTP_RECEIVED_SACK, (void *)net, SCTP_SO_NOT_LOCKED); + 0, (void *)net, SCTP_SO_NOT_LOCKED); } if (net == stcb->asoc.primary_destination) { if (stcb->asoc.alternate) { Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:36:33 2012 (r237887) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:39:37 2012 (r237888) @@ -632,7 +632,7 @@ sctp_handle_heartbeat_ack(struct sctp_he if (!(r_net->dest_state & SCTP_ADDR_REACHABLE)) { r_net->dest_state |= SCTP_ADDR_REACHABLE; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, - SCTP_HEARTBEAT_SUCCESS, (void *)r_net, SCTP_SO_NOT_LOCKED); + 0, (void *)r_net, SCTP_SO_NOT_LOCKED); } if (r_net->dest_state & SCTP_ADDR_PF) { r_net->dest_state &= ~SCTP_ADDR_PF; Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:36:33 2012 (r237887) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:39:37 2012 (r237888) @@ -3815,8 +3815,7 @@ sctp_handle_no_route(struct sctp_tcb *st if ((net->dest_state & SCTP_ADDR_REACHABLE) && stcb) { SCTPDBG(SCTP_DEBUG_OUTPUT1, "no route takes interface %p down\n", net); sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, - stcb, - SCTP_FAILED_THRESHOLD, + stcb, 0, (void *)net, so_locked); net->dest_state &= ~SCTP_ADDR_REACHABLE; Modified: stable/9/sys/netinet/sctp_timer.c ============================================================================== --- stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:36:33 2012 (r237887) +++ stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:39:37 2012 (r237888) @@ -101,8 +101,7 @@ sctp_threshold_management(struct sctp_in net->dest_state &= ~SCTP_ADDR_REQ_PRIMARY; net->dest_state &= ~SCTP_ADDR_PF; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, - stcb, - SCTP_FAILED_THRESHOLD, + stcb, 0, (void *)net, SCTP_SO_NOT_LOCKED); } } else if ((net->pf_threshold < net->failure_threshold) && Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:36:33 2012 (r237887) +++ stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:39:37 2012 (r237888) @@ -270,7 +270,7 @@ sctp_notify(struct sctp_inpcb *inp, net->dest_state &= ~SCTP_ADDR_REACHABLE; net->dest_state &= ~SCTP_ADDR_PF; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, - stcb, SCTP_FAILED_THRESHOLD, + stcb, 0, (void *)net, SCTP_SO_NOT_LOCKED); } SCTP_TCB_UNLOCK(stcb); @@ -4826,12 +4826,12 @@ sctp_setopt(struct socket *so, int optna if (net->dest_state & SCTP_ADDR_REACHABLE) { if (net->error_count > paddrp->spp_pathmaxrxt) { net->dest_state &= ~SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED); } } else { if (net->error_count <= paddrp->spp_pathmaxrxt) { net->dest_state |= SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED); } } net->failure_threshold = paddrp->spp_pathmaxrxt; @@ -4869,12 +4869,12 @@ sctp_setopt(struct socket *so, int optna if (net->dest_state & SCTP_ADDR_REACHABLE) { if (net->error_count > paddrp->spp_pathmaxrxt) { net->dest_state &= ~SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED); } } else { if (net->error_count <= paddrp->spp_pathmaxrxt) { net->dest_state |= SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED); } } net->failure_threshold = paddrp->spp_pathmaxrxt; @@ -5680,12 +5680,12 @@ sctp_setopt(struct socket *so, int optna if (net->dest_state & SCTP_ADDR_REACHABLE) { if (net->failure_threshold > thlds->spt_pathmaxrxt) { net->dest_state &= ~SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED); } } else { if (net->failure_threshold <= thlds->spt_pathmaxrxt) { net->dest_state |= SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED); } } net->failure_threshold = thlds->spt_pathmaxrxt; @@ -5709,12 +5709,12 @@ sctp_setopt(struct socket *so, int optna if (net->dest_state & SCTP_ADDR_REACHABLE) { if (net->failure_threshold > thlds->spt_pathmaxrxt) { net->dest_state &= ~SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, stcb, 0, net, SCTP_SO_LOCKED); } } else { if (net->failure_threshold <= thlds->spt_pathmaxrxt) { net->dest_state |= SCTP_ADDR_REACHABLE; - sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, SCTP_RESPONSE_TO_USER_REQ, net, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_UP, stcb, 0, net, SCTP_SO_LOCKED); } } net->failure_threshold = thlds->spt_pathmaxrxt; Modified: stable/9/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:36:33 2012 (r237887) +++ stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:39:37 2012 (r237888) @@ -426,8 +426,7 @@ sctp6_notify(struct sctp_inpcb *inp, net->dest_state &= ~SCTP_ADDR_REACHABLE; net->dest_state &= ~SCTP_ADDR_PF; sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_DOWN, - stcb, SCTP_FAILED_THRESHOLD, - (void *)net, SCTP_SO_NOT_LOCKED); + stcb, 0, (void *)net, SCTP_SO_NOT_LOCKED); } SCTP_TCB_UNLOCK(stcb); } else if ((icmph->icmp6_code == ICMP_UNREACH_PROTOCOL) || From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 07:42:59 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0602106566C; Sun, 1 Jul 2012 07:42:59 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B96BC8FC0A; Sun, 1 Jul 2012 07:42:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617gxf0074193; Sun, 1 Jul 2012 07:42:59 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617gx7J074184; Sun, 1 Jul 2012 07:42:59 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010742.q617gx7J074184@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:42:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237889 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:42:59 -0000 Author: tuexen Date: Sun Jul 1 07:42:59 2012 New Revision: 237889 URL: http://svn.freebsd.org/changeset/base/237889 Log: MFC r235416: Provide in the SCTP_SEND_FAILED and SCTP_SEND_FAILED_EVENT notifications the correct ssf_error or ssfe_error as required by RFC 6458. Modified: stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet/sctp_pcb.c stable/9/sys/netinet/sctp_timer.c stable/9/sys/netinet/sctputil.c stable/9/sys/netinet/sctputil.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:42:59 2012 (r237889) @@ -460,18 +460,6 @@ __FBSDID("$FreeBSD$"); #define SCTP_HAS_NAT_SUPPORT 0xc007 #define SCTP_NAT_VTAGS 0xc008 -/* Notification error codes */ -#define SCTP_NOTIFY_DATAGRAM_UNSENT 0x0001 -#define SCTP_NOTIFY_DATAGRAM_SENT 0x0002 -#define SCTP_FAILED_THRESHOLD 0x0004 -#define SCTP_HEARTBEAT_SUCCESS 0x0008 -#define SCTP_RESPONSE_TO_USER_REQ 0x0010 -#define SCTP_INTERNAL_ERROR 0x0020 -#define SCTP_SHUTDOWN_GUARD_EXPIRES 0x0040 -#define SCTP_RECEIVED_SACK 0x0080 -#define SCTP_PEER_FAULTY 0x0100 -#define SCTP_ICMP_REFUSED 0x0200 - /* bits for TOS field */ #define SCTP_ECT0_BIT 0x02 #define SCTP_ECT1_BIT 0x01 @@ -755,27 +743,28 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_ASSOC_DOWN 2 #define SCTP_NOTIFY_INTERFACE_DOWN 3 #define SCTP_NOTIFY_INTERFACE_UP 4 -#define SCTP_NOTIFY_DG_FAIL 5 -#define SCTP_NOTIFY_SPECIAL_SP_FAIL 6 -#define SCTP_NOTIFY_ASSOC_LOC_ABORTED 7 -#define SCTP_NOTIFY_ASSOC_REM_ABORTED 8 -#define SCTP_NOTIFY_ASSOC_RESTART 9 -#define SCTP_NOTIFY_PEER_SHUTDOWN 10 -#define SCTP_NOTIFY_ASCONF_ADD_IP 11 -#define SCTP_NOTIFY_ASCONF_DELETE_IP 12 -#define SCTP_NOTIFY_ASCONF_SET_PRIMARY 13 -#define SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION 14 -#define SCTP_NOTIFY_INTERFACE_CONFIRMED 15 -#define SCTP_NOTIFY_STR_RESET_RECV 16 -#define SCTP_NOTIFY_STR_RESET_SEND 17 -#define SCTP_NOTIFY_STR_RESET_FAILED_OUT 18 -#define SCTP_NOTIFY_STR_RESET_FAILED_IN 19 -#define SCTP_NOTIFY_STR_RESET_DENIED_OUT 20 -#define SCTP_NOTIFY_STR_RESET_DENIED_IN 21 -#define SCTP_NOTIFY_AUTH_NEW_KEY 22 -#define SCTP_NOTIFY_AUTH_FREE_KEY 23 -#define SCTP_NOTIFY_NO_PEER_AUTH 24 -#define SCTP_NOTIFY_SENDER_DRY 25 +#define SCTP_NOTIFY_SENT_DG_FAIL 5 +#define SCTP_NOTIFY_UNSENT_DG_FAIL 6 +#define SCTP_NOTIFY_SPECIAL_SP_FAIL 7 +#define SCTP_NOTIFY_ASSOC_LOC_ABORTED 8 +#define SCTP_NOTIFY_ASSOC_REM_ABORTED 9 +#define SCTP_NOTIFY_ASSOC_RESTART 10 +#define SCTP_NOTIFY_PEER_SHUTDOWN 11 +#define SCTP_NOTIFY_ASCONF_ADD_IP 12 +#define SCTP_NOTIFY_ASCONF_DELETE_IP 13 +#define SCTP_NOTIFY_ASCONF_SET_PRIMARY 14 +#define SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION 15 +#define SCTP_NOTIFY_INTERFACE_CONFIRMED 16 +#define SCTP_NOTIFY_STR_RESET_RECV 17 +#define SCTP_NOTIFY_STR_RESET_SEND 18 +#define SCTP_NOTIFY_STR_RESET_FAILED_OUT 19 +#define SCTP_NOTIFY_STR_RESET_FAILED_IN 20 +#define SCTP_NOTIFY_STR_RESET_DENIED_OUT 21 +#define SCTP_NOTIFY_STR_RESET_DENIED_IN 22 +#define SCTP_NOTIFY_AUTH_NEW_KEY 23 +#define SCTP_NOTIFY_AUTH_FREE_KEY 24 +#define SCTP_NOTIFY_NO_PEER_AUTH 25 +#define SCTP_NOTIFY_SENDER_DRY 26 /* This is the value for messages that are NOT completely * copied down where we will start to split the message. Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:42:59 2012 (r237889) @@ -3194,8 +3194,7 @@ sctp_strike_gap_ack_chunks(struct sctp_t if (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) { /* Yes so drop it */ if (tp1->data != NULL) { - (void)sctp_release_pr_sctp_chunk(stcb, tp1, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), + (void)sctp_release_pr_sctp_chunk(stcb, tp1, 1, SCTP_SO_NOT_LOCKED); } continue; @@ -3452,8 +3451,7 @@ sctp_strike_gap_ack_chunks(struct sctp_t if (tp1->snd_count > tp1->rec.data.timetodrop.tv_sec) { /* Yes, so drop it */ if (tp1->data != NULL) { - (void)sctp_release_pr_sctp_chunk(stcb, tp1, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), + (void)sctp_release_pr_sctp_chunk(stcb, tp1, 1, SCTP_SO_NOT_LOCKED); } /* Make sure to flag we had a FR */ @@ -3632,8 +3630,7 @@ sctp_try_advance_peer_ack_point(struct s /* Yes so drop it */ if (tp1->data) { (void)sctp_release_pr_sctp_chunk(stcb, tp1, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), - SCTP_SO_NOT_LOCKED); + 1, SCTP_SO_NOT_LOCKED); } } else { /* Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:42:59 2012 (r237889) @@ -300,8 +300,8 @@ sctp_process_init(struct sctp_init_chunk asoc->send_queue_cnt--; if (chk->data != NULL) { sctp_free_bufspace(stcb, asoc, chk, 1); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, chk, SCTP_SO_NOT_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, + 0, chk, SCTP_SO_NOT_LOCKED); if (chk->data) { sctp_m_freem(chk->data); chk->data = NULL; @@ -318,8 +318,7 @@ sctp_process_init(struct sctp_init_chunk TAILQ_REMOVE(&outs->outqueue, sp, next); asoc->stream_queue_cnt--; sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, - stcb, SCTP_NOTIFY_DATAGRAM_UNSENT, - sp, SCTP_SO_NOT_LOCKED); + stcb, 0, sp, SCTP_SO_NOT_LOCKED); if (sp->data) { sctp_m_freem(sp->data); sp->data = NULL; @@ -1006,7 +1005,7 @@ sctp_handle_shutdown_ack(struct sctp_shu if (!TAILQ_EMPTY(&asoc->send_queue) || !TAILQ_EMPTY(&asoc->sent_queue) || !stcb->asoc.ss_functions.sctp_ss_is_empty(stcb, asoc)) { - sctp_report_all_outbound(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_report_all_outbound(stcb, 0, 0, SCTP_SO_NOT_LOCKED); } /* stop the timer */ sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_9); @@ -1889,7 +1888,7 @@ sctp_process_cookie_existing(struct mbuf /* send up all the data */ SCTP_TCB_SEND_LOCK(stcb); - sctp_report_all_outbound(stcb, 1, SCTP_SO_NOT_LOCKED); + sctp_report_all_outbound(stcb, 0, 1, SCTP_SO_NOT_LOCKED); for (i = 0; i < stcb->asoc.streamoutcnt; i++) { stcb->asoc.strmout[i].stream_no = i; stcb->asoc.strmout[i].next_sequence_sent = 0; @@ -3176,7 +3175,7 @@ sctp_handle_shutdown_complete(struct sct if (!TAILQ_EMPTY(&asoc->send_queue) || !TAILQ_EMPTY(&asoc->sent_queue) || !stcb->asoc.ss_functions.sctp_ss_is_empty(stcb, asoc)) { - sctp_report_all_outbound(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_report_all_outbound(stcb, 0, 0, SCTP_SO_NOT_LOCKED); } } /* stop the timer */ Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:42:59 2012 (r237889) @@ -6091,14 +6091,14 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, * if the mbuf is here */ int ret_spc; - int cause; + uint8_t sent; if (chk->sent > SCTP_DATAGRAM_UNSENT) - cause = SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT; + sent = 1; else - cause = SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_UNSENT; + sent = 0; ret_spc = sctp_release_pr_sctp_chunk(stcb, chk, - cause, + sent, SCTP_SO_LOCKED); freed_spc += ret_spc; if (freed_spc >= dataout) { @@ -6121,8 +6121,7 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, int ret_spc; ret_spc = sctp_release_pr_sctp_chunk(stcb, chk, - SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_UNSENT, - SCTP_SO_LOCKED); + 0, SCTP_SO_LOCKED); freed_spc += ret_spc; if (freed_spc >= dataout) { Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 07:42:59 2012 (r237889) @@ -4990,8 +4990,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, if (so) { /* Still an open socket - report */ sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, - (void *)sp, SCTP_SO_LOCKED); + 0, (void *)sp, SCTP_SO_LOCKED); } if (sp->data) { sctp_m_freem(sp->data); @@ -5051,8 +5050,8 @@ sctp_free_assoc(struct sctp_inpcb *inp, if (chk->data) { if (so) { /* Still a socket? */ - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, chk, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, + 0, chk, SCTP_SO_LOCKED); } if (chk->data) { sctp_m_freem(chk->data); @@ -5075,8 +5074,8 @@ sctp_free_assoc(struct sctp_inpcb *inp, if (chk->data) { if (so) { /* Still a socket? */ - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_SENT, chk, SCTP_SO_LOCKED); + sctp_ulp_notify(SCTP_NOTIFY_SENT_DG_FAIL, stcb, + 0, chk, SCTP_SO_LOCKED); } if (chk->data) { sctp_m_freem(chk->data); Modified: stable/9/sys/netinet/sctp_timer.c ============================================================================== --- stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:42:59 2012 (r237889) @@ -614,7 +614,7 @@ start_again: if (chk->data) { (void)sctp_release_pr_sctp_chunk(stcb, chk, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), + 1, SCTP_SO_NOT_LOCKED); cnt_abandoned++; } @@ -627,7 +627,7 @@ start_again: if (chk->data) { (void)sctp_release_pr_sctp_chunk(stcb, chk, - (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), + 1, SCTP_SO_NOT_LOCKED); cnt_abandoned++; } Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:42:59 2012 (r237889) @@ -2810,7 +2810,7 @@ sctp_notify_peer_addr_change(struct sctp static void -sctp_notify_send_failed(struct sctp_tcb *stcb, uint32_t error, +sctp_notify_send_failed(struct sctp_tcb *stcb, uint8_t sent, uint32_t error, struct sctp_tmit_chunk *chk, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED @@ -2844,10 +2844,11 @@ sctp_notify_send_failed(struct sctp_tcb if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { ssfe = mtod(m_notify, struct sctp_send_failed_event *); ssfe->ssfe_type = SCTP_SEND_FAILED_EVENT; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssfe->ssfe_flags = SCTP_DATA_UNSENT; - else + if (sent) { ssfe->ssfe_flags = SCTP_DATA_SENT; + } else { + ssfe->ssfe_flags = SCTP_DATA_UNSENT; + } ssfe->ssfe_length = length; ssfe->ssfe_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -2862,10 +2863,11 @@ sctp_notify_send_failed(struct sctp_tcb } else { ssf = mtod(m_notify, struct sctp_send_failed *); ssf->ssf_type = SCTP_SEND_FAILED; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssf->ssf_flags = SCTP_DATA_UNSENT; - else + if (sent) { ssf->ssf_flags = SCTP_DATA_SENT; + } else { + ssf->ssf_flags = SCTP_DATA_UNSENT; + } ssf->ssf_length = length; ssf->ssf_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -2954,10 +2956,7 @@ sctp_notify_send_failed2(struct sctp_tcb if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { ssfe = mtod(m_notify, struct sctp_send_failed_event *); ssfe->ssfe_type = SCTP_SEND_FAILED; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssfe->ssfe_flags = SCTP_DATA_UNSENT; - else - ssfe->ssfe_flags = SCTP_DATA_SENT; + ssfe->ssfe_flags = SCTP_DATA_UNSENT; ssfe->ssfe_length = length; ssfe->ssfe_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -2976,10 +2975,7 @@ sctp_notify_send_failed2(struct sctp_tcb } else { ssf = mtod(m_notify, struct sctp_send_failed *); ssf->ssf_type = SCTP_SEND_FAILED; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssf->ssf_flags = SCTP_DATA_UNSENT; - else - ssf->ssf_flags = SCTP_DATA_SENT; + ssf->ssf_flags = SCTP_DATA_UNSENT; ssf->ssf_length = length; ssf->ssf_error = error; /* not exactly what the user sent in, but should be close :) */ @@ -3543,8 +3539,12 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_send_failed2(stcb, error, (struct sctp_stream_queue_pending *)data, so_locked); break; - case SCTP_NOTIFY_DG_FAIL: - sctp_notify_send_failed(stcb, error, + case SCTP_NOTIFY_SENT_DG_FAIL: + sctp_notify_send_failed(stcb, 1, error, + (struct sctp_tmit_chunk *)data, so_locked); + break; + case SCTP_NOTIFY_UNSENT_DG_FAIL: + sctp_notify_send_failed(stcb, 0, error, (struct sctp_tmit_chunk *)data, so_locked); break; case SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION: @@ -3642,7 +3642,7 @@ sctp_ulp_notify(uint32_t notification, s } void -sctp_report_all_outbound(struct sctp_tcb *stcb, int holds_lock, int so_locked +sctp_report_all_outbound(struct sctp_tcb *stcb, uint16_t error, int holds_lock, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -3677,8 +3677,8 @@ sctp_report_all_outbound(struct sctp_tcb asoc->sent_queue_cnt--; if (chk->data != NULL) { sctp_free_bufspace(stcb, asoc, chk, 1); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_SENT, chk, so_locked); + sctp_ulp_notify(SCTP_NOTIFY_SENT_DG_FAIL, stcb, + error, chk, so_locked); if (chk->data) { sctp_m_freem(chk->data); chk->data = NULL; @@ -3693,8 +3693,8 @@ sctp_report_all_outbound(struct sctp_tcb asoc->send_queue_cnt--; if (chk->data != NULL) { sctp_free_bufspace(stcb, asoc, chk, 1); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, chk, so_locked); + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, + error, chk, so_locked); if (chk->data) { sctp_m_freem(chk->data); chk->data = NULL; @@ -3714,7 +3714,7 @@ sctp_report_all_outbound(struct sctp_tcb sctp_free_spbufspace(stcb, asoc, sp); if (sp->data) { sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb, - SCTP_NOTIFY_DATAGRAM_UNSENT, (void *)sp, so_locked); + error, (void *)sp, so_locked); if (sp->data) { sctp_m_freem(sp->data); sp->data = NULL; @@ -3757,7 +3757,7 @@ sctp_abort_notification(struct sctp_tcb return; } /* Tell them we lost the asoc */ - sctp_report_all_outbound(stcb, 1, so_locked); + sctp_report_all_outbound(stcb, error, 1, so_locked); if (from_peer) { sctp_ulp_notify(SCTP_NOTIFY_ASSOC_REM_ABORTED, stcb, error, abort, so_locked); } else { @@ -4655,7 +4655,7 @@ sctp_free_bufspace(struct sctp_tcb *stcb int sctp_release_pr_sctp_chunk(struct sctp_tcb *stcb, struct sctp_tmit_chunk *tp1, - int reason, int so_locked + uint8_t sent, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -4682,7 +4682,11 @@ sctp_release_pr_sctp_chunk(struct sctp_t sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1); stcb->asoc.peers_rwnd += tp1->send_size; stcb->asoc.peers_rwnd += SCTP_BASE_SYSCTL(sctp_peer_chunk_oh); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, so_locked); + if (sent) { + sctp_ulp_notify(SCTP_NOTIFY_SENT_DG_FAIL, stcb, 0, tp1, so_locked); + } else { + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, 0, tp1, so_locked); + } if (tp1->data) { sctp_m_freem(tp1->data); tp1->data = NULL; @@ -4729,7 +4733,11 @@ sctp_release_pr_sctp_chunk(struct sctp_t chk = tp1; ret_sz += tp1->book_size; sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1); - sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1, so_locked); + if (sent) { + sctp_ulp_notify(SCTP_NOTIFY_SENT_DG_FAIL, stcb, 0, tp1, so_locked); + } else { + sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb, 0, tp1, so_locked); + } if (tp1->data) { sctp_m_freem(tp1->data); tp1->data = NULL; Modified: stable/9/sys/netinet/sctputil.h ============================================================================== --- stable/9/sys/netinet/sctputil.h Sun Jul 1 07:39:37 2012 (r237888) +++ stable/9/sys/netinet/sctputil.h Sun Jul 1 07:42:59 2012 (r237889) @@ -170,7 +170,7 @@ sctp_pull_off_control_to_new_inp(struct void sctp_stop_timers_for_shutdown(struct sctp_tcb *); void -sctp_report_all_outbound(struct sctp_tcb *, int, int +sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -244,7 +244,7 @@ void sctp_print_address_pkt(struct ip *, int sctp_release_pr_sctp_chunk(struct sctp_tcb *, struct sctp_tmit_chunk *, - int, int + uint8_t, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 07:49:14 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BF4A21065673; Sun, 1 Jul 2012 07:49:14 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F7548FC18; Sun, 1 Jul 2012 07:49:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617nEYV074520; Sun, 1 Jul 2012 07:49:14 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617nEQi074516; Sun, 1 Jul 2012 07:49:14 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010749.q617nEQi074516@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237890 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:49:14 -0000 Author: tuexen Date: Sun Jul 1 07:49:14 2012 New Revision: 237890 URL: http://svn.freebsd.org/changeset/base/237890 Log: MFC r235418: Support SCTP_REMOTE_ERROR notification. Modified: stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:42:59 2012 (r237889) +++ stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:49:14 2012 (r237890) @@ -765,6 +765,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_NOTIFY_AUTH_FREE_KEY 24 #define SCTP_NOTIFY_NO_PEER_AUTH 25 #define SCTP_NOTIFY_SENDER_DRY 26 +#define SCTP_NOTIFY_REMOTE_ERROR 27 /* This is the value for messages that are NOT completely * copied down where we will start to split the message. Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:42:59 2012 (r237889) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:49:14 2012 (r237890) @@ -1111,7 +1111,7 @@ sctp_handle_error(struct sctp_chunkhdr * { int chklen; struct sctp_paramhdr *phdr; - uint16_t error_type; + uint16_t error, error_type; uint16_t error_len; struct sctp_association *asoc; int adjust; @@ -1126,6 +1126,7 @@ sctp_handle_error(struct sctp_chunkhdr * phdr = (struct sctp_paramhdr *)((caddr_t)ch + sizeof(struct sctp_chunkhdr)); chklen = ntohs(ch->chunk_length) - sizeof(struct sctp_chunkhdr); + error = 0; while ((size_t)chklen >= sizeof(struct sctp_paramhdr)) { /* Process an Error Cause */ error_type = ntohs(phdr->param_type); @@ -1136,6 +1137,10 @@ sctp_handle_error(struct sctp_chunkhdr * chklen, error_len); return (0); } + if (error == 0) { + /* report the first error cause */ + error = error_type; + } switch (error_type) { case SCTP_CAUSE_INVALID_STREAM: case SCTP_CAUSE_MISSING_PARAM: @@ -1252,6 +1257,7 @@ sctp_handle_error(struct sctp_chunkhdr * chklen -= adjust; phdr = (struct sctp_paramhdr *)((caddr_t)phdr + adjust); } + sctp_ulp_notify(SCTP_NOTIFY_REMOTE_ERROR, stcb, error, ch, SCTP_SO_NOT_LOCKED); return (0); } Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 07:42:59 2012 (r237889) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:49:14 2012 (r237890) @@ -3464,6 +3464,63 @@ sctp_notify_stream_reset(struct sctp_tcb } +static void +sctp_notify_remote_error(struct sctp_tcb *stcb, uint16_t error, struct sctp_error_chunk *chunk) +{ + struct mbuf *m_notify; + struct sctp_remote_error *sre; + struct sctp_queued_to_read *control; + size_t notif_len, chunk_len; + + if ((stcb == NULL) || + sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVPEERERR)) { + return; + } + if (chunk != NULL) { + chunk_len = htons(chunk->ch.chunk_length); + } else { + chunk_len = 0; + } + notif_len = sizeof(struct sctp_remote_error) + chunk_len; + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + /* Retry with smaller value. */ + notif_len = sizeof(struct sctp_remote_error); + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + return; + } + } + SCTP_BUF_NEXT(m_notify) = NULL; + sre = mtod(m_notify, struct sctp_remote_error *); + sre->sre_type = SCTP_REMOTE_ERROR; + sre->sre_flags = 0; + sre->sre_length = sizeof(struct sctp_remote_error); + sre->sre_error = error; + sre->sre_assoc_id = sctp_get_associd(stcb); + if (notif_len > sizeof(struct sctp_remote_error)) { + memcpy(sre->sre_data, chunk, chunk_len); + sre->sre_length += chunk_len; + } + SCTP_BUF_LEN(m_notify) = sre->sre_length; + control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, + 0, 0, stcb->asoc.context, 0, 0, 0, + m_notify); + if (control != NULL) { + control->length = SCTP_BUF_LEN(m_notify); + /* not that we need this */ + control->tail_mbuf = m_notify; + control->spec_flags = M_NOTIFICATION; + sctp_add_to_readq(stcb->sctp_ep, stcb, + control, + &stcb->sctp_socket->so_rcv, 1, + SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); + } else { + sctp_m_freem(m_notify); + } +} + + void sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, uint32_t error, void *data, int so_locked @@ -3634,6 +3691,9 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_SENDER_DRY: sctp_notify_sender_dry_event(stcb, so_locked); break; + case SCTP_NOTIFY_REMOTE_ERROR: + sctp_notify_remote_error(stcb, error, data); + break; default: SCTPDBG(SCTP_DEBUG_UTIL1, "%s: unknown notification %xh (%u)\n", __FUNCTION__, notification, notification); From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 07:51:32 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C269D1065674; Sun, 1 Jul 2012 07:51:32 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD46B8FC0C; Sun, 1 Jul 2012 07:51:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617pWi2074675; Sun, 1 Jul 2012 07:51:32 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617pWB9074673; Sun, 1 Jul 2012 07:51:32 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010751.q617pWB9074673@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:51:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237891 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:51:32 -0000 Author: tuexen Date: Sun Jul 1 07:51:32 2012 New Revision: 237891 URL: http://svn.freebsd.org/changeset/base/237891 Log: MFC r235554: Support SCTP_EOF also for 1-to-1 style sockets. Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:49:14 2012 (r237890) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:51:32 2012 (r237891) @@ -13610,8 +13610,7 @@ skip_preblock: dataless_eof: /* EOF thing ? */ if ((srcv->sinfo_flags & SCTP_EOF) && - (got_all_of_the_send == 1) && - (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE)) { + (got_all_of_the_send == 1)) { int cnt; SCTP_STAT_INCR(sctps_sends_with_eof); From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 07:53:54 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F23931065672; Sun, 1 Jul 2012 07:53:54 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD9028FC19; Sun, 1 Jul 2012 07:53:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617rsuc074855; Sun, 1 Jul 2012 07:53:54 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617rs19074852; Sun, 1 Jul 2012 07:53:54 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010753.q617rs19074852@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237893 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:53:55 -0000 Author: tuexen Date: Sun Jul 1 07:53:54 2012 New Revision: 237893 URL: http://svn.freebsd.org/changeset/base/237893 Log: MFC r235557: Use a default for max_burst of 4 and l2var of 2. This was discussed with rrs@. Modified: stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctp_sysctl.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:53:50 2012 (r237892) +++ stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:53:54 2012 (r237893) @@ -348,7 +348,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_NO_FR_UNLESS_SEGMENT_SMALLER 1 /* default max I can burst out after a fast retransmit, 0 disables it */ -#define SCTP_DEF_MAX_BURST 0 +#define SCTP_DEF_MAX_BURST 4 #define SCTP_DEF_HBMAX_BURST 4 #define SCTP_DEF_FRMAX_BURST 4 Modified: stable/9/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/9/sys/netinet/sctp_sysctl.h Sun Jul 1 07:53:50 2012 (r237892) +++ stable/9/sys/netinet/sctp_sysctl.h Sun Jul 1 07:53:54 2012 (r237893) @@ -377,7 +377,7 @@ struct sctp_sysctl { #define SCTPCTL_ABC_L_VAR_DESC "SCTP ABC max increase per SACK (L)" #define SCTPCTL_ABC_L_VAR_MIN 0 #define SCTPCTL_ABC_L_VAR_MAX 0xFFFFFFFF -#define SCTPCTL_ABC_L_VAR_DEFAULT 1 +#define SCTPCTL_ABC_L_VAR_DEFAULT 2 /* max_chained_mbufs: Default max number of small mbufs on a chain */ #define SCTPCTL_MAX_CHAINED_MBUFS_DESC "Default max number of small mbufs on a chain" From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 07:55:42 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2F33106566B; Sun, 1 Jul 2012 07:55:42 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D8A78FC0A; Sun, 1 Jul 2012 07:55:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617tgWK075001; Sun, 1 Jul 2012 07:55:42 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617tgL8074999; Sun, 1 Jul 2012 07:55:42 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010755.q617tgL8074999@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:55:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237894 - stable/9/lib/libc/net X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:55:42 -0000 Author: tuexen Date: Sun Jul 1 07:55:42 2012 New Revision: 237894 URL: http://svn.freebsd.org/changeset/base/237894 Log: MFC r235827: Update copyright date. Modified: stable/9/lib/libc/net/sctp_sys_calls.c Directory Properties: stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/9/lib/libc/net/sctp_sys_calls.c Sun Jul 1 07:53:54 2012 (r237893) +++ stable/9/lib/libc/net/sctp_sys_calls.c Sun Jul 1 07:55:42 2012 (r237894) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -32,6 +32,7 @@ #include __FBSDID("$FreeBSD$"); + #include #include #include From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 07:59:01 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDC691065674; Sun, 1 Jul 2012 07:59:01 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D55178FC12; Sun, 1 Jul 2012 07:59:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q617x144075281; Sun, 1 Jul 2012 07:59:01 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q617x16w075239; Sun, 1 Jul 2012 07:59:01 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010759.q617x16w075239@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 07:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237896 - in stable/9/sys: netinet netinet6 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 07:59:02 -0000 Author: tuexen Date: Sun Jul 1 07:59:00 2012 New Revision: 237896 URL: http://svn.freebsd.org/changeset/base/237896 Log: MFC r235828: Use consistent text at the begining of the files. Modified: stable/9/sys/netinet/sctp.h stable/9/sys/netinet/sctp_asconf.c stable/9/sys/netinet/sctp_asconf.h stable/9/sys/netinet/sctp_auth.c stable/9/sys/netinet/sctp_auth.h stable/9/sys/netinet/sctp_bsd_addr.c stable/9/sys/netinet/sctp_bsd_addr.h stable/9/sys/netinet/sctp_cc_functions.c stable/9/sys/netinet/sctp_constants.h stable/9/sys/netinet/sctp_crc32.c stable/9/sys/netinet/sctp_crc32.h stable/9/sys/netinet/sctp_dtrace_declare.h stable/9/sys/netinet/sctp_dtrace_define.h stable/9/sys/netinet/sctp_header.h stable/9/sys/netinet/sctp_indata.c stable/9/sys/netinet/sctp_indata.h stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctp_input.h stable/9/sys/netinet/sctp_lock_bsd.h stable/9/sys/netinet/sctp_os.h stable/9/sys/netinet/sctp_os_bsd.h stable/9/sys/netinet/sctp_output.c stable/9/sys/netinet/sctp_output.h stable/9/sys/netinet/sctp_pcb.c stable/9/sys/netinet/sctp_pcb.h stable/9/sys/netinet/sctp_peeloff.c stable/9/sys/netinet/sctp_peeloff.h stable/9/sys/netinet/sctp_ss_functions.c stable/9/sys/netinet/sctp_structs.h stable/9/sys/netinet/sctp_sysctl.c stable/9/sys/netinet/sctp_sysctl.h stable/9/sys/netinet/sctp_timer.c stable/9/sys/netinet/sctp_timer.h stable/9/sys/netinet/sctp_uio.h stable/9/sys/netinet/sctp_usrreq.c stable/9/sys/netinet/sctp_var.h stable/9/sys/netinet/sctputil.c stable/9/sys/netinet/sctputil.h stable/9/sys/netinet6/sctp6_usrreq.c stable/9/sys/netinet6/sctp6_var.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp.h ============================================================================== --- stable/9/sys/netinet/sctp.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -29,7 +29,6 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp.h,v 1.18 2005/03/06 16:04:16 itojun Exp $ */ #include __FBSDID("$FreeBSD$"); @@ -37,6 +36,7 @@ __FBSDID("$FreeBSD$"); #ifndef _NETINET_SCTP_H_ #define _NETINET_SCTP_H_ + #include Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,10 +30,9 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_asconf.c,v 1.24 2005/03/06 16:04:16 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/9/sys/netinet/sctp_asconf.h ============================================================================== --- stable/9/sys/netinet/sctp_asconf.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_asconf.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_asconf.h,v 1.8 2005/03/06 16:04:16 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_auth.c ============================================================================== --- stable/9/sys/netinet/sctp_auth.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_auth.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: Modified: stable/9/sys/netinet/sctp_auth.h ============================================================================== --- stable/9/sys/netinet/sctp_auth.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_auth.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -33,8 +33,8 @@ #include __FBSDID("$FreeBSD$"); -#ifndef __SCTP_AUTH_H__ -#define __SCTP_AUTH_H__ +#ifndef _NETINET_SCTP_AUTH_H_ +#define _NETINET_SCTP_AUTH_H_ /* digest lengths */ Modified: stable/9/sys/netinet/sctp_bsd_addr.c ============================================================================== --- stable/9/sys/netinet/sctp_bsd_addr.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_bsd_addr.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_bsd_addr.h ============================================================================== --- stable/9/sys/netinet/sctp_bsd_addr.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_bsd_addr.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -33,8 +33,9 @@ #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_bsd_addr_h__ -#define __sctp_bsd_addr_h__ +#ifndef _NETINET_SCTP_BSD_ADDR_H_ +#define _NETINET_SCTP_BSD_ADDR_H_ + #include #if defined(_KERNEL) || defined(__Userspace__) Modified: stable/9/sys/netinet/sctp_cc_functions.c ============================================================================== --- stable/9/sys/netinet/sctp_cc_functions.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_cc_functions.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,6 +30,9 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -44,8 +47,6 @@ #include #include #include -#include -__FBSDID("$FreeBSD$"); #define SHIFT_MPTCP_MULTI_N 40 #define SHIFT_MPTCP_MULTI_Z 16 Modified: stable/9/sys/netinet/sctp_constants.h ============================================================================== --- stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_constants.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_constants.h,v 1.17 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_constants_h__ -#define __sctp_constants_h__ +#ifndef _NETINET_SCTP_CONSTANTS_H_ +#define _NETINET_SCTP_CONSTANTS_H_ /* IANA assigned port number for SCTP over UDP encapsulation */ /* For freebsd we cannot bind the port at Modified: stable/9/sys/netinet/sctp_crc32.c ============================================================================== --- stable/9/sys/netinet/sctp_crc32.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_crc32.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,9 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_crc32.c,v 1.12 2005/03/06 16:04:17 itojun Exp $ */ - - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_crc32.h ============================================================================== --- stable/9/sys/netinet/sctp_crc32.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_crc32.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_crc32.h,v 1.5 2004/08/17 04:06:16 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __crc32c_h__ -#define __crc32c_h__ +#ifndef _NETINET_SCTP_CRC32_H_ +#define _NETINET_SCTP_CRC32_H_ #if defined(_KERNEL) #if !defined(SCTP_WITH_NO_CSUM) Modified: stable/9/sys/netinet/sctp_dtrace_declare.h ============================================================================== --- stable/9/sys/netinet/sctp_dtrace_declare.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_dtrace_declare.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -28,9 +28,13 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_dtrace_declare_h__ + +#ifndef _NETINET_SCTP_DTRACE_DECLARE_H_ +#define _NETINET_SCTP_DTRACE_DECLARE_H_ + #include "opt_kdtrace.h" #include #include Modified: stable/9/sys/netinet/sctp_dtrace_define.h ============================================================================== --- stable/9/sys/netinet/sctp_dtrace_define.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_dtrace_define.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -28,9 +28,13 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_dtrace_define_h__ + +#ifndef _NETINET_SCTP_DTRACE_DEFINE_H_ +#define _NETINET_SCTP_DTRACE_DEFINE_H_ + #include "opt_kdtrace.h" #include #include Modified: stable/9/sys/netinet/sctp_header.h ============================================================================== --- stable/9/sys/netinet/sctp_header.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_header.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_header.h,v 1.14 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_header_h__ -#define __sctp_header_h__ +#ifndef _NETINET_SCTP_HEADER_H_ +#define _NETINET_SCTP_HEADER_H_ #include #include Modified: stable/9/sys/netinet/sctp_indata.c ============================================================================== --- stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_indata.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_indata.c,v 1.36 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_indata.h ============================================================================== --- stable/9/sys/netinet/sctp_indata.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_indata.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_indata.h,v 1.9 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_indata_h__ -#define __sctp_indata_h__ +#ifndef _NETINET_SCTP_INDATA_H_ +#define _NETINET_SCTP_INDATA_H_ #if defined(_KERNEL) || defined(__Userspace__) Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_input.c,v 1.27 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_input.h ============================================================================== --- stable/9/sys/netinet/sctp_input.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_input.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_input.h,v 1.6 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_input_h__ -#define __sctp_input_h__ +#ifndef _NETINET_SCTP_INPUT_H_ +#define _NETINET_SCTP_INPUT_H_ #if defined(_KERNEL) || defined(__Userspace__) void Modified: stable/9/sys/netinet/sctp_lock_bsd.h ============================================================================== --- stable/9/sys/netinet/sctp_lock_bsd.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_lock_bsd.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,9 +1,7 @@ -#ifndef __sctp_lock_bsd_h__ -#define __sctp_lock_bsd_h__ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -32,6 +30,12 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + +#ifndef _NETINET_SCTP_LOCK_BSD_H_ +#define _NETINET_SCTP_LOCK_BSD_H_ + /* * General locking concepts: The goal of our locking is to of course provide * consistency and yet minimize overhead. We will attempt to use @@ -70,9 +74,6 @@ * SCTP_INP_INFO_RLOCK() and then when we want to add a new association to * the SCTP_BASE_INFO() list's we will do a SCTP_INP_INFO_WLOCK(). */ -#include -__FBSDID("$FreeBSD$"); - extern struct sctp_foo_stuff sctp_logoff[]; extern int sctp_logoff_stuff; Modified: stable/9/sys/netinet/sctp_os.h ============================================================================== --- stable/9/sys/netinet/sctp_os.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_os.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2006-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -29,10 +29,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_os_h__ -#define __sctp_os_h__ + +#ifndef _NETINET_SCTP_OS_H_ +#define _NETINET_SCTP_OS_H_ /* * General kernel memory allocation: Modified: stable/9/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/9/sys/netinet/sctp_os_bsd.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_os_bsd.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2006-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -29,10 +29,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ + #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_os_bsd_h__ -#define __sctp_os_bsd_h__ + +#ifndef _NETINET_SCTP_OS_BSD_H_ +#define _NETINET_SCTP_OS_BSD_H_ /* * includes */ Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_output.h ============================================================================== --- stable/9/sys/netinet/sctp_output.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_output.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_output.h,v 1.14 2005/03/06 16:04:18 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_output_h__ -#define __sctp_output_h__ +#ifndef _NETINET_SCTP_OUTPUT_H_ +#define _NETINET_SCTP_OUTPUT_H_ #include Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_pcb.c,v 1.38 2005/03/06 16:04:18 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_pcb.h ============================================================================== --- stable/9/sys/netinet/sctp_pcb.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_pcb.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,8 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * @@ -29,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_pcb.h,v 1.21 2005/07/16 01:18:47 suz Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_pcb_h__ -#define __sctp_pcb_h__ +#ifndef _NETINET_SCTP_PCB_H_ +#define _NETINET_SCTP_PCB_H_ #include #include Modified: stable/9/sys/netinet/sctp_peeloff.c ============================================================================== --- stable/9/sys/netinet/sctp_peeloff.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_peeloff.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,11 +30,9 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ - -/* $KAME: sctp_peeloff.c,v 1.13 2005/03/06 16:04:18 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/9/sys/netinet/sctp_peeloff.h ============================================================================== --- stable/9/sys/netinet/sctp_peeloff.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_peeloff.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_peeloff.h,v 1.6 2005/03/06 16:04:18 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_peeloff_h__ -#define __sctp_peeloff_h__ +#ifndef _NETINET_SCTP_PEELOFF_H_ +#define _NETINET_SCTP_PEELOFF_H_ Modified: stable/9/sys/netinet/sctp_ss_functions.c ============================================================================== --- stable/9/sys/netinet/sctp_ss_functions.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_ss_functions.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- - * Copyright (c) 2010-2011, by Michael Tuexen. All rights reserved. - * Copyright (c) 2010-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2010-2011, by Robin Seggelmann. All rights reserved. + * Copyright (c) 2010-2012, by Michael Tuexen. All rights reserved. + * Copyright (c) 2010-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2010-2012, by Robin Seggelmann. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: Modified: stable/9/sys/netinet/sctp_structs.h ============================================================================== --- stable/9/sys/netinet/sctp_structs.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_structs.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,13 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_structs.h,v 1.13 2005/03/06 16:04:18 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_structs_h__ -#define __sctp_structs_h__ +#ifndef _NETINET_SCTP_STRUCTS_H_ +#define _NETINET_SCTP_STRUCTS_H_ #include #include Modified: stable/9/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/9/sys/netinet/sctp_sysctl.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_sysctl.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: Modified: stable/9/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/9/sys/netinet/sctp_sysctl.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_sysctl.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -33,8 +33,8 @@ #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_sysctl_h__ -#define __sctp_sysctl_h__ +#ifndef _NETINET_SCTP_SYSCTL_H_ +#define _NETINET_SCTP_SYSCTL_H_ #include #include Modified: stable/9/sys/netinet/sctp_timer.c ============================================================================== --- stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_timer.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_timer.c,v 1.29 2005/03/06 16:04:18 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctp_timer.h ============================================================================== --- stable/9/sys/netinet/sctp_timer.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_timer.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,12 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_timer.h,v 1.6 2005/03/06 16:04:18 itojun Exp $ */ #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_timer_h__ -#define __sctp_timer_h__ +#ifndef _NETINET_SCTP_TIMER_H_ +#define _NETINET_SCTP_TIMER_H_ #if defined(_KERNEL) || defined(__Userspace__) Modified: stable/9/sys/netinet/sctp_uio.h ============================================================================== --- stable/9/sys/netinet/sctp_uio.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_uio.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,12 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_uio.h,v 1.11 2005/03/06 16:04:18 itojun Exp $ */ #include __FBSDID("$FreeBSD$"); -#ifndef __sctp_uio_h__ -#define __sctp_uio_h__ +#ifndef _NETINET_SCTP_UIO_H_ +#define _NETINET_SCTP_UIO_H_ #if ! defined(_KERNEL) Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,10 +30,9 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_usrreq.c,v 1.48 2005/03/07 23:26:08 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/9/sys/netinet/sctp_var.h ============================================================================== --- stable/9/sys/netinet/sctp_var.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctp_var.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_var.h,v 1.24 2005/03/06 16:04:19 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctputil.c,v 1.37 2005/03/07 23:26:09 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet/sctputil.h ============================================================================== --- stable/9/sys/netinet/sctputil.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet/sctputil.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,14 +30,11 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ - -/* $KAME: sctputil.h,v 1.15 2005/03/06 16:04:19 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); -#ifndef __sctputil_h__ -#define __sctputil_h__ +#ifndef _NETINET_SCTP_UTIL_H_ +#define _NETINET_SCTP_UTIL_H_ #if defined(_KERNEL) || defined(__Userspace__) Modified: stable/9/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet6/sctp6_usrreq.c Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -29,7 +29,6 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp6_usrreq.c,v 1.38 2005/08/24 08:08:56 suz Exp $ */ #include __FBSDID("$FreeBSD$"); Modified: stable/9/sys/netinet6/sctp6_var.h ============================================================================== --- stable/9/sys/netinet6/sctp6_var.h Sun Jul 1 07:57:18 2012 (r237895) +++ stable/9/sys/netinet6/sctp6_var.h Sun Jul 1 07:59:00 2012 (r237896) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -29,14 +29,13 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp6_var.h,v 1.7 2004/08/17 04:06:22 itojun Exp $ */ - -#ifndef _NETINET6_SCTP6_VAR_H_ -#define _NETINET6_SCTP6_VAR_H_ #include __FBSDID("$FreeBSD$"); +#ifndef _NETINET6_SCTP6_VAR_H_ +#define _NETINET6_SCTP6_VAR_H_ + #if defined(_KERNEL) SYSCTL_DECL(_net_inet6_sctp6); From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:01:43 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6563D1065672; Sun, 1 Jul 2012 08:01:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 502008FC0A; Sun, 1 Jul 2012 08:01:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6181hIm075493; Sun, 1 Jul 2012 08:01:43 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6181hg3075491; Sun, 1 Jul 2012 08:01:43 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010801.q6181hg3075491@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237897 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:01:43 -0000 Author: tuexen Date: Sun Jul 1 08:01:42 2012 New Revision: 237897 URL: http://svn.freebsd.org/changeset/base/237897 Log: MFC r235903: Add sn_send_failed_event to sctp_notification. Modified: stable/9/sys/netinet/sctp_uio.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_uio.h ============================================================================== --- stable/9/sys/netinet/sctp_uio.h Sun Jul 1 07:59:00 2012 (r237896) +++ stable/9/sys/netinet/sctp_uio.h Sun Jul 1 08:01:42 2012 (r237897) @@ -523,10 +523,10 @@ union sctp_notification { struct sctp_pdapi_event sn_pdapi_event; struct sctp_authkey_event sn_auth_event; struct sctp_sender_dry_event sn_sender_dry_event; + struct sctp_send_failed_event sn_send_failed_event; struct sctp_stream_reset_event sn_strreset_event; struct sctp_assoc_reset_event sn_assocreset_event; struct sctp_stream_change_event sn_strchange_event; - }; /* notification types */ From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:04:11 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC7BC106564A; Sun, 1 Jul 2012 08:04:10 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6CD28FC12; Sun, 1 Jul 2012 08:04:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6184A1Z075662; Sun, 1 Jul 2012 08:04:10 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6184Ak7075660; Sun, 1 Jul 2012 08:04:10 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010804.q6184Ak7075660@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237898 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:04:11 -0000 Author: tuexen Date: Sun Jul 1 08:04:10 2012 New Revision: 237898 URL: http://svn.freebsd.org/changeset/base/237898 Log: MFC r235990: Undefine SCTP_PACKED before including sctp_uio.h, which doesn't use it. Spotted by Irene Ruengeler. Modified: stable/9/sys/netinet/sctp.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp.h ============================================================================== --- stable/9/sys/netinet/sctp.h Sun Jul 1 08:01:42 2012 (r237897) +++ stable/9/sys/netinet/sctp.h Sun Jul 1 08:04:10 2012 (r237898) @@ -556,6 +556,8 @@ struct sctp_error_unrecognized_chunk { #define SCTP_SMALLEST_PMTU 512 /* smallest pmtu allowed when disabling PMTU * discovery */ +#undef SCTP_PACKED + #include /* This dictates the size of the packet @@ -607,7 +609,4 @@ struct sctp_error_unrecognized_chunk { #define SCTP_LOG_AT_SEND_2_OUTQ 0x08000000 #define SCTP_LOG_TRY_ADVANCE 0x10000000 - -#undef SCTP_PACKED - #endif /* !_NETINET_SCTP_H_ */ From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:06:43 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E32191065672; Sun, 1 Jul 2012 08:06:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDF098FC12; Sun, 1 Jul 2012 08:06:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6186hjc075919; Sun, 1 Jul 2012 08:06:43 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6186hbE075916; Sun, 1 Jul 2012 08:06:43 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010806.q6186hbE075916@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:06:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237899 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:06:44 -0000 Author: tuexen Date: Sun Jul 1 08:06:43 2012 New Revision: 237899 URL: http://svn.freebsd.org/changeset/base/237899 Log: MFC r236391: Small cleanups. No functional change. Modified: stable/9/sys/netinet/sctp_asconf.c stable/9/sys/netinet/sctputil.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 08:04:10 2012 (r237898) +++ stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 08:06:43 2012 (r237899) @@ -48,8 +48,6 @@ __FBSDID("$FreeBSD$"); * SCTP_DEBUG_ASCONF1: protocol info, general info and errors * SCTP_DEBUG_ASCONF2: detailed info */ -#ifdef SCTP_DEBUG -#endif /* SCTP_DEBUG */ static void Modified: stable/9/sys/netinet/sctputil.h ============================================================================== --- stable/9/sys/netinet/sctputil.h Sun Jul 1 08:04:10 2012 (r237898) +++ stable/9/sys/netinet/sctputil.h Sun Jul 1 08:06:43 2012 (r237899) @@ -381,7 +381,5 @@ sctp_auditing(int, struct sctp_inpcb *, void sctp_audit_log(uint8_t, uint8_t); #endif - - #endif /* _KERNEL */ #endif From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:09:06 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C1301065670; Sun, 1 Jul 2012 08:09:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AFF28FC0C; Sun, 1 Jul 2012 08:09:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618961U076065; Sun, 1 Jul 2012 08:09:06 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61895MJ076061; Sun, 1 Jul 2012 08:09:05 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010809.q61895MJ076061@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:09:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237900 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:09:06 -0000 Author: tuexen Date: Sun Jul 1 08:09:05 2012 New Revision: 237900 URL: http://svn.freebsd.org/changeset/base/237900 Log: MFC r236450: Remove an unused parameter. Modified: stable/9/sys/netinet/sctp_input.c stable/9/sys/netinet/sctputil.c stable/9/sys/netinet/sctputil.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 08:06:43 2012 (r237899) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 08:09:05 2012 (r237900) @@ -4516,7 +4516,7 @@ __attribute__((noinline)) } if (stcb == NULL) { /* no association, so it's out of the blue... */ - sctp_handle_ootb(m, iphlen, *offset, sh, inp, NULL, + sctp_handle_ootb(m, iphlen, *offset, sh, inp, vrf_id, port); *offset = length; if (locked_tcb) { @@ -4554,7 +4554,7 @@ __attribute__((noinline)) SCTP_TCB_UNLOCK(locked_tcb); } sctp_handle_ootb(m, iphlen, *offset, sh, inp, - NULL, vrf_id, port); + vrf_id, port); return (NULL); } } else { @@ -5586,7 +5586,7 @@ sctp_common_input_processing(struct mbuf * NOT respond to any packet.. its OOTB. */ SCTP_TCB_UNLOCK(stcb); - sctp_handle_ootb(m, iphlen, offset, sh, inp, NULL, + sctp_handle_ootb(m, iphlen, offset, sh, inp, vrf_id, port); goto out_now; } @@ -5630,7 +5630,7 @@ sctp_common_input_processing(struct mbuf } if (stcb == NULL) { /* out of the blue DATA chunk */ - sctp_handle_ootb(m, iphlen, offset, sh, inp, NULL, + sctp_handle_ootb(m, iphlen, offset, sh, inp, vrf_id, port); goto out_now; } @@ -5699,7 +5699,7 @@ sctp_common_input_processing(struct mbuf /* * We consider OOTB any data sent during asoc setup. */ - sctp_handle_ootb(m, iphlen, offset, sh, inp, NULL, + sctp_handle_ootb(m, iphlen, offset, sh, inp, vrf_id, port); SCTP_TCB_UNLOCK(stcb); goto out_now; Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 08:06:43 2012 (r237899) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 08:09:05 2012 (r237900) @@ -3994,7 +3994,7 @@ sctp_abort_an_association(struct sctp_in void sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh, - struct sctp_inpcb *inp, struct mbuf *op_err, uint32_t vrf_id, uint16_t port) + struct sctp_inpcb *inp, uint32_t vrf_id, uint16_t port) { struct sctp_chunkhdr *ch, chunk_buf; unsigned int chk_length; @@ -4049,7 +4049,7 @@ sctp_handle_ootb(struct mbuf *m, int iph if ((SCTP_BASE_SYSCTL(sctp_blackhole) == 0) || ((SCTP_BASE_SYSCTL(sctp_blackhole) == 1) && (contains_init_chunk == 0))) { - sctp_send_abort(m, iphlen, sh, 0, op_err, vrf_id, port); + sctp_send_abort(m, iphlen, sh, 0, NULL, vrf_id, port); } } Modified: stable/9/sys/netinet/sctputil.h ============================================================================== --- stable/9/sys/netinet/sctputil.h Sun Jul 1 08:06:43 2012 (r237899) +++ stable/9/sys/netinet/sctputil.h Sun Jul 1 08:09:05 2012 (r237900) @@ -200,7 +200,7 @@ sctp_abort_an_association(struct sctp_in void sctp_handle_ootb(struct mbuf *, int, int, struct sctphdr *, - struct sctp_inpcb *, struct mbuf *, uint32_t, uint16_t); + struct sctp_inpcb *, uint32_t, uint16_t); int sctp_connectx_helper_add(struct sctp_tcb *stcb, struct sockaddr *addr, From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:11:16 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D55B106564A; Sun, 1 Jul 2012 08:11:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E2948FC19; Sun, 1 Jul 2012 08:11:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618BGLL076259; Sun, 1 Jul 2012 08:11:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618BG0w076257; Sun, 1 Jul 2012 08:11:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010811.q618BG0w076257@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:11:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237902 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:11:16 -0000 Author: tuexen Date: Sun Jul 1 08:11:15 2012 New Revision: 237902 URL: http://svn.freebsd.org/changeset/base/237902 Log: MFC r236492: Don't request data from the IPv6 layer, which is not used. Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 08:10:49 2012 (r237901) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 08:11:15 2012 (r237902) @@ -11059,11 +11059,8 @@ sctp_send_shutdown_complete2(struct mbuf #endif #ifdef INET6 if (ip6_out != NULL) { - struct route_in6 ro; int ret; - struct ifnet *ifp = NULL; - bzero(&ro, sizeof(ro)); mlen = SCTP_BUF_LEN(mout); #ifdef SCTP_PACKET_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) @@ -11089,11 +11086,7 @@ sctp_send_shutdown_complete2(struct mbuf SCTP_STAT_INCR(sctps_sendhwcrc); #endif } - SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, NULL, vrf_id); - - /* Free the route if we got one back */ - if (ro.ro_rt) - RTFREE(ro.ro_rt); + SCTP_IP6_OUTPUT(ret, o_pak, NULL, NULL, NULL, vrf_id); } #endif SCTP_STAT_INCR(sctps_sendpackets); @@ -12160,12 +12153,8 @@ sctp_send_abort(struct mbuf *m, int iphl #endif #ifdef INET6 if (ip6_out != NULL) { - struct route_in6 ro; int ret; - struct ifnet *ifp = NULL; - /* zap the stack pointer to the route */ - bzero(&ro, sizeof(ro)); if (port) { udp->uh_ulen = htons(len - sizeof(struct ip6_hdr)); } @@ -12196,11 +12185,7 @@ sctp_send_abort(struct mbuf *m, int iphl SCTP_STAT_INCR(sctps_sendhwcrc); #endif } - SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, NULL, vrf_id); - - /* Free the route if we got one back */ - if (ro.ro_rt) - RTFREE(ro.ro_rt); + SCTP_IP6_OUTPUT(ret, o_pak, NULL, NULL, NULL, vrf_id); } #endif SCTP_STAT_INCR(sctps_sendpackets); @@ -12426,12 +12411,8 @@ sctp_send_operr_to(struct mbuf *m, int i #endif #ifdef INET6 if (ip6_out != NULL) { - struct route_in6 ro; int ret; - struct ifnet *ifp = NULL; - /* zap the stack pointer to the route */ - bzero(&ro, sizeof(ro)); if (port) { udp->uh_ulen = htons(len - sizeof(struct ip6_hdr)); } @@ -12460,11 +12441,7 @@ sctp_send_operr_to(struct mbuf *m, int i SCTP_STAT_INCR(sctps_sendhwcrc); #endif } - SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, NULL, vrf_id); - - /* Free the route if we got one back */ - if (ro.ro_rt) - RTFREE(ro.ro_rt); + SCTP_IP6_OUTPUT(ret, o_pak, NULL, NULL, NULL, vrf_id); } #endif SCTP_STAT_INCR(sctps_sendpackets); From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:13:21 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F25B1065673; Sun, 1 Jul 2012 08:13:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 79F998FC18; Sun, 1 Jul 2012 08:13:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618DLQK076402; Sun, 1 Jul 2012 08:13:21 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618DLhn076400; Sun, 1 Jul 2012 08:13:21 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010813.q618DLhn076400@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237903 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:13:21 -0000 Author: tuexen Date: Sun Jul 1 08:13:20 2012 New Revision: 237903 URL: http://svn.freebsd.org/changeset/base/237903 Log: MFC r236493: Honor sysctl for TTL. Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Jul 1 08:11:15 2012 (r237902) +++ stable/9/sys/netinet/sctp_output.c Sun Jul 1 08:13:20 2012 (r237903) @@ -10935,7 +10935,7 @@ sctp_send_shutdown_complete2(struct mbuf iph_out->ip_tos = (u_char)0; iph_out->ip_id = 0; iph_out->ip_off = 0; - iph_out->ip_ttl = MAXTTL; + iph_out->ip_ttl = MODULE_GLOBAL(ip_defttl); if (port) { iph_out->ip_p = IPPROTO_UDP; } else { @@ -12004,7 +12004,7 @@ sctp_send_abort(struct mbuf *m, int iphl iph_out->ip_tos = (u_char)0; iph_out->ip_id = 0; iph_out->ip_off = 0; - iph_out->ip_ttl = MAXTTL; + iph_out->ip_ttl = MODULE_GLOBAL(ip_defttl); if (port) { iph_out->ip_p = IPPROTO_UDP; } else { @@ -12267,7 +12267,7 @@ sctp_send_operr_to(struct mbuf *m, int i iph_out->ip_tos = (u_char)0; iph_out->ip_id = 0; iph_out->ip_off = 0; - iph_out->ip_ttl = MAXTTL; + iph_out->ip_ttl = MODULE_GLOBAL(ip_defttl); if (port) { iph_out->ip_p = IPPROTO_UDP; } else { From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:18:41 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5BC9C106564A; Sun, 1 Jul 2012 08:18:41 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CB9E8FC08; Sun, 1 Jul 2012 08:18:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618IfcT076693; Sun, 1 Jul 2012 08:18:41 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618IfHc076691; Sun, 1 Jul 2012 08:18:41 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010818.q618IfHc076691@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237904 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:18:41 -0000 Author: tuexen Date: Sun Jul 1 08:18:40 2012 New Revision: 237904 URL: http://svn.freebsd.org/changeset/base/237904 Log: MFC r236515: Use an existing function to get the source address. Modified: stable/9/sys/netinet/sctp_asconf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_asconf.c ============================================================================== --- stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 08:13:20 2012 (r237903) +++ stable/9/sys/netinet/sctp_asconf.c Sun Jul 1 08:18:40 2012 (r237904) @@ -856,70 +856,20 @@ send_reply: * this could happen if the source address was just newly * added */ - struct ip *iph; - struct sctphdr *sh; - struct sockaddr_storage from_store; - struct sockaddr *from = (struct sockaddr *)&from_store; + struct sockaddr_storage addr; + struct sockaddr *src = (struct sockaddr *)&addr; SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: looking up net for IP source address\n"); - /* pullup already done, IP options already stripped */ - iph = mtod(m, struct ip *); - switch (iph->ip_v) { -#ifdef INET - case IPVERSION: - { - struct sockaddr_in *from4; - - sh = (struct sctphdr *)((caddr_t)iph + sizeof(*iph)); - from4 = (struct sockaddr_in *)&from_store; - bzero(from4, sizeof(*from4)); - from4->sin_family = AF_INET; - from4->sin_len = sizeof(struct sockaddr_in); - from4->sin_addr.s_addr = iph->ip_src.s_addr; - from4->sin_port = sh->src_port; - break; - } -#endif -#ifdef INET6 - case IPV6_VERSION >> 4: - { - struct ip6_hdr *ip6; - struct sockaddr_in6 *from6; - - ip6 = mtod(m, struct ip6_hdr *); - sh = (struct sctphdr *)((caddr_t)ip6 + sizeof(*ip6)); - from6 = (struct sockaddr_in6 *)&from_store; - bzero(from6, sizeof(*from6)); - from6->sin6_family = AF_INET6; - from6->sin6_len = sizeof(struct sockaddr_in6); - from6->sin6_addr = ip6->ip6_src; - from6->sin6_port = sh->src_port; - /* - * Get the scopes in properly to the sin6 - * addr's - */ - /* we probably don't need these operations */ - (void)sa6_recoverscope(from6); - sa6_embedscope(from6, - MODULE_GLOBAL(ip6_use_defzone)); - - break; - } -#endif - default: - /* unknown address type */ - from = NULL; - } - if (from != NULL) { - SCTPDBG(SCTP_DEBUG_ASCONF1, "Looking for IP source: "); - SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, from); - /* look up the from address */ - stcb->asoc.last_control_chunk_from = sctp_findnet(stcb, from); + sctp_asconf_get_source_ip(m, src); + SCTPDBG(SCTP_DEBUG_ASCONF1, "Looking for IP source: "); + SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, src); + /* look up the from address */ + stcb->asoc.last_control_chunk_from = sctp_findnet(stcb, src); #ifdef SCTP_DEBUG - if (stcb->asoc.last_control_chunk_from == NULL) - SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: IP source address not found?!\n"); -#endif + if (stcb->asoc.last_control_chunk_from == NULL) { + SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: IP source address not found?!\n"); } +#endif } } From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:21:09 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2010C106566B; Sun, 1 Jul 2012 08:21:09 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A80B8FC18; Sun, 1 Jul 2012 08:21:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618L8o8076907; Sun, 1 Jul 2012 08:21:08 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618L8uP076905; Sun, 1 Jul 2012 08:21:08 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010821.q618L8uP076905@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237906 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:21:09 -0000 Author: tuexen Date: Sun Jul 1 08:21:08 2012 New Revision: 237906 URL: http://svn.freebsd.org/changeset/base/237906 Log: MFC r236522: Remove code which is not needed. Modified: stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 08:20:13 2012 (r237905) +++ stable/9/sys/netinet/sctp_pcb.c Sun Jul 1 08:21:08 2012 (r237906) @@ -2187,8 +2187,6 @@ sctp_findassociation_addr(struct mbuf *m from6->sin6_addr = ip6->ip6_src; from6->sin6_port = sh->src_port; /* Get the scopes in properly to the sin6 addr's */ - /* we probably don't need these operations */ - (void)sa6_recoverscope(from6); sa6_embedscope(from6, MODULE_GLOBAL(ip6_use_defzone)); break; } @@ -2230,8 +2228,6 @@ sctp_findassociation_addr(struct mbuf *m to6->sin6_addr = ip6->ip6_dst; to6->sin6_port = sh->dest_port; /* Get the scopes in properly to the sin6 addr's */ - /* we probably don't need these operations */ - (void)sa6_recoverscope(to6); sa6_embedscope(to6, MODULE_GLOBAL(ip6_use_defzone)); break; } From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:23:17 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26A351065673; Sun, 1 Jul 2012 08:23:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11BA18FC15; Sun, 1 Jul 2012 08:23:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618NG1v077060; Sun, 1 Jul 2012 08:23:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618NGXj077058; Sun, 1 Jul 2012 08:23:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010823.q618NGXj077058@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237907 - stable/9/share/man/man4 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:23:17 -0000 Author: tuexen Date: Sun Jul 1 08:23:16 2012 New Revision: 237907 URL: http://svn.freebsd.org/changeset/base/237907 Log: MFC r236640: The cmsg_len field includes the cmsg header. So use CMSG_LEN(). Modified: stable/9/share/man/man4/ip.4 Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/ip.4 ============================================================================== --- stable/9/share/man/man4/ip.4 Sun Jul 1 08:21:08 2012 (r237906) +++ stable/9/share/man/man4/ip.4 Sun Jul 1 08:23:16 2012 (r237907) @@ -165,7 +165,7 @@ The .Vt cmsghdr fields have the following values: .Bd -literal -cmsg_len = sizeof(struct in_addr) +cmsg_len = CMSG_LEN(sizeof(struct in_addr)) cmsg_level = IPPROTO_IP cmsg_type = IP_RECVDSTADDR .Ed @@ -184,7 +184,7 @@ structure followed by the address. The cmsghdr fields should have the following values: .Bd -literal -cmsg_len = sizeof(struct in_addr) +cmsg_len = CMSG_LEN(sizeof(struct in_addr)) cmsg_level = IPPROTO_IP cmsg_type = IP_SENDSRCADDR .Ed @@ -279,7 +279,7 @@ that contains a cmsghdr structure follow .Tn TTL . The cmsghdr fields have the following values: .Bd -literal -cmsg_len = sizeof(u_char) +cmsg_len = CMSG_LEN(sizeof(u_char)) cmsg_level = IPPROTO_IP cmsg_type = IP_RECVTTL .Ed @@ -307,7 +307,7 @@ The .Vt cmsghdr fields have the following values: .Bd -literal -cmsg_len = sizeof(struct sockaddr_dl) +cmsg_len = CMSG_LEN(sizeof(struct sockaddr_dl)) cmsg_level = IPPROTO_IP cmsg_type = IP_RECVIF .Ed From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:27:03 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50B02106566C; Sun, 1 Jul 2012 08:27:03 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BC318FC14; Sun, 1 Jul 2012 08:27:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618R3nr077286; Sun, 1 Jul 2012 08:27:03 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618R3P9077284; Sun, 1 Jul 2012 08:27:03 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010827.q618R3P9077284@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:27:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237908 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:27:03 -0000 Author: tuexen Date: Sun Jul 1 08:27:02 2012 New Revision: 237908 URL: http://svn.freebsd.org/changeset/base/237908 Log: MFC r236949: Small cleanup. Modified: stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 08:23:16 2012 (r237907) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 08:27:02 2012 (r237908) @@ -2573,15 +2573,13 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa /* find the last mbuf in chain and pad it */ struct mbuf *m_at; - m_at = m; if (last_mbuf) { return (sctp_add_pad_tombuf(last_mbuf, padval)); } else { - while (m_at) { + for (m_at = m; m_at; m_at = SCTP_BUF_NEXT(m_at)) { if (SCTP_BUF_NEXT(m_at) == NULL) { return (sctp_add_pad_tombuf(m_at, padval)); } - m_at = SCTP_BUF_NEXT(m_at); } } SCTP_LTRACE_ERR_RET_PKT(m, NULL, NULL, NULL, SCTP_FROM_SCTPUTIL, EFAULT); From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:32:49 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8EF20106566B; Sun, 1 Jul 2012 08:32:49 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 797C78FC08; Sun, 1 Jul 2012 08:32:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618WnE7077597; Sun, 1 Jul 2012 08:32:49 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618Wn3o077595; Sun, 1 Jul 2012 08:32:49 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010832.q618Wn3o077595@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237909 - stable/9/sys/netinet6 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:32:49 -0000 Author: tuexen Date: Sun Jul 1 08:32:48 2012 New Revision: 237909 URL: http://svn.freebsd.org/changeset/base/237909 Log: MFC r236958: Deliver IPV6_TCLASS, IPV6_HOPLIMIT and IPV6_PKTINFO cmsgs (if requested) on IPV6 sockets, which have been marked to be not IPV6_V6ONLY, for each received IPV4 packet. Modified: stable/9/sys/netinet6/ip6_input.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/ip6_input.c ============================================================================== --- stable/9/sys/netinet6/ip6_input.c Sun Jul 1 08:27:02 2012 (r237908) +++ stable/9/sys/netinet6/ip6_input.c Sun Jul 1 08:32:48 2012 (r237909) @@ -1299,19 +1299,28 @@ ip6_savecontrol_v4(struct inpcb *inp, st } #endif - if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { - if (v4only != NULL) - *v4only = 1; - return (mp); - } - #define IS2292(inp, x, y) (((inp)->inp_flags & IN6P_RFC2292) ? (x) : (y)) /* RFC 2292 sec. 5 */ if ((inp->inp_flags & IN6P_PKTINFO) != 0) { struct in6_pktinfo pi6; - bcopy(&ip6->ip6_dst, &pi6.ipi6_addr, sizeof(struct in6_addr)); - in6_clearscope(&pi6.ipi6_addr); /* XXX */ + if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { +#ifdef INET + struct ip *ip; + + ip = mtod(m, struct ip *); + pi6.ipi6_addr.s6_addr32[0] = 0; + pi6.ipi6_addr.s6_addr32[1] = 0; + pi6.ipi6_addr.s6_addr32[2] = IPV6_ADDR_INT32_SMP; + pi6.ipi6_addr.s6_addr32[3] = ip->ip_dst.s_addr; +#else + /* We won't hit this code */ + bzero(&pi6.ipi6_addr, sizeof(struct in6_addr)); +#endif + } else { + bcopy(&ip6->ip6_dst, &pi6.ipi6_addr, sizeof(struct in6_addr)); + in6_clearscope(&pi6.ipi6_addr); /* XXX */ + } pi6.ipi6_ifindex = (m && m->m_pkthdr.rcvif) ? m->m_pkthdr.rcvif->if_index : 0; @@ -1323,8 +1332,21 @@ ip6_savecontrol_v4(struct inpcb *inp, st } if ((inp->inp_flags & IN6P_HOPLIMIT) != 0) { - int hlim = ip6->ip6_hlim & 0xff; + int hlim; + + if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { +#ifdef INET + struct ip *ip; + ip = mtod(m, struct ip *); + hlim = ip->ip_ttl; +#else + /* We won't hit this code */ + hlim = 0; +#endif + } else { + hlim = ip6->ip6_hlim & 0xff; + } *mp = sbcreatecontrol((caddr_t) &hlim, sizeof(int), IS2292(inp, IPV6_2292HOPLIMIT, IPV6_HOPLIMIT), IPPROTO_IPV6); @@ -1332,8 +1354,40 @@ ip6_savecontrol_v4(struct inpcb *inp, st mp = &(*mp)->m_next; } - if (v4only != NULL) - *v4only = 0; + if ((inp->inp_flags & IN6P_TCLASS) != 0) { + int tclass; + + if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { +#ifdef INET + struct ip *ip; + + ip = mtod(m, struct ip *); + tclass = ip->ip_tos; +#else + /* We won't hit this code */ + tclass = 0; +#endif + } else { + u_int32_t flowinfo; + + flowinfo = (u_int32_t)ntohl(ip6->ip6_flow & IPV6_FLOWINFO_MASK); + flowinfo >>= 20; + tclass = flowinfo & 0xff; + } + *mp = sbcreatecontrol((caddr_t) &tclass, sizeof(int), + IPV6_TCLASS, IPPROTO_IPV6); + if (*mp) + mp = &(*mp)->m_next; + } + + if (v4only != NULL) { + if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { + *v4only = 1; + } else { + *v4only = 0; + } + } + return (mp); } @@ -1347,20 +1401,6 @@ ip6_savecontrol(struct inpcb *in6p, stru if (v4only) return; - if ((in6p->inp_flags & IN6P_TCLASS) != 0) { - u_int32_t flowinfo; - int tclass; - - flowinfo = (u_int32_t)ntohl(ip6->ip6_flow & IPV6_FLOWINFO_MASK); - flowinfo >>= 20; - - tclass = flowinfo & 0xff; - *mp = sbcreatecontrol((caddr_t) &tclass, sizeof(tclass), - IPV6_TCLASS, IPPROTO_IPV6); - if (*mp) - mp = &(*mp)->m_next; - } - /* * IPV6_HOPOPTS socket option. Recall that we required super-user * privilege for the option (see ip6_ctloutput), but it might be too From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:47:16 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97423106566C; Sun, 1 Jul 2012 08:47:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 774B28FC14; Sun, 1 Jul 2012 08:47:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618lGVZ078259; Sun, 1 Jul 2012 08:47:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618lG5n078251; Sun, 1 Jul 2012 08:47:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010847.q618lG5n078251@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237910 - in stable/9: share/man/man4 sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:47:16 -0000 Author: tuexen Date: Sun Jul 1 08:47:15 2012 New Revision: 237910 URL: http://svn.freebsd.org/changeset/base/237910 Log: MFC r236959: Add a IP_RECVTOS socket option to receive for received UDP/IPv4 packets a cmsg of type IP_RECVTOS which contains the TOS byte. Much like IP_RECVTTL does for TTL. This allows to implement a protocol on top of UDP and implementing ECN. Modified: stable/9/share/man/man4/ip.4 stable/9/sys/netinet/in.h stable/9/sys/netinet/in_pcb.c stable/9/sys/netinet/in_pcb.h stable/9/sys/netinet/ip_input.c stable/9/sys/netinet/ip_output.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/share/man/man4/ip.4 ============================================================================== --- stable/9/share/man/man4/ip.4 Sun Jul 1 08:32:48 2012 (r237909) +++ stable/9/share/man/man4/ip.4 Sun Jul 1 08:47:15 2012 (r237910) @@ -32,7 +32,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd June 1, 2009 +.Dd June 12, 2012 .Dt IP 4 .Os .Sh NAME @@ -286,6 +286,29 @@ cmsg_type = IP_RECVTTL .\" .Pp If the +.Dv IP_RECVTOS +option is enabled on a +.Dv SOCK_DGRAM +socket, the +.Xr recvmsg 2 +call will return the +.Tn IP +.Tn TOS +(type of service) field for a +.Tn UDP +datagram. +The msg_control field in the msghdr structure points to a buffer +that contains a cmsghdr structure followed by the +.Tn TOS . +The cmsghdr fields have the following values: +.Bd -literal +cmsg_len = CMSG_LEN(sizeof(u_char)) +cmsg_level = IPPROTO_IP +cmsg_type = IP_RECVTOS +.Ed +.\" +.Pp +If the .Dv IP_RECVIF option is enabled on a .Dv SOCK_DGRAM Modified: stable/9/sys/netinet/in.h ============================================================================== --- stable/9/sys/netinet/in.h Sun Jul 1 08:32:48 2012 (r237909) +++ stable/9/sys/netinet/in.h Sun Jul 1 08:47:15 2012 (r237910) @@ -461,6 +461,7 @@ __END_DECLS #define IP_RECVTTL 65 /* bool; receive IP TTL w/dgram */ #define IP_MINTTL 66 /* minimum TTL for packet or drop */ #define IP_DONTFRAG 67 /* don't fragment packet */ +#define IP_RECVTOS 68 /* bool; receive IP TOS w/dgram */ /* IPv4 Source Filter Multicast API [RFC3678] */ #define IP_ADD_SOURCE_MEMBERSHIP 70 /* join a source-specific group */ Modified: stable/9/sys/netinet/in_pcb.c ============================================================================== --- stable/9/sys/netinet/in_pcb.c Sun Jul 1 08:32:48 2012 (r237909) +++ stable/9/sys/netinet/in_pcb.c Sun Jul 1 08:47:15 2012 (r237910) @@ -2295,6 +2295,10 @@ db_print_inpflags(int inp_flags) db_printf("%sINP_DONTFRAG", comma ? ", " : ""); comma = 1; } + if (inp_flags & INP_RECVTOS) { + db_printf("%sINP_RECVTOS", comma ? ", " : ""); + comma = 1; + } if (inp_flags & IN6P_IPV6_V6ONLY) { db_printf("%sIN6P_IPV6_V6ONLY", comma ? ", " : ""); comma = 1; Modified: stable/9/sys/netinet/in_pcb.h ============================================================================== --- stable/9/sys/netinet/in_pcb.h Sun Jul 1 08:32:48 2012 (r237909) +++ stable/9/sys/netinet/in_pcb.h Sun Jul 1 08:47:15 2012 (r237910) @@ -509,6 +509,7 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_DONTFRAG 0x00000800 /* don't fragment packet */ #define INP_BINDANY 0x00001000 /* allow bind to any address */ #define INP_INHASHLIST 0x00002000 /* in_pcbinshash() has been called */ +#define INP_RECVTOS 0x00004000 /* receive incoming IP TOS */ #define IN6P_IPV6_V6ONLY 0x00008000 /* restrict AF_INET6 socket for v6 */ #define IN6P_PKTINFO 0x00010000 /* receive IP6 dst and I/F */ #define IN6P_HOPLIMIT 0x00020000 /* receive hoplimit */ @@ -528,7 +529,7 @@ void inp_4tuple_get(struct inpcb *inp, #define IN6P_MTU 0x80000000 /* receive path MTU */ #define INP_CONTROLOPTS (INP_RECVOPTS|INP_RECVRETOPTS|INP_RECVDSTADDR|\ - INP_RECVIF|INP_RECVTTL|\ + INP_RECVIF|INP_RECVTTL|INP_RECVTOS|\ IN6P_PKTINFO|IN6P_HOPLIMIT|IN6P_HOPOPTS|\ IN6P_DSTOPTS|IN6P_RTHDR|IN6P_RTHDRDSTOPTS|\ IN6P_TCLASS|IN6P_AUTOFLOWLABEL|IN6P_RFC2292|\ Modified: stable/9/sys/netinet/ip_input.c ============================================================================== --- stable/9/sys/netinet/ip_input.c Sun Jul 1 08:32:48 2012 (r237909) +++ stable/9/sys/netinet/ip_input.c Sun Jul 1 08:47:15 2012 (r237910) @@ -1684,6 +1684,12 @@ makedummy: if (*mp) mp = &(*mp)->m_next; } + if (inp->inp_flags & INP_RECVTOS) { + *mp = sbcreatecontrol((caddr_t) &ip->ip_tos, + sizeof(u_char), IP_RECVTOS, IPPROTO_IP); + if (*mp) + mp = &(*mp)->m_next; + } } /* Modified: stable/9/sys/netinet/ip_output.c ============================================================================== --- stable/9/sys/netinet/ip_output.c Sun Jul 1 08:32:48 2012 (r237909) +++ stable/9/sys/netinet/ip_output.c Sun Jul 1 08:47:15 2012 (r237910) @@ -984,6 +984,7 @@ ip_ctloutput(struct socket *so, struct s case IP_FAITH: case IP_ONESBCAST: case IP_DONTFRAG: + case IP_RECVTOS: error = sooptcopyin(sopt, &optval, sizeof optval, sizeof optval); if (error) @@ -1047,6 +1048,9 @@ ip_ctloutput(struct socket *so, struct s case IP_BINDANY: OPTSET(INP_BINDANY); break; + case IP_RECVTOS: + OPTSET(INP_RECVTOS); + break; } break; #undef OPTSET @@ -1156,6 +1160,7 @@ ip_ctloutput(struct socket *so, struct s case IP_ONESBCAST: case IP_DONTFRAG: case IP_BINDANY: + case IP_RECVTOS: switch (sopt->sopt_name) { case IP_TOS: @@ -1214,6 +1219,9 @@ ip_ctloutput(struct socket *so, struct s case IP_BINDANY: optval = OPTBIT(INP_BINDANY); break; + case IP_RECVTOS: + optval = OPTBIT(INP_RECVTOS); + break; } error = sooptcopyout(sopt, &optval, sizeof optval); break; From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:53:56 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D13E106564A; Sun, 1 Jul 2012 08:53:56 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 16EDF8FC14; Sun, 1 Jul 2012 08:53:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618rtKG078564; Sun, 1 Jul 2012 08:53:55 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618rtdT078562; Sun, 1 Jul 2012 08:53:55 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010853.q618rtdT078562@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237911 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:53:56 -0000 Author: tuexen Date: Sun Jul 1 08:53:55 2012 New Revision: 237911 URL: http://svn.freebsd.org/changeset/base/237911 Log: MFC r236961: Add a cmsg of type IP_TOS for UDP/IPv4 sockets to specify the TOS byte. Modified: stable/9/sys/netinet/udp_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/udp_usrreq.c ============================================================================== --- stable/9/sys/netinet/udp_usrreq.c Sun Jul 1 08:47:15 2012 (r237910) +++ stable/9/sys/netinet/udp_usrreq.c Sun Jul 1 08:53:55 2012 (r237911) @@ -956,6 +956,7 @@ udp_output(struct inpcb *inp, struct mbu int ipflags; u_short fport, lport; int unlock_udbinfo; + u_char tos; /* * udp_output() may need to temporarily bind or connect the current @@ -971,6 +972,7 @@ udp_output(struct inpcb *inp, struct mbu } src.sin_family = 0; + tos = inp->inp_ip_tos; if (control != NULL) { /* * XXX: Currently, we assume all the optional information is @@ -1008,6 +1010,14 @@ udp_output(struct inpcb *inp, struct mbu *(struct in_addr *)CMSG_DATA(cm); break; + case IP_TOS: + if (cm->cmsg_len != CMSG_LEN(sizeof(u_char))) { + error = EINVAL; + break; + } + tos = *(u_char *)CMSG_DATA(cm); + break; + default: error = ENOPROTOOPT; break; @@ -1223,7 +1233,7 @@ udp_output(struct inpcb *inp, struct mbu ui->ui_sum = 0; ((struct ip *)ui)->ip_len = sizeof (struct udpiphdr) + len; ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; /* XXX */ - ((struct ip *)ui)->ip_tos = inp->inp_ip_tos; /* XXX */ + ((struct ip *)ui)->ip_tos = tos; /* XXX */ UDPSTAT_INC(udps_opackets); if (unlock_udbinfo == UH_WLOCKED) From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 08:57:29 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D4931065672; Sun, 1 Jul 2012 08:57:29 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F0F58FC14; Sun, 1 Jul 2012 08:57:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q618vS9n078779; Sun, 1 Jul 2012 08:57:28 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q618vSvn078777; Sun, 1 Jul 2012 08:57:28 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010857.q618vSvn078777@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 08:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237912 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 08:57:29 -0000 Author: tuexen Date: Sun Jul 1 08:57:28 2012 New Revision: 237912 URL: http://svn.freebsd.org/changeset/base/237912 Log: MFC r237229: Cleanup the UDP decapsulation code. Modified: stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Sun Jul 1 08:53:55 2012 (r237911) +++ stable/9/sys/netinet/sctputil.c Sun Jul 1 08:57:28 2012 (r237912) @@ -6827,83 +6827,61 @@ sctp_recv_udp_tunneled_packet(struct mbu struct ip *iph; struct mbuf *sp, *last; struct udphdr *uhdr; - uint16_t port = 0; - int header_size = sizeof(struct udphdr) + sizeof(struct sctphdr); + uint16_t port; - /* - * Split out the mbuf chain. Leave the IP header in m, place the - * rest in the sp. - */ if ((m->m_flags & M_PKTHDR) == 0) { /* Can't handle one that is not a pkt hdr */ goto out; } - /* pull the src port */ + /* Pull the src port */ iph = mtod(m, struct ip *); uhdr = (struct udphdr *)((caddr_t)iph + off); - port = uhdr->uh_sport; + /* + * Split out the mbuf chain. Leave the IP header in m, place the + * rest in the sp. + */ sp = m_split(m, off, M_DONTWAIT); if (sp == NULL) { /* Gak, drop packet, we can't do a split */ goto out; } - if (sp->m_pkthdr.len < header_size) { - /* Gak, packet can't have an SCTP header in it - to small */ + if (sp->m_pkthdr.len < sizeof(struct udphdr) + sizeof(struct sctphdr)) { + /* Gak, packet can't have an SCTP header in it - too small */ m_freem(sp); goto out; } - /* ok now pull up the UDP header and SCTP header together */ - sp = m_pullup(sp, header_size); + /* Now pull up the UDP header and SCTP header together */ + sp = m_pullup(sp, sizeof(struct udphdr) + sizeof(struct sctphdr)); if (sp == NULL) { /* Gak pullup failed */ goto out; } - /* trim out the UDP header */ + /* Trim out the UDP header */ m_adj(sp, sizeof(struct udphdr)); /* Now reconstruct the mbuf chain */ - /* 1) find last one */ - last = m; - while (last->m_next != NULL) { - last = last->m_next; - } + for (last = m; last->m_next; last = last->m_next); last->m_next = sp; m->m_pkthdr.len += sp->m_pkthdr.len; - last = m; - while (last != NULL) { - last = last->m_next; - } - /* Now its ready for sctp_input or sctp6_input */ iph = mtod(m, struct ip *); switch (iph->ip_v) { #ifdef INET case IPVERSION: - { - uint16_t len; - - /* its IPv4 */ - len = SCTP_GET_IPV4_LENGTH(iph); - len -= sizeof(struct udphdr); - SCTP_GET_IPV4_LENGTH(iph) = len; - sctp_input_with_port(m, off, port); - break; - } + iph->ip_len -= sizeof(struct udphdr); + sctp_input_with_port(m, off, port); + break; #endif #ifdef INET6 case IPV6_VERSION >> 4: - { - /* its IPv6 - NOT supported */ - goto out; - break; + /* Not yet supported. */ + goto out; + break; - } #endif default: - { - m_freem(m); - break; - } + goto out; + break; } return; out: From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 09:00:30 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E566106566C; Sun, 1 Jul 2012 09:00:30 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6FCA48FC0A; Sun, 1 Jul 2012 09:00:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6190UU8078963; Sun, 1 Jul 2012 09:00:30 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6190UBQ078959; Sun, 1 Jul 2012 09:00:30 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010900.q6190UBQ078959@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 09:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237913 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 09:00:30 -0000 Author: tuexen Date: Sun Jul 1 09:00:29 2012 New Revision: 237913 URL: http://svn.freebsd.org/changeset/base/237913 Log: MFC r237230: Add rate limitation for SCTP OOTB responses. Modified: stable/9/sys/netinet/icmp_var.h stable/9/sys/netinet/ip_icmp.c stable/9/sys/netinet/sctp_input.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/icmp_var.h ============================================================================== --- stable/9/sys/netinet/icmp_var.h Sun Jul 1 08:57:28 2012 (r237912) +++ stable/9/sys/netinet/icmp_var.h Sun Jul 1 09:00:29 2012 (r237913) @@ -102,7 +102,8 @@ extern int badport_bandlim(int); #define BANDLIM_RST_CLOSEDPORT 3 /* No connection, and no listeners */ #define BANDLIM_RST_OPENPORT 4 /* No connection, listener */ #define BANDLIM_ICMP6_UNREACH 5 -#define BANDLIM_MAX 5 +#define BANDLIM_SCTP_OOTB 6 +#define BANDLIM_MAX 6 #endif #endif Modified: stable/9/sys/netinet/ip_icmp.c ============================================================================== --- stable/9/sys/netinet/ip_icmp.c Sun Jul 1 08:57:28 2012 (r237912) +++ stable/9/sys/netinet/ip_icmp.c Sun Jul 1 09:00:29 2012 (r237913) @@ -965,7 +965,8 @@ badport_bandlim(int which) { "icmp tstamp response" }, { "closed port RST response" }, { "open port RST response" }, - { "icmp6 unreach response" } + { "icmp6 unreach response" }, + { "sctp ootb response" } }; /* Modified: stable/9/sys/netinet/sctp_input.c ============================================================================== --- stable/9/sys/netinet/sctp_input.c Sun Jul 1 08:57:28 2012 (r237912) +++ stable/9/sys/netinet/sctp_input.c Sun Jul 1 09:00:29 2012 (r237913) @@ -5972,15 +5972,8 @@ sctp_skip_csum_4: struct sctp_init_chunk *init_chk, chunk_buf; SCTP_STAT_INCR(sctps_noport); -#ifdef ICMP_BANDLIM - /* - * we use the bandwidth limiting to protect against sending - * too many ABORTS all at once. In this case these count the - * same as an ICMP message. - */ - if (badport_bandlim(0) < 0) + if (badport_bandlim(BANDLIM_SCTP_OOTB) < 0) goto bad; -#endif /* ICMP_BANDLIM */ SCTPDBG(SCTP_DEBUG_INPUT1, "Sending a ABORT from packet entry!\n"); if (ch->chunk_type == SCTP_INITIATION) { From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 09:03:38 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4D7F21065672; Sun, 1 Jul 2012 09:03:38 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38EB88FC08; Sun, 1 Jul 2012 09:03:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6193cYs079137; Sun, 1 Jul 2012 09:03:38 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6193cf9079135; Sun, 1 Jul 2012 09:03:38 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201207010903.q6193cf9079135@svn.freebsd.org> From: Michael Tuexen Date: Sun, 1 Jul 2012 09:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237914 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 09:03:38 -0000 Author: tuexen Date: Sun Jul 1 09:03:37 2012 New Revision: 237914 URL: http://svn.freebsd.org/changeset/base/237914 Log: MFC r237392: Remove redundant #ifdef. Reported by gnn@. Modified: stable/9/sys/netinet/sctp_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 09:00:29 2012 (r237913) +++ stable/9/sys/netinet/sctp_usrreq.c Sun Jul 1 09:03:37 2012 (r237914) @@ -6476,7 +6476,6 @@ sctp_peeraddr(struct socket *so, struct return (0); } -#ifdef INET struct pr_usrreqs sctp_usrreqs = { .pru_abort = sctp_abort, .pru_accept = sctp_accept, @@ -6499,4 +6498,3 @@ struct pr_usrreqs sctp_usrreqs = { }; #endif -#endif From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 09:17:55 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D97B7106566B; Sun, 1 Jul 2012 09:17:55 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA4FB8FC0A; Sun, 1 Jul 2012 09:17:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q619HtxL079822; Sun, 1 Jul 2012 09:17:55 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q619Ht5K079814; Sun, 1 Jul 2012 09:17:55 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207010917.q619Ht5K079814@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 1 Jul 2012 09:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237916 - in stable/9: share/man/man4 sys/dev/cxgb sys/dev/cxgbe sys/modules/cxgb/cxgb X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 09:17:56 -0000 Author: np Date: Sun Jul 1 09:17:55 2012 New Revision: 237916 URL: http://svn.freebsd.org/changeset/base/237916 Log: MFC r231317, r235963 (bz@), r234831, r234833. r231317 Add IPv6 TSO (including TSO+VLAN) support to cxgb(4). r235963 (bz@) Allow LRO to work on IPv6 as well. Fix the module Makefile to at least properly inlcude opt_inet6.h and allow builds without INET or INET6. r234831 Make sure that the firmware version is available in dev.t4nex.X.firmware_version even if the driver fails to attach properly. At least it'll be easy to tell what we're dealing with. r234833: Change the default to not use packet counters to generate rx interrupts. Rely solely on the timer based mechanism. Update man page to reflect this change. Modified: stable/9/share/man/man4/cxgbe.4 stable/9/sys/dev/cxgb/cxgb_main.c stable/9/sys/dev/cxgb/cxgb_sge.c stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c stable/9/sys/modules/cxgb/cxgb/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/share/man/man4/cxgbe.4 ============================================================================== --- stable/9/share/man/man4/cxgbe.4 Sun Jul 1 09:17:17 2012 (r237915) +++ stable/9/share/man/man4/cxgbe.4 Sun Jul 1 09:17:55 2012 (r237916) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011, Chelsio Inc +.\" Copyright (c) 2011-2012, Chelsio Inc .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -145,10 +145,9 @@ dev.cxgbe.X.holdoff_tmr_idx sysctl. The packet-count index value to use to delay interrupts. The packet-count list has the values 1, 8, 16, and 32 by default and the index selects a value from this list. -The default value is 2 for both 10Gb and 1Gb ports, which means 16 -packets (or the holdoff timer going off) before an interrupt is -generated. --1 disables packet counting. +The default value is -1 for both 10Gb and 1Gb ports, which means packet +counting is disabled and interrupts are generated based solely on the +holdoff timer value. Different cxgbe interfaces can be assigned different values via the dev.cxgbe.X.holdoff_pktc_idx sysctl. This sysctl works only when the interface has never been marked up (as done by Modified: stable/9/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_main.c Sun Jul 1 09:17:17 2012 (r237915) +++ stable/9/sys/dev/cxgb/cxgb_main.c Sun Jul 1 09:17:55 2012 (r237916) @@ -982,7 +982,7 @@ cxgb_makedev(struct port_info *pi) #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) -#define CXGB_CAP_ENABLE (CXGB_CAP & ~IFCAP_TSO6) +#define CXGB_CAP_ENABLE CXGB_CAP static int cxgb_port_attach(device_t dev) @@ -2059,8 +2059,8 @@ fail: } if (mask & IFCAP_RXCSUM) ifp->if_capenable ^= IFCAP_RXCSUM; - if (mask & IFCAP_TSO4) { - ifp->if_capenable ^= IFCAP_TSO4; + if (mask & IFCAP_TSO) { + ifp->if_capenable ^= IFCAP_TSO; if (IFCAP_TSO & ifp->if_capenable) { if (IFCAP_TXCSUM & ifp->if_capenable) Modified: stable/9/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_sge.c Sun Jul 1 09:17:17 2012 (r237915) +++ stable/9/sys/dev/cxgb/cxgb_sge.c Sun Jul 1 09:17:55 2012 (r237916) @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #include __FBSDID("$FreeBSD$"); +#include "opt_inet6.h" #include "opt_inet.h" #include @@ -62,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -1492,10 +1494,10 @@ t3_encap(struct sge_qset *qs, struct mbu check_ring_tx_db(sc, txq, 0); return (0); } else if (tso_info) { - int eth_type; + uint16_t eth_type; struct cpl_tx_pkt_lso *hdr = (struct cpl_tx_pkt_lso *)txd; struct ether_header *eh; - struct ip *ip; + void *l3hdr; struct tcphdr *tcp; txd->flit[2] = 0; @@ -1521,18 +1523,37 @@ t3_encap(struct sge_qset *qs, struct mbu } eh = mtod(m0, struct ether_header *); - if (eh->ether_type == htons(ETHERTYPE_VLAN)) { - eth_type = CPL_ETH_II_VLAN; - ip = (struct ip *)((struct ether_vlan_header *)eh + 1); + eth_type = eh->ether_type; + if (eth_type == htons(ETHERTYPE_VLAN)) { + struct ether_vlan_header *evh = (void *)eh; + + tso_info |= V_LSO_ETH_TYPE(CPL_ETH_II_VLAN); + l3hdr = evh + 1; + eth_type = evh->evl_proto; } else { - eth_type = CPL_ETH_II; - ip = (struct ip *)(eh + 1); + tso_info |= V_LSO_ETH_TYPE(CPL_ETH_II); + l3hdr = eh + 1; } - tcp = (struct tcphdr *)(ip + 1); - tso_info |= V_LSO_ETH_TYPE(eth_type) | - V_LSO_IPHDR_WORDS(ip->ip_hl) | - V_LSO_TCPHDR_WORDS(tcp->th_off); + if (eth_type == htons(ETHERTYPE_IP)) { + struct ip *ip = l3hdr; + + tso_info |= V_LSO_IPHDR_WORDS(ip->ip_hl); + tcp = (struct tcphdr *)(ip + 1); + } else if (eth_type == htons(ETHERTYPE_IPV6)) { + struct ip6_hdr *ip6 = l3hdr; + + KASSERT(ip6->ip6_nxt == IPPROTO_TCP, + ("%s: CSUM_TSO with ip6_nxt %d", + __func__, ip6->ip6_nxt)); + + tso_info |= F_LSO_IPV6; + tso_info |= V_LSO_IPHDR_WORDS(sizeof(*ip6) >> 2); + tcp = (struct tcphdr *)(ip6 + 1); + } else + panic("%s: CSUM_TSO but neither ip nor ip6", __func__); + + tso_info |= V_LSO_TCPHDR_WORDS(tcp->th_off); hdr->lso_info = htonl(tso_info); if (__predict_false(mlen <= PIO_LEN)) { @@ -2065,7 +2086,7 @@ t3_free_qset(adapter_t *sc, struct sge_q MTX_DESTROY(&q->rspq.lock); } -#ifdef INET +#if defined(INET6) || defined(INET) tcp_lro_free(&q->lro.ctrl); #endif @@ -2648,7 +2669,7 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i /* Allocate and setup the lro_ctrl structure */ q->lro.enabled = !!(pi->ifp->if_capenable & IFCAP_LRO); -#ifdef INET +#if defined(INET6) || defined(INET) ret = tcp_lro_init(&q->lro.ctrl); if (ret) { printf("error %d from tcp_lro_init\n", ret); @@ -2941,9 +2962,11 @@ process_responses(adapter_t *adap, struc struct rsp_desc *r = &rspq->desc[rspq->cidx]; int budget_left = budget; unsigned int sleeping = 0; +#if defined(INET6) || defined(INET) int lro_enabled = qs->lro.enabled; int skip_lro; struct lro_ctrl *lro_ctrl = &qs->lro.ctrl; +#endif struct mbuf *offload_mbufs[RX_BUNDLE_SIZE]; int ngathered = 0; struct t3_mbuf_hdr *mh = &rspq->rspq_mh; @@ -3062,15 +3085,16 @@ process_responses(adapter_t *adap, struc * The mbuf's rcvif was derived from the cpl header and * is accurate. Skip LRO and just use that. */ +#if defined(INET6) || defined(INET) skip_lro = __predict_false(qs->port->ifp != m->m_pkthdr.rcvif); if (lro_enabled && lro_ctrl->lro_cnt && !skip_lro -#ifdef INET && (tcp_lro_rx(lro_ctrl, m, 0) == 0) -#endif ) { /* successfully queue'd for LRO */ - } else { + } else +#endif + { /* * LRO not enabled, packet unsuitable for LRO, * or unable to queue. Pass it up right now in @@ -3089,7 +3113,7 @@ process_responses(adapter_t *adap, struc deliver_partial_bundle(&adap->tdev, rspq, offload_mbufs, ngathered); -#ifdef INET +#if defined(INET6) || defined(INET) /* Flush LRO */ while (!SLIST_EMPTY(&lro_ctrl->lro_active)) { struct lro_entry *queued = SLIST_FIRST(&lro_ctrl->lro_active); Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Sun Jul 1 09:17:17 2012 (r237915) +++ stable/9/sys/dev/cxgbe/t4_main.c Sun Jul 1 09:17:55 2012 (r237916) @@ -174,7 +174,7 @@ TUNABLE_INT("hw.cxgbe.nofldrxq1g", &t4_n static int t4_tmr_idx_10g = TMR_IDX_10G; TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_10G", &t4_tmr_idx_10g); -#define PKTC_IDX_10G 2 +#define PKTC_IDX_10G (-1) static int t4_pktc_idx_10g = PKTC_IDX_10G; TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_10G", &t4_pktc_idx_10g); @@ -182,7 +182,7 @@ TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_1 static int t4_tmr_idx_1g = TMR_IDX_1G; TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_1G", &t4_tmr_idx_1g); -#define PKTC_IDX_1G 2 +#define PKTC_IDX_1G (-1) static int t4_pktc_idx_1g = PKTC_IDX_1G; TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_1G", &t4_pktc_idx_1g); @@ -1449,6 +1449,11 @@ prep_firmware(struct adapter *sc) /* Check firmware version and install a different one if necessary */ rc = t4_check_fw_version(sc); + snprintf(sc->fw_version, sizeof(sc->fw_version), "%u.%u.%u.%u", + G_FW_HDR_FW_VER_MAJOR(sc->params.fw_vers), + G_FW_HDR_FW_VER_MINOR(sc->params.fw_vers), + G_FW_HDR_FW_VER_MICRO(sc->params.fw_vers), + G_FW_HDR_FW_VER_BUILD(sc->params.fw_vers)); if (rc != 0) { uint32_t v = 0; @@ -1505,6 +1510,12 @@ prep_firmware(struct adapter *sc) } else { /* refresh */ (void) t4_check_fw_version(sc); + snprintf(sc->fw_version, + sizeof(sc->fw_version), "%u.%u.%u.%u", + G_FW_HDR_FW_VER_MAJOR(sc->params.fw_vers), + G_FW_HDR_FW_VER_MINOR(sc->params.fw_vers), + G_FW_HDR_FW_VER_MICRO(sc->params.fw_vers), + G_FW_HDR_FW_VER_BUILD(sc->params.fw_vers)); } } } @@ -1548,11 +1559,6 @@ prep_firmware(struct adapter *sc) goto done; /* error message displayed already */ } - snprintf(sc->fw_version, sizeof(sc->fw_version), "%u.%u.%u.%u", - G_FW_HDR_FW_VER_MAJOR(sc->params.fw_vers), - G_FW_HDR_FW_VER_MINOR(sc->params.fw_vers), - G_FW_HDR_FW_VER_MICRO(sc->params.fw_vers), - G_FW_HDR_FW_VER_BUILD(sc->params.fw_vers)); sc->flags |= FW_OK; done: Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Sun Jul 1 09:17:17 2012 (r237915) +++ stable/9/sys/dev/cxgbe/t4_sge.c Sun Jul 1 09:17:55 2012 (r237916) @@ -1420,9 +1420,12 @@ init_iq(struct sge_iq *iq, struct adapte iq->flags = 0; iq->adapter = sc; - iq->intr_params = V_QINTR_TIMER_IDX(tmr_idx) | - V_QINTR_CNT_EN(pktc_idx >= 0); - iq->intr_pktc_idx = pktc_idx; + iq->intr_params = V_QINTR_TIMER_IDX(tmr_idx); + iq->intr_pktc_idx = SGE_NCOUNTERS - 1; + if (pktc_idx >= 0) { + iq->intr_params |= F_QINTR_CNT_EN; + iq->intr_pktc_idx = pktc_idx; + } iq->qsize = roundup(qsize, 16); /* See FW_IQ_CMD/iqsize */ iq->esize = max(esize, 16); /* See FW_IQ_CMD/iqesize */ strlcpy(iq->lockname, name, sizeof(iq->lockname)); Modified: stable/9/sys/modules/cxgb/cxgb/Makefile ============================================================================== --- stable/9/sys/modules/cxgb/cxgb/Makefile Sun Jul 1 09:17:17 2012 (r237915) +++ stable/9/sys/modules/cxgb/cxgb/Makefile Sun Jul 1 09:17:55 2012 (r237916) @@ -8,9 +8,21 @@ SRCS= cxgb_mc5.c cxgb_vsc8211.c cxgb_ael SRCS+= cxgb_xgmac.c cxgb_vsc7323.c cxgb_t3_hw.c cxgb_main.c cxgb_aq100x.c SRCS+= cxgb_sge.c cxgb_offload.c cxgb_tn1010.c SRCS+= device_if.h bus_if.h pci_if.h -SRCS+= opt_inet.h opt_zero.h opt_sched.h +SRCS+= opt_inet.h opt_inet6.h opt_zero.h opt_sched.h SRCS+= uipc_mvec.c CFLAGS+= -g -DDEFAULT_JUMBO -I${CXGB} +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif + .include From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 09:30:38 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9614D1065670; Sun, 1 Jul 2012 09:30:38 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F7FF8FC19; Sun, 1 Jul 2012 09:30:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q619Ucns080438; Sun, 1 Jul 2012 09:30:38 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q619UcKb080436; Sun, 1 Jul 2012 09:30:38 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201207010930.q619UcKb080436@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 1 Jul 2012 09:30:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237917 - stable/9/sys/dev/iwn X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 09:30:38 -0000 Author: bschmidt Date: Sun Jul 1 09:30:37 2012 New Revision: 237917 URL: http://svn.freebsd.org/changeset/base/237917 Log: MFC BA/DELBA fixes: - r234321: Use the M_AMPDU_MPDU flag to determine when to manually set the seqno and use a BA queue. - r235686: Discard frames after a DELBA which where queued during an active BA session. - r235687: remove unused vap variable - r237647: Fix a TX aggregation issue, if after the last compressed BA notification the TX queue is empty, there won't be a TX done notification, effectly resulting in an mbuf leak. The correct way to handle this is to free up mbufs on both BA and TX done notifications up to the last sent seqno. - r237649 (1): We need to defer passing the DELBA request to the firmware until the aggr queue is empty or the firmware will go nuts. PR: kern/167806 (1) Modified: stable/9/sys/dev/iwn/if_iwn.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/9/sys/dev/iwn/if_iwn.c Sun Jul 1 09:17:55 2012 (r237916) +++ stable/9/sys/dev/iwn/if_iwn.c Sun Jul 1 09:30:37 2012 (r237917) @@ -2432,23 +2432,66 @@ static void iwn_rx_compressed_ba(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { + struct iwn_ops *ops = &sc->ops; struct ifnet *ifp = sc->sc_ifp; struct iwn_node *wn; struct ieee80211_node *ni; struct iwn_compressed_ba *ba = (struct iwn_compressed_ba *)(desc + 1); struct iwn_tx_ring *txq; + struct iwn_tx_data *txdata; struct ieee80211_tx_ampdu *tap; + struct mbuf *m; uint64_t bitmap; + uint16_t ssn; uint8_t tid; - int ackfailcnt = 0, i, shift; + int ackfailcnt = 0, i, lastidx, qid, *res, shift; bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); - txq = &sc->txq[le16toh(ba->qid)]; - tap = sc->qid2tap[le16toh(ba->qid)]; + qid = le16toh(ba->qid); + txq = &sc->txq[ba->qid]; + tap = sc->qid2tap[ba->qid]; tid = WME_AC_TO_TID(tap->txa_ac); - ni = tap->txa_ni; - wn = (void *)ni; + wn = (void *)tap->txa_ni; + + res = NULL; + ssn = 0; + if (!IEEE80211_AMPDU_RUNNING(tap)) { + res = tap->txa_private; + ssn = tap->txa_start & 0xfff; + } + + for (lastidx = le16toh(ba->ssn) & 0xff; txq->read != lastidx;) { + txdata = &txq->data[txq->read]; + + /* Unmap and free mbuf. */ + bus_dmamap_sync(txq->data_dmat, txdata->map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(txq->data_dmat, txdata->map); + m = txdata->m, txdata->m = NULL; + ni = txdata->ni, txdata->ni = NULL; + + KASSERT(ni != NULL, ("no node")); + KASSERT(m != NULL, ("no mbuf")); + + if (m->m_flags & M_TXCB) + ieee80211_process_callback(ni, m, 1); + + m_freem(m); + ieee80211_free_node(ni); + + txq->queued--; + txq->read = (txq->read + 1) % IWN_TX_RING_COUNT; + } + + if (txq->queued == 0 && res != NULL) { + iwn_nic_lock(sc); + ops->ampdu_tx_stop(sc, qid, tid, ssn); + iwn_nic_unlock(sc); + sc->qid2tap[qid] = NULL; + free(res, M_DEVBUF); + return; + } if (wn->agg[tid].bitmap == 0) return; @@ -2460,6 +2503,7 @@ iwn_rx_compressed_ba(struct iwn_softc *s if (wn->agg[tid].nframes > (64 - shift)) return; + ni = tap->txa_ni; bitmap = (le64toh(ba->bitmap) >> shift) & wn->agg[tid].bitmap; for (i = 0; bitmap; i++) { if ((bitmap & 1) == 0) { @@ -2759,19 +2803,20 @@ static void iwn_ampdu_tx_done(struct iwn_softc *sc, int qid, int idx, int nframes, void *stat) { + struct iwn_ops *ops = &sc->ops; struct ifnet *ifp = sc->sc_ifp; struct iwn_tx_ring *ring = &sc->txq[qid]; struct iwn_tx_data *data; struct mbuf *m; struct iwn_node *wn; struct ieee80211_node *ni; - struct ieee80211vap *vap; struct ieee80211_tx_ampdu *tap; uint64_t bitmap; uint32_t *status = stat; uint16_t *aggstatus = stat; + uint16_t ssn; uint8_t tid; - int bit, i, lastidx, seqno, shift, start; + int bit, i, lastidx, *res, seqno, shift, start; #ifdef NOT_YET if (nframes == 1) { @@ -2804,27 +2849,32 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, bitmap |= 1ULL << bit; } tap = sc->qid2tap[qid]; - if (tap != NULL) { - tid = WME_AC_TO_TID(tap->txa_ac); - wn = (void *)tap->txa_ni; - wn->agg[tid].bitmap = bitmap; - wn->agg[tid].startidx = start; - wn->agg[tid].nframes = nframes; + tid = WME_AC_TO_TID(tap->txa_ac); + wn = (void *)tap->txa_ni; + wn->agg[tid].bitmap = bitmap; + wn->agg[tid].startidx = start; + wn->agg[tid].nframes = nframes; + + res = NULL; + ssn = 0; + if (!IEEE80211_AMPDU_RUNNING(tap)) { + res = tap->txa_private; + ssn = tap->txa_start & 0xfff; } seqno = le32toh(*(status + nframes)) & 0xfff; for (lastidx = (seqno & 0xff); ring->read != lastidx;) { data = &ring->data[ring->read]; - KASSERT(data->ni != NULL, ("no node")); - /* Unmap and free mbuf. */ bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(ring->data_dmat, data->map); m = data->m, data->m = NULL; ni = data->ni, data->ni = NULL; - vap = ni->ni_vap; + + KASSERT(ni != NULL, ("no node")); + KASSERT(m != NULL, ("no mbuf")); if (m->m_flags & M_TXCB) ieee80211_process_callback(ni, m, 1); @@ -2836,6 +2886,15 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, ring->read = (ring->read + 1) % IWN_TX_RING_COUNT; } + if (ring->queued == 0 && res != NULL) { + iwn_nic_lock(sc); + ops->ampdu_tx_stop(sc, qid, tid, ssn); + iwn_nic_unlock(sc); + sc->qid2tap[qid] = NULL; + free(res, M_DEVBUF); + return; + } + sc->sc_tx_timer = 0; if (ring->queued < IWN_TX_RING_LOMARK) { sc->qfullmsk &= ~(1 << ring->qid); @@ -3309,18 +3368,20 @@ iwn_tx_data(struct iwn_softc *sc, struct tid = 0; } ac = M_WME_GETAC(m); - - if (IEEE80211_QOS_HAS_SEQ(wh) && - IEEE80211_AMPDU_RUNNING(&ni->ni_tx_ampdu[ac])) { + if (m->m_flags & M_AMPDU_MPDU) { struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[ac]; - ring = &sc->txq[*(int *)tap->txa_private]; + if (!IEEE80211_AMPDU_RUNNING(tap)) { + m_freem(m); + return EINVAL; + } + + ac = *(int *)tap->txa_private; *(uint16_t *)wh->i_seq = htole16(ni->ni_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT); ni->ni_txseqs[tid]++; - } else { - ring = &sc->txq[ac]; } + ring = &sc->txq[ac]; desc = &ring->desc[ring->cur]; data = &ring->data[ring->cur]; @@ -5634,6 +5695,8 @@ iwn_ampdu_tx_start(struct ieee80211com * if ((error = iwn_nic_lock(sc)) != 0) return 0; qid = *(int *)tap->txa_private; + DPRINTF(sc, IWN_DEBUG_XMIT, "%s: ra=%d tid=%d ssn=%d qid=%d\n", + __func__, wn->id, tid, tap->txa_start, qid); ops->ampdu_tx_start(sc, ni, qid, tid, tap->txa_start & 0xfff); iwn_nic_unlock(sc); @@ -5649,10 +5712,14 @@ iwn_ampdu_tx_stop(struct ieee80211_node uint8_t tid = WME_AC_TO_TID(tap->txa_ac); int qid; + sc->sc_addba_stop(ni, tap); + if (tap->txa_private == NULL) return; qid = *(int *)tap->txa_private; + if (sc->txq[qid].queued != 0) + return; if (iwn_nic_lock(sc) != 0) return; ops->ampdu_tx_stop(sc, qid, tid, tap->txa_start & 0xfff); @@ -5660,7 +5727,6 @@ iwn_ampdu_tx_stop(struct ieee80211_node sc->qid2tap[qid] = NULL; free(tap->txa_private, M_DEVBUF); tap->txa_private = NULL; - sc->sc_addba_stop(ni, tap); } static void From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 09:35:15 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D67621065672; Sun, 1 Jul 2012 09:35:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1AC58FC08; Sun, 1 Jul 2012 09:35:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q619ZFRT080698; Sun, 1 Jul 2012 09:35:15 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q619ZFNL080696; Sun, 1 Jul 2012 09:35:15 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207010935.q619ZFNL080696@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 1 Jul 2012 09:35:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237918 - stable/9/sys/modules/cxgb/cxgb X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 09:35:16 -0000 Author: np Date: Sun Jul 1 09:35:15 2012 New Revision: 237918 URL: http://svn.freebsd.org/changeset/base/237918 Log: Partial MFC of r236311 (uqs@): Unbreak make depend. Modified: stable/9/sys/modules/cxgb/cxgb/Makefile Modified: stable/9/sys/modules/cxgb/cxgb/Makefile ============================================================================== --- stable/9/sys/modules/cxgb/cxgb/Makefile Sun Jul 1 09:30:37 2012 (r237917) +++ stable/9/sys/modules/cxgb/cxgb/Makefile Sun Jul 1 09:35:15 2012 (r237918) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + CXGB = ${.CURDIR}/../../../dev/cxgb .PATH: ${CXGB} ${CXGB}/common ${CXGB}/sys From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 12:00:37 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91A051065769; Sun, 1 Jul 2012 12:00:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 772098FC20; Sun, 1 Jul 2012 12:00:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61C0b20000534; Sun, 1 Jul 2012 12:00:37 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61C0bs7000527; Sun, 1 Jul 2012 12:00:37 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207011200.q61C0bs7000527@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 1 Jul 2012 12:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237920 - in stable/9/sys: conf dev/cxgb dev/cxgb/common dev/cxgb/sys dev/cxgb/ulp/iw_cxgb dev/cxgb/ulp/toecore dev/cxgb/ulp/tom dev/cxgbe dev/cxgbe/common dev/cxgbe/tom modules/cxgb mo... X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 12:00:37 -0000 Author: np Date: Sun Jul 1 12:00:36 2012 New Revision: 237920 URL: http://svn.freebsd.org/changeset/base/237920 Log: Backport just the sys/{dev,modules}/cxgb{,e}/ parts of r237263, and then disable the TOE and iWARP modules in the Makefiles (they won't compile without the rest of r237263). This reduces diffs between the cxgb/cxgbe drivers in head and 9 and makes it easy to MFC other fixes to 9. Added: stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ib_intfc.h - copied unchanged from r237263, head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ib_intfc.h stable/9/sys/dev/cxgbe/tom/ - copied from r237263, head/sys/dev/cxgbe/tom/ stable/9/sys/modules/cxgbe/tom/ - copied from r237263, head/sys/modules/cxgbe/tom/ Deleted: stable/9/sys/dev/cxgb/cxgb_offload.c stable/9/sys/dev/cxgb/t3cdev.h stable/9/sys/dev/cxgb/ulp/toecore/ stable/9/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_ddp.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_defs.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_t3_ddp.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_tcp.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c stable/9/sys/modules/cxgb/toecore/ Modified: stable/9/sys/conf/files stable/9/sys/dev/cxgb/common/cxgb_ctl_defs.h stable/9/sys/dev/cxgb/cxgb_adapter.h stable/9/sys/dev/cxgb/cxgb_main.c stable/9/sys/dev/cxgb/cxgb_offload.h stable/9/sys/dev/cxgb/cxgb_osdep.h stable/9/sys/dev/cxgb/cxgb_sge.c stable/9/sys/dev/cxgb/sys/mvec.h stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.h stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.h stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cq.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_dbg.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ev.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.h stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_mem.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.h stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_user.h stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_wr.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_l2t.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_l2t.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_listen.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_toepcb.h stable/9/sys/dev/cxgb/ulp/tom/cxgb_tom.c stable/9/sys/dev/cxgb/ulp/tom/cxgb_tom.h stable/9/sys/dev/cxgbe/adapter.h stable/9/sys/dev/cxgbe/common/t4_hw.c stable/9/sys/dev/cxgbe/offload.h stable/9/sys/dev/cxgbe/t4_l2t.c stable/9/sys/dev/cxgbe/t4_l2t.h stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c stable/9/sys/modules/cxgb/Makefile stable/9/sys/modules/cxgb/cxgb/Makefile stable/9/sys/modules/cxgb/iw_cxgb/Makefile stable/9/sys/modules/cxgb/tom/Makefile stable/9/sys/modules/cxgbe/Makefile Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Sun Jul 1 11:52:52 2012 (r237919) +++ stable/9/sys/conf/files Sun Jul 1 12:00:36 2012 (r237920) @@ -891,8 +891,6 @@ dev/cs/if_cs_isa.c optional cs isa dev/cs/if_cs_pccard.c optional cs pccard dev/cxgb/cxgb_main.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" -dev/cxgb/cxgb_offload.c optional cxgb pci \ - compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_sge.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_mc5.c optional cxgb pci \ Modified: stable/9/sys/dev/cxgb/common/cxgb_ctl_defs.h ============================================================================== --- stable/9/sys/dev/cxgb/common/cxgb_ctl_defs.h Sun Jul 1 11:52:52 2012 (r237919) +++ stable/9/sys/dev/cxgb/common/cxgb_ctl_defs.h Sun Jul 1 12:00:36 2012 (r237920) @@ -60,14 +60,12 @@ struct mtutab { const unsigned short *mtus; /* the MTU table values */ }; -struct net_device; - /* - * Structure used to request the adapter net_device owning a given MAC address. + * Structure used to request the ifnet that owns a given MAC address. */ struct iff_mac { - struct net_device *dev; /* the net_device */ - const unsigned char *mac_addr; /* MAC address to lookup */ + struct ifnet *dev; + const unsigned char *mac_addr; u16 vlan_tag; }; @@ -85,7 +83,7 @@ struct ddp_params { struct adap_ports { unsigned int nports; /* number of ports on this adapter */ - struct net_device *lldevs[MAX_NPORTS]; + struct ifnet *lldevs[MAX_NPORTS]; }; /* Modified: stable/9/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_adapter.h Sun Jul 1 11:52:52 2012 (r237919) +++ stable/9/sys/dev/cxgb/cxgb_adapter.h Sun Jul 1 12:00:36 2012 (r237920) @@ -56,7 +56,6 @@ $FreeBSD$ #include #include -#include #include struct adapter; @@ -129,6 +128,7 @@ enum { CXGB_OFLD_INIT = (1 << 7), TP_PARITY_INIT = (1 << 8), CXGB_BUSY = (1 << 9), + TOM_INIT_DONE = (1 << 10), /* port flags */ DOOMED = (1 << 0), @@ -178,7 +178,6 @@ struct sge_rspq { uint32_t async_notif; uint32_t cntxt_id; uint32_t offload_pkts; - uint32_t offload_bundles; uint32_t pure_rsps; uint32_t unhandled_irqs; uint32_t starved; @@ -290,6 +289,7 @@ struct sge_qset { uint32_t txq_stopped; /* which Tx queues are stopped */ uint64_t port_stats[SGE_PSTAT_MAX]; struct port_info *port; + struct adapter *adap; int idx; /* qset # */ int qs_flags; int coalescing; @@ -306,10 +306,13 @@ struct sge { struct filter_info; +typedef int (*cpl_handler_t)(struct sge_qset *, struct rsp_desc *, + struct mbuf *); + struct adapter { + SLIST_ENTRY(adapter) link; device_t dev; int flags; - TAILQ_ENTRY(adapter) adapter_entry; /* PCI register resources */ int regs_rid; @@ -375,11 +378,16 @@ struct adapter { struct port_info port[MAX_NPORTS]; device_t portdev[MAX_NPORTS]; - struct t3cdev tdev; +#ifdef TCP_OFFLOAD + void *tom_softc; + void *iwarp_softc; +#endif char fw_version[64]; char port_types[MAX_NPORTS + 1]; uint32_t open_device_map; - uint32_t registered_device_map; +#ifdef TCP_OFFLOAD + int offload_map; +#endif struct mtx lock; driver_intr_t *cxgb_intr; int msi_count; @@ -391,6 +399,11 @@ struct adapter { char elmerlockbuf[ADAPTER_LOCK_NAME_LEN]; int timestamp; + +#ifdef TCP_OFFLOAD +#define NUM_CPL_HANDLERS 0xa7 + cpl_handler_t cpl_handler[NUM_CPL_HANDLERS] __aligned(CACHE_LINE_SIZE); +#endif }; struct t3_rx_mode { @@ -501,10 +514,12 @@ void t3_os_link_changed(adapter_t *adapt int speed, int duplex, int fc, int mac_was_reset); void t3_os_phymod_changed(struct adapter *adap, int port_id); void t3_sge_err_intr_handler(adapter_t *adapter); -int t3_offload_tx(struct t3cdev *, struct mbuf *); +#ifdef TCP_OFFLOAD +int t3_offload_tx(struct adapter *, struct mbuf *); +#endif void t3_os_set_hw_addr(adapter_t *adapter, int port_idx, u8 hw_addr[]); int t3_mgmt_tx(adapter_t *adap, struct mbuf *m); - +int t3_register_cpl_handler(struct adapter *, int, cpl_handler_t); int t3_sge_alloc(struct adapter *); int t3_sge_free(struct adapter *); @@ -555,15 +570,9 @@ txq_to_qset(struct sge_txq *q, int qidx) return container_of(q, struct sge_qset, txq[qidx]); } -static __inline struct adapter * -tdev2adap(struct t3cdev *d) -{ - return container_of(d, struct adapter, tdev); -} - #undef container_of -#define OFFLOAD_DEVMAP_BIT 15 +#define OFFLOAD_DEVMAP_BIT (1 << MAX_NPORTS) static inline int offload_running(adapter_t *adapter) { return isset(&adapter->open_device_map, OFFLOAD_DEVMAP_BIT); @@ -572,4 +581,5 @@ static inline int offload_running(adapte void cxgb_tx_watchdog(void *arg); int cxgb_transmit(struct ifnet *ifp, struct mbuf *m); void cxgb_qflush(struct ifnet *ifp); +void t3_iterate(void (*)(struct adapter *, void *), void *); #endif Modified: stable/9/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_main.c Sun Jul 1 11:52:52 2012 (r237919) +++ stable/9/sys/dev/cxgb/cxgb_main.c Sun Jul 1 12:00:36 2012 (r237920) @@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. #include __FBSDID("$FreeBSD$"); +#include "opt_inet.h" + #include #include #include @@ -107,6 +109,9 @@ static inline void mk_set_tcb_field(stru unsigned int, u64, u64); static inline void set_tcb_field_ulp(struct cpl_set_tcb_field *, unsigned int, unsigned int, u64, u64); +#ifdef TCP_OFFLOAD +static int cpl_not_handled(struct sge_qset *, struct rsp_desc *, struct mbuf *); +#endif /* Attachment glue for the PCI controller end of the device. Each port of * the device is attached separately, as defined later. @@ -119,10 +124,11 @@ static __inline void reg_block_dump(stru unsigned int end); static void cxgb_get_regs(adapter_t *sc, struct ch_ifconf_regs *regs, uint8_t *buf); static int cxgb_get_regs_len(void); -static int offload_open(struct port_info *pi); static void touch_bars(device_t dev); -static int offload_close(struct t3cdev *tdev); static void cxgb_update_mac_settings(struct port_info *p); +#ifdef TCP_OFFLOAD +static int toe_capability(struct port_info *, int); +#endif static device_method_t cxgb_controller_methods[] = { DEVMETHOD(device_probe, cxgb_controller_probe), @@ -138,8 +144,11 @@ static driver_t cxgb_controller_driver = sizeof(struct adapter) }; +static int cxgbc_mod_event(module_t, int, void *); static devclass_t cxgb_controller_devclass; -DRIVER_MODULE(cxgbc, pci, cxgb_controller_driver, cxgb_controller_devclass, 0, 0); +DRIVER_MODULE(cxgbc, pci, cxgb_controller_driver, cxgb_controller_devclass, + cxgbc_mod_event, 0); +MODULE_VERSION(cxgbc, 1); /* * Attachment glue for the ports. Attachment is done directly to the @@ -177,6 +186,14 @@ static struct cdevsw cxgb_cdevsw = { static devclass_t cxgb_port_devclass; DRIVER_MODULE(cxgb, cxgbc, cxgb_port_driver, cxgb_port_devclass, 0, 0); +MODULE_VERSION(cxgb, 1); + +static struct mtx t3_list_lock; +static SLIST_HEAD(, adapter) t3_list; +#ifdef TCP_OFFLOAD +static struct mtx t3_uld_list_lock; +static SLIST_HEAD(, uld_info) t3_uld_list; +#endif /* * The driver uses the best interrupt scheme available on a platform in the @@ -195,15 +212,6 @@ SYSCTL_INT(_hw_cxgb, OID_AUTO, msi_allow "MSI-X, MSI, INTx selector"); /* - * The driver enables offload as a default. - * To disable it, use ofld_disable = 1. - */ -static int ofld_disable = 0; -TUNABLE_INT("hw.cxgb.ofld_disable", &ofld_disable); -SYSCTL_INT(_hw_cxgb, OID_AUTO, ofld_disable, CTLFLAG_RDTUN, &ofld_disable, 0, - "disable ULP offload"); - -/* * The driver uses an auto-queue algorithm by default. * To disable it and force a single queue-set per port, use multiq = 0 */ @@ -445,6 +453,25 @@ cxgb_controller_attach(device_t dev) sc->msi_count = 0; ai = cxgb_get_adapter_info(dev); + snprintf(sc->lockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb controller lock %d", + device_get_unit(dev)); + ADAPTER_LOCK_INIT(sc, sc->lockbuf); + + snprintf(sc->reglockbuf, ADAPTER_LOCK_NAME_LEN, "SGE reg lock %d", + device_get_unit(dev)); + snprintf(sc->mdiolockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb mdio lock %d", + device_get_unit(dev)); + snprintf(sc->elmerlockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb elmer lock %d", + device_get_unit(dev)); + + MTX_INIT(&sc->sge.reg_lock, sc->reglockbuf, NULL, MTX_SPIN); + MTX_INIT(&sc->mdio_lock, sc->mdiolockbuf, NULL, MTX_DEF); + MTX_INIT(&sc->elmer_lock, sc->elmerlockbuf, NULL, MTX_DEF); + + mtx_lock(&t3_list_lock); + SLIST_INSERT_HEAD(&t3_list, sc, link); + mtx_unlock(&t3_list_lock); + /* find the PCIe link width and set max read request to 4KB*/ if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { uint16_t lnk; @@ -471,24 +498,10 @@ cxgb_controller_attach(device_t dev) if ((sc->regs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->regs_rid, RF_ACTIVE)) == NULL) { device_printf(dev, "Cannot allocate BAR region 0\n"); - return (ENXIO); + error = ENXIO; + goto out; } - snprintf(sc->lockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb controller lock %d", - device_get_unit(dev)); - ADAPTER_LOCK_INIT(sc, sc->lockbuf); - - snprintf(sc->reglockbuf, ADAPTER_LOCK_NAME_LEN, "SGE reg lock %d", - device_get_unit(dev)); - snprintf(sc->mdiolockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb mdio lock %d", - device_get_unit(dev)); - snprintf(sc->elmerlockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb elmer lock %d", - device_get_unit(dev)); - - MTX_INIT(&sc->sge.reg_lock, sc->reglockbuf, NULL, MTX_SPIN); - MTX_INIT(&sc->mdio_lock, sc->mdiolockbuf, NULL, MTX_DEF); - MTX_INIT(&sc->elmer_lock, sc->elmerlockbuf, NULL, MTX_DEF); - sc->bt = rman_get_bustag(sc->regs_res); sc->bh = rman_get_bushandle(sc->regs_res); sc->mmio_len = rman_get_size(sc->regs_res); @@ -604,7 +617,7 @@ cxgb_controller_attach(device_t dev) } else { sc->flags |= TPS_UPTODATE; } - + /* * Create a child device for each MAC. The ethernet attachment * will be done in these children. @@ -636,12 +649,7 @@ cxgb_controller_attach(device_t dev) t3_sge_init_adapter(sc); t3_led_ready(sc); - - cxgb_offload_init(); - if (is_offload(sc)) { - setbit(&sc->registered_device_map, OFFLOAD_DEVMAP_BIT); - cxgb_adapter_ofld(sc); - } + error = t3_get_fw_version(sc, &vers); if (error) goto out; @@ -662,6 +670,11 @@ cxgb_controller_attach(device_t dev) device_printf(sc->dev, "Firmware Version %s\n", &sc->fw_version[0]); callout_reset(&sc->cxgb_tick_ch, hz, cxgb_tick, sc); t3_add_attach_sysctls(sc); + +#ifdef TCP_OFFLOAD + for (i = 0; i < NUM_CPL_HANDLERS; i++) + sc->cpl_handler[i] = cpl_not_handled; +#endif out: if (error) cxgb_free(sc); @@ -775,20 +788,9 @@ cxgb_free(struct adapter *sc) sc->tq = NULL; } - if (is_offload(sc)) { - clrbit(&sc->registered_device_map, OFFLOAD_DEVMAP_BIT); - cxgb_adapter_unofld(sc); - } - -#ifdef notyet - if (sc->flags & CXGB_OFLD_INIT) - cxgb_offload_deactivate(sc); -#endif free(sc->filters, M_DEVBUF); t3_sge_free(sc); - cxgb_offload_exit(); - if (sc->udbs_res != NULL) bus_release_resource(sc->dev, SYS_RES_MEMORY, sc->udbs_rid, sc->udbs_res); @@ -800,6 +802,9 @@ cxgb_free(struct adapter *sc) MTX_DESTROY(&sc->mdio_lock); MTX_DESTROY(&sc->sge.reg_lock); MTX_DESTROY(&sc->elmer_lock); + mtx_lock(&t3_list_lock); + SLIST_REMOVE(&t3_list, sc, adapter, link); + mtx_unlock(&t3_list_lock); ADAPTER_LOCK_DEINIT(sc); } @@ -1017,6 +1022,10 @@ cxgb_port_attach(device_t dev) ifp->if_qflush = cxgb_qflush; ifp->if_capabilities = CXGB_CAP; +#ifdef TCP_OFFLOAD + if (is_offload(sc)) + ifp->if_capabilities |= IFCAP_TOE4; +#endif ifp->if_capenable = CXGB_CAP_ENABLE; ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO; @@ -1420,65 +1429,6 @@ setup_rss(adapter_t *adap) cpus, rspq_map); } - -/* - * Sends an mbuf to an offload queue driver - * after dealing with any active network taps. - */ -static inline int -offload_tx(struct t3cdev *tdev, struct mbuf *m) -{ - int ret; - - ret = t3_offload_tx(tdev, m); - return (ret); -} - -static int -write_smt_entry(struct adapter *adapter, int idx) -{ - struct port_info *pi = &adapter->port[idx]; - struct cpl_smt_write_req *req; - struct mbuf *m; - - if ((m = m_gethdr(M_NOWAIT, MT_DATA)) == NULL) - return (ENOMEM); - - req = mtod(m, struct cpl_smt_write_req *); - m->m_pkthdr.len = m->m_len = sizeof(struct cpl_smt_write_req); - - req->wr.wrh_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD)); - OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SMT_WRITE_REQ, idx)); - req->mtu_idx = NMTUS - 1; /* should be 0 but there's a T3 bug */ - req->iff = idx; - memset(req->src_mac1, 0, sizeof(req->src_mac1)); - memcpy(req->src_mac0, pi->hw_addr, ETHER_ADDR_LEN); - - m_set_priority(m, 1); - - offload_tx(&adapter->tdev, m); - - return (0); -} - -static int -init_smt(struct adapter *adapter) -{ - int i; - - for_each_port(adapter, i) - write_smt_entry(adapter, i); - return 0; -} - -static void -init_port_mtus(adapter_t *adapter) -{ - unsigned int mtus = ETHERMTU | (ETHERMTU << 16); - - t3_write_reg(adapter, A_TP_MTU_PORT_TABLE, mtus); -} - static void send_pktsched_cmd(struct adapter *adap, int sched, int qidx, int lo, int hi, int port) @@ -1705,45 +1655,6 @@ cxgb_down(struct adapter *sc) t3_intr_disable(sc); } -static int -offload_open(struct port_info *pi) -{ - struct adapter *sc = pi->adapter; - struct t3cdev *tdev = &sc->tdev; - - setbit(&sc->open_device_map, OFFLOAD_DEVMAP_BIT); - - t3_tp_set_offload_mode(sc, 1); - tdev->lldev = pi->ifp; - init_port_mtus(sc); - t3_load_mtus(sc, sc->params.mtus, sc->params.a_wnd, sc->params.b_wnd, - sc->params.rev == 0 ? sc->port[0].ifp->if_mtu : 0xffff); - init_smt(sc); - cxgb_add_clients(tdev); - - return (0); -} - -static int -offload_close(struct t3cdev *tdev) -{ - struct adapter *adapter = tdev2adap(tdev); - - if (!isset(&adapter->open_device_map, OFFLOAD_DEVMAP_BIT)) - return (0); - - /* Call back all registered clients */ - cxgb_remove_clients(tdev); - - tdev->lldev = NULL; - cxgb_set_dummy_ops(tdev); - t3_tp_set_offload_mode(adapter, 0); - - clrbit(&adapter->open_device_map, OFFLOAD_DEVMAP_BIT); - - return (0); -} - /* * if_init for cxgb ports. */ @@ -1793,15 +1704,9 @@ cxgb_init_locked(struct port_info *p) ADAPTER_UNLOCK(sc); } - if (sc->open_device_map == 0) { - if ((rc = cxgb_up(sc)) != 0) + if (sc->open_device_map == 0 && ((rc = cxgb_up(sc)) != 0)) goto done; - if (is_offload(sc) && !ofld_disable && offload_open(p)) - log(LOG_WARNING, - "Could not initialize offload capabilities\n"); - } - PORT_LOCK(p); if (isset(&sc->open_device_map, p->port_id) && (ifp->if_drv_flags & IFF_DRV_RUNNING)) { @@ -1929,7 +1834,6 @@ cxgb_uninit_synchronized(struct port_inf DELAY(100 * 1000); t3_mac_disable(&pi->mac, MAC_DIRECTION_RX); - pi->phy.ops->power_down(&pi->phy, 1); PORT_UNLOCK(pi); @@ -1937,9 +1841,6 @@ cxgb_uninit_synchronized(struct port_inf pi->link_config.link_ok = 0; t3_os_link_changed(sc, pi->port_id, 0, 0, 0, 0, 0); - if ((sc->open_device_map & PORT_MASK) == 0) - offload_close(&sc->tdev); - if (sc->open_device_map == 0) cxgb_down(pi->adapter); @@ -2081,6 +1982,15 @@ fail: /* Safe to do this even if cxgb_up not called yet */ cxgb_set_lro(p, ifp->if_capenable & IFCAP_LRO); } +#ifdef TCP_OFFLOAD + if (mask & IFCAP_TOE4) { + int enable = (ifp->if_capenable ^ mask) & IFCAP_TOE4; + + error = toe_capability(p, enable); + if (error == 0) + ifp->if_capenable ^= mask; + } +#endif if (mask & IFCAP_VLAN_HWTAGGING) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { @@ -3362,3 +3272,235 @@ set_tcb_field_ulp(struct cpl_set_tcb_fie txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); mk_set_tcb_field(req, tid, word, mask, val); } + +void +t3_iterate(void (*func)(struct adapter *, void *), void *arg) +{ + struct adapter *sc; + + mtx_lock(&t3_list_lock); + SLIST_FOREACH(sc, &t3_list, link) { + /* + * func should not make any assumptions about what state sc is + * in - the only guarantee is that sc->sc_lock is a valid lock. + */ + func(sc, arg); + } + mtx_unlock(&t3_list_lock); +} + +#ifdef TCP_OFFLOAD +static int +toe_capability(struct port_info *pi, int enable) +{ + int rc; + struct adapter *sc = pi->adapter; + + ADAPTER_LOCK_ASSERT_OWNED(sc); + + if (!is_offload(sc)) + return (ENODEV); + + if (enable) { + if (!(sc->flags & FULL_INIT_DONE)) { + log(LOG_WARNING, + "You must enable a cxgb interface first\n"); + return (EAGAIN); + } + + if (isset(&sc->offload_map, pi->port_id)) + return (0); + + if (!(sc->flags & TOM_INIT_DONE)) { + rc = t3_activate_uld(sc, ULD_TOM); + if (rc == EAGAIN) { + log(LOG_WARNING, + "You must kldload t3_tom.ko before trying " + "to enable TOE on a cxgb interface.\n"); + } + if (rc != 0) + return (rc); + KASSERT(sc->tom_softc != NULL, + ("%s: TOM activated but softc NULL", __func__)); + KASSERT(sc->flags & TOM_INIT_DONE, + ("%s: TOM activated but flag not set", __func__)); + } + + setbit(&sc->offload_map, pi->port_id); + + /* + * XXX: Temporary code to allow iWARP to be enabled when TOE is + * enabled on any port. Need to figure out how to enable, + * disable, load, and unload iWARP cleanly. + */ + if (!isset(&sc->offload_map, MAX_NPORTS) && + t3_activate_uld(sc, ULD_IWARP) == 0) + setbit(&sc->offload_map, MAX_NPORTS); + } else { + if (!isset(&sc->offload_map, pi->port_id)) + return (0); + + KASSERT(sc->flags & TOM_INIT_DONE, + ("%s: TOM never initialized?", __func__)); + clrbit(&sc->offload_map, pi->port_id); + } + + return (0); +} + +/* + * Add an upper layer driver to the global list. + */ +int +t3_register_uld(struct uld_info *ui) +{ + int rc = 0; + struct uld_info *u; + + mtx_lock(&t3_uld_list_lock); + SLIST_FOREACH(u, &t3_uld_list, link) { + if (u->uld_id == ui->uld_id) { + rc = EEXIST; + goto done; + } + } + + SLIST_INSERT_HEAD(&t3_uld_list, ui, link); + ui->refcount = 0; +done: + mtx_unlock(&t3_uld_list_lock); + return (rc); +} + +int +t3_unregister_uld(struct uld_info *ui) +{ + int rc = EINVAL; + struct uld_info *u; + + mtx_lock(&t3_uld_list_lock); + + SLIST_FOREACH(u, &t3_uld_list, link) { + if (u == ui) { + if (ui->refcount > 0) { + rc = EBUSY; + goto done; + } + + SLIST_REMOVE(&t3_uld_list, ui, uld_info, link); + rc = 0; + goto done; + } + } +done: + mtx_unlock(&t3_uld_list_lock); + return (rc); +} + +int +t3_activate_uld(struct adapter *sc, int id) +{ + int rc = EAGAIN; + struct uld_info *ui; + + mtx_lock(&t3_uld_list_lock); + + SLIST_FOREACH(ui, &t3_uld_list, link) { + if (ui->uld_id == id) { + rc = ui->activate(sc); + if (rc == 0) + ui->refcount++; + goto done; + } + } +done: + mtx_unlock(&t3_uld_list_lock); + + return (rc); +} + +int +t3_deactivate_uld(struct adapter *sc, int id) +{ + int rc = EINVAL; + struct uld_info *ui; + + mtx_lock(&t3_uld_list_lock); + + SLIST_FOREACH(ui, &t3_uld_list, link) { + if (ui->uld_id == id) { + rc = ui->deactivate(sc); + if (rc == 0) + ui->refcount--; + goto done; + } + } +done: + mtx_unlock(&t3_uld_list_lock); + + return (rc); +} + +static int +cpl_not_handled(struct sge_qset *qs __unused, struct rsp_desc *r __unused, + struct mbuf *m) +{ + m_freem(m); + return (EDOOFUS); +} + +int +t3_register_cpl_handler(struct adapter *sc, int opcode, cpl_handler_t h) +{ + uintptr_t *loc, new; + + if (opcode >= NUM_CPL_HANDLERS) + return (EINVAL); + + new = h ? (uintptr_t)h : (uintptr_t)cpl_not_handled; + loc = (uintptr_t *) &sc->cpl_handler[opcode]; + atomic_store_rel_ptr(loc, new); + + return (0); +} +#endif + +static int +cxgbc_mod_event(module_t mod, int cmd, void *arg) +{ + int rc = 0; + + switch (cmd) { + case MOD_LOAD: + mtx_init(&t3_list_lock, "T3 adapters", 0, MTX_DEF); + SLIST_INIT(&t3_list); +#ifdef TCP_OFFLOAD + mtx_init(&t3_uld_list_lock, "T3 ULDs", 0, MTX_DEF); + SLIST_INIT(&t3_uld_list); +#endif + break; + + case MOD_UNLOAD: +#ifdef TCP_OFFLOAD + mtx_lock(&t3_uld_list_lock); + if (!SLIST_EMPTY(&t3_uld_list)) { + rc = EBUSY; + mtx_unlock(&t3_uld_list_lock); + break; + } + mtx_unlock(&t3_uld_list_lock); + mtx_destroy(&t3_uld_list_lock); +#endif + mtx_lock(&t3_list_lock); + if (!SLIST_EMPTY(&t3_list)) { + rc = EBUSY; + mtx_unlock(&t3_list_lock); + break; + } + mtx_unlock(&t3_list_lock); + mtx_destroy(&t3_list_lock); + break; + } + + return (rc); +} Modified: stable/9/sys/dev/cxgb/cxgb_offload.h ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_offload.h Sun Jul 1 11:52:52 2012 (r237919) +++ stable/9/sys/dev/cxgb/cxgb_offload.h Sun Jul 1 12:00:36 2012 (r237920) @@ -1,4 +1,3 @@ - /************************************************************************** Copyright (c) 2007-2008, Chelsio Inc. @@ -33,221 +32,93 @@ $FreeBSD$ #ifndef _CXGB_OFFLOAD_H #define _CXGB_OFFLOAD_H -#include -#include - -MALLOC_DECLARE(M_CXGB); +#ifdef TCP_OFFLOAD +enum { + ULD_TOM = 1, + ULD_IWARP = 2, +}; struct adapter; -struct cxgb_client; - -void cxgb_offload_init(void); -void cxgb_offload_exit(void); - -void cxgb_adapter_ofld(struct adapter *adapter); -void cxgb_adapter_unofld(struct adapter *adapter); -int cxgb_offload_activate(struct adapter *adapter); -void cxgb_offload_deactivate(struct adapter *adapter); -int cxgb_ofld_recv(struct t3cdev *dev, struct mbuf **m, int n); - -void cxgb_set_dummy_ops(struct t3cdev *dev); - - -/* - * Client registration. Users of T3 driver must register themselves. - * The T3 driver will call the add function of every client for each T3 - * adapter activated, passing up the t3cdev ptr. Each client fills out an - * array of callback functions to process CPL messages. - */ - -void cxgb_register_client(struct cxgb_client *client); -void cxgb_unregister_client(struct cxgb_client *client); -void cxgb_add_clients(struct t3cdev *tdev); -void cxgb_remove_clients(struct t3cdev *tdev); - -typedef int (*cxgb_cpl_handler_func)(struct t3cdev *dev, - struct mbuf *m, void *ctx); - -struct l2t_entry; -struct cxgb_client { - char *name; - void (*add) (struct t3cdev *); - void (*remove) (struct t3cdev *); - cxgb_cpl_handler_func *handlers; - int (*redirect)(void *ctx, struct rtentry *old, - struct rtentry *new, - struct l2t_entry *l2t); - TAILQ_ENTRY(cxgb_client) client_entry; +struct uld_info { + SLIST_ENTRY(uld_info) link; + int refcount; + int uld_id; + int (*activate)(struct adapter *); + int (*deactivate)(struct adapter *); }; -/* - * TID allocation services. - */ -int cxgb_alloc_atid(struct t3cdev *dev, struct cxgb_client *client, - void *ctx); -int cxgb_alloc_stid(struct t3cdev *dev, struct cxgb_client *client, - void *ctx); -void *cxgb_free_atid(struct t3cdev *dev, int atid); -void cxgb_free_stid(struct t3cdev *dev, int stid); -void *cxgb_get_lctx(struct t3cdev *tdev, int stid); -void cxgb_insert_tid(struct t3cdev *dev, struct cxgb_client *client, - void *ctx, - unsigned int tid); -void cxgb_queue_tid_release(struct t3cdev *dev, unsigned int tid); -void cxgb_remove_tid(struct t3cdev *dev, void *ctx, unsigned int tid); - -struct toe_tid_entry { - struct cxgb_client *client; - void *ctx; +struct tom_tunables { + int sndbuf; + int ddp; + int indsz; + int ddp_thres; }; /* CPL message priority levels */ enum { CPL_PRIORITY_DATA = 0, /* data messages */ - CPL_PRIORITY_SETUP = 1, /* connection setup messages */ - CPL_PRIORITY_TEARDOWN = 0, /* connection teardown messages */ - CPL_PRIORITY_LISTEN = 1, /* listen start/stop messages */ - CPL_PRIORITY_ACK = 1, /* RX ACK messages */ CPL_PRIORITY_CONTROL = 1 /* offload control messages */ }; -/* Flags for return value of CPL message handlers */ -enum { - CPL_RET_BUF_DONE = 1, // buffer processing done, buffer may be freed - CPL_RET_BAD_MSG = 2, // bad CPL message (e.g., unknown opcode) - CPL_RET_UNKNOWN_TID = 4 // unexpected unknown TID -}; +#define S_HDR_NDESC 0 +#define M_HDR_NDESC 0xf +#define V_HDR_NDESC(x) ((x) << S_HDR_NDESC) +#define G_HDR_NDESC(x) (((x) >> S_HDR_NDESC) & M_HDR_NDESC) -typedef int (*cpl_handler_func)(struct t3cdev *dev, struct mbuf *m); +#define S_HDR_QSET 4 +#define M_HDR_QSET 0xf +#define V_HDR_QSET(x) ((x) << S_HDR_QSET) +#define G_HDR_QSET(x) (((x) >> S_HDR_QSET) & M_HDR_QSET) -/* - * Returns a pointer to the first byte of the CPL header in an sk_buff that - * contains a CPL message. - */ -static inline void *cplhdr(struct mbuf *m) -{ - return mtod(m, uint8_t *); -} - -void t3_register_cpl_handler(unsigned int opcode, cpl_handler_func h); - -union listen_entry { - struct toe_tid_entry toe_tid; - union listen_entry *next; -}; +#define S_HDR_CTRL 8 +#define V_HDR_CTRL(x) ((x) << S_HDR_CTRL) +#define F_HDR_CTRL V_HDR_CTRL(1U) -union active_open_entry { - struct toe_tid_entry toe_tid; - union active_open_entry *next; -}; +#define S_HDR_DF 9 +#define V_HDR_DF(x) ((x) << S_HDR_DF) +#define F_HDR_DF V_HDR_DF(1U) -/* - * Holds the size, base address, free list start, etc of the TID, server TID, - * and active-open TID tables for a offload device. - * The tables themselves are allocated dynamically. - */ -struct tid_info { - struct toe_tid_entry *tid_tab; - unsigned int ntids; - volatile unsigned int tids_in_use; - - union listen_entry *stid_tab; - unsigned int nstids; - unsigned int stid_base; - - union active_open_entry *atid_tab; - unsigned int natids; - unsigned int atid_base; - - /* - * The following members are accessed R/W so we put them in their own - * cache lines. - * - * XXX We could combine the atid fields above with the lock here since - * atids are use once (unlike other tids). OTOH the above fields are - * usually in cache due to tid_tab. - */ - struct mtx atid_lock /* ____cacheline_aligned_in_smp */; - union active_open_entry *afree; - unsigned int atids_in_use; - - struct mtx stid_lock /*____cacheline_aligned */; - union listen_entry *sfree; - unsigned int stids_in_use; -}; +#define S_HDR_SGL 10 +#define V_HDR_SGL(x) ((x) << S_HDR_SGL) +#define F_HDR_SGL V_HDR_SGL(1U) -struct t3c_data { - struct t3cdev *dev; - unsigned int tx_max_chunk; /* max payload for TX_DATA */ - unsigned int max_wrs; /* max in-flight WRs per connection */ - unsigned int nmtus; - const unsigned short *mtus; - struct tid_info tid_maps; - - struct toe_tid_entry *tid_release_list; - struct mtx tid_release_lock; - struct task tid_release_task; +struct ofld_hdr +{ + void *sgl; /* SGL, if F_HDR_SGL set in flags */ + int plen; /* amount of payload (in bytes) */ + int flags; }; /* - * t3cdev -> toe_data accessor - */ -#define T3C_DATA(dev) (*(struct t3c_data **)&(dev)->l4opt) - -/* - * Map an ATID or STID to their entries in the corresponding TID tables. + * Convenience function for fixed size CPLs that fit in 1 desc. */ -static inline union active_open_entry *atid2entry(const struct tid_info *t, - unsigned int atid) +#define M_GETHDR_OFLD(qset, ctrl, cpl) \ + m_gethdr_ofld(qset, ctrl, sizeof(*cpl), (void **)&cpl) +static inline struct mbuf * +m_gethdr_ofld(int qset, int ctrl, int cpllen, void **cpl) { - return &t->atid_tab[atid - t->atid_base]; -} + struct mbuf *m; + struct ofld_hdr *oh; + m = m_gethdr(M_NOWAIT, MT_DATA); + if (m == NULL) + return (NULL); -static inline union listen_entry *stid2entry(const struct tid_info *t, - unsigned int stid) -{ - return &t->stid_tab[stid - t->stid_base]; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 13:43:31 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C176106566B; Sun, 1 Jul 2012 13:43:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 758608FC0A; Sun, 1 Jul 2012 13:43:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61DhVYQ005175; Sun, 1 Jul 2012 13:43:31 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61DhVuI005167; Sun, 1 Jul 2012 13:43:31 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207011343.q61DhVuI005167@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 1 Jul 2012 13:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237925 - in stable/9/sys: dev/cxgb dev/cxgbe dev/cxgbe/common dev/cxgbe/firmware dev/cxgbe/tom modules/cxgbe/if_cxgbe X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 13:43:31 -0000 Author: np Date: Sun Jul 1 13:43:30 2012 New Revision: 237925 URL: http://svn.freebsd.org/changeset/base/237925 Log: MFC r237832, r237436, r237439, r237463, r237512, r237587, r237799, r237819, r237831. r237832: cxgb(4): IPv6 rx/tx hw checksum, IPv6 TSO and LRO too. r237436: cxgbe(4): update to firmware interface 1.5.2.0; updates to shared code. r237439: Do not read registers with read side effects while performing a register dump for cxgbetool. r237463: Do not allocate extra vectors when adapter is not TOE capable (or toecaps have been disallowed by the user). r237512: Better way to determine the status page length and rx pad boundary. r237587: Allow cxgbe(4) running within a VM to attach to its devices that have been exported via PCI passthrough. r237799: cxgbe(4): support for IPv6 hardware checksumming (rx and tx). r237819: cxgbe(4): support for IPv6 TSO and LRO. r237831: - Assign (don't OR) the CSUM_XXX bits to csum_flags in the rx checksum code. - Fix TSO/TSO4 mixup. - Add IFCAP_LINKSTATE to the available/enabled capabilities. Modified: stable/9/sys/dev/cxgb/cxgb_adapter.h stable/9/sys/dev/cxgb/cxgb_main.c stable/9/sys/dev/cxgb/cxgb_sge.c stable/9/sys/dev/cxgbe/adapter.h stable/9/sys/dev/cxgbe/common/common.h stable/9/sys/dev/cxgbe/common/t4_hw.c stable/9/sys/dev/cxgbe/common/t4_msg.h stable/9/sys/dev/cxgbe/firmware/t4fw_cfg.txt stable/9/sys/dev/cxgbe/firmware/t4fw_cfg_uwire.txt stable/9/sys/dev/cxgbe/firmware/t4fw_interface.h stable/9/sys/dev/cxgbe/osdep.h stable/9/sys/dev/cxgbe/t4_l2t.c stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c stable/9/sys/modules/cxgbe/if_cxgbe/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_adapter.h Sun Jul 1 12:59:00 2012 (r237924) +++ stable/9/sys/dev/cxgb/cxgb_adapter.h Sun Jul 1 13:43:30 2012 (r237925) @@ -80,6 +80,15 @@ extern int cxgb_debug; #define MTX_DESTROY mtx_destroy #endif +#ifndef IFCAP_HWCSUM_IPV6 +#define IFCAP_HWCSUM_IPV6 0 +#define CSUM_TCP_IPV6 0 +#define CSUM_UDP_IPV6 0 +#define IFCAP_TXCSUM_IPV6 0 +#define IFCAP_RXCSUM_IPV6 0 +#define CSUM_DATA_VALID_IPV6 0 +#endif + enum { LF_NO = 0, LF_MAYBE, @@ -264,15 +273,6 @@ struct sge_txq { struct sg_ent txq_sgl[TX_MAX_SEGS / 2 + 1]; }; - -enum { - SGE_PSTAT_TSO, /* # of TSO requests */ - SGE_PSTAT_RX_CSUM_GOOD, /* # of successful RX csum offloads */ - SGE_PSTAT_TX_CSUM, /* # of TX checksum offloads */ - SGE_PSTAT_VLANEX, /* # of VLAN tag extractions */ - SGE_PSTAT_VLANINS, /* # of VLAN tag insertions */ -}; - #define SGE_PSTAT_MAX (SGE_PSTAT_VLANINS+1) #define QS_EXITING 0x1 @@ -287,7 +287,6 @@ struct sge_qset { struct lro_state lro; struct sge_txq txq[SGE_TXQ_PER_SET]; uint32_t txq_stopped; /* which Tx queues are stopped */ - uint64_t port_stats[SGE_PSTAT_MAX]; struct port_info *port; struct adapter *adap; int idx; /* qset # */ @@ -537,7 +536,7 @@ int t3_sge_reset_adapter(adapter_t *); int t3_sge_init_port(struct port_info *); void t3_free_tx_desc(struct sge_qset *qs, int n, int qid); -void t3_rx_eth(struct adapter *adap, struct sge_rspq *rq, struct mbuf *m, int ethpad); +void t3_rx_eth(struct adapter *adap, struct mbuf *m, int ethpad); void t3_add_attach_sysctls(adapter_t *sc); void t3_add_configured_sysctls(adapter_t *sc); Modified: stable/9/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_main.c Sun Jul 1 12:59:00 2012 (r237924) +++ stable/9/sys/dev/cxgb/cxgb_main.c Sun Jul 1 13:43:30 2012 (r237925) @@ -986,7 +986,7 @@ cxgb_makedev(struct port_info *pi) #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ - IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) + IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6) #define CXGB_CAP_ENABLE CXGB_CAP static int @@ -1027,7 +1027,8 @@ cxgb_port_attach(device_t dev) ifp->if_capabilities |= IFCAP_TOE4; #endif ifp->if_capenable = CXGB_CAP_ENABLE; - ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO; + ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | + CSUM_UDP_IPV6 | CSUM_TCP_IPV6; /* * Disable TSO on 4-port - it isn't supported by the firmware. @@ -1950,31 +1951,52 @@ fail: ifp->if_capenable ^= IFCAP_TXCSUM; ifp->if_hwassist ^= (CSUM_TCP | CSUM_UDP | CSUM_IP); - if (IFCAP_TSO & ifp->if_capenable && + if (IFCAP_TSO4 & ifp->if_capenable && !(IFCAP_TXCSUM & ifp->if_capenable)) { - ifp->if_capenable &= ~IFCAP_TSO; - ifp->if_hwassist &= ~CSUM_TSO; + ifp->if_capenable &= ~IFCAP_TSO4; if_printf(ifp, - "tso disabled due to -txcsum.\n"); + "tso4 disabled due to -txcsum.\n"); + } + } + if (mask & IFCAP_TXCSUM_IPV6) { + ifp->if_capenable ^= IFCAP_TXCSUM_IPV6; + ifp->if_hwassist ^= (CSUM_UDP_IPV6 | CSUM_TCP_IPV6); + + if (IFCAP_TSO6 & ifp->if_capenable && + !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + ifp->if_capenable &= ~IFCAP_TSO6; + if_printf(ifp, + "tso6 disabled due to -txcsum6.\n"); } } if (mask & IFCAP_RXCSUM) ifp->if_capenable ^= IFCAP_RXCSUM; - if (mask & IFCAP_TSO) { - ifp->if_capenable ^= IFCAP_TSO; + if (mask & IFCAP_RXCSUM_IPV6) + ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; - if (IFCAP_TSO & ifp->if_capenable) { - if (IFCAP_TXCSUM & ifp->if_capenable) - ifp->if_hwassist |= CSUM_TSO; - else { - ifp->if_capenable &= ~IFCAP_TSO; - ifp->if_hwassist &= ~CSUM_TSO; - if_printf(ifp, - "enable txcsum first.\n"); - error = EAGAIN; - } - } else - ifp->if_hwassist &= ~CSUM_TSO; + /* + * Note that we leave CSUM_TSO alone (it is always set). The + * kernel takes both IFCAP_TSOx and CSUM_TSO into account before + * sending a TSO request our way, so it's sufficient to toggle + * IFCAP_TSOx only. + */ + if (mask & IFCAP_TSO4) { + if (!(IFCAP_TSO4 & ifp->if_capenable) && + !(IFCAP_TXCSUM & ifp->if_capenable)) { + if_printf(ifp, "enable txcsum first.\n"); + error = EAGAIN; + goto fail; + } + ifp->if_capenable ^= IFCAP_TSO4; + } + if (mask & IFCAP_TSO6) { + if (!(IFCAP_TSO6 & ifp->if_capenable) && + !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + if_printf(ifp, "enable txcsum6 first.\n"); + error = EAGAIN; + goto fail; + } + ifp->if_capenable ^= IFCAP_TSO6; } if (mask & IFCAP_LRO) { ifp->if_capenable ^= IFCAP_LRO; Modified: stable/9/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_sge.c Sun Jul 1 12:59:00 2012 (r237924) +++ stable/9/sys/dev/cxgb/cxgb_sge.c Sun Jul 1 13:43:30 2012 (r237925) @@ -1432,7 +1432,8 @@ t3_encap(struct sge_qset *qs, struct mbu cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT); if (__predict_false(!(cflags & CSUM_IP))) cntrl |= F_TXPKT_IPCSUM_DIS; - if (__predict_false(!(cflags & (CSUM_TCP | CSUM_UDP)))) + if (__predict_false(!(cflags & (CSUM_TCP | CSUM_UDP | + CSUM_UDP_IPV6 | CSUM_TCP_IPV6)))) cntrl |= F_TXPKT_L4CSUM_DIS; hflit[0] = htonl(cntrl); @@ -1547,7 +1548,8 @@ t3_encap(struct sge_qset *qs, struct mbu cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT); if (__predict_false(!(m0->m_pkthdr.csum_flags & CSUM_IP))) cntrl |= F_TXPKT_IPCSUM_DIS; - if (__predict_false(!(m0->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP)))) + if (__predict_false(!(m0->m_pkthdr.csum_flags & (CSUM_TCP | + CSUM_UDP | CSUM_UDP_IPV6 | CSUM_TCP_IPV6)))) cntrl |= F_TXPKT_L4CSUM_DIS; cpl->cntrl = htonl(cntrl); cpl->len = htonl(mlen | 0x80000000); @@ -2620,20 +2622,12 @@ err: * will also be taken into account here. */ void -t3_rx_eth(struct adapter *adap, struct sge_rspq *rq, struct mbuf *m, int ethpad) +t3_rx_eth(struct adapter *adap, struct mbuf *m, int ethpad) { struct cpl_rx_pkt *cpl = (struct cpl_rx_pkt *)(mtod(m, uint8_t *) + ethpad); struct port_info *pi = &adap->port[adap->rxpkt_map[cpl->iff]]; struct ifnet *ifp = pi->ifp; - if ((ifp->if_capenable & IFCAP_RXCSUM) && !cpl->fragment && - cpl->csum_valid && cpl->csum == 0xffff) { - m->m_pkthdr.csum_flags = (CSUM_IP_CHECKED|CSUM_IP_VALID); - rspq_to_qset(rq)->port_stats[SGE_PSTAT_RX_CSUM_GOOD]++; - m->m_pkthdr.csum_flags = (CSUM_IP_CHECKED|CSUM_IP_VALID|CSUM_DATA_VALID|CSUM_PSEUDO_HDR); - m->m_pkthdr.csum_data = 0xffff; - } - if (cpl->vlan_valid) { m->m_pkthdr.ether_vtag = ntohs(cpl->vlan); m->m_flags |= M_VLANTAG; @@ -2647,6 +2641,30 @@ t3_rx_eth(struct adapter *adap, struct s m->m_pkthdr.len -= (sizeof(*cpl) + ethpad); m->m_len -= (sizeof(*cpl) + ethpad); m->m_data += (sizeof(*cpl) + ethpad); + + if (!cpl->fragment && cpl->csum_valid && cpl->csum == 0xffff) { + struct ether_header *eh = mtod(m, void *); + uint16_t eh_type; + + if (eh->ether_type == htons(ETHERTYPE_VLAN)) { + struct ether_vlan_header *evh = mtod(m, void *); + + eh_type = evh->evl_proto; + } else + eh_type = eh->ether_type; + + if (ifp->if_capenable & IFCAP_RXCSUM && + eh_type == htons(ETHERTYPE_IP)) { + m->m_pkthdr.csum_flags = (CSUM_IP_CHECKED | + CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR); + m->m_pkthdr.csum_data = 0xffff; + } else if (ifp->if_capenable & IFCAP_RXCSUM_IPV6 && + eh_type == htons(ETHERTYPE_IPV6)) { + m->m_pkthdr.csum_flags = (CSUM_DATA_VALID_IPV6 | + CSUM_PSEUDO_HDR); + m->m_pkthdr.csum_data = 0xffff; + } + } } /** @@ -2913,7 +2931,7 @@ process_responses(adapter_t *adap, struc } else if (eth && eop) { struct mbuf *m = mh->mh_head; - t3_rx_eth(adap, rspq, m, ethpad); + t3_rx_eth(adap, m, ethpad); /* * The T304 sends incoming packets on any qset. If LRO Modified: stable/9/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/9/sys/dev/cxgbe/adapter.h Sun Jul 1 12:59:00 2012 (r237924) +++ stable/9/sys/dev/cxgbe/adapter.h Sun Jul 1 13:43:30 2012 (r237925) @@ -56,6 +56,15 @@ MALLOC_DECLARE(M_CXGBE); #define CXGBE_UNIMPLEMENTED(s) \ panic("%s (%s, line %d) not implemented yet.", s, __FILE__, __LINE__) +#ifndef IFCAP_HWCSUM_IPV6 +#define IFCAP_HWCSUM_IPV6 0 +#define CSUM_TCP_IPV6 0 +#define CSUM_UDP_IPV6 0 +#define IFCAP_TXCSUM_IPV6 0 +#define IFCAP_RXCSUM_IPV6 0 +#define CSUM_DATA_VALID_IPV6 0 +#endif + #if defined(__i386__) || defined(__amd64__) static __inline void prefetch(void *x) @@ -391,7 +400,7 @@ struct sge_txq { /* stats for common events first */ uint64_t txcsum; /* # of times hardware assisted with checksum */ - uint64_t tso_wrs; /* # of IPv4 TSO work requests */ + uint64_t tso_wrs; /* # of TSO work requests */ uint64_t vlan_insertion;/* # of times VLAN tag was inserted */ uint64_t imm_wrs; /* # of work requests with immediate data */ uint64_t sgl_wrs; /* # of work requests with direct SGL */ @@ -411,7 +420,7 @@ struct sge_rxq { struct sge_fl fl; /* MUST follow iq */ struct ifnet *ifp; /* the interface this rxq belongs to */ -#ifdef INET +#if defined(INET) || defined(INET6) struct lro_ctrl lro; /* LRO state */ #endif Modified: stable/9/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/common.h Sun Jul 1 12:59:00 2012 (r237924) +++ stable/9/sys/dev/cxgbe/common/common.h Sun Jul 1 13:43:30 2012 (r237925) @@ -38,6 +38,8 @@ enum { SERNUM_LEN = 24, /* Serial # length */ EC_LEN = 16, /* E/C length */ ID_LEN = 16, /* ID length */ + PN_LEN = 16, /* Part Number length */ + MACADDR_LEN = 12, /* MAC Address length */ }; enum { MEM_EDC0, MEM_EDC1, MEM_MC }; @@ -62,8 +64,8 @@ enum { }; #define FW_VERSION_MAJOR 1 -#define FW_VERSION_MINOR 4 -#define FW_VERSION_MICRO 16 +#define FW_VERSION_MINOR 5 +#define FW_VERSION_MICRO 2 struct port_stats { u64 tx_octets; /* total # of octets in good frames */ @@ -219,6 +221,8 @@ struct vpd_params { u8 ec[EC_LEN + 1]; u8 sn[SERNUM_LEN + 1]; u8 id[ID_LEN + 1]; + u8 pn[PN_LEN + 1]; + u8 na[MACADDR_LEN + 1]; }; struct pci_params { @@ -356,6 +360,8 @@ void t4_write_indirect(struct adapter *a unsigned int data_reg, const u32 *vals, unsigned int nregs, unsigned int start_idx); +u32 t4_hw_pci_read_cfg4(adapter_t *adapter, int reg); + struct fw_filter_wr; void t4_intr_enable(struct adapter *adapter); @@ -374,7 +380,7 @@ int t4_seeprom_wp(struct adapter *adapte int t4_read_flash(struct adapter *adapter, unsigned int addr, unsigned int nwords, u32 *data, int byte_oriented); int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size); -int t4_load_boot(struct adapter *adap, const u8 *boot_data, +int t4_load_boot(struct adapter *adap, u8 *boot_data, unsigned int boot_addr, unsigned int size); unsigned int t4_flash_cfg_addr(struct adapter *adapter); int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size); @@ -431,6 +437,9 @@ int t4_mem_read(struct adapter *adap, in __be32 *data); void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p); +void t4_get_port_stats_offset(struct adapter *adap, int idx, + struct port_stats *stats, + struct port_stats *offset); void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p); void t4_clr_port_stats(struct adapter *adap, int idx); @@ -472,6 +481,10 @@ int t4_fw_hello(struct adapter *adap, un enum dev_master master, enum dev_state *state); int t4_fw_bye(struct adapter *adap, unsigned int mbox); int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset); +int t4_fw_halt(struct adapter *adap, unsigned int mbox, int force); +int t4_fw_restart(struct adapter *adap, unsigned int mbox, int reset); +int t4_fw_upgrade(struct adapter *adap, unsigned int mbox, + const u8 *fw_data, unsigned int size, int force); int t4_fw_initialize(struct adapter *adap, unsigned int mbox); int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int nparams, const u32 *params, @@ -484,6 +497,10 @@ int t4_cfg_pfvf(struct adapter *adap, un unsigned int rxqi, unsigned int rxq, unsigned int tc, unsigned int vi, unsigned int cmask, unsigned int pmask, unsigned int exactf, unsigned int rcaps, unsigned int wxcaps); +int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox, + unsigned int port, unsigned int pf, unsigned int vf, + unsigned int nmac, u8 *mac, unsigned int *rss_size, + unsigned int portfunc, unsigned int idstype); int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port, unsigned int pf, unsigned int vf, unsigned int nmac, u8 *mac, unsigned int *rss_size); @@ -524,5 +541,10 @@ int t4_sge_ctxt_rd(struct adapter *adap, enum ctxt_type ctype, u32 *data); int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, enum ctxt_type ctype, u32 *data); +int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox); int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl); +int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val); +int t4_config_scheduler(struct adapter *adapter, int mode, int level, int pktsize, + int sched_class, int port, int rate, int unit, + int weight, int minrate, int maxrate); #endif /* __CHELSIO_COMMON_H */ Modified: stable/9/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/9/sys/dev/cxgbe/common/t4_hw.c Sun Jul 1 12:59:00 2012 (r237924) +++ stable/9/sys/dev/cxgbe/common/t4_hw.c Sun Jul 1 13:43:30 2012 (r237925) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Chelsio Communications, Inc. + * Copyright (c) 2012 Chelsio Communications, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -135,6 +135,20 @@ void t4_write_indirect(struct adapter *a } /* + * Read a 32-bit PCI Configuration Space register via the PCI-E backdoor + * mechanism. This guarantees that we get the real value even if we're + * operating within a Virtual Machine and the Hypervisor is trapping our + * Configuration Space accesses. + */ +u32 t4_hw_pci_read_cfg4(adapter_t *adap, int reg) +{ + t4_write_reg(adap, A_PCIE_CFG_SPACE_REQ, + F_ENABLE | F_LOCALCFG | V_FUNCTION(adap->pf) | + V_REGISTER(reg)); + return t4_read_reg(adap, A_PCIE_CFG_SPACE_DATA); +} + +/* * Get the reply to a mailbox command and store it in @rpl in big-endian order. */ static void get_mbox_rpl(struct adapter *adap, __be64 *rpl, int nflit, @@ -196,7 +210,6 @@ int t4_wr_mbox_meat(struct adapter *adap u64 res; int i, ms, delay_idx; const __be64 *p = cmd; - u32 data_reg = PF_REG(mbox, A_CIM_PF_MAILBOX_DATA); u32 ctl_reg = PF_REG(mbox, A_CIM_PF_MAILBOX_CTRL); @@ -283,7 +296,7 @@ int t4_mc_read(struct adapter *adap, u32 #define MC_DATA(i) MC_BIST_STATUS_REG(A_MC_BIST_STATUS_RDATA, i) for (i = 15; i >= 0; i--) - *data++ = htonl(t4_read_reg(adap, MC_DATA(i))); + *data++ = ntohl(t4_read_reg(adap, MC_DATA(i))); if (ecc) *ecc = t4_read_reg64(adap, MC_DATA(16)); #undef MC_DATA @@ -321,7 +334,7 @@ int t4_edc_read(struct adapter *adap, in #define EDC_DATA(i) (EDC_BIST_STATUS_REG(A_EDC_BIST_STATUS_RDATA, i) + idx) for (i = 15; i >= 0; i--) - *data++ = htonl(t4_read_reg(adap, EDC_DATA(i))); + *data++ = ntohl(t4_read_reg(adap, EDC_DATA(i))); if (ecc) *ecc = t4_read_reg64(adap, EDC_DATA(16)); #undef EDC_DATA @@ -566,7 +579,7 @@ static int get_vpd_keyword_val(const str static int get_vpd_params(struct adapter *adapter, struct vpd_params *p) { int i, ret, addr; - int ec, sn; + int ec, sn, pn, na; u8 vpd[VPD_LEN], csum; const struct t4_vpd_hdr *v; @@ -602,6 +615,8 @@ static int get_vpd_params(struct adapter } FIND_VPD_KW(ec, "EC"); FIND_VPD_KW(sn, "SN"); + FIND_VPD_KW(pn, "PN"); + FIND_VPD_KW(na, "NA"); #undef FIND_VPD_KW memcpy(p->id, v->id_data, ID_LEN); @@ -611,6 +626,10 @@ static int get_vpd_params(struct adapter i = vpd[sn - VPD_INFO_FLD_HDR_SIZE + 2]; memcpy(p->sn, vpd + sn, min(i, SERNUM_LEN)); strstrip(p->sn); + memcpy(p->pn, vpd + pn, min(i, PN_LEN)); + strstrip((char *)p->pn); + memcpy(p->na, vpd + na, min(i, MACADDR_LEN)); + strstrip((char *)p->na); return 0; } @@ -954,7 +973,7 @@ int t4_load_cfg(struct adapter *adap, co if (ret || size == 0) goto out; - /* this will write to the flash up to SF_PAGE_SIZE at a time */ + /* this will write to the flash up to SF_PAGE_SIZE at a time */ for (i = 0; i< size; i+= SF_PAGE_SIZE) { if ( (size - i) < SF_PAGE_SIZE) n = size - i; @@ -1056,42 +1075,209 @@ out: return ret; } -/* BIOS boot header */ -typedef struct boot_header_s { - u8 signature[2]; /* signature */ - u8 length; /* image length (include header) */ - u8 offset[4]; /* initialization vector */ - u8 reserved[19]; /* reserved */ - u8 exheader[2]; /* offset to expansion header */ -} boot_header_t; +/* BIOS boot headers */ +typedef struct pci_expansion_rom_header { + u8 signature[2]; /* ROM Signature. Should be 0xaa55 */ + u8 reserved[22]; /* Reserved per processor Architecture data */ + u8 pcir_offset[2]; /* Offset to PCI Data Structure */ +} pci_exp_rom_header_t; /* PCI_EXPANSION_ROM_HEADER */ + +/* Legacy PCI Expansion ROM Header */ +typedef struct legacy_pci_expansion_rom_header { + u8 signature[2]; /* ROM Signature. Should be 0xaa55 */ + u8 size512; /* Current Image Size in units of 512 bytes */ + u8 initentry_point[4]; + u8 cksum; /* Checksum computed on the entire Image */ + u8 reserved[16]; /* Reserved */ + u8 pcir_offset[2]; /* Offset to PCI Data Struture */ +} legacy_pci_exp_rom_header_t; /* LEGACY_PCI_EXPANSION_ROM_HEADER */ + +/* EFI PCI Expansion ROM Header */ +typedef struct efi_pci_expansion_rom_header { + u8 signature[2]; // ROM signature. The value 0xaa55 + u8 initialization_size[2]; /* Units 512. Includes this header */ + u8 efi_signature[4]; /* Signature from EFI image header. 0x0EF1 */ + u8 efi_subsystem[2]; /* Subsystem value for EFI image header */ + u8 efi_machine_type[2]; /* Machine type from EFI image header */ + u8 compression_type[2]; /* Compression type. */ + /* + * Compression type definition + * 0x0: uncompressed + * 0x1: Compressed + * 0x2-0xFFFF: Reserved + */ + u8 reserved[8]; /* Reserved */ + u8 efi_image_header_offset[2]; /* Offset to EFI Image */ + u8 pcir_offset[2]; /* Offset to PCI Data Structure */ +} efi_pci_exp_rom_header_t; /* EFI PCI Expansion ROM Header */ + +/* PCI Data Structure Format */ +typedef struct pcir_data_structure { /* PCI Data Structure */ + u8 signature[4]; /* Signature. The string "PCIR" */ + u8 vendor_id[2]; /* Vendor Identification */ + u8 device_id[2]; /* Device Identification */ + u8 vital_product[2]; /* Pointer to Vital Product Data */ + u8 length[2]; /* PCIR Data Structure Length */ + u8 revision; /* PCIR Data Structure Revision */ + u8 class_code[3]; /* Class Code */ + u8 image_length[2]; /* Image Length. Multiple of 512B */ + u8 code_revision[2]; /* Revision Level of Code/Data */ + u8 code_type; /* Code Type. */ + /* + * PCI Expansion ROM Code Types + * 0x00: Intel IA-32, PC-AT compatible. Legacy + * 0x01: Open Firmware standard for PCI. FCODE + * 0x02: Hewlett-Packard PA RISC. HP reserved + * 0x03: EFI Image. EFI + * 0x04-0xFF: Reserved. + */ + u8 indicator; /* Indicator. Identifies the last image in the ROM */ + u8 reserved[2]; /* Reserved */ +} pcir_data_t; /* PCI__DATA_STRUCTURE */ +/* BOOT constants */ enum { BOOT_FLASH_BOOT_ADDR = 0x0,/* start address of boot image in flash */ BOOT_SIGNATURE = 0xaa55, /* signature of BIOS boot ROM */ BOOT_SIZE_INC = 512, /* image size measured in 512B chunks */ - BOOT_MIN_SIZE = sizeof(boot_header_t), /* at least basic header */ - BOOT_MAX_SIZE = 1024*BOOT_SIZE_INC /* 1 byte * length increment */ + BOOT_MIN_SIZE = sizeof(pci_exp_rom_header_t), /* basic header */ + BOOT_MAX_SIZE = 1024*BOOT_SIZE_INC, /* 1 byte * length increment */ + VENDOR_ID = 0x1425, /* Vendor ID */ + PCIR_SIGNATURE = 0x52494350 /* PCIR signature */ }; /* + * modify_device_id - Modifies the device ID of the Boot BIOS image + * @adatper: the device ID to write. + * @boot_data: the boot image to modify. + * + * Write the supplied device ID to the boot BIOS image. + */ +static void modify_device_id(int device_id, u8 *boot_data) +{ + legacy_pci_exp_rom_header_t *header; + pcir_data_t *pcir_header; + u32 cur_header = 0; + + /* + * Loop through all chained images and change the device ID's + */ + while (1) { + header = (legacy_pci_exp_rom_header_t *) &boot_data[cur_header]; + pcir_header = (pcir_data_t *) &boot_data[cur_header + + le16_to_cpu(*(u16*)header->pcir_offset)]; + + /* + * Only modify the Device ID if code type is Legacy or HP. + * 0x00: Okay to modify + * 0x01: FCODE. Do not be modify + * 0x03: Okay to modify + * 0x04-0xFF: Do not modify + */ + if (pcir_header->code_type == 0x00) { + u8 csum = 0; + int i; + + /* + * Modify Device ID to match current adatper + */ + *(u16*) pcir_header->device_id = device_id; + + /* + * Set checksum temporarily to 0. + * We will recalculate it later. + */ + header->cksum = 0x0; + + /* + * Calculate and update checksum + */ + for (i = 0; i < (header->size512 * 512); i++) + csum += (u8)boot_data[cur_header + i]; + + /* + * Invert summed value to create the checksum + * Writing new checksum value directly to the boot data + */ + boot_data[cur_header + 7] = -csum; + + } else if (pcir_header->code_type == 0x03) { + + /* + * Modify Device ID to match current adatper + */ + *(u16*) pcir_header->device_id = device_id; + + } + + + /* + * Check indicator element to identify if this is the last + * image in the ROM. + */ + if (pcir_header->indicator & 0x80) + break; + + /* + * Move header pointer up to the next image in the ROM. + */ + cur_header += header->size512 * 512; + } +} + +/* * t4_load_boot - download boot flash * @adapter: the adapter * @boot_data: the boot image to write + * @boot_addr: offset in flash to write boot_data * @size: image size * * Write the supplied boot image to the card's serial flash. * The boot image has the following sections: a 28-byte header and the * boot image. */ -int t4_load_boot(struct adapter *adap, const u8 *boot_data, +int t4_load_boot(struct adapter *adap, u8 *boot_data, unsigned int boot_addr, unsigned int size) { + pci_exp_rom_header_t *header; + int pcir_offset ; + pcir_data_t *pcir_header; int ret, addr; + uint16_t device_id; unsigned int i; unsigned int boot_sector = boot_addr * 1024; unsigned int sf_sec_size = adap->params.sf_size / adap->params.sf_nsec; /* + * Make sure the boot image does not encroach on the firmware region + */ + if ((boot_sector + size) >> 16 > FLASH_FW_START_SEC) { + CH_ERR(adap, "boot image encroaching on firmware region\n"); + return -EFBIG; + } + + /* + * Number of sectors spanned + */ + i = DIV_ROUND_UP(size ? size : FLASH_BOOTCFG_MAX_SIZE, + sf_sec_size); + ret = t4_flash_erase_sectors(adap, boot_sector >> 16, + (boot_sector >> 16) + i - 1); + + /* + * If size == 0 then we're simply erasing the FLASH sectors associated + * with the on-adapter option ROM file + */ + if (ret || (size == 0)) + goto out; + + /* Get boot header */ + header = (pci_exp_rom_header_t *)boot_data; + pcir_offset = le16_to_cpu(*(u16 *)header->pcir_offset); + /* PCIR Data Structure */ + pcir_header = (pcir_data_t *) &boot_data[pcir_offset]; + + /* * Perform some primitive sanity testing to avoid accidentally * writing garbage over the boot sectors. We ought to check for * more but it's not worth it for now ... @@ -1102,18 +1288,46 @@ int t4_load_boot(struct adapter *adap, c } /* - * Make sure the boot image does not encroach on the firmware region + * Check BOOT ROM header signature */ - if ((boot_sector + size) >> 16 > FLASH_FW_START_SEC) { - CH_ERR(adap, "boot image encroaching on firmware region\n"); - return -EFBIG; + if (le16_to_cpu(*(u16*)header->signature) != BOOT_SIGNATURE ) { + CH_ERR(adap, "Boot image missing signature\n"); + return -EINVAL; } - i = DIV_ROUND_UP(size, sf_sec_size); /* # of sectors spanned */ - ret = t4_flash_erase_sectors(adap, boot_sector >> 16, - (boot_sector >> 16) + i - 1); - if (ret) - goto out; + /* + * Check PCI header signature + */ + if (le32_to_cpu(*(u32*)pcir_header->signature) != PCIR_SIGNATURE) { + CH_ERR(adap, "PCI header missing signature\n"); + return -EINVAL; + } + + /* + * Check Vendor ID matches Chelsio ID + */ + if (le16_to_cpu(*(u16*)pcir_header->vendor_id) != VENDOR_ID) { + CH_ERR(adap, "Vendor ID missing signature\n"); + return -EINVAL; + } + + /* + * Retrieve adapter's device ID + */ + t4_os_pci_read_cfg2(adap, PCI_DEVICE_ID, &device_id); + /* Want to deal with PF 0 so I strip off PF 4 indicator */ + device_id = (device_id & 0xff) | 0x4000; + + /* + * Check PCIE Device ID + */ + if (le16_to_cpu(*(u16*)pcir_header->device_id) != device_id) { + /* + * Change the device ID in the Boot BIOS image to match + * the Device ID of the current adapter. + */ + modify_device_id(device_id, boot_data); + } /* * Skip over the first SF_PAGE_SIZE worth of data and write it after @@ -3206,7 +3420,11 @@ void t4_get_chan_txrate(struct adapter * * @enable: whether to enable or disable the filter * * Configures one of the tracing filters available in HW. If @enable is - * %0 @tp is not examined and may be %NULL. + * %0 @tp is not examined and may be %NULL. The user is responsible to + * set the single/multiple trace mode by writing to A_MPS_TRC_CFG register + * by using "cxgbtool iface reg reg_addr=val" command. See t4_sniffer/ + * docs/readme.txt for a complete description of how to setup traceing on + * T4. */ int t4_set_trace_filter(struct adapter *adap, const struct trace_params *tp, int idx, int enable) @@ -3217,45 +3435,45 @@ int t4_set_trace_filter(struct adapter * if (!enable) { t4_write_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_A + ofst, 0); - goto out; + return 0; } - if (tp->port > 11 || tp->invert > 1 || tp->skip_len > M_TFLENGTH || - tp->skip_ofst > M_TFOFFSET || tp->min_len > M_TFMINPKTSIZE || - tp->snap_len > 9600 || (idx && tp->snap_len > 256)) - return -EINVAL; - - if (tp->snap_len > 256) { /* must be tracer 0 */ - if ((t4_read_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_A + 4) | - t4_read_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_A + 8) | - t4_read_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_A + 12)) & - F_TFEN) - return -EINVAL; /* other tracers are enabled */ + /* + * TODO - After T4 data book is updated, specify the exact + * section below. + * + * See T4 data book - MPS section for a complete description + * of the below if..else handling of A_MPS_TRC_CFG register + * value. + */ + cfg = t4_read_reg(adap, A_MPS_TRC_CFG); + if (cfg & F_TRCMULTIFILTER) { + /* + * If multiple tracers are enabled, then maximum + * capture size is 2.5KB (FIFO size of a single channel) + * minus 2 flits for CPL_TRACE_PKT header. + */ + if (tp->snap_len > ((10 * 1024 / 4) - (2 * 8))) + return -EINVAL; + } + else { + /* + * If multiple tracers are disabled, to avoid deadlocks + * maximum packet capture size of 9600 bytes is recommended. + * Also in this mode, only trace0 can be enabled and running. + */ multitrc = 0; - } else if (idx) { - i = t4_read_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_B); - if (G_TFCAPTUREMAX(i) > 256 && - (t4_read_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_A) & F_TFEN)) + if (tp->snap_len > 9600 || idx) return -EINVAL; } + if (tp->port > 11 || tp->invert > 1 || tp->skip_len > M_TFLENGTH || + tp->skip_ofst > M_TFOFFSET || tp->min_len > M_TFMINPKTSIZE) + return -EINVAL; + /* stop the tracer we'll be changing */ t4_write_reg(adap, A_MPS_TRC_FILTER_MATCH_CTL_A + ofst, 0); - /* disable tracing globally if running in the wrong single/multi mode */ - cfg = t4_read_reg(adap, A_MPS_TRC_CFG); - if ((cfg & F_TRCEN) && multitrc != (cfg & F_TRCMULTIFILTER)) { - t4_write_reg(adap, A_MPS_TRC_CFG, cfg ^ F_TRCEN); - t4_read_reg(adap, A_MPS_TRC_CFG); /* flush */ - msleep(1); - if (!(t4_read_reg(adap, A_MPS_TRC_CFG) & F_TRCFIFOEMPTY)) - return -ETIMEDOUT; - } - /* - * At this point either the tracing is enabled and in the right mode or - * disabled. - */ - idx *= (A_MPS_TRC_FILTER1_MATCH - A_MPS_TRC_FILTER0_MATCH); data_reg = A_MPS_TRC_FILTER0_MATCH + idx; mask_reg = A_MPS_TRC_FILTER0_DONT_CARE + idx; @@ -3271,9 +3489,6 @@ int t4_set_trace_filter(struct adapter * V_TFOFFSET(tp->skip_ofst) | V_TFLENGTH(tp->skip_len) | V_TFPORT(tp->port) | F_TFEN | V_TFINVERTMATCH(tp->invert)); - cfg &= ~F_TRCMULTIFILTER; - t4_write_reg(adap, A_MPS_TRC_CFG, cfg | F_TRCEN | multitrc); -out: t4_read_reg(adap, A_MPS_TRC_CFG); /* flush */ return 0; } @@ -3373,6 +3588,28 @@ static unsigned int get_mps_bg_map(struc } /** + * t4_get_port_stats_offset - collect port stats relative to a previous + * snapshot + * @adap: The adapter + * @idx: The port + * @stats: Current stats to fill + * @offset: Previous stats snapshot + */ +void t4_get_port_stats_offset(struct adapter *adap, int idx, + struct port_stats *stats, + struct port_stats *offset) +{ + u64 *s, *o; + int i; + + t4_get_port_stats(adap, idx, stats); + for (i = 0, s = (u64 *)stats, o = (u64 *)offset ; + i < (sizeof(struct port_stats)/sizeof(u64)) ; + i++, s++, o++) + *s -= *o; +} + +/** * t4_get_port_stats - collect port statistics * @adap: the adapter * @idx: the port index @@ -3633,6 +3870,20 @@ void t4_mk_filtdelwr(unsigned int ftid, (var).retval_len16 = htonl(FW_LEN16(var)); \ } while (0) +int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val) +{ + struct fw_ldst_cmd c; + + memset(&c, 0, sizeof(c)); + c.op_to_addrspace = htonl(V_FW_CMD_OP(FW_LDST_CMD) | F_FW_CMD_REQUEST | + F_FW_CMD_WRITE | V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_FIRMWARE)); + c.cycles_to_len16 = htonl(FW_LEN16(c)); + c.u.addrval.addr = htonl(addr); + c.u.addrval.val = htonl(val); + + return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); +} + /** * t4_mdio_rd - read a PHY register through MDIO * @adap: the adapter @@ -3693,6 +3944,30 @@ int t4_mdio_wr(struct adapter *adap, uns } /** + * t4_sge_ctxt_flush - flush the SGE context cache + * @adap: the adapter + * @mbox: mailbox to use for the FW command + * + * Issues a FW command through the given mailbox to flush the + * SGE context cache. + */ +int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox) +{ + int ret; + struct fw_ldst_cmd c; + + memset(&c, 0, sizeof(c)); + c.op_to_addrspace = htonl(V_FW_CMD_OP(FW_LDST_CMD) | F_FW_CMD_REQUEST | + F_FW_CMD_READ | + V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_SGE_EGRC)); + c.cycles_to_len16 = htonl(FW_LEN16(c)); + c.u.idctxt.msg_ctxtflush = htonl(F_FW_LDST_CMD_CTXTFLUSH); + + ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); + return ret; +} + +/** * t4_sge_ctxt_rd - read an SGE context through FW * @adap: the adapter * @mbox: mailbox to use for the FW command @@ -3764,9 +4039,10 @@ int t4_sge_ctxt_rd_bd(struct adapter *ad * @mbox: mailbox to use for the FW command * @evt_mbox: mailbox to receive async FW events * @master: specifies the caller's willingness to be the device master - * @state: returns the current device state + * @state: returns the current device state (if non-NULL) * - * Issues a command to establish communication with FW. + * Issues a command to establish communication with FW. Returns either + * an error (negative integer) or the mailbox of the Master PF. */ int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox, enum dev_master master, enum dev_state *state) @@ -3918,6 +4194,175 @@ int t4_fw_reset(struct adapter *adap, un } /** + * t4_fw_halt - issue a reset/halt to FW and put uP into RESET + * @adap: the adapter + * @mbox: mailbox to use for the FW RESET command (if desired) + * @force: force uP into RESET even if FW RESET command fails + * + * Issues a RESET command to firmware (if desired) with a HALT indication + * and then puts the microprocessor into RESET state. The RESET command + * will only be issued if a legitimate mailbox is provided (mbox <= + * M_PCIE_FW_MASTER). + * + * This is generally used in order for the host to safely manipulate the + * adapter without fear of conflicting with whatever the firmware might + * be doing. The only way out of this state is to RESTART the firmware + * ... + */ +int t4_fw_halt(struct adapter *adap, unsigned int mbox, int force) +{ + int ret = 0; + + /* + * If a legitimate mailbox is provided, issue a RESET command + * with a HALT indication. + */ + if (mbox <= M_PCIE_FW_MASTER) { + struct fw_reset_cmd c; + + memset(&c, 0, sizeof(c)); + INIT_CMD(c, RESET, WRITE); + c.val = htonl(F_PIORST | F_PIORSTMODE); + c.halt_pkd = htonl(F_FW_RESET_CMD_HALT); + ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); + } + + /* + * Normally we won't complete the operation if the firmware RESET + * command fails but if our caller insists we'll go ahead and put the + * uP into RESET. This can be useful if the firmware is hung or even + * missing ... We'll have to take the risk of putting the uP into + * RESET without the cooperation of firmware in that case. + * + * We also force the firmware's HALT flag to be on in case we bypassed + * the firmware RESET command above or we're dealing with old firmware + * which doesn't have the HALT capability. This will serve as a flag + * for the incoming firmware to know that it's coming out of a HALT + * rather than a RESET ... if it's new enough to understand that ... + */ + if (ret == 0 || force) { + t4_set_reg_field(adap, A_CIM_BOOT_CFG, F_UPCRST, F_UPCRST); + t4_set_reg_field(adap, A_PCIE_FW, F_PCIE_FW_HALT, F_PCIE_FW_HALT); + } + + /* + * And we always return the result of the firmware RESET command + * even when we force the uP into RESET ... + */ + return ret; +} + +/** + * t4_fw_restart - restart the firmware by taking the uP out of RESET + * @adap: the adapter + * @reset: if we want to do a RESET to restart things + * + * Restart firmware previously halted by t4_fw_halt(). On successful + * return the previous PF Master remains as the new PF Master and there + * is no need to issue a new HELLO command, etc. + * + * We do this in two ways: + * + * 1. If we're dealing with newer firmware we'll simply want to take + * the chip's microprocessor out of RESET. This will cause the + * firmware to start up from its start vector. And then we'll loop + * until the firmware indicates it's started again (PCIE_FW.HALT + * reset to 0) or we timeout. + * + * 2. If we're dealing with older firmware then we'll need to RESET + * the chip since older firmware won't recognize the PCIE_FW.HALT *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 18:27:13 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E9A7C1065672; Sun, 1 Jul 2012 18:27:13 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBA898FC0A; Sun, 1 Jul 2012 18:27:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61IRD36017245; Sun, 1 Jul 2012 18:27:13 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61IRD5k017243; Sun, 1 Jul 2012 18:27:13 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207011827.q61IRD5k017243@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Jul 2012 18:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237935 - stable/9/sys/amd64/amd64 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 18:27:14 -0000 Author: alc Date: Sun Jul 1 18:27:13 2012 New Revision: 237935 URL: http://svn.freebsd.org/changeset/base/237935 Log: MFC r233954, r236930 Micro-optimize free_pv_entry() for the expected case. Avoid unnecessary atomic operations for clearing PGA_WRITEABLE in pmap_remove_pages(). Modified: stable/9/sys/amd64/amd64/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Sun Jul 1 17:33:07 2012 (r237934) +++ stable/9/sys/amd64/amd64/pmap.c Sun Jul 1 18:27:13 2012 (r237935) @@ -2096,7 +2096,6 @@ pmap_collect(pmap_t locked_pmap, struct } } - /* * free the pv_entry back to the free list */ @@ -2117,13 +2116,16 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv field = idx / 64; bit = idx % 64; pc->pc_map[field] |= 1ul << bit; - /* move to head of list */ - TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); if (pc->pc_map[0] != PC_FREE0 || pc->pc_map[1] != PC_FREE1 || pc->pc_map[2] != PC_FREE2) { - TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + /* 98% of the time, pc is already at the head of the list. */ + if (__predict_false(pc != TAILQ_FIRST(&pmap->pm_pvchunk))) { + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + } return; } + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); @@ -4122,7 +4124,8 @@ pmap_remove_pages(pmap_t pmap) TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); if (TAILQ_EMPTY(&pvh->pv_list)) { for (mt = m; mt < &m[NBPDR / PAGE_SIZE]; mt++) - if (TAILQ_EMPTY(&mt->md.pv_list)) + if ((mt->aflags & PGA_WRITEABLE) != 0 && + TAILQ_EMPTY(&mt->md.pv_list)) vm_page_aflag_clear(mt, PGA_WRITEABLE); } mpte = pmap_lookup_pt_page(pmap, pv->pv_va); @@ -4138,7 +4141,8 @@ pmap_remove_pages(pmap_t pmap) } else { pmap_resident_count_dec(pmap, 1); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - if (TAILQ_EMPTY(&m->md.pv_list) && + if ((m->aflags & PGA_WRITEABLE) != 0 && + TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); if (TAILQ_EMPTY(&pvh->pv_list)) From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 1 21:51:58 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9FFD81065673; Sun, 1 Jul 2012 21:51:58 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70ECE8FC08; Sun, 1 Jul 2012 21:51:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q61Lpw03025755; Sun, 1 Jul 2012 21:51:58 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q61LpwB9025752; Sun, 1 Jul 2012 21:51:58 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201207012151.q61LpwB9025752@svn.freebsd.org> From: David Chisnall Date: Sun, 1 Jul 2012 21:51:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237938 - in stable/9: gnu/lib/libsupc++ lib/libcxxrt X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2012 21:51:58 -0000 Author: theraven Date: Sun Jul 1 21:51:57 2012 New Revision: 237938 URL: http://svn.freebsd.org/changeset/base/237938 Log: MFC symbol exports for libsupcc++ and libcxxrt that correctly export new and delete operators. Modified: stable/9/gnu/lib/libsupc++/Version.map stable/9/lib/libcxxrt/Version.map Directory Properties: stable/9/gnu/lib/libsupc++/ (props changed) stable/9/lib/libcxxrt/ (props changed) Modified: stable/9/gnu/lib/libsupc++/Version.map ============================================================================== --- stable/9/gnu/lib/libsupc++/Version.map Sun Jul 1 19:40:51 2012 (r237937) +++ stable/9/gnu/lib/libsupc++/Version.map Sun Jul 1 21:51:57 2012 (r237938) @@ -130,6 +130,20 @@ CXXABI_1.3 { *; }; +GLIBCXX_3.4 { + # operator new and new[] + _Znai[jm]; + _Zna[jm]RKSt9nothrow_t; + _Znw[jm]; + _Znw[jm]RKSt9nothrow_t; + + # operator delete and delete[] + _ZdaPv; + _ZdaPvRKSt9nothrow_t; + _ZdlPv; + _ZdlPvRKSt9nothrow_t; +}; + CXXABI_1.3.1 { __cxa_get_exception_ptr; Modified: stable/9/lib/libcxxrt/Version.map ============================================================================== --- stable/9/lib/libcxxrt/Version.map Sun Jul 1 19:40:51 2012 (r237937) +++ stable/9/lib/libcxxrt/Version.map Sun Jul 1 21:51:57 2012 (r237938) @@ -306,11 +306,6 @@ CXXRT_1.0 { "std::type_info::__is_pointer_p() const"; - "operator delete[](void*)"; - "operator delete(void*)"; - "operator new[](unsigned long)"; - "operator new(unsigned long)"; - "operator new(unsigned long, std::nothrow_t const&)"; }; __cxa_allocate_dependent_exception; @@ -321,3 +316,16 @@ CXXRT_1.0 { __cxa_rethrow_primary_exception; } CXXABI_1.3.1; + +GLIBCXX_3.4 { + extern "C++" { + "operator delete[](void*)"; + "operator delete(void*)"; + "operator new[](unsigned int)"; + "operator new(unsigned int)"; + "operator new(unsigned int, std::nothrow_t const&)"; + "operator new[](unsigned long)"; + "operator new(unsigned long)"; + "operator new(unsigned long, std::nothrow_t const&)"; + }; +}; From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 02:26:53 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D29C106566C; Mon, 2 Jul 2012 02:26:53 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 764278FC08; Mon, 2 Jul 2012 02:26:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622QrCs037507; Mon, 2 Jul 2012 02:26:53 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622Qrev037504; Mon, 2 Jul 2012 02:26:53 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201207020226.q622Qrev037504@svn.freebsd.org> From: Xin LI Date: Mon, 2 Jul 2012 02:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237940 - stable/9/crypto/openssh X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:26:53 -0000 Author: delphij Date: Mon Jul 2 02:26:52 2012 New Revision: 237940 URL: http://svn.freebsd.org/changeset/base/237940 Log: MFC r237568: Fetch both ECDSA and RSA keys by default in ssh-keyscan(1). Modified: stable/9/crypto/openssh/ssh-keyscan.1 stable/9/crypto/openssh/ssh-keyscan.c Directory Properties: stable/9/crypto/openssh/ (props changed) Modified: stable/9/crypto/openssh/ssh-keyscan.1 ============================================================================== --- stable/9/crypto/openssh/ssh-keyscan.1 Sun Jul 1 22:18:20 2012 (r237939) +++ stable/9/crypto/openssh/ssh-keyscan.1 Mon Jul 2 02:26:52 2012 (r237940) @@ -1,4 +1,4 @@ -.\" $OpenBSD: ssh-keyscan.1,v 1.29 2010/08/31 11:54:45 djm Exp $ +.\" $OpenBSD: ssh-keyscan.1,v 1.30 2012/04/11 13:34:17 djm Exp $ .\" $FreeBSD$ .\" .\" Copyright 1995, 1996 by David Mazieres . @@ -7,7 +7,7 @@ .\" permitted provided that due credit is given to the author and the .\" OpenBSD project by leaving this copyright notice intact. .\" -.Dd August 31, 2010 +.Dd April 11 2012 .Dt SSH-KEYSCAN 1 .Os .Sh NAME @@ -95,8 +95,11 @@ or .Dq rsa for protocol version 2. Multiple values may be specified by separating them with commas. -The default is -.Dq rsa . +The default is to fetch +.Dq rsa +and +.Dq ecdsa +keys. .It Fl v Verbose mode. Causes Modified: stable/9/crypto/openssh/ssh-keyscan.c ============================================================================== --- stable/9/crypto/openssh/ssh-keyscan.c Sun Jul 1 22:18:20 2012 (r237939) +++ stable/9/crypto/openssh/ssh-keyscan.c Mon Jul 2 02:26:52 2012 (r237940) @@ -57,7 +57,7 @@ int ssh_port = SSH_DEFAULT_PORT; #define KT_RSA 4 #define KT_ECDSA 8 -int get_keytypes = KT_RSA; /* Get only RSA keys by default */ +int get_keytypes = KT_RSA|KT_ECDSA;/* Get RSA and ECDSA keys by default */ int hash_hosts = 0; /* Hash hostname on output */ From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 02:36:06 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E70C106566C; Mon, 2 Jul 2012 02:36:06 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0C438FC0C; Mon, 2 Jul 2012 02:36:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622a5G3037926; Mon, 2 Jul 2012 02:36:05 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622a5kV037920; Mon, 2 Jul 2012 02:36:05 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207020236.q622a5kV037920@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 2 Jul 2012 02:36:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237941 - stable/9/sys/cam/ctl X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:36:06 -0000 Author: ken Date: Mon Jul 2 02:36:05 2012 New Revision: 237941 URL: http://svn.freebsd.org/changeset/base/237941 Log: MFC 237726: r237726 | ken | 2012-06-28 13:39:30 -0600 (Thu, 28 Jun 2012) | 5 lines Add a loader tunable, kern.cam.ctl.disable, that will disable loading CTL. This may be useful in very low memory installations. Modified: stable/9/sys/cam/ctl/ctl.c stable/9/sys/cam/ctl/ctl_backend.c stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c stable/9/sys/cam/ctl/ctl_frontend_internal.c stable/9/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl.c ============================================================================== --- stable/9/sys/cam/ctl/ctl.c Mon Jul 2 02:26:52 2012 (r237940) +++ stable/9/sys/cam/ctl/ctl.c Mon Jul 2 02:36:05 2012 (r237941) @@ -308,7 +308,6 @@ static struct scsi_control_page control_ /*aen_holdoff_period*/{0, 0} }; -SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer"); /* * XXX KDM move these into the softc. @@ -318,7 +317,12 @@ static int persis_offset; static uint8_t ctl_pause_rtr; static int ctl_is_single; static int index_to_aps_page; +int ctl_disable = 0; +SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer"); +SYSCTL_INT(_kern_cam_ctl, OID_AUTO, disable, CTLFLAG_RDTUN, &ctl_disable, 0, + "Disable CTL"); +TUNABLE_INT("kern.cam.ctl.disable", &ctl_disable); /* * Serial number (0x80), device id (0x83), and supported pages (0x00) @@ -949,6 +953,10 @@ ctl_init(void) ctl_pause_rtr = 0; rcv_sync_msg = 0; + /* If we're disabled, don't initialize. */ + if (ctl_disable != 0) + return; + control_softc = malloc(sizeof(*control_softc), M_DEVBUF, M_WAITOK); softc = control_softc; Modified: stable/9/sys/cam/ctl/ctl_backend.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_backend.c Mon Jul 2 02:26:52 2012 (r237940) +++ stable/9/sys/cam/ctl/ctl_backend.c Mon Jul 2 02:36:05 2012 (r237941) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include extern struct ctl_softc *control_softc; +extern int ctl_disable; int ctl_backend_register(struct ctl_backend_driver *be) @@ -71,6 +72,10 @@ ctl_backend_register(struct ctl_backend_ ctl_softc = control_softc; + /* Don't continue if CTL is disabled */ + if (ctl_disable != 0) + return (0); + mtx_lock(&ctl_softc->ctl_lock); /* * Sanity check, make sure this isn't a duplicate registration. Modified: stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Jul 2 02:26:52 2012 (r237940) +++ stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Jul 2 02:36:05 2012 (r237941) @@ -119,6 +119,7 @@ struct cfcs_softc cfcs_softc; * amount of SCSI sense data that we will report to CAM. */ static int cfcs_max_sense = sizeof(struct scsi_sense_data); +extern int ctl_disable; SYSINIT(cfcs_init, SI_SUB_CONFIGURE, SI_ORDER_FOURTH, cfcs_init, NULL); SYSCTL_NODE(_kern_cam, OID_AUTO, ctl2cam, CTLFLAG_RD, 0, @@ -138,6 +139,10 @@ cfcs_init(void) #endif int retval; + /* Don't continue if CTL is disabled */ + if (ctl_disable != 0) + return (0); + softc = &cfcs_softc; retval = 0; bzero(softc, sizeof(*softc)); Modified: stable/9/sys/cam/ctl/ctl_frontend_internal.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_frontend_internal.c Mon Jul 2 02:26:52 2012 (r237940) +++ stable/9/sys/cam/ctl/ctl_frontend_internal.c Mon Jul 2 02:36:05 2012 (r237941) @@ -187,6 +187,7 @@ struct cfi_softc { MALLOC_DEFINE(M_CTL_CFI, "ctlcfi", "CTL CFI"); static struct cfi_softc fetd_internal_softc; +extern int ctl_disable; void cfi_init(void); void cfi_shutdown(void) __unused; @@ -231,6 +232,10 @@ cfi_init(void) retval = 0; + /* If we're disabled, don't initialize */ + if (ctl_disable != 0) + return; + if (sizeof(struct cfi_lun_io) > CTL_PORT_PRIV_SIZE) { printf("%s: size of struct cfi_lun_io %zd > " "CTL_PORT_PRIV_SIZE %d\n", __func__, Modified: stable/9/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/9/sys/cam/ctl/scsi_ctl.c Mon Jul 2 02:26:52 2012 (r237940) +++ stable/9/sys/cam/ctl/scsi_ctl.c Mon Jul 2 02:36:05 2012 (r237941) @@ -227,12 +227,17 @@ static struct periph_driver ctlfe_driver PERIPHDRIVER_DECLARE(ctl, ctlfe_driver); extern struct ctl_softc *control_softc; +extern int ctl_disable; int ctlfeinitialize(void) { cam_status status; + /* Don't initialize if we're disabled */ + if (ctl_disable != 0) + return (0); + STAILQ_INIT(&ctlfe_softc_list); mtx_init(&ctlfe_list_mtx, ctlfe_mtx_desc, NULL, MTX_DEF); @@ -263,6 +268,10 @@ ctlfeinit(void) { cam_status status; + /* Don't initialize if we're disabled */ + if (ctl_disable != 0) + return; + STAILQ_INIT(&ctlfe_softc_list); mtx_init(&ctlfe_list_mtx, ctlfe_mtx_desc, NULL, MTX_DEF); From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 02:44:01 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D838106564A; Mon, 2 Jul 2012 02:44:01 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E98DE8FC0A; Mon, 2 Jul 2012 02:44:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622i0ED038357; Mon, 2 Jul 2012 02:44:00 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622i0AQ038354; Mon, 2 Jul 2012 02:44:00 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207020244.q622i0AQ038354@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 2 Jul 2012 02:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237943 - in stable/9/sys: powerpc/conf sparc64/conf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:44:01 -0000 Author: ken Date: Mon Jul 2 02:44:00 2012 New Revision: 237943 URL: http://svn.freebsd.org/changeset/base/237943 Log: MFC 237730: r237730 | ken | 2012-06-28 14:48:24 -0600 (Thu, 28 Jun 2012) | 5 lines Now that the mps(4) driver is endian-safe, add it to the powerpc and sparc64 GENERIC config files. Modified: stable/9/sys/powerpc/conf/GENERIC64 stable/9/sys/sparc64/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/conf/GENERIC64 ============================================================================== --- stable/9/sys/powerpc/conf/GENERIC64 Mon Jul 2 02:38:27 2012 (r237942) +++ stable/9/sys/powerpc/conf/GENERIC64 Mon Jul 2 02:44:00 2012 (r237943) @@ -94,6 +94,7 @@ options AHC_REG_PRETTY_PRINT # Print re device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals Modified: stable/9/sys/sparc64/conf/GENERIC ============================================================================== --- stable/9/sys/sparc64/conf/GENERIC Mon Jul 2 02:38:27 2012 (r237942) +++ stable/9/sys/sparc64/conf/GENERIC Mon Jul 2 02:44:00 2012 (r237943) @@ -95,6 +95,7 @@ device esp # AMD Am53C974, Sun ESP and device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 02:50:11 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F165106566B; Mon, 2 Jul 2012 02:50:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EA5F8FC12; Mon, 2 Jul 2012 02:50:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622oAcD038709; Mon, 2 Jul 2012 02:50:10 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622oAot038707; Mon, 2 Jul 2012 02:50:10 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201207020250.q622oAot038707@svn.freebsd.org> From: Xin LI Date: Mon, 2 Jul 2012 02:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237945 - stable/9/sys/netinet6 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:50:11 -0000 Author: delphij Date: Mon Jul 2 02:50:10 2012 New Revision: 237945 URL: http://svn.freebsd.org/changeset/base/237945 Log: MFC r237571: Fix a LOR acquiring the if_afdata lock while holding an rtentry lock. Possibly do some entra work in case we would not get into the ifa0 != NULL paths later as we already do for the mltaddr before. XXX We should possibly error in case in6_setscope fails. Reference: http://lists.freebsd.org/pipermail/freebsd-net/2011-September/029829.html Submitted by: bz Modified: stable/9/sys/netinet6/in6.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Mon Jul 2 02:45:33 2012 (r237944) +++ stable/9/sys/netinet6/in6.c Mon Jul 2 02:50:10 2012 (r237945) @@ -1304,6 +1304,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru struct sockaddr_in6 mltaddr, mltmask; struct in6_multi_mship *imm; struct rtentry *rt; + struct sockaddr_in6 sin6; int error; /* @@ -1330,6 +1331,19 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru if ((error = in6_setscope(&mltaddr.sin6_addr, ifp, NULL)) != 0) return (error); + /* + * As for the mltaddr above, proactively prepare the sin6 to avoid + * rtentry un- and re-locking. + */ + if (ifa0 != NULL) { + bzero(&sin6, sizeof(sin6)); + sin6.sin6_len = sizeof(sin6); + sin6.sin6_family = AF_INET6; + memcpy(&sin6.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, + sizeof(sin6.sin6_addr)); + in6_setscope(&sin6.sin6_addr, ifa0->ifa_ifp, NULL); + } + rt = in6_rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL, RT_DEFAULT_FIB); if (rt != NULL && rt->rt_gateway != NULL && (memcmp(&satosin6(rt->rt_gateway)->sin6_addr, @@ -1356,15 +1370,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru /* * Replace the gateway of the route. */ - struct sockaddr_in6 sa; - - bzero(&sa, sizeof(sa)); - sa.sin6_len = sizeof(struct sockaddr_in6); - sa.sin6_family = AF_INET6; - memcpy(&sa.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, - sizeof(sa.sin6_addr)); - in6_setscope(&sa.sin6_addr, ifa0->ifa_ifp, NULL); - memcpy(rt->rt_gateway, &sa, sizeof(sa)); + memcpy(rt->rt_gateway, &sin6, sizeof(sin6)); RTFREE_LOCKED(rt); } } else { @@ -1406,15 +1412,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru /* * Replace the gateway of the route. */ - struct sockaddr_in6 sa; - - bzero(&sa, sizeof(sa)); - sa.sin6_len = sizeof(struct sockaddr_in6); - sa.sin6_family = AF_INET6; - memcpy(&sa.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, - sizeof(sa.sin6_addr)); - in6_setscope(&sa.sin6_addr, ifa0->ifa_ifp, NULL); - memcpy(rt->rt_gateway, &sa, sizeof(sa)); + memcpy(rt->rt_gateway, &sin6, sizeof(sin6)); RTFREE_LOCKED(rt); } } else { From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 02:56:01 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C25B1106564A; Mon, 2 Jul 2012 02:56:01 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB7518FC15; Mon, 2 Jul 2012 02:56:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q622u1Lr039085; Mon, 2 Jul 2012 02:56:01 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q622u1Uf039083; Mon, 2 Jul 2012 02:56:01 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207020256.q622u1Uf039083@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 2 Jul 2012 02:56:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237947 - stable/9/sys/dev/mps X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 02:56:01 -0000 Author: ken Date: Mon Jul 2 02:56:01 2012 New Revision: 237947 URL: http://svn.freebsd.org/changeset/base/237947 Log: MFC 237800: r237800 | ken | 2012-06-29 11:00:52 -0600 (Fri, 29 Jun 2012) | 7 lines Change the mps(4) driver to only scan a target if that is what is needed instead of scanning the full bus every time. Submitted by: mav Discussed with: Sreekanth Reddy Modified: stable/9/sys/dev/mps/mps_sas.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mps/mps_sas.c ============================================================================== --- stable/9/sys/dev/mps/mps_sas.c Mon Jul 2 02:54:22 2012 (r237946) +++ stable/9/sys/dev/mps/mps_sas.c Mon Jul 2 02:56:01 2012 (r237947) @@ -278,8 +278,11 @@ mpssas_rescan_target(struct mps_softc *s return; } - /* XXX Hardwired to scan the bus for now */ - ccb->ccb_h.func_code = XPT_SCAN_BUS; + if (targetid == CAM_TARGET_WILDCARD) + ccb->ccb_h.func_code = XPT_SCAN_BUS; + else + ccb->ccb_h.func_code = XPT_SCAN_TGT; + mps_dprint(sc, MPS_TRACE, "%s targetid %u\n", __func__, targetid); mpssas_rescan(sassc, ccb); } From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 03:49:53 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1A01106566B; Mon, 2 Jul 2012 03:49:53 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B98DA8FC0A; Mon, 2 Jul 2012 03:49:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q623nrsg041655; Mon, 2 Jul 2012 03:49:53 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q623nrRp041647; Mon, 2 Jul 2012 03:49:53 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207020349.q623nrRp041647@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Jul 2012 03:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237949 - in stable/9/sys: amd64/amd64 dev/xen/balloon i386/i386 i386/xen kern vm X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 03:49:54 -0000 Author: alc Date: Mon Jul 2 03:49:52 2012 New Revision: 237949 URL: http://svn.freebsd.org/changeset/base/237949 Log: MFC r226843 Eliminate vestiges of page coloring in VM_ALLOC_NOOBJ calls to vm_page_alloc(). While I'm here, for the sake of consistency, always specify the allocation class, such as VM_ALLOC_NORMAL, as the first of the flags. Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/amd64/amd64/uma_machdep.c stable/9/sys/dev/xen/balloon/balloon.c stable/9/sys/i386/i386/pmap.c stable/9/sys/i386/xen/pmap.c stable/9/sys/kern/vfs_bio.c stable/9/sys/vm/vm_kern.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 03:49:52 2012 (r237949) @@ -1590,7 +1590,6 @@ int pmap_pinit(pmap_t pmap) { vm_page_t pml4pg; - static vm_pindex_t color; int i; PMAP_LOCK_INIT(pmap); @@ -1598,8 +1597,8 @@ pmap_pinit(pmap_t pmap) /* * allocate the page directory page */ - while ((pml4pg = vm_page_alloc(NULL, color++, VM_ALLOC_NOOBJ | - VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) + while ((pml4pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | + VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) VM_WAIT; pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pg)); @@ -2143,7 +2142,6 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try) { - static vm_pindex_t colour; struct vpgqueues *pq; int bit, field; pv_entry_t pv; @@ -2179,7 +2177,7 @@ retry: } } /* No free items, allocate another chunk */ - m = vm_page_alloc(NULL, colour, (pq == &vm_page_queues[PQ_ACTIVE] ? + m = vm_page_alloc(NULL, 0, (pq == &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (m == NULL) { @@ -2205,7 +2203,6 @@ retry: } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); - colour++; dump_add_page(m->phys_addr); pc = (void *)PHYS_TO_DMAP(m->phys_addr); pc->pc_pmap = pmap; Modified: stable/9/sys/amd64/amd64/uma_machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/uma_machdep.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/amd64/amd64/uma_machdep.c Mon Jul 2 03:49:52 2012 (r237949) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); void * uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) { - static vm_pindex_t colour; vm_page_t m; vm_paddr_t pa; void *va; @@ -50,13 +49,13 @@ uma_small_alloc(uma_zone_t zone, int byt *flags = UMA_SLAB_PRIV; if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; + pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; else - pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED; + pflags = VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED; if (wait & M_ZERO) pflags |= VM_ALLOC_ZERO; for (;;) { - m = vm_page_alloc(NULL, colour++, pflags | VM_ALLOC_NOOBJ); + m = vm_page_alloc(NULL, 0, pflags); if (m == NULL) { if (wait & M_NOWAIT) return (NULL); Modified: stable/9/sys/dev/xen/balloon/balloon.c ============================================================================== --- stable/9/sys/dev/xen/balloon/balloon.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/dev/xen/balloon/balloon.c Mon Jul 2 03:49:52 2012 (r237949) @@ -298,8 +298,7 @@ decrease_reservation(unsigned long nr_pa nr_pages = ARRAY_SIZE(frame_list); for (i = 0; i < nr_pages; i++) { - int color = 0; - if ((page = vm_page_alloc(NULL, color++, + if ((page = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { nr_pages = i; Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/i386/i386/pmap.c Mon Jul 2 03:49:52 2012 (r237949) @@ -1750,7 +1750,6 @@ pmap_pinit(pmap_t pmap) { vm_page_t m, ptdpg[NPGPTD]; vm_paddr_t pa; - static int color; int i; PMAP_LOCK_INIT(pmap); @@ -1783,9 +1782,8 @@ pmap_pinit(pmap_t pmap) * allocate the page directory page(s) */ for (i = 0; i < NPGPTD;) { - m = vm_page_alloc(NULL, color++, - VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | - VM_ALLOC_ZERO); + m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | + VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (m == NULL) VM_WAIT; else { @@ -2302,7 +2300,6 @@ get_pv_entry(pmap_t pmap, int try) { static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; - static vm_pindex_t colour; struct vpgqueues *pq; int bit, field; pv_entry_t pv; @@ -2348,7 +2345,7 @@ retry: * queues lock. If "pv_vafree" is currently non-empty, it will * remain non-empty until pmap_ptelist_alloc() completes. */ - if (pv_vafree == 0 || (m = vm_page_alloc(NULL, colour, (pq == + if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, (pq == &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { if (try) { @@ -2374,7 +2371,6 @@ retry: } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); - colour++; pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree); pmap_qenter((vm_offset_t)pc, &m, 1); pc->pc_pmap = pmap; Modified: stable/9/sys/i386/xen/pmap.c ============================================================================== --- stable/9/sys/i386/xen/pmap.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/i386/xen/pmap.c Mon Jul 2 03:49:52 2012 (r237949) @@ -1438,7 +1438,6 @@ pmap_pinit(pmap_t pmap) { vm_page_t m, ptdpg[NPGPTD + 1]; int npgptd = NPGPTD + 1; - static int color; int i; #ifdef HAMFISTED_LOCKING @@ -1470,9 +1469,8 @@ pmap_pinit(pmap_t pmap) * allocate the page directory page(s) */ for (i = 0; i < npgptd;) { - m = vm_page_alloc(NULL, color++, - VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | - VM_ALLOC_ZERO); + m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | + VM_ALLOC_WIRED | VM_ALLOC_ZERO); if (m == NULL) VM_WAIT; else { @@ -2068,7 +2066,6 @@ get_pv_entry(pmap_t pmap, int try) { static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; - static vm_pindex_t colour; struct vpgqueues *pq; int bit, field; pv_entry_t pv; @@ -2114,7 +2111,7 @@ retry: * queues lock. If "pv_vafree" is currently non-empty, it will * remain non-empty until pmap_ptelist_alloc() completes. */ - if (pv_vafree == 0 || (m = vm_page_alloc(NULL, colour, (pq == + if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, (pq == &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { if (try) { @@ -2140,7 +2137,6 @@ retry: } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); - colour++; pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree); pmap_qenter((vm_offset_t)pc, &m, 1); if ((m->flags & PG_ZERO) == 0) Modified: stable/9/sys/kern/vfs_bio.c ============================================================================== --- stable/9/sys/kern/vfs_bio.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/kern/vfs_bio.c Mon Jul 2 03:49:52 2012 (r237949) @@ -3779,10 +3779,9 @@ tryagain: * could interfere with paging I/O, no matter which * process we are. */ - p = vm_page_alloc(NULL, pg >> PAGE_SHIFT, VM_ALLOC_NOOBJ | - VM_ALLOC_SYSTEM | VM_ALLOC_WIRED | - VM_ALLOC_COUNT((to - pg) >> PAGE_SHIFT)); - if (!p) { + p = vm_page_alloc(NULL, 0, VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ | + VM_ALLOC_WIRED | VM_ALLOC_COUNT((to - pg) >> PAGE_SHIFT)); + if (p == NULL) { VM_WAIT; goto tryagain; } Modified: stable/9/sys/vm/vm_kern.c ============================================================================== --- stable/9/sys/vm/vm_kern.c Mon Jul 2 02:57:52 2012 (r237948) +++ stable/9/sys/vm/vm_kern.c Mon Jul 2 03:49:52 2012 (r237949) @@ -515,7 +515,7 @@ kmem_init_zero_region(void) * zeros, while not using much more physical resources. */ addr = kmem_alloc_nofault(kernel_map, ZERO_REGION_SIZE); - m = vm_page_alloc(NULL, OFF_TO_IDX(addr - VM_MIN_KERNEL_ADDRESS), + m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO); if ((m->flags & PG_ZERO) == 0) pmap_zero_page(m); From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 05:35:56 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40425106564A; Mon, 2 Jul 2012 05:35:56 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 286E38FC0A; Mon, 2 Jul 2012 05:35:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q625ZuE5046715; Mon, 2 Jul 2012 05:35:56 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q625ZtXx046709; Mon, 2 Jul 2012 05:35:55 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207020535.q625ZtXx046709@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Jul 2012 05:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237950 - in stable/9/sys: amd64/amd64 amd64/include i386/i386 i386/include i386/xen X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 05:35:56 -0000 Author: alc Date: Mon Jul 2 05:35:55 2012 New Revision: 237950 URL: http://svn.freebsd.org/changeset/base/237950 Log: MFC r233290, r235598, r235973, r236045, r236240, r236291, r236378 Change pv_entry_count to a long on amd64. Rename pmap_collect() to pmap_pv_reclaim() and rewrite it such that it no longer uses the active and inactive paging queues. Eliminate some purely stylistic differences among the amd64, i386 native, and i386 xen PV entry allocators. Eliminate code duplication in free_pv_entry() and pmap_remove_pages() by introducing free_pv_chunk(). Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/amd64/include/pmap.h stable/9/sys/i386/i386/pmap.c stable/9/sys/i386/include/pmap.h stable/9/sys/i386/xen/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 03:49:52 2012 (r237949) +++ stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 05:35:55 2012 (r237950) @@ -201,7 +201,8 @@ static u_int64_t DMPDPphys; /* phys addr /* * Data for the pv entry allocation mechanism */ -static int pv_entry_count; +static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); +static long pv_entry_count; static struct md_page *pv_table; /* @@ -215,8 +216,9 @@ caddr_t CADDR1 = 0; */ static caddr_t crashdumpmap; +static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t locked_pmap, boolean_t try); +static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); static void pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static boolean_t pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static void pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); @@ -1993,7 +1995,7 @@ static __inline struct pv_chunk * pv_to_chunk(pv_entry_t pv) { - return (struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK); + return ((struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK)); } #define PV_PMAP(pv) (pv_to_chunk(pv)->pc_pmap) @@ -2004,7 +2006,7 @@ pv_to_chunk(pv_entry_t pv) static uint64_t pc_freemask[_NPCM] = { PC_FREE0, PC_FREE1, PC_FREE2 }; -SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, &pv_entry_count, 0, +SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, &pv_entry_count, 0, "Current number of pv entries"); #ifdef PV_STATS @@ -2028,71 +2030,136 @@ SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry "Current number of pv entry allocs"); SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, "Current number of spare pv entries"); - -static int pmap_collect_inactive, pmap_collect_active; - -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_inactive, CTLFLAG_RD, &pmap_collect_inactive, 0, - "Current number times pmap_collect called on inactive queue"); -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_active, CTLFLAG_RD, &pmap_collect_active, 0, - "Current number times pmap_collect called on active queue"); #endif /* * We are in a serious low memory condition. Resort to * drastic measures to free some pages so we can allocate - * another pv entry chunk. This is normally called to - * unmap inactive pages, and if necessary, active pages. + * another pv entry chunk. * * We do not, however, unmap 2mpages because subsequent accesses will * allocate per-page pv entries until repromotion occurs, thereby * exacerbating the shortage of free pv entries. */ -static void -pmap_collect(pmap_t locked_pmap, struct vpgqueues *vpq) +static vm_page_t +pmap_pv_reclaim(pmap_t locked_pmap) { + struct pch newtail; + struct pv_chunk *pc; + struct md_page *pvh; pd_entry_t *pde; pmap_t pmap; pt_entry_t *pte, tpte; - pv_entry_t next_pv, pv; + pv_entry_t pv; vm_offset_t va; - vm_page_t m, free; - - TAILQ_FOREACH(m, &vpq->pl, pageq) { - if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy) - continue; - TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) { - va = pv->pv_va; - pmap = PV_PMAP(pv); + vm_page_t free, m, m_pc; + uint64_t inuse, freemask; + int bit, field, freed; + + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); + pmap = NULL; + free = m_pc = NULL; + TAILQ_INIT(&newtail); + while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && free == NULL) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + if (pmap != pc->pc_pmap) { + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + pmap = pc->pc_pmap; /* Avoid deadlock and lock recursion. */ if (pmap > locked_pmap) PMAP_LOCK(pmap); - else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) + else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) { + pmap = NULL; + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; - pmap_resident_count_dec(pmap, 1); - pde = pmap_pde(pmap, va); - KASSERT((*pde & PG_PS) == 0, ("pmap_collect: found" - " a 2mpage in page %p's pv list", m)); - pte = pmap_pde_to_pte(pde, va); - tpte = pte_load_clear(pte); - KASSERT((tpte & PG_W) == 0, - ("pmap_collect: wired pte %#lx", tpte)); - if (tpte & PG_A) - vm_page_aflag_set(m, PGA_REFERENCED); - if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) - vm_page_dirty(m); - free = NULL; - pmap_unuse_pt(pmap, va, *pde, &free); - pmap_invalidate_page(pmap, va); - pmap_free_zero_pages(free); - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - free_pv_entry(pmap, pv); - if (pmap != locked_pmap) - PMAP_UNLOCK(pmap); + } } - if (TAILQ_EMPTY(&m->md.pv_list) && - TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)) - vm_page_aflag_clear(m, PGA_WRITEABLE); + + /* + * Destroy every non-wired, 4 KB page mapping in the chunk. + */ + freed = 0; + for (field = 0; field < _NPCM; field++) { + freemask = 0; + for (inuse = ~pc->pc_map[field] & pc_freemask[field]; + inuse != 0; inuse &= ~(1UL << bit)) { + bit = bsfq(inuse); + pv = &pc->pc_pventry[field * 64 + bit]; + va = pv->pv_va; + pde = pmap_pde(pmap, va); + if ((*pde & PG_PS) != 0) + continue; + pte = pmap_pde_to_pte(pde, va); + if ((*pte & PG_W) != 0) + continue; + tpte = pte_load_clear(pte); + if ((tpte & PG_G) != 0) + pmap_invalidate_page(pmap, va); + m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); + if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) + vm_page_dirty(m); + if ((tpte & PG_A) != 0) + vm_page_aflag_set(m, PGA_REFERENCED); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + if (TAILQ_EMPTY(&m->md.pv_list) && + (m->flags & PG_FICTITIOUS) == 0) { + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + if (TAILQ_EMPTY(&pvh->pv_list)) { + vm_page_aflag_clear(m, + PGA_WRITEABLE); + } + } + pmap_unuse_pt(pmap, va, *pde, &free); + freemask |= 1UL << bit; + freed++; + } + pc->pc_map[field] |= freemask; + } + if (freed == 0) { + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + continue; + } + pmap_resident_count_dec(pmap, freed); + PV_STAT(pv_entry_frees += freed); + PV_STAT(pv_entry_spare += freed); + pv_entry_count -= freed; + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + if (pc->pc_map[0] == PC_FREE0 && pc->pc_map[1] == PC_FREE1 && + pc->pc_map[2] == PC_FREE2) { + PV_STAT(pv_entry_spare -= _NPCPV); + PV_STAT(pc_chunk_count--); + PV_STAT(pc_chunk_frees++); + /* Entire chunk is free; return it. */ + m_pc = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); + dump_drop_page(m_pc->phys_addr); + break; + } + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + /* One freed pv entry in locked_pmap is sufficient. */ + if (pmap == locked_pmap) + break; + } + TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + if (m_pc == NULL && free != NULL) { + m_pc = free; + free = m_pc->right; + /* Recycle a freed page table page. */ + m_pc->wire_count = 1; + atomic_add_int(&cnt.v_wire_count, 1); } + pmap_free_zero_pages(free); + return (m_pc); } /* @@ -2101,7 +2168,6 @@ pmap_collect(pmap_t locked_pmap, struct static void free_pv_entry(pmap_t pmap, pv_entry_t pv) { - vm_page_t m; struct pv_chunk *pc; int idx, field, bit; @@ -2125,6 +2191,15 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv return; } TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + free_pv_chunk(pc); +} + +static void +free_pv_chunk(struct pv_chunk *pc) +{ + vm_page_t m; + + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); @@ -2142,7 +2217,6 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try) { - struct vpgqueues *pq; int bit, field; pv_entry_t pv; struct pv_chunk *pc; @@ -2151,7 +2225,6 @@ get_pv_entry(pmap_t pmap, boolean_t try) PMAP_LOCK_ASSERT(pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); PV_STAT(pv_entry_allocs++); - pq = NULL; retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { @@ -2171,35 +2244,26 @@ retry: TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); } + if (pc != TAILQ_LAST(&pv_chunks, pch)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); + } pv_entry_count++; PV_STAT(pv_entry_spare--); return (pv); } } /* No free items, allocate another chunk */ - m = vm_page_alloc(NULL, 0, (pq == &vm_page_queues[PQ_ACTIVE] ? - VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | + m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (m == NULL) { if (try) { PV_STAT(pc_chunk_tryfail++); return (NULL); } - /* - * Reclaim pv entries: At first, destroy mappings to inactive - * pages. After that, if a pv chunk entry is still needed, - * destroy mappings to active pages. - */ - if (pq == NULL) { - PV_STAT(pmap_collect_inactive++); - pq = &vm_page_queues[PQ_INACTIVE]; - } else if (pq == &vm_page_queues[PQ_INACTIVE]) { - PV_STAT(pmap_collect_active++); - pq = &vm_page_queues[PQ_ACTIVE]; - } else - panic("get_pv_entry: allocation failed"); - pmap_collect(pmap, pq); - goto retry; + m = pmap_pv_reclaim(pmap); + if (m == NULL) + goto retry; } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); @@ -2209,6 +2273,7 @@ retry: pc->pc_map[0] = PC_FREE0 & ~1ul; /* preallocated bit 0 */ pc->pc_map[1] = PC_FREE1; pc->pc_map[2] = PC_FREE2; + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); pv = &pc->pc_pventry[0]; TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); pv_entry_count++; @@ -4150,14 +4215,8 @@ pmap_remove_pages(pmap_t pmap) } } if (allfree) { - PV_STAT(pv_entry_spare -= _NPCPV); - PV_STAT(pc_chunk_count--); - PV_STAT(pc_chunk_frees++); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); - m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); - dump_drop_page(m->phys_addr); - vm_page_unwire(m, 0); - vm_page_free(m); + free_pv_chunk(pc); } } pmap_invalidate_all(pmap); Modified: stable/9/sys/amd64/include/pmap.h ============================================================================== --- stable/9/sys/amd64/include/pmap.h Mon Jul 2 03:49:52 2012 (r237949) +++ stable/9/sys/amd64/include/pmap.h Mon Jul 2 05:35:55 2012 (r237950) @@ -295,7 +295,7 @@ struct pv_chunk { pmap_t pc_pmap; TAILQ_ENTRY(pv_chunk) pc_list; uint64_t pc_map[_NPCM]; /* bitmap; 1 = free */ - uint64_t pc_spare[2]; + TAILQ_ENTRY(pv_chunk) pc_lru; struct pv_entry pc_pventry[_NPCPV]; }; Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Mon Jul 2 03:49:52 2012 (r237949) +++ stable/9/sys/i386/i386/pmap.c Mon Jul 2 05:35:55 2012 (r237950) @@ -233,6 +233,7 @@ static int pat_index[PAT_INDEX_SIZE]; /* /* * Data for the pv entry allocation mechanism */ +static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; static struct md_page *pv_table; static int shpgperproc = PMAP_SHPGPERPROC; @@ -283,8 +284,9 @@ SYSCTL_INT(_debug, OID_AUTO, PMAP1unchan "Number of times pmap_pte_quick didn't change PMAP1"); static struct mtx PMAP2mutex; +static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t locked_pmap, int try); +static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); static void pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static boolean_t pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static void pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); @@ -2143,6 +2145,7 @@ pmap_growkernel(vm_offset_t addr) CTASSERT(sizeof(struct pv_chunk) == PAGE_SIZE); CTASSERT(_NPCM == 11); +CTASSERT(_NPCPV == 336); static __inline struct pv_chunk * pv_to_chunk(pv_entry_t pv) @@ -2156,7 +2159,7 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREE0_9 0xfffffffful /* Free values for index 0 through 9 */ #define PC_FREE10 0x0000fffful /* Free values for index 10 */ -static uint32_t pc_freemask[11] = { +static uint32_t pc_freemask[_NPCM] = { PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, @@ -2187,79 +2190,152 @@ SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry "Current number of pv entry allocs"); SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, "Current number of spare pv entries"); - -static int pmap_collect_inactive, pmap_collect_active; - -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_inactive, CTLFLAG_RD, &pmap_collect_inactive, 0, - "Current number times pmap_collect called on inactive queue"); -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_active, CTLFLAG_RD, &pmap_collect_active, 0, - "Current number times pmap_collect called on active queue"); #endif /* * We are in a serious low memory condition. Resort to * drastic measures to free some pages so we can allocate - * another pv entry chunk. This is normally called to - * unmap inactive pages, and if necessary, active pages. + * another pv entry chunk. */ -static void -pmap_collect(pmap_t locked_pmap, struct vpgqueues *vpq) +static vm_page_t +pmap_pv_reclaim(pmap_t locked_pmap) { + struct pch newtail; + struct pv_chunk *pc; + struct md_page *pvh; pd_entry_t *pde; pmap_t pmap; pt_entry_t *pte, tpte; - pv_entry_t next_pv, pv; + pv_entry_t pv; vm_offset_t va; - vm_page_t m, free; - + vm_page_t free, m, m_pc; + uint32_t inuse, freemask; + int bit, field, freed; + + PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); + pmap = NULL; + free = m_pc = NULL; + TAILQ_INIT(&newtail); sched_pin(); - TAILQ_FOREACH(m, &vpq->pl, pageq) { - if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy) - continue; - TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) { - va = pv->pv_va; - pmap = PV_PMAP(pv); + while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && (pv_vafree == 0 || + free == NULL)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + if (pmap != pc->pc_pmap) { + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + pmap = pc->pc_pmap; /* Avoid deadlock and lock recursion. */ if (pmap > locked_pmap) PMAP_LOCK(pmap); - else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) + else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) { + pmap = NULL; + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; - pmap->pm_stats.resident_count--; - pde = pmap_pde(pmap, va); - KASSERT((*pde & PG_PS) == 0, ("pmap_collect: found" - " a 4mpage in page %p's pv list", m)); - pte = pmap_pte_quick(pmap, va); - tpte = pte_load_clear(pte); - KASSERT((tpte & PG_W) == 0, - ("pmap_collect: wired pte %#jx", (uintmax_t)tpte)); - if (tpte & PG_A) - vm_page_aflag_set(m, PGA_REFERENCED); - if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) - vm_page_dirty(m); - free = NULL; - pmap_unuse_pt(pmap, va, &free); - pmap_invalidate_page(pmap, va); - pmap_free_zero_pages(free); - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - free_pv_entry(pmap, pv); - if (pmap != locked_pmap) - PMAP_UNLOCK(pmap); + } + } + + /* + * Destroy every non-wired, 4 KB page mapping in the chunk. + */ + freed = 0; + for (field = 0; field < _NPCM; field++) { + freemask = 0; + for (inuse = ~pc->pc_map[field] & pc_freemask[field]; + inuse != 0; inuse &= ~(1UL << bit)) { + bit = bsfl(inuse); + pv = &pc->pc_pventry[field * 32 + bit]; + va = pv->pv_va; + pde = pmap_pde(pmap, va); + if ((*pde & PG_PS) != 0) + continue; + pte = pmap_pte_quick(pmap, va); + if ((*pte & PG_W) != 0) + continue; + tpte = pte_load_clear(pte); + if ((tpte & PG_G) != 0) + pmap_invalidate_page(pmap, va); + m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); + if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) + vm_page_dirty(m); + if ((tpte & PG_A) != 0) + vm_page_aflag_set(m, PGA_REFERENCED); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + if (TAILQ_EMPTY(&m->md.pv_list) && + (m->flags & PG_FICTITIOUS) == 0) { + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + if (TAILQ_EMPTY(&pvh->pv_list)) { + vm_page_aflag_clear(m, + PGA_WRITEABLE); + } + } + pmap_unuse_pt(pmap, va, &free); + freemask |= 1UL << bit; + freed++; + } + pc->pc_map[field] |= freemask; + } + if (freed == 0) { + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + continue; + } + pmap->pm_stats.resident_count -= freed; + PV_STAT(pv_entry_frees += freed); + PV_STAT(pv_entry_spare += freed); + pv_entry_count -= freed; + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + for (field = 0; field < _NPCM; field++) + if (pc->pc_map[field] != pc_freemask[field]) { + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, + pc_list); + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + + /* + * One freed pv entry in locked_pmap is + * sufficient. + */ + if (pmap == locked_pmap) + goto out; + break; + } + if (field == _NPCM) { + PV_STAT(pv_entry_spare -= _NPCPV); + PV_STAT(pc_chunk_count--); + PV_STAT(pc_chunk_frees++); + /* Entire chunk is free; return it. */ + m_pc = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); + pmap_qremove((vm_offset_t)pc, 1); + pmap_ptelist_free(&pv_vafree, (vm_offset_t)pc); + break; } - if (TAILQ_EMPTY(&m->md.pv_list) && - TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)) - vm_page_aflag_clear(m, PGA_WRITEABLE); } +out: sched_unpin(); + TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + if (m_pc == NULL && pv_vafree != 0 && free != NULL) { + m_pc = free; + free = m_pc->right; + /* Recycle a freed page table page. */ + m_pc->wire_count = 1; + atomic_add_int(&cnt.v_wire_count, 1); + } + pmap_free_zero_pages(free); + return (m_pc); } - /* * free the pv_entry back to the free list */ static void free_pv_entry(pmap_t pmap, pv_entry_t pv) { - vm_page_t m; struct pv_chunk *pc; int idx, field, bit; @@ -2280,6 +2356,15 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); return; } + free_pv_chunk(pc); +} + +static void +free_pv_chunk(struct pv_chunk *pc) +{ + vm_page_t m; + + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); @@ -2296,11 +2381,10 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv * when needed. */ static pv_entry_t -get_pv_entry(pmap_t pmap, int try) +get_pv_entry(pmap_t pmap, boolean_t try) { static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; - struct vpgqueues *pq; int bit, field; pv_entry_t pv; struct pv_chunk *pc; @@ -2315,7 +2399,6 @@ get_pv_entry(pmap_t pmap, int try) printf("Approaching the limit on PV entries, consider " "increasing either the vm.pmap.shpgperproc or the " "vm.pmap.pv_entry_max tunable.\n"); - pq = NULL; retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { @@ -2336,6 +2419,10 @@ retry: } TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); + if (pc != TAILQ_LAST(&pv_chunks, pch)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); + } PV_STAT(pv_entry_spare--); return (pv); } @@ -2345,29 +2432,16 @@ retry: * queues lock. If "pv_vafree" is currently non-empty, it will * remain non-empty until pmap_ptelist_alloc() completes. */ - if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, (pq == - &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | + if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { if (try) { pv_entry_count--; PV_STAT(pc_chunk_tryfail++); return (NULL); } - /* - * Reclaim pv entries: At first, destroy mappings to - * inactive pages. After that, if a pv chunk entry - * is still needed, destroy mappings to active pages. - */ - if (pq == NULL) { - PV_STAT(pmap_collect_inactive++); - pq = &vm_page_queues[PQ_INACTIVE]; - } else if (pq == &vm_page_queues[PQ_INACTIVE]) { - PV_STAT(pmap_collect_active++); - pq = &vm_page_queues[PQ_ACTIVE]; - } else - panic("get_pv_entry: increase vm.pmap.shpgperproc"); - pmap_collect(pmap, pq); - goto retry; + m = pmap_pv_reclaim(pmap); + if (m == NULL) + goto retry; } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); @@ -2377,6 +2451,7 @@ retry: pc->pc_map[0] = pc_freemask[0] & ~1ul; /* preallocated bit 0 */ for (field = 1; field < _NPCM; field++) pc->pc_map[field] = pc_freemask[field]; + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); pv = &pc->pc_pventry[0]; TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); PV_STAT(pv_entry_spare += _NPCPV - 1); @@ -4347,15 +4422,8 @@ pmap_remove_pages(pmap_t pmap) } } if (allfree) { - PV_STAT(pv_entry_spare -= _NPCPV); - PV_STAT(pc_chunk_count--); - PV_STAT(pc_chunk_frees++); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); - m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); - pmap_qremove((vm_offset_t)pc, 1); - vm_page_unwire(m, 0); - vm_page_free(m); - pmap_ptelist_free(&pv_vafree, (vm_offset_t)pc); + free_pv_chunk(pc); } } sched_unpin(); Modified: stable/9/sys/i386/include/pmap.h ============================================================================== --- stable/9/sys/i386/include/pmap.h Mon Jul 2 03:49:52 2012 (r237949) +++ stable/9/sys/i386/include/pmap.h Mon Jul 2 05:35:55 2012 (r237950) @@ -481,7 +481,7 @@ struct pv_chunk { pmap_t pc_pmap; TAILQ_ENTRY(pv_chunk) pc_list; uint32_t pc_map[_NPCM]; /* bitmap; 1 = free */ - uint32_t pc_spare[2]; + TAILQ_ENTRY(pv_chunk) pc_lru; struct pv_entry pc_pventry[_NPCPV]; }; Modified: stable/9/sys/i386/xen/pmap.c ============================================================================== --- stable/9/sys/i386/xen/pmap.c Mon Jul 2 03:49:52 2012 (r237949) +++ stable/9/sys/i386/xen/pmap.c Mon Jul 2 05:35:55 2012 (r237950) @@ -230,6 +230,7 @@ static int pat_works; /* Is page attri /* * Data for the pv entry allocation mechanism */ +static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; static int shpgperproc = PMAP_SHPGPERPROC; @@ -277,8 +278,9 @@ SYSCTL_INT(_debug, OID_AUTO, PMAP1unchan "Number of times pmap_pte_quick didn't change PMAP1"); static struct mtx PMAP2mutex; +static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t locked_pmap, int try); +static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); static void pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va); static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, vm_offset_t va); @@ -1914,6 +1916,7 @@ pmap_growkernel(vm_offset_t addr) CTASSERT(sizeof(struct pv_chunk) == PAGE_SIZE); CTASSERT(_NPCM == 11); +CTASSERT(_NPCPV == 336); static __inline struct pv_chunk * pv_to_chunk(pv_entry_t pv) @@ -1927,7 +1930,7 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREE0_9 0xfffffffful /* Free values for index 0 through 9 */ #define PC_FREE10 0x0000fffful /* Free values for index 10 */ -static uint32_t pc_freemask[11] = { +static uint32_t pc_freemask[_NPCM] = { PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, @@ -1958,74 +1961,141 @@ SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry "Current number of pv entry allocs"); SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, "Current number of spare pv entries"); - -static int pmap_collect_inactive, pmap_collect_active; - -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_inactive, CTLFLAG_RD, &pmap_collect_inactive, 0, - "Current number times pmap_collect called on inactive queue"); -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_active, CTLFLAG_RD, &pmap_collect_active, 0, - "Current number times pmap_collect called on active queue"); #endif /* * We are in a serious low memory condition. Resort to * drastic measures to free some pages so we can allocate - * another pv entry chunk. This is normally called to - * unmap inactive pages, and if necessary, active pages. + * another pv entry chunk. */ -static void -pmap_collect(pmap_t locked_pmap, struct vpgqueues *vpq) +static vm_page_t +pmap_pv_reclaim(pmap_t locked_pmap) { + struct pch newtail; + struct pv_chunk *pc; pmap_t pmap; pt_entry_t *pte, tpte; - pv_entry_t next_pv, pv; + pv_entry_t pv; vm_offset_t va; - vm_page_t m, free; - + vm_page_t free, m, m_pc; + uint32_t inuse, freemask; + int bit, field, freed; + + PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); + pmap = NULL; + free = m_pc = NULL; + TAILQ_INIT(&newtail); sched_pin(); - TAILQ_FOREACH(m, &vpq->pl, pageq) { - if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy) - continue; - TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) { - va = pv->pv_va; - pmap = PV_PMAP(pv); + while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && (pv_vafree == 0 || + free == NULL)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + if (pmap != pc->pc_pmap) { + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + pmap = pc->pc_pmap; /* Avoid deadlock and lock recursion. */ if (pmap > locked_pmap) PMAP_LOCK(pmap); - else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) + else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) { + pmap = NULL; + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; - pmap->pm_stats.resident_count--; - pte = pmap_pte_quick(pmap, va); - tpte = pte_load_clear(pte); - KASSERT((tpte & PG_W) == 0, - ("pmap_collect: wired pte %#jx", (uintmax_t)tpte)); - if (tpte & PG_A) - vm_page_aflag_set(m, PGA_REFERENCED); - if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) - vm_page_dirty(m); - free = NULL; - pmap_unuse_pt(pmap, va, &free); - pmap_invalidate_page(pmap, va); - pmap_free_zero_pages(free); - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - free_pv_entry(pmap, pv); - if (pmap != locked_pmap) - PMAP_UNLOCK(pmap); + } + } + + /* + * Destroy every non-wired, 4 KB page mapping in the chunk. + */ + freed = 0; + for (field = 0; field < _NPCM; field++) { + freemask = 0; + for (inuse = ~pc->pc_map[field] & pc_freemask[field]; + inuse != 0; inuse &= ~(1UL << bit)) { + bit = bsfl(inuse); + pv = &pc->pc_pventry[field * 32 + bit]; + va = pv->pv_va; + pte = pmap_pte_quick(pmap, va); + if ((*pte & PG_W) != 0) + continue; + tpte = pte_load_clear(pte); + if ((tpte & PG_G) != 0) + pmap_invalidate_page(pmap, va); + m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); + if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) + vm_page_dirty(m); + if ((tpte & PG_A) != 0) + vm_page_aflag_set(m, PGA_REFERENCED); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + if (TAILQ_EMPTY(&m->md.pv_list)) + vm_page_aflag_clear(m, PGA_WRITEABLE); + pmap_unuse_pt(pmap, va, &free); + freemask |= 1UL << bit; + freed++; + } + pc->pc_map[field] |= freemask; + } + if (freed == 0) { + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + continue; + } + pmap->pm_stats.resident_count -= freed; + PV_STAT(pv_entry_frees += freed); + PV_STAT(pv_entry_spare += freed); + pv_entry_count -= freed; + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + for (field = 0; field < _NPCM; field++) + if (pc->pc_map[field] != pc_freemask[field]) { + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, + pc_list); + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + + /* + * One freed pv entry in locked_pmap is + * sufficient. + */ + if (pmap == locked_pmap) + goto out; + break; + } + if (field == _NPCM) { + PV_STAT(pv_entry_spare -= _NPCPV); + PV_STAT(pc_chunk_count--); + PV_STAT(pc_chunk_frees++); + /* Entire chunk is free; return it. */ + m_pc = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); + pmap_qremove((vm_offset_t)pc, 1); + pmap_ptelist_free(&pv_vafree, (vm_offset_t)pc); + break; } - if (TAILQ_EMPTY(&m->md.pv_list)) - vm_page_aflag_clear(m, PGA_WRITEABLE); } +out: sched_unpin(); + TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + if (m_pc == NULL && pv_vafree != 0 && free != NULL) { + m_pc = free; + free = m_pc->right; + /* Recycle a freed page table page. */ + m_pc->wire_count = 1; + atomic_add_int(&cnt.v_wire_count, 1); + } + pmap_free_zero_pages(free); + return (m_pc); } - /* * free the pv_entry back to the free list */ static void free_pv_entry(pmap_t pmap, pv_entry_t pv) { - vm_page_t m; struct pv_chunk *pc; int idx, field, bit; @@ -2046,6 +2116,15 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); return; } + free_pv_chunk(pc); +} + +static void +free_pv_chunk(struct pv_chunk *pc) +{ + vm_page_t m; + + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); @@ -2062,11 +2141,10 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv * when needed. */ static pv_entry_t -get_pv_entry(pmap_t pmap, int try) +get_pv_entry(pmap_t pmap, boolean_t try) { static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; - struct vpgqueues *pq; int bit, field; pv_entry_t pv; struct pv_chunk *pc; @@ -2081,7 +2159,6 @@ get_pv_entry(pmap_t pmap, int try) printf("Approaching the limit on PV entries, consider " "increasing either the vm.pmap.shpgperproc or the " "vm.pmap.pv_entry_max tunable.\n"); - pq = NULL; retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { @@ -2102,6 +2179,10 @@ retry: } TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); + if (pc != TAILQ_LAST(&pv_chunks, pch)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); + } PV_STAT(pv_entry_spare--); return (pv); } @@ -2111,29 +2192,16 @@ retry: * queues lock. If "pv_vafree" is currently non-empty, it will * remain non-empty until pmap_ptelist_alloc() completes. */ - if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, (pq == - &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | + if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { if (try) { pv_entry_count--; PV_STAT(pc_chunk_tryfail++); return (NULL); } - /* - * Reclaim pv entries: At first, destroy mappings to - * inactive pages. After that, if a pv chunk entry - * is still needed, destroy mappings to active pages. - */ - if (pq == NULL) { - PV_STAT(pmap_collect_inactive++); - pq = &vm_page_queues[PQ_INACTIVE]; - } else if (pq == &vm_page_queues[PQ_INACTIVE]) { - PV_STAT(pmap_collect_active++); - pq = &vm_page_queues[PQ_ACTIVE]; - } else - panic("get_pv_entry: increase vm.pmap.shpgperproc"); - pmap_collect(pmap, pq); - goto retry; + m = pmap_pv_reclaim(pmap); + if (m == NULL) + goto retry; } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 05:57:02 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 088D01065673; Mon, 2 Jul 2012 05:57:02 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAB678FC14; Mon, 2 Jul 2012 05:57:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q625v1ch047645; Mon, 2 Jul 2012 05:57:01 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q625v1MT047643; Mon, 2 Jul 2012 05:57:01 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020557.q625v1MT047643@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 05:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237951 - stable/9/gnu/usr.bin/cvs/lib X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 05:57:02 -0000 Author: obrien Date: Mon Jul 2 05:57:01 2012 New Revision: 237951 URL: http://svn.freebsd.org/changeset/base/237951 Log: MFC: r229809: Don't include . The purpose of not including is to avoid the compiler warning we put in . So this change will cause CVS to provide its own definition of 'struct timeb'. This is only OK because the code never calls the libc ftime(3) interface. CVS only uses 'struct timeb' as a convenience structure -- thus it doesn't matter how its supplied definition does or does not match the ftime(3) ABI. Modified: stable/9/gnu/usr.bin/cvs/lib/config.h.proto Directory Properties: stable/9/ (props changed) Modified: stable/9/gnu/usr.bin/cvs/lib/config.h.proto ============================================================================== --- stable/9/gnu/usr.bin/cvs/lib/config.h.proto Mon Jul 2 05:35:55 2012 (r237950) +++ stable/9/gnu/usr.bin/cvs/lib/config.h.proto Mon Jul 2 05:57:01 2012 (r237951) @@ -324,7 +324,7 @@ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMEB_H 1 +/* #undef HAVE_SYS_TIMEB_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 05:57:45 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25BE5106564A; Mon, 2 Jul 2012 05:57:45 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB9508FC15; Mon, 2 Jul 2012 05:57:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q625vi3Z047708; Mon, 2 Jul 2012 05:57:44 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q625viCY047706; Mon, 2 Jul 2012 05:57:44 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207020557.q625viCY047706@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Jul 2012 05:57:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237952 - stable/9/sys/i386/i386 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 05:57:45 -0000 Author: alc Date: Mon Jul 2 05:57:44 2012 New Revision: 237952 URL: http://svn.freebsd.org/changeset/base/237952 Log: MFC r235912 There is no need for pmap_protect() to acquire the page queues lock unless it is going to access the pv lists or PMAP1/PADDR1. Modified: stable/9/sys/i386/i386/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Mon Jul 2 05:57:01 2012 (r237951) +++ stable/9/sys/i386/i386/pmap.c Mon Jul 2 05:57:44 2012 (r237952) @@ -3125,7 +3125,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv vm_offset_t pdnxt; pd_entry_t ptpaddr; pt_entry_t *pte; - int anychanged; + boolean_t anychanged, pv_lists_locked; if ((prot & VM_PROT_READ) == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); @@ -3141,10 +3141,16 @@ pmap_protect(pmap_t pmap, vm_offset_t sv return; #endif - anychanged = 0; + if (pmap_is_current(pmap)) + pv_lists_locked = FALSE; + else { + pv_lists_locked = TRUE; +resume: + vm_page_lock_queues(); + sched_pin(); + } + anychanged = FALSE; - vm_page_lock_queues(); - sched_pin(); PMAP_LOCK(pmap); for (; sva < eva; sva = pdnxt) { pt_entry_t obits, pbits; @@ -3179,12 +3185,27 @@ pmap_protect(pmap_t pmap, vm_offset_t sv */ if (pmap_protect_pde(pmap, &pmap->pm_pdir[pdirindex], sva, prot)) - anychanged = 1; - continue; - } else if (!pmap_demote_pde(pmap, - &pmap->pm_pdir[pdirindex], sva)) { - /* The large page mapping was destroyed. */ + anychanged = TRUE; continue; + } else { + if (!pv_lists_locked) { + pv_lists_locked = TRUE; + if (!mtx_trylock(&vm_page_queue_mtx)) { + if (anychanged) + pmap_invalidate_all( + pmap); + PMAP_UNLOCK(pmap); + goto resume; + } + } + if (!pmap_demote_pde(pmap, + &pmap->pm_pdir[pdirindex], sva)) { + /* + * The large page mapping was + * destroyed. + */ + continue; + } } } @@ -3230,14 +3251,16 @@ retry: if (obits & PG_G) pmap_invalidate_page(pmap, sva); else - anychanged = 1; + anychanged = TRUE; } } } - sched_unpin(); if (anychanged) pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + if (pv_lists_locked) { + sched_unpin(); + vm_page_unlock_queues(); + } PMAP_UNLOCK(pmap); } From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 06:02:57 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8258D106567C; Mon, 2 Jul 2012 06:02:57 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 561408FC17; Mon, 2 Jul 2012 06:02:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6262vq7048149; Mon, 2 Jul 2012 06:02:57 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6262vjK048148; Mon, 2 Jul 2012 06:02:57 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020602.q6262vjK048148@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 06:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237954 - stable/9 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:02:57 -0000 Author: obrien Date: Mon Jul 2 06:02:56 2012 New Revision: 237954 URL: http://svn.freebsd.org/changeset/base/237954 Log: Record that r226343 r226347 r226348 r226349 r226353 r226388 was MFC'ed. Modified: Directory Properties: stable/9/ (props changed) From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 06:39:06 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D92B4106566C; Mon, 2 Jul 2012 06:39:06 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4A2A8FC08; Mon, 2 Jul 2012 06:39:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q626d6Lk049925; Mon, 2 Jul 2012 06:39:06 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q626d6Tp049923; Mon, 2 Jul 2012 06:39:06 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201207020639.q626d6Tp049923@svn.freebsd.org> From: Martin Matuska Date: Mon, 2 Jul 2012 06:39:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237959 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:39:07 -0000 Author: mm Date: Mon Jul 2 06:39:06 2012 New Revision: 237959 URL: http://svn.freebsd.org/changeset/base/237959 Log: MFC r236247 (pjd): Remove unused sysctl. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Jul 2 06:22:20 2012 (r237958) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Mon Jul 2 06:39:06 2012 (r237959) @@ -67,12 +67,6 @@ static vdev_ops_t *vdev_ops_table[] = { NULL }; -/* maximum scrub/resilver I/O queue per leaf vdev */ -int zfs_scrub_limit = 10; - -TUNABLE_INT("vfs.zfs.scrub_limit", &zfs_scrub_limit); -SYSCTL_INT(_vfs_zfs, OID_AUTO, scrub_limit, CTLFLAG_RDTUN, &zfs_scrub_limit, 0, - "Maximum scrub/resilver I/O queue"); /* * Given a vdev type, return the appropriate ops vector. From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 06:40:12 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5E7C61065670; Mon, 2 Jul 2012 06:40:12 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 493D18FC15; Mon, 2 Jul 2012 06:40:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q626eCup050051; Mon, 2 Jul 2012 06:40:12 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q626eC1G050049; Mon, 2 Jul 2012 06:40:12 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201207020640.q626eC1G050049@svn.freebsd.org> From: Christian Brueffer Date: Mon, 2 Jul 2012 06:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237961 - stable/9/share/man/man4 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:40:12 -0000 Author: brueffer Date: Mon Jul 2 06:40:11 2012 New Revision: 237961 URL: http://svn.freebsd.org/changeset/base/237961 Log: MFC: r237836 mps(4) is endian safe as of r237876. Modified: stable/9/share/man/man4/mps.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/mps.4 ============================================================================== --- stable/9/share/man/man4/mps.4 Mon Jul 2 06:39:21 2012 (r237960) +++ stable/9/share/man/man4/mps.4 Mon Jul 2 06:40:11 2012 (r237961) @@ -34,7 +34,7 @@ .\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $ .\" $FreeBSD$ .\" -.Dd February 7, 2012 +.Dd June 30, 2012 .Dt MPS 4 .Os .Sh NAME @@ -205,9 +205,6 @@ This man page was written by This driver has a couple of known shortcomings: .Bl -bullet -compact .It -Not endian safe. -It only works on little endian machines (e.g. amd64 and i386). -.It No userland utility available (e.g. .Xr mptutil 8 ) . .It From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 06:51:50 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C5141065672; Mon, 2 Jul 2012 06:51:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58A098FC08; Mon, 2 Jul 2012 06:51:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q626porG051020; Mon, 2 Jul 2012 06:51:50 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q626po9m051018; Mon, 2 Jul 2012 06:51:50 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207020651.q626po9m051018@svn.freebsd.org> From: Doug Barton Date: Mon, 2 Jul 2012 06:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237962 - stable/9/sys/conf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 06:51:50 -0000 Author: dougb Date: Mon Jul 2 06:51:49 2012 New Revision: 237962 URL: http://svn.freebsd.org/changeset/base/237962 Log: MFC r237958: For the ports modules building code, clean WRKDIR before building. This is important for those that use -DNO_CLEAN routinely, since it will prevent installing stale stuff, and even more important when the port is upgraded to a newer version. When the user doesn't use -DNO_CLEAN, this will create an infinitesimal amount of extra work, but won't hurt anything. This is necessary because the ports tree has flags that prevent the ususal 'update the build if newer source files exist' logic from doing what it would do in the base. Modified: stable/9/sys/conf/kern.post.mk Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/kern.post.mk ============================================================================== --- stable/9/sys/conf/kern.post.mk Mon Jul 2 06:40:11 2012 (r237961) +++ stable/9/sys/conf/kern.post.mk Mon Jul 2 06:51:49 2012 (r237962) @@ -64,7 +64,7 @@ PORTSMODULESENV=\ ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/all/clean all/:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} .endfor .endfor .endif From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 07:01:42 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87F74106566C; Mon, 2 Jul 2012 07:01:42 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71EA78FC0C; Mon, 2 Jul 2012 07:01:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6271gQ9052252; Mon, 2 Jul 2012 07:01:42 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6271g5E052249; Mon, 2 Jul 2012 07:01:42 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207020701.q6271g5E052249@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Jul 2012 07:01:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237966 - in stable/9/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:01:42 -0000 Author: alc Date: Mon Jul 2 07:01:41 2012 New Revision: 237966 URL: http://svn.freebsd.org/changeset/base/237966 Log: MFC r235695, r236158, r236190, r236494 Replace all uses of the vm page queues lock by a r/w lock that is private to this pmap.c. Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/i386/i386/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 06:58:10 2012 (r237965) +++ stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 07:01:41 2012 (r237966) @@ -117,6 +117,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -199,6 +200,17 @@ static u_int64_t DMPDphys; /* phys addr static u_int64_t DMPDPphys; /* phys addr of direct mapped level 3 */ /* + * Isolate the global pv list lock from data and other locks to prevent false + * sharing within the cache. + */ +static struct { + struct rwlock lock; + char padding[CACHE_LINE_SIZE - sizeof(struct rwlock)]; +} pvh_global __aligned(CACHE_LINE_SIZE); + +#define pvh_global_lock pvh_global.lock + +/* * Data for the pv entry allocation mechanism */ static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); @@ -582,6 +594,11 @@ pmap_bootstrap(vm_paddr_t *firstaddr) CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); + /* + * Initialize the global pv list lock. + */ + rw_init(&pvh_global_lock, "pvh global"); + /* * Reserve some special page table entries/VA space for temporary * mapping of pages. @@ -1652,9 +1669,9 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { if (flags & M_WAITOK) { PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); VM_WAIT; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); } @@ -2056,7 +2073,7 @@ pmap_pv_reclaim(pmap_t locked_pmap) uint64_t inuse, freemask; int bit, field, freed; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); pmap = NULL; free = m_pc = NULL; @@ -2171,7 +2188,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv struct pv_chunk *pc; int idx, field, bit; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); PV_STAT(pv_entry_frees++); PV_STAT(pv_entry_spare++); @@ -2222,8 +2239,8 @@ get_pv_entry(pmap_t pmap, boolean_t try) struct pv_chunk *pc; vm_page_t m; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); PV_STAT(pv_entry_allocs++); retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); @@ -2292,7 +2309,7 @@ pmap_pvh_remove(struct md_page *pvh, pma { pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { if (pmap == PV_PMAP(pv) && va == pv->pv_va) { TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); @@ -2315,7 +2332,7 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse vm_offset_t va_last; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_demote_pde: pa is not 2mpage aligned")); @@ -2353,7 +2370,7 @@ pmap_pv_promote_pde(pmap_t pmap, vm_offs vm_offset_t va_last; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_promote_pde: pa is not 2mpage aligned")); @@ -2399,7 +2416,7 @@ pmap_remove_entry(pmap_t pmap, vm_page_t { struct md_page *pvh; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); pmap_pvh_free(&m->md, pmap, va); if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -2417,8 +2434,8 @@ pmap_insert_entry(pmap_t pmap, vm_offset { pv_entry_t pv; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); pv = get_pv_entry(pmap, FALSE); pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); @@ -2432,8 +2449,8 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm { pv_entry_t pv; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if ((pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); @@ -2451,7 +2468,7 @@ pmap_pv_insert_pde(pmap_t pmap, vm_offse struct md_page *pvh; pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); if ((pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; pvh = pa_to_pvh(pa); @@ -2719,7 +2736,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva anyvalid = 0; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); /* @@ -2829,7 +2846,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva out: if (anyvalid) pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); pmap_free_zero_pages(free); } @@ -2861,7 +2878,7 @@ pmap_remove_all(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_remove_all: page %p is not managed", m)); free = NULL; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -2900,7 +2917,7 @@ small_mappings: PMAP_UNLOCK(pmap); } vm_page_aflag_clear(m, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); pmap_free_zero_pages(free); } @@ -3022,12 +3039,12 @@ resume: } else { if (!pv_lists_locked) { pv_lists_locked = TRUE; - if (!mtx_trylock(&vm_page_queue_mtx)) { + if (!rw_try_wlock(&pvh_global_lock)) { if (anychanged) pmap_invalidate_all( pmap); PMAP_UNLOCK(pmap); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); goto resume; } } @@ -3078,7 +3095,7 @@ retry: if (anychanged) pmap_invalidate_all(pmap); if (pv_lists_locked) - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3233,7 +3250,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, mpte = NULL; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); /* @@ -3389,7 +3406,7 @@ validate: vm_reserv_level_iffullpop(m) == 0) pmap_promote_pde(pmap, pde, va); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3405,7 +3422,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t pd_entry_t *pde, newpde; vm_page_t free, mpde; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); if ((mpde = pmap_allocpde(pmap, va, M_NOWAIT)) == NULL) { CTR2(KTR_PMAP, "pmap_enter_pde: failure for va %#lx" @@ -3486,7 +3503,7 @@ pmap_enter_object(pmap_t pmap, vm_offset psize = atop(end - start); mpte = NULL; m = m_start; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { va = start + ptoa(diff); @@ -3500,7 +3517,7 @@ pmap_enter_object(pmap_t pmap, vm_offset mpte); m = TAILQ_NEXT(m, listq); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3517,10 +3534,10 @@ void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); (void)pmap_enter_quick_locked(pmap, va, m, prot, NULL); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3535,7 +3552,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); /* @@ -3754,9 +3771,9 @@ retry: if (!wired != ((*pde & PG_W) == 0)) { if (!are_queues_locked) { are_queues_locked = TRUE; - if (!mtx_trylock(&vm_page_queue_mtx)) { + if (!rw_try_wlock(&pvh_global_lock)) { PMAP_UNLOCK(pmap); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); goto retry; } } @@ -3775,7 +3792,7 @@ retry: } out: if (are_queues_locked) - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3799,7 +3816,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm if (dst_addr != src_addr) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if (dst_pmap < src_pmap) { PMAP_LOCK(dst_pmap); PMAP_LOCK(src_pmap); @@ -3915,7 +3932,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm } } out: - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(src_pmap); PMAP_UNLOCK(dst_pmap); } @@ -3996,7 +4013,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_page_exists_quick: page %p is not managed", m)); rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (PV_PMAP(pv) == pmap) { rv = TRUE; @@ -4018,7 +4035,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p break; } } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4036,13 +4053,13 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->oflags & VPO_UNMANAGED) != 0) return (count); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); count = pmap_pvh_wired_mappings(&m->md, count); if ((m->flags & PG_FICTITIOUS) == 0) { count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), count); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } @@ -4058,7 +4075,7 @@ pmap_pvh_wired_mappings(struct md_page * pt_entry_t *pte; pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); @@ -4081,11 +4098,11 @@ pmap_page_is_mapped(vm_page_t m) if ((m->oflags & VPO_UNMANAGED) != 0) return (FALSE); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = !TAILQ_EMPTY(&m->md.pv_list) || ((m->flags & PG_FICTITIOUS) == 0 && !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4116,7 +4133,7 @@ pmap_remove_pages(pmap_t pmap) printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { allfree = 1; @@ -4220,7 +4237,7 @@ pmap_remove_pages(pmap_t pmap) } } pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); pmap_free_zero_pages(free); } @@ -4248,11 +4265,11 @@ pmap_is_modified(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return (FALSE); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = pmap_is_modified_pvh(&m->md) || ((m->flags & PG_FICTITIOUS) == 0 && pmap_is_modified_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4269,7 +4286,7 @@ pmap_is_modified_pvh(struct md_page *pvh pmap_t pmap; boolean_t rv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); rv = FALSE; TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -4320,11 +4337,11 @@ pmap_is_referenced(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_is_referenced: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = pmap_is_referenced_pvh(&m->md) || ((m->flags & PG_FICTITIOUS) == 0 && pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4340,7 +4357,7 @@ pmap_is_referenced_pvh(struct md_page *p pmap_t pmap; boolean_t rv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); rv = FALSE; TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -4379,7 +4396,7 @@ pmap_remove_write(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -4413,7 +4430,7 @@ retry: PMAP_UNLOCK(pmap); } vm_page_aflag_clear(m, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -4441,7 +4458,7 @@ pmap_ts_referenced(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_ts_referenced: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -4499,7 +4516,7 @@ small_mappings: } while ((pv = pvn) != NULL && pv != pvf); } out: - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rtval); } @@ -4529,7 +4546,7 @@ pmap_clear_modify(vm_page_t m) */ if ((m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -4578,7 +4595,7 @@ small_mappings: } PMAP_UNLOCK(pmap); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -4598,7 +4615,7 @@ pmap_clear_reference(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_clear_reference: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -4638,7 +4655,7 @@ small_mappings: } PMAP_UNLOCK(pmap); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Mon Jul 2 06:58:10 2012 (r237965) +++ stable/9/sys/i386/i386/pmap.c Mon Jul 2 07:01:41 2012 (r237966) @@ -118,6 +118,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -231,6 +232,17 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_ena static int pat_index[PAT_INDEX_SIZE]; /* cache mode to PAT index conversion */ /* + * Isolate the global pv list lock from data and other locks to prevent false + * sharing within the cache. + */ +static struct { + struct rwlock lock; + char padding[CACHE_LINE_SIZE - sizeof(struct rwlock)]; +} pvh_global __aligned(CACHE_LINE_SIZE); + +#define pvh_global_lock pvh_global.lock + +/* * Data for the pv entry allocation mechanism */ static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); @@ -393,6 +405,12 @@ pmap_bootstrap(vm_paddr_t firstaddr) kernel_pmap->pm_root = NULL; CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); + + /* + * Initialize the global pv list lock. + */ + rw_init(&pvh_global_lock, "pvh global"); + LIST_INIT(&allpmaps); /* @@ -1277,7 +1295,7 @@ invlcaddr(void *caddr) * scans are across different pmaps. It is very wasteful * to do an entire invltlb for checking a single mapping. * - * If the given pmap is not the current pmap, vm_page_queue_mtx + * If the given pmap is not the current pmap, pvh_global_lock * must be held and curthread pinned to a CPU. */ static pt_entry_t * @@ -1293,7 +1311,7 @@ pmap_pte_quick(pmap_t pmap, vm_offset_t /* are we current address space or kernel? */ if (pmap_is_current(pmap)) return (vtopte(va)); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); newpf = *pde & PG_FRAME; if ((*PMAP1 & PG_FRAME) != newpf) { @@ -1842,9 +1860,9 @@ _pmap_allocpte(pmap_t pmap, u_int ptepin VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { if (flags & M_WAITOK) { PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); VM_WAIT; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); } @@ -2339,7 +2357,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv struct pv_chunk *pc; int idx, field, bit; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); PV_STAT(pv_entry_frees++); PV_STAT(pv_entry_spare++); @@ -2390,8 +2408,8 @@ get_pv_entry(pmap_t pmap, boolean_t try) struct pv_chunk *pc; vm_page_t m; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); PV_STAT(pv_entry_allocs++); pv_entry_count++; if (pv_entry_count > pv_entry_high_water) @@ -2428,8 +2446,8 @@ retry: } } /* - * Access to the ptelist "pv_vafree" is synchronized by the page - * queues lock. If "pv_vafree" is currently non-empty, it will + * Access to the ptelist "pv_vafree" is synchronized by the pvh + * global lock. If "pv_vafree" is currently non-empty, it will * remain non-empty until pmap_ptelist_alloc() completes. */ if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | @@ -2463,7 +2481,7 @@ pmap_pvh_remove(struct md_page *pvh, pma { pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { if (pmap == PV_PMAP(pv) && va == pv->pv_va) { TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); @@ -2481,7 +2499,7 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse vm_offset_t va_last; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_demote_pde: pa is not 4mpage aligned")); @@ -2514,7 +2532,7 @@ pmap_pv_promote_pde(pmap_t pmap, vm_offs vm_offset_t va_last; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_promote_pde: pa is not 4mpage aligned")); @@ -2555,7 +2573,7 @@ pmap_remove_entry(pmap_t pmap, vm_page_t { struct md_page *pvh; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); pmap_pvh_free(&m->md, pmap, va); if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -2573,8 +2591,8 @@ pmap_insert_entry(pmap_t pmap, vm_offset { pv_entry_t pv; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); pv = get_pv_entry(pmap, FALSE); pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); @@ -2588,8 +2606,8 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm { pv_entry_t pv; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if (pv_entry_count < pv_entry_high_water && (pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; @@ -2608,7 +2626,7 @@ pmap_pv_insert_pde(pmap_t pmap, vm_offse struct md_page *pvh; pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); if (pv_entry_count < pv_entry_high_water && (pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; @@ -2686,7 +2704,7 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t */ if (va >= KERNBASE) firstpte = &KPTmap[i386_btop(trunc_4mpage(va))]; - else if (curthread->td_pinned > 0 && mtx_owned(&vm_page_queue_mtx)) { + else if (curthread->td_pinned > 0 && rw_wowned(&pvh_global_lock)) { if ((*PMAP1 & PG_FRAME) != mptepa) { *PMAP1 = mptepa | PG_RW | PG_V | PG_A | PG_M; #ifdef SMP @@ -2845,7 +2863,7 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t pt_entry_t oldpte; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpte = pte_load_clear(ptq); if (oldpte & PG_W) @@ -2876,7 +2894,7 @@ pmap_remove_page(pmap_t pmap, vm_offset_ { pt_entry_t *pte; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); PMAP_LOCK_ASSERT(pmap, MA_OWNED); if ((pte = pmap_pte_quick(pmap, va)) == NULL || *pte == 0) @@ -2908,7 +2926,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva anyvalid = 0; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); PMAP_LOCK(pmap); @@ -2997,7 +3015,7 @@ out: sched_unpin(); if (anyvalid) pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); pmap_free_zero_pages(free); } @@ -3029,7 +3047,7 @@ pmap_remove_all(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_remove_all: page %p is not managed", m)); free = NULL; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; @@ -3070,7 +3088,7 @@ small_mappings: } vm_page_aflag_clear(m, PGA_WRITEABLE); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); pmap_free_zero_pages(free); } @@ -3146,7 +3164,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv else { pv_lists_locked = TRUE; resume: - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); } anychanged = FALSE; @@ -3190,7 +3208,7 @@ resume: } else { if (!pv_lists_locked) { pv_lists_locked = TRUE; - if (!mtx_trylock(&vm_page_queue_mtx)) { + if (!rw_try_wlock(&pvh_global_lock)) { if (anychanged) pmap_invalidate_all( pmap); @@ -3259,7 +3277,7 @@ retry: pmap_invalidate_all(pmap); if (pv_lists_locked) { sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } PMAP_UNLOCK(pmap); } @@ -3430,7 +3448,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, mpte = NULL; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); sched_pin(); @@ -3600,7 +3618,7 @@ validate: pmap_promote_pde(pmap, pde, va); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3615,7 +3633,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t { pd_entry_t *pde, newpde; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); pde = pmap_pde(pmap, va); if (*pde != 0) { @@ -3684,7 +3702,7 @@ pmap_enter_object(pmap_t pmap, vm_offset psize = atop(end - start); mpte = NULL; m = m_start; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { va = start + ptoa(diff); @@ -3698,7 +3716,7 @@ pmap_enter_object(pmap_t pmap, vm_offset mpte); m = TAILQ_NEXT(m, listq); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3715,10 +3733,10 @@ void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); (void)pmap_enter_quick_locked(pmap, va, m, prot, NULL); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3733,7 +3751,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); /* @@ -3939,9 +3957,9 @@ retry: if (!wired != ((*pde & PG_W) == 0)) { if (!are_queues_locked) { are_queues_locked = TRUE; - if (!mtx_trylock(&vm_page_queue_mtx)) { + if (!rw_try_wlock(&pvh_global_lock)) { PMAP_UNLOCK(pmap); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); goto retry; } } @@ -3965,7 +3983,7 @@ retry: pmap_pte_release(pte); out: if (are_queues_locked) - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3994,7 +4012,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm if (!pmap_is_current(src_pmap)) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if (dst_pmap < src_pmap) { PMAP_LOCK(dst_pmap); PMAP_LOCK(src_pmap); @@ -4084,7 +4102,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm } out: sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(src_pmap); PMAP_UNLOCK(dst_pmap); } @@ -4226,7 +4244,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_page_exists_quick: page %p is not managed", m)); rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (PV_PMAP(pv) == pmap) { rv = TRUE; @@ -4248,7 +4266,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p break; } } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4266,13 +4284,13 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->oflags & VPO_UNMANAGED) != 0) return (count); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); count = pmap_pvh_wired_mappings(&m->md, count); if ((m->flags & PG_FICTITIOUS) == 0) { count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), count); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } @@ -4288,7 +4306,7 @@ pmap_pvh_wired_mappings(struct md_page * pt_entry_t *pte; pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); sched_pin(); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -4313,11 +4331,11 @@ pmap_page_is_mapped(vm_page_t m) if ((m->oflags & VPO_UNMANAGED) != 0) return (FALSE); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = !TAILQ_EMPTY(&m->md.pv_list) || ((m->flags & PG_FICTITIOUS) == 0 && !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4347,7 +4365,7 @@ pmap_remove_pages(pmap_t pmap) printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); sched_pin(); TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { @@ -4451,7 +4469,7 @@ pmap_remove_pages(pmap_t pmap) } sched_unpin(); pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); pmap_free_zero_pages(free); } @@ -4479,11 +4497,11 @@ pmap_is_modified(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return (FALSE); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = pmap_is_modified_pvh(&m->md) || ((m->flags & PG_FICTITIOUS) == 0 && pmap_is_modified_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4500,7 +4518,7 @@ pmap_is_modified_pvh(struct md_page *pvh pmap_t pmap; boolean_t rv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); rv = FALSE; sched_pin(); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { @@ -4553,11 +4571,11 @@ pmap_is_referenced(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_is_referenced: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = pmap_is_referenced_pvh(&m->md) || ((m->flags & PG_FICTITIOUS) == 0 && pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4573,7 +4591,7 @@ pmap_is_referenced_pvh(struct md_page *p pmap_t pmap; boolean_t rv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); rv = FALSE; sched_pin(); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { @@ -4614,7 +4632,7 @@ pmap_remove_write(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; @@ -4655,7 +4673,7 @@ retry: } vm_page_aflag_clear(m, PGA_WRITEABLE); sched_unpin(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 07:10:34 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 89627106566B; Mon, 2 Jul 2012 07:10:34 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74A918FC0A; Mon, 2 Jul 2012 07:10:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627AYPL053242; Mon, 2 Jul 2012 07:10:34 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627AY7o053240; Mon, 2 Jul 2012 07:10:34 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020710.q627AY7o053240@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:10:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237967 - stable/9/sys/kern X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:10:34 -0000 Author: obrien Date: Mon Jul 2 07:10:33 2012 New Revision: 237967 URL: http://svn.freebsd.org/changeset/base/237967 Log: MFC: r227518: reformat comment to be more readable in standard Xterm. Modified: stable/9/sys/kern/kern_descrip.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_descrip.c ============================================================================== --- stable/9/sys/kern/kern_descrip.c Mon Jul 2 07:01:41 2012 (r237966) +++ stable/9/sys/kern/kern_descrip.c Mon Jul 2 07:10:33 2012 (r237967) @@ -842,12 +842,12 @@ do_dup(struct thread *td, int flags, int if (flags & DUP_FIXED) { if (new >= fdp->fd_nfiles) { /* - * The resource limits are here instead of e.g. fdalloc(), - * because the file descriptor table may be shared between - * processes, so we can't really use racct_add()/racct_sub(). - * Instead of counting the number of actually allocated - * descriptors, just put the limit on the size of the file - * descriptor table. + * The resource limits are here instead of e.g. + * fdalloc(), because the file descriptor table may be + * shared between processes, so we can't really use + * racct_add()/racct_sub(). Instead of counting the + * number of actually allocated descriptors, just put + * the limit on the size of the file descriptor table. */ #ifdef RACCT PROC_LOCK(p); @@ -1520,7 +1520,7 @@ fdalloc(struct thread *td, int minfd, in FILEDESC_XLOCK_ASSERT(fdp); if (fdp->fd_freefile > minfd) - minfd = fdp->fd_freefile; + minfd = fdp->fd_freefile; PROC_LOCK(p); maxfd = min((int)lim_cur(p, RLIMIT_NOFILE), maxfilesperproc); @@ -2252,7 +2252,7 @@ closef(struct file *fp, struct thread *t /* * Initialize the file pointer with the specified properties. - * + * * The ops are set with release semantics to be certain that the flags, type, * and data are visible when ops is. This is to prevent ops methods from being * called with bad data. @@ -3789,28 +3789,32 @@ SYSINIT(select, SI_SUB_LOCK, SI_ORDER_FI /*-------------------------------------------------------------------*/ static int -badfo_readwrite(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td) +badfo_readwrite(struct file *fp, struct uio *uio, struct ucred *active_cred, + int flags, struct thread *td) { return (EBADF); } static int -badfo_truncate(struct file *fp, off_t length, struct ucred *active_cred, struct thread *td) +badfo_truncate(struct file *fp, off_t length, struct ucred *active_cred, + struct thread *td) { return (EINVAL); } static int -badfo_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred, struct thread *td) +badfo_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred, + struct thread *td) { return (EBADF); } static int -badfo_poll(struct file *fp, int events, struct ucred *active_cred, struct thread *td) +badfo_poll(struct file *fp, int events, struct ucred *active_cred, + struct thread *td) { return (0); @@ -3824,7 +3828,8 @@ badfo_kqfilter(struct file *fp, struct k } static int -badfo_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, struct thread *td) +badfo_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, + struct thread *td) { return (EBADF); From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 07:11:44 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7328C1065670; Mon, 2 Jul 2012 07:11:44 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EEE08FC14; Mon, 2 Jul 2012 07:11:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627BiS5053412; Mon, 2 Jul 2012 07:11:44 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627BiJv053409; Mon, 2 Jul 2012 07:11:44 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020711.q627BiJv053409@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:11:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237968 - in stable/9: etc/mtree include X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:11:44 -0000 Author: obrien Date: Mon Jul 2 07:11:43 2012 New Revision: 237968 URL: http://svn.freebsd.org/changeset/base/237968 Log: MFC: r237279: install filemon.h into /usr/include for userland consumption. Modified: stable/9/etc/mtree/BSD.include.dist stable/9/include/Makefile Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/include/ (props changed) Modified: stable/9/etc/mtree/BSD.include.dist ============================================================================== --- stable/9/etc/mtree/BSD.include.dist Mon Jul 2 07:10:33 2012 (r237967) +++ stable/9/etc/mtree/BSD.include.dist Mon Jul 2 07:11:43 2012 (r237968) @@ -102,6 +102,8 @@ .. ciss .. + filemon + .. firewire .. hwpmc Modified: stable/9/include/Makefile ============================================================================== --- stable/9/include/Makefile Mon Jul 2 07:10:33 2012 (r237967) +++ stable/9/include/Makefile Mon Jul 2 07:11:43 2012 (r237968) @@ -39,7 +39,7 @@ LDIRS= bsm cam geom net net80211 netatal sys vm LSUBDIRS= cam/ata cam/scsi \ - dev/acpica dev/an dev/bktr dev/ciss dev/firewire dev/hwpmc \ + dev/acpica dev/an dev/bktr dev/ciss dev/filemon dev/firewire dev/hwpmc \ dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/ofw \ dev/pbio ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 07:14:22 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23BB61065673; Mon, 2 Jul 2012 07:14:22 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DE798FC15; Mon, 2 Jul 2012 07:14:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627ELOu053740; Mon, 2 Jul 2012 07:14:21 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627ELRs053733; Mon, 2 Jul 2012 07:14:21 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020714.q627ELRs053733@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237969 - in stable/9/usr.sbin: pmccontrol pmcstat X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:14:22 -0000 Author: obrien Date: Mon Jul 2 07:14:21 2012 New Revision: 237969 URL: http://svn.freebsd.org/changeset/base/237969 Log: MFC: r227524: improve the grep-ability output strings. Modified: stable/9/usr.sbin/pmccontrol/pmccontrol.c stable/9/usr.sbin/pmcstat/pmcpl_calltree.c stable/9/usr.sbin/pmcstat/pmcpl_gprof.c stable/9/usr.sbin/pmcstat/pmcstat.c stable/9/usr.sbin/pmcstat/pmcstat_log.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/pmccontrol/ (props changed) stable/9/usr.sbin/pmcstat/ (props changed) Modified: stable/9/usr.sbin/pmccontrol/pmccontrol.c ============================================================================== --- stable/9/usr.sbin/pmccontrol/pmccontrol.c Mon Jul 2 07:11:43 2012 (r237968) +++ stable/9/usr.sbin/pmccontrol/pmccontrol.c Mon Jul 2 07:14:21 2012 (r237969) @@ -147,8 +147,9 @@ pmcc_do_enable_disable(struct pmcc_op_li npmc = 0; for (c = 0; c < ncpu; c++) { if ((t = pmc_npmc(c)) < 0) - err(EX_OSERR, "Unable to determine the number of " - "PMCs in CPU %d", c); + err(EX_OSERR, + "Unable to determine the number of PMCs in CPU %d", + c); npmc = t > npmc ? t : npmc; } @@ -211,8 +212,8 @@ pmcc_do_enable_disable(struct pmcc_op_li if (error < 0) err(EX_OSERR, "%s of PMC %d on CPU %d failed", - b == PMCC_OP_ENABLE ? "Enable" : - "Disable", j, i); + b == PMCC_OP_ENABLE ? "Enable" : "Disable", + j, i); } return error; @@ -308,8 +309,9 @@ pmcc_do_list_events(void) printf("%s\n", pmc_name_of_class(c)); if (pmc_event_names_of_class(c, &eventnamelist, &nevents) < 0) - err(EX_OSERR, "ERROR: Cannot find information for " - "event class \"%s\"", pmc_name_of_class(c)); + err(EX_OSERR, +"ERROR: Cannot find information for event class \"%s\"", + pmc_name_of_class(c)); for (j = 0; j < nevents; j++) printf("\t%s\n", eventnamelist[j]); @@ -481,7 +483,8 @@ main(int argc, char **argv) break; case PMCC_ENABLE_DISABLE: if (STAILQ_EMPTY(&head)) - errx(EX_USAGE, "No PMCs specified to enable or disable"); + errx(EX_USAGE, + "No PMCs specified to enable or disable"); error = pmcc_do_enable_disable(&head); break; default: Modified: stable/9/usr.sbin/pmcstat/pmcpl_calltree.c ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcpl_calltree.c Mon Jul 2 07:11:43 2012 (r237968) +++ stable/9/usr.sbin/pmcstat/pmcpl_calltree.c Mon Jul 2 07:14:21 2012 (r237969) @@ -587,7 +587,8 @@ pmcpl_ct_topkeypress(int c, WINDOW *w) switch (c) { case 'f': pmcstat_skiplink = !pmcstat_skiplink; - wprintw(w, "skip empty link %s", pmcstat_skiplink ? "on" : "off"); + wprintw(w, "skip empty link %s", + pmcstat_skiplink ? "on" : "off"); break; } Modified: stable/9/usr.sbin/pmcstat/pmcpl_gprof.c ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcpl_gprof.c Mon Jul 2 07:11:43 2012 (r237968) +++ stable/9/usr.sbin/pmcstat/pmcpl_gprof.c Mon Jul 2 07:14:21 2012 (r237969) @@ -333,8 +333,9 @@ pmcpl_gmon_initimage(struct pmcstat_imag count = 0; do { if (++count > 999) - errx(EX_CANTCREAT, "ERROR: cannot create a " - "gmon file for \"%s\"", name); + errx(EX_CANTCREAT, + "ERROR: cannot create a gmon file for" + " \"%s\"", name); snprintf(name, sizeof(name), "%.*s~%3.3d.gmon", nlen, sn, count); if (pmcstat_string_lookup(name) == NULL) { @@ -516,8 +517,8 @@ pmcpl_gmon_shutdown(FILE *mf) pgf->pgf_pmcid), pgf->pgf_nsamples); if (pgf->pgf_overflow && args.pa_verbosity >= 1) - warnx("WARNING: profile \"%s\" " - "overflowed.", + warnx( +"WARNING: profile \"%s\" overflowed.", pmcstat_string_unintern( pgf->pgf_name)); } Modified: stable/9/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcstat.c Mon Jul 2 07:11:43 2012 (r237968) +++ stable/9/usr.sbin/pmcstat/pmcstat.c Mon Jul 2 07:14:21 2012 (r237969) @@ -156,8 +156,9 @@ pmcstat_get_cpumask(const char *cpuspec, do { cpu = strtol(s, &end, 0); if (cpu < 0 || end == s) - errx(EX_USAGE, "ERROR: Illegal CPU specification " - "\"%s\".", cpuspec); + errx(EX_USAGE, + "ERROR: Illegal CPU specification \"%s\".", + cpuspec); CPU_SET(cpu, cpumask); s = end + strspn(end, ", \t"); } while (*s); @@ -179,9 +180,9 @@ pmcstat_attach_pmcs(void) if (pmc_attach(ev->ev_pmcid, pt->pt_pid) == 0) count++; else if (errno != ESRCH) - err(EX_OSERR, "ERROR: cannot attach pmc " - "\"%s\" to process %d", ev->ev_name, - (int) pt->pt_pid); + err(EX_OSERR, +"ERROR: cannot attach pmc \"%s\" to process %d", + ev->ev_name, (int)pt->pt_pid); } if (count == 0) @@ -198,11 +199,11 @@ pmcstat_cleanup(void) STAILQ_FOREACH_SAFE(ev, &args.pa_events, ev_next, tmp) if (ev->ev_pmcid != PMC_ID_INVALID) { if (pmc_stop(ev->ev_pmcid) < 0) - err(EX_OSERR, "ERROR: cannot stop pmc 0x%x " - "\"%s\"", ev->ev_pmcid, ev->ev_name); + err(EX_OSERR, "ERROR: cannot stop pmc 0x%x \"%s\"", + ev->ev_pmcid, ev->ev_name); if (pmc_release(ev->ev_pmcid) < 0) - err(EX_OSERR, "ERROR: cannot release pmc " - "0x%x \"%s\"", ev->ev_pmcid, ev->ev_name); + err(EX_OSERR, "ERROR: cannot release pmc 0x%x \"%s\"", + ev->ev_pmcid, ev->ev_name); free(ev->ev_name); free(ev->ev_spec); STAILQ_REMOVE(&args.pa_events, ev, pmcstat_ev, ev_next); @@ -424,8 +425,8 @@ pmcstat_print_counters(void) continue; if (pmc_read(ev->ev_pmcid, &value) < 0) - err(EX_OSERR, "ERROR: Cannot read pmc " - "\"%s\"", ev->ev_name); + err(EX_OSERR, "ERROR: Cannot read pmc \"%s\"", + ev->ev_name); (void) fprintf(args.pa_printfile, "%*ju ", ev->ev_fieldwidth + extra_width, @@ -641,8 +642,9 @@ main(int argc, char **argv) err(EX_OSERR, "ERROR: Cannot stat \"%s\"", optarg); if (!S_ISDIR(sb.st_mode)) - errx(EX_USAGE, "ERROR: \"%s\" is not a " - "directory.", optarg); + errx(EX_USAGE, + "ERROR: \"%s\" is not a directory.", + optarg); args.pa_samplesdir = optarg; args.pa_flags |= FLAG_HAS_SAMPLESDIR; args.pa_required |= FLAG_DO_GPROF; @@ -801,15 +803,16 @@ main(int argc, char **argv) args.pa_printfile != stderr) (void) fclose(args.pa_printfile); if ((args.pa_printfile = fopen(optarg, "w")) == NULL) - errx(EX_OSERR, "ERROR: cannot open \"%s\" for " - "writing.", optarg); + errx(EX_OSERR, + "ERROR: cannot open \"%s\" for writing.", + optarg); args.pa_flags |= FLAG_DO_PRINT; break; case 'O': /* sampling output */ if (args.pa_outputpath) - errx(EX_USAGE, "ERROR: option -O may only be " - "specified once."); + errx(EX_USAGE, +"ERROR: option -O may only be specified once."); args.pa_outputpath = optarg; args.pa_flags |= FLAG_HAS_OUTPUT_LOGFILE; break; @@ -824,8 +827,8 @@ main(int argc, char **argv) case 'R': /* read an existing log file */ if (args.pa_inputpath != NULL) - errx(EX_USAGE, "ERROR: option -R may only be " - "specified once."); + errx(EX_USAGE, +"ERROR: option -R may only be specified once."); args.pa_inputpath = optarg; if (args.pa_printfile == stderr) args.pa_printfile = stdout; @@ -855,8 +858,9 @@ main(int argc, char **argv) case 'w': /* wait interval */ interval = strtod(optarg, &end); if (*end != '\0' || interval <= 0) - errx(EX_USAGE, "ERROR: Illegal wait interval " - "value \"%s\".", optarg); + errx(EX_USAGE, +"ERROR: Illegal wait interval value \"%s\".", + optarg); args.pa_flags |= FLAG_HAS_WAIT_INTERVAL; args.pa_interval = interval; break; @@ -870,8 +874,9 @@ main(int argc, char **argv) case 'z': graphdepth = strtod(optarg, &end); if (*end != '\0' || graphdepth <= 0) - errx(EX_USAGE, "ERROR: Illegal callchain " - "depth \"%s\".", optarg); + errx(EX_USAGE, + "ERROR: Illegal callchain depth \"%s\".", + optarg); args.pa_graphdepth = graphdepth; args.pa_required |= FLAG_DO_CALLGRAPHS; break; @@ -908,8 +913,8 @@ main(int argc, char **argv) /* disallow -O and -R together */ if (args.pa_outputpath && args.pa_inputpath) - errx(EX_USAGE, "ERROR: options -O and -R are mutually " - "exclusive."); + errx(EX_USAGE, + "ERROR: options -O and -R are mutually exclusive."); /* -m option is allowed with -R only. */ if (args.pa_flags & FLAG_DO_ANNOTATE && args.pa_inputpath == NULL) @@ -918,8 +923,8 @@ main(int argc, char **argv) /* -m option is not allowed combined with -g or -G. */ if (args.pa_flags & FLAG_DO_ANNOTATE && args.pa_flags & (FLAG_DO_GPROF | FLAG_DO_CALLGRAPHS)) - errx(EX_USAGE, "ERROR: option -m and -g | -G are mutually " - "exclusive"); + errx(EX_USAGE, + "ERROR: option -m and -g | -G are mutually exclusive"); if (args.pa_flags & FLAG_READ_LOGFILE) { errmsg = NULL; @@ -930,8 +935,9 @@ main(int argc, char **argv) else if (!STAILQ_EMPTY(&args.pa_events)) errmsg = "a PMC event specification"; if (errmsg) - errx(EX_USAGE, "ERROR: option -R may not be used with " - "%s.", errmsg); + errx(EX_USAGE, + "ERROR: option -R may not be used with %s.", + errmsg); } else if (STAILQ_EMPTY(&args.pa_events)) /* All other uses require a PMC spec. */ pmcstat_show_usage(); @@ -939,58 +945,66 @@ main(int argc, char **argv) /* check for -t pid without a process PMC spec */ if ((args.pa_required & FLAG_HAS_TARGET) && (args.pa_flags & FLAG_HAS_PROCESS_PMCS) == 0) - errx(EX_USAGE, "ERROR: option -t requires a process mode PMC " - "to be specified."); + errx(EX_USAGE, +"ERROR: option -t requires a process mode PMC to be specified." + ); /* check for process-mode options without a command or -t pid */ if ((args.pa_required & FLAG_HAS_PROCESS_PMCS) && (args.pa_flags & (FLAG_HAS_COMMANDLINE | FLAG_HAS_TARGET)) == 0) - errx(EX_USAGE, "ERROR: options -d, -E, -p, -P, and -W require " - "a command line or target process."); + errx(EX_USAGE, +"ERROR: options -d, -E, -p, -P, and -W require a command line or target process." + ); /* check for -p | -P without a target process of some sort */ if ((args.pa_required & (FLAG_HAS_COMMANDLINE | FLAG_HAS_TARGET)) && (args.pa_flags & (FLAG_HAS_COMMANDLINE | FLAG_HAS_TARGET)) == 0) - errx(EX_USAGE, "ERROR: options -P and -p require a " - "target process or a command line."); + errx(EX_USAGE, +"ERROR: options -P and -p require a target process or a command line." + ); /* check for process-mode options without a process-mode PMC */ if ((args.pa_required & FLAG_HAS_PROCESS_PMCS) && (args.pa_flags & FLAG_HAS_PROCESS_PMCS) == 0) - errx(EX_USAGE, "ERROR: options -d, -E, and -W require a " - "process mode PMC to be specified."); + errx(EX_USAGE, +"ERROR: options -d, -E, and -W require a process mode PMC to be specified." + ); /* check for -c cpu with no system mode PMCs or logfile. */ if ((args.pa_required & FLAG_HAS_SYSTEM_PMCS) && (args.pa_flags & FLAG_HAS_SYSTEM_PMCS) == 0 && (args.pa_flags & FLAG_READ_LOGFILE) == 0) - errx(EX_USAGE, "ERROR: option -c requires at least one " - "system mode PMC to be specified."); + errx(EX_USAGE, +"ERROR: option -c requires at least one system mode PMC to be specified." + ); /* check for counting mode options without a counting PMC */ if ((args.pa_required & FLAG_HAS_COUNTING_PMCS) && (args.pa_flags & FLAG_HAS_COUNTING_PMCS) == 0) - errx(EX_USAGE, "ERROR: options -C, -W and -o require at " - "least one counting mode PMC to be specified."); + errx(EX_USAGE, +"ERROR: options -C, -W and -o require at least one counting mode PMC to be specified." + ); /* check for sampling mode options without a sampling PMC spec */ if ((args.pa_required & FLAG_HAS_SAMPLING_PMCS) && (args.pa_flags & FLAG_HAS_SAMPLING_PMCS) == 0) - errx(EX_USAGE, "ERROR: options -N, -n and -O require at " - "least one sampling mode PMC to be specified."); + errx(EX_USAGE, +"ERROR: options -N, -n and -O require at least one sampling mode PMC to be specified." + ); /* check if -g/-G/-m/-T are being used correctly */ if ((args.pa_flags & FLAG_DO_ANALYSIS) && !(args.pa_flags & (FLAG_HAS_SAMPLING_PMCS|FLAG_READ_LOGFILE))) - errx(EX_USAGE, "ERROR: options -g/-G/-m/-T require sampling PMCs " - "or -R to be specified."); + errx(EX_USAGE, +"ERROR: options -g/-G/-m/-T require sampling PMCs or -R to be specified." + ); /* check if -O was spuriously specified */ if ((args.pa_flags & FLAG_HAS_OUTPUT_LOGFILE) && (args.pa_required & FLAG_HAS_OUTPUT_LOGFILE) == 0) errx(EX_USAGE, - "ERROR: option -O is used only with options " - "-E, -P, -S and -W."); +"ERROR: option -O is used only with options -E, -P, -S and -W." + ); /* -k kernel path require -g/-G/-m/-T or -R */ if ((args.pa_flags & FLAG_HAS_KERNELPATH) && @@ -1017,8 +1031,9 @@ main(int argc, char **argv) if ((args.pa_flags & FLAG_HAS_COUNTING_PMCS) && (args.pa_flags & FLAG_HAS_SAMPLING_PMCS) && ((args.pa_flags & FLAG_HAS_OUTPUT_LOGFILE) == 0)) - errx(EX_USAGE, "ERROR: option -O is required if counting and " - "sampling PMCs are specified together."); + errx(EX_USAGE, +"ERROR: option -O is required if counting and sampling PMCs are specified together." + ); /* * Check if "-k kerneldir" was specified, and if whether @@ -1044,8 +1059,9 @@ main(int argc, char **argv) err(EX_OSERR, "ERROR: Cannot stat \"%s\"", buffer); if (!S_ISDIR(sb.st_mode)) - errx(EX_USAGE, "ERROR: \"%s\" is not a " - "directory.", buffer); + errx(EX_USAGE, + "ERROR: \"%s\" is not a directory.", + buffer); } } @@ -1058,8 +1074,9 @@ main(int argc, char **argv) else { args.pa_graphfile = fopen(graphfilename, "w"); if (args.pa_graphfile == NULL) - err(EX_OSERR, "ERROR: cannot open \"%s\" " - "for writing", graphfilename); + err(EX_OSERR, + "ERROR: cannot open \"%s\" for writing", + graphfilename); } } if (args.pa_flags & FLAG_DO_ANNOTATE) { @@ -1073,11 +1090,13 @@ main(int argc, char **argv) if ((args.pa_flags & FLAG_READ_LOGFILE) == 0) { if (pmc_init() < 0) err(EX_UNAVAILABLE, - "ERROR: Initialization of the pmc(3) library failed"); + "ERROR: Initialization of the pmc(3) library failed" + ); if ((npmc = pmc_npmc(0)) < 0) /* assume all CPUs are identical */ - err(EX_OSERR, "ERROR: Cannot determine the number of PMCs " - "on CPU %d", 0); + err(EX_OSERR, +"ERROR: Cannot determine the number of PMCs on CPU %d", + 0); } /* Allocate a kqueue */ @@ -1152,17 +1171,18 @@ main(int argc, char **argv) */ STAILQ_FOREACH(ev, &args.pa_events, ev_next) { - if (pmc_allocate(ev->ev_spec, ev->ev_mode, + if (pmc_allocate(ev->ev_spec, ev->ev_mode, ev->ev_flags, ev->ev_cpu, &ev->ev_pmcid) < 0) - err(EX_OSERR, "ERROR: Cannot allocate %s-mode pmc with " - "specification \"%s\"", - PMC_IS_SYSTEM_MODE(ev->ev_mode) ? "system" : "process", - ev->ev_spec); - - if (PMC_IS_SAMPLING_MODE(ev->ev_mode) && - pmc_set(ev->ev_pmcid, ev->ev_count) < 0) - err(EX_OSERR, "ERROR: Cannot set sampling count " - "for PMC \"%s\"", ev->ev_name); + err(EX_OSERR, +"ERROR: Cannot allocate %s-mode pmc with specification \"%s\"", + PMC_IS_SYSTEM_MODE(ev->ev_mode) ? + "system" : "process", ev->ev_spec); + + if (PMC_IS_SAMPLING_MODE(ev->ev_mode) && + pmc_set(ev->ev_pmcid, ev->ev_count) < 0) + err(EX_OSERR, + "ERROR: Cannot set sampling count for PMC \"%s\"", + ev->ev_name); } /* compute printout widths */ @@ -1204,8 +1224,8 @@ main(int argc, char **argv) EV_SET(&kev, SIGWINCH, EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); if (kevent(pmcstat_kq, &kev, 1, NULL, 0, NULL) < 0) - err(EX_OSERR, "ERROR: Cannot register kevent for " - "SIGWINCH"); + err(EX_OSERR, + "ERROR: Cannot register kevent for SIGWINCH"); args.pa_toptty = 1; } @@ -1248,8 +1268,8 @@ main(int argc, char **argv) args.pa_interval * 1000, NULL); if (kevent(pmcstat_kq, &kev, 1, NULL, 0, NULL) < 0) - err(EX_OSERR, "ERROR: Cannot register kevent for " - "timer"); + err(EX_OSERR, + "ERROR: Cannot register kevent for timer"); } /* attach PMCs to the target process, starting it if specified */ @@ -1262,8 +1282,8 @@ main(int argc, char **argv) /* Attach process pmcs to the target process. */ if (args.pa_flags & (FLAG_HAS_TARGET | FLAG_HAS_COMMANDLINE)) { if (SLIST_EMPTY(&args.pa_targets)) - errx(EX_DATAERR, "ERROR: No matching target " - "processes."); + errx(EX_DATAERR, + "ERROR: No matching target processes."); if (args.pa_flags & FLAG_HAS_PROCESS_PMCS) pmcstat_attach_pmcs(); @@ -1319,7 +1339,8 @@ main(int argc, char **argv) keypad(stdscr, TRUE); clear(); /* Get terminal width / height with ncurses. */ - getmaxyx(stdscr, pmcstat_displayheight, pmcstat_displaywidth); + getmaxyx(stdscr, + pmcstat_displayheight, pmcstat_displaywidth); pmcstat_displayheight--; pmcstat_displaywidth--; atexit(pmcstat_topexit); } @@ -1385,8 +1406,8 @@ main(int argc, char **argv) } else if (kev.ident == SIGWINCH) { if (ioctl(fileno(args.pa_printfile), TIOCGWINSZ, &ws) < 0) - err(EX_OSERR, "ERROR: Cannot determine " - "window size"); + err(EX_OSERR, + "ERROR: Cannot determine window size"); pmcstat_displayheight = ws.ws_row - 1; pmcstat_displaywidth = ws.ws_col - 1; } else @@ -1406,7 +1427,8 @@ main(int argc, char **argv) if (do_print && !do_read) { if ((args.pa_required & FLAG_HAS_OUTPUT_LOGFILE) == 0) { pmcstat_print_pmcs(); - if (runstate == PMCSTAT_FINISHED && /* final newline */ + if (runstate == PMCSTAT_FINISHED && + /* final newline */ (args.pa_flags & FLAG_DO_PRINT) == 0) (void) fprintf(args.pa_printfile, "\n"); } @@ -1433,19 +1455,19 @@ main(int argc, char **argv) /* check if the driver lost any samples or events */ if (check_driver_stats) { if (pmc_get_driver_stats(&ds_end) < 0) - err(EX_OSERR, "ERROR: Cannot retrieve driver " - "statistics"); + err(EX_OSERR, + "ERROR: Cannot retrieve driver statistics"); if (ds_start.pm_intr_bufferfull != ds_end.pm_intr_bufferfull && args.pa_verbosity > 0) - warnx("WARNING: some samples were dropped. Please " - "consider tuning the \"kern.hwpmc.nsamples\" " - "tunable."); + warnx("WARNING: some samples were dropped.\n" +"Please consider tuning the \"kern.hwpmc.nsamples\" tunable." + ); if (ds_start.pm_buffer_requests_failed != ds_end.pm_buffer_requests_failed && args.pa_verbosity > 0) - warnx("WARNING: some events were discarded. Please " - "consider tuning the \"kern.hwpmc.nbuffers\" " - "tunable."); + warnx("WARNING: some events were discarded.\n" +"Please consider tuning the \"kern.hwpmc.nbuffers\" tunable." + ); } exit(EX_OK); Modified: stable/9/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcstat_log.c Mon Jul 2 07:11:43 2012 (r237968) +++ stable/9/usr.sbin/pmcstat/pmcstat_log.c Mon Jul 2 07:14:21 2012 (r237969) @@ -421,8 +421,8 @@ pmcstat_image_get_aout_params(struct pmc assert(path != NULL); if (image->pi_iskernelmodule) - errx(EX_SOFTWARE, "ERROR: a.out kernel modules are " - "unsupported \"%s\"", path); + errx(EX_SOFTWARE, + "ERROR: a.out kernel modules are unsupported \"%s\"", path); (void) snprintf(buffer, sizeof(buffer), "%s%s", args.pa_fsroot, path); @@ -656,8 +656,9 @@ pmcstat_image_get_elf_params(struct pmcs } if (gelf_getehdr(e, &eh) != &eh) { - warnx("WARNING: Cannot retrieve the ELF Header for " - "\"%s\": %s.", buffer, elf_errmsg(-1)); + warnx( + "WARNING: Cannot retrieve the ELF Header for \"%s\": %s.", + buffer, elf_errmsg(-1)); goto done; } @@ -678,16 +679,17 @@ pmcstat_image_get_elf_params(struct pmcs */ if (eh.e_type == ET_EXEC) { if (elf_getphnum(e, &nph) == 0) { - warnx("WARNING: Could not determine the number of " - "program headers in \"%s\": %s.", buffer, + warnx( +"WARNING: Could not determine the number of program headers in \"%s\": %s.", + buffer, elf_errmsg(-1)); goto done; } for (i = 0; i < eh.e_phnum; i++) { if (gelf_getphdr(e, i, &ph) != &ph) { - warnx("WARNING: Retrieval of PHDR entry #%ju " - "in \"%s\" failed: %s.", (uintmax_t) i, - buffer, elf_errmsg(-1)); + warnx( +"WARNING: Retrieval of PHDR entry #%ju in \"%s\" failed: %s.", + (uintmax_t) i, buffer, elf_errmsg(-1)); goto done; } switch (ph.p_type) { @@ -696,8 +698,8 @@ pmcstat_image_get_elf_params(struct pmcs break; case PT_INTERP: if ((elfbase = elf_rawfile(e, NULL)) == NULL) { - warnx("WARNING: Cannot retrieve the " - "interpreter for \"%s\": %s.", + warnx( +"WARNING: Cannot retrieve the interpreter for \"%s\": %s.", buffer, elf_errmsg(-1)); goto done; } @@ -717,17 +719,18 @@ pmcstat_image_get_elf_params(struct pmcs * Get the min and max VA associated with this ELF object. */ if (elf_getshnum(e, &nsh) == 0) { - warnx("WARNING: Could not determine the number of sections " - "for \"%s\": %s.", buffer, elf_errmsg(-1)); + warnx( +"WARNING: Could not determine the number of sections for \"%s\": %s.", + buffer, elf_errmsg(-1)); goto done; } for (i = 0; i < nsh; i++) { if ((scn = elf_getscn(e, i)) == NULL || gelf_getshdr(scn, &sh) != &sh) { - warnx("WARNING: Could not retrieve section header " - "#%ju in \"%s\": %s.", (uintmax_t) i, buffer, - elf_errmsg(-1)); + warnx( +"WARNING: Could not retrieve section header #%ju in \"%s\": %s.", + (uintmax_t) i, buffer, elf_errmsg(-1)); goto done; } if (sh.sh_flags & SHF_EXECINSTR) { @@ -923,8 +926,8 @@ pmcstat_image_unmap(struct pmcstat_proce * the new one at [end]. */ if ((pcmnew = malloc(sizeof(*pcmnew))) == NULL) - err(EX_OSERR, "ERROR: Cannot split a map " - "entry"); + err(EX_OSERR, + "ERROR: Cannot split a map entry"); pcmnew->ppm_image = pcm->ppm_image; @@ -981,8 +984,9 @@ pmcstat_image_addr2line(struct pmcstat_i if (image->pi_addr2line == NULL) { if (!addr2line_warn) { addr2line_warn = 1; - warnx("WARNING: addr2line is needed" - "for source code information."); + warnx( +"WARNING: addr2line is needed for source code information." + ); } return (0); } @@ -1300,8 +1304,9 @@ pmcstat_process_exec(struct pmcstat_proc break; default: - err(EX_SOFTWARE, "ERROR: Unsupported executable type for " - "\"%s\"", pmcstat_string_unintern(path)); + err(EX_SOFTWARE, + "ERROR: Unsupported executable type for \"%s\"", + pmcstat_string_unintern(path)); } } @@ -1355,10 +1360,9 @@ pmcstat_analyze_log(void) case PMCLOG_TYPE_INITIALIZE: if ((ev.pl_u.pl_i.pl_version & 0xFF000000) != PMC_VERSION_MAJOR << 24 && args.pa_verbosity > 0) - warnx("WARNING: Log version 0x%x does not " - "match compiled version 0x%x.", - ev.pl_u.pl_i.pl_version, - PMC_VERSION_MAJOR); + warnx( +"WARNING: Log version 0x%x does not match compiled version 0x%x.", + ev.pl_u.pl_i.pl_version, PMC_VERSION_MAJOR); break; case PMCLOG_TYPE_MAP_IN: @@ -1582,8 +1586,9 @@ pmcstat_analyze_log(void) else if (ev.pl_state == PMCLOG_REQUIRE_DATA) return (PMCSTAT_RUNNING); - err(EX_DATAERR, "ERROR: event parsing failed (record %jd, " - "offset 0x%jx)", (uintmax_t) ev.pl_count + 1, ev.pl_offset); + err(EX_DATAERR, + "ERROR: event parsing failed (record %jd, offset 0x%jx)", + (uintmax_t) ev.pl_count + 1, ev.pl_offset); } /* @@ -1623,9 +1628,9 @@ pmcstat_print_log(void) pmc_name_of_cputype(ev.pl_u.pl_i.pl_arch)); if ((ev.pl_u.pl_i.pl_version & 0xFF000000) != PMC_VERSION_MAJOR << 24 && args.pa_verbosity > 0) - warnx("WARNING: Log version 0x%x != expected " - "version 0x%x.", ev.pl_u.pl_i.pl_version, - PMC_VERSION); + warnx( +"WARNING: Log version 0x%x != expected version 0x%x.", + ev.pl_u.pl_i.pl_version, PMC_VERSION); break; case PMCLOG_TYPE_MAP_IN: PMCSTAT_PRINT_ENTRY("map-in","%d %p \"%s\"", @@ -1712,8 +1717,8 @@ pmcstat_print_log(void) else if (ev.pl_state == PMCLOG_REQUIRE_DATA) return (PMCSTAT_RUNNING); - errx(EX_DATAERR, "ERROR: event parsing failed " - "(record %jd, offset 0x%jx).", + errx(EX_DATAERR, + "ERROR: event parsing failed (record %jd, offset 0x%jx).", (uintmax_t) ev.pl_count + 1, ev.pl_offset); /*NOTREACHED*/ } From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 07:18:28 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83956106564A; Mon, 2 Jul 2012 07:18:28 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F4248FC0C; Mon, 2 Jul 2012 07:18:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627ISRG054195; Mon, 2 Jul 2012 07:18:28 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627ISZs054193; Mon, 2 Jul 2012 07:18:28 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020718.q627ISZs054193@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:18:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237970 - stable/9/usr.sbin/pmcstat X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:18:28 -0000 Author: obrien Date: Mon Jul 2 07:18:27 2012 New Revision: 237970 URL: http://svn.freebsd.org/changeset/base/237970 Log: MFC: r227526: KNF Modified: stable/9/usr.sbin/pmcstat/pmcstat_log.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/pmcstat/ (props changed) Modified: stable/9/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- stable/9/usr.sbin/pmcstat/pmcstat_log.c Mon Jul 2 07:14:21 2012 (r237969) +++ stable/9/usr.sbin/pmcstat/pmcstat_log.c Mon Jul 2 07:18:27 2012 (r237970) @@ -1235,22 +1235,23 @@ pmcstat_process_lookup(pid_t pid, int al hash = (uint32_t) pid & PMCSTAT_HASH_MASK; /* simplicity wins */ LIST_FOREACH_SAFE(pp, &pmcstat_process_hash[hash], pp_next, pptmp) - if (pp->pp_pid == pid) { - /* Found a descriptor, check and process zombies */ - if (allocate && pp->pp_isactive == 0) { - /* remove maps */ - TAILQ_FOREACH_SAFE(ppm, &pp->pp_map, ppm_next, - ppmtmp) { - TAILQ_REMOVE(&pp->pp_map, ppm, ppm_next); - free(ppm); - } - /* remove process entry */ - LIST_REMOVE(pp, pp_next); - free(pp); - break; - } - return (pp); - } + if (pp->pp_pid == pid) { + /* Found a descriptor, check and process zombies */ + if (allocate && pp->pp_isactive == 0) { + /* remove maps */ + TAILQ_FOREACH_SAFE(ppm, &pp->pp_map, ppm_next, + ppmtmp) { + TAILQ_REMOVE(&pp->pp_map, ppm, + ppm_next); + free(ppm); + } + /* remove process entry */ + LIST_REMOVE(pp, pp_next); + free(pp); + break; + } + return (pp); + } if (!allocate) return (NULL); From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 07:22:22 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B5C8C106566B; Mon, 2 Jul 2012 07:22:22 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88FE08FC16; Mon, 2 Jul 2012 07:22:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627MMUW054640; Mon, 2 Jul 2012 07:22:22 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627MMHw054639; Mon, 2 Jul 2012 07:22:22 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020722.q627MMHw054639@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237971 - stable/9 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:22:22 -0000 Author: obrien Date: Mon Jul 2 07:22:22 2012 New Revision: 237971 URL: http://svn.freebsd.org/changeset/base/237971 Log: Record that r228191 (ensure kldxref is run first) was MFC'ed [r231373]. Modified: Directory Properties: stable/9/ (props changed) From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 07:37:06 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96385106564A; Mon, 2 Jul 2012 07:37:06 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82F328FC08; Mon, 2 Jul 2012 07:37:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627b6ge055368; Mon, 2 Jul 2012 07:37:06 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627b6pf055366; Mon, 2 Jul 2012 07:37:06 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020737.q627b6pf055366@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:37:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237973 - stable/9/lib/libc/gen X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:37:06 -0000 Author: obrien Date: Mon Jul 2 07:37:06 2012 New Revision: 237973 URL: http://svn.freebsd.org/changeset/base/237973 Log: MFC: r228193: tweak the r137233 fix to r136283 -- Code was making two send() attempts vs. the comment documented "If we are working with a privileged socket, then take only one attempt". Make the code match. Modified: stable/9/lib/libc/gen/syslog.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/syslog.c ============================================================================== --- stable/9/lib/libc/gen/syslog.c Mon Jul 2 07:27:14 2012 (r237972) +++ stable/9/lib/libc/gen/syslog.c Mon Jul 2 07:37:06 2012 (r237973) @@ -265,7 +265,7 @@ vsyslog(int pri, const char *fmt, va_lis * 1) syslogd was restarted * 2) /var/run/log is out of socket buffer space, which * in most cases means local DoS. - * We attempt to reconnect to /var/run/log to take care of + * We attempt to reconnect to /var/run/log[priv] to take care of * case #1 and keep send()ing data to cover case #2 * to give syslogd a chance to empty its socket buffer. * @@ -281,13 +281,13 @@ vsyslog(int pri, const char *fmt, va_lis connectlog(); } do { + if (status == CONNPRIV) + break; _usleep(1); if (send(LogFile, tbuf, cnt, 0) >= 0) { THREAD_UNLOCK(); return; } - if (status == CONNPRIV) - break; } while (errno == ENOBUFS); } else { THREAD_UNLOCK(); From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 07:39:34 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20884106566B; Mon, 2 Jul 2012 07:39:34 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01E548FC08; Mon, 2 Jul 2012 07:39:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q627dXsb055525; Mon, 2 Jul 2012 07:39:33 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q627dXqR055517; Mon, 2 Jul 2012 07:39:33 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020739.q627dXqR055517@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 07:39:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237974 - stable/9/lib/libc/locale X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 07:39:34 -0000 Author: obrien Date: Mon Jul 2 07:39:33 2012 New Revision: 237974 URL: http://svn.freebsd.org/changeset/base/237974 Log: MFC: r228199: Split sentences at period boundaries. Modified: stable/9/lib/libc/locale/duplocale.3 stable/9/lib/libc/locale/freelocale.3 stable/9/lib/libc/locale/localeconv.3 stable/9/lib/libc/locale/newlocale.3 stable/9/lib/libc/locale/querylocale.3 stable/9/lib/libc/locale/uselocale.3 stable/9/lib/libc/locale/xlocale.3 Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/locale/duplocale.3 ============================================================================== --- stable/9/lib/libc/locale/duplocale.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/duplocale.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -36,25 +36,26 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h -.Ft locale_t +.In xlocale.h +.Ft locale_t .Fn duplocale "locale_t locale" .Sh DESCRIPTION Duplicates an existing .Fa locale_t -returning a new +returning a new .Fa locale_t that refers to the same locale values but has independent internal state. Various functions, such as .Xr mblen 3 -require presistent state. These functions formerly used static variables and -calls to them from multiple threads had undefined behavior. They now use -fields in the +require presistent state. +These functions formerly used static variables and calls to them from multiple +threads had undefined behavior. +They now use fields in the .Fa locale_t associated with the current thread by .Xr uselocale 3 . These calls are therefore only thread safe on threads with a unique per-thread -locale. +locale. .Pt The locale returned by this call must be freed with .Xr freelocale 3 . @@ -63,8 +64,9 @@ Ideally, .Xr uselocale 3 should make a copy of the .Fa locale_t -implicitly to ensure thread safety, and a copy of the global locale should be -installed lazily on each thread. The FreeBSD implementation does not do this, +implicitly to ensure thread safety, +and a copy of the global locale should be installed lazily on each thread. +The FreeBSD implementation does not do this, for compatibility with Darwin. .Sh SEE ALSO .Xr freelocale 3 , Modified: stable/9/lib/libc/locale/freelocale.3 ============================================================================== --- stable/9/lib/libc/locale/freelocale.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/freelocale.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -33,22 +33,22 @@ .Nm freelocale .Nd Frees a locale created with .Xr duplocale 3 -or +or .Xr newlocale 3 . .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In xlocale.h .Ft int .Fn freelocale "locale_t locale" .Sh DESCRIPTION Frees a .Fa locale_t . -This relinquishes any resources held exclusively by this locale. Note that -locales share reference-counted components, so a call to this function is not -guaranteed to free all of the components. +This relinquishes any resources held exclusively by this locale. +Note that locales share reference-counted components, +so a call to this function is not guaranteed to free all of the components. .Sh RETURN VALUES -Returns 0 on success or -1 on error. +Returns 0 on success or -1 on error. .Sh SEE ALSO .Xr duplocale 3 , .Xr localeconv 3 , Modified: stable/9/lib/libc/locale/localeconv.3 ============================================================================== --- stable/9/lib/libc/locale/localeconv.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/localeconv.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -203,7 +203,7 @@ result similarly denotes an unavailable The .Fn localeconv_l function takes an explicit locale parameter. For more information, see -.Xr xlocale 3 . +.Xr xlocale 3 . .Sh RETURN VALUES The .Fn localeconv @@ -212,9 +212,10 @@ which may be altered by later calls to .Xr setlocale 3 or .Fn localeconv . -The return value for +The return value for .Fn localeconv_l -is stored with the locale. It will remain valid until a subsequent call to +is stored with the locale. +It will remain valid until a subsequent call to .Xr freelocale 3 . If a thread-local locale is in effect then the return value from .Fn localeconv Modified: stable/9/lib/libc/locale/newlocale.3 ============================================================================== --- stable/9/lib/libc/locale/newlocale.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/newlocale.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -31,40 +31,44 @@ .Os .Sh NAME .Nm newlocale -.Nd Creates a new locale +.Nd Creates a new locale .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In xlocale -.Ft +.Ft .Fn newlocale "int mask" "const char * locale" "locale_t base" .Sh DESCRIPTION -Creates a new locale, inheriting some properties from an existing locale. The -.Fa mask +Creates a new locale, inheriting some properties from an existing locale. +The +.Fa mask defines the components that the new locale will have set to the locale with the -name specified in the +name specified in the .Fa locale -parameter. Any other components will be inherited from +parameter. +Any other components will be inherited from .Fa base . .Pt The .Fa mask is either .Fa LC_ALL_MASK, -indicating all possible locale components, or the logical OR of some -combination of the following: +indicating all possible locale components, +or the logical OR of some combination of the following: .Bl -tag -width "LC_MESSAGES_MASK" -offset indent .It LC_COLLATE_MASK -The locale for string collation routines. This controls alphabetic ordering in +The locale for string collation routines. +This controls alphabetic ordering in .Xr strcoll 3 - and + and .Xr strxfrm 3 . .It LC_CTYPE_MASK The locale for the .Xr ctype 3 and .Xr multibyte 3 -functions. This controls recognition of upper and lower case, alpha- betic or +functions. +This controls recognition of upper and lower case, alphabetic or non-alphabetic characters, and so on. .It LC_MESSAGES_MASK Set a locale for message catalogs, see @@ -76,8 +80,8 @@ the .Xr localeconv 3 function. .It LC_NUMERIC_MASK -Set a locale for formatting numbers. This controls the for- -matting of decimal points in input and output of floating +Set a locale for formatting numbers. +This controls the formatting of decimal points in input and output of floating point numbers in functions such as .Xr printf 3 and @@ -95,7 +99,8 @@ This function uses the same rules for lo .Sh RETURN VALUES Returns a new, valid, .Fa locale_t -or NULL if an error occurs. You must free the returned locale with +or NULL if an error occurs. +You must free the returned locale with .Xr freelocale 3 . .Sh SEE ALSO .Xr duplocale 3 , Modified: stable/9/lib/libc/locale/querylocale.3 ============================================================================== --- stable/9/lib/libc/locale/querylocale.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/querylocale.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -36,15 +36,15 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In xlocale.h .Ft const char * .Fn querylocale "int mask" "locale_t locale" .Sh DESCRIPTION Returns the name of the locale for the category specified by .Fa mask. This possible values for the mask are the same as those in -.Xr newlocale 3 . If more than one bit in the mask is set, the returned value -is undefined. +.Xr newlocale 3 . +If more than one bit in the mask is set, the returned value is undefined. .Sh SEE ALSO .Xr duplocale 3 , .Xr freelocale 3 , Modified: stable/9/lib/libc/locale/uselocale.3 ============================================================================== --- stable/9/lib/libc/locale/uselocale.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/uselocale.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -36,17 +36,18 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In xlocale.h .Ft locale_t .Fn uselocale "locale_t locale" .Sh DESCRIPTION -Specifies the locale for this thread to use. Specifying +Specifies the locale for this thread to use. +Specifying .Fa LC_GLOBAL_LOCALE -disables the per-thread locale, while NULL returns the current locale without -setting a new one. +disables the per-thread locale, +while NULL returns the current locale without setting a new one. .Sh RETURN VALUES -Returns the previous locale, or LC_GLOBAL_LOCALE if this thread has no locale -associated with it. +Returns the previous locale, +or LC_GLOBAL_LOCALE if this thread has no locale associated with it. .Sh SEE ALSO .Xr duplocale 3 , .Xr freelocale 3 , @@ -55,5 +56,5 @@ associated with it. .Xr querylocale 3 , .Xr xlocale 3 .Sh STANDARDS -This function, conforms to +This function conforms to .St -p1003.1-2008 Modified: stable/9/lib/libc/locale/xlocale.3 ============================================================================== --- stable/9/lib/libc/locale/xlocale.3 Mon Jul 2 07:37:06 2012 (r237973) +++ stable/9/lib/libc/locale/xlocale.3 Mon Jul 2 07:39:33 2012 (r237974) @@ -39,39 +39,45 @@ .In xlocale.h .Sh DESCRIPTION The extended locale support includes a set of functions for setting -thread-local locales, as well convenience functions for performing locale-aware +thread-local locales, +as well convenience functions for performing locale-aware calls with a specified locale. .Pp The core of the xlocale API is the .Fa locale_t -type. This is an opaque type encapsulating a locale. Instances of this can be -either set as the locale for a specific thread or passed directly to the +type. +This is an opaque type encapsulating a locale. +Instances of this can be either set as the locale for a specific thread or +passed directly to the .Fa _l -suffixed variants of various standard C functions. Two special +suffixed variants of various standard C functions. +Two special .Fa locale_t values are available: -.Bl -bullet -offset indent +.Bl -bullet -offset indent .It -NULL refers to the current locale for the thread, or to the global locale if no -locale has been set for this thread. +NULL refers to the current locale for the thread, +or to the global locale if no locale has been set for this thread. .It LC_GLOBAL_LOCALE refers to the global locale. .El .Pp -The global locale is the locale set with the +The global locale is the locale set with the .Xr setlocale 3 function. .Sh CAVEATS -The +The .Xr setlocale 3 -function, and others in the family, refer to the global locale. Other -functions that depend on the locale, however, will take the thread-local locale -if one has been set. This means that the idiom of setting the locale using +function, and others in the family, refer to the global locale. +Other functions that depend on the locale, however, +will take the thread-local locale if one has been set. +This means that the idiom of setting the locale using .Xr setlocale 3 , -calling a locale-dependent function, and then restoring the locale will not +calling a locale-dependent function, +and then restoring the locale will not have the expected behavior if the current thread has had a locale set using .Xr uselocale 3 . -You should avoid this idiom and prefer to use the +You should avoid this idiom and prefer to use the .Fa _l suffixed versions instead. .Sh SEE ALSO @@ -84,29 +90,34 @@ suffixed versions instead. .Sh CONVENIENCE FUNCTIONS The xlocale API includes a number of .Fa _l -suffixed convenience functions. These are variants of standard C functions -that have been modified to take an explicit +suffixed convenience functions. +These are variants of standard C functions +that have been modified to take an explicit .Fa locale_t -parameter as the final argument or, in the case of variadic functions, as an -additional argument directly before the format string. Each of these functions -accepts either NULL or LC_GLOBAL_LOCALE. In these functions, NULL refers to -the C locale, rather than the thread's current locale. If you wish to use the -thread's current locale, then use the unsuffixed version of the function. +parameter as the final argument or, in the case of variadic functions, +as an additional argument directly before the format string. +Each of these functions accepts either NULL or LC_GLOBAL_LOCALE. +In these functions, NULL refers to the C locale, +rather than the thread's current locale. +If you wish to use the thread's current locale, +then use the unsuffixed version of the function. .Pp -These functions are exposed by including +These functions are exposed by including .In xlocale.h .Em after -including the relevant headers for the standard variant. For example, the +including the relevant headers for the standard variant. +For example, the .Xr strtol_l 3 -function is exposed by including +function is exposed by including .In xlocale.h -after +after .In stdlib.h , which defines .Xr strtol 3 . .Pp -For reference, a complete list of the locale-aware functions that are available -in this form, along with the headers that expose them, is provided here: +For reference, +a complete list of the locale-aware functions that are available in this form, +along with the headers that expose them, is provided here: .Pp .Bl -tag -width " " .It In wctype.h @@ -117,7 +128,7 @@ in this form, along with the headers tha .Xr iswdigit_l 3 , .Xr iswgraph_l 3 , .Xr iswlower_l 3 , -.Xr iswprint_l 3 , +.Xr iswprint_l 3 , .Xr iswpunct_l 3 , .Xr iswspace_l 3 , .Xr iswupper_l 3 , @@ -264,7 +275,7 @@ The functions conform to .St -p1003.1-2008 . .Sh HISTORY -The xlocale APIs first appeared in Darwin 8.0. This implementation was -written by David Chisnall, under sponsorship from the FreeBSD Foundation and -first appeared in +The xlocale APIs first appeared in Darwin 8.0. +This implementation was written by David Chisnall, +under sponsorship from the FreeBSD Foundation and first appeared in .Fx 9.1 . From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 08:08:30 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3ABCC106564A; Mon, 2 Jul 2012 08:08:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DE958FC0A; Mon, 2 Jul 2012 08:08:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6288Tna056903; Mon, 2 Jul 2012 08:08:29 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6288Trw056900; Mon, 2 Jul 2012 08:08:29 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201207020808.q6288Trw056900@svn.freebsd.org> From: Andriy Gapon Date: Mon, 2 Jul 2012 08:08:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237977 - in stable/9/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:08:30 -0000 Author: avg Date: Mon Jul 2 08:08:29 2012 New Revision: 237977 URL: http://svn.freebsd.org/changeset/base/237977 Log: MFC r237748: dtrace instruction decoder: add 0x0f 0x1f NOP opcode support Modified: stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.c stable/9/sys/cddl/dev/dtrace/i386/dis_tables.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.c Mon Jul 2 07:50:15 2012 (r237976) +++ stable/9/sys/cddl/dev/dtrace/amd64/dis_tables.c Mon Jul 2 08:08:29 2012 (r237977) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, Modified: stable/9/sys/cddl/dev/dtrace/i386/dis_tables.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/i386/dis_tables.c Mon Jul 2 07:50:15 2012 (r237976) +++ stable/9/sys/cddl/dev/dtrace/i386/dis_tables.c Mon Jul 2 08:08:29 2012 (r237977) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 08:21:16 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38C7F106564A; Mon, 2 Jul 2012 08:21:16 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2431E8FC14; Mon, 2 Jul 2012 08:21:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q628LFYX057584; Mon, 2 Jul 2012 08:21:15 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q628LFQO057582; Mon, 2 Jul 2012 08:21:15 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020821.q628LFQO057582@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 08:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237979 - stable/9/sys/kern X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:21:16 -0000 Author: obrien Date: Mon Jul 2 08:21:15 2012 New Revision: 237979 URL: http://svn.freebsd.org/changeset/base/237979 Log: MFC: r228475 & r228487: Disallow various debug.kdb sysctl's when securelevel is raised. PR: 161350 Modified: stable/9/sys/kern/kern_shutdown.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_shutdown.c ============================================================================== --- stable/9/sys/kern/kern_shutdown.c Mon Jul 2 08:09:07 2012 (r237978) +++ stable/9/sys/kern/kern_shutdown.c Mon Jul 2 08:21:15 2012 (r237979) @@ -100,8 +100,9 @@ int debugger_on_panic = 0; #else int debugger_on_panic = 1; #endif -SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic, CTLFLAG_RW | CTLFLAG_TUN, - &debugger_on_panic, 0, "Run debugger on kernel panic"); +SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic, + CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN, + &debugger_on_panic, 0, "Run debugger on kernel panic"); TUNABLE_INT("debug.debugger_on_panic", &debugger_on_panic); #ifdef KDB_TRACE @@ -109,8 +110,9 @@ static int trace_on_panic = 1; #else static int trace_on_panic = 0; #endif -SYSCTL_INT(_debug, OID_AUTO, trace_on_panic, CTLFLAG_RW | CTLFLAG_TUN, - &trace_on_panic, 0, "Print stack trace on kernel panic"); +SYSCTL_INT(_debug, OID_AUTO, trace_on_panic, + CTLFLAG_RW | CTLFLAG_SECURE | CTLFLAG_TUN, + &trace_on_panic, 0, "Print stack trace on kernel panic"); TUNABLE_INT("debug.trace_on_panic", &trace_on_panic); #endif /* KDB */ From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 08:28:16 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C99FA106566C; Mon, 2 Jul 2012 08:28:16 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6E8D8FC0C; Mon, 2 Jul 2012 08:28:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q628SGiI057927; Mon, 2 Jul 2012 08:28:16 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q628SGkc057925; Mon, 2 Jul 2012 08:28:16 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020828.q628SGkc057925@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 08:28:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237980 - stable/9/usr.bin/fetch X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:28:17 -0000 Author: obrien Date: Mon Jul 2 08:28:16 2012 New Revision: 237980 URL: http://svn.freebsd.org/changeset/base/237980 Log: MFC: r232274: Document fetch(1)'s 'URL' argument. Modified: stable/9/usr.bin/fetch/fetch.1 Directory Properties: stable/9/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/fetch/ (props changed) Modified: stable/9/usr.bin/fetch/fetch.1 ============================================================================== --- stable/9/usr.bin/fetch/fetch.1 Mon Jul 2 08:21:15 2012 (r237979) +++ stable/9/usr.bin/fetch/fetch.1 Mon Jul 2 08:28:16 2012 (r237980) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2000-2011 Dag-Erling Smørgrav +.\" Copyright (c) 2000-2012 Dag-Erling Smørgrav .\" All rights reserved. .\" Portions Copyright (c) 1999 Massachusetts Institute of Technology; used .\" by permission. @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2011 +.Dd February 28, 2012 .Dt FETCH 1 .Os .Sh NAME @@ -214,6 +214,11 @@ When the flag is specified, wait this many seconds between successive retries. .El .Pp +.Ar URL +.Bd -literal + :(//((:)?@)?(:)?)?/()? +.Ed +.Pp If .Nm receives a From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 08:48:59 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3607D1065672; Mon, 2 Jul 2012 08:48:59 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 021E48FC15; Mon, 2 Jul 2012 08:48:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q628mwXk058927; Mon, 2 Jul 2012 08:48:58 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q628mwEE058912; Mon, 2 Jul 2012 08:48:58 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020848.q628mwEE058912@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 08:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237983 - in stable/9: contrib/file contrib/file/Magdir contrib/file/tests lib/libmagic usr.bin/file X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 08:48:59 -0000 Author: obrien Date: Mon Jul 2 08:48:58 2012 New Revision: 237983 URL: http://svn.freebsd.org/changeset/base/237983 Log: MFC: r234449: update file(1) to version 5.11. Added: stable/9/contrib/file/Magdir/assembler - copied unchanged from r234449, head/contrib/file/Magdir/assembler stable/9/contrib/file/Magdir/blcr - copied unchanged from r234449, head/contrib/file/Magdir/blcr stable/9/contrib/file/Magdir/bsi - copied unchanged from r234449, head/contrib/file/Magdir/bsi stable/9/contrib/file/Magdir/cups - copied unchanged from r234449, head/contrib/file/Magdir/cups stable/9/contrib/file/Magdir/ebml - copied unchanged from r234449, head/contrib/file/Magdir/ebml stable/9/contrib/file/Magdir/fusecompress - copied unchanged from r234449, head/contrib/file/Magdir/fusecompress stable/9/contrib/file/Magdir/geo - copied unchanged from r234449, head/contrib/file/Magdir/geo stable/9/contrib/file/Magdir/guile - copied unchanged from r234449, head/contrib/file/Magdir/guile stable/9/contrib/file/Magdir/isz - copied unchanged from r234449, head/contrib/file/Magdir/isz stable/9/contrib/file/Magdir/m4 - copied unchanged from r234449, head/contrib/file/Magdir/m4 stable/9/contrib/file/Magdir/make - copied unchanged from r234449, head/contrib/file/Magdir/make stable/9/contrib/file/Magdir/marc21 - copied unchanged from r234449, head/contrib/file/Magdir/marc21 stable/9/contrib/file/Magdir/metastore - copied unchanged from r234449, head/contrib/file/Magdir/metastore stable/9/contrib/file/Magdir/msooxml - copied unchanged from r234449, head/contrib/file/Magdir/msooxml stable/9/contrib/file/Magdir/music - copied unchanged from r234449, head/contrib/file/Magdir/music stable/9/contrib/file/Magdir/oasis - copied unchanged from r234449, head/contrib/file/Magdir/oasis stable/9/contrib/file/Magdir/parrot - copied unchanged from r234449, head/contrib/file/Magdir/parrot stable/9/contrib/file/Magdir/pascal - copied unchanged from r234449, head/contrib/file/Magdir/pascal stable/9/contrib/file/Magdir/rinex - copied unchanged from r234449, head/contrib/file/Magdir/rinex stable/9/contrib/file/Magdir/selinux - copied unchanged from r234449, head/contrib/file/Magdir/selinux stable/9/contrib/file/Magdir/sisu - copied unchanged from r234449, head/contrib/file/Magdir/sisu stable/9/contrib/file/Magdir/smile - copied unchanged from r234449, head/contrib/file/Magdir/smile stable/9/contrib/file/Magdir/ssh - copied unchanged from r234449, head/contrib/file/Magdir/ssh stable/9/contrib/file/Magdir/ssl - copied unchanged from r234449, head/contrib/file/Magdir/ssl stable/9/contrib/file/Magdir/tcl - copied unchanged from r234449, head/contrib/file/Magdir/tcl stable/9/contrib/file/Magdir/virtual - copied unchanged from r234449, head/contrib/file/Magdir/virtual stable/9/contrib/file/Magdir/wsdl - copied unchanged from r234449, head/contrib/file/Magdir/wsdl stable/9/contrib/file/Magdir/zfs - copied unchanged from r234449, head/contrib/file/Magdir/zfs stable/9/contrib/file/getline.c - copied unchanged from r234449, head/contrib/file/getline.c Deleted: stable/9/contrib/file/Magdir/alpha stable/9/contrib/file/Magdir/psion stable/9/contrib/file/patchlevel.h Modified: stable/9/contrib/file/ChangeLog stable/9/contrib/file/Header stable/9/contrib/file/INSTALL stable/9/contrib/file/Magdir/acorn stable/9/contrib/file/Magdir/adi stable/9/contrib/file/Magdir/adventure stable/9/contrib/file/Magdir/allegro stable/9/contrib/file/Magdir/alliant stable/9/contrib/file/Magdir/amanda stable/9/contrib/file/Magdir/amigaos stable/9/contrib/file/Magdir/animation stable/9/contrib/file/Magdir/apl stable/9/contrib/file/Magdir/apple stable/9/contrib/file/Magdir/applix stable/9/contrib/file/Magdir/archive stable/9/contrib/file/Magdir/asterix stable/9/contrib/file/Magdir/att3b stable/9/contrib/file/Magdir/audio stable/9/contrib/file/Magdir/basis stable/9/contrib/file/Magdir/bflt stable/9/contrib/file/Magdir/blender stable/9/contrib/file/Magdir/blit stable/9/contrib/file/Magdir/bout stable/9/contrib/file/Magdir/bsdi stable/9/contrib/file/Magdir/btsnoop stable/9/contrib/file/Magdir/c-lang stable/9/contrib/file/Magdir/c64 stable/9/contrib/file/Magdir/cad stable/9/contrib/file/Magdir/cafebabe stable/9/contrib/file/Magdir/cddb stable/9/contrib/file/Magdir/chord stable/9/contrib/file/Magdir/cisco stable/9/contrib/file/Magdir/citrus stable/9/contrib/file/Magdir/clarion stable/9/contrib/file/Magdir/claris stable/9/contrib/file/Magdir/clipper stable/9/contrib/file/Magdir/commands stable/9/contrib/file/Magdir/communications stable/9/contrib/file/Magdir/compress stable/9/contrib/file/Magdir/console stable/9/contrib/file/Magdir/convex stable/9/contrib/file/Magdir/cracklib stable/9/contrib/file/Magdir/ctags stable/9/contrib/file/Magdir/dact stable/9/contrib/file/Magdir/database stable/9/contrib/file/Magdir/diamond stable/9/contrib/file/Magdir/diff stable/9/contrib/file/Magdir/digital stable/9/contrib/file/Magdir/dolby stable/9/contrib/file/Magdir/dump stable/9/contrib/file/Magdir/dyadic stable/9/contrib/file/Magdir/editors stable/9/contrib/file/Magdir/efi stable/9/contrib/file/Magdir/elf stable/9/contrib/file/Magdir/encore stable/9/contrib/file/Magdir/epoc stable/9/contrib/file/Magdir/erlang stable/9/contrib/file/Magdir/esri stable/9/contrib/file/Magdir/fcs stable/9/contrib/file/Magdir/filesystems stable/9/contrib/file/Magdir/flash stable/9/contrib/file/Magdir/fonts stable/9/contrib/file/Magdir/fortran stable/9/contrib/file/Magdir/frame stable/9/contrib/file/Magdir/freebsd stable/9/contrib/file/Magdir/fsav stable/9/contrib/file/Magdir/games stable/9/contrib/file/Magdir/gcc stable/9/contrib/file/Magdir/geos stable/9/contrib/file/Magdir/gimp stable/9/contrib/file/Magdir/gnome-keyring stable/9/contrib/file/Magdir/gnu stable/9/contrib/file/Magdir/gnumeric stable/9/contrib/file/Magdir/grace stable/9/contrib/file/Magdir/graphviz stable/9/contrib/file/Magdir/gringotts stable/9/contrib/file/Magdir/hitachi-sh stable/9/contrib/file/Magdir/hp stable/9/contrib/file/Magdir/human68k stable/9/contrib/file/Magdir/ibm370 stable/9/contrib/file/Magdir/ibm6000 stable/9/contrib/file/Magdir/iff stable/9/contrib/file/Magdir/images stable/9/contrib/file/Magdir/inform stable/9/contrib/file/Magdir/intel stable/9/contrib/file/Magdir/interleaf stable/9/contrib/file/Magdir/island stable/9/contrib/file/Magdir/ispell stable/9/contrib/file/Magdir/java stable/9/contrib/file/Magdir/jpeg stable/9/contrib/file/Magdir/karma stable/9/contrib/file/Magdir/kde stable/9/contrib/file/Magdir/kml stable/9/contrib/file/Magdir/lecter stable/9/contrib/file/Magdir/lex stable/9/contrib/file/Magdir/lif stable/9/contrib/file/Magdir/linux stable/9/contrib/file/Magdir/lisp stable/9/contrib/file/Magdir/llvm stable/9/contrib/file/Magdir/lua stable/9/contrib/file/Magdir/luks stable/9/contrib/file/Magdir/mach stable/9/contrib/file/Magdir/macintosh stable/9/contrib/file/Magdir/magic stable/9/contrib/file/Magdir/mail.news stable/9/contrib/file/Magdir/maple stable/9/contrib/file/Magdir/mathcad stable/9/contrib/file/Magdir/mathematica stable/9/contrib/file/Magdir/matroska stable/9/contrib/file/Magdir/mcrypt stable/9/contrib/file/Magdir/mercurial stable/9/contrib/file/Magdir/mime stable/9/contrib/file/Magdir/mips stable/9/contrib/file/Magdir/mirage stable/9/contrib/file/Magdir/misctools stable/9/contrib/file/Magdir/mkid stable/9/contrib/file/Magdir/mlssa stable/9/contrib/file/Magdir/mmdf stable/9/contrib/file/Magdir/modem stable/9/contrib/file/Magdir/motorola stable/9/contrib/file/Magdir/mozilla stable/9/contrib/file/Magdir/msdos stable/9/contrib/file/Magdir/msvc stable/9/contrib/file/Magdir/mup stable/9/contrib/file/Magdir/natinst stable/9/contrib/file/Magdir/ncr stable/9/contrib/file/Magdir/netbsd stable/9/contrib/file/Magdir/netscape stable/9/contrib/file/Magdir/netware stable/9/contrib/file/Magdir/news stable/9/contrib/file/Magdir/nitpicker stable/9/contrib/file/Magdir/ocaml stable/9/contrib/file/Magdir/octave stable/9/contrib/file/Magdir/ole2compounddocs stable/9/contrib/file/Magdir/olf stable/9/contrib/file/Magdir/os2 stable/9/contrib/file/Magdir/os400 stable/9/contrib/file/Magdir/os9 stable/9/contrib/file/Magdir/osf1 stable/9/contrib/file/Magdir/palm stable/9/contrib/file/Magdir/parix stable/9/contrib/file/Magdir/pbm stable/9/contrib/file/Magdir/pdf stable/9/contrib/file/Magdir/pdp stable/9/contrib/file/Magdir/perl stable/9/contrib/file/Magdir/pgp stable/9/contrib/file/Magdir/pkgadd stable/9/contrib/file/Magdir/plan9 stable/9/contrib/file/Magdir/plus5 stable/9/contrib/file/Magdir/printer stable/9/contrib/file/Magdir/project stable/9/contrib/file/Magdir/psdbms stable/9/contrib/file/Magdir/pulsar stable/9/contrib/file/Magdir/pyramid stable/9/contrib/file/Magdir/python stable/9/contrib/file/Magdir/revision stable/9/contrib/file/Magdir/riff stable/9/contrib/file/Magdir/rpm stable/9/contrib/file/Magdir/rtf stable/9/contrib/file/Magdir/ruby stable/9/contrib/file/Magdir/sc stable/9/contrib/file/Magdir/sccs stable/9/contrib/file/Magdir/scientific stable/9/contrib/file/Magdir/securitycerts stable/9/contrib/file/Magdir/sendmail stable/9/contrib/file/Magdir/sequent stable/9/contrib/file/Magdir/sgi stable/9/contrib/file/Magdir/sgml stable/9/contrib/file/Magdir/sharc stable/9/contrib/file/Magdir/sinclair stable/9/contrib/file/Magdir/sketch stable/9/contrib/file/Magdir/smalltalk stable/9/contrib/file/Magdir/sniffer stable/9/contrib/file/Magdir/softquad stable/9/contrib/file/Magdir/spec stable/9/contrib/file/Magdir/spectrum stable/9/contrib/file/Magdir/sql stable/9/contrib/file/Magdir/sun stable/9/contrib/file/Magdir/sysex stable/9/contrib/file/Magdir/teapot stable/9/contrib/file/Magdir/terminfo stable/9/contrib/file/Magdir/tex stable/9/contrib/file/Magdir/tgif stable/9/contrib/file/Magdir/ti-8x stable/9/contrib/file/Magdir/timezone stable/9/contrib/file/Magdir/troff stable/9/contrib/file/Magdir/tuxedo stable/9/contrib/file/Magdir/typeset stable/9/contrib/file/Magdir/unicode stable/9/contrib/file/Magdir/unknown stable/9/contrib/file/Magdir/uuencode stable/9/contrib/file/Magdir/varied.out stable/9/contrib/file/Magdir/varied.script stable/9/contrib/file/Magdir/vax stable/9/contrib/file/Magdir/vicar stable/9/contrib/file/Magdir/virtutech stable/9/contrib/file/Magdir/visx stable/9/contrib/file/Magdir/vms stable/9/contrib/file/Magdir/vmware stable/9/contrib/file/Magdir/vorbis stable/9/contrib/file/Magdir/vxl stable/9/contrib/file/Magdir/warc stable/9/contrib/file/Magdir/weak stable/9/contrib/file/Magdir/windows stable/9/contrib/file/Magdir/wireless stable/9/contrib/file/Magdir/wordprocessors stable/9/contrib/file/Magdir/xdelta stable/9/contrib/file/Magdir/xenix stable/9/contrib/file/Magdir/xilinx stable/9/contrib/file/Magdir/xo65 stable/9/contrib/file/Magdir/xwindows stable/9/contrib/file/Magdir/zilog stable/9/contrib/file/Magdir/zyxel stable/9/contrib/file/Makefile.am stable/9/contrib/file/Makefile.am-src stable/9/contrib/file/Makefile.in stable/9/contrib/file/README stable/9/contrib/file/TODO stable/9/contrib/file/acinclude.m4 stable/9/contrib/file/aclocal.m4 stable/9/contrib/file/apprentice.c stable/9/contrib/file/apptype.c stable/9/contrib/file/ascmagic.c stable/9/contrib/file/asprintf.c stable/9/contrib/file/cdf.c stable/9/contrib/file/cdf.h stable/9/contrib/file/cdf_time.c stable/9/contrib/file/compile stable/9/contrib/file/compress.c stable/9/contrib/file/config.h.in stable/9/contrib/file/configure stable/9/contrib/file/configure.ac stable/9/contrib/file/elfclass.h stable/9/contrib/file/encoding.c stable/9/contrib/file/file.c stable/9/contrib/file/file.h stable/9/contrib/file/file.man stable/9/contrib/file/file_opts.h stable/9/contrib/file/fsmagic.c stable/9/contrib/file/funcs.c stable/9/contrib/file/install-sh stable/9/contrib/file/is_tar.c stable/9/contrib/file/libmagic.man stable/9/contrib/file/magic.c stable/9/contrib/file/magic.h stable/9/contrib/file/magic.man stable/9/contrib/file/print.c stable/9/contrib/file/readcdf.c stable/9/contrib/file/readelf.c stable/9/contrib/file/readelf.h stable/9/contrib/file/softmagic.c stable/9/contrib/file/tar.h stable/9/contrib/file/tests/Makefile.am stable/9/contrib/file/tests/Makefile.in stable/9/contrib/file/vasprintf.c stable/9/lib/libmagic/Makefile stable/9/lib/libmagic/config.h stable/9/usr.bin/file/Makefile Directory Properties: stable/9/ (props changed) stable/9/contrib/file/ (props changed) stable/9/lib/ (props changed) stable/9/usr.bin/ (props changed) Modified: stable/9/contrib/file/ChangeLog ============================================================================== --- stable/9/contrib/file/ChangeLog Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/ChangeLog Mon Jul 2 08:48:58 2012 (r237983) @@ -1,3 +1,309 @@ +2012-02-20 17:33 Christos Zoulas + + * Fix CDF parsing issues found by CERT's fuzzing tool (Will Dormann) + +2011-12-15 12:17 Chris Metcalf + + * Support Tilera architectures (tile64, tilepro, tilegx). + +2011-12-16 16:33 Reuben Thomas + + * Add magic for /usr/bin/env Perl scripts + * Weaken generic script magic to avoid clashing with + language-specific magic. + +2011-12-08 13:37 Reuben Thomas + + * Simplify if (p) free(p) to free(p). + +2011-12-08 13:07 Reuben Thomas + + * Remove hardwired token finding (names.h), turning it into soft + magic. Patterns are either anchored regexs or search/8192. English + language detection and PL/1 detection have been removed as they + were too fragile. -e tokens is still accepted for backwards + compatibility. + * Move 3ds patterns (which are commented out anyway) into autodesk + (they were, oddly, in c-lang). + +2011-12-06 00:16 Reuben Thomas + + * Tweak strength of generic hash-bang detectors to be less than + specific ones. + * Make an inconsistent description of Python scripts consistent. + +2011-12-05 23:58 Reuben Thomas + + * Fix minor error in file(1). + +2011-11-05 00:00 Reuben Thomas + + * Fix issue #150 (I hope). + +2011-09-22 12:57 Christos Zoulas + + * Python3 binding fixes from Kelly Anderson + +2011-09-20 11:32 Christos Zoulas + + * If a string type magic entry is marked as text or binary + only match text files against text entries and binary + files against binary entries. + +2011-09-01 12:12 Christos Zoulas + + * Don't wait for any subprocess, just the one we forked. + +2011-08-26 16:40 Christos Zoulas + + * If the application name is not set in a cdf file, try to see + if it has a directory with the application name on it. + +2011-08-17 14:32 Christos Zoulas + + * Fix ELF lseek(2) madness. Inspired by PR/134 by Jan Kaluza + +2011-08-14 09:03 Christos Zoulas + + * Don't use variable string formats. + +2011-07-12 12:32 Reuben Thomas + + * Fix detection of Zip files (Mantis #128). + * Make some minor improvements to file(1). + * Rename MIME types for filesystem objects for consistency with + xdg-utils. Typically this means that application/x-foo becomes + inode/foo, but some names also change slightly, e.g. + application/x-character-device becomes inode/chardevice. + +2011-05-10 20:57 Christos Zoulas + + * fix mingw compilation (Abradoks) + +2011-05-10 20:57 Christos Zoulas + + * remove patchlevel.h + * Fix read past allocated memory caused by double-incrementing + a pointer in a loop (reported by Roberto Maar) + +2011-03-30 15:45 Christos Zoulas + + * Fix cdf string buffer setting (Sven Anders) + +2011-03-20 16:35 Christos Zoulas + + * Eliminate MAXPATHLEN and use dynamic allocation for + path and file buffers. + +2011-03-15 18:15 Christos Zoulas + + * binary tests on magic entries with masks could spuriously + get converted to ascii. + +2011-03-12 18:06 Reuben Thomas + + * Improve file.man (remove BUGS, present email addresses consistently). + +2011-03-07 19:38 Christos Zoulas + + * add lrzip support (from Ville Skytta) + +2011-02-10 16:36 Christos Zoulas + + * fix CDF bounds checking (Guy Helmer) + +2011-02-10 12:03 Christos Zoulas + + * add cdf_ctime() that prints a meaningful error when time cannot + be converted. + +2011-02-02 20:40 Christos Zoulas + + * help and version output to stdout. + + * When matching softmagic for ascii files, don't just print + the softmagic classification, keep going and print the + text classification too. This fixes broken troff files when + we moved them from keyword recognition to softmagic + (they stopped printing "with CRLF" etc.) + Reported by Doug McIlroy. + +2011-01-16 19:31 Reuben Thomas + + * Fix two potential buffer overruns in apprentice_list. + +2011-01-14 22:33 Reuben Thomas + + * New Python binding in pure Python. + * Update libmagic(3). + +2011-01-06 21:40 Reuben Thomas + + * Fix Python bindings (including recent Python 3 compatibility + update). + +2011-01-04 18:43 Reuben Thomas + + * magic/Makefile.am: make it easier to recover from magic build failures. + * Fix pstring length specifier parsing to avoid generating invalid + magic files. + * Add pstring length "J" (for "JPEG") to specify that the length + include itself. + * Fix JPEG comment parsing at last using pstring/HJ! + * Ignore section 5 man pages in doc/.cvsignore. + +2010-12-22 13:12 Christos Zoulas + + * Add pstring/BHhLl to specify the type of the length of pascal + strings. + +2010-11-26 18:39 Reuben Thomas + + * Fix "-e soft": it was ignored when softmagic was called + during asciimagic. + * Improve comments and use "unsigned char" in tar.h/is_tar.c. + +2010-11-05 17:26 Reuben Thomas + + * Make bug reporting addresses more visible. + +2010-11-01 18:35 Reuben Thomas + + * Add tcl magic from Gustaf Neumann + +2010-10-24 10:42 Christos Zoulas + + * Fix the whitespace comparing code (Christopher Chittleborough) + +2010-10-06 21:05 Christos Zoulas + + * allow string/t to work (Jan Kaluza) + +2010-09-20 22:11 Reuben Thomas + + * Apply some patches from Ubuntu and Fedora. + +2010-09-20 21:16 Reuben Thomas + + * Apply all patches from Debian package 5.04-6 which have not + already been applied and are not Debian-specific. + +2010-09-20 15:24 Reuben Thomas + + * Minor security fix to softmagic.c (don't use untrusted + string as printf format). + +2010-07-21 12:20 Christos Zoulas + + * MINGW32 portability from LRN + + * Don't warn about escaping magic regex chars when we are in a regex. + +2010-07-19 10:55 Christos Zoulas + + * Only try to print prpsinfo for core files. (Jan Kaluza) + +2010-04-22 12:55 Christos Zoulas + + * Try more elf offsets for Debian core files. (Arnaud Giersch) + +2010-02-20 15:18 Reuben Thomas + + * Clarify which sort of CDF we mean. + +2010-02-14 22:58 Reuben Thomas + + * Re-jig Zip file type magic so that unsupported special + Zip types (those with "mimetype" at offset 30) can be + recognized. + +2010-02-02 21:50 Reuben Thomas + + * Add support for OCF (EPUB) files (application/epub+zip) + +2010-01-28 18:25 Christos Zoulas + + * Fix core-dump from unbound loop: + https://bugzilla.redhat.com/show_bug.cgi?id=533245 + +2010-01-22 15:45 Christos Zoulas + + * print proper mime for crystal reports file + + * print the last summary information of a cdf document, not the + first so that nested documents print the right info + +2010-01-16 18:42 Charles Longeau + + * bring back some fixes from OpenBSD: + - make gcc2 builds file + - fix typos in a magic file comment + +2009-11-17 18:35 Christos Zoulas + + * ctime/asctime can return NULL on some OS's although + they should not (Toshit Antani) + +2009-09-14 13:49 Christos Zoulas + + * Centralize magic path handling routines and remove the + special-casing from file.c so that the python module for + example comes up with the same magic path (Fixes ~/.magic + handling) (from Gab) + +2009-09-11 23:38 Reuben Thomas + + * When magic argument is a directory, read the files in + strcmp-sorted order (fixes Debian bug #488562 and our own FIXME). + +2009-09-11 13:11 Reuben Thomas + + * Combine overlapping epoc and psion magic files into one (epoc). + + * Add some more EPOC MIME types. + +2009-08-19 15:55 Christos Zoulas + + * Fix 3 bugs (From Ian Darwin): + - file_showstr could move one past the end of the array + - parse_apple did not nul terminate the string in the overflow case + - parse_mime truncated the wrong string in the overflow case + +2009-08-12 12:28 Robert Byrnes + + * Include Localstuff when compiling magic. + +2009-07-15 10:05 Christos Zoulas + + * Fix logic for including mygetopts.h + + * Make cdf.c compile again with debugging + + * Add the necessary field handling for crystal reports files to work + +2009-06-23 01:34 Reuben Thomas + + * Stop "(if" identifying Lisp files, that's plain dumb! + +2009-06-09 22:13 Reuben Thomas + + * Add a couple of missing MP3 MIME types. + +2009-05-27 23:00 Reuben Thomas + + * Add full range of hash-bang tests for Python and Ruby. + + * Add MIME types for Python and Ruby scripts. + +2009-05-13 10:44 Christos Zoulas + + * off by one in parsing hw capabilities in elf + (Cheng Renquan) + +2009-05-08 13:40 Christos Zoulas + + * lint fixes and more from NetBSD + 2009-05-06 10:25 Christos Zoulas * Avoid null dereference in cdf code (Drew Yao) Modified: stable/9/contrib/file/Header ============================================================================== --- stable/9/contrib/file/Header Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Header Mon Jul 2 08:48:58 2012 (r237983) @@ -1,5 +1,5 @@ -# Magic # Magic data for file(1) command. -# Machine-generated from src/cmd/file/magdir/*; edit there only! # Format is described in magic(files), where: -# files is 5 on V7 and BSD, 4 on SV, and ?? in the SVID. +# files is 5 on V7 and BSD, 4 on SV, and ?? on SVID. +# Don't edit this file, edit /etc/magic or send your magic improvements +# to the maintainers, at file@mx.gw.com Modified: stable/9/contrib/file/INSTALL ============================================================================== --- stable/9/contrib/file/INSTALL Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/INSTALL Mon Jul 2 08:48:58 2012 (r237983) @@ -2,18 +2,24 @@ Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. +2006, 2007, 2008, 2009 Free Software Foundation, Inc. -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. Basic Installation ================== -Briefly, the shell commands `./configure; make; make install' should + Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for -instructions specific to this package. +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -42,7 +48,7 @@ may remove or edit it. you want to change it or regenerate `configure' using a newer version of `autoconf'. -The simplest way to compile this package is: + The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. @@ -53,12 +59,22 @@ The simplest way to compile this package 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. - 5. You can remove the program binaries and object files from the + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -67,12 +83,22 @@ The simplest way to compile this package all sorts of other programs in order to regenerate files that came with the distribution. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + Compilers and Options ===================== -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here @@ -85,25 +111,41 @@ is an example: Compiling For Multiple Architectures ==================================== -You can compile the package for more than one kind of computer at the + You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + Installation Names ================== -By default, `make install' installs the package's commands under + By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you @@ -114,16 +156,47 @@ Documentation and other data files still In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to + Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -135,14 +208,53 @@ find the X include and library files aut you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + Specifying the System Type ========================== -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: @@ -150,7 +262,8 @@ type, such as `sun4', or a canonical nam where SYSTEM can have one of these forms: - OS KERNEL-OS + OS + KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't @@ -168,9 +281,9 @@ eventually be run) with `--host=TYPE'. Sharing Defaults ================ -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. @@ -179,7 +292,7 @@ A warning: not all `configure' scripts l Defining Variables ================== -Variables not defined in a site shell script can be set in the + Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set @@ -198,11 +311,19 @@ an Autoconf bug. Until the bug is fixed `configure' Invocation ====================== -`configure' recognizes the following options to control how it operates. + `configure' recognizes the following options to control how it +operates. `--help' `-h' - Print a summary of the options to `configure', and exit. + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. `--version' `-V' @@ -229,6 +350,16 @@ an Autoconf bug. Until the bug is fixed Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. Modified: stable/9/contrib/file/Magdir/acorn ============================================================================== --- stable/9/contrib/file/Magdir/acorn Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/acorn Mon Jul 2 08:48:58 2012 (r237983) @@ -1,4 +1,6 @@ + #------------------------------------------------------------------------------ +# $File: acorn,v 1.5 2009/09/19 16:28:07 christos Exp $ # acorn: file(1) magic for files found on Acorn systems # Modified: stable/9/contrib/file/Magdir/adi ============================================================================== --- stable/9/contrib/file/Magdir/adi Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/adi Mon Jul 2 08:48:58 2012 (r237983) @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------ +# $File: adi,v 1.4 2009/09/19 16:28:07 christos Exp $ # adi: file(1) magic for ADi's objects # From Gregory McGarry # Modified: stable/9/contrib/file/Magdir/adventure ============================================================================== --- stable/9/contrib/file/Magdir/adventure Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/adventure Mon Jul 2 08:48:58 2012 (r237983) @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------ +# $File: adventure,v 1.13 2010/12/31 16:32:54 christos Exp $ # adventure: file(1) magic for Adventure game files # # from Allen Garvin @@ -16,18 +17,26 @@ # Infocom (see z-machine) #------------------------------------------------------------------------------ # Z-machine: file(1) magic for Z-machine binaries. +# Updated by Adam Buchbinder # -# This will match ${TEX_BASE}/texmf/omega/ocp/char2uni/inbig5.ocp which -# appears to be a version-0 Z-machine binary. -# -# The (false match) message is to correct that behavior. Perhaps it is -# not needed. -# -16 belong&0xfe00f0f0 0x3030 Infocom game data ->0 ubyte 0 (false match) ->0 ubyte >0 (Z-machine %d, ->>2 ubeshort x Release %d / ->>18 string >\0 Serial %.6s) +#http://www.gnelson.demon.co.uk/zspec/sect11.html +#http://www.jczorkmid.net/~jpenney/ZSpec11-latest.txt +#http://en.wikipedia.org/wiki/Z-machine +# The first byte is the Z-machine revision; it is always between 1 and 8. We +# had false matches (for instance, inbig5.ocp from the Omega TeX extension as +# well as an occasional MP3 file), so we sanity-check the version number. +# +# It might be possible to sanity-check the release number as well, as it seems +# (at least in classic Infocom games) to always be a relatively small number, +# always under 150 or so, but as this isn't rigorous, we'll wait on that until +# it becomes clear that it's needed. +# +0 ubyte >0 +>0 ubyte <9 +>>16 belong&0xfe00f0f0 0x3030 Infocom game data +>>>0 ubyte x (Z-machine %d, +>>>>2 ubeshort x Release %d / +>>>>18 string >\0 Serial %.6s) #------------------------------------------------------------------------------ # Glulx: file(1) magic for Glulx binaries. @@ -45,10 +54,9 @@ # For Quetzal and blorb magic see iff -# TADS (Text Adventure Development System) +# TADS (Text Adventure Development System) version 2 # All files are machine-independent (games compile to byte-code) and are tagged -# with a version string of the form "V2..\0" (but TADS 3 is -# on the way). +# with a version string of the form "V2..\0". # Game files start with "TADS2 bin\n\r\032\0" then the compiler version. 0 string TADS2\ bin TADS >9 belong !0x0A0D1A00 game data, CORRUPTED @@ -73,6 +81,19 @@ >10 belong 0x0A0D1A00 >>14 string >\0 %s saved game data +# TADS (Text Adventure Development System) version 3 +# Game files start with "T3-image\015\012\032" +0 string T3-image\015\012\032 +>11 leshort x TADS 3 game data (format version %d) +# Saved game files start with "T3-state-v####\015\012\032" +# where #### is a format version number +0 string T3-state-v +>14 string \015\012\032 TADS 3 saved game data (format version +>>10 byte x %c +>>11 byte x \b%c +>>12 byte x \b%c +>>13 byte x \b%c) + # Danny Milosavljevic # this are adrift (adventure game standard) game files, extension .taf # depending on version magic continues with 0x93453E6139FA (V 4.0) Modified: stable/9/contrib/file/Magdir/allegro ============================================================================== --- stable/9/contrib/file/Magdir/allegro Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/allegro Mon Jul 2 08:48:58 2012 (r237983) @@ -1,4 +1,6 @@ + #------------------------------------------------------------------------------ +# $File: allegro,v 1.4 2009/09/19 16:28:07 christos Exp $ # allegro: file(1) magic for Allegro datafiles # Toby Deshane # Modified: stable/9/contrib/file/Magdir/alliant ============================================================================== --- stable/9/contrib/file/Magdir/alliant Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/alliant Mon Jul 2 08:48:58 2012 (r237983) @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------ +# $File: alliant,v 1.7 2009/09/19 16:28:07 christos Exp $ # alliant: file(1) magic for Alliant FX series a.out files # # If the FX series is the one that had a processor with a 68K-derived Modified: stable/9/contrib/file/Magdir/amanda ============================================================================== --- stable/9/contrib/file/Magdir/amanda Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/amanda Mon Jul 2 08:48:58 2012 (r237983) @@ -1,4 +1,6 @@ + #------------------------------------------------------------------------------ +# $File: amanda,v 1.5 2009/09/19 16:28:07 christos Exp $ # amanda: file(1) magic for amanda file format # 0 string AMANDA:\ AMANDA Modified: stable/9/contrib/file/Magdir/amigaos ============================================================================== --- stable/9/contrib/file/Magdir/amigaos Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/amigaos Mon Jul 2 08:48:58 2012 (r237983) @@ -1,4 +1,6 @@ + #------------------------------------------------------------------------------ +# $File: amigaos,v 1.14 2009/09/19 16:28:07 christos Exp $ # amigaos: file(1) magic for AmigaOS binary formats: # Modified: stable/9/contrib/file/Magdir/animation ============================================================================== --- stable/9/contrib/file/Magdir/animation Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/animation Mon Jul 2 08:48:58 2012 (r237983) @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------ +# $File: animation,v 1.45 2011/09/06 11:00:06 christos Exp $ # animation: file(1) magic for animation/movie formats # # animation formats @@ -29,7 +30,7 @@ #!:mime image/x-quicktime 4 string pckg Apple QuickTime compressed archive !:mime application/x-quicktime-player -4 string/B jP JPEG 2000 image +4 string/W jP JPEG 2000 image !:mime image/jp2 4 string ftyp ISO Media >8 string isom \b, MPEG v4 system, version 1 @@ -41,10 +42,18 @@ !:mime video/mp4 >8 string mp7t \b, MPEG v4 system, MPEG v7 XML >8 string mp7b \b, MPEG v4 system, MPEG v7 binary XML ->8 string/B jp2 \b, JPEG 2000 +>8 string/W jp2 \b, JPEG 2000 !:mime image/jp2 +>8 string 3ge \b, MPEG v4 system, 3GPP +!:mime video/3gpp +>8 string 3gg \b, MPEG v4 system, 3GPP +!:mime video/3gpp >8 string 3gp \b, MPEG v4 system, 3GPP !:mime video/3gpp +>8 string 3gs \b, MPEG v4 system, 3GPP +!:mime video/3gpp +>8 string 3g2 \b, MPEG v4 system, 3GPP2 +!:mime video/3gpp2 >>11 byte 4 \b v4 (H.263/AMR GSM 6.10) >>11 byte 5 \b v5 (H.263/AMR GSM 6.10) >>11 byte 6 \b v6 (ITU H.264/AMR GSM 6.10) @@ -52,13 +61,13 @@ !:mime video/mp4 >8 string avc1 \b, MPEG v4 system, 3GPP JVT AVC !:mime video/3gpp ->8 string/B M4A \b, MPEG v4 system, iTunes AAC-LC +>8 string/W M4A \b, MPEG v4 system, iTunes AAC-LC !:mime audio/mp4 ->8 string/B M4V \b, MPEG v4 system, iTunes AVC-LC +>8 string/W M4V \b, MPEG v4 system, iTunes AVC-LC !:mime video/mp4 ->8 string/B M4P \b, MPEG v4 system, iTunes AES encrypted ->8 string/B M4B \b, MPEG v4 system, iTunes bookmarked ->8 string/B qt \b, Apple QuickTime movie +>8 string/W M4P \b, MPEG v4 system, iTunes AES encrypted +>8 string/W M4B \b, MPEG v4 system, iTunes bookmarked +>8 string/W qt \b, Apple QuickTime movie !:mime video/quicktime # MPEG sequences @@ -71,6 +80,7 @@ >>7 byte x \b @ L %u 0 belong&0xFFFFFF00 0x00000100 >3 byte 0xBA MPEG sequence +!:mime video/mpeg >>4 byte &0x40 \b, v2, program multiplex >>4 byte ^0x40 \b, v1, system multiplex >3 byte 0xBB MPEG sequence, v1/2, multiplex (missing pack header) @@ -80,6 +90,7 @@ >>4 byte 88 \b, extended >>6 byte x \b @ L %u >3 byte 0xB0 MPEG sequence, v4 +!:mime video/mpeg4-generic >>5 belong 0x000001B5 >>>9 byte &0x80 >>>>10 byte&0xF0 16 \b, video @@ -149,6 +160,7 @@ >>4 byte 252 \b, FGS @ L4 >>4 byte 253 \b, FGS @ L5 >3 byte 0xB5 MPEG sequence, v4 +!:mime video/mpeg4-generic >>4 byte &0x80 >>>5 byte&0xF0 16 \b, video (missing profile header) >>>5 byte&0xF0 32 \b, still texture (missing profile header) @@ -159,6 +171,7 @@ >>4 byte&0xF8 24 \b, mesh (missing profile header) >>4 byte&0xF8 32 \b, face (missing profile header) >3 byte 0xB3 MPEG sequence +!:mime video/mpeg >>12 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video >>12 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video >>12 belong 0x000001B5 \b, v2, @@ -469,6 +482,7 @@ # MPA, M2A 0 beshort&0xFFFE 0xFFF6 MPEG ADTS, layer I, v2 +!:mime audio/mpeg # rate >2 byte&0xF0 0x10 \b, 32 kbps >2 byte&0xF0 0x20 \b, 48 kbps @@ -503,6 +517,7 @@ # MP3, M25A 0 beshort&0xFFFE 0xFFE2 MPEG ADTS, layer III, v2.5 +!:mime audio/mpeg # rate >2 byte&0xF0 0x10 \b, 8 kbps >2 byte&0xF0 0x20 \b, 16 kbps @@ -697,6 +712,7 @@ # Microsoft Advanced Streaming Format (ASF) 0 belong 0x3026b275 Microsoft ASF +!:mime video/x-ms-asf # MNG Video Format, 0 string \x8aMNG MNG video data, @@ -718,16 +734,16 @@ 3 string \x0D\x0AVersion:Vivo Vivo video data # VRML (Virtual Reality Modelling Language) -0 string/b #VRML\ V1.0\ ascii VRML 1 file +0 string/w #VRML\ V1.0\ ascii VRML 1 file !:mime model/vrml -0 string/b #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file +0 string/w #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file !:mime model/vrml # X3D (Extensible 3D) [http://www.web3d.org/specifications/x3d-3.0.dtd] # From Michel Briand -0 string \20 search/1000/cb \20 search/1000/cw \ 2008-07-18 0 string BIK Bink Video >3 regex =[a-z] rev.%s @@ -813,3 +830,66 @@ >>51 byte&0x20 !0 stereo #>>51 byte&0x10 0 FFT #>>51 byte&0x10 !0 DCT + +# Type: NUT Container +# URL: http://wiki.multimedia.cx/index.php?title=NUT +# From: Adam Buchbinder +0 string nut/multimedia\ container\0 NUT multimedia container + +# Type: Nullsoft Video (NSV) +# URL: http://wiki.multimedia.cx/index.php?title=Nullsoft_Video +# From: Mike Melanson +0 string NSVf Nullsoft Video + +# Type: REDCode Video +# URL: http://www.red.com/ ; http://wiki.multimedia.cx/index.php?title=REDCode +# From: Mike Melanson +4 string RED1 REDCode Video + +# Type: MTV Multimedia File +# URL: http://wiki.multimedia.cx/index.php?title=MTV +# From: Mike Melanson +0 string AMVS MTV Multimedia File + +# Type: ARMovie +# URL: http://wiki.multimedia.cx/index.php?title=ARMovie +# From: Mike Melanson +0 string ARMovie\012 ARMovie + +# Type: Interplay MVE Movie +# URL: http://wiki.multimedia.cx/index.php?title=Interplay_MVE +# From: Mike Melanson +0 string Interplay\040MVE\040File\032 Interplay MVE Movie + +# Type: Windows Television DVR File +# URL: http://wiki.multimedia.cx/index.php?title=WTV +# From: Mike Melanson +# This takes the form of a Windows-style GUID +0 bequad 0xB7D800203749DA11 +>8 bequad 0xA64E0007E95EAD8D Windows Television DVR Media + +# Type: Sega FILM/CPK Multimedia +# URL: http://wiki.multimedia.cx/index.php?title=Sega_FILM +# From: Mike Melanson +0 string FILM Sega FILM/CPK Multimedia, +>32 belong x %d x +>28 belong x %d + +# Type: Nintendo THP Multimedia +# URL: http://wiki.multimedia.cx/index.php?title=THP +# From: Mike Melanson +0 string THP\0 Nintendo THP Multimedia + +# Type: BBC Dirac Video +# URL: http://wiki.multimedia.cx/index.php?title=Dirac +# From: Mike Melanson +0 string BBCD BBC Dirac Video + +# Type: RAD Game Tools Smacker Multimedia +# URL: http://wiki.multimedia.cx/index.php?title=Smacker +# From: Mike Melanson +0 string SMK RAD Game Tools Smacker Multimedia +>3 byte x version %c, +>4 lelong x %d x +>8 lelong x %d, +>12 lelong x %d frames Modified: stable/9/contrib/file/Magdir/apl ============================================================================== --- stable/9/contrib/file/Magdir/apl Mon Jul 2 08:41:22 2012 (r237982) +++ stable/9/contrib/file/Magdir/apl Mon Jul 2 08:48:58 2012 (r237983) @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------ +# $File: apl,v 1.6 2009/09/19 16:28:07 christos Exp $ # apl: file(1) magic for APL (see also "pdp" and "vax" for other APL # workspaces) # Modified: stable/9/contrib/file/Magdir/apple ============================================================================== --- stable/9/contrib/file/Magdir/apple Mon Jul 2 08:41:22 2012 (r237982) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 09:25:08 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D58E4106564A; Mon, 2 Jul 2012 09:25:08 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1A598FC19; Mon, 2 Jul 2012 09:25:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q629P8Om060527; Mon, 2 Jul 2012 09:25:08 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q629P8dX060525; Mon, 2 Jul 2012 09:25:08 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020925.q629P8dX060525@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 09:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237984 - stable/9/lib/libmagic X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 09:25:09 -0000 Author: obrien Date: Mon Jul 2 09:25:08 2012 New Revision: 237984 URL: http://svn.freebsd.org/changeset/base/237984 Log: Allow building on FreeBSD 7. Note that "HAVE_GETLINE" should be #undef'ed in config.h as were not using the libc interface -- however that leads to redundant redeclaration compiler warnings between the internal file.h and . Modified: stable/9/lib/libmagic/Makefile Modified: stable/9/lib/libmagic/Makefile ============================================================================== --- stable/9/lib/libmagic/Makefile Mon Jul 2 08:48:58 2012 (r237983) +++ stable/9/lib/libmagic/Makefile Mon Jul 2 09:25:08 2012 (r237984) @@ -13,6 +13,7 @@ MAN= libmagic.3 magic.5 SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \ encoding.c fsmagic.c funcs.c \ is_tar.c magic.c print.c readcdf.c readelf.c softmagic.c +SRCS+= getline.c INCS= magic.h MAGICPATH?= /usr/share/misc From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 09:35:29 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AB80B1065672; Mon, 2 Jul 2012 09:35:29 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DDA98FC15; Mon, 2 Jul 2012 09:35:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q629ZTpG061158; Mon, 2 Jul 2012 09:35:29 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q629ZTUL061155; Mon, 2 Jul 2012 09:35:29 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020935.q629ZTUL061155@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 09:35:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237985 - stable/9/lib/libedit/edit/readline X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 09:35:29 -0000 Author: obrien Date: Mon Jul 2 09:35:28 2012 New Revision: 237985 URL: http://svn.freebsd.org/changeset/base/237985 Log: MFC: r228114 r228116 r234690: install a readline/tilde.h Added: stable/9/lib/libedit/edit/readline/tilde.h - copied unchanged from r234690, head/lib/libedit/edit/readline/tilde.h Modified: stable/9/lib/libedit/edit/readline/Makefile Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libedit/ (props changed) Modified: stable/9/lib/libedit/edit/readline/Makefile ============================================================================== --- stable/9/lib/libedit/edit/readline/Makefile Mon Jul 2 09:25:08 2012 (r237984) +++ stable/9/lib/libedit/edit/readline/Makefile Mon Jul 2 09:35:28 2012 (r237985) @@ -1,7 +1,7 @@ # Copyright (c) 2011 David E O'Brien # $FreeBSD$ -INCS= readline.h history.h +INCS= readline.h history.h tilde.h INCSDIR= ${INCLUDEDIR}/edit/readline Copied: stable/9/lib/libedit/edit/readline/tilde.h (from r234690, head/lib/libedit/edit/readline/tilde.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libedit/edit/readline/tilde.h Mon Jul 2 09:35:28 2012 (r237985, copy of r234690, head/lib/libedit/edit/readline/tilde.h) @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2011 David E. O'Brien + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * 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. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 09:47:39 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F39B106566B; Mon, 2 Jul 2012 09:47:39 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A65E8FC17; Mon, 2 Jul 2012 09:47:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q629ldlo061704; Mon, 2 Jul 2012 09:47:39 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q629ldKa061702; Mon, 2 Jul 2012 09:47:39 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207020947.q629ldKa061702@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 09:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237986 - stable/9/sys/modules/aesni X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 09:47:39 -0000 Author: obrien Date: Mon Jul 2 09:47:38 2012 New Revision: 237986 URL: http://svn.freebsd.org/changeset/base/237986 Log: MFC: r235879: style.Makefile(5) Modified: stable/9/sys/modules/aesni/Makefile Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/modules/aesni/Makefile ============================================================================== --- stable/9/sys/modules/aesni/Makefile Mon Jul 2 09:35:28 2012 (r237985) +++ stable/9/sys/modules/aesni/Makefile Mon Jul 2 09:47:38 2012 (r237986) @@ -4,7 +4,7 @@ KMOD= aesni SRCS= aesni.c aesni_wrap.c -SRCS+= aesencdec_$(MACHINE_CPUARCH).S aeskeys_$(MACHINE_CPUARCH).S +SRCS+= aesencdec_${MACHINE_CPUARCH}.S aeskeys_${MACHINE_CPUARCH}.S SRCS+= device_if.h bus_if.h opt_bus.h cryptodev_if.h .include From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 10:00:28 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A98E1106566C; Mon, 2 Jul 2012 10:00:28 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 955088FC14; Mon, 2 Jul 2012 10:00:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62A0SIB062439; Mon, 2 Jul 2012 10:00:28 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62A0SFV062437; Mon, 2 Jul 2012 10:00:28 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207021000.q62A0SFV062437@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 10:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237989 - stable/9/lib/libstand X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 10:00:28 -0000 Author: obrien Date: Mon Jul 2 10:00:28 2012 New Revision: 237989 URL: http://svn.freebsd.org/changeset/base/237989 Log: MFC: r235939: consitently use "__LP64__" Modified: stable/9/lib/libstand/bswap.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libstand/ (props changed) Modified: stable/9/lib/libstand/bswap.c ============================================================================== --- stable/9/lib/libstand/bswap.c Mon Jul 2 09:53:57 2012 (r237988) +++ stable/9/lib/libstand/bswap.c Mon Jul 2 10:00:28 2012 (r237989) @@ -31,7 +31,7 @@ bswap32(u_int32_t x) u_int64_t bswap64(u_int64_t x) { -#ifdef _LP64 +#ifdef __LP64__ /* * Assume we have wide enough registers to do it without touching * memory. From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 10:06:01 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B3C4106566C; Mon, 2 Jul 2012 10:06:01 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E8998FC08; Mon, 2 Jul 2012 10:06:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62A60Qs062793; Mon, 2 Jul 2012 10:06:00 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62A60uu062790; Mon, 2 Jul 2012 10:06:00 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201207021006.q62A60uu062790@svn.freebsd.org> From: Bruce M Simpson Date: Mon, 2 Jul 2012 10:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237990 - stable/9/sys/netinet6 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 10:06:01 -0000 Author: bms Date: Mon Jul 2 10:06:00 2012 New Revision: 237990 URL: http://svn.freebsd.org/changeset/base/237990 Log: Merge r237734 from HEAD: In MLDv2 general query processing, do not enforce the strict check on query origins. Submitted by: Gu Yong Modified: stable/9/sys/netinet6/mld6.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/netinet6/mld6.c ============================================================================== --- stable/9/sys/netinet6/mld6.c Mon Jul 2 10:00:28 2012 (r237989) +++ stable/9/sys/netinet6/mld6.c Mon Jul 2 10:06:00 2012 (r237990) @@ -866,16 +866,10 @@ mld_v2_input_query(struct ifnet *ifp, co */ if (IN6_IS_ADDR_UNSPECIFIED(&mld->mld_addr)) { /* - * General Queries SHOULD be directed to ff02::1. * A general query with a source list has undefined * behaviour; discard it. */ - struct in6_addr dst; - - dst = ip6->ip6_dst; - in6_clearscope(&dst); - if (!IN6_ARE_ADDR_EQUAL(&dst, &in6addr_linklocal_allnodes) || - nsrc > 0) + if (nsrc > 0) return (EINVAL); is_general_query = 1; } else { From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 10:06:14 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0074106564A; Mon, 2 Jul 2012 10:06:14 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C30F8FC17; Mon, 2 Jul 2012 10:06:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62A6DZo062840; Mon, 2 Jul 2012 10:06:13 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62A6DaB062838; Mon, 2 Jul 2012 10:06:13 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207021006.q62A6DaB062838@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 10:06:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237991 - stable/9/kerberos5 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 10:06:14 -0000 Author: obrien Date: Mon Jul 2 10:06:13 2012 New Revision: 237991 URL: http://svn.freebsd.org/changeset/base/237991 Log: Revert r223540 - it broke the simple 'make -C kerberos5' build. Modified: stable/9/kerberos5/Makefile Modified: stable/9/kerberos5/Makefile ============================================================================== --- stable/9/kerberos5/Makefile Mon Jul 2 10:06:00 2012 (r237990) +++ stable/9/kerberos5/Makefile Mon Jul 2 10:06:13 2012 (r237991) @@ -1,6 +1,6 @@ # $FreeBSD$ -SUBDIR= doc lib libexec usr.bin usr.sbin +SUBDIR= doc tools lib libexec usr.bin usr.sbin # These are the programs which depend on Kerberos. KPROGS= lib/libpam \ From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 10:07:32 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7498106566B; Mon, 2 Jul 2012 10:07:32 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A29978FC0A; Mon, 2 Jul 2012 10:07:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62A7W0s062947; Mon, 2 Jul 2012 10:07:32 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62A7W58062945; Mon, 2 Jul 2012 10:07:32 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201207021007.q62A7W58062945@svn.freebsd.org> From: Bruce M Simpson Date: Mon, 2 Jul 2012 10:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237992 - stable/9/sys/netinet6 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 10:07:32 -0000 Author: bms Date: Mon Jul 2 10:07:32 2012 New Revision: 237992 URL: http://svn.freebsd.org/changeset/base/237992 Log: Merge r237735 from HEAD: Fix a typo in MLD query exponent processing. Submitted by: rpaulo@ Modified: stable/9/sys/netinet6/mld6.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/netinet6/mld6.c ============================================================================== --- stable/9/sys/netinet6/mld6.c Mon Jul 2 10:06:13 2012 (r237991) +++ stable/9/sys/netinet6/mld6.c Mon Jul 2 10:07:32 2012 (r237992) @@ -832,7 +832,7 @@ mld_v2_input_query(struct ifnet *ifp, co mld = (struct mldv2_query *)(mtod(m, uint8_t *) + off); maxdelay = ntohs(mld->mld_maxdelay); /* in 1/10ths of a second */ - if (maxdelay >= 32678) { + if (maxdelay >= 32768) { maxdelay = (MLD_MRC_MANT(maxdelay) | 0x1000) << (MLD_MRC_EXP(maxdelay) + 3); } From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 10:14:13 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00E7F1065672; Mon, 2 Jul 2012 10:14:13 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E07538FC0C; Mon, 2 Jul 2012 10:14:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62AECKB063292; Mon, 2 Jul 2012 10:14:12 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62AECMl063289; Mon, 2 Jul 2012 10:14:12 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207021014.q62AECMl063289@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 10:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237993 - in stable/9/kerberos5: usr.bin/kadmin usr.sbin/ktutil X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 10:14:13 -0000 Author: obrien Date: Mon Jul 2 10:14:12 2012 New Revision: 237993 URL: http://svn.freebsd.org/changeset/base/237993 Log: * Avoid race conditions with 'make -j'. (partially MFC r236337 (in spirit)) Modified: stable/9/kerberos5/usr.bin/kadmin/Makefile stable/9/kerberos5/usr.sbin/ktutil/Makefile Modified: stable/9/kerberos5/usr.bin/kadmin/Makefile ============================================================================== --- stable/9/kerberos5/usr.bin/kadmin/Makefile Mon Jul 2 10:07:32 2012 (r237992) +++ stable/9/kerberos5/usr.bin/kadmin/Makefile Mon Jul 2 10:14:12 2012 (r237993) @@ -38,9 +38,13 @@ LDFLAGS=${LDAPLDFLAGS} .include -kadmin-commands.c kadmin-commands.h: ${KRB5DIR}/kadmin/kadmin-commands.in ../../tools/slc/slc +kadmin-commands.h: ${KRB5DIR}/kadmin/kadmin-commands.in ../../tools/slc/slc ../../tools/slc/slc ${.ALLSRC:M*.in} +.for ext in c o +kadmin-commands.${ext}: kadmin-commands.h +.endfor + ../../tools/slc/slc: cd ${.CURDIR}/../../tools/slc && ${MAKE} Modified: stable/9/kerberos5/usr.sbin/ktutil/Makefile ============================================================================== --- stable/9/kerberos5/usr.sbin/ktutil/Makefile Mon Jul 2 10:07:32 2012 (r237992) +++ stable/9/kerberos5/usr.sbin/ktutil/Makefile Mon Jul 2 10:14:12 2012 (r237993) @@ -25,9 +25,13 @@ LDADD= -lkadm5clnt -lkrb5 -lhx509 ${LIBS .include -ktutil-commands.c ktutil-commands.h: ${KRB5DIR}/admin/ktutil-commands.in ../../tools/slc/slc +ktutil-commands.h: ${KRB5DIR}/admin/ktutil-commands.in ../../tools/slc/slc ../../tools/slc/slc ${.ALLSRC:M*.in} +.for ext in c o +ktutil-commands.${ext}: ktutil-commands.h +.endfor + ../../tools/slc/slc: cd ${.CURDIR}/../../tools/slc && ${MAKE} From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 10:16:14 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCD3A1065676; Mon, 2 Jul 2012 10:16:14 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C83CF8FC08; Mon, 2 Jul 2012 10:16:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62AGEik063514; Mon, 2 Jul 2012 10:16:14 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62AGEl0063512; Mon, 2 Jul 2012 10:16:14 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201207021016.q62AGEl0063512@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 2 Jul 2012 10:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237994 - stable/9/share/man/man4 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 10:16:15 -0000 Author: obrien Date: Mon Jul 2 10:16:14 2012 New Revision: 237994 URL: http://svn.freebsd.org/changeset/base/237994 Log: MFC: r236623: RAID is an acronym Modified: stable/9/share/man/man4/mpt.4 Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/mpt.4 ============================================================================== --- stable/9/share/man/man4/mpt.4 Mon Jul 2 10:14:12 2012 (r237993) +++ stable/9/share/man/man4/mpt.4 Mon Jul 2 10:16:14 2012 (r237994) @@ -124,15 +124,15 @@ Dell PowerEdge 1750 thru 2850 IBM eServer xSeries 335 .El .Pp -These systems also contain Integrated Raid Mirroring and Integrated -Raid Mirroring Enhanced which this driver also supports. +These systems also contain Integrated RAID Mirroring and Integrated +RAID Mirroring Enhanced which this driver also supports. .Pp The .Tn SAS controller chips are also present on many new AMD/Opteron based systems, like the Sun 4100. Note that this controller can drive both SAS and SATA -drives or a mix of them at the same time. The Integrated Raid Mirroring +drives or a mix of them at the same time. The Integrated RAID Mirroring available for these controllers is poorly supported at best. .Pp The From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 11:46:47 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB7A91065670; Mon, 2 Jul 2012 11:46:47 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9596B8FC0A; Mon, 2 Jul 2012 11:46:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62BklKh069037; Mon, 2 Jul 2012 11:46:47 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62BklLn069035; Mon, 2 Jul 2012 11:46:47 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201207021146.q62BklLn069035@svn.freebsd.org> From: Bruce M Simpson Date: Mon, 2 Jul 2012 11:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237995 - stable/9/sys/netinet6 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 11:46:47 -0000 Author: bms Date: Mon Jul 2 11:46:47 2012 New Revision: 237995 URL: http://svn.freebsd.org/changeset/base/237995 Log: Merge r237736 from HEAD: Kick the current-state report timer when a V1 group report would be triggered. Submitted by: rpaulo@ Modified: stable/9/sys/netinet6/mld6.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/netinet6/mld6.c ============================================================================== --- stable/9/sys/netinet6/mld6.c Mon Jul 2 10:16:14 2012 (r237994) +++ stable/9/sys/netinet6/mld6.c Mon Jul 2 11:46:47 2012 (r237995) @@ -2196,6 +2196,7 @@ mld_final_leave(struct in6_multi *inm, s #endif mld_v1_transmit_report(inm, MLD_LISTENER_DONE); inm->in6m_state = MLD_NOT_MEMBER; + V_current_state_timers_running6 = 1; } else if (mli->mli_version == MLD_VERSION_2) { /* * Stop group timer and all pending reports. From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 16:00:39 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E36B7106566B; Mon, 2 Jul 2012 16:00:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA1E48FC16; Mon, 2 Jul 2012 16:00:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62G0dmm079543; Mon, 2 Jul 2012 16:00:39 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62G0den079533; Mon, 2 Jul 2012 16:00:39 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201207021600.q62G0den079533@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 2 Jul 2012 16:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237998 - in stable/9: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/bn/as... X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 16:00:40 -0000 Author: jkim Date: Mon Jul 2 16:00:38 2012 New Revision: 237998 URL: http://svn.freebsd.org/changeset/base/237998 Log: MFC: r237657, r237658, r237666 Merge OpenSSL 0.9.8x and regen manual pages. Modified: stable/9/crypto/openssl/CHANGES stable/9/crypto/openssl/Configure stable/9/crypto/openssl/FAQ stable/9/crypto/openssl/LICENSE stable/9/crypto/openssl/Makefile stable/9/crypto/openssl/NEWS stable/9/crypto/openssl/README stable/9/crypto/openssl/apps/Makefile stable/9/crypto/openssl/apps/asn1pars.c stable/9/crypto/openssl/apps/cms.c stable/9/crypto/openssl/apps/openssl.cnf stable/9/crypto/openssl/apps/pkcs12.c stable/9/crypto/openssl/apps/s_client.c stable/9/crypto/openssl/apps/s_server.c stable/9/crypto/openssl/apps/x509.c stable/9/crypto/openssl/config stable/9/crypto/openssl/crypto/asn1/a_object.c stable/9/crypto/openssl/crypto/asn1/a_strex.c stable/9/crypto/openssl/crypto/asn1/a_strnid.c stable/9/crypto/openssl/crypto/asn1/asn1.h stable/9/crypto/openssl/crypto/asn1/asn_mime.c stable/9/crypto/openssl/crypto/asn1/x_name.c stable/9/crypto/openssl/crypto/asn1/x_pubkey.c stable/9/crypto/openssl/crypto/bio/bf_buff.c stable/9/crypto/openssl/crypto/bio/bio.h stable/9/crypto/openssl/crypto/bio/bss_dgram.c stable/9/crypto/openssl/crypto/bn/asm/mo-586.pl stable/9/crypto/openssl/crypto/bn/asm/ppc.pl stable/9/crypto/openssl/crypto/bn/bn_blind.c stable/9/crypto/openssl/crypto/bn/bn_gf2m.c stable/9/crypto/openssl/crypto/cms/cms.h stable/9/crypto/openssl/crypto/cms/cms_enc.c stable/9/crypto/openssl/crypto/cms/cms_env.c stable/9/crypto/openssl/crypto/cms/cms_io.c stable/9/crypto/openssl/crypto/cms/cms_lcl.h stable/9/crypto/openssl/crypto/cms/cms_smime.c stable/9/crypto/openssl/crypto/comp/c_rle.c stable/9/crypto/openssl/crypto/conf/conf_api.c stable/9/crypto/openssl/crypto/cryptlib.c stable/9/crypto/openssl/crypto/crypto.h stable/9/crypto/openssl/crypto/ec/ec2_smpl.c stable/9/crypto/openssl/crypto/ec/ec_key.c stable/9/crypto/openssl/crypto/ec/ecp_smpl.c stable/9/crypto/openssl/crypto/ecdsa/ecdsatest.c stable/9/crypto/openssl/crypto/ecdsa/ecs_ossl.c stable/9/crypto/openssl/crypto/evp/evp_test.c stable/9/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/9/crypto/openssl/crypto/opensslv.h stable/9/crypto/openssl/crypto/perlasm/cbc.pl stable/9/crypto/openssl/crypto/pkcs7/pk7_smime.c stable/9/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl stable/9/crypto/openssl/crypto/rc4/rc4_skey.c stable/9/crypto/openssl/crypto/rsa/rsa_eay.c stable/9/crypto/openssl/crypto/x509/x509_vfy.c stable/9/crypto/openssl/crypto/x509v3/v3_addr.c stable/9/crypto/openssl/crypto/x509v3/v3_asid.c stable/9/crypto/openssl/doc/HOWTO/proxy_certificates.txt stable/9/crypto/openssl/doc/apps/ca.pod stable/9/crypto/openssl/doc/apps/dgst.pod stable/9/crypto/openssl/doc/crypto/engine.pod stable/9/crypto/openssl/doc/ssl/SSL_clear.pod stable/9/crypto/openssl/engines/e_capi.c stable/9/crypto/openssl/engines/e_capi_err.h stable/9/crypto/openssl/fips/fips_canister.c stable/9/crypto/openssl/openssl.spec stable/9/crypto/openssl/ssl/bio_ssl.c stable/9/crypto/openssl/ssl/d1_both.c stable/9/crypto/openssl/ssl/d1_clnt.c stable/9/crypto/openssl/ssl/d1_enc.c stable/9/crypto/openssl/ssl/d1_lib.c stable/9/crypto/openssl/ssl/d1_pkt.c stable/9/crypto/openssl/ssl/d1_srvr.c stable/9/crypto/openssl/ssl/s2_srvr.c stable/9/crypto/openssl/ssl/s3_clnt.c stable/9/crypto/openssl/ssl/s3_lib.c stable/9/crypto/openssl/ssl/s3_srvr.c stable/9/crypto/openssl/ssl/ssl.h stable/9/crypto/openssl/ssl/ssl_ciph.c stable/9/crypto/openssl/ssl/ssl_err.c stable/9/crypto/openssl/ssl/ssl_lib.c stable/9/crypto/openssl/ssl/ssl_locl.h stable/9/crypto/openssl/ssl/t1_lib.c stable/9/crypto/openssl/util/fipslink.pl stable/9/crypto/openssl/util/mkerr.pl stable/9/crypto/openssl/util/pl/VC-32.pl stable/9/secure/lib/libcrypto/Makefile.inc stable/9/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/9/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/9/secure/lib/libcrypto/man/BIO_ctrl.3 stable/9/secure/lib/libcrypto/man/BIO_f_base64.3 stable/9/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/9/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/9/secure/lib/libcrypto/man/BIO_f_md.3 stable/9/secure/lib/libcrypto/man/BIO_f_null.3 stable/9/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/9/secure/lib/libcrypto/man/BIO_find_type.3 stable/9/secure/lib/libcrypto/man/BIO_new.3 stable/9/secure/lib/libcrypto/man/BIO_push.3 stable/9/secure/lib/libcrypto/man/BIO_read.3 stable/9/secure/lib/libcrypto/man/BIO_s_accept.3 stable/9/secure/lib/libcrypto/man/BIO_s_bio.3 stable/9/secure/lib/libcrypto/man/BIO_s_connect.3 stable/9/secure/lib/libcrypto/man/BIO_s_fd.3 stable/9/secure/lib/libcrypto/man/BIO_s_file.3 stable/9/secure/lib/libcrypto/man/BIO_s_mem.3 stable/9/secure/lib/libcrypto/man/BIO_s_null.3 stable/9/secure/lib/libcrypto/man/BIO_s_socket.3 stable/9/secure/lib/libcrypto/man/BIO_set_callback.3 stable/9/secure/lib/libcrypto/man/BIO_should_retry.3 stable/9/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_start.3 stable/9/secure/lib/libcrypto/man/BN_add.3 stable/9/secure/lib/libcrypto/man/BN_add_word.3 stable/9/secure/lib/libcrypto/man/BN_bn2bin.3 stable/9/secure/lib/libcrypto/man/BN_cmp.3 stable/9/secure/lib/libcrypto/man/BN_copy.3 stable/9/secure/lib/libcrypto/man/BN_generate_prime.3 stable/9/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/9/secure/lib/libcrypto/man/BN_new.3 stable/9/secure/lib/libcrypto/man/BN_num_bytes.3 stable/9/secure/lib/libcrypto/man/BN_rand.3 stable/9/secure/lib/libcrypto/man/BN_set_bit.3 stable/9/secure/lib/libcrypto/man/BN_swap.3 stable/9/secure/lib/libcrypto/man/BN_zero.3 stable/9/secure/lib/libcrypto/man/CONF_modules_free.3 stable/9/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/9/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/9/secure/lib/libcrypto/man/DH_generate_key.3 stable/9/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DH_new.3 stable/9/secure/lib/libcrypto/man/DH_set_method.3 stable/9/secure/lib/libcrypto/man/DH_size.3 stable/9/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/9/secure/lib/libcrypto/man/DSA_do_sign.3 stable/9/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/9/secure/lib/libcrypto/man/DSA_generate_key.3 stable/9/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DSA_new.3 stable/9/secure/lib/libcrypto/man/DSA_set_method.3 stable/9/secure/lib/libcrypto/man/DSA_sign.3 stable/9/secure/lib/libcrypto/man/DSA_size.3 stable/9/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/9/secure/lib/libcrypto/man/ERR_clear_error.3 stable/9/secure/lib/libcrypto/man/ERR_error_string.3 stable/9/secure/lib/libcrypto/man/ERR_get_error.3 stable/9/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/9/secure/lib/libcrypto/man/ERR_load_strings.3 stable/9/secure/lib/libcrypto/man/ERR_print_errors.3 stable/9/secure/lib/libcrypto/man/ERR_put_error.3 stable/9/secure/lib/libcrypto/man/ERR_remove_state.3 stable/9/secure/lib/libcrypto/man/ERR_set_mark.3 stable/9/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/9/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/9/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/9/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/9/secure/lib/libcrypto/man/EVP_SealInit.3 stable/9/secure/lib/libcrypto/man/EVP_SignInit.3 stable/9/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/9/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/9/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/9/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/9/secure/lib/libcrypto/man/OPENSSL_config.3 stable/9/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/9/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/9/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/9/secure/lib/libcrypto/man/PKCS12_create.3 stable/9/secure/lib/libcrypto/man/PKCS12_parse.3 stable/9/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_sign.3 stable/9/secure/lib/libcrypto/man/PKCS7_verify.3 stable/9/secure/lib/libcrypto/man/RAND_add.3 stable/9/secure/lib/libcrypto/man/RAND_bytes.3 stable/9/secure/lib/libcrypto/man/RAND_cleanup.3 stable/9/secure/lib/libcrypto/man/RAND_egd.3 stable/9/secure/lib/libcrypto/man/RAND_load_file.3 stable/9/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/9/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/9/secure/lib/libcrypto/man/RSA_check_key.3 stable/9/secure/lib/libcrypto/man/RSA_generate_key.3 stable/9/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/RSA_new.3 stable/9/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/9/secure/lib/libcrypto/man/RSA_print.3 stable/9/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_set_method.3 stable/9/secure/lib/libcrypto/man/RSA_sign.3 stable/9/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/9/secure/lib/libcrypto/man/RSA_size.3 stable/9/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/9/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/9/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/9/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/9/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/9/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/9/secure/lib/libcrypto/man/X509_new.3 stable/9/secure/lib/libcrypto/man/bio.3 stable/9/secure/lib/libcrypto/man/blowfish.3 stable/9/secure/lib/libcrypto/man/bn.3 stable/9/secure/lib/libcrypto/man/bn_internal.3 stable/9/secure/lib/libcrypto/man/buffer.3 stable/9/secure/lib/libcrypto/man/crypto.3 stable/9/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/9/secure/lib/libcrypto/man/d2i_DHparams.3 stable/9/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/9/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_X509.3 stable/9/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/9/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/9/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/9/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/9/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/9/secure/lib/libcrypto/man/des.3 stable/9/secure/lib/libcrypto/man/dh.3 stable/9/secure/lib/libcrypto/man/dsa.3 stable/9/secure/lib/libcrypto/man/ecdsa.3 stable/9/secure/lib/libcrypto/man/engine.3 stable/9/secure/lib/libcrypto/man/err.3 stable/9/secure/lib/libcrypto/man/evp.3 stable/9/secure/lib/libcrypto/man/hmac.3 stable/9/secure/lib/libcrypto/man/lh_stats.3 stable/9/secure/lib/libcrypto/man/lhash.3 stable/9/secure/lib/libcrypto/man/md5.3 stable/9/secure/lib/libcrypto/man/mdc2.3 stable/9/secure/lib/libcrypto/man/pem.3 stable/9/secure/lib/libcrypto/man/rand.3 stable/9/secure/lib/libcrypto/man/rc4.3 stable/9/secure/lib/libcrypto/man/ripemd.3 stable/9/secure/lib/libcrypto/man/rsa.3 stable/9/secure/lib/libcrypto/man/sha.3 stable/9/secure/lib/libcrypto/man/threads.3 stable/9/secure/lib/libcrypto/man/ui.3 stable/9/secure/lib/libcrypto/man/ui_compat.3 stable/9/secure/lib/libcrypto/man/x509.3 stable/9/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/9/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/9/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/9/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_free.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/9/secure/lib/libssl/man/SSL_CTX_new.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/9/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/9/secure/lib/libssl/man/SSL_SESSION_free.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/9/secure/lib/libssl/man/SSL_accept.3 stable/9/secure/lib/libssl/man/SSL_alert_type_string.3 stable/9/secure/lib/libssl/man/SSL_clear.3 stable/9/secure/lib/libssl/man/SSL_connect.3 stable/9/secure/lib/libssl/man/SSL_do_handshake.3 stable/9/secure/lib/libssl/man/SSL_free.3 stable/9/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/9/secure/lib/libssl/man/SSL_get_ciphers.3 stable/9/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/9/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/9/secure/lib/libssl/man/SSL_get_error.3 stable/9/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/9/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_get_fd.3 stable/9/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/9/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/9/secure/lib/libssl/man/SSL_get_rbio.3 stable/9/secure/lib/libssl/man/SSL_get_session.3 stable/9/secure/lib/libssl/man/SSL_get_verify_result.3 stable/9/secure/lib/libssl/man/SSL_get_version.3 stable/9/secure/lib/libssl/man/SSL_library_init.3 stable/9/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/9/secure/lib/libssl/man/SSL_new.3 stable/9/secure/lib/libssl/man/SSL_pending.3 stable/9/secure/lib/libssl/man/SSL_read.3 stable/9/secure/lib/libssl/man/SSL_rstate_string.3 stable/9/secure/lib/libssl/man/SSL_session_reused.3 stable/9/secure/lib/libssl/man/SSL_set_bio.3 stable/9/secure/lib/libssl/man/SSL_set_connect_state.3 stable/9/secure/lib/libssl/man/SSL_set_fd.3 stable/9/secure/lib/libssl/man/SSL_set_session.3 stable/9/secure/lib/libssl/man/SSL_set_shutdown.3 stable/9/secure/lib/libssl/man/SSL_set_verify_result.3 stable/9/secure/lib/libssl/man/SSL_shutdown.3 stable/9/secure/lib/libssl/man/SSL_state_string.3 stable/9/secure/lib/libssl/man/SSL_want.3 stable/9/secure/lib/libssl/man/SSL_write.3 stable/9/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/9/secure/lib/libssl/man/ssl.3 stable/9/secure/usr.bin/openssl/man/CA.pl.1 stable/9/secure/usr.bin/openssl/man/asn1parse.1 stable/9/secure/usr.bin/openssl/man/ca.1 stable/9/secure/usr.bin/openssl/man/ciphers.1 stable/9/secure/usr.bin/openssl/man/crl.1 stable/9/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/9/secure/usr.bin/openssl/man/dgst.1 stable/9/secure/usr.bin/openssl/man/dhparam.1 stable/9/secure/usr.bin/openssl/man/dsa.1 stable/9/secure/usr.bin/openssl/man/dsaparam.1 stable/9/secure/usr.bin/openssl/man/ec.1 stable/9/secure/usr.bin/openssl/man/ecparam.1 stable/9/secure/usr.bin/openssl/man/enc.1 stable/9/secure/usr.bin/openssl/man/errstr.1 stable/9/secure/usr.bin/openssl/man/gendsa.1 stable/9/secure/usr.bin/openssl/man/genrsa.1 stable/9/secure/usr.bin/openssl/man/nseq.1 stable/9/secure/usr.bin/openssl/man/ocsp.1 stable/9/secure/usr.bin/openssl/man/openssl.1 stable/9/secure/usr.bin/openssl/man/passwd.1 stable/9/secure/usr.bin/openssl/man/pkcs12.1 stable/9/secure/usr.bin/openssl/man/pkcs7.1 stable/9/secure/usr.bin/openssl/man/pkcs8.1 stable/9/secure/usr.bin/openssl/man/rand.1 stable/9/secure/usr.bin/openssl/man/req.1 stable/9/secure/usr.bin/openssl/man/rsa.1 stable/9/secure/usr.bin/openssl/man/rsautl.1 stable/9/secure/usr.bin/openssl/man/s_client.1 stable/9/secure/usr.bin/openssl/man/s_server.1 stable/9/secure/usr.bin/openssl/man/s_time.1 stable/9/secure/usr.bin/openssl/man/sess_id.1 stable/9/secure/usr.bin/openssl/man/smime.1 stable/9/secure/usr.bin/openssl/man/speed.1 stable/9/secure/usr.bin/openssl/man/spkac.1 stable/9/secure/usr.bin/openssl/man/verify.1 stable/9/secure/usr.bin/openssl/man/version.1 stable/9/secure/usr.bin/openssl/man/x509.1 stable/9/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/9/crypto/openssl/ (props changed) stable/9/secure/lib/libcrypto/ (props changed) stable/9/secure/lib/libssl/ (props changed) stable/9/secure/usr.bin/openssl/ (props changed) Modified: stable/9/crypto/openssl/CHANGES ============================================================================== --- stable/9/crypto/openssl/CHANGES Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/CHANGES Mon Jul 2 16:00:38 2012 (r237998) @@ -2,6 +2,142 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8w and 0.9.8x [10 May 2012] + + *) Sanity check record length before skipping explicit IV in DTLS + to fix DoS attack. + + Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic + fuzzing as a service testing platform. + (CVE-2012-2333) + [Steve Henson] + + *) Initialise tkeylen properly when encrypting CMS messages. + Thanks to Solar Designer of Openwall for reporting this issue. + [Steve Henson] + + Changes between 0.9.8v and 0.9.8w [23 Apr 2012] + + *) The fix for CVE-2012-2110 did not take into account that the + 'len' argument to BUF_MEM_grow and BUF_MEM_grow_clean is an + int in OpenSSL 0.9.8, making it still vulnerable. Fix by + rejecting negative len parameter. (CVE-2012-2131) + [Tomas Hoger ] + + Changes between 0.9.8u and 0.9.8v [19 Apr 2012] + + *) Check for potentially exploitable overflows in asn1_d2i_read_bio + BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer + in CRYPTO_realloc_clean. + + Thanks to Tavis Ormandy, Google Security Team, for discovering this + issue and to Adam Langley for fixing it. + (CVE-2012-2110) + [Adam Langley (Google), Tavis Ormandy, Google Security Team] + + Changes between 0.9.8t and 0.9.8u [12 Mar 2012] + + *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness + in CMS and PKCS7 code. When RSA decryption fails use a random key for + content decryption and always return the same error. Note: this attack + needs on average 2^20 messages so it only affects automated senders. The + old behaviour can be reenabled in the CMS code by setting the + CMS_DEBUG_DECRYPT flag: this is useful for debugging and testing where + an MMA defence is not necessary. + Thanks to Ivan Nestlerode for discovering + this issue. (CVE-2012-0884) + [Steve Henson] + + *) Fix CVE-2011-4619: make sure we really are receiving a + client hello before rejecting multiple SGC restarts. Thanks to + Ivan Nestlerode for discovering this bug. + [Steve Henson] + + Changes between 0.9.8s and 0.9.8t [18 Jan 2012] + + *) Fix for DTLS DoS issue introduced by fix for CVE-2011-4109. + Thanks to Antonio Martin, Enterprise Secure Access Research and + Development, Cisco Systems, Inc. for discovering this bug and + preparing a fix. (CVE-2012-0050) + [Antonio Martin] + + Changes between 0.9.8r and 0.9.8s [4 Jan 2012] + + *) Nadhem Alfardan and Kenny Paterson have discovered an extension + of the Vaudenay padding oracle attack on CBC mode encryption + which enables an efficient plaintext recovery attack against + the OpenSSL implementation of DTLS. Their attack exploits timing + differences arising during decryption processing. A research + paper describing this attack can be found at: + http://www.isg.rhul.ac.uk/~kp/dtls.pdf + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and to Robin Seggelmann + and Michael Tuexen + for preparing the fix. (CVE-2011-4108) + [Robin Seggelmann, Michael Tuexen] + + *) Stop policy check failure freeing same buffer twice. (CVE-2011-4109) + [Ben Laurie, Kasper ] + + *) Clear bytes used for block padding of SSL 3.0 records. + (CVE-2011-4576) + [Adam Langley (Google)] + + *) Only allow one SGC handshake restart for SSL/TLS. Thanks to George + Kadianakis for discovering this issue and + Adam Langley for preparing the fix. (CVE-2011-4619) + [Adam Langley (Google)] + + *) Prevent malformed RFC3779 data triggering an assertion failure. + Thanks to Andrew Chi, BBN Technologies, for discovering the flaw + and Rob Austein for fixing it. (CVE-2011-4577) + [Rob Austein ] + + *) Fix ssl_ciph.c set-up race. + [Adam Langley (Google)] + + *) Fix spurious failures in ecdsatest.c. + [Emilia Käsper (Google)] + + *) Fix the BIO_f_buffer() implementation (which was mixing different + interpretations of the '..._len' fields). + [Adam Langley (Google)] + + *) Fix handling of BN_BLINDING: now BN_BLINDING_invert_ex (rather than + BN_BLINDING_invert_ex) calls BN_BLINDING_update, ensuring that concurrent + threads won't reuse the same blinding coefficients. + + This also avoids the need to obtain the CRYPTO_LOCK_RSA_BLINDING + lock to call BN_BLINDING_invert_ex, and avoids one use of + BN_BLINDING_update for each BN_BLINDING structure (previously, + the last update always remained unused). + [Emilia Käsper (Google)] + + *) Fix SSL memory handling for (EC)DH ciphersuites, in particular + for multi-threaded use of ECDH. + [Adam Langley (Google)] + + *) Fix x509_name_ex_d2i memory leak on bad inputs. + [Bodo Moeller] + + *) Add protection against ECDSA timing attacks as mentioned in the paper + by Billy Bob Brumley and Nicola Tuveri, see: + + http://eprint.iacr.org/2011/232.pdf + + [Billy Bob Brumley and Nicola Tuveri] + + Changes between 0.9.8q and 0.9.8r [8 Feb 2011] + + *) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014 + [Neel Mehta, Adam Langley, Bodo Moeller (Google)] + + *) Fix bug in string printing code: if *any* escaping is enabled we must + escape the escape character (backslash) or the resulting string is + ambiguous. + [Steve Henson] + Changes between 0.9.8p and 0.9.8q [2 Dec 2010] *) Disable code workaround for ancient and obsolete Netscape browsers Modified: stable/9/crypto/openssl/Configure ============================================================================== --- stable/9/crypto/openssl/Configure Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/Configure Mon Jul 2 16:00:38 2012 (r237998) @@ -371,6 +371,9 @@ my %table=( "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", +# Android: Linux but without -DTERMIO and pointers to headers and libs. +"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + #### *BSD [do see comment about ${BSDthreads} above!] "BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", Modified: stable/9/crypto/openssl/FAQ ============================================================================== --- stable/9/crypto/openssl/FAQ Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/FAQ Mon Jul 2 16:00:38 2012 (r237998) @@ -10,6 +10,7 @@ OpenSSL - Frequently Asked Questions * Why aren't tools like 'autoconf' and 'libtool' used? * What is an 'engine' version? * How do I check the authenticity of the OpenSSL distribution? +* How does the versioning scheme work? [LEGAL] Legal questions @@ -82,7 +83,7 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 1.0.0c was released on Dec 2nd, 2010. +OpenSSL 1.0.1c was released on May 10th, 2012. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at . Note that the online documents refer to the very latest development versions of OpenSSL and may include features not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. +that came with the version of OpenSSL you are using. The pod format +documentation is included in each OpenSSL distribution under the docs +directory. For information on parts of libcrypto that are not yet documented, you might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's @@ -173,6 +176,19 @@ just do: pgp TARBALL.asc +* How does the versioning scheme work? + +After the release of OpenSSL 1.0.0 the versioning scheme changed. Letter +releases (e.g. 1.0.1a) can only contain bug and security fixes and no +new features. Minor releases change the last number (e.g. 1.0.2) and +can contain new features that retain binary compatibility. Changes to +the middle number are considered major releases and neither source nor +binary compatibility is guaranteed. + +Therefore the answer to the common question "when will feature X be +backported to OpenSSL 1.0.0/0.9.8?" is "never" but it could appear +in the next minor release. + [LEGAL] ======================================================================= * Do I need patent licenses to use OpenSSL? @@ -284,7 +300,7 @@ current directory in this case, but this Check out the CA.pl(1) manual page. This provides a simple wrapper round the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check out the manual pages for the individual utilities and the certificate -extensions documentation (currently in doc/openssl.txt). +extensions documentation (in ca(1), req(1), x509v3_config(5) ) * Why can't I create certificate requests? Modified: stable/9/crypto/openssl/LICENSE ============================================================================== --- stable/9/crypto/openssl/LICENSE Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/LICENSE Mon Jul 2 16:00:38 2012 (r237998) @@ -12,7 +12,7 @@ --------------- /* ==================================================================== - * Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: stable/9/crypto/openssl/Makefile ============================================================================== --- stable/9/crypto/openssl/Makefile Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/Makefile Mon Jul 2 16:00:38 2012 (r237998) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=0.9.8q +VERSION=0.9.8x MAJOR=0 MINOR=9.8 SHLIB_VERSION_NUMBER=0.9.8 Modified: stable/9/crypto/openssl/NEWS ============================================================================== --- stable/9/crypto/openssl/NEWS Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/NEWS Mon Jul 2 16:00:38 2012 (r237998) @@ -5,6 +5,40 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x: + + o Fix DTLS record length checking bug CVE-2012-2333 + + Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w: + + o Fix for CVE-2012-2131 (corrected fix for 0.9.8 and CVE-2012-2110) + + Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v: + + o Fix for ASN1 overflow bug CVE-2012-2110 + + Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u: + + o Fix for CMS/PKCS#7 MMA CVE-2012-0884 + o Corrected fix for CVE-2011-4619 + o Various DTLS fixes. + + Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t: + + o Fix for DTLS DoS issue CVE-2012-0050 + + Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s: + + o Fix for DTLS plaintext recovery attack CVE-2011-4108 + o Fix policy check double free error CVE-2011-4109 + o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 + o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619 + o Check for malformed RFC3779 data CVE-2011-4577 + + Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r: + + o Fix for security issue CVE-2011-0014 + Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q: o Fix for security issue CVE-2010-4180 @@ -181,6 +215,11 @@ o Added initial support for Win64. o Added alternate pkg-config files. + Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m: + + o FIPS 1.1.1 module linking. + o Various ciphersuite selection fixes. + Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) Modified: stable/9/crypto/openssl/README ============================================================================== --- stable/9/crypto/openssl/README Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/README Mon Jul 2 16:00:38 2012 (r237998) @@ -1,7 +1,7 @@ - OpenSSL 0.9.8q 2 Dec 2010 + OpenSSL 0.9.8x 10 May 2012 - Copyright (c) 1998-2009 The OpenSSL Project + Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson All rights reserved. Modified: stable/9/crypto/openssl/apps/Makefile ============================================================================== --- stable/9/crypto/openssl/apps/Makefile Mon Jul 2 15:28:50 2012 (r237997) +++ stable/9/crypto/openssl/apps/Makefile Mon Jul 2 16:00:38 2012 (r237998) @@ -176,720 +176,703 @@ progs.h: progs.pl app_rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h app_rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h app_rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -app_rand.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -app_rand.o: ../include/openssl/evp.h ../include/openssl/fips.h -app_rand.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -app_rand.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -app_rand.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -app_rand.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h -app_rand.o: ../include/openssl/rand.h ../include/openssl/safestack.h -app_rand.o: ../include/openssl/sha.h ../include/openssl/stack.h -app_rand.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -app_rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -app_rand.o: ../include/openssl/x509v3.h app_rand.c apps.h +app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +app_rand.o: ../include/openssl/engine.h ../include/openssl/evp.h +app_rand.o: ../include/openssl/fips.h ../include/openssl/lhash.h +app_rand.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +app_rand.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +app_rand.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +app_rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +app_rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h +app_rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +app_rand.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +app_rand.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h +app_rand.o: app_rand.c apps.h apps.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h apps.o: ../include/openssl/bn.h ../include/openssl/buffer.h apps.o: ../include/openssl/conf.h ../include/openssl/crypto.h apps.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -apps.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -apps.o: ../include/openssl/engine.h ../include/openssl/err.h -apps.o: ../include/openssl/evp.h ../include/openssl/fips.h -apps.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -apps.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -apps.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -apps.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -apps.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h -apps.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h -apps.o: ../include/openssl/safestack.h ../include/openssl/sha.h -apps.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -apps.o: ../include/openssl/txt_db.h ../include/openssl/ui.h -apps.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -apps.o: ../include/openssl/x509v3.h apps.c apps.h +apps.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +apps.o: ../include/openssl/err.h ../include/openssl/evp.h +apps.o: ../include/openssl/fips.h ../include/openssl/lhash.h +apps.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +apps.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +apps.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +apps.o: ../include/openssl/pem.h ../include/openssl/pem2.h +apps.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h +apps.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +apps.o: ../include/openssl/sha.h ../include/openssl/stack.h +apps.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +apps.o: ../include/openssl/ui.h ../include/openssl/x509.h +apps.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.c apps.h asn1pars.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h asn1pars.o: ../include/openssl/buffer.h ../include/openssl/conf.h asn1pars.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -asn1pars.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -asn1pars.o: ../include/openssl/err.h ../include/openssl/evp.h -asn1pars.o: ../include/openssl/fips.h ../include/openssl/lhash.h -asn1pars.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -asn1pars.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -asn1pars.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -asn1pars.o: ../include/openssl/pem.h ../include/openssl/pem2.h -asn1pars.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -asn1pars.o: ../include/openssl/sha.h ../include/openssl/stack.h -asn1pars.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -asn1pars.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -asn1pars.o: ../include/openssl/x509v3.h apps.h asn1pars.c +asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +asn1pars.o: ../include/openssl/engine.h ../include/openssl/err.h +asn1pars.o: ../include/openssl/evp.h ../include/openssl/fips.h +asn1pars.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +asn1pars.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +asn1pars.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +asn1pars.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +asn1pars.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +asn1pars.o: ../include/openssl/safestack.h ../include/openssl/sha.h +asn1pars.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +asn1pars.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +asn1pars.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +asn1pars.o: asn1pars.c ca.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ca.o: ../include/openssl/bn.h ../include/openssl/buffer.h ca.o: ../include/openssl/conf.h ../include/openssl/crypto.h ca.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ca.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ca.o: ../include/openssl/engine.h ../include/openssl/err.h -ca.o: ../include/openssl/evp.h ../include/openssl/fips.h -ca.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ca.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ca.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ca.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ca.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ca.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ca.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -ca.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ca.c +ca.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ca.o: ../include/openssl/err.h ../include/openssl/evp.h +ca.o: ../include/openssl/fips.h ../include/openssl/lhash.h +ca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ca.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ca.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ca.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ca.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +ca.o: ../include/openssl/sha.h ../include/openssl/stack.h +ca.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +ca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +ca.o: ../include/openssl/x509v3.h apps.h ca.c ciphers.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ciphers.o: ../include/openssl/bn.h ../include/openssl/buffer.h ciphers.o: ../include/openssl/comp.h ../include/openssl/conf.h ciphers.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h ciphers.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ciphers.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ciphers.o: ../include/openssl/engine.h ../include/openssl/err.h -ciphers.o: ../include/openssl/evp.h ../include/openssl/fips.h -ciphers.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -ciphers.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ciphers.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ciphers.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ciphers.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ciphers.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ciphers.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -ciphers.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ciphers.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -ciphers.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -ciphers.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ciphers.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -ciphers.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ciphers.o: ../include/openssl/x509v3.h apps.h ciphers.c +ciphers.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ciphers.o: ../include/openssl/err.h ../include/openssl/evp.h +ciphers.o: ../include/openssl/fips.h ../include/openssl/hmac.h +ciphers.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ciphers.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ciphers.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ciphers.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ciphers.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ciphers.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +ciphers.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ciphers.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ciphers.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ciphers.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ciphers.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +ciphers.o: ciphers.c cms.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h cms.o: ../include/openssl/buffer.h ../include/openssl/conf.h cms.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -cms.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -cms.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -cms.o: ../include/openssl/evp.h ../include/openssl/fips.h -cms.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -cms.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -cms.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -cms.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h -cms.o: ../include/openssl/safestack.h ../include/openssl/sha.h -cms.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -cms.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -cms.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h cms.c +cms.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +cms.o: ../include/openssl/engine.h ../include/openssl/evp.h +cms.o: ../include/openssl/fips.h ../include/openssl/lhash.h +cms.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +cms.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +cms.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +cms.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +cms.o: ../include/openssl/sha.h ../include/openssl/stack.h +cms.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +cms.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +cms.o: ../include/openssl/x509v3.h apps.h cms.c crl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h crl.o: ../include/openssl/buffer.h ../include/openssl/conf.h crl.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -crl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -crl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -crl.o: ../include/openssl/err.h ../include/openssl/evp.h -crl.o: ../include/openssl/fips.h ../include/openssl/lhash.h -crl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -crl.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -crl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -crl.o: ../include/openssl/pem.h ../include/openssl/pem2.h -crl.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -crl.o: ../include/openssl/sha.h ../include/openssl/stack.h -crl.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -crl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -crl.o: ../include/openssl/x509v3.h apps.h crl.c +crl.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +crl.o: ../include/openssl/engine.h ../include/openssl/err.h +crl.o: ../include/openssl/evp.h ../include/openssl/fips.h +crl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +crl.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +crl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +crl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +crl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +crl.o: ../include/openssl/safestack.h ../include/openssl/sha.h +crl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +crl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +crl.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h crl.c crl2p7.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h crl2p7.o: ../include/openssl/buffer.h ../include/openssl/conf.h crl2p7.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -crl2p7.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -crl2p7.o: ../include/openssl/err.h ../include/openssl/evp.h -crl2p7.o: ../include/openssl/fips.h ../include/openssl/lhash.h -crl2p7.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -crl2p7.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -crl2p7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -crl2p7.o: ../include/openssl/pem.h ../include/openssl/pem2.h -crl2p7.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -crl2p7.o: ../include/openssl/sha.h ../include/openssl/stack.h -crl2p7.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -crl2p7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -crl2p7.o: ../include/openssl/x509v3.h apps.h crl2p7.c +crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +crl2p7.o: ../include/openssl/engine.h ../include/openssl/err.h +crl2p7.o: ../include/openssl/evp.h ../include/openssl/fips.h +crl2p7.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +crl2p7.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +crl2p7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +crl2p7.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +crl2p7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +crl2p7.o: ../include/openssl/safestack.h ../include/openssl/sha.h +crl2p7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +crl2p7.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +crl2p7.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +crl2p7.o: crl2p7.c dgst.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dgst.o: ../include/openssl/buffer.h ../include/openssl/conf.h dgst.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -dgst.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dgst.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dgst.o: ../include/openssl/err.h ../include/openssl/evp.h -dgst.o: ../include/openssl/fips.h ../include/openssl/hmac.h -dgst.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -dgst.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -dgst.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -dgst.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -dgst.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -dgst.o: ../include/openssl/safestack.h ../include/openssl/sha.h -dgst.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -dgst.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -dgst.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dgst.c +dgst.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dgst.o: ../include/openssl/engine.h ../include/openssl/err.h +dgst.o: ../include/openssl/evp.h ../include/openssl/fips.h +dgst.o: ../include/openssl/hmac.h ../include/openssl/lhash.h +dgst.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +dgst.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +dgst.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dgst.o: ../include/openssl/pem.h ../include/openssl/pem2.h +dgst.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +dgst.o: ../include/openssl/sha.h ../include/openssl/stack.h +dgst.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +dgst.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +dgst.o: ../include/openssl/x509v3.h apps.h dgst.c dh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dh.o: ../include/openssl/bn.h ../include/openssl/buffer.h dh.o: ../include/openssl/conf.h ../include/openssl/crypto.h dh.o: ../include/openssl/dh.h ../include/openssl/e_os2.h -dh.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dh.o: ../include/openssl/err.h ../include/openssl/evp.h -dh.o: ../include/openssl/fips.h ../include/openssl/lhash.h -dh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -dh.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -dh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -dh.o: ../include/openssl/pem.h ../include/openssl/pem2.h -dh.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -dh.o: ../include/openssl/sha.h ../include/openssl/stack.h -dh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -dh.o: ../include/openssl/x509v3.h apps.h dh.c +dh.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dh.o: ../include/openssl/engine.h ../include/openssl/err.h +dh.o: ../include/openssl/evp.h ../include/openssl/fips.h +dh.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +dh.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +dh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +dh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +dh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +dh.o: ../include/openssl/safestack.h ../include/openssl/sha.h +dh.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +dh.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +dh.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dh.c dsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h dsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -dsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dsa.o: ../include/openssl/err.h ../include/openssl/evp.h -dsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h -dsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -dsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -dsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -dsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h -dsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -dsa.o: ../include/openssl/sha.h ../include/openssl/stack.h -dsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -dsa.o: ../include/openssl/x509v3.h apps.h dsa.c +dsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dsa.o: ../include/openssl/engine.h ../include/openssl/err.h +dsa.o: ../include/openssl/evp.h ../include/openssl/fips.h +dsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +dsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +dsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +dsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +dsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +dsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h +dsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +dsa.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +dsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dsa.c dsaparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dsaparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h dsaparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h dsaparam.o: ../include/openssl/dh.h ../include/openssl/dsa.h dsaparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -dsaparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h -dsaparam.o: ../include/openssl/evp.h ../include/openssl/fips.h -dsaparam.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -dsaparam.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -dsaparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -dsaparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -dsaparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -dsaparam.o: ../include/openssl/rand.h ../include/openssl/rsa.h -dsaparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h -dsaparam.o: ../include/openssl/stack.h ../include/openssl/store.h -dsaparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dsaparam.o: ../include/openssl/ui.h ../include/openssl/x509.h -dsaparam.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -dsaparam.o: dsaparam.c +dsaparam.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +dsaparam.o: ../include/openssl/err.h ../include/openssl/evp.h +dsaparam.o: ../include/openssl/fips.h ../include/openssl/lhash.h +dsaparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +dsaparam.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +dsaparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dsaparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h +dsaparam.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +dsaparam.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +dsaparam.o: ../include/openssl/sha.h ../include/openssl/stack.h +dsaparam.o: ../include/openssl/store.h ../include/openssl/symhacks.h +dsaparam.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +dsaparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +dsaparam.o: ../include/openssl/x509v3.h apps.h dsaparam.c ec.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ec.o: ../include/openssl/buffer.h ../include/openssl/conf.h ec.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -ec.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -ec.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -ec.o: ../include/openssl/err.h ../include/openssl/evp.h -ec.o: ../include/openssl/fips.h ../include/openssl/lhash.h -ec.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -ec.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -ec.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -ec.o: ../include/openssl/pem.h ../include/openssl/pem2.h -ec.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -ec.o: ../include/openssl/sha.h ../include/openssl/stack.h -ec.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -ec.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ec.o: ../include/openssl/x509v3.h apps.h ec.c +ec.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +ec.o: ../include/openssl/engine.h ../include/openssl/err.h +ec.o: ../include/openssl/evp.h ../include/openssl/fips.h +ec.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +ec.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +ec.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ec.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +ec.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +ec.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ec.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ec.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ec.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ec.c ecparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ecparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h ecparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h ecparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ecparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ecparam.o: ../include/openssl/engine.h ../include/openssl/err.h -ecparam.o: ../include/openssl/evp.h ../include/openssl/fips.h -ecparam.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ecparam.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ecparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ecparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ecparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ecparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ecparam.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ecparam.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -ecparam.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -ecparam.o: ecparam.c +ecparam.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ecparam.o: ../include/openssl/err.h ../include/openssl/evp.h +ecparam.o: ../include/openssl/fips.h ../include/openssl/lhash.h +ecparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ecparam.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ecparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ecparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ecparam.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +ecparam.o: ../include/openssl/sha.h ../include/openssl/stack.h +ecparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +ecparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +ecparam.o: ../include/openssl/x509v3.h apps.h ecparam.c enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h enc.o: ../include/openssl/buffer.h ../include/openssl/conf.h enc.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -enc.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -enc.o: ../include/openssl/err.h ../include/openssl/evp.h -enc.o: ../include/openssl/fips.h ../include/openssl/lhash.h -enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -enc.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h -enc.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h -enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h -enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -enc.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -enc.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h enc.c +enc.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +enc.o: ../include/openssl/engine.h ../include/openssl/err.h +enc.o: ../include/openssl/evp.h ../include/openssl/fips.h +enc.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +enc.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +enc.o: ../include/openssl/rand.h ../include/openssl/safestack.h +enc.o: ../include/openssl/sha.h ../include/openssl/stack.h +enc.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +enc.o: ../include/openssl/x509v3.h apps.h enc.c engine.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h engine.o: ../include/openssl/bn.h ../include/openssl/buffer.h engine.o: ../include/openssl/comp.h ../include/openssl/conf.h engine.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h engine.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -engine.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -engine.o: ../include/openssl/engine.h ../include/openssl/err.h -engine.o: ../include/openssl/evp.h ../include/openssl/fips.h -engine.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -engine.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -engine.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -engine.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -engine.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -engine.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -engine.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -engine.o: ../include/openssl/safestack.h ../include/openssl/sha.h -engine.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -engine.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -engine.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -engine.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -engine.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -engine.o: ../include/openssl/x509v3.h apps.h engine.c +engine.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +engine.o: ../include/openssl/err.h ../include/openssl/evp.h +engine.o: ../include/openssl/fips.h ../include/openssl/hmac.h +engine.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +engine.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +engine.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +engine.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +engine.o: ../include/openssl/pem.h ../include/openssl/pem2.h +engine.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +engine.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +engine.o: ../include/openssl/sha.h ../include/openssl/ssl.h +engine.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +engine.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +engine.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +engine.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +engine.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +engine.o: engine.c errstr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h errstr.o: ../include/openssl/bn.h ../include/openssl/buffer.h errstr.o: ../include/openssl/comp.h ../include/openssl/conf.h errstr.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h errstr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -errstr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -errstr.o: ../include/openssl/engine.h ../include/openssl/err.h -errstr.o: ../include/openssl/evp.h ../include/openssl/fips.h -errstr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -errstr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -errstr.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -errstr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -errstr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -errstr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -errstr.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -errstr.o: ../include/openssl/safestack.h ../include/openssl/sha.h -errstr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -errstr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -errstr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -errstr.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -errstr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -errstr.o: ../include/openssl/x509v3.h apps.h errstr.c +errstr.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +errstr.o: ../include/openssl/err.h ../include/openssl/evp.h +errstr.o: ../include/openssl/fips.h ../include/openssl/hmac.h +errstr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +errstr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +errstr.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +errstr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +errstr.o: ../include/openssl/pem.h ../include/openssl/pem2.h +errstr.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +errstr.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h +errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +errstr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +errstr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +errstr.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +errstr.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +errstr.o: errstr.c gendh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h gendh.o: ../include/openssl/bn.h ../include/openssl/buffer.h gendh.o: ../include/openssl/conf.h ../include/openssl/crypto.h gendh.o: ../include/openssl/dh.h ../include/openssl/dsa.h gendh.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -gendh.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -gendh.o: ../include/openssl/engine.h ../include/openssl/err.h -gendh.o: ../include/openssl/evp.h ../include/openssl/fips.h -gendh.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -gendh.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -gendh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -gendh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -gendh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -gendh.o: ../include/openssl/rand.h ../include/openssl/rsa.h -gendh.o: ../include/openssl/safestack.h ../include/openssl/sha.h -gendh.o: ../include/openssl/stack.h ../include/openssl/store.h -gendh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -gendh.o: ../include/openssl/ui.h ../include/openssl/x509.h -gendh.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -gendh.o: gendh.c +gendh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +gendh.o: ../include/openssl/err.h ../include/openssl/evp.h +gendh.o: ../include/openssl/fips.h ../include/openssl/lhash.h +gendh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +gendh.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +gendh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +gendh.o: ../include/openssl/pem.h ../include/openssl/pem2.h +gendh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +gendh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +gendh.o: ../include/openssl/sha.h ../include/openssl/stack.h +gendh.o: ../include/openssl/store.h ../include/openssl/symhacks.h +gendh.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +gendh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +gendh.o: ../include/openssl/x509v3.h apps.h gendh.c gendsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h gendsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h gendsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -gendsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -gendsa.o: ../include/openssl/err.h ../include/openssl/evp.h -gendsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h -gendsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -gendsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -gendsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -gendsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h -gendsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -gendsa.o: ../include/openssl/sha.h ../include/openssl/stack.h -gendsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -gendsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -gendsa.o: ../include/openssl/x509v3.h apps.h gendsa.c +gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +gendsa.o: ../include/openssl/engine.h ../include/openssl/err.h +gendsa.o: ../include/openssl/evp.h ../include/openssl/fips.h +gendsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +gendsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +gendsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +gendsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +gendsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +gendsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h +gendsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +gendsa.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +gendsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +gendsa.o: gendsa.c genrsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h genrsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h genrsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h genrsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h genrsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -genrsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h -genrsa.o: ../include/openssl/evp.h ../include/openssl/fips.h -genrsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -genrsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -genrsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -genrsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -genrsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -genrsa.o: ../include/openssl/rand.h ../include/openssl/rsa.h -genrsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h -genrsa.o: ../include/openssl/stack.h ../include/openssl/store.h -genrsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -genrsa.o: ../include/openssl/ui.h ../include/openssl/x509.h -genrsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -genrsa.o: genrsa.c +genrsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +genrsa.o: ../include/openssl/err.h ../include/openssl/evp.h +genrsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h +genrsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +genrsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +genrsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +genrsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h +genrsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +genrsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +genrsa.o: ../include/openssl/sha.h ../include/openssl/stack.h +genrsa.o: ../include/openssl/store.h ../include/openssl/symhacks.h +genrsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +genrsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +genrsa.o: ../include/openssl/x509v3.h apps.h genrsa.c nseq.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h nseq.o: ../include/openssl/buffer.h ../include/openssl/conf.h nseq.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -nseq.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -nseq.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -nseq.o: ../include/openssl/err.h ../include/openssl/evp.h -nseq.o: ../include/openssl/fips.h ../include/openssl/lhash.h -nseq.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -nseq.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -nseq.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -nseq.o: ../include/openssl/pem.h ../include/openssl/pem2.h -nseq.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -nseq.o: ../include/openssl/sha.h ../include/openssl/stack.h -nseq.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -nseq.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -nseq.o: ../include/openssl/x509v3.h apps.h nseq.c +nseq.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +nseq.o: ../include/openssl/engine.h ../include/openssl/err.h +nseq.o: ../include/openssl/evp.h ../include/openssl/fips.h +nseq.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +nseq.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +nseq.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +nseq.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +nseq.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +nseq.o: ../include/openssl/safestack.h ../include/openssl/sha.h +nseq.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +nseq.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +nseq.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h nseq.c ocsp.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ocsp.o: ../include/openssl/bn.h ../include/openssl/buffer.h ocsp.o: ../include/openssl/comp.h ../include/openssl/conf.h ocsp.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h ocsp.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ocsp.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ocsp.o: ../include/openssl/engine.h ../include/openssl/err.h -ocsp.o: ../include/openssl/evp.h ../include/openssl/fips.h -ocsp.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -ocsp.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ocsp.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ocsp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ocsp.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ocsp.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ocsp.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -ocsp.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ocsp.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -ocsp.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -ocsp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ocsp.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -ocsp.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ocsp.o: ../include/openssl/x509v3.h apps.h ocsp.c +ocsp.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ocsp.o: ../include/openssl/err.h ../include/openssl/evp.h +ocsp.o: ../include/openssl/fips.h ../include/openssl/hmac.h +ocsp.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ocsp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ocsp.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ocsp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ocsp.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ocsp.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +ocsp.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +ocsp.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ocsp.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ocsp.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ocsp.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ocsp.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ocsp.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ocsp.c openssl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h openssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h openssl.o: ../include/openssl/comp.h ../include/openssl/conf.h openssl.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h openssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -openssl.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -openssl.o: ../include/openssl/engine.h ../include/openssl/err.h *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 17:22:39 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1DC2D106566C; Mon, 2 Jul 2012 17:22:39 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 098008FC0A; Mon, 2 Jul 2012 17:22:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62HMc7a083803; Mon, 2 Jul 2012 17:22:38 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62HMcaJ083799; Mon, 2 Jul 2012 17:22:38 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207021722.q62HMcaJ083799@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Jul 2012 17:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238005 - in stable/9/sys: amd64/amd64 i386/i386 i386/xen X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 17:22:39 -0000 Author: alc Date: Mon Jul 2 17:22:38 2012 New Revision: 238005 URL: http://svn.freebsd.org/changeset/base/238005 Log: MFC r236534 Various small changes to PV entry management. Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/i386/i386/pmap.c stable/9/sys/i386/xen/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 16:57:13 2012 (r238004) +++ stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 17:22:38 2012 (r238005) @@ -2021,7 +2021,7 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREE1 0xfffffffffffffffful #define PC_FREE2 0x000000fffffffffful -static uint64_t pc_freemask[_NPCM] = { PC_FREE0, PC_FREE1, PC_FREE2 }; +static const uint64_t pc_freemask[_NPCM] = { PC_FREE0, PC_FREE1, PC_FREE2 }; SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, &pv_entry_count, 0, "Current number of pv entries"); @@ -2070,7 +2070,7 @@ pmap_pv_reclaim(pmap_t locked_pmap) pv_entry_t pv; vm_offset_t va; vm_page_t free, m, m_pc; - uint64_t inuse, freemask; + uint64_t inuse; int bit, field, freed; rw_assert(&pvh_global_lock, RA_WLOCKED); @@ -2102,7 +2102,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) */ freed = 0; for (field = 0; field < _NPCM; field++) { - freemask = 0; for (inuse = ~pc->pc_map[field] & pc_freemask[field]; inuse != 0; inuse &= ~(1UL << bit)) { bit = bsfq(inuse); @@ -2131,16 +2130,16 @@ pmap_pv_reclaim(pmap_t locked_pmap) PGA_WRITEABLE); } } + pc->pc_map[field] |= 1UL << bit; pmap_unuse_pt(pmap, va, *pde, &free); - freemask |= 1UL << bit; freed++; } - pc->pc_map[field] |= freemask; } if (freed == 0) { TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; } + /* Every freed mapping is for a 4 KB page. */ pmap_resident_count_dec(pmap, freed); PV_STAT(pv_entry_frees += freed); PV_STAT(pv_entry_spare += freed); @@ -2261,10 +2260,6 @@ retry: TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); } - if (pc != TAILQ_LAST(&pv_chunks, pch)) { - TAILQ_REMOVE(&pv_chunks, pc, pc_lru); - TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); - } pv_entry_count++; PV_STAT(pv_entry_spare--); return (pv); @@ -4138,7 +4133,7 @@ pmap_remove_pages(pmap_t pmap) TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { allfree = 1; for (field = 0; field < _NPCM; field++) { - inuse = (~(pc->pc_map[field])) & pc_freemask[field]; + inuse = ~pc->pc_map[field] & pc_freemask[field]; while (inuse != 0) { bit = bsfq(inuse); bitmask = 1UL << bit; Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Mon Jul 2 16:57:13 2012 (r238004) +++ stable/9/sys/i386/i386/pmap.c Mon Jul 2 17:22:38 2012 (r238005) @@ -2177,7 +2177,7 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREE0_9 0xfffffffful /* Free values for index 0 through 9 */ #define PC_FREE10 0x0000fffful /* Free values for index 10 */ -static uint32_t pc_freemask[_NPCM] = { +static const uint32_t pc_freemask[_NPCM] = { PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, @@ -2227,7 +2227,7 @@ pmap_pv_reclaim(pmap_t locked_pmap) pv_entry_t pv; vm_offset_t va; vm_page_t free, m, m_pc; - uint32_t inuse, freemask; + uint32_t inuse; int bit, field, freed; PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); @@ -2260,7 +2260,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) */ freed = 0; for (field = 0; field < _NPCM; field++) { - freemask = 0; for (inuse = ~pc->pc_map[field] & pc_freemask[field]; inuse != 0; inuse &= ~(1UL << bit)) { bit = bsfl(inuse); @@ -2289,16 +2288,16 @@ pmap_pv_reclaim(pmap_t locked_pmap) PGA_WRITEABLE); } } + pc->pc_map[field] |= 1UL << bit; pmap_unuse_pt(pmap, va, &free); - freemask |= 1UL << bit; freed++; } - pc->pc_map[field] |= freemask; } if (freed == 0) { TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; } + /* Every freed mapping is for a 4 KB page. */ pmap->pm_stats.resident_count -= freed; PV_STAT(pv_entry_frees += freed); PV_STAT(pv_entry_spare += freed); @@ -2367,13 +2366,21 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv field = idx / 32; bit = idx % 32; pc->pc_map[field] |= 1ul << bit; - /* move to head of list */ - TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); for (idx = 0; idx < _NPCM; idx++) if (pc->pc_map[idx] != pc_freemask[idx]) { - TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + /* + * 98% of the time, pc is already at the head of the + * list. If it isn't already, move it to the head. + */ + if (__predict_false(TAILQ_FIRST(&pmap->pm_pvchunk) != + pc)) { + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, + pc_list); + } return; } + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); free_pv_chunk(pc); } @@ -2437,10 +2444,6 @@ retry: } TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); - if (pc != TAILQ_LAST(&pv_chunks, pch)) { - TAILQ_REMOVE(&pv_chunks, pc, pc_lru); - TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); - } PV_STAT(pv_entry_spare--); return (pv); } @@ -4371,7 +4374,7 @@ pmap_remove_pages(pmap_t pmap) TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { allfree = 1; for (field = 0; field < _NPCM; field++) { - inuse = (~(pc->pc_map[field])) & pc_freemask[field]; + inuse = ~pc->pc_map[field] & pc_freemask[field]; while (inuse != 0) { bit = bsfl(inuse); bitmask = 1UL << bit; Modified: stable/9/sys/i386/xen/pmap.c ============================================================================== --- stable/9/sys/i386/xen/pmap.c Mon Jul 2 16:57:13 2012 (r238004) +++ stable/9/sys/i386/xen/pmap.c Mon Jul 2 17:22:38 2012 (r238005) @@ -1930,7 +1930,7 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREE0_9 0xfffffffful /* Free values for index 0 through 9 */ #define PC_FREE10 0x0000fffful /* Free values for index 10 */ -static uint32_t pc_freemask[_NPCM] = { +static const uint32_t pc_freemask[_NPCM] = { PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, @@ -1978,7 +1978,7 @@ pmap_pv_reclaim(pmap_t locked_pmap) pv_entry_t pv; vm_offset_t va; vm_page_t free, m, m_pc; - uint32_t inuse, freemask; + uint32_t inuse; int bit, field, freed; PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); @@ -2011,7 +2011,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) */ freed = 0; for (field = 0; field < _NPCM; field++) { - freemask = 0; for (inuse = ~pc->pc_map[field] & pc_freemask[field]; inuse != 0; inuse &= ~(1UL << bit)) { bit = bsfl(inuse); @@ -2031,16 +2030,16 @@ pmap_pv_reclaim(pmap_t locked_pmap) TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_aflag_clear(m, PGA_WRITEABLE); + pc->pc_map[field] |= 1UL << bit; pmap_unuse_pt(pmap, va, &free); - freemask |= 1UL << bit; freed++; } - pc->pc_map[field] |= freemask; } if (freed == 0) { TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; } + /* Every freed mapping is for a 4 KB page. */ pmap->pm_stats.resident_count -= freed; PV_STAT(pv_entry_frees += freed); PV_STAT(pv_entry_spare += freed); @@ -2109,13 +2108,21 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv field = idx / 32; bit = idx % 32; pc->pc_map[field] |= 1ul << bit; - /* move to head of list */ - TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); for (idx = 0; idx < _NPCM; idx++) if (pc->pc_map[idx] != pc_freemask[idx]) { - TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + /* + * 98% of the time, pc is already at the head of the + * list. If it isn't already, move it to the head. + */ + if (__predict_false(TAILQ_FIRST(&pmap->pm_pvchunk) != + pc)) { + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, + pc_list); + } return; } + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); free_pv_chunk(pc); } @@ -2179,10 +2186,6 @@ retry: } TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); - if (pc != TAILQ_LAST(&pv_chunks, pch)) { - TAILQ_REMOVE(&pv_chunks, pc, pc_lru); - TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); - } PV_STAT(pv_entry_spare--); return (pv); } @@ -3539,7 +3542,7 @@ pmap_remove_pages(pmap_t pmap) TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { allfree = 1; for (field = 0; field < _NPCM; field++) { - inuse = (~(pc->pc_map[field])) & pc_freemask[field]; + inuse = ~pc->pc_map[field] & pc_freemask[field]; while (inuse != 0) { bit = bsfl(inuse); bitmask = 1UL << bit; From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 17:37:41 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 607DC106566C; Mon, 2 Jul 2012 17:37:41 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DA588FC0C; Mon, 2 Jul 2012 17:37:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62Hbf9X084486; Mon, 2 Jul 2012 17:37:41 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62Hbffl084484; Mon, 2 Jul 2012 17:37:41 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201207021737.q62Hbffl084484@svn.freebsd.org> From: Alan Cox Date: Mon, 2 Jul 2012 17:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238006 - stable/9/sys/amd64/amd64 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 17:37:41 -0000 Author: alc Date: Mon Jul 2 17:37:40 2012 New Revision: 238006 URL: http://svn.freebsd.org/changeset/base/238006 Log: MFC r237085 Correctly identify the function in a KASSERT(). Modified: stable/9/sys/amd64/amd64/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 17:22:38 2012 (r238005) +++ stable/9/sys/amd64/amd64/pmap.c Mon Jul 2 17:37:40 2012 (r238006) @@ -4409,8 +4409,9 @@ small_mappings: pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pde = pmap_pde(pmap, pv->pv_va); - KASSERT((*pde & PG_PS) == 0, ("pmap_clear_write: found" - " a 2mpage in page %p's pv list", m)); + KASSERT((*pde & PG_PS) == 0, + ("pmap_remove_write: found a 2mpage in page %p's pv list", + m)); pte = pmap_pde_to_pte(pde, pv->pv_va); retry: oldpte = *pte; From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 19:13:38 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4F511065677; Mon, 2 Jul 2012 19:13:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A907E8FC16; Mon, 2 Jul 2012 19:13:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62JDcT7088930; Mon, 2 Jul 2012 19:13:38 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62JDctC088928; Mon, 2 Jul 2012 19:13:38 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201207021913.q62JDctC088928@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 Jul 2012 19:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238012 - stable/9/sys/sparc64/conf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 19:13:38 -0000 Author: marius Date: Mon Jul 2 19:13:38 2012 New Revision: 238012 URL: http://svn.freebsd.org/changeset/base/238012 Log: MFC: r237842 Switch back to the 4BSD scheduler for now. There is some more or less recent regression with ULE, causing processes to get stuck in getblk as well as interrupt handler execution delays to rise above the command timeout of mpt(4). Modified: stable/9/sys/sparc64/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/sparc64/conf/GENERIC ============================================================================== --- stable/9/sys/sparc64/conf/GENERIC Mon Jul 2 18:35:08 2012 (r238011) +++ stable/9/sys/sparc64/conf/GENERIC Mon Jul 2 19:13:38 2012 (r238012) @@ -26,7 +26,7 @@ makeoptions DEBUG=-g # Build kernel wit # Platforms supported # At this time all platforms are supported, as-is. -options SCHED_ULE # ULE scheduler +options SCHED_4BSD # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 19:19:08 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFC021065675; Mon, 2 Jul 2012 19:19:08 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BD678FC0A; Mon, 2 Jul 2012 19:19:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62JJ8rM089222; Mon, 2 Jul 2012 19:19:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62JJ85x089217; Mon, 2 Jul 2012 19:19:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201207021919.q62JJ85x089217@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 Jul 2012 19:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238013 - in stable/9/sys: dev/mfi dev/mps dev/mpt kern X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 19:19:08 -0000 Author: marius Date: Mon Jul 2 19:19:07 2012 New Revision: 238013 URL: http://svn.freebsd.org/changeset/base/238013 Log: MFC: r237546 Correct sizeof usage Obtained from: DragonFly Modified: stable/9/sys/dev/mfi/mfi_tbolt.c stable/9/sys/dev/mps/mps_sas.c stable/9/sys/dev/mpt/mpt_cam.c stable/9/sys/kern/subr_firmware.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/mfi/mfi_tbolt.c ============================================================================== --- stable/9/sys/dev/mfi/mfi_tbolt.c Mon Jul 2 19:13:38 2012 (r238012) +++ stable/9/sys/dev/mfi/mfi_tbolt.c Mon Jul 2 19:19:07 2012 (r238013) @@ -1078,7 +1078,7 @@ mfi_tbolt_build_mpt_cmd(struct mfi_softc if (!req_desc) return NULL; - bzero(req_desc, sizeof(req_desc)); + bzero(req_desc, sizeof(*req_desc)); req_desc->header.RequestFlags = (MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO << MFI_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); req_desc->header.SMID = index; Modified: stable/9/sys/dev/mps/mps_sas.c ============================================================================== --- stable/9/sys/dev/mps/mps_sas.c Mon Jul 2 19:13:38 2012 (r238012) +++ stable/9/sys/dev/mps/mps_sas.c Mon Jul 2 19:19:07 2012 (r238013) @@ -2217,7 +2217,7 @@ mpssas_scsiio_complete(struct mps_softc sense_len = min(returned_sense_len, ccb->csio.sense_len - ccb->csio.sense_resid); bzero(&ccb->csio.sense_data, - sizeof(&ccb->csio.sense_data)); + sizeof(ccb->csio.sense_data)); bcopy(cm->cm_sense, &ccb->csio.sense_data, sense_len); ccb->ccb_h.status |= CAM_AUTOSNS_VALID; } Modified: stable/9/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/9/sys/dev/mpt/mpt_cam.c Mon Jul 2 19:13:38 2012 (r238012) +++ stable/9/sys/dev/mpt/mpt_cam.c Mon Jul 2 19:19:07 2012 (r238013) @@ -3187,7 +3187,7 @@ mpt_scsi_reply_frame_handler(struct mpt_ else ccb->csio.sense_resid = 0; - bzero(&ccb->csio.sense_data, sizeof(&ccb->csio.sense_data)); + bzero(&ccb->csio.sense_data, sizeof(ccb->csio.sense_data)); bcopy(req->sense_vbuf, &ccb->csio.sense_data, min(ccb->csio.sense_len, sense_returned)); } Modified: stable/9/sys/kern/subr_firmware.c ============================================================================== --- stable/9/sys/kern/subr_firmware.c Mon Jul 2 19:13:38 2012 (r238012) +++ stable/9/sys/kern/subr_firmware.c Mon Jul 2 19:19:07 2012 (r238013) @@ -193,7 +193,7 @@ firmware_register(const char *imagename, __func__, imagename); return NULL; } - bzero(frp, sizeof(frp)); /* start from a clean record */ + bzero(frp, sizeof(*frp)); /* start from a clean record */ frp->fw.name = imagename; frp->fw.data = data; frp->fw.datasize = datasize; From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 19:56:31 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C86DD106566C; Mon, 2 Jul 2012 19:56:31 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B60FD8FC12; Mon, 2 Jul 2012 19:56:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62JuVaG094099; Mon, 2 Jul 2012 19:56:31 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62JuVeS094097; Mon, 2 Jul 2012 19:56:31 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201207021956.q62JuVeS094097@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 Jul 2012 19:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238017 - stable/9/sys/dev/re X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 19:56:31 -0000 Author: marius Date: Mon Jul 2 19:56:31 2012 New Revision: 238017 URL: http://svn.freebsd.org/changeset/base/238017 Log: MFC: r237547 Fix size of the bcopy when extracting ethernet address Obtained from: DragonFly Modified: stable/9/sys/dev/re/if_re.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/re/if_re.c ============================================================================== --- stable/9/sys/dev/re/if_re.c Mon Jul 2 19:44:18 2012 (r238016) +++ stable/9/sys/dev/re/if_re.c Mon Jul 2 19:56:31 2012 (r238017) @@ -1527,7 +1527,7 @@ re_attach(device_t dev) re_read_eeprom(sc, (caddr_t)as, RL_EE_EADDR, 3); for (i = 0; i < ETHER_ADDR_LEN / 2; i++) as[i] = le16toh(as[i]); - bcopy(as, eaddr, sizeof(eaddr)); + bcopy(as, eaddr, ETHER_ADDR_LEN); } if (sc->rl_type == RL_8169) { From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 21:59:11 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06ADD106581C; Mon, 2 Jul 2012 21:59:11 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD1518FC1A; Mon, 2 Jul 2012 21:59:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62LxAfU002171; Mon, 2 Jul 2012 21:59:10 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62LxAcg002167; Mon, 2 Jul 2012 21:59:10 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201207022159.q62LxAcg002167@svn.freebsd.org> From: Sean Bruno Date: Mon, 2 Jul 2012 21:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238035 - stable/9/share/man/man4 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 21:59:11 -0000 Author: sbruno Date: Mon Jul 2 21:59:10 2012 New Revision: 238035 URL: http://svn.freebsd.org/changeset/base/238035 Log: MFC r237245, r237250, r237251, r237273, r237330 Document support for Intel Enhanced Speedstep Tech interface of cpufreq(4) via a new man page est(4) Document the two exposed tuneables of est(4). Numerous cleanups and mdoc updates from reviewers. Thanks to mav, joel, wblock, hrs, gjb Added: stable/9/share/man/man4/est.4 - copied, changed from r237245, head/share/man/man4/est.4 Modified: stable/9/share/man/man4/Makefile stable/9/share/man/man4/cpufreq.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Mon Jul 2 21:25:24 2012 (r238034) +++ stable/9/share/man/man4/Makefile Mon Jul 2 21:59:10 2012 (r238035) @@ -117,6 +117,7 @@ MAN= aac.4 \ enc.4 \ epair.4 \ esp.4 \ + est.4 \ et.4 \ eventtimers.4 \ exca.4 \ Modified: stable/9/share/man/man4/cpufreq.4 ============================================================================== --- stable/9/share/man/man4/cpufreq.4 Mon Jul 2 21:25:24 2012 (r238034) +++ stable/9/share/man/man4/cpufreq.4 Mon Jul 2 21:59:10 2012 (r238035) @@ -286,6 +286,7 @@ then it should set all elements to .Dv CPUFREQ_VAL_UNKNOWN . .Sh SEE ALSO .Xr acpi 4 , +.Xr est 4 , .Xr powerd 8 , .Xr sysctl 8 .Sh AUTHORS Copied and modified: stable/9/share/man/man4/est.4 (from r237245, head/share/man/man4/est.4) ============================================================================== --- head/share/man/man4/est.4 Mon Jun 18 23:18:49 2012 (r237245, copy source) +++ stable/9/share/man/man4/est.4 Mon Jul 2 21:59:10 2012 (r238035) @@ -63,11 +63,11 @@ behavior. .Bl -tag -width indent .It hw.est.msr_info Attempt to infer information from direct probing of the msr. -Should only be used in diagnostic cases +Should only be used in diagnostic cases .Pq default 0 .It hw.est.strict -Do not allow different cpus to be set to different frequencies. -It appears that this will only work on i386 systems +Validate frequency requested is accepted by the cpu when set. +It appears that this will only work on single core cpus. .Pq default 0 .El .Sh DIAGNOSTICS @@ -89,12 +89,10 @@ Consult your BIOS documentation for more is only found on supported Intel CPUs. .Sh SEE ALSO .Xr cpufreq 4 -.Sh SUPPORT -For general information and support, -go to the Intel 64 and IA-32 Architectures Software Developer -Manuals site. -.Pa http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html +.Rs +.%T "Intel 64 and IA-32 Architectures Software Developer Manuals" +.%U "http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html" +.Re .Sh AUTHORS -.Pp This manual page was written by .An Sean Bruno Aq sbruno@FreeBSD.org . From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 22:04:09 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D256B106566B; Mon, 2 Jul 2012 22:04:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE5008FC08; Mon, 2 Jul 2012 22:04:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62M49UX002505; Mon, 2 Jul 2012 22:04:09 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62M491o002503; Mon, 2 Jul 2012 22:04:09 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207022204.q62M491o002503@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 2 Jul 2012 22:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238037 - stable/9/sys/dev/cxgbe X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 22:04:10 -0000 Author: np Date: Mon Jul 2 22:04:09 2012 New Revision: 238037 URL: http://svn.freebsd.org/changeset/base/238037 Log: MFC r238028: Instruct the firmware not to provision resources for TCP offload if the kernel is being built without TCP_OFFLOAD. But never override toecaps_allowed if it has been set manually. Modified: stable/9/sys/dev/cxgbe/t4_main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Mon Jul 2 22:01:29 2012 (r238036) +++ stable/9/sys/dev/cxgbe/t4_main.c Mon Jul 2 22:04:09 2012 (r238037) @@ -222,7 +222,7 @@ TUNABLE_INT("hw.cxgbe.linkcaps_allowed", static int t4_niccaps_allowed = FW_CAPS_CONFIG_NIC; TUNABLE_INT("hw.cxgbe.niccaps_allowed", &t4_niccaps_allowed); -static int t4_toecaps_allowed = FW_CAPS_CONFIG_TOE; +static int t4_toecaps_allowed = -1; TUNABLE_INT("hw.cxgbe.toecaps_allowed", &t4_toecaps_allowed); static int t4_rdmacaps_allowed = 0; @@ -5492,6 +5492,12 @@ tweak_tunables(void) if (t4_nofldrxq1g < 1) t4_nofldrxq1g = min(nc, NOFLDRXQ_1G); + + if (t4_toecaps_allowed == -1) + t4_toecaps_allowed = FW_CAPS_CONFIG_TOE; +#else + if (t4_toecaps_allowed == -1) + t4_toecaps_allowed = 0; #endif if (t4_tmr_idx_10g < 0 || t4_tmr_idx_10g >= SGE_NTIMERS) From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 2 22:18:30 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CB511065816; Mon, 2 Jul 2012 22:18:30 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D438C8FC12; Mon, 2 Jul 2012 22:18:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q62MITOu003294; Mon, 2 Jul 2012 22:18:29 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q62MITR0003292; Mon, 2 Jul 2012 22:18:29 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201207022218.q62MITR0003292@svn.freebsd.org> From: Doug Barton Date: Mon, 2 Jul 2012 22:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238039 - stable/9/sys/conf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 22:18:30 -0000 Author: dougb Date: Mon Jul 2 22:18:29 2012 New Revision: 238039 URL: http://svn.freebsd.org/changeset/base/238039 Log: MFC r238038: Unfortunately the change in r237958 resulted in s/install/instclean/ due to the aggressive pattern matching of the :C modifier. I tested build and install in 2 phases, however with different solutions, resulting in the breakage. Mea culpa. The solution is to break out the all: target. This causes a few lines of code duplication, but now the all: target works as it should, and the other targets continue to work as they did before. While I'm here, add a ===> header line to the start of each port build to make it easier to find/more clear in the logs. Modified: stable/9/sys/conf/kern.post.mk Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/kern.post.mk ============================================================================== --- stable/9/sys/conf/kern.post.mk Mon Jul 2 22:14:58 2012 (r238038) +++ stable/9/sys/conf/kern.post.mk Mon Jul 2 22:18:29 2012 (r238039) @@ -60,11 +60,21 @@ PORTSMODULESENV=\ SRC_BASE=${SRC_BASE} \ OSVERSION=${OSRELDATE} \ WRKDIRPREFIX=${WRKDIRPREFIX} -.for __target in all install reinstall clean + +# The WRKDIR needs to be cleaned before building, and trying to change the target +# with a :C pattern below results in install -> instclean +all: +.for __i in ${PORTS_MODULES} + @${ECHO} "===> Ports module ${__i} (all)" + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean all +.endfor + +.for __target in install reinstall clean ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/all/clean all/:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} + @${ECHO} "===> Ports module ${__i} (${__target})" + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/} .endfor .endfor .endif From owner-svn-src-stable-9@FreeBSD.ORG Tue Jul 3 01:45:28 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA7A61065674; Tue, 3 Jul 2012 01:45:28 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5F8A8FC1A; Tue, 3 Jul 2012 01:45:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q631jSfl011961; Tue, 3 Jul 2012 01:45:28 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q631jS4d011959; Tue, 3 Jul 2012 01:45:28 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201207030145.q631jS4d011959@svn.freebsd.org> From: Andrew Thompson Date: Tue, 3 Jul 2012 01:45:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238047 - stable/9/sys/net X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 01:45:28 -0000 Author: thompsa Date: Tue Jul 3 01:45:28 2012 New Revision: 238047 URL: http://svn.freebsd.org/changeset/base/238047 Log: MFC r237852 Add the same check as vlan(4) where we ignore the ifnet departure event if the interface is just being renamed. PR: kern/169557 Modified: stable/9/sys/net/if_lagg.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/net/if_lagg.c ============================================================================== --- stable/9/sys/net/if_lagg.c Tue Jul 3 01:00:29 2012 (r238046) +++ stable/9/sys/net/if_lagg.c Tue Jul 3 01:45:28 2012 (r238047) @@ -797,6 +797,9 @@ lagg_port_ifdetach(void *arg __unused, s if ((lp = ifp->if_lagg) == NULL) return; + /* If the ifnet is just being renamed, don't do anything. */ + if (ifp->if_flags & IFF_RENAMING) + return; sc = lp->lp_softc; From owner-svn-src-stable-9@FreeBSD.ORG Tue Jul 3 07:03:15 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31728106564A; Tue, 3 Jul 2012 07:03:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A6A98FC12; Tue, 3 Jul 2012 07:03:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6373ETr027469; Tue, 3 Jul 2012 07:03:14 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6373EkS027467; Tue, 3 Jul 2012 07:03:14 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207030703.q6373EkS027467@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 3 Jul 2012 07:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238057 - stable/9/sys/dev/cxgbe X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 07:03:15 -0000 Author: np Date: Tue Jul 3 07:03:14 2012 New Revision: 238057 URL: http://svn.freebsd.org/changeset/base/238057 Log: MFC r238054: Fix inverted test that resulted in incorrect multicast hw programming. Modified: stable/9/sys/dev/cxgbe/t4_main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Tue Jul 3 07:01:12 2012 (r238056) +++ stable/9/sys/dev/cxgbe/t4_main.c Tue Jul 3 07:03:14 2012 (r238057) @@ -2143,7 +2143,7 @@ update_mac_settings(struct port_info *pi if_maddr_rlock(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family == AF_LINK) + if (ifma->ifma_addr->sa_family != AF_LINK) continue; mcaddr[i++] = LLADDR((struct sockaddr_dl *)ifma->ifma_addr); From owner-svn-src-stable-9@FreeBSD.ORG Tue Jul 3 08:21:56 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C31471065673; Tue, 3 Jul 2012 08:21:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACD568FC08; Tue, 3 Jul 2012 08:21:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q638LujL030830; Tue, 3 Jul 2012 08:21:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q638Ludh030828; Tue, 3 Jul 2012 08:21:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207030821.q638Ludh030828@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Jul 2012 08:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238060 - stable/9/usr.bin/killall X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 08:21:56 -0000 Author: kib Date: Tue Jul 3 08:21:56 2012 New Revision: 238060 URL: http://svn.freebsd.org/changeset/base/238060 Log: MFC r237844, r237845, r237846: Minor tweaks. Modified: stable/9/usr.bin/killall/killall.c Directory Properties: stable/9/usr.bin/killall/ (props changed) Modified: stable/9/usr.bin/killall/killall.c ============================================================================== --- stable/9/usr.bin/killall/killall.c Tue Jul 3 08:03:07 2012 (r238059) +++ stable/9/usr.bin/killall/killall.c Tue Jul 3 08:21:56 2012 (r238060) @@ -90,7 +90,7 @@ nosig(char *name) int main(int ac, char **av) { - struct kinfo_proc *procs = NULL, *newprocs; + struct kinfo_proc *procs, *newprocs; struct stat sb; struct passwd *pw; regex_t rgx; @@ -273,9 +273,6 @@ main(int ac, char **av) size = 0; mib[0] = CTL_KERN; mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PROC; - mib[3] = 0; - miblen = 3; if (user) { mib[2] = eflag ? KERN_PROC_UID : KERN_PROC_RUID; @@ -285,16 +282,20 @@ main(int ac, char **av) mib[2] = KERN_PROC_TTY; mib[3] = tdev; miblen = 4; + } else { + mib[2] = KERN_PROC_PROC; + mib[3] = 0; + miblen = 3; } + procs = NULL; st = sysctl(mib, miblen, NULL, &size, NULL, 0); do { size += size / 10; newprocs = realloc(procs, size); - if (newprocs == 0) { - if (procs) - free(procs); - errx(1, "could not reallocate memory"); + if (newprocs == NULL) { + free(procs); + err(1, "could not reallocate memory"); } procs = newprocs; st = sysctl(mib, miblen, procs, &size, NULL, 0); @@ -304,7 +305,7 @@ main(int ac, char **av) if (size % sizeof(struct kinfo_proc) != 0) { fprintf(stderr, "proc size mismatch (%zu total, %zu chunks)\n", size, sizeof(struct kinfo_proc)); - fprintf(stderr, "userland out of sync with kernel, recompile libkvm etc\n"); + fprintf(stderr, "userland out of sync with kernel\n"); exit(1); } nprocs = size / sizeof(struct kinfo_proc); From owner-svn-src-stable-9@FreeBSD.ORG Tue Jul 3 08:23:23 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BA4E1065670; Tue, 3 Jul 2012 08:23:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA1558FC18; Tue, 3 Jul 2012 08:23:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q638NMrW030946; Tue, 3 Jul 2012 08:23:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q638NMcD030944; Tue, 3 Jul 2012 08:23:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207030823.q638NMcD030944@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Jul 2012 08:23:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238061 - stable/9/usr.bin/killall X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 08:23:23 -0000 Author: kib Date: Tue Jul 3 08:23:22 2012 New Revision: 238061 URL: http://svn.freebsd.org/changeset/base/238061 Log: MFC 237847: Do not test ki_stat as mask. Modified: stable/9/usr.bin/killall/killall.c Directory Properties: stable/9/usr.bin/killall/ (props changed) Modified: stable/9/usr.bin/killall/killall.c ============================================================================== --- stable/9/usr.bin/killall/killall.c Tue Jul 3 08:21:56 2012 (r238060) +++ stable/9/usr.bin/killall/killall.c Tue Jul 3 08:23:22 2012 (r238061) @@ -314,7 +314,7 @@ main(int ac, char **av) mypid = getpid(); for (i = 0; i < nprocs; i++) { - if ((procs[i].ki_stat & SZOMB) == SZOMB && !zflag) + if (procs[i].ki_stat == SZOMB && !zflag) continue; thispid = procs[i].ki_pid; strlcpy(thiscmd, procs[i].ki_comm, sizeof(thiscmd)); From owner-svn-src-stable-9@FreeBSD.ORG Tue Jul 3 08:40:21 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC5B5106564A; Tue, 3 Jul 2012 08:40:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C74928FC08; Tue, 3 Jul 2012 08:40:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q638eLjH031655; Tue, 3 Jul 2012 08:40:21 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q638eLwK031652; Tue, 3 Jul 2012 08:40:21 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207030840.q638eLwK031652@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Jul 2012 08:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238062 - stable/9/sys/sys X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 08:40:22 -0000 Author: kib Date: Tue Jul 3 08:40:20 2012 New Revision: 238062 URL: http://svn.freebsd.org/changeset/base/238062 Log: MFC r237848: Remove stray blank line. Modified: stable/9/sys/sys/proc.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Tue Jul 3 08:23:22 2012 (r238061) +++ stable/9/sys/sys/proc.h Tue Jul 3 08:40:20 2012 (r238062) @@ -624,7 +624,6 @@ struct proc { #define P_SIGEVENT 0x200000 /* Process pending signals changed. */ #define P_SINGLE_BOUNDARY 0x400000 /* Threads should suspend at user boundary. */ #define P_HWPMC 0x800000 /* Process is using HWPMCs */ - #define P_JAILED 0x1000000 /* Process is in jail. */ #define P_ORPHAN 0x2000000 /* Orphaned. */ #define P_INEXEC 0x4000000 /* Process is in execve(). */ From owner-svn-src-stable-9@FreeBSD.ORG Tue Jul 3 15:37:37 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8FDE51065672; Tue, 3 Jul 2012 15:37:37 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DC128FC1C; Tue, 3 Jul 2012 15:37:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63FbbXE053469; Tue, 3 Jul 2012 15:37:37 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63FbbRY053467; Tue, 3 Jul 2012 15:37:37 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201207031537.q63FbbRY053467@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 3 Jul 2012 15:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238073 - stable/9/sys/powerpc/conf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 15:37:37 -0000 Author: ken Date: Tue Jul 3 15:37:36 2012 New Revision: 238073 URL: http://svn.freebsd.org/changeset/base/238073 Log: MFC 237878: r237878 | ken | 2012-06-30 23:32:26 -0600 (Sat, 30 Jun 2012) | 6 lines Now that the mps(4) driver is endian-safe, add it to the powerpc 32-bit GENERIC config file. Requested by: nwhitehorn Approved by: re (kensmith) Modified: stable/9/sys/powerpc/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/conf/GENERIC ============================================================================== --- stable/9/sys/powerpc/conf/GENERIC Tue Jul 3 15:15:41 2012 (r238072) +++ stable/9/sys/powerpc/conf/GENERIC Tue Jul 3 15:37:36 2012 (r238073) @@ -94,6 +94,7 @@ options AHC_REG_PRETTY_PRINT # Print re device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals From owner-svn-src-stable-9@FreeBSD.ORG Tue Jul 3 16:49:39 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02B3F106566C; Tue, 3 Jul 2012 16:49:39 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E42FD8FC0A; Tue, 3 Jul 2012 16:49:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63Gncji059615; Tue, 3 Jul 2012 16:49:38 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63GncV8059613; Tue, 3 Jul 2012 16:49:38 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201207031649.q63GncV8059613@svn.freebsd.org> From: Warren Block Date: Tue, 3 Jul 2012 16:49:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238080 - stable/9/share/man/man7 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 16:49:39 -0000 Author: wblock (doc committer) Date: Tue Jul 3 16:49:38 2012 New Revision: 238080 URL: http://svn.freebsd.org/changeset/base/238080 Log: MFC r238008: Add reference to portsnap(8). Submitted by: Tim Kientzle Approved by: re Modified: stable/9/share/man/man7/build.7 Directory Properties: stable/9/share/man/man7/ (props changed) Modified: stable/9/share/man/man7/build.7 ============================================================================== --- stable/9/share/man/man7/build.7 Tue Jul 3 16:32:47 2012 (r238079) +++ stable/9/share/man/man7/build.7 Tue Jul 3 16:49:38 2012 (r238080) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 27, 2012 +.Dd July 2, 2012 .Dt BUILD 7 .Os .Sh NAME @@ -40,9 +40,10 @@ normally and .Pa /usr/ports . These directories may be initially empty or non-existent until updated with -.Xr csup 1 +.Xr csup 1 , +.Xr svn 1 , or -.Xr svn 1 . +.Xr portsnap 8 . Directory .Pa /usr/src contains the @@ -608,6 +609,7 @@ make TARGET=sparc64 DESTDIR=/clients/spa .Xr release 7 , .Xr config 8 , .Xr mergemaster 8 , +.Xr portsnap 8 , .Xr reboot 8 , .Xr shutdown 8 .Sh AUTHORS From owner-svn-src-stable-9@FreeBSD.ORG Tue Jul 3 22:17:36 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D388A1065672; Tue, 3 Jul 2012 22:17:36 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B93158FC15; Tue, 3 Jul 2012 22:17:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q63MHa28073131; Tue, 3 Jul 2012 22:17:36 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q63MHaYP073128; Tue, 3 Jul 2012 22:17:36 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201207032217.q63MHaYP073128@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 3 Jul 2012 22:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238088 - in stable/9/sys/dev: cxgb cxgbe X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2012 22:17:36 -0000 Author: np Date: Tue Jul 3 22:17:36 2012 New Revision: 238088 URL: http://svn.freebsd.org/changeset/base/238088 Log: Do not enable IFCAP_TSO6 in cxgb(4) and cxgbe(4) in stable/9. The kernel code in 9 isn't quite ready for TSO6 yet. This is a direct commit to stable/9. IFCAP_TSO6 works properly in head and there is no need to disable it over there. Approved by: re (kib) Modified: stable/9/sys/dev/cxgb/cxgb_main.c stable/9/sys/dev/cxgbe/t4_main.c Modified: stable/9/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_main.c Tue Jul 3 21:41:19 2012 (r238087) +++ stable/9/sys/dev/cxgb/cxgb_main.c Tue Jul 3 22:17:36 2012 (r238088) @@ -987,7 +987,7 @@ cxgb_makedev(struct port_info *pi) #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6) -#define CXGB_CAP_ENABLE CXGB_CAP +#define CXGB_CAP_ENABLE (CXGB_CAP & ~IFCAP_TSO6) static int cxgb_port_attach(device_t dev) Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Tue Jul 3 21:41:19 2012 (r238087) +++ stable/9/sys/dev/cxgbe/t4_main.c Tue Jul 3 22:17:36 2012 (r238088) @@ -824,7 +824,7 @@ cxgbe_probe(device_t dev) #define T4_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6) -#define T4_CAP_ENABLE (T4_CAP) +#define T4_CAP_ENABLE (T4_CAP & ~IFCAP_TSO6) static int cxgbe_attach(device_t dev) From owner-svn-src-stable-9@FreeBSD.ORG Wed Jul 4 00:54:16 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8212106566B; Wed, 4 Jul 2012 00:54:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C37BA8FC08; Wed, 4 Jul 2012 00:54:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q640sGaS079459; Wed, 4 Jul 2012 00:54:16 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q640sGVh079457; Wed, 4 Jul 2012 00:54:16 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201207040054.q640sGVh079457@svn.freebsd.org> From: Xin LI Date: Wed, 4 Jul 2012 00:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238090 - stable/9/sys/amd64/conf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 00:54:17 -0000 Author: delphij Date: Wed Jul 4 00:54:16 2012 New Revision: 238090 URL: http://svn.freebsd.org/changeset/base/238090 Log: MFC r237901: tws(4) is interfaced with CAM so move it to the same section. Reported by: joel Approved by: re (kib) Modified: stable/9/sys/amd64/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/conf/GENERIC ============================================================================== --- stable/9/sys/amd64/conf/GENERIC Tue Jul 3 23:26:08 2012 (r238089) +++ stable/9/sys/amd64/conf/GENERIC Wed Jul 4 00:54:16 2012 (r238090) @@ -135,6 +135,7 @@ device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID device twa # 3ware 9000 series PATA/SATA RAID +device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller # RAID controllers device aac # Adaptec FSA RAID @@ -145,7 +146,6 @@ device mlx # Mylex DAC960 family #XXX pointer/int warnings #device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID -device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller From owner-svn-src-stable-9@FreeBSD.ORG Wed Jul 4 22:21:47 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 325FD106566B; Wed, 4 Jul 2012 22:21:47 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id A66938FC1A; Wed, 4 Jul 2012 22:21:46 +0000 (UTC) Received: from server.rulingia.com (c220-239-248-69.belrs5.nsw.optusnet.com.au [220.239.248.69]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q64MLjU6030783 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 5 Jul 2012 08:21:45 +1000 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q64MLeAn027865 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 5 Jul 2012 08:21:40 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q64MLeAN027864; Thu, 5 Jul 2012 08:21:40 +1000 (EST) (envelope-from peter) Date: Thu, 5 Jul 2012 08:21:40 +1000 From: Peter Jeremy To: "Pedro F. Giffuni" Message-ID: <20120704222140.GC27624@server.rulingia.com> References: <201206290301.q5T31d3S014661@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yVhtmJPUSI46BTXb" Content-Disposition: inline In-Reply-To: <201206290301.q5T31d3S014661@svn.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r237738 - stable/9/lib/libedit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 22:21:47 -0000 --yVhtmJPUSI46BTXb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Jun-29 03:01:39 +0000, "Pedro F. Giffuni" wrote: >Author: pfg >Date: Fri Jun 29 03:01:38 2012 >New Revision: 237738 >URL: http://svn.freebsd.org/changeset/base/237738 > >Log: > MFC r237448: > =20 > Merge changes from upstream libedit. This breaks sh(1) resizing for me (and appears to be the problem underlying kern/169603). Reverting this commit makes the problem go away. I have added more details to that PR. --=20 Peter Jeremy --yVhtmJPUSI46BTXb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/0wfQACgkQ/opHv/APuIezowCbBpFjrnKAXgJJgNmhi8B2W0fy ihkAn04p9kjNzntzQ+CLHHGV8ugDRGP4 =jCk1 -----END PGP SIGNATURE----- --yVhtmJPUSI46BTXb-- From owner-svn-src-stable-9@FreeBSD.ORG Wed Jul 4 22:34:51 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F8C11065674 for ; Wed, 4 Jul 2012 22:34:51 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm19-vm0.bullet.mail.sp2.yahoo.com (nm19-vm0.bullet.mail.sp2.yahoo.com [98.139.91.216]) by mx1.freebsd.org (Postfix) with SMTP id E362D8FC17 for ; Wed, 4 Jul 2012 22:34:50 +0000 (UTC) Received: from [72.30.22.77] by nm19.bullet.mail.sp2.yahoo.com with NNFMP; 04 Jul 2012 22:34:50 -0000 Received: from [98.139.91.26] by tm11.bullet.mail.sp2.yahoo.com with NNFMP; 04 Jul 2012 22:34:50 -0000 Received: from [127.0.0.1] by omp1026.mail.sp2.yahoo.com with NNFMP; 04 Jul 2012 22:34:50 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 705557.12109.bm@omp1026.mail.sp2.yahoo.com Received: (qmail 64222 invoked by uid 60001); 4 Jul 2012 22:34:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1341441290; bh=+vdmkm9v/R+hGJ62BHnngjGC3U6tNTYqs2SaJ0eiMrs=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=cU7jfvbvDoXIMqTuuzAzg0Wnpjq+3nPOy37Y2SXH25agQqbCnn6AqXlfF1QULWWzLjpW39bc5xJiFhQNLvLc+xBsC2cPK+buJ+ZnjvNOgUAYWiVHb7zN5nVef266SM4SF0iuZoO8ggyP4tBkn/QaI6Sa14Ca0x1g1xDMjE74RpA= X-YMail-OSG: VjUSZAkVM1lwvs0jr8SYqNwN6yl8820HD5qbfRoWm.ffdua 5HMwh9i1MMDBOz7GD8ewOSNkS39MBrGoU5dX0k8NxIXfSgYUHwc3vavZWoZu 0kuU686fjlkPE8.pR3BFBX..jP.a_g5YkZfBRVWTjVC8Dx8KBx9blm.wiqzL U_NVQFUa4JWBpfvH1JiryVui8YqwaP565Yj2SVoJm4OpyjetzsO_p9nmKTFK w6ySfVmCAJnbrNSyNfOmPWdikXlcNmnZA_loTPEy_.FrsYQBxTQYKju4VVMI mb7.YD_i1EIJ.T7i6uf0ORLVIvNO3fR1HnT_5LER3QKoLVMs2jRy5VHG4dWG XSFDDGuiV_28X1vZyiKQZ5e8RCc.mM1wZNJJrGZNO7mi5Wqbk51g8Ax_ZaqD 5JWcy6fzl96JTjIEuTfWnFSfbUGBllhN.adAFZT5IkhoDLE9sR2ftrBH8wkY FcxT1 Received: from [200.118.157.7] by web113515.mail.gq1.yahoo.com via HTTP; Wed, 04 Jul 2012 15:34:50 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.120.356233 Message-ID: <1341441290.47362.YahooMailClassic@web113515.mail.gq1.yahoo.com> Date: Wed, 4 Jul 2012 15:34:50 -0700 (PDT) From: Pedro Giffuni To: Peter Jeremy In-Reply-To: <20120704222140.GC27624@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r237738 - stable/9/lib/libedit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfg@freebsd.org List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 22:34:51 -0000 =0A--- Mer 4/7/12, Peter Jeremy ha scritto:=0A...=0A> = On 2012-Jun-29 03:01:39 +0000, "Pedro=0A> F. Giffuni" =0A>= wrote:=0A> >Author: pfg=0A> >Date: Fri Jun 29 03:01:38 2012=0A> >New Revis= ion: 237738=0A> >URL: http://svn.freebsd.org/changeset/base/237738=0A> >=0A= > >Log:=0A> >=A0 MFC=A0=A0=A0 r237448:=0A> >=A0 =0A> >=A0 Merge changes fro= m upstream libedit.=0A> =0A> This breaks sh(1) resizing for me (and appears= to be the=0A> problem underlying kern/169603).=A0 Reverting this commit=0A= > makes the problem go away.=A0 I have added more details=0A> to that PR.= =0A>=0A=0AExcellent news (the find, not the breakage)!=0A=0AI will try to p= inpoint and revert the specific change=0Athat may be causing this.=0A=0ATha= nks!=0A=0APedro.=0A =0A From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 5 01:47:05 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 679EF106564A for ; Thu, 5 Jul 2012 01:47:05 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm5.bullet.mail.sp2.yahoo.com (nm5.bullet.mail.sp2.yahoo.com [98.139.91.75]) by mx1.freebsd.org (Postfix) with SMTP id 2147D8FC12 for ; Thu, 5 Jul 2012 01:47:05 +0000 (UTC) Received: from [98.139.91.65] by nm5.bullet.mail.sp2.yahoo.com with NNFMP; 05 Jul 2012 01:46:59 -0000 Received: from [98.139.91.2] by tm5.bullet.mail.sp2.yahoo.com with NNFMP; 05 Jul 2012 01:46:59 -0000 Received: from [127.0.0.1] by omp1002.mail.sp2.yahoo.com with NNFMP; 05 Jul 2012 01:46:59 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 625903.51941.bm@omp1002.mail.sp2.yahoo.com Received: (qmail 94027 invoked by uid 60001); 5 Jul 2012 01:46:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1341452819; bh=240gzakUCIwbVYYF4O/5irYYM6ZWxViNELZqQm77yqU=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=eomv0GUlowkSaNDUwpInE4vQb38F+Bi/lRxhTDTrHkE4XQU8fxSf9wP1eSDy52vKYy12FSkYVf0WlY3ePOgbDZvUao05mhlSoV+bsHDCmW0YYfGSuRsz+ljo19whEXQGUrnlNt1mtSjURmor/XHE9/jfn/dMjLbpmTqI850i6eA= X-YMail-OSG: iSHFjfcVM1kl3AcSP4lUpc6wMIIxFXj_9K2uGK19bynCblB DnIBWWOJlvjKCK4j1RdV5lHM5X_OypSTymQ5FcC357w0mr13z5afqSc0r50J QumIU5PM0pWcYOgwBERdrvJx6kQkxWV7M3ec_m49avRJpAolFiXCposlQ77r dXT79UcmY81QycvpyZCpAKVlQv2tJjiOA1A7IJTEejUz1lPBPe9ly0KsGwv1 BA50vFGKY8rPwO711AR48PlhudvAr5PGDn6.V5dWbf7741ghZbwcfL7JEIZn YCjSza95C21B.zZXMGj7cOlG0j61ZKOfPaWo3lNza.QZ5vZkTXIg9wz_mgD7 5di.YGhQPvQpQ2Ic8warbm.q9je0pFFD2dph7DUKQ8h8294UvsLMmP86EfJG E_CodFeRA5q4oKtWMCJMLPX0T7yBn4cUfzhPtHmRBXOm9j5IL7bc6iutue2t kzMTwtx34iaEYEmBLIxUVTXra1_4yIezcLuxgOiP5QtHs8nixLV1Bn3m2H1g DfKBXDFWBY6gC2D5UaJCgd4.XAnwvSZLu_VCQuTpepPZsHoW0RwxNmrX0ijJ N5zZENNZf7yPDH4wbKVB.PXGoFGG5vwya3b1gDlL4Efo6dYPG0cJXgKnq Received: from [200.118.157.7] by web113501.mail.gq1.yahoo.com via HTTP; Wed, 04 Jul 2012 18:46:59 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.120.356233 Message-ID: <1341452819.93258.YahooMailClassic@web113501.mail.gq1.yahoo.com> Date: Wed, 4 Jul 2012 18:46:59 -0700 (PDT) From: Pedro Giffuni To: Peter Jeremy , davshao@gmail.com In-Reply-To: <20120704222140.GC27624@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r237738 - stable/9/lib/libedit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfg@freebsd.org List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 01:47:05 -0000 =0A--- Mer 4/7/12, Peter Jeremy ha scritto:=0A...=0A> = >Author: pfg=0A> >Date: Fri Jun 29 03:01:38 2012=0A> >New Revision: 237738= =0A> >URL: http://svn.freebsd.org/changeset/base/237738=0A> >=0A> >Log:=0A>= >=A0 MFC=A0=A0=A0 r237448:=0A> >=A0 =0A> >=A0 Merge changes from upstream = libedit.=0A> =0A> This breaks sh(1) resizing for me (and appears to be the= =0A> problem=0A> underlying kern/169603).=A0 Reverting this commit makes=0A= > the problem go=0A> away.=A0 I have added more details to that PR.=0A> =0A= =0AI found the problem:=0A=0Ahttps://bugzilla.redhat.com/show_bug.cgi?id=3D= 575383=0A=0AIt was fixed upstream so I will commit it soon.=0A=0AThanks!=0A= =0APedro.=0A From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 5 13:45:24 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 614D4106566C; Thu, 5 Jul 2012 13:45:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 328608FC17; Thu, 5 Jul 2012 13:45:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65DjOvQ076569; Thu, 5 Jul 2012 13:45:24 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65DjN2w076566; Thu, 5 Jul 2012 13:45:23 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201207051345.q65DjN2w076566@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 5 Jul 2012 13:45:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238129 - stable/9/share/man/man4 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 13:45:24 -0000 Author: trasz Date: Thu Jul 5 13:45:23 2012 New Revision: 238129 URL: http://svn.freebsd.org/changeset/base/238129 Log: MFC r237572: Add missing MLINKS for whatever -> if_whatever. Approved by: re (kib) Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Thu Jul 5 09:49:52 2012 (r238128) +++ stable/9/share/man/man4/Makefile Thu Jul 5 13:45:23 2012 (r238129) @@ -540,8 +540,11 @@ MAN= aac.4 \ MLINKS= ae.4 if_ae.4 MLINKS+=age.4 if_age.4 MLINKS+=agp.4 agpgart.4 +MLINKS+=alc.4 if_alc.4 MLINKS+=ale.4 if_ale.4 MLINKS+=altq.4 ALTQ.4 +MLINKS+=ath.4 if_ath.4 +MLINKS+=ath_pci.4 if_ath_pci.4 MLINKS+=an.4 if_an.4 MLINKS+=aue.4 if_aue.4 MLINKS+=axe.4 if_axe.4 @@ -551,9 +554,13 @@ MLINKS+=bge.4 if_bge.4 MLINKS+=bktr.4 brooktree.4 MLINKS+=bridge.4 if_bridge.4 MLINKS+=bwi.4 if_bwi.4 +MLINKS+=bwn.4 if_bwn.4 MLINKS+=cas.4 if_cas.4 +MLINKS+=cdce.4 if_cdce.4 MLINKS+=crypto.4 cryptodev.4 MLINKS+=cue.4 if_cue.4 +MLINKS+=cxgb.4 if_cxgb.4 +MLINKS+=cxgbe.4 if_cxgbe.4 MLINKS+=dc.4 if_dc.4 MLINKS+=de.4 if_de.4 MLINKS+=disc.4 if_disc.4 @@ -599,14 +606,19 @@ MLINKS+=ixgbe.4 if_ixgbe.4 MLINKS+=jme.4 if_jme.4 MLINKS+=kue.4 if_kue.4 MLINKS+=lagg.4 trunk.4 +MLINKS+=lagg.4 if_lagg.4 MLINKS+=le.4 if_le.4 MLINKS+=lge.4 if_lge.4 +MLINKS+=lmc.4 if_lmc.4 MLINKS+=lo.4 loop.4 MLINKS+=lp.4 plip.4 MLINKS+=malo.4 if_malo.4 MLINKS+=md.4 vn.4 MLINKS+=mem.4 kmem.4 MLINKS+=mn.4 if_mn.4 +MLINKS+=mos.4 if_mos.4 +MLINKS+=msk.4 if_msk.4 +MLINKS+=mwl.4 if_mwl.4 MLINKS+=mxge.4 if_mxge.4 MLINKS+=my.4 if_my.4 MLINKS+=${_ndis.4} ${_if_ndis.4} @@ -626,11 +638,13 @@ MLINKS+=re.4 if_re.4 MLINKS+=rl.4 if_rl.4 MLINKS+=rue.4 if_rue.4 MLINKS+=rum.4 if_rum.4 +MLINKS+=run.4 if_run.4 MLINKS+=scsi.4 CAM.4 \ scsi.4 cam.4 \ scsi.4 scbus.4 \ scsi.4 SCSI.4 MLINKS+=sf.4 if_sf.4 +MLINKS+=sge.4 if_sge.4 MLINKS+=sis.4 if_sis.4 MLINKS+=sk.4 if_sk.4 MLINKS+=smp.4 SMP.4 @@ -662,6 +676,7 @@ MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vpo.4 imm.4 MLINKS+=vr.4 if_vr.4 +MLINKS+=vte.4 if_vte.4 MLINKS+=${_vxge.4} ${_if_vxge.4} MLINKS+=watchdog.4 SW_WATCHDOG.4 MLINKS+=wb.4 if_wb.4 @@ -735,6 +750,9 @@ MLINKS+=lindev.4 full.4 .if ${MACHINE_CPUARCH} == "amd64" _qlxgb.4= qlxgb.4 _sfxge.4= sfxge.4 + +MLINKS+=qlxgb.4 if_qlxgb.4 +MLINKS+=sfxge.4 if_sfxge.4 .endif .if ${MACHINE_CPUARCH} == "powerpc" From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 5 15:32:31 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 973B01065675; Thu, 5 Jul 2012 15:32:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8160C8FC0A; Thu, 5 Jul 2012 15:32:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FWVWs081074; Thu, 5 Jul 2012 15:32:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FWVos081072; Thu, 5 Jul 2012 15:32:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207051532.q65FWVos081072@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Jul 2012 15:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238131 - stable/9/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:32:31 -0000 Author: mav Date: Thu Jul 5 15:32:31 2012 New Revision: 238131 URL: http://svn.freebsd.org/changeset/base/238131 Log: MFC r238011: Restore GPIO config quirks handling, lost during last big refactoring. This fixes sound from speakers on some laptops, including MacBook Pro. Approved by: re (kib) Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Thu Jul 5 15:23:45 2012 (r238130) +++ stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Thu Jul 5 15:32:31 2012 (r238131) @@ -401,12 +401,9 @@ hdaa_patch(struct hdaa_devinfo *devinfo) if (!(HDA_DEV_MATCH(hdac_quirks[i].model, subid) && HDA_DEV_MATCH(hdac_quirks[i].id, id))) continue; - if (hdac_quirks[i].set != 0) - devinfo->quirks |= - hdac_quirks[i].set; - if (hdac_quirks[i].unset != 0) - devinfo->quirks &= - ~(hdac_quirks[i].unset); + devinfo->quirks |= hdac_quirks[i].set; + devinfo->quirks &= ~(hdac_quirks[i].unset); + devinfo->gpio = hdac_quirks[i].gpio; } /* Apply per-widget patch. */ From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 5 15:34:56 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83EDB1065670; Thu, 5 Jul 2012 15:34:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DA8C8FC14; Thu, 5 Jul 2012 15:34:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FYugx081301; Thu, 5 Jul 2012 15:34:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FYuwK081299; Thu, 5 Jul 2012 15:34:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207051534.q65FYuwK081299@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Jul 2012 15:34:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238133 - stable/9/libexec/rtld-elf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:34:56 -0000 Author: kib Date: Thu Jul 5 15:34:55 2012 New Revision: 238133 URL: http://svn.freebsd.org/changeset/base/238133 Log: MFC r237659: Ensure that for the object which is a dependency for some filtee, relocations are performed before the object's initializer is called. Approved by: re (kensmith) Modified: stable/9/libexec/rtld-elf/rtld.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Thu Jul 5 15:34:04 2012 (r238132) +++ stable/9/libexec/rtld-elf/rtld.c Thu Jul 5 15:34:55 2012 (r238133) @@ -117,6 +117,10 @@ static void objlist_push_head(Objlist *, static void objlist_push_tail(Objlist *, Obj_Entry *); static void objlist_remove(Objlist *, Obj_Entry *); static void *path_enumerate(const char *, path_enum_proc, void *); +static int relocate_object_dag(Obj_Entry *root, bool bind_now, + Obj_Entry *rtldobj, int flags, RtldLockState *lockstate); +static int relocate_object(Obj_Entry *obj, bool bind_now, Obj_Entry *rtldobj, + int flags, RtldLockState *lockstate); static int relocate_objects(Obj_Entry *, bool, Obj_Entry *, int, RtldLockState *); static int resolve_objects_ifunc(Obj_Entry *first, bool bind_now, @@ -2217,52 +2221,70 @@ objlist_remove(Objlist *list, Obj_Entry } /* - * Relocate newly-loaded shared objects. The argument is a pointer to - * the Obj_Entry for the first such object. All objects from the first - * to the end of the list of objects are relocated. Returns 0 on success, - * or -1 on failure. + * Relocate dag rooted in the specified object. + * Returns 0 on success, or -1 on failure. */ + static int -relocate_objects(Obj_Entry *first, bool bind_now, Obj_Entry *rtldobj, +relocate_object_dag(Obj_Entry *root, bool bind_now, Obj_Entry *rtldobj, + int flags, RtldLockState *lockstate) +{ + Objlist_Entry *elm; + int error; + + error = 0; + STAILQ_FOREACH(elm, &root->dagmembers, link) { + error = relocate_object(elm->obj, bind_now, rtldobj, flags, + lockstate); + if (error == -1) + break; + } + return (error); +} + +/* + * Relocate single object. + * Returns 0 on success, or -1 on failure. + */ +static int +relocate_object(Obj_Entry *obj, bool bind_now, Obj_Entry *rtldobj, int flags, RtldLockState *lockstate) { - Obj_Entry *obj; - for (obj = first; obj != NULL; obj = obj->next) { if (obj->relocated) - continue; + return (0); obj->relocated = true; if (obj != rtldobj) - dbg("relocating \"%s\"", obj->path); + dbg("relocating \"%s\"", obj->path); if (obj->symtab == NULL || obj->strtab == NULL || - !(obj->valid_hash_sysv || obj->valid_hash_gnu)) { - _rtld_error("%s: Shared object has no run-time symbol table", - obj->path); - return -1; + !(obj->valid_hash_sysv || obj->valid_hash_gnu)) { + _rtld_error("%s: Shared object has no run-time symbol table", + obj->path); + return (-1); } if (obj->textrel) { - /* There are relocations to the write-protected text segment. */ - if (mprotect(obj->mapbase, obj->textsize, - PROT_READ|PROT_WRITE|PROT_EXEC) == -1) { - _rtld_error("%s: Cannot write-enable text segment: %s", - obj->path, rtld_strerror(errno)); - return -1; - } + /* There are relocations to the write-protected text segment. */ + if (mprotect(obj->mapbase, obj->textsize, + PROT_READ|PROT_WRITE|PROT_EXEC) == -1) { + _rtld_error("%s: Cannot write-enable text segment: %s", + obj->path, rtld_strerror(errno)); + return (-1); + } } /* Process the non-PLT relocations. */ if (reloc_non_plt(obj, rtldobj, flags, lockstate)) - return -1; + return (-1); if (obj->textrel) { /* Re-protected the text segment. */ - if (mprotect(obj->mapbase, obj->textsize, - PROT_READ|PROT_EXEC) == -1) { - _rtld_error("%s: Cannot write-protect text segment: %s", - obj->path, rtld_strerror(errno)); - return -1; - } + if (mprotect(obj->mapbase, obj->textsize, + PROT_READ|PROT_EXEC) == -1) { + _rtld_error("%s: Cannot write-protect text segment: %s", + obj->path, rtld_strerror(errno)); + return (-1); + } } @@ -2271,18 +2293,19 @@ relocate_objects(Obj_Entry *first, bool /* Process the PLT relocations. */ if (reloc_plt(obj) == -1) - return -1; + return (-1); /* Relocate the jump slots if we are doing immediate binding. */ if (obj->bind_now || bind_now) - if (reloc_jmpslots(obj, flags, lockstate) == -1) - return -1; + if (reloc_jmpslots(obj, flags, lockstate) == -1) + return (-1); if (obj->relro_size > 0) { - if (mprotect(obj->relro_page, obj->relro_size, PROT_READ) == -1) { - _rtld_error("%s: Cannot enforce relro protection: %s", - obj->path, rtld_strerror(errno)); - return -1; - } + if (mprotect(obj->relro_page, obj->relro_size, + PROT_READ) == -1) { + _rtld_error("%s: Cannot enforce relro protection: %s", + obj->path, rtld_strerror(errno)); + return (-1); + } } /* @@ -2292,9 +2315,30 @@ relocate_objects(Obj_Entry *first, bool */ obj->magic = RTLD_MAGIC; obj->version = RTLD_VERSION; - } - return (0); + return (0); +} + +/* + * Relocate newly-loaded shared objects. The argument is a pointer to + * the Obj_Entry for the first such object. All objects from the first + * to the end of the list of objects are relocated. Returns 0 on success, + * or -1 on failure. + */ +static int +relocate_objects(Obj_Entry *first, bool bind_now, Obj_Entry *rtldobj, + int flags, RtldLockState *lockstate) +{ + Obj_Entry *obj; + int error; + + for (error = 0, obj = first; obj != NULL; obj = obj->next) { + error = relocate_object(obj, bind_now, rtldobj, flags, + lockstate); + if (error == -1) + break; + } + return (error); } /* @@ -2614,10 +2658,10 @@ dlopen_object(const char *name, int fd, result = rtld_verify_versions(&obj->dagmembers); if (result != -1 && ld_tracing) goto trace; - if (result == -1 || (relocate_objects(obj, - (mode & RTLD_MODEMASK) == RTLD_NOW, &obj_rtld, + if (result == -1 || relocate_object_dag(obj, + (mode & RTLD_MODEMASK) == RTLD_NOW, &obj_rtld, (lo_flags & RTLD_LO_EARLY) ? SYMLOOK_EARLY : 0, - lockstate)) == -1) { + lockstate) == -1) { dlopen_cleanup(obj); obj = NULL; } else if (lo_flags & RTLD_LO_EARLY) { From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 5 15:36:00 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7CE11065670; Thu, 5 Jul 2012 15:35:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C20468FC12; Thu, 5 Jul 2012 15:35:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FZxXY081379; Thu, 5 Jul 2012 15:35:59 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FZxCu081374; Thu, 5 Jul 2012 15:35:59 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207051535.q65FZxCu081374@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Jul 2012 15:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238134 - in stable/9/sys/dev/usb: . controller X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:36:00 -0000 Author: mav Date: Thu Jul 5 15:35:59 2012 New Revision: 238134 URL: http://svn.freebsd.org/changeset/base/238134 Log: MFC r238015: Add IDs for some USB controllers I have around. Just a cosmetics. Approved by: re (kib) Modified: stable/9/sys/dev/usb/controller/ehci_pci.c stable/9/sys/dev/usb/controller/ohci_pci.c stable/9/sys/dev/usb/controller/xhci_pci.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_pci.c Thu Jul 5 15:34:55 2012 (r238133) +++ stable/9/sys/dev/usb/controller/ehci_pci.c Thu Jul 5 15:35:59 2012 (r238134) @@ -104,9 +104,6 @@ ehci_pci_match(device_t self) uint32_t device_id = pci_get_devid(self); switch (device_id) { - case 0x268c8086: - return ("Intel 63XXESB USB 2.0 controller"); - case 0x523910b9: return "ALi M5239 USB 2.0 controller"; @@ -120,7 +117,13 @@ ehci_pci_match(device_t self) return "ATI SB200 USB 2.0 controller"; case 0x43731002: return "ATI SB400 USB 2.0 controller"; + case 0x43961002: + return ("AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller"); + case 0x1e268086: + return ("Intel Panther Point USB 2.0 controller"); + case 0x1e2d8086: + return ("Intel Panther Point USB 2.0 controller"); case 0x25ad8086: return "Intel 6300ESB USB 2.0 controller"; case 0x24cd8086: @@ -129,9 +132,10 @@ ehci_pci_match(device_t self) return "Intel 82801EB/R (ICH5) USB 2.0 controller"; case 0x265c8086: return "Intel 82801FB (ICH6) USB 2.0 controller"; + case 0x268c8086: + return ("Intel 63XXESB USB 2.0 controller"); case 0x27cc8086: return "Intel 82801GB/R (ICH7) USB 2.0 controller"; - case 0x28368086: return "Intel 82801H (ICH8) USB 2.0 controller USB2-A"; case 0x283a8086: Modified: stable/9/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ohci_pci.c Thu Jul 5 15:34:55 2012 (r238133) +++ stable/9/sys/dev/usb/controller/ohci_pci.c Thu Jul 5 15:35:59 2012 (r238134) @@ -132,6 +132,10 @@ ohci_pci_match(device_t self) return "ATI SB400 USB Controller"; case 0x43751002: return "ATI SB400 USB Controller"; + case 0x43971002: + return ("AMD SB7x0/SB8x0/SB9x0 USB controller"); + case 0x43991002: + return ("AMD SB7x0/SB8x0/SB9x0 USB controller"); case 0x06701095: return ("CMD Tech 670 (USB0670) USB controller"); Modified: stable/9/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci_pci.c Thu Jul 5 15:34:55 2012 (r238133) +++ stable/9/sys/dev/usb/controller/xhci_pci.c Thu Jul 5 15:35:59 2012 (r238134) @@ -93,6 +93,19 @@ MODULE_DEPEND(xhci, usb, 1, 1, 1); static const char * xhci_pci_match(device_t self) { + uint32_t device_id = pci_get_devid(self); + + switch (device_id) { + case 0x01941033: + return ("NEC uPD720200 USB 3.0 controller"); + + case 0x1e318086: + return ("Intel Panther Point USB 3.0 controller"); + + default: + break; + } + if ((pci_get_class(self) == PCIC_SERIALBUS) && (pci_get_subclass(self) == PCIS_SERIALBUS_USB) && (pci_get_progif(self) == PCIP_SERIALBUS_USB_XHCI)) { Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Thu Jul 5 15:34:55 2012 (r238133) +++ stable/9/sys/dev/usb/usbdevs Thu Jul 5 15:35:59 2012 (r238134) @@ -559,6 +559,7 @@ vendor APACER 0x1005 Apacer vendor MOTOROLA4 0x100d Motorola vendor AIRPLUS 0x1011 Airplus vendor DESKNOTE 0x1019 Desknote +vendor NEC3 0x1033 NEC vendor GIGABYTE 0x1044 GIGABYTE vendor WESTERN 0x1058 Western Digital vendor MOTOROLA 0x1063 Motorola @@ -1916,6 +1917,7 @@ product INSYSTEM STORAGE_V2 0x5701 USB S product INTEL EASYPC_CAMERA 0x0110 Easy PC Camera product INTEL TESTBOARD 0x9890 82930 test board product INTEL2 IRMH 0x0020 Integrated Rate Matching Hub +product INTEL2 IRMH2 0x0024 Integrated Rate Matching Hub /* Intersil products */ product INTERSIL PRISM_GT 0x1000 PrismGT USB 2.0 WLAN From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 5 15:38:33 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FDAA1065703; Thu, 5 Jul 2012 15:38:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19D728FC1E; Thu, 5 Jul 2012 15:38:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FcWOZ081636; Thu, 5 Jul 2012 15:38:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FcWGA081633; Thu, 5 Jul 2012 15:38:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207051538.q65FcWGA081633@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Jul 2012 15:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238136 - stable/9/lib/libc/gen X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:38:33 -0000 Author: kib Date: Thu Jul 5 15:38:32 2012 New Revision: 238136 URL: http://svn.freebsd.org/changeset/base/238136 Log: MFC r237660: Optimize the handling of SC_NPROCESSORS_CONF, by using auxv AT_NCPU value if present. Approved by: re (kensmith) Modified: stable/9/lib/libc/gen/sysconf.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/sysconf.c ============================================================================== --- stable/9/lib/libc/gen/sysconf.c Thu Jul 5 15:37:17 2012 (r238135) +++ stable/9/lib/libc/gen/sysconf.c Thu Jul 5 15:38:32 2012 (r238136) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include "../stdlib/atexit.h" #include "tzfile.h" /* from ../../../contrib/tzcode/stdtime */ +#include "libc_private.h" #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ @@ -585,6 +587,8 @@ yesno: case _SC_NPROCESSORS_CONF: case _SC_NPROCESSORS_ONLN: + if (_elf_aux_info(AT_NCPUS, &value, sizeof(value)) == 0) + return ((long)value); mib[0] = CTL_HW; mib[1] = HW_NCPU; break; From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 5 15:39:31 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6432C1065672; Thu, 5 Jul 2012 15:39:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 352438FC22; Thu, 5 Jul 2012 15:39:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FdVXQ081737; Thu, 5 Jul 2012 15:39:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FdVOO081735; Thu, 5 Jul 2012 15:39:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207051539.q65FdVOO081735@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Jul 2012 15:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238137 - stable/9/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:39:31 -0000 Author: mav Date: Thu Jul 5 15:39:30 2012 New Revision: 238137 URL: http://svn.freebsd.org/changeset/base/238137 Log: MFC r238022: Remove 14 not very useful characters " HDA CODEC PCM" from HDA pcm device names to shorten them. PulseAudio reported to have problems with names longer then 63 chars and at least in XMMS long names are inconvinient. Approved by: re (kib) Modified: stable/9/sys/dev/sound/pci/hda/hdaa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdaa.c Thu Jul 5 15:38:32 2012 (r238136) +++ stable/9/sys/dev/sound/pci/hda/hdaa.c Thu Jul 5 15:39:30 2012 (r238137) @@ -6203,12 +6203,14 @@ hdaa_resume(device_t dev) static int hdaa_probe(device_t dev) { + const char *pdesc; char buf[128]; if (hda_get_node_type(dev) != HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO) return (ENXIO); - snprintf(buf, sizeof(buf), "%s Audio Function Group", - device_get_desc(device_get_parent(dev))); + pdesc = device_get_desc(device_get_parent(dev)); + snprintf(buf, sizeof(buf), "%.*s Audio Function Group", + (int)(strlen(pdesc) - 10), pdesc); device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } @@ -6565,6 +6567,7 @@ hdaa_pcm_probe(device_t dev) struct hdaa_pcm_devinfo *pdevinfo = (struct hdaa_pcm_devinfo *)device_get_ivars(dev); struct hdaa_devinfo *devinfo = pdevinfo->devinfo; + const char *pdesc; char chans1[8], chans2[8]; char buf[128]; int loc1, loc2, t1, t2; @@ -6610,8 +6613,9 @@ hdaa_pcm_probe(device_t dev) t1 = -2; if (pdevinfo->digital) t1 = -2; - snprintf(buf, sizeof(buf), "%s PCM (%s%s%s%s%s%s%s%s%s)", - device_get_desc(device_get_parent(device_get_parent(dev))), + pdesc = device_get_desc(device_get_parent(dev)); + snprintf(buf, sizeof(buf), "%.*s (%s%s%s%s%s%s%s%s%s)", + (int)(strlen(pdesc) - 21), pdesc, loc1 >= 0 ? HDA_LOCS[loc1] : "", loc1 >= 0 ? " " : "", (pdevinfo->digital == 0x7)?"HDMI/DP": ((pdevinfo->digital == 0x5)?"DisplayPort": From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 5 15:41:31 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC62610656B5; Thu, 5 Jul 2012 15:41:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 929E58FC12; Thu, 5 Jul 2012 15:41:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FfVpL081929; Thu, 5 Jul 2012 15:41:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FfVC1081927; Thu, 5 Jul 2012 15:41:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207051541.q65FfVC1081927@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Jul 2012 15:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238139 - stable/9/tools/test/auxinfo X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:41:32 -0000 Author: kib Date: Thu Jul 5 15:41:31 2012 New Revision: 238139 URL: http://svn.freebsd.org/changeset/base/238139 Log: MFC r237661: Add a test for number of CPUs configured/online. Approved by: re (kensmith) Modified: stable/9/tools/test/auxinfo/auxinfo.c Directory Properties: stable/9/tools/test/auxinfo/ (props changed) Modified: stable/9/tools/test/auxinfo/auxinfo.c ============================================================================== --- stable/9/tools/test/auxinfo/auxinfo.c Thu Jul 5 15:40:41 2012 (r238138) +++ stable/9/tools/test/auxinfo/auxinfo.c Thu Jul 5 15:41:31 2012 (r238139) @@ -47,6 +47,13 @@ test_osreldate(void) printf("OSRELDATE: %d\n", getosreldate()); } +static void +test_ncpus(void) +{ + + printf("NCPUs: %ld\n", sysconf(_SC_NPROCESSORS_CONF)); +} + int main(int argc __unused, char *argv[] __unused) { @@ -54,5 +61,6 @@ main(int argc __unused, char *argv[] __u test_pagesizes(); test_pagesize(); test_osreldate(); + test_ncpus(); return (0); } From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 5 16:02:15 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00662106564A; Thu, 5 Jul 2012 16:02:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD8698FC12; Thu, 5 Jul 2012 16:02:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65G2EAA082884; Thu, 5 Jul 2012 16:02:14 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65G2EGb082881; Thu, 5 Jul 2012 16:02:14 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201207051602.q65G2EGb082881@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 5 Jul 2012 16:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238140 - stable/9/share/man/man4 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 16:02:15 -0000 Author: trasz Date: Thu Jul 5 16:02:14 2012 New Revision: 238140 URL: http://svn.freebsd.org/changeset/base/238140 Log: MFC r237636: Add manual page for bxe(4). Approved by: re (kib) Added: stable/9/share/man/man4/bxe.4 - copied unchanged from r237636, head/share/man/man4/bxe.4 Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Thu Jul 5 15:41:31 2012 (r238139) +++ stable/9/share/man/man4/Makefile Thu Jul 5 16:02:14 2012 (r238140) @@ -37,6 +37,7 @@ MAN= aac.4 \ ${_amdsbwd.4} \ ${_amdsmb.4} \ ${_amdtemp.4} \ + ${_bxe.4} \ amr.4 \ an.4 \ ${_apic.4} \ @@ -555,6 +556,7 @@ MLINKS+=bktr.4 brooktree.4 MLINKS+=bridge.4 if_bridge.4 MLINKS+=bwi.4 if_bwi.4 MLINKS+=bwn.4 if_bwn.4 +MLINKS+=${_bxe.4} ${_if_bxe.4} MLINKS+=cas.4 if_cas.4 MLINKS+=cdce.4 if_cdce.4 MLINKS+=crypto.4 cryptodev.4 @@ -706,6 +708,7 @@ _amdsmb.4= amdsmb.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 _atp.4= atp.4 +_bxe.4= bxe.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 @@ -715,6 +718,7 @@ _hptmv.4= hptmv.4 _hptrr.4= hptrr.4 _i8254.4= i8254.4 _ichwd.4= ichwd.4 +_if_bxe.4= if_bxe.4 _if_ndis.4= if_ndis.4 _if_nfe.4= if_nfe.4 _if_nve.4= if_nve.4 Copied: stable/9/share/man/man4/bxe.4 (from r237636, head/share/man/man4/bxe.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man4/bxe.4 Thu Jul 5 16:02:14 2012 (r238140, copy of r237636, head/share/man/man4/bxe.4) @@ -0,0 +1,138 @@ +.\" Copyright (c) 2012 Edward Tomasz Napierala +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" 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. +.\" 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. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 25, 2012 +.Dt BXE 4 +.Os +.Sh NAME +.Nm bxe +.Nd "Broadcom BCM57710/BCM57711/BCM57711E 10Gb Ethernet adapter driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device bxe" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_bxe_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for PCIe 10GbE Ethernet adapters based on +BCM5771x chips. +The driver supports Jumbo Frames, VLAN tagging, IP, UDP and TCP checksum +offload, MSI-X, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), +and Receive Side Steering (RSS). +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for various NICs based on the Broadcom BCM5771x +family of 10GbE Ethernet controller chips, including the +following: +.Pp +.Bl -bullet -compact +.It +Broadcom NetXtreme II BCM57710 10GbE +.It +Broadcom NetXtreme II BCM57711 10GbE +.It +Broadcom NetXtreme II BCM57711E 10GbE +.El +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va hw.bxe.dcc_enable +Enable HP Flex-10 support. +Allowed values are 0 to disable and 1 to enable. +The default value is 0. +.It Va hw.bxe.tso_enable +Enable TCP Segmentation Offload. +The default value is 1. +.It Va hw.bxe.int_mode +Set interrupt mode. +Allowed values are 0 for IRQ, 1 for MSI/IRQ and 2 for MSI-X/MSI/IRQ. +The default value is 2. +.It Va hw.bxe.queue_count +Specify the number of queues that will be used when a multi-queue +RSS mode is selected using bxe_multi_mode. +Allowed values are 0 for Auto or 1 to 16 for fixed number of queues. +The default value is 0. +.It Va hw.bxe.multi_mode +Enable Receive Side Steering. +Allowed values are 0, which disables all multi-queue/packet sorting +algorithms, and 1, which assigns incoming frames to receive queues +according to RSS. +The default value is 0. +.It Va hw.bxe.rx_ticks +Control interrupt coalescing for received frames. +The first frame always causes an interrupt, but subsequent frames +are coalesced until the RX/TX ticks timer value expires and another +interrupt occurs. +The default value is 25. +.It Va hw.bxe.tx_ticks +Control interrupt coalescing for trasmitted frames. +The first frame always causes an interrupt, but subsequent frames +are coalesced until the RX/TX ticks timer value expires and another +interrupt occurs. +The default value is 50. +.It Va hw.bxe.mrrs +Allows to set the PCIe maximum read request size. +Allowed values are -1 for Auto, 0 for 128B, 1 for 256B, 2 for 512B, +and 3 for 1kB. +The default value is -1. +.El +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Gary Zambrano Aq zambrano@broadcom.com +and +.An David Christensen Aq davidch@broadcom.com . From owner-svn-src-stable-9@FreeBSD.ORG Fri Jul 6 01:32:54 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2DA7A106564A; Fri, 6 Jul 2012 01:32:54 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 182418FC12; Fri, 6 Jul 2012 01:32:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q661Wr7L031246; Fri, 6 Jul 2012 01:32:53 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q661Wrgu031244; Fri, 6 Jul 2012 01:32:53 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201207060132.q661Wrgu031244@svn.freebsd.org> From: "Andrey A. Chernov" Date: Fri, 6 Jul 2012 01:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238158 - stable/9/usr.sbin/vidcontrol X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 01:32:54 -0000 Author: ache Date: Fri Jul 6 01:32:53 2012 New Revision: 238158 URL: http://svn.freebsd.org/changeset/base/238158 Log: MFC r237777 Call set_terminal_mode() after video mode change, not before, because video mode change always reset terminal mode to xterm. It allows things like 'vidcontrol -T cons25 80x30' works as supposed, and allows 'allscreens_flags="-T cons25 80x30"' in /etc/rc.conf too. Approved by: re (hrs) Modified: stable/9/usr.sbin/vidcontrol/vidcontrol.c Directory Properties: stable/9/usr.sbin/vidcontrol/ (props changed) Modified: stable/9/usr.sbin/vidcontrol/vidcontrol.c ============================================================================== --- stable/9/usr.sbin/vidcontrol/vidcontrol.c Fri Jul 6 00:58:27 2012 (r238157) +++ stable/9/usr.sbin/vidcontrol/vidcontrol.c Fri Jul 6 01:32:53 2012 (r238158) @@ -1194,15 +1194,13 @@ set_terminal_mode(char *arg) fprintf(stderr, "\033[=T"); else if (strcmp(arg, "cons25") == 0) fprintf(stderr, "\033[=1T"); - else - usage(); } int main(int argc, char **argv) { - char *font, *type; + char *font, *type, *termmode; int dumpmod, dumpopt, opt; int reterr; @@ -1214,6 +1212,7 @@ main(int argc, char **argv) err(1, "must be on a virtual console"); dumpmod = 0; dumpopt = DUMP_FBF; + termmode = NULL; while ((opt = getopt(argc, argv, "b:Cc:df:g:h:Hi:l:LM:m:pPr:S:s:T:t:x")) != -1) switch(opt) { @@ -1285,7 +1284,10 @@ main(int argc, char **argv) set_console(optarg); break; case 'T': - set_terminal_mode(optarg); + if (strcmp(optarg, "xterm") != 0 && + strcmp(optarg, "cons25") != 0) + usage(); + termmode = optarg; break; case 't': set_screensaver_timeout(optarg); @@ -1308,6 +1310,8 @@ main(int argc, char **argv) } video_mode(argc, argv, &optind); + if (termmode != NULL) + set_terminal_mode(termmode); get_normal_colors(argc, argv, &optind); From owner-svn-src-stable-9@FreeBSD.ORG Fri Jul 6 03:56:46 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E378106564A; Fri, 6 Jul 2012 03:56:46 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E5E88FC08; Fri, 6 Jul 2012 03:56:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q663ukbi037551; Fri, 6 Jul 2012 03:56:46 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q663ukLp037549; Fri, 6 Jul 2012 03:56:46 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201207060356.q663ukLp037549@svn.freebsd.org> From: Benjamin Kaduk Date: Fri, 6 Jul 2012 03:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238162 - stable/9/share/man/man5 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 03:56:46 -0000 Author: bjk (doc committer) Date: Fri Jul 6 03:56:45 2012 New Revision: 238162 URL: http://svn.freebsd.org/changeset/base/238162 Log: MFC r237581: Explicitly mention that setting the change and expiry times to zero is equivalent to leaving the time unset. [1] Wordsmith in the compat support section. Use a full path to nologin(8) in the context of setting it as a user's shell, keeping a separate cross-reference. PR: docs/169354 [1] Approved by: re (hrs), hrs (mentor) Modified: stable/9/share/man/man5/passwd.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/passwd.5 ============================================================================== --- stable/9/share/man/man5/passwd.5 Fri Jul 6 03:44:40 2012 (r238161) +++ stable/9/share/man/man5/passwd.5 Fri Jul 6 03:56:45 2012 (r238162) @@ -35,7 +35,7 @@ .\" From: @(#)passwd.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 8, 2007 +.Dd June 23, 2012 .Dt PASSWD 5 .Os .Sh NAME @@ -203,7 +203,8 @@ field is the number of seconds from the .Dv UTC , until the password for the account must be changed. -This field may be left empty to turn off the password aging feature. +This field may be left empty to turn off the password aging feature; +a value of zero is equivalent to leaving the field empty. .Pp The .Ar expire @@ -211,7 +212,8 @@ field is the number of seconds from the .Dv UTC , until the account expires. -This field may be left empty to turn off the account aging feature. +This field may be left empty to turn off the account aging feature; +a value of zero is equivalent to leaving the field empty. .Pp The .Ar gecos @@ -271,7 +273,8 @@ as it is done for system accounts, is to set its .Ar shell to -.Xr nologin 8 . +.Pa /sbin/nologin +.Pq see Xr nologin 8 . .Sh HESIOD SUPPORT If .Sq Li dns @@ -363,7 +366,7 @@ fields, the specified numbers will overr from the Hesiod domain or the .Tn NIS maps. -As well, if the +Likewise, if the .Ar gecos , .Ar dir or @@ -399,7 +402,8 @@ The additional fields .Ar change and .Ar expire -are added, but are turned off by default. +are added, but are turned off by default +.Pq setting these fields to zero is equivalent to leaving them blank . Class is currently not implemented, but change and expire are; to set them, use the current day in seconds from the epoch + whatever number of seconds of offset you want. From owner-svn-src-stable-9@FreeBSD.ORG Fri Jul 6 17:42:35 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD078106564A; Fri, 6 Jul 2012 17:42:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6F168FC0A; Fri, 6 Jul 2012 17:42:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q66HgYkL074137; Fri, 6 Jul 2012 17:42:34 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q66HgYdM074135; Fri, 6 Jul 2012 17:42:34 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201207061742.q66HgYdM074135@svn.freebsd.org> From: Dimitry Andric Date: Fri, 6 Jul 2012 17:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238177 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2012 17:42:35 -0000 Author: dim Date: Fri Jul 6 17:42:34 2012 New Revision: 238177 URL: http://svn.freebsd.org/changeset/base/238177 Log: MFC r238071: Fix clang warning, introduced in the recent dtrace import. Approved by: re (kib) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Directory Properties: stable/9/cddl/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Fri Jul 6 17:07:50 2012 (r238176) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Fri Jul 6 17:42:34 2012 (r238177) @@ -796,7 +796,7 @@ dt_print_llquantize(dtrace_hdl_t *dtp, F return (0); assert(last_bin == bin); - (void) snprintf(c, sizeof (c), ">= %lld", value); + (void) snprintf(c, sizeof (c), ">= %lld", (long long)value); if (dt_printf(dtp, fp, "%16s ", c) < 0) return (-1);