Re: Real time programming in OpenBSD

2014-09-10 Thread Christiano F. Haesbaert
On 9 September 2014 22:30, Matti Karnaattu mkarnaa...@gmail.com wrote:
 Hello,

 Is it possible to dedicate CPU core to process?

 What I'm looking for is simple way to take advantage of high quality and
 secure code base of OpenBSD to use in real time/embedded applications.
 If this trick can be achived, it is simple to use OpenBSD as platform
 when critical parts of software can run on own CPU core and rest of the
 software can developed conventional means.

 If this can be done, or this kind of feature may be noted and put to
 roadmap, I may have motivations to audit time requirements of library
 functions etc. and formally verify parts of the system.


You can use this diff if you want, it adds support for nice(1) to do
the binding, I use it to do MP tests.

https://github.com/haesbaert/bitrig/commit/c0d5adb6ee5f3b77e17254c6eaf0e02333b30d8b



Re: Very slow I/O under OpenBSD i386 on qemu-kvm from RHEL7rc

2014-06-17 Thread Christiano F. Haesbaert
On 17 June 2014 20:47, Mikolaj Kucharski miko...@kucharski.name wrote:
 Mike,

 On Tue, Jun 17, 2014 at 10:30:23AM -0700, Mike Larkin wrote:
 On Tue, Jun 17, 2014 at 05:10:51AM -0400, Brad Smith wrote:
  Because ACPI is in use which takes higher precedence over MP BIOS. You
  have to disable acpimadt.
 

 Randomly disabling parts of the kernel is likely to cause other problems.


 I agree, but disabling mpbios and acpimadt makes a huge difference for me
 on qemu-kvm-1.5.3-60.el7.x86_64:


  OpenBSD i386/virtio (bsd.sp disable mpbios and acpimadt) 

 # time dd if=/dev/zero of=/tmp/TEST bs=4096 count=1024x1024
 1048576+0 records in
 1048576+0 records out
 4294967296 bytes transferred in 18.524 secs (231854084 bytes/sec)
 0m18.52s real 0m0.24s user 0m14.48s system


 It takes now 18 seconds to run above dd(1), when previously it took 60
 mintues. Thanks Christiano and Brad for the tips.


 Do you guys think it's worth opening bug report with RedHat to get them
 look into this, or is the problem more on OpenBSD side? Ideally I would
 like to run unmodified OpenBSD kernel on my VMs.


One solution is to rewrite the OpenBSD i386 interrupt handling code on
the apic case to use software masking, like amd64 and the i386 pic
code.


 $ diff -I'^iic0' dmesg.txt disable-mpbios-and-acpimadt.txt
 --- dmesg.txt   Sat Jun 14 15:49:02 2014
 +++ disable-mpbios-and-acpimadt.txt Tue Jun 17 13:30:46 2014
 @@ -4,6 +4,13 @@
  cpu0: 
 FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,NXE,LONG,SSE3,CX16,LAHF,ABM,SSE4A,PERF
  real mem  = 536367104 (511MB)
  avail mem = 515158016 (491MB)
 +User Kernel Config
 +UKC disable mpbios
 +368 mpbios0 disabled
 +UKC disable acpimadt
 +501 acpimadt0 disabled
 +UKC quit
 +Continuing...
  mpath0 at root
  scsibus0 at mpath0: 256 targets
  mainbus0 at root
 @@ -15,22 +22,20 @@
  acpi0: tables DSDT FACP SSDT APIC RSDT
  acpi0: wakeup devices
  acpitimer0 at acpi0: 3579545 Hz, 24 bits
 -acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
 -cpu0 at mainbus0: apid 0 (boot processor)
 -mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
 -cpu0: apic clock running at 999MHz
 -ioapic0 at mainbus0: apid 0 pa 0xfec0, version 11, 24 pins
  acpiprt0 at acpi0: bus 0 (PCI0)
  acpicpu0 at acpi0
 +mpbios at bios0 function 0x0 not configured
  bios0: ROM list: 0xc/0x1000! 0xc1000/0xa00 0xc2000/0x2400 0xed800/0x2800!
 +cpu0 at mainbus0: (uniprocessor)
 +mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
  pci0 at mainbus0 bus 0: configuration mode 1 (bios)
  pchb0 at pci0 dev 0 function 0 Intel 82441FX rev 0x02
  pcib0 at pci0 dev 1 function 0 Intel 82371SB ISA rev 0x00
  pciide0 at pci0 dev 1 function 1 Intel 82371SB IDE rev 0x00: DMA, channel 
 0 wired to compatibility, channel 1 wired to compatibility
  pciide0: channel 0 disabled (no drives)
  pciide0: channel 1 disabled (no drives)
 -uhci0 at pci0 dev 1 function 2 Intel 82371SB USB rev 0x01: apic 0 int 11
 -piixpm0 at pci0 dev 1 function 3 Intel 82371AB Power rev 0x03: apic 0 int 9
 +uhci0 at pci0 dev 1 function 2 Intel 82371SB USB rev 0x01: irq 11
 +piixpm0 at pci0 dev 1 function 3 Intel 82371AB Power rev 0x03: irq 9
  iic0 at piixpm0
  iic0: addr 0x1c 0f=00 words 00=d4d0 01=d4d0 02=d4d0 03=d4d0 04=d4d0 05=d4d0 
 06=d4d0 07=d4d0
  iic0: addr 0x1d 0f=00 words 00=d4d0 01=d4d0 02=d4d0 03=d4d0 04=d4d0 05=d4d0 
 06=d4d0 07=d4d0
 @@ -39,13 +44,13 @@
  iic0: addr 0x4e 00=00 01=00 02=00 03=00 04=00 05=00 06=00 07=00 08=00 3e=d1 
 48=d1 4a=d1 4e=d1 fc=d1 fe=d1 words 00=9d87 01=9d87 02=9d87 03=9d87 04=9d87 
 05=9d87 06=9d87 07=9d87
  virtio0 at pci0 dev 3 function 0 Qumranet Virtio Network rev 0x00: Virtio 
 Network Device
  vio0 at virtio0: address 52:54:00:12:34:70
 -virtio0: apic 0 int 11
 +virtio0: irq 11
  virtio1 at pci0 dev 4 function 0 Qumranet Virtio Storage rev 0x00: Virtio 
 Block Device
  vioblk0 at virtio1
  scsibus1 at vioblk0: 2 targets
  sd0 at scsibus1 targ 0 lun 0: VirtIO, Block Device,  SCSI3 0/direct fixed
  sd0: 102400MB, 512 bytes/sector, 209715200 sectors
 -virtio1: apic 0 int 11
 +virtio1: irq 11
  isa0 at pcib0
  isadma0 at isa0
  com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo


 --
 best regards
 q#



Re: Very slow I/O under OpenBSD i386 on qemu-kvm from RHEL7rc

2014-06-16 Thread Christiano F. Haesbaert
On 16 June 2014 04:19, Mikolaj Kucharski miko...@kucharski.name wrote:
 Hi,

 Please CC me in any replies as I'm not subscribed to misc emails.

 My main question is, do you experience similar slow I/O on OpenBSD i386
 on your Qemu/KVM installations?

 Are you aware of any problem with OpenBSD i386 under Qemu/KVM?

 Not sure should this report go to RedHat, KVM or to OpenBSD, but I've
 tested RHEL7rc with CentOS 6.5, NetBSD 6.1.4 installer and OpenBSD
 current bsd.rd and only OpenBSD i386 seems to have slow I/O problem
 under latest Enterprise Linux from RedHat. I've decided to report the
 issue here. I've tested OpenBSD guest with IDE, SCSI and VirtIO disk.
 SCSI disk currently don't seem to work at all with both amd64 and i386:



The problem is the i386 ioapic/apic implementation and how OpenBSD
uses the lapic_tpr to block incoming interrupts.
Basically if you're using ioapic (and you are), OpenBSD maps the
lapic_tpr to the special TPR register to block interrupts everytime
you get an interrupt of raise it yourself by splraise()/spl* and so
on.

You don't suffer this on amd64 since the masking is done purely in
software. You can also verify this statement by disabling mpbios on
OpenBSD and falling back to the old pic controller, in this case you
don't use ioapic, and the pic code does the mask in software,
lapic_tpr is still the same variable being touched, but in this code
path, it's not mapped to the cpu TPR.

To have an ideia of the cost of touching the tpr:

real hardware: ~25 cycles.
kvm + flexpriority (cpu extension): ~2700 cycles.
kvm without flextpriority: 100k+ cycles.

So every interrupt you take needs to touch at least lapic_tpr twice,
which before would cost ~50cycles, and now it's more than ~200kcycles.

Of course these numbers are relevant to the machine I've tested, but
you get an idea on how much slower it is.



Re: Sorry OpenBSD people, been a bit busy

2013-10-09 Thread Christiano F. Haesbaert
It might come as a shock for you all.

But we don't give a flying fuck for what you guys think about X where
X is not related to OpenBSD.

Try #ihavetheurgetoexpressmyfeeelings in irc.disney.com



Re: Question about caching system

2013-06-24 Thread Christiano F. Haesbaert
On 24 June 2013 15:37, Ioana b aredhe...@yahoo.com wrote:
 Hello,

 is there any kind of  name service cache  system like nscd for linux
 available any time soon? It would be helpful to have a cache for the users

You can use bind on the machine itself for that.

 password in case the authentication system is unavailable.

 Thanks,

 Ioana



Re: Detailed statistics on em(4) driver

2013-06-20 Thread Christiano F. Haesbaert
On 20 June 2013 08:38, Bernd be...@kroenchenstadt.de wrote:
 Hi,

 I've got problems with increasing Ierrs on several machines with
 several em(4) interfaces. Is there a way to get *detailed* information
 on these?

 # netstat -I em3 -d
 NameMtu   Network Address  Ipkts IerrsOpkts
 Oerrs Colls Drop
 em3 1500  Link  de:ad:be:ef  95655063 435896
 63427593 0 00
 em3 1500  fe80::%em3/ fe80::xx:ff:ffe  95655063 435896
 63427593 0 00

 is not that verbose.


 We hacked the kernel. The interface(s) just miss packets, see screenshot:

 http://imageshack.us/f/96/fkad.png/

 Customer urged to move from OpenBSD to Ubuntu for BGP routing.


Missed packets means the ring buffer is full and the card has to drop
the packet.
In other words, you're not fast enough.

Send a dmesg, and we need an idea of the packet rate you're pushing,
chances are you're hitting our stack limit.



Re: openbsd 5.2 amd64: high interrupts/low throughout problem: Intel 10GBE cards, dual xeon x5570 (dell r710)

2013-06-12 Thread Christiano F. Haesbaert
On 13 June 2013 00:15, John Jasen jja...@realityfailure.org wrote:
 (We've seen this problem through a few OpenBSD releases. 5.2 is much
 improved over 4.8 in this regard. Using BIOS to disable multiple cores
 on each physical CPU also yielded greater throughput. Hyperthreading and
 virtualization BIOS extensions are off.)

 We have two Dell poweredge 710 systems in an active/passive carp
 failover configuration, acting as firewall systems, with another one
 currently being used for testing.

 Various tests show the system can handle close to 10GbE speeds in and
 out, but I've not been able to push much beyond that, hitting a wall at
 about 11-12Gb/s.


That is more or less what you will get on OpenBSD.

 As I try to push the test system, interrupts climb above 12-15k/second
 (seen via systat), consuming more and more of the first CPU until after
 about 50% utilisation (according to top), it just hits a wall and
 refuses to spit out any more bandwidth.

 A coworker was able to drive it up to close to 60k interrupts/second,
 but was not able to get much more through it.

 Comparison tests, booting a Debian Squeeze live cd, and booting
 FreeBSD 9.x, indicate that out of the box, they can push 15-20Gb/s --
 which, while lower than what I would expect, is an improvement.

Here your test is probably botched, you're probably just stressing one
queue from the card, which gives you more or less what you're seeing,
you need to send multiple tcp/udp streams, then you can have an idea
how much linux/freebsd can do.

obs: we usually count forwarding rate, so when you say 15gbit/s, most
people say 7.5gbit/s =)


 Are there tuning options that we've not seen yet? Googling, reading the
 ix(4) manpage have not exposed a clear go faster option, and I'm
 concerned about the load and interrupts concentrating on one CPU so heavily.

OpenBSD kernel is single threaded so this is the expected behaviour.



 ifconfig (from test box, minux carp and vlan interfaces) and dmesg enclosed.


 OpenBSD 5.2 (GENERIC.MP) #368: Wed Aug  1 10:04:49 MDT 2012
 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
 real mem = 12870651904 (12274MB)
 avail mem = 12505665536 (11926MB)
 mainbus0 at root
 bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xbf49c000 (84 entries)
 bios0: vendor Dell Inc. version 6.3.0 date 07/24/2012
 bios0: Dell Inc. PowerEdge R710
 acpi0 at bios0: rev 2
 acpi0: sleep states S0 S4 S5
 acpi0: tables DSDT FACP APIC SPCR HPET DM__ MCFG WDAT SLIC ERST HEST
 BERT EINJ TCPA
 acpi0: wakeup devices PCI0(S5)
 acpitimer0 at acpi0: 3579545 Hz, 24 bits
 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
 cpu0 at mainbus0: apid 16 (boot processor)
 cpu0: Intel(R) Xeon(R) CPU X5570 @ 2.93GHz, 2926.44 MHz
 cpu0:
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF
 ,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF
 cpu0: 256KB 64b/line 8-way L2 cache
 cpu0: apic clock running at 132MHz
 cpu1 at mainbus0: apid 0 (application processor)
 cpu1: Intel(R) Xeon(R) CPU X5570 @ 2.93GHz, 2926.00 MHz
 cpu1:
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF
 ,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF
 cpu1: 256KB 64b/line 8-way L2 cache
 ioapic0 at mainbus0: apid 0 pa 0xfec0, version 20, 24 pins
 ioapic1 at mainbus0: apid 1 pa 0xfec8, version 20, 24 pins
 ioapic1: misconfigured as apic 0, remapped to apid 1
 acpihpet0 at acpi0: 14318179 Hz
 acpimcfg0 at acpi0 addr 0xe000, bus 0-255
 acpiprt0 at acpi0: bus 0 (PCI0)
 acpiprt1 at acpi0: bus 1 (PEX1)
 acpiprt2 at acpi0: bus 2 (PEX3)
 acpiprt3 at acpi0: bus 3 (PEX4)
 acpiprt4 at acpi0: bus 4 (PEX5)
 acpiprt5 at acpi0: bus 5 (PEX6)
 acpiprt6 at acpi0: bus 6 (PEX7)
 acpiprt7 at acpi0: bus 7 (PEX9)
 acpiprt8 at acpi0: bus -1 (PEXA)
 acpiprt9 at acpi0: bus -1 (SBEX)
 acpiprt10 at acpi0: bus 8 (COMP)
 acpicpu0 at acpi0
 acpicpu1 at acpi0
 ipmi at mainbus0 not configured
 pci0 at mainbus0 bus 0
 pchb0 at pci0 dev 0 function 0 Intel 5520 Host rev 0x13
 ppb0 at pci0 dev 1 function 0 Intel X58 PCIE rev 0x13
 pci1 at ppb0 bus 1
 bnx0 at pci1 dev 0 function 0 Broadcom BCM5709 rev 0x20: apic 1 int 4
 bnx1 at pci1 dev 0 function 1 Broadcom BCM5709 rev 0x20: apic 1 int 16
 ppb1 at pci0 dev 3 function 0 Intel X58 PCIE rev 0x13
 pci2 at ppb1 bus 2
 bnx2 at pci2 dev 0 function 0 Broadcom BCM5709 rev 0x20: apic 1 int 0
 bnx3 at pci2 dev 0 function 1 Broadcom BCM5709 rev 0x20: apic 1 int 10
 ppb2 at pci0 dev 4 function 0 Intel X58 PCIE rev 0x13
 pci3 at ppb2 bus 3
 mpi0 at pci3 dev 0 function 0 Symbios Logic SAS1068E rev 0x08: msi
 scsibus0 at mpi0: 112 targets
 sd0 at scsibus0 targ 0 lun 0: Dell, VIRTUAL DISK, 1028 SCSI3 0/direct
 fixed naa.600508e0a54b752495c4c504
 sd0: 237952MB, 512 bytes/sector, 487325696 sectors
 ses0 at scsibus0 targ 8 lun 0: DP, BACKPLANE, 1.07 

Re: From the military propaganda department

2013-05-29 Thread Christiano F. Haesbaert
I wonder why you're all surprised with this duder, after all

http://cdn.memegenerator.net/instances/400x/38221244.jpg



Re: Goodbye to you my file descriptor - take 3

2013-01-02 Thread Christiano F. Haesbaert
On Mon, Dec 31, 2012 at 04:53:15PM +1100, Aaron Mason wrote:
 Ok, I just tried freeing NULL, and it did nothing.  Granted it was on
 a Linux system but still...
 
 I stand by my argument that there's no clear improvement, especially
 on a modern system.

It's less code, and code gets copied, and people don't read docs, they
copy code and cross their fingers, we shouldn't incentivate that. 

 
 On Mon, Dec 31, 2012 at 4:50 PM, Aaron Mason simplersolut...@gmail.com 
 wrote:
  Maxime
 
  I'm not entirely clear on what you hoped to achieve with the diffs
  below, if anything you're inducing possible segfaults if any of those
  values are NULL.  That aside, I fail to see how this could be
  construed as any sort of improvement.
 
  Index: pfctl_osfp.c
  ===
  RCS file: /cvs/src/sbin/pfctl/pfctl_osfp.c,v
  retrieving revision 1.18
  diff -u -r1.18 pfctl_osfp.c
  --- pfctl_osfp.c18 Oct 2010 15:55:28 -  1.18
  +++ pfctl_osfp.c22 Dec 2012 07:08:28 -
  @@ -112,16 +112,11 @@
 
  while ((line = fgetln(in, len)) != NULL) {
  lineno++;
  -   if (class)
  -   free(class);
  -   if (version)
  -   free(version);
  -   if (subtype)
  -   free(subtype);
  -   if (desc)
  -   free(desc);
  -   if (tcpopts)
  -   free(tcpopts);
  +   free(class);
  +   free(version);
  +   free(subtype);
  +   free(desc);
  +   free(tcpopts);
  class = version = subtype = desc = tcpopts = NULL;
  memset(fp, 0, sizeof(fp));
 
  @@ -250,16 +245,11 @@
  add_fingerprint(dev, opts, fp);
  }
 
  -   if (class)
  -   free(class);
  -   if (version)
  -   free(version);
  -   if (subtype)
  -   free(subtype);
  -   if (desc)
  -   free(desc);
  -   if (tcpopts)
  -   free(tcpopts);
  +   free(class);
  +   free(version);
  +   free(subtype);
  +   free(desc);
  +   free(tcpopts);
 
  fclose(in);
 
  @@ -513,7 +503,7 @@
  return (buf);
 
   found:
  -   snprintf(buf, len, %s, class_name);
  +   strlcpy(buf, class_name, len);
  if (version_name) {
  strlcat(buf,  , len);
  strlcat(buf, version_name, len);
  Index: pfctl_radix.c
  ===
  RCS file: /cvs/src/sbin/pfctl/pfctl_radix.c,v
  retrieving revision 1.29
  diff -u -r1.29 pfctl_radix.c
  --- pfctl_radix.c   27 Jul 2011 00:26:10 -  1.29
  +++ pfctl_radix.c   22 Dec 2012 07:08:28 -
  @@ -499,8 +499,7 @@
   {
  if (b == NULL)
  return;
  -   if (b-pfrb_caddr != NULL)
  -   free(b-pfrb_caddr);
  +   free(b-pfrb_caddr);
  b-pfrb_caddr = NULL;
  b-pfrb_size = b-pfrb_msize = 0;
   }



Re: Goodbye to you my file descriptor - take 3

2012-12-28 Thread Christiano F. Haesbaert
You can enable a bunch of warnings with WARNINGS=Yes in our tree.
On Dec 28, 2012 3:34 PM, Kenneth R Westerback kwesterb...@rogers.com
wrote:

 On Thu, Dec 27, 2012 at 02:04:24PM +0100, Maxime Villard wrote:
  Well, as no one seems to give a fuck on tech@, I put a more
  glamourous title here.
 
  btw, i wonder why you don't put -Wextra to the makefile, you would
  see that there are a lot of unused parameters, comparisons between
  signed and unsigned, uninitialized vars, ...

 Too many false positives to be useful.

 People are running various static analysis packages over the tree
 periodically to find such things. None are perfect so if you actually
 find any you think are bugs, diffs are always appreciated.

  Ken

 
 
   Message original 
  Sujet: [PATCH] pfctl: leak  stuff
  Date : Sat, 22 Dec 2012 08:16:09 +0100
  De : Maxime Villard rusty...@gmx.fr
  Pour : t...@openbsd.org
 
  Hi,
  here are my small changes for pfctl.
 
  1) There are cases where we could leak a file descriptor by
 returning.
 
  2) We don't need to check memory before freeing it, as
 free() already does that.
 
  3) Just replaced a snprintf() by strlcpy(), it's faster.
 
  Ok/Comments ?
 
 
 
  Index: pfctl.c
  ===
  RCS file: /cvs/src/sbin/pfctl/pfctl.c,v
  retrieving revision 1.314
  diff -u -r1.314 pfctl.c
  --- pfctl.c   19 Sep 2012 15:52:17 -  1.314
  +++ pfctl.c   22 Dec 2012 07:08:28 -
  @@ -1377,8 +1377,7 @@
