Charles Beckham | 1 Sep 08:46 2008
Picon

Obytes counter in netstat not incrementing

after configuring some rrd's and expecting to grab the data from
netstat to log, i noticed that most addresses on the system arn't
having the OBytes counter increased. is this just me, or am i missing
something? i also have ipfw count rules for each address on the
system, to check if the problem was maybe my command line. below is
some snippets.

x# netstat -ibdnW | grep 208.110.87.83 | perl -p -e 's/  */ /g'
fxp0 1500 208.110.87 208.110.87.83 148701705 - 3765807065 1520 - 136897 - -

x# ipfw show 5000 | grep 208.110.87.83
05000    423144     18533923 count ip from any to 208.110.87.83
05000    419195     85561587 count ip from 208.110.87.83 to any

x# netstat -ibdnW | grep 208.110.87.83 | perl -p -e 's/  */ /g'
fxp0 1500 208.110.87 208.110.87.83 148702426 - 3765843377 1520 - 136897 - -

x# ipfw show 5000 | grep 208.110.87.83
05000    423198     18536930 count ip from any to 208.110.87.83
05000    419228     85565367 count ip from 208.110.87.83 to any

x# netstat -ibdnW | grep 208.110.87.83 | perl -p -e 's/  */ /g'
fxp0 1500 208.110.87 208.110.87.83 148702600 - 3765853440 1520 - 136897 - -

as you can see, the ipfw counters are increasing, but not the netstat
output, any ideas, or am i missing something?

--

-- 
- Charles Beckham
_______________________________________________
(Continue reading)

Alex | 1 Sep 11:06 2008
Picon

Driver to Driver communication, with kobj?

Hi,

I was wondering what the best way of doing driver to driver
communication is. I'm trying to enqueue an ata-command from a
completely different driver (nothing to do with storage / ata). I
would just bluntly use the ata_controlcmd() function, but it would
require for me to know the device_t of the drive I'm trying to access.
I don't know which device_t it would be, nor do I know how to find it
out.

If this is a no-go... I really need some help with kobj, as I can't
figure it out fully... How do you use a kobj "exported" method from
another driver?

Thank you in advance,

Alex
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

Nikola Knežević | 1 Sep 12:58 2008
Picon

kldload: unexpected relocation type 10

Hi guys,

I'm trying to do something unusual - to build my own module, mixed  
with the Click (Modular Router). In order to do so, I had to write a  
Makefile which borrows a lot from Click's Makefile. Like all other  
kernel modules, I include <bsd.kmod.ko>, but I'm modifying CFLAGS  
(with +=), and CXXFLAGS. I also have -DHAVE_INT64_IS_LONG there. For  
CXXFLAGS I use -fpermissive -fno-exceptions -fno-rtti.

I had to do all this creaziness because I had to build CLick first  
(its .cc files), and then link all them with my code.

Now I'm getting this:
"kldload: unexpected relocation type 10"

and:
"link_elf_obj: symbol M_TEMP undefined"

I cannot find where this M_TEMP comes from, because I'm including <sys/ 
malloc.h>. for the relocation, I don't know what to do. I'm not using - 
g, as described on some web forum.

Any hints?

Cheers,
Nikola

_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
(Continue reading)

Lars Engels | 2 Sep 00:07 2008
Picon

Re: USB Video class

On Tue, Aug 19, 2008 at 05:53:32PM +0200, Alexander Leidinger wrote:
> Quoting "Peter B" <pb <at> ludd.ltu.se> (from Tue, 19 Aug 2008 15:05:29 +0200 (MEST)):
> 
> >
> >Is there any ongoing project towards USB Video class support in FreeBSD ..?
> 
> This is better asked on usb <at>  (CCed). I'm not aware of such an effort, feel free to start it (you better wait
some days until the 
> new USB stack hits CVS).

NetBSD had a Summer of Code project and it seems to be pretty
successful:
http://netbsd-soc.sourceforge.net/projects/uvc/
Perhaps one can take this as a starting point?

Peter B | 2 Sep 01:19 2008
Picon

