Re: svn commit: r301998 - in head: sbin/pfctl share/man/man5 sys/net sys/netpfil/pf
Thanks to work on it Kristof! On Jun 18, 2016 2:22 AM, "Kristof Provost"wrote: > Author: kp > Date: Fri Jun 17 18:21:55 2016 > New Revision: 301998 > URL: https://svnweb.freebsd.org/changeset/base/301998 > > Log: > pf: Filter on and set vlan PCP values > > Adopt the OpenBSD syntax for setting and filtering on VLAN PCP values. > This > introduces two new keywords: 'set prio' to set the PCP value, and 'prio' > to > filter on it. > > Reviewed by:allanjude, araujo > Approved by: re (gjb) > Obtained from: OpenBSD (mostly) > Differential Revision: https://reviews.freebsd.org/D6786 > > Modified: > head/sbin/pfctl/parse.y > head/sbin/pfctl/pfctl_parser.c > head/share/man/man5/pf.conf.5 > head/sys/net/pfvar.h > head/sys/netpfil/pf/pf.c > head/sys/netpfil/pf/pf_ioctl.c > > Modified: head/sbin/pfctl/parse.y > > == > --- head/sbin/pfctl/parse.y Fri Jun 17 17:34:28 2016(r301997) > +++ head/sbin/pfctl/parse.y Fri Jun 17 18:21:55 2016(r301998) > @@ -217,6 +217,8 @@ struct filter_opts { > #define FOM_TOS0x04 > #define FOM_KEEP 0x08 > #define FOM_SRCTRACK 0x10 > +#define FOM_SETPRIO0x0400 > +#define FOM_PRIO 0x2000 > struct node_uid *uid; > struct node_gid *gid; > struct { > @@ -240,6 +242,8 @@ struct filter_opts { > char*match_tag; > u_int8_t match_tag_not; > u_intrtableid; > + u_int8_t prio; > + u_int8_t set_prio[2]; > struct { > struct node_host*addr; > u_int16_t port; > @@ -453,7 +457,7 @@ int parseport(char *, struct range *r, i > %token BITMASK RANDOM SOURCEHASH ROUNDROBIN STATICPORT PROBABILITY > %token ALTQ CBQ CODEL PRIQ HFSC FAIRQ BANDWIDTH TBRSIZE LINKSHARE REALTIME > %token UPPERLIMIT QUEUE PRIORITY QLIMIT HOGS BUCKETS RTABLE TARGET > INTERVAL > -%token LOAD RULESET_OPTIMIZATION > +%token LOAD RULESET_OPTIMIZATION PRIO > %token STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE > %token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY > %token TAGGED TAG IFBOUND FLOATING STATEPOLICY STATEDEFAULTS ROUTE SETTOS > @@ -468,7 +472,7 @@ int parseport(char *, struct range *r, i > %type no dir af fragcache optimizer > %type sourcetrack flush unaryop statelock > %type action nataction natpasslog scrubaction > -%type flags flag blockspec > +%type flags flag blockspec prio > %type portplain portstar portrange > %type hashkey > %type proto proto_list proto_item > @@ -504,6 +508,7 @@ int parseport(char *, struct range *r, i > %typecodelopts_list codelopts_item codel_opts > %type bandwidth > %type filter_opts filter_opt filter_opts_l > +%type filter_sets filter_set filter_sets_l > %typeantispoof_opts antispoof_opt > antispoof_opts_l > %typequeue_opts queue_opt queue_opts_l > %typescrub_opts scrub_opt scrub_opts_l > @@ -889,6 +894,17 @@ anchorrule : ANCHOR anchorname dir quick > YYERROR; > } > r.match_tag_not = $9.match_tag_not; > + if ($9.marker & FOM_PRIO) { > + if ($9.prio == 0) > + r.prio = PF_PRIO_ZERO; > + else > + r.prio = $9.prio; > + } > + if ($9.marker & FOM_SETPRIO) { > + r.set_prio[0] = $9.set_prio[0]; > + r.set_prio[1] = $9.set_prio[1]; > + r.scrub_flags |= PFSTATE_SETPRIO; > + } > > decide_address_family($8.src.host, ); > decide_address_family($8.dst.host, ); > @@ -2014,6 +2030,18 @@ pfrule : action dir logquick interface > r.prob = $9.prob; > r.rtableid = $9.rtableid; > > + if ($9.marker & FOM_PRIO) { > + if ($9.prio == 0) > + r.prio = PF_PRIO_ZERO; > + else > + r.prio = $9.prio; > + } > + if ($9.marker & FOM_SETPRIO) { > + r.set_prio[0] = $9.set_prio[0]; > + r.set_prio[1] = $9.set_prio[1]; > + r.scrub_flags |= PFSTATE_SETPRIO; > + } > + >
svn commit: r302002 - stable/10/sys/sys
Author: emaste Date: Sat Jun 18 01:23:38 2016 New Revision: 302002 URL: https://svnweb.freebsd.org/changeset/base/302002 Log: MFC r300231: elf_common.h: add section header flag and dynamic types SHF_COMPRESSEDsection contains compressed data DT_TLSDESC_PLTLocation of PLT entry for TLS descriptor resolver calls DT_TLSDESC_GOTLocation of GOT entry used by resolver PLT entry Modified: stable/10/sys/sys/elf_common.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/elf_common.h == --- stable/10/sys/sys/elf_common.h Fri Jun 17 22:40:10 2016 (r302001) +++ stable/10/sys/sys/elf_common.h Sat Jun 18 01:23:38 2016 (r302002) @@ -472,6 +472,7 @@ typedef struct { #defineSHF_OS_NONCONFORMING0x100 /* OS-specific processing required. */ #defineSHF_GROUP 0x200 /* Member of section group. */ #defineSHF_TLS 0x400 /* Section contains TLS data. */ +#defineSHF_COMPRESSED 0x800 /* Section contains compressed data. */ #defineSHF_MASKOS 0x0ff0 /* OS-specific semantics. */ #defineSHF_MASKPROC0xf000 /* Processor-specific semantics. */ @@ -607,6 +608,8 @@ typedef struct { */ #defineDT_ADDRRNGLO0x6e00 #defineDT_GNU_HASH 0x6ef5 /* GNU-style hash table */ +#defineDT_TLSDESC_PLT 0x6ef6 /* loc. of PLT for tlsdesc resolver */ +#defineDT_TLSDESC_GOT 0x6ef7 /* loc. of GOT for tlsdesc resolver */ #defineDT_GNU_CONFLICT 0x6ef8 /* address of conflict section */ #defineDT_GNU_LIBLIST 0x6ef9 /* address of library list */ #defineDT_CONFIG 0x6efa /* configuration information */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r302001 - in stable/10: contrib/libarchive contrib/libarchive/cat contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test c...
Author: mm Date: Fri Jun 17 22:40:10 2016 New Revision: 302001 URL: https://svnweb.freebsd.org/changeset/base/302001 Log: MFC r299529,r299540,r299576,r299896: r299529,r299540: Update libarchive to 3.2.0 New features: - new bsdcat command-line utility - LZ4 compression (in src only via external utility from ports) - Warc format support - 'Raw' format writer - Zip: Support archives >4GB, entries >4GB - Zip: Support encrypting and decrypting entries - Zip: Support experimental streaming extension - Identify encrypted entries in several formats - New --clear-nochange-flags option to bsdtar tries to remove noschg and similar flags before deleting files - New --ignore-zeros option to bsdtar to handle concatenated tar archives - Use multi-threaded LZMA decompression if liblzma supports it - Expose version info for libraries used by libarchive r299576,r299896: Fix broken cpio behavior. Relnotes: yes Added: stable/10/contrib/libarchive/cat/ - copied from r299529, head/contrib/libarchive/cat/ stable/10/contrib/libarchive/cpio/test/test_extract.cpio.lz4.uu - copied unchanged from r299529, head/contrib/libarchive/cpio/test/test_extract.cpio.lz4.uu stable/10/contrib/libarchive/cpio/test/test_extract_cpio_lz4.c - copied unchanged from r299529, head/contrib/libarchive/cpio/test/test_extract_cpio_lz4.c stable/10/contrib/libarchive/cpio/test/test_option_lz4.c - copied unchanged from r299529, head/contrib/libarchive/cpio/test/test_option_lz4.c stable/10/contrib/libarchive/cpio/test/test_option_passphrase.c - copied unchanged from r299529, head/contrib/libarchive/cpio/test/test_option_passphrase.c stable/10/contrib/libarchive/cpio/test/test_option_passphrase.zip.uu - copied unchanged from r299529, head/contrib/libarchive/cpio/test/test_option_passphrase.zip.uu stable/10/contrib/libarchive/libarchive/archive_cryptor.c - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_cryptor.c stable/10/contrib/libarchive/libarchive/archive_cryptor_private.h - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_cryptor_private.h stable/10/contrib/libarchive/libarchive/archive_digest.c - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_digest.c stable/10/contrib/libarchive/libarchive/archive_digest_private.h - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_digest_private.h stable/10/contrib/libarchive/libarchive/archive_getdate.h - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_getdate.h stable/10/contrib/libarchive/libarchive/archive_hmac.c - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_hmac.c stable/10/contrib/libarchive/libarchive/archive_hmac_private.h - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_hmac_private.h stable/10/contrib/libarchive/libarchive/archive_pack_dev.c - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_pack_dev.c stable/10/contrib/libarchive/libarchive/archive_pack_dev.h - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_pack_dev.h stable/10/contrib/libarchive/libarchive/archive_random.c - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_random.c stable/10/contrib/libarchive/libarchive/archive_random_private.h - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_random_private.h stable/10/contrib/libarchive/libarchive/archive_read_add_passphrase.3 - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_read_add_passphrase.3 stable/10/contrib/libarchive/libarchive/archive_read_add_passphrase.c - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_read_add_passphrase.c stable/10/contrib/libarchive/libarchive/archive_read_extract2.c - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_read_extract2.c stable/10/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_warc.c - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_read_support_format_warc.c stable/10/contrib/libarchive/libarchive/archive_write_add_filter_lz4.c - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_write_add_filter_lz4.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_filter_by_ext.c - copied unchanged from r299529, head/contrib/libarchive/libarchive/archive_write_set_format_filter_by_ext.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_raw.c - copied unchanged from r299529,
svn commit: r302000 - in head/sys: kern sys
Author: mjg Date: Fri Jun 17 19:41:30 2016 New Revision: 302000 URL: https://svnweb.freebsd.org/changeset/base/302000 Log: vfs: ifdef out noop vop_* primitives on !DEBUG_VFS_LOCKS kernels This removes calls to empty functions like vop_lock_{pre/post} from common vfs routines. Approved by: re (gjb) Modified: head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cFri Jun 17 18:49:42 2016(r301999) +++ head/sys/kern/vfs_subr.cFri Jun 17 19:41:30 2016(r302000) @@ -4529,10 +4529,10 @@ vop_rename_pre(void *ap) vhold(a->a_tvp); } +#ifdef DEBUG_VFS_LOCKS void vop_strategy_pre(void *ap) { -#ifdef DEBUG_VFS_LOCKS struct vop_strategy_args *a; struct buf *bp; @@ -4552,56 +4552,48 @@ vop_strategy_pre(void *ap) if (vfs_badlock_ddb) kdb_enter(KDB_WHY_VFSLOCK, "lock violation"); } -#endif } void vop_lock_pre(void *ap) { -#ifdef DEBUG_VFS_LOCKS struct vop_lock1_args *a = ap; if ((a->a_flags & LK_INTERLOCK) == 0) ASSERT_VI_UNLOCKED(a->a_vp, "VOP_LOCK"); else ASSERT_VI_LOCKED(a->a_vp, "VOP_LOCK"); -#endif } void vop_lock_post(void *ap, int rc) { -#ifdef DEBUG_VFS_LOCKS struct vop_lock1_args *a = ap; ASSERT_VI_UNLOCKED(a->a_vp, "VOP_LOCK"); if (rc == 0 && (a->a_flags & LK_EXCLOTHER) == 0) ASSERT_VOP_LOCKED(a->a_vp, "VOP_LOCK"); -#endif } void vop_unlock_pre(void *ap) { -#ifdef DEBUG_VFS_LOCKS struct vop_unlock_args *a = ap; if (a->a_flags & LK_INTERLOCK) ASSERT_VI_LOCKED(a->a_vp, "VOP_UNLOCK"); ASSERT_VOP_LOCKED(a->a_vp, "VOP_UNLOCK"); -#endif } void vop_unlock_post(void *ap, int rc) { -#ifdef DEBUG_VFS_LOCKS struct vop_unlock_args *a = ap; if (a->a_flags & LK_INTERLOCK) ASSERT_VI_UNLOCKED(a->a_vp, "VOP_UNLOCK"); -#endif } +#endif void vop_create_post(void *ap, int rc) Modified: head/sys/sys/vnode.h == --- head/sys/sys/vnode.hFri Jun 17 18:49:42 2016(r301999) +++ head/sys/sys/vnode.hFri Jun 17 19:41:30 2016(r302000) @@ -781,8 +781,6 @@ voidvop_close_post(void *a, int rc); void vop_create_post(void *a, int rc); void vop_deleteextattr_post(void *a, int rc); void vop_link_post(void *a, int rc); -void vop_lock_pre(void *a); -void vop_lock_post(void *a, int rc); void vop_lookup_post(void *a, int rc); void vop_lookup_pre(void *a); void vop_mkdir_post(void *a, int rc); @@ -797,10 +795,21 @@ void vop_rename_pre(void *a); void vop_rmdir_post(void *a, int rc); void vop_setattr_post(void *a, int rc); void vop_setextattr_post(void *a, int rc); -void vop_strategy_pre(void *a); void vop_symlink_post(void *a, int rc); + +#ifdef DEBUG_VFS_LOCKS +void vop_strategy_pre(void *a); +void vop_lock_pre(void *a); +void vop_lock_post(void *a, int rc); void vop_unlock_post(void *a, int rc); void vop_unlock_pre(void *a); +#else +#definevop_strategy_pre(x) do { } while (0) +#definevop_lock_pre(x) do { } while (0) +#definevop_lock_post(x, y) do { } while (0) +#definevop_unlock_post(x, y) do { } while (0) +#definevop_unlock_pre(x) do { } while (0) +#endif void vop_rename_fail(struct vop_rename_args *ap); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r301999 - head/usr.bin/mkimg
Author: emaste Date: Fri Jun 17 18:49:42 2016 New Revision: 301999 URL: https://svnweb.freebsd.org/changeset/base/301999 Log: mkimg: bump version to 20151211 after r292082 mkimg has had a number of functional additions after the last time the version was incremented. Do so now, to r292082's commit date, so that users can determine what is supported. Reviewed by: marcel Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D6882 Modified: head/usr.bin/mkimg/Makefile Modified: head/usr.bin/mkimg/Makefile == --- head/usr.bin/mkimg/Makefile Fri Jun 17 18:21:55 2016(r301998) +++ head/usr.bin/mkimg/Makefile Fri Jun 17 18:49:42 2016(r301999) @@ -6,7 +6,7 @@ PROG= mkimg SRCS= format.c image.c mkimg.c scheme.c MAN= mkimg.1 -MKIMG_VERSION=20150620 +MKIMG_VERSION=20151211 mkimg.o: Makefile CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION} ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r301998 - in head: sbin/pfctl share/man/man5 sys/net sys/netpfil/pf
Author: kp Date: Fri Jun 17 18:21:55 2016 New Revision: 301998 URL: https://svnweb.freebsd.org/changeset/base/301998 Log: pf: Filter on and set vlan PCP values Adopt the OpenBSD syntax for setting and filtering on VLAN PCP values. This introduces two new keywords: 'set prio' to set the PCP value, and 'prio' to filter on it. Reviewed by:allanjude, araujo Approved by: re (gjb) Obtained from: OpenBSD (mostly) Differential Revision: https://reviews.freebsd.org/D6786 Modified: head/sbin/pfctl/parse.y head/sbin/pfctl/pfctl_parser.c head/share/man/man5/pf.conf.5 head/sys/net/pfvar.h head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_ioctl.c Modified: head/sbin/pfctl/parse.y == --- head/sbin/pfctl/parse.y Fri Jun 17 17:34:28 2016(r301997) +++ head/sbin/pfctl/parse.y Fri Jun 17 18:21:55 2016(r301998) @@ -217,6 +217,8 @@ struct filter_opts { #define FOM_TOS0x04 #define FOM_KEEP 0x08 #define FOM_SRCTRACK 0x10 +#define FOM_SETPRIO0x0400 +#define FOM_PRIO 0x2000 struct node_uid *uid; struct node_gid *gid; struct { @@ -240,6 +242,8 @@ struct filter_opts { char*match_tag; u_int8_t match_tag_not; u_intrtableid; + u_int8_t prio; + u_int8_t set_prio[2]; struct { struct node_host*addr; u_int16_t port; @@ -453,7 +457,7 @@ int parseport(char *, struct range *r, i %token BITMASK RANDOM SOURCEHASH ROUNDROBIN STATICPORT PROBABILITY %token ALTQ CBQ CODEL PRIQ HFSC FAIRQ BANDWIDTH TBRSIZE LINKSHARE REALTIME %token UPPERLIMIT QUEUE PRIORITY QLIMIT HOGS BUCKETS RTABLE TARGET INTERVAL -%token LOAD RULESET_OPTIMIZATION +%token LOAD RULESET_OPTIMIZATION PRIO %token STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE %token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY %token TAGGED TAG IFBOUND FLOATING STATEPOLICY STATEDEFAULTS ROUTE SETTOS @@ -468,7 +472,7 @@ int parseport(char *, struct range *r, i %type no dir af fragcache optimizer %type sourcetrack flush unaryop statelock %type action nataction natpasslog scrubaction -%type flags flag blockspec +%type flags flag blockspec prio %type portplain portstar portrange %type hashkey %type proto proto_list proto_item @@ -504,6 +508,7 @@ int parseport(char *, struct range *r, i %typecodelopts_list codelopts_item codel_opts %type bandwidth %type filter_opts filter_opt filter_opts_l +%type filter_sets filter_set filter_sets_l %typeantispoof_opts antispoof_opt antispoof_opts_l %typequeue_opts queue_opt queue_opts_l %typescrub_opts scrub_opt scrub_opts_l @@ -889,6 +894,17 @@ anchorrule : ANCHOR anchorname dir quick YYERROR; } r.match_tag_not = $9.match_tag_not; + if ($9.marker & FOM_PRIO) { + if ($9.prio == 0) + r.prio = PF_PRIO_ZERO; + else + r.prio = $9.prio; + } + if ($9.marker & FOM_SETPRIO) { + r.set_prio[0] = $9.set_prio[0]; + r.set_prio[1] = $9.set_prio[1]; + r.scrub_flags |= PFSTATE_SETPRIO; + } decide_address_family($8.src.host, ); decide_address_family($8.dst.host, ); @@ -2014,6 +2030,18 @@ pfrule : action dir logquick interface r.prob = $9.prob; r.rtableid = $9.rtableid; + if ($9.marker & FOM_PRIO) { + if ($9.prio == 0) + r.prio = PF_PRIO_ZERO; + else + r.prio = $9.prio; + } + if ($9.marker & FOM_SETPRIO) { + r.set_prio[0] = $9.set_prio[0]; + r.set_prio[1] = $9.set_prio[1]; + r.scrub_flags |= PFSTATE_SETPRIO; + } + r.af = $6; if ($9.tag) if (strlcpy(r.tagname, $9.tag, @@ -2434,6 +2462,18 @@ filter_opt : USER uids { filter_opts.marker |= FOM_ICMP; filter_opts.icmpspec = $1; } +
svn commit: r301997 - in head/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs
Author: kib Date: Fri Jun 17 17:34:28 2016 New Revision: 301997 URL: https://svnweb.freebsd.org/changeset/base/301997 Log: Use vnlru_free(9) to implement dnlc_reduce_cache(). This apparently puts ARC back under the limits after the vnode pressure rework in r291244, in particular due to the kmem exhaustion. Based on patch by:mckusick Reviewed by: avg, mckusick Tested by:allanjude, madpilot Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Modified: head/sys/cddl/compat/opensolaris/sys/dnlc.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/compat/opensolaris/sys/dnlc.h == --- head/sys/cddl/compat/opensolaris/sys/dnlc.h Fri Jun 17 17:33:25 2016 (r301996) +++ head/sys/cddl/compat/opensolaris/sys/dnlc.h Fri Jun 17 17:34:28 2016 (r301997) @@ -35,6 +35,6 @@ #definednlc_update(dvp, name, vp) do { } while (0) #definednlc_remove(dvp, name) do { } while (0) #definednlc_purge_vfsp(vfsp, count)(0) -#definednlc_reduce_cache(percent) do { } while (0) +void dnlc_reduce_cache(void *arg); #endif /* !_OPENSOLARIS_SYS_DNLC_H_ */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jun 17 17:33:25 2016(r301996) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jun 17 17:34:28 2016(r301997) @@ -159,6 +159,10 @@ static kmutex_tarc_user_evicts_lock; static kcondvar_t arc_user_evicts_cv; static boolean_t arc_user_evicts_thread_exit; +static kmutex_tarc_dnlc_evicts_lock; +static kcondvar_t arc_dnlc_evicts_cv; +static boolean_t arc_dnlc_evicts_thread_exit; + uint_t arc_reduce_dnlc_percent = 3; /* @@ -3749,6 +3753,57 @@ arc_user_evicts_thread(void *dummy __unu thread_exit(); } +static u_int arc_dnlc_evicts_arg; +extern struct vfsops zfs_vfsops; + +static void +arc_dnlc_evicts_thread(void *dummy __unused) +{ + callb_cpr_t cpr; + u_int percent; + + CALLB_CPR_INIT(, _dnlc_evicts_lock, callb_generic_cpr, FTAG); + + mutex_enter(_dnlc_evicts_lock); + while (!arc_dnlc_evicts_thread_exit) { + CALLB_CPR_SAFE_BEGIN(); + (void) cv_wait(_dnlc_evicts_cv, _dnlc_evicts_lock); + CALLB_CPR_SAFE_END(, _dnlc_evicts_lock); + if (arc_dnlc_evicts_arg != 0) { + percent = arc_dnlc_evicts_arg; + mutex_exit(_dnlc_evicts_lock); +#ifdef _KERNEL + vnlru_free(desiredvnodes * percent / 100, _vfsops); +#endif + mutex_enter(_dnlc_evicts_lock); + /* +* Clear our token only after vnlru_free() +* pass is done, to avoid false queueing of +* the requests. +*/ + arc_dnlc_evicts_arg = 0; + } + } + arc_dnlc_evicts_thread_exit = FALSE; + cv_broadcast(_dnlc_evicts_cv); + CALLB_CPR_EXIT(); + thread_exit(); +} + +void +dnlc_reduce_cache(void *arg) +{ + u_int percent; + + percent = (u_int)arg; + mutex_enter(_dnlc_evicts_lock); + if (arc_dnlc_evicts_arg == 0) { + arc_dnlc_evicts_arg = percent; + cv_broadcast(_dnlc_evicts_cv); + } + mutex_exit(_dnlc_evicts_lock); +} + /* * Adapt arc info given the number of bytes we are trying to add and * the state that we are comming from. This function is only called @@ -5311,6 +5366,9 @@ arc_init(void) mutex_init(_user_evicts_lock, NULL, MUTEX_DEFAULT, NULL); cv_init(_user_evicts_cv, NULL, CV_DEFAULT, NULL); + mutex_init(_dnlc_evicts_lock, NULL, MUTEX_DEFAULT, NULL); + cv_init(_dnlc_evicts_cv, NULL, CV_DEFAULT, NULL); + /* Convert seconds to clock ticks */ arc_min_prefetch_lifespan = 1 * hz; @@ -5463,6 +5521,7 @@ arc_init(void) arc_reclaim_thread_exit = FALSE; arc_user_evicts_thread_exit = FALSE; + arc_dnlc_evicts_thread_exit = FALSE; arc_eviction_list = NULL; bzero(_eviction_hdr, sizeof (arc_buf_hdr_t)); @@ -5486,6 +5545,9 @@ arc_init(void) (void) thread_create(NULL, 0, arc_user_evicts_thread, NULL, 0, , TS_RUN, minclsyspri); + (void) thread_create(NULL, 0, arc_dnlc_evicts_thread, NULL, 0, , + TS_RUN, minclsyspri); + arc_dead = FALSE; arc_warm = B_FALSE; @@ -5568,6 +5630,18 @@ arc_fini(void) } mutex_exit(_user_evicts_lock); + mutex_enter(_dnlc_evicts_lock); + arc_dnlc_evicts_thread_exit =
svn commit: r301996 - in head/sys: kern sys
Author: kib Date: Fri Jun 17 17:33:25 2016 New Revision: 301996 URL: https://svnweb.freebsd.org/changeset/base/301996 Log: Add VFS interface to flush specified amount of free vnodes belonging to mount points with the given filesystem type, specified by mount vfs_ops pointer. Based on patch by:mckusick Reviewed by: avg, mckusick Tested by:allanjude, madpilot Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Modified: head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cFri Jun 17 17:09:22 2016(r301995) +++ head/sys/kern/vfs_subr.cFri Jun 17 17:33:25 2016(r301996) @@ -107,7 +107,6 @@ static void v_incr_usecount(struct vnode static voidv_incr_usecount_locked(struct vnode *); static voidv_incr_devcount(struct vnode *); static voidv_decr_devcount(struct vnode *); -static voidvnlru_free(int); static voidvgonel(struct vnode *); static voidvfs_knllock(void *arg); static voidvfs_knlunlock(void *arg); @@ -942,15 +941,23 @@ relock_mnt: return done; } +static int max_vnlru_free = 1; /* limit on vnode free requests per call */ +SYSCTL_INT(_debug, OID_AUTO, max_vnlru_free, CTLFLAG_RW, _vnlru_free, +0, +"limit on vnode free requests per call to the vnlru_free routine"); + /* * Attempt to reduce the free list by the requested amount. */ static void -vnlru_free(int count) +vnlru_free_locked(int count, struct vfsops *mnt_op) { struct vnode *vp; + struct mount *mp; mtx_assert(_free_list_mtx, MA_OWNED); + if (count > max_vnlru_free) + count = max_vnlru_free; for (; count > 0; count--) { vp = TAILQ_FIRST(_free_list); /* @@ -966,10 +973,17 @@ vnlru_free(int count) KASSERT((vp->v_iflag & VI_ACTIVE) == 0, ("Mangling active vnode")); TAILQ_REMOVE(_free_list, vp, v_actfreelist); + /* -* Don't recycle if we can't get the interlock. +* Don't recycle if our vnode is from different type +* of mount point. Note that mp is type-safe, the +* check does not reach unmapped address even if +* vnode is reclaimed. +* Don't recycle if we can't get the interlock without +* blocking. */ - if (!VI_TRYLOCK(vp)) { + if ((mnt_op != NULL && (mp = vp->v_mount) != NULL && + mp->mnt_op != mnt_op) || !VI_TRYLOCK(vp)) { TAILQ_INSERT_TAIL(_free_list, vp, v_actfreelist); continue; } @@ -1001,6 +1015,16 @@ vnlru_free(int count) } } +void +vnlru_free(int count, struct vfsops *mnt_op) +{ + + mtx_lock(_free_list_mtx); + vnlru_free_locked(count, mnt_op); + mtx_unlock(_free_list_mtx); +} + + /* XXX some names and initialization are bad for limits and watermarks. */ static int vspace(void) @@ -1046,8 +1070,8 @@ vnlru_proc(void) * try to reduce it by discarding from the free list. */ if (numvnodes > desiredvnodes && freevnodes > 0) - vnlru_free(ulmin(numvnodes - desiredvnodes, - freevnodes)); + vnlru_free_locked(ulmin(numvnodes - desiredvnodes, + freevnodes), NULL); /* * Sleep if the vnode cache is in a good state. This is * when it is not over-full and has space for about a 4% @@ -1237,7 +1261,7 @@ getnewvnode_wait(int suspended) } /* Post-adjust like the pre-adjust in getnewvnode(). */ if (numvnodes + 1 > desiredvnodes && freevnodes > 1) - vnlru_free(1); + vnlru_free_locked(1, NULL); return (numvnodes >= desiredvnodes ? ENFILE : 0); } @@ -1254,8 +1278,8 @@ getnewvnode_reserve(u_int count) /* XXX no longer so quick, but this part is not racy. */ mtx_lock(_free_list_mtx); if (numvnodes + count > desiredvnodes && freevnodes > wantfreevnodes) - vnlru_free(ulmin(numvnodes + count - desiredvnodes, - freevnodes - wantfreevnodes)); + vnlru_free_locked(ulmin(numvnodes + count - desiredvnodes, + freevnodes - wantfreevnodes), NULL); mtx_unlock(_free_list_mtx); td = curthread; @@ -1337,7 +1361,7 @@ getnewvnode(const char *tag, struct moun if (numvnodes + 1 <= desiredvnodes) ; else if (freevnodes > 0) - vnlru_free(1); + vnlru_free_locked(1, NULL); else { error = getnewvnode_wait(mp != NULL && (mp->mnt_kern_flag & MNTK_SUSPEND));
Re: svn commit: r301959 - head/sys/kern
On Friday, June 17, 2016 09:56:47 AM Bryan Drewery wrote: > On 6/17/2016 9:51 AM, Bryan Drewery wrote: > > On 6/16/2016 11:13 PM, Konstantin Belousov wrote: > >> On Thu, Jun 16, 2016 at 10:17:19AM -0700, Conrad Meyer wrote: > >>> style(9) nit: /* FALLTHROUGH */ > >> > >> FALLTHROUGH is only applicable when there are executable statements for > >> both cases, and first sequence of statements does not end in break. > >> Look at the switch() example right after the FALLTHROUGH requirement > >> in the style(9), which shows case '?'. > >> > > > > Yes the example shows code in both cases, but the text about it is more > > strict "Elements in a switch statement that cascade should have a > > FALLTHROUGH comment." > > > > My personal opinion does agree with your interpretation. I think we > should clarify style.9 about when to use FALLTHROUGH. As Bruce often notes, the code samples in style(9) trump the prose if there is a conflict. This is the first time I've ever seen anyone suggest that an empty case body warrants a FALLTHROUGH, and I don't recall ever seeing a single example of it in the tree. I had assumed that the Conrad had just misread the diff and assumed there was still a code block there, not that Conrad actually wanted a FALLTHROUGH for an empty block. In that case, I'm not sure changing style.9 would help as the trigger was misreading the diff, not confusion over the FALLTHROUGH convention. -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r301995 - head/sys/boot/efi/libefi
Author: manu Date: Fri Jun 17 17:09:22 2016 New Revision: 301995 URL: https://svnweb.freebsd.org/changeset/base/301995 Log: Print a message when disks are found but no logical partition are reported by EFI implementation. This address comment on r301714. Approved by: re (gjb), andrew (mentor) Differential Revision:https://reviews.freebsd.org/D6787 Modified: head/sys/boot/efi/libefi/efipart.c Modified: head/sys/boot/efi/libefi/efipart.c == --- head/sys/boot/efi/libefi/efipart.c Fri Jun 17 17:01:32 2016 (r301994) +++ head/sys/boot/efi/libefi/efipart.c Fri Jun 17 17:09:22 2016 (r301995) @@ -82,7 +82,7 @@ efipart_init(void) EFI_HANDLE *hin, *hout, *aliases, handle; EFI_STATUS status; UINTN sz; - u_int n, nin, nout; + u_int n, nin, nout, nrdisk; int err; sz = 0; @@ -103,6 +103,7 @@ efipart_init(void) hout = hin + nin; aliases = hout + nin; nout = 0; + nrdisk = 0; bzero(aliases, nin * sizeof(EFI_HANDLE)); pdinfo = malloc(nin * sizeof(*pdinfo)); @@ -120,8 +121,7 @@ efipart_init(void) if (EFI_ERROR(status)) continue; if (!blkio->Media->LogicalPartition) { - printf("%s%d isn't a logical partition, skipping\n", - efipart_dev.dv_name, n); + nrdisk++; continue; } @@ -156,6 +156,9 @@ efipart_init(void) bcache_add_dev(npdinfo); err = efi_register_handles(_dev, hout, aliases, nout); free(hin); + + if (nout == 0 && nrdisk > 0) + printf("Found %d disk(s) but no logical partition\n", nrdisk); return (err); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r301994 - head/sys/dev/ath
Author: adrian Date: Fri Jun 17 17:01:32 2016 New Revision: 301994 URL: https://svnweb.freebsd.org/changeset/base/301994 Log: [ath] don't debug RX EDMA descriptors that are not yet complete. Approved by: re@ (gjb) Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c == --- head/sys/dev/ath/if_ath_rx_edma.c Fri Jun 17 16:46:58 2016 (r301993) +++ head/sys/dev/ath/if_ath_rx_edma.c Fri Jun 17 17:01:32 2016 (r301994) @@ -427,6 +427,8 @@ ath_edma_recv_proc_queue(struct ath_soft rs = >bf_status.ds_rxstat; bf->bf_rxstatus = ath_hal_rxprocdesc(ah, ds, bf->bf_daddr, NULL, rs); + if (bf->bf_rxstatus == HAL_EINPROGRESS) + break; #ifdef ATH_DEBUG if (sc->sc_debug & ATH_DEBUG_RECV_DESC) ath_printrxbuf(sc, bf, 0, bf->bf_rxstatus == HAL_OK); @@ -436,8 +438,6 @@ ath_edma_recv_proc_queue(struct ath_soft if_ath_alq_post(>sc_alq, ATH_ALQ_EDMA_RXSTATUS, sc->sc_rx_statuslen, (char *) ds); #endif /* ATH_DEBUG */ - if (bf->bf_rxstatus == HAL_EINPROGRESS) - break; /* * Completed descriptor. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r301959 - head/sys/kern
On 6/17/2016 9:51 AM, Bryan Drewery wrote: > On 6/16/2016 11:13 PM, Konstantin Belousov wrote: >> On Thu, Jun 16, 2016 at 10:17:19AM -0700, Conrad Meyer wrote: >>> style(9) nit: /* FALLTHROUGH */ >> >> FALLTHROUGH is only applicable when there are executable statements for >> both cases, and first sequence of statements does not end in break. >> Look at the switch() example right after the FALLTHROUGH requirement >> in the style(9), which shows case '?'. >> > > Yes the example shows code in both cases, but the text about it is more > strict "Elements in a switch statement that cascade should have a > FALLTHROUGH comment." > My personal opinion does agree with your interpretation. I think we should clarify style.9 about when to use FALLTHROUGH. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r301959 - head/sys/kern
On 6/16/2016 11:13 PM, Konstantin Belousov wrote: > On Thu, Jun 16, 2016 at 10:17:19AM -0700, Conrad Meyer wrote: >> style(9) nit: /* FALLTHROUGH */ > > FALLTHROUGH is only applicable when there are executable statements for > both cases, and first sequence of statements does not end in break. > Look at the switch() example right after the FALLTHROUGH requirement > in the style(9), which shows case '?'. > Yes the example shows code in both cases, but the text about it is more strict "Elements in a switch statement that cascade should have a FALLTHROUGH comment." -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r301993 - in head: lib/clang lib/clang/libclangformat lib/clang/libclangtoolingcore targets/pseudo/clang tools/build/mk usr.bin/clang usr.bin/clang/clang-format
Author: bdrewery Date: Fri Jun 17 16:46:58 2016 New Revision: 301993 URL: https://svnweb.freebsd.org/changeset/base/301993 Log: Add clang-format under WITH_CLANG_EXTRAS. Reviewed by: dim Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division Differential Revision:https://reviews.freebsd.org/D6856 Added: head/lib/clang/libclangformat/ head/lib/clang/libclangformat/Makefile (contents, props changed) head/lib/clang/libclangformat/Makefile.depend (contents, props changed) head/lib/clang/libclangtoolingcore/ head/lib/clang/libclangtoolingcore/Makefile (contents, props changed) head/lib/clang/libclangtoolingcore/Makefile.depend (contents, props changed) head/usr.bin/clang/clang-format/ head/usr.bin/clang/clang-format/Makefile (contents, props changed) head/usr.bin/clang/clang-format/Makefile.depend (contents, props changed) Modified: head/lib/clang/Makefile head/targets/pseudo/clang/Makefile.depend head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/clang/Makefile Modified: head/lib/clang/Makefile == --- head/lib/clang/Makefile Fri Jun 17 16:44:31 2016(r301992) +++ head/lib/clang/Makefile Fri Jun 17 16:46:58 2016(r301993) @@ -90,7 +90,9 @@ SUBDIR= libclanganalysis \ libllvmx86utils .if ${MK_CLANG_EXTRAS} != "no" -SUBDIR+=libllvmdebuginfodwarf \ +SUBDIR+=libclangformat \ + libclangtoolingcore \ + libllvmdebuginfodwarf \ libllvmdebuginfopdb \ libllvmlibdriver \ libllvmlto \ Added: head/lib/clang/libclangformat/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libclangformat/Makefile Fri Jun 17 16:46:58 2016 (r301993) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.include + +LIB= clangformat + +SRCDIR=tools/clang/lib/Format + +SRCS= BreakableToken.cpp \ + ContinuationIndenter.cpp \ + Format.cpp \ + FormatToken.cpp \ + TokenAnnotator.cpp \ + UnwrappedLineFormatter.cpp \ + UnwrappedLineParser.cpp \ + WhitespaceManager.cpp + +TGHDRS=DiagnosticCommonKinds + +.include "../clang.lib.mk" Added: head/lib/clang/libclangformat/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libclangformat/Makefile.depend Fri Jun 17 16:46:58 2016(r301993) @@ -0,0 +1,15 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/libc++ \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/lib/clang/libclangtoolingcore/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libclangtoolingcore/Makefile Fri Jun 17 16:46:58 2016 (r301993) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.include + +LIB= clangtoolingcore + +SRCDIR=tools/clang/lib/Tooling/Core +CFLAGS+= -I${LLVM_SRCS}/tools +SRCS= Lookup.cpp \ + Replacement.cpp + +TGHDRS=AttrList \ + Attrs \ + CommentCommandList \ + DeclNodes \ + DiagnosticCommonKinds \ + StmtNodes + +.include "../clang.lib.mk" Added: head/lib/clang/libclangtoolingcore/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libclangtoolingcore/Makefile.depend Fri Jun 17 16:46:58 2016(r301993) @@ -0,0 +1,15 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/libc++ \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Modified: head/targets/pseudo/clang/Makefile.depend == --- head/targets/pseudo/clang/Makefile.depend Fri Jun 17 16:44:31 2016 (r301992) +++ head/targets/pseudo/clang/Makefile.depend Fri Jun 17 16:46:58 2016 (r301993) @@ -21,6 +21,7 @@ DIRDEPS+= \ .if ${MK_CLANG_EXTRAS} == "yes" DIRDEPS+= \ usr.bin/clang/bugpoint \ + usr.bin/clang/clang-format \ usr.bin/clang/llc \ usr.bin/clang/lli \ usr.bin/clang/llvm-ar \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jun 17 16:44:31 2016(r301992) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jun 17
svn commit: r301992 - head/contrib/llvm/tools/clang/tools/clang-format
Author: bdrewery Date: Fri Jun 17 16:44:31 2016 New Revision: 301992 URL: https://svnweb.freebsd.org/changeset/base/301992 Log: Import ClangFormat.cpp from ^/vendor/clang/clang-release_380-r262564 Discussed with: dim Approved by: re (gjb) Added: head/contrib/llvm/tools/clang/tools/clang-format/ head/contrib/llvm/tools/clang/tools/clang-format/ClangFormat.cpp - copied unchanged from r301991, vendor/clang/clang-release_380-r262564/tools/clang-format/ClangFormat.cpp Copied: head/contrib/llvm/tools/clang/tools/clang-format/ClangFormat.cpp (from r301991, vendor/clang/clang-release_380-r262564/tools/clang-format/ClangFormat.cpp) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/tools/clang/tools/clang-format/ClangFormat.cppFri Jun 17 16:44:31 2016(r301992, copy of r301991, vendor/clang/clang-release_380-r262564/tools/clang-format/ClangFormat.cpp) @@ -0,0 +1,364 @@ +//===-- clang-format/ClangFormat.cpp - Clang format tool --===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// +/// +/// \file +/// \brief This file implements a clang-format tool that automatically formats +/// (fragments of) C++ code. +/// +//===--===// + +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/DiagnosticOptions.h" +#include "clang/Basic/FileManager.h" +#include "clang/Basic/SourceManager.h" +#include "clang/Basic/Version.h" +#include "clang/Format/Format.h" +#include "clang/Rewrite/Core/Rewriter.h" +#include "llvm/ADT/StringMap.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/FileSystem.h" +#include "llvm/Support/Signals.h" + +using namespace llvm; +using clang::tooling::Replacements; + +static cl::opt Help("h", cl::desc("Alias for -help"), cl::Hidden); + +// Mark all our options with this category, everything else (except for -version +// and -help) will be hidden. +static cl::OptionCategory ClangFormatCategory("Clang-format options"); + +static cl::list +Offsets("offset", +cl::desc("Format a range starting at this byte offset.\n" + "Multiple ranges can be formatted by specifying\n" + "several -offset and -length pairs.\n" + "Can only be used with one input file."), +cl::cat(ClangFormatCategory)); +static cl::list +Lengths("length", +cl::desc("Format a range of this length (in bytes).\n" + "Multiple ranges can be formatted by specifying\n" + "several -offset and -length pairs.\n" + "When only a single -offset is specified without\n" + "-length, clang-format will format up to the end\n" + "of the file.\n" + "Can only be used with one input file."), +cl::cat(ClangFormatCategory)); +static cl::list +LineRanges("lines", cl::desc(": - format a range of\n" + "lines (both 1-based).\n" + "Multiple ranges can be formatted by specifying\n" + "several -lines arguments.\n" + "Can't be used with -offset and -length.\n" + "Can only be used with one input file."), + cl::cat(ClangFormatCategory)); +static cl::opt +Style("style", + cl::desc(clang::format::StyleOptionHelpDescription), + cl::init("file"), cl::cat(ClangFormatCategory)); +static cl::opt +FallbackStyle("fallback-style", + cl::desc("The name of the predefined style used as a\n" + "fallback in case clang-format is invoked with\n" + "-style=file, but can not find the .clang-format\n" + "file to use.\n" + "Use -fallback-style=none to skip formatting."), + cl::init("LLVM"), cl::cat(ClangFormatCategory)); + +static cl::opt +AssumeFileName("assume-filename", + cl::desc("When reading from stdin, clang-format assumes this\n" +"filename to look for a style config file (with\n" +"-style=file) and to determine the language."), + cl::init(""), cl::cat(ClangFormatCategory)); + +static cl::opt Inplace("i", + cl::desc("Inplace edit s, if specified."), + cl::cat(ClangFormatCategory)); + +static cl::opt OutputXML("output-replacements-xml", + cl::desc("Output replacements as XML."), +
svn commit: r301991 - head/release/doc/en_US.ISO8859-1/relnotes
Author: lidl Date: Fri Jun 17 16:34:25 2016 New Revision: 301991 URL: https://svnweb.freebsd.org/changeset/base/301991 Log: Note ipfilter support in blacklist-helper script in relnotes Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jun 17 16:14:42 2016(r301990) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jun 17 16:34:25 2016(r301991) @@ -631,6 +631,9 @@ the packet filter has been added to the blacklistd-helper script. + Support for + the packet filter has been added to the + blacklistd-helper script. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r301973 - in head/usr.sbin/bsdconfig: include networking networking/include networking/share share/media
On 6/16/2016 5:52 PM, Devin Teske wrote: > On Thu, 2016-06-16 at 14:28 -0700, Bryan Drewery wrote: >> On 6/16/16 2:14 PM, Devin Teske wrote: >>> Author: dteske >>> Date: Thu Jun 16 21:14:25 2016 >>> New Revision: 301973 >>> URL: https://svnweb.freebsd.org/changeset/base/301973 >>> >>> Log: >>> Add bsdconfig `wifi' (aka `wireless' or `wlan') module >>> >>> Approved by: re (gjb) >>> MFC after:8 weeks >> >> 8 weeks is about August 11. >> >> Presumably you think this change is not "stable" enough for the >> stable/10 branch (note that "stable" has different meanings there). >> >> releng/11.0 branch: July 29, 2016 >> ports/ release tag: August 12, 2016 >> RC3 build starts:August 12, 2016 [*] >> RELEASE build starts:August 19, 2016 >> [*] - If needed >> >> Looking at the planned schedule, you won't MFC it to stable/10 (which >> won't be released for a year?) until nearly the release of 11.0. My >> question is, does this really belong in head right now for 11.0 or >> should it wait until after the stable/11 branching? >> >> >>> Relnotes: yes >> >> > > I may never MFC it. > > The 8 weeks is to remind me to re-think that when I get the reminder > from sobomax. > > It actually cannot be MFC'd without changes. There are some very slight > minor differences in 10 and 11. > > The 8 weeks should not reflect how stable the code is or not, but > rather that is a time when I predict I might have the time/energy to > integrate it into the older branch(es). > Thank you for the explanation! Sounds fine. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r301989 - stable/10/sys/dev/sfxge
Author: arybchik Date: Fri Jun 17 09:07:27 2016 New Revision: 301989 URL: https://svnweb.freebsd.org/changeset/base/301989 Log: MFC r301607 sfxge(4): host byte order is required for IP ID in TSO descriptors Submitted by: Artem V. Andreev Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c == --- stable/10/sys/dev/sfxge/sfxge_tx.c Fri Jun 17 09:06:30 2016 (r301988) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Fri Jun 17 09:07:27 2016 (r301989) @@ -973,7 +973,7 @@ static void tso_start(struct sfxge_txq * tso->protocol = TSO_MBUF_PROTO(mbuf); tso->nh_off = mbuf->m_pkthdr.l2hlen; tso->tcph_off = mbuf->m_pkthdr.l3hlen; - tso->packet_id = TSO_MBUF_PACKETID(mbuf); + tso->packet_id = ntohs(TSO_MBUF_PACKETID(mbuf)); #endif #if !SFXGE_TX_PARSE_EARLY @@ -982,7 +982,7 @@ static void tso_start(struct sfxge_txq * KASSERT(tso_iph(tso)->ip_p == IPPROTO_TCP, ("TSO required on non-TCP packet")); tso->tcph_off = tso->nh_off + 4 * tso_iph(tso)->ip_hl; - tso->packet_id = tso_iph(tso)->ip_id; + tso->packet_id = ntohs(tso_iph(tso)->ip_id); } else { KASSERT(tso->protocol == htons(ETHERTYPE_IPV6), ("TSO required on non-IP packet")); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r301988 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Fri Jun 17 09:06:30 2016 New Revision: 301988 URL: https://svnweb.freebsd.org/changeset/base/301988 Log: MFC r301604 sfxge(4): cleanup: add missing probes to ef10_nvram_segment_write_tlv Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/ef10_nvram.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/ef10_nvram.c == --- stable/10/sys/dev/sfxge/common/ef10_nvram.c Fri Jun 17 09:05:26 2016 (r301987) +++ stable/10/sys/dev/sfxge/common/ef10_nvram.c Fri Jun 17 09:06:30 2016 (r301988) @@ -1658,7 +1658,7 @@ ef10_nvram_partn_write_tlv( * Read a segment from nvram at the given offset into a buffer (segment_data) * and optionally write a new tag to it. */ - static __checkReturn efx_rc_t +static __checkReturn efx_rc_t ef10_nvram_segment_write_tlv( __inefx_nic_t *enp, __inuint32_t partn, @@ -1684,20 +1684,25 @@ ef10_nvram_segment_write_tlv( */ status = ef10_nvram_read_tlv_segment(enp, partn, *partn_offsetp, *seg_datap, *src_remain_lenp); - if (status != 0) - return (EINVAL); + if (status != 0) { + rc = EINVAL; + goto fail1; + } status = ef10_nvram_buf_segment_size(*seg_datap, *src_remain_lenp, _segment_size); - if (status != 0) - return (EINVAL); + if (status != 0) { + rc = EINVAL; + goto fail2; + } if (write) { /* Update the contents of the segment in the buffer */ if ((rc = ef10_nvram_buf_write_tlv(*seg_datap, *dest_remain_lenp, tag, data, size, - _segment_size)) != 0) - goto fail1; + _segment_size)) != 0) { + goto fail3; + } *dest_remain_lenp -= modified_segment_size; *seg_datap += modified_segment_size; } else { @@ -1714,6 +1719,10 @@ ef10_nvram_segment_write_tlv( return (0); +fail3: + EFSYS_PROBE(fail3); +fail2: + EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r301987 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Fri Jun 17 09:05:26 2016 New Revision: 301987 URL: https://svnweb.freebsd.org/changeset/base/301987 Log: MFC r301495 sfxge(4): update TX vFIFO ULL tag location to avoid merge conflict Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/ef10_tlv_layout.h == --- stable/10/sys/dev/sfxge/common/ef10_tlv_layout.hFri Jun 17 09:04:06 2016(r301986) +++ stable/10/sys/dev/sfxge/common/ef10_tlv_layout.hFri Jun 17 09:05:26 2016(r301987) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012-2015 Solarflare Communications Inc. + * Copyright (c) 2012-2016 Solarflare Communications Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -801,7 +801,7 @@ struct tlv_tx_event_merging_config { * know if the low latency mode is enabled. */ -#define TLV_TAG_TX_VFIFO_ULL_MODE (0x1022) +#define TLV_TAG_TX_VFIFO_ULL_MODE (0x1027) struct tlv_tx_vfifo_ull_mode { uint32_t tag; uint32_t length; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r301986 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Fri Jun 17 09:04:06 2016 New Revision: 301986 URL: https://svnweb.freebsd.org/changeset/base/301986 Log: MFC r301427 sfxge(4): allow firmware to auto-configure event queues on Medford On Medford, licenses are required to enable RX and event cut through and to disable RX batching. To avoid the need for the driver to make decisions based on the licensing state, the MC_CMD_INIT_EVQ has been extended to allow us to leave the decision to the firmware. If the adapter is licensed for low-latency use, the firmware will choose the optimal settings for latency, otherwise it will use the best settings for throughput. For Huntington we still need to choose the settings ourselves. Submitted by: Mark Spender Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D6717 Modified: stable/10/sys/dev/sfxge/common/ef10_ev.c stable/10/sys/dev/sfxge/common/ef10_nic.c stable/10/sys/dev/sfxge/common/efx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/ef10_ev.c == --- stable/10/sys/dev/sfxge/common/ef10_ev.cFri Jun 17 09:02:51 2016 (r301985) +++ stable/10/sys/dev/sfxge/common/ef10_ev.cFri Jun 17 09:04:06 2016 (r301986) @@ -139,7 +139,8 @@ efx_mcdi_init_evq( __inefsys_mem_t *esmp, __insize_t nevs, __inuint32_t irq, - __inuint32_t us) + __inuint32_t us, + __inboolean_t low_latency) { efx_mcdi_req_t req; uint8_t payload[ @@ -149,7 +150,7 @@ efx_mcdi_init_evq( uint64_t addr; int npages; int i; - int supports_rx_batching; + int ev_cut_through; efx_rc_t rc; npages = EFX_EVQ_NBUFS(nevs); @@ -170,21 +171,19 @@ efx_mcdi_init_evq( MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_IRQ_NUM, irq); /* -* On Huntington RX and TX event batching can only be requested -* together (even if the datapath firmware doesn't actually support RX -* batching). -* Cut through is incompatible with RX batching and so enabling cut -* through disables RX batching (but it does not affect TX batching). +* On Huntington RX and TX event batching can only be requested together +* (even if the datapath firmware doesn't actually support RX +* batching). If event cut through is enabled no RX batching will occur. * -* So always enable RX and TX event batching, and enable cut through -* if RX event batching isn't supported (i.e. on low latency firmware). +* So always enable RX and TX event batching, and enable event cut +* through if we want low latency operation. */ - supports_rx_batching = enp->en_nic_cfg.enc_rx_batching_enabled ? 1 : 0; + ev_cut_through = low_latency ? 1 : 0; MCDI_IN_POPULATE_DWORD_6(req, INIT_EVQ_IN_FLAGS, INIT_EVQ_IN_FLAG_INTERRUPTING, 1, INIT_EVQ_IN_FLAG_RPTR_DOS, 0, INIT_EVQ_IN_FLAG_INT_ARMD, 0, - INIT_EVQ_IN_FLAG_CUT_THRU, !supports_rx_batching, + INIT_EVQ_IN_FLAG_CUT_THRU, ev_cut_through, INIT_EVQ_IN_FLAG_RX_MERGE, 1, INIT_EVQ_IN_FLAG_TX_MERGE, 1); @@ -250,6 +249,114 @@ fail1: return (rc); } + +static __checkReturn efx_rc_t +efx_mcdi_init_evq_v2( + __inefx_nic_t *enp, + __inunsigned int instance, + __inefsys_mem_t *esmp, + __insize_t nevs, + __inuint32_t irq, + __inuint32_t us) +{ + efx_mcdi_req_t req; + uint8_t payload[ + MAX(MC_CMD_INIT_EVQ_V2_IN_LEN(EFX_EVQ_NBUFS(EFX_EVQ_MAXNEVS)), + MC_CMD_INIT_EVQ_V2_OUT_LEN)]; + efx_qword_t *dma_addr; + uint64_t addr; + int npages; + int i; + efx_rc_t rc; + + npages = EFX_EVQ_NBUFS(nevs); + if (MC_CMD_INIT_EVQ_V2_IN_LEN(npages) > MC_CMD_INIT_EVQ_V2_IN_LENMAX) { + rc = EINVAL; + goto fail1; + } + + (void) memset(payload, 0, sizeof (payload)); + req.emr_cmd = MC_CMD_INIT_EVQ; + req.emr_in_buf = payload; + req.emr_in_length = MC_CMD_INIT_EVQ_V2_IN_LEN(npages); + req.emr_out_buf = payload; + req.emr_out_length = MC_CMD_INIT_EVQ_V2_OUT_LEN; + + MCDI_IN_SET_DWORD(req, INIT_EVQ_V2_IN_SIZE, nevs); + MCDI_IN_SET_DWORD(req, INIT_EVQ_V2_IN_INSTANCE, instance); + MCDI_IN_SET_DWORD(req, INIT_EVQ_V2_IN_IRQ_NUM, irq); + + MCDI_IN_POPULATE_DWORD_4(req, INIT_EVQ_V2_IN_FLAGS, + INIT_EVQ_V2_IN_FLAG_INTERRUPTING, 1, + INIT_EVQ_V2_IN_FLAG_RPTR_DOS, 0, + INIT_EVQ_V2_IN_FLAG_INT_ARMD, 0, + INIT_EVQ_V2_IN_FLAG_TYPE,
svn commit: r301985 - in stable/10/sys/dev/sfxge: . common
Author: arybchik Date: Fri Jun 17 09:02:51 2016 New Revision: 301985 URL: https://svnweb.freebsd.org/changeset/base/301985 Log: MFC r301309 sfxge(4): always be ready to receive batched events When the low-latency firmware variant is running, it is reported as not being capable of batching RX events, but it can still do so if the FORCE_EV_MERGING flag is set on an RXQ. Therefore we need to handle batched RX events even if the capability isn't set. If this bug is fixed in the firmware such that the capability is set even when running the low-latency firmware variant, it will almost always be reported so I don't think we lose much by removing the check. Submitted by: Mark Spender Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D6705 Modified: stable/10/sys/dev/sfxge/common/ef10_nic.c stable/10/sys/dev/sfxge/sfxge_ev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/ef10_nic.c == --- stable/10/sys/dev/sfxge/common/ef10_nic.c Fri Jun 17 09:01:11 2016 (r301984) +++ stable/10/sys/dev/sfxge/common/ef10_nic.c Fri Jun 17 09:02:51 2016 (r301985) @@ -1003,8 +1003,11 @@ ef10_get_datapath_caps( encp->enc_rx_batching_enabled = CAP_FLAG(flags, RX_BATCHING) ? B_TRUE : B_FALSE; - if (encp->enc_rx_batching_enabled) - encp->enc_rx_batch_max = 16; + /* +* Even if batching isn't reported as supported, we may still get +* batched events. +*/ + encp->enc_rx_batch_max = 16; /* Check if the firmware supports disabling scatter on RXQs */ encp->enc_rx_disable_scatter_supported = Modified: stable/10/sys/dev/sfxge/sfxge_ev.c == --- stable/10/sys/dev/sfxge/sfxge_ev.c Fri Jun 17 09:01:11 2016 (r301984) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Fri Jun 17 09:02:51 2016 (r301985) @@ -123,8 +123,7 @@ sfxge_ev_rx(void *arg, uint32_t label, u rxq->pending += delta; if (delta != 1) { - if ((!efx_nic_cfg_get(sc->enp)->enc_rx_batching_enabled) || - (delta <= 0) || + if ((delta <= 0) || (delta > efx_nic_cfg_get(sc->enp)->enc_rx_batch_max)) { evq->exception = B_TRUE; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r301984 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Fri Jun 17 09:01:11 2016 New Revision: 301984 URL: https://svnweb.freebsd.org/changeset/base/301984 Log: MFC r301308 sfxge(4): add helper to compute timer quantum This also adjusts the timer values used to match the Linux net driver implementation: a) non-zero time intervals should result in at least one quantum b) timer load/reload values are only zero biased for Falcon/Siena Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D6704 Modified: stable/10/sys/dev/sfxge/common/ef10_ev.c stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_ev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/ef10_ev.c == --- stable/10/sys/dev/sfxge/common/ef10_ev.cFri Jun 17 08:59:08 2016 (r301983) +++ stable/10/sys/dev/sfxge/common/ef10_ev.cFri Jun 17 09:01:11 2016 (r301984) @@ -141,7 +141,6 @@ efx_mcdi_init_evq( __inuint32_t irq, __inuint32_t us) { - efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_mcdi_req_t req; uint8_t payload[ MAX(MC_CMD_INIT_EVQ_IN_LEN(EFX_EVQ_NBUFS(EFX_EVQ_MAXNEVS)), @@ -189,25 +188,22 @@ efx_mcdi_init_evq( INIT_EVQ_IN_FLAG_RX_MERGE, 1, INIT_EVQ_IN_FLAG_TX_MERGE, 1); + /* If the value is zero then disable the timer */ if (us == 0) { MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_MODE, MC_CMD_INIT_EVQ_IN_TMR_MODE_DIS); MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_LOAD, 0); MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_RELOAD, 0); } else { - uint32_t timer_val; + unsigned int ticks; - /* Calculate the timer value in quanta */ - timer_val = us * 1000 / encp->enc_evq_timer_quantum_ns; - - /* Moderation value is base 0 so we need to deduct 1 */ - if (timer_val > 0) - timer_val--; + if ((rc = efx_ev_usecs_to_ticks(enp, us, )) != 0) + goto fail2; MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_MODE, MC_CMD_INIT_EVQ_IN_TMR_INT_HLDOFF); - MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_LOAD, timer_val); - MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_RELOAD, timer_val); + MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_LOAD, ticks); + MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_RELOAD, ticks); } MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_COUNT_MODE, @@ -230,18 +226,20 @@ efx_mcdi_init_evq( if (req.emr_rc != 0) { rc = req.emr_rc; - goto fail2; + goto fail3; } if (req.emr_out_length_used < MC_CMD_INIT_EVQ_OUT_LEN) { rc = EMSGSIZE; - goto fail3; + goto fail4; } /* NOTE: ignore the returned IRQ param as firmware does not set it. */ return (0); +fail4: + EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: @@ -483,7 +481,7 @@ ef10_ev_qmoderate( efx_nic_t *enp = eep->ee_enp; efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_dword_t dword; - uint32_t timer_ns, timer_val, mode; + uint32_t mode; efx_rc_t rc; /* Check that hardware and MCDI use the same timer MODE values */ @@ -503,37 +501,35 @@ ef10_ev_qmoderate( /* If the value is zero then disable the timer */ if (us == 0) { - timer_ns = 0; mode = FFE_CZ_TIMER_MODE_DIS; } else { - timer_ns = us * 1000u; mode = FFE_CZ_TIMER_MODE_INT_HLDOFF; } if (encp->enc_bug61265_workaround) { - rc = efx_mcdi_set_evq_tmr(enp, eep->ee_index, mode, timer_ns); + uint32_t ns = us * 1000; + + rc = efx_mcdi_set_evq_tmr(enp, eep->ee_index, mode, ns); if (rc != 0) goto fail2; } else { - /* Calculate the timer value in quanta */ - timer_val = timer_ns / encp->enc_evq_timer_quantum_ns; + unsigned int ticks; - /* Moderation value is base 0 so we need to deduct 1 */ - if (timer_val > 0) - timer_val--; + if ((rc = efx_ev_usecs_to_ticks(enp, us, )) != 0) + goto fail3; if (encp->enc_bug35388_workaround) { EFX_POPULATE_DWORD_3(dword, ERF_DD_EVQ_IND_TIMER_FLAGS, EFE_DD_EVQ_IND_TIMER_FLAGS, ERF_DD_EVQ_IND_TIMER_MODE, mode, - ERF_DD_EVQ_IND_TIMER_VAL,
svn commit: r301983 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Fri Jun 17 08:59:08 2016 New Revision: 301983 URL: https://svnweb.freebsd.org/changeset/base/301983 Log: MFC r301237 sfxge(4): support EVQ timer workaround via MCDI Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/6675 Modified: stable/10/sys/dev/sfxge/common/ef10_ev.c stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/hunt_nic.c stable/10/sys/dev/sfxge/common/medford_nic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/ef10_ev.c == --- stable/10/sys/dev/sfxge/common/ef10_ev.cFri Jun 17 08:57:52 2016 (r301982) +++ stable/10/sys/dev/sfxge/common/ef10_ev.cFri Jun 17 08:59:08 2016 (r301983) @@ -87,6 +87,52 @@ ef10_ev_mcdi( static __checkReturn efx_rc_t +efx_mcdi_set_evq_tmr( + __inefx_nic_t *enp, + __inuint32_t instance, + __inuint32_t mode, + __inuint32_t timer_ns) +{ + efx_mcdi_req_t req; + uint8_t payload[MAX(MC_CMD_SET_EVQ_TMR_IN_LEN, + MC_CMD_SET_EVQ_TMR_OUT_LEN)]; + efx_rc_t rc; + + (void) memset(payload, 0, sizeof (payload)); + req.emr_cmd = MC_CMD_SET_EVQ_TMR; + req.emr_in_buf = payload; + req.emr_in_length = MC_CMD_SET_EVQ_TMR_IN_LEN; + req.emr_out_buf = payload; + req.emr_out_length = MC_CMD_SET_EVQ_TMR_OUT_LEN; + + MCDI_IN_SET_DWORD(req, SET_EVQ_TMR_IN_INSTANCE, instance); + MCDI_IN_SET_DWORD(req, SET_EVQ_TMR_IN_TMR_LOAD_REQ_NS, timer_ns); + MCDI_IN_SET_DWORD(req, SET_EVQ_TMR_IN_TMR_RELOAD_REQ_NS, timer_ns); + MCDI_IN_SET_DWORD(req, SET_EVQ_TMR_IN_TMR_MODE, mode); + + efx_mcdi_execute(enp, ); + + if (req.emr_rc != 0) { + rc = req.emr_rc; + goto fail1; + } + + if (req.emr_out_length_used < MC_CMD_SET_EVQ_TMR_OUT_LEN) { + rc = EMSGSIZE; + goto fail2; + } + + return (0); + +fail2: + EFSYS_PROBE(fail2); +fail1: + EFSYS_PROBE1(fail1, efx_rc_t, rc); + + return (rc); +} + +static __checkReturn efx_rc_t efx_mcdi_init_evq( __inefx_nic_t *enp, __inunsigned int instance, @@ -437,9 +483,19 @@ ef10_ev_qmoderate( efx_nic_t *enp = eep->ee_enp; efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_dword_t dword; - uint32_t timer_val, mode; + uint32_t timer_ns, timer_val, mode; efx_rc_t rc; + /* Check that hardware and MCDI use the same timer MODE values */ + EFX_STATIC_ASSERT(FFE_CZ_TIMER_MODE_DIS == + MC_CMD_SET_EVQ_TMR_IN_TIMER_MODE_DIS); + EFX_STATIC_ASSERT(FFE_CZ_TIMER_MODE_IMMED_START == + MC_CMD_SET_EVQ_TMR_IN_TIMER_MODE_IMMED_START); + EFX_STATIC_ASSERT(FFE_CZ_TIMER_MODE_TRIG_START == + MC_CMD_SET_EVQ_TMR_IN_TIMER_MODE_TRIG_START); + EFX_STATIC_ASSERT(FFE_CZ_TIMER_MODE_INT_HLDOFF == + MC_CMD_SET_EVQ_TMR_IN_TIMER_MODE_INT_HLDOFF); + if (us > encp->enc_evq_timer_max_us) { rc = EINVAL; goto fail1; @@ -447,37 +503,46 @@ ef10_ev_qmoderate( /* If the value is zero then disable the timer */ if (us == 0) { - timer_val = 0; + timer_ns = 0; mode = FFE_CZ_TIMER_MODE_DIS; } else { + timer_ns = us * 1000u; + mode = FFE_CZ_TIMER_MODE_INT_HLDOFF; + } + + if (encp->enc_bug61265_workaround) { + rc = efx_mcdi_set_evq_tmr(enp, eep->ee_index, mode, timer_ns); + if (rc != 0) + goto fail2; + } else { /* Calculate the timer value in quanta */ - timer_val = us * 1000 / encp->enc_evq_timer_quantum_ns; + timer_val = timer_ns / encp->enc_evq_timer_quantum_ns; /* Moderation value is base 0 so we need to deduct 1 */ if (timer_val > 0) timer_val--; - mode = FFE_CZ_TIMER_MODE_INT_HLDOFF; - } - - if (encp->enc_bug35388_workaround) { - EFX_POPULATE_DWORD_3(dword, - ERF_DD_EVQ_IND_TIMER_FLAGS, - EFE_DD_EVQ_IND_TIMER_FLAGS, - ERF_DD_EVQ_IND_TIMER_MODE, mode, - ERF_DD_EVQ_IND_TIMER_VAL, timer_val); - EFX_BAR_TBL_WRITED(enp, ER_DD_EVQ_INDIRECT, - eep->ee_index, , 0); - } else { - EFX_POPULATE_DWORD_2(dword, - ERF_DZ_TC_TIMER_MODE, mode, - ERF_DZ_TC_TIMER_VAL, timer_val); - EFX_BAR_TBL_WRITED(enp, ER_DZ_EVQ_TMR_REG, - eep->ee_index, , 0); + if
svn commit: r301982 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Fri Jun 17 08:57:52 2016 New Revision: 301982 URL: https://svnweb.freebsd.org/changeset/base/301982 Log: MFC r301127 sfxge(4): cleanup: remove unused variables in common code Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_lic.c stable/10/sys/dev/sfxge/common/efx_mcdi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c == --- stable/10/sys/dev/sfxge/common/efx_ev.c Fri Jun 17 08:56:47 2016 (r301981) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Fri Jun 17 08:57:52 2016 (r301982) @@ -349,7 +349,6 @@ efx_ev_qprefetch( __inefx_evq_t *eep, __inunsigned int count) { - efx_nic_t *enp = eep->ee_enp; unsigned int offset; EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); Modified: stable/10/sys/dev/sfxge/common/efx_lic.c == --- stable/10/sys/dev/sfxge/common/efx_lic.cFri Jun 17 08:56:47 2016 (r301981) +++ stable/10/sys/dev/sfxge/common/efx_lic.cFri Jun 17 08:57:52 2016 (r301982) @@ -534,8 +534,6 @@ efx_lic_v1v2_validate_key( __inuint32_t length ) { - const efx_lic_ops_t *elop = enp->en_elop; - efx_rc_t rc; uint16_t tlv_type; uint16_t tlv_length; @@ -658,7 +656,6 @@ efx_lic_v1v2_delete_key( __out uint32_t *deltap ) { - efx_rc_t rc; uint32_t move_start = offset + length; uint32_t move_length = end - move_start; @@ -1158,7 +1155,6 @@ efx_lic_v3_validate_key( ) { // Check key is a valid V3 key - efx_rc_t rc; uint8_t key_type; uint8_t key_length; @@ -1396,8 +1392,6 @@ efx_lic_check_support( efx_lic_fini( __inefx_nic_t *enp) { - const efx_lic_ops_t *elop = enp->en_elop; - EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_LIC); @@ -1573,7 +1567,6 @@ efx_lic_find_key( ) { const efx_lic_ops_t *elop = enp->en_elop; - boolean_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_LIC); @@ -1599,8 +1592,6 @@ efx_lic_validate_key( { const efx_lic_ops_t *elop = enp->en_elop; boolean_t rc; - uint16_t tlv_type; - uint16_t tlv_length; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_LIC); Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c == --- stable/10/sys/dev/sfxge/common/efx_mcdi.c Fri Jun 17 08:56:47 2016 (r301981) +++ stable/10/sys/dev/sfxge/common/efx_mcdi.c Fri Jun 17 08:57:52 2016 (r301982) @@ -795,7 +795,6 @@ efx_mcdi_get_proxy_handle( __inefx_mcdi_req_t *emrp, __out uint32_t *handlep) { - efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); efx_rc_t rc; /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r301981 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Fri Jun 17 08:56:47 2016 New Revision: 301981 URL: https://svnweb.freebsd.org/changeset/base/301981 Log: MFC r301125 sfxge(4): cleanup: add missing space after if keyword Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/efx_lic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_lic.c == --- stable/10/sys/dev/sfxge/common/efx_lic.cFri Jun 17 08:56:01 2016 (r301980) +++ stable/10/sys/dev/sfxge/common/efx_lic.cFri Jun 17 08:56:47 2016 (r301981) @@ -506,7 +506,7 @@ efx_lic_v1v2_find_key( _NOTE(ARGUNUSED(enp)) - if((size_t)buffer_size - offset < EFX_LICENSE_V1V2_HEADER_LENGTH) + if ((size_t)buffer_size - offset < EFX_LICENSE_V1V2_HEADER_LENGTH) goto fail1; tlv_type = __LE_TO_CPU_16(((uint16_t*)[offset])[0]); @@ -548,7 +548,7 @@ efx_lic_v1v2_validate_key( tlv_type = __LE_TO_CPU_16(((uint16_t*)keyp)[0]); tlv_length = __LE_TO_CPU_16(((uint16_t*)keyp)[1]); - if(tlv_length > EFX_LICENSE_V1V2_PAYLOAD_LENGTH_MAX) { + if (tlv_length > EFX_LICENSE_V1V2_PAYLOAD_LENGTH_MAX) { goto fail2; } if (tlv_type == 0) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r301980 - in stable/10/sys/dev/sfxge: . common
Author: arybchik Date: Fri Jun 17 08:56:01 2016 New Revision: 301980 URL: https://svnweb.freebsd.org/changeset/base/301980 Log: MFC r301122 sfxge(4): set moderation in efx_ev_qcreate This simplifies setting an initial interrupt moderation value, and avoids most calls to evx_ev_qmoderate from contexts where MCDI is not allowed (MCDI is need for an EVQ timer workaround in a later patch). Submitted by: Andy Moreton Reviewed by:gnn Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D6673 Modified: stable/10/sys/dev/sfxge/common/ef10_ev.c stable/10/sys/dev/sfxge/common/ef10_impl.h stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_impl.h stable/10/sys/dev/sfxge/sfxge_ev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/ef10_ev.c == --- stable/10/sys/dev/sfxge/common/ef10_ev.cFri Jun 17 08:54:43 2016 (r301979) +++ stable/10/sys/dev/sfxge/common/ef10_ev.cFri Jun 17 08:56:01 2016 (r301980) @@ -92,8 +92,10 @@ efx_mcdi_init_evq( __inunsigned int instance, __inefsys_mem_t *esmp, __insize_t nevs, - __inuint32_t irq) + __inuint32_t irq, + __inuint32_t us) { + efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_mcdi_req_t req; uint8_t payload[ MAX(MC_CMD_INIT_EVQ_IN_LEN(EFX_EVQ_NBUFS(EFX_EVQ_MAXNEVS)), @@ -141,10 +143,26 @@ efx_mcdi_init_evq( INIT_EVQ_IN_FLAG_RX_MERGE, 1, INIT_EVQ_IN_FLAG_TX_MERGE, 1); - MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_MODE, - MC_CMD_INIT_EVQ_IN_TMR_MODE_DIS); - MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_LOAD, 0); - MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_RELOAD, 0); + if (us == 0) { + MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_MODE, + MC_CMD_INIT_EVQ_IN_TMR_MODE_DIS); + MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_LOAD, 0); + MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_RELOAD, 0); + } else { + uint32_t timer_val; + + /* Calculate the timer value in quanta */ + timer_val = us * 1000 / encp->enc_evq_timer_quantum_ns; + + /* Moderation value is base 0 so we need to deduct 1 */ + if (timer_val > 0) + timer_val--; + + MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_MODE, + MC_CMD_INIT_EVQ_IN_TMR_INT_HLDOFF); + MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_LOAD, timer_val); + MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_TMR_RELOAD, timer_val); + } MCDI_IN_SET_DWORD(req, INIT_EVQ_IN_COUNT_MODE, MC_CMD_INIT_EVQ_IN_COUNT_MODE_DIS); @@ -246,6 +264,7 @@ ef10_ev_qcreate( __inefsys_mem_t *esmp, __insize_t n, __inuint32_t id, + __inuint32_t us, __inefx_evq_t *eep) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); @@ -266,6 +285,11 @@ ef10_ev_qcreate( goto fail2; } + if (us > encp->enc_evq_timer_max_us) { + rc = EINVAL; + goto fail3; + } + /* Set up the handler table */ eep->ee_rx = ef10_ev_rx; eep->ee_tx = ef10_ev_tx; @@ -280,11 +304,13 @@ ef10_ev_qcreate( * Interrupts may be raised for events immediately after the queue is * created. See bug58606. */ - if ((rc = efx_mcdi_init_evq(enp, index, esmp, n, irq)) != 0) - goto fail3; + if ((rc = efx_mcdi_init_evq(enp, index, esmp, n, irq, us)) != 0) + goto fail4; return (0); +fail4: + EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: Modified: stable/10/sys/dev/sfxge/common/ef10_impl.h == --- stable/10/sys/dev/sfxge/common/ef10_impl.h Fri Jun 17 08:54:43 2016 (r301979) +++ stable/10/sys/dev/sfxge/common/ef10_impl.h Fri Jun 17 08:56:01 2016 (r301980) @@ -84,6 +84,7 @@ ef10_ev_qcreate( __inefsys_mem_t *esmp, __insize_t n, __inuint32_t id, + __inuint32_t us, __inefx_evq_t *eep); void Modified: stable/10/sys/dev/sfxge/common/efx.h == --- stable/10/sys/dev/sfxge/common/efx.hFri Jun 17 08:54:43 2016 (r301979) +++ stable/10/sys/dev/sfxge/common/efx.hFri Jun 17 08:56:01 2016 (r301980) @@ -1602,6 +1602,7 @@ efx_ev_qcreate( __inefsys_mem_t
svn commit: r301979 - stable/10/sys/dev/sfxge/common
Author: arybchik Date: Fri Jun 17 08:54:43 2016 New Revision: 301979 URL: https://svnweb.freebsd.org/changeset/base/301979 Log: MFC r301061 sfxge(4): regenerate MCDI headers from firmwaresrc .yml Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/efx_regs_mcdi.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_regs_mcdi.h == --- stable/10/sys/dev/sfxge/common/efx_regs_mcdi.h Fri Jun 17 02:48:57 2016(r301978) +++ stable/10/sys/dev/sfxge/common/efx_regs_mcdi.h Fri Jun 17 08:54:43 2016(r301979) @@ -5115,16 +5115,20 @@ #defineMC_CMD_POLL_BIST_MEM_BUS_MC 0x0 /* enum: CSR IREG bus. */ #defineMC_CMD_POLL_BIST_MEM_BUS_CSR 0x1 -/* enum: RX DPCPU bus. */ +/* enum: RX0 DPCPU bus. */ #defineMC_CMD_POLL_BIST_MEM_BUS_DPCPU_RX 0x2 /* enum: TX0 DPCPU bus. */ #defineMC_CMD_POLL_BIST_MEM_BUS_DPCPU_TX0 0x3 /* enum: TX1 DPCPU bus. */ #defineMC_CMD_POLL_BIST_MEM_BUS_DPCPU_TX1 0x4 -/* enum: RX DICPU bus. */ +/* enum: RX0 DICPU bus. */ #defineMC_CMD_POLL_BIST_MEM_BUS_DICPU_RX 0x5 /* enum: TX DICPU bus. */ #defineMC_CMD_POLL_BIST_MEM_BUS_DICPU_TX 0x6 +/* enum: RX1 DPCPU bus. */ +#defineMC_CMD_POLL_BIST_MEM_BUS_DPCPU_RX1 0x7 +/* enum: RX1 DICPU bus. */ +#defineMC_CMD_POLL_BIST_MEM_BUS_DICPU_RX1 0x8 /* Pattern written to RAM / register */ #defineMC_CMD_POLL_BIST_OUT_MEM_EXPECT_OFST 16 /* Actual value read from RAM / register */ @@ -6094,6 +6098,8 @@ #defineMC_CMD_NVRAM_INFO_OUT_PROTECTED_WIDTH 1 #defineMC_CMD_NVRAM_INFO_OUT_TLV_LBN 1 #defineMC_CMD_NVRAM_INFO_OUT_TLV_WIDTH 1 +#defineMC_CMD_NVRAM_INFO_OUT_CMAC_LBN 6 +#defineMC_CMD_NVRAM_INFO_OUT_CMAC_WIDTH 1 #defineMC_CMD_NVRAM_INFO_OUT_A_B_LBN 7 #defineMC_CMD_NVRAM_INFO_OUT_A_B_WIDTH 1 #defineMC_CMD_NVRAM_INFO_OUT_PHYSDEV_OFST 16 @@ -6887,6 +6893,8 @@ * the command will fail with MC_CMD_ERR_FILTERS_PRESENT. */ #defineMC_CMD_WORKAROUND_BUG26807 0x6 +/* enum: Bug 61265 work around (broken EVQ TMR writes). */ +#defineMC_CMD_WORKAROUND_BUG61265 0x7 /* 0 = disable the workaround indicated by TYPE; any non-zero value = enable * the workaround */ @@ -7865,8 +7873,10 @@ #defineNVRAM_PARTITION_TYPE_SPARE_1 0x1100 /* enum: Spare partition 2 */ #defineNVRAM_PARTITION_TYPE_SPARE_2 0x1200 -/* enum: Spare partition 3 */ -#defineNVRAM_PARTITION_TYPE_SPARE_3 0x1300 +/* enum: Manufacturing partition. Used during manufacture to pass information + * between XJTAG and Manftest. + */ +#defineNVRAM_PARTITION_TYPE_MANUFACTURING0x1300 /* enum: Spare partition 4 */ #defineNVRAM_PARTITION_TYPE_SPARE_4 0x1400 /* enum: Spare partition 5 */ @@ -7901,6 +7911,8 @@ #defineLICENSED_APP_ID_CAPTURE_SOLARSYSTEM 0x40 /* enum: Network Access Control */ #defineLICENSED_APP_ID_NETWORK_ACCESS_CONTROL 0x80 +/* enum: TCP Direct */ +#defineLICENSED_APP_ID_TCP_DIRECT 0x100 #defineLICENSED_APP_ID_ID_LBN 0 #defineLICENSED_APP_ID_ID_WIDTH 32 @@ -7957,6 +7969,12 @@ #defineLICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_WIDTH 1 #defineLICENSED_V3_APPS_NETWORK_ACCESS_CONTROL_LBN 7 #defineLICENSED_V3_APPS_NETWORK_ACCESS_CONTROL_WIDTH 1 +#defineLICENSED_V3_APPS_TCP_DIRECT_LBN 8 +#defineLICENSED_V3_APPS_TCP_DIRECT_WIDTH 1 +#defineLICENSED_V3_APPS_LOW_LATENCY_LBN 9 +#defineLICENSED_V3_APPS_LOW_LATENCY_WIDTH 1 +#defineLICENSED_V3_APPS_SOLARCAPTURE_TAP_LBN 10 +#defineLICENSED_V3_APPS_SOLARCAPTURE_TAP_WIDTH 1 #defineLICENSED_V3_APPS_MASK_LBN 0 #defineLICENSED_V3_APPS_MASK_WIDTH 64 @@ -7985,6 +8003,8 @@ #defineLICENSED_V3_FEATURES_TX_SNIFF_WIDTH 1 #defineLICENSED_V3_FEATURES_PROXY_FILTER_OPS_LBN 8 #defineLICENSED_V3_FEATURES_PROXY_FILTER_OPS_WIDTH 1 +#defineLICENSED_V3_FEATURES_EVENT_CUT_THROUGH_LBN 9 +#defineLICENSED_V3_FEATURES_EVENT_CUT_THROUGH_WIDTH 1 #defineLICENSED_V3_FEATURES_MASK_LBN 0 #defineLICENSED_V3_FEATURES_MASK_WIDTH 64 @@ -8142,6 +8162,109 @@ /* Only valid if INTRFLAG was true */ #defineMC_CMD_INIT_EVQ_OUT_IRQ_OFST 0 +/* MC_CMD_INIT_EVQ_V2_IN msgrequest */ +#defineMC_CMD_INIT_EVQ_V2_IN_LENMIN 44 +#defineMC_CMD_INIT_EVQ_V2_IN_LENMAX 548 +#defineMC_CMD_INIT_EVQ_V2_IN_LEN(num) (36+8*(num)) +/* Size, in entries */ +#defineMC_CMD_INIT_EVQ_V2_IN_SIZE_OFST 0 +/* Desired instance. Must be set to a specific instance, which is a function + * local queue index. + */ +#defineMC_CMD_INIT_EVQ_V2_IN_INSTANCE_OFST 4 +/* The initial timer value. The load value is ignored if the timer
Re: svn commit: r301959 - head/sys/kern
On Thu, Jun 16, 2016 at 10:17:19AM -0700, Conrad Meyer wrote: > style(9) nit: /* FALLTHROUGH */ FALLTHROUGH is only applicable when there are executable statements for both cases, and first sequence of statements does not end in break. Look at the switch() example right after the FALLTHROUGH requirement in the style(9), which shows case '?'. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"