devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dalon L Westergreen <dalon.westergreen@linux.intel.com>
To: thor.thayer@linux.intel.com, netdev@vger.kernel.org,
	dinguyen@kernel.org, richardcochran@gmail.com,
	davem@davemloft.net, vbridger@opensource.altera.com,
	robh+dt@kernel.org, devicetree@vger.kernel.org,
	hean.loong.ong@intel.com
Subject: Re: [PATCH v2 net-next 09/10] net: eth: altera: add msgdma prefetcher
Date: Tue, 18 Dec 2018 09:00:24 -0800	[thread overview]
Message-ID: <26e08e796196eb846c62451e22d64edb860c818f.camel@linux.intel.com> (raw)
In-Reply-To: <bf6d5920-fa90-abd7-65a5-19d48b3e6a7e@linux.intel.com>

On Tue, 2018-12-18 at 10:33 -0600, Thor Thayer wrote:
> Hi Dalon,
> 
> On 12/13/18 11:52 AM, dwesterg@gmail.com wrote:
> > From: Dalon Westergreen <dalon.westergreen@intel.com>
> > 
> > Add support for the mSGDMA prefetcher.  The prefetcher adds support
> > for a linked list of descriptors in system memory.  The prefetcher
> > feeds these to the mSGDMA dispatcher.
> > 
> > The prefetcher is configured to poll for the next descriptor in the
> > list to be owned by hardware, then pass the descriptor to the
> > dispatcher.  It will then poll the next descriptor until it is
> > owned by hardware.
> > 
> > The dispatcher responses are written back to the appropriate
> > descriptor, and the owned by hardware bit is cleared.
> > 
> > The driver sets up a linked list twice the tx and rx ring sizes,
> > with the last descriptor pointing back to the first.  This ensures
> > that the ring of descriptors will always have inactive descriptors
> > preventing the prefetcher from looping over and reusing descriptors
> > inappropriately.  The prefetcher will continuously loop over these
> > descriptors.  The driver modifies descriptors as required to update
> > the skb address and length as well as the owned by hardware bit.
> > 
> > In addition to the above, the mSGDMA prefetcher can be used to
> > handle rx and tx timestamps coming from the ethernet ip.  These
> > can be included in the prefetcher response in the descriptor.
> > 
> > Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>
> > 
> > ---
> > Changes from v1:
> >   -> Alphabatize includes
> >   -> update xmit function to return type net_tx_t
> >   -> Cleanup msgdms descriptor ring by making is more apparent
> >      that the msgdma descriptor ring is 2 * ring_size
> > ---
> >   drivers/net/ethernet/altera/Makefile          |   2 +-
> >   .../altera/altera_msgdma_prefetcher.c         | 432 ++++++++++++++++++
> >   .../altera/altera_msgdma_prefetcher.h         |  30 ++
> >   .../altera/altera_msgdmahw_prefetcher.h       |  87 ++++
> >   drivers/net/ethernet/altera/altera_tse.h      |  14 +
> >   drivers/net/ethernet/altera/altera_tse_main.c |  51 +++
> >   6 files changed, 615 insertions(+), 1 deletion(-)
> >   create mode 100644 drivers/net/ethernet/altera/altera_msgdma_prefetcher.c
> >   create mode 100644 drivers/net/ethernet/altera/altera_msgdma_prefetcher.h
> >   create mode 100644
> > drivers/net/ethernet/altera/altera_msgdmahw_prefetcher.h
> > 
> > diff --git a/drivers/net/ethernet/altera/Makefile
> > b/drivers/net/ethernet/altera/Makefile
> > index 3e622b4c105a..f6627615c6c1 100644
> > --- a/drivers/net/ethernet/altera/Makefile
> > +++ b/drivers/net/ethernet/altera/Makefile
> > @@ -5,4 +5,4 @@
> >   obj-$(CONFIG_ALTERA_TSE) += altera_tse.o
> >   altera_tse-objs := altera_tse_main.o altera_tse_ethtool.o \
> >   		   altera_msgdma.o altera_sgdma.o altera_utils.o \
> > -		   intel_fpga_tod.o
> > +		   intel_fpga_tod.o altera_msgdma_prefetcher.o
> > diff --git a/drivers/net/ethernet/altera/altera_msgdma_prefetcher.c
> > b/drivers/net/ethernet/altera/altera_msgdma_prefetcher.c
> > new file mode 100644
> > index 000000000000..f50ea62f687d
> > --- /dev/null
> > +++ b/drivers/net/ethernet/altera/altera_msgdma_prefetcher.c
> > @@ -0,0 +1,432 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/* MSGDMA Prefetcher driver for Altera ethernet devices
> > + *
> > + * Copyright (C) 2018 Intel Corporation. All rights reserved.
> > + * Author(s):
> > + *   Dalon Westergreen <dalon.westergreen@intel.com>
> > + */
> > +
> > +#include <linux/list.h>
> > +#include <linux/netdevice.h>
> > +#include <linux/net_tstamp.h>
> > +#include "altera_tse.h"
> > +#include "altera_msgdma.h"
> > +#include "altera_msgdmahw.h"
> > +#include "altera_msgdma_prefetcher.h"
> > +#include "altera_msgdmahw_prefetcher.h"
> > +#include "altera_utils.h"
> > +
> Alphabetize includes. altera_tse.h can be just before altera_utils.h

