Re: Network stack changes

2013-09-14 Thread Sam Fourman Jr.
>

> And any time you increase latency, that will have a negative impact on
> NFS performance. NFS RPCs are usually small messages (except Write requests
> and Read replies) and the RTT for these (mostly small, bidirectional)
> messages can have a significant impact on NFS perf.
>
> rick
>
>
this may be a bit off topic but not much... I have wondered with all of the
new
tcp algorithms
http://freebsdfoundation.blogspot.com/2011/03/summary-of-five-new-tcp-congestion.html

what algorithm is best suited for NFS over gigabit Ethernet, say FreeBSD to
FreeBSD.
and further more would a NFS optimized tcp algorithm be useful?

Sam Fourman Jr.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


the Newcons Project

2013-03-30 Thread Sam Fourman Jr.
My understanding of this whole subject is limited, but bear with me...  in
my quest to get a "cool looking console for my desktop... I found this
https://wiki.freebsd.org/Newcons

does anyone know if someone is still actively working on the NewCons
project? or is it already committed to HEAD and i just don't realize? the
wiki is a bit confusing...

I would VERY much be able to have a console that looked like this in FreeBSD

http://wiki.gentoo.org/images/7/7c/Bootsplash.png

but if my understanding is correct, we are not at this point (yet)... even
if you pull the development source from here

svn co svn://svn.freebsd.org/base/user/ed/newcons

and change the kernel config like this:

#device vga # VGA video card driver
#device sc
device vt
device vt_vga


could someone with more understanding of this, be able to tell me if the
Newcons project (when completed) is even going to do what i'm looking for?

if so, exactly what things have to be done yet, in order for FreeBSD to
have a console like Gentoo?


-- 

Sam Fourman Jr.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: cvs deprecated

2012-12-27 Thread Sam Fourman Jr.
On Thu, Dec 27, 2012 at 4:18 AM, Wojciech Puchar
 wrote:
> but i can't find "moron guide" for using svn to update tree.

I cant seem to find a way to handle conflicts, ive tried to do svn
revert on every directory, but there is always more... maybe svn just
isnt a good way to keep your ports tree current

 svn up
Updating '.':
Skipped 'databases' -- Node remains in conflict
Skipped 'irc' -- Node remains in conflict
Skipped 'lang' -- Node remains in conflict
Skipped 'security/cyrus-sasl2' -- Node remains in conflict
Skipped 'x11/keybinder' -- Node remains in conflict
Skipped 'net-mgmt' -- Node remains in conflict
At revision 309546.
Summary of conflicts:
  Skipped paths: 6

-- 

Sam Fourman Jr.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Using PC-Sysinstall for automated network installs of FreeBSD

2012-11-19 Thread Sam Fourman Jr.
On Fri, Nov 16, 2012 at 7:35 PM, Warren Block  wrote:

> On Fri, 16 Nov 2012, Mark Saad wrote:
>
>  Useful paths on /export, /export/install/freebsd/9.1/{**i386,amd64}
>> this is the contents of the install media rsync'd to a local filesystem
>>
>
> Do you have a way to choose either i386 or amd64 installs?
>
>
>  5 I changed my rc.conf to start a simple shell script and not the
>> bsdinstall bits
>>
>
> Maybe you mean "/etc/rc.local" there?
>
>
>  export TERM=vt220
>>
>> echo "o  PC-SYSINSTALL "
>> exec /conf/picker.sh
>>
>
this is a interesting place to start on a custom USB installer, as i Want
to learn more about how make release works, where would I look or rather
what would I modify to get make release generate a larger memstick image,
so that it has a few mb of free space on the image..



> --
>

Sam Fourman Jr.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Custom FreeBSD usb memstick

2012-11-08 Thread Sam Fourman Jr.
hello hackers@

I have a interest in playing around with the scripts that create  the
memstick image when you run make release...
can anyone point me in the right direction, how would I go about
modifying the size of the partition that gets created on the memstick
image

-- 

Sam Fourman Jr.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: pgbench performance is lagging compared to Linux and DragonflyBSD?

2012-11-05 Thread Sam Fourman Jr.
> The important item that has been left out (or is just implied as OS level
> defaults) is sysctl/tunable variables set in the *BSD OSes (on DFly,
> FreeBSD, and NetBSD). Unfortunately (based on my experience) FreeBSD could
> be a lot better when it comes to defaults, and more tuning is required to
> get better performance. So if they're working with the OS defaults, this
> might not be a fair equivalent to the best performance that FreeBSD can
> yield, but it's probably fair to do this for the sake of repeatability and
> to prove what these OSes can do out of the box. This is in addition to the
> [lock] contention issues that jeffr@ and a few others are working on
> alleviating.
>

has someone wrote a howto for how to tune pgsql 9+ in FreeBSD?
im mostly asking here to get information posted here for future
reference, as google will pick this thread up and it will help others.
-- 

Sam Fourman Jr.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: What happened to my /proc/curproc/file?

2012-09-04 Thread Sam Varshavchik

John Baldwin writes:


On Tuesday, September 04, 2012 7:10:42 am Sam Varshavchik wrote:
> Konstantin Belousov writes:
>
> > The procfs links, as well as any other user of vn_fullpath(9) function,
> > can only translate a vnode to path if namecache contains useful data.
> > As such, the facilities are not guaranteed to success all the time.
> >
> > In case of rmdir(2), UFS explicitely purges the cache for directory which
> > contained direntry of the removed directory. I suspect that you have
> > your test program binary located in the same directory which was the  
parent

> > of the removed one.
>
> Correct. Looks like the same thing applies if I try to use sysctl to get
> KERN_PROC_PATHNAME.
>
> I need some reliable way to get a process's executable file's name, as long
> as it's meaningful (the executable file hasn't been removed).

There isn't one.  What if the file is renamed, or what if it was executed via
a symlink that has been removed?


If the file is renamed, shouldn't its new name be known? If I give the  
file's supposed new name to realpath(3), its man page says I'll get back

the equivalent absolute pathname. Works for me.

And, I thought that the resolved pathname, in any case, would be the one  
after all the symlink resolution takes place, like /proc shows on Linux: if,  
say, I have /usr/local symlinked to /mnt/local-mnt,  
exec("/usr/local/bin/furgle") gives me a process that, according to /proc,  
is /mnt/local-mnt/bin/furgle.


 What if there are multiple hard links,  
which

one is the "correct" path to return?


I would say whichever one of them was used to exec() the process. But either  
one would be ok, I suppose.


  The namecache bits are a best effort,  
but
if those are purged, the only approach are left with is a brute-force crawl  
of

the filesystem looking for a file whose stat() results match your executable.


Well, for logging purposes, after I get a client process's credentials  
passed through a domain socket, I was hoping to use the credentials' pid to  
log the process's executable name. At least that's the code that I'm porting  
is doing; but this is going to throw a big monkey wrench into the whole  
thing.


Is the dev+ino of what was exec()ed known, for another process? I might be  
able to get the client voluntarily submit its argv[0], then independently  
have the server validate it by stat()ing that, and comparing the result  
against what the kernel says the process's inode is.




pgpd8Y9zf7Zn8.pgp
Description: PGP signature


Re: What happened to my /proc/curproc/file?

2012-09-04 Thread Sam Varshavchik

Konstantin Belousov writes:


The procfs links, as well as any other user of vn_fullpath(9) function,
can only translate a vnode to path if namecache contains useful data.
As such, the facilities are not guaranteed to success all the time.

In case of rmdir(2), UFS explicitely purges the cache for directory which
contained direntry of the removed directory. I suspect that you have
your test program binary located in the same directory which was the parent
of the removed one.


Correct. Looks like the same thing applies if I try to use sysctl to get  
KERN_PROC_PATHNAME.


I need some reliable way to get a process's executable file's name, as long  
as it's meaningful (the executable file hasn't been removed).





pgp3du4KHyLZn.pgp
Description: PGP signature


What happened to my /proc/curproc/file?

2012-09-03 Thread Sam Varshavchik
Am I the only one who's seeing this weirdness with procfs on 9.0-RELEASE-p3.  
Unless I'm overlooking something stupid, a process that rmdir(2)s a  
subdirectory of its current directory ends up with a broken  
/proc/curproc/file symlink:


[mrsam@freebsd ~/stasher/stasher]$ cat t.c
#include 
#include 
#include 

void dump(int n)
{
char buf[2048];

printf("Line %d, rc=%s\n", n,
   (readlink("/proc/curproc/file", buf, 2048) < 0 ? "err":"ok"));
}

int main(int argc, char **argv)
{
dump(__LINE__);
mkdir("conftestdir.tst", 0777);
rmdir("conftestdir.tst");
dump(__LINE__);
}
[mrsam@freebsd ~/stasher/stasher]$ cc -o t t.c
[mrsam@freebsd ~/stasher/stasher]$ ./t
Line 15, rc=ok
Line 18, rc=err

???



pgp8on2RgFH47.pgp
Description: PGP signature


TeXLive merge into FreeBSD ports tree - FreeBSD project idea

2012-05-26 Thread Sam Lin
 Hi FreeBSD fellows,

Those who are using LaTeX on FreeBSD must know that tetex has been
discontinued years ago and that TeXLive is now recommended, however TeXLive
has never been merged in the ports tree on FreeBSD and that tetex is still
used on FreeBSD ports. Although there have been some "customized" work so
that FreeBSD users can install and use TeXLive on FreeBSD machine (for
example, http://code.google.com/p/freebsd-texlive/wiki/Installing), this is
quite confusing and may still cause conflict on the system side when using
or maintaining it.

There has also been years of gossips that a Japanese developer Hiroki Sato
(hrs@freebsd) has been working on this matter for the last years and
therefore the FreeBSD admin panel don't want anyone else to work on this
and merge it into the ports tree.

I actually contacted Hiroki Sato in the beginning of last year (2011)
regarding this, and in his reply he said that there had been several
technical issues but most of them had been solved and almost ready to merge
into the port tree, and that he was planning to go forward after the
8.2/7.4 releases (one or two weeks later from that time stage) are out.
However, more than a year has passed since then and still nothing happened.
I tried to contact him several times after that (email, tweet, etc) but
haven't heard anything back from him at all.

Is TeXLive really going to be merged into the FreeBSD ports tree as Hiroki
Sato mentioned previously? Or is this just a myth??

I am now thinking that this should be put into the "FreeBSD Project ideas
List" [http://wiki.freebsd.org/IdeasPage].

Regards,
Sam
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: possible NFS lockups

2010-07-30 Thread Sam Fourman Jr.
On Tue, Jul 27, 2010 at 10:29 AM, krad  wrote:
> I have a production mail system with an nfs backend. Every now and again we
> see the nfs die on a particular head end. However it doesn't die across all
> the nodes. This suggests to me there isnt an issue with the filer itself and
> the stats from the filer concur with that.
>
> The symptoms are lines like this appearing in dmesg
>
> nfs server 10.44.17.138:/vol/vol1/mail: not responding
> nfs server 10.44.17.138:/vol/vol1/mail: is alive again
>
> trussing df it seems to hang on getfsstat, this is presumably when it tries
> the nfs mounts
>

I also have this problem, where nfs locks up on a FreeBSD 9 server
and a FreeBSD RELENG_8 client


-- 

Sam Fourman Jr.
Fourman Networks
http://www.fourmannetworks.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: kernel patch needed for wine?

2010-07-13 Thread Sam Fourman Jr.
On Tue, Jul 13, 2010 at 3:11 AM, Sergei Hedgehog  wrote:
> On Monday 12 July 2010 15:25:13 Tijl Coosemans wrote:
>> Could you give the attached patch a try?
>>
>> cd /usr/src
>> patch -p1 < /path/to/patch-amd64-dr7
>> make buildkernel installkernel
>
> Looks like everything works fine, except that game is crashing sometimes at
> login. But linux guys reports same behavior after patching their kernel.
>

on several systems I am having no issue after applying the patch
-- 

Sam Fourman Jr.
Fourman Networks
http://www.fourmannetworks.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: kernel patch needed for wine?

2010-07-12 Thread Sam Fourman Jr.
On Mon, Jul 12, 2010 at 7:25 AM, Tijl Coosemans  wrote:
> On Wednesday 30 June 2010 01:54:11 Sam Fourman Jr. wrote:
>> Last Tuesday blizzard release World of Warcraft 3.3.5, and with this
>> patch World of warcraft stopped working in FreeBSD 8.1 amd64, it
>> crashes right after login.
>>
>> I have been playing World of Warcraft on FreeBSD amd64 since December
>> of 2009 using the beta Nvidia 64bit drivers and this wine how-to
>>
>> http://wiki.freebsd.org/Wine#head-6963d527c173e57b1567e881305b544d33435b6d
>>
>> I can verify that on PCBSD 8.1 RC1 32bit World of warcraft works post
>> 3.3.5 so far as I can tell it is only broken on amd64.
>
> Could you give the attached patch a try?
>
> cd /usr/src
> patch -p1 < /path/to/patch-amd64-dr7
> make buildkernel installkernel
>

I can confirm that this fixes wow post 3.3.5
on FreeBSD amd64 using cvs tag RELENG_8

it also works on PC-BSD 8.1 amd64 with the applied patch
-- 

Sam Fourman Jr.
Fourman Networks
http://www.fourmannetworks.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: kernel patch needed for wine?

2010-06-30 Thread Sam Fourman Jr.
> i386 32bit-mode page table has no NX bit - the PAE page table has...

You are correct, I went in my BIOS, and disabled execute bit.

Then when I run the test C code, the get "trapped" just as expected
 on both 8.1 amd64 and CURRENT amd64
however World of warcraft still segfaults even though execute bit is
disabled in BIOS.

I guess I am just confused on how linux fixed this with this patch

http://bugs.winehq.org/attachment.cgi?id=29155


Sam Fourman Jr.
Fourman Networks
http://www.fourmannetworks.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: kernel patch needed for wine?

2010-06-30 Thread Sam Fourman Jr.
> Also, is there perhaps a sideeffect dealing with the size of a char on
> FreeBSD vs Linux?
>
> That's a pretty badass way to load assembler instructions on the stack :).
>
> Thanks!
> -Garrett


For what it is worth I ran the test code on one of my NetBSD amd64 Xen
Dom0 servers
it generated "trapped" as expected

# gcc test.c -o test
# ./test
trapped
# uname -a
NetBSD  5.99.27 NetBSD 5.99.27 (XEN3_DOM0) #0: Tue Apr 20 21:04:16 CDT
2010  root@:/usr/objdir/sys/arch/amd64/compile/XEN3_DOM0 amd64


-- 

Sam Fourman Jr.
Fourman Networks
http://www.fourmannetworks.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: kernel patch needed for wine?

2010-06-30 Thread Sam Fourman Jr.
> Also, is there perhaps a sideeffect dealing with the size of a char on
> FreeBSD vs Linux?
>
> That's a pretty badass way to load assembler instructions on the stack :).
>
> Thanks!
> -Garrett


Garrett,

So is this in-fact a FreeBSD kernel bug on amd64?
if so, how hard would it be to patch it so it worked?

becasue I bet if we fix this World of Warcraft will work again in wine.
-- 

Sam Fourman Jr.
Fourman Networks
http://www.fourmannetworks.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: kernel patch needed for wine?

2010-06-30 Thread Sam Fourman Jr.
On Wed, Jun 30, 2010 at 11:26 AM, Garrett Cooper  wrote:
> On Wed, Jun 30, 2010 at 8:43 AM, Sam Fourman Jr.  wrote:
>>> Which patch ? icebp generates the SIGTRAP on latest 8-stable, verified
>>> by the following trivival assembler program:
>>>        .text
>>>        .globl  main
>>> main:
>>>        .byte   0xf1
>>>        xorl    %edi,%edi
>>>        call    exit
>>>
>>

Here is the C program that the linux people used as a test case.

***
#include 
#include 



void trap_handler(int sig)
{
printf("trapped\n");
}


/*
 * icebp
 * ret
 */
char icebp_func[] = "\xf1\xc3";
typedef void (*icebp_call)(void);

int main(int argc, char **argv)
{
icebp_call func = (icebp_call)icebp_func;

signal(SIGTRAP, trap_handler);

func();

return 0;
}

***

My question is why doe the above code not print trapped on amd64?

FreeBSD 8.1 i386 this code prints "Trapped" as intended
FreeBSD 8.1 amd64 this code prints "Segmentation fault: 11"
FreeBSD 8.1 amd64 chrooted to 32bit prints "Segmentation fault"

I did verify that from Linux amd64 this works and prints "Trapped"
uname -a
Linux workstation 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 08:03:28
UTC 2010 x86_64 GNU/Linux


Thank you much for everyones help


Sam Fourman Jr.
Fourman Networks
http://www.fourmannetworks.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: kernel patch needed for wine?

2010-06-30 Thread Sam Fourman Jr.
> Which patch ? icebp generates the SIGTRAP on latest 8-stable, verified
> by the following trivival assembler program:
>        .text
>        .globl  main
> main:
>        .byte   0xf1
>        xorl    %edi,%edi
>        call    exit
>

Thank you for your reply, I did not know enough assembly to test this
I just assumed since it stopped working at the same time as it did on
linux that it must be the same bug.
I have updated the wine bug, with your information here:

http://bugs.winehq.org/show_bug.cgi?id=23323#c118

Does anyone have any ideas as to what could be causing this?
or is there anything else I can do to get more useful info to debug this?

-- 

Sam Fourman Jr.
Fourman Networks
http://www.fourmannetworks.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


kernel patch needed for wine?

2010-06-29 Thread Sam Fourman Jr.
Hello FreeBSD hackers.

Last Tuesday blizzard release World of Warcraft 3.3.5, and with this patch
World of warcraft stopped working in FreeBSD 8.1 amd64, it crashes
right after login.

details here:
http://bugs.winehq.org/show_bug.cgi?id=23323

in the above thread a wine developer stated the problem is this:

WoW uses opcode 0xf1 (icebp) and expects to see a single step exception,
probably as a way to detect hardware debuggers. With the kernel change icebp is
no longer raising a SIGTRAP since it doesn't set any dr6 bits, so WoW doesn't
get its exception.

Linux fixed this with this kernel patch
https://bugzilla.kernel.org/show_bug.cgi?id=16315


I have been playing World of Warcraft on FreeBSD amd64 since December of 2009
using the beta Nvidia 64bit drivers and this wine how-to

http://wiki.freebsd.org/Wine#head-6963d527c173e57b1567e881305b544d33435b6d

I can verify that on PCBSD 8.1 RC1 32bit World of warcraft works post 3.3.5
so far as I can tell it is only broken on amd64.

Would someone be able to comment on weather a patch is indeed needed
on FreeBSD amd64?

Thank you
-- 

Sam Fourman Jr.
Fourman Networks
http://www.fourmannetworks.com
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: hifn(4) DMA fix for review

2010-05-10 Thread Sam Leffler


On May 7, 2010, at 12:13 PM, Oleksandr Tymoshenko wrote:


   Proposed patch addresses hifn(4) problems on FreeBSD/mips. Current
implementation keeps some of the state information (indexes in
buffers, etc) in DMA-mapped memory and bus_dma code invalidates them
during sync operations. This fix moves data that doesn't belong to DMA
ring to softc structure.

Patch: http://people.freebsd.org/~gonzo/hifn.diff
Stats for original driver:
   http://people.freebsd.org/~gonzo/hifn.stats.orig.txt
Stats for patched version:
   http://people.freebsd.org/~gonzo/hifn.stats.patched.txt




The changes look fine and make sense (did something similar for some  
other drivers for when the dma data structures were mapped uncached).   
I can't see any performance change in your stats; but I'm just  
eyeballing the numbers side-by-side.  Was this on x86? (where there  
should be zero difference)  It would be good to present these numbers  
better (e.g. curves on the same graph, ministat output, etc).


Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: hifn(4) DMA fix for review

2010-05-10 Thread Sam Leffler


On May 9, 2010, at 3:16 PM, Patrick Lamaiziere wrote:


Le Fri, 07 May 2010 12:13:20 -0700,
Oleksandr Tymoshenko  a écrit :

Hi,


Proposed patch addresses hifn(4) problems on FreeBSD/mips.
Current implementation keeps some of the state information (indexes  
in

buffers, etc) in DMA-mapped memory and bus_dma code invalidates them
during sync operations. This fix moves data that doesn't belong to  
DMA

ring to softc structure.


I do not have any comment but I will try on my Soekris (the next
weekend) if it can help.

I noticed several things in hifn, if you want to look:
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/130286

IMHO some locks are missing in the use of sc->sc_sessions (the array
containing the sessions) : in hifn_newsession(), if there is no space
left in sc->sc_sessions, a new array is allocated and the sessions are
copied to it. Unfortunaly, sc->sc_sessions is used in hifn_process
without any lock and we use some pointers on the array (my patch  
should

addresses this if I remember...).


Isn't this just the glx locking? (no offense intended)  I've said  
before I think we to move session management up into the crypto layer  
since it's implemented in many drivers (usually w/ c&p of the same  
code as you noted here sometimes a bit different).


Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Going from struct disk to a fh?

