<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/kfifo.h, branch ipvs/experimental</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=ipvs%2Fexperimental</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=ipvs%2Fexperimental'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2010-01-16T20:15:38Z</updated>
<entry>
<title>kfifo: document everywhere that size has to be power of two</title>
<updated>2010-01-16T20:15:38Z</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-16T01:01:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5dab600e6a153ceb64832f608069e6c08185411a'/>
<id>urn:sha1:5dab600e6a153ceb64832f608069e6c08185411a</id>
<content type='text'>
On my first try using them I missed that the fifos need to be power of
two, resulting in a runtime bug.  Document that requirement everywhere
(and fix one grammar bug)

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kfifo: add kfifo_initialized</title>
<updated>2010-01-16T20:15:38Z</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-16T01:01:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d994ffc247f7c4a48b848f10c4c01c9b06411ada'/>
<id>urn:sha1:d994ffc247f7c4a48b848f10c4c01c9b06411ada</id>
<content type='text'>
Simple inline that checks if kfifo_init() has been executed on a fifo.

This is useful for walking all per CPU fifos, when some of them might not
have been brought up yet.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kfifo: add kfifo_out_peek</title>
<updated>2010-01-16T20:15:38Z</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-16T01:01:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a5b9e2c1063046421ce01dcf5ddd7ec12567f3e1'/>
<id>urn:sha1:a5b9e2c1063046421ce01dcf5ddd7ec12567f3e1</id>
<content type='text'>
In some upcoming code it's useful to peek into a FIFO without permanentely
removing data.  This patch implements a new kfifo_out_peek() to do this.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kfifo: sanitize *_user error handling</title>
<updated>2010-01-16T20:15:38Z</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-16T01:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=64ce1037c5434b1d036cd99ecaee6e00496bc2e9'/>
<id>urn:sha1:64ce1037c5434b1d036cd99ecaee6e00496bc2e9</id>
<content type='text'>
Right now for kfifo_*_user it's not easily possible to distingush between
a user copy failing and the FIFO not containing enough data.  The problem
is that both conditions are multiplexed into the same return code.

Avoid this by moving the "copy length" into a separate output parameter
and only return 0/-EFAULT in the main return value.

I didn't fully adapt the weird "record" variants, those seem
to be unused anyways and were rather messy (should they be just removed?)

I would appreciate some double checking if I did all the conversions
correctly.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kfifo: use void * pointers for user buffers</title>
<updated>2010-01-16T20:15:38Z</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-16T01:01:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8ecc2951534af10e04ddb5e5ff5c6d217b79f5c2'/>
<id>urn:sha1:8ecc2951534af10e04ddb5e5ff5c6d217b79f5c2</id>
<content type='text'>
The pointers to user buffers are currently unsigned char *, which requires
a lot of casting in the caller for any non-char typed buffers.  Use void *
instead.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Walls &lt;awalls@radix.net&gt;
Cc: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kfifo: fix kfifo_out_locked race bug</title>
<updated>2010-01-16T20:15:37Z</updated>
<author>
<name>Stefani Seibold</name>
<email>stefani@seibold.net</email>
</author>
<published>2010-01-16T01:01:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7e105057a34c83cea542dacc55ff0528bce67afa'/>
<id>urn:sha1:7e105057a34c83cea542dacc55ff0528bce67afa</id>
<content type='text'>
Fix a wrong optimization in include/linux/kfifo.h which could cause a race
in kfifo_out_locked.

Signed-off-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Reported-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kfifo: Fix typo in comment</title>
<updated>2009-12-30T20:49:17Z</updated>
<author>
<name>Rolf Eike Beer</name>
<email>eike-kernel@sf-tec.de</email>
</author>
<published>2009-12-26T16:58:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ed656d8deccc5669afa33387568e7ec6f14e3e94'/>
<id>urn:sha1:ed656d8deccc5669afa33387568e7ec6f14e3e94</id>
<content type='text'>
It's DECLARE_KFIFO, not DECLARED_KFIFO.

Signed-off-by: Rolf Eike Beer &lt;eike-kernel@sf-tec.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kfifo: fix Error/broken kernel-doc notation</title>
<updated>2009-12-23T17:30:37Z</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2009-12-23T17:23:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9c717de946ed7f5782e6dffacf2d05859073058c'/>
<id>urn:sha1:9c717de946ed7f5782e6dffacf2d05859073058c</id>
<content type='text'>
Fix kernel-doc errors and warnings in new header file kfifo.h.
Don't use kernel-doc "/**" for internal functions whose comments
are not in kernel-doc format.

kernel-doc section header names (like "Note:") must be unique
per function.  Looks like I need to document that.

  Error(include/linux/kfifo.h:76): duplicate section name 'Note'
  Warning(include/linux/kfifo.h:88): Excess function parameter 'size' description in 'INIT_KFIFO'
  Error(include/linux/kfifo.h:101): duplicate section name 'Note'
  Warning(include/linux/kfifo.h:257): No description found for parameter 'fifo'
    (many of this last type, from internal functions)

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: Stefani Seibold &lt;stefani@seibold.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kfifo: add record handling functions</title>
<updated>2009-12-22T22:17:56Z</updated>
<author>
<name>Stefani Seibold</name>
<email>stefani@seibold.net</email>
</author>
<published>2009-12-21T22:37:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=86d4880313603810901f639ccb5c88ff13d4ad3c'/>
<id>urn:sha1:86d4880313603810901f639ccb5c88ff13d4ad3c</id>
<content type='text'>
Add kfifo_in_rec() - puts some record data into the FIFO
 Add kfifo_out_rec() - gets some record data from the FIFO
 Add kfifo_from_user_rec() - puts some data from user space into the FIFO
 Add kfifo_to_user_rec() - gets data from the FIFO and write it to user space
 Add kfifo_peek_rec() - gets the size of the next FIFO record field
 Add kfifo_skip_rec() - skip the next fifo out record
 Add kfifo_avail_rec() - determinate the number of bytes available in a record FIFO

Signed-off-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Acked-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
Acked-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kfifo: add kfifo_skip, kfifo_from_user and kfifo_to_user</title>
<updated>2009-12-22T22:17:56Z</updated>
<author>
<name>Stefani Seibold</name>
<email>stefani@seibold.net</email>
</author>
<published>2009-12-21T22:37:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a121f24accac1600bf5b6fb1e12eeabdfed7cb1a'/>
<id>urn:sha1:a121f24accac1600bf5b6fb1e12eeabdfed7cb1a</id>
<content type='text'>
Add kfifo_reset_out() for save lockless discard the fifo output
 Add kfifo_skip() to skip a number of output bytes
 Add kfifo_from_user() to copy user space data into the fifo
 Add kfifo_to_user() to copy fifo data to user space

Signed-off-by: Stefani Seibold &lt;stefani@seibold.net&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Acked-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
Acked-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
