From: "Ruinskiy, Dima" <dima.ruinskiy@intel.com>
To: Kohei Enju <kohei@enjuk.jp>, <intel-wired-lan@lists.osuosl.org>,
<netdev@vger.kernel.org>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, <kohei.enju@gmail.com>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Subject: Re: [PATCH iwl-next v2 1/2] igc: set RX hardware timestamps in igc_build_skb()
Date: Wed, 18 Mar 2026 17:56:59 +0200 [thread overview]
Message-ID: <af824f5c-2fbe-411f-881e-cad581fde7d1@intel.com> (raw)
In-Reply-To: <20260317062205.39406-2-kohei@enjuk.jp>
On 17/03/2026 8:21, Kohei Enju wrote:
> igc_construct_skb() sets RX hardware timestamps, but igc_build_skb()
> does not. This has not been observable so far since igc currently does
> not enable the build_skb RX path.
>
> Set RX hardware timestamps in igc_build_skb() as well so that both skb
> construction paths provide the same behavior.
>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Signed-off-by: Kohei Enju <kohei@enjuk.jp>
> ---
> drivers/net/ethernet/intel/igc/igc_main.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
> index cad5a26cc84d..79192b02e6be 100644
> --- a/drivers/net/ethernet/intel/igc/igc_main.c
> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
> @@ -1964,8 +1964,9 @@ static void igc_add_rx_frag(struct igc_ring *rx_ring,
>
> static struct sk_buff *igc_build_skb(struct igc_ring *rx_ring,
> struct igc_rx_buffer *rx_buffer,
> - struct xdp_buff *xdp)
> + struct igc_xdp_buff *ctx)
> {
> + struct xdp_buff *xdp = &ctx->xdp;
> unsigned int size = xdp->data_end - xdp->data;
> unsigned int truesize = igc_get_rx_frame_truesize(rx_ring, size);
> unsigned int metasize = xdp->data - xdp->data_meta;
> @@ -1979,6 +1980,11 @@ static struct sk_buff *igc_build_skb(struct igc_ring *rx_ring,
> if (unlikely(!skb))
> return NULL;
>
> + if (ctx->rx_ts) {
> + skb_shinfo(skb)->tx_flags |= SKBTX_HW_TSTAMP_NETDEV;
> + skb_hwtstamps(skb)->netdev_data = ctx->rx_ts;
> + }
> +
> /* update pointers within the skb to store the data */
> skb_reserve(skb, xdp->data - xdp->data_hard_start);
> __skb_put(skb, size);
> @@ -2681,7 +2687,7 @@ static int igc_clean_rx_irq(struct igc_q_vector *q_vector, const int budget)
> } else if (skb)
> igc_add_rx_frag(rx_ring, rx_buffer, skb, size);
> else if (ring_uses_build_skb(rx_ring))
> - skb = igc_build_skb(rx_ring, rx_buffer, &ctx.xdp);
> + skb = igc_build_skb(rx_ring, rx_buffer, &ctx);
> else
> skb = igc_construct_skb(rx_ring, rx_buffer, &ctx);
>
Reviewed-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
next prev parent reply other threads:[~2026-03-18 15:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 6:21 [PATCH iwl-next v2 0/2] igc: enable build_skb path Kohei Enju
2026-03-17 6:21 ` [PATCH iwl-next v2 1/2] igc: set RX hardware timestamps in igc_build_skb() Kohei Enju
2026-03-18 15:56 ` Ruinskiy, Dima [this message]
2026-03-23 17:21 ` [Intel-wired-lan] " Dahan, AvigailX
2026-03-17 6:21 ` [PATCH iwl-next v2 2/2] igc: enable build_skb on the non-XDP small-frame RX path Kohei Enju
2026-03-18 15:57 ` Ruinskiy, Dima
2026-03-23 17:23 ` [Intel-wired-lan] " Dahan, AvigailX
2026-03-19 16:11 ` [PATCH iwl-next v2 0/2] igc: enable build_skb path Simon Horman
2026-03-20 6:05 ` Kohei Enju
2026-03-20 20:30 ` Tony Nguyen
2026-03-21 7:13 ` [Intel-wired-lan] " Kohei Enju
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=af824f5c-2fbe-411f-881e-cad581fde7d1@intel.com \
--to=dima.ruinskiy@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=intel-wired-lan@lists.osuosl.org \
--cc=kohei.enju@gmail.com \
--cc=kohei@enjuk.jp \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.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