Re: pipex(4): use reference counters for `ifnet'

2020-06-25 Thread Christiano F. Haesbaert
You can. The idea is that ifindex is always monotonically increased, so to actually get a new interface you would have to have "overflowed" 65k interfaces, which is unreal. So if your interface is gone, you can be sure if_get will give you NULL. On Thu, Jun 25, 2020, 18:55 Vitaliy Makkoveev

Re: pipex(4): use reference counters for `ifnet'

2020-06-25 Thread Christiano F. Haesbaert
On Thu, 25 Jun 2020 at 14:06, Vitaliy Makkoveev wrote: > > > > > On 25 Jun 2020, at 11:55, Martin Pieuchot wrote: > > > > On 24/06/20(Wed) 17:10, Vitaliy Makkoveev wrote: > >> While `mbuf' enqueued to `pipexinq' or `pipexoutq' it has the reference > >> to corresponding pipex(4) session as

Re: pool_debug

2017-01-24 Thread Christiano F. Haesbaert
On Tue, 24 Jan 2017 at 09:14, Martin Pieuchot <m...@openbsd.org> wrote: > On 24/01/17(Tue) 08:06, Christiano F. Haesbaert wrote: > > > Not sure I get it, the rwlock when is not released when you yield()). So > > > this will in fact context switch holding the rwlock for

Re: pool_debug

2017-01-24 Thread Christiano F. Haesbaert
Not sure I get it, the rwlock when is not released when you yield()). So this will in fact context switch holding the rwlock for every pool_get(). Did I miss another a change ? On Tue, 24 Jan 2017 at 07:48, Martin Pieuchot wrote: > I'd like to force a yield() for every

Re: timeout_set_proc(9)

2016-10-05 Thread Christiano F. Haesbaert
On 5 October 2016 at 18:26, Ted Unangst <t...@tedunangst.com> wrote: > Christiano F. Haesbaert wrote: >> There is another bug, the thread runs outside of IPL_SOFTCLOCK, the >> interrupt handler already runs at IPL_SOFTCLOCK so it did not need to raise >> it, but the t

Re: timeout_set_proc(9)

2016-10-05 Thread Christiano F. Haesbaert
Am Montag, 26. September 2016 schrieb David Gwynne : > > > On 26 Sep 2016, at 13:36, Ted Unangst > wrote: > > > > David Gwynne wrote: > >> +mtx_enter(_mutex); > >> +while (!CIRCQ_EMPTY(_proc)) { > >> +to =

Re: timeout_set_proc(9)

2016-09-24 Thread Christiano F. Haesbaert
Am Samstag, 24. September 2016 schrieb David Gwynne : > On Fri, Sep 23, 2016 at 10:16:34PM -0700, Philip Guenther wrote: > > On Fri, 23 Sep 2016, Christiano F. Haesbaert wrote: > > ... > > > The diff as it is will deadlock against SCHED_LOCK. > > > tsleep()

Re: timeout_set_proc(9)

2016-09-23 Thread Christiano F. Haesbaert
Am Mittwoch, 21. September 2016 schrieb Martin Pieuchot : > On 21/09/16(Wed) 16:29, David Gwynne wrote: > > [...] > > the point i was trying to make was that the existing stuff (tasks, > timeouts) can be used together to get the effect we want. my point was very > poorly made though. > > > > i

Re: Switch mfii(4) to msi, testing required.

2013-08-05 Thread Christiano F. Haesbaert
On Thu, Jun 06, 2013 at 12:54:31PM +0200, Christiano F. Haesbaert wrote: Hi, We would like to switch mfii(4) to msi, there is a family of supermicro X9 motherboards with incorrect ioapic routing, so they only work properly though msi. If you have a system with a mfii(4) device, please

Switch mfii(4) to msi, testing required.

2013-06-06 Thread Christiano F. Haesbaert
Hi, We would like to switch mfii(4) to msi, there is a family of supermicro X9 motherboards with incorrect ioapic routing, so they only work properly though msi. If you have a system with a mfii(4) device, please give this diff a spin and report back. So far I was able to test on: Supermicro

Re: faithd fcntl diff

2013-02-11 Thread Christiano F. Haesbaert
On 11 February 2013 07:05, Todd T. Fries t...@fries.net wrote: In light of nat64 in pf(4), what purpose does faithd(8) serve anymore? I played with it a bit over a decade ago, but don't recall having any use for it in the last number of years. I vote it gets tedu'ed. I vote for it too, I

Re: profiling kernels

2012-12-14 Thread Christiano F. Haesbaert
On 14 December 2012 13:40, Mike Belopuhov m...@belopuhov.com wrote: On 14 December 2012 13:38, Stuart Henderson s...@spacehopper.org wrote: Are profiling kernels known to be broken at the moment? profiling has never worked on MP kernels... Hmm, that answers :)

Re: hostname.if(5) clarification

2012-11-27 Thread Christiano F. Haesbaert
On 26 November 2012 22:06, Stuart Henderson s...@spacehopper.org wrote: On 2012/11/26 17:40, Jason McIntyre wrote: anyway...i still dislike the idea of just saying order matters. also, could someone really expect the file to not be parsed top down Yes, I think they might; people are used to

