RE: Ethernet congestion management

2009-07-27 Thread Vivek Subbarao
Congestion control is handled by both the sender and the receiver. If
the receiver figures out that there is congestion that i can indicate
the same to the sender by sending a packet back (probably thru another
route). The sender then can take the appropriate action.

Also congestion can be in any of the intermediate routes and the
receiver may be totally unaware of it. In the end its the senders
responsibility to make sure that the packets are delivered (and in order
if necessary) and the its the receivers responsibility to make sure that
i receives all the packets. 

Remember that some packets may get dropped by the intermediate routers
and mechanism to handle this should also be implemented.

-Original Message-
From: kernelnewbies-bou...@nl.linux.org
[mailto:kernelnewbies-bou...@nl.linux.org] On Behalf Of Michael Blizek
Sent: 27 July 2009 20:15
To: ?ukasz Jachymczyk
Cc: kernelnewbies@nl.linux.org
Subject: Re: Ethernet congestion management

Hi!

On 11:11 Mon 27 Jul , ?ukasz Jachymczyk wrote:
> Michael Blizek wrote:
> 
> >>>1) Congestion handling is usually done by the sender and not the
receiver.
> >>I'm not sure about this. After all I can send as much data over
> >>network as I can and the receiver might have not enough resources to
> >>handle it. Isn't receiver the one that should worry about
> >>congestion?
> 
> I might not say it clearly, but my driver is sending only raw
> Ethernet frames. No TCP/IP. As you can see, it's very basic
> communication. Yet I would be happy to know when device driver is
> dropping packets.

You have said earlier that you are programming a virtual ethernet
driver. I do
not completely understand what you want to do:
some_stack - your virtual ethernet driver - some physical interface

Do you do something which recovers lost packets? If you do, doing
windowing as
I have described at the layer which does the retransmissions is probably
a
good thing to do. If you have something above you which does this, you
will
not need to bother in many cases.

> As I said, there used to be queue's cng_level struct member in
> netif_rx. It contained information about ingress traffic queue
> congestion level. But now it's gone and I can't figure out what else
> to use.

If you worry about receiver overload, doing windowing is probably the
safest
choice.

-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: DMA Memory SIZE

2009-07-27 Thread Vipul Jain
Hi Deepak,

   I am newbie too but to my understanding kernel memory is divided into
following memory zones:
   DMA_ZONE
   NORMAL_ZONE
   HIGHMEM_ZONE

   and depending on arch of the machine these memory zone range gets
defined. e.g. for x86 its 16MB
   (24bit ISA address space) and on other platforms say ARM both DMA and
NORMAL can be same. hence
   kernel assigns its addressable address from 0 to 2^32 address into these
different memory zones and
   provides helper functions to request memory from these regions.

   I am not sure if these ZONES can be changed as per requirement say making
x86 DMA zone more than
   16 MB. May be linux gurus on this alias could put more light on this.

Regards,
Vipul.



On Mon, Jul 27, 2009 at 6:21 AM, Deepak Vishwakarma <
vishwakarma.dee...@gmail.com> wrote:

> Hi guyz,
>
> Need your favour!
>
> How is DMA memory is allocated in kernel space? And how can it be
> increased?
>
> Regards,
> Deepak
>


Re: book or reference about writing userspace program

2009-07-27 Thread Michael Kerrisk

Anuz Pratap Singh Tomar wrote:

1 W richard Stevens' Advance programming in Unix FTW
2 Rick stones's Beginning Linux Programming wrox publication
3 New rider publications Advance programming in Linux, 
(http://www.advancedlinuxprogramming.com/)

4 Linux System Programming by Robert Love.


Early next year, there will also be this:
http://blog.man7.org/2009/07/whats-book-about.html
http://blog.man7.org/2009/07/64-chapters.html

Cheers,

Michael


On Thu, Apr 16, 2009 at 11:56 AM, loody > wrote:


Dear all:
When writing driver, kernelspace program, we can reference "linux
device driver", but how about writing userspace programs?
ps: I need more advance one.
appreciate your help,
milooody

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org

Please read the FAQ at http://kernelnewbies.org/FAQ





--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: patching adventure

2009-07-27 Thread Mulyadi Santosa
Hi...

On 7/27/09, Simon  wrote:
> Hi there,
>   i've been trying to patch the kernel to try and get it in top
> shape... but i discovered a few difficulties...  my post talks about
> unionfs, but i'm really using it as an example.
>
> Every file referenced in this post are the ones found on the
> kernel.org site below:
>   http://kernel.org/pub/linux/kernel/v2.6/
> And unionfs patches are found on this page:
>   http://www.filesystems.org/project-unionfs.html
>
> First, i tried with the 2.6.29 series and at the time of trying (and
> of writing this) the subminor version was up to 6 (2.6.29.6).
> Second, i want to add unionfs support to the vanilla sources, for
> kernel 2.6.29.  The available patch for unionfs is 2.5.2 for kernel
> 2.6.29.4.
>
> Ok, now here's what i thought i had to do:
> on top of: linux-2.6.29.tar.bz2
>  1) patch with: patch-2.6.29.1.bz2
>  2) patch with: patch-2.6.29.2.bz2
>  3) patch with: patch-2.6.29.3.bz2
>  4) patch with: patch-2.6.29.4.bz2
>  5) patch with: unionfs-2.5.2_for_2.6.29.4.diff.gz
>  6) patch with: patch-2.6.29.5.bz2
>  7) patch with: patch-2.6.29.6.bz2
>
> It made sense to me that they were all differential patches, but it
> appears they are cummulative since 2.6.29 (ie to get 2.6.29.6, you
> just use the 2.6.29.6 patch straight)... so during my trial, patch
> said some stuff is already patched, and the more i go down this list
> of patch the longer the 'already patched' messages.
>
> I guess the correct way would have been to 1) just patch with 2.6.29.4
> straight, then 2) unionfs then 3) what?

