All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] enetc: support PTP Sync packet one-step timestamping
@ 2021-03-26  8:35 Yangbo Lu
  2021-03-26  8:35 ` [PATCH 1/2] enetc: mark TX timestamp type per skb Yangbo Lu
  2021-03-26  8:35 ` [PATCH 2/2] enetc: support PTP Sync packet one-step timestamping Yangbo Lu
  0 siblings, 2 replies; 8+ messages in thread
From: Yangbo Lu @ 2021-03-26  8:35 UTC (permalink / raw)
  To: netdev
  Cc: Yangbo Lu, David S . Miller, Richard Cochran, Claudiu Manoil,
	Jakub Kicinski, Vladimir Oltean

This patch-set is to add one-step timestamping support for PTP Sync
packet. Since ENETC single-step register has to be configured dynamically
per packet for correctionField offeset and UDP checksum update, current
one-step timestamping packet has to be sent only when the last one
completes transmitting on hardware. So, on the TX the patch implements
below process:

- For one-step timestamping packet, queue to skb queue.
- Start a work to transmit skbs in queue.
- For other skbs, transmit immediately.
- mutex lock used to ensure the last one-step timestamping packet has
  already been transmitted on hardware before transmitting current one.

Yangbo Lu (2):
  enetc: mark TX timestamp type per skb
  enetc: support PTP Sync packet one-step timestamping

 drivers/net/ethernet/freescale/enetc/enetc.c  | 206 ++++++++++++++++--
 drivers/net/ethernet/freescale/enetc/enetc.h  |  24 +-
 .../ethernet/freescale/enetc/enetc_ethtool.c  |   3 +-
 .../net/ethernet/freescale/enetc/enetc_hw.h   |   7 +
 4 files changed, 214 insertions(+), 26 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] enetc: support PTP Sync packet one-step timestamping
@ 2021-03-26 19:21 kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-03-26 19:21 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210326083554.28985-3-yangbo.lu@nxp.com>
References: <20210326083554.28985-3-yangbo.lu@nxp.com>
TO: Yangbo Lu <yangbo.lu@nxp.com>
TO: netdev(a)vger.kernel.org
CC: Yangbo Lu <yangbo.lu@nxp.com>
CC: "David S . Miller" <davem@davemloft.net>
CC: Richard Cochran <richardcochran@gmail.com>
CC: Claudiu Manoil <claudiu.manoil@nxp.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Vladimir Oltean <vladimir.oltean@nxp.com>

Hi Yangbo,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20210325]
[cannot apply to ipvs/master linus/master sparc-next/master v5.12-rc4 v5.12-rc3 v5.12-rc2 v5.12-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Yangbo-Lu/enetc-support-PTP-Sync-packet-one-step-timestamping/20210326-170955
base:    b4f20b70784aabf97e1727561e775500f6e294c7
:::::: branch date: 10 hours ago
:::::: commit date: 10 hours ago
config: riscv-allmodconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


cocci warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/freescale/enetc/enetc.c:1441:2-12: second lock on line 1441

vim +1441 drivers/net/ethernet/freescale/enetc/enetc.c

d4fd0404c1c95b Claudiu Manoil 2019-01-22  1424  
ee04f0512d195a Yangbo Lu      2021-03-26  1425  static void enetc_tx_onestep_tstamp(struct work_struct *work)
ee04f0512d195a Yangbo Lu      2021-03-26  1426  {
ee04f0512d195a Yangbo Lu      2021-03-26  1427  	struct enetc_ndev_priv *priv;
ee04f0512d195a Yangbo Lu      2021-03-26  1428  	struct sk_buff *skb;
ee04f0512d195a Yangbo Lu      2021-03-26  1429  
ee04f0512d195a Yangbo Lu      2021-03-26  1430  	priv = container_of(work, struct enetc_ndev_priv, tx_onestep_tstamp);
ee04f0512d195a Yangbo Lu      2021-03-26  1431  
ee04f0512d195a Yangbo Lu      2021-03-26  1432  	while (true) {
ee04f0512d195a Yangbo Lu      2021-03-26  1433  		skb = skb_dequeue(&priv->tx_skbs);
ee04f0512d195a Yangbo Lu      2021-03-26  1434  		if (!skb)
ee04f0512d195a Yangbo Lu      2021-03-26  1435  			return;
ee04f0512d195a Yangbo Lu      2021-03-26  1436  
ee04f0512d195a Yangbo Lu      2021-03-26  1437  		/* Lock before TX one-step timestamping packet, and release
ee04f0512d195a Yangbo Lu      2021-03-26  1438  		 * when the packet has been sent on hardware, or transmit
ee04f0512d195a Yangbo Lu      2021-03-26  1439  		 * failure.
ee04f0512d195a Yangbo Lu      2021-03-26  1440  		 */
ee04f0512d195a Yangbo Lu      2021-03-26 @1441  		mutex_lock(&priv->onestep_tstamp_lock);
ee04f0512d195a Yangbo Lu      2021-03-26  1442  		enetc_start_xmit(skb, priv->ndev);
ee04f0512d195a Yangbo Lu      2021-03-26  1443  	}
ee04f0512d195a Yangbo Lu      2021-03-26  1444  }
ee04f0512d195a Yangbo Lu      2021-03-26  1445  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 69010 bytes --]

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

end of thread, other threads:[~2021-04-08 11:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26  8:35 [PATCH 0/2] enetc: support PTP Sync packet one-step timestamping Yangbo Lu
2021-03-26  8:35 ` [PATCH 1/2] enetc: mark TX timestamp type per skb Yangbo Lu
2021-03-26  8:35 ` [PATCH 2/2] enetc: support PTP Sync packet one-step timestamping Yangbo Lu
2021-03-26 12:07   ` kernel test robot
2021-03-26 12:07     ` kernel test robot
2021-03-28  7:51   ` Claudiu Manoil
2021-04-08 11:23     ` Y.b. Lu
2021-03-26 19:21 kernel test robot

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.