Re: upstream vendors and why they can be really harmful

2012-11-06 Thread Christiano F. Haesbaert
Lets be honest, half the problem goes away if Lennart stops hacking.

Re: Goodbye to you my file descriptor

2012-11-03 Thread Christiano F. Haesbaert
On Tue, Oct 30, 2012 at 04:44:36PM +0100, rustyBSD wrote: Le 30/10/2012 15:32, Christiano F. Haesbaert a ?crit : That should be an access(2) call. Yes.Something like this - also moved len to size_t, as strlen() is size_t: --- dired.cWed Mar 14 14:56:35 2012 +++ dired.cTue Oct 30

Re: Goodbye to you my file descriptor

2012-10-30 Thread Christiano F. Haesbaert
On 30 October 2012 14:36, rustyBSD rusty...@gmx.fr wrote: MMmhh... == /usr/src/usr.bin/mg/dired.c == Go look the line 729: if ((fopen(dname,r)) == NULL) { ... Now you can cry What is your point ?

Re: Goodbye to you my file descriptor

2012-10-30 Thread Christiano F. Haesbaert
On 30 October 2012 14:58, Christiano F. Haesbaert haesba...@haesbaert.org wrote: On 30 October 2012 14:36, rustyBSD rusty...@gmx.fr wrote: MMmhh... == /usr/src/usr.bin/mg/dired.c == Go look the line 729: if ((fopen(dname,r)) == NULL) { ... Now you can cry What is your

Re: Goodbye to you my file descriptor

2012-10-30 Thread Christiano F. Haesbaert
On 30 October 2012 15:00, Mike Belopuhov m...@belopuhov.com wrote: On Tue, Oct 30, 2012 at 2:58 PM, Christiano F. Haesbaert haesba...@haesbaert.org wrote: On 30 October 2012 14:36, rustyBSD rusty...@gmx.fr wrote: MMmhh... == /usr/src/usr.bin/mg/dired.c == Go look the line 729

Re: Goodbye to you my file descriptor

2012-10-30 Thread Christiano F. Haesbaert
On 30 October 2012 15:03, Christiano F. Haesbaert haesba...@haesbaert.org wrote: On 30 October 2012 15:00, Mike Belopuhov m...@belopuhov.com wrote: On Tue, Oct 30, 2012 at 2:58 PM, Christiano F. Haesbaert haesba...@haesbaert.org wrote: On 30 October 2012 14:36, rustyBSD rusty...@gmx.fr wrote

Re: Goodbye to you my file descriptor

2012-10-30 Thread Christiano F. Haesbaert
On 30 October 2012 16:45, Okan Demirmen o...@demirmen.com wrote: On Tue, Oct 30, 2012 at 10:32 AM, Christiano F. Haesbaert haesba...@haesbaert.org wrote: On 30 October 2012 15:03, Christiano F. Haesbaert haesba...@haesbaert.org wrote: On 30 October 2012 15:00, Mike Belopuhov m

Re: Goodbye to you my file descriptor

2012-10-30 Thread Christiano F. Haesbaert
On 30 October 2012 16:52, Christiano F. Haesbaert haesba...@haesbaert.org wrote: On 30 October 2012 16:45, Okan Demirmen o...@demirmen.com wrote: On Tue, Oct 30, 2012 at 10:32 AM, Christiano F. Haesbaert haesba...@haesbaert.org wrote: On 30 October 2012 15:03, Christiano F. Haesbaert haesba

Re: Goodbye to you my file descriptor

2012-10-30 Thread Christiano F. Haesbaert
On 30 October 2012 16:57, Okan Demirmen o...@demirmen.com wrote: On Tue, Oct 30, 2012 at 11:53 AM, Christiano F. Haesbaert haesba...@haesbaert.org wrote: On 30 October 2012 16:52, Christiano F. Haesbaert haesba...@haesbaert.org wrote: On 30 October 2012 16:45, Okan Demirmen o...@demirmen.com

Re: mg: revert-buffer

2012-10-12 Thread Christiano F. Haesbaert
I want this baadlyyy, ill have a look. On Oct 12, 2012 12:30 PM, Jasper Lievisse Adriaanse jas...@openbsd.org wrote: Hi, Here's a diff that implement revert-buffer (C-x r). I've split gotoline into the 'goto-line' specifics and the code that actually jumps to the line so it can be

Re: ftp mput recursiv upload diff for testing

2012-10-12 Thread Christiano F. Haesbaert
ok haesbaert, sorry for the slacking :=). On Sat, Aug 11, 2012 at 05:48:13PM +0200, Alexander Bluhm wrote: On Mon, Jul 30, 2012 at 10:30:47AM +0200, Jan Klemkow wrote: Hopefully the final version. Yes, I think this is OK now. If anybody else could have a look at it, I will commit it.

Re: Scheduler improvements

2012-10-08 Thread Christiano F. Haesbaert
On 8 October 2012 11:24, Marc Espie es...@nerim.net wrote: log2 should probably be scrapped, since you're reinventing ffs. That is actually my code, back then I failed at finding an ffs. I'll try to have a look at the code this week.

Re: Scheduler improvements

2012-10-08 Thread Christiano F. Haesbaert
On Oct 8, 2012 6:33 PM, Alexandre Ratchov a...@caoua.org wrote: On Sat, Oct 06, 2012 at 10:38:34PM +0200, Gregor Best wrote: Hi Alexandre, [...] This change is unclear for me; AFAIU, it removes the mechanism which makes processes wake up with a priority depending on what they are

Re: gem(4): simplify gem_attach_pci() variant detection code a bit

2012-09-28 Thread Christiano F. Haesbaert
I prefer a switch too, it shows you acknowledged those variants, anyhow i think the current idiom is bad and should be changed.

Re: gem(4): simplify gem_attach_pci() variant detection code a bit

2012-09-28 Thread Christiano F. Haesbaert
On Fri, Sep 28, 2012 at 02:42:18AM -0400, Brad Smith wrote: On Wed, Sep 26, 2012 at 03:32:37PM -0400, Brad Smith wrote: Simplify the gem(4) variant detection code a bit. OK? How about this.. Index: if_gem_pci.c ===

Re: tcp ping

2012-09-14 Thread Christiano F. Haesbaert
On 14 September 2012 11:39, Stuart Henderson s...@spacehopper.org wrote: On 2012/09/13 13:54, Matthew Dempsky wrote: On Thu, Sep 13, 2012 at 12:02 PM, Ted Unangst t...@tedunangst.com wrote: This adds a -T portnum option to ping. I haven't polished the output because I'm not sure if this is

Re: fix sasyncd(8) race condition causing a segfault when getting data from the kernel

2012-09-04 Thread Christiano F. Haesbaert
I've reviewed this diff with Patrick and I believe it is correct, can someone else have a look ? On Tue, Sep 04, 2012 at 04:46:08PM +0200, Patrick Wildt wrote: When sasyncd(8) dumps data from the kernel, it does a sysctl() for the size to alloc, and a second for the actual data. In between,

Re: System is halted while installing on IBM x 3550 M3 server

2012-08-19 Thread Christiano F. Haesbaert
On 19 August 2012 08:52, mu...@nitrkl.ac.in wrote: Dear all, I am using openbsd 5.1 i386 arch. While installing openbsd5.1 i get these error message. acpi0 at bios0:rev2uvm_fault (0xd07ea4,.) fatal page_fault (6) in supervisor mode trap type 6 code 0eipd02ef7ba cs 8

Re: add WARNINGS infrastructure to ftp

2012-08-14 Thread Christiano F. Haesbaert
Lets make it a bit cleaner, while here also fix some whitespaces. Index: bsd.own.mk === RCS file: /cvs/src/share/mk/bsd.own.mk,v retrieving revision 1.116 diff -d -u -p -r1.116 bsd.own.mk --- bsd.own.mk 12 Apr 2012 11:22:14 -

Re: (2) HTTP basic authentication for ftp(1) (RFC 2617)

2012-08-13 Thread Christiano F. Haesbaert
On Mon, Aug 13, 2012 at 03:02:22AM +0200, Alexander Hall wrote: On 08/06/12 22:56, Christiano F. Haesbaert wrote: Please ignore the other thread, it takes ages for me to open my sent box over gprs, so I'm opening a new one. Index: fetch.c

Re: (2) HTTP basic authentication for ftp(1) (RFC 2617)

2012-08-13 Thread Christiano F. Haesbaert
I think I've hunt this down http://tools.ietf.org/html/rfc3986#section-3.3 If you follow the BNF for path, you have. path - path-absolute - segment-nz - 1*pchar - \ unreserved / pct-encoded / sub-delims / ':' / '@'. So it seems everything is allowed on path, I'll fix the diff.

Re: (2) HTTP basic authentication for ftp(1) (RFC 2617)

2012-08-13 Thread Christiano F. Haesbaert
On Mon, Aug 13, 2012 at 04:33:40PM +0200, Christiano F. Haesbaert wrote: I think I've hunt this down http://tools.ietf.org/html/rfc3986#section-3.3 If you follow the BNF for path, you have. path - path-absolute - segment-nz - 1*pchar - \ unreserved / pct-encoded / sub-delims

Re: (2) HTTP basic authentication for ftp(1) (RFC 2617)

2012-08-13 Thread Christiano F. Haesbaert
Final version, better allocation arith. ok ? Index: fetch.c === RCS file: /cvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.105 diff -d -u -p -r1.105 fetch.c --- fetch.c 30 Apr 2012 13:41:26 - 1.105 +++ fetch.c

add WARNINGS infrastructure to ftp

2012-08-13 Thread Christiano F. Haesbaert
since I'm here already... ok ? Index: Makefile === RCS file: /cvs/src/usr.bin/ftp/Makefile,v retrieving revision 1.25 diff -d -u -p -r1.25 Makefile --- Makefile5 May 2009 19:35:30 - 1.25 +++ Makefile13 Aug 2012

Re: add WARNINGS infrastructure to ftp

2012-08-13 Thread Christiano F. Haesbaert
On Mon, Aug 13, 2012 at 12:34:37PM -0700, Matthew Dempsky wrote: While I recognize there's some precedence in the tree for it already, this seems ugly to me. Is there a reason different programs/libraries need different diagnostic flags? Why doesn't this belong in bsd.own.mk or mk.conf? How

Re: http anchor fix [Was: Re: (2) HTTP basic authentication for ftp(1) (RFC 2617)]

2012-08-11 Thread Christiano F. Haesbaert
:28PM +0200, Christiano F. Haesbaert wrote: Please ignore the other thread, it takes ages for me to open my sent box over gprs, so I'm opening a new one. Index: fetch.c === RCS file: /cvs/src/usr.bin/ftp/fetch.c,v

Re: Reduce IPI traffic from signals

2012-08-11 Thread Christiano F. Haesbaert
Please people, test this diff, we need reports from all architectures if possible. We always hear how much users want to help and so on, so please, test this diff. On Mon, Jul 23, 2012 at 08:45:17PM +0400, Alexander Polakov wrote: This diff reduces IPI traffic for a case when process A is

Re: slight code refactoring in mfi(4)

2012-08-10 Thread Christiano F. Haesbaert
On 10 August 2012 09:09, David Gwynne l...@animata.net wrote: this moves knowledge of where the inbound doorbell on chips is out of code and into the structure that stores the chip differences. ive tested this on a perc5 (which is the xscale gen). id like a skinny user to give it a spin too.

Re: Reduce IPI traffic from signals

2012-07-23 Thread Christiano F. Haesbaert
On 23 July 2012 18:45, Alexander Polakov p...@sdf.org wrote: This diff reduces IPI traffic for a case when process A is sending a lot of signals to process B running on a different CPU. userret() delivers all process signals at once, so there is no need to send an interrupt for every signal.

Re: Build cpu topology on amd64.

2012-07-13 Thread Christiano F. Haesbaert
Ok so here is the version with #ifndef SMALL_KERNEL, the only question that remains is: do we keep the printf in dmesg ? or shall I take that out ? I'd like to keep it so we may know if the detection is correctly just by looking at sent dmesgs. Index: arch/amd64/amd64/identcpu.c

Re: kbd: Use NULL instead of 0 for pointers

2012-07-13 Thread Christiano F. Haesbaert
I like these kind of diffs, some people don't, ok from me. On Fri, Jul 13, 2012 at 03:37:08PM +0600, Alexandr Shadchin wrote: Use NULL instead of 0 for pointers -- Alexandr Shadchin Index: kbd_wscons.c === RCS file:

Re: Build cpu topology on amd64.

2012-07-13 Thread Christiano F. Haesbaert
On Fri, Jul 13, 2012 at 03:06:34PM +0200, Mark Kettenis wrote: Date: Fri, 13 Jul 2012 14:57:11 +0200 From: Christiano F. Haesbaert haesba...@openbsd.org Ok so here is the version with #ifndef SMALL_KERNEL, the only question that remains is: do we keep the printf in dmesg ? or shall I

wakeup should only call need_resched if priority is lower than current one.

2012-07-10 Thread Christiano F. Haesbaert
Heya, wakeup_n() has a inline expansion of setrunnable(), but it differs by always calling need_resched(), this sends an ipi for *every* wakeup channel. It might have something to do with aja's problem. Index: kern_synch.c === RCS

Re: wakeup should only call need_resched if priority is lower than current one.

2012-07-10 Thread Christiano F. Haesbaert
, Jul 10, 2012 at 04:37:13PM +0200, Christiano F. Haesbaert wrote: Heya, wakeup_n() has a inline expansion of setrunnable(), but it differs by always calling need_resched(), this sends an ipi for *every* wakeup channel. It might have something to do with aja's problem. Index: kern_synch.c

tedu sched_peg_curproc()

2012-07-10 Thread Christiano F. Haesbaert
This isn't used, the idle thread just sets the PEG flag and goes on. Index: kern/kern_sched.c === RCS file: /cvs/src/sys/kern/kern_sched.c,v retrieving revision 1.27 diff -d -u -p -r1.27 kern_sched.c --- kern/kern_sched.c 10 Jul

Re: tedu sched_peg_curproc()

2012-07-10 Thread Christiano F. Haesbaert
On 10 July 2012 22:32, Mark Kettenis mark.kette...@xs4all.nl wrote: Date: Tue, 10 Jul 2012 21:44:06 +0200 From: Christiano F. Haesbaert haesba...@openbsd.org This isn't used, the idle thread just sets the PEG flag and goes on. Please don't; I have some stuff that *will* use this. Okayz

tedu old comment about cpu affinity.

2012-07-09 Thread Christiano F. Haesbaert
This no longer applies, it is probably a leftover from the days when we had a global runqueue. Discussed with blambert. ok ? Index: sched_bsd.c === RCS file: /cvs/src/sys/kern/sched_bsd.c,v retrieving revision 1.29 diff -d -u -p

Build cpu topology on amd64.

2012-07-08 Thread Christiano F. Haesbaert
Heya, I have this rotting in my tree, since actually using it effectively is way harder than it seems, anyhow, this correctly builds the topology in amd64, we know 3 things about each cpu now: - thread id (smt id) - core id - package id This is not complete but is enough IMHO, it lacks x2apic

Re: nc(1): Report incoming connections on nc -v -l

2012-07-07 Thread Christiano F. Haesbaert
Still waiting for another ok. On Thu, Jun 28, 2012 at 11:36:27PM -0300, Christiano F. Haesbaert wrote: This looks good to me, can I get another ok ? On Sun, Jun 24, 2012 at 07:07:29AM -0400, Ricky Zhou wrote: On 2012-06-16 02:37:27 PM, Christiano F. Haesbaert wrote: I guess so, I don't

Re: nc -ul semantics

2012-07-07 Thread Christiano F. Haesbaert
How about this one ? It's your original idea, but I don't like that extra indentation level, we are already too deep. Index: nc.1 === RCS file: /cvs/src/usr.bin/nc/nc.1,v retrieving revision 1.60 diff -d -u -p -r1.60 nc.1 --- nc.1

Re: nc(1): Report incoming connections on nc -v -l

2012-06-28 Thread Christiano F. Haesbaert
This looks good to me, can I get another ok ? On Sun, Jun 24, 2012 at 07:07:29AM -0400, Ricky Zhou wrote: On 2012-06-16 02:37:27 PM, Christiano F. Haesbaert wrote: I guess so, I don't use nc too often but it sounds reasonable to me, your code has a few notes though, please check inline

Re: nc -ul semantics

2012-06-28 Thread Christiano F. Haesbaert
Although the idea for using -k with -u is a good one, I don't think it's necessary, I for one think we should change semantics as the first mail suggested. The only real for using connected UDP sockets is to get the ICMP async errors at the socket level, ICMP port unreachable mainly. I see no

Re: nc -ul semantics

2012-06-28 Thread Christiano F. Haesbaert
On Thu, Jun 28, 2012 at 11:44:36PM -0300, Christiano F. Haesbaert wrote: Although the idea for using -k with -u is a good one, I don't think it's necessary, I for one think we should change semantics as the first mail suggested. The only real for using connected UDP sockets is to get

Re: nc(1): Report incoming connections on nc -v -l

2012-06-16 Thread Christiano F. Haesbaert
On Fri, Jun 15, 2012 at 10:43:13AM -0400, Ricky Zhou wrote: This patch adds a message on incoming connections when netcat is run with -l and -v. Does this look like a reasonable addition? I guess so, I don't use nc too often but it sounds reasonable to me, your code has a few notes though,

Re: Diplay 0 connections on tcpbench after last client disconnect.

2012-06-16 Thread Christiano F. Haesbaert
On Sun, Jun 17, 2012 at 01:08:25AM +0200, Alexander Hall wrote: On 06/16/12 01:07, Christiano F. Haesbaert wrote: Hi, this behaviour is really annoying, in tcp server, when the last user disconnects, we don't update the status line, so it keeps showing 1 connected user, it would be better

Diplay 0 connections on tcpbench after last client disconnect.

2012-06-15 Thread Christiano F. Haesbaert
Hi, this behaviour is really annoying, in tcp server, when the last user disconnects, we don't update the status line, so it keeps showing 1 connected user, it would be better to show Conn: 0. BEFORE sauron:haesbaert: tcpbench -s elapsed_ms bytes mbps bwidth 1000

Re: cwm tiling

2012-06-08 Thread Christiano F. Haesbaert
On Jun 8, 2012 9:22 PM, Jérémie Courrèges-Anglas jca+o...@wxcvbn.org wrote: Antoine Jacoutot ajacou...@bsdfrog.org writes: I for one would love cwm to have tiling management. I don't care avout the alternative, they are not in base. Same here. I might migrate to cwm just for the tilling.

Re: ftp-proxy(8): ensure nat_range_high is defined in add_nat()

2012-04-30 Thread Christiano F. Haesbaert
If no one has any objections I'd like to commit this. On Thu, Apr 19, 2012 at 09:07:43PM -0400, Lawrence Teo wrote: On Wed, Apr 18, 2012 at 11:36:49PM -0400, Lawrence Teo wrote: This simple diff adds a check to the add_nat() function in ftp-proxy(8) to ensure that nat_range_high is defined

Re: ftp(1): new -s flag to specify source IP address

2012-04-30 Thread Christiano F. Haesbaert
I'm ok with the diff, can I get another ok before commiting ? On Tue, Apr 24, 2012 at 10:53:34PM -0400, Lawrence Teo wrote: On Wed, Apr 18, 2012 at 11:58:26PM -0400, Lawrence Teo wrote: This diff adds a -s flag to ftp(1) to let the user specify the source IP address of the connection. This

amd64: Check cpu_vendor instead of using CPUID.

2012-04-22 Thread Christiano F. Haesbaert
There's no need for doing that somewhat strange comparison, the rest of the code already uses cpu_vendor. ok ? Index: identcpu.c === RCS file: /cvs/src/sys/arch/amd64/amd64/identcpu.c,v retrieving revision 1.35 diff -d -u -p -r1.35

Re: amd64: Check cpu_vendor instead of using CPUID.

2012-04-22 Thread Christiano F. Haesbaert
- see code bits below change. Consolidating how ? Are you suggesting we change all strcmp calls in kernel to use == 0 ? Please. Franco On 22.04.2012, at 15:12, Christiano F. Haesbaert haesba...@openbsd.org wrote: There's no need for doing that somewhat strange comparison, the rest

Re: amd64: Check cpu_vendor instead of using CPUID.

2012-04-22 Thread Christiano F. Haesbaert
On Sun, Apr 22, 2012 at 09:16:57PM +0200, Franco Fichtner wrote: On Apr 22, 2012, at 7:58 PM, Christiano F. Haesbaert wrote: On Sun, Apr 22, 2012 at 06:36:41PM +0200, Franco Fichtner wrote: Just being paranoid... strncmp? Why ? It's a terminated string vs a string literal, what do you

Re: queue(3) TAILQ example causes compiler warning

2012-03-05 Thread Christiano F. Haesbaert
On Fri, Mar 02, 2012 at 12:46:15AM -0500, Lawrence Teo wrote: The following example code in the queue(3) man page to delete all elements in a tail queue generates a warning in gcc and clang. while (np = TAILQ_FIRST(head)) { TAILQ_REMOVE(head, np, entries);

Re: md5: new -C flag to skip non-existent files in checklist

2012-02-23 Thread Christiano F. Haesbaert
On 23 February 2012 08:46, Mark Kettenis mark.kette...@xs4all.nl wrote: Date: Thu, 23 Feb 2012 10:48:17 +0100 From: Marc Espie es...@nerim.net On Thu, Feb 23, 2012 at 08:16:20AM +, Nicholas Marriott wrote: Hi Is this really much more useful than 2/dev/null? Note the FAILED that

Re: Setting the IPv6 Flow Label for TCP connections

2012-02-15 Thread Christiano F. Haesbaert
On 15 February 2012 13:11, Fernando Gont ferna...@gont.com.ar wrote: Folks, There seems to be a bug in the setting of the IPv6 Flow Label for TCP connections. When an incoming connection is received, the SYN/ACK is always sent with the FL set to zero. It seems that syn_cache_respond() and

Re: fix incorrect document titles in several man pages

2012-02-13 Thread Christiano F. Haesbaert
On 11 February 2012 13:56, Jason McIntyre j...@cava.myzen.co.uk wrote: On Sat, Feb 11, 2012 at 10:26:18AM -0200, Christiano F. Haesbaert wrote: Reads fine to me, any objections ? jmc ? i had just filed this under look at after lock, but if you want to take it on, that's fine. No problem

Re: pf(4) man page: clarify DIOCNATLOOK, new example program

2012-02-09 Thread Christiano F. Haesbaert
Commited, thanks :). On 8 February 2012 01:19, Lawrence Teo l...@lteo.net wrote: On Mon, Feb 06, 2012 at 09:12:35PM -0500, Lawrence Teo wrote: This is a revised version of a diff that sthen@ and I worked on back in May 2011. The original thread and history is at

Re: readdir man page

2012-02-03 Thread Christiano F. Haesbaert
On 3 February 2012 02:50, Philip Guenther guent...@gmail.com wrote: On Thu, Feb 2, 2012 at 5:29 AM, Christiano F. Haesbaert haesba...@haesbaert.org wrote: On 2 February 2012 10:13, Laurence Tratt lau...@tratt.net wrote: To my surprise (and a couple of hours debugging later), readdir does

Re: readdir man page

2012-02-03 Thread Christiano F. Haesbaert
On 3 February 2012 03:29, Philip Guenther guent...@gmail.com wrote: On Thu, 2 Feb 2012, Philip Guenther wrote: I also think readdir() should set errno if it detects an invalid seekdir(). EINVAL seems correct. Here's a diff for this bit. oks? Philip Guenther Index: gen/readdir.c

Re: readdir man page

2012-02-02 Thread Christiano F. Haesbaert
On 2 February 2012 10:13, Laurence Tratt lau...@tratt.net wrote: To my surprise (and a couple of hours debugging later), readdir does not necessarily set errno even if NULL is returned. This is rather confusing because if NULL is returned two things might have happened: 1) The end of the