snip...

> >   static const struct of_device_id altera_tse_ids[] = {
> > +	{ .compatible = "altr,tse-msgdma-2.0",
> > +		.data = &altera_dtype_prefetcher, },
> >   	{ .compatible = "altr,tse-msgdma-1.0", .data = &altera_dtype_msgdma, },
> >   	{ .compatible = "altr,tse-1.0", .data = &altera_dtype_sgdma, },
> >   	{ .compatible = "ALTR,tse-1.0", .data = &altera_dtype_sgdma, },
> > 
> Hmm. I'm not sure you sent the right version - this looks very similar 
> to v1.

Yes, something went wrong here.  I must have messed something up when playing
with git.

--dalon

  reply	other threads:[~2018-12-18 17:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 17:52 [PATCH v2 net-next 00/10] net: eth: altera: tse: Add PTP and mSGDMA prefetcher dwesterg
2018-12-13 17:52 ` [PATCH v2 net-next 01/10] net: eth: altera: tse_start_xmit ignores tx_buffer call response dwesterg
2018-12-18 15:32   ` Thor Thayer
2018-12-13 17:52 ` [PATCH v2 net-next 02/10] net: eth: altera: set rx and tx ring size before init_dma call dwesterg
2018-12-18 15:33   ` Thor Thayer
2018-12-13 17:52 ` [PATCH v2 net-next 03/10] net: eth: altera: fix altera_dmaops declaration dwesterg
2018-12-18 15:33   ` Thor Thayer
2018-12-13 17:52 ` [PATCH v2 net-next 04/10] net: eth: altera: add optional function to start tx dma dwesterg
2018-12-18 15:34   ` Thor Thayer
2018-12-13 17:52 ` [PATCH v2 net-next 05/10] net: eth: altera: Move common functions to altera_utils dwesterg
2018-12-18 15:37   ` Thor Thayer
2018-12-13 17:52 ` [PATCH v2 net-next 06/10] net: eth: altera: Add missing identifier names to function declarations dwesterg
2018-12-18 15:45   ` Thor Thayer
2018-12-18 15:52     ` Dalon L Westergreen
2018-12-13 17:52 ` [PATCH v2 net-next 07/10] net: eth: altera: change tx functions to type netdev_tx_t dwesterg
2018-12-18 15:48   ` Thor Thayer
2018-12-13 17:52 ` [PATCH v2 net-next 08/10] net: eth: altera: add support for ptp and timestamping dwesterg
2018-12-19  4:27   ` Richard Cochran
2018-12-19 19:27     ` Westergreen, Dalon
2018-12-13 17:52 ` [PATCH v2 net-next 09/10] net: eth: altera: add msgdma prefetcher dwesterg
2018-12-18 16:33   ` Thor Thayer
2018-12-18 17:00     ` Dalon L Westergreen [this message]
2018-12-13 17:52 ` [PATCH v2 net-next 10/10] net: eth: altera: update devicetree bindings documentation dwesterg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26e08e796196eb846c62451e22d64edb860c818f.camel@linux.intel.com \
    --to=dalon.westergreen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@kernel.org \
    --cc=hean.loong.ong@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=thor.thayer@linux.intel.com \
    --cc=vbridger@opensource.altera.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).