Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Dahan, AvigailX" <avigailx.dahan@intel.com>
To: Ding Meng <meng.ding@siemens.com>, <anthony.l.nguyen@intel.com>,
	<przemyslaw.kitszel@intel.com>, <andrew+netdev@lunn.ch>,
	<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <jan.kiszka@siemens.com>,
	<florian.bezdeka@siemens.com>
Cc: <intel-wired-lan@lists.osuosl.org>,
	<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<wq.wang@siemens.com>, <pmenzel@molgen.mpg.de>,
	<stable@vger.kernel.org>,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	Piotr Kwapulinski <piotr.kwapulinski@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH net v2] igc: Fix RX HW timestamp reporting when NET_RX_BUSY_POLL is disabled
Date: Wed, 2 Sep 2026 14:25:59 +0300	[thread overview]
Message-ID: <b1625848-4207-44a7-be1e-435afe483a4d@intel.com> (raw)
In-Reply-To: <20260630112056.885071-1-meng.ding@siemens.com>

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


On 30/06/2026 14:15, Ding Meng via Intel-wired-lan wrote:
> When CONFIG_NET_RX_BUSY_POLL is deactivated, fetching RX HW timestamps
> from the NIC no longer works as expected, often resulting in incorrect
> or negative values such as "HW raw -121948.050407424".
>
> This occurs because disabling CONFIG_NET_RX_BUSY_POLL disables the
> SKB NAPI mapping in __skb_mark_napi_id(). Consequently, get_timestamp()
> fails to perform its driver lookup, and the igc driver's struct
> net_device_ops::ndo_get_tstamp is never invoked.
>
> Instead, get_timestamp() falls back to use shhwtstamps(skb)->hwtstamp,
> a field that the driver has not populated. This results in incorrect
> timestamps.
>
> Fix this by populating the hwtstamp field with the correct timestamp
> in the default timer when CONFIG_NET_RX_BUSY_POLL is disabled.
> The "igc_adapter" is passed to igc_construct_skb() to enable
> igc_ptp_rx_pktstamp() to access the necessary adapter details for
> adjusting the timestamp.
>
> Test case:
>   Disable CONFIG_NET_RX_BUSY_POLL.
>   Sender:
>   # tools/testing/selftests/net/timestamping en0 \
>          SOF_TIMESTAMPING_TX_HARDWARE PTPV2 IP_MULTICAST_LOOP
>   Receiver:
>   # tools/testing/selftests/net/timestamping en0 \
>          SOF_TIMESTAMPING_RX_HARDWARE SOF_TIMESTAMPING_RAW_HARDWARE PTPV2
>
> Before patch, receiver prints
>   HW raw -121948.050407424
> After patch, receiver prints
>   HW raw 1760648763.746974064
>
> Fixes: 069b142f5819 ("igc: Add support for PTP .getcyclesx64()")
> Cc:stable@vger.kernel.org
> Co-developed-by: Florian Bezdeka<florian.bezdeka@siemens.com>
> Signed-off-by: Florian Bezdeka<florian.bezdeka@siemens.com>
> Signed-off-by: Ding Meng<meng.ding@siemens.com>
> Reviewed-by: Aleksandr Loktionov<aleksandr.loktionov@intel.com>
> Reviewed-by: Piotr Kwapulinski<piotr.kwapulinski@intel.com>
> ---
> V2:
>    - update commit message(suggested by Paul Menzel):
>        add error log
>        explain why need to pass igc_adapter
>        add test case
>    - move variable declarations on top of the function
>    - Ccstable@vger.kernel.org
> V1:https://lore.kernel.org/intel-wired-lan/20260622041718.6106-1-meng.ding@siemens.com/
> ---
>   drivers/net/ethernet/intel/igc/igc_main.c | 41 ++++++++++++++++-------
>   1 file changed, 29 insertions(+), 12 deletions(-)
>
Tested-by: Avigail Dahan <avigailx.dahan@intel.com>

[-- Attachment #2: Type: text/html, Size: 3622 bytes --]

      reply	other threads:[~2026-09-02 11:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 11:15 [Intel-wired-lan] [PATCH net v2] igc: Fix RX HW timestamp reporting when NET_RX_BUSY_POLL is disabled Ding Meng via Intel-wired-lan
2026-09-02 11:25 ` Dahan, AvigailX [this message]

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=b1625848-4207-44a7-be1e-435afe483a4d@intel.com \
    --to=avigailx.dahan@intel.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=florian.bezdeka@siemens.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jan.kiszka@siemens.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=meng.ding@siemens.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=piotr.kwapulinski@intel.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=wq.wang@siemens.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