All of lore.kernel.org
 help / color / mirror / Atom feed
* tx path circular buffer
@ 2017-06-07  6:03 Tobin C. Harding
  2017-06-07  8:48 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Tobin C. Harding @ 2017-06-07  6:03 UTC (permalink / raw)
  To: kernelnewbies

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.

I have tried to read the source for ath6kl, brcmfmac without
success.

I have read Documentation/circular-buffers.txt and this seems like the
solution however grep'ing drivers/net hints that this is not that
common a way to solve this problem. Also I'm getting in knots with
atomic_t types when copying the text document.

Before I bore you with all my non-working code, does any one please
know, off the top of their heads, a driver with simple-ish / nice clean
implementation that I can learn from?

thanks,
Tobin.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* tx path circular buffer
  2017-06-07  6:03 tx path circular buffer Tobin C. Harding
@ 2017-06-07  8:48 ` Greg KH
  2017-06-08  6:34   ` Tobin C. Harding
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2017-06-07  8:48 UTC (permalink / raw)
  To: kernelnewbies

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* tx path circular buffer
  2017-06-07  8:48 ` Greg KH
@ 2017-06-08  6:34   ` Tobin C. Harding
  0 siblings, 0 replies; 3+ messages in thread
From: Tobin C. Harding @ 2017-06-08  6:34 UTC (permalink / raw)
  To: kernelnewbies

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-08  6:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-07  6:03 tx path circular buffer Tobin C. Harding
2017-06-07  8:48 ` Greg KH
2017-06-08  6:34   ` Tobin C. Harding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.