err(1, DIOCXROLLBACK);
exit(1);
} else {/* sub ruleset */
  - if (path)
  - free(path);
  + free(path);
return (-1);
}
 
  @@ -1867,10 +1866,6 @@
unsigned int len = 0;
size_t n;
 
  - f = fopen(file, w);
  - if (f == NULL)
  - err(1, open: %s, file);
  -
memset(ps, 0, sizeof(ps));
for (;;) {
ps.ps_len = len;
  @@ -1893,6 +1888,10 @@
return; /* no states */
len *= 2;
}
  +
  + f = fopen(file, w);
  + if (f == NULL)
  + err(1, open: %s, file);
 
n = ps.ps_len / sizeof(struct pfsync_state);
if (fwrite(inbuf, sizeof(struct pfsync_state), n, f)  n)
  Index: pfctl_osfp.c
  ===
  RCS file: /cvs/src/sbin/pfctl/pfctl_osfp.c,v
  retrieving revision 1.18
  diff -u -r1.18 pfctl_osfp.c
  --- pfctl_osfp.c  18 Oct 2010 15:55:28 -  1.18
  +++ pfctl_osfp.c  22 Dec 2012 07:08:28 -
  @@ -112,16 +112,11 @@
 
while ((line = fgetln(in, len)) != NULL) {
lineno++;
  - if (class)
  - free(class);
  - if (version)
  - free(version);
  - if (subtype)
  - free(subtype);
  - if (desc)
  - free(desc);
  - if (tcpopts)
  - free(tcpopts);
  + free(class);
  + free(version);
  + free(subtype);
  + free(desc);
  + free(tcpopts);
class = version = subtype = desc = tcpopts = NULL;
memset(fp, 0, sizeof(fp));
 
  @@ -250,16 +245,11 @@
add_fingerprint(dev, opts, fp);
}
 
  - if (class)
  - free(class);
  - if (version)
  - free(version);
  - if (subtype)
  - free(subtype);
  - if (desc)
  - free(desc);
  - if (tcpopts)
  - free(tcpopts);
  + free(class);
  + free(version);
  + free(subtype);
  + free(desc);
  + free(tcpopts);
 
fclose(in);
 
  @@ -513,7 +503,7 @@
return (buf);
 
   found:
  - snprintf(buf, len, %s, class_name);
  + strlcpy(buf, class_name, len);
if (version_name) {
strlcat(buf,  , len);
strlcat(buf, version_name, len);
  Index: pfctl_radix.c
  ===
  RCS file: /cvs/src/sbin/pfctl/pfctl_radix.c,v
  retrieving revision 1.29
  diff -u -r1.29 pfctl_radix.c
  --- pfctl_radix.c 27 Jul 2011 00:26:10 -  1.29
  +++ pfctl_radix.c 22 Dec 2012 07:08:28 -
  @@ -499,8 +499,7 @@
   {
if (b == NULL)
return;
  - if (b-pfrb_caddr != NULL)
  - free(b-pfrb_caddr);
  + free(b-pfrb_caddr);
b-pfrb_caddr = NULL;
b-pfrb_size = b-pfrb_msize = 0;
   }



Re: Help with the board H77-D3H

2012-12-21 Thread Christiano F. Haesbaert
Just as a note, I have a z77 d3h and ahci was disabled too.



Re: OpenBSD-5.1 hangs on Supermicro X9DR3-F

2012-10-12 Thread Christiano F. Haesbaert
On 11 October 2012 08:30, Илья Шипицин chipits...@gmail.com
wrote:
 Hello!

 we recently installed OpenBSD/amd64 on Supermicro X9DR3-F, it hangs about 1
 times a day.
 5.1 does not understand i350 chip, so we put external Intel PRO/1000 MT
 (82574L) nic.

 we have ddb.panic=1, but no ddb appears on screen on hang.
 also, it says savecore: no core dump during boot.

 we tested RAM with memtest, so we do not suspect it for memory related
 issue.


 how can we diagnose those hangs ?
 is it ok to run 5.1 on X9DR3-F ?

 do I need to provide dmesg output ? any other kind of diagnostics ?

 Cheers,
 Ilya Shipitsin


If you can provide the dmesg I can help you, we have these at work:
hw.product=X9DRH-7TF/7F/iTF/iF

Which should be similar, do you by any chance have a mfii(4) ?
Our machine had interrupt routing issues, maybe you're experiencing the same.
Please provide a dmesg, even a picture should do and we can try something.



Re: OpenBSD-5.1 hangs on Supermicro X9DR3-F

2012-10-12 Thread Christiano F. Haesbaert
On 12 October 2012 14:07, Илья Шипицин chipits...@gmail.com
wrote:
 pardon, didn't pay attention to  mfii(4), what's that ?

 # man -k mfii
 mfii: nothing appropriate

 # grep -i mfii /var/run/dmesg.boot
 #

That was a raid controller which gave me interrupt issues, but
disregard that, I didn't realize you were on 5.1



Re: OpenBSD-5.1 hangs on Supermicro X9DR3-F

2012-10-12 Thread Christiano F. Haesbaert
On 12 October 2012 14:10, Christiano F. Haesbaert
haesba...@haesbaert.org wrote:
 On 12 October 2012 14:07, Илья Шипицин chipits...@gmail.com
wrote:
 pardon, didn't pay attention to  mfii(4), what's that ?

 # man -k mfii
 mfii: nothing appropriate

 # grep -i mfii /var/run/dmesg.boot
 #

 That was a raid controller which gave me interrupt issues, but
 disregard that, I didn't realize you were on 5.1

I had misread your post, disregard my comments please.



Re: Panic on 1 oct 2012 kernel

2012-10-04 Thread Christiano F. Haesbaert
On 4 October 2012 12:06, Insan Praja SW insan.pr...@gmail.com wrote:
 Hi,
 Just got a panic from an nginx webserver of ours. Can produce ps and
 trace since ddb send symbol unknown when we send the command.
 This is what was captured from my camera phone;

You mean can't ? can you paste exactly what happens when you try to
get a trace ?

Looks like some code path is trying to grab the kernel_lock with the
sched_lock held.



 panic: kernel diagnostic assertion __mp_lock_held(sched_lock) == 0
 failed: file ../../../../kern/kern_lock.c, line 363
 Stopped at  Debugger+0x5:   leave



 Thanks,

 Insan Praja SW






 OpenBSD 5.2-current (IMS-AMD64.MP) #3: Mon Oct  1 14:49:48 WIT 2012
 r...@development.xxx.net:/usr/src/sys/arch/amd64/compile/GENERIC.MP
 real mem = 2145189888 (2045MB)
 avail mem = 2065670144 (1969MB)
 mainbus0 at root
 bios0 at mainbus0: SMBIOS rev. 2.33 @ 0x7fee2000 (29 entries)
 bios0: vendor IBM version IBM BIOS Version 1.35-[G9E135AUS-1.35]- date
 09/29/2007
 bios0: IBM IBM System x3250 -[436442A]-
 acpi0 at bios0: rev 0
 acpi0: sleep states S0 S4 S5
 acpi0: tables DSDT FACP MCFG APIC BOOT SPCR SSDT
 acpi0: wakeup devices PEG_(S4) PEG2(S4) EXP1(S4) EXP5(S4) EXP6(S4) PCIB(S4)
 COM1(S4) COM2(S4) USB1(S4) USB2(S4) USB3(S4) USB4(S4) EUSB(S4)
 acpitimer0 at acpi0: 3579545 Hz, 24 bits
 acpimcfg0 at acpi0 addr 0xe000, bus 0-25
 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
 cpu0 at mainbus0: apid 0 (boot processor)
 cpu0: Intel(R) Xeon(R) CPU 3040 @ 1.86GHz, 1866.98 MHz
 cpu0:
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF
 cpu0: 2MB 64b/line 8-way L2 cache
 cpu0: apic clock running at 266MHz
 cpu1 at mainbus0: apid 1 (application processor)
 cpu1: Intel(R) Xeon(R) CPU 3040 @ 1.86GHz, 1866.73 MHz
 cpu1:
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF
 cpu1: 2MB 64b/line 8-way L2 cache
 ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
 acpiprt0 at acpi0: bus 0 (PCI0)
 acpiprt1 at acpi0: bus 12 (PEG_)
 acpiprt2 at acpi0: bus 6 (PEG2)
 acpiprt3 at acpi0: bus 5 (EXP1)
 acpiprt4 at acpi0: bus 1 (EXP5)
 acpiprt5 at acpi0: bus 3 (EXP6)
 acpiprt6 at acpi0: bus 26 (PCIB)
 acpicpu0 at acpi0: PSS
 acpicpu1 at acpi0: PSS
 acpibtn0 at acpi0: PWRB
 ipmi at mainbus0 not configured
 cpu0: Enhanced SpeedStep 1866 MHz: speeds: 1867, 1600 MHz
 pci0 at mainbus0 bus 0
 pchb0 at pci0 dev 0 function 0 Intel E7230 Host rev 0xc0
 ppb0 at pci0 dev 1 function 0 Intel E7230 PCIE rev 0xc0: msi
 pci1 at ppb0 bus 12
 ppb1 at pci0 dev 3 function 0 Intel 82975X PCIE rev 0xc0: msi
 pci2 at ppb1 bus 6
 ppb2 at pci0 dev 28 function 0 Intel 82801GB PCIE rev 0x01: msi
 pci3 at ppb2 bus 5
 ppb3 at pci0 dev 28 function 4 Intel 82801G PCIE rev 0x01: msi
 pci4 at ppb3 bus 1
 bge0 at pci4 dev 0 function 0 Broadcom BCM5721 rev 0x21, BCM5750 C1
 (0x4201): apic 2 int 16, address 00:1a:64:6e:a0:9a
 brgphy0 at bge0 phy 1: BCM5750 10/100/1000baseT PHY, rev. 0
 ppb4 at pci0 dev 28 function 5 Intel 82801G PCIE rev 0x01: msi
 pci5 at ppb4 bus 3
 bge1 at pci5 dev 0 function 0 Broadcom BCM5721 rev 0x21, BCM5750 C1
 (0x4201): apic 2 int 17, address 00:1a:64:6e:a0:9b
 brgphy1 at bge1 phy 1: BCM5750 10/100/1000baseT PHY, rev. 0
 uhci0 at pci0 dev 29 function 0 Intel 82801GB USB rev 0x01: apic 2 int 23
 uhci1 at pci0 dev 29 function 1 Intel 82801GB USB rev 0x01: apic 2 int 19
 uhci2 at pci0 dev 29 function 2 Intel 82801GB USB rev 0x01: apic 2 int 18
 uhci3 at pci0 dev 29 function 3 Intel 82801GB USB rev 0x01: apic 2 int 16
 ehci0 at pci0 dev 29 function 7 Intel 82801GB USB rev 0x01: apic 2 int 23
 usb0 at ehci0: USB revision 2.0
 uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
 ppb5 at pci0 dev 30 function 0 Intel 82801BA Hub-to-PCI rev 0xe1
 pci6 at ppb5 bus 26
 vga1 at pci6 dev 4 function 0 ATI ES1000 rev 0x02
 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
 wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
 radeondrm0 at vga1: apic 2 int 18
 drm0 at radeondrm0
 pcib0 at pci0 dev 31 function 0 Intel 82801GB LPC rev 0x01
 pciide0 at pci0 dev 31 function 2 Intel 82801GB SATA rev 0x01: DMA,
 channel 0 wired to compatibility, channel 1 wired to compatibility
 wd0 at pciide0 channel 0 drive 0: Hitachi HDS721616PLA380 IBM
 wd0: 16-sector PIO, LBA48, 152626MB, 312579695 sectors
 wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6
 atapiscsi0 at pciide0 channel 1 drive 0
 scsibus0 at atapiscsi0: 2 targets
 cd0 at scsibus0 targ 0 lun 0: TSSTcorp, CD-ROM TS-L162C, IB02 ATAPI
 5/cdrom removable
 cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
 ichiic0 at pci0 dev 31 function 3 Intel 82801GB SMBus rev 0x01: apic 2 int
 19
 iic0 at ichiic0
 spdmem0 at iic0 addr 0x50: 512MB DDR2 SDRAM ECC PC2-5300CL5
 spdmem1 at iic0 addr 

Re: Panic on 1 oct 2012 kernel

2012-10-04 Thread Christiano F. Haesbaert
On 4 October 2012 12:56, Insan Praja SW insan.pr...@gmail.com wrote:
 Hi,


 On Thu, 04 Oct 2012 17:52:24 +0700, Christiano F. Haesbaert
 haesba...@haesbaert.org wrote:

 On 4 October 2012 12:06, Insan Praja SW insan.pr...@gmail.com wrote:

 Hi,
 Just got a panic from an nginx webserver of ours. Can produce ps and
 trace since ddb send symbol unknown when we send the command.
 This is what was captured from my camera phone;


 You mean can't ? can you paste exactly what happens when you try to
 get a trace ?


 Yap. Sorry for that.


You're not using generic, what did you change ?
Can you show me what happens when you try to get a trace/ps ?
Did you reboot the machine ?

If you're screwing with the kernel and asking for support at least try
to tell us what have you changed.



Re: IPSEC VPN performance

2012-10-02 Thread Christiano F. Haesbaert
On 2 October 2012 08:57, David Coppa dco...@gmail.com wrote:
 On Mon, Oct 1, 2012 at 5:55 PM, Russell Garrison
 russell.garri...@gmail.com wrote:
 Is iPerf running threaded? What about dd to null and a loopback listener?

 Beware: only -current (since Tue Sep 25) net/iperf port has threading enabled.

 ciao,
 David


Why not using tcpbench where you can actually specify the parameters
and know what is going on :).

Play with buffer sizes and you'll see a big difference, using -u will
give you the actual PPS.



HDMI and radeon

2012-09-01 Thread Christiano F. Haesbaert
Is anyone using HDMI with a radeon card ? Does it work ? Not sure if
this is transparent to software ?

I got a new monitor and not should if I should buy a HDMI or DVI cable.



Re: HDMI and radeon

2012-09-01 Thread Christiano F. Haesbaert
Thank you all, that should be enough :-)



Re: Dilemma: between OpenBSD and NetBSD

2012-08-11 Thread Christiano F. Haesbaert
On 11 August 2012 03:49,  benh...@gmx.us wrote:
 On 2012-08-11 03:21, Andres Perera wrote:

 i find it hard to believe you're involved in such project. more
 portable, more secure don't mean anything unless details are
 involved. i mean, if it runs on your target hosts, what could more
 portable possibly mean?

 it's better to say: i'm trying out these two and i want a comparison.


 lying, saying your boss wants a bsd solution, doesn't make it seem
 more important!

 I didn't expect to find a clairvoyant on this mailing list.

 Only, for the record: I said client, not boss; I did not
 say I was involved, but that simply that I was asked,
 which is different; and I did candidly admit upfront that I
 do not know much about BSDs, and that I was collecting
 information; lastly, details *are*, of course, involved (as
 with any project), but I simply did not feel the need to
 mention them, since to me they seemed (and still seem)
 irrelevant to the specific question I was asking.

 So, I really do not understand the rationale of you
 accusing me of lying on the basis of one email
 (incidentally, my very first email to this list). Above all, I
 do not understand the aggressive tone...


Well there are a lot of people in misc, in time you'll learn who to
listen and who to ignore :/



Re: Any T410/T420 with suspend/resume fully working in 5.1 or current?

2012-08-11 Thread Christiano F. Haesbaert
On 11 August 2012 19:25, Christian Weisgerber na...@mips.inka.de wrote:
 Ted Unangst t...@tedunangst.com wrote:

 While we're on the subject, the T430 and T430s (ivy bridge update) do
 not work at present, or at least my T430s didn't. ahci times out
 initializing, so there's no hard drive. The wireless didn't seem to be
 detected either, and of course the usb3 ports don't work, only the
 usb2 port.

 On the other hand, the Ivy-Bridge-based X230 works reasonably well:

 * No accelerated X11, only VESA driver.  You can't switch to a text
   console or watch HD videos.

Do you get the correct resolution at least ?

 * No suspend/resume.
 * No USB3 support obviously.  The blue ports work fine for USB1/2,
   though.
 * The brightness buttons don't work, unknown event 0x6050.
 * The gigabit Ethernet only negotiates 100Base-TX.

 --
 Christian naddy Weisgerber  na...@mips.inka.de



Re: Calomel.org

2012-07-26 Thread Christiano F. Haesbaert
I feel this usually comes from folks with Linux background.

You see, in BSD world, specially in OpenBSD, there is good and high
quality documentation, which the developers put a lot of effort in
providing it.
I know, since I did it too in the past, that when you're using Linux,
you're basically in the dark, so you go to google, and you try your
luck.

Everytime you follow a non official documentation, you waste your time
and the developer's time, we're not cranky about calomel only, we're
cranky about people following unofficial documentation, remember, our
FAQ and manpages are accurate 99.99% of the time and they are pretty
well written and complete.

If you can't figure it out by reading the FAQ/manpages: you're either
not ready for it, or we have a documentation bug.



Re: net connection via USB

