svn commit: r234121 - head/sys/dev/bce

2012-04-11 Thread Pyun YongHyeon
Author: yongari
Date: Wed Apr 11 06:34:25 2012
New Revision: 234121
URL: http://svn.freebsd.org/changeset/base/234121

Log:
  Back out r228476.
  r228476 fixed superfluous link UP/DOWN messages but broke IPMI
  access during boot.  It's not clear why r228476 breaks IPMI and
  should be revisited.
  
  Reported by:  Paul Guyot paulguyot  ieee dot org 
  MFC after:1 week

Modified:
  head/sys/dev/bce/if_bce.c
  head/sys/dev/bce/if_bcereg.h

Modified: head/sys/dev/bce/if_bce.c
==
--- head/sys/dev/bce/if_bce.c   Wed Apr 11 05:11:33 2012(r234120)
+++ head/sys/dev/bce/if_bce.c   Wed Apr 11 06:34:25 2012(r234121)
@@ -1982,7 +1982,6 @@ static void
 bce_miibus_statchg(device_t dev)
 {
struct bce_softc *sc;
-   struct ifnet *ifp;
struct mii_data *mii;
int val;
 
@@ -1990,57 +1989,42 @@ bce_miibus_statchg(device_t dev)
 
DBENTER(BCE_VERBOSE_PHY);
 
-   ifp = sc-bce_ifp;
mii = device_get_softc(sc-bce_miibus);
-   if (mii == NULL || ifp == NULL ||
-   (ifp-if_drv_flags  IFF_DRV_RUNNING) == 0)
-   return;
 
-   sc-bce_link_up = FALSE;
val = REG_RD(sc, BCE_EMAC_MODE);
val = ~(BCE_EMAC_MODE_PORT | BCE_EMAC_MODE_HALF_DUPLEX |
BCE_EMAC_MODE_MAC_LOOP | BCE_EMAC_MODE_FORCE_LINK |
BCE_EMAC_MODE_25G);
 
/* Set MII or GMII interface based on the PHY speed. */
-   if ((mii-mii_media_status  (IFM_ACTIVE | IFM_AVALID)) ==
-   (IFM_ACTIVE | IFM_AVALID)) {
-   switch (IFM_SUBTYPE(mii-mii_media_active)) {
-   case IFM_10_T:
-   if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) {
-   DBPRINT(sc, BCE_INFO_PHY,
-   Enabling 10Mb interface.\n);
-   val |= BCE_EMAC_MODE_PORT_MII_10;
-   sc-bce_link_up = TRUE;
-   break;
-   }
-   /* FALLTHROUGH */
-   case IFM_100_TX:
-   DBPRINT(sc, BCE_INFO_PHY, Enabling MII interface.\n);
-   val |= BCE_EMAC_MODE_PORT_MII;
-   sc-bce_link_up = TRUE;
-   break;
-   case IFM_2500_SX:
-   DBPRINT(sc, BCE_INFO_PHY, Enabling 2.5G MAC mode.\n);
-   val |= BCE_EMAC_MODE_25G;
-   /* FALLTHROUGH */
-   case IFM_1000_T:
-   case IFM_1000_SX:
-   DBPRINT(sc, BCE_INFO_PHY, Enabling GMII interface.\n);
-   val |= BCE_EMAC_MODE_PORT_GMII;
-   sc-bce_link_up = TRUE;
-   if (bce_verbose || bootverbose)
-   BCE_PRINTF(Gigabit link up!\n);
-   break;
-   default:
-   DBPRINT(sc, BCE_INFO_PHY, Unknown link speed.\n);
+   switch (IFM_SUBTYPE(mii-mii_media_active)) {
+   case IFM_10_T:
+   if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) {
+   DBPRINT(sc, BCE_INFO_PHY,
+   Enabling 10Mb interface.\n);
+   val |= BCE_EMAC_MODE_PORT_MII_10;
break;
}
+   /* fall-through */
+   case IFM_100_TX:
+   DBPRINT(sc, BCE_INFO_PHY, Enabling MII interface.\n);
+   val |= BCE_EMAC_MODE_PORT_MII;
+   break;
+   case IFM_2500_SX:
+   DBPRINT(sc, BCE_INFO_PHY, Enabling 2.5G MAC mode.\n);
+   val |= BCE_EMAC_MODE_25G;
+   /* fall-through */
+   case IFM_1000_T:
+   case IFM_1000_SX:
+   DBPRINT(sc, BCE_INFO_PHY, Enabling GMII interface.\n);
+   val |= BCE_EMAC_MODE_PORT_GMII;
+   break;
+   default:
+   DBPRINT(sc, BCE_INFO_PHY, Unknown link speed, enabling 
+   default GMII interface.\n);
+   val |= BCE_EMAC_MODE_PORT_GMII;
}
 
-   if (sc-bce_link_up == FALSE)
-   return;
-
/* Set half or full duplex based on PHY settings. */
if ((mii-mii_media_active  IFM_GMASK) == IFM_HDX) {
DBPRINT(sc, BCE_INFO_PHY,
@@ -2052,7 +2036,7 @@ bce_miibus_statchg(device_t dev)
 
REG_WR(sc, BCE_EMAC_MODE, val);
 
-   if ((mii-mii_media_active  IFM_ETH_RXPAUSE) != 0) {
+   if ((mii-mii_media_active  IFM_ETH_RXPAUSE) != 0) {
DBPRINT(sc, BCE_INFO_PHY,
%s(): Enabling RX flow control.\n, __FUNCTION__);
BCE_SETBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN);
@@ -2062,7 +2046,7 @@ bce_miibus_statchg(device_t dev)
BCE_CLRBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN);
}
 
-   if ((mii-mii_media_active  IFM_ETH_TXPAUSE) != 0) {
+  

svn commit: r234122 - head/sbin/bsdlabel

2012-04-11 Thread Andrey V. Elsukov
Author: ae
Date: Wed Apr 11 06:35:13 2012
New Revision: 234122
URL: http://svn.freebsd.org/changeset/base/234122

Log:
  It seems that libdisk(3) incorrectly sets d_secperunit value.
  Automatically fix it like GEOM_PART_BSD does.
  
  MFC after:1 week

Modified:
  head/sbin/bsdlabel/bsdlabel.c

Modified: head/sbin/bsdlabel/bsdlabel.c
==
--- head/sbin/bsdlabel/bsdlabel.c   Wed Apr 11 06:34:25 2012
(r234121)
+++ head/sbin/bsdlabel/bsdlabel.c   Wed Apr 11 06:35:13 2012
(r234122)
@@ -1194,7 +1194,8 @@ checklabel(struct disklabel *lp)
lp-d_interleave = vl-d_interleave;
if (lp-d_secpercyl == 0)
lp-d_secpercyl = vl-d_secpercyl;
-   if (lp-d_secperunit == 0)
+   if (lp-d_secperunit == 0 ||
+   lp-d_secperunit  vl-d_secperunit)
lp-d_secperunit = vl-d_secperunit;
if (lp-d_bbsize == 0)
lp-d_bbsize = vl-d_bbsize;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234130 - head/sys/netinet

2012-04-11 Thread Gleb Smirnoff
Author: glebius
Date: Wed Apr 11 12:26:30 2012
New Revision: 234130
URL: http://svn.freebsd.org/changeset/base/234130

Log:
  It is a logical error that in carp_multicast_cleanup()
  we look at count of addresses on a particular vhid, we
  should account number of addresses on cif.
  
  To achieve this we need to run carp_attach() and
  carp_detach() under appropriate cif lock.

Modified:
  head/sys/netinet/ip_carp.c

Modified: head/sys/netinet/ip_carp.c
==
--- head/sys/netinet/ip_carp.c  Wed Apr 11 09:25:20 2012(r234129)
+++ head/sys/netinet/ip_carp.c  Wed Apr 11 12:26:30 2012(r234130)
@@ -223,6 +223,13 @@ SYSCTL_STRUCT(_net_inet_carp, OID_AUTO, 
 #defineCIF_LOCK_ASSERT(cif)mtx_assert((cif)-cif_mtx, MA_OWNED)
 #defineCIF_LOCK(cif)   mtx_lock((cif)-cif_mtx)
 #defineCIF_UNLOCK(cif) mtx_unlock((cif)-cif_mtx)
+#defineCIF_FREE(cif)   do {\
+   CIF_LOCK_ASSERT(cif);   \
+   if (TAILQ_EMPTY((cif)-cif_vrs))   \
+   carp_free_if(cif);  \
+   else\
+   CIF_UNLOCK(cif);\
+} while (0)
 
 #defineCARP_LOG(...)   do {\
if (carp_log  0)   \
@@ -257,6 +264,7 @@ SYSCTL_STRUCT(_net_inet_carp, OID_AUTO, 
 static voidcarp_input_c(struct mbuf *, struct carp_header *, sa_family_t);
 static struct carp_softc
*carp_alloc(struct ifnet *);
+static voidcarp_detach_locked(struct ifaddr *);
 static voidcarp_destroy(struct carp_softc *);
 static struct carp_if
*carp_alloc_if(struct ifnet *);
@@ -1214,12 +1222,13 @@ carp_setrun(struct carp_softc *sc, sa_fa
  * Setup multicast structures.
  */
 static int
-carp_multicast_setup(struct carp_softc *sc, sa_family_t sa)
+carp_multicast_setup(struct carp_if *cif, sa_family_t sa)
 {
-   struct ifnet *ifp = sc-sc_carpdev;
-   struct carp_if *cif = ifp-if_carp;
+   struct ifnet *ifp = cif-cif_ifp;
int error = 0;
 
+   CIF_LOCK_ASSERT(cif);
+
switch (sa) {
 #ifdef INET
case AF_INET:
@@ -1232,7 +1241,9 @@ carp_multicast_setup(struct carp_softc *
 
imo-imo_membership = (struct in_multi **)malloc(
(sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_CARP,
-   M_WAITOK);
+   M_NOWAIT);
+   if (imo-imo_membership == NULL)
+   return (ENOMEM);
imo-imo_mfilters = NULL;
imo-imo_max_memberships = IP_MIN_MEMBERSHIPS;
imo-imo_multicast_vif = -1;
@@ -1262,7 +1273,9 @@ carp_multicast_setup(struct carp_softc *
 
im6o-im6o_membership = (struct in6_multi **)malloc(
(sizeof(struct in6_multi *) * IPV6_MIN_MEMBERSHIPS), M_CARP,
-   M_ZERO|M_WAITOK);
+   M_ZERO | M_NOWAIT);
+   if (im6o-im6o_membership == NULL)
+   return (ENOMEM);
im6o-im6o_mfilters = NULL;
im6o-im6o_max_memberships = IPV6_MIN_MEMBERSHIPS;
im6o-im6o_multicast_hlim = CARP_DFLTTL;
@@ -1316,15 +1329,14 @@ carp_multicast_setup(struct carp_softc *
  * Free multicast structures.
  */
 static void
-carp_multicast_cleanup(struct carp_softc *sc, sa_family_t sa)
+carp_multicast_cleanup(struct carp_if *cif, sa_family_t sa)
 {
-   struct ifnet *ifp = sc-sc_carpdev;
-   struct carp_if *cif = ifp-if_carp;
 
+   CIF_LOCK_ASSERT(cif);
switch (sa) {
 #ifdef INET
case AF_INET:
-   if (sc-sc_naddrs == 0) {
+   if (cif-cif_naddrs == 0) {
struct ip_moptions *imo = cif-cif_imo;
 
in_leavegroup(imo-imo_membership[0], NULL);
@@ -1338,7 +1350,7 @@ carp_multicast_cleanup(struct carp_softc
 #endif
 #ifdef INET6
case AF_INET6:
-   if (sc-sc_naddrs6 == 0) {
+   if (cif-cif_naddrs6 == 0) {
struct ip6_moptions *im6o = cif-cif_im6o;
 
in6_mc_leave(im6o-im6o_membership[0], NULL);
@@ -1496,12 +1508,9 @@ carp_destroy(struct carp_softc *sc)
struct ifnet *ifp = sc-sc_carpdev;
struct carp_if *cif = ifp-if_carp;
 
-   CIF_LOCK(cif);
+   CIF_LOCK_ASSERT(cif);
+
TAILQ_REMOVE(cif-cif_vrs, sc, sc_list);
-   if (TAILQ_EMPTY(cif-cif_vrs))
-   carp_free_if(cif);
-   else
-   CIF_UNLOCK(cif);
 
mtx_lock(carp_mtx);
LIST_REMOVE(sc, sc_next);
@@ -1777,6 +1786,7 @@ int
 carp_attach(struct ifaddr *ifa, int vhid)
 {
struct ifnet *ifp = ifa-ifa_ifp;
+   struct carp_if *cif = ifp-if_carp;
struct carp_softc *sc;
int index, error;
 
@@ -1795,43 +1805,51 

svn commit: r234131 - in head: lib/libc/sys sys/kern

2012-04-11 Thread Eitan Adler
Author: eadler
Date: Wed Apr 11 14:08:09 2012
New Revision: 234131
URL: http://svn.freebsd.org/changeset/base/234131

Log:
  Return EBADF instead of EMFILE from dup2 when the second argument is
  outside the range of valid file descriptors
  
  PR:   kern/164970
  Submitted by: Peter Jeremy peterjer...@acm.org
  Reviewed by:  jilles
  Approved by:  cperciva
  MFC after:1 week

Modified:
  head/lib/libc/sys/dup.2
  head/lib/libc/sys/fcntl.2
  head/sys/kern/kern_descrip.c

Modified: head/lib/libc/sys/dup.2
==
--- head/lib/libc/sys/dup.2 Wed Apr 11 12:26:30 2012(r234130)
+++ head/lib/libc/sys/dup.2 Wed Apr 11 14:08:09 2012(r234131)
@@ -128,20 +128,27 @@ indicates the cause of the error.
 .Sh ERRORS
 The
 .Fn dup
-and
-.Fn dup2
-system calls fail if:
+system call fails if:
 .Bl -tag -width Er
 .It Bq Er EBADF
 The
 .Fa oldd
-or
-.Fa newd
 argument
 is not a valid active descriptor
 .It Bq Er EMFILE
 Too many descriptors are active.
 .El
+The
+.Fn dup2
+system call fails if:
+.Bl -tag -width Er
+.It Bq Er EBADF
+The
+.Fa oldd
+argument is not a valid active descriptor or the
+.Fa newd
+argument is negative or exceeds the maximum allowable descriptor number
+.El
 .Sh SEE ALSO
 .Xr accept 2 ,
 .Xr cap_new 2 ,

Modified: head/lib/libc/sys/fcntl.2
==
--- head/lib/libc/sys/fcntl.2   Wed Apr 11 12:26:30 2012(r234130)
+++ head/lib/libc/sys/fcntl.2   Wed Apr 11 14:08:09 2012(r234131)
@@ -539,8 +539,6 @@ The argument
 .Fa cmd
 is
 .Dv F_DUPFD
-or
-.Dv F_DUP2FD
 and the maximum number of file descriptors permitted for the
 process are already in use,
 or no file descriptors greater than or equal to

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cWed Apr 11 12:26:30 2012
(r234130)
+++ head/sys/kern/kern_descrip.cWed Apr 11 14:08:09 2012
(r234131)
@@ -817,7 +817,7 @@ do_dup(struct thread *td, int flags, int
maxfd = min((int)lim_cur(p, RLIMIT_NOFILE), maxfilesperproc);
PROC_UNLOCK(p);
if (new = maxfd)
-   return (flags  DUP_FCNTL ? EINVAL : EMFILE);
+   return (flags  DUP_FCNTL ? EINVAL : EBADF);
 
FILEDESC_XLOCK(fdp);
if (old = fdp-fd_nfiles || fdp-fd_ofiles[old] == NULL) {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234132 - head/lib/libcrypt

2012-04-11 Thread Eitan Adler
Author: eadler
Date: Wed Apr 11 14:12:28 2012
New Revision: 234132
URL: http://svn.freebsd.org/changeset/base/234132

Log:
  Make the item numbers match the crypt magic number
  
  PR:   docs/166497
  Submitted by: Mike Kelly pi...@pioto.org
  Approved by:  cperciva
  MFC after:1 week

Modified:
  head/lib/libcrypt/crypt.3

Modified: head/lib/libcrypt/crypt.3
==
--- head/lib/libcrypt/crypt.3   Wed Apr 11 14:08:09 2012(r234131)
+++ head/lib/libcrypt/crypt.3   Wed Apr 11 14:12:28 2012(r234132)
@@ -187,6 +187,8 @@ Blowfish
 .It
 NT-Hash
 .It
+(unused)
+.It
 SHA-256
 .It
 SHA-512
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234133 - head/etc/root

2012-04-11 Thread Eitan Adler
Author: eadler
Date: Wed Apr 11 14:13:22 2012
New Revision: 234133
URL: http://svn.freebsd.org/changeset/base/234133

Log:
  - remove the length shortening on the path
  - make the default prompt a bit more like scp
  - make the user show as root even when using 'su' instead of 'su -'
  - the key bindings didn't hurt anything but likely hide a bug
  - merge history instead of overwriting it
  
  Submitted by: gavin, joel
  Approved by:  cperciva

Modified:
  head/etc/root/dot.cshrc

Modified: head/etc/root/dot.cshrc
==
--- head/etc/root/dot.cshrc Wed Apr 11 14:12:28 2012(r234132)
+++ head/etc/root/dot.cshrc Wed Apr 11 14:13:22 2012(r234133)
@@ -23,12 +23,15 @@ setenv  BLOCKSIZE   K
 
 if ($?prompt) then
# An interactive shell -- set some stuff up
-   set prompt = %n@%m:%c04%# 
+   if ($uid == 0) then
+   set user = root
+   endif
+   set prompt = %n@%m:%/ %# 
set promptchars = %#
 
set filec
set history = 1000
-   set savehist = 1000
+   set savehist = (1000 merge)
set autolist = ambiguous
# Use history to aid expansion
set autoexpand
@@ -38,10 +41,6 @@ if ($?prompt) then
bindkey ^W backward-delete-word
bindkey -k up history-search-backward
bindkey -k down history-search-forward
-
-   bindkey \e[1~ beginning-of-line #make Home key work;
-   bindkey \e[3~ delete-char #make Delete key work;
-   bindkey \e[4~ end-of-line #make End key work;
endif
 
 endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234134 - head/sbin/sysctl

2012-04-11 Thread Eitan Adler
Author: eadler
Date: Wed Apr 11 14:18:18 2012
New Revision: 234134
URL: http://svn.freebsd.org/changeset/base/234134

Log:
  s/Free Memory Pages/Free Memory/ to avoid confusion, since we're
  reporting a number of bytes rather than a number of pages
  
  PR:   misc/165208
  Submitted by: Arnaud Lacombe lacom...@gmail.com
  Approved by:  cperciva
  MFC after:3 days

Modified:
  head/sbin/sysctl/sysctl.c

Modified: head/sbin/sysctl/sysctl.c
==
--- head/sbin/sysctl/sysctl.c   Wed Apr 11 14:13:22 2012(r234133)
+++ head/sbin/sysctl/sysctl.c   Wed Apr 11 14:18:18 2012(r234134)
@@ -419,7 +419,7 @@ S_vmtotal(int l2, void *p)
v-t_vmshr * pageKilo, v-t_avmshr * pageKilo);
printf(Shared Real Memory:\t(Total: %dK Active: %dK)\n,
v-t_rmshr * pageKilo, v-t_armshr * pageKilo);
-   printf(Free Memory Pages:\t%dK\n, v-t_free * pageKilo);
+   printf(Free Memory:\t%dK\n, v-t_free * pageKilo);
 
return (0);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234135 - head/share/examples/csh

2012-04-11 Thread Eitan Adler
Author: eadler
Date: Wed Apr 11 14:36:05 2012
New Revision: 234135
URL: http://svn.freebsd.org/changeset/base/234135

Log:
  Fix typo (add a missing '%/' in sed)
  
  Submitted by: jmallett
  Approved by:  cperciva (implicit)
  MFC after:3 days

Modified:
  head/share/examples/csh/dot.cshrc

Modified: head/share/examples/csh/dot.cshrc
==
--- head/share/examples/csh/dot.cshrc   Wed Apr 11 14:18:18 2012
(r234134)
+++ head/share/examples/csh/dot.cshrc   Wed Apr 11 14:36:05 2012
(r234135)
@@ -29,7 +29,7 @@ complete service  'c/-/(e l r v)/' 'p/1
 complete kldunload 'n@*@`kldstat | awk \{sub\(\/\.ko\/,\\,\$NF\)\;print\ 
\$NF\} | grep -v Name` @'
 complete make   'n@*@`make -pn | sed -n -E /^[#_.\/[:blank:]]+/d; 
/=/d; s/[[:blank:]]*:.*//gp;`@'
 complete pkg_delete 'c/-/(i v D n p d f G x X r)/' 'n@*@`ls /var/db/pkg`@'
-complete pkg_info   'c/-/(a b v p q Q c d D f g i I j k K r R m L s o G O 
x X e E l t V P)/' 'n@*@`\ls -1 /var/db/pkg | sed svar/db/pkg/%%`@'
+complete pkg_info   'c/-/(a b v p q Q c d D f g i I j k K r R m L s o G O 
x X e E l t V P)/' 'n@*@`\ls -1 /var/db/pkg | sed s%/var/db/pkg/%%`@'
 complete kill  'c/-/S/' 'c/%/j/' 'n/*/`ps -ax | awk '''{print 
$1}'''`/'
 complete killall   'c/-/S/' 'c/%/j/' 'n/*/`ps -ax | awk '''{print 
$5}'''`/'
 complete dd'c/[io]f=/f/ n/*/(if of ibs obs bs skip seek count)/='
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234137 - head/sys/dev/ixgbe

2012-04-11 Thread Luigi Rizzo
Author: luigi
Date: Wed Apr 11 15:02:14 2012
New Revision: 234137
URL: http://svn.freebsd.org/changeset/base/234137

Log:
  Enable prefetching of descriptors on the TX ring, using the same
  values as in the Intel driver 3.8.21 for linux.  The fact that it
  is standard in the above driver suggests that it has no bad side
  effects.
  
  But of course there must be a reason for enabling features, not
  just it does not harm, so here it is a good one:
  
  Prefetching enables full line rate even using a single queue (14.88
  Mpps, compared to ~12 Mpps without prefetch).  This in turn is
  terribly useful when one wants to schedule traffic.
  
  For obvious reasons the difference is only visible with netmap
  or other high speed solutions, but presumably the advantage
  should be in the order of a fraction of a microsecond when
  starting transmission on an empty queue.
  
  Discussed with Jack Vogel.
  
  MFC after:1 week

Modified:
  head/sys/dev/ixgbe/ixgbe.c

Modified: head/sys/dev/ixgbe/ixgbe.c
==
--- head/sys/dev/ixgbe/ixgbe.c  Wed Apr 11 14:54:06 2012(r234136)
+++ head/sys/dev/ixgbe/ixgbe.c  Wed Apr 11 15:02:14 2012(r234137)
@@ -1143,6 +1143,14 @@ ixgbe_init_locked(struct adapter *adapte
txdctl |= IXGBE_TXDCTL_ENABLE;
/* Set WTHRESH to 8, burst writeback */
txdctl |= (8  16);
+   /*
+* When the internal queue falls below PTHRESH (32),
+* start prefetching as long as there are at least
+* HTHRESH (1) buffers ready. The values are taken
+* from the Intel linux driver 3.8.21.
+* Prefetching enables tx line rate even with 1 queue.
+*/
+   txdctl |= (16  0) | (1  8);
IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(i), txdctl);
}
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234138 - head/lib/libfetch

2012-04-11 Thread Ed Maste
Author: emaste
Date: Wed Apr 11 15:42:02 2012
New Revision: 234138
URL: http://svn.freebsd.org/changeset/base/234138

Log:
  Support percent-encoded user and password
  
  RFC 1738 specifies that any :, @, or / within a user name or
  password in a URL is percent-encoded, to avoid ambiguity with the use
  of those characters as URL component separators.
  
  Reviewed by:rstone@
  MFC after:1 month

Modified:
  head/lib/libfetch/fetch.c

Modified: head/lib/libfetch/fetch.c
==
--- head/lib/libfetch/fetch.c   Wed Apr 11 15:02:14 2012(r234137)
+++ head/lib/libfetch/fetch.c   Wed Apr 11 15:42:02 2012(r234138)
@@ -289,6 +289,49 @@ fetchMakeURL(const char *scheme, const c
 }
 
 /*
+ * Return value of the given hex digit.
+ */
+static int
+fetch_hexval(char ch)
+{
+
+   if (ch = '0'  ch = '9')
+   return (ch - '0');
+   else if (ch = 'a'  ch = 'f')
+   return (ch - 'a' + 10);
+   else if (ch = 'A'  ch = 'F')
+   return (ch - 'A' + 10);
+   return (-1);
+}
+
+/*
+ * Decode percent-encoded URL component from src into dst, stopping at end
+ * of string, or at @ or : separators.  Returns a pointer to the unhandled
+ * part of the input string (null terminator, @, or :).  No terminator is
+ * written to dst (it is the caller's responsibility).
+ */
+static const char *
+fetch_pctdecode(char *dst, const char *src, size_t dlen)
+{
+   int d1, d2;
+   char c;
+   const char *s;
+
+   for (s = src; *s != '\0'  *s != '@'  *s != ':'; s++) {
+   if (s[0] == '%'  (d1 = fetch_hexval(s[1])) = 0 
+   (d2 = fetch_hexval(s[2])) = 0  (d1  0 || d2  0)) {
+   c = d1  4 | d2;
+   s += 2;
+   } else {
+   c = *s;
+   }
+   if (dlen--  0)
+   *dst++ = c;
+   }
+   return (s);
+}
+
+/*
  * Split an URL into components. URL syntax is:
  * [method:/][/[user[:pwd]@]host[:port]/][document]
  * This almost, but not quite, RFC1738 URL syntax.
@@ -329,15 +372,11 @@ fetchParseURL(const char *URL)
p = strpbrk(URL, /@);
if (p  *p == '@') {
/* username */
-   for (q = URL, i = 0; (*q != ':')  (*q != '@'); q++)
-   if (i  URL_USERLEN)
-   u-user[i++] = *q;
+   q = fetch_pctdecode(u-user, URL, URL_USERLEN);
 
/* password */
if (*q == ':')
-   for (q++, i = 0; (*q != ':')  (*q != '@'); q++)
-   if (i  URL_PWDLEN)
-   u-pwd[i++] = *q;
+   q = fetch_pctdecode(u-pwd, ++q, URL_PWDLEN);
 
p++;
} else {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234139 - head/sys/fs/ext2fs

2012-04-11 Thread Jaakko Heinonen
Author: jh
Date: Wed Apr 11 15:48:50 2012
New Revision: 234139
URL: http://svn.freebsd.org/changeset/base/234139

Log:
  Restore the blank line incorrectly removed in r234104.
  
  Pointed out by:   bde

Modified:
  head/sys/fs/ext2fs/ext2_vnops.c

Modified: head/sys/fs/ext2fs/ext2_vnops.c
==
--- head/sys/fs/ext2fs/ext2_vnops.c Wed Apr 11 15:42:02 2012
(r234138)
+++ head/sys/fs/ext2fs/ext2_vnops.c Wed Apr 11 15:48:50 2012
(r234139)
@@ -407,6 +407,7 @@ ext2_setattr(ap)
/* Disallow flags not supported by ext2fs. */
if(vap-va_flags  ~(SF_APPEND | SF_IMMUTABLE | UF_NODUMP))
return (EOPNOTSUPP);
+
if (vp-v_mount-mnt_flag  MNT_RDONLY)
return (EROFS);
/*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234140 - head/sys/dev/netmap

2012-04-11 Thread Luigi Rizzo
Author: luigi
Date: Wed Apr 11 16:11:08 2012
New Revision: 234140
URL: http://svn.freebsd.org/changeset/base/234140

Log:
  A couple of changes related to ixgbe operation in netmap mode:
  
  - add a sysctl, dev.netmap.ix_crcstrip, to control whether ixgbe should
strip the CRC on received frames. Defaults to 0, which keeps the CRC.
and improves performance when receiving min-sized (64-byte) frames.
This matters because  min-sized frames is one of the standard
benchmarks for switches and routers, some chipsets seem to issue
read-modify-write cycles for PCIe transactions that are not a
full cache line, and a min-sized frame triggers the bug, resulting
in reduced throughput -- 9.7 instead of 14.88 Mpps -- and heavy
bus load.
  
  - for the time being, always look for incoming packets on a select/poll
even if there has not been an interrupt in the meantime. This is
only a temporary workaround for a probable race condition in keeping
track of rx interrupts.
Add a couple of diagnostic vars to help studying the problem.

Modified:
  head/sys/dev/netmap/ixgbe_netmap.h
  head/sys/dev/netmap/netmap.c

Modified: head/sys/dev/netmap/ixgbe_netmap.h
==
--- head/sys/dev/netmap/ixgbe_netmap.h  Wed Apr 11 15:48:50 2012
(r234139)
+++ head/sys/dev/netmap/ixgbe_netmap.h  Wed Apr 11 16:11:08 2012
(r234140)
@@ -49,6 +49,29 @@
  */
 #include dev/netmap/netmap_kern.h
 
+/*
+ * ix_crcstrip: 0: keep CRC in rx frames (default), 1: strip it.
+ * During regular operations the CRC is stripped, but on some
+ * hardware reception of frames not multiple of 64 is slower,
+ * so using crcstrip=0 helps in benchmarks.
+ *
+ * ix_rx_miss, ix_rx_miss_bufs:
+ * count packets that might be missed due to lost interrupts.
+ *
+ * ix_use_dd
+ * use the dd bit for completed tx transmissions.
+ * This is tricky, much better to use TDH for now.
+ */
+SYSCTL_DECL(_dev_netmap);
+static int ix_rx_miss, ix_rx_miss_bufs, ix_use_dd, ix_crcstrip;
+SYSCTL_INT(_dev_netmap, OID_AUTO, ix_crcstrip,
+CTLFLAG_RW, ix_crcstrip, 0, strip CRC on rx frames);
+SYSCTL_INT(_dev_netmap, OID_AUTO, ix_use_dd,
+CTLFLAG_RW, ix_use_dd, 0, use dd instead of tdh to detect tx frames);
+SYSCTL_INT(_dev_netmap, OID_AUTO, ix_rx_miss,
+CTLFLAG_RW, ix_rx_miss, 0, potentially missed rx intr);
+SYSCTL_INT(_dev_netmap, OID_AUTO, ix_rx_miss_bufs,
+CTLFLAG_RW, ix_rx_miss_bufs, 0, potentially missed rx intr bufs);
 
 /*
  * wrapper to export locks to the generic netmap code.
@@ -82,6 +105,38 @@ ixgbe_netmap_lock_wrapper(struct ifnet *
 }
 
 
+static void
+set_crcstrip(struct ixgbe_hw *hw, int onoff)
+{
+   /* crc stripping is set in two places:
+* IXGBE_HLREG0 (left alone by the original driver)
+* IXGBE_RDRXCTL (set by the original driver in
+*  ixgbe_setup_hw_rsc() called in init_locked.
+*  We disable the setting when netmap is compiled in).
+* When netmap is compiled in we disabling IXGBE_RDRXCTL
+* modifications of the IXGBE_RDRXCTL_CRCSTRIP bit, and
+* instead update the state here.
+*/
+   uint32_t hl, rxc;
+
+   hl = IXGBE_READ_REG(hw, IXGBE_HLREG0);
+   rxc = IXGBE_READ_REG(hw, IXGBE_RDRXCTL);
+   /* hw requirements ... */
+   rxc = ~IXGBE_RDRXCTL_RSCFRSTSIZE;
+   rxc |= IXGBE_RDRXCTL_RSCACKC;
+   if (onoff  !ix_crcstrip) {
+   /* keep the crc. Fast rx */
+   hl = ~IXGBE_HLREG0_RXCRCSTRP;
+   rxc = ~IXGBE_RDRXCTL_CRCSTRIP;
+   } else {
+   /* reset default mode */
+   hl |= IXGBE_HLREG0_RXCRCSTRP;
+   rxc |= IXGBE_RDRXCTL_CRCSTRIP;
+   }
+   IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hl);
+   IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rxc);
+}
+
 /*
  * Register/unregister. We are already under core lock.
  * Only called on the first register or the last unregister.
@@ -101,6 +156,7 @@ ixgbe_netmap_reg(struct ifnet *ifp, int 
/* Tell the stack that the interface is no longer active */
ifp-if_drv_flags = ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
 
+   set_crcstrip(adapter-hw, onoff);
if (onoff) { /* enable netmap mode */
ifp-if_capenable |= IFCAP_NETMAP;
 
@@ -125,6 +181,7 @@ fail:
/* initialize the card, this time in standard mode */
ixgbe_init_locked(adapter); /* also enables intr */
}
+   set_crcstrip(adapter-hw, onoff);
return (error);
 }
 
@@ -325,12 +382,26 @@ ring_reset:
 * For the time being we use TDH, as we do it infrequently
 * enough not to pose performance problems.
 */
+   if (ix_use_dd) {
+   struct ixgbe_legacy_tx_desc *txd =
+   (struct ixgbe_legacy_tx_desc *)txr-tx_base;
+
+   l = txr-next_to_clean;
+   k = 

svn commit: r234149 - head/sys/powerpc/aim

2012-04-11 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Wed Apr 11 20:28:05 2012
New Revision: 234149
URL: http://svn.freebsd.org/changeset/base/234149

Log:
  Fix error in r233949. Synchronizing icaches on uncacheable pages turns out
  not to be a good idea, and of course the PV entry list for a page is never
  empty after the page has been mapped.

Modified:
  head/sys/powerpc/aim/mmu_oea.c

Modified: head/sys/powerpc/aim/mmu_oea.c
==
--- head/sys/powerpc/aim/mmu_oea.c  Wed Apr 11 20:26:50 2012
(r234148)
+++ head/sys/powerpc/aim/mmu_oea.c  Wed Apr 11 20:28:05 2012
(r234149)
@@ -1137,9 +1137,11 @@ moea_enter_locked(pmap_t pmap, vm_offset
/*
 * Flush the real page from the instruction cache. This has be done
 * for all user mappings to prevent information leakage via the
-* instruction cache.
+* instruction cache. moea_pvo_enter() returns ENOENT for the first
+* mapping for a page.
 */
-   if (pmap != kernel_pmap  LIST_EMPTY(vm_page_to_pvoh(m)))
+   if (pmap != kernel_pmap  error == ENOENT 
+   (pte_lo  (PTE_I | PTE_G)) == 0)
moea_syncicache(VM_PAGE_TO_PHYS(m), PAGE_SIZE);
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234152 - in head/sys: kern sys

2012-04-11 Thread John Baldwin
Author: jhb
Date: Wed Apr 11 20:57:41 2012
New Revision: 234152
URL: http://svn.freebsd.org/changeset/base/234152

Log:
  Allow device_busy() and device_unbusy() to be invoked while a device is
  being attached.  This is implemented by adding a new DS_ATTACHING state
  while a device's DEVICE_ATTACH() method is being invoked.  A driver is
  required to not fail an attach of a busy device.  The device's state will
  be promoted to DS_BUSY rather than DS_ACTIVE() if the device was marked
  busy during DEVICE_ATTACH().
  
  Reviewed by:  kib
  MFC after:1 week

Modified:
  head/sys/kern/subr_bus.c
  head/sys/sys/bus.h

Modified: head/sys/kern/subr_bus.c
==
--- head/sys/kern/subr_bus.cWed Apr 11 20:55:21 2012(r234151)
+++ head/sys/kern/subr_bus.cWed Apr 11 20:57:41 2012(r234152)
@@ -2472,12 +2472,13 @@ device_disable(device_t dev)
 void
 device_busy(device_t dev)
 {
-   if (dev-state  DS_ATTACHED)
+   if (dev-state  DS_ATTACHING)
panic(device_busy: called for unattached device);
if (dev-busy == 0  dev-parent)
device_busy(dev-parent);
dev-busy++;
-   dev-state = DS_BUSY;
+   if (dev-state == DS_ATTACHED)
+   dev-state = DS_BUSY;
 }
 
 /**
@@ -2486,14 +2487,16 @@ device_busy(device_t dev)
 void
 device_unbusy(device_t dev)
 {
-   if (dev-state != DS_BUSY)
+   if (dev-busy != 0  dev-state != DS_BUSY 
+   dev-state != DS_ATTACHING)
panic(device_unbusy: called for non-busy device %s,
device_get_nameunit(dev));
dev-busy--;
if (dev-busy == 0) {
if (dev-parent)
device_unbusy(dev-parent);
-   dev-state = DS_ATTACHED;
+   if (dev-state == DS_BUSY)
+   dev-state = DS_ATTACHED;
}
 }
 
@@ -2729,6 +2732,7 @@ device_attach(device_t dev)
device_sysctl_init(dev);
if (!device_is_quiet(dev))
device_print_child(dev-parent, dev);
+   dev-state = DS_ATTACHING;
if ((error = DEVICE_ATTACH(dev)) != 0) {
printf(device_attach: %s%d attach returned %d\n,
dev-driver-name, dev-unit, error);
@@ -2736,11 +2740,15 @@ device_attach(device_t dev)
devclass_delete_device(dev-devclass, dev);
(void)device_set_driver(dev, NULL);
device_sysctl_fini(dev);
+   KASSERT(dev-busy == 0, (attach failed but busy));
dev-state = DS_NOTPRESENT;
return (error);
}
device_sysctl_update(dev);
-   dev-state = DS_ATTACHED;
+   if (dev-busy)
+   dev-state = DS_BUSY;
+   else
+   dev-state = DS_ATTACHED;
dev-flags = ~DF_DONENOMATCH;
devadded(dev);
return (0);

Modified: head/sys/sys/bus.h
==
--- head/sys/sys/bus.h  Wed Apr 11 20:55:21 2012(r234151)
+++ head/sys/sys/bus.h  Wed Apr 11 20:57:41 2012(r234152)
@@ -52,6 +52,7 @@ struct u_businfo {
 typedef enum device_state {
DS_NOTPRESENT = 10, /** @brief not probed or probe failed 
*/
DS_ALIVE = 20,  /** @brief probe succeeded */
+   DS_ATTACHING = 25,  /** @brief currently attaching */
DS_ATTACHED = 30,   /** @brief attach method called */
DS_BUSY = 40/** @brief device is open */
 } device_state_t;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234153 - head/sys/x86/pci

2012-04-11 Thread John Baldwin
Author: jhb
Date: Wed Apr 11 21:00:33 2012
New Revision: 234153
URL: http://svn.freebsd.org/changeset/base/234153

Log:
  Trim stray blank line.

Modified:
  head/sys/x86/pci/pci_bus.c

Modified: head/sys/x86/pci/pci_bus.c
==
--- head/sys/x86/pci/pci_bus.c  Wed Apr 11 20:57:41 2012(r234152)
+++ head/sys/x86/pci/pci_bus.c  Wed Apr 11 21:00:33 2012(r234153)
@@ -133,7 +133,6 @@ legacy_pcib_map_msi(device_t pcib, devic
slot, func));
pci_ht_map_msi(hostb, *addr);
return (0);
-   
 }
 
 static const char *
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234154 - head/sys/dev/e1000

2012-04-11 Thread John Baldwin
Author: jhb
Date: Wed Apr 11 21:33:45 2012
New Revision: 234154
URL: http://svn.freebsd.org/changeset/base/234154

Log:
  Reapply r223198 which was reverted in the previous vendor import.  Some
  portions were already reapplied in r233708:
  - Use a dedicated task to handle deferred transmits from the if_transmit
method instead of reusing the existing per-queue interrupt task.
Reusing the per-queue interrupt task could result in both an interrupt
thread and the taskqueue thread trying to handle received packets on a
single queue resulting in out-of-order packet processing.
  - Call ether_ifdetach() earlier in igb_detach().
  - Drain tasks and free taskqueues during igb_detach().
  
  MFC after:1 week

Modified:
  head/sys/dev/e1000/if_igb.c
  head/sys/dev/e1000/if_igb.h

Modified: head/sys/dev/e1000/if_igb.c
==
--- head/sys/dev/e1000/if_igb.c Wed Apr 11 21:00:33 2012(r234153)
+++ head/sys/dev/e1000/if_igb.c Wed Apr 11 21:33:45 2012(r234154)
@@ -176,6 +176,7 @@ static int  igb_mq_start(struct ifnet *, 
 static int igb_mq_start_locked(struct ifnet *,
struct tx_ring *, struct mbuf *);
 static voidigb_qflush(struct ifnet *);
+static voidigb_deferred_mq_start(void *, int);
 #else
 static voidigb_start(struct ifnet *);
 static voidigb_start_locked(struct tx_ring *, struct ifnet *ifp);
@@ -715,6 +716,8 @@ igb_detach(device_t dev)
return (EBUSY);
}
 
+   ether_ifdetach(adapter-ifp);
+
if (adapter-led_dev != NULL)
led_destroy(adapter-led_dev);
 
@@ -746,8 +749,6 @@ igb_detach(device_t dev)
if (adapter-vlan_detach != NULL)
EVENTHANDLER_DEREGISTER(vlan_unconfig, adapter-vlan_detach);
 
-   ether_ifdetach(adapter-ifp);
-
callout_drain(adapter-timer);
 
 #ifdef DEV_NETMAP
@@ -943,7 +944,7 @@ igb_mq_start(struct ifnet *ifp, struct m
IGB_TX_UNLOCK(txr);
} else {
err = drbr_enqueue(ifp, txr-br, m);
-   taskqueue_enqueue(que-tq, que-que_task);
+   taskqueue_enqueue(que-tq, txr-txq_task);
}
 
return (err);
@@ -1003,6 +1004,22 @@ igb_mq_start_locked(struct ifnet *ifp, s
 }
 
 /*
+ * Called from a taskqueue to drain queued transmit packets.
+ */
+static void
+igb_deferred_mq_start(void *arg, int pending)
+{
+   struct tx_ring *txr = arg;
+   struct adapter *adapter = txr-adapter;
+   struct ifnet *ifp = adapter-ifp;
+
+   IGB_TX_LOCK(txr);
+   if (!drbr_empty(ifp, txr-br))
+   igb_mq_start_locked(ifp, txr, NULL);
+   IGB_TX_UNLOCK(txr);
+}
+
+/*
 ** Flush all ring buffers
 */
 static void
@@ -2382,6 +2399,7 @@ igb_allocate_legacy(struct adapter *adap
 {
device_tdev = adapter-dev;
struct igb_queue*que = adapter-queues;
+   struct tx_ring  *txr = adapter-tx_rings;
int error, rid = 0;
 
/* Turn off all interrupts */
@@ -2400,6 +2418,10 @@ igb_allocate_legacy(struct adapter *adap
return (ENXIO);
}
 
+#if __FreeBSD_version = 80
+   TASK_INIT(txr-txq_task, 0, igb_deferred_mq_start, txr);
+#endif
+
/*
 * Try allocating a fast interrupt and the associated deferred
 * processing contexts.
@@ -2473,9 +2495,13 @@ igb_allocate_msix(struct adapter *adapte
*/
if (adapter-num_queues  1)
bus_bind_intr(dev, que-res, i);
+#if __FreeBSD_version = 80
+   TASK_INIT(que-txr-txq_task, 0, igb_deferred_mq_start,
+   que-txr);
+#endif
/* Make tasklet for deferred handling */
TASK_INIT(que-que_task, 0, igb_handle_que, que);
-   que-tq = taskqueue_create_fast(igb_que, M_NOWAIT,
+   que-tq = taskqueue_create(igb_que, M_NOWAIT,
taskqueue_thread_enqueue, que-tq);
taskqueue_start_threads(que-tq, 1, PI_NET, %s que,
device_get_nameunit(adapter-dev));
@@ -2682,13 +2708,24 @@ igb_free_pci_resources(struct adapter *a
else
(adapter-msix != 0) ? (rid = 1):(rid = 0);
 
+   que = adapter-queues;
if (adapter-tag != NULL) {
+   taskqueue_drain(que-tq, adapter-link_task);
bus_teardown_intr(dev, adapter-res, adapter-tag);
adapter-tag = NULL;
}
if (adapter-res != NULL)
bus_release_resource(dev, SYS_RES_IRQ, rid, adapter-res);
 
+   for (int i = 0; i  adapter-num_queues; i++, que++) {
+   if (que-tq != NULL) {
+#if __FreeBSD_version = 80
+   taskqueue_drain(que-tq, que-txr-txq_task);
+#endif
+   taskqueue_drain(que-tq, que-que_task);
+   taskqueue_free(que-tq);
+   }
+   }
 mem:
  

Re: svn commit: r233925 - in head: sys/kern sys/sys sys/vm usr.bin/kdump usr.bin/ktrace

2012-04-11 Thread John Baldwin
On Tuesday, April 10, 2012 3:47:23 pm Andrey Zonov wrote:
 On 05.04.2012 21:13, John Baldwin wrote:
  Author: jhb
  Date: Thu Apr  5 17:13:14 2012
  New Revision: 233925
  URL: http://svn.freebsd.org/changeset/base/233925
 
  Log:
 Add new ktrace records for the start and end of VM faults.  This gives
 a pair of records similar to syscall entry and return that a user can
 use to determine how long page faults take.  The new ktrace records are
 enabled via the 'p' trace type, and are enabled in the default set of
 trace points.
 
 Reviewed by: kib
 MFC after:   2 weeks
 
 
 Hi John,
 
 Thanks a lot, this change is very useful!
 
 And while you are here I would like to show you a patch which adds a 
 wmesg to the context switch tracing.  It is not finished, it's just a 
 concept.  Please review it and if you are interesting in that I'll 
 finish it and will test more widely.

Ah, this looks fairly neat.  However, I think you will need a few changes:

1) You will want to make kdump handle either the old or new size of struct
ktr_csw.  (The size of the record is in the header, so as long as you have
a 'struct ktr_csw_old' you can handle this fairly easily.)

2) cs-wmesg is never NULL.  Instead, it should probably just always print it 
out.

3) condvar's have a valid wmesg.

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234155 - head/sys/powerpc/aim

2012-04-11 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Wed Apr 11 21:56:55 2012
New Revision: 234155
URL: http://svn.freebsd.org/changeset/base/234155

Log:
  Only manipulate the PGA_EXECUTABLE flag on managed pages. This is a proxy
  for whether the page is physical. On dense phys mem systems (32-bit),
  VM_PHYS_TO_PAGE will not return NULL for device memory pages if device
  memory is above physical memory even if there is no allocated vm_page.
  Attempting to use the returned page could then cause either memory
  corruption or a page fault.

Modified:
  head/sys/powerpc/aim/mmu_oea64.c

Modified: head/sys/powerpc/aim/mmu_oea64.c
==
--- head/sys/powerpc/aim/mmu_oea64.cWed Apr 11 21:33:45 2012
(r234154)
+++ head/sys/powerpc/aim/mmu_oea64.cWed Apr 11 21:56:55 2012
(r234155)
@@ -1906,17 +1906,15 @@ moea64_pvo_protect(mmu_t mmu,  pmap_t pm
/*
 * If the PVO is in the page table, update that pte as well.
 */
-   if (pt != -1) {
+   if (pt != -1)
MOEA64_PTE_CHANGE(mmu, pt, pvo-pvo_pte.lpte,
pvo-pvo_vpn);
-   if (pm != kernel_pmap  pg != NULL 
-   !(pg-aflags  PGA_EXECUTABLE) 
-   (pvo-pvo_pte.lpte.pte_lo 
-(LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) {
+   if (pm != kernel_pmap  pg != NULL  !(pg-aflags  PGA_EXECUTABLE) 
+   (pvo-pvo_pte.lpte.pte_lo  (LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) {
+   if ((pg-oflags  VPO_UNMANAGED) == 0)
vm_page_aflag_set(pg, PGA_EXECUTABLE);
-   moea64_syncicache(mmu, pm, PVO_VADDR(pvo),
-   pvo-pvo_pte.lpte.pte_lo  LPTE_RPGN, PAGE_SIZE);
-   }
+   moea64_syncicache(mmu, pm, PVO_VADDR(pvo),
+   pvo-pvo_pte.lpte.pte_lo  LPTE_RPGN, PAGE_SIZE);
}
 
/*
@@ -2368,9 +2366,8 @@ moea64_pvo_remove(mmu_t mmu, struct pvo_
 */
pg = PHYS_TO_VM_PAGE(pvo-pvo_pte.lpte.pte_lo  LPTE_RPGN);
 
-   if ((pvo-pvo_vaddr  PVO_MANAGED) == PVO_MANAGED 
-   (pvo-pvo_pte.lpte.pte_lo  LPTE_PP) != LPTE_BR) {
-   if (pg != NULL) {
+   if ((pvo-pvo_vaddr  PVO_MANAGED) == PVO_MANAGED  pg != NULL) {
+   if ((pvo-pvo_pte.lpte.pte_lo  LPTE_PP) != LPTE_BR) {
if (pvo-pvo_pte.lpte.pte_lo  LPTE_CHG)
vm_page_dirty(pg);
if (pvo-pvo_pte.lpte.pte_lo  LPTE_REF)
@@ -2378,11 +2375,10 @@ moea64_pvo_remove(mmu_t mmu, struct pvo_
if (LIST_EMPTY(vm_page_to_pvoh(pg)))
vm_page_aflag_clear(pg, PGA_WRITEABLE);
}
+   if (LIST_EMPTY(vm_page_to_pvoh(pg)))
+   vm_page_aflag_clear(pg, PGA_EXECUTABLE);
}
 
-   if (pg != NULL  LIST_EMPTY(vm_page_to_pvoh(pg)))
-   vm_page_aflag_clear(pg, PGA_EXECUTABLE);
-
moea64_pvo_entries--;
moea64_pvo_remove_calls++;
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234156 - in head/sys/powerpc: aim include

2012-04-11 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Wed Apr 11 22:23:50 2012
New Revision: 234156
URL: http://svn.freebsd.org/changeset/base/234156

Log:
  We don't need kcopy() in any of the remaining places it is used, so
  remove it.
  
  MFC after:2 weeks

Modified:
  head/sys/powerpc/aim/machdep.c
  head/sys/powerpc/aim/mmu_oea.c
  head/sys/powerpc/aim/mmu_oea64.c
  head/sys/powerpc/include/cpu.h

Modified: head/sys/powerpc/aim/machdep.c
==
--- head/sys/powerpc/aim/machdep.c  Wed Apr 11 21:56:55 2012
(r234155)
+++ head/sys/powerpc/aim/machdep.c  Wed Apr 11 22:23:50 2012
(r234156)
@@ -738,36 +738,6 @@ spinlock_exit(void)
intr_restore(msr);
 }
 
-/*
- * kcopy(const void *src, void *dst, size_t len);
- *
- * Copy len bytes from src to dst, aborting if we encounter a fatal
- * page fault.
- *
- * kcopy() _must_ save and restore the old fault handler since it is
- * called by uiomove(), which may be in the path of servicing a non-fatal
- * page fault.
- */
-int
-kcopy(const void *src, void *dst, size_t len)
-{
-   struct thread   *td;
-   faultbufenv, *oldfault;
-   int rv;
-
-   td = curthread;
-   oldfault = td-td_pcb-pcb_onfault;
-   if ((rv = setfault(env)) != 0) {
-   td-td_pcb-pcb_onfault = oldfault;
-   return rv;
-   }
-
-   memcpy(dst, src, len);
-
-   td-td_pcb-pcb_onfault = oldfault;
-   return (0);
-}
-
 int db_trap_glue(struct trapframe *);  /* Called from trap_subr.S */
 
 int

Modified: head/sys/powerpc/aim/mmu_oea.c
==
--- head/sys/powerpc/aim/mmu_oea.c  Wed Apr 11 21:56:55 2012
(r234155)
+++ head/sys/powerpc/aim/mmu_oea.c  Wed Apr 11 22:23:50 2012
(r234156)
@@ -1023,7 +1023,7 @@ moea_copy_page(mmu_t mmu, vm_page_t msrc
dst = VM_PAGE_TO_PHYS(mdst);
src = VM_PAGE_TO_PHYS(msrc);
 
-   kcopy((void *)src, (void *)dst, PAGE_SIZE);
+   bcopy((void *)src, (void *)dst, PAGE_SIZE);
 }
 
 /*

Modified: head/sys/powerpc/aim/mmu_oea64.c
==
--- head/sys/powerpc/aim/mmu_oea64.cWed Apr 11 21:56:55 2012
(r234155)
+++ head/sys/powerpc/aim/mmu_oea64.cWed Apr 11 22:23:50 2012
(r234156)
@@ -1097,14 +1097,14 @@ moea64_copy_page(mmu_t mmu, vm_page_t ms
src = VM_PAGE_TO_PHYS(msrc);
 
if (hw_direct_map) {
-   kcopy((void *)src, (void *)dst, PAGE_SIZE);
+   bcopy((void *)src, (void *)dst, PAGE_SIZE);
} else {
mtx_lock(moea64_scratchpage_mtx);
 
moea64_set_scratchpage_pa(mmu, 0, src);
moea64_set_scratchpage_pa(mmu, 1, dst);
 
-   kcopy((void *)moea64_scratchpage_va[0], 
+   bcopy((void *)moea64_scratchpage_va[0], 
(void *)moea64_scratchpage_va[1], PAGE_SIZE);
 
mtx_unlock(moea64_scratchpage_mtx);

Modified: head/sys/powerpc/include/cpu.h
==
--- head/sys/powerpc/include/cpu.h  Wed Apr 11 21:56:55 2012
(r234155)
+++ head/sys/powerpc/include/cpu.h  Wed Apr 11 22:23:50 2012
(r234156)
@@ -100,6 +100,5 @@ voidswi_vm(void *);
 
 /* XXX the following should not be here. */
 void   savectx(struct pcb *);
-intkcopy(const void *, void *, size_t);
 
 #endif /* _MACHINE_CPU_H_ */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234157 - head/sys/sys

2012-04-11 Thread Kirk McKusick
Author: mckusick
Date: Wed Apr 11 22:43:40 2012
New Revision: 234157
URL: http://svn.freebsd.org/changeset/base/234157

Log:
  Whitespace cleanup.

Modified:
  head/sys/sys/mount.h

Modified: head/sys/sys/mount.h
==
--- head/sys/sys/mount.hWed Apr 11 22:23:50 2012(r234156)
+++ head/sys/sys/mount.hWed Apr 11 22:43:40 2012(r234157)
@@ -199,10 +199,10 @@ void  __mnt_vnode_markerfree(str
__mnt_vnode_markerfree((mvp), (mp))
 
 #define MNT_VNODE_FOREACH_ABORT(mp, mvp)   \
-do {   \
- MNT_ILOCK(mp);\
-  MNT_VNODE_FOREACH_ABORT_ILOCKED(mp, mvp);\
- MNT_IUNLOCK(mp);  \
+   do {\
+   MNT_ILOCK(mp);  \
+   MNT_VNODE_FOREACH_ABORT_ILOCKED(mp, mvp);   \
+   MNT_IUNLOCK(mp);\
} while (0)
 
 #defineMNT_ILOCK(mp)   mtx_lock((mp)-mnt_mtx)
@@ -211,7 +211,7 @@ void  __mnt_vnode_markerfree(str
 #defineMNT_MTX(mp) ((mp)-mnt_mtx)
 #defineMNT_REF(mp) (mp)-mnt_ref++
 #defineMNT_REL(mp) do {
\
-   KASSERT((mp)-mnt_ref  0, (negative mnt_ref));   
\
+   KASSERT((mp)-mnt_ref  0, (negative mnt_ref));   \
(mp)-mnt_ref--;\
if ((mp)-mnt_ref == 0) \
wakeup((mp));   \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234158 - in head/sys: kern sys ufs/ffs

2012-04-11 Thread Kirk McKusick
Author: mckusick
Date: Wed Apr 11 23:01:11 2012
New Revision: 234158
URL: http://svn.freebsd.org/changeset/base/234158

Log:
  Export vinactive() from kern/vfs_subr.c (e.g., make it no longer
  static and declare its prototype in sys/vnode.h) so that it can be
  called from process_deferred_inactive() (in ufs/ffs/ffs_snapshot.c)
  instead of the body of vinactive() being cut and pasted into
  process_deferred_inactive().
  
  Reviewed by: kib
  MFC after:   2 weeks

Modified:
  head/sys/kern/vfs_subr.c
  head/sys/sys/vnode.h
  head/sys/ufs/ffs/ffs_snapshot.c

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cWed Apr 11 22:43:40 2012(r234157)
+++ head/sys/kern/vfs_subr.cWed Apr 11 23:01:11 2012(r234158)
@@ -103,7 +103,6 @@ static int  flushbuflist(struct bufv *buf
 static voidsyncer_shutdown(void *arg, int howto);
 static int vtryrecycle(struct vnode *vp);
 static voidvbusy(struct vnode *vp);
-static voidvinactive(struct vnode *, struct thread *);
 static voidv_incr_usecount(struct vnode *);
 static voidv_decr_usecount(struct vnode *);
 static voidv_decr_useonly(struct vnode *);
@@ -2401,7 +2400,7 @@ vdropl(struct vnode *vp)
  * OWEINACT tracks whether a vnode missed a call to inactive due to a
  * failed lock upgrade.
  */
-static void
+void
 vinactive(struct vnode *vp, struct thread *td)
 {
 

Modified: head/sys/sys/vnode.h
==
--- head/sys/sys/vnode.hWed Apr 11 22:43:40 2012(r234157)
+++ head/sys/sys/vnode.hWed Apr 11 23:01:11 2012(r234158)
@@ -632,6 +632,7 @@ int vget(struct vnode *vp, int lockflag,
 void   vgone(struct vnode *vp);
 void   vhold(struct vnode *);
 void   vholdl(struct vnode *);
+void   vinactive(struct vnode *, struct thread *);
 intvinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo);
 intvtruncbuf(struct vnode *vp, struct ucred *cred, struct thread *td,
off_t length, int blksize);

Modified: head/sys/ufs/ffs/ffs_snapshot.c
==
--- head/sys/ufs/ffs/ffs_snapshot.c Wed Apr 11 22:43:40 2012
(r234157)
+++ head/sys/ufs/ffs/ffs_snapshot.c Wed Apr 11 23:01:11 2012
(r234158)
@@ -2572,20 +2572,9 @@ process_deferred_inactive(struct mount *
MNT_ILOCK(mp);
continue;
}
-   
-   VNASSERT((vp-v_iflag  VI_DOINGINACT) == 0, vp,
-(process_deferred_inactive: 
- recursed on VI_DOINGINACT));
-   vp-v_iflag |= VI_DOINGINACT;
-   vp-v_iflag = ~VI_OWEINACT;
-   VI_UNLOCK(vp);
-   (void) VOP_INACTIVE(vp, td);
-   VI_LOCK(vp);
-   VNASSERT(vp-v_iflag  VI_DOINGINACT, vp,
-(process_deferred_inactive: lost VI_DOINGINACT));
+   vinactive(vp, td);
VNASSERT((vp-v_iflag  VI_OWEINACT) == 0, vp,
 (process_deferred_inactive: got VI_OWEINACT));
-   vp-v_iflag = ~VI_DOINGINACT;
VI_UNLOCK(vp);
VOP_UNLOCK(vp, 0);
vdrop(vp);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234159 - head/share/examples/csh

2012-04-11 Thread Eitan Adler
Author: eadler
Date: Thu Apr 12 00:12:17 2012
New Revision: 234159
URL: http://svn.freebsd.org/changeset/base/234159

Log:
  Sort completions
  Add a new one for sysctl
  
  Submitted by: rm (the new completion)
  Approved by:  cperciva (implicit)
  MFC after:3 days

Modified:
  head/share/examples/csh/dot.cshrc

Modified: head/share/examples/csh/dot.cshrc
==
--- head/share/examples/csh/dot.cshrc   Wed Apr 11 23:01:11 2012
(r234158)
+++ head/share/examples/csh/dot.cshrc   Thu Apr 12 00:12:17 2012
(r234159)
@@ -21,20 +21,20 @@ bindkey ^[[3~ delete-char-or-list-or-e
 # Make the Ins key work
 bindkey \e[2~ overwrite-mode 
 
+# Aliases used for completions
+alias _PKGS_PkGs_PoRtS_ 'awk -F\| 
\{sub\(\\/usr\/ports\/\\,\\\,\$2\)\;print\ \$2\} /usr/ports/INDEX-name -r | 
cut -d . -f 1'
+alias _PKGS_PkGs_PoRtS_ 'awk -F\| 
\{sub\(\\/usr\/ports\/\\,\\\,\$2\)\;print\ \$2\} /usr/ports/INDEX-`uname -r 
| cut -d . -f 1` pkg_info -E \*'
+
 # Some common completions
 complete chown  'p/1/u/'
-complete man'C/*/c/'
-complete service'n/*/`service -l`/'
-complete service   'c/-/(e l r v)/' 'p/1/`service -l`/' 'n/*/(start stop 
reload restart status rcvar onestart onestop)/'
+complete dd'c/[io]f=/f/ n/*/(if of ibs obs bs skip seek count)/='
+complete kill  'c/-/S/' 'c/%/j/' 'n/*/`ps -ax | awk '''{print 
$1}'''`/'
+complete killall   'c/-/S/' 'c/%/j/' 'n/*/`ps -ax | awk '''{print 
$5}'''`/'
 complete kldunload 'n@*@`kldstat | awk \{sub\(\/\.ko\/,\\,\$NF\)\;print\ 
\$NF\} | grep -v Name` @'
 complete make   'n@*@`make -pn | sed -n -E /^[#_.\/[:blank:]]+/d; 
/=/d; s/[[:blank:]]*:.*//gp;`@'
+complete man'C/*/c/'
 complete pkg_delete 'c/-/(i v D n p d f G x X r)/' 'n@*@`ls /var/db/pkg`@'
 complete pkg_info   'c/-/(a b v p q Q c d D f g i I j k K r R m L s o G O 
x X e E l t V P)/' 'n@*@`\ls -1 /var/db/pkg | sed s%/var/db/pkg/%%`@'
-complete kill  'c/-/S/' 'c/%/j/' 'n/*/`ps -ax | awk '''{print 
$1}'''`/'
-complete killall   'c/-/S/' 'c/%/j/' 'n/*/`ps -ax | awk '''{print 
$5}'''`/'
-complete dd'c/[io]f=/f/ n/*/(if of ibs obs bs skip seek count)/='
-alias _PKGS_PkGs_PoRtS_ 'awk -F\| 
\{sub\(\\/usr\/ports\/\\,\\\,\$2\)\;print\ \$2\} /usr/ports/INDEX-name -r | 
cut -d . -f 1'
-alias _PKGS_PkGs_PoRtS_ 'awk -F\| 
\{sub\(\\/usr\/ports\/\\,\\\,\$2\)\;print\ \$2\} /usr/ports/INDEX-`uname -r 
| cut -d . -f 1` pkg_info -E \*'
 complete portmaster   'c/--/(always-fetch check-depends check-port-dbdir 
clean-distfiles \
 clean-packages delete-build-only delete-packages force-config help \
 index index-first index-only list-origins local-packagedir no-confirm \
@@ -42,6 +42,8 @@ complete portmaster   'c/--/(always-fetc
 packages-local packages-only show-work update-if-newer version)/' \
 'c/-/(a b B C d D e f F g G h H i l L m n o p r R s t u v w x)/' \
 'n@*@`_PKGS_PkGs_PoRtS_`@'
+complete service   'c/-/(e l r v)/' 'p/1/`service -l`/' 'n/*/(start stop 
reload restart status rcvar onestart onestop)/'
+complete sysctl 'n/*/`sysctl -Na`/'
 
 # Alternate prompts
 set prompt = '#'
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r234163 - head/sys/net

2012-04-11 Thread Andrew Thompson
Author: thompsa
Date: Thu Apr 12 01:07:17 2012
New Revision: 234163
URL: http://svn.freebsd.org/changeset/base/234163

Log:
  Set the proto to LAGG_PROTO_NONE before calling the detach routine so packets
  are discarded, this is an issue because lacp drops the lock which may allow
  network threads to access freed memory. Expand the lock coverage so the
  detach/attach happen atomically.
  
  Submitted by: Andrew Boyer (earlier version)

Modified:
  head/sys/net/if_lagg.c

Modified: head/sys/net/if_lagg.c
==
--- head/sys/net/if_lagg.c  Thu Apr 12 00:59:30 2012(r234162)
+++ head/sys/net/if_lagg.c  Thu Apr 12 01:07:17 2012(r234163)
@@ -950,11 +950,11 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd
error = EPROTONOSUPPORT;
break;
}
+   LAGG_WLOCK(sc);
if (sc-sc_proto != LAGG_PROTO_NONE) {
-   LAGG_WLOCK(sc);
-   error = sc-sc_detach(sc);
-   /* Reset protocol and pointers */
+   /* Reset protocol first in case detach unlocks */
sc-sc_proto = LAGG_PROTO_NONE;
+   error = sc-sc_detach(sc);
sc-sc_detach = NULL;
sc-sc_start = NULL;
sc-sc_input = NULL;
@@ -966,10 +966,14 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd
sc-sc_lladdr = NULL;
sc-sc_req = NULL;
sc-sc_portreq = NULL;
-   LAGG_WUNLOCK(sc);
+   } else if (sc-sc_input != NULL) {
+   /* Still detaching */
+   error = EBUSY;
}
-   if (error != 0)
+   if (error != 0) {
+   LAGG_WUNLOCK(sc);
break;
+   }
for (int i = 0; i  (sizeof(lagg_protos) /
sizeof(lagg_protos[0])); i++) {
if (lagg_protos[i].ti_proto == ra-ra_proto) {
@@ -977,7 +981,6 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd
printf(%s: using proto %u\n,
sc-sc_ifname,
lagg_protos[i].ti_proto);
-   LAGG_WLOCK(sc);
sc-sc_proto = lagg_protos[i].ti_proto;
if (sc-sc_proto != LAGG_PROTO_NONE)
error = lagg_protos[i].ti_attach(sc);
@@ -985,6 +988,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd
return (error);
}
}
+   LAGG_WUNLOCK(sc);
error = EPROTONOSUPPORT;
break;
case SIOCGLAGGFLAGS:
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r234093 - in head/etc: defaults rc.d

2012-04-11 Thread Doug Barton
This script has many problems. First, new scripts in the base should 
never use BEFORE since this makes debugging rcorder issues harder. 
Please instead add this to the REQUIRE line in DAEMON. You can use 
'service -r' to get an idea of where it will be included at boot time.


Second, for new scripts the name of the file, $name, and PROVIDE should 
all the the same, in this case kfd. That implies that the rcvar should 
be kfd_enable unless there is a very good reason for it to be 
different, which in this case there is not one that I can see. (FYI, 
the d in kfd implies server.)


Scripts that start persistent services should always include KEYWORD: 
shutdown so that they get started cleanly. It's not clear to me if this 
script should also include the nojail keyword. It's also generally a 
good idea to add a REQUIRE line unless it truly doesn't matter. I 
guessed at REQUIRE: kerberos ala the kadamind script, if that's wrong 
please let me know.


Next, the arguments in the script, and the script generally, don't
follow the default format. It's very helpful when doing mass 
reviews/updates if the script looks the same as other similar scripts 
unless there is a good reason for it to be different. The reference at 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html 
should help.


It's also unclear why you are unset'ing start_cmd, but not supplying 
your own start method. The way that you're using kfd_server is also 
totally wrong, as is hard-coding kfd_flags in the script. If the -i 
argument is always needed, it should be included in command_args. If 
it's not always needed, but is generally recommended, you should include 
it in /etc/defaults/rc.conf so that the user can easily override it. 
I've assumed the latter, if it should always be included please let me 
know.


Finally, you neglected to update rc.conf.5.

The attached patch fixes the problems mentioned above, modulo the 
rc.conf.5 update which I'll leave to you. In order to avoid 
inconvenience to those tracking HEAD who want to use this new feature I 
plan to commit this in the next couple of days if I don't hear from you.


In the future it would probably be a good idea to submit patches to 
freebsd-rc@ for review.


hth,

Doug


On Tue, 10 Apr 2012, Stanislav Sedov wrote:


Author: stas
Date: Tue Apr 10 09:27:41 2012
New Revision: 234093
URL: http://svn.freebsd.org/changeset/base/234093

Log:
 - Add rc.d script for kfd, kerberos forwarded tickets daemon.

Added:
 head/etc/rc.d/kfd   (contents, props changed)
Modified:
 head/etc/defaults/rc.conf
 head/etc/rc.d/Makefile

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Tue Apr 10 07:38:58 2012(r234092)
+++ head/etc/defaults/rc.conf   Tue Apr 10 09:27:41 2012(r234093)
@@ -297,6 +297,8 @@ kadmind5_server_enable=NO   # Run kadmin
kadmind5_server=/usr/libexec/kadmind# path to kerberos 5 admin daemon
kpasswdd_server_enable=NO   # Run kpasswdd (or NO)
kpasswdd_server=/usr/libexec/kpasswdd   # path to kerberos 5 passwd daemon
+kfd_server_enable=NO   # Run kfd (or NO)
+kfd_server=/usr/libexec/kfd# path to kerberos 5 kfd daemon

gssd_enable=NO  # Run the gssd daemon (or NO).
gssd_flags= # Flags for gssd.

Modified: head/etc/rc.d/Makefile
==
--- head/etc/rc.d/Makefile  Tue Apr 10 07:38:58 2012(r234092)
+++ head/etc/rc.d/Makefile  Tue Apr 10 09:27:41 2012(r234093)
@@ -66,6 +66,7 @@ FILES=DAEMON \
kadmind \
kerberos \
keyserv \
+   kfd \
kld \
kldxref \
kpasswdd \

Added: head/etc/rc.d/kfd
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/etc/rc.d/kfd   Tue Apr 10 09:27:41 2012(r234093)
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: kfd
+# BEFORE: DAEMON
+
+. /etc/rc.subr
+
+name=kfd
+load_rc_config $name
+rcvar=kfd_server_enable
+unset start_cmd
+command=${kfd_server}
+kfd_flags=-i
+command_args=
+
+run_rc_command $1





--

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/
Index: defaults/rc.conf
===
--- defaults/rc.conf(revision 234164)
+++ defaults/rc.conf(working copy)
@@ -297,8 +297,9 @@
 kadmind5_server=/usr/libexec/kadmind # path to kerberos 5 admin daemon
 kpasswdd_server_enable=NO# Run kpasswdd (or NO)
 kpasswdd_server=/usr/libexec/kpasswdd# path to kerberos 5 passwd 
daemon
-kfd_server_enable=NO # Run kfd (or NO)
-kfd_server=/usr/libexec/kfd  # path to kerberos 5 

svn commit: r234165 - in head: contrib/bind9 share/doc/bind9

2012-04-11 Thread Doug Barton
Author: dougb
Date: Thu Apr 12 01:53:33 2012
New Revision: 234165
URL: http://svn.freebsd.org/changeset/base/234165

Log:
  The BIND 9.8.2 tarball was re-rolled to remove 9.8.1 release notes.
  This change was noticed by ISC at:
  
  https://lists.isc.org/pipermail/bind-users/2012-April/087345.html
  
  and verified by me both by comparing the contents of the old and new
  distfiles and by verifying the PGP signature on the new distfile.

Deleted:
  head/contrib/bind9/RELEASE-NOTES-BIND-9.8.1.html
  head/contrib/bind9/RELEASE-NOTES-BIND-9.8.1.pdf
  head/contrib/bind9/RELEASE-NOTES-BIND-9.8.1.txt
  head/contrib/bind9/release-notes.css
Modified:
  head/share/doc/bind9/Makefile
Directory Properties:
  head/contrib/bind9/   (props changed)

Modified: head/share/doc/bind9/Makefile
==
--- head/share/doc/bind9/Makefile   Thu Apr 12 01:14:03 2012
(r234164)
+++ head/share/doc/bind9/Makefile   Thu Apr 12 01:53:33 2012
(r234165)
@@ -8,9 +8,7 @@ SRCDIR= ${BIND_DIR}/doc
 NO_OBJ=
 
 FILESGROUPS=   TOP ARM MISC
-TOP=   CHANGES COPYRIGHT FAQ HISTORY README \
-   RELEASE-NOTES-BIND-9.8.1.pdf RELEASE-NOTES-BIND-9.8.1.txt \
-   RELEASE-NOTES-BIND-9.8.1.html release-notes.css
+TOP=   CHANGES COPYRIGHT FAQ HISTORY README
 TOPDIR=${DOCDIR}/bind9
 ARM=   Bv9ARM.ch01.html Bv9ARM.ch02.html Bv9ARM.ch03.html \
Bv9ARM.ch04.html Bv9ARM.ch05.html Bv9ARM.ch06.html \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r234093 - in head/etc: defaults rc.d

2012-04-11 Thread Doug Barton

On Wed, 11 Apr 2012, Doug Barton wrote:

Scripts that start persistent services should always include KEYWORD: 
shutdown so that they get started cleanly.


Sorry, that's so that they get shut down cleanly.

Doug
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r232926 - in head: include/xlocale lib/libc/locale

2012-04-11 Thread David Schultz
On Tue, Mar 13, 2012, David Chisnall wrote:
 Modified: head/lib/libc/locale/Symbol.map
 ==
 --- head/lib/libc/locale/Symbol.map   Tue Mar 13 14:10:33 2012
 (r232925)
 +++ head/lib/libc/locale/Symbol.map   Tue Mar 13 14:14:13 2012
 (r232926)
 @@ -60,9 +60,13 @@ FBSD_1.0 {
   nextwctype;
   nl_langinfo;
   __maskrune;
 + __maskrune_l;
   __sbmaskrune;
 + __sbmaskrune_l;
   __istype;
 + __istype_l;
   __sbistype;
 + __sbistype_l;
   __isctype;
   __toupper;
   __sbtoupper;

(still a month behind on commit mail)

This doesn't look right; new symbols should be in the FBSD_1.3
namespace, not FBSD_1.0.

Here is the symbol versioning documentation, if you care:

 http://people.freebsd.org/~deischen/symver/freebsd_versioning.txt
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r232935 - head/lib/libc/locale

2012-04-11 Thread David Schultz
On Tue, Mar 13, 2012, David Chisnall wrote:
 Author: theraven
 Date: Tue Mar 13 20:02:41 2012
 New Revision: 232935
 URL: http://svn.freebsd.org/changeset/base/232935
 
 Log:
   First set of xlocale man pages.  More to follow...

Thanks!

By the way, it's customary to bump the date on the manpage if
there are significant changes, such as the addition of a new
function.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org