After re-reading kernel's README and
Documentation/applying-patches.txt, I think you better do this
sequence:
1. apply patch 2.6.29.6 on top of 2.6.29
2. apply unionfs patch... expect to see some rejects... then try to
fix them. Well, if you're lucky, it's possible that unionfs patch
applies smoothly on 2.6.29.6

Others might have better idea...

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer
blog: the-hydra.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: How to evaluate linux system performance

2009-07-27 Thread loody
hi:

2009/7/27 Greg KH :
> On Mon, Jul 27, 2009 at 10:57:17PM +0800, loody wrote:
>> Dear all:
>> Would someone please tell me what are the key items about linux performance?
>
> What ever you care about :)
>
>> I only write the driver before, kernel for me just like another big API.
>> If I want to know whether my driver will make kernel performance not
>> well, how can I do?
>
> Run it and see what happens.
>
> Do you have any _specific_ questions about this kind of thing?
>
> How about a pointer to the driver you are referring to?

I apologze for posting the wrong place.
I should post it to the kernle mailing list. :)
Everything I finish porting driver, what I do and only I know is check
whether file i/o is correct.

But I have no idea is there any key word/items/list I should check in
the kernel.
BTW, is there any test bench or test program I can evaluate kernel performance?
appreciate your help,
miloody

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: How to evaluate linux system performance

2009-07-27 Thread Greg KH
On Tue, Jul 28, 2009 at 12:13:10AM +0800, loody wrote:
> hi:
> 
> 2009/7/27 Greg KH :
> > On Mon, Jul 27, 2009 at 10:57:17PM +0800, loody wrote:
> >> Dear all:
> >> Would someone please tell me what are the key items about linux 
> >> performance?
> >
> > What ever you care about :)
> >
> >> I only write the driver before, kernel for me just like another big API.
> >> If I want to know whether my driver will make kernel performance not
> >> well, how can I do?
> >
> > Run it and see what happens.
> >
> > Do you have any _specific_ questions about this kind of thing?
> >
> > How about a pointer to the driver you are referring to?
> 
> I apologze for posting the wrong place.
> I should post it to the kernle mailing list. :)
> Everything I finish porting driver, what I do and only I know is check
> whether file i/o is correct.
> 
> But I have no idea is there any key word/items/list I should check in
> the kernel.
> BTW, is there any test bench or test program I can evaluate kernel 
> performance?
> appreciate your help,

There are lots of test programs that do this.  But again, it depends on
what you care about.

Can you post a link to your driver?

thanks,

greg k-h

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Integrating kernel module code into kernel source tree.

2009-07-27 Thread Greg Freemyer
On Mon, Jul 27, 2009 at 10:46 AM, Denis Borisevich wrote:
> 2009/7/27  :
>> On Mon, 27 Jul 2009 17:28:21 +0400, Denis Borisevich 
>> wrote:
>>> 2009/7/27 Siddu :
 On Mon, Jul 27, 2009 at 6:22 PM, Denis Borisevich 
 wrote:
> >> Thank you for reply but I think you got me wrong. I don't want to
> >> submit my driver to mainline kernel. I just want to integrate it
>> with
> >> my local kernel source tree for personal use.

 I am not sure about what the steps are to integrate with kernel source
 tree
 to make it appear in the menuconfig (if thats what you are looking for )
 but
 am not sure the  guys out there will be willing to help you unless you
 want
 to submit it to mainline kernel tree :)
>>>
>>> Let's say this driver is not ready for inclusion to the mainline
>>> kernel tree yet:) And that moment will never come if I don't get any
>>> help. I thought that this list is the right place to ask for help.
>>>
 --
 Regards,
 ~Sid~
>> Hi,
>>
>> Have a close look at the syntax of the make source ; it's really easy to
>> do.
>> I'm an absolute kernel newbie and I've added on my SAM9 board before to
>> menuconfig.
>> Just copy and paste one of the menu items and edit it to your own liking,
>> voila, done.
>> You'll end up with a single bool define, flagging your choice - that's the
>> one you have to pick up on in the kernel source.
>>
>> HTH
>> Best regards,
>> Kris
>
> Thanks to all of you guys! Tomorrow I will try to make the
> integration. It seems that I have enough info now.
> Thanks!
>
> --
> Denis

Denis,

If your goal is eventually to get your code into mainline, but you
think a stepping stone would be helpful, then you might look at the
staging directory.

I believe GregKH maintains that directory and by design it has much
more liberal acceptance criteria than the rest of the kernel.  The
idea is to get marginal drivers into the kernel, so they can be
refined until they are appropriate for full inclusion.

I have not been through the process but it seems like it might be good
way to move forward for you.



Greg
-- 
Greg Freemyer
Head of EDD Tape Extraction and Processing team
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
Preservation and Forensic processing of Exchange Repositories White Paper -


The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Integrating kernel module code into kernel source tree.

2009-07-27 Thread Denis Borisevich
2009/7/27  :
> On Mon, 27 Jul 2009 17:28:21 +0400, Denis Borisevich 
> wrote:
>> 2009/7/27 Siddu :
>>> On Mon, Jul 27, 2009 at 6:22 PM, Denis Borisevich 
>>> wrote:
 >> Thank you for reply but I think you got me wrong. I don't want to
 >> submit my driver to mainline kernel. I just want to integrate it
> with
 >> my local kernel source tree for personal use.
