axe.4 typo

2013-06-09 Thread Michał Markowski
According to http://www.asix.com.tw/products.php?PLine=71

--- /usr/src/share/man/man4/axe.4   Mon Jun  3 00:02:33 2013
+++ /tmp/axe.4  Sun Jun  9 12:25:14 2013
@@ -84,8 +84,8 @@
 .Pp
 The AX88172, AX88178, and AX88772 are USB 2.0 devices designed to work with
 either Ethernet or HomePNA transceivers.
-The AX8172 and AX88772 contain 10/100 Ethernet MACs with MII interfaces.
-The AX8178 contains a 10/100/1000 Gigabit Ethernet MAC with a GMII/MII
+The AX88172 and AX88772 contain 10/100 Ethernet MACs with MII interfaces.
+The AX88178 contains a 10/100/1000 Gigabit Ethernet MAC with a GMII/MII
 interface.
 All adapters will operate with either USB 1.x or USB 2.0 controllers, however
 performance with 1.x controllers will be limited since the USB 1.x standard


--
Michał Markowski



Re: axe.4 typo

2013-06-09 Thread Stuart Henderson
On 2013/06/09 12:36, Michał Markowski wrote:
 According to http://www.asix.com.tw/products.php?PLine=71
 
 --- /usr/src/share/man/man4/axe.4   Mon Jun  3 00:02:33 2013
 +++ /tmp/axe.4  Sun Jun  9 12:25:14 2013
 @@ -84,8 +84,8 @@
  .Pp
  The AX88172, AX88178, and AX88772 are USB 2.0 devices designed to work with
  either Ethernet or HomePNA transceivers.
 -The AX8172 and AX88772 contain 10/100 Ethernet MACs with MII interfaces.
 -The AX8178 contains a 10/100/1000 Gigabit Ethernet MAC with a GMII/MII
 +The AX88172 and AX88772 contain 10/100 Ethernet MACs with MII interfaces.
 +The AX88178 contains a 10/100/1000 Gigabit Ethernet MAC with a GMII/MII

How handy, a 1000-Gigabit adapter in USB form :-)

Index: axe.4
===
RCS file: /cvs/src/share/man/man4/axe.4,v
retrieving revision 1.42
diff -u -p -r1.42 axe.4
--- axe.4   2 Jun 2013 20:23:33 -   1.42
+++ axe.4   9 Jun 2013 10:57:59 -
@@ -84,8 +84,8 @@ following:
 .Pp
 The AX88172, AX88178, and AX88772 are USB 2.0 devices designed to work with
 either Ethernet or HomePNA transceivers.
-The AX8172 and AX88772 contain 10/100 Ethernet MACs with MII interfaces.
-The AX8178 contains a 10/100/1000 Gigabit Ethernet MAC with a GMII/MII
+The AX88172 and AX88772 contain 10/100 Ethernet MACs with MII interfaces.
+The AX88178 contains a 10/100/Gigabit Ethernet MAC with a GMII/MII
 interface.
 All adapters will operate with either USB 1.x or USB 2.0 controllers, however
 performance with 1.x controllers will be limited since the USB 1.x standard




Re: axe.4 typo

2013-06-09 Thread Jason McIntyre
On Sun, Jun 09, 2013 at 11:58:26AM +0100, Stuart Henderson wrote:
 On 2013/06/09 12:36, Micha?? Markowski wrote:
  According to http://www.asix.com.tw/products.php?PLine=71
  
  --- /usr/src/share/man/man4/axe.4   Mon Jun  3 00:02:33 2013
  +++ /tmp/axe.4  Sun Jun  9 12:25:14 2013
  @@ -84,8 +84,8 @@
   .Pp
   The AX88172, AX88178, and AX88772 are USB 2.0 devices designed to work with
   either Ethernet or HomePNA transceivers.
  -The AX8172 and AX88772 contain 10/100 Ethernet MACs with MII interfaces.
  -The AX8178 contains a 10/100/1000 Gigabit Ethernet MAC with a GMII/MII
  +The AX88172 and AX88772 contain 10/100 Ethernet MACs with MII interfaces.
  +The AX88178 contains a 10/100/1000 Gigabit Ethernet MAC with a GMII/MII
 
 How handy, a 1000-Gigabit adapter in USB form :-)
 
 Index: axe.4
 ===
 RCS file: /cvs/src/share/man/man4/axe.4,v
 retrieving revision 1.42
 diff -u -p -r1.42 axe.4
 --- axe.4 2 Jun 2013 20:23:33 -   1.42
 +++ axe.4 9 Jun 2013 10:57:59 -
 @@ -84,8 +84,8 @@ following:
  .Pp
  The AX88172, AX88178, and AX88772 are USB 2.0 devices designed to work with
  either Ethernet or HomePNA transceivers.
 -The AX8172 and AX88772 contain 10/100 Ethernet MACs with MII interfaces.
 -The AX8178 contains a 10/100/1000 Gigabit Ethernet MAC with a GMII/MII
 +The AX88172 and AX88772 contain 10/100 Ethernet MACs with MII interfaces.
 +The AX88178 contains a 10/100/Gigabit Ethernet MAC with a GMII/MII
  interface.
  All adapters will operate with either USB 1.x or USB 2.0 controllers, however
  performance with 1.x controllers will be limited since the USB 1.x standard
 
 

