Re: FreeBSD hacker 101

2008-01-24 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

william wong wrote:
 Hi,
 
 Are there any docments or pointers to get me started hacking around my
 6.3asap? Building toochains, submitting patches etc or i just
 follow most
 of the conventions in the Linux kernel development community?

I think it's nothing that different.  A typical way is that you find
something you are not happy with, i.e. what you think FreeBSD is lacking
of, do some proof of concept work, discuss it in the mailing list,
refine your work, submit patch, become a committer :-)

The only difference as far as I can tell is that FreeBSD tends to have
stricter code style guidelines (the only exceptions are what we call
vendor code which is maintained outside, this includes toolchains,
device drivers that is supported by vendors, in order to make future
upgrades easier).  However, unlike some other bad code style guidelines,
FreeBSD's coding style is very well documented (as in style(9)), and
following the guideline will make your code easier to read (e.g. think
about how to find the implementation with grep(1)?  Yes, grep ^function.).

We eager to see contributions from all aspects, but if you have no idea
for your own, or is looking for something to give a shot, you can check
out our projects idea page at http://www.freebsd.org/projects/ideas/ .

Small contributions, like making more documentation about various
sysctl's, etc. are more suitable for those who just started to learn
about the code and can not invest a lot of whole bunch of time on
FreeBSD (yet), are welcomed as well.

Another good start is to query our PR database (
http://www.freebsd.org/cgi/query-pr-summary.cgi ) and see if there is
something you have interest, but there is no fix, or there is a fix but
stayed for a long time and push them.

Cheers,
- --
Xin LI [EMAIL PROTECTED]  http://www.delphij.net/
FreeBSD - The Power to Serve!
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHmEebi+vbBBjt66ARArlQAJ4xMkuM6ZflCM25wcq7Q+efxedpAACdH4w6
jwc1NRdGUp/vrGf8mMpWTiM=
=Z6lW
-END PGP SIGNATURE-
___
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-01-24 Thread Stefan Lambrev

Greets,

binto wrote:

Greetings,

Steven Hartland wrote:


- Original Message - From: Ivan Voras [EMAIL PROTECTED]
  

The other thing that bothers me is, that under freebsd is quite easy
to get:
[send_ip] sendto: No buffer space available
It happens almost always on my laptop just few seconds after I start
hping with timecounter=TSC
  

I'm not sure, but from what I understood of Robert Watson's
explanation in the big ZFS thread on -current, maybe increasing
kmem_size (exactly as for ZFS...) could help you with these buffers.


Is this not just running out of mbufs? netstat -m will show if it is
and the fix
is to just increase kern.ipc.nmbclusters.
  

670/1520/2190 mbufs in use (current/cache/total)
462/322/784/25600 mbuf clusters in use (current/cache/total/max)
462/306 mbuf+clusters out of packet secondary zone in use (current/cache)
0/35/35/12800 4k (page size) jumbo clusters in use
(current/cache/total/max)
0/0/0/6400 9k jumbo clusters in use (current/cache/total/max)
0/0/0/3200 16k jumbo clusters in use (current/cache/total/max)
1091K/1164K/2255K bytes allocated to network (current/cache/total)
0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters)
0/0/0 requests for jumbo clusters denied (4k/9k/16k)
0/4/6656 sfbufs in use (current/peak/max)
0 requests for sfbufs denied
0 requests for sfbufs delayed
0 requests for I/O initiated by sendfile
0 calls to protocol drain routines

kern.ipc.nmbclusters: 25600



sysctl -a kern.ipc.maxsockbuf ?
  

No, this doesn't change things.
with timecounter=TSC it's easily reproduced on on 6.3.

--

Best Wishes,
Stefan Lambrev
ICQ# 24134177

___
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-01-24 Thread Stefan Lambrev

Greets,

Kris Kennaway wrote:

Ivan Voras wrote:

On 23/01/2008, Stefan Lambrev [EMAIL PROTECTED] wrote:

Greets,

Now I have final results with Linux and FreeBSD on the same hardware
CPU: Intel(R) Xeon(R) CPU 3070  @ 2.66GHz - dual core
Lan: [EMAIL PROTECTED]:3:0:0: class=0x02 card=0x10bc8086 chip=0x10bc8086
rev=0x06 hdr=0x00
vendor = 'Intel Corporation'
device = '82571EB Gigabit Ethernet Controller (Copper)'
class  = network
subclass   = ethernet

FreeBSD releng_7_0 from today - amd64, sched_ule.

ACPI-Fast - 6.187 MB/s
TSC - 9.455 MB/s
dummy - 9.577 MB/s

Linux rambo2 2.6.22-14-generic #1 SMP Tue Dec 18 05:28:27 UTC 2007
x86_64 GNU/Linux - kubuntu

TSC - 19.456 MB/s
acpi_pm - 15.394 MB/s
jiffies - 19.480 MB/s

This is really not what I expected.


For once, it's something I expected :) I just hope it isn't one of
those cases where Kris absolutely cannot reproduce it and arrives at
numbers in favour of FreeBSD :)
(just joking here, absolutely no ill feelings involved).


Harumph :)  The first step is that we need to understand where the 
application is spending its time.  Hopefully Stefan or someone else 
will  be able to test it under hwpmc.


It would be helpful if you post exact command line arguments from all 
cases.


The other thing that bothers me is, that under freebsd is quite easy 
to get:

[send_ip] sendto: No buffer space available
It happens almost always on my laptop just few seconds after I start
hping with timecounter=TSC


I'm not sure, but from what I understood of Robert Watson's
explanation in the big ZFS thread on -current, maybe increasing
kmem_size (exactly as for ZFS...) could help you with these buffers.


It is the socket buffer that is filling up.  Either the application is 
not increasing it to large enough size or the default maximum is too 
low (Linux may set a larger default).  Try increasing 
kern.ipc.maxsockbuf and confirming with the source and/or ktrace that 
it is doing the right setsockopt() call.

Increasing kern.ipc.maxsockbuf doesn't help.

Actually this is the code that failed and print this error:

   result = sendto(sockraw, packet, packetsize, 0,
   (struct sockaddr*)remote, sizeof(remote));

   if (result == -1  errno != EINTR  !opt_rand_dest  
!opt_rand_source) {

   perror([send_ip] sendto);

Those are the only references for setsockopt when ktracing:
3385 hpingCALL  __sysctl(0xbfbfe870,0x6,0,0xbfbfe888,0,0)
 3385 hpingRET   __sysctl 0
 3385 hpingCALL  __sysctl(0xbfbfe870,0x6,0x28305180,0xbfbfe888,0,0)
 3385 hpingRET   __sysctl 0
 3385 hpingCALL  socket(PF_INET,SOCK_DGRAM,IPPROTO_IP)
 3385 hpingRET   socket 3
 3385 hpingCALL  setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe884,0x4)
 3385 hpingRET   setsockopt 0
 3385 hpingCALL  connect(0x3,0x8067da0,0x10)
 3385 hpingRET   connect 0
 3385 hpingCALL  getsockname(0x3,0xbfbfe874,0xbfbfe888)
 3385 hpingRET   getsockname 0
 3385 hpingCALL  close(0x3)
 3385 hpingRET   close 0
 3385 hpingCALL  socket(PF_INET,SOCK_RAW,IPPROTO_RAW)
 3385 hpingRET   socket 3
 3385 hpingCALL  setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe914,0x4)
 3385 hpingRET   setsockopt 0
 3385 hpingCALL  setsockopt(0x3,0,0x2,0xbfbfe914,0x4)
 3385 hpingRET   setsockopt 0
 3385 hpingCALL  open(0xbfbfe8a4,O_RDWR,unused0)
 3385 hpingNAMI  /dev/bpf0
 3385 hpingRET   open -1 errno 16 Device busy
 3385 hpingCALL  open(0xbfbfe8a4,O_RDWR,unused0)
 3385 hpingNAMI  /dev/bpf1
 3385 hpingRET   open 4

--

Best Wishes,
Stefan Lambrev
ICQ# 24134177

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


Re: Dell XPS 1530 - Network card issue - Marvell 88E8040

2008-01-24 Thread Pyun YongHyeon
On Thu, Jan 24, 2008 at 10:27:31AM +0100, Chris Stromblad wrote:
  Hi,
  
  This is the output from lspci -v:

'lspci -nvv' is preferred as I have to check device ids.

  09:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040
  PCI-E Fast Ethernet Controller (rev 12)
  Subsystem: Dell Unknown device 022e
  Flags: bus master, fast devsel, latency 0, IRQ 16
  Memory at f9ffc000 (64-bit, non-prefetchable) [size=16K]
  I/O ports at de00 [size=256]
  Capabilities: access denied
  
  0b:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG
  Network Connection (rev 02)
  Subsystem: Intel Corporation Unknown device 1021
  Flags: bus master, fast devsel, latency 0, IRQ 17
  Memory at f9eff000 (32-bit, non-prefetchable) [size=4K]
  Capabilities: access denied
  
  I included the wireless data as well because I wanted to ask if you know
  whether or not this has support from ports? It doesn't get detected when
  booting FreeBSD so I assume that either it needs a binary blob, or that
  perhaps there are some drivers in ports that can be installed once I
  have the wired network functioning properly.
  

Didn't wpi(4) detect your wireless network hardware?

  Once again thank you very much for your help, and if there is anything
  else I can do or get you, please let me know!
  
  - Chris
  

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


