high speed timestamp counter

2000-11-02 Thread Hao Zhang
Title: high speed timestamp counter





Hi there,


I am trying to read the on board Pentium Time Stamp Counter. Is there an API in Unix that allows me to read it directly?

Or some assembly language line that I can drop into my code?


I need the high speed counters to profile some code. I don't want to use the classical time API that is provided in 


-Hao





Building a custom kernel in 4.1

2000-10-30 Thread Hao Zhang
Title:  Building a custom kernel in 4.1






> Hello,
> I am familiar with the procedure of building a custom kernel under
> FreeBSD3.3 but having a lot of difficulty when trying to follow the
> procedure for FreeBSD4.1. Can anyone summarize the exact steps to build a
> custom kernel under FreeBSD4.1(the documentation is a little confusing)?
> 
> I am trying to build a custom kernel with a label module (from NIST) and the
> build fails while trying to link with some of the function pointers of that
> module. Below are the errors I get:
> 
> 
> *
> 
> c -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmiss
> ing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -an
> si  -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/../include  -D_KERNEL -i
> nclude opt_global.h -elf  -mpreferred-stack-boundary=2  config.c
> cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmis
> sing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -a
> nsi  -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/../include  -D_KERNEL -
> include opt_global.h -elf  -mpreferred-stack-boundary=2  setdef1.c
> touch hack.c
> cc -elf -shared -nostdlib hack.c -o hack.So
> rm -f hack.c
> sh /usr/src/sys/conf/newvers.sh MPLS
> cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmis
> sing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -a
> nsi  -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/../include  -D_KERNEL -
> include opt_global.h -elf  -mpreferred-stack-boundary=2  vers.c
> linking MPLS
> if_ethersubr.o: In function `ether_demux':
> if_ethersubr.o(.text+0x666): undefined reference to `lt_find_by_label_ptr'
> if_ethersubr.o(.text+0x68c): undefined reference to `lt_find_by_label_ptr'
> if_ethersubr.o(.text+0x6fd): undefined reference to `lt_find_by_label_ptr'
> rtsock.o: In function `route_output':
> rtsock.o(.text+0x8c6): undefined reference to `lt_add_ptr'
> rtsock.o(.text+0x8d6): undefined reference to `lt_add_ptr'
> rtsock.o(.text+0x8e6): undefined reference to `lt_rm_ptr'
> rtsock.o(.text+0x8f6): undefined reference to `lt_rm_ptr'
> rtsock.o(.text+0x909): undefined reference to `PrintLabelTable_ptr'
> rtsock.o(.text+0x912): undefined reference to `PrintLabelTable_ptr'
> *** Error code 1
> 
> Stop in /usr/obj/usr/src/sys/MPLS.
> *** Error code 1
> 
> Stop in /usr/src.
> *** Error code 1
> 
> *
> 
> 
> Any quick help would be really appreciated.
> 
> Syed Kamran Raza
> Nortel Networks
> 
> 
> 
> 





RE: need a recommendation of NIC

2000-09-15 Thread Hao Zhang
Title: RE: need a recommendation of NIC





Thanks for your info.
I'm using FreeBSD v3.3 which suppports The PRO/100B with chipset 82558. If I want to use Intel Pro/100+ with the 82559 chipset, what driver should I use? fxp? 

-Hao




-Original Message-
From: Pedro J. Lobo [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 15, 2000 9:35 AM
To: Aleksandr A.Babaylov
Cc: Vladimir B. Grebenschikov; Zhang, Hao [WDLN2:AN22:EXCH];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: need a recommendation of NIC



On Fri, 15 Sep 2000, Aleksandr A.Babaylov wrote:


> Vladimir B. Grebenschikov writes:
> > 
> > Intell EtherExpress
> > fxp driver in FreeBSD, I think it best low-cost ethernet card for
> > FreeBSD now.
> As far as I know EtherExpress has hardware bug.
> The easy way to trigger it is connect 2 EtherExpress by
> crossover cable and load by traffic.


:-? I've been using Pro/100 cards for years, and I've always found them
rock stable. Can you explain us a bit more?


-- 
-
Pedro José Lobo Perea    Tel:    +34 91 336 78 19
Centro de Cálculo    Fax:    +34 91 331 92 29
E.U.I.T. Telecomunicación    e-mail: [EMAIL PROTECTED]
Universidad Politécnica de Madrid
Ctra. de Valencia, Km. 7 E-28031 Madrid - España / Spain




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message





need a recommendation of NIC

2000-09-13 Thread Hao Zhang
Title: need a recommendation of NIC





I am doing some testing on FreeBSD 3.3 platform by sending some UDP packets 
thru FreeBSD routers. It's found that the duplications happened in FreeBSD router. 
Now The FreeBSD 3.3 is running on Pentium III, and NIC is 3C905B-Tx. To isolate this 
problem. We will try different NIC. Can anyone give me some recommendation for the 
high performance NIC for FreeBSD 3.3. Thanks in advance for any comments. 


-Hao





RE: Duplicating packets

2000-09-06 Thread Hao Zhang
Title: RE: Duplicating packets





Since the router we are testing is a standalone box, we are not using any routing protocols.  
The actual testbed is using Gated. Here is the info from the router. Thanks in advance.


# ifconfig -au
xl0: flags=8843 mtu 1500
    inet 200.1.16.10 netmask 0xf000 broadcast 200.1.31.255
    ether 00:50:04:0d:bf:46 
    media: 10baseT/UTP 
    supported media: autoselect 100baseTX  100baseTX  100
baseTX 10baseT/UTP  10baseT/UTP  10baseT/UTP
xl1: flags=8843 mtu 1500
    inet 200.2.16.10 netmask 0xf000 broadcast 200.2.31.255
    ether 00:50:04:0d:bc:82 
    media: 10baseT/UTP 
    supported media: autoselect 100baseTX  100baseTX  100
baseTX 10baseT/UTP  10baseT/UTP  10baseT/UTP
xl2: flags=8843 mtu 1500
    inet 200.3.16.10 netmask 0xf000 broadcast 200.3.31.255
    ether 00:b0:d0:2a:79:b2 
    media: 10baseT/UTP 
    supported media: autoselect 100baseTX  100baseTX  100
baseTX 10baseT/UTP  10baseT/UTP  10baseT/UTP
xl3: flags=8843 mtu 1500
    inet 200.4.16.10 netmask 0xf000 broadcast 200.4.31.255
    ether 00:50:04:71:5a:76 
    media: 10baseT/UTP 
    supported media: autoselect 100baseTX  100baseTX  100
baseTX 10baseT/UTP  10baseT/UTP  10baseT/UTP
rl0: flags=8843 mtu 1500
    inet 200.5.16.10 netmask 0xf000 broadcast 200.5.31.255
    ether 00:48:54:87:9f:de 
    media: autoselect
    supported media: autoselect 100baseTX  100baseTX  100
baseTX 10baseT/UTP  10baseT/UTP 10baseT/UTP 
rl1: flags=8843 mtu 1500
    inet 200.6.16.10 netmask 0xf000 broadcast 200.6.31.255
    ether 00:48:54:87:e0:3f 
    media: autoselect
    supported media: autoselect 100baseTX  100baseTX  100
baseTX 10baseT/UTP  10baseT/UTP 10baseT/UTP 
# 


# netstat -r
Routing tables


Internet:
Destination    Gateway    Flags Refs Use Netif Expire
200.1.16/20    link#1 UC  0    0  xl0
200.1.16.10    0:50:4:d:bf:46 UHLW    0  432  lo0
200.1.16.100   0:de:bb:1:0:0  UHLW    0    0  xl0   1167
200.2.16/20    link#2 UC  0    0  xl1
200.2.16.100   0:de:bb:1:1:0  UHLW    0   142164  xl1   1167
200.3.16/20    link#3 UC  0    0  xl2
200.3.16.100   0:de:bb:1:2:0  UHLW    0    0  xl2   1167
200.4.16/20    link#4 UC  0    0  xl3
200.4.16.100   0:de:bb:1:3:0  UHLW    0    0  xl3   1167
200.5.16/20    link#5 UC  0    0  rl0
200.5.16.100   0:de:bb:1:10:0 UHLW    0   142243  rl0   1167
200.6.16/20    link#6 UC  0    0  rl1
200.6.16.100   0:de:bb:1:11:0 UHLW    1  9048110  rl1   1167
# 


--Hao


-Original Message-
From: Frederik Meerwaldt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 06, 2000 2:16 PM
To: Zhang, Hao [WDLN2:AN22:EXCH]
Cc: freebsd-hackers
Subject: Re: Duplicating packets



Hi!


> I am doing some testing on FreeBSD 3.3 platform by sending some UDP
packets
> thru FreeBSD routers. It's found that FreeBSD duplicates some packet.
> That results in that the received packet are more than sent ones. How
> can I disable the duplication in FreeBSD config. Or did I do some wrong
> in the FreeBSD config. The FreeBSD 3.3 is running on Pentium III, and NIC
is
> 3C905B-Tx.


Could you please inform us about details regarding this problem?
Which routing software are you using? natd? routed? Interface
Characteristics (output of ifconfig of the interfaces)?
netstat -r


Best Regards,
    Freddy
--
www.freddym.org








To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message





Duplicating packets

2000-09-06 Thread Hao Zhang
Title: Duplicating packets





I am doing some testing on FreeBSD 3.3 platform by sending some UDP packets
thru FreeBSD routers. It's found that FreeBSD duplicates some packet.
That results in that the received packet are more than sent ones. How
can I disable the duplication in FreeBSD config. Or did I do some wrong 
in the FreeBSD config. The FreeBSD 3.3 is running on Pentium III, and NIC is
3C905B-Tx.


Thanks in advance for any comments.


- Hao