2012-07-26 Thread Christiano F. Haesbaert
On 26 July 2012 13:01, Jan Stary h...@stare.cz wrote:
 On Jul 23 21:07:09, Stuart Henderson wrote:
 On 2012-07-23, Jan Stary h...@stare.cz wrote:
  On Jul 21, 2012 4:02 PM, Jan Stary h...@stare.cz wrote:
 
   Is there any support present or planned for Ethernet over USB?
  
   http://en.wikipedia.org/wiki/Ethernet_over_USB#Treat_USB_as_an_Ethernet_network
  
   The motivation is to conenct my smartphone via USB to my workstation,
   thus having the phone connected to the net without either a wifi AP
   or using the operator's network data tarif.
 
 
  On Jul 21 16:32:31, Christiano F. Haesbaert wrote:
  Yes see urndis
 
  My phone is Samsung GT-I5510, which is a Samsung Galaxy,
  which urndis(4) mentiones as supprted. Does someone use it
  as a urndis device? Should it report as a urndis device
  once connected via USB? I only get
 
  umass1 at uhub0 port 3 configuration 1 interface 0 SAMSUNG Electronics 
  Co., Ltd. Samsung Android USB Device rev 2.00/4.00 addr 3
  umass1: using SCSI over Bulk-Only scsibus4 at umass1: 2 targets, initiator   0
  sd3 at scsibus4 targ 1 lun 0: SAMSUNG, GT-I5510 Card,  SCSI2 
  0/direct removable serial.04e8681d551065d6a9ce
 
  i.e. it only exposes itself as a umass device.

 urndis(4) should connect to this phone in -current,

 Today's current/amd64 doesn't:

 umass1 at uhub0 port 3 configuration 1 interface 0 SAMSUNG Electronics Co., 
 Ltd. Samsung Android USB Device rev 2.00/4.00 addr 3
 umass1: using SCSI over Bulk-Only
 scsibus4 at umass1: 2 targets, initiator 0
 sd3 at scsibus4 targ 1 lun 0: SAMSUNG, GT-I5510 Card,  SCSI2 0/direct 
 removable serial.04e8681d551065d6a9ce

 Is someone is using a Samsung Galaxy as a urndis device,
 would you please share the dmesg?

 Note: SAMSUNG GT-I5510 is probably not entirely the same as
 Samsung Galaxy S / S2 which the urndis manpage mentions.



Did you go into your phone settings and enabled USB Tethering ?


 it presents an
 ethernet-like interface, normally you would run dhclient on a
 computer to connect via the phone - the computer will then use the
 phone for internet access via whichever method it's connected,
 wifi/3g/gprs/etc).

 Howeverit's just a network interface, so I imagine that if you
 have access to change the phone's routing table (which will probably
 require the phone to be rooted) then I don't see why you couldn't
 change the default route on the phone...



Re: net connection via USB

2012-07-23 Thread Christiano F. Haesbaert
On 23 July 2012 12:29, Jan Stary h...@stare.cz wrote:
 On Jul 21, 2012 4:02 PM, Jan Stary h...@stare.cz wrote:

  Is there any support present or planned for Ethernet over USB?
 
  http://en.wikipedia.org/wiki/Ethernet_over_USB#Treat_USB_as_an_Ethernet_network
 
  The motivation is to conenct my smartphone via USB to my workstation,
  thus having the phone connected to the net without either a wifi AP
  or using the operator's network data tarif.


 On Jul 21 16:32:31, Christiano F. Haesbaert wrote:
 Yes see urndis

 My phone is Samsung GT-I5510, which is a Samsung Galaxy,
 which urndis(4) mentiones as supprted. Does someone use it
 as a urndis device? Should it report as a urndis device
 once connected via USB? I only get

 umass1 at uhub0 port 3 configuration 1 interface 0 SAMSUNG Electronics Co., 
 Ltd. Samsung Android USB Device rev 2.00/4.00 addr 3
 umass1: using SCSI over Bulk-Only scsibus4 at umass1: 2 targets, initiator 0
 sd3 at scsibus4 targ 1 lun 0: SAMSUNG, GT-I5510 Card,  SCSI2 0/direct 
 removable serial.04e8681d551065d6a9ce

 i.e. it only exposes itself as a umass device.


 On Jul 23 10:00:53, Stuart Henderson wrote:
 I think you mean that the phone uses the computer's internet connection,
 is that correct?

 Yes.


I thought you wanted the other way around, to connect your laptop
through your phone, that is what urndis is for, you need to go to
settings-mobile  networks-usb tethering, than the laptop will see a
urndis(4) interface, but this is not you want, this is for connecting
the laptop through the phone.

 I haven't heard of any such driver planned, but I wonder if there are
 any devices other than the ipaq which actually support this, it seems like
 it would be a bit of a niche market...



Re: net connection via USB

2012-07-21 Thread Christiano F. Haesbaert
Yes see urndis
On Jul 21, 2012 4:02 PM, Jan Stary h...@stare.cz wrote:

 Is there any support present or planned for Ethernet over USB?

 http://en.wikipedia.org/wiki/Ethernet_over_USB#Treat_USB_as_an_Ethernet_network

 The motivation is to conenct my smartphone via USB to my workstation,
 thus having the phone connected to the net without either a wifi AP
 or using the operator's network data tarif.

 Jan



Re: Unresponsive -current + rtorrent

2012-07-13 Thread Christiano F. Haesbaert
On 13 July 2012 14:42, Paolo Aglialoro paol...@gmail.com wrote:
 This means that 5.1-release will still be affected by the bug so that
 rtorrent won't run correctly, right?
 Or is there any backport?
 Thanks


Can you give it a spin ? 5.1 uses uthreads still, this problem might
appear more often with rthreads, I can backport it to 5.1, no problem,
but I'd like to know if you the the IPI storm anyway.

thanks :)



Re: Unresponsive -current + rtorrent

2012-07-13 Thread Christiano F. Haesbaert
On 13 July 2012 15:16, David Coppa dco...@gmail.com wrote:
 On Fri, Jul 13, 2012 at 3:14 PM, David Coppa dco...@gmail.com wrote:
 On Fri, Jul 13, 2012 at 2:57 PM, Philip Guenther guent...@gmail.com wrote:
 On Fri, Jul 13, 2012 at 5:42 AM, Paolo Aglialoro paol...@gmail.com wrote:
 This means that 5.1-release will still be affected by the bug so that
 rtorrent won't run correctly, right?

 I believe the problem didn't exhibit with uthreads.  It's only with
 the switch to rthreads that it became a problem.

 Probably. But this also has something to do with newer
 libtorrent/rtorrent (0.13.2/0.9.2) in -current.
 0.12.9/0.8.9 does not exhibit this problematic behavior even with
 rthreads... In fact, I'm going to back out the update to 0.13.2/0.9.2.


 Philip Guenther

 ciao,
 David

 I meant: with libtorrent/rtorrent 0.13.2/0.9.2 haesbaert@'s fix does not help

Can you confirm that you get an IPI storm ? with libtorrent/rtorrent
0.13.2/0.9.2 even with the fix ?

I'd run it myself but I'm moving and my rtorrent machine is no more.



Re: Help neede for 'pkgin'

2012-07-10 Thread Christiano F. Haesbaert
God bless misc.



Re: OpenBSD's webpage desing

2012-06-26 Thread Christiano F. Haesbaert
On 26 June 2012 18:46, Pablo Velasco Fernández warlock...@gmail.com wrote:
 Hi. I was loolong the FreeBSD web page. And its a cool page with a cool
 desing. Maybe OpenBSD should change their own page to a most visual web
 page. ( Its only my opinion ) What do you think?


Yeah, FreeBSD webpage is cool, until you need to actually use it, I
always have trouble finding something in it.

OpenBSD web page:

- It's small
- It's simple, just basic HTML, some cgi, nothing fancy, all very easy
to maintain.
- You find anything in less than 1 minute.
- It looks nice, since that is how webpages should look like (IMHO).

If you really wanna improve that, I'd suggest reworking the same
webpage, but making it possible for people with vision impairment to
use it more effectively, I've been told that there are a some ways to
improve it.



Re: OpenBSD forked

2012-06-21 Thread Christiano F. Haesbaert
Tedu's suggestion is the best one in my IMHO, implement a webserver.

I would try to do the following:
- Read KR
- Join ##c on freenode, they can help a *lot*.
- Read manpages of every function.
- Code small UNIX utilities, start with cat, then wc.
- Code something like a webserver, this is where you'll actually learn.



Re: OpenBSD forked

2012-06-21 Thread Christiano F. Haesbaert
On 21 June 2012 12:22, Gilles Chehade gil...@poolp.org wrote:
 On Thu, Jun 21, 2012 at 12:09:47PM -0300, Christiano F. Haesbaert wrote:
 Tedu's suggestion is the best one in my IMHO, implement a webserver.

 I would try to do the following:
 - Read KR
 - Join ##c on freenode, they can help a *lot*.
 - Read manpages of every function.
 - Code small UNIX utilities, start with cat, then wc.
 - Code something like a webserver, this is where you'll actually learn.


 Actually, before a webserver, I'd recommend learning how to write a shell
 as it will have you deal with lots of concepts you would not see
 otherwise ... then network programming :-p


Yep shell is a good example.

One small task I used to pass to people wanting to learn C, is to
implement a strtok-like function, they could design their own API.
It is interesting because they need to deal with pointers, strings,
and design an API as in:

- should I pass a fixed array and alloc all tokens ?
- should I return an alloced structure ?
- should I modify the string in place as strtok ? should I copy.

A lot of decisions have to be made, and it's interesting to see how
they approach it.



Re: Learning C Programming

2012-06-21 Thread Christiano F. Haesbaert
On 21 June 2012 14:37, cody chandler cody.a.chand...@gmail.com wrote:
 Hello,

  Talk about learning C Programming and the KR book being a good one.  Is
 this the book?

Yes it is

 http://www.amazon.com/C-Programming-Language-2nd-Edition/dp/0131103628

 Figured it would be best to start new instead of keeping the Chat forked
 and moving away from the topid of the OBSD Fork.


 Thanks
 Cody



Re: filesystem mount sync and async

2012-06-16 Thread Christiano F. Haesbaert
On 11 June 2012 05:38, Otto Moerbeek o...@drijf.net wrote:
 hOn Mon, Jun 11, 2012 at 09:35:56AM +0300, Dimitrios Moustos wrote:

 Hello,
 I have not found any information in the man page or otherwise that conflicts 
 with the bellow, it just does not seem like the following should be possible:

 # grep home /etc/fstab
 424dc014a22db950.f /home ffs ro,nodev,nosuid,noatime
 # mount|grep home
 /dev/sd0f on /home type ffs (local, noatime, nodev, nosuid, read-only)
 # mount -uwo async /home
 # mount|grep home
 /dev/sd0f on /home type ffs (asynchronous, local, noatime, nodev, nosuid)
 # mount -uro sync /home
 # mount|grep /home
 /dev/sd0f on /home type ffs (asynchronous, local, noatime, nodev, nosuid, 
 read-only, synchronous)


 I am however not familiar with the intricacies of filesystems, which 
 probably makes me wrong.
 At least posting this will make my curiosity go away.

 The async flag concerns metadata i/o. The sysnc flags concerns regular
 data i/o. The two flags are separate, the negations of these flags are
 noasycn and nosync respectively.

 Yes, this is confusing, but playing with these flags is for experts
 only.

Agreed, but we should document that shouldn't we ?



Re: Mounting a partition, cdrom, usb as a user

2012-06-16 Thread Christiano F. Haesbaert
On Sat, Jun 16, 2012 at 01:48:17PM +0200, Antoine Jacoutot wrote:
 On Sat, Jun 16, 2012 at 12:39:36PM +0100, Mik J wrote:
  Hello,
  
  I'm able to mount a partition as a user if I have
  kern.usermount=1
  #
  ls -l /dev/wd2*
  brw-rw  1 root  operator    0,   0 May  7 21:54 /dev/wd2a
  # ls -l /mnt
  drwxrwxr-x   2 myuser  operator  512 May  7 22:38 extpart
  and
  #
  grep operator /etc/group
  operator:*:5:root,myuser
  
  However, I'm unable to
  mount the partition if the owner of /mnt/extpart is root although that mount
  point is rwx by the group operator and myuser belongs to that group.
  # ls -l
  /mnt
  drwxrwxr-x   2 root  operator  512 May  7 22:38 extpart
  
  I assume that
  kern.usermount allows a partition to be mounted only if the mount point is
  owned by a user and the group owner is not considered.
  I have search for a
  variable kern.groupmount but there is not such thing.
  
  So my question is:
  Is
  it possible to allow a group to mount partitions (or usb keys, cdrom) ?
 
 Man mount(8).
 
 Only the superuser may
 mount file systems unless kern.usermount is nonzero (see sysctl(8)), the
 special device is readable and writeable by the user attempting the
 mount, and the mount point node is owned by the user attempting the
 mount.
 

Any special reason why not respecting groups ?
This feels like a strange behaviour.



Re: lenovo x120e does not wake after zzz

2012-05-22 Thread Christiano F. Haesbaert
On 22 May 2012 10:28, patrick keshishian pkesh...@gmail.com wrote:
 On Tue, May 22, 2012 at 6:18 AM, patrick keshishian pkesh...@gmail.com
 wrote:
 Hi all,

 Just installed a new snapshot:
 kern.version=OpenBSD 5.1-current (GENERIC.MP) #296: Sun May 20 10:41:35
MDT
 2012
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

 I was previous running an i386 (SP) snapshot from around March 24th.
 There were no issues with sleep and wake cycles. After I installed
 (not upgrade) the May 20th snapshot, every sleep attempt gets in me in
 a state where I have to hard-boot the laptop.

 Ideas?

 Replying to myself.

 I should have tried this before sending original message. Running SP
 kernel does not demonstrate the sleep-wake issue; at least not in the
 last hand-full of attempts.

 I can live with this work around. But if anyone has ideas/patches for
 me to test ...


Can you try an MP kernel from March 23 ? If it works, this narrows the
window a bit.



Re: lenovo x120e does not wake after zzz

2012-05-22 Thread Christiano F. Haesbaert
Can you try the following diff ?

The identifycpu diff caused a problem on acpi resume but it was fixed,
this reverts the whole thing.

Index: identcpu.c
===
RCS file: /cvs/src/sys/arch/amd64/amd64/identcpu.c,v
retrieving revision 1.36
retrieving revision 1.34
diff -d -u -p -r1.36 -r1.34
--- identcpu.c  22 Apr 2012 19:36:09 -  1.36
+++ identcpu.c  8 Jan 2012 14:39:26 -   1.34
@@ -1,4 +1,4 @@
-/* $OpenBSD: identcpu.c,v 1.36 2012/04/22 19:36:09 haesbaert Exp $ */
+/* $OpenBSD: identcpu.c,v 1.34 2012/01/08 14:39:26 haesbaert Exp $ */
 /* $NetBSD: identcpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $*/
 
 /*
@@ -302,31 +302,27 @@ identifycpu(struct cpu_info *ci)
u_int64_t last_tsc;
u_int32_t dummy, val, pnfeatset;
u_int32_t brand[12];
-   char mycpu_model[48];
+   u_int32_t vendor[4];
int i, max;
char *brandstr_from, *brandstr_to;
int skipspace;
 
CPUID(1, ci-ci_signature, val, dummy, ci-ci_feature_flags);
CPUID(0x8000, pnfeatset, dummy, dummy, dummy);
-   if (pnfeatset = 0x8001) {
-   u_int32_t ecx;
-
+   if (pnfeatset = 0x8001)
CPUID(0x8001, dummy, dummy,
-   ecx, ci-ci_feature_eflags);
-   if (ci-ci_flags  CPUF_PRIMARY)
-   ecpu_ecxfeature = ecx;
-   /* Let cpu_fature be the common bits */
-   cpu_feature = ci-ci_feature_flags;
-   }
+   ecpu_ecxfeature, ci-ci_feature_eflags);
 
+   vendor[3] = 0;
+   CPUID(0, dummy, vendor[0], vendor[2], vendor[1]);   /* yup, 0 2 1 */
CPUID(0x8002, brand[0], brand[1], brand[2], brand[3]);
CPUID(0x8003, brand[4], brand[5], brand[6], brand[7]);
CPUID(0x8004, brand[8], brand[9], brand[10], brand[11]);
-   strlcpy(mycpu_model, (char *)brand, sizeof(mycpu_model));
 
