[LWN Logo]

Subject: ANNOUNCE: bufflink patch for 2.2 (fast light kernel/user comms)
To:     linux-kernel@vger.rutgers.edu
Date:   Wed, 20 Oct 1999 15:21:09 +0100 (BST)
From:   Malcolm Beattie <mbeattie@sable.ox.ac.uk>

Bufflink provides a quick and easy way for kernel code to create a
ring buffer and write to it from any context (process, bottom half or
interrupt). A userland process can access it via a character device
which behaves mostly like a FIFO.

The tar ball contains a patch against 2.2.12 which includes creation
of a documentation file /usr/src/linux/Documentation/bufflink.txt and
an example test kernel module and associated little userland program.

Bufflink is intended as a faster, lighter weight kernel/userland
communication system than netlink but it merely sets an overflow
flag rather than queuing up data like netlink can do. It is the basis
of at least a couple of other things that I will release in due
course (one for block request logging which combines with some
userland programs to allow hot migration of live block devices and
one which provides system call auditing for Linux).

I've lightly tested bufflink but it's still experimental and could do
all the usual horrible things that kernel stuff can, nasal daemons
excepted. Get it from
    ftp://ftp.ox.ac.uk/pub/linux/bufflink-0.3.tar.gz

For basic use, you do something like:
    #include <linux/bufflink.h>
    ...
    struct bufflink *bl;
    /* Use auto-created buffer of default size and auto-assign minor */
    err = bufflink_create(&bl, 0, 0, -1);
    ...
    /* Fast append of data to ring buffer (ok even from interrupt or bh) */
    bufflink_append(bl, data, size);

Comments and bug reports/fixes welcome.

--Malcolm

-- 
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Unix Systems Programmer
Oxford University Computing Services

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/