Re: Dell XPS 1530 - Network card issue - Marvell 88E8040

2008-01-24 Thread Chris Stromblad
Hi,

This is the output from lspci -v:
09:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040
PCI-E Fast Ethernet Controller (rev 12)
Subsystem: Dell Unknown device 022e
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at f9ffc000 (64-bit, non-prefetchable) [size=16K]
I/O ports at de00 [size=256]
Capabilities: access denied

0b:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG
Network Connection (rev 02)
Subsystem: Intel Corporation Unknown device 1021
Flags: bus master, fast devsel, latency 0, IRQ 17
Memory at f9eff000 (32-bit, non-prefetchable) [size=4K]
Capabilities: access denied

I included the wireless data as well because I wanted to ask if you know
whether or not this has support from ports? It doesn't get detected when
booting FreeBSD so I assume that either it needs a binary blob, or that
perhaps there are some drivers in ports that can be installed once I
have the wired network functioning properly.

Once again thank you very much for your help, and if there is anything
else I can do or get you, please let me know!

- Chris

On Thu, 2008-01-24 at 10:29 +0900, Pyun YongHyeon wrote:
 On Wed, Jan 23, 2008 at 02:50:13PM +0100, Chris Stromblad wrote:
   
   
   Pyun YongHyeon wrote:
   On Wed, Jan 23, 2008 at 12:25:17PM +0100, Chris Stromblad wrote:
 (I originally addressed this to the freebsd-hardware, but got no 
response,  so please forgive me for reposting this here!)
 
 Hi,
 
 It appears as if the Marvell 88E8040 is not yet supported by FreeBSD 
 and
 specifically the msk(4) driver. I would just like to know if there are 
any
 plans on adding support for the above mentioned NIC.
 
   
   I'd like to add support 88E8040(Yukon2 FE+ PCIe Fast ethernet
   controller). I don't think just adding a PCI id is sufficient
   to make it work but it would be even better if you can send me
   the 'pciconf -lcv' output to me.
   
   Will I have to download and install FreeBSD in order to provide this 
   data, or is there a simpler way of doing it?
   
 
 Ether Linux or FreeBSD can do that.
 If you have to run Linux due to lack of driver on FreeBSD,
 send me the output of lspci.
 As you said, you have to install FreeBSD first in order to
 run pciconf -lcv.
 
 If you didn't install FreeBSD yet, just use FreeBSD or Linux
 LiveCD to boot the OS and use lspci or pciconf.
 
   
   I think one of the serious issue of Yukon2 FE+ is introduction
   of new descriptor format and additional bugs for the chip/phy
   as other variants. Since there are no documentation for
   controller/phy hardware, it may take longer than you would
   expect to see a working/stable driver. I guess disabling TSO and
   checksum offload may make it possible to write a minimal driver
   for the hardware. I'll let you know when I have code to test.
   I cannot say the code written by me would work as I don't have
   that hardware.
   
 Normally I wouldn't even bother asking, and just shrug and say, tough 
luck
 they don't support it... next distribution. Thing is, I really, really
 like FreeBSD. I'm kind of a GNU/Linux guy, but I've never managed to
 settle for a distribution and have moved from one to another, never 
quite
 finding something that works with me, and not against me.
 
 Then I tried FreeBSD, actually I just read much of the available
 documentation and I was converted. _THIS_ is how documentation 
 should 
be
 written; clear, concise, to the point and most of all, USEFUL! Thank 
you!
 
 So, my point is that I really want this to work out. I'm willing to 
 give
 as much time as necessary to get this driver working. Whether it's 
 just 
a
 little Device_ID change in the source, I don't know. However, if 
 anyone 
is
 up for helping me getting this to work, I'll provide whatever 
information
 I can.
 
 Many thanks, and keep up the fantastic work on the FreeBSD operating 
system.
 
 Regards,
 Christoffer Str?mblad
 
 PS: I've tried 8.0-CURRENT (snapshot from 27122007), 7.0-RC1 and 
FreeBSD  6.3, no luck.
   
 
-- 
Chris Stromblad
Security Engineer
WASP UK

Regent Street
London, WC2

Dir: +44 207 043 5190

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


Re: zfs plugins

2008-01-24 Thread Dag-Erling Smørgrav
Zaphod Beeblebrox [EMAIL PROTECTED] writes:
 Has any thought been given to the growing number of zfs plugins on solaris?
 In particular, they have an encryption plugin that functions similar to zfs
 compression, but it seems useful to consider their plugins...

I believe pjd@ is already working on encryption support in ZFS; at least
that's what he told me when I suggested porting LUKS...

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Dell XPS 1530 - Network card issue - Marvell 88E8040

2008-01-24 Thread Chris Stromblad
Sorry, here is the correct output, now also run as root!

Again I've included the Wireless, because perhaps someone else would
like to have a look at the data to understand why it's not detected. To
my understanding there should be support as I seem to recall that Intel
even put out the drivers themselves, or at least some hardware
specifications.

09:00.0 0200: 11ab:4354 (rev 12)
Subsystem: 1028:022e
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
TAbort- TAbort- MAbort- SERR- PERR-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at f9ffc000 (64-bit, non-prefetchable)
[size=16K]
Region 2: I/O ports at de00 [size=256]
Capabilities: [48] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [5c] Message Signalled Interrupts: Mask-
64bit+ Queue=0/0 Enable-
Address:   Data: 
Capabilities: [c0] Express Legacy Endpoint IRQ 0
Device: Supported: MaxPayload 128 bytes, PhantFunc
0, ExtTag-
Device: Latency L0s unlimited, L1 unlimited
Device: AtnBtn- AtnInd- PwrInd-
Device: Errors: Correctable- Non-Fatal- Fatal-
Unsupported-
Device: RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
Device: MaxPayload 128 bytes, MaxReadReq 512 bytes
Link: Supported Speed 2.5Gb/s, Width x1, ASPM L0s
L1, Port 0
Link: Latency L0s 256ns, L1 unlimited
Link: ASPM L0s Enabled RCB 128 bytes CommClk+
ExtSynch-
Link: Speed 2.5Gb/s, Width x1

0b:00.0 0280: 8086:4222 (rev 02)
Subsystem: 8086:1021
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
TAbort- TAbort- MAbort- SERR- PERR-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 17
Region 0: Memory at f9eff000 (32-bit, non-prefetchable)
[size=4K]
Capabilities: [c8] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [d0] Message Signalled Interrupts: Mask-
64bit+ Queue=0/0 Enable-
Address:   Data: 
Capabilities: [e0] Express Legacy Endpoint IRQ 0
Device: Supported: MaxPayload 128 bytes, PhantFunc
0, ExtTag-
Device: Latency L0s 512ns, L1 unlimited
Device: AtnBtn- AtnInd- PwrInd-
Device: Errors: Correctable- Non-Fatal- Fatal-
Unsupported-
Device: RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
Device: MaxPayload 128 bytes, MaxReadReq 128 bytes
Link: Supported Speed 2.5Gb/s, Width x1, ASPM L0s
L1, Port 0
Link: Latency L0s 128ns, L1 64us
Link: ASPM L1 Enabled RCB 64 bytes CommClk+
ExtSynch-
Link: Speed 2.5Gb/s, Width x1

On Thu, 2008-01-24 at 18:46 +0900, Pyun YongHyeon wrote:
 On Thu, Jan 24, 2008 at 10:27:31AM +0100, Chris Stromblad wrote:
   Hi,
   
   This is the output from lspci -v:
 
 'lspci -nvv' is preferred as I have to check device ids.
 
   09:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040
   PCI-E Fast Ethernet Controller (rev 12)
   Subsystem: Dell Unknown device 022e
   Flags: bus master, fast devsel, latency 0, IRQ 16
   Memory at f9ffc000 (64-bit, non-prefetchable) [size=16K]
   I/O ports at de00 [size=256]
   Capabilities: access denied
   
   0b:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG
   Network Connection (rev 02)
   Subsystem: Intel Corporation Unknown device 1021
   Flags: bus master, fast devsel, latency 0, IRQ 17
   Memory at f9eff000 (32-bit, non-prefetchable) [size=4K]
   Capabilities: access denied
   
   I included the wireless data as well because I wanted to ask if you know
   whether or not this has support from ports? It doesn't get detected when
   booting FreeBSD so I assume that either it needs a binary blob, or that
   perhaps there are some drivers in ports that can be installed once I
   have the wired network functioning properly.
   
 
 Didn't wpi(4) detect your wireless network hardware?
 
   Once again thank you very much for your help, and if there is anything
   else I can do or get you, please let me know!
   
   - Chris
   
 
-- 
Chris Stromblad
Security Engineer
WASP UK

Regent Street
London, WC2

Dir: +44 207 043 5190

___

Re: FreeBSD hacker 101

2008-01-24 Thread Dag-Erling Smørgrav
william wong [EMAIL PROTECTED] writes:
 Are there any docments or pointers to get me started hacking around my
 6.3 asap? Building toochains, submitting patches etc or i just
 follow most of the conventions in the Linux kernel development
 community?

The toolchain is already in place, no need to build anything.

You'll find our make is different from GNU make.  It may take a while to
get used to it, but when you do, you'll find it much more powerful.