>>>
>>> I am not sure about what the steps are to integrate with kernel source
>>> tree
>>> to make it appear in the menuconfig (if thats what you are looking for )
>>> but
>>> am not sure the  guys out there will be willing to help you unless you
>>> want
>>> to submit it to mainline kernel tree :)
>>
>> Let's say this driver is not ready for inclusion to the mainline
>> kernel tree yet:) And that moment will never come if I don't get any
>> help. I thought that this list is the right place to ask for help.
>>
>>> --
>>> Regards,
>>> ~Sid~
> Hi,
>
> Have a close look at the syntax of the make source ; it's really easy to
> do.
> I'm an absolute kernel newbie and I've added on my SAM9 board before to
> menuconfig.
> Just copy and paste one of the menu items and edit it to your own liking,
> voila, done.
> You'll end up with a single bool define, flagging your choice - that's the
> one you have to pick up on in the kernel source.
>
> HTH
> Best regards,
> Kris

Thanks to all of you guys! Tomorrow I will try to make the
integration. It seems that I have enough info now.
Thanks!

--
Denis

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: module_named_param() and zero perms?

2009-07-27 Thread Robert P. J. Day
On Mon, 27 Jul 2009, Robert P. J. Day wrote:

>
>   recent comment on one of my linux.com columns asks about this from
> drivers/usb/misc/sisusbvga/sisusb.c:
>
> static int sisusb_first_vc = 0;
> static int sisusb_last_vc = 0;
> module_param_named(first, sisusb_first_vc, int, 0);
> module_param_named(last, sisusb_last_vc, int, 0);
> MODULE_PARM_DESC(first, "Number of first console to take over (1 - 
> MAX_NR_CONSOLES)");
> MODULE_PARM_DESC(last, "Number of last console to take over (1 - 
> MAX_NR_CONSOLES)");
>
>   i have to admit, i'm not sure of the value of invoking
> module_param_named() to create alternate names for module parameters
> only to give them permissions of zero so that they don't show up
> under /sys.  maybe i don't really understand parameters as well as i
> thought.  opinions?  what's really happening above?

  never mind, i see what's happening -- the command line parms will be
named "first" and "last", but will still not show up under /sys.
carry on.

rday
--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday
"Kernel Newbie Corner" column @ linux.com:  http://cli.gs/WG6WYX


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Ethernet congestion management

2009-07-27 Thread Michael Blizek
Hi!

On 11:11 Mon 27 Jul , ?ukasz Jachymczyk wrote:
> Michael Blizek wrote:
> 
> >>>1) Congestion handling is usually done by the sender and not the receiver.
> >>I'm not sure about this. After all I can send as much data over
> >>network as I can and the receiver might have not enough resources to
> >>handle it. Isn't receiver the one that should worry about
> >>congestion?
> 
> I might not say it clearly, but my driver is sending only raw
> Ethernet frames. No TCP/IP. As you can see, it's very basic
> communication. Yet I would be happy to know when device driver is
> dropping packets.

You have said earlier that you are programming a virtual ethernet driver. I do
not completely understand what you want to do:
some_stack - your virtual ethernet driver - some physical interface

Do you do something which recovers lost packets? If you do, doing windowing as
I have described at the layer which does the retransmissions is probably a
good thing to do. If you have something above you which does this, you will
not need to bother in many cases.

> As I said, there used to be queue's cng_level struct member in
> netif_rx. It contained information about ingress traffic queue
> congestion level. But now it's gone and I can't figure out what else
> to use.

If you worry about receiver overload, doing windowing is probably the safest
choice.

-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



module_named_param() and zero perms?

2009-07-27 Thread Robert P. J. Day

  recent comment on one of my linux.com columns asks about this from
drivers/usb/misc/sisusbvga/sisusb.c:

static int sisusb_first_vc = 0;
static int sisusb_last_vc = 0;
module_param_named(first, sisusb_first_vc, int, 0);
module_param_named(last, sisusb_last_vc, int, 0);
MODULE_PARM_DESC(first, "Number of first console to take over (1 - 
MAX_NR_CONSOLES)");
MODULE_PARM_DESC(last, "Number of last console to take over (1 - 
MAX_NR_CONSOLES)");

  i have to admit, i'm not sure of the value of invoking
module_param_named() to create alternate names for module parameters
only to give them permissions of zero so that they don't show up under
/sys.  maybe i don't really understand parameters as well as i
thought.  opinions?  what's really happening above?

rday
--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday
"Kernel Newbie Corner" column @ linux.com:  http://cli.gs/WG6WYX


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Integrating kernel module code into kernel source tree.

2009-07-27 Thread Mandeep Sandhu
>> >
>> > try insmod.
>>
>> Insmod only inserts the compiled module or have I missed something?
>>

The OP wants to integrate his "source code" into the main kernel
source tree. I suggest
putting your source files in whatever "driver" directory your driver fits in
(eg: drivers/char/mydriver.c) .

Then alter the relevant Makefile in that dir to include your files (if
needed) for compilation.

As for the menuconfig part...I have no clue! :/

HTH,
-mandeep

>> >
>> > Regards,
>> > Sandeep.
>> >
>> >
>> >
>> >
>> >
>> >
>> > “To learn is to change. Education is a process that changes the
>> > learner.”
>> >
>> >
>> >
>> >>> good luck,
>> >>>
>> >>> Marek
>> >>>
>> >>> --
>> >>> as simple as primitive as possible
>> >>> -
>> >>> Marek Belisko - OPEN-NANDRA
>> >>>
>> >>> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
>> >>> Tel: +421 915 052 184
>> >>> skype: marekwhite
>> >>> icq: 290551086
>> >>> web: http://open-nandra.com
>>
>> --
>> To unsubscribe from this list: send an email with
>> "unsubscribe kernelnewbies" to ecar...@nl.linux.org
>> Please read the FAQ at http://kernelnewbies.org/FAQ
>>
>
>
>
> --
> Regards,
> ~Sid~
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Integrating kernel module code into kernel source tree.

