From mboxrd@z Thu Jan 1 00:00:00 1970 From: me@tobin.cc (Tobin C. Harding) Date: Thu, 8 Jun 2017 16:34:21 +1000 Subject: tx path circular buffer In-Reply-To: <20170607084833.GA13755@kroah.com> References: <20170607060333.GC2747@eros> <20170607084833.GA13755@kroah.com> Message-ID: <20170608063421.GH2747@eros> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, Jun 07, 2017 at 10:48:33AM +0200, Greg KH wrote: > On Wed, Jun 07, 2017 at 04:03:33PM +1000, Tobin C. Harding wrote: > > Hi, > > > > I am attempting to implement a circular buffer for the tx path of a > > networking driver. From my understanding this is something that is > > very common, yet I am struggling to find a clear way to do it. > > Have you looked at include/linux/kfifo.h? thanks Greg, I ended up using kfifo for the tx path and circ_buf for the rx path. Tobin.