2010-04-16 Thread Sam Robb
On Apr 14, 2010, at 5:18 PM, John Baldwin wrote:

> On Wednesday 14 April 2010 9:08:50 am Sam Robb wrote:
>> In the kernel, given a struct disk, is there a way to turn that into 
> something that can be used to read/write from the disk? Or is my best bet in 
> this situation to figure out the device path for the disk, and just use 
> kern_open() to access it?
> 
> You can use dp->d_geom as the target of a bio via GEOM I think.  However, I 
> don't have experience with sending bio's to a specific GEOM directly.  File 
> systems usually use geom_vfs to feed requests from bread(), etc. to a mounted 
> disk device using a devfs vnode for the associated disk device.

Thanks, John.  I've found another way around my problem in user space; if I 
revisit the kernel solution, I'll take a look at using bio.

-Samrobb___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Going from struct disk to a fh?

2010-04-14 Thread Sam Robb
In the kernel, given a struct disk, is there a way to turn that into something 
that can be used to read/write from the disk? Or is my best bet in this 
situation to figure out the device path for the disk, and just use kern_open() 
to access it?

-Samrobb___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Strange network issue in freebsd 8

2010-01-27 Thread sam

that s why I 've been so in doubt using freebsd AMD64 release.

On 28/01/2010 1:05 PM, Sherin George wrote:

Hello Sam,

The problem happened today again.

I am getting this message on traceroute

===
traceroute: findsaddr: write: No such process


When running a ping to 8.8.8.8, it says following.

===
ping: sendto: No route to host


Please see the result of "netstat -rn" command.


myserver# netstat -rn
Routing tables

Internet:
DestinationGatewayFlagsRefs  Use  Netif Expire
defaultXXX.XXX.XXX.241 UGS62   209247em0
127.0.0.1  link#3 UH  00lo0
XXX.XXX.XXX.240/29  link#1 U   00em0
XXX.XXX.XXX.242 link#1 UHS 00lo0

Internet6:
Destination   Gateway   Flags
Netif Expire
::1   ::1   UH
lo0
fe80::%lo0/64 link#3U
lo0
fe80::1%lo0   link#3UHS
lo0
ff01:3::/32   fe80::1%lo0   U
lo0
ff02::%lo0/32 fe80::1%lo0   U
lo0
=

Note: I have replaced first three octets.

I have checked netstat -m also. It is also not showing any problem.

Could anyone please help me to sort out this issue.

--
Thanks,
Sherin

On Thu, Jan 28, 2010 at 6:29 AM, sam  wrote:

   

Hi,

Is this problem still happening?

Cheers
Sam


On 24/01/2010 2:16 PM, Sherin George wrote:

 

Hello,

I am facing some sort of strange network issue in a freebsd server
occasionally.

OS: FreeBSD 8.0-RELEASE - amd64

Now, I have updated to FreeBSD 8.0-RELEASE-p2

The servers loses network connection once in a few days. I logged into
console and verified that network is up. I even restarted network service
using following command.

/etc/rc.d/netif restart

Still, it didn't fix.

I checked /var/log/messages, but I am not getting any clue.

==
Jan 19 12:10:20 myserver kernel: GEOM_MIRROR: Device gm0: rebuilding
provider ad0 finished.
Jan 19 20:20:23 myserver nfsd[732]: select failed: Interrupted system call
Jan 19 20:21:07 myserver nfsd[732]: select failed: Interrupted system call
Jan 23 02:14:33 myserver login: ROOT LOGIN (root) ON ttyv0
Jan 23 02:19:51 myserver kernel: ifa_del_loopback_route: deletion failed
Jan 23 02:19:57 myserver kernel: em0: link state changed to DOWN
Jan 23 02:20:02 myserver kernel: em0: link state changed to UP
Jan 23 02:29:58 myserver reboot: rebooted by root
Jan 23 02:29:58 myserver syslogd: exiting on signal 15
Jan 23 02:31:31 myserver syslogd: kernel boot file is /boot/kernel/kernel
Jan 23 02:31:31 myserver kernel: Copyright (c) 1992-2009 The FreeBSD
Project.
Jan 23 02:31:31 myserver kernel: Copyright (c) 1979, 1980, 1983, 1986,
1988,
1989, 1991, 1992, 1993, 1994
Jan 23 02:31:31 myserver kernel: The Regents of the University of
California. All rights reserved.
Jan 23 02:31:31 myserver kernel: FreeBSD is a registered trademark of The
FreeBSD Foundation.
Jan 23 02:31:31 myserver kernel: FreeBSD 8.0-RELEASE #0: Sat Nov 21
15:02:08
UTC 2009
Jan 23 02:31:31 myserver kernel: r...@mason.cse.buffalo.edu:
/usr/obj/usr/src/sys/GENERIC
Jan 23 02:31:31 myserver kernel: Timecounter "i8254" frequency 1193182 Hz
quality 0
==

Network, TCP stack all were up. It was pinging gateway even. But,
traceroute
was not going beyond gateway.

I believe the issue is not related to anything outside server since a
reboot
always fixes the issue.

I will be grateful for any advice that can help me in troubleshooting this
problem.

--
Best Regards,
Sherin
___
freebsd-...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"



   


 

___
freebsd-...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

   


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Wine on amd64 in 32 bit jail

2009-11-19 Thread Sam Fourman Jr.
On Thu, Nov 19, 2009 at 12:57 AM,   wrote:
> Hello.
>
> I've done a lot of reading on this problem and don't understand why what I 
> have
> doesn't work.
>
>  http://wiki.freebsd.org/Wine
>
> I have an entirely 32 bit jail, created by cross-compiling the world with
> TARGET=i386 and creating a jail from DESTDIR.
>
> The jail appears to be fully functional - all programs appear to work and
> the compiler produces i386 binaries.
>
> 'uname' has been configured to identify itself as 'i386', so even compiling
> programs from source works (autoconf correctly recognises the jail system
> as i386, etc).

I would like to help get this working.. is there a howto somewhere to
setup a i386 jail on amd64?
I used teh instructions on http://wiki.freebsd.org/Wine (and pointed
the jail to /compat/i386)
Inside teh jail uname -a still produces this:
FreeBSD i386.puffybsd.com 8.0-RC3 FreeBSD 8.0-RC3 #0: Wed Nov 18
22:22:44 UTC 2009 root@:/usr/obj/usr/src/sys/WORKSTATION  amd64

so trying to compile mesa-demos produces this

/../../src/mesa/x86-64/glapi_x86-64.S:29003: Error: suffix or operands
invalid for `pop'
../../../src/mesa/x86-64/glapi_x86-64.S:29004: Error: suffix or
operands invalid for `pop'
../../../src/mesa/x86-64/glapi_x86-64.S:29005: Error: `6128(%rax)' is
not a valid 32 bit base/index expression
../../../src/mesa/x86-64/glapi_x86-64.S:29006: Error: bad register name `%r11'
../../../src/mesa/x86-64/glapi_x86-64.S:29040: Error: suffix or
operands invalid for `push'
../../../src/mesa/x86-64/glapi_x86-64.S:29041: Error: suffix or
operands invalid for `push'
../../../src/mesa/x86-64/glapi_x86-64.S:29042: Error: suffix or
operands invalid for `push'
../../../src/mesa/x86-64/glapi_x86-64.S:29043: Error: suffix or
operands invalid for `push'
../../../src/mesa/x86-64/glapi_x86-64.S:29044: Error: suffix or
operands invalid for `push'
../../../src/mesa/x86-64/glapi_x86-64.S:29046: Error: suffix or
operands invalid for `pop'
../../../src/mesa/x86-64/glapi_x86-64.S:29047: Error: suffix or
operands invalid for `pop'
../../../src/mesa/x86-64/glapi_x86-64.S:29048: Error: suffix or
operands invalid for `pop'
../../../src/mesa/x86-64/glapi_x86-64.S:29049: Error: suffix or
operands invalid for `pop'
../../../src/mesa/x86-64/glapi_x86-64.S:29050: Error: suffix or
operands invalid for `pop'
../../../src/mesa/x86-64/glapi_x86-64.S:29051: Error: `6136(%rax)' is
not a valid 32 bit base/index expression
../../../src/mesa/x86-64/glapi_x86-64.S:29052: Error: bad register name `%r11'
../../../src/mesa/x86-64/glapi_x86-64.S:29086: Error: suffix or
operands invalid for `push'
../../../src/mesa/x86-64/glapi_x86-64.S:29087: Error: suffix or
operands invalid for `push'
../../../src/mesa/x86-64/glapi_x86-64.S:29088: Error: suffix or
operands invalid for `push'
../../../src/mesa/x86-64/glapi_x86-64.S:29090: Error: suffix or
operands invalid for `pop'
../../../src/mesa/x86-64/glapi_x86-64.S:29091: Error: suffix or
operands invalid for `pop'
../../../src/mesa/x86-64/glapi_x86-64.S:29092: Error: suffix or
operands invalid for `pop'
../../../src/mesa/x86-64/glapi_x86-64.S:29093: Error: `6144(%rax)' is
not a valid 32 bit base/index expression
../../../src/mesa/x86-64/glapi_x86-64.S:29094: Error: bad register name `%r11'
../../../src/mesa/x86-64/glapi_x86-64.S:29124: Error: suffix or
operands invalid for `push'
../../../src/mesa/x86-64/glapi_x86-64.S:29125: Error: suffix or
operands invalid for `push'
../../../src/mesa/x86-64/glapi_x86-64.S:29126: Error: suffix or
operands invalid for `push'
../../../src/mesa/x86-64/glapi_x86-64.S:29128: Error: suffix or
operands invalid for `pop'
../../../src/mesa/x86-64/glapi_x86-64.S:29129: Error: suffix or
operands invalid for `pop'
../../../src/mesa/x86-64/glapi_x86-64.S:29130: Error: suffix or
operands invalid for `pop'
../../../src/mesa/x86-64/glapi_x86-64.S:29131: Error: `6152(%rax)' is
not a valid 32 bit base/index expression
../../../src/mesa/x86-64/glapi_x86-64.S:29132: Error: bad register name `%r11'
gmake[2]: *** [../../../src/mesa/x86-64/glapi_x86-64.o] Error 1
gmake[2]: Leaving directory
`/usr/ports/graphics/mesa-demos/work/Mesa-7.4.4/src/glx/x11'
gmake[1]: *** [subdirs] Error 1
gmake[1]: Leaving directory `/usr/ports/graphics/mesa-demos/work/Mesa-7.4.4/src'
gmake: *** [default] Error 1
*** Error code 1


Sam Fourman Jr.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GA-MA780G-UD3H motherboard

2009-08-25 Thread Sam Fourman Jr.
On Tue, Aug 25, 2009 at 11:35 AM, Andriy Gapon wrote:
>
> I have become to own Gigabyte GA-MA780G-UD3H motherboard:
> http://www.gigabyte.com.tw/Products/Motherboard/Products_Spec.aspx?ClassValue=Motherboard&ProductID=3004&ProductName=GA-MA780G-UD3H
> It is based on AMD 780G + SB700.
> BTW, CPU I am using is Athlon II X2 250.

are you using a i386 or AMD64 kernel? maybe I am blind but I didnt see
it in your dmesg

Sam Fourman Jr.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GA-MA780G-UD3H motherboard

2009-08-25 Thread Sam Fourman Jr.
> Meanwhile, if you interested in any information about this motherboard - data
> dumps, outputs from tools, etc - please let me know, I will try my best to 
> provide
> that.

it would be interesting to see a dmesg as a starting point.


Sam Fourman Jr.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: In search of a video card

2009-05-13 Thread Sam Fourman Jr.
On Wed, May 13, 2009 at 10:06 PM, Josef Grosch  wrote:
>
> I'm in search for a decent video card. I currently have an Nvidia GeForce
> 8400 GS. It worked pretty well i386 FreeBSD 6.2. I have upgraded my home
> machine and I am running amd64 FreeBSD 7.2 and it just refuses to go into
> X. It just hangs. I've been poking around and, based on what I read, some
> FreeBSD developers and Nvidia have gotten into a finger pointing contest as
> to what is the problem. Its all very nice but doesn't help me much.

I can shed some light on the amd64 binary nvidia driver issue
John Baldwin has implimented the features the Nvidia people need.

http://www.freebsd.org/news/status/report-2009-01-2009-03.html#Device-mmap()-Extensions

if you read the nvnews fourms Zander made refrence to working on a 64bit driver.


Sam Fourman Jr.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: IPsec in GENERIC kernel config

2009-04-27 Thread Sam Leffler

Jan Melen wrote:

Hi,

Again when I compiled a custom kernel just to enable IPsec in the 
FreeBSD kernel it came to my mind why is it so that the IPsec is not 
enabled by default in the GENERIC kernel configuration file? At least 
for me the GENERIC kernel configuration would do just fine if the 
IPsec would be enabled in it by default. Now I have to build a custom 
kernel just for IPsec btw IPsec is even mandatory for a host 
supporting IPv6.

IPsec incurs a performance hit.  Fix that and it can be enabled in GENERIC.

   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Compilation of hostapd

2009-04-01 Thread Sam Leffler

Daamn M wrote:

Hi!

I'm trying to set up wifi access point using my FreeBSD box and
hostapd deamon. My goal is running EAP-TTLS server. It seems that the
version shipped with base system isn't compiled with options allowing
to use EAP server (I'm using 7.0 version but the same is with the
latest 8.0 snapshot). I was suprised that some part of base system
requires nonstandard tool (gmake) (I changed it to be able to use
standard FreeBSD make). Besides, trying to compile it I get the
following error:

preauth.o(.text+0x1b2): In function `rsn_preauth_send':
/usr/src/contrib/hostapd/preauth.c:263: undefined reference to `l2_packet_send'
preauth.o(.text+0x55c): In function `rsn_preauth_iface_deinit':
/usr/src/contrib/hostapd/preauth.c:148: undefined reference to
`l2_packet_deinit'
preauth.o(.text+0x660): In function `rsn_preauth_iface_init':
/usr/src/contrib/hostapd/preauth.c:119: undefined reference to `l2_packet_init'
gmake: *** [hostapd] Error 1


This is ,,.config'' file I used (after this I pasted error I get if I
modify a bit config file):
  

cd /usr/src/usr.sbin/wpa/hostapd; make

To enable functionality already supported by the Makefile you can add 
HOSTAPD_* options to your src.conf (or for testing just add them to make 
cmd line).  Otherwise you might need to mod the Makefile in which case 
you can file a PR w/ the needed changes to get them included in svn.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Atheros wireless card keeps losing signal when signal is too weak

2009-03-25 Thread Sam Leffler

Paul B. Mahol wrote:

On 3/25/09, Yuri  wrote:
  

I have Linux box sitting next to FreeBSD box that has a very cheap
Airlink 101 card but it has no problems connecting to my WiFi network.

Every time when Linux box says that quality of connection drops below
10/100 FreeBSD box shows "status: no carrier".
Linux connections still function ok.

I even bought a large WiFi antenna for FreeBSD box but still have this
problem.

Is there some 'sensitivity' parameter that driver may be setting too low
on the card?



I'm only aware of roam:rssi & roam:rate

  


Those parameters control the roaming algorithm.  The OP didn't identify 
their card, freebsd version, or provide any info about their setup or 
why ifconfig reports "no carrier".  It just sounds like there's a loss 
in the signal and freebsd gets a beacon miss and tries to reconnect 
while linux does not.  Once the rssi drops to "10" (presumably 5dBm) 
minor variations in the environment can become significant (e.g. 
orientation of a laptop, obstructions, antenna quality) and it's 
impossible to comment on what's happening w/o detailed information such 
as provided by athstats.


FWIW cardbus cards that follow the reference design closely typically 
work pretty well and don't benefit from an external antenna.  Vendors of 
cheap designs often scrimp when it comes to the antenna.  When wireless 
is inside a case (e.g. a PCI card) then it's worth remoting the antenna 
but you need to be careful about routing the pigtail(s) and I can't 
count the number of times I've tracked problems down to faulty cables 
and/or connections.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: no kern.usercrypto

2009-03-03 Thread Sam Leffler

Vasile Marii wrote:

Hello everybody!
I'm a newbie in BSD.
I don't have /dev/crypto nor kern.usercrypto  in sysctl...so where can i read 
something about enabling this on my systems.
  

man 4 crypto
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Fwd: Kernel conference Australia

2009-02-28 Thread Sam Lawrance
Early days, this could be cool.  Interested speakers might consider  
approaching their employers or the FreeBSD Foundation to obtain  
assistance.


Begin forwarded message:


From: Daniel Carosone 
Date: 28 February 2009 7:19:47 AM
To: current-us...@netbsd.org, regional...@netbsd.org
Subject: Kernel conference Australia

Just spotted this go by my RSS, in case others are interested.

 http://ln-s.net/2vsw

--
Dan.


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Google SoC 2009 Idea

2009-02-24 Thread Sam Leffler

Siddharth Prakash Singh wrote:

On Wed, Feb 25, 2009 at 12:30 AM, Ray Mihm  wrote:
  

Title: Multicore Aware Process Scheduler.
I have not gone through the process scheduler code of Free BSD.
Hence, I am not yet aware about the current support for Multicore
Architectures.
  

Talk to j...@freebsd.org, the author of ULE.



What are your opinions on this project? What is the scope of this project?
  

Linux Kernel 2.6.* currently supports SMP, SMT, NUMA architectures.
  


Does the current scheduler has support for "CPU affinity/binding",
mechanism for distinguishing varying capability of CPUs.
  

These may be there already in ULE, although I'm not sure about NUMA.

Ray




Waiting for your response,

  
I note you sent this same note to the netbsd mailing lists.  You might 
want to do some more investigation before you propose a project.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: pahole - Finding holes in kernel structs

2009-02-12 Thread Sam Leffler

Max Laier wrote:

On Thursday 12 February 2009 17:42:19 Sam Leffler wrote:
  

Max Laier wrote:


On Thursday 12 February 2009 15:08:22 Andrew Brampton wrote:
  

So I ran the tool pahole over a 7.1 FreeBSD Kernel, and found that
many of the struct had holes, and some of which could be rearranged to
fill the gap.


Interesting tool ...
  

Someone should be able to do the same thing with coverity but it's
obviously less effort to use something that exists.  If I recall this
and related tools like sparse use dwarf symbols which we don't generate
by default.  But with dtrace support I think we now can in fact generate
the symbols easily so maybe someone can look at porting the tools...



  I've made the list available here[2]. So my questions
are two fold:

1) Is it worth my time trying to rearrange structs? If so do you think
many of my patches would be accepted?

2) Is there a way to find out the most heavily used structs? There are
~3600 structs, and ~2000 holes, it might be a waste of my time fixing
the structs which are only used once.


That's the tricky part.  Rearranging the structs itself is not that
difficult, but identifying which should be rearranged and if, how ...
that's the problem. The fact that gaps might be different for 64 vs. 32
bit architectures has already been mentioned.

In addition one needs to keep in mind that changing a struct layout is a
ABI change.  So if we do identify structs that we want to change we
should do them all at once to keep the different versions down to a
minimum.

So to answer your first question, submitting 101 patches to rearrange 101
structs is certainly a wasted effort.  However, if you take a good look
at the 2000 holes, identify an interesting subset and submit a patch to
fix that subset ... that would be a worthwhile effort ... IMHO.
  

The other thing to keep in mind is that structure layout can have a
noticeable effect on cache locality.  Arbitrarily rearranging structure
members can generate many more cache misses so one should sanity check
changes w/ something like hwpmc.  However as noted because layout may be
platform-dependent even if something shows no change on x86 it may be a
loss on another architecture and finding that performance drop may be
really hard.



Let's not be too "glass half empty" about it, though.  The same is true in the 
opposite direction.  If we can identify and eliminate an unnecessary hole in 
an important structure we might gain that same performance just by reshuffling 
a few lines.


  
Certainly plugging holes can also be beneficial but just cautioning that 
changes of this sort need to be checked if made to critical data 
structures.  OTOH there aren't that many that matter in practice.


   Sam


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: pahole - Finding holes in kernel structs

2009-02-12 Thread Sam Leffler

Max Laier wrote:

On Thursday 12 February 2009 15:08:22 Andrew Brampton wrote:
  

So I ran the tool pahole over a 7.1 FreeBSD Kernel, and found that
many of the struct had holes, and some of which could be rearranged to
fill the gap.



Interesting tool ...
  


Someone should be able to do the same thing with coverity but it's 
obviously less effort to use something that exists.  If I recall this 
and related tools like sparse use dwarf symbols which we don't generate 
by default.  But with dtrace support I think we now can in fact generate 
the symbols easily so maybe someone can look at porting the tools...


  

  I've made the list available here[2]. So my questions
are two fold:

1) Is it worth my time trying to rearrange structs? If so do you think
many of my patches would be accepted?

2) Is there a way to find out the most heavily used structs? There are
~3600 structs, and ~2000 holes, it might be a waste of my time fixing
the structs which are only used once.



That's the tricky part.  Rearranging the structs itself is not that difficult, 
but identifying which should be rearranged and if, how ... that's the problem.  
The fact that gaps might be different for 64 vs. 32 bit architectures has 
already been mentioned.


In addition one needs to keep in mind that changing a struct layout is a ABI 
change.  So if we do identify structs that we want to change we should do them 
all at once to keep the different versions down to a minimum.


So to answer your first question, submitting 101 patches to rearrange 101 
structs is certainly a wasted effort.  However, if you take a good look at the 
2000 holes, identify an interesting subset and submit a patch to fix that 
subset ... that would be a worthwhile effort ... IMHO.


  
The other thing to keep in mind is that structure layout can have a 
noticeable effect on cache locality.  Arbitrarily rearranging structure 
members can generate many more cache misses so one should sanity check 
changes w/ something like hwpmc.  However as noted because layout may be 
platform-dependent even if something shows no change on x86 it may be a 
loss on another architecture and finding that performance drop may be 
really hard.


   Sam


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: How to troubleshoot why ath0 can't connect to a passwordless wireless network?

2009-02-10 Thread Sam Leffler

Yuri wrote:
I have a several wireless networks without password that my linux box 
easily connects to.


On FreeBSD 'ifconfig ath0 up scan' command shows it. 'ifconfig ath0 
ssid  up' brings interface to 'associated' state. But 
dhclient fails to set it up.


I have another device on the same system: ral0. It sometimes connects 
to these networks ok, sometimes has the same problem.


What can I do to understand what may be a problem with ath0 in my case?

I tried to use tcpdump. It shows outbound DHCP packets and nothing is 
inbound.


I asked similar question here before, somebody asked me to downgrade 
atheros driver to one particular lower version. But this didn't help.


Relevant dmesg lines are:
ath_hal: 0.9.30.13 (AR5210, AR5211, AR5212, AR5216, RF5111, RF5112, 
RF2413, RF5413, RF2133)
ath0:  mem 0xcffe-0xcffe irq 16 at device 5.0 on 
pci0

ath0: mac 7.8 phy 4.5 radio 5.6

I use 71-PRERELEASE


You seem to say your network is open (no security).  If not you need to 
show your network configuration.


wlanstats shows statistics collected by the 802.11 layer.  athstats show 
stats collected by the ath driver.  Both are important tools for 
diagnosing problems.


tcpdump can be used to tap traffic at 3 layers: 802.3, 802.11, and 
driver.  It can be used to identify where packets are lost in the 
hierarchy (if at all).


Assuming packets are going out but not coming back you can sniff from a 
3rd station to look for traffic in the air but not received.


Given how little info you posted it's virtually impossible to advise you 
what is wrong.  When in doubt c&p real output; describing a problem 
often causes useful info to be left out.


BTW hal version 0.9.30.13 was a test build; RELENG_7 has 0.9.20.3 and 
HEAD has source code for a much newer version.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Super I/O driver [generic gpio driver]

2009-02-06 Thread Sam Leffler

Andriy Gapon wrote:

Do we have any drivers for special functions provided by ISA/LPC Super
I/Os. I mean many of them have watchdog capabilities, GPIO, etc. I do
not meant fdc, lpt, sio/uart and hwm which are 9or can be) handled as
the devices of their own.

I have some quite hairy code for Winbond W83977EF that provides watchdog
and led interfaces (the latter is for power led).
I'd like to understand what is the best/canonical way to access
superio's ports, enter configuration mode, etc.
Also, it would be interesting to see how various configurations/wirings
of the same superio could be handled.

I looked at some Linux drivers but their coding ways are quite different
and they typically handle only one wiring type (probably the one that
was found on author's motherboard).

I also would be interested in a general discussion on this topic (superios).

BTW, do we have some interface to userland or GPIO? Something similar to
led(4), but more generic (and supporting 'I' as well 'O').
  


There's been some discussion amongst embedded folks but nothing yet.  I 
noticed openbsd commit something recently but don't know if we can reuse 
anything they've done.


   Sam


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Dynamic ddb commands

2009-02-02 Thread Sam Leffler

Matthew Fleming wrote:
In general it is far easier to just add sysinit's than to hack directly on the 
kernel linker.  There are very few ddb commands, so one extra pointer or two 
per command is not a lot of space.



Respectfully, I disagree, for several reasons.

First, in order to make sysinit and sysctl work, the kernel linker
needed to know that there are a set of elf sections that have special
meaning.  Yes, using sysinits means that there are still only two elf
sections of interest.

Second, as I mentioned before, having ddb commands added mixed in with
sysinits means that, if I have a bug in my sysinit I may not be able to
use some of my ddb commands to debug it.  Even if DB_*COMMAND used
SI_ORDER_FIRST, any sysinit with the same priority may come first.

Next, if you want commands sorted globally, it could be done with either
implementation.  But I think that commands that are defined by a module
should be listed with others from that module.

Last, changing struct command introduces a binary compatibility issue.
Any older driver that had a ddb command (even if they never realized
they couldn't access it) would need to be recompiled.  I am not sure of
FreeBSD's binary compatibility policy, though, and it would presumably
be across a major OS revision number.  So this is not a very compelling
argument.
  
I'm not sure I buy any of these arguments (well maybe the 2nd one :)) 
but I'm still open to your changes.  I just haven't had time to look at 
your patch; hope to this week (I have several other patches in my q for 
review ahead of yours).


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Dynamic ddb commands

2009-01-30 Thread Sam Leffler

Matthew Fleming wrote:

I'm working on BSD 6.x and of course the set of ddb commands is static
to whatever is in the kernel at compile.  I see that BSD 7.1 has dynamic
commands using sysinits and sysuninit's to call a new
db_[un]register_cmd.

I see this, though, only after I have spent a day or so adding a
linker_file_[un]register_ddb() that works similarly to how sysinits are
merged for the boot-time modules (malloc and copy pointers).  It seems
to me that this solution (have the linker look for db_set and db_cmd_set
and, if there are any entries, malloc and save pointers to commands) is
more efficient in terms of space than adding a LIST to the command
structure and then forcing sysinits to run.
  


I haven't looked at your approach so not sure how to respond.  The 
existing code was simple.



I'm curious as to why the current method was chosen when something
lighter-weight was available... or so it seems from my perspective
looking at the 6.x code base.

As another side note, lexicographic order for the commands doesn't seem
to add anything, except that command insert/delete are O(n/2) instead of
O(n).  It can make it harder to use ddb to debug ddb, though.  If, e.g.
there's a pointer problem somewhere in the command list, if the most
basic commands are up front like examine and write, then at least those
can be used to possibly repair ddb so a debug session can continue.

  

If I recall it was painful to find entries in the help listing w/o sorting.

Feel free to propose an alternative implementation; noone's wed to 
what's in the tree.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: doubts regarding System Initialization working (SYSINIT)

2009-01-23 Thread Sam Leffler

John Baldwin wrote:

On Friday 23 January 2009 10:55:32 am Mehul Chadha wrote:
  

Hello all,
I have been browsing through the FreeBSD kernel's
source code trying to understand its working .

In the mi_startup() in /sys/kern/init_main.c all the SYSINIT objects
are sorted using bubble sort and then they are executed in order.

My doubt is that we have declared the pointer to the struct sysinit as
const pointer to a const in the macro definition of SYSINIT ie  when
the macro

SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_FIRST, kmeminit, NULL)  is
expanded  completely we get the following

static struct sysinit kmem_sys_init = { SI_SUB_KMEM, SI_ORDER_FIRST,
(sysinit_cfunc_t)(sysinit_
nfunc_t)kmeminit, ((void *)(((void *)0))) }; static void const * const
__set_sysinit_set_sym_kmem_sys_init __attribute__((__section__("set_"
"sysinit_set"))) __attribute__((__used__)) = &kmem_sys_init;

Here we see that the pointer is of type const and to a const but when we 


sort
  

and swap using
  *sipp=*xipp;

We are trying to change the address of const pointer to a new address
in which case it should segfault but it works fine.

Why does it not segfault it seems I have not understood the concept
behind using const *const... I will be very thankful if you can help
me with it.



I'm guessing the startup code doesn't map the SYSINIT pages read only because 
it is not smart enough to honor that request perhaps.  That is, I wouldn't be 
surprised if all of .rodata in the kernel was mapped as R/W instead of R/O.


  


I think I have an ancient patch from someone to fix the code to not do 
this; let me dig for it.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: hack bios hp compaq v3618la

2008-12-27 Thread Sam Leffler

Carlos A. M. dos Santos wrote:

On Fri, Dec 26, 2008 at 5:28 PM, lazaax -  wrote:
  

hi, people, anyone knows how to hack bios from v3618la or had a bios
hacked, i want to bypass whitelist wireless network, i put a atheros
on mi hp and cant supported, sorry  my english is poor, i dont want ro
risk my computer... please help



I attempted to replace the wireless card of a similar HP notebook and
gave up. I suggest you to use a USB "dongle", instead. This is a cheap
and much safer approach. Hacking the BIOS may lead to a broken
notebook that can be hard to recover.

Also, this kind of question should be sent to freebsd-questions, not
to -hackers.

  
The usual way to deal w/ this is to overwrite the pci dev id in the 
card's eeprom so it matches the bios whitelist.  Then map that device id 
to something ath will attach to.  I'm not allowed to give out the recipe 
for writing the eeprom but it's well-known and easily found with google.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: crypto(9) choose another driver if we cannot open a session on it

2008-12-10 Thread Sam Leffler

Patrick Lamaizière wrote:

Le Mon, 8 Dec 2008 21:21:55 +0100,
Philip Paeps <[EMAIL PROTECTED]> a écrit :

Hello,

  

On 2008-12-07 22:45:51 (+0100), Patrick Lamaizière
<[EMAIL PROTECTED]> wrote:


I wrote a small patch to allow the crypto framework to choose
another cryptographic driver if we cannot open a session on the
driver.
  

Very cool. :-)  I've been hacking on this too, mainly to get rid of
the code duplication that currently exists.