2009-07-27 Thread Bob Beers
On Mon, Jul 27, 2009 at 7:13 AM, Denis Borisevich wrote:
> Hi!
> I have driver for PCI serial board, it compiles as a module, loads and
> works fine. Now it exists as a several files outside the kernel source
> tree. I want to integrate this code within the kernel source tree: I
> want it to exist as some files inside the kernel source, I want to be
> able to select this driver in kernel config and so on. So can any one
> provide me any instructions to achieve this task (I hope it is not
> very difficult) or point to any online documents, etc.?

You will need a Makefile and Kconfig like any other kernel module.
Look at the source for examples.  Then put your source files,
 including the Makefile and Kconfig in a relevant (new) subdirectory
 and then try make xconfig.  Rinse. repeat.

Maybe /Documentation/kbuild is a good place to start reading?

HTH,
-Bob

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Integrating kernel module code into kernel source tree.

2009-07-27 Thread microbit
On Mon, 27 Jul 2009 17:28:21 +0400, Denis Borisevich 
wrote:
> 2009/7/27 Siddu :
>>
>>
>> On Mon, Jul 27, 2009 at 6:22 PM, Denis Borisevich 
>> wrote:
>>> >> Thank you for reply but I think you got me wrong. I don't want to
>>> >> submit my driver to mainline kernel. I just want to integrate it
with
>>> >> my local kernel source tree for personal use.
>>
>> I am not sure about what the steps are to integrate with kernel source
>> tree
>> to make it appear in the menuconfig (if thats what you are looking for )
>> but
>> am not sure the  guys out there will be willing to help you unless you
>> want
>> to submit it to mainline kernel tree :)
> 
> Let's say this driver is not ready for inclusion to the mainline
> kernel tree yet:) And that moment will never come if I don't get any
> help. I thought that this list is the right place to ask for help.
> 
>> --
>> Regards,
>> ~Sid~
> 
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecar...@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ

Hi,

Have a close look at the syntax of the make source ; it's really easy to
do.
I'm an absolute kernel newbie and I've added on my SAM9 board before to
menuconfig.
Just copy and paste one of the menu items and edit it to your own liking,
voila, done.
You'll end up with a single bool define, flagging your choice - that's the
one you have to pick up on in the kernel source.

HTH 
Best regards,
Kris


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Endless loop into check_tty_count()

2009-07-27 Thread Stephane Lambert

Hello all,
I'm porting uclinux 2.6.19 on a new architecture (Cortus ASP3) and I have
a problem with the function 'check_tty_count()'  (drivers/char/tty_io.c)
On my system, it creates an endless loop in

   list_for_each(p, &tty->tty_files) {
   count++;
   }

I think something in not correclty initialized in my uart driver but I 
know what.
However, if I undef CHECK_TTY_COUNT, the kernel reach the point where it 
shows the prompt.

(see below).

Have you got an idea how I can fix this problem?
Thanks in advance for your help.


Linux version 2.6.19-uc1 (gcc version 4.1.2 20080812 (Cortus release))
On node 0 totalpages: 1940
 DMA zone: 0 pages used for memmap
 Normal zone: 15 pages used for memmap
 Normal zone: 1925 pages, LIFO batch:0
Built 1 zonelists.  Total pages: 1925
Kernel command line:
PID hash table entries: 32 (order: 5, 128 bytes)
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mem_init: start=74000, end=794808
Memory available: 1824k/7208k RAM, (619k kernel code, 78k data)
Calibrating delay loop... 0.81 BogoMIPS (lpj=4096)
Mount-cache hash table entries: 512
io scheduler noop registered
io scheduler cfq registered (default)
APS3 Processor Serial Driver v1.0 (c) 2009 Cortus
ttyS0 at MMIO 0x40001000 (irq = 5) is a aps3_uart
uclinux[mtd]: RAM probe address=0x14000 size=0x26000
Creating 1 MTD partitions on "RAM":
0x-0x00026000 : "ROMfs"
uclinux[mtd]: set ROMfs to be root filesystem
VFS: Mounted root (romfs filesystem) readonly.
Freeing unused kernel memory: 2k freed
Shell invoked to run file: /etc/rc
Command: hostname Cortus-aps3
Command: mount -t proc proc /proc
Command: cat /etc/motd
Welcome to
  _  _
/  __| ||_|
   _   _| |  | | _   _   _  _  _

  | | | | |  | || |  _ \| | | |\ \/ /
  | |_| | |__| || | | | | |_| |/\
  |  ___\|_||_|_| |_|\|\_/\_/
  | |
  |_|

For further information check:
http://www.uclinux.org/

Execution Finished, Exiting

Sash command shell (version 1.1.1)
/>


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



patching adventure

2009-07-27 Thread Simon
Hi there,
  i've been trying to patch the kernel to try and get it in top
shape... but i discovered a few difficulties...  my post talks about
unionfs, but i'm really using it as an example.

Every file referenced in this post are the ones found on the
kernel.org site below:
  http://kernel.org/pub/linux/kernel/v2.6/
And unionfs patches are found on this page:
  http://www.filesystems.org/project-unionfs.html

First, i tried with the 2.6.29 series and at the time of trying (and
of writing this) the subminor version was up to 6 (2.6.29.6).
Second, i want to add unionfs support to the vanilla sources, for
kernel 2.6.29.  The available patch for unionfs is 2.5.2 for kernel
2.6.29.4.

Ok, now here's what i thought i had to do:
on top of: linux-2.6.29.tar.bz2
 1) patch with: patch-2.6.29.1.bz2
 2) patch with: patch-2.6.29.2.bz2
 3) patch with: patch-2.6.29.3.bz2
 4) patch with: patch-2.6.29.4.bz2
 5) patch with: unionfs-2.5.2_for_2.6.29.4.diff.gz
 6) patch with: patch-2.6.29.5.bz2
 7) patch with: patch-2.6.29.6.bz2

