Pushing Samba functions into the kernel

Richard Sharpe rsharpe at richardsharpe.com
Thu Feb 13 19:41:35 GMT 2003


Hi,

I wanted to start a discussion on the following:

    Implementing some SMB functions in the Kernel, within a Samba base,
    or,
    Bending and twisting Samba out of shape.

There are a number of reasons for wanting to use the Samba code base, but 
at the same time, extend it to allow more functions to be pushed into the 
kernel.

Some of the things I want to do are:

1. I would like to take advantage of the header splitting capabilities
   offered by the raft of current and future Theory of Everything chips, 
   as well as allow zero copy and page flipping code to be useful, and
   to implement recvfile (the analog of sendfile).

   Each of these seems to require a slightly different approach to 
   receiving SMBs to the current approach. One that I am thinking of
   is to have a syscall that receives an SMB or generates a time out
   or return a socket error in the event of an error.

   The return from the syscall would be a complete SMB, possibly with the
   NetBIOS header in a separate buffer, and maybe more.

2. The current sendfile code is great, and is implemented in a better way
   that I originally implemented it where I currently work. However, I
   believe that there are more cases where I can use sendfile than
   what Samba currently knows about. It would be useful to have some
   infrastructure in Samba for doing this.

3. I would like to move down a path of moving simple functions into the
   kernel, and this is, in some ways, an extension of point 1 above.
   It would be useful if the system call that gets an SMB can also 
   implement some subset of SMB in the kernel (although I will want some
   way to indicate that some FIDs not have this treatment, for example
   those associated with RPCs).

In essence, what I want to raise a discussion on is ways to have Samba 
enable these things. It would be good if it were easy to splice our 
changes into the code base, and any fixes we develop for the GPLd code can 
be easily extracted and returned to the code base.
 
Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com



More information about the samba-technical mailing list