-   /* Remove leading and duplicated spaces from mycpu_model */
-   brandstr_from = brandstr_to = mycpu_model;
+   strlcpy(cpu_model, (char *)brand, sizeof(cpu_model));
+
+   /* Remove leading and duplicated spaces from cpu_model */
+   brandstr_from = brandstr_to = cpu_model;
skipspace = 1;
while (*brandstr_from != '\0') {
if (!skipspace || *brandstr_from != ' ') {
@@ -339,13 +335,8 @@ identifycpu(struct cpu_info *ci)
}
*brandstr_to = '\0';
 
-   if (mycpu_model[0] == 0)
-   strlcpy(mycpu_model, Opteron or Athlon 64,
-   sizeof(mycpu_model));
-
-   /* If primary cpu, fill in the global cpu_model used by sysctl */
-   if (ci-ci_flags  CPUF_PRIMARY)
-   strlcpy(cpu_model, mycpu_model, sizeof(cpu_model));
+   if (cpu_model[0] == 0)
+   strlcpy(cpu_model, Opteron or Athlon 64, sizeof(cpu_model));
 
ci-ci_family = (ci-ci_signature  8)  0x0f;
ci-ci_model = (ci-ci_signature  4)  0x0f;
@@ -360,16 +351,13 @@ identifycpu(struct cpu_info *ci)
 
amd_cpu_cacheinfo(ci);
 
-   printf(%s: %s, ci-ci_dev-dv_xname, mycpu_model);
+   printf(%s: %s, ci-ci_dev-dv_xname, cpu_model);
 
if (ci-ci_tsc_freq != 0)
printf(, %lu.%02lu MHz, (ci-ci_tsc_freq + 4999) / 100,
((ci-ci_tsc_freq + 4999) / 1) % 100);
-
-   if (ci-ci_flags  CPUF_PRIMARY) {
-   cpuspeed = (ci-ci_tsc_freq + 4999) / 100;
-   cpu_cpuspeed = cpu_amd64speed;
-   }
+   cpuspeed = (ci-ci_tsc_freq + 4999) / 100;
+   cpu_cpuspeed = cpu_amd64speed;
 
printf(\n%s: , ci-ci_dev-dv_xname);
 
@@ -395,25 +383,25 @@ identifycpu(struct cpu_info *ci)
x86_print_cacheinfo(ci);
 
 #ifndef SMALL_KERNEL
-   if (ci-ci_flags  CPUF_PRIMARY) {
-   if (pnfeatset  0x8007) {
-   CPUID(0x8007, dummy, dummy, dummy, pnfeatset);
+   if (pnfeatset  0x8007) {
+   CPUID(0x8007, dummy, dummy, dummy, pnfeatset);
 
-   if (pnfeatset  0x06) {
-   if ((ci-ci_signature  0xF00) == 0xf00)
-   setperf_setup = k8_powernow_init;
-   }
-   if (ci-ci_family = 0x10)
-   setperf_setup = k1x_init;
+   if (pnfeatset  0x06) {
+   if ((ci-ci_signature  0xF00) == 0xf00)
+   setperf_setup = k8_powernow_init;
}
+   if (ci-ci_family = 0x10)
+   setperf_setup = k1x_init;
+   }
 
-   if (cpu_ecxfeature  CPUIDECX_EST)
-   setperf_setup = est_init;
-
-   if (cpu_ecxfeature  CPUIDECX_AES)
-   amd64_has_aesni = 1;
+   if (cpu_ecxfeature  CPUIDECX_EST) {
+   setperf_setup = est_init;
}
-   

Re: OT: SSH not secure?

2012-05-09 Thread Christiano F. Haesbaert
On 9 May 2012 13:18, Kevin Chadwick ma1l1i...@yahoo.co.uk wrote:
 On Wed, 9 May 2012 17:42:09 +0200
 Martin SchrC6der wrote:

 It's only as secure as the local and/or remote machine.
 There's nothing SSH can do about that

 I have a bucket of water. Can anyone tell me why my hand gets wet if I
 put it inside the bucket.


That's because you need to buy AutoBucket.



Re: OT: SSH not secure?

2012-05-09 Thread Christiano F. Haesbaert
On 9 May 2012 14:59, Miod Vallat m...@online.fr wrote:
  It's only as secure as the local and/or remote machine.
  There's nothing SSH can do about that
 
  I have a bucket of water. Can anyone tell me why my hand gets wet if I
  put it inside the bucket.
 

 That's because you need to buy AutoBucket.

 And only AutoBucket can protect you against water temperature attacks.
 You don't want to risk burning your hand with hot water, do you?


Well noted, but that's only supported in AutoBucket Enterprise Edition.



Re: [ANN] portable cwm 5.1

2012-05-04 Thread Christiano F. Haesbaert
On Wed, May 02, 2012 at 02:37:21PM +0200, Christian Neukirchen wrote:
 Hello,
 
 today I'm proud to release the first public version of portable cwm 5.1.
 
 Portable cwm is a minor modification of the cwm version in OpenBSD CVS
 with a portable Makefile and a few compatibility features.  It has
 been built successfully on OpenBSD, NetBSD and Linux.
 
 This port requires pkg-config, Xft, Xinerama and Xrandr.  The included
 Makefile should work with both GNU make and BSD make.
 
 This version actively tracks changes in the OpenBSD CVS repository.
 Releases are roughly coordinated.
 
 http://chneukirchen.org/releases/cwm-5.1.tar.gz
 http://chneukirchen.org/releases/cwm-5.1.tar.gz.asc
 
 Enjoy,

Hi !

Thanks for the port, I had to tweak a bit to compile on an ancient
ubuntu 8.04, you may want the YYSTYLE_IS_DECLARED at least. 

diff -dpru /tmp/cwm-5.1/client.c /home/haesbaert/src/cwm-5.1/client.c
--- /tmp/cwm-5.1/client.c   2012-05-02 09:26:57.0 -0300
+++ /home/haesbaert/src/cwm-5.1/client.c2012-05-04 10:40:56.0 
-0300
@@ -24,6 +24,7 @@
 #include assert.h
 #include err.h
 #include errno.h
+#include limits.h
 #include stdlib.h
 #include string.h
 #include stdio.h
Only in /home/haesbaert/src/cwm-5.1: cscope.files
Only in /home/haesbaert/src/cwm-5.1: cscope.out
diff -dpru /tmp/cwm-5.1/parse.y /home/haesbaert/src/cwm-5.1/parse.y
--- /tmp/cwm-5.1/parse.y2012-05-02 09:26:57.0 -0300
+++ /home/haesbaert/src/cwm-5.1/parse.y 2012-05-04 10:47:41.0 -0300
@@ -21,6 +21,8 @@
 
 %{
 
+#define _GNU_SOURCE
+
 #include sys/param.h
 #include sys/queue.h
 
@@ -35,6 +37,8 @@
 
 #include calmwm.h
 
+#define YYSTYPE_IS_DECLARED
+
 TAILQ_HEAD(files, file) files = TAILQ_HEAD_INITIALIZER(files);
 static struct file {
TAILQ_ENTRY(file)entry;
diff -dpru /tmp/cwm-5.1/strtonum.c /home/haesbaert/src/cwm-5.1/strtonum.c
--- /tmp/cwm-5.1/strtonum.c 2012-05-02 09:26:57.0 -0300
+++ /home/haesbaert/src/cwm-5.1/strtonum.c  2012-05-04 10:46:26.0 
-0300
@@ -21,8 +21,10 @@
 
 #ifndef HAVE_STRTONUM
 #include stdlib.h
-#include limits.h
 #include errno.h
+#define __USE_ISOC99
+#include limits.h
+
 
 #define INVALID1
 #define TOOSMALL   2



Re: Router project on OpenBSD questions

2012-02-29 Thread Christiano F. Haesbaert
On 29 February 2012 14:15, Anonymous Remailer (austria)
mixmas...@remailer.privacy.at wrote:
 Brauer spewed:

 * Patrick Lamaiziere patf...@davenulle.org [2012-02-29 13:12]:
  I don't think.

 it is very tempting to comment on that :)

  As far I can see here with a rate of 50K packets through the system, it
  already spents 50% in interrupt.

 oh, really! that applies to each and every box and usage scenario on
 the planet of course. details just complicate things.

 What a surprise, another 100% noise level post from Henning. For a smart guy
 you sure have alot of free time. Maybe you ought to be designing and coding
 more and flaming less huh buddy?


What a surprise, another anonymous shithead who has nothing to add to
a conversation.



Re: Router project on OpenBSD questions

2012-02-27 Thread Christiano F. Haesbaert
On 27 February 2012 16:38, Kaya Saman kayasa...@gmail.com wrote:
 Hi,

 this is my first posting here :-)


 I have currently only used OpenBSD as a test vector setup on VirtualBox
 and 2x Sun Fire V240's as a DNS server (master/slave) using Bind9. So
 basically in short am an OpenBSD newbee :-)


 Ok so here goes;

 I've been using FreeBSD for around 3+ years now and really enjoy it, in
 comparing OpenBSD to FreeBSD I first would like to get some user
 experience of the major advantages over it. From my reading it's meant
 to be more secure, from my (vastly) limited experience it's quite
 different to work with then FreeBSD.
 -Could anyone give me any summarized answers to compare the two?


 Now here comes the major project

 For the last past 4 years or so I've been hosting various OpenSource
 projects from home and have a setup similar to the OpenBSD rack pics on
 the openbsd.org site :-)

 To fill the role of router I have used till now, a Cisco 857, 877, and
 1801 all of who's power I've managed to max out!! :-(

 As a qualified Cisco engineer but also budding UNIX engineer/enthusiast
 I've come to understand that Cisco boxes are underpowered and
 overpriced Graphing the Cisco's using SNMP and RRD tools using
 Cacti, the CPU's tend to max-out after the TCP/IP flows start reaching
 1000+ and so goes the memory too. Then I loose all kind of connectivity
 as the router either crashes or becomes unstable.

 So I would like to build a router out of a Quad Core Xeon system. I've
 selected the hardware for it already and the software barring the base OS.


You want the highest cache and highest frequency cpu you can find.
MP will not help you with routing performance at all.


 The hardware will run a socket 1366 Xeon using a Supermicro system
 board. (I'm sure this will be 100% compatible with OpenBSD or FreeBSD
 whichever I chose)

 http://www.supermicro.nl/products/motherboard/Xeon3000/X58/X8SAX.cfm


 Additionally I would like to run a 5.25 LCD in the chassis front to
 monitor on the fly system output using Lcdproc - this is available on
 FreeBSD using ports but not sure about OpenBSD though I'm sure can be
 easily compiled if necessary.

 Something like the PicoLCD from Mini-Box or Matrix-Orbital displays or
 similar. --actually I think VFD's are kinda cool but need to find a
 5.25 one :-)

 I also would like to know if anyone knows of any ADSL2+ Annex M standard
 PCI (/x/) based modem card that I can use to connect to my ISP with
 instead of using an external device?

 So far in my search I came across this:

 http://linitx.com/viewcategory.php?catid=47

 Of which manufacturers seem to be:

 http://www.rocksolidelectronics.com/pages/products.php


 Are these going to be OpenBSD compatible or are there others???


 Does anyone know of a VDSL2 solution like this also?



 For software I plan to use Quagga/Zebra which should be in the ports or
 compatible easily coupled with NAT, ACL's, Firewall using PF or so


In OpenBSD there are actually usable routing daemons, OpenBGPD,
OpenRIPD and OpenOSPFD.


 In this case comparing FreeBSD, what's OpenBSD's performance like for
 Firewall/IDS/IPS systems??


That's something only you can test, there are tons of variables in place here.


 Is OpenBSD compatible with Cisco VTP and STP to trunk VLANs to Cisco
 switches?


I'm not familiar with VTP, the rest will be fine.



 I did discover this already:

 http://fengnet.com/book/icuna/ch05lev1sec5.html

 so it would seem so, however I do not know if link-aggregation would
 work?? As in Cisco Etherchannel to multiple ports on the router.


Yep, trunk will work fine with a cisco.

 There are many more questions I have but will refrain from asking at
 this phase as most of them can be got round by researching; like Cisco
 IPSEC/GRE VPN compatibility et el.


 i think am just worried about the ADSL2 modem card mainly as most of the
 above can be got over with testing and trying things out :-)


 It's just a pain that a Cisco 2901 for example as claimed by Cisco can
 only route at 75Mbps (ok routing uses PPS but wirespeed is not available
 unless going carrier grade). Especially now that companies are slowly
 starting to release Residential Fiber networks upto 1Gbps... would
 render the Cisco's maxed-out power wise.


With a decent hardware, I think you can reach 1mpps (that's million
packets per second).



 I know there are a lot of questions here but am hoping that some of them
 can be answered or at least advise given pre-testing :-)


 Many thanks and best regards,


 Kaya


Good luck



Re: Router project on OpenBSD questions

2012-02-27 Thread Christiano F. Haesbaert
On 27 February 2012 17:12, Kaya Saman kayasa...@gmail.com wrote:


 So I would like to build a router out of a Quad Core Xeon system. I've
 selected the hardware for it already and the software barring the base OS.


 You want the highest cache and highest frequency cpu you can find.
 MP will not help you with routing performance at all.



 Something like this:

 http://ark.intel.com/products/53580/Intel-Xeon-Processor-E7-8870-%2830M-Cache-2_40-GHz-6_40-GTs-Intel-QPI%29

 30MB cache @ 2.4GHz


 However this does raise the question, 32bit or 64bit??? And what would be

amd64, wow I had no idea such cpu was out already, I'm not sure if
anyone ever tried running openbsd on such cpu.

 the benefit for having multi CPU sockets or cores???


Almost none for routing purposes, the kernel is big locked and all
interrupts go to cpu0, so this basically means: You'll be routing
packets on cpu0 *only*.

But you'll get the benefit of of having the userland processes running
on multiple cpus, so if you're basically routing/filtering with pf, MP
won't make much difference.

 --I mean for an integrated Firewall/router yes one can offload processes and
 threads per core or socket

Userland process will benefit from MP when running in userland,
they'll get the biglock when doing a system call. You only have one
process running in kernel land at-a-time.


 With this though I'm betting that a Core2Quad Q8400s CPU (which I currently
 run on a FreeBSD based Mini-NAS mainframe) will be more powerful then any
 Cisco SMB based router? - I can see it being more powerful then my 8xx or
 18xx series in anycase!


I don't know cisco, it's all about how much data you need to route.
But if you were concerned about 75mbps, even my sun ultra 5 400mhz can
do more than that.

Do the math, I'd guess you can do *at least* 300mpps with any fairly
modern cpu.
Now do 300mpps * 1500bytes, that's your throughput for full sized packets.


You may want to read this:

http://www.undeadly.org/cgi?action=articlesid=2011101406


 Most DIY/Linux router boxes all seem to run Mini-ITX hardware on Intel ATOMs
 or VIA processors or Vyatta running standard x86 Multi-core architecture for
 their appliances; how does this relate to the equation?


Those are very weak processors, again, it's all about how much pps you need.



Re: network throughput tool suggestion

2012-02-14 Thread Christiano F. Haesbaert
On 14 February 2012 17:59, Mihai Popescu mihp...@gmail.com wrote:
 Hi,

 I need to test a commercial router for throughtput and I decided to
 put it between 2 OpenBSD systems running network benchmark software.
 Looking on openports.se I found iperf, netperf and ttcp. Could you
 suggest one from them, based on your experience, please ?

 Thanks.


We have tcpbench in base, that's what most devs use.



Re: Bad Checksum on i386-current

2012-02-11 Thread Christiano F. Haesbaert
On 11 February 2012 11:00, Tomas Bodzar tomas.bod...@gmail.com wrote:
 On Sat, Feb 11, 2012 at 12:43 PM, Insan Praja SW insan.pr...@gmail.com
 wrote:
 Hi Misc@,

 Could someone elaborate me with this tcpdump I had? After nat-ing,
checksum
 error shows, on the same packet..

 rule 173.home.8/(match) [uid 0, pid 9731] pass in on vlan516:
 172.16.33.254.64264  188.255.110.14.51413: S [tcp sum ok]
 260322197:260322197(0) win 8192 mss 1436,nop,nop,sackOK [tos 0x28] (ttl
 126, id 5689, len 48)
 rule 173.home.13/(match) [uid 0, pid 9731] pass out on vlan500: [orig src
 172.16.33.254:64264, dst 188.255.110.14:51413] 202.90.195.234.59074 
 188.255.110.14.51413: S [bad tcp cksum f54!] 260322197:260322197(0) win
 8192
 mss 1436,nop,nop,sackOK [tos 0x28] (ttl 125, id 5689, len 48, bad cksum
 2d4b!)

 from man tcpdump

  IP Checksum Offload
 Some network cards support IP checksum offload.  Packet headers for
such
 interfaces erroneously indicate a bad checksum, since the checksum is
 not
 calculated until after tcpdump sees the packet.

 so maybe related to your case


I think that is not the case here, by default we do not enable em(4)
checksumming offload.

Just to make sure, can you give me the output of 'if config
em{0,1,2,3} hwfeatures' ?

I think pf is not recalculating the checksum after nating, not sure if
it should, henning ?



Re: Bad Checksum on i386-current

2012-02-11 Thread Christiano F. Haesbaert
On 11 February 2012 09:43, Insan Praja SW insan.pr...@gmail.com wrote:
 Hi Misc@,

 Could someone elaborate me with this tcpdump I had? After nat-ing, checksum
 error shows, on the same packet..

 rule 173.home.8/(match) [uid 0, pid 9731] pass in on vlan516:
 172.16.33.254.64264  188.255.110.14.51413: S [tcp sum ok]
 260322197:260322197(0) win 8192 mss 1436,nop,nop,sackOK [tos 0x28] (ttl
 126, id 5689, len 48)
 rule 173.home.13/(match) [uid 0, pid 9731] pass out on vlan500: [orig src
 172.16.33.254:64264, dst 188.255.110.14:51413] 202.90.195.234.59074 
 188.255.110.14.51413: S [bad tcp cksum f54!] 260322197:260322197(0) win 8192
 mss 1436,nop,nop,sackOK [tos 0x28] (ttl 125, id 5689, len 48, bad cksum
 2d4b!)


Obvious question I missed, do they reach the other host with wrong checksums ?



Re: should 'make -j8 build' work?

2012-02-07 Thread Christiano F. Haesbaert
You can still use -j8 while building the kernel though, no races there.



Re: looking for hardware recommendations, x86 or otherwise.

2012-02-02 Thread Christiano F. Haesbaert
These days we have cheap good low power intels. The pentium core g620t for
instance idles at less than 25w. If you want to go cheaper, amd brazos is
nice too but not so power effective.
 On Feb 2, 2012 1:02 AM, Lars nore...@z505.com wrote:

  https://en.wikipedia.org/wiki/Raspberry_Pi
 
  It's called viral marketing, PR, social crap whatever. Raspberry Pi
  foundation claims something about support for schools and
  blahblahblah, but in fact was created but one of engineers of
  Broadcom. It's just test bed for their proprietary crap or vendor lock
  in via children and a way how to lower taxes via charity organization
  without real charity.
 
 


 What's so funny is that they put GNU/Linux on it, when gNU is supposed to
 be about FREE dom. LOL. Fucking LOL.

 I think Raspberry Pi isn't so useful for my needs anyway because for
 example it only has one network port, not two or three...

 For poor people in third world countries I think they would be better off
 buying used 1ghz-2ghz Desktop computers for $50/each that includes PCI
 slots and such. I've purchased some computers less than 50 dollars. The
 only advantage of the raspberry pi over a used desktop PC is that it uses
 much less power (1 Watt or whatever) and that it is really small. I don't
 see how a small tiny circuit will help third world countries but I can see
 an advantage to 1 watt electricity.



Re: 5.1-beta compiler warning confuses me

2012-01-26 Thread Christiano F. Haesbaert
On 26 January 2012 15:20, Peter J. Philipp p...@centroid.eu wrote:
 Hi,

 I have a vm that I upgraded to 5.1-beta last week some time.  One of my
 software's is getting a compiler warning now that it didn't get in 5.0.

 ---
 cc -Wall -g  -I/usr/local/include/db4   -c reply.c
 reply.c: In function 'create_anyreply':
 reply.c:2975: warning: array size (2) smaller than bound length (4)
 reply.c:2975: warning: array size (2) smaller than bound length (4)
 cc -Wall -g  -I/usr/local/include/db4   -c additional.c
 ---

 The line of code looks like this:

 ---
memcpy((char *)answer-rdata, (char *)sd-a[pos++ %
mo
 d],
sizeof(in_addr_t));
 ---

 The entire file can be found at sourceforge cvs repo here:


http://wildcarddns.cvs.sourceforge.net/viewvc/wildcarddns/wildcarddnsd/reply.
c?view=log

 What could cause this?  And how do I fix my code to get rid of this
warning?

 Thanks for any help,

 -peter


You forgot the definition of answer{}
struct answer {
char name[2];
u_int16_t type;
u_int16_t class;
u_int32_t ttl;
u_int16_t rdlength;  /* 12 */
char rdata; /* 12 + 16 */
} __attribute__((packed));


The thing is that GCC knows rdata is 1 byte long, you're doing the
magic here if I'm correct:

/* skip dns header, question name, qtype and qclass */
answer = (struct answer *)(reply[0] + sizeof(struct dns_header) +
q-hdr-namelen + 4);

You can remove the __attribute__((packed)) and turn rdata into char
rdata[].
Or just get a pointer past sizeof(answer).



Re: OpenBSD 5.0 Snapshot: ASUS Wireless Card - Not Configured

2012-01-09 Thread Christiano F. Haesbaert
On 9 January 2012 02:21, Steven w.steven.schnei...@ualberta.net wrote:
 * Jonathan Gray j...@openbsd.org [120108 08:00]:

 On Sat, Jan 07, 2012 at 10:29:06PM -0700, Steven wrote:

 Hi,

 I recently purchased an ASUS PCE-N15 Wireless-N PCI-E Adapter.

 http://www.asus.com/Networks/Wireless_Adapters/PCEN15/

 After i installed it and restarted my computer I got this in the
 dmesg (I'm assuming this is the ASUS adapter as it's the only new
 device message I noticed in the logs. I'll include the full dmesg so
 more knowledgeable minds can figure it out.)

 pci2 at ppb1 bus 2
 vendor Realtek, unknown product 0x8178 (class network subclass
 miscellaneous, rev 0x01) at pci2 dev 0 function 0 not configured

 It looks to be a half card and so I'm worried that I may have bought
 a win-device. Is this ASUS Adapter supported by OpenBSD, do I have a
 bad card, or is this a win-device?


 The only PCI based Realtek wireless that will work at the moment are the
 old
 802.11b RTL8180 devices.  In theory the register layout is largely the
 same
 as some of the USB based Realtek devices but there isn't a driver just
 yet.

 IC. Any recommendations for a good replacement wireless card?  I've
 read the list on the FAQ, but my experience in wireless cards is
 (besides the ASUS card) practically nil.

 Should I just hang on to the ASUS and see what happens with
 subsequent snapshots?

 Of course, I could just do both


ral(4) is usually a good recommendation, they're cheap and work well.



Re: TCO, txpause, rxpause and other nice things on em adapters