Re: USB Video class

>> >
>> >Is there any ongoing project towards USB Video class support in FreeBSD =
>=2E.?
>>=20
>> This is better asked on usb <at>  (CCed). I'm not aware of such an effort, fee=
>l free to start it (you better wait some days until the=20
>> new USB stack hits CVS).

>NetBSD had a Summer of Code project and it seems to be pretty
>successful:
>http://netbsd-soc.sourceforge.net/projects/uvc/
>Perhaps one can take this as a starting point?

When testing. I found it seems to be easier to port the OpenBSD code.
I think it's because it's more integrated into the kernel sources.

The current status is proper probe, attach, and capability dump.
I think I know how to approach the problem better now after messing with
code for awhile. (however some other things are using my time atm)

David Wolfskill | 2 Sep 17:41 2008

Re: Obytes counter in netstat not incrementing

On Sun, Aug 31, 2008 at 11:46:36PM -0700, Charles Beckham wrote:
> [... "netstat -ibdnW" doesn't show changes in Obytes (or Opkts)...]
> ...
> as you can see, the ipfw counters are increasing, but not the netstat
> output, any ideas, or am i missing something?

First, what is the output of "uname -r" (at least)?

I'm experimenting with using "netstat -nibf inet" to acquire such
information, and on a FreeBSD 6.3-STABLE system built 25 Aug 2008, I do
not see the problem:

dwolf-bsd(6.3-S)[1] date;netstat -nibf inet; sleep 10; date; netstat -nibf inet
Tue Sep  2 08:40:26 PDT 2008
Name    Mtu Network       Address              Ipkts Ierrs     Ibytes    Opkts Oerrs     Obytes  Coll
em0    1500 172.24.24/22  172.24.24.91      16954669     - 3460328864  8173509     - 1440161156     -
lo0   16384 127           127.0.0.1          4283768     -  627953338  4283768     -  627953338     -
Tue Sep  2 08:40:36 PDT 2008
Name    Mtu Network       Address              Ipkts Ierrs     Ibytes    Opkts Oerrs     Obytes  Coll
em0    1500 172.24.24/22  172.24.24.91      16954688     - 3460330996  8173528     - 1440163696     -
lo0   16384 127           127.0.0.1          4283806     -  627956814  4283807     -  627957022     -
dwolf-bsd(6.3-S)[2] 

Peace,
david
--

-- 
David H. Wolfskill				david <at> catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
(Continue reading)

Charles Beckham | 2 Sep 22:15 2008
Picon

Re: Obytes counter in netstat not incrementing

sorry, heres a uname
x# uname -a
FreeBSD x.worxtech.net 6.3-STABLE FreeBSD 6.3-STABLE #1: Sun May 25
12:15:51 CDT 2008     worxtech <at> x.worxtech.net:/usr/obj/usr/src/sys/X
i386

also i should point out that this machine has ~ 100 alias addresses on
it, and the problem doesnt seem to appear with all of them, some
appear to have a proper counter.

x# netstat -nibf inet
Name    Mtu Network       Address              Ipkts Ierrs     Ibytes
  Opkts Oerrs     Obytes  Coll
fxp0   1500 208.110.87    208.110.87.43     16734290     - 3093571704
284564171     -  685127971     -
fxp0   1500 208.110.87    208.110.87.44       848085     -   82624659
  46376     -    2604545     -

heres output from the address i posted before, which is the highest
usage on the machine
fxp0   1500 208.110.87    208.110.87.83     169838660     -  400838840
    1520     -     136897     -
as you can see, the obytes hasnt gone up in a few days.

i'm not quite sure why this problem is persistent but could it be
related to my netmask address for the inet alias?
i did some research and it appears i should be using 0xffffffff for my
netmask for the alias interface? please let me know any thaughts you
may have.

(Continue reading)

David Wolfskill | 2 Sep 22:38 2008

Re: Obytes counter in netstat not incrementing

On Tue, Sep 02, 2008 at 01:15:15PM -0700, Charles Beckham wrote:
> sorry, heres a uname
> x# uname -a
> FreeBSD x.worxtech.net 6.3-STABLE FreeBSD 6.3-STABLE #1: Sun May 25
> 12:15:51 CDT 2008     worxtech <at> x.worxtech.net:/usr/obj/usr/src/sys/X
> i386
> 
> also i should point out that this machine has ~ 100 alias addresses on
> it, and the problem doesnt seem to appear with all of them, some
> appear to have a proper counter.
> ...
> i'm not quite sure why this problem is persistent but could it be
> related to my netmask address for the inet alias?
> i did some research and it appears i should be using 0xffffffff for my
> netmask for the alias interface? please let me know any thaughts you
> may have.

Ah.  I recall that in older releases of FreeBSD, attempting to create
such "alias" entries netmask specifications that amounted to having
different "alias" specifications sharing a (sub)net generally failed to
work, with the suggestion to use 0xffffffff as the netmask for all such
alias specification being the usual suggestion.

Somehow, I thought that someone had done some work on this, but on a
6.3-STABLE system built 25 August, I still see in ifconfig(1):

     alias   Establish an additional network address for this interface.  This
             is sometimes useful when changing network numbers, and one wishes
             to accept packets addressed to the old interface.  If the address
             is on the same subnet as the first network address for this
(Continue reading)

Charles Beckham | 3 Sep 02:22 2008
Picon

Re: Obytes counter in netstat not incrementing

i've already made the changes to rc.conf, but since its a shared
machine and almost all addresses are in use, i'll have to schedule a
reboot before i can make changes effective, i will post a follwup
after i've made these changes. thanks for you assistance.

On Tue, Sep 2, 2008 at 1:38 PM, David Wolfskill <david <at> catwhisker.org> wrote:
> On Tue, Sep 02, 2008 at 01:15:15PM -0700, Charles Beckham wrote:
>> sorry, heres a uname
>> x# uname -a
>> FreeBSD x.worxtech.net 6.3-STABLE FreeBSD 6.3-STABLE #1: Sun May 25
>> 12:15:51 CDT 2008     worxtech <at> x.worxtech.net:/usr/obj/usr/src/sys/X
>> i386
>>
>> also i should point out that this machine has ~ 100 alias addresses on
>> it, and the problem doesnt seem to appear with all of them, some
>> appear to have a proper counter.
>> ...
>> i'm not quite sure why this problem is persistent but could it be
>> related to my netmask address for the inet alias?
>> i did some research and it appears i should be using 0xffffffff for my
>> netmask for the alias interface? please let me know any thaughts you
>> may have.
>
> Ah.  I recall that in older releases of FreeBSD, attempting to create
> such "alias" entries netmask specifications that amounted to having
> different "alias" specifications sharing a (sub)net generally failed to
> work, with the suggestion to use 0xffffffff as the netmask for all such
> alias specification being the usual suggestion.
>
> Somehow, I thought that someone had done some work on this, but on a
(Continue reading)

kr Lekha | 3 Sep 10:34 2008
Picon

killing a kthread

Hi,
i wanted to kill a kthread created by my module, There is no actual
kthread_kill to kill it

hence I tried to send kill signal to thread
 psignal(p, SIGTERM);
psignal(p, SIGKILL);
killproc(p,"messeage");
and kthread_suspend()

Nothing seems to be killing the kthread, I still see it
[root <at>  /usr/src]# ps awx -l | grep kernel
 UID   PID    PPID CPU PRI NI   VSZ   RSS MWCHAN STAT  TT       TIME COMMAND
  0     1048     1      0     20   0     0       8      ktsusp      DL
??     0:00.01 [new_kernel_thread]

I have noticed that generally if kernel module wanted to kill a thread then
it calls
{
   wakeup(p);
   msleep(p,0); /*or tsleep*/
}

This puts the thread to sleep forever. However kthread_suspend also performs
same actions.
Does scheduler take care to killing it?

I read that after 2 min scheduler wakes up the thread and
eventually kills it,
i see the same kthread suspended even after a day
(Continue reading)


Gmane