The official channel for patch submissions is send-pr(1), but due to
manpower issues, PRs often get lost in the noise.  Posting the patch to
the appropriate mailing list may be more effective.

Speaking of patches, you should seriously consider upgrading to
RELENG_7, as 6.3 is quite possibly the very last RELENG_6 release, and
patches against 6.3 won't raise much interest from developers.  You'll
find information on how to upgrade in the handbook.

The biggest difference you will notice from Linux is that pretty much
everything, including major kernel subsystems, is documented in man
pages.  If you find something (a library function or system call or
kernel module) that doesn't have a man page, try to track down the
author and prod them - or bitch on freebsd-doc until someone writes a
man page - or write it yourself if you feel up to learning groff (which
isn't for the faint of heart, but you get used to it after a while)

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]
___
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-01-24 Thread Stefan Lambrev

Hi Kris,

Kris Kennaway wrote:

Stefan Lambrev wrote:

Hi Kris,

Kris Kennaway wrote:

Stefan Lambrev wrote:


Kris Kennaway wrote:

Stefan Lambrev wrote:

You should use hwpmc to verify where the application is really 
spending time, since gettimeofday doesn't seem to account for it 
all.

pmc: Unknown Intel CPU.
module_register_init: MOD_LOAD (hwpmc, 0x8029906d, 
0x8054c500) error 78


OK, this is the famous problem with modern CPUs that jkoshy has 
declined to work around :(  There are patches for this in 
perforce, see


http://perforce.freebsd.org/changeView.cgi?CH=126189

I got hwpmc to compile (but only as module)
hwpmc: TSC/1/0x20REA P6/2/0x1ffINT,USR,SYS,EDG,THR,REA,WRI,INV,QUA
but when I try to use pmcstat I receive this error message:
pmcstat: ERROR: Initialization of the pmc(3) library failed: Device 
not configured


kldstat lists hwpmc.ko as loaded and I have options HWPMC_HOOKS in my 
kernel.


Any idea what's go wrong?



You also need changes to the userland libpmc and pmcstat.  They should 
also be in that (or related) p4 changeset though.

Those are the files that I fetched from p4

/usr/src/lib/libpmc/libpmc.c - rev2
/usr/src/sys/amd64/include/pmc_mdep.h rev2
/usr/src/sys/dev/hwpmc/hwpmc_x86.c rev2
/usr/src/sys/modules/hwpmc/Makefile rev3

but I rebuild only kernel - I'll try to rebuild everything :)
do you think this will help getting hwpmc working?

Btw I have hwpmc working on other machine (it's with FreeBSD 
6.3-prerelease).

Can you tell me what stats exactly you need from running hping?

--

Best Wishes,
Stefan Lambrev
ICQ# 24134177

___
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-01-24 Thread Kris Kennaway

Stefan Lambrev wrote:

You also need changes to the userland libpmc and pmcstat.  They should 
also be in that (or related) p4 changeset though.

Those are the files that I fetched from p4

/usr/src/lib/libpmc/libpmc.c - rev2
/usr/src/sys/amd64/include/pmc_mdep.h rev2
/usr/src/sys/dev/hwpmc/hwpmc_x86.c rev2
/usr/src/sys/modules/hwpmc/Makefile rev3

but I rebuild only kernel - I'll try to rebuild everything :)
do you think this will help getting hwpmc working?


I can only say that it mostly works for me :)

Btw I have hwpmc working on other machine (it's with FreeBSD 
6.3-prerelease).

Can you tell me what stats exactly you need from running hping?


A gprof trace with the -S instructions counter should be enough to get 
oriented.


Kris


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


Re: Dell XPS 1530 - Network card issue - Marvell 88E8040

2008-01-24 Thread Pyun YongHyeon
On Thu, Jan 24, 2008 at 11:02:05AM +0100, Chris Stromblad wrote:
  Sorry, here is the correct output, now also run as root!
  
  Again I've included the Wireless, because perhaps someone else would
  like to have a look at the data to understand why it's not detected. To
  my understanding there should be support as I seem to recall that Intel
  even put out the drivers themselves, or at least some hardware
  specifications.
  

I've checked wpi(4) probe routine and your device id is listed there.
So wpi(4) does serve your hardware, if not post your issues to
appropriate mailing list.
Btw, I think you may have to use 7.0-RC1 to get wpi(4).

  09:00.0 0200: 11ab:4354 (rev 12)
  Subsystem: 1028:022e
  Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
  ParErr- Stepping- SERR+ FastB2B-
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
  TAbort- TAbort- MAbort- SERR- PERR-
  Latency: 0, Cache Line Size: 64 bytes
  Interrupt: pin A routed to IRQ 16
  Region 0: Memory at f9ffc000 (64-bit, non-prefetchable)
  [size=16K]
  Region 2: I/O ports at de00 [size=256]
  Capabilities: [48] Power Management version 3
  Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
  PME(D0+,D1+,D2+,D3hot+,D3cold+)
  Status: D0 PME-Enable- DSel=0 DScale=1 PME-
  Capabilities: [5c] Message Signalled Interrupts: Mask-
  64bit+ Queue=0/0 Enable-
  Address:   Data: 
  Capabilities: [c0] Express Legacy Endpoint IRQ 0
  Device: Supported: MaxPayload 128 bytes, PhantFunc
  0, ExtTag-
  Device: Latency L0s unlimited, L1 unlimited
  Device: AtnBtn- AtnInd- PwrInd-
  Device: Errors: Correctable- Non-Fatal- Fatal-
  Unsupported-
  Device: RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
  Device: MaxPayload 128 bytes, MaxReadReq 512 bytes
  Link: Supported Speed 2.5Gb/s, Width x1, ASPM L0s
  L1, Port 0
  Link: Latency L0s 256ns, L1 unlimited
  Link: ASPM L0s Enabled RCB 128 bytes CommClk+
  ExtSynch-
  Link: Speed 2.5Gb/s, Width x1
  
  0b:00.0 0280: 8086:4222 (rev 02)
  Subsystem: 8086:1021
  Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
  ParErr- Stepping- SERR+ FastB2B-
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
  TAbort- TAbort- MAbort- SERR- PERR-
  Latency: 0, Cache Line Size: 64 bytes
  Interrupt: pin A routed to IRQ 17
  Region 0: Memory at f9eff000 (32-bit, non-prefetchable)
  [size=4K]
  Capabilities: [c8] Power Management version 2
  Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
  PME(D0+,D1-,D2-,D3hot+,D3cold+)
  Status: D0 PME-Enable- DSel=0 DScale=0 PME-
  Capabilities: [d0] Message Signalled Interrupts: Mask-
  64bit+ Queue=0/0 Enable-
  Address:   Data: 
  Capabilities: [e0] Express Legacy Endpoint IRQ 0
  Device: Supported: MaxPayload 128 bytes, PhantFunc
  0, ExtTag-
  Device: Latency L0s 512ns, L1 unlimited
  Device: AtnBtn- AtnInd- PwrInd-
  Device: Errors: Correctable- Non-Fatal- Fatal-
  Unsupported-
  Device: RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
  Device: MaxPayload 128 bytes, MaxReadReq 128 bytes
  Link: Supported Speed 2.5Gb/s, Width x1, ASPM L0s
  L1, Port 0
  Link: Latency L0s 128ns, L1 64us
  Link: ASPM L1 Enabled RCB 64 bytes CommClk+
  ExtSynch-
  Link: Speed 2.5Gb/s, Width x1
  

Thanks for the info.

  On Thu, 2008-01-24 at 18:46 +0900, Pyun YongHyeon wrote:
   On Thu, Jan 24, 2008 at 10:27:31AM +0100, Chris Stromblad wrote:
 Hi,
 
 This is the output from lspci -v:
   
   'lspci -nvv' is preferred as I have to check device ids.
   
 09:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040
 PCI-E Fast Ethernet Controller (rev 12)
 Subsystem: Dell Unknown device 022e
 Flags: bus master, fast devsel, latency 0, IRQ 16
 Memory at f9ffc000 (64-bit, non-prefetchable) [size=16K]
 I/O ports at de00 [size=256]
 Capabilities: access denied
 
 0b:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG
 Network Connection (rev 02)
 Subsystem: Intel Corporation Unknown device 1021
 Flags: bus master, fast devsel, latency 0, IRQ 17
 Memory at f9eff000 (32-bit, non-prefetchable) [size=4K]
 Capabilities: access denied
 
 I included the wireless data as well because I wanted to ask if you know
 whether or not this has support from ports? It doesn't get detected when
 booting FreeBSD so I assume that either it needs a binary 

Re: Hardware support for AMD Geode CS5536 audio?

2008-01-24 Thread Wilko Bulte
Quoting Bruce R. Montague, who wrote on Wed, Jan 23, 2008 at 10:06:51PM -0800 ..
 
 Hi, re:
 
   I'm hoping someone will be able to help me out with the audio is
   the Geode CS5536. 
 
 Those AMD Geode systems with the CS5536 look almost
 cheap enough to afford one for each hand.  I'll   
 look into upgrading the 5530 audio driver for the 
 5536, but it will take sometime. If someone does  
 it over the weekend, or somesuch, let me know...
 (likewise if anyone has other advice on good
 current Geode kernel development platforms).

I shipped Ariff@ a Geode based box quite a while a ago to support
the audio driver work.  I don't think he got around to working on it though.

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


SMP in machine/params.h

2008-01-24 Thread Pietro Cerutti
Hello,