ok.
jmc



Re: sysctl fix

2013-06-09 Thread Ted Unangst
On Thu, Jun 06, 2013 at 23:58, Sylvestre Gallon wrote:
 Here is a second one to add fuse sysctls.

 +#define FUSEFS_NB_OPENDEVS   1   /* # of fuse devices opened */

Applied, except I changed this to FUSEFS_OPENDEVS, which seemed a
little simpler. Thanks.



in6_unlink_ifa: interface address has no prefix

2013-06-09 Thread Christopher Zimmermann
Hi,

I have this as /etc/hostname.lo1:

inet 172.26.153.50 0xff00 NONE mtu 1398

!route add 172.26.153.0/24 172.26.153.50
!route add default 172.26.153.50 -priority 12

and see the following on boot:

in6_unlink_ifa: interface address 0x80624a00 has no prefix
in6_unlink_ifa: interface address 0x80624a00 has no prefix

by adding -inet6 to the first line I can work around this warning.


Christopher



Still More Secrets of Buffer Cache Enlargement.

2013-06-09 Thread Bob Beck
Greetings all, 

Here's an up to date version of the buffer flipper that installs
on post hackathon -current. 

This diff (~beck/viagra.diff15) contains one important change from
the previous version - In the old cache, as buffers were never freed, 
we would put B_INVAL buffers in the cache at the head of the clean LRU. 
(B_INVAL buffers do not contain cachable data - so for example when a
remove happens and a file's link count drops to 0, all it's buffers 
are marked B_INVAL). 

I noticed after some work with tedu at the end of the hackathon that
we kept a lot of data in cache for removed files - it was because of
this - and moving to the head of the LRU (behaviour that has been
retained since the old static buffer cache) does not make sense with
the modern dynamic one - so this diff has changed it to free the
B_INVAL buffers right away instead of cacheing them. 

I'm running this on multiple arches and on my nfs servers feeding them. 

-Bob


On Mon, Jun 03, 2013 at 09:20:08AM -0600, Bob Beck wrote:
 
 Here's a new version of the buffer flipper that fixes
 a problem found by krw@.  - All comments from before still apply:
 
  You too can have a GIANT buffer cache etc. etc... 
  
  After much bug fighting in the midlayer and now uvm over the last 6
  months in a number of places, I think it's about time to shop this
  around again. 
  
  This will only make a difference on amd64 - if you have 4 GB or more
  of RAM. What it does is allows the high (non-DMA reachable) memory to
  be used for buffer cache pages. It will use your set buffer
  cache percentage of both dma'able, and above dma'able pages for the
  cache, migrating the oldest cache pages into high memory. pages
  are flipped back into dma'able memory if they are needed for IO. 
  
  Notwithstanding that it only matters on amd64, it does change how
  the world works a bit, and therefore requires testing everywhere. It
  has survived multiple make build/make release test cycles now on my
  machines (amd64,i386,zaurus,sparc,sparc64,hppa) (with various settings
  of bufcachepercent) and is running on my NFS server
  (bufcachepercent=90) without any complaints throughout that - it's
  been running on my laptop for a long time now. 
  
  If you try it, and have troubles (i.e. any new regressions), please
  ensure you have your machine's console accessible (check to see if you
  have ddb.console=1 in /etc/sysctl.conf) and if you have problems
  please try to get
  
  
  trace
  ps
  show bcstats
  show uvm
  
  from ddb if at all possible. 
  
  Please let me know how you do with it, and most importantly what
  you try it on/with. 
  
 -Bob
 