Which code exactly? Yes I'm curious :-)

I'm thinking about how to remove the need for a device to support all
the algorithms when we open a session. By using a fake "crypto
virtual device" to open and dispatch crypto requests to real devices or
to cryptosoft. But i don't have any code to show yet.

There is one thing I'm asking about crypto(9):
- I doubt that the migration of a session is safe and I think that
would be far easier to prevent a driver to unregister when there are
some pending sessions on it? glxsb and padlock do not allow to
unregister in this case. 


I've looked quickly the code of geli or ipsec. If the crypto
framework returns EAGAIN because the migration of the session, they
restart a crypto_dispatch(crp) but the datas in crp->crp_buf can be
corrupted by the previous crypto operation (IMHO, may be i've missed
something)?
  
This sounds like the session management layer I wanted to insert a while 
back.  It was a reason why I made the s/w driver into a pseudo device 
(so there'd be a handle).  I want to look at your mods but haven't had time.


As to unregister that was designed for devices like cardbus cards that 
might go away.  About the only way to simulate it today is to unload a 
driver module.  But it should work; if you see an issue we should try to 
fix it.  OTOH the limitations of the existing crypto code are dramatic 
and the rationale for maintaining the obsd api's (both in kernel and 
user space) are no longer valid.  It would be good to see someone take 
this stuff and overhaul it to do things like:


o add a session management layer that falls back to s/w when a device
  is incapable and when operations are more efficiently done in s/w (e.g
  ops too small to incur the dma setup/overhead)
o do load balancing over multiple devices
o support cpu resources as pseudo drivers (e.g. pin a thread to a cpu)
o replace the bogus fd session crud w/ device cloning

The linux folks have done some of this and there may be lessons to be 
learned from their efforts.  FWIW netbsd has some recent user api 
changes for doing async ops and batching to speedup openssl etc; if 
you're going to get into this stuff you might take a look.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Intel 5100 WiFi

2008-11-16 Thread Sam Leffler
The 4965 firmware license does not require an ack via the loader 
tunable.  This used to be true but was changed recently as I was 
mistaken about the license (only iwi and ipw firmware requires the end 
user acknowledge the EULA).


Everything else that was said seemed spot on.

   Sam

jT wrote:

Sam,
   I know you are busy, but can you explain what about my response was
wrong when you say doesn't require sysctl ack -- you mean
acknowledgment?  I just would like to know for my future reference and
Steve sorry for my misinformation.

  

iwn firmware does not require a sysctl ack.

  Sam







  


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Intel 5100 WiFi

2008-11-16 Thread Sam Leffler

jT wrote:

Steve,
   A few Iwn drivers *are* supported, mine being iwn 4965 -- is
supported and has been committed to 8.0-CURRENT.  You can find more
information about development on this hardware here :
http://www.clearchain.com/blog/posts/iwn.  I'm pretty sure that there
is not that much work done on your model yet.

   Yes it will require a firmware blob as the 4965 one does.  You are
required to take notice to the legal aspects of the blob via setting a
key in loader.conf.  In terms of FreeBSD aligning with OpenBSD, I have
no idea -- i have only run BSD.  We *always* prefer Free as in Freedom
-- hence FreeBSD -- again not sure what the OBSD policies are.

In addition this is probably a better question for freebsd-mobile or
freebsd-questions

  


iwn firmware does not require a sysctl ack.

   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: conf/128030: [request] Isn't it time to enable IPsec in GENERIC?

2008-10-18 Thread Sam Leffler

Max Laier wrote:

On Saturday 18 October 2008 19:05:26 Sam Leffler wrote:
  

[EMAIL PROTECTED] wrote:


Synopsis: [request] Isn't it time to enable IPsec in GENERIC?

Responsible-Changed-From-To: freebsd-bugs->freebsd-net
Responsible-Changed-By: gavin
Responsible-Changed-When: Sat Oct 18 16:55:14 UTC 2008
Responsible-Changed-Why:
Over to maintainer(s) for consideration

http://www.freebsd.org/cgi/query-pr.cgi?pr=128030
  

Last I checked IPSEC added noticeable overhead.  Before anyone does this
you need to measure the cost of having it enabled but not used.



It should be possible to turn IPSEC into a module - maybe only loadable on 
boot to avoid locking issues.  This would reduce the overhead to a handful of 
function pointer checks that should not impact performance (thanks to modern 
branch prediction and cache sizes).  This would have to be measured as well, 
of course.  Maybe this should go to the project page?  It's a good junior 
kernel hacker project, I believe.


  


I believe the most important issue are the SADB checks in the tx path.  
It used to be possible to do them cheaply by checking a single ptr value 
but now it's much more expensive.  My memory is hazy as it's been a while.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: WPA && associating with unknown SSID

2008-09-04 Thread Sam Leffler

Roland van Laar wrote:

On Wed, Sep 03, 2008 at 12:37:28PM -0700, Sam Leffler wrote:
  

Matthias Apitz wrote:

El d?a Wednesday, September 03, 2008 a las 08:04:49AM -0700, Sam Leffler 
escribi?:


 
  

Matthias Apitz wrote:
   


Hello,

I'm using WPA to connect to my various Wifi AP's (office, home, partner
locations) and have them well configured in the wpa_supplicant.conf(5)
file;

 
  

>from time to time at home I encounter that it is associating with an
   


unknown AP of my neighbourhood:


# ifconfig iwi0
iwi0: flags=8843 metric 0 mtu 
1500

  ether 00:13:ce:a1:e6:81
  inet 192.168.2.3 netmask 0xff00 broadcast 192.168.2.255
  media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps)
  status: associated
  ssid o2DSL_kJaR channel 1 (2412 Mhz 11g) bssid 00:19:cb:86:b3:84
  authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit bmiss 10
  scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7
  roam:rate11g 5 protmode CTS roaming MANUAL
# ifconfig iwi0 list scan
SSIDBSSID  CHAN RATE   S:N INT CAPS
o2DSL_kJaR  00:19:cb:86:b3:841   54M  19:0100 EP  
00:14:6c:44:aa:f6   11   54M  13:0100 EP   WPA


the network with SSID 'o2DSL_kJaR' is not im my
/etc/wpa_supplicant.conf;

how this is possible and how can I prevent this?

 
  
You must have a wildcard entry in your wpa_supplicant.conf file (i.e. 
one w/o an ssid specified).
   


Thx for the idea, but I don't have any wildcard entry; I've checked the
conf file and also wpa_cli says:

 
  

list_networks
   


network id / ssid / bssid / flags
0   santaclara  any
1   tarara  any [CURRENT]
2   OCLCPICAUK  any
3   board_room  any
4   guagua  any
5   OCN-LAN any
6   ConnectionPoint any

and:

# fgrep network= /etc/wpa_supplicant.conf | wc -l
  7
# fgrep ssid=\" /etc/wpa_supplicant.conf 
   ssid="santaclara"

   ssid="tarara"
   ssid="OCLCPICAUK"
   ssid="board_room"
   ssid="guagua"
   ssid="OCN-LAN"
   ssid="ConnectionPoint"

 
  
So far as I know this should not happen.  It'd be useful to have a 
wpa_supplicant log that shows it associating to an ssid not listed in 
the config file.





I encountered the same problem last week. I had a contrab which did an
ifconfig ath0 down; ifconfig ath0 up
This worked fine with WEP but wpa_supplicant exits when ath0 goes done.
ath0 connects to the first open AP after it gets up again; not reconnecting
to my WPA AP.

  
I believe this is how things work; wpa_supplicant is launched only when 
the device is discovered (e.g. at boot or card insert) and not when 
marked up.  You need to do something like /etc/rc.d/netif start ath0 to 
bring the interface up.  Not sure if this can be handled more 
transparently (e.g. via devd).


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: WPA && associating with unknown SSID

2008-09-03 Thread Sam Leffler

Matthias Apitz wrote:

El día Wednesday, September 03, 2008 a las 08:04:49AM -0700, Sam Leffler 
escribió:

  

Matthias Apitz wrote:


Hello,

I'm using WPA to connect to my various Wifi AP's (office, home, partner
locations) and have them well configured in the wpa_supplicant.conf(5)
file;

  

>from time to time at home I encounter that it is associating with an


unknown AP of my neighbourhood:


# ifconfig iwi0
iwi0: flags=8843 metric 0 mtu 1500
   ether 00:13:ce:a1:e6:81
   inet 192.168.2.3 netmask 0xff00 broadcast 192.168.2.255
   media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps)
   status: associated
   ssid o2DSL_kJaR channel 1 (2412 Mhz 11g) bssid 00:19:cb:86:b3:84
   authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit bmiss 10
   scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7
   roam:rate11g 5 protmode CTS roaming MANUAL
# ifconfig iwi0 list scan
SSIDBSSID  CHAN RATE   S:N INT CAPS
o2DSL_kJaR  00:19:cb:86:b3:841   54M  19:0100 EP  
00:14:6c:44:aa:f6   11   54M  13:0100 EP   WPA


the network with SSID 'o2DSL_kJaR' is not im my
/etc/wpa_supplicant.conf;

how this is possible and how can I prevent this?
 
  
You must have a wildcard entry in your wpa_supplicant.conf file (i.e. 
one w/o an ssid specified).



Thx for the idea, but I don't have any wildcard entry; I've checked the
conf file and also wpa_cli says:

  

list_networks


network id / ssid / bssid / flags
0   santaclara  any
1   tarara  any [CURRENT]
2   OCLCPICAUK  any
3   board_room  any
4   guagua  any
5   OCN-LAN any
6   ConnectionPoint any

and:

# fgrep network= /etc/wpa_supplicant.conf | wc -l
   7
# fgrep ssid=\" /etc/wpa_supplicant.conf 
ssid="santaclara"

ssid="tarara"
ssid="OCLCPICAUK"
ssid="board_room"
ssid="guagua"
ssid="OCN-LAN"
ssid="ConnectionPoint"

  
So far as I know this should not happen.  It'd be useful to have a 
wpa_supplicant log that shows it associating to an ssid not listed in 
the config file.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: WPA && associating with unknown SSID

2008-09-03 Thread Sam Leffler

Pietro Cerutti wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Sam Leffler wrote:
| Matthias Apitz wrote:
|> Hello,
|>
|> I'm using WPA to connect to my various Wifi AP's (office, home, 
partner

|> locations) and have them well configured in the wpa_supplicant.conf(5)
|> file;
|>
|> from time to time at home I encounter that it is associating with an
|> unknown AP of my neighbourhood:
|>
|>
|> # ifconfig iwi0
|> iwi0: flags=8843 metric 0 mtu
|> 1500
|> ether 00:13:ce:a1:e6:81
|> inet 192.168.2.3 netmask 0xff00 broadcast 192.168.2.255
|> media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps)
|> status: associated
|> ssid o2DSL_kJaR channel 1 (2412 Mhz 11g) bssid 
00:19:cb:86:b3:84

|> authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit bmiss 10
|> scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 
roam:rssi11g 7

|> roam:rate11g 5 protmode CTS roaming MANUAL
|> # ifconfig iwi0 list scan
|> SSIDBSSID  CHAN RATE   S:N INT CAPS
|> o2DSL_kJaR  00:19:cb:86:b3:841   54M  19:0100 EP
|> 00:14:6c:44:aa:f6   11   54M  13:0100 EP   WPA
|>
|> the network with SSID 'o2DSL_kJaR' is not im my
|> /etc/wpa_supplicant.conf;
|>
|> how this is possible and how can I prevent this?
|>
| You must have a wildcard entry in your wpa_supplicant.conf file (i.e.
| one w/o an ssid specified).

Not necessarily. If you bring up a wlan interface and don't specify
anything, it will automatically associate with the first open AP it 
finds.


I don't know if it's to be considered a feature or a bug. I've been
worried by this sometimes, but honestly not enough to really care..

Anyway, it happens...



He was talking about wpa_supplicant selecting an arbitrary AP.  If you 
have a device marked up then the system will handle ap selection+join 
but if wpa_supplicant is running then it marks the interface in "manual 
roaming mode" which stops that behaviour.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: WPA && associating with unknown SSID

2008-09-03 Thread Sam Leffler

Matthias Apitz wrote:

Hello,

I'm using WPA to connect to my various Wifi AP's (office, home, partner
locations) and have them well configured in the wpa_supplicant.conf(5)
file;

from time to time at home I encounter that it is associating with an
unknown AP of my neighbourhood:


# ifconfig iwi0
iwi0: flags=8843 metric 0 mtu 1500
ether 00:13:ce:a1:e6:81
inet 192.168.2.3 netmask 0xff00 broadcast 192.168.2.255
media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps)
status: associated
ssid o2DSL_kJaR channel 1 (2412 Mhz 11g) bssid 00:19:cb:86:b3:84
authmode OPEN privacy ON deftxkey 1 wepkey 1:40-bit bmiss 10
scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7
roam:rate11g 5 protmode CTS roaming MANUAL
# ifconfig iwi0 list scan
SSIDBSSID  CHAN RATE   S:N INT CAPS
o2DSL_kJaR  00:19:cb:86:b3:841   54M  19:0100 EP  
00:14:6c:44:aa:f6   11   54M  13:0100 EP   WPA


the network with SSID 'o2DSL_kJaR' is not im my
/etc/wpa_supplicant.conf;

how this is possible and how can I prevent this?
  
You must have a wildcard entry in your wpa_supplicant.conf file (i.e. 
one w/o an ssid specified).


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


sysinstall -> upgrade

2008-08-18 Thread sam


Hello.

Faced with a strange situation.

output of downgrade HEAD -> 7.0-RELEASE
---
# uname -a
FreeBSD damask 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Mon Jun 16 17:44:59 
SAMST 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/DAMASK  i386

---

after sysinstall (upgrade to 7.0-RELEASE)
---
# ls -l /boot/kernel
total 0
# ls -l /boot/
total 980
drwxr-xr-x  2 root  wheel   25600 Aug 18 11:58 GENERIC
-r--r--r--  1 root  wheel7636 Feb 24 20:52 beastie.4th
-r--r--r--  1 root  wheel8192 Feb 24 20:52 boot
-r--r--r--  1 root  wheel 512 Feb 24 20:52 boot0
-r--r--r--  1 root  wheel 512 Feb 24 20:52 boot0sio
-r--r--r--  1 root  wheel 512 Feb 24 20:52 boot1
-r--r--r--  1 root  wheel7680 Feb 24 20:52 boot2
-r--r--r--  1 root  wheel1201 Feb 24 20:52 cdboot
drwxr-xr-x  2 root  wheel 512 Aug 18 11:58 defaults
-r--r--r--  1 root  wheel1739 Feb 24 20:53 device.hints
drwxr-xr-x  2 root  wheel 512 Feb 24 20:49 firmware
-r--r--r--  1 root  wheel2249 Feb 24 20:52 frames.4th
-r--r--r--  1 root  wheel7551 Aug 14 09:27 gptboot
drwxr-xr-x  2 root  wheel 512 Feb 24 20:49 kernel
drwxr-xr-x  2 root  wheel 512 Aug 13 15:30 kernel.old
drwxr-xr-x  2 root  wheel   25600 Aug 18 11:47 kernel.prev
-r-xr-xr-x  1 root  wheel  253952 Feb 24 20:52 loader
-r--r--r--  1 root  wheel7545 Feb 24 20:52 loader.4th
-rw-r--r--  1 root  wheel 105 May 12 14:32 loader.conf
-r--r--r--  1 root  wheel   15219 Feb 24 20:52 loader.help
-r-xr-xr-x  1 root  wheel  245760 Aug 13 15:05 loader.old
-r--r--r--  1 root  wheel 385 Feb 24 20:52 loader.rc
-r--r--r--  1 root  wheel 512 Feb 24 20:52 mbr
drwxr-xr-x  2 root  wheel 512 Feb 24 20:49 modules
-r--r--r--  1 root  wheel 512 Aug 14 09:27 pmbr
-r--r--r--  1 root  wheel  256000 Feb 24 20:52 pxeboot
-r--r--r--  1 root  wheel 692 Feb 24 20:52 screen.4th
-r--r--r--  1 root  wheel   36435 Feb 24 20:52 support.4th
drwxr-xr-x  2 root  wheel 512 Feb 24 20:49 zfs
#
# ls -l /boot/GENERIC
total 114862
-r-xr-xr-x  1 root  wheel 14215 Feb 24 23:16 3dfx.ko
-r-xr-xr-x  1 root  wheel 49242 Feb 24 23:16 3dfx.ko.symbols
-r-xr-xr-x  1 root  wheel  5120 Feb 24 23:16 3dfx_linux.ko
-r-xr-xr-x  1 root  wheel 26277 Feb 24 23:16 3dfx_linux.ko.symbols
-r-xr-xr-x  1 root  wheel 64716 Feb 24 23:16 aac.ko
-r-xr-xr-x  1 root  wheel179069 Feb 24 23:16 aac.ko.symbols
-r-xr-xr-x  1 root  wheel  4611 Feb 24 23:16 aac_linux.ko
-r-xr-xr-x  1 root  wheel 25619 Feb 24 23:16 aac_linux.ko.symbols
-r-xr-xr-x  1 root  wheel  3520 Feb 24 23:16 accf_data.ko
-r-xr-xr-x  1 root  wheel 11200 Feb 24 23:16 accf_data.ko.symbols
***detruncated output**
---