I'm running a Core2Duo on CURRENT, SMP kernel, but somehow the macro SMP
in machine/param.h 1.81 2006/01/09 line 68 is not defined, thus MAXCPU
is defined to 1. Any idea why?

 uname -a
FreeBSD gahrtop.localhost 8.0-CURRENT FreeBSD 8.0-CURRENT #23: Tue Jan
22 00:15:05 CET 2008
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/MSI1034  i386

 sysctl kern.smp.active kern.smp.maxcpus
kern.smp.active: 1
kern.smp.maxcpus: 16

 cat smp.c

#include sys/param.h

#ifndef SMP
# error SMP not defined
#endif


 make smp
cc -O2 -pipe -march=pentiumpro  smp.c  -o smp
smp.c:5:3: error: #error SMP not defined
*** Error code 1

 cat maxcpu.c
#include sys/param.h
#include stdio.h

int main(void)
{
   return (MAXCPU);
}

 ./maxcpu; echo $?
1

Any idea?

-- 
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp



signature.asc
Description: OpenPGP digital signature


Re: FreeBSD hacker 101

2008-01-24 Thread william wong
Thanks for enlightening me on different aspects. Actually I found there are
many exciting network stack projects/overhaul happening in FreeBSD 8. I just
want to gear up myself and see what I can do. I have got 6.3 installed and
tweaking some of the kernel modification and compilation process so that i
can get myself acquainted to the software development process.

It seems that Juniper favors the even number FreeBSD's. So get to know about
FB8 could be ahead of them :)

william

2008/1/24, Dag-Erling Smørgrav [EMAIL PROTECTED]:

 william wong [EMAIL PROTECTED] writes:
  Are there any docments or pointers to get me started hacking around my
  6.3 asap? Building toochains, submitting patches etc or i just
  follow most of the conventions in the Linux kernel development
  community?

 The toolchain is already in place, no need to build anything.

 You'll find our make is different from GNU make.  It may take a while to
 get used to it, but when you do, you'll find it much more powerful.

 The official channel for patch submissions is send-pr(1), but due to
 manpower issues, PRs often get lost in the noise.  Posting the patch to
 the appropriate mailing list may be more effective.

 Speaking of patches, you should seriously consider upgrading to
 RELENG_7, as 6.3 is quite possibly the very last RELENG_6 release, and
 patches against 6.3 won't raise much interest from developers.  You'll
 find information on how to upgrade in the handbook.

 The biggest difference you will notice from Linux is that pretty much
 everything, including major kernel subsystems, is documented in man
 pages.  If you find something (a library function or system call or
 kernel module) that doesn't have a man page, try to track down the
 author and prod them - or bitch on freebsd-doc until someone writes a
 man page - or write it yourself if you feel up to learning groff (which
 isn't for the faint of heart, but you get used to it after a while)

 DES
 --
 Dag-Erling Smørgrav - [EMAIL PROTECTED]

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


Re: SMP in machine/params.h

2008-01-24 Thread Pietro Cerutti
Attilio Rao wrote:
 2008/1/24, Pietro Cerutti [EMAIL PROTECTED]:
 Hello,

 I'm running a Core2Duo on CURRENT, SMP kernel, but somehow the macro SMP
 in machine/param.h 1.81 2006/01/09 line 68 is not defined, thus MAXCPU
 is defined to 1. Any idea why?

 uname -a
 FreeBSD gahrtop.localhost 8.0-CURRENT FreeBSD 8.0-CURRENT #23: Tue Jan
 22 00:15:05 CET 2008
 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/MSI1034  i386

 sysctl kern.smp.active kern.smp.maxcpus
 kern.smp.active: 1
 kern.smp.maxcpus: 16

 cat smp.c
 #include sys/param.h

 #ifndef SMP
 # error SMP not defined
 #endif


 make smp
 cc -O2 -pipe -march=pentiumpro  smp.c  -o smp
 smp.c:5:3: error: #error SMP not defined
 *** Error code 1

 cat maxcpu.c
 #include sys/param.h
 #include stdio.h

 int main(void)
 {
return (MAXCPU);
 }

 ./maxcpu; echo $?
 1

 Any idea?
 
 Did you define SMP in your config file?

Yes. How could I have kern.smp.active: 1 otherwise?

 grep SMP /sys/i386/conf/MSI1034
# To make an SMP kernel, the next two lines are needed
options SMP  # Symmetric MultiProcessor Kernel

 
 Attilio
 
 


-- 
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp



signature.asc
Description: OpenPGP digital signature


Re: SMP in machine/params.h

2008-01-24 Thread Pietro Cerutti
Pietro Cerutti wrote:
 Attilio Rao wrote:
 Did you define SMP in your config file?
 
 Yes. How could I have kern.smp.active: 1 otherwise?
 
 grep SMP /sys/i386/conf/MSI1034
 # To make an SMP kernel, the next two lines are needed
 options SMP  # Symmetric MultiProcessor Kernel

And I would like to add:

 grep SMP /usr/obj/usr/src/sys/MSI1034/opt_global.h
#define SMP 1


 Attilio

-- 
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp



signature.asc
Description: OpenPGP digital signature


Re: FreeBSD hacker 101

2008-01-24 Thread Dag-Erling Smørgrav
william wong [EMAIL PROTECTED] writes:
 Thanks for enlightening me on different aspects. Actually I found there are
 many exciting network stack projects/overhaul happening in FreeBSD 8. I just
 want to gear up myself and see what I can do. I have got 6.3 installed and
 tweaking some of the kernel modification and compilation process so that i
 can get myself acquainted to the software development process.

You should really, really upgrade to 7.  Nobody is doing any serious
work on 6 (beyond merging bug fixes back from 7); all the exciting work
happens in 8, and kernel patches against 8 will very rarely apply
cleanly to 6.

 It seems that Juniper favors the even number FreeBSD's.

Only because 5 was a dog.  They probably stuck with 4 for a while, then
switched to 6 once they had ascertained that it was significantly more
stable than 5.  I would be surprised if they skipped 7.

 So get to know about FB8 could be ahead of them :)

I very much doubt it.  Juniper employs several veteran FreeBSD
developers (and so does Cisco, for that matter).

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]
___
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-01-24 Thread Stefan Lambrev

Greetings,

Kris Kennaway wrote:

Stefan Lambrev wrote:

It is the socket buffer that is filling up.  Either the application 
is not increasing it to large enough size or the default maximum is 
too low (Linux may set a larger default).  Try increasing 
kern.ipc.maxsockbuf and confirming with the source and/or ktrace 
that it is doing the right setsockopt() call.

Increasing kern.ipc.maxsockbuf doesn't help.

Actually this is the code that failed and print this error:

   result = sendto(sockraw, packet, packetsize, 0,
   (struct sockaddr*)remote, sizeof(remote));

   if (result == -1  errno != EINTR  !opt_rand_dest  
!opt_rand_source) {

   perror([send_ip] sendto);

Those are the only references for setsockopt when ktracing:
3385 hpingCALL  __sysctl(0xbfbfe870,0x6,0,0xbfbfe888,0,0)
 3385 hpingRET   __sysctl 0
 3385 hpingCALL  __sysctl(0xbfbfe870,0x6,0x28305180,0xbfbfe888,0,0)
 3385 hpingRET   __sysctl 0
 3385 hpingCALL  socket(PF_INET,SOCK_DGRAM,IPPROTO_IP)
 3385 hpingRET   socket 3
 3385 hpingCALL  
setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe884,0x4)

 3385 hpingRET   setsockopt 0
 3385 hpingCALL  connect(0x3,0x8067da0,0x10)
 3385 hpingRET   connect 0
 3385 hpingCALL  getsockname(0x3,0xbfbfe874,0xbfbfe888)
 3385 hpingRET   getsockname 0
 3385 hpingCALL  close(0x3)
 3385 hpingRET   close 0
 3385 hpingCALL  socket(PF_INET,SOCK_RAW,IPPROTO_RAW)
 3385 hpingRET   socket 3
 3385 hpingCALL  
setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe914,0x4)

 3385 hpingRET   setsockopt 0
 3385 hpingCALL  setsockopt(0x3,0,0x2,0xbfbfe914,0x4)
 3385 hpingRET   setsockopt 0
 3385 hpingCALL  open(0xbfbfe8a4,O_RDWR,unused0)
 3385 hpingNAMI  /dev/bpf0
 3385 hpingRET   open -1 errno 16 Device busy
 3385 hpingCALL  open(0xbfbfe8a4,O_RDWR,unused0)
 3385 hpingNAMI  /dev/bpf1
 3385 hpingRET   open 4


OK, try adding the setsockopt(...SO_SNDBUF...) call.

Will something like this do the trick?

