Re: [PATCH net v2] igb: Fix XDP with PTP enabled

2021-04-20 Thread Nguyen, Anthony L
On Mon, 2021-04-19 at 09:23 +0200, Kurt Kanzenbach wrote: > When using native XDP with the igb driver, the XDP frame data doesn't > point to > the beginning of the packet. It's off by 16 bytes. Everything works > as expected > with XDP skb mode. > > Actually these 16 bytes are used to store the pa

Re: [PATCH] ptp: Don't print an error if ptp_kvm is not supported

2021-04-20 Thread Marc Zyngier
On Tue, 20 Apr 2021 14:24:19 +0100, Jon Hunter wrote: > Commit 300bb1fe7671 ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64") > enable ptp_kvm support for ARM platforms and for any ARM platform that > does not support this, the following error message is displayed ... >

Re: [PATCH] ptp: Don't print an error if ptp_kvm is not supported

2021-04-20 Thread Richard Cochran
On Tue, Apr 20, 2021 at 02:24:19PM +0100, Jon Hunter wrote: > Commit 300bb1fe7671 ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64") > enable ptp_kvm support for ARM platforms and for any ARM platform that > does not support this, the following error message is displayed ... >

[PATCH] ptp: Don't print an error if ptp_kvm is not supported

2021-04-20 Thread Jon Hunter
Commit 300bb1fe7671 ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64") enable ptp_kvm support for ARM platforms and for any ARM platform that does not support this, the following error message is displayed ... ERR KERN fail to initialize ptp_kvm For platforms that do not support pt

Re: [net-next 3/3] net: mscc: ocelot: support PTP Sync one-step timestamping

2021-04-20 Thread Vladimir Oltean
On Tue, Apr 20, 2021 at 07:33:39AM +, Y.b. Lu wrote: > > > + /* For two-step timestamp, retrieve ptp_cmd in DSA_SKB_CB_PRIV > > > + * and timestamp ID in clone->cb[0]. > > > + * For one-step timestamp, retrieve ptp_cmd in DSA_SKB_CB_PRIV. > > > + */ > > > + u8 *ptp_cmd = DSA_SKB_CB_PRIV(skb)

RE: [net-next 3/3] net: mscc: ocelot: support PTP Sync one-step timestamping

2021-04-20 Thread Y.b. Lu
; Vivien Didelot ; Florian > Fainelli ; Claudiu Manoil ; > Alexandre Belloni ; > unglinuxdri...@microchip.com; linux-...@vger.kernel.org; > linux-ker...@vger.kernel.org > Subject: Re: [net-next 3/3] net: mscc: ocelot: support PTP Sync one-step > timestamping > > On Fri

[PATCH net v2] igb: Fix XDP with PTP enabled

2021-04-19 Thread Kurt Kanzenbach
When using native XDP with the igb driver, the XDP frame data doesn't point to the beginning of the packet. It's off by 16 bytes. Everything works as expected with XDP skb mode. Actually these 16 bytes are used to store the packet timestamps. Therefore, pull the timestamp before executing any XDP

Re: [net-next 3/3] net: mscc: ocelot: support PTP Sync one-step timestamping

2021-04-18 Thread Vladimir Oltean
On Fri, Apr 16, 2021 at 08:36:55PM +0800, Yangbo Lu wrote: > Although HWTSTAMP_TX_ONESTEP_SYNC existed in ioctl for hardware timestamp > configuration, the PTP Sync one-step timestamping had never been supported. > > This patch is to truely support it. Actually the ocelot switchdev

Re: [PATCH v19 6/7] KVM: arm64: Add support for the KVM PTP service

2021-04-17 Thread Zenghui Yu
transferring the wall clock and counter value from the +host to the guest using a KVM-specific hypercall. + +* ARM_SMCCC_HYP_KVM_PTP_FUNC_ID: 0x8601 Per include/linux/arm-smccc.h, this should be ARM_SMCCC_VENDOR_HYP_KVM_PTP_FUNC_ID. Well spotted. Care to send a patch on top of my kvm-arm64/ptp branch

Re: [PATCH v19 6/7] KVM: arm64: Add support for the KVM PTP service

2021-04-17 Thread Marc Zyngier
elies on transferring the wall clock and counter value from the > > +host to the guest using a KVM-specific hypercall. > > + > > +* ARM_SMCCC_HYP_KVM_PTP_FUNC_ID: 0x8601 > > Per include/linux/arm-smccc.h, this should be > ARM_SMCCC_VENDOR_HYP_KVM_PTP_FUNC_ID. Well