Re: tcpbench: setpgid

2012-01-31 Thread Christiano F. Haesbaert
On 31 January 2012 13:50, Erik Lax e...@halon.se wrote: Hi, I noticed that tcpbench tries to setpgid() for no obvious reason (to me) since it's not forked anymore. Previously, 2 years ago it was fork()ed and utilized killpg() etc. Could this be a leftover? I'm running into issues spawning

tcpbench: Don't use floating precision while printing PPS in UDP mode.

2012-01-28 Thread Christiano F. Haesbaert
Moin, I think it doesn't make sense for PPS, also, the rounding is wrong so we always get .000 This makes the output go from: Elapsed: 11685 Mbps: 63.602 Peak Mbps: 63.602 Rx PPS: 5401.000 to: Elapsed: 15000 Mbps:1227.177 Peak Mbps:1245.347 Tx PPS: 104210 ok

Re: tcpbench: add timer command-line option

2012-01-26 Thread Christiano F. Haesbaert
On 26 January 2012 12:30, Henning Brauer lists-openbsdt...@bsws.de wrote: * Lawrence Teo l...@lteo.net [2012-01-26 03:13]: This diff adds a timer to tcpbench as a command-line option (-t) so that it is possible to stop the tcpbench client after a certain number of seconds. This makes it easier