void socket_sndbuf(int sd)
{
   long int bufsize;
   bufsize = 65536;
   if (setsockopt(sd, SOL_SOCKET, SO_SNDBUF,
   (char *)bufsize, sizeof(int)) == -1)
   {
   printf([socket_sndbuf] can't set SO_SNDBUF option\n);
   }
}

I'm not a C developer so pardon me if I made something stupid :)
Also how can I make bufsize = default settings*2 for example?

I tried this code and here is what ktrace show now:
65372 hping3   CALL  socket(PF_INET,SOCK_DGRAM,IPPROTO_IP)
65372 hping3   RET   socket 3
65372 hping3   CALL  setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe844,0x4)
65372 hping3   RET   setsockopt 0
65372 hping3   CALL  connect(0x3,0x8067e20,0x10)
65372 hping3   RET   connect 0
65372 hping3   CALL  getsockname(0x3,0xbfbfe834,0xbfbfe848)
65372 hping3   RET   getsockname 0
65372 hping3   CALL  close(0x3)
65372 hping3   RET   close 0
65372 hping3   CALL  socket(PF_INET,SOCK_RAW,IPPROTO_RAW)
65372 hping3   RET   socket 3
65372 hping3   CALL  setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe8d4,0x4)
65372 hping3   RET   setsockopt 0
65372 hping3   CALL  setsockopt(0x3,0,0x2,0xbfbfe8d4,0x4)
65372 hping3   RET   setsockopt 0
65372 hping3   CALL  setsockopt(0x3,SOL_SOCKET,SO_SNDBUF,0xbfbfe8d4,0x4)
65372 hping3   RET   setsockopt 0



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


--

Best Wishes,
Stefan Lambrev
ICQ# 24134177

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


Re: SMP in machine/params.h

2008-01-24 Thread Pietro Cerutti
Some more interesting findings in this field lead me to another related
question:

what is the relation between kern.smp.cpus, kern.smp.active and
kern.smp.maxcpus?

To my understanding, it should be:
If the machine has more than one CPU, and SMP and apic are enabled in
the config file, then

kern.smp.cpus = nof cpus in the system
kern.smp.active = 1
kern.smp.maxcpus = 16

else

kern.smp.cpus = 1
kern.smp.active = 0
kern.smp.maxcpus = 1

This is the expected result, and also the result I get from my single
CPU Pentium 3, running 6.3-RELEASE:

kern.smp.cpus: 1
kern.smp.active: 0
kern.smp.maxcpus: 1

From my single CPU sparc64, running 7.0-PRERELEASE, I get:

kern.smp.cpus: 1
kern.smp.active: 0
kern.smp.maxcpus: 16 -- why not 1??

From my Core2Due, running 8.0-CURRENT, I get:

kern.smp.cpus: 2
kern.smp.active: 1
kern.smp.maxcpus: 16

which is OK, but nevertheless SMP is not defined in sys/param.h (see
previous posts).


Thanks for any insight,




-- 
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp



signature.asc
Description: OpenPGP digital signature


Re: Dell XPS 1530 - Network card issue - Marvell 88E8040

2008-01-24 Thread Chris Stromblad

On Thu, 2008-01-24 at 19:58 +0900, Pyun YongHyeon wrote:
 On Thu, Jan 24, 2008 at 11:02:05AM +0100, Chris Stromblad wrote:
   Sorry, here is the correct output, now also run as root!
   
   Again I've included the Wireless, because perhaps someone else would
   like to have a look at the data to understand why it's not detected. To
   my understanding there should be support as I seem to recall that Intel
   even put out the drivers themselves, or at least some hardware
   specifications.
   
 
 I've checked wpi(4) probe routine and your device id is listed there.
 So wpi(4) does serve your hardware, if not post your issues to
 appropriate mailing list.

Thanks for looking into this for me, I'll give 7.0-RC1 another go and
see if I can get it to work.

Let me know how you get along with the Marvell driver.

 Btw, I think you may have to use 7.0-RC1 to get wpi(4).
 
   09:00.0 0200: 11ab:4354 (rev 12)
   Subsystem: 1028:022e
   Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
   ParErr- Stepping- SERR+ FastB2B-
   Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
   TAbort- TAbort- MAbort- SERR- PERR-
   Latency: 0, Cache Line Size: 64 bytes
   Interrupt: pin A routed to IRQ 16
   Region 0: Memory at f9ffc000 (64-bit, non-prefetchable)
   [size=16K]
   Region 2: I/O ports at de00 [size=256]
   Capabilities: [48] Power Management version 3
   Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
   PME(D0+,D1+,D2+,D3hot+,D3cold+)
   Status: D0 PME-Enable- DSel=0 DScale=1 PME-
   Capabilities: [5c] Message Signalled Interrupts: Mask-
   64bit+ Queue=0/0 Enable-
   Address:   Data: 
   Capabilities: [c0] Express Legacy Endpoint IRQ 0
   Device: Supported: MaxPayload 128 bytes, PhantFunc
   0, ExtTag-
   Device: Latency L0s unlimited, L1 unlimited
   Device: AtnBtn- AtnInd- PwrInd-
   Device: Errors: Correctable- Non-Fatal- Fatal-
   Unsupported-
   Device: RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
   Device: MaxPayload 128 bytes, MaxReadReq 512 bytes
   Link: Supported Speed 2.5Gb/s, Width x1, ASPM L0s
   L1, Port 0
   Link: Latency L0s 256ns, L1 unlimited
   Link: ASPM L0s Enabled RCB 128 bytes CommClk+
   ExtSynch-
   Link: Speed 2.5Gb/s, Width x1
   
   0b:00.0 0280: 8086:4222 (rev 02)
   Subsystem: 8086:1021
   Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
   ParErr- Stepping- SERR+ FastB2B-
   Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
   TAbort- TAbort- MAbort- SERR- PERR-
   Latency: 0, Cache Line Size: 64 bytes
   Interrupt: pin A routed to IRQ 17
   Region 0: Memory at f9eff000 (32-bit, non-prefetchable)
   [size=4K]
   Capabilities: [c8] Power Management version 2
   Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
   PME(D0+,D1-,D2-,D3hot+,D3cold+)
   Status: D0 PME-Enable- DSel=0 DScale=0 PME-
   Capabilities: [d0] Message Signalled Interrupts: Mask-
   64bit+ Queue=0/0 Enable-
   Address:   Data: 
   Capabilities: [e0] Express Legacy Endpoint IRQ 0
   Device: Supported: MaxPayload 128 bytes, PhantFunc
   0, ExtTag-
   Device: Latency L0s 512ns, L1 unlimited
   Device: AtnBtn- AtnInd- PwrInd-
   Device: Errors: Correctable- Non-Fatal- Fatal-
   Unsupported-
   Device: RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
   Device: MaxPayload 128 bytes, MaxReadReq 128 bytes
   Link: Supported Speed 2.5Gb/s, Width x1, ASPM L0s
   L1, Port 0
   Link: Latency L0s 128ns, L1 64us
   Link: ASPM L1 Enabled RCB 64 bytes CommClk+
   ExtSynch-
   Link: Speed 2.5Gb/s, Width x1
   
 
 Thanks for the info.
 
   On Thu, 2008-01-24 at 18:46 +0900, Pyun YongHyeon wrote:
On Thu, Jan 24, 2008 at 10:27:31AM +0100, Chris Stromblad wrote:
  Hi,
  
  This is the output from lspci -v:

'lspci -nvv' is preferred as I have to check device ids.

  09:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040
  PCI-E Fast Ethernet Controller (rev 12)
  Subsystem: Dell Unknown device 022e
  Flags: bus master, fast devsel, latency 0, IRQ 16
  Memory at f9ffc000 (64-bit, non-prefetchable) [size=16K]
  I/O ports at de00 [size=256]
  Capabilities: access denied
  
  0b:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG
  Network Connection (rev 02)
  Subsystem: Intel Corporation Unknown device 1021
  Flags: bus master, fast devsel, latency 0, IRQ 17
  

Re: FreeBSD hacker 101

2008-01-24 Thread william wong
2008/1/24, Dag-Erling Smørgrav [EMAIL PROTECTED]:
 william wong [EMAIL PROTECTED] writes:
  Thanks for enlightening me on different aspects. Actually I found there are
  many exciting network stack projects/overhaul happening in FreeBSD 8. I just
  want to gear up myself and see what I can do. I have got 6.3 installed and
  tweaking some of the kernel modification and compilation process so that i
  can get myself acquainted to the software development process.

 You should really, really upgrade to 7.  Nobody is doing any serious
 work on 6 (beyond merging bug fixes back from 7); all the exciting work
 happens in 8, and kernel patches against 8 will very rarely apply
 cleanly to 6.

  It seems that Juniper favors the even number FreeBSD's.

 Only because 5 was a dog.  They probably stuck with 4 for a while, then
 switched to 6 once they had ascertained that it was significantly more
 stable than 5.  I would be surprised if they skipped 7.

Please pardon my ignorance of the jargons. Does that mean 5 is not
stable or does not perform or what?


  So get to know about FB8 could be ahead of them :)

 I very much doubt it.  Juniper employs several veteran FreeBSD
 developers (and so does Cisco, for that matter).

In other words both of them really want to push FreeBSD to its fullest
and would like to extract most out of it.


 DES
 --
 Dag-Erling Smørgrav - [EMAIL PROTECTED]


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


Re: FreeBSD hacker 101