kernel directory is empty - this is normal?

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Extending the ddb command set

2008-08-17 Thread Sam Leffler

Guillaume Ballet wrote:

On Sat, Aug 16, 2008 at 5:15 PM, Sam Leffler <[EMAIL PROTECTED]> wrote:
  

Guillaume Ballet wrote:


Hello hackers,

I am currently working on a small project and would like to add a few
commands to the set that is available in ddb.

I found that very interesting albeit succinct presentation:
http://people.freebsd.org/~jhb/papers/bsdcan/2008/slides.odp<http://people.freebsd.org/%7Ejhb/papers/bsdcan/2008/slides.odp>

where the author hints that I should use DB_COMMAND, which I did. Yet when
invoking ddb, the command does not appear in the help list. I have taken a
look at the source code and was expecting set_db_cmd_set to appear in my
module's section list when calling objdump -h

Is DB_COMMAND only working within the kernel itself, and not modules?


  

That is correct; you can't add ddb cmds from modules.  It should be doable; 
just hasn't been done yet.

  Sam




It is indeed doable: Here are the diffs for a first attempt at doing
this. I am not entirely satisfied with it, though, as it does not work
with DB_SHOW_COMMAND and the likes... Also, I have to declare a lot of
ddb-related stuff into kern_linker.c and I don't like it. I am
currently working at improving the whole thing, but in the mean time
if someone wants to give it a try, comments/rants would be greatly
appreciated.

  


Last I looked at this I was convinced it could be done using SYSINIT's 
and the existing mechanisms for adding ddb cmds.  I don't think you need 
to modify the linker or ddb.  Not sure if you looked sys/module.h and/or 
sys/kernel.h?


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Extending the ddb command set

2008-08-16 Thread Sam Leffler

Guillaume Ballet wrote:

Hello hackers,

I am currently working on a small project and would like to add a few
commands to the set that is available in ddb.

I found that very interesting albeit succinct presentation:
http://people.freebsd.org/~jhb/papers/bsdcan/2008/slides.odp<http://people.freebsd.org/%7Ejhb/papers/bsdcan/2008/slides.odp>

where the author hints that I should use DB_COMMAND, which I did. Yet when
invoking ddb, the command does not appear in the help list. I have taken a
look at the source code and was expecting set_db_cmd_set to appear in my
module's section list when calling objdump -h

Is DB_COMMAND only working within the kernel itself, and not modules?

  
That is correct; you can't add ddb cmds from modules.  It should be 
doable; just hasn't been done yet.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: startup options

2008-08-15 Thread Sam Leffler

Stefan Sperling wrote:

On Fri, Aug 15, 2008 at 10:00:25PM +0100, Vincent Hoffman wrote:
  

Chuck Robey wrote:


I was wondering if it was possible, with a machine that has about 2
year old
dual AMD64 processors and an up-to-date AMI BIOS, to get the machine
to be able
to start up from a power shutdown, after some sort of a network signal?

If it might be possible, could you maybe put me onto the path of
whatever info
there might be on that subject?
  

Wake on LAN is I believe a work in progress.
http://wiki.freebsd.org/WakeOnLan
its not an area I have much knowledge of though so other might be able
to help more.



That page pretty much summarises the state of affairs, yes.

Basically, you need a VIA-based ethernet card card (vr driver)
and -CURRENT, or a vr card with 7.0 and patches from here:
http://www.stsp.name/wol/FreeBSD-8-CURRENT-wol-backported-to-7.0/
All of those. Except the patch for pxe.c, that's there by accident.

If you don't have a vr card, you will likely need to do some
hacking. Follow the links from the wiki page for more information.

  