It made sense to me that they were all differential patches, but it
appears they are cummulative since 2.6.29 (ie to get 2.6.29.6, you
just use the 2.6.29.6 patch straight)... so during my trial, patch
said some stuff is already patched, and the more i go down this list
of patch the longer the 'already patched' messages.

I guess the correct way would have been to 1) just patch with 2.6.29.4
straight, then 2) unionfs then 3) what?
 a) Make patch of the patch-2.6.29.6.bz2 from patch-2.6.29.4.bz2, and
patch with this?  (sounds hacky but fast)
 b) Or should i copy/snapshot the kernel sources when it is 2.6.29.4,
then apply the other kernel patches up to 2.6.29.6, finally make my
own patch from 26.29.4 to 2.6.29.6, then using the 2.6.29.4 patched
source snapshot, patch with unionfs and then my 29.4_to_29.6 patch?
(this one sounds safer but more trouble)
 c) At last, could git be of any help on this?  I'm looking to work
only with stable code...

I'm asking because i feel there must be a "better practice" for this
kind of manipulation... and well, it's a good thing i was just playing
with unionfs and not a few more experimental drivers all at the same
time!

Thanks for reading/helping out!
  Simon

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Integrating kernel module code into kernel source tree.

2009-07-27 Thread Greg KH
On Mon, Jul 27, 2009 at 04:19:43PM +0400, Denis Borisevich wrote:
> 2009/7/27 Belisko Marek :
> > Hi,
> >
> > On Mon, Jul 27, 2009 at 1:13 PM, Denis Borisevich 
> > wrote:
> >> Hi!
> >> I have driver for PCI serial board, it compiles as a module, loads and
> >> works fine. Now it exists as a several files outside the kernel source
> >> tree. I want to integrate this code within the kernel source tree: I
> >> want it to exist as some files inside the kernel source, I want to be
> >> able to select this driver in kernel config and so on. So can any one
> >> provide me any instructions to achieve this task (I hope it is not
> >> very difficult) or point to any online documents, etc.?
> > Just read:
> > http://lxr.linux.no/linux+v2.6.30/Documentation/SubmittingDrivers
> > or you can post you files (patches) to Greg K-H (g...@kroah.com) and
> > he will put it to
> > staging directory in linux-next tree. Your driver will be after some
> > cleanups and rewiews
> > put to main kernel tree hopefully.
> 
> Thank you for reply but I think you got me wrong. I don't want to
> submit my driver to mainline kernel. I just want to integrate it with
> my local kernel source tree for personal use.

Then add a few lines to the specific Kconfig file where your driver
lives in the kernel tree, adding the config option for the driver, and a
single line to the relevant Makefile adding the driver to the build.

For example, if your driver is called foo, you could add this to the
Kconfig file:

config FOO
tristate "Foo device support"
depends on PCI
help
  This driver support the foo device

and then in the Makefile add the line:
$(CONFIG_FOO)   += foo.o


Have you tried that?  Do you have a pointer to your driver / patch?

thanks,

greg k-h

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



DMA Memory SIZE

2009-07-27 Thread Deepak Vishwakarma
Hi guyz,

Need your favour!

How is DMA memory is allocated in kernel space? And how can it be increased?

Regards,
Deepak


Re: Integrating kernel module code into kernel source tree.

2009-07-27 Thread Denis Borisevich
2009/7/27 Siddu :
>
>
> On Mon, Jul 27, 2009 at 6:22 PM, Denis Borisevich 
> wrote:
>> >> Thank you for reply but I think you got me wrong. I don't want to
>> >> submit my driver to mainline kernel. I just want to integrate it with
>> >> my local kernel source tree for personal use.
>
> I am not sure about what the steps are to integrate with kernel source tree
> to make it appear in the menuconfig (if thats what you are looking for ) but
> am not sure the  guys out there will be willing to help you unless you want
> to submit it to mainline kernel tree :)

Let's say this driver is not ready for inclusion to the mainline
kernel tree yet:) And that moment will never come if I don't get any
help. I thought that this list is the right place to ask for help.

> --
> Regards,
> ~Sid~

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Integrating kernel module code into kernel source tree.

2009-07-27 Thread Denis Borisevich
2009/7/27 Bob Beers :
> On Mon, Jul 27, 2009 at 7:13 AM, Denis Borisevich wrote:
>> Hi!
>> I have driver for PCI serial board, it compiles as a module, loads and
>> works fine. Now it exists as a several files outside the kernel source
>> tree. I want to integrate this code within the kernel source tree: I
>> want it to exist as some files inside the kernel source, I want to be
>> able to select this driver in kernel config and so on. So can any one
>> provide me any instructions to achieve this task (I hope it is not
>> very difficult) or point to any online documents, etc.?
>
> You will need a Makefile and Kconfig like any other kernel module.
> Look at the source for examples.  Then put your source files,
>  including the Makefile and Kconfig in a relevant (new) subdirectory
>  and then try make xconfig.  Rinse. repeat.
>
> Maybe /Documentation/kbuild is a good place to start reading?

Seems this is what I need. Thank you for the clue!

--
Denis

>
> HTH,
> -Bob
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Integrating kernel module code into kernel source tree.

2009-07-27 Thread Siddu
On Mon, Jul 27, 2009 at 6:22 PM, Denis Borisevich wrote:

> 2009/7/27 SandeepKsinha :
> > On Mon, Jul 27, 2009 at 5:49 PM, Denis Borisevich
> wrote:
> >> 2009/7/27 Belisko Marek :
> >>> Hi,
> >>>
> >>> On Mon, Jul 27, 2009 at 1:13 PM, Denis Borisevich
> wrote:
>  Hi!
>  I have driver for PCI serial board, it compiles as a module, loads and
>  works fine. Now it exists as a several files outside the kernel source
>  tree. I want to integrate this code within the kernel source tree: I
>  want it to exist as some files inside the kernel source, I want to be
>  able to select this driver in kernel config and so on. So can any one
>  provide me any instructions to achieve this task (I hope it is not
>  very difficult) or point to any online documents, etc.?
> >>> Just read:
> >>> http://lxr.linux.no/linux+v2.6.30/Documentation/SubmittingDrivers
> >>> or you can post you files (patches) to Greg K-H (g...@kroah.com) and
> >>> he will put it to
> >>> staging directory in linux-next tree. Your driver will be after some
> >>> cleanups and rewiews
> >>> put to main kernel tree hopefully.
> >>
> >> Thank you for reply but I think you got me wrong. I don't want to
> >> submit my driver to mainline kernel. I just want to integrate it with
> >> my local kernel source tree for personal use.
>
I am not sure about what the steps are to integrate with kernel source tree
to make it appear in the menuconfig (if thats what you are looking for ) but
am not sure the  guys out there will be willing to help you unless you want
to submit it to mainline kernel tree :)

>
> >>
> >
> >
> > try insmod.
>
> Insmod only inserts the compiled module or have I missed something?
>
> >
> > Regards,
> > Sandeep.
> >
> >
> >
> >
> >
> >
> > “To learn is to change. Education is a process that changes the learner.”
> >
> >
> >
> >>> good luck,
> >>>
> >>> Marek
> >>>
> >>> --
> >>> as simple as primitive as possible
> >>> -
> >>> Marek Belisko - OPEN-NANDRA
> >>>
> >>> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> >>> Tel: +421 915 052 184
> >>> skype: marekwhite
> >>> icq: 290551086
> >>> web: http://open-nandra.com
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecar...@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>


-- 
Regards,
~Sid~


Re: Integrating kernel module code into kernel source tree.

2009-07-27 Thread SandeepKsinha
On Mon, Jul 27, 2009 at 5:49 PM, Denis Borisevich wrote:
> 2009/7/27 Belisko Marek :
>> Hi,
>>
>> On Mon, Jul 27, 2009 at 1:13 PM, Denis Borisevich wrote:
>>> Hi!
>>> I have driver for PCI serial board, it compiles as a module, loads and
>>> works fine. Now it exists as a several files outside the kernel source
>>> tree. I want to integrate this code within the kernel source tree: I
>>> want it to exist as some files inside the kernel source, I want to be
>>> able to select this driver in kernel config and so on. So can any one
>>> provide me any instructions to achieve this task (I hope it is not
>>> very difficult) or point to any online documents, etc.?
>> Just read:
>> http://lxr.linux.no/linux+v2.6.30/Documentation/SubmittingDrivers
>> or you can post you files (patches) to Greg K-H (g...@kroah.com) and
>> he will put it to
>> staging directory in linux-next tree. Your driver will be after some
>> cleanups and rewiews
>> put to main kernel tree hopefully.
>
> Thank you for reply but I think you got me wrong. I don't want to
> submit my driver to mainline kernel. I just want to integrate it with
> my local kernel source tree for personal use.
>


try insmod.


Regards,
Sandeep.






“To learn is to change. Education is a process that changes the learner.”



>> good luck,
>>
>> Marek
>>
>> --
>> as simple as primitive as possible
>> -
>> Marek Belisko - OPEN-NANDRA
>>
>> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
>> Tel: +421 915 052 184
>> skype: marekwhite
>> icq: 290551086
>> web: http://open-nandra.com
>>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecar...@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Integrating kernel module code into kernel source tree.

2009-07-27 Thread Denis Borisevich
2009/7/27 SandeepKsinha :
> On Mon, Jul 27, 2009 at 5:49 PM, Denis Borisevich wrote:
>> 2009/7/27 Belisko Marek :
>>> Hi,
>>>
>>> On Mon, Jul 27, 2009 at 1:13 PM, Denis Borisevich 
>>> wrote:
 Hi!
 I have driver for PCI serial board, it compiles as a module, loads and
 works fine. Now it exists as a several files outside the kernel source
 tree. I want to integrate this code within the kernel source tree: I
 want it to exist as some files inside the kernel source, I want to be
 able to select this driver in kernel config and so on. So can any one
 provide me any instructions to achieve this task (I hope it is not
 very difficult) or point to any online documents, etc.?
>>> Just read:
>>> http://lxr.linux.no/linux+v2.6.30/Documentation/SubmittingDrivers
>>> or you can post you files (patches) to Greg K-H (g...@kroah.com) and
>>> he will put it to
>>> staging directory in linux-next tree. Your driver will be after some
>>> cleanups and rewiews
>>> put to main kernel tree hopefully.
>>
>> Thank you for reply but I think you got me wrong. I don't want to
>> submit my driver to mainline kernel. I just want to integrate it with
>> my local kernel source tree for personal use.
>>
>
>
> try insmod.

Insmod only inserts the compiled module or have I missed something?

>
> Regards,
> Sandeep.
>
>
>
>
>
>
> “To learn is to change. Education is a process that changes the learner.”
>
>
>
>>> good luck,
>>>
>>> Marek
>>>
>>> --
>>> as simple as primitive as possible
>>> -
>>> Marek Belisko - OPEN-NANDRA
>>>
>>> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
>>> Tel: +421 915 052 184
>>> skype: marekwhite
>>> icq: 290551086
>>> web: http://open-nandra.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Integrating kernel module code into kernel source tree.

2009-07-27 Thread Belisko Marek
Hi,