2008-01-24 Thread Wesley Shields
On Thu, Jan 24, 2008 at 11:11:05PM +0800, william wong wrote:
 2008/1/24, Dag-Erling Sm?rgrav [EMAIL PROTECTED]:
  william wong [EMAIL PROTECTED] writes:
   Thanks for enlightening me on different aspects. Actually I found there 
   are
   many exciting network stack projects/overhaul happening in FreeBSD 8. I 
   just
   want to gear up myself and see what I can do. I have got 6.3 installed and
   tweaking some of the kernel modification and compilation process so that i
   can get myself acquainted to the software development process.
 
  You should really, really upgrade to 7.  Nobody is doing any serious
  work on 6 (beyond merging bug fixes back from 7); all the exciting work
  happens in 8, and kernel patches against 8 will very rarely apply
  cleanly to 6.
 
   It seems that Juniper favors the even number FreeBSD's.
 
  Only because 5 was a dog.  They probably stuck with 4 for a while, then
  switched to 6 once they had ascertained that it was significantly more
  stable than 5.  I would be surprised if they skipped 7.
 
 Please pardon my ignorance of the jargons. Does that mean 5 is not
 stable or does not perform or what?

STABLE in this context is a bit of a misnomer.  What it's talking about
is not stability in the sense of it doesn't crash as much as current
but stability in the ABI sense.  This is often a cause of confusion for
people new to FreeBSD.

While it is generally true that stable does not crash as much as
current, it is not a promise.  There have been times when a stable 
branch would not build or has serious bugs in it.  However, it is my
experience that these are rare (even in current), and the developers do
their best to ensure they don't happen.

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


Re: FreeBSD hacker 101

2008-01-24 Thread Dag-Erling Smørgrav
william wong [EMAIL PROTECTED] writes:
 Dag-Erling Smørgrav [EMAIL PROTECTED] writes:
  william wong [EMAIL PROTECTED] writes:
   It seems that Juniper favors the even number FreeBSD's.
  Only because 5 was a dog.  They probably stuck with 4 for a while, then
  switched to 6 once they had ascertained that it was significantly more
  stable than 5.  I would be surprised if they skipped 7.
 Please pardon my ignorance of the jargons. Does that mean 5 is not
 stable or does not perform or what?

FreeBSD 5 was not a very good series.  It was released late and had
issues with both stability and performance.  FreeBSD 6 corrected the
stability issues and some of the worst performance issues.  FreeBSD 7
took care of the remaining performance issues; it may not be as fast as
4 was on UP, but it beats Linux on SMP.

(there's no point in comparing SMP performance between 4 and 7 since 4
had a single-threaded kernel and practically no userland thread support)

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD hacker 101

2008-01-24 Thread Joel Dahl

william wong skrev:

Thanks for enlightening me on different aspects. Actually I found there are
many exciting network stack projects/overhaul happening in FreeBSD 8.


Take a look at http://wiki.freebsd.org/Networking if working on the
networking code in FreeBSD interests you.

--
Joel

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


Re: ATAPI dvdreader always fails on a particular DVD movie title

2008-01-24 Thread Yuri
Quoting Dag-Erling Smørgrav [EMAIL PROTECTED]:

 Do they play?  If they do, it's not libdvdcss's fault.
CAPOTE (US region) doesn't play with mplayer either.
It begins, shows logo of United Artists and Sony Classics and
just hangs. Mplayer's counter also stops running.

So I guess this really is libdvdcss problem.

 Also, please get an MUA that understands UTF-8.  This *is* the 21st
 century, you know...
I use Horde-based webmail and asked my provider to update it to
the latest version.

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


Re: ATAPI dvdreader always fails on a particular DVD movie title

2008-01-24 Thread Rick C. Petty
On Thu, Jan 24, 2008 at 11:32:20AM -0800, Yuri wrote:
 
 CAPOTE (US region) doesn't play with mplayer either.
 It begins, shows logo of United Artists and Sony Classics and
 just hangs. Mplayer's counter also stops running.

I've seen this a lot on some recent DVDs..  All I do is quit mplayer and
restart it, skipping the first 10 seconds of video.  That workaround has
always worked for me.

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


Re: SMP in machine/params.h

2008-01-24 Thread John Baldwin
On Thursday 24 January 2008 07:38:39 am Pietro Cerutti wrote:
 Hello,
 
 I'm running a Core2Duo on CURRENT, SMP kernel, but somehow the macro SMP
 in machine/param.h 1.81 2006/01/09 line 68 is not defined, thus MAXCPU
 is defined to 1. Any idea why?

It is defined in opt_global.h for a kernel build, but it is not defined in 
userland.  If you want to use MAXCPU in userland you should query the 
appropriate sysctl (kern.smp.maxcpu) instead.

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


sysctl text definitions.

2008-01-24 Thread Alfred Perlstein
Hey guys, something that I've always wanted to do was actually somehow
export those handy description strings from the kernel SYSCTL macros
in the least obtrusive method possible.

The only thing I could come up with that didn't require compiling the
files twice was to basically do some tricks where the text strings
wound up in some throw-away section of the object files.

Any suggestions on how to do this?

In psuedo-code what I would do is something like change SYSCTL_*
and add the following:

SYSCTL_INT(, text) \
   ...old define...\
   SYSCTL_COMMENT(parent, node, text)

Also, add the following struct someplace:

struct sysctl_comment {
  const char *parent;
  const char *node;
  const char *comment;
};

Then SYSCTL_COMMENT does something like (more psuedocode):

#define SYSCTL_COMMENT(parent, node, comment) \
.set sysctl_comments { \
struct sysctl_comment uniquifier = { \
  .parent = parent; \
  .node = node; \
  .comment = comment; \
}; 


Then after building the kernel one should be able to do:
for file in kernel ${modules} ; do
  strip --section=sysctl_comments file  file.install
  objdump --section=sysctl_comment file  file.sysctl.out
  sysctl_help_database_builder file.sysctl.out  file.sysctl.db
done

Then these would be copied into /boot or maybe some other place
as part of the install process.

Sysctl or some other util could then read these db files to give
help with sysctls.

Any ideas/pointers on how to do this linker magic?

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


Re: FreeBSD hacker 101

2008-01-24 Thread KAYVEN RIESE


I thought freeBSD 7 was still current bleeding edge?

On Thu, 24 Jan 2008, Dag-Erling Smørgrav wrote:


william wong [EMAIL PROTECTED] writes:

Thanks for enlightening me on different aspects. Actually I found there are
many exciting network stack projects/overhaul happening in FreeBSD 8. I just
want to gear up myself and see what I can do. I have got 6.3 installed and
tweaking some of the kernel modification and compilation process so that i
can get myself acquainted to the software development process.


You should really, really upgrade to 7.  Nobody is doing any serious
work on 6 (beyond merging bug fixes back from 7); all the exciting work
happens in 8, and kernel patches against 8 will very rarely apply
cleanly to 6.


It seems that Juniper favors the even number FreeBSD's.


Only because 5 was a dog.  They probably stuck with 4 for a while, then
switched to 6 once they had ascertained that it was significantly more
stable than 5.  I would be surprised if they skipped 7.


So get to know about FB8 could be ahead of them :)


I very much doubt it.  Juniper employs several veteran FreeBSD
developers (and so does Cisco, for that matter).

DES
--
Dag-Erling Smørgrav - [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]



*--*
  Kayven Riese, BSCS, MS (Physiology and Biophysics)
  (415) 902 5513 cellular
  http://kayve.net
  Webmaster http://ChessYoga.org
*--*___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: FreeBSD hacker 101

2008-01-24 Thread KAYVEN RIESE


Aren't the ports collection something that makes freeBSD stand out
very differently than linux?  also, no rpm, and the pkg_add utility.
updating operating system with cvsup?  buildworld?  all these things
are different starkly, or are they not?

On Thu, 24 Jan 2008, Xin LI wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

william wong wrote:

Hi,

Are there any docments or pointers to get me started hacking around my
6.3asap? Building toochains, submitting patches etc or i just
follow most
of the conventions in the Linux kernel development community?


I think it's nothing that different.  A typical way is that you find
something you are not happy with, i.e. what you think FreeBSD is lacking
of, do some proof of concept work, discuss it in the mailing list,
refine your work, submit patch, become a committer :-)

The only difference as far as I can tell is that FreeBSD tends to have
stricter code style guidelines (the only exceptions are what we call
vendor code which is maintained outside, this includes toolchains,
device drivers that is supported by vendors, in order to make future
upgrades easier).  However, unlike some other bad code style guidelines,
FreeBSD's coding style is very well documented (as in style(9)), and
following the guideline will make your code easier to read (e.g. think
about how to find the implementation with grep(1)?  Yes, grep ^function.).

We eager to see contributions from all aspects, but if you have no idea
for your own, or is looking for something to give a shot, you can check
out our projects idea page at http://www.freebsd.org/projects/ideas/ .

Small contributions, like making more documentation about various
sysctl's, etc. are more suitable for those who just started to learn
about the code and can not invest a lot of whole bunch of time on
FreeBSD (yet), are welcomed as well.

Another good start is to query our PR database (
http://www.freebsd.org/cgi/query-pr-summary.cgi ) and see if there is
something you have interest, but there is no fix, or there is a fix but
stayed for a long time and push them.

Cheers,
- --
Xin LI [EMAIL PROTECTED]http://www.delphij.net/
FreeBSD - The Power to Serve!
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHmEebi+vbBBjt66ARArlQAJ4xMkuM6ZflCM25wcq7Q+efxedpAACdH4w6
jwc1NRdGUp/vrGf8mMpWTiM=
=Z6lW
-END PGP SIGNATURE-
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]



*--*
  Kayven Riese, BSCS, MS (Physiology and Biophysics)
  (415) 902 5513 cellular
  http://kayve.net
  Webmaster http://ChessYoga.org
*--*
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD hacker 101