trouble% cd sys/dev/
trouble% grep -l IFCAP_WOL */*.c
age/if_age.c
jme/if_jme.c
re/if_re.c
stge/if_stge.c
vr/if_vr.c

So 5 drivers right now support WOL.  Jack said em had support a while 
back but he seems to have not hooked it up.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: kern/98388: [ata] FreeBSD 6.1 - WDC WD1200JS SATA II disks are seen as older SATA

2008-08-14 Thread sam

Andrey V. Elsukov wrote:

sam wrote:


# ident /boot/kernel/kernel | grep ata-chipset
$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.202.2.11 2008/08/02 
12:34:49 remko Exp $




Can you apply attached patch, rebuild your kernel, reboot in verbose
mode and show /var/run/dmesg.boot ?


http://cs.udmvt.ru/files/temp/dmesg.boot_0814

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: kern/98388: [ata] FreeBSD 6.1 - WDC WD1200JS SATA II disks are seen as older SATA

2008-08-14 Thread sam

Jeremy Chadwick wrote:

On Thu, Aug 14, 2008 at 12:02:50PM +0400, sam wrote:
  

Jeremy Chadwick wrote:


On Thu, Aug 14, 2008 at 12:16:16AM -0700, Jeremy Chadwick wrote:
  
  

On Thu, Aug 14, 2008 at 10:57:53AM +0400, sam wrote:



Andrey V. Elsukov wrote:
  
  

sam wrote:


FreeBSD  7.0-STABLE FreeBSD 7.0-STABLE #5: Tue Aug 12 13:54:27 
MSD  2008root@:/usr/obj/usr/src/sys/GENERIC  i386

|

please, any solution ?
  
  

Probably speed is limited via jumpers on your hard drive.




http://wdc.custhelp.com/cgi-bin/wdc.cfg/php/enduser/std_adp.php?p_faqid=1409&p_created=#jumper
tried it

without results
  
  

FWIW, the only time I've seen this happen is when there's a jumper
limiting the capability.  You should have **removed** the OPT1 jumper,
and left any other jumpers alone.

If you're absolutely sure the jumper is removed, I'll purchase one of
these drives and test it on an ICH7 (Supermicro PDSMi+) to confirm your
findings.



Actually, I don't need to -- I'm using WD5000AAKS disks myself on
that exact system:

atapci1:  port 
0x30e8-0x30ef,0x30dc-0x30df,0x30e0-0x30e7,0x30d8-0x30db,0x30b0-0x30bf mem 
0xe8600400-0xe86007ff irq 19 at device 31.2 on pci0
atapci1: [ITHREAD]
atapci1: AHCI Version 01.10 controller with 4 ports detected
ata2:  on atapci1
ata2: [ITHREAD]
ata3:  on atapci1
ata3: [ITHREAD]
ata4:  on atapci1
ata4: [ITHREAD]
ata5:  on atapci1
ata5: [ITHREAD]

ad6: 476940MB  at ata3-master SATA300
ad8: 476940MB  at ata4-master SATA300
  
  

may issue in  driver ?


atapci1:  port  
0xc880-0xc887,0xc800-0xc803,0xc480-0xc487,0xc400-0xc403,0xc080-0xc08f  
irq 19 at device 31.2 on pci0





Possibly.  All my Intel ICH7 boards have AHCI capability, and I use it.
See Chapter 4 here:

http://www.supermicro.com/manuals/motherboard/3000/MNL-0889.pdf

If your motherboard does, I'd recommend enabling it as well and see if
things change.

Regarding the "Enhanced" vs. "Compatible" mode: use Enhanced.  On
my boards, choosing Enhanced makes the AHCI and Intel MatrixRAID
options appear.

I'm fairly certain you don't need AHCI to get SATA300, though.

I would recommend you re-check the jumpers on your disks to make sure
you didn't make a mistake when adjusting things.

  

- HDD on position: all jumpers removed;
- SATA controller  in  Enchanced mode;
- no option AHCI in BIOS

without results

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: kern/98388: [ata] FreeBSD 6.1 - WDC WD1200JS SATA II disks are seen as older SATA

2008-08-14 Thread sam

Jeremy Chadwick wrote:

On Thu, Aug 14, 2008 at 12:16:16AM -0700, Jeremy Chadwick wrote:
  

On Thu, Aug 14, 2008 at 10:57:53AM +0400, sam wrote:


Andrey V. Elsukov wrote:
  

sam wrote:

FreeBSD  7.0-STABLE FreeBSD 7.0-STABLE #5: Tue Aug 12 13:54:27 MSD  
2008root@:/usr/obj/usr/src/sys/GENERIC  i386

|

please, any solution ?
  

Probably speed is limited via jumpers on your hard drive.



http://wdc.custhelp.com/cgi-bin/wdc.cfg/php/enduser/std_adp.php?p_faqid=1409&p_created=#jumper
tried it

without results
  

FWIW, the only time I've seen this happen is when there's a jumper
limiting the capability.  You should have **removed** the OPT1 jumper,
and left any other jumpers alone.

If you're absolutely sure the jumper is removed, I'll purchase one of
these drives and test it on an ICH7 (Supermicro PDSMi+) to confirm your
findings.



Actually, I don't need to -- I'm using WD5000AAKS disks myself on
that exact system:

atapci1:  port 
0x30e8-0x30ef,0x30dc-0x30df,0x30e0-0x30e7,0x30d8-0x30db,0x30b0-0x30bf mem 
0xe8600400-0xe86007ff irq 19 at device 31.2 on pci0
atapci1: [ITHREAD]
atapci1: AHCI Version 01.10 controller with 4 ports detected
ata2:  on atapci1
ata2: [ITHREAD]
ata3:  on atapci1
ata3: [ITHREAD]
ata4:  on atapci1
ata4: [ITHREAD]
ata5:  on atapci1
ata5: [ITHREAD]

ad6: 476940MB  at ata3-master SATA300
ad8: 476940MB  at ata4-master SATA300
  

may issue in  driver ?


atapci1:  port 
0xc880-0xc887,0xc800-0xc803,0xc480-0xc487,0xc400-0xc403,0xc080-0xc08f 
irq 19 at device 31.2 on pci0



/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: kern/98388: [ata] FreeBSD 6.1 - WDC WD1200JS SATA II disks are seen as older SATA

2008-08-14 Thread sam

Andrey V. Elsukov wrote:

sam wrote:
So the jumpers were set wrong to begin with, but fixing them didnt 
help?

i`am tried all positions from specification

Check your BIOS SATA support or look for an upgrade.

BIOS is support SATA
have 2 modes (Compatible, Enchanced)
i`am tried both modes

without results


Can you show `ident /boot/kernel/kernel | grep ata-chipset` output?



# ident /boot/kernel/kernel | grep ata-chipset
$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.202.2.11 2008/08/02 
12:34:49 remko Exp $



/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: consolekit on 7.0-STABLE i386

2008-08-14 Thread sam

Kostik Belousov wrote:

On Thu, Aug 07, 2008 at 12:00:37PM +0400, sam wrote:
  

Kostik Belousov wrote:


On Fri, Aug 01, 2008 at 06:16:49PM +0400, sam wrote:
 
  

Nate Eldredge wrote:
   


On Wed, 30 Jul 2008, sam wrote:

 
  
0 19 0   1113M29M   112   0   0   032   0   0   1  100 5549 
1682 11 1 88
0 19 0   1113M29M   297   0   0   0   136   0   0   2  122 78880 
1749  6 7 87

|

consolekit in |waitvt state, influencing on high volumes in procs-b
   

I don't understand what the problem is.  It looks like consolekit is 
sleeping and not using any CPU.  "waitvt" just indicates where in the 
kernel it's sleeping.  I don't understand what you mean by "high 
volumes in procs-b".


 
  

How-To-Repeat:
--
# (|cd /usr/ports/sysutils/consolekit/ && make install clean)

# /usr/local/etc/rc.d/dbus forcestart

# vmstat -w 1
procs  memory  page   disk   faults cpu
r b w avmfre   flt  re  pi  pofr  sr ad0   in   sy   cs us 
sy id
2 1 0  62252K   644M88   0   0   080   0   02   83  279  1  
1 98
0 1 0  62252K   644M 0   0   0   0 0   0   04  134  292  0  
3 97
0 1 0  62252K   644M 0   0   0   0 0   0   04  123  299  0  
2 98
1 1 0  62252K   644M 0   0   0   0 0   0   03  120  305  0  
3 97

^C
# /usr/local/sbin/console-kit-daemon && vmstat -w 1
procs  memory  page   disk   faults cpu
r b w avmfre   flt  re  pi  pofr  sr ad0   in   sy   cs us 
sy id
2 1 0  67572K   643M88   0   0   080   0   02   83  279  1  
1 98
0 16 0  68660K   643M   103   0   0   0 2   0  10   13  643  381  
2  4 94
0 16 0  68660K   643M 0   0   0   0 0   0   03  120  281  
0  4 96
0 16 0  68660K   643M 0   0   0   0 0   0   02  120  278  
0  3 97
0 16 0  68660K   643M 0   0   0   012   0  28   34  120  385  
0  3 97
0 16 0  68660K   643M 0   0   0   0 0   0   04  120  292  
0  3 97

^C
#
|--

please, any solution ...
   


Solution for what ? There is nothing wrong with the system.

For the purely estetisk purpose, you may look up the line
tsleep(VTY_WCHAN(sc, i), PZERO | PCATCH, "waitvt", 0);
or similar in sys/dev/syscons/syscons.c, and remove the "PZERO |" substring
  

>from it.

 
  

ok

Why proc-b on the HEAD, have low values (with working consolekit)?



On what revision of HEAD ? I committed the change that causes the thread
to sleep on the PZERO+1 priority instead of PZERO as r181286.
  

thx
it works


# output 'top' (part)
 958 root  1   40  3096K   872K -  0   0:00  0.00% nfsd
 960 root  1   40  3096K   872K -  1   0:00  0.00% nfsd
 959 root  1   40  3096K   872K -  1   0:00  0.00% nfsd
96619 root 17   10  7984K  3324K waitvt 1   0:00  0.00% 
console-kit-daemon


# /usr/local/sbin/console-kit-daemon && vmstat 1

procs  memory  page   disk   faults cpu
r b w avmfre   flt  re  pi  pofr  sr ad4   in   sy   cs us 
sy id
2 1 1129M  1552M   293   0   0   0   269   0   0   40  267  826  0  
0 99
0 1 0132M  1551M58   0   0   0 2   0   0   29  541  591  0  
1 99
0 1 0132M  1551M 0   0   0   0 0   0   0   29  155  492  0  
0 100


# uname -a
FreeBSD  7.0-STABLE FreeBSD 7.0-STABLE #5: Tue Aug 12 13:54:27 MSD 2008  
 root@:/usr/obj/usr/src/sys/GENERIC  i386



/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: kern/98388: [ata] FreeBSD 6.1 - WDC WD1200JS SATA II disks are seen as older SATA

2008-08-14 Thread sam

Kris Kennaway wrote:

sam wrote:

Andrey V. Elsukov wrote:

sam wrote:
FreeBSD  7.0-STABLE FreeBSD 7.0-STABLE #5: Tue Aug 12 13:54:27 MSD 
2008root@:/usr/obj/usr/src/sys/GENERIC  i386

|

please, any solution ?


Probably speed is limited via jumpers on your hard drive.

http://wdc.custhelp.com/cgi-bin/wdc.cfg/php/enduser/std_adp.php?p_faqid=1409&p_created=#jumper 


tried it

without results


So the jumpers were set wrong to begin with, but fixing them didnt help?

i`am tried all positions from specification

Check your BIOS SATA support or look for an upgrade.

BIOS is support SATA
have 2 modes (Compatible, Enchanced)
i`am tried both modes

without results

BIOS firmware is upgraded to last

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: kern/98388: [ata] FreeBSD 6.1 - WDC WD1200JS SATA II disks are seen as older SATA

2008-08-13 Thread sam

Andrey V. Elsukov wrote:

sam wrote:
FreeBSD  7.0-STABLE FreeBSD 7.0-STABLE #5: Tue Aug 12 13:54:27 MSD 
2008root@:/usr/obj/usr/src/sys/GENERIC  i386

|

please, any solution ?


Probably speed is limited via jumpers on your hard drive.


http://wdc.custhelp.com/cgi-bin/wdc.cfg/php/enduser/std_adp.php?p_faqid=1409&p_created=#jumper
tried it

without results

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: kern/98388: [ata] FreeBSD 6.1 - WDC WD1200JS SATA II disks are seen as older SATA

2008-08-13 Thread sam

[EMAIL PROTECTED] wrote:



I bought an ASUS motherboard with onboard SATA II controller. I
attached 2 HDs SATA II but when I run dmesg I notice that my system
sees them as normal older SATA 150 instead of SATA 300.

Is there any suggestion to solve this problem ?

Have a nice day.

--dmesg output---

Copyright (c) 1992-2006 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993,
1994
The Regents of the University of California. All rights
reserved.
FreeBSD 6.1-RELEASE-p1 #0: Fri Jun  2 15:41:03 CEST 2006
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/AMOS-SMP
WARNING: debug.mpsafenet forced to 0 as ipsec requires Giant
WARNING: MPSAFE network stack disabled, expect reduced performance.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) D CPU 3.00GHz (3000.38-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf62  Stepping = 2

Features=0xbfebfbff
  Features2=0xe43d,>
  AMD Features=0x2000
  AMD Features2=0x1
  Cores per package: 2
real memory  = 2138701824 (2039 MB)
avail memory = 2087825408 (1991 MB)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
cpu0:  on acpi0
acpi_throttle0:  on cpu0
cpu1:  on acpi0
atapci0:  port
0xc800-0xc807,0xc400-0xc403,0xc000-0xc007,0xb800-0xb803,0xb400-0xb40f
irq 19 at device 4.0 on pci1
ata2:  on atapci0
ata3:  on atapci0
atapci1:  port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 31.1 on
pci0
ata0:  on atapci1
ata1:  on atapci1
atapci2:  port
0xa800-0xa807,0xa400-0xa403,0xa000-0xa007,0x9800-0x9803,0x9400-0x940f
irq 17 at device 31.2 on pci0
atapci2: failed to enable memory mapping!
ata4:  on atapci2
ata5:  on atapci2
acd0: DVDROM  at ata0-master UDMA33
ad8: 114473MB  at ata4-master SATA150
GEOM_MIRROR: Device gm0 created (id=2415013281).
GEOM_MIRROR: Device gm0: provider ad8 detected.
ad10: 114473MB  at ata5-master SATA150
GEOM_MIRROR: Device gm0: provider ad10 detected.
SMP: AP CPU #1 Launched!
GEOM_MIRROR: Device gm0: provider ad10 activated.
GEOM_MIRROR: Device gm0: provider mirror/gm0 launched.
GEOM_MIRROR: Device gm0: rebuilding provider ad8.
Trying to mount root from ufs:/dev/mirror/gm0s1a
em0: link state changed to UP
  


hello

my similar problem
motherboard with the Intel G31 Express Chipset


|# output 'dmesg' (|partially|)
atapci1:  port 
0xc880-0xc887,0xc800-0xc803,0xc480-0xc487,0xc400-0xc403,0xc080-0xc08f 
irq 19 at device 31.2 on pci0

atapci1: [ITHREAD]
ad7: 476940MB  at ata3-slave SATA150

# atacontrol cap ad7

Protocol  Serial ATA II
device model  WDC WD5000AAKS-00YGA0
serial number WD-WCAS87395070
firmware revision 12.01C02
cylinders 16383
heads 16
sectors/track 63
lba supported 268435455 sectors
lba48 supported   976773168 sectors
dma supported
overlap not supported

Feature  Support  EnableValue   Vendor
write cacheyes  yes
read ahead yes  yes
Native Command Queuing (NCQ)   yes   -  31/0x1F
Tagged Command Queuing (TCQ)   no   no  31/0x1F
SMART  yes  yes
microcode download yes  yes
security   yes  no
power management   yes  yes
advanced power management  no   no  0/0x00
automatic acoustic management  yes  no  254/0xFE128/0x80

# atacontrol mode ad7
current mode = SATA150

# output 'pciconf -lv' (|partially|)
[EMAIL PROTECTED]:0:31:2:class=0x01018f card=0x26391019 chip=0x27c08086 
rev=0x01 hdr=0x00

   vendor = 'Intel Corporation'
   device = '82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controller'
   class  = mass storage
   subclass   = ATA

# uname -a
FreeBSD  7.0-STABLE FreeBSD 7.0-STABLE #5: Tue Aug 12 13:54:27 MSD 2008  
  root@:/usr/obj/usr/src/sys/GENERIC  i386

|

please, any solution ?

/Vladimir Ermakov


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: em0: The EEPROM Checksum Is Not Valid

2008-08-08 Thread sam

Jeremy Chadwick wrote:

On Thu, Aug 07, 2008 at 08:34:44AM +0400, Vladimir Ermakov wrote:
  

Hello

my trouble with nic

part of `dmesg`  output
-
em0:  port 0xec00-0xec3f mem  
0xfebc-0xfebd,0xfeb8-0xfebb irq 19 at device 2.0 on pci2

em0: The EEPROM Checksum Is Not Valid
device_attach: em0 attach returned 5
--

part of `pciconf -lv` output
--
[EMAIL PROTECTED]:2:2:0: class=0x02 card=0x10018086 chip=0x10268086 rev=0x01  
hdr=0x00

   vendor = 'Intel Corporation'
   device = '82545GM Gigabit Ethernet Controller'
   class  = network
   subclass   = ethernet
--

uname output
--
FreeBSD  7.0-STABLE FreeBSD 7.0-STABLE #2: Wed Jul 16 20:36:12 UTC 2008   
  root@:/usr/obj/usr/src/sys/STONE  i386

--

please, any solution?



Intel probably has a utility to reset the EEPROM settings on the NIC.
Jack Vogel may know where to get such a utility.

I do not believe this problem is FreeBSD-related.

  

thx
took IBAUTIL.EXE from Intel`s site, now my Intel_NIC works

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: consolekit on 7.0-STABLE i386

2008-08-07 Thread sam

Kostik Belousov wrote:

On Thu, Aug 07, 2008 at 12:00:37PM +0400, sam wrote:
  

Kostik Belousov wrote:


On Fri, Aug 01, 2008 at 06:16:49PM +0400, sam wrote:
 
  

Nate Eldredge wrote:
   

0  3 97
0 16 0  68660K   643M 0   0   0   012   0  28   34  120  385  
0  3 97
0 16 0  68660K   643M 0   0   0   0 0   0   04  120  292  
0  3 97

^C
#
|--

please, any solution ...
   


Solution for what ? There is nothing wrong with the system.

For the purely estetisk purpose, you may look up the line
tsleep(VTY_WCHAN(sc, i), PZERO | PCATCH, "waitvt", 0);
or similar in sys/dev/syscons/syscons.c, and remove the "PZERO |" substring
  

>from it.

 
  

ok

Why proc-b on the HEAD, have low values (with working consolekit)?



On what revision of HEAD ? I committed the change that causes the thread
to sleep on the PZERO+1 priority instead of PZERO as r181286.
  


-
# uname -a
FreeBSD  8.0-CURRENT FreeBSD 8.0-CURRENT #3: Fri Jul  4 20:01:51 MSD
2008 root@:/usr/obj/usr/src/sys/DAMASK  i386
-

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: consolekit on 7.0-STABLE i386

2008-08-07 Thread sam

Kostik Belousov wrote:

On Fri, Aug 01, 2008 at 06:16:49PM +0400, sam wrote:
  

Nate Eldredge wrote:


On Wed, 30 Jul 2008, sam wrote:

  
0 19 0   1113M29M   112   0   0   032   0   0   1  100 5549 
1682 11 1 88
0 19 0   1113M29M   297   0   0   0   136   0   0   2  122 78880 
1749  6 7 87

|

consolekit in |waitvt state, influencing on high volumes in procs-b

I don't understand what the problem is.  It looks like consolekit is 
sleeping and not using any CPU.  "waitvt" just indicates where in the 
kernel it's sleeping.  I don't understand what you mean by "high 
volumes in procs-b".


  

How-To-Repeat:
--
# (|cd /usr/ports/sysutils/consolekit/ && make install clean)

# /usr/local/etc/rc.d/dbus forcestart

# vmstat -w 1
procs  memory  page   disk   faults cpu
r b w avmfre   flt  re  pi  pofr  sr ad0   in   sy   cs us 
sy id
2 1 0  62252K   644M88   0   0   080   0   02   83  279  1  
1 98
0 1 0  62252K   644M 0   0   0   0 0   0   04  134  292  0  
3 97
0 1 0  62252K   644M 0   0   0   0 0   0   04  123  299  0  
2 98
1 1 0  62252K   644M 0   0   0   0 0   0   03  120  305  0  
3 97

^C
# /usr/local/sbin/console-kit-daemon && vmstat -w 1
procs  memory  page   disk   faults cpu
r b w avmfre   flt  re  pi  pofr  sr ad0   in   sy   cs us 
sy id
2 1 0  67572K   643M88   0   0   080   0   02   83  279  1  
1 98
0 16 0  68660K   643M   103   0   0   0 2   0  10   13  643  381  
2  4 94
0 16 0  68660K   643M 0   0   0   0 0   0   03  120  281  
0  4 96
0 16 0  68660K   643M 0   0   0   0 0   0   02  120  278  
0  3 97
0 16 0  68660K   643M 0   0   0   012   0  28   34  120  385  
0  3 97
0 16 0  68660K   643M 0   0   0   0 0   0   04  120  292  
0  3 97

^C
#
|--

please, any solution ...



Solution for what ? There is nothing wrong with the system.

For the purely estetisk purpose, you may look up the line
tsleep(VTY_WCHAN(sc, i), PZERO | PCATCH, "waitvt", 0);
or similar in sys/dev/syscons/syscons.c, and remove the "PZERO |" substring
from it.
  

ok

Why proc-b on the HEAD, have low values (with working consolekit)?

/Vladimir Ermakov


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: consolekit on 7.0-STABLE i386

2008-08-01 Thread sam

Kostik Belousov wrote:

On Fri, Aug 01, 2008 at 06:16:49PM +0400, sam wrote:
  

Nate Eldredge wrote:


On Wed, 30 Jul 2008, sam wrote:

  
0 19 0   1113M29M   112   0   0   032   0   0   1  100 5549 
1682 11 1 88
0 19 0   1113M29M   297   0   0   0   136   0   0   2  122 78880 
1749  6 7 87

|

consolekit in |waitvt state, influencing on high volumes in procs-b

I don't understand what the problem is.  It looks like consolekit is 
sleeping and not using any CPU.  "waitvt" just indicates where in the 
kernel it's sleeping.  I don't understand what you mean by "high 
volumes in procs-b".


  

How-To-Repeat:
--
# (|cd /usr/ports/sysutils/consolekit/ && make install clean)

# /usr/local/etc/rc.d/dbus forcestart

# vmstat -w 1
procs  memory  page   disk   faults cpu
r b w avmfre   flt  re  pi  pofr  sr ad0   in   sy   cs us 
sy id
2 1 0  62252K   644M88   0   0   080   0   02   83  279  1  
1 98
0 1 0  62252K   644M 0   0   0   0 0   0   04  134  292  0  
3 97
0 1 0  62252K   644M 0   0   0   0 0   0   04  123  299  0  
2 98
1 1 0  62252K   644M 0   0   0   0 0   0   03  120  305  0  
3 97

^C
# /usr/local/sbin/console-kit-daemon && vmstat -w 1
procs  memory  page   disk   faults cpu
r b w avmfre   flt  re  pi  pofr  sr ad0   in   sy   cs us 
sy id
2 1 0  67572K   643M88   0   0   080   0   02   83  279  1  
1 98
0 16 0  68660K   643M   103   0   0   0 2   0  10   13  643  381  
2  4 94
0 16 0  68660K   643M 0   0   0   0 0   0   03  120  281  
0  4 96
0 16 0  68660K   643M 0   0   0   0 0   0   02  120  278  
0  3 97
0 16 0  68660K   643M 0   0   0   012   0  28   34  120  385  
0  3 97
0 16 0  68660K   643M 0   0   0   0 0   0   04  120  292  
0  3 97

^C
#
|--

please, any solution ...



Solution for what ? There is nothing wrong with the system.

For the purely estetisk purpose, you may look up the line
tsleep(VTY_WCHAN(sc, i), PZERO | PCATCH, "waitvt", 0);
or similar in sys/dev/syscons/syscons.c, and remove the "PZERO |" substring
from it.
  

high volumes in proc-b - normal ?

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: consolekit on 7.0-STABLE i386

2008-08-01 Thread sam

Nate Eldredge wrote:

On Wed, 30 Jul 2008, sam wrote:



0 19 0   1113M29M   112   0   0   032   0   0   1  100 5549 
1682 11 1 88
0 19 0   1113M29M   297   0   0   0   136   0   0   2  122 78880 
1749  6 7 87

|

consolekit in |waitvt state, influencing on high volumes in procs-b


I don't understand what the problem is.  It looks like consolekit is 
sleeping and not using any CPU.  "waitvt" just indicates where in the 
kernel it's sleeping.  I don't understand what you mean by "high 
volumes in procs-b".



How-To-Repeat:
--
# (|cd /usr/ports/sysutils/consolekit/ && make install clean)

# /usr/local/etc/rc.d/dbus forcestart

# vmstat -w 1
procs  memory  page   disk   faults cpu
r b w avmfre   flt  re  pi  pofr  sr ad0   in   sy   cs us 
sy id
2 1 0  62252K   644M88   0   0   080   0   02   83  279  1  
1 98
0 1 0  62252K   644M 0   0   0   0 0   0   04  134  292  0  
3 97
0 1 0  62252K   644M 0   0   0   0 0   0   04  123  299  0  
2 98
1 1 0  62252K   644M 0   0   0   0 0   0   03  120  305  0  
3 97

^C
# /usr/local/sbin/console-kit-daemon && vmstat -w 1
procs  memory  page   disk   faults cpu
r b w avmfre   flt  re  pi  pofr  sr ad0   in   sy   cs us 
sy id
2 1 0  67572K   643M88   0   0   080   0   02   83  279  1  
1 98
0 16 0  68660K   643M   103   0   0   0 2   0  10   13  643  381  
2  4 94
0 16 0  68660K   643M 0   0   0   0 0   0   03  120  281  
0  4 96
0 16 0  68660K   643M 0   0   0   0 0   0   02  120  278  
0  3 97
0 16 0  68660K   643M 0   0   0   012   0  28   34  120  385  
0  3 97
0 16 0  68660K   643M 0   0   0   0 0   0   04  120  292  
0  3 97

^C
#
|--

please, any solution ...
|
|/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: consolekit on 7.0-STABLE i386

2008-07-31 Thread sam

Nate Eldredge wrote:

On Wed, 30 Jul 2008, sam wrote:


hello

my trouble


FreeBSD static 7.0-STABLE FreeBSD 7.0-STABLE #23: Mon Jul 28 18:10:51 
MSD 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/STATIC  i386



top_output-
|874 root17   00  8296K  2660K waitvt 1   0:00  0.00% 
console-kit-daemon|



---vmstat_output---
| procs  memory  pagedisks 
faultscpu
r b w avmfre   flt  re  pi  pofr  sr ad4 ad6   in   sy   
cs us sy id
0 19 0   1113M29M   493   1   0   0   265 129   0   0  133 45119 
4588  8 5 87
0 20 0   1113M29M   249   0   2   0  3311   0   0  22  157 7872 
2262  5 7 88
0 19 0   1113M29M   346   0   0   0   148   0   0   0  110 78963 
1793  4 9 87
0 19 0   1113M29M   115   0   0   0 0   0   0   0  105 5743 
1731 13 1 85
0 19 0   1113M29M   318   0   0   0   138   0   0   0  108 78837 
1732  3 10 87
0 19 0   1113M29M   112   0   0   032   0   0   1  100 5549 
1682 11 1 88
0 19 0   1113M29M   297   0   0   0   136   0   0   2  122 78880 
1749  6 7 87

|

consolekit in |waitvt state, influencing on high volumes in procs-b


I don't understand what the problem is.  It looks like consolekit is 
sleeping and not using any CPU.  "waitvt" just indicates where in the 
kernel it's sleeping.  I don't understand what you mean by "high 
volumes in procs-b".



yes, but  procs-b have low volumes after killed consolekit process

i`m watched  it on many systems (7.0-STABLE i386)

/Vladimir Ermakov


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


consolekit on 7.0-STABLE i386

2008-07-30 Thread sam

hello

my trouble


FreeBSD static 7.0-STABLE FreeBSD 7.0-STABLE #23: Mon Jul 28 18:10:51 
MSD 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/STATIC  i386



top_output-
|874 root17   00  8296K  2660K waitvt 1   0:00  0.00% 
console-kit-daemon|



---vmstat_output---
| procs  memory  pagedisks faults
cpu
r b w avmfre   flt  re  pi  pofr  sr ad4 ad6   in   sy   cs 
us sy id
0 19 0   1113M29M   493   1   0   0   265 129   0   0  133 45119 
4588  8  5 87
0 20 0   1113M29M   249   0   2   0  3311   0   0  22  157 7872 
2262  5  7 88
0 19 0   1113M29M   346   0   0   0   148   0   0   0  110 78963 
1793  4  9 87
0 19 0   1113M29M   115   0   0   0 0   0   0   0  105 5743 1731 
13  1 85
0 19 0   1113M29M   318   0   0   0   138   0   0   0  108 78837 
1732  3 10 87
0 19 0   1113M29M   112   0   0   032   0   0   1  100 5549 1682 
11  1 88
0 19 0   1113M29M   297   0   0   0   136   0   0   2  122 78880 
1749  6  7 87

|

consolekit in |waitvt state, influencing on high volumes in procs-b

|please any solution?

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


forcefsck on booting stage

2008-07-28 Thread sam

Hello,

How to make 'fsck -f' on booting stage of remote system?

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: crypto(9) and maxoplen

2008-07-21 Thread Sam Leffler

Pawel Jakub Dawidek wrote:

On Mon, Jul 21, 2008 at 02:10:00PM +0200, Patrick Lamaizi?re wrote:
  

Le Sun, 20 Jul 2008 21:39:55 +0200,
Pawel Jakub Dawidek <[EMAIL PROTECTED]> a écrit :

Hello,



In the "opencrypto framework" the function crypto_register() has an
argument 'maxoplen'.

http://fxr.watson.org/fxr/source/opencrypto/crypto.c#L625

Does somebody know what was the goal of this parameter? It is not
used by the framework.

The man page of crypto(9) says :
For each algorithm the driver supports, it must then call
crypto_register(). The first two arguments are the driver and
algorithm identifiers.  The next two arguments specify the largest
possible operator length (in bits, important for public key
operations) and flags for this algorithm.

I'm asking if it can help for this problem: the glxsb driver can
perform AES-CBC algorithm only with 128 bits key and may be
'maxoplen' was intended for this case. 


Without something to specify the key's length, the driver is
selected by the framework even with keys != 128 bits. So it fails
when the session is opened. This prevents setkey/ipsec to work with
key length != 128 bits if the driver is loaded.


If I read code properly, there is currently no way for a driver to say
to the opencrypto framework that only AES-CBC with 128bit key is
supported. A driver can only state that it supports AES-CBC, that's
all. As a workaround the driver should implement AES-CBC-192 and
AES-CBC-256 in software.
  

Yes, but my question is about the maxoplen parameter. Was it intended
for this case? Why we keep this parameter?



Can't help here, no idea. Eventhough it isn't something I'd like to see
implemented. 'maxoplen' is just a little better than what we have now.
And what if a driver supports 192 or 256 bits only?

  

IMHO, It is far easier to hack the OCF to use this parameter than
to implement a workaround. It would be a better solution, by
sample we may want to use the driver for AES-128 and another
hardware that provides AES 192/256.

Another (the best?) solution would be for the crypto framework to select
another driver if the driver's newsession() fails.



There are many improvements that could be done in opencrypto framework,
believe me. One of the things that annoys me a lot is that if you want
to use IPsec with a driver that support only encryption, you have to
implement hash functions in software for the given driver.

Feel free to work on this, but be sure to avoid solutions like this
maxoplen thing, which bascially isn't really a step further. Choosing
another driver on newsession failure sounds reasonable, although we may
lose informations like 'the caller wanted hardware crypto only'.
  


I've lost track of the history behind maxoplen.  As Pawel says a max 
parameter is only minimally useful in describing device capabilities.


My main comment is that I used to consider it important to maintain 
interoperability w/ obsd for the sake of sharing work.  However we've 
long since diverged such that it's infeasible so revamping api's is fair 
game.  If people want to work on the crypto framework that'd be great; 
they might also take a look at Thor's netbsd work to improve performance 
of applications that use /dev/crypto (e.g. openssl).


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


patch for Intel G33 on FreeBSD 6.3

2008-05-23 Thread Sam Fourman Jr.
hello,
I have a New motherboard that has a integrated Intel G33 based video card.

I see there is support for this in FreeBSD 7 kernel. (Disabled by Default)
http://lists.freebsd.org/pipermail/cvs-src/2007-July/080677.html

I was wondering if anyone had a patch laying around that would apply on
FreeBSD 6.3

I would be more than willing to test this and even provide back traces.

Thank you

Sam Fourman Jr.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Hifn 7955 doesn't work with Freebsd 7.0-release

2008-05-21 Thread Sam Leffler

Richard van Mansom wrote:

Hi,

I am trying to setup two Soekris 4521 with a minipci vpn1411 (Hi/fn 7955) in
a vpn. 


I understood that the crypto card should automatically work with only three
kernel configuration file modification.

So I added these three lines

device  crypto
device  cryptodev
device  hifn

I tested with openvpn (the one release with pkg_add). I used the default
cipher (I think this is BF-CBC - Blowfish 128 bit). The VPN works but I
didn't notice any difference in performance (with or without the crypto
card). 
I also tested the crypto card with AES128 but the performance only got worse

(didn't have a baseline for that one)

Relevant output:
dmesg | grep hifn
hifn0 mem 0xa000-0xafff,0xa0002000-0xa0003fff,0xa0008000-0xa000
irq 10 at device 16.0 on pci0
hifn0: [ITHREAD]
hifn0: Hifn 7955, rev 0, 32KB dram, pll=0x801

dmesg | grep crypto
cryptosoft0:  on motherboard

uname -a
FreeBSD Soekris 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sat May 17 10:53:38 UTC
2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/C5  i386

Any help would be appreciated 

  
Unfortunately openssl doesn't use the accelerator by default.  This 
means all apps that use openssl likewise are not automatically 
accelerated.  I suggested a patch but it was not accepted.  I can't 
recall how you force openssl and/or consumers to use the device.


If you want to check whether the kernel support is working correctly 
look in src/tools/tools/crypto for cryptotest and hifnstats.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: My GSoC Intro...

2008-04-27 Thread Sam Xia
hi Przemek,

I am very interested at what you are going to do. Could you tell me what
kind of chips are used in GSoC. (I mean that the chip is made by Freesacle
or by the others.)

 Best Regards, Sam Xia 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Matt Sealey
> Sent: Friday, April 25, 2008 7:59 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: My GSoC Intro...
> 
> Hi Przemek,
> 
> If you need any help at all, feel free to bug me :)
> 
> We're very excited about the FreeBSD port to Efika.
> 
> --
> Matt Sealey <[EMAIL PROTECTED]>
> Genesi, Manager, Developer Relations
> 
> vi0 wrote:
> > Hello everybody!!!
> > 
> > My name is Przemek Witaszczyk and I am one of those very 
> happy FreeBSD 
> > GSoCers of 2008:)
> > 
> > I am 25 years old and I come from Polad. Currently I'm 
> working on my 
> > PhD in the field of theoretical physics (AdS/CFT 
> correspondence, one 
> > nifty thing that came out from the superstrings theory...). 
> MSc also 
> > in theory, two years ago at Jagiellonian University, Krakow...
> > 
> > My story of open source operating systems began in high 
> school, when I 
> > met Linux and was persuaded by the fact that you can never stop 
> > configuring them:>. Since then I've checked out several 
> OSes such like 
> > Solaris, Tru64 and even Plan9, but no doubt FreeBSD was the one I'd 
> > liked the most.
> > 
> > So here I am. Partially by an accident I began working with 
> embedded 
> > systems developer, Rafal Jaworowski (and his UltraTeam:>), 
> who asked 
> > me if I'd liked to take a try in GSoC. So eventually we did 
> it and now 
> > with him as my Mentor I'm going to port FreeBSD to Efika - 
> a PPC based 
> > system on a chip eval board. What I expect the most is learning as 
> > much as possible about the unix kernel and getting to know with as 
> > many fbsd developers as possible.
> > And - to succeed, of course..
> > 
> > Greets!
> > 
> > Przemek Witaszczyk
> > 
> > ___
> > [EMAIL PROTECTED] mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-ppc
> > To unsubscribe, send any mail to 
> "[EMAIL PROTECTED]"
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ppc
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


7.0-RELEASE Kernel Panic in _mtx_lock_sleep() on shutdown

2008-04-03 Thread Sam Kingston

Hi all,

I am getting panic()s upon each shutdown (visibly after disks have been 
synced). kgdb reveals the at /usr/src/sys/kern/kern_mutex.c:335 
_mtx_lock_sleep() as the culprit.


Running 7.0-RELEASE with root mounted from a ZFS file system. Seems to 
only have started since creating a second raidz data pool (mia-data), 
yet dismounting this before shutdown does not stop the panic().


uname:
FreeBSD mia.dhcp.sjkwi.com.au 7.0-RELEASE FreeBSD 7.0-RELEASE #1: Sun 
Mar  2 07:26:17 EST 2008 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/MIA  amd64


zpool list:
NAMESIZEUSED   AVAILCAP  HEALTH ALTROOT
mia-data   2.03T   1.05T   1003G51%  ONLINE -
mia-sys 288G   9.58G278G 3%  ONLINE -

panic:
Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x258
fault code  = supervisor read data, page not present
instruction pointer = 0x8:0x802c805a
stack pointer   = 0x10:0xb33eb840
frame pointer   = 0x10:0xff00011109c0
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 1 (init)
trap number = 12
panic: page fault
cpuid = 0

kgdb output:
#0  doadump () at pcpu.h:194
#1  0x0004 in ?? ()
#2  0x802d271f in boot (howto=260) at 
/usr/src/sys/kern/kern_shutdown.c:409

#3  0x802d2b48 in panic (fmt=0x104 )
at /usr/src/sys/kern/kern_shutdown.c:563
#4  0x804a510a in trap_fatal (frame=0xff00011109c0, 
eva=18446742974215805136)

at /usr/src/sys/amd64/amd64/trap.c:724
#5  0x804a54b1 in trap_pfault (frame=0xb33eb790, usermode=0)
at /usr/src/sys/amd64/amd64/trap.c:641
#6  0x804a5d6f in trap (frame=0xb33eb790)
at /usr/src/sys/amd64/amd64/trap.c:410
#7  0x8048cbce in calltrap () at 
/usr/src/sys/amd64/amd64/exception.S:169

#8  0x802c805a in _mtx_lock_sleep (m=0xff00068772d8,
tid=18446742974215817664, opts=Variable "opts" is not available.
) at /usr/src/sys/kern/kern_mutex.c:335
#9  0x803445b3 in vrele (vp=0xff00068771f0)
at /usr/src/sys/kern/vfs_subr.c:2128
#10 0x80344b46 in vflush (mp=Variable "mp" is not available.
) at /usr/src/sys/kern/vfs_subr.c:2441
#11 0x8082e0ac in ?? ()
#12 0xff000636a000 in ?? ()
#13 0xff000636a054 in ?? ()
#14 0x5000 in ?? ()
#15 0x0008 in ?? ()
#16 0xb33eba60 in ?? ()
#17 0x in ?? ()
#18 0xff00011109c0 in ?? ()
#19 0x0008 in ?? ()
#20 0x5000 in ?? ()
#21 0x0008 in ?? ()
#22 0x in ?? ()
#23 0x8033d874 in dounmount (mp=0xff0006348ca0, 
flags=17893824, td=0x8)

at /usr/src/sys/kern/vfs_mount.c:1286
#24 0x80343129 in vfs_unmountall () at 
/usr/src/sys/kern/vfs_subr.c:2936
#25 0x802d297f in boot (howto=8) at 
/usr/src/sys/kern/kern_shutdown.c:391

#26 0x802d2c9d in reboot (td=Variable "td" is not available.
) at /usr/src/sys/kern/kern_shutdown.c:169
#27 0x804a571c in syscall (frame=0xb33ebc70)
at /usr/src/sys/amd64/amd64/trap.c:852
#28 0x8048cddb in Xfast_syscall () at 
/usr/src/sys/amd64/amd64/exception.S:290

#29 0x0040854c in ?? ()

instruction pointer:
#8  0x802c805a in _mtx_lock_sleep (m=0xff00068772d8,
tid=18446742974215817664, opts=Variable "opts" is not available.
) at /usr/src/sys/kern/kern_mutex.c:335

dmesg (cut due to long length:
http://users.sjkwi.com.au/sam/fbsd/dmesg.txt

kernel config (cut due to long length):
http://users.sjkwi.com.au/sam/fbsd/MIA

Any ideas?

--

Kind regards,

Sam Kingston
SJK Web Industries

Email  [EMAIL PROTECTED]
Webhttp://www.sjkwi.com.au
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Freebsd 7.0 on ASUS P4R8L - No Disks Found!

2008-03-18 Thread sam

But with that said, what mode is your SATA/IDE controller in?  If there is
an AHCI or Legacy mode, try it again.


or Compatible mode (not Enchansed) in BIOS

/Vladimir Ermakov


//

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: wpi -- periodic disconnections

2008-03-04 Thread Sam Leffler

Pietro Cerutti wrote:

Andrew Thompson wrote:
  

On Tue, Mar 04, 2008 at 10:47:39PM +0100, Pietro Cerutti wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi list,

I can't get my if_wpi (Intel(R) PRO/Wireless 3945ABG) stay connected to
my WPA-enabled access point for more than a few hours. Moreover, when it
happens, I have to unload the module, reload it and restart
wpa_supplicant in order to reconnect to the network. Any ideas?
  

I have a WIP patch that may help, please give this a go.

http://citylink.unixathome.org/~thompsa/wpi_testing8.diff

Its the combination of several peoples work and I am planning to send it
out again later in the week after some more review.



Hello,
your patch helps, partially:

- I've had a disconnection after a few minutes:
Michael MIC failure wireless event: keyix=0 src_addr=00:1a:70:47:cc:5c
Michael MIC failure detected
WPA: Sending EAPOL-Key Request (error=1 pairwise=1 ptk_set=1 len=99)
TKIP countermeasures started
wpa_driver_bsd_set_countermeasures: enabled=1
State: COMPLETED -> DISCONNECTED
wpa_driver_bsd_deauthenticate
wpa_driver_bsd_del_key: keyidx=0
wpa_driver_bsd_del_key: keyidx=1
wpa_driver_bsd_del_key: keyidx=2
wpa_driver_bsd_del_key: keyidx=3
wpa_driver_bsd_del_key: addr=00:1a:70:47:cc:5c keyidx=0
ioctl[SIOCS80211, op 20, len 7]: Can't assign requested address
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: External notification - portValid=0
Added BSSID 00:1a:70:47:cc:5c into blacklist
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

- I've been able to reconnect without kld-reloading the module, by
killing and restarting wpa_supplicant

  
Something is corrupting data on rx; it is unlikely you are getting MIC 
errors.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Is it possible that modern wireless card only supports WPA and not WEP or this is a bug in the driver?

2008-02-27 Thread Sam Leffler

Yuri wrote:

Pietro Cerutti wrote:

It wouldn't make sense. Flags are used to specify capabilities of the
  interface, not things provided by the operating system.

  

This is very confusing to user.
User is assumed to have this bit of knowledge that WEP flag actually
means only hardware support, not support in general.

On another note WEP is actually supported by interface but driver authors
didn't bother to use it. So WEP flag doesn't represent actual 
capabilities of

the interface and this is again confusing.

When I type 'ifconfig  ...' I am mostly interested what can I 
use from
that side, not what is supported by hardware. Is there any way to know 
what is

logically supported by network interface as passed to 'ifconfig' vs. what
is supported by hardware interface?


If you cannot use a feature you'll get an error when you try to use it.  
There simply are not enough capability bits around to waste on features 
that are always true.  If I reorg this stuff (and I intend to to split 
crypto out into a separate features word because we are out of bits) 
then I can look into expanding the status.


To be honest you're the first person that's even noticed you can list 
capabilities in the 3+ years that's been in place (or at least made 
public mention).  Hardly seems like something that's constantly confused 
people.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Is it possible that modern wireless card only supports WPA and not WEP or this is a bug in the driver?

2008-02-27 Thread Sam Leffler

Yuri wrote:

I have a Linksys PCI wireless card that is being attached by "ral" driver:
ral0:  mem 0xcffe8000-0xcffe irq 17 at device
10.0 on pci0
ral0: MAC/BBP RT2561C, RF RT2527
ral0: Ethernet address: 00:18:f8:2e:40:25
ral0: [ITHREAD]

But when I do 'ifconfig ral0 list caps' it returns:
ral0=2181e500
and WEP isn't there.

This looks amazing since WEP is older and very widespread.

So how can I tell if this card can't really support WEP or it's the driver that
can't support it?
  


WEP is always supported.  The WEP capability bit means the driver uses 
the hardware.  Many driver writers were too lazy to implement full 
driver support and just fall back on the host to do crypto.



Also command:
ifconfig ral0 inet 192.168.0.1 netmask 255.255.255.0 ssid freebsdap wepmode on
weptxkey 3 wepkey 3:0x3456789012 authmode open mode 11g mediaopt hostap
succeeds though CAPS doesn't have WEP.
Isn't this a bug?

  


No, see above.

   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


OpenBSM & Jails

2008-02-27 Thread sam

hello

i am using OpenBSM on System with jails

part of praudit output / action write file in jail

--
header,176,10,open(2) - write,creat,trunc,0,Thu Feb 21 13:45:06 2008, + 
501 
msec,argument,3,0x81ed,mode,argument,2,0x601,flags,path,//site/svn/dev.lineage2.dom/pamm/hooks/post-commit,attribute,755,www,www,88,800911,3234053,subject,lynx,root,wheel,root,wheel,44680,44668,56876,10.15.1.116,return,success,4,trailer,176, 


--

please add jail-identification in output (cat /dev/auditpipe | praudit -lp)

/Vladimir Ermakov


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ath0 will not associate

2008-02-21 Thread Sam Leffler
 stretchlimo kernel: ath0: scan_next: chan  44a ->  48a [active, 
dwell min 20 max 200]
Feb 21 11:09:54 stretchlimo kernel: ath0: scan_next: chan  48a ->   2g [active, 
dwell min 20 max 200]
Feb 21 11:09:54 stretchlimo kernel: ath0: scan_next: chan   2g ->   3g [active, 
dwell min 20 max 200]
Feb 21 11:09:54 stretchlimo kernel: ath0: scan_next: chan   3g ->   4g [active, 
dwell min 20 max 200]
Feb 21 11:09:54 stretchlimo kernel: ath0: scan_next: chan   4g ->   5g [active, 
dwell min 20 max 200]
Feb 21 11:09:55 stretchlimo kernel: ath0: scan_next: chan   5g ->   8g [active, 
dwell min 20 max 200]
Feb 21 11:09:55 stretchlimo kernel: ath0: scan_next: chan   8g ->   9g [active, 
dwell min 20 max 200]
Feb 21 11:09:55 stretchlimo kernel: ath0: scan_next: chan   9g ->  10g [active, 
dwell min 20 max 200]


So the card never saw any beacon/probe response frames from any ap's. 
Are there any besides the one you're trying to use?  Can you setup a 2nd 
laptop and sniff to see if your laptop is sending ProbeRequest on the 
channel the ap is using and/or whether it sees frames this laptop 
doesn't see?


BTW I think you're missing a deftxkey 1 in your ifconfig line.

Sam


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


OpenBSM & Jails

2008-02-21 Thread sam

hello

i am using OpenBSM on System with jails

part of praudit output / action write file in jail

--
header,176,10,open(2) - write,creat,trunc,0,Thu Feb 21 13:45:06 2008, + 
501 
msec,argument,3,0x81ed,mode,argument,2,0x601,flags,path,//site/svn/dev.lineage2.dom/pamm/hooks/post-commit,attribute,755,www,www,88,800911,3234053,subject,lynx,root,wheel,root,wheel,44680,44668,56876,10.15.1.116,return,success,4,trailer,176,

--

please add jail-identification in output (cat /dev/auditpipe | praudit -lp)

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [trouble] restart network & vlan`s interface

2008-02-20 Thread sam

Brooks Davis wrote:

On Wed, Feb 20, 2008 at 10:41:22AM +0300, sam wrote:
  


please help me for writing  /etc/rc.conf with  vlan`s  interfaces (without 
problem network sub-system restart)



We don't really support running /etc/rc.d/netif restart without an interface
argument at this time.  We should probably catch that case and report an
error until someone finds time to fix it.

-- Brooks
  

i have this trouble with command:

# /etc/netstart restart 


/Vladimir Ermakov


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


[trouble] restart network & vlan`s interface

2008-02-19 Thread sam

hello

description of my trouble:

part of /etc/rc.conf
--
|cloned_interfaces="vlan0"
ifconfig_vlan0="inet 10.25.6.20 netmask 255.255.255.0 vlan 11 vlandev rl0"
|--

part of command output (/etc/rc.d/netif restart && /etc/rc.d/routing 
restart)

--
|Stopping network: lo0 rl0 pfsync0 pflog0 vlan0.
ifconfig: SIOCIFCREATE2: File exists
ifconfig: SIOCSETVLAN: Device busy|
--
after - vlan0 is not configured

--
# uname -rms
FreeBSD 7.0-PRERELEASE i386
--

please help me for writing  /etc/rc.conf with  vlan`s  interfaces 
(without problem network sub-system restart)


/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: retrive data from mbuf chain

2008-02-07 Thread Sam Leffler

Biks N wrote:

Hi,

I am new to FreeBSD kernel programming.

Currently I am trying to work on mbuf data manupulation.

>From my understanding: data (payload) is stored into one or more mufs
which are chained together through m_next pointer.

Now, I need to retrive all data in mbuf chain ( mbufs linked by
m_next). I am working ip_output() in netinet/ip_output.c

Does there exist inbuilt function/macro to retrive all the data in mbuf chain?
  


man 9 mbuf; look for m_copydata.

   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: double start of scripts in /usr/local/etc/rc.d

2008-02-04 Thread sam

Eygene Ryabinkin wrote:
 


And is your /usr/X11R6 symlinked to /usr/local?
  
  

have this symlink



Then remove /usr/X11R6/etc from the local_startup variable
(in /etc/rc.conf and/or in /etc/defaults/rc.conf) and enjoy single
startup of scripts ;))

Seems like you had updated your system to Xorg 7.2, but forgot
to run /usr/ports/Tools/scripts/mergebase.sh or mergebase.sh
failed to remove /usr/X11R6/etc from local_startup.
  

thx
iam deleted this symlink

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


SCHED_ULE trouble after ugrade 6.2-RELEASE -> 6.3-RELEASE

2008-02-04 Thread sam

hi all
my trouble description:

--part of dmesg---
CPU: Intel(R) Xeon(TM) CPU 2.40GHz (2392.26-MHz 686-class CPU)
 Origin = "GenuineIntel"  Id = 0xf27  Stepping = 7
 
Features=0xbfebfbff

 Features2=0x400
 Logical CPUs per core: 2
---

1. using FreeBSD 6.2-RELEASE i386 SMP with SCHED_ULE
description of boot process: system is booting normal

2. using FreeBSD 6.3-RELEASE i386 SMP with SCHED_ULE
description of boot process: system is full stop on boot process
message:
-
Timecounters tick every 1.000 msec
Waiting 5 seconds for SCSI devices to settle
-

3. using FreeBSD 6.3-STABLE i386 SMP with SCHED_ULE
description of boot process: system is full stop on boot process
message:
-
Timecounters tick every 1.000 msec
Waiting 5 seconds for SCSI devices to settle
-

4. using FreeBSD 6.3-RELEASE i386 SMP with SCHED_4BSD
description of boot process: system is booting normal

please any solution

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: gettimeofday() in hping

2008-02-03 Thread Sam Leffler

Kris Kennaway wrote:

Stefan Lambrev wrote:


I run from host A : hping --flood -p 22 -S 10.3.3.2
and systat -ifstat on host B to see the traffic that is generated
(I do not want to run this monitoring on the flooder host as it will 
effect his performance)


OK, I finally got time to look at this.  Firstly, this is quite an 
inefficient program.  It performs 5 syscalls for each packet that it sends:


  2391 initial thread CALL  sendto(0x3,0x61b050,0x28,0,0x5232c0,0x10)
  2391 initial thread GIO   fd 3 wrote 40 bytes
   0x 4500 2800 7491  4006  0a00 0004 0a00 0001 3a96 
0016 1865 a781 39d8 12aa 5002 0200 52c9 
|E.([EMAIL PROTECTED]:e..9...P...R.|

   0x0026 |..|

  2391 initial thread RET   sendto 40/0x28
  2391 initial thread CALL sigaction(SIGALRM,0x7fffe6b0,0x7fffe690)
  2391 initial thread RET   sigaction 0
  2391 initial thread CALL  setitimer(0,0x7fffe6c0,0x7fffe6a0)
  2391 initial thread RET   setitimer 0
  2391 initial thread CALL  gettimeofday(0x7fffe680,0)
  2391 initial thread RET   gettimeofday 0
  2391 initial thread CALL  gettimeofday(0x7fffe680,0)
  2391 initial thread RET   gettimeofday 0

Here is a further litany of some of the ways in which this software is 
terrible:


* It does not attempt to increase the socket buffer size (as we have 
already discussed), but


* It also doesn't cope with the possibility that the packet may not be 
sent because the send buffer is full.


* With every packet sent in flood mode it sets a timer for 1 second in 
the future even though we have told it not to send packets once a second 
but as fast as possible


* We also set the signal handler with each packet sent, instead of 
setting it once and leaving it.


* We call gettimeofday twice for each packet, once to retrieve the 
second timestamp and once to retrieve the microseconds.  This is only 
for the purpose of computing the RTT.  However, we can only keep track 
of 400 in-flight packets, which means this is also useless in flood mode.


* The suspend handler does not work

* This does not strike me as quality software :)

Fixing all of the above I can send at about 13MB/sec (timecounter is not 
relevant any more).  The CPU is spending about 75% of the time in the 
kernel, so


The "doesn't cope with the possibility that ... the send buffer is full" 
issue is classic linux-specific mis-behaviour.  On linux the process 
will block when the default qdisc finds the device q is stopped (due to 
being full).  I remember cursing iperf for this.


Sam
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: double start of scripts in /usr/local/etc/rc.d

2008-02-01 Thread sam

Eygene Ryabinkin wrote:

Fri, Feb 01, 2008 at 11:59:44AM +, Tom Evans wrote:
  
Sam: what is the output of 
  grep local_startup /etc/rc.conf /etc/defaults/rc.conf



And is your /usr/X11R6 symlinked to /usr/local?
  

have this symlink

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: double start of scripts in /usr/local/etc/rc.d

2008-02-01 Thread sam

Peter Jeremy wrote:

On Fri, Feb 01, 2008 at 12:28:39PM +0300, sam wrote:
  

services apache, mysql & shell-script none.sh is double started



What do you have as local_startup in /etc/rc.conf or /etc/defaults/rc.conf?
Do you still have /usr/X11R6/etc/rc.d listed?

  


/etc/rc.conf

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: double start of scripts in /usr/local/etc/rc.d

2008-02-01 Thread sam

Julian H. Stacey wrote:

services apache, mysql & shell-script none.sh is double started

tryed on 6.3-STABLE i386 - normal work

any solution?



Maybe a reboot after crash, & old PID files were existant.
Check if repeatable.
Do a clean reboot, & see if it repeats.
If it repeats, insert lines like
ps -laxww | grep httpd > /tmp/before
ps -laxww | grep httpd > /tmp/after
at top & bottem of /usr/local/etc/rc.d/apache.sh to debug.

  

iam added line
date >> /var/log/file.log in apache start rc-script 
(/usr/local/etc/rc.d/apache) and viewed after system reboot


# cat /var/log/file.log
Fri Feb  1 12:21:50 MSK 2008
Fri Feb  1 12:21:51 MSK 2008

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: double start of scripts in /usr/local/etc/rc.d

2008-02-01 Thread sam

[EMAIL PROTECTED] wrote:


Local package initialization:Starting NONE
Starting NONE
.
---
services apache, mysql & shell-script none.sh is double started

tryed on 6.3-STABLE i386 - normal work

any solution?



Could you show us your /etc/rc.conf, and output from `ls 
/usr/local/etc/rc.d/' ?


Also, did you create a custom /etc/rc.local ?

iam tried remove /etc/rc.conf - situation is don`t changed for 
shell-script none.sh


# ls -l /usr/local/etc/rc.d/
total 6
-r-xr-xr-x  1 root  wheel   737 Feb  1 08:25 apache
-r-xr-xr-x  1 root  wheel  1659 Feb  1 08:23 mysql-server
-rwxr-xr-x  1 root  wheel31 Feb  1 11:17 none.sh

# ls -l etc/rc.local
ls: etc/rc.local: No such file or directory

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


double start of scripts in /usr/local/etc/rc.d

2008-02-01 Thread sam

hi all
description of my trouble:
on 6.3-RELEASE i386
---
Clearing /tmp (X related).
Starting local daemons:.
Updating motd.
Mounting late file systems:.
Starting mysql.
Starting apache.
mysql already running? (pid=8720).
apache already running? (pid=8721).
Configuring syscons: keymap keyrate scrnmap blanktime.
Starting sshd.
Starting cron.
Local package initialization:Starting NONE
Starting NONE
.
---
services apache, mysql & shell-script none.sh is double started

tryed on 6.3-STABLE i386 - normal work

any solution?

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How long is a hz?

2008-01-28 Thread Sam Leffler

Sean Bruno wrote:

Jason Slagle wrote:

On Mon, 28 Jan 2008, Sean Bruno wrote:

I couldn't quite find the definition for "hz" in sys/ this morning.  
What is it's value and where is it defined?


From http://en.wikipedia.org/wiki/Hertz

   The hertz (symbol: Hz) is the International System of Units (SI) base
   unit of frequency. Its base unit is cycle/s or s^-1 (also called
   inverse seconds, reciprocal seconds). In English, hertz is used as 
both
   singular and plural. As any SI unit, Hz can be prefixed; commonly 
used

   multiples are kHz (kilohertz, 10^3 Hz), MHz (megahertz, 10^6 Hz), GHz
   (gigahertz, 10^9 Hz) and THz (terahertz, 10^12 Hz).

   One hertz simply means one cycle per second (typically that which is
   being counted is a complete cycle); 100 Hz means one hundred 
cycles per

   second, and so on. The unit may be applied to any periodic event--for
   example, a clock might be said to tick at 1 Hz, or a human heart 
might
   be said to beat at 1.2 Hz. The frequencies of aperiodic events, 
such as

   radioactive decay, are expressed in becquerels.



But more importantly, where is "hz" defined in the kernel tree?

Sean
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to 
"[EMAIL PROTECTED]"




http://fxr.watson.org/fxr/ident?i=hz
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Nvidia Driver w/RELENG_7

2008-01-14 Thread Sam Leffler

John Baldwin wrote:

On Sunday 13 January 2008 08:55:46 pm Yuri Pankov wrote:
  

On Sun, Jan 13, 2008 at 05:22:46PM -0800, Ali Mashtizadeh wrote:


Hi,

Does anyone have the nvidia video driver working with releng 7? What I am
seeing is that the kernel module compiles and loads fine, but it will not
detect any video card. I've tried removing the agp device from my BSD kernel
and using nvidia's.

--
Ali Mashtizadeh
علی مشتی زاده
  

If you are sure that installed version of nvidia-driver supports your
card, try putting nvidia_load="YES" in /boot/loader.conf. I guess your
problem is vgapci attaching to device, leaving nvidia module without
hardware to attach, like below:

[EMAIL PROTECTED]:5:0:0: class=0x03 card=0x40161682 chip=0x040210de
rev=0xa1 hdr=0x00
vendor = 'Nvidia Corp'
device = 'GeForce 8600 GT'
class  = display
subclass   = VGA



Actually, nvidia-driver is supposed to be a child of vgapci0 so it can
cooperate with things like acpi_video(4).  The Nvidia driver author is
aware of this and should be able to fix it.
  


FWIW I tried to update my desktop running HEAD and couldn't get the 
nvidia-driver-96.43.01 driver I need for my Quadro NVS to work 
correctly. The old build of the driver didn't work because of kernel 
changes and after rebuild the system locked up after displaying the 
Nvidia logo. I ended up having to downgrade the system to releng7.


Sam


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Coverity problems?

2008-01-11 Thread Sam Leffler

Mark Linimon wrote:

On Fri, Jan 11, 2008 at 09:12:27PM +0100, Ivan Voras wrote:
These numbers seem strange and out of proportion. I know there has been 
prior cooperation with Coverity - is this just old data?


IIRC Coverity is not tracking our use of their software, at least in
those statistics.  Someone was telling me yesterday that was because
we have our own copy of the Coverity server which we use, rather than
accessing the one on their site that generates the statistics.

Someone, please correct me if I'm wrong.


You are correct; we've had a private coverity server doing nightly runs 
long before coverity setup this service (the project has their own 
license through the FreeBSD Foundation).  I have no idea why coverity 
continues to do freebsd runs as the results are also not meaningful 
because their default models generate false positives that we've long 
since filtered out.


Sam
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


syscall linux_getdents() trouble

2008-01-07 Thread sam
program-test (experimental) for testing syscall linux_getdents() 
http://cs.udmvt.ru/files/temp/linux_dbg.tar.bz2

includes:
* temp/ - test_dir with files (special for crash situation)
* linux_getdents.c - source of program-test
* linux_getdents_static - binary exec file, staticaly compiled on Linux 
Debian 4.0 Etch
* linux_getdents_dynamic - binary exec file, dynamicaly compiled on 
Linux Debian 4.0 Etch


- test failed on systems: FreeBSD 6.3-PRERELEASE with port 
linux_base-fc4, FreeBSD 8.0-CURRENT with port linux_base-fc4;

- test passed on Linux Debian 4.0 Etch

Trouble: syscall linux_getdents() don`t stable work

Trouble Description:
http://lists.freebsd.org/pipermail/freebsd-emulation/2007-September/thread.html
topic subject: linuxolator problem on i386
http://www.freebsd.org/cgi/query-pr.cgi?pr=117010

please help, any solution?

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


How would I make this work in RELENG_7

2007-12-21 Thread Sam Fourman Jr.
I have a PDA smart phone that I would like to use as a wireless modem
on my laptop

someone from OpenBSD helped me get it committed to OpenBSD 's Tree

would someone help me with a similar patch for FreeBSD

here is an old post that I made

http://www.nabble.com/Alltel-PPC6700-Wireless-Modem-td12491547.html


Sam Fourman Jr.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


netcat trouble on timeout

2007-12-14 Thread sam

hi

iam use nc on FreeBSD 8.0-CURRENT
trouble in -t(timeout) option, absentia full break session (very need)

examples:

# time nc -w 1 -z 192.168.44.14 443

real1m15.002s
user0m0.001s
sys 0m0.003s

# time nc -w 1 -z google.com 80
Connection to google.com 80 port [tcp/http] succeeded!

real0m0.385s
user0m0.000s
sys 0m0.007s

any solution

/Vladimir Ermakov

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How to add wake on lan support for your card

2007-11-28 Thread Sam Leffler

Stefan Sperling wrote:

On Wed, Nov 28, 2007 at 05:13:28PM +0100, Julian H. Stacey wrote:
  

Well, I hope I haven't missed anything important, but I guess
that's about it.
  

Wow ! seems like you spent a fair time assembling that lot,



About 2 hours.

  

& it'd sure be a shame if it just got dusty in mail archives,
(OK apart from current readers who might latch it).



Thanks.

  

Maybe you could send it to [EMAIL PROTECTED] list or via send-pr &
suggest it be swallowed as an Annex to main docs ? Seems useful.



I guess the wiki would be more appropriate than the main docs.

Maybe we should add a wiki page about wake on lan?
Reading http://wiki.freebsd.org/AboutWiki it seems that if
I created an account there and someone added me to the
ContributorsGroup for a new WakeOnLan page I would be good to go.

Another place I could add it to is the wake on lan PR, which is at
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/83807

Anyway, it's not lost in any case, because it's in the archives,
and at least I know about it and can always link people there if
they want to read it (or if they ask me to add support for
their card, heheh).
  


I really want to see the WOL support get into the tree.  I looked at it 
before and had some issues with ifconfig integration which is mostly why 
it's not already there.  We're occupied with releases right now so I 
think the right time to get in the tree is after 7.0 goes out.


   Sam


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


  1   2   3   >