New puc(4) device: quad rs232 found on ebay.

2012-01-08 Thread Christiano F. Haesbaert
I bought this cheap chinese device from ebay, after tweaking a bit with puc and some help from sthen@, it works fine, tested devices tty02 and tty03. The thing is I've no idea which vendor it is, noir which device it is, the only thing written on the card is Sun 1040. The vendor-id and device-id

Re: New puc(4) device: quad rs232 found on ebay.

2012-01-08 Thread Christiano F. Haesbaert
Forgot the pcidump: 2:2:0: unknown unknown 0x: Vendor ID: 5372 Product ID: 6873 0x0004: Command: 0041 Status ID: 0400 0x0008: Class: 07 Subclass: 80 Interface: 00 Revision: 01 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 08

Re: [BUG] pfctl(8) silently accept directories as config files

2012-01-02 Thread Christiano F. Haesbaert
On 2 January 2012 06:58, Henning Brauer lists-openbsdt...@bsws.de wrote: what next? having pfctl whine about an empty config file? * Stephane A. Sezer s...@cd80.net [2012-01-02 09:36]: Hi, I found a strange behavior in pfctl(8) which looks like a bug. When given a directory as input

Re: ifconfig ieee80211 scan error to stderr

2011-12-02 Thread Christiano F. Haesbaert
On 2 December 2011 03:35, Philip Guenther guent...@gmail.com wrote: On Thu, Dec 1, 2011 at 6:45 PM, Christiano F. Haesbaert haesba...@openbsd.org wrote: Hi, I think we should warn() on any error, not just EPERM. This is more consistent with the rest of the code. ok ? I disagree