2008-01-24 Thread Garrett Cooper

On Jan 24, 2008, at 3:28 PM, KAYVEN RIESE wrote:


I thought freeBSD 7 was still current bleeding edge?


Soon it will be the 'most current STABLE' branch; 8-CURRENT is  
absolute bleeding edge.

-Garrett

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


Re: FreeBSD hacker 101

2008-01-24 Thread Mike Meyer
On Thu, 24 Jan 2008 15:25:16 -0800 (PST) KAYVEN  RIESE [EMAIL PROTECTED] 
wrote:

 Aren't the ports collection something that makes freeBSD stand out
 very differently than linux?  also, no rpm, and the pkg_add utility.
 updating operating system with cvsup?  buildworld?  all these things
 are different starkly, or are they not?

GNU/Linux isn't tied to rpm's; there are other packaging systems in
use by different distros, including at least one that is based on the
BSD ports system.

But you've touched on one crucial difference:

A GNU/Linux distribution is lots of software from various authors that
the creators of the distro have put together to make a system (to be
fair, the creators of the distro may have contributed software as
well, like rpm). So everything is in the package system, and the line
between critical system software and add on packages is blurred,
Meaning it's not clear what you can update independently without
breaking the OS (well, not to me, anyway).

A BSD distribution is a complete operating system in and of itself -
the base system. It *includes* a package system for dealing with add
on packages. You can update the add on software independently without
breaking the base system. You are expected to update the base system
as a whole, and doing otherwise is unsupported.

I'm not sure how relevant this is to what the OP was asking about,
though.

miks

 
 On Thu, 24 Jan 2008, Xin LI wrote:
 
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  william wong wrote:
  Hi,
 
  Are there any docments or pointers to get me started hacking around my
  6.3asap? Building toochains, submitting patches etc or i just
  follow most
  of the conventions in the Linux kernel development community?
 
  I think it's nothing that different.  A typical way is that you find
  something you are not happy with, i.e. what you think FreeBSD is lacking
  of, do some proof of concept work, discuss it in the mailing list,
  refine your work, submit patch, become a committer :-)
 
  The only difference as far as I can tell is that FreeBSD tends to have
  stricter code style guidelines (the only exceptions are what we call
  vendor code which is maintained outside, this includes toolchains,
  device drivers that is supported by vendors, in order to make future
  upgrades easier).  However, unlike some other bad code style guidelines,
  FreeBSD's coding style is very well documented (as in style(9)), and
  following the guideline will make your code easier to read (e.g. think
  about how to find the implementation with grep(1)?  Yes, grep ^function.).
 
  We eager to see contributions from all aspects, but if you have no idea
  for your own, or is looking for something to give a shot, you can check
  out our projects idea page at http://www.freebsd.org/projects/ideas/ .
 
  Small contributions, like making more documentation about various
  sysctl's, etc. are more suitable for those who just started to learn
  about the code and can not invest a lot of whole bunch of time on
  FreeBSD (yet), are welcomed as well.
 
  Another good start is to query our PR database (
  http://www.freebsd.org/cgi/query-pr-summary.cgi ) and see if there is
  something you have interest, but there is no fix, or there is a fix but
  stayed for a long time and push them.
 
  Cheers,
  - --
  Xin LI [EMAIL PROTECTED]  http://www.delphij.net/
  FreeBSD - The Power to Serve!
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v2.0.4 (FreeBSD)
 
  iD8DBQFHmEebi+vbBBjt66ARArlQAJ4xMkuM6ZflCM25wcq7Q+efxedpAACdH4w6
  jwc1NRdGUp/vrGf8mMpWTiM=
  =Z6lW
  -END PGP SIGNATURE-
  ___
  freebsd-hackers@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
  To unsubscribe, send any mail to [EMAIL PROTECTED]
 
 
 *--*
Kayven Riese, BSCS, MS (Physiology and Biophysics)
(415) 902 5513 cellular
http://kayve.net
Webmaster http://ChessYoga.org
 *--*
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to [EMAIL PROTECTED]


-- 
Mike Meyer [EMAIL PROTECTED]  http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: SMP in machine/params.h

2008-01-24 Thread Pietro Cerutti
John Baldwin wrote:
 On Thursday 24 January 2008 07:38:39 am Pietro Cerutti wrote:
 Hello,

 I'm running a Core2Duo on CURRENT, SMP kernel, but somehow the macro SMP
 in machine/param.h 1.81 2006/01/09 line 68 is not defined, thus MAXCPU
 is defined to 1. Any idea why?
 
 It is defined in opt_global.h for a kernel build, but it is not defined in 
 userland.  If you want to use MAXCPU in userland you should query the 
 appropriate sysctl (kern.smp.maxcpu) instead.
 

Thanks for the clarification!

-- 
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp



signature.asc
Description: OpenPGP digital signature


Re: Wrapper for Windows-only network card binary drivers on FreeBSD?

2008-01-24 Thread Joerg Sonnenberger
On Thu, Jan 24, 2008 at 04:12:00PM -0800, Yuri wrote:
 I am curious is there an effort in FreeBSD similar to Linux NDISwrapper?

man 4 ndis

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


Re: Wrapper for Windows-only network card binary drivers on FreeBSD?

2008-01-24 Thread Brooks Davis
On Thu, Jan 24, 2008 at 04:12:00PM -0800, Yuri wrote:
 I am curious is there an effort in FreeBSD similar to Linux NDISwrapper?
 
 NDISwrapper taked Windows XP binary driver and runs it on Linux.
 http://ndiswrapper.sourceforge.net/joomla/
 They add the converter between Linux kernel API and the subset of
 Windows kernel API sufficient to run binary driver.
 
 I know that few USB Webcams are supported in the similar way on FreeBSD
 recompiling Linux source drivers. Also Mplayer is using similar
 approach wrapping around Windows-only binary codecs.
 
 But is these such thing for network cards on FreeBSD?

man ndisgen

-- Brooks


pgpvMxEbnc4ZL.pgp
Description: PGP signature


Wrapper for Windows-only network card binary drivers on FreeBSD?

2008-01-24 Thread Yuri
I am curious is there an effort in FreeBSD similar to Linux NDISwrapper?

NDISwrapper taked Windows XP binary driver and runs it on Linux.
http://ndiswrapper.sourceforge.net/joomla/
They add the converter between Linux kernel API and the subset of
Windows kernel API sufficient to run binary driver.

I know that few USB Webcams are supported in the similar way on FreeBSD
recompiling Linux source drivers. Also Mplayer is using similar
approach wrapping around Windows-only binary codecs.

But is these such thing for network cards on FreeBSD?

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


Re: Wrapper for Windows-only network card binary drivers on FreeBSD?

2008-01-24 Thread Rick C. Petty
On Thu, Jan 24, 2008 at 04:12:00PM -0800, Yuri wrote:
 I am curious is there an effort in FreeBSD similar to Linux NDISwrapper?

http://www.freebsd.org/cgi/man.cgi?query=ndisapropos=0sektion=0manpath=FreeBSD+6.3-RELEASEformat=html

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


Re: Wrapper for Windows-only network card binary drivers on FreeBSD?

2008-01-24 Thread Julian Elischer

Yuri wrote:

I am curious is there an effort in FreeBSD similar to Linux NDISwrapper?

NDISwrapper taked Windows XP binary driver and runs it on Linux.
http://ndiswrapper.sourceforge.net/joomla/
They add the converter between Linux kernel API and the subset of
Windows kernel API sufficient to run binary driver.



I Believe the linux wrapper concept was copied from the freebsd one
which was originally called Project Evil


I know that few USB Webcams are supported in the similar way on FreeBSD
recompiling Linux source drivers. Also Mplayer is using similar
approach wrapping around Windows-only binary codecs.

But is these such thing for network cards on FreeBSD?

Yuri
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
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]


Re: gettimeofday() in hping

2008-01-24 Thread binto
Hi,

Sorry if a little bit insist  curious.

what is result from:
sysctl -a kern.ipc.maxsockbuf
sysctl -a net.inet.tcp.recvspace
sysctl -a net.inet.tcp.sendspace

??

binto

 Greetings,

 Kris Kennaway wrote:
 Stefan Lambrev wrote:

 It is the socket buffer that is filling up.  Either the application
 is not increasing it to large enough size or the default maximum is
 too low (Linux may set a larger default).  Try increasing
 kern.ipc.maxsockbuf and confirming with the source and/or ktrace
 that it is doing the right setsockopt() call.
 Increasing kern.ipc.maxsockbuf doesn't help.

 Actually this is the code that failed and print this error:

result = sendto(sockraw, packet, packetsize, 0,
(struct sockaddr*)remote, sizeof(remote));

