From: Eric Dumazet <eric.dumazet@gmail.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v4 1/7] igb: clear out tstamp after sending the packet
Date: Thu, 20 Jun 2019 17:56:28 -0400 [thread overview]
Message-ID: <799b2d75-a60d-4d93-b8d7-c29442b73dce@gmail.com> (raw)
In-Reply-To: <D1A9515C-D317-40F3-81A2-451F7228A853@intel.com>
On 6/20/19 1:32 PM, Patel, Vedang wrote:
>
> Ahh.. that?s clearly a false statement. Skb->tstamp is cleared so
> that it is not interpreted as a software timestamp when trying to
> send the Hardware TX timestamp to the userspace. I will rephrase the
> commit message in the next version.
>
> Some more details: The problem occurs when using the txtime-assist
> mode of taprio with packets which also request the hardware transmit
> timestamp (e.g. PTP packets). Whenever txtime-assist mode is set,
> taprio will assign a hardware transmit timestamp to all the packets
> (in skb->tstamp). PTP packets will also request the hardware transmit
> timestamp be sent to the userspace after packet is transmitted.
>
> Whenever a new timestamp is detected by the driver (this work is done
> in igb_ptp_tx_work() which calls igb_ptp_tx_hwtstamps() in
> igb_ptp.c[1]), it will queue the timestamp in the ERR_QUEUE for the
> userspace to read. When the userspace is ready, it will issue a
> recvmsg() call to collect this timestamp. The problem is in this
> recvmsg() call. If the skb->tstamp is not cleared out, it will be
> interpreted as a software timestamp and the hardware tx timestamp
> will not be successfully sent to the userspace. Look at
> skb_is_swtx_tstamp() and the callee function __sock_recv_timestamp()
> in net/socket.c for more details.
That amount of details in the changelog would be really nice ;)
WARNING: multiple messages have this Message-ID (diff)
From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Patel, Vedang" <vedang.patel@intel.com>,
Eric Dumazet <eric.dumazet@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
David Miller <davem@davemloft.net>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
"intel-wired-lan@lists.osuosl.org"
<intel-wired-lan@lists.osuosl.org>,
"Gomes, Vinicius" <vinicius.gomes@intel.com>,
"l@dorileo.org" <l@dorileo.org>,
Jakub Kicinski <jakub.kicinski@netronome.com>,
Murali Karicheri <m-karicheri2@ti.com>,
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Subject: Re: [PATCH net-next v4 1/7] igb: clear out tstamp after sending the packet
Date: Thu, 20 Jun 2019 17:56:28 -0400 [thread overview]
Message-ID: <799b2d75-a60d-4d93-b8d7-c29442b73dce@gmail.com> (raw)
In-Reply-To: <D1A9515C-D317-40F3-81A2-451F7228A853@intel.com>
On 6/20/19 1:32 PM, Patel, Vedang wrote:
>
> Ahh.. that’s clearly a false statement. Skb->tstamp is cleared so
> that it is not interpreted as a software timestamp when trying to
> send the Hardware TX timestamp to the userspace. I will rephrase the
> commit message in the next version.
>
> Some more details: The problem occurs when using the txtime-assist
> mode of taprio with packets which also request the hardware transmit
> timestamp (e.g. PTP packets). Whenever txtime-assist mode is set,
> taprio will assign a hardware transmit timestamp to all the packets
> (in skb->tstamp). PTP packets will also request the hardware transmit
> timestamp be sent to the userspace after packet is transmitted.
>
> Whenever a new timestamp is detected by the driver (this work is done
> in igb_ptp_tx_work() which calls igb_ptp_tx_hwtstamps() in
> igb_ptp.c[1]), it will queue the timestamp in the ERR_QUEUE for the
> userspace to read. When the userspace is ready, it will issue a
> recvmsg() call to collect this timestamp. The problem is in this
> recvmsg() call. If the skb->tstamp is not cleared out, it will be
> interpreted as a software timestamp and the hardware tx timestamp
> will not be successfully sent to the userspace. Look at
> skb_is_swtx_tstamp() and the callee function __sock_recv_timestamp()
> in net/socket.c for more details.
That amount of details in the changelog would be really nice ;)
next prev parent reply other threads:[~2019-06-20 21:56 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 17:40 [Intel-wired-lan] [PATCH net-next v4 0/7] net/sched: Add txtime-assist support for taprio Vedang Patel
2019-06-19 17:40 ` Vedang Patel
2019-06-19 17:40 ` [Intel-wired-lan] [PATCH net-next v4 1/7] igb: clear out tstamp after sending the packet Vedang Patel
2019-06-19 17:40 ` Vedang Patel
2019-06-20 10:47 ` [Intel-wired-lan] " Eric Dumazet
2019-06-20 10:47 ` Eric Dumazet
2019-06-20 16:49 ` [Intel-wired-lan] " Patel, Vedang
2019-06-20 16:49 ` Patel, Vedang
2019-06-20 17:07 ` [Intel-wired-lan] " Eric Dumazet
2019-06-20 17:07 ` Eric Dumazet
2019-06-20 20:32 ` [Intel-wired-lan] " Patel, Vedang
2019-06-20 20:32 ` Patel, Vedang
2019-06-20 21:56 ` Eric Dumazet [this message]
2019-06-20 21:56 ` Eric Dumazet
2019-06-19 17:40 ` [Intel-wired-lan] [PATCH net-next v4 2/7] etf: Add skip_sock_check Vedang Patel
2019-06-19 17:40 ` Vedang Patel
2019-06-20 8:16 ` [Intel-wired-lan] " Sergei Shtylyov
2019-06-20 8:16 ` Sergei Shtylyov
2019-06-20 21:13 ` [Intel-wired-lan] " Patel, Vedang
2019-06-20 21:13 ` Patel, Vedang
2019-06-19 17:40 ` [Intel-wired-lan] [PATCH net-next v4 3/7] taprio: calculate cycle_time when schedule is installed Vedang Patel
2019-06-19 17:40 ` Vedang Patel
2019-06-19 17:40 ` [Intel-wired-lan] [PATCH net-next v4 4/7] taprio: Remove inline directive Vedang Patel
2019-06-19 17:40 ` Vedang Patel
2019-06-19 17:40 ` [Intel-wired-lan] [PATCH net-next v4 5/7] taprio: Add support for txtime-assist mode Vedang Patel
2019-06-19 17:40 ` Vedang Patel
2019-06-19 17:40 ` [Intel-wired-lan] [PATCH net-next v4 6/7] taprio: make clock reference conversions easier Vedang Patel
2019-06-19 17:40 ` Vedang Patel
2019-06-19 17:40 ` [Intel-wired-lan] [PATCH net-next v4 7/7] taprio: Adjust timestamps for TCP packets Vedang Patel
2019-06-19 17:40 ` Vedang Patel
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=799b2d75-a60d-4d93-b8d7-c29442b73dce@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=intel-wired-lan@osuosl.org \
/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 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.