Re: ifconfig ieee80211 scan error to stderr

2011-12-01 Thread Christiano F. Haesbaert
Hi, I think we should warn() on any error, not just EPERM. This is more consistent with the rest of the code. ok ? Index: ifconfig.c === RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v retrieving revision 1.252 diff -d -u -p -b

Re: ifconfig ieee80211 scan error to stderr

2011-11-30 Thread Christiano F. Haesbaert
On 30 November 2011 12:39, Thomas de Grivel tho...@lowh.net wrote: Hi, Index: ifconfig.c === RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v retrieving revision 1.252 diff -u -p -r1.252 ifconfig.c --- ifconfig.c26 Nov 2011

Expose some scheduler statistics to userland via sysctl

2011-11-17 Thread Christiano F. Haesbaert
Moving this to tech@ Hi, I was studying the scheduler code after watching tedu's talk, I'd like to expose this statistics to userland so that I can try playing with cache affinity in the future: gimli:src: sysctl kern.schedstat

Re: Expose some scheduler statistics to userland via sysctl

2011-11-17 Thread Christiano F. Haesbaert
On 17 November 2011 23:39, Ted Unangst t...@tedunangst.com wrote: On Fri, Nov 18, 2011, Thordur Bjornsson wrote: On 2011 Nov 17 (Thu) at 21:18:24 -0200 (-0200), Christiano F. Haesbaert wrote: Moving this to tech@ Hi, I was studying the scheduler code after watching tedu's talk, I'd like