2012-01-01 Thread Christiano F. Haesbaert
Not all em have the same features, the hwfeatures option to ifconfig was
added after.the 50 release
On Jan 1, 2012 2:09 PM, PP;QQ P(P8P?P8QP8P= chipits...@gmail.com
wrote:

 Hello!

 I'm running servers with em NICs.  People on list reported things
 like

hwfeatures=8037CSUM_IPv4,CSUM_TCPv4,CSUM_UDPv4,VLAN_MTU,VLAN_HWTAGGING,WOL
,
 I do not see such options in ifconfig output. neither man page on em
 says anything about check sum offload.


 em are advanced cards, do they already do all things out of a box?
 do I have to make special tuning for TCO ?

 ifconfig also shows media: Ethernet autoselect (1000baseT
 full-duplex,rxpause,txpause), what is rxpause,txpause ?


 cheers,
 Ilya Shipitsin



Re: Packet drop because of invalid IP checksum on Soerkis / vr / ral

2011-12-28 Thread Christiano F. Haesbaert
Just to let you know, this diff fixes 
http://marc.info/?l=openbsd-miscm=132391433319512w=2
So I've hopes it will work for you.

On Mon, Dec 26, 2011 at 08:41:54PM -0200, Christiano F. Haesbaert wrote:
 On Thu, Dec 01, 2011 at 11:51:18PM -0200, Christiano F. Haesbaert wrote:
  I think I've found the problem.
  
  when a packet comes from ral0 --- 10.0.0.1, the bridge changes the
  received interface to vr0, which has IFCAP_CSUM_IPv4.
  
  So when the icmp layer is about to test the checksum, it assumes the
  output interface is the same one which the packet came in (in our
  case, vr0, and not ral0). So the checksum does not get calculated.
  
  That's why it works when we remove the capabilities from vr0.
 
 Hi again,
 
 Could you try the following diff ?
 Please remember to undo the modifications of the previous diff.
 
 The thing is in_proto_cksum_out() correctly escapes hw checksumming if
 the interface is a member of a bridge, the same should be done for ip
 checksums.
 
 Index: ip_output.c
 ===
 RCS file: /cvs/src/sys/netinet/ip_output.c,v
 retrieving revision 1.224
 diff -d -u -p -w -r1.224 ip_output.c
 --- ip_output.c   2 Dec 2011 03:15:31 -   1.224
 +++ ip_output.c   26 Dec 2011 22:22:34 -
 @@ -746,7 +746,8 @@ sendit:
*/
   if (ntohs(ip-ip_len) = mtu) {
   ip-ip_sum = 0;
 - if ((ifp-if_capabilities  IFCAP_CSUM_IPv4)) {
 + if ((ifp-if_capabilities  IFCAP_CSUM_IPv4) 
 + (ifp-if_bridge == NULL)) {
   m-m_pkthdr.csum_flags |= M_IPV4_CSUM_OUT;
   ipstat.ips_outhwcsum++;
   } else
 @@ -892,7 +893,8 @@ ip_fragment(struct mbuf *m, struct ifnet
   mhip-ip_off = htons((u_int16_t)mhip-ip_off);
   mhip-ip_sum = 0;
   if ((ifp != NULL) 
 - (ifp-if_capabilities  IFCAP_CSUM_IPv4)) {
 + (ifp-if_capabilities  IFCAP_CSUM_IPv4) 
 + (ifp-if_bridge == NULL)) {
   m-m_pkthdr.csum_flags |= M_IPV4_CSUM_OUT;
   ipstat.ips_outhwcsum++;
   } else
 @@ -911,7 +913,8 @@ ip_fragment(struct mbuf *m, struct ifnet
   ip-ip_off |= htons(IP_MF);
   ip-ip_sum = 0;
   if ((ifp != NULL) 
 - (ifp-if_capabilities  IFCAP_CSUM_IPv4)) {
 + (ifp-if_capabilities  IFCAP_CSUM_IPv4) 
 + (ifp-if_bridge == NULL)) {
   m-m_pkthdr.csum_flags |= M_IPV4_CSUM_OUT;
   ipstat.ips_outhwcsum++;
   } else



Re: OpenVPN issues on 5.0

2011-12-28 Thread Christiano F. Haesbaert
On Mon, Dec 26, 2011 at 08:57:18PM -0200, Christiano F. Haesbaert wrote:
 On Sun, Dec 25, 2011 at 04:10:19PM +0100, Erling Westenvik wrote:
  On Sat, Dec 24, 2011 at 07:50:53PM -0200, Christiano F. Haesbaert wrote:
   
   Heya,
   
   can you paste me the output of:
   
   ifconfig acx0 hwfeatures
   ifconfig url0 hwfeatures
   
  
  Sorry, but I'm not on -current. Are there other ways to display such
  information?
  
 
 Not like this, but I think I found your problem, could you please try
 the following diff: 
 
 http://article.gmane.org/gmane.os.openbsd.misc/192013
 
 If you have any problems applying it, please report to me off list. 

The diff fixes Erling's problem :).



Re: Packet drop because of invalid IP checksum on Soerkis / vr / ral

2011-12-26 Thread Christiano F. Haesbaert
On Thu, Dec 01, 2011 at 11:51:18PM -0200, Christiano F. Haesbaert wrote:
 I think I've found the problem.
 
 when a packet comes from ral0 --- 10.0.0.1, the bridge changes the
 received interface to vr0, which has IFCAP_CSUM_IPv4.
 
 So when the icmp layer is about to test the checksum, it assumes the
 output interface is the same one which the packet came in (in our
 case, vr0, and not ral0). So the checksum does not get calculated.
 
 That's why it works when we remove the capabilities from vr0.

Hi again,

Could you try the following diff ?
Please remember to undo the modifications of the previous diff.

The thing is in_proto_cksum_out() correctly escapes hw checksumming if
the interface is a member of a bridge, the same should be done for ip
checksums.

Index: ip_output.c
===
RCS file: /cvs/src/sys/netinet/ip_output.c,v
retrieving revision 1.224
diff -d -u -p -w -r1.224 ip_output.c
--- ip_output.c 2 Dec 2011 03:15:31 -   1.224
+++ ip_output.c 26 Dec 2011 22:22:34 -
@@ -746,7 +746,8 @@ sendit:
 */
if (ntohs(ip-ip_len) = mtu) {
ip-ip_sum = 0;
-   if ((ifp-if_capabilities  IFCAP_CSUM_IPv4)) {
+   if ((ifp-if_capabilities  IFCAP_CSUM_IPv4) 
+   (ifp-if_bridge == NULL)) {
m-m_pkthdr.csum_flags |= M_IPV4_CSUM_OUT;
ipstat.ips_outhwcsum++;
} else
@@ -892,7 +893,8 @@ ip_fragment(struct mbuf *m, struct ifnet
mhip-ip_off = htons((u_int16_t)mhip-ip_off);
mhip-ip_sum = 0;
if ((ifp != NULL) 
-   (ifp-if_capabilities  IFCAP_CSUM_IPv4)) {
+   (ifp-if_capabilities  IFCAP_CSUM_IPv4) 
+   (ifp-if_bridge == NULL)) {
m-m_pkthdr.csum_flags |= M_IPV4_CSUM_OUT;
ipstat.ips_outhwcsum++;
} else
@@ -911,7 +913,8 @@ ip_fragment(struct mbuf *m, struct ifnet
ip-ip_off |= htons(IP_MF);
ip-ip_sum = 0;
if ((ifp != NULL) 
-   (ifp-if_capabilities  IFCAP_CSUM_IPv4)) {
+   (ifp-if_capabilities  IFCAP_CSUM_IPv4) 
+   (ifp-if_bridge == NULL)) {
m-m_pkthdr.csum_flags |= M_IPV4_CSUM_OUT;
ipstat.ips_outhwcsum++;
} else



Re: OpenVPN issues on 5.0

2011-12-26 Thread Christiano F. Haesbaert
On Sun, Dec 25, 2011 at 04:10:19PM +0100, Erling Westenvik wrote:
 On Sat, Dec 24, 2011 at 07:50:53PM -0200, Christiano F. Haesbaert wrote:
  
  Heya,
  
  can you paste me the output of:
  
  ifconfig acx0 hwfeatures
  ifconfig url0 hwfeatures
  
 
 Sorry, but I'm not on -current. Are there other ways to display such
 information?
 

Not like this, but I think I found your problem, could you please try
the following diff: 

http://article.gmane.org/gmane.os.openbsd.misc/192013

If you have any problems applying it, please report to me off list. 



Re: Automatic fsck -y at Boot

2011-12-19 Thread Christiano F. Haesbaert
On 19 December 2011 11:39, Rudolf Leitgeb rudolf.leit...@gmx.at wrote:
 Am Montag, 19. Dezember 2011, 13:52:40 schrieb Henning Brauer:
 gotta compromise for crippled systems. solvable with a little shell
 script run from cron and rc.shutdown.

 Wait: your solution would be to periodically remount some volume
 read/write, merge the changes and then drop back to ro ? You aren't
 serious, are you?


This is *exactly* what these devices do (I'm not guessing).
You don't want a cheap NAND flash with JFS2 mounted rw.

 for the scenario i had in mind - servers in some data center - that is
 the one solution.

 Agreed. Many posts ago, BTW, so why do you still bring it up? I specifically
 differentiated between devices that store and devices that do.
 Data center servers which have baby sitters in an office nearby don't
 need automagic thingies.

 I don't buy the countless at all, we're really only talking embedded
 here, and for embedded style use cases you'll have to adopt. that is
 the special case and not the norm.

 Embedded systems with configurable settings are a special case?
 Where were you during the last 10 years?

 while i was mostly talking about a console and not fsck -y, i do
 believe that an automagic fsck -y is pretty damn stupid.

 Guess what your home router does, and what (if you have one)
 your cell phone does? Also your car and your TV set? None of these
 drop you into a console after the 3rd power outage and people
 would laugh you out the door if you tried to sell such a product.

 while we're really good in that and fsck almost always succeeds and
 fixes things up i have seen different.

 And most likely the problems were not caused by fsck but by faulty
 hardware creating the mess to begin with. No serial console can fix
 faulty RAM chips, itchy power supplies or loose SATA cables, so it
 wouldn't help the proud owner of a do device one bit.

 As I have written before: I don't care whether the default install of OBSD
 comes with fsck -p or fsck -y, but calling people who suggest fsck -y
 in certain situations cheapskates and stupid shows blatant ignorance.



Re: Upgrading AMD64 4.9-stable to 5.0

2011-12-19 Thread Christiano F. Haesbaert
On 19 December 2011 16:02, Richard Thornton thornton.rich...@gmail.com
wrote:
 I upgraded my sun blade 100 from 4.9 to 5.0;  no issues but, it appears
 that the packages in 4.9 are not always upgradeable to those in 5.0 and
 most packages in 5.0 fail to install due to library dependencies.  one
 would assume all 5.0 packages are created using the dev tools from 5.0 but
 this does not seem to be true.  I do not have time to track down all these
 issues, so for me openbsd will always remain a fun toy, but no better.


Richard:
sun blade 100 is a sparc64 system, he was specifically asking for amd64.
You clearly have no idea what you're doing, and instead of learning
you go to public bashing, no one is forcing you to do anything, and
we've provided excellent documentation about the upgrade process.

What amazes me is that upgrading is one of best things about OpenBSD,
devs put a lot of effort into doing it right, and yet there are types
like who come and say whatever crap they feel like to.

I've started using OpenBSD in 4.2 and been upgrading since them. I
*never* had an issue.
There are a lot of people out there doing since much much much older
releases.

Insan:
As for the original question, no, you should have no problems. We all
run a bunch of amd64 machines and upgrade it constantly, if not daily.
Please report back if you have any troubles.



Re: Upgrading AMD64 4.9-stable to 5.0

2011-12-19 Thread Christiano F. Haesbaert
On 19 December 2011 16:20, Richard Thornton thornton.rich...@gmail.com
wrote:
 Do a simple clean 5.0 install.  One would assume any browser package in the
 packages folder would install. None do for me on sparc, but with a clean
 4.9 install all 4.9 packages install.  I am not a Unix specialist by any
 means but I do know how to type pkg_add .

So stop spreading lies and read the documentation before taxing things as
toy.



Re: Packet drop because of invalid IP checksum on Soerkis / vr / ral

2011-12-01 Thread Christiano F. Haesbaert
I think I've found the problem.

when a packet comes from ral0 --- 10.0.0.1, the bridge changes the
received interface to vr0, which has IFCAP_CSUM_IPv4.

So when the icmp layer is about to test the checksum, it assumes the
output interface is the same one which the packet came in (in our
case, vr0, and not ral0). So the checksum does not get calculated.

That's why it works when we remove the capabilities from vr0.



Re: Something similar to Soekris boards, for server applications

2011-11-30 Thread Christiano F. Haesbaert
On 30 November 2011 14:27, Sime Ramov s...@ramov.com wrote:
 Hello, I am looking for something in the spirit of Soekris boards, but
 more suited for server applications, e.g. for hosting Django apps.

 Current net6501 is maxed out at 2 GB of RAM and 1.6 Ghz *single-core*
 (two threads) atom.

 The reason I am considering Soekris is because dedicated servers are
 often underused and idling. Few GB of memory, anemic processor and SSD
 gets one a surprisingly long way, especially with properly chosen stack
 and caching.

 So the general idea is: one Django app = one Soekris board. This is much
 better than virtualization (bare metal forever) or putting more apps on
 a big server.

 Some apps would run great on this, but a more powerful CPU and more
 memory would be needed for more demanding workloads.

 Any recommendations for similar, but a bit more powerful and versatile
 hardware (think one app = one hardware device)? Thanks.



You may consider the new AMD E-350, the fusion ones, they're very
low-power and might suit you.
They're very, very cheap, I've never used them, but sounds a better
alternative than the atom.



Re: Packet drop because of invalid IP checksum on Soerkis / vr / ral

2011-11-27 Thread Christiano F. Haesbaert
On Sun, Nov 27, 2011 at 12:35:23PM +0100, Pieter Verberne wrote:
 On Sun, 27 Nov 2011 00:50:21 -0200, Christiano F. Haesbaert wrote:
 On Sat, Nov 26, 2011 at 10:37:10PM +0100, Pieter Verberne wrote:
 Hello,
 
 I configured my Soekris net5501 as a switch and access point. I
 briged all four vr(4) devices and ral0. vr0 (10.0.0.1) is connected
 to the router. ral0 is configured as an access point.
 
 This is the configuration I want. An access point with no IP
 address.
 
 $ cat /etc/hostname.ral0
 mediaopt hostap nwid [ssid] wpa wpaprotos wpa2 wpaakms psk
 wpakey [key]
 up
 
 However, I cannot ping to 10.0.0.1 from another computer (10.0.0.37)
 attached to ral0 . Wireshark on 10.0.0.37 shows both a echo request
 and reply, but the reply packet has an IP header checksum of 0x
 and the packet is dropped. This is probably because of checksum
 offloading done by vr(4) .
 
 How to handle this?
 
  Pieter Verberne
 
 The following configuration does work. For some reason, nfs (sunrpc)
 is only listening on 10.0.0.80 and not on 10.0.0.1 .
 
 
 Hi,
 
 Can you try this ?
 
 also, the output of ifconfig vr0 hwfeatures (if you're in current)
 is useful.
 
 Index: if_vr.c
 ===
 RCS file: /cvs/src/sys/dev/pci/if_vr.c,v
 retrieving revision 1.111
 diff -d -u -p -b -r1.111 if_vr.c
 --- if_vr.c  22 Jun 2011 16:44:27 -  1.111
 +++ if_vr.c  27 Nov 2011 02:45:35 -
 @@ -643,9 +643,11 @@ vr_attach(struct device *parent, struct
  bcopy(sc-sc_dev.dv_xname, ifp-if_xname, IFNAMSIZ);
 
  ifp-if_capabilities |= IFCAP_VLAN_MTU;
 +#if 0
  if (sc-vr_quirks  VR_Q_CSUM)
  ifp-if_capabilities |= IFCAP_CSUM_IPv4|IFCAP_CSUM_TCPv4|
  IFCAP_CSUM_UDPv4;
 +#endif
  #ifndef SMALL_KERNEL
  if (sc-vr_revid = REV_ID_VT3065_A) {
  ifp-if_capabilities |= IFCAP_WOL;
 
 Awesome. I just applied my first patch, and compiled my first kernel.
 (I don't code) And it is working now :-D (with the following
 configuration:)
 

Cool ! be ready for more then :-).

 $ cat /etc/hostname.ral0
 mediaopt hostap nwid [ssid] wpa wpaprotos wpa2 wpaakms psk wpakey [key]
 up
 
 I'm running 5.0 stable so `ifconfig vr0 hwfeatures' doesn't work. So
 are you
 now trying to fix this for the next release? Or should I just save
 this patch?
 

I'll come up with the correct fix, this is just to confirm our initial
assumption. 

I'll send it to you as I don't have a vr(4) to test.



Re: Packet drop because of invalid IP checksum on Soerkis / vr / ral

2011-11-26 Thread Christiano F. Haesbaert
On Sat, Nov 26, 2011 at 10:37:10PM +0100, Pieter Verberne wrote:
 Hello,
 
 I configured my Soekris net5501 as a switch and access point. I
 briged all four vr(4) devices and ral0. vr0 (10.0.0.1) is connected
 to the router. ral0 is configured as an access point.
 
 This is the configuration I want. An access point with no IP address.
 
 $ cat /etc/hostname.ral0
 mediaopt hostap nwid [ssid] wpa wpaprotos wpa2 wpaakms psk wpakey [key]
 up
 
 However, I cannot ping to 10.0.0.1 from another computer (10.0.0.37)
 attached to ral0 . Wireshark on 10.0.0.37 shows both a echo request
 and reply, but the reply packet has an IP header checksum of 0x
 and the packet is dropped. This is probably because of checksum
 offloading done by vr(4) .
 
 How to handle this?
 
  Pieter Verberne
 
 The following configuration does work. For some reason, nfs (sunrpc)
 is only listening on 10.0.0.80 and not on 10.0.0.1 .
 

Hi,

Can you try this ?

also, the output of ifconfig vr0 hwfeatures (if you're in current) is useful.

Index: if_vr.c
===
RCS file: /cvs/src/sys/dev/pci/if_vr.c,v
retrieving revision 1.111
diff -d -u -p -b -r1.111 if_vr.c
--- if_vr.c 22 Jun 2011 16:44:27 -  1.111
+++ if_vr.c 27 Nov 2011 02:45:35 -
@@ -643,9 +643,11 @@ vr_attach(struct device *parent, struct 
bcopy(sc-sc_dev.dv_xname, ifp-if_xname, IFNAMSIZ);
 
ifp-if_capabilities |= IFCAP_VLAN_MTU;
+#if 0  
if (sc-vr_quirks  VR_Q_CSUM)
ifp-if_capabilities |= IFCAP_CSUM_IPv4|IFCAP_CSUM_TCPv4|
IFCAP_CSUM_UDPv4;
+#endif
 #ifndef SMALL_KERNEL
if (sc-vr_revid = REV_ID_VT3065_A) {
ifp-if_capabilities |= IFCAP_WOL;



Re: Kernel without INET6 error on pipex.c

2011-11-24 Thread Christiano F. Haesbaert
On 24 November 2011 10:59, Bret S. Lambert bret.lamb...@gmail.com wrote:
 On Thu, Nov 24, 2011 at 12:20:29PM +, Kevin Chadwick wrote:
 On Thu, 24 Nov 2011 22:12:10 +1100
 Rod Whitworth wrote:

  You are the only one who knows exactly what you did.  Maybe.
  Why should we waste time guessing?
 
  It's a pretty damn stupid thing to do anyway when it is so easy to
  block v6 traffic using GENERIC and, BTW, your kernel is NOT GENERIC.
  It doesn't matter that you were too ignorant to change the name...


 It may well not be worth the effort to fix if it is broken, especially
 considering the difficulties IPV6 has brought. Have you tried

 diff or GTFO

 current out of interest. IPV6 commenting has broken the build before
 assuming that is the single thing that was changed and it builds now
 when uncommented. I completely disagree with damn stupid, it is
 obviously the most reliable method to disable ipv6 and the archives
 (ppp) add weight to this.

 You should ALWAYS /bin/cp -p GENERIC to a new file if you make changes
 though, that could waste a lot of devs precious time.



Is there any point in keeping INET6 as removable option ?
Can't we just get rid of all the #ifdef INET6 goo ?



Re: Giving java apps more memory

2011-11-22 Thread Christiano F. Haesbaert
On 19 November 2011 02:27, John Tate j...@johntate.org wrote:
 Is this information helpful...

 john@rothbard ~$ ulimit -a
 core file size  (blocks, -c) unlimited
 data seg size   (kbytes, -d) 524288
 file size   (blocks, -f) unlimited
 max locked memory   (kbytes, -l) 1354329
 max memory size (kbytes, -m) 4059940
 open files  (-n) 128
 pipe size(512 bytes, -p) 1
 stack size  (kbytes, -s) 4096
 cpu time   (seconds, -t) unlimited
 max user processes  (-u) 128
 virtual memory  (kbytes, -v) 528384

 I need to change this one in login.conf or in my .profile...
 max memory size (kbytes, -m) 4059940

 There is no manpage for ulimit.


That's cause it is a shell built-in, so its manpage is in ksh(1):
you can always try:
elendil:haesbaert: type ulimit
ulimit is a shell builtin



Re: shift+backspace in X

2011-11-01 Thread Christiano F. Haesbaert
On Tue, Nov 01, 2011 at 05:12:47PM +, Stuart Henderson wrote:
 In X, shift + backspace used to work the same as backspace on its own
 (i.e. delete the previous character), but no longer does so in recent
 -current, most likely following the xkb update.
 
 Does anyone know how to restore the previous behaviour?
 
 I don't have any keyboard-related sections in xorg.conf (only
 a Files section with some old font paths).

This works for me:

Section ServerFlags
Option DontZap false
EndSection



Re: USB mouse

2011-10-26 Thread Christiano F. Haesbaert
On 26 October 2011 20:52, Zantgo zan...@gmail.com wrote:
 How I can run USB mouse?

 Zantgo



It should work just by plugging it, have you tried ?



Re: USB mouse

2011-10-26 Thread Christiano F. Haesbaert
On 26 October 2011 22:13, Zantgo zan...@gmail.com wrote:
 oh, then it is true, you can get drivers and programs from other operating 
 system, there is some documentation on this?

No, they're messing with you.

 PD: Yeah, try putting the mouse but nothing :(


I hope you were in X ? you don't want mouse in the console do you ?

You have to paste the output of dmesg and usbdevs before people start
considering helping you, until then you're just wasting everybody's
time.
All your mails lack information, you don't say what you are trying to
do, what you already did, what worked, what didn't work.
Then you provide no dmesg, and no other output which may convince
someone to take you seriously.

This is not the first mail people tell you that.
Have in mind, you're doing everything to convince people *not* to pay
attention to you.



Re: vlan and pf

2011-10-20 Thread Christiano F. Haesbaert
On 20 October 2011 11:38, Friedrich Locke friedrich.lo...@gmail.com wrote:
 Hi folks,

 does openbsd firewall handle vlan interfaces ?

 Thanks in advance.

 []s,

 Gustavo



It does, inbound packets will do something like:

--- vlan4 --- em0 --- stack

outbound:

stack --- em0 --- vlan4



Re: Routerboard 450G

2011-10-17 Thread Christiano F. Haesbaert
On 17 October 2011 16:26, James Shupe jsh...@osre.org wrote:
 Has anybody successfully installed and tested OpenBSD on a Routerboard
 450G? I searched the archive for a dmesg and/ or confirmation, but
 couldn't find a definitive answer.

 http://routerboard.com/RB450G


Probably no, there is some support for the power pc router boards (arch socppc).



Re: How to enable IP/TCP checksumming in software?

2011-10-16 Thread Christiano F. Haesbaert
On Sun, Oct 16, 2011 at 02:41:08PM +0800, Samuel Kidman wrote:
 On 16/10/2011 12:21 PM, Christiano F. Haesbaert wrote:
 On Sat, Oct 15, 2011 at 06:08:50PM +0800, Samuel Kidman wrote:
 Hello
 
 I have just installed OpenBSD on a hobby server. All is going well
 except I have hit a pretty major stumbling block in that I
 can't get my network configuration working. I have assigned a static
 IPv4 address to the server, and I tried pinging my
 desktop computer. I opened up a packet sniffer on my desktop and I
 can see the packets coming in from the server,
 however the IP checksums are all set to 0. I read in the release
 notes that OpenBSD will set the checksum to zero before
 passing the packet to hardware to perform the checksum operation.
 This obviously isn't working on my system, so I was
 wondering how to get it working, or how to just get it done in software?
 
 I am using the re (realtek ethernet) driver.
 
 Regards, Sam
 Yes, re(4) has csum offloading:
  
  hwfeatures=8037CSUM_IPv4,CSUM_TCPv4,CSUM_UDPv4,VLAN_MTU,VLAN_HWTAGGING,WOL
 
 Are you running current ?
 Can you paste a dmesg ?
 It's difficult to post the whole thing with no network connection. I
 am writing down what is on screen with a pen and then typing that
 into e-mails on my desktop. Here are the lines I thought were most
 relevant from dmesg, I can get others if you wish:
 
 first line:
 OpenBSD 4.9 (GENERIC) #671: Wed Mar 2 07:09:00 MST 2011
 
 re0 line:
 re0 at pci2 dev0 function0 Realtek 8168 rev 0x06: unknown ASIC
 (0x2c80), apic 2 int 16 (irq 10), address ff:ff:ff:ff:ff:ff
 
 
 There was a bug in 4.8 I believe, maybe it snapped into 4.9, I can't
 remember.
 
 The thing is you can't enable checksumming in software, and you
 shouldn't, if you're re(4) for some reason can't do offload
 checksumming, we should be able to detect and disable.
 
 By now we enable hw checksumming for all re(4):
 sys/dev/ic/re.c:1133
  ifp-if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_IPv4 |
 IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4;
 
 

Run current and it will work.



Re: How to enable IP/TCP checksumming in software?

2011-10-15 Thread Christiano F. Haesbaert
On Sat, Oct 15, 2011 at 06:08:50PM +0800, Samuel Kidman wrote:
 Hello
 
 I have just installed OpenBSD on a hobby server. All is going well
 except I have hit a pretty major stumbling block in that I
 can't get my network configuration working. I have assigned a static
 IPv4 address to the server, and I tried pinging my
 desktop computer. I opened up a packet sniffer on my desktop and I
 can see the packets coming in from the server,
 however the IP checksums are all set to 0. I read in the release
 notes that OpenBSD will set the checksum to zero before
 passing the packet to hardware to perform the checksum operation.
 This obviously isn't working on my system, so I was
 wondering how to get it working, or how to just get it done in software?
 
 I am using the re (realtek ethernet) driver.
 
 Regards, Sam

Yes, re(4) has csum offloading:

hwfeatures=8037CSUM_IPv4,CSUM_TCPv4,CSUM_UDPv4,VLAN_MTU,VLAN_HWTAGGING,WOL

Are you running current ?
Can you paste a dmesg ?

There was a bug in 4.8 I believe, maybe it snapped into 4.9, I can't
remember. 

The thing is you can't enable checksumming in software, and you
shouldn't, if you're re(4) for some reason can't do offload
checksumming, we should be able to detect and disable. 

By now we enable hw checksumming for all re(4):
sys/dev/ic/re.c:1133
ifp-if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_IPv4 |
   IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4;



Re: SATA RAID card suggestions?

2011-10-14 Thread Christiano F. Haesbaert
On 14 October 2011 05:25, Stuart Henderson s...@spacehopper.org wrote:
 On 2011-10-13, Christiano F. Haesbaert haesba...@haesbaert.org wrote:
 On 13 October 2011 17:45, Timothy Baldock t...@entropy.me.uk wrote:
 I'd recommend the Areca cards, they are expensive but worth the money IMO


 I see, and I agree, but have in mind I pay around 100% taxes :(.



 How important is raid5? The simpler raid1 mpi(4) / mpii(4) cards
 are much cheaper, and raid1 is easier to get your data out of when
 the card blows up...


Starting to get less important, I wanted to have a 4x1.5tb storage
using raid5, but with the money I'd spent I can get a cheaper raid1
and more disks, or just more disks and forget about raid.
The price I'd pay for an Areca gives me more 3x1.5tb disks.

 Don't get hung up on looking for a controller with the word sata
 in the name, the sas controllers are generally fine with sata drives,
 there are various HP/Dell/LSI SAS controllers that will work fine,
 some of which are quite easily ebay'able.

I had a look on the lsi megaraid 83XX, they're more affordable, I'll
see what I can get.

 Make sure you get cables, they don't always come with the card
 (even new ones).



Thanks



Re: Dennis Ritchie

2011-10-13 Thread Christiano F. Haesbaert
On 13 October 2011 07:14, David Coppa dco...@gmail.com wrote:
 Today is a sad sad day :(

 Rest in Peace.
 Without you, we would never be here.

 Cheers,
 David



Rest in Peace, the father of all.



Re: Dennis Ritchie

2011-10-13 Thread Christiano F. Haesbaert
On 13 October 2011 14:57, OpenBSD Europe m...@openbsdeurope.com wrote:
 On 13/10/11 11:32, Donald Reichert wrote:

  Original-Nachricht 

 Datum: Thu, 13 Oct 2011 12:14:20 +0200
 Von: David Coppadco...@gmail.com
 An: misc@openbsd.org
 Betreff: Dennis Ritchie

 Today is a sad sad day :(

 Rest in Peace.
 Without you, we would never be here.

 Cheers,
 David

 He died last weekend. RIP.

 #includestdio.h

 int main()
 {
 printf(goodbye, dad\n);
 return 0;
 }

 I vote for the next release artwork tributing his work some way :-)


That is a great idea !



Re: SATA RAID card suggestions?

2011-10-13 Thread Christiano F. Haesbaert
On 10 October 2011 22:57, Richard Johnson rd...@river.com wrote:
 On Mon, 10 Oct 2011 14:50:45 -0700, Ryan Corder wrote:
 On Mon, Oct 10, 2011 at 02:16:47PM -0600, Richard Johnson wrote:
 I've had great success with the Areca ARC-1210.

   http://www.areca.com.tw/products/pcie.htm

 Wups, I was apparently too tired last night to find the Areca cards, though
 I could have sworn I'd studied the arc(4) man page.  That is, until I
 reviewed it again this evening after receiving your response.

 Thanks for getting me pointed in the right direction.

 Now to find one in stock.



Did you find another alternative ?
I like this areca cards, but they are way to expensive for me, if you
find a cheaper solution please let me know.
I need a pci-e raid 5 card.



Re: SATA RAID card suggestions?

2011-10-13 Thread Christiano F. Haesbaert
On 13 October 2011 17:45, Timothy Baldock t...@entropy.me.uk wrote:
 I'd recommend the Areca cards, they are expensive but worth the money IMO


I see, and I agree, but have in mind I pay around 100% taxes :(.



Re: Help setting up a PF NAT gateway

2011-10-10 Thread Christiano F. Haesbaert
On 10 October 2011 12:38, Stefan Midjich sweh...@gmail.com wrote:
 Simplest of things but I'm failing miserably.

 $ sudo cat /etc/hostname.vic2 # External NIC with static public IPv4 address
 inet 50.50.50.59 255.255.255.0 50.50.50.255

 $ sudo cat /etc/hostname.vic3 # Internal NIC used as gateway by two
 machines on same network
 inet 10.221.181.10 255.255.255.0 10.221.181.255

 For troubleshooting I have removed the block all rule, to confirm that
 it is in fact my NAT related rules that don't work.

 These are my first and only NAT rules. The other rules work fine and
 are just to allow SSH to my management interface and ICMP response
 from the external IP and from the internal gateway IP. Besides I've
 removed the block all so the other rules don't matter much now.

 match out on vic2 inet from 10.221.181.0/24 to any nat-to (vic2) round-robin
 pass inet from 10.221.181.0/24 to any flags S/SA keep state

 With tcpdump I can see packets going to vic3, but no further.

 With block all commented out I can fully test the network around and
 everything is working just fine, I can nc -kl 50.50.50.59 65535 and
 connect to that port from anywhere on the internet. I just can't
 connect out from the private network through the gateway. The systems
 in the private network have 10.221.181.10 as their default gateway.

 I even have the Book of PF 2nd edition here but it's of no use, the
 rules are mostly from there. Just for troubleshooting I can also nc
 -kl 10.221.181.10 65535 on the gateway and connect to that port from
 the private network machines without issues.

 So please tell me, what am I missing in this nat-to rule?


Hi, can you paste your pf.conf ?
The output of ifconfig would be good too.



Re: Help setting up a PF NAT gateway

2011-10-10 Thread Christiano F. Haesbaert
On 10 October 2011 15:05, Stefan Midjich sweh...@gmail.com wrote:
 That was from the output of pfctl -vf /etc/pf.conf so it expands the
 rules and adds all that is implied, like keep state for example.


I think that is not what you want:
match in on vic3 inet from 10.221.181.0/24 to any label NATOut
nat-to (vic2) round-robin

You want to match packets going out your external interface, and then
nat-to the external interface address, so try something like:

match out on vic2 inet from 10.221/181.0/24 nat-to (vic2)

Considering vic2 as your external interface.



Re: Why I uninstalled OpenBSD???

2011-10-01 Thread Christiano F. Haesbaert
Not again people, please.

Stop feeding.



Re: audit openbsd.org!

2011-09-14 Thread Christiano F. Haesbaert
On 14 September 2011 02:38, lancebaynes87 lancebayne...@zoho.com wrote:
 Recently hacked sites..:


 http://www.linuxfoundation.org/

 http://www.utorrent.com/

 http://kernel.org/

 http://www.linux.com/



 Has the OpenBSD site ever been hacked? Are there any good audit processes to 
 check the servers?

 OpenBSD team, please be aware, there are many script-kiddies OR pro's who 
 wants the most secure OS website :\

 I love OBSD, and I don't want it to fail like kernel.org:


 http://blackhats.com/infosuck/0x007c.png


 Please pay more attention than in normal case! :\

 /just an anxious OBSD user/

There are drugs that can handle anxiety.


 Thanks and sry for this e-mail.


There are drugs that can help controlling your impulses too, overclock
your frontal lobe and you should be fine, speeds usually do that.

I suggest seeking a doctor.



Re: Master's Thesis

2011-09-06 Thread Christiano F. Haesbaert
On 6 September 2011 10:30, Adam Britt a...@kadmia.com wrote:
 Hi all,

 For my thesis I want to work on something that will be useful. OpenBSD is an
 OS I greatly admire for its integrity in terms of both licensing and
 software quality and is a project I want to work on/contribute to.

 I have two project ideas and wanted to hear if these sounded like something
 useful to the community at large and if there are any project suggestions
 that you may have.

 * An evaluation of the various data structures used by the kernel to see if
 improvements can be made either in terms of security and/or efficiency.
 Chris Okasaki's book Purely Functional Data Structures will be strong source
 of inspiration.

 * A tool to statically analyze OpenBSD catered to OpenBSD coding
 conventions. Something along the lines of splint etc.

 Thoughts/suggestions are much appreciated.

 Best regards,

 Adam Britt



A deep study of all the SMP mechanisms employed by the major OSes,
like OpenBSD, DragonFlyBSD, FreeBSD and Linux.
This can help in improving the SMP support in the near future,
removing the big lock and such...



Re: ping: Could only allocate a receive buffer of 8191 bytes (default 65535)

2011-09-03 Thread Christiano F. Haesbaert
On Sat, Sep 03, 2011 at 08:44:45AM -0400, Joao Ronaldo wrote:
 Hi,
 
 I am running obsd 4.7.
 

That's a bit old.

 I noticed the message in the subject whenever I use ping.
 
 There is no packet loss but I am worried I might be reaching
 some sort of resource exhaustion.
 
 Could some body help me to interpret this message and 
 possibly give hints on how to avoid it?
 

setsockopt is failing in:

while (setsockopt(s, SOL_SOCKET, SO_RCVBUF,
(void*)bufspace, sizeof(bufspace))  0) {
if ((bufspace -= 1024) = 0)
err(1, Cannot set the receive buffer size);
}
if (bufspace  IP_MAXPACKET)
warnx(Could only allocate a receive buffer of %i bytes 
(default %i),
bufspace, IP_MAXPACKET);

Did you tweak any sysctl options ?

Is the machine loaded ? 

I think sbchecklowmem() may be failing in uipc_socket2.c:403.  

Also ping should use warn() instead of a warnx() there. 

Claudio ?



Re: ping: Could only allocate a receive buffer of 8191 bytes (default 65535)

2011-09-03 Thread Christiano F. Haesbaert
He fixed it by increasing kern.maxclusters.

On Sat, Sep 03, 2011 at 08:44:45AM -0400, Joao Ronaldo wrote:
 Hi,
 
 I am running obsd 4.7.
 
 I noticed the message in the subject whenever I use ping.
 
 There is no packet loss but I am worried I might be reaching
 some sort of resource exhaustion.
 
 Could some body help me to interpret this message and 
 possibly give hints on how to avoid it?
 
 Thanks in advance.
 
 Regards,
 
 JoC#o



Re: Time interval based pf rule

2011-09-02 Thread Christiano F. Haesbaert
On 2 September 2011 09:11, Stefan N stefanbsd...@yahoo.com wrote:
 Hi Jim,

 If I used anchor to create pf rules which means there is another 
 configuration needs to be taken care.
 Beside /etc/pf.conf, we need to take care and maintain crontab for 
 schedulling.


What are you trying to accomplish with timer based rules ?
Recently one-hit rules were added, depending on your problem that
might solve it.



Re: Time interval based pf rule

2011-09-02 Thread Christiano F. Haesbaert
On 2 September 2011 09:26, Stefan N stefanbsd...@yahoo.com wrote:
 Actually I would like to limit the access during office hour.
 So Time interval base rule means:
 user is only allowed to access specific application and destination based 
 from the time interval.
 For example: Finance Department user is only allowed to access facebook
 website after office hour (after 6PM onwards) and only on friday.

 If I didn't add the time interval, they can spend their time for browsing and 
 chatting on facebook instead of working.
 What do you mean by one-hit rules?

Rules that get destroyed after a first match, but that's not what you want.

anchors + crontab as Peter suggested is an easy alternative.



Re:

2011-08-25 Thread Christiano F. Haesbaert
On 25 August 2011 03:53, igor denisov saufe...@gmail.com wrote:
 Hello there,

 May someone help me with this:

 #Xorg -configure

 Xorg:/usr/X11R6/lib/modules/drivers/radeonhd_drv.so:/usr/X11R6/lib/modules/drivers/radeon_drv.so:WARNING:
 symbol (AtomBiosRequestList) size mismatch, relink your program
 (**) Using config file: /root/xorg.conf.new

 No idea how to do it. And it looks simple.


There was an addition to radeon_drv:
http://marc.info/?l=openbsd-cvsm=131405479712726w=2

Try updating to the latest snapshot.



Re: WiFI and VGA issues with Dell E6320

2011-08-02 Thread Christiano F. Haesbaert
It seems you've no drm ?

inteldrm0 at ...

Without drm, opengl will be painfully slow, you probably don't have
Xvideo also, try xvinfo (no nice playing in mplayer).

I'm no expert so I might be wrong.

On 2 August 2011 07:34, Tomas Bodzar tomas.bod...@gmail.com wrote:
 Hi all,

 here are some issues with current on new Dell E6320 (dmesg on the end
 of email including those weird characters is real including missing
 chars from starts). Can test some stuff or send more info in case of
 need.

 1. Wifi
 firmware installed, but I can't see networks during scan and driver
 throws errors in dmesg

 Aug  2 12:19:22  /bsd: firmware error log:
 Aug  2 12:19:22  /bsd:   error type  = UNKNOWN (0x13AA)
 Aug  2 12:19:22  /bsd:   program counter = 0x00013FB0
 Aug  2 12:19:22  /bsd:   source line = 0x00E0
 Aug  2 12:19:22  /bsd:   error data  = 0x
 Aug  2 12:19:22  /bsd:   branch link = 0x00013ED200013ED2
 Aug  2 12:19:22  /bsd:   interrupt link  = 0xD252
 Aug  2 12:19:22  /bsd:   time= 458
 Aug  2 12:19:22  /bsd: driver status:
 Aug  2 12:19:22  /bsd:   tx ring  0: qid=0  cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring  1: qid=1  cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring  2: qid=2  cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring  3: qid=3  cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring  4: qid=4  cur=9   queued=0
 Aug  2 12:19:22  /bsd:   tx ring  5: qid=5  cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring  6: qid=6  cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring  7: qid=7  cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring  8: qid=8  cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring  9: qid=9  cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring 10: qid=10 cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring 11: qid=11 cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring 12: qid=12 cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring 13: qid=13 cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring 14: qid=14 cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring 15: qid=15 cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring 16: qid=16 cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring 17: qid=17 cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring 18: qid=18 cur=0   queued=0
 Aug  2 12:19:22  /bsd:   tx ring 19: qid=19 cur=0   queued=0
 Aug  2 12:19:22  /bsd:   rx ring: cur=10
 Aug  2 12:19:22  /bsd:   802.11 state 0
 Aug  2 12:19:23  /bsd: iwn0: RXON command failed
 Aug  2 12:19:23  /bsd: iwn0: could not configure device

 $ sudo ifconfig iwn0 up
 $ sudo ifconfig iwn0 scan
 iwn0: flags=8802BROADCAST,SIMPLEX,MULTICAST mtu 1500
lladdr a0:88:b4:72:f0:70
priority: 4
groups: wlan
media: IEEE802.11 autoselect
status: no network
ieee80211: nwid 
 $

 $ sudo ifconfig iw$ pkg_info | grep -i iwn
 iwn-firmware-5.6Firmware binary images for iwn driver
 $

 2. VGA

 Probably just too much new HW. Resolution is fine, but speed of
 screen is quite slow, but usable.

 $ glxgears
 38 frames in 5.1 seconds =  7.415 FPS
 37 frames in 5.0 seconds =  7.353 FPS
 35 frames in 5.0 seconds =  6.994 FPS
 ^C
 $ glxinfo | grep -i render
 direct rendering: Yes
 OpenGL renderer string: Software Rasterizer
GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_fragment_program,
 $

 $ sudo pcidump -v 0:2:0
  0:2:0: Intel GT2+ Video
0x: Vendor ID: 8086 Product ID: 0126
0x0004: Command: 0007 Status ID: 0090
0x0008: Class: 03 Subclass: 00 Interface: 00 Revision: 09
0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size:
00
0x0010: BAR mem 64bit addr: 0xe140/0x0040
0x0018: BAR mem prefetchable 64bit addr:
0xd000/0x1000
0x0020: BAR io addr: 0x4000/0x0040
0x0024: BAR empty ()
0x0028: Cardbus CIS: 
0x002c: Subsystem Vendor ID: 1028 Product ID: 0492
0x0030: Expansion ROM Base Address: 
0x0038: 
0x003c: Interrupt Pin: 01 Line: 0b Min Gnt: 00 Max Lat: 00
0x0090: Capability 0x05: Message Signaled Interrupts (MSI)
0x00d0: Capability 0x01: Power Management
0x00a4: Capability 0x13: PCI Advanced Features
 $


 ERIC.MP) #29: Sat Jul 30 17:06:22 MDT 2011
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
 RTC BIOS diagnostic error
 3fconfig_unit,memory_size,fixed_di\^A,invalptal\M-h\M^@
 cpu0: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz (GenuineIntel
 686-class) 2.50 GHz
 cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,PCLMUL,MWAIT,DS-CPL,VMX,SMX,ES
T,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,POPCNT,AES,XSAVE
 ,AVX
 real mem  = 3394228224 (3236MB)
 avail mem = 3328643072 (3174MB)
 mainbus0 at root
 bios0 at mainbus0: AT/286+ BIOS, date 04/07/11, BIOS32 rev. 0 @
 0xffa10, SMBIOS rev. 2.6 @ 0xf1ef0 (106 entries)
 bios0: vendor Dell 

Re: No sound with ATI SBx00 HD Audio

2011-07-28 Thread Christiano F. Haesbaert
On 28 July 2011 07:50, Greg Jones gjones5...@netscape.net wrote:
 On 07/27/11 16:42, Christiano F. Haesbaert wrote:

 I found out the datasheet for 0x4383

 http://developer.amd.com/assets/43009_sb7xx_rrg_pub_1.00.pdf

 I've no knowledge of PCI to debug it though.

 Try something like this in rc.local and see if it works.

 # Setting Mother Board Audio Device as Default Audio Device

 echo '.'

 echo -n ' Setting /dev/{audio,sound,audioctl,mixer} to Azalia0'

 p=1

 ln -sf /dev/audio$p /dev/audio
 ln -sf /dev/sound$p /dev/sound
 ln -sf /dev/audioctl$p /dev/audioctl
 ln -sf /dev/mixer$p /dev/mixer

 echo '.'


The links were fine, I checked them.
Also although I had an azalia0, I had no audio at azalia0, so the
audio links couldn't be wrong I suppose.



Re: No sound with ATI SBx00 HD Audio

2011-07-27 Thread Christiano F. Haesbaert
I found out the datasheet for 0x4383

http://developer.amd.com/assets/43009_sb7xx_rrg_pub_1.00.pdf

I've no knowledge of PCI to debug it though.



Re: No sound with ATI SBx00 HD Audio

2011-07-27 Thread Christiano F. Haesbaert
On Wed, Jul 27, 2011 at 11:36:26PM +0100, Nigel Taylor wrote:
 On 07/27/11 21:42, Christiano F. Haesbaert wrote:
  I found out the datasheet for 0x4383
  
  http://developer.amd.com/assets/43009_sb7xx_rrg_pub_1.00.pdf
  
  I've no knowledge of PCI to debug it though.
  
  
 Hi,
 
 I have a Gigabyte GA-880GA-UD3H based on the same chip set, the sound
 works. But I used the HD 4250 internal graphics/audio, I don't have any
 extra graphics card, from the dmesg you appear to have a HD 5700 card
 and HD 5700 audio.
 
 Extract from ny dmesg ..
 vga1 at pci1 dev 5 function 0 ATI Radeon HD 4250 rev 0x00
 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
 wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
 azalia0 at pci1 dev 5 function 1 ATI Radeon HD 4200 HD Audio rev 0x00: msi
 azalia0: no supported codecs
 ...
 azalia1 at pci0 dev 20 function 2 ATI SBx00 HD Audio rev 0x40: apic 2
 int 16
 azalia1: codecs: Realtek/0x0892
 audio0 at azalia1
 
 Just possible that the internal, and card are conflicting/mixed up in
 some way.
 

Hmm maybe I'll try removing the hd 5700, how old is your snapshot ?


-- 
Christiano Farina HAESBAERT
Do NOT send me html mail.



Re: No sound with ATI SBx00 HD Audio

2011-07-27 Thread Christiano F. Haesbaert
On Thu, Jul 28, 2011 at 12:23:53AM +0100, Nigel Taylor wrote:
 On 07/27/11 23:57, Christiano F. Haesbaert wrote:
  On Wed, Jul 27, 2011 at 11:36:26PM +0100, Nigel Taylor wrote:
  On 07/27/11 21:42, Christiano F. Haesbaert wrote:
  I found out the datasheet for 0x4383
 
  http://developer.amd.com/assets/43009_sb7xx_rrg_pub_1.00.pdf
 
  I've no knowledge of PCI to debug it though.
 
 
  Hi,
 
  I have a Gigabyte GA-880GA-UD3H based on the same chip set, the sound
  works. But I used the HD 4250 internal graphics/audio, I don't have any
  extra graphics card, from the dmesg you appear to have a HD 5700 card
  and HD 5700 audio.
 
  Extract from ny dmesg ..
  vga1 at pci1 dev 5 function 0 ATI Radeon HD 4250 rev 0x00
  wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
  wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
  azalia0 at pci1 dev 5 function 1 ATI Radeon HD 4200 HD Audio rev 0x00: 
  msi
  azalia0: no supported codecs
  ...
  azalia1 at pci0 dev 20 function 2 ATI SBx00 HD Audio rev 0x40: apic 2
  int 16
  azalia1: codecs: Realtek/0x0892
  audio0 at azalia1
 
  Just possible that the internal, and card are conflicting/mixed up in
  some way.
 
  
  Hmm maybe I'll try removing the hd 5700, how old is your snapshot ?
  
  
 Hi,
 
 I built from CVS, it's just over one day old, I rechecked the sound
 before sending first e-mail, and I had sound working previously some
 months ago. It's not the system I use for listening to things.
 
 Regards
 
 Nigel Taylor

Now I've no idea what happened, I powered off the machine, removed the graphics
power card, enabled the onboard radaeon, enabled plug  play OS in bios, and
sound started to work.

Then I went back to the radeon 5700, disabled plug  play OS, disabled the
onboard controller, and sound still works. When the machine is booting I hear a
loud pop from the speakers.

I've no idea what happened.
-- 
Christiano Farina HAESBAERT
Do NOT send me html mail.



No sound with ATI SBx00 HD Audio

2011-07-26 Thread Christiano F. Haesbaert
Hi there, I've no audio with the ATI SBx00 HD Audio.
Please note that I've 2 azalia.


==mixerctl -av==
inputs.dac-0:1=192,192 
inputs.dac-2:3=126,126 
inputs.dac-4:5=126,126 
inputs.dac-6:7=192,192 
record.adc-0:1_mute=off  [ off on ]
record.adc-0:1=125,125 
record.adc-2:3_mute=off  [ off on ]
record.adc-2:3=125,125 
inputs.mix_source=mic,mic2,line-in,hp,line  { mic mic2 line-in hp line }
inputs.mix_mic=120,120 
inputs.mix_mic2=120,120 
inputs.mix_line-in=120,120 
inputs.mix_hp=120,120 
inputs.mix_line=120,120 
inputs.mix2_source=dac-0:1,mix  { dac-0:1 mix }
inputs.mix3_source=dac-2:3,mix  { dac-2:3 mix }
inputs.mix4_source=dac-4:5,mix  { dac-4:5 mix }
inputs.mix5_source=dac-6:7,mix  { dac-6:7 mix }
outputs.line_source=mix2  [ mix2 ]
outputs.line_mute=off  [ off on ]
outputs.line_dir=output  [ none output input ]
outputs.line_boost=off  [ off on ]
outputs.line_eapd=on  [ off on ]
outputs.mic_source=mix3  [ mix2 mix3 mix4 mix5 mix8 ]
outputs.mic_mute=off  [ off on ]
inputs.mic=85,85 
outputs.mic_dir=input-vr80  [ none output input input-vr0 input-vr50 input-vr80
input-vr100 ]
outputs.mic2_source=mix8  [ mix2 mix3 mix4 mix5 mix8 ]
outputs.mic2_mute=off  [ off on ]
inputs.mic2=85,85 
outputs.mic2_dir=input-vr80  [ none output input input-vr0 input-vr50 input-vr80
input-vr100 ]
outputs.mic2_boost=off  [ off on ]
outputs.line-in_source=mix4  [ mix2 mix3 mix4 mix5 mix8 ]
outputs.line-in_mute=off  [ off on ]
inputs.line-in=85,85 
outputs.line-in_dir=input  [ none output input input-vr0 input-vr50 input-vr80
input-vr100 ]
outputs.hp_source=mix5  [ mix2 mix3 mix4 mix5 mix8 ]
outputs.hp_mute=off  [ off on ]
inputs.hp=85,85 
outputs.hp_dir=output  [ none output input input-vr0 input-vr50 input-vr80
input-vr100 ]
outputs.hp_boost=off  [ off on ]
outputs.hp_eapd=on  [ off on ]
outputs.SPDIF_source=dig-dac-0:1  [ dig-dac-0:1 ]
record.adc-2:3_source=mic,mic2,line-in,hp,line,mix  { mic mic2 line-in hp line
mix }
record.adc-0:1_source=mic,mic2,line-in,hp,line,mix  { mic mic2 line-in hp line
mix }
inputs.dac-8:9=126,126 
inputs.mix8_source=dac-8:9,mix  { dac-8:9 mix }
outputs.line_sense=plugged  [ unplugged plugged ]
outputs.mic_sense=unplugged  [ unplugged plugged ]
outputs.mic2_sense=unplugged  [ unplugged plugged ]
outputs.line-in_sense=unplugged  [ unplugged plugged ]
outputs.hp_sense=unplugged  [ unplugged plugged ]
outputs.master=255,255 
outputs.master.mute=off  [ off on ]
outputs.master.slaves=dac-0:1,dac-6:7,line,hp  { dac-0:1 dac-2:3 dac-4:5 dac-6:7
line mic mic2 line-in hp dac-8:9 }
record.volume=125,125 
record.volume.mute=off  [ off on ]
record.volume.slaves=adc-0:1,adc-2:3  { adc-0:1 adc-2:3 mic mic2 line-in hp }
outputs.mode=analog  [ analog digital ]



==audioctl -a==
name=HD-Audio
version=1.0
config=azalia1
encodings=slinear_le:16:2:1,slinear_le:20:4:1,slinear_le:24:4:1
properties=full_duplex,independent
full_duplex=0
fullduplex=0
blocksize=17536
hiwat=2
lowat=1
output_muted=0
monitor_gain=0
mode=play
play.rate=44100
play.sample_rate=44100
play.channels=2
play.precision=16
play.bps=2
play.msb=1
play.encoding=slinear_le
play.gain=255
play.balance=32
play.port=0x0
play.avail_ports=0x0
play.seek=35072
play.samples=87031168
play.eof=0
play.pause=0
play.error=0
play.waiting=0
play.open=1
play.active=1
play.buffer_size=65536
play.block_size=17536
play.errors=0
record.rate=48000
record.sample_rate=48000
record.channels=2
record.precision=16
record.bps=2
record.msb=1
record.encoding=slinear_le
record.gain=125
record.balance=32
record.port=0x0
record.avail_ports=0x0
record.seek=0
record.samples=0
record.eof=0
record.pause=0
record.error=0
record.waiting=0
record.open=0
record.active=0
record.buffer_size=65536
record.block_size=9600
record.errors=0



==pcidump -x==
Domain /dev/pci0:
 0:0:0: AMD RS880 Host
0x: 96011022 2236 0600 
0x0010:    
0x0020:    96011022
0x0030:  00c4  
 0:2:0: AMD RS780 PCIE
0x: 96031022 00100107 0604 00010010
0x0010:   00010100 2000d1d1
0x0020: feb0feb0 dff1d001  
0x0030:  0050  001b010a
 0:7:0: AMD RS780 PCIE
0x: 96071022 00100107 0604 00010010
0x0010:   00020200 2000e1e1
0x0020: e1f0e000 fdf1fdf1  
0x0030:  0050  0007010b
 0:17:0: ATI SBx00 SATA
0x: 43901002 02300107 01060100 4010
0x0010: c001 b001 a001 9001
0x0020: 8001 feaffc00  37001565
0x0030:  0060  0109
 0:18:0: ATI SB700 USB
0x: 43971002 02a00106 0c031000 00804010
0x0010: feafe000   
0x0020:    37001565
0x0030:    010a
 0:18:1: ATI SB700 USB
0x: 43981002 02a00117 0c031000 4010
0x0010: 

Re: No sound with ATI SBx00 HD Audio

2011-07-26 Thread Christiano F. Haesbaert
Now I've noticed some popping sounds between which seem to alternate between
speakers, but still no sound.


On Wed, Jul 27, 2011 at 12:14:31AM -0300, Christiano F. Haesbaert wrote:
 Hi there, I've no audio with the ATI SBx00 HD Audio.
 Please note that I've 2 azalia.
 
 
 ==mixerctl -av==
 inputs.dac-0:1=192,192 
 inputs.dac-2:3=126,126 
 inputs.dac-4:5=126,126 
 inputs.dac-6:7=192,192 
 record.adc-0:1_mute=off  [ off on ]
 record.adc-0:1=125,125 
 record.adc-2:3_mute=off  [ off on ]
 record.adc-2:3=125,125 
 inputs.mix_source=mic,mic2,line-in,hp,line  { mic mic2 line-in hp line }
 inputs.mix_mic=120,120 
 inputs.mix_mic2=120,120 
 inputs.mix_line-in=120,120 
 inputs.mix_hp=120,120 
 inputs.mix_line=120,120 
 inputs.mix2_source=dac-0:1,mix  { dac-0:1 mix }
 inputs.mix3_source=dac-2:3,mix  { dac-2:3 mix }
 inputs.mix4_source=dac-4:5,mix  { dac-4:5 mix }
 inputs.mix5_source=dac-6:7,mix  { dac-6:7 mix }
 outputs.line_source=mix2  [ mix2 ]
 outputs.line_mute=off  [ off on ]
 outputs.line_dir=output  [ none output input ]
 outputs.line_boost=off  [ off on ]
 outputs.line_eapd=on  [ off on ]
 outputs.mic_source=mix3  [ mix2 mix3 mix4 mix5 mix8 ]
 outputs.mic_mute=off  [ off on ]
 inputs.mic=85,85 
 outputs.mic_dir=input-vr80  [ none output input input-vr0 input-vr50 
 input-vr80
 input-vr100 ]
 outputs.mic2_source=mix8  [ mix2 mix3 mix4 mix5 mix8 ]
 outputs.mic2_mute=off  [ off on ]
 inputs.mic2=85,85 
 outputs.mic2_dir=input-vr80  [ none output input input-vr0 input-vr50 
 input-vr80
 input-vr100 ]
 outputs.mic2_boost=off  [ off on ]
 outputs.line-in_source=mix4  [ mix2 mix3 mix4 mix5 mix8 ]
 outputs.line-in_mute=off  [ off on ]
 inputs.line-in=85,85 
 outputs.line-in_dir=input  [ none output input input-vr0 input-vr50 input-vr80
 input-vr100 ]
 outputs.hp_source=mix5  [ mix2 mix3 mix4 mix5 mix8 ]
 outputs.hp_mute=off  [ off on ]
 inputs.hp=85,85 
 outputs.hp_dir=output  [ none output input input-vr0 input-vr50 input-vr80
 input-vr100 ]
 outputs.hp_boost=off  [ off on ]
 outputs.hp_eapd=on  [ off on ]
 outputs.SPDIF_source=dig-dac-0:1  [ dig-dac-0:1 ]
 record.adc-2:3_source=mic,mic2,line-in,hp,line,mix  { mic mic2 line-in hp line
 mix }
 record.adc-0:1_source=mic,mic2,line-in,hp,line,mix  { mic mic2 line-in hp line
 mix }
 inputs.dac-8:9=126,126 
 inputs.mix8_source=dac-8:9,mix  { dac-8:9 mix }
 outputs.line_sense=plugged  [ unplugged plugged ]
 outputs.mic_sense=unplugged  [ unplugged plugged ]
 outputs.mic2_sense=unplugged  [ unplugged plugged ]
 outputs.line-in_sense=unplugged  [ unplugged plugged ]
 outputs.hp_sense=unplugged  [ unplugged plugged ]
 outputs.master=255,255 
 outputs.master.mute=off  [ off on ]
 outputs.master.slaves=dac-0:1,dac-6:7,line,hp  { dac-0:1 dac-2:3 dac-4:5 
 dac-6:7
 line mic mic2 line-in hp dac-8:9 }
 record.volume=125,125 
 record.volume.mute=off  [ off on ]
 record.volume.slaves=adc-0:1,adc-2:3  { adc-0:1 adc-2:3 mic mic2 line-in hp }
 outputs.mode=analog  [ analog digital ]
 
 
 
 ==audioctl -a==
 name=HD-Audio
 version=1.0
 config=azalia1
 encodings=slinear_le:16:2:1,slinear_le:20:4:1,slinear_le:24:4:1
 properties=full_duplex,independent
 full_duplex=0
 fullduplex=0
 blocksize=17536
 hiwat=2
 lowat=1
 output_muted=0
 monitor_gain=0
 mode=play
 play.rate=44100
 play.sample_rate=44100
 play.channels=2
 play.precision=16
 play.bps=2
 play.msb=1
 play.encoding=slinear_le
 play.gain=255
 play.balance=32
 play.port=0x0
 play.avail_ports=0x0
 play.seek=35072
 play.samples=87031168
 play.eof=0
 play.pause=0
 play.error=0
 play.waiting=0
 play.open=1
 play.active=1
 play.buffer_size=65536
 play.block_size=17536
 play.errors=0
 record.rate=48000
 record.sample_rate=48000
 record.channels=2
 record.precision=16
 record.bps=2
 record.msb=1
 record.encoding=slinear_le
 record.gain=125
 record.balance=32
 record.port=0x0
 record.avail_ports=0x0
 record.seek=0
 record.samples=0
 record.eof=0
 record.pause=0
 record.error=0
 record.waiting=0
 record.open=0
 record.active=0
 record.buffer_size=65536
 record.block_size=9600
 record.errors=0
 
 
 
 ==pcidump -x==
 Domain /dev/pci0:
  0:0:0: AMD RS880 Host
 0x: 96011022 2236 0600 
 0x0010:    
 0x0020:    96011022
 0x0030:  00c4  
  0:2:0: AMD RS780 PCIE
 0x: 96031022 00100107 0604 00010010
 0x0010:   00010100 2000d1d1
 0x0020: feb0feb0 dff1d001  
 0x0030:  0050  001b010a
  0:7:0: AMD RS780 PCIE
 0x: 96071022 00100107 0604 00010010
 0x0010:   00020200 2000e1e1
 0x0020: e1f0e000 fdf1fdf1  
 0x0030:  0050  0007010b
  0:17:0: ATI SBx00 SATA
 0x: 43901002 02300107 01060100 4010
 0x0010: c001 b001 a001 9001
 0x0020: 8001 feaffc00  37001565
 0x0030:  0060

Re: Call for Papers - BSDday Argentina 2011

2011-07-22 Thread Christiano F. Haesbaert
Oh sweet, I'm coming for sure.

On Fri, Jul 22, 2011 at 12:34:07AM -0300, virtualroot | werpo wrote:
 BSDday Argentina 2011 - http://www.bsdday.org.ar/
 
 4-5 Nov.
 Buenos Aires City, Argentina
 Universidad Tecnolsgica Nacional, Facultad Regional Buenos Aires
 
 *BSD users in Argentina call to the community of free software, users,
 system administrators and developers of BSD systems for participation
 on the BSDday 2011.
 
 The subject of the event is BSD operating systems, BSD-licensed
 software, licensing issues, BSD philosophy and related topics.
 
 There is no maximum number of speakers or length of the talks, but you
 should indicate both at the time of the talk submission.
 
 Talks and slides can be in Spanish or English, talks with
 practical/lab content besides theoretical content in which attendees
 can perform labs practices and exercises are preferred over purely
 theoretical ones.
 
 For lab talks, the speaker should indicate the materials and
 assistants needed (i.e. a laptop with a specific OS).
 
 NOTE: On budget issues, the organizators may pay some of the passages
 or hotels, in whole or in part, to the selected authors residing
 outside of Buenos Aires City (Argentina).
 
 We appreciate the contribution of everyone in the dissemination of
 this call and the event itself. Feel free to forward this email to any
 individuals/organizations you may think would be interested in it.
 
 Until when you can submit papers?
 
 Proposals will be received until October 10th inclusive.
 
 Where to send?
 
 The information of the paper should be sent in plain text and slide
 attachments (if you have) to the following address of email: llamcha
 [at] bsdday.org.
 
 How to send?
 
 The sending of the proposed talk should have the following information:
 
 Title: Title of the paper.
 Author's Name: Brief description of each, place of residence,
 association, BUG, agency or enterprise to which he belongs, if
 applicable.
 Type: It can be traditional or workshop.
 Estimated time of duration: The talks are usually 45 'and the
 workshops have a length of 1:45. If it is more or less the time
 required, please tell us.
 Brief description of the talk: One or two paragraphs to explain the
 content of the presentation.
 Level of the attendees: newbie / intermediate / advanced / expert.
 Background information: Specify that knowledge must have assistants.
 Subject: programming, multimedia, communications, workstation, network
 services, interoperability, education, kernel, etc.
 Phone of the author: To communicate with you.
 Residence: of the author.
 Format
 
 The shipment of the slides should be one of the following formats:
 
 Openoffice.org presentation
 HTML standard
 Postscript
 PDF
 Plaintext
 LaTex
 License
 
 Specify a license that allows the event organizers and distribute
 material that can be downloaded from the BSDday website.
 
 If you can not specify, you can choose from GFDL or cc-by-sa 2.5 en.

-- 
Christiano Farina HAESBAERT
Do NOT send me html mail.



Re: Is there a kernel walkthough for newbies?

2011-07-21 Thread Christiano F. Haesbaert
On 19 July 2011 11:34, Billy Wong bi...@tube-fish.net wrote:
 Hi everybody,

 Just wondering if there are some documentations telling a newbie his
 whereabouts in the kernel? It doesnt need to be an extensive line-by-line or
 file-by-file treatment but something at a higher level of the general design
 and architecture approach.

 thanks and regards,


If you're looking for networking stuff, TCP/IP Illustrated Vol 2 is
still quite valid.



Very strange cvs performance.

2011-07-16 Thread Christiano F. Haesbaert
Hi there, I have a local mirror of cvs src, everything works fine, except that
the IO seems to take place in another disk.

I have a very very very very slow udma controller in wd0 (the ultra 5 one):

wd0(pciide0:0:0): using PIO mode 4, DMA mode 2

So I keep my cvs in a faster controller/disk:

wd1(pciide1:2:0): using BIOS timings, Ultra-DMA mode 7

I have this, so you can see, most stuff is on the slow controller. 

/dev/wd0a on / type ffs (local)
/dev/wd0d on /tmp type ffs (local, nodev, nosuid)
/dev/wd0g on /usr type ffs (NFS exported, local, nodev)
/dev/wd0e on /var type ffs (local, nodev, nosuid)
/dev/wd1a on /data/sta type ffs (NFS exported, local, nodev, nosuid)

Here is the weird part, /cvs points to /data/sta/cvs (which is in the fast
controller)

lrwxr-xr-x   1 root  wheel   14 Jul 13 19:55 cvs@ - /data/sta/cvs/

Now watch what happends when I 'cvs up' from another machine:

== No cvs up, disk mostly idle ==

gandalf:haesbaert: iostat -w 3 
  ttywd0 cd0 wd1 cpu
 tin tout  KB/t t/s MB/s   KB/t t/s MB/s   KB/t t/s MB/s  us ni sy in id
   0   41 11.68   3 0.03   0.00   0 0.00  49.91   5 0.25   1  0  2  1 96
   0   74  0.00   0 0.00   0.00   0 0.00   0.00   0 0.00   0  0  0  0100
   0   98 13.71   7 0.09   0.00   0 0.00   0.00   0 0.00   0  0  0  0100

== cvs up, wd1 transaction should go up roof ==
gandalf:haesbaert: iostat -w 3 
  ttywd0 cd0 wd1 cpu
 tin tout  KB/t t/s MB/s   KB/t t/s MB/s   KB/t t/s MB/s  us ni sy in id
   0   41 11.68   3 0.03   0.00   0 0.00  49.91   5 0.25   1  0  2  1 96
   0   98  9.52 263 2.45   0.00   0 0.00   0.00   0 0.00   5  0  9  3 84
   0   25  9.53 277 2.58   0.00   0 0.00   0.00   0 0.00   1  0  5  0 94
   0   49  9.51 282 2.62   0.00   0 0.00   0.00   0 0.00   2  0  7  1 90
   0   49  9.67 258 2.44   0.00   0 0.00  64.00   0 0.02   1  0  5  1 93


But no, IO seems to take place mostly in wd0, I've confirmed swap was not taking
place, I shut down everything, top showed 100mb+ free:

load averages:  2.23,  1.02,  0.65
gandalf.midearth 03:12:25
42 processes:  1 running, 40 idle, 1 on processor
CPU states:  1.6% user,  0.0% nice,  4.9% system,  0.4% interrupt, 93.2% idle
Memory: Real: 19M/64M act/tot  Free: 176M  Swap: 16M/1024M used/tot

The user doing the cvs has a home in /home/ which is in wd0.
I'm also able to hear wd0 (different sound than wd1), so I know fstat is telling
the truth.

What's hapenning ? I'm pretty sure I'm missing something real simple, just to 
have
an insight, a 'cvs up' is taking more than 30min. 

Thanks

gandalf:sta: dmesg  

  
console is /pci@1f,0/pci@1,1/ebus@1/se@14,40:a
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2011 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 4.9 (GENERIC) #241: Tue Feb 15 16:08:29 MST 2011
t...@sparc64.openbsd.org:/usr/src/sys/arch/sparc64/compile/GENERIC
real mem = 268435456 (256MB)
avail mem = 251617280 (239MB)
mainbus0 at root: Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 400MHz)
cpu0 at mainbus0: SUNW,UltraSPARC-IIi (rev 9.1) @ 400 MHz
cpu0: physical 16K instruction (32 b/l), 16K data (32 b/l), 2048K external (64
b/l)
psycho0 at mainbus0 addr 0xfffc4000: SUNW,sabre, impl 0, version 0, ign 7c0
psycho0: bus range 0-3, PCI bus 0
psycho0: dvma map c000-dfff
pci0 at psycho0
ppb0 at pci0 dev 1 function 1 Sun Simba PCI-PCI rev 0x13
pci1 at ppb0 bus 1
ebus0 at pci1 dev 1 function 0 Sun PCIO EBus2 rev 0x01
auxio0 at ebus0 addr 726000-726003, 728000-728003, 72a000-72a003, 72c000-72c003,
72f000-72f003
power0 at ebus0 addr 724000-724003 ivec 0x25
SUNW,pll at ebus0 addr 504000-504002 not configured
sab0 at ebus0 addr 40-40007f ivec 0x2b: rev 3.2
sabtty0 at sab0 port 0: console
sabtty1 at sab0 port 1
comkbd0 at ebus0 addr 3083f8-3083ff ivec 0x29: no keyboard
comms0 at ebus0 addr 3062f8-3062ff ivec 0x2a
wsmouse0 at comms0 mux 0
lpt0 at ebus0 addr 3043bc-3043cb, 30015c-30015d, 70-7f ivec 0x22: polled
fdthree at ebus0 addr 3023f0-3023f7, 706000-70600f, 72-720003 ivec 0x27
not configured
clock1 at ebus0 addr 0-1fff: mk48t59
flashprom at ebus0 addr 0-f not configured
audioce0 at ebus0 addr 20-2000ff, 702000-70200f, 704000-70400f,
722000-722003 ivec 0x23 ivec 0x24: nvaddrs 0
audio0 at audioce0
hme0 at pci1 dev 1 function 1 Sun HME rev 0x01: ivec 0x7e1, address
00:03:ba:08:72:5a
nsphy0 at hme0 phy 1: DP83840 10/100 PHY, rev. 1
machfb0 at pci1 dev 2 function 0 ATI Mach64 rev 0x5c
machfb0: ATY,GT-C, 1152x900
wsdisplay0 at machfb0 mux 1
wsdisplay0: screen 0 added (std, sun emulation)
pciide0 at pci1 dev 3 function 0 CMD Technology PCI0646 rev 0x03: DMA, channel
0 configured to native-PCI, channel 1 configured to native-PCI

Re: Laffs with Lennart

2011-07-16 Thread Christiano F. Haesbaert
Lennart is a funny, funny man, go check the avahi code to see how nice it is.


When working on Avahi I learned a lot about the complexities of safely and
reliably running and maintaining system services, and about securing 
them as much as possible, which is particularly important for
network facing services like Avahi. I implemented a lot of
pretty nifty features in 
this area in Avahi. For example, Avahi is still pretty much
the *only daemon* on a standard Linux install that chroot()s
itself by default.


-- 
Christiano Farina HAESBAERT
Do NOT send me html mail.



Re: Very strange cvs performance.

2011-07-16 Thread Christiano F. Haesbaert
On Sat, Jul 16, 2011 at 01:12:57PM +0200, Claudio Jeker wrote:
 On Sat, Jul 16, 2011 at 03:16:29AM -0300, Christiano F. Haesbaert wrote:
  Hi there, I have a local mirror of cvs src, everything works fine, except 
  that
  the IO seems to take place in another disk.
  
  I have a very very very very slow udma controller in wd0 (the ultra 5 one):
  
  wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
  
  So I keep my cvs in a faster controller/disk:
  
  wd1(pciide1:2:0): using BIOS timings, Ultra-DMA mode 7
  
  I have this, so you can see, most stuff is on the slow controller. 
  
  /dev/wd0a on / type ffs (local)
  /dev/wd0d on /tmp type ffs (local, nodev, nosuid)
  /dev/wd0g on /usr type ffs (NFS exported, local, nodev)
  /dev/wd0e on /var type ffs (local, nodev, nosuid)
  /dev/wd1a on /data/sta type ffs (NFS exported, local, nodev, nosuid)
  
  Here is the weird part, /cvs points to /data/sta/cvs (which is in the fast
  controller)
  
  lrwxr-xr-x   1 root  wheel   14 Jul 13 19:55 cvs@ - /data/sta/cvs/
  
  Now watch what happends when I 'cvs up' from another machine:
  
  == No cvs up, disk mostly idle ==
  
  gandalf:haesbaert: iostat -w 3 
ttywd0 cd0 wd1 cpu
   tin tout  KB/t t/s MB/s   KB/t t/s MB/s   KB/t t/s MB/s  us ni sy in id
 0   41 11.68   3 0.03   0.00   0 0.00  49.91   5 0.25   1  0  2  1 96
 0   74  0.00   0 0.00   0.00   0 0.00   0.00   0 0.00   0  0  0  0100
 0   98 13.71   7 0.09   0.00   0 0.00   0.00   0 0.00   0  0  0  0100
  
  == cvs up, wd1 transaction should go up roof ==
  gandalf:haesbaert: iostat -w 3 
ttywd0 cd0 wd1 cpu
   tin tout  KB/t t/s MB/s   KB/t t/s MB/s   KB/t t/s MB/s  us ni sy in id
 0   41 11.68   3 0.03   0.00   0 0.00  49.91   5 0.25   1  0  2  1 96
 0   98  9.52 263 2.45   0.00   0 0.00   0.00   0 0.00   5  0  9  3 84
 0   25  9.53 277 2.58   0.00   0 0.00   0.00   0 0.00   1  0  5  0 94
 0   49  9.51 282 2.62   0.00   0 0.00   0.00   0 0.00   2  0  7  1 90
 0   49  9.67 258 2.44   0.00   0 0.00  64.00   0 0.02   1  0  5  1 93
  
  
  But no, IO seems to take place mostly in wd0, I've confirmed swap was not 
  taking
  place, I shut down everything, top showed 100mb+ free:
  
  load averages:  2.23,  1.02,  0.65
  gandalf.midearth 03:12:25
  42 processes:  1 running, 40 idle, 1 on processor
  CPU states:  1.6% user,  0.0% nice,  4.9% system,  0.4% interrupt, 93.2% 
  idle
  Memory: Real: 19M/64M act/tot  Free: 176M  Swap: 16M/1024M used/tot
  
  The user doing the cvs has a home in /home/ which is in wd0.
  I'm also able to hear wd0 (different sound than wd1), so I know fstat is 
  telling
  the truth.
  
  What's hapenning ? I'm pretty sure I'm missing something real simple, just 
  to have
  an insight, a 'cvs up' is taking more than 30min. 
  
 
 cvs is also using /tmp which is on wd0 for temporary files.
 

There it is, thank you !

-- 
Christiano Farina HAESBAERT
Do NOT send me html mail.



Outdated sup(1) information on http://www.openbsd.org/anoncvs.html#MIRROR

2011-07-13 Thread Christiano F. Haesbaert
Since sup(1) is gone, shouldn't this be removed ?

http://www.openbsd.org/anoncvs.html#MIRROR


-- 
Christiano Farina HAESBAERT
Do NOT send me html mail.



Re: nat6 to nat4

2011-07-01 Thread Christiano F. Haesbaert
Thanks a lot, I'll read it with love.

Is there any other alternatives I should know of ?


On 1 July 2011 10:24, David Coppa dco...@gmail.com wrote:
 On Fri, Jul 1, 2011 at 8:31 AM, Peter Hessler phess...@theapt.org wrote:
 On 2011 Jun 30 (Thu) at 18:51:06 -0300 (-0300), Christiano F. Haesbaert
wrote:
 :On 30 June 2011 18:49, Christiano F. Haesbaert haesba...@haesbaert.org
wrote:
 : Hi,
 :
 : I need a ipv6-ipv4 nat. Given an IPv6 packet, I want to redirect it
 : to a IPv4 host.
 : What are my options ?
 :
 : This is a class assignment, and serves nothing.
 :
 :
 :Arggh never mind just found out about gif(4).
 :

 gif(4) won't do nat64.  You'll need some patches from mikeb@.
 Hopefully these will be comitted during the c2k11 hackathon, coming up
 soon.

 http://marc.info/?l=openbsd-techm=130168007430450

 ciao,
 David



Re: nat6 to nat4

2011-07-01 Thread Christiano F. Haesbaert
On 1 July 2011 10:57, Peter J. Philipp p...@centroid.eu wrote:
 On Fri, Jul 01, 2011 at 10:29:09AM -0300, Christiano F. Haesbaert wrote:
 Thanks a lot, I'll read it with love.

 Is there any other alternatives I should know of ?

 Hi Christiano,

 you don't specify where the IPv4 host is (local network or outside), but I
 did some playing with faithd(8) in the past and think you may want to
 check it out.  You just have to be careful not to let outside v6 traffic
 in to faithd as it could be used for proxying (good pf rules needed).

 When I used faithd it was to translate from a FreeBSD jail which only spoke
 v6 to a FreeBSD jail which only spoke v4, I remember being satisfied with
 the test results then, even though it was on FreeBSD.

 Cheers,
 -peter

Great, but gif(4) will be enough, I changed some things, so now I only
need the ip6-ip4 tunnel.

Thanks a lot.



  1   2   3   >