if (result == -1  errno != EINTR  !opt_rand_dest 
 !opt_rand_source) {
perror([send_ip] sendto);

 Those are the only references for setsockopt when ktracing:
 3385 hpingCALL  __sysctl(0xbfbfe870,0x6,0,0xbfbfe888,0,0)
  3385 hpingRET   __sysctl 0
  3385 hpingCALL  __sysctl(0xbfbfe870,0x6,0x28305180,0xbfbfe888,0,0)
  3385 hpingRET   __sysctl 0
  3385 hpingCALL  socket(PF_INET,SOCK_DGRAM,IPPROTO_IP)
  3385 hpingRET   socket 3
  3385 hpingCALL
 setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe884,0x4)
  3385 hpingRET   setsockopt 0
  3385 hpingCALL  connect(0x3,0x8067da0,0x10)
  3385 hpingRET   connect 0
  3385 hpingCALL  getsockname(0x3,0xbfbfe874,0xbfbfe888)
  3385 hpingRET   getsockname 0
  3385 hpingCALL  close(0x3)
  3385 hpingRET   close 0
  3385 hpingCALL  socket(PF_INET,SOCK_RAW,IPPROTO_RAW)
  3385 hpingRET   socket 3
  3385 hpingCALL
 setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe914,0x4)
  3385 hpingRET   setsockopt 0
  3385 hpingCALL  setsockopt(0x3,0,0x2,0xbfbfe914,0x4)
  3385 hpingRET   setsockopt 0
  3385 hpingCALL  open(0xbfbfe8a4,O_RDWR,unused0)
  3385 hpingNAMI  /dev/bpf0
  3385 hpingRET   open -1 errno 16 Device busy
  3385 hpingCALL  open(0xbfbfe8a4,O_RDWR,unused0)
  3385 hpingNAMI  /dev/bpf1
  3385 hpingRET   open 4

 OK, try adding the setsockopt(...SO_SNDBUF...) call.
 Will something like this do the trick?

 void socket_sndbuf(int sd)
 {
 long int bufsize;
 bufsize = 65536;
 if (setsockopt(sd, SOL_SOCKET, SO_SNDBUF,
 (char *)bufsize, sizeof(int)) == -1)
 {
 printf([socket_sndbuf] can't set SO_SNDBUF option\n);
 }
 }

 I'm not a C developer so pardon me if I made something stupid :)
 Also how can I make bufsize = default settings*2 for example?

 I tried this code and here is what ktrace show now:
  65372 hping3   CALL  socket(PF_INET,SOCK_DGRAM,IPPROTO_IP)
  65372 hping3   RET   socket 3
  65372 hping3   CALL
 setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe844,0x4)
  65372 hping3   RET   setsockopt 0
  65372 hping3   CALL  connect(0x3,0x8067e20,0x10)
  65372 hping3   RET   connect 0
  65372 hping3   CALL  getsockname(0x3,0xbfbfe834,0xbfbfe848)
  65372 hping3   RET   getsockname 0
  65372 hping3   CALL  close(0x3)
  65372 hping3   RET   close 0
  65372 hping3   CALL  socket(PF_INET,SOCK_RAW,IPPROTO_RAW)
  65372 hping3   RET   socket 3
  65372 hping3   CALL
 setsockopt(0x3,SOL_SOCKET,SO_BROADCAST,0xbfbfe8d4,0x4)
  65372 hping3   RET   setsockopt 0
  65372 hping3   CALL  setsockopt(0x3,0,0x2,0xbfbfe8d4,0x4)
  65372 hping3   RET   setsockopt 0
  65372 hping3   CALL  setsockopt(0x3,SOL_SOCKET,SO_SNDBUF,0xbfbfe8d4,0x4)
  65372 hping3   RET   setsockopt 0


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

 --

 Best Wishes,
 Stefan Lambrev
 ICQ# 24134177

 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 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]


Re: Wrapper for Windows-only network card binary drivers on FreeBSD?

2008-01-24 Thread Garrett Cooper

On Jan 24, 2008, at 5:29 PM, Julian Elischer wrote:


Yuri wrote:
I am curious is there an effort in FreeBSD similar to Linux  
NDISwrapper?

NDISwrapper taked Windows XP binary driver and runs it on Linux.
http://ndiswrapper.sourceforge.net/joomla/
They add the converter between Linux kernel API and the subset of
Windows kernel API sufficient to run binary driver.


I Believe the linux wrapper concept was copied from the freebsd one
which was originally called Project Evil


	Is it the other way around (Project Evil isa ndiswrapper port, etc),  
or something else..?
	Wikipedia also claims that ndiswrapper has more functionality than  
P.E., but I dunno if that's true or not: http://en.wikipedia.org/ 
wiki/NdisWrapper.

Anyone have any clarifications on those points? Just curious, again..
-Garrett
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD hacker 101

2008-01-24 Thread william wong
That brings me to another ponder: why juniper and cisco are using
FreeBSD and not Linux even Linux performs better in an UP environment?

2008/1/25, Dag-Erling Smørgrav [EMAIL PROTECTED]:
 william wong [EMAIL PROTECTED] writes:
  Dag-Erling Smørgrav [EMAIL PROTECTED] writes:
   william wong [EMAIL PROTECTED] writes:
It seems that Juniper favors the even number FreeBSD's.
   Only because 5 was a dog.  They probably stuck with 4 for a while, then
   switched to 6 once they had ascertained that it was significantly more
   stable than 5.  I would be surprised if they skipped 7.
  Please pardon my ignorance of the jargons. Does that mean 5 is not
  stable or does not perform or what?

 FreeBSD 5 was not a very good series.  It was released late and had
 issues with both stability and performance.  FreeBSD 6 corrected the
 stability issues and some of the worst performance issues.  FreeBSD 7
 took care of the remaining performance issues; it may not be as fast as
 4 was on UP, but it beats Linux on SMP.

 (there's no point in comparing SMP performance between 4 and 7 since 4
 had a single-threaded kernel and practically no userland thread support)

 DES
 --
 Dag-Erling Smørgrav - [EMAIL PROTECTED]

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


Re: Wrapper for Windows-only network card binary drivers on FreeBSD?

2008-01-24 Thread Bachilo Dmitry
В сообщении от Friday 25 January 2008 11:25:33 Garrett Cooper написал(а):
 On Jan 24, 2008, at 5:29 PM, Julian Elischer wrote:
  Yuri wrote:
  I am curious is there an effort in FreeBSD similar to Linux
  NDISwrapper?
  NDISwrapper taked Windows XP binary driver and runs it on Linux.
  http://ndiswrapper.sourceforge.net/joomla/
  They add the converter between Linux kernel API and the subset of
  Windows kernel API sufficient to run binary driver.
 
  I Believe the linux wrapper concept was copied from the freebsd one
  which was originally called Project Evil

   Is it the other way around (Project Evil isa ndiswrapper port, etc),
 or something else..?
   Wikipedia also claims that ndiswrapper has more functionality than
 P.E., but I dunno if that's true or not: http://en.wikipedia.org/
 wiki/NdisWrapper.
   Anyone have any clarifications on those points? Just curious, again..
 -Garrett

FreeBSD's ndis works perfectly, and it worked long before it apeared in Linux. 
Just type 'ndisgen' and the interactive script will do everything for you, so 
why bother?

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



-- 
С уважением, 
Бачило Дмитрий
Руководитель отдела системной интеграции
ООО Компания Солинк
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: sysctl text definitions.

2008-01-24 Thread Peter Jeremy
On Thu, Jan 24, 2008 at 02:19:36PM -0800, Alfred Perlstein wrote:
Hey guys, something that I've always wanted to do was actually somehow
export those handy description strings from the kernel SYSCTL macros
in the least obtrusive method possible.

Likewise.

The only thing I could come up with that didn't require compiling the
files twice was to basically do some tricks where the text strings
wound up in some throw-away section of the object files.

Many years ago I started to look at this:  My idea was to stick the
description strings into an ELF section that was not loaded.

Then these would be copied into /boot or maybe some other place
as part of the install process.

If the relevant ELF sections are marked unloadable then there's no
reason not to just leave them in the kernel/kld file.

Any ideas/pointers on how to do this linker magic?

This is where I failed:  My ld-foo wasn't sufficient to create the
required linker scripts to make it all work.  I don't remember if
I kept the work I did.  I thought I mentioned it on a mailing list
but can't find it in my home archives or on google.

-- 
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.


pgpX75INIK7Gd.pgp
Description: PGP signature


Re: FreeBSD hacker 101

2008-01-24 Thread Bert JW Regeer


On Jan 24, 2008, at 22:58 , william wong wrote:


That brings me to another ponder: why juniper and cisco are using
FreeBSD and not Linux even Linux performs better in an UP environment?

2008/1/25, Dag-Erling Smørgrav [EMAIL PROTECTED]:

william wong [EMAIL PROTECTED] writes:

Dag-Erling Smørgrav [EMAIL PROTECTED] writes:

william wong [EMAIL PROTECTED] writes:

It seems that Juniper favors the even number FreeBSD's.
Only because 5 was a dog.  They probably stuck with 4 for a  
while, then
switched to 6 once they had ascertained that it was significantly  
more

stable than 5.  I would be surprised if they skipped 7.

Please pardon my ignorance of the jargons. Does that mean 5 is not
stable or does not perform or what?


FreeBSD 5 was not a very good series.  It was released late and had
issues with both stability and performance.  FreeBSD 6 corrected the
stability issues and some of the worst performance issues.  FreeBSD 7
took care of the remaining performance issues; it may not be as  
fast as

4 was on UP, but it beats Linux on SMP.

(there's no point in comparing SMP performance between 4 and 7  
since 4
had a single-threaded kernel and practically no userland thread  
support)


DES
--
Dag-Erling Smørgrav - [EMAIL PROTECTED]




Please do not top post.

The reason Juniper and Cisco are probably using FreeBSD is because of  
the license that FreeBSD is under (BSD-License) versus the Linux  
kernels GPL.


Bert JW Regeer