Re: Expose some scheduler statistics to userland via sysctl

2011-11-17 Thread Christiano F. Haesbaert
On 18 November 2011 00:59, Christiano F. Haesbaert haesba...@haesbaert.org wrote: On 17 November 2011 23:39, Ted Unangst t...@tedunangst.com wrote: On Fri, Nov 18, 2011, Thordur Bjornsson wrote: On 2011 Nov 17 (Thu) at 21:18:24 -0200 (-0200), Christiano F. Haesbaert wrote: Moving this to tech

Re: [panc...@nopcode.org: License]

2011-10-14 Thread Christiano F. Haesbaert
On 14 October 2011 17:19, Ted Unangst t...@tedunangst.com wrote: On Fri, Oct 14, 2011, Edd Barrett wrote: Hi guys, A port I am maintaining uses our file(1) implementation. A debian dev who was packaging this thinks he has spotted a license bug. Said I would forward his mail onto OpenBSD, so

Re: enable aucat by default

2011-10-06 Thread Christiano F. Haesbaert
On 6 October 2011 17:26, Alexandre Ratchov a...@caoua.org wrote: On Thu, Oct 06, 2011 at 08:58:16PM +0200, Ingo Schwarze wrote: Hi Alexandre, Alexandre Ratchov wrote on Thu, Oct 06, 2011 at 08:29:26PM +0200: On the one hand, we expect audio to work by default. On the other hand format