Re: [PATCH v19 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64

2021-04-17 Thread Marc Zyngier
On Sat, 17 Apr 2021 09:42:37 +0100, Zenghui Yu wrote: > > On 2021/3/30 22:54, Marc Zyngier wrote: > > +int kvm_arch_ptp_init(void) > > +{ > > + int ret; > > + > > + ret = kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_PTP); > > + if (ret <= 0) > > kvm_arm_hyp_service_available() returns

Re: [PATCH v19 6/7] KVM: arm64: Add support for the KVM PTP service

2021-04-17 Thread Zenghui Yu
On 2021/3/30 22:54, Marc Zyngier wrote: +PTP_KVM support for arm/arm64 += + +PTP_KVM is used for high precision time sync between host and guests. +It relies on transferring the wall clock and counter value from the +host to the guest using a KVM-specific hypercall. +

Re: [PATCH v19 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64

2021-04-17 Thread Zenghui Yu
On 2021/3/30 22:54, Marc Zyngier wrote: +int kvm_arch_ptp_init(void) +{ + int ret; + + ret = kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_PTP); + if (ret <= 0) kvm_arm_hyp_service_available() returns boolean. Maybe write as ? bool ret; ret = kvm_arm_hyp_s

Re: [net-next 3/3] net: mscc: ocelot: support PTP Sync one-step timestamping

2021-04-16 Thread kernel test robot
Hi Yangbo, I love your patch! Yet something to improve: [auto build test ERROR on 392c36e5be1dee19ffce8c8ba8f07f90f5aa3f7c] url: https://github.com/0day-ci/linux/commits/Yangbo-Lu/Support-ocelot-PTP-Sync-one-step-timestamping/20210416-20 base: 392c36e5be1dee19ffce8c8ba8f07f90f5aa3f7c

[net-next 3/3] net: mscc: ocelot: support PTP Sync one-step timestamping

2021-04-16 Thread Yangbo Lu
Although HWTSTAMP_TX_ONESTEP_SYNC existed in ioctl for hardware timestamp configuration, the PTP Sync one-step timestamping had never been supported. This patch is to truely support it. The hardware timestamp request type is stored in DSA_SKB_CB_PRIV first byte per skb, so that corresponding

[net-next 0/3] Support ocelot PTP Sync one-step timestamping

2021-04-16 Thread Yangbo Lu
This patch-set is to support ocelot PTP Sync one-step timestamping. Actually before that, this patch-set cleans up and optimizes the DSA slave tx timestamp request handling process. Yangbo Lu (3): net: dsa: optimize tx timestamp request handling net: mscc: ocelot: convert to

Re: [PATCH net] igb: Fix XDP with PTP enabled

2021-04-15 Thread Kurt Kanzenbach
On Thu Apr 15 2021, Jesper Dangaard Brouer wrote: > I have a project involving i225+igc (using TSN). And someone suggested > that I also looked at i210 for TSN. I've ordered hardware that have > i210 on motherboard (and I will insert my i225 card) so I have a system > with both chips for experime

Re: [PATCH net] igb: Fix XDP with PTP enabled

2021-04-15 Thread Jesper Dangaard Brouer
On Thu, 15 Apr 2021 14:16:36 +0200 Kurt Kanzenbach wrote: > On Thu Apr 15 2021, Jesper Dangaard Brouer wrote: > > On Thu, 15 Apr 2021 11:21:45 +0200 > > Kurt Kanzenbach wrote: > > > >> When using native XDP with the igb driver, the XDP frame data doesn't > >> point to > >> the beginning of th

Re: [PATCH net] igb: Fix XDP with PTP enabled

2021-04-15 Thread Kurt Kanzenbach
On Thu Apr 15 2021, Lorenzo Bianconi wrote: > [...] >> @@ -8683,7 +8676,10 @@ static int igb_clean_rx_irq(struct igb_q_vector >> *q_vector, const int budget) >> while (likely(total_packets < budget)) { >> union e1000_adv_rx_desc *rx_desc; >> struct igb_rx_buffer *rx_

Re: [PATCH net] igb: Fix XDP with PTP enabled

2021-04-15 Thread Nick Lowe
> Doesn't the i210 card use the igc driver? > This change is for igb driver. The igb driver is used for the i210/i211, not igc.

Re: [PATCH net] igb: Fix XDP with PTP enabled

2021-04-15 Thread Kurt Kanzenbach
On Thu Apr 15 2021, Jesper Dangaard Brouer wrote: > On Thu, 15 Apr 2021 11:21:45 +0200 > Kurt Kanzenbach wrote: > >> When using native XDP with the igb driver, the XDP frame data doesn't point >> to >> the beginning of the packet. It's off by 16 bytes. Everything works as >> expected >> with XDP

Re: [PATCH net] igb: Fix XDP with PTP enabled

2021-04-15 Thread Jesper Dangaard Brouer
On Thu, 15 Apr 2021 11:21:45 +0200 Kurt Kanzenbach wrote: > When using native XDP with the igb driver, the XDP frame data doesn't point to > the beginning of the packet. It's off by 16 bytes. Everything works as > expected > with XDP skb mode. > > Actually these 16 bytes are used to store the p

Re: [PATCH net] igb: Fix XDP with PTP enabled

2021-04-15 Thread Lorenzo Bianconi
[...] > @@ -8683,7 +8676,10 @@ static int igb_clean_rx_irq(struct igb_q_vector > *q_vector, const int budget) > while (likely(total_packets < budget)) { > union e1000_adv_rx_desc *rx_desc; > struct igb_rx_buffer *rx_buffer; > + ktime_t timestamp = 0; >

[PATCH net] igb: Fix XDP with PTP enabled

2021-04-15 Thread Kurt Kanzenbach
When using native XDP with the igb driver, the XDP frame data doesn't point to the beginning of the packet. It's off by 16 bytes. Everything works as expected with XDP skb mode. Actually these 16 bytes are used to store the packet timestamps. Therefore, pull the timestamp before executing any XDP

Re: [PATCH RFC net] igb: Fix XDP with PTP enabled

2021-04-13 Thread Kurt Kanzenbach
On Tue Apr 13 2021, Alexander Duyck wrote: > On Mon, Apr 12, 2021 at 7:29 AM Jesper Dangaard Brouer > wrote: >> > +ktime_t igb_ptp_rx_pktstamp(struct igb_q_vector *q_vector, void *va) >> > { >> > struct igb_adapter *adapter = q_vector->adapter; >> > + struct skb_shared_hwtstamps ts; >>

Re: [PATCH RFC net] igb: Fix XDP with PTP enabled

2021-04-13 Thread Alexander Duyck
On Mon, Apr 12, 2021 at 7:29 AM Jesper Dangaard Brouer wrote: > > > On Mon, 12 Apr 2021 12:17:13 +0200 > Kurt Kanzenbach wrote: > > > When using native XDP with the igb driver, the XDP frame data doesn't point > > to > > the beginning of the packet. It's off by 16 bytes. Everything works as > >

Re: [PATCH RFC net] igb: Fix XDP with PTP enabled

2021-04-13 Thread Kurt Kanzenbach
On Mon Apr 12 2021, Jesper Dangaard Brouer wrote: > On Mon, 12 Apr 2021 12:17:13 +0200 > Kurt Kanzenbach wrote: > >> When using native XDP with the igb driver, the XDP frame data doesn't point >> to >> the beginning of the packet. It's off by 16 bytes. Everything works as >> expected >> with XDP

RE: [net-next, v3, 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-12 Thread Y.b. Lu
> -Original Message- > From: Yangbo Lu > Sent: 2021年4月12日 17:03 > To: netdev@vger.kernel.org > Cc: Y.b. Lu ; David S . Miller ; > Richard Cochran ; Claudiu Manoil > ; Jakub Kicinski ; Vladimir > Oltean ; Russell King > Subject: [net-next, v3, 2/2] enetc: suppo

Re: [net-next, v3, 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-12 Thread Claudiu Manoil
On 12.04.2021 12:03, Yangbo Lu wrote: This patch is to add support for PTP Sync packet one-step timestamping. 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

Re: [PATCH RFC net] igb: Fix XDP with PTP enabled

2021-04-12 Thread Jesper Dangaard Brouer
On Mon, 12 Apr 2021 12:17:13 +0200 Kurt Kanzenbach wrote: > When using native XDP with the igb driver, the XDP frame data doesn't point to > the beginning of the packet. It's off by 16 bytes. Everything works as > expected > with XDP skb mode. > > Actually these 16 bytes are used to store the

[PATCH RFC net] igb: Fix XDP with PTP enabled

2021-04-12 Thread Kurt Kanzenbach
When using native XDP with the igb driver, the XDP frame data doesn't point to the beginning of the packet. It's off by 16 bytes. Everything works as expected with XDP skb mode. Actually these 16 bytes are used to store the packet timestamps. Therefore, pull the timestamp before executing any XDP

RE: [net-next, v2, 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-12 Thread Y.b. Lu
: [net-next, v2, 2/2] enetc: support PTP Sync packet one-step > timestamping > > On Fri, 9 Apr 2021 22:32:49 +0300 Claudiu Manoil wrote: > > On 09.04.2021 19:09, Jakub Kicinski wrote: > > > On Fri, 9 Apr 2021 06:37:53 + Claudiu Manoil wrote: > > >>

[net-next, v3, 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-12 Thread Yangbo Lu
This patch is to add support for PTP Sync packet one-step timestamping. 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

[net-next, v3, 0/2] enetc: support PTP Sync packet one-step timestamping

2021-04-12 Thread Yangbo Lu
This patch-set is to add support for PTP Sync packet one-step timestamping. 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

Re: [net-next, v2, 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-09 Thread Jakub Kicinski
he mutex with a bit lock, based on your comments. > That means: > xmit: work: clean_tx_ring: //Tx conf > skb_queue_tail() > skb_dequeue() > test_and_set_bit_lock() >

Re: [net-next, v2, 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-09 Thread Claudiu Manoil
clean_tx_ring: //Tx conf skb_queue_tail() skb_dequeue() test_and_set_bit_lock() clear_bit_unlock() The skb queue is one per device, as it needs to serialize ptp skbs for that device (due to the restriction that a ptp

Re: [net-next, v2, 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-09 Thread Jakub Kicinski
On Fri, 9 Apr 2021 06:37:53 + Claudiu Manoil wrote: > >On Thu, 8 Apr 2021 09:02:50 -0700 Jakub Kicinski wrote: > >>if (priv->flags & ONESTEP_BUSY) { > >>skb_queue_tail(&priv->tx_skbs, skb); > >>return ...; > >>} > >>p

RE: [net-next, v2, 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-08 Thread Claudiu Manoil
>-Original Message- >From: Jakub Kicinski >Sent: Thursday, April 8, 2021 7:07 PM >To: Y.b. Lu >Cc: netdev@vger.kernel.org; David S . Miller ; >Richard Cochran ; Claudiu Manoil >; Vladimir Oltean ; >Russell King >Subject: Re: [net-next, v2, 2/2] enetc: suppo

Re: [net-next, v2, 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-08 Thread Jakub Kicinski
On Thu, 8 Apr 2021 09:02:50 -0700 Jakub Kicinski wrote: > if (priv->flags & ONESTEP_BUSY) { > skb_queue_tail(&priv->tx_skbs, skb); > return ...; > } > priv->flags |= ONESTEP_BUSY; Ah, if you have multiple queues

Re: [net-next, v2, 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-08 Thread Jakub Kicinski
On Thu, 8 Apr 2021 19:13:50 +0800 Yangbo Lu wrote: > This patch is to add support for PTP Sync packet one-step timestamping. > Since ENETC single-step register has to be configured dynamically per > packet for correctionField offeset and UDP checksum update, current > one-step timesta

RE: [PATCH 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-08 Thread Y.b. Lu
Hi Claudiu, > -Original Message- > From: Claudiu Manoil > Sent: 2021年3月28日 15:52 > To: Y.b. Lu ; netdev@vger.kernel.org > Cc: David S . Miller ; Richard Cochran > ; Claudiu Manoil ; > Jakub Kicinski ; Vladimir Oltean > Subject: Re: [PATCH 2/2] enetc: support

[net-next, v2, 2/2] enetc: support PTP Sync packet one-step timestamping

2021-04-08 Thread Yangbo Lu
This patch is to add support for PTP Sync packet one-step timestamping. 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

[net-next, v2, 0/2] enetc: support PTP Sync packet one-step timestamping

2021-04-08 Thread Yangbo Lu
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

[PATCH net-next 5/8] ionic: re-start ptp after queues up

2021-04-07 Thread Shannon Nelson
When returning after a firmware reset, re-start the PTP after we've restarted the general queues. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/pensando/

Re: [PATCH v19 3/7] ptp: Reorganize ptp_kvm.c to make it arch-independent

2021-04-07 Thread Marc Zyngier
On Wed, 07 Apr 2021 16:13:34 +0100, Richard Cochran wrote: > > On Wed, Apr 07, 2021 at 10:28:44AM +0100, Marc Zyngier wrote: > > On Tue, 30 Mar 2021 15:54:26 +0100, > > Marc Zyngier wrote: > > > > > > From: Jianyong Wu > > > > > > Currently, the ptp_kvm module contains a lot of x86-specific c

Re: [PATCH v19 3/7] ptp: Reorganize ptp_kvm.c to make it arch-independent

2021-04-07 Thread Richard Cochran
On Wed, Apr 07, 2021 at 10:28:44AM +0100, Marc Zyngier wrote: > On Tue, 30 Mar 2021 15:54:26 +0100, > Marc Zyngier wrote: > > > > From: Jianyong Wu > > > > Currently, the ptp_kvm module contains a lot of x86-specific code. > > Let's move this code into a new arch-specific file in the same direc

Re: [PATCH v19 3/7] ptp: Reorganize ptp_kvm.c to make it arch-independent

2021-04-07 Thread Marc Zyngier
On Tue, 30 Mar 2021 15:54:26 +0100, Marc Zyngier wrote: > > From: Jianyong Wu > > Currently, the ptp_kvm module contains a lot of x86-specific code. > Let's move this code into a new arch-specific file in the same directory, > and rename the arch-independent file to ptp_kvm_common.c. > > Revie

Re: [PATCH net-next 00/12] ionic: add PTP and hw clock support

2021-04-02 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Thu, 1 Apr 2021 10:55:58 -0700 you wrote: > This patchset adds support for accessing the DSC hardware clock and > for offloading PTP timestamping. > > Tx packet timestamping happens through a separate Tx

Re: [PATCH net-next 00/12] ionic: add PTP and hw clock support

2021-04-01 Thread Shannon Nelson
On 4/1/21 2:02 PM, Andrew Lunn wrote: On Thu, Apr 01, 2021 at 10:55:58AM -0700, Shannon Nelson wrote: This patchset adds support for accessing the DSC hardware clock and for offloading PTP timestamping. Hi Shannon Please always Cc: the PTP maintainer for PTP patches. Richard Cochran

Re: [PATCH net-next 00/12] ionic: add PTP and hw clock support

2021-04-01 Thread Andrew Lunn
On Thu, Apr 01, 2021 at 10:55:58AM -0700, Shannon Nelson wrote: > This patchset adds support for accessing the DSC hardware clock and > for offloading PTP timestamping. Hi Shannon Please always Cc: the PTP maintainer for PTP patches. Richard Cochran Andrew

[PATCH net-next 11/12] ionic: ethtool ptp stats

2021-04-01 Thread Shannon Nelson
Add the new hwstamp stats to our ethtool stats output. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_stats.c | 38 +-- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_st

[PATCH net-next 10/12] ionic: add ethtool support for PTP

2021-04-01 Thread Shannon Nelson
gt;phc || !lif->phc->ptp) + return ethtool_op_get_ts_info(netdev, info); + + info->phc_index = ptp_clock_index(lif->phc->ptp); + + info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE | + SOF_

[PATCH net-next 00/12] ionic: add PTP and hw clock support

2021-04-01 Thread Shannon Nelson
This patchset adds support for accessing the DSC hardware clock and for offloading PTP timestamping. Tx packet timestamping happens through a separate Tx queue set up with expanded completion descriptors that can report the timestamp. Rx timestamping can happen either on all queues, or on a

Re: [net-next 01/12] net/mlx5e: Add states to PTP channel

2021-03-30 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Mon, 29 Mar 2021 21:27:30 -0700 you wrote: > From: Aya Levin > > Add PTP TX state to PTP channel, which indicates the corresponding SQ is > available. Further patches in the set extend PTP channel t

[PATCH v19 3/7] ptp: Reorganize ptp_kvm.c to make it arch-independent

2021-03-30 Thread Marc Zyngier
Marc Zyngier Link: https://lore.kernel.org/r/20201209060932.212364-4-jianyong...@arm.com --- drivers/ptp/Makefile| 1 + drivers/ptp/{ptp_kvm.c => ptp_kvm_common.c} | 84 +- drivers/ptp/ptp_kvm_x86.c | 97 + inclu

[PATCH v19 6/7] KVM: arm64: Add support for the KVM PTP service

2021-03-30 Thread Marc Zyngier
From: Jianyong Wu Implement the hypervisor side of the KVM PTP interface. The service offers wall time and cycle count from host to guest. The caller must specify whether they want the host's view of either the virtual or physical counter. Signed-off-by: Jianyong Wu Signed-off-by:

[PATCH v19 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64

2021-03-30 Thread Marc Zyngier
be in order of milliseconds. But in some scenarios,like in cloud environment, we ask for higher time precision. kvm ptp clock, which chooses the host clock source as a reference clock to sync time between guest and host, has been adopted by x86 which takes the time sync order from milliseconds to

[PATCH v19 0/7] KVM: arm64: Add host/guest KVM-PTP support

2021-03-30 Thread Marc Zyngier
4-specific documentation - Dropped the generic PTP documentation as it needs a new location, and some cleanup - Squashed hypercall documentation and capability into the main KVM patch - Rebased on top of 5.11-rc4 [0] https://lore.kernel.org/r/20201209060932.212364-1-jianyong...@arm.com

RE: [PATCH v18 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64

2021-03-30 Thread Jianyong Wu
v18 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64 From: Jianyong Wu Currently, there is no mechanism to keep time sync between guest and host in arm/arm64 virtualization environment. Time in guest will drift compared with host after boot up as they may both use third party time sources to

RE: [PATCH v18 6/7] KVM: arm64: Add support for the KVM PTP service

2021-03-30 Thread Jianyong Wu
v18 6/7] KVM: arm64: Add support for the KVM PTP service From: Jianyong Wu Implement the hypervisor side of the KVM PTP interface. The service offers wall time and cycle count from host to guest. The caller must specify whether they want the host's view of either the virtual or physical co

[net-next 10/12] net/mlx5e: Add PTP Flow Steering support

2021-03-29 Thread Saeed Mahameed
From: Aya Levin When opening PTP channel with MLX5E_PTP_STATE_RX set, add the corresponding flow steering rules. Capture UDP packets with destination port 319 and L2 packets with ethertype 0x88F7 and steer them into the RQ of the PTP channel. Add API that manages the flow steering rules to be

[net-next 11/12] net/mlx5e: Allow coexistence of CQE compression and HW TS PTP

2021-03-29 Thread Saeed Mahameed
From: Aya Levin Update setting HW time-stamp to allow coexistence with CQE compression. Turn on RX PTP indication and try to reopen the channels. On success, coexistence with CQE compression is enabled. Otherwise, fall-back to turning off CQE compression. Signed-off-by: Aya Levin Reviewed-by

[net-next 03/12] net/mlx5e: Add PTP-RX statistics

2021-03-29 Thread Saeed Mahameed
From: Aya Levin Like PTP-TX, once the PTP-RX is opened, corresponding statistics appear. Add indication that PTP-RX was ever opened: rx_ptp_opened. If any of the PTP RX or TX were opened, display the PTP channel's statistics. Signed-off-by: Aya Levin Signed-off-by: Tariq Toukan Signed-o

[net-next 06/12] net/mlx5e: Add PTP RQ to RX reporter

2021-03-29 Thread Saeed Mahameed
From: Aya Levin When present, add the PTP RQ to the RX reporter. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/en/reporter_rx.c | 68 ++- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a

[net-next 02/12] net/mlx5e: Add RQ to PTP channel

2021-03-29 Thread Saeed Mahameed
From: Aya Levin Enhance PTP channel to allow PTP without disabling CQE compression. Add RQ, TIR and PTP_RX_STATE to PTP channel. When this bit is set, PTP channel manages its RQ, and PTP traffic is directed to the PTP-RQ which is not affected by compression. Signed-off-by: Aya Levin Signed-off

[net-next 04/12] net:mlx5e: Add PTP-TIR and PTP-RQT

2021-03-29 Thread Saeed Mahameed
From: Aya Levin Add PTP-TIR and initiate its RQT to allow PTP-RQ to integrate into the safe-reopen flow on configuration change. Add rx_ptp_support flag on a profile and turn it on for ETH driver. With this flag set, create a redirect-RQT for PTP-RQ. Signed-off-by: Aya Levin Reviewed-by: Tariq

[net-next 01/12] net/mlx5e: Add states to PTP channel

2021-03-29 Thread Saeed Mahameed
From: Aya Levin Add PTP TX state to PTP channel, which indicates the corresponding SQ is available. Further patches in the set extend PTP channel to include RQ. The PTP channel state will be used for separation and coexistence of RX and TX PTP. Enhance conditions to verify the TX PTP state is

Re: [PATCH 2/2] enetc: support PTP Sync packet one-step timestamping

2021-03-28 Thread Claudiu Manoil
& ENETC_F_TX_TSTAMP_MASK)) { + skb->cb[0] = priv->active_offloads & ENETC_F_TX_TSTAMP_MASK; + } else { + skb->cb[0] = 0; + } + + if (skb->cb[0] & ENETC_F_TX_ONESTEP_SYNC_TSTAMP) { + /* For one-step PTP sync packet, queu

Re: [PATCH 2/2] enetc: support PTP Sync packet one-step timestamping

2021-03-26 Thread kernel test robot
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 config: ia64-al

[PATCH 0/2] enetc: support PTP Sync packet one-step timestamping

2021-03-26 Thread Yangbo Lu
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

[PATCH 2/2] enetc: support PTP Sync packet one-step timestamping

2021-03-26 Thread Yangbo Lu
This patch is to add support for PTP Sync packet one-step timestamping. 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

[net-next V2 12/13] net/mlx5e: Cleanup PTP

2021-03-25 Thread Saeed Mahameed
From: Aya Levin Reduce scope of mlx5e_ptp_params, move to its c file. Remove unneeded variables from mlx5e_ptp_open and state bitmap from PTP channel. In addition, remove channel index from PTP channel since it is set to a hard coded value, use define instead. Signed-off-by: Aya Levin Reviewed

[net-next V2 11/13] net/mlx5e: Generalize PTP implementation

2021-03-25 Thread Saeed Mahameed
From: Aya Levin Following patches in the set add support for RX PTP. Rename PTP prefix from %s/port_ptp/ptp/g to include RX PTP too. In addition rename indication (used in statistics context) that PTP-SQ was opened: %s/port_ptp_opened/tx_ptp_opened/g. This will simplify adding indication that

[net-next 14/15] net/mlx5e: Cleanup PTP

2021-03-24 Thread Saeed Mahameed
From: Aya Levin Reduce scope of mlx5e_ptp_params, move to its c file. Remove unneeded variables from mlx5e_ptp_open and state bitmap from PTP channel. In addition, remove channel index from PTP channel since it is set to a hard coded value, use define instead. Signed-off-by: Aya Levin Reviewed

[net-next 13/15] net/mlx5e: Generalize PTP implementation

2021-03-24 Thread Saeed Mahameed
From: Aya Levin Following patches in the set add support for RX PTP. Rename PTP prefix from %s/port_ptp/ptp/g to include RX PTP too. In addition rename indication (used in statistics context) that PTP-SQ was opened: %s/port_ptp_opened/tx_ptp_opened/g. This will simplify adding indication that

Re: [PATCH next-queue v3 3/3] igc: Add support for PTP getcrosststamp()

2021-03-23 Thread Vinicius Costa Gomes
Bjorn Helgaas writes: > On Mon, Mar 22, 2021 at 09:18:22AM -0700, Vinicius Costa Gomes wrote: >> i225 has support for PCIe PTM, which allows us to implement support >> for the PTP_SYS_OFFSET_PRECISE ioctl(), implemented in the driver via >> the getcrosststamp() function. > >> +static bool igc_is_

Re: [PATCH next-queue v3 3/3] igc: Add support for PTP getcrosststamp()

2021-03-23 Thread Bjorn Helgaas
On Mon, Mar 22, 2021 at 09:18:22AM -0700, Vinicius Costa Gomes wrote: > i225 has support for PCIe PTM, which allows us to implement support > for the PTP_SYS_OFFSET_PRECISE ioctl(), implemented in the driver via > the getcrosststamp() function. > +static bool igc_is_ptm_supported(struct igc_adapte

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2021-03-22 Thread Richard Cochran
On Mon, Mar 22, 2021 at 08:36:26AM -0700, Vinicius Costa Gomes wrote: > After a long time, a couple of internal misunderstandings, fixing some > typos in the delay adjustment constants and better error handling, this > one shot method is working well. > > I will propose a new version, implementing

[PATCH next-queue v3 3/3] igc: Add support for PTP getcrosststamp()

2021-03-22 Thread Vinicius Costa Gomes
5,7 @@ struct igc_adapter { struct timecounter tc; struct timespec64 prev_ptp_time; /* Pre-reset PTP clock */ ktime_t ptp_reset_start; /* Reset time in clock mono */ + struct system_time_snapshot snapshot; char fw_version[32]; diff --git a/drivers/net/ethernet/i

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2021-03-22 Thread Vinicius Costa Gomes
Miroslav Lichvar writes: > On Mon, Nov 09, 2020 at 10:10:19PM -0800, Vinicius Costa Gomes wrote: >> i225 has support for PCIe PTM, which allows us to implement support >> for the PTP_SYS_OFFSET_PRECISE ioctl(), implemented in the driver via >> the getcrosststamp() function. > > Would it be possib

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2021-03-22 Thread Vinicius Costa Gomes
Hi, Richard Cochran writes: > On Tue, Nov 17, 2020 at 05:21:48PM -0800, Vinicius Costa Gomes wrote: >> Agreed that would be easiest/simplest. But what I have in hand seems to >> not like it, i.e. I have an earlier series implementing this "one shot" way >> and it's not reliable over long periods

Re: [PATCH net-next 0/1] stmmac: add PCH and PSE PTP clock setting

2021-03-18 Thread patchwork-bot+netdevbpf
unning linuxptp time-sync. > > The patch has been tested on both PSE (/dev/ptp0) and PCH TSN(/dev/ptp2) > and the results for the time sync looks correct. > > [...] Here is the summary with links: - [net-next,1/1] stmmac: intel: Add PSE and PCH PTP clock source selection https://

[PATCH net-next 1/1] stmmac: intel: Add PSE and PCH PTP clock source selection

2021-03-16 Thread Ong Boon Leong
red to configure the frequency of clock source, in this case Intel mGBE does, the platform-specific configuration of the PTP clock setting is done when stmmac_ptp_register() is called. Signed-off-by: Wong, Vee Khee Signed-off-by: Voon Weifeng Co-developed-by: Ong Boon Leong Signed-off-by: Ong Boon

[PATCH net-next 0/1] stmmac: add PCH and PSE PTP clock setting

2021-03-16 Thread Ong Boon Leong
147 tx_timestamp_timeout50 > /usr/local/sbin/ptp4l -v 3.1 # # Start ptp4l eth0 [verbose mode] # > /usr/local/sbin/ptp4l -P2Hi eth0 -f gPTP.conf --step_threshold=1 -m ptp4l[8380.510]: selected /dev/ptp0 as PTP clock ptp4l[8380.535]: port 1: INI

[PATCH AUTOSEL 4.9 01/16] net: fec: ptp: avoid register access when ipg clock is disabled

2021-03-16 Thread Sasha Levin
change in 91c0d987a9788dcc5fe26baafd73bf9242b68900 the igp clock is disabled when the interface is down and leads to a system hang. So we check if the ptp clock status before reading the timecounter register. Signed-off-by: Heiko Thiery Acked-by: Richard Cochran Link: https://lore.ke

[PATCH AUTOSEL 4.4 01/14] net: fec: ptp: avoid register access when ipg clock is disabled

2021-03-16 Thread Sasha Levin
change in 91c0d987a9788dcc5fe26baafd73bf9242b68900 the igp clock is disabled when the interface is down and leads to a system hang. So we check if the ptp clock status before reading the timecounter register. Signed-off-by: Heiko Thiery Acked-by: Richard Cochran Link: https://lore.ke

[PATCH AUTOSEL 4.14 01/21] net: fec: ptp: avoid register access when ipg clock is disabled

2021-03-16 Thread Sasha Levin
change in 91c0d987a9788dcc5fe26baafd73bf9242b68900 the igp clock is disabled when the interface is down and leads to a system hang. So we check if the ptp clock status before reading the timecounter register. Signed-off-by: Heiko Thiery Acked-by: Richard Cochran Link: https://lore.ke

[PATCH AUTOSEL 4.19 01/23] net: fec: ptp: avoid register access when ipg clock is disabled

2021-03-16 Thread Sasha Levin
change in 91c0d987a9788dcc5fe26baafd73bf9242b68900 the igp clock is disabled when the interface is down and leads to a system hang. So we check if the ptp clock status before reading the timecounter register. Signed-off-by: Heiko Thiery Acked-by: Richard Cochran Link: https://lore.ke

[PATCH AUTOSEL 5.4 01/37] net: fec: ptp: avoid register access when ipg clock is disabled

2021-03-16 Thread Sasha Levin
change in 91c0d987a9788dcc5fe26baafd73bf9242b68900 the igp clock is disabled when the interface is down and leads to a system hang. So we check if the ptp clock status before reading the timecounter register. Signed-off-by: Heiko Thiery Acked-by: Richard Cochran Link: https://lore.ke

[PATCH AUTOSEL 5.10 03/54] net: fec: ptp: avoid register access when ipg clock is disabled

2021-03-16 Thread Sasha Levin
change in 91c0d987a9788dcc5fe26baafd73bf9242b68900 the igp clock is disabled when the interface is down and leads to a system hang. So we check if the ptp clock status before reading the timecounter register. Signed-off-by: Heiko Thiery Acked-by: Richard Cochran Link: https://lore.ke

[PATCH AUTOSEL 5.11 04/61] net: fec: ptp: avoid register access when ipg clock is disabled

2021-03-16 Thread Sasha Levin
change in 91c0d987a9788dcc5fe26baafd73bf9242b68900 the igp clock is disabled when the interface is down and leads to a system hang. So we check if the ptp clock status before reading the timecounter register. Signed-off-by: Heiko Thiery Acked-by: Richard Cochran Link: https://lore.ke

Re: [PATCH 0/4] Rid W=1 warnings from PTP

2021-03-13 Thread Richard Cochran
x27;pch_ch_control_read()' > ptp_pch: Move 'pch_*()' prototypes to shared header > ptp: ptp_clockmatrix: Demote non-kernel-doc header to standard comment > ptp: ptp_p: Demote non-conformant kernel-doc headers and supply a > param description For the series: Acked-by: Richard Cochran

[PATCH 4/4] ptp: ptp_p: Demote non-conformant kernel-doc headers and supply a param description

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'control' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'event' not described in 'pch_ts_regs&

[PATCH 3/4] ptp: ptp_clockmatrix: Demote non-kernel-doc header to standard comment

2021-03-12 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand * @brief Maximum absolute value for write phase offset in picoseconds drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand * @brief Maximum absolute value for write

[PATCH 0/4] Rid W=1 warnings from PTP

2021-03-12 Thread Lee Jones
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings. Lee Jones (4): ptp_pch: Remove unused function 'pch_ch_control_read()' ptp_pch: Move 'pch_*()' prototypes to

[net 06/18] net/mlx5e: Revert parameters on errors when changing PTP state without reset

2021-03-10 Thread Saeed Mahameed
From: Maxim Mikityanskiy Port timestamping for PTP can be enabled/disabled while the channels are closed. In that case mlx5e_safe_switch_channels is skipped, and the preactivate hook is called directly. However, if that hook returns an error, the channel parameters must be reverted back to their

[net 04/18] net/mlx5e: Set PTP channel pointer explicitly to NULL

2021-03-10 Thread Saeed Mahameed
From: Aya Levin When closing the PTP channel, set its pointer explicitly to NULL. PTP channel is opened on demand, the code verify the pointer validity before access. Nullify it when closing the PTP channel to avoid unexpected behavior. Fixes: 145e5637d941 ("net/mlx5e: Add TX PTP port o

[net 03/18] net/mlx5e: Accumulate port PTP TX stats with other channels stats

2021-03-10 Thread Saeed Mahameed
From: Aya Levin In addition to .get_ethtool_stats, add port PTP TX stats to .ndo_get_stats64. Fixes: 145e5637d941 ("net/mlx5e: Add TX PTP port object support") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox

Re: [PATCH v2 1/1] net: fec: ptp: avoid register access when ipg clock is disabled

2021-02-26 Thread Jakub Kicinski
> by reading with 'phc_ctrl eth0 get'. > > > > Like described in the change in 91c0d987a9788dcc5fe26baafd73bf9242b68900 > > the igp clock is disabled when the interface is down and leads to a > > system hang. > > > > So we check if the ptp clock stat

Re: [PATCH v2 1/1] net: fec: ptp: avoid register access when ipg clock is disabled

2021-02-26 Thread Richard Cochran
escribed in the change in 91c0d987a9788dcc5fe26baafd73bf9242b68900 > the igp clock is disabled when the interface is down and leads to a > system hang. > > So we check if the ptp clock status before reading the timecounter > register. > > Signed-off-by: Heiko Thiery > --- > v2: &

  1   2   3   4   5   6   7   8   9   10   >