On Mon, Jul 27, 2009 at 1:13 PM, Denis Borisevich wrote:
> Hi!
> I have driver for PCI serial board, it compiles as a module, loads and
> works fine. Now it exists as a several files outside the kernel source
> tree. I want to integrate this code within the kernel source tree: I
> want it to exist as some files inside the kernel source, I want to be
> able to select this driver in kernel config and so on. So can any one
> provide me any instructions to achieve this task (I hope it is not
> very difficult) or point to any online documents, etc.?
Just read:
http://lxr.linux.no/linux+v2.6.30/Documentation/SubmittingDrivers
or you can post you files (patches) to Greg K-H (g...@kroah.com) and
he will put it to
staging directory in linux-next tree. Your driver will be after some
cleanups and rewiews
put to main kernel tree hopefully.
>
> Thanks in advance.
>
> --
> Denis
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecar...@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

good luck,

Marek

-- 
as simple as primitive as possible
-
Marek Belisko - OPEN-NANDRA

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Integrating kernel module code into kernel source tree.

2009-07-27 Thread Denis Borisevich
2009/7/27 Belisko Marek :
> Hi,
>
> On Mon, Jul 27, 2009 at 1:13 PM, Denis Borisevich wrote:
>> Hi!
>> I have driver for PCI serial board, it compiles as a module, loads and
>> works fine. Now it exists as a several files outside the kernel source
>> tree. I want to integrate this code within the kernel source tree: I
>> want it to exist as some files inside the kernel source, I want to be
>> able to select this driver in kernel config and so on. So can any one
>> provide me any instructions to achieve this task (I hope it is not
>> very difficult) or point to any online documents, etc.?
> Just read:
> http://lxr.linux.no/linux+v2.6.30/Documentation/SubmittingDrivers
> or you can post you files (patches) to Greg K-H (g...@kroah.com) and
> he will put it to
> staging directory in linux-next tree. Your driver will be after some
> cleanups and rewiews
> put to main kernel tree hopefully.

Thank you for reply but I think you got me wrong. I don't want to
submit my driver to mainline kernel. I just want to integrate it with
my local kernel source tree for personal use.

> good luck,
>
> Marek
>
> --
> as simple as primitive as possible
> -
> Marek Belisko - OPEN-NANDRA
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> icq: 290551086
> web: http://open-nandra.com
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Accessing File system directories

2009-07-27 Thread Manish Katiyar
On Mon, Jul 27, 2009 at 2:49 PM, Dan Danillo wrote:
>
> Hello,
>
>
>
>>
>> Hi Dan,
>>
>>
>> On Mon, Jul 27, 2009 at 11:54 AM, Dan Danillowrote:
>> > Hello,
>> >
>> > I'm trying to find out how to browse the file system from the linux kernel.
>>
>> What exactly do you mean by that.
>> Do you mean that you want to traverse the namespace being inside the
>> kernel through some kernel module or something?
>
> Yes, I want to write a module which gets as parameter the path to a directory.
> In the module I want to be able to find all files and subfolders in that 
> directory.
>
>> > Especially the directory content is interesting to me.
>> > Can anyone give me a hint? Are there even some libc like functions to do
>> > that ?
>> >
>>
>> The libc functions like these map to the kernel code eventually, so
>> mostly there will be one.
>>
>> > So far I have found the filp_open, vfs_read and vfs_readdir functions.
>> >
>> > However, the vfs_readdir function expects a function pointer to somehow
>> > format the directory information.
>> > My assumption is that this is the wrong function.
>> > So I guess that's not the function I'm after.
>> >
>>
>> Do you want it at vfs layer 
>> or at the file system level
>
> Mh, I don't really have a clue. What are the differences?
> I'm not  interested in all the inode information or some funky stuff.
> I just need to know if it is a file or directory, filesize and where to find 
> the data of the file.


Hi,

Have a look at vfs_path_lookup() . In particular probably you want path_walk().

Thanks -
Manish

>
>> What all information do you have before you could call this function
>> which will traverse the file system hierarchy for you?
>
> Just the path to the directory
>
> Dan
>
>
>
>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecar...@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>



-- 
Thanks -
Manish

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Accessing File system directories

2009-07-27 Thread Martyn Welch

Dan Danillo wrote:

 Hello,

 I'm trying to find out how to browse the file system from the linux
 kernel. Especially the directory content is interesting to me. Can
 anyone give me a hint? Are there even some libc like functions to do
 that ?


You might want to read this:

http://kernelnewbies.org/FAQ/WhyWritingFilesFromKernelIsBad

Martyn

--
Martyn Welch MEng MPhil MIET (Principal Software Engineer)   
T:+44(0)1327322748

GE Fanuc Intelligent Platforms Ltd,|Registered in England and Wales
Tove Valley Business Park, Towcester,  |(3828642) at 100 Barbirolli 
Square,
Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB  VAT:GB 
927559189


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Ethernet congestion management

2009-07-27 Thread Mandeep Sandhu
2009/7/27 Łukasz Jachymczyk :
> Michael Blizek wrote:
>
 1) Congestion handling is usually done by the sender and not the
 receiver.
>>>
>>> I'm not sure about this. After all I can send as much data over
>>> network as I can and the receiver might have not enough resources to
>>> handle it. Isn't receiver the one that should worry about
>>> congestion?
>
> I might not say it clearly, but my driver is sending only raw Ethernet
> frames. No TCP/IP. As you can see, it's very basic communication. Yet I
> would be happy to know when device driver is dropping packets.

Wouldn't the MAC controller take care of it?
http://en.wikipedia.org/wiki/Ethernet_flow_control

HTH,
-mandeep

>
> As I said, there used to be queue's cng_level struct member in netif_rx. It
> contained information about ingress traffic queue congestion level. But now
> it's gone and I can't figure out what else to use.
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecar...@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Accessing File system directories

2009-07-27 Thread Dan Danillo

> Dan Danillo wrote:
> >  Hello,
> > 
> >  I'm trying to find out how to browse the file system from the linux
> >  kernel. Especially the directory content is interesting to me. Can
> >  anyone give me a hint? Are there even some libc like functions to do
> >  that ?
> 
> You might want to read this:
> 
> http://kernelnewbies.org/FAQ/WhyWritingFilesFromKernelIsBad

OK, I don't understand it all, but I get the meaning that I should not access 
the file system from the kernel.
Then I have no idea how to solve my problem.

Maybe you can propose something else.
Please have a look here:
http://groups.google.com/group/comp.os.linux.embedded/browse_thread/thread/169cc7835af4fd7f/784b3081b0d12072

> Martyn
> 

Dan



  


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Integrating kernel module code into kernel source tree.

2009-07-27 Thread Denis Borisevich
Hi!
I have driver for PCI serial board, it compiles as a module, loads and
works fine. Now it exists as a several files outside the kernel source
tree. I want to integrate this code within the kernel source tree: I
want it to exist as some files inside the kernel source, I want to be
able to select this driver in kernel config and so on. So can any one
provide me any instructions to achieve this task (I hope it is not
very difficult) or point to any online documents, etc.?

Thanks in advance.

--
Denis

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Accessing File system directories

2009-07-27 Thread Dan Danillo

Hello,



> 
> Hi Dan,
> 
> 
> On Mon, Jul 27, 2009 at 11:54 AM, Dan Danillowrote:
> > Hello,
> >
> > I'm trying to find out how to browse the file system from the linux kernel.
> 
> What exactly do you mean by that.
> Do you mean that you want to traverse the namespace being inside the
> kernel through some kernel module or something?

Yes, I want to write a module which gets as parameter the path to a directory.
In the module I want to be able to find all files and subfolders in that 
directory.

> > Especially the directory content is interesting to me.
> > Can anyone give me a hint? Are there even some libc like functions to do
> > that ?
> >
> 
> The libc functions like these map to the kernel code eventually, so
> mostly there will be one.
> 
> > So far I have found the filp_open, vfs_read and vfs_readdir functions.
> >
> > However, the vfs_readdir function expects a function pointer to somehow
> > format the directory information.
> > My assumption is that this is the wrong function.
> > So I guess that's not the function I'm after.
> >
> 
> Do you want it at vfs layer 
> or at the file system level

Mh, I don't really have a clue. What are the differences?
I'm not  interested in all the inode information or some funky stuff. 
I just need to know if it is a file or directory, filesize and where to find 
the data of the file.

> What all information do you have before you could call this function
> which will traverse the file system hierarchy for you?

Just the path to the directory

Dan



  

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Ethernet congestion management

2009-07-27 Thread Łukasz Jachymczyk

Michael Blizek wrote:


1) Congestion handling is usually done by the sender and not the receiver.

I'm not sure about this. After all I can send as much data over
network as I can and the receiver might have not enough resources to
handle it. Isn't receiver the one that should worry about
congestion?


I might not say it clearly, but my driver is sending only raw Ethernet 
frames. No TCP/IP. As you can see, it's very basic communication. Yet I 
would be happy to know when device driver is dropping packets.


As I said, there used to be queue's cng_level struct member in netif_rx. 
It contained information about ingress traffic queue congestion level. 
But now it's gone and I can't figure out what else to use.


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Help in learning real PCI device driver

2009-07-27 Thread Martyn Welch

Vipul Jain wrote:

Hi All,

   I am a newbie in linux device driver and have written couple of 
char device driver using kmalloc (memory as device)
   I would like to write an Actual/Real PCI device driver and was 
wondering if any one could recommend any hardware
   that has spec and hardware openly available for such development 
execrise and is not complicated to implement.

I'd suggest having a look here:

http://www.linuxdriverproject.org/twiki/bin/view/Main/DriversNeeded

If you haven't written a driver, you may have more luck starting with an 
existing code base that needs some work, rather than starting a new driver:


http://www.linuxdriverproject.org/twiki/bin/view/Main/OutOfTreeDrivers

Or even helping out with one of the driver that is already in the 
"staging" portion of the kernel tree:


http://www.linuxdriverproject.org/twiki/bin/view/Main/OutOfTreeDrivers

Hope that helps,

Martyn

--
Martyn Welch MEng MPhil MIET (Principal Software Engineer)   T:+44(0)1327322748
GE Fanuc Intelligent Platforms Ltd,|Registered in England and Wales
Tove Valley Business Park, Towcester,  |(3828642) at 100 Barbirolli Square,
Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB  VAT:GB 927559189

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Accessing File system directories

2009-07-27 Thread SandeepKsinha
Hi Dan,


On Mon, Jul 27, 2009 at 11:54 AM, Dan Danillo wrote:
> Hello,
>
> I'm trying to find out how to browse the file system from the linux kernel.

What exactly do you mean by that.
Do you mean that you want to traverse the namespace being inside the
kernel through some kernel module or something?

> Especially the directory content is interesting to me.
> Can anyone give me a hint? Are there even some libc like functions to do
> that ?
>

The libc functions like these map to the kernel code eventually, so
mostly there will be one.

> So far I have found the filp_open, vfs_read and vfs_readdir functions.
>
> However, the vfs_readdir function expects a function pointer to somehow
> format the directory information.
> My assumption is that this is the wrong function.
> So I guess that's not the function I'm after.
>

Do you want it at vfs layer 
or at the file system level

What all information do you have before you could call this function
which will traverse the file system hierarchy for you?

> Thanks,
> Dan
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