Re: file(1): prevent printing unknown magic filename

2011-10-04 Thread Christiano F. Haesbaert
Now thinking again I see no much point in my diff, I prefer yours as it's easier to update to a newer file(1), no point in changing only this. ok from me. On Wed, Sep 28, 2011 at 12:33:13AM -0300, Christiano F. Haesbaert wrote: On Thu, Sep 22, 2011 at 03:56:11PM +0100, Edd Barrett wrote: Hi

Re: fix a seg and minor improvements to config(8)

2011-10-01 Thread Christiano F. Haesbaert
Makes sense to me, ok. Later we should fix the include orderning and change the warning printfs to stderr. Can we get another ok ? On Wed, Sep 28, 2011 at 02:37:34AM +0100, Edd Barrett wrote: Evening, When using `config -e`: * Don't print a NULL pointer if binary loaded is not a kernel.

Re: file(1): prevent printing unknown magic filename

2011-09-27 Thread Christiano F. Haesbaert
On Thu, Sep 22, 2011 at 03:56:11PM +0100, Edd Barrett wrote: Hi, An upstream of one of the ports I work on (radare2) has imported our file(1) implementation and claims to have found bugs. This is the first: 'ms-file' will only be assigned to 'fn' after a call to apprentice_load() and

Re: sftp upload diff similar to scp

