devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Westergreen, Dalon" <dalon.westergreen@intel.com>
To: "richardcochran@gmail.com" <richardcochran@gmail.com>
Cc: "Ong, Hean Loong" <hean.loong.ong@intel.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"thor.thayer@linux.intel.com" <thor.thayer@linux.intel.com>,
	"dinguyen@kernel.org" <dinguyen@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"vbridger@opensource.altera.com" <vbridger@opensource.altera.com>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [PATCH v2 net-next 08/10] net: eth: altera: add support for ptp and timestamping
Date: Wed, 19 Dec 2018 19:27:53 +0000	[thread overview]
Message-ID: <b7684912d093c7fc94448487e670646e694b17d3.camel@intel.com> (raw)
In-Reply-To: <20181219042757.vhetz2zsrpsz6p3u@localhost>

[-- Attachment #1: Type: text/plain, Size: 2473 bytes --]

Richard,

On Tue, 2018-12-18 at 20:27 -0800, Richard Cochran wrote:
> On Thu, Dec 13, 2018 at 09:52:50AM -0800, dwesterg@gmail.com wrote:
> > Changes from V1:
> >  -> Remove debugfs for tod manipulation
> >  -> Reorder variable declarations in functions to order
> >     by length of declaration, largest to smallest
> >  -> Rename altera_ptp to intel_fpga_tod
> >  -> Rename functions in intel_fpga_tod so that they are not
> >     generic
> >  -> Use imply instead of select in Kconfig
> >  -> Re-write adjust time function to remove while loop with
> >     64 bit divide.
> 
> Overall this is looking better.  A few more comments follow...

Thanks, all of your comments will be included in a v3 patch.

--dalon

> 
> > +static int tse_get_ts_info(struct net_device *dev,
> > +			   struct ethtool_ts_info *info)
> > +{
> > +	struct altera_tse_private *priv = netdev_priv(dev);
> > +
> > +	if (priv->ptp_enable) {
> > +		if (priv->ptp_priv.ptp_clock)
> > +			info->phc_index =
> > +				ptp_clock_index(priv->ptp_priv.ptp_clock);
> 
> else
> info->phc_index = -1;
> 


> > +		info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
> > +					SOF_TIMESTAMPING_RX_HARDWARE |
> > +					SOF_TIMESTAMPING_RAW_HARDWARE;
> > +
> > +		info->tx_types = (1 << HWTSTAMP_TX_OFF) |
> > +						 (1 << HWTSTAMP_TX_ON);
> 
> This fits on one line ^^^
> 
> > +		info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
> > +						   (1 << HWTSTAMP_FILTER_ALL);
> 
> Funky indentation here.  One extra level is enough:
> 
> 		info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
> 			(1 << HWTSTAMP_FILTER_ALL);
> 
> > +		return 0;
> > +	} else {
> > +		return ethtool_op_get_ts_info(dev, info);
> > +	}
> > +}
> > +
> 
> ...
> 
> > @@ -609,7 +613,14 @@ static netdev_tx_t tse_start_xmit(struct sk_buff *skb,
> > struct net_device *dev)
> >  	if (ret)
> >  		goto out;
> >  
> > -	skb_tx_timestamp(skb);
> > +	/* Provide a hardware time stamp if requested.
> > +	 */
> > +	if (unlikely((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
> > +		     priv->hwts_tx_en))
> > +		/* declare that device is doing timestamping */
> 
> Please drop those two comments.  They are redundant because they only
> restate what the code does.
> 
> > +		skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
> > +	else
> > +		skb_tx_timestamp(skb);
> >  
> >  	priv->tx_prod++;
> >  	dev->stats.tx_bytes += skb->len;
> 
> Thanks,
> Richard

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3282 bytes --]

  reply	other threads:[~2018-12-19 19:27 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 [this message]
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
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=b7684912d093c7fc94448487e670646e694b17d3.camel@intel.com \
    --to=dalon.westergreen@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).