Index: sys/kern/kern_sysctl.c
===
RCS file: /cvs/src/sys/kern/kern_sysctl.c,v
retrieving revision 1.236
diff -u -p -r1.236 kern_sysctl.c
--- sys/kern/kern_sysctl.c  9 Jun 2013 13:10:19 -   1.236
+++ sys/kern/kern_sysctl.c  9 Jun 2013 15:27:04 -
@@ -110,6 +110,7 @@ extern struct disklist_head disklist;
 extern fixpt_t ccpu;
 extern  long numvnodes;
 extern u_int mcllivelocks;
+extern psize_t b_dmapages_total, b_highpages_total, b_dmamaxpages;
 
 extern void nmbclust_update(void);
 
@@ -566,8 +567,8 @@ kern_sysctl(int *name, u_int namelen, vo
return (sysctl_cptime2(name + 1, namelen -1, oldp, oldlenp,
newp, newlen));
case KERN_CACHEPCT: {
-   u_int64_t dmapages;
-   int opct, pgs;
+   psize_t pgs;
+   int opct;
opct = bufcachepercent;
error = sysctl_int(oldp, oldlenp, newp, newlen,
bufcachepercent);
@@ -577,9 +578,11 @@ kern_sysctl(int *name, u_int namelen, vo
bufcachepercent = opct;
return (EINVAL);
}
-   dmapages = uvm_pagecount(dma_constraint);
if (bufcachepercent != opct) {
-   pgs = bufcachepercent * dmapages / 100;
+   pgs = (b_highpages_total + b_dmapages_total)
+   * bufcachepercent / 100;
+   b_dmamaxpages = b_dmapages_total * bufcachepercent
+   / 100;
bufadjust(pgs); /* adjust bufpages */
bufhighpages = bufpages; /* set high water mark */
}
Index: sys/kern/spec_vnops.c
===
RCS file: /cvs/src/sys/kern/spec_vnops.c,v
retrieving revision 1.71
diff -u -p -r1.71 spec_vnops.c
--- sys/kern/spec_vnops.c   28 Mar 2013 03:29:44 -  1.71
+++ sys/kern/spec_vnops.c   3 Jun 2013 14:51:14 -
@@ -457,7 +457,9 @@ spec_strategy(void *v)
struct vop_strategy_args *ap = v;
struct buf *bp = ap-a_bp;
int maj = major(bp-b_dev);
-   
+
+   if (!ISSET(bp-b_flags, B_DMA)  ISSET(bp-b_flags, B_BC))
+   panic(bogus buf %p 

fix guard define

2013-06-09 Thread Franco Fichtner
Hi,

found this while reading up on recent changes to -current.
Genuine cvs diff this time.  ;)


Regards,
Franco

Index: octeonreg.h
===
RCS file: /cvs/src/sys/arch/octeon/include/octeonreg.h,v
retrieving revision 1.1
diff -u -r1.1 octeonreg.h
--- octeonreg.h 2 Jun 2013 20:29:36 -   1.1
+++ octeonreg.h 9 Jun 2013 18:07:34 -
@@ -27,7 +27,7 @@
  */
 
 #ifndef _MACHINE_OCTEONREG_H_
-#define _MACHINE_OCTEONREG_H
+#define _MACHINE_OCTEONREG_H_
 
 #define OCTEON_CF_BASE 0x1D000800ULL
 #define OCTEON_CIU_BASE0x10700ULL



enable cmp macro for rb-trees in sys/tree.h

2013-06-09 Thread Franco Fichtner
Hi,

I've had this patch in my tree for a while.  It's just a consistency
fix so that cmp can be a plain macro for rb-trees, too.


Regards,
Franco

Index: tree.h
===
RCS file: /OpenBSD/src/sys/sys/tree.h,v
retrieving revision 1.13
diff -u -r1.13 tree.h
--- tree.h  9 Jul 2011 00:19:45 -   1.13
+++ tree.h  9 Jun 2013 19:02:37 -
@@ -622,7 +622,7 @@
struct type *tmp = RB_ROOT(head);   \
int comp;   \
while (tmp) {   \
-   comp = cmp(elm, tmp);   \
+   comp = (cmp)(elm, tmp); \
if (comp  0)   \
tmp = RB_LEFT(tmp, field);  \
else if (comp  0)  \
@@ -641,7 +641,7 @@
struct type *res = NULL;\
int comp;   \
while (tmp) {   \
-   comp = cmp(elm, tmp);   \
+   comp = (cmp)(elm, tmp); \
if (comp  0) { \
res = tmp;  \
tmp = RB_LEFT(tmp, field);  \



Re: [UPDATE] Sendmail 8.14.7 released

2013-06-09 Thread Jérémie Courrèges-Anglas

It would be really nice to have reports before this goes in (probably on
wednesday).

j...@wxcvbn.org (Jérémie Courrèges-Anglas) writes:

 Hi,

 a new Sendmail release has been published:

   http://marc.info/?l=sendmail-announcem=136655938302597w=2

 Here's a diff for this update:

   http://wxcvbn.org/~jca/tmp/sendmail-8.14.7.diff

 Release notes:

 8.14.7/8.14.7 2013/04/21
   Drop support for IPv4-mapped IPv6 addresses to prevent the MTA
   from using a mapped address over a legitimate IPv6 address
   and to enforce the proper semantics over the IPv6
   connection.  Problem noted by Ulrich Sporlein.
   Fix a regression introduced in 8.14.6: the wrong list of
   macros was sent to a milter in the EHLO stage.
   Problem found by Fabrice Bellet, reported via RedHat
   (Jaroslav Skarvada).
   Fix handling of ORCPT parameter for DSNs: xtext decoding
   was not performed and a wrong syntax check was applied
   to the addr-type field.  Problem noted by Dan Lukes
   of Obludarium.
   Fix handling of NUL characters in the MIME conversion functions
   so that message bodies containing them will be sent
   on properly. Note: this usually also affects mails
   that are not converted as those functions are used
   for other purposes too.  Problem noted by Elchonon
   Edelson of Lockheed Martin.
   Do not perform duplicate elimination of recipients if they
   resolve to the error mailer using a temporary failure
   (4xy) via ruleset 0.  Problem noted by Akira Takahashi
   of IIJ.
   CONTRIB: Updated version of etrn.pl script from John Beck
   of Oracle.
   Portability:
   Unlike gcc, clang doesn't apply full prototypes to KR
   definitions.

 I did not include the updated contrib/etrn.pl as it is now under CDDL,
 and the new libsm/t-fgetc.c as it isn't used on OpenBSD.

 For convenience in proof-reading, here's also a diff between 8.14.6 and
 8.14.7 tarballs (with op.ps trimmed):

   http://wxcvbn.org/~jca/tmp/sendmail-8.14.7-tarball.diff

 Regards,

-- 
Jérémie Courrèges-Anglas
PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90  8961 6191 8FBF 06A1 1494



Re: in6_unlink_ifa: interface address has no prefix

2013-06-09 Thread Alexander Bluhm
On Sun, Jun 09, 2013 at 06:34:27PM +0200, Christopher Zimmermann wrote:
 inet 172.26.153.50 0xff00 NONE mtu 1398
 
 in6_unlink_ifa: interface address 0x80624a00 has no prefix
 in6_unlink_ifa: interface address 0x80624a00 has no prefix

The error message is triggered by ifconfig lo1 create up.  With
address instead of pointer logging and sysctl net.inet6.icmp6.nd6_debug=1
you see the source of the problem.

in6_unlink_ifa: interface address ::0001 has no prefix
in6_ifattach_loopback: failed to configure the loopback address on lo1 
(errno=17)

It is a different issue that creating lo1 tries to add a ::1 address.
But when this fails, it is correct that it has no prefix.  So don't
log an error here.

ok?

bluhm

Index: netinet6/in6.c
===
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/in6.c,v
retrieving revision 1.112
diff -u -p -r1.112 in6.c
--- netinet6/in6.c  31 May 2013 15:04:23 -  1.112
+++ netinet6/in6.c  9 Jun 2013 23:48:08 -
@@ -1238,9 +1238,10 @@ in6_unlink_ifa(struct in6_ifaddr *ia, st
 
/* Release the reference to the base prefix. */
if (ia-ia6_ndpr == NULL) {
-   if (!IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia)))
+   if (!IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia)) 
+   !IN6_IS_ADDR_LOOPBACK(IA6_IN6(ia)))
log(LOG_NOTICE, in6_unlink_ifa: interface address 
-   %p has no prefix\n, ia);
+   %s has no prefix\n, ip6_sprintf(IA6_IN6(ia)));
} else {
ia-ia6_flags = ~IN6_IFF_AUTOCONF;
if (--ia-ia6_ndpr-ndpr_refcnt == 0)