2011-09-19 Thread Christiano F. Haesbaert
Not sure if I got this, but why not using scp then ? On 19 September 2011 14:52, elitter.net logana...@elitter.net wrote: It's annoying to upload using interactive mode. This diff works like scp. sftp localfile user@host:dir Index: sftp.c

Re: ctags(1) and mg

2011-09-02 Thread Christiano F. Haesbaert
On 2 September 2011 14:17, Matthew Dempsky matt...@dempsky.org wrote: On Fri, Sep 2, 2011 at 8:55 AM, Sunil Nimmagadda su...@sunilnimmagadda.com wrote: This diff adds tags support to Mg. I am NOT an emacs user so if this combination is a bit odd then please excuse. It parses the tags file

Re: passing vlan priority tag through bridge

2011-08-27 Thread Christiano F. Haesbaert
Heya, So here is a crude diff, the shiffting can be improved and if we wan't this in the future we'll need a knob to enable don't touch the vlanprio thingy. Please it would be great if you can give this a spin Peter. I did some basic tests with a re(4) (hw tagging) and a rl(4) (no hw tagging).

Re: TOS option to tcpbench ala pf.conf

2011-08-21 Thread Christiano F. Haesbaert
Hi, So here is the final version using -T with IPv6 with some points addressed by jmc@ in the manual. ok to commit ? Index: tcpbench.1 === RCS file: /cvs/src/usr.bin/tcpbench/tcpbench.1,v retrieving revision 1.12 diff -d -u -p -w

Re: passing vlan priority tag through bridge

2011-08-21 Thread Christiano F. Haesbaert
On Fri, Aug 19, 2011 at 09:07:42AM +0200, Peter Hallin wrote: Hello, I have a question. We use bridging firewalls at Lund University with different vlan tags on respective sides of the bridges. The frames are therefore retagged when passing through the bridge and unforunatley the priority

Re: TOS option to tcpbench ala pf.conf

2011-08-20 Thread Christiano F. Haesbaert
On Fri, Aug 19, 2011 at 11:25:23PM +1000, Damien Miller wrote: Thanks, I like this. Could you add IPV6_TCLASS for IF_INET6 too? So here is the version with IPV6_TCLASS and -T instead of -t, since only traceroute uses -t, while ping and nc uses -T. I did some basic tests but my knowledge of

Re: ifconfig old wpapsk entry and cleanup.

2011-08-20 Thread Christiano F. Haesbaert
keeping this up. On Wed, Aug 17, 2011 at 12:42:02AM -0300, Christiano F. Haesbaert wrote: Hi Remove the old wpapsk cmd entry, remove unnecessary casts in malloc/calloc, use timerclear macro plus minor style(9): Index: ifconfig.c

TOS option to tcpbench ala pf.conf

2011-08-19 Thread Christiano F. Haesbaert
Hi, I'm tinkering with ToS-CoS (802.1p) translation in vlan(4) so I needed something to test, tcpbench seems to deserve a tos option. It uses the same map_option() from pfctl with some minor tweeks. So it accepts decimal, hexadecimal, critical, lowdelay, af11... Option chosen was -t, couldn't

Re: TOS option to tcpbench ala pf.conf

2011-08-19 Thread Christiano F. Haesbaert
On 19 August 2011 10:25, Damien Miller d...@mindrot.org wrote: On Thu, 18 Aug 2011, Christiano F. Haesbaert wrote: Hi, I'm tinkering with ToS-CoS (802.1p) translation in vlan(4) so I needed something to test, tcpbench seems to deserve a tos option. It uses the same map_option() from pfctl

Small fixes for if_oerrors in vlan(4), mpe(4) and pppx

2011-08-19 Thread Christiano F. Haesbaert
Hi, vlan_start() was increasing packet counts before checking if the packet was successfully enqueued. I made a hunt for similar errors. Index: net/if_mpe.c === RCS file: /cvs/src/sys/net/if_mpe.c,v retrieving revision 1.25 diff -d

  1   2   >