From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5A6CCA034C for ; Mon, 12 Dec 2022 12:28:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D67844021D; Mon, 12 Dec 2022 12:28:01 +0100 (CET) Received: from mail-vs1-f45.google.com (mail-vs1-f45.google.com [209.85.217.45]) by mails.dpdk.org (Postfix) with ESMTP id AFBE940C35 for ; Wed, 7 Dec 2022 04:50:20 +0100 (CET) Received: by mail-vs1-f45.google.com with SMTP id i2so16142671vsc.1 for ; Tue, 06 Dec 2022 19:50:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Q1T2fM2TxOLYus0XJaar8KVK54MbwfG3nr847TdDDL8=; b=kZ6AHvp/fswKAD+d4YVPBC6nAHY2H5qBnTGhtDeqrncyYHHZUCgmGY7zuSjZU3Thbs aKVgDwGn2AuwUGMvo9cfejJfaHrgdG5KXaQEk7cu3h4f6newNfBQb7+SThlWQRnuGZ7B Ka5LoU28UVRwWFaNlEipWy3z2/VFZm4OBU/J5Ge9GVc+8Edh9i/2v5m1z1BHo/EjqVoa h/Y/kJwFWxYd0xjav4WriqKdSljO8xtBr6TOfXEKPgxgZAeUY4d/qcLMZkwvgBxq20yo uYROIiXvwqK1NC1JQVFmXuc5nuHXaUoJS4ik7xKs7HeapG28j8hdus7Jl/ySRej6f7eP Fcgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Q1T2fM2TxOLYus0XJaar8KVK54MbwfG3nr847TdDDL8=; b=7FHDdPB8GzB4N3NDqrBMmyFfSzZ9MRAp45GHp88aJZgn31tJWC8DURW5rklb8bK5+J BZIBePrMFtsYoOHcW5qVmRiBA7WT93VmeF8wk+xiwbTT6iBwJqhfQMXVW+og7hhU2sbm +3WScImmkwLtdxzK0VFasrnJN5TYSfOsllI8cLY8P/yOge4NpW1ctvxG52oiIz3SYEmC 97qQ42kmGXagqpsR7zb4/I/yoqf/X8LorjqnPfp1fBuDDf0RR+QpE0fxIIiGA+YwYXkv zmcb8GVAKj9n6Jvz9pNt7fQwPhKRwxpLbQmVQZn/dGEpl+LzsGwbaAR4977dHHWvtyTc W1Lw== X-Gm-Message-State: ANoB5pmzVZWmnJoXjmBP7159ybAZ5Yy3sb9ncLolmgpNf8qJ7mhNBHBs Cz9vWdnSU1CjqBZf7jEF/zPY/s1te3/MXiJ00oPQ81zNeEYx3w== X-Google-Smtp-Source: AA0mqf7PrhpHZS60VuGgj6y44KeTr9lz/h5aOaLGfhwoPUywXAIeoCLZpqKYRmRR90arlQT5cKo82i/zKFe0OMz3Ctc= X-Received: by 2002:a67:fe53:0:b0:3b1:3d9a:6932 with SMTP id m19-20020a67fe53000000b003b13d9a6932mr6210725vsr.59.1670385019937; Tue, 06 Dec 2022 19:50:19 -0800 (PST) MIME-Version: 1.0 From: Fengkai Sun Date: Wed, 7 Dec 2022 11:50:09 +0800 Message-ID: Subject: rte_eth_timesync_read_tx_timestamp on Intel 82599ES NIC To: users@dpdk.org Content-Type: multipart/alternative; boundary="000000000000c066fb05ef34d1c0" X-Mailman-Approved-At: Mon, 12 Dec 2022 12:28:00 +0100 X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --000000000000c066fb05ef34d1c0 Content-Type: text/plain; charset="UTF-8" Hello list, I read that 82599ES family does support hardware timestamping, but when I tried to read from it, it returned -EINVAL. Below is my code: ``` // port initialization excised struct timespec tmp; ret = rte_eth_timesync_enable(0); printf("Enable tx timestamp: status %d\n", ret); ret = rte_eth_timesync_read_tx_timestamp(0, &tmp); printf("Get tx timestamp: status %d\n", ret); ``` And the output is: ``` Enable tx timestamp: status 0 Get tx timestamp: status -22 ``` Why does it happen? I looked into `examples/ptpclient/ptpclient.c` and found that no other requirement is needed to read the hardware timestamp. FYI, I'm using Ubuntu 20.04, DPDK 21.05, and below is what devbind returns: ``` Network devices using DPDK-compatible driver ============================================ 0000:04:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connection 10fb' drv=uio_pci_generic unused=ixgbe,vfio-pci 0000:04:00.1 '82599ES 10-Gigabit SFI/SFP+ Network Connection 10fb' drv=uio_pci_generic unused=ixgbe,vfio-pci ``` Thank you in advance! -- Best Regards, Fengkai --000000000000c066fb05ef34d1c0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello list,

I read that 82599ES family = does support hardware timestamping, but when I tried to read from it, it re= turned -EINVAL. Below is my code:

```
// port initialization excised
=C2=A0 =C2=A0 struct times= pec tmp;
=C2=A0 =C2=A0 ret =3D rte_eth_timesync_enable(0);
=C2=A0 =C2= =A0 printf("Enable tx timestamp: status %d\n", ret);
=C2=A0 = =C2=A0 ret =3D rte_eth_timesync_read_tx_timestamp(0, &tmp);
=C2=A0 = =C2=A0 printf("Get tx timestamp: status %d\n", ret);
```

And the output is:

= ```
Enable tx timestamp: status 0
Get tx timestamp: status -22=
```

Why does it happen? I looked in= to `examples/ptpclient/ptpclient.c` and found that no other requirement is = needed to read the hardware timestamp.


<= div>FYI, I'm using Ubuntu 20.04, DPDK 21.05, and below is what devbind= =C2=A0returns:

```
Network devices using= DPDK-compatible driver
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
0000:04:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connecti= on 10fb' drv=3Duio_pci_generic unused=3Dixgbe,vfio-pci
0000:04:00.1 = '82599ES 10-Gigabit SFI/SFP+ Network Connection 10fb' drv=3Duio_pci= _generic unused=3Dixgbe,vfio-pci
```

Thank you in advance!

--
Best Regards,<= /div>
Fengkai
--000000000000c066fb05ef34d1c0--