Re: module stacking.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> i am not talking about any specific type of device driver.
>
> What i want is a generic framework which can help me implementing any driver
> as a stack of modules (each module implementing a subset of complete
> functionality of driver), and ablility to insert and remove modules without
> doing any code change in rest of modules.
infact all modules in kernel follow a stacking method.
e.g the module object contains struct module_ref linked list of deps
and refs AFAIR.
These are the linked which keep a list of the modules being referenced
by current module and no of modules referencing current modules.CMIIW
somewhere.
This gives you a modular stack structure of modules in the kernel.So
this is simply exporting symbols and using it later on, only if you
know which exported functions you may be needing later, with an
obvious limitation that you ll have to use only the exported methods
for yur future use in case you dont want to change your existing
modules.
Hope this helps a little though.
Good luck
pradeep :)
>
>
> pankaj
>
>
> On 4/11/06, Ming Zhang <mingz@xxxxxxxxxxx> wrote:
> > if u are talking about block device. then go and check device mapper.
> >
> > ming
> >
> > On Tue, 2006-04-11 at 14:54 +0530, Pankaj Chauhan wrote:
> > >
> > > hi all,
> > >
> > > Is there any framework available in linux kernel
> > > (2.6.x) to stack the modules (or device drivers to be
> > > specific). what i want is NETFILTER (which is
> > > available for network stack) kind of frame work for
> > > device drivers.
> > >
> > > Lets say i have a driver d1 for device D, d1
> > > implements very basic funtionality like configuration,
> > > read and write to device D. now i want some more
> > > complex funtions such as compression or encryption of
> > > data that is written to D, so i want that i write a
> > > driver d2 which sits on top of d1 and implement new
> > > funtionality. so we have a picture like
> > >
> > > d2 (compression / encryption)
> > > |
> > > d1 (basic functions)
> > > |
> > > D (device)
> > >
> > > I understand that it is possible to implement this
> > > stacking by code changes in d1 and d2, but tomorrow if
> > > i want to insert another funtionality implemented as
> > > d3 which should go between d2 and d1, i do'nt want to
> > > do any code changes to d1 and d2, i want that there
> > > should be a framework which allows me to implement
> > > this stacking without any code change in my driver.
> > >
> > > Thanks in advance.
> > >
> > > Pankaj Chauhan
> > >
> > >
> > >
> >
> >
>
>
>
> --
> Vision without an action is merely a dream, action without vision is wastage
> of time, vision and action together can change the world..


--
play the game

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux