All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kohei Enju <kohei@enjuk.jp>
To: "Ruinskiy, Dima" <dima.ruinskiy@intel.com>
Cc: "Loktionov, Aleksandr" <aleksandr.loktionov@intel.com>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
	"Kitszel, Przemyslaw" <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" <kohei.enju@gmail.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v1 1/2] igc: set RX hardware timestamps in igc_build_skb()
Date: Sun, 15 Mar 2026 23:09:48 +0900	[thread overview]
Message-ID: <aba7x6y1uuSp--tH@x1> (raw)
In-Reply-To: <25df2a93-07c8-477e-9717-fb4a815cff2c@intel.com>

On 03/15 15:56, Ruinskiy, Dima wrote:

[...]
> > > diff --git a/drivers/net/ethernet/intel/igc/igc_main.c
> > > b/drivers/net/ethernet/intel/igc/igc_main.c
> > > index ebd831a4ff53..3a4c1ebe4faa 100644
> > > --- a/drivers/net/ethernet/intel/igc/igc_main.c
> > > +++ b/drivers/net/ethernet/intel/igc/igc_main.c
> > > @@ -1964,13 +1964,16 @@ 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)
> > >   {
> > > -	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;
> > > +	unsigned int size, truesize, metasize;
> > > +	struct xdp_buff *xdp = &ctx->xdp;
> > >   	struct sk_buff *skb;
> > > 
> > > +	size = xdp->data_end - xdp->data;
> > > +	truesize = igc_get_rx_frame_truesize(rx_ring, size);
> > > +	metasize = xdp->data - xdp->data_meta;
> > > +
> In the spirit of consistency, would it be possible to restructure the
> variable initialization to match that of igc_construct_skb()? Initialize xdp
> first, and then all the size variable inits can stay as they are. It would
> make the net change smaller.

I followed the reverse christmas tree convention used in netdev, but
your suggestion make sense as well.

I'll make that change in v2.

  reply	other threads:[~2026-03-15 14:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-07 18:27 [Intel-wired-lan] [PATCH iwl-next v1 0/2] igc: enable build_skb path Kohei Enju
2026-03-07 18:27 ` Kohei Enju
2026-03-07 18:27 ` [Intel-wired-lan] [PATCH iwl-next v1 1/2] igc: set RX hardware timestamps in igc_build_skb() Kohei Enju
2026-03-07 18:27   ` Kohei Enju
2026-03-10  7:43   ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-03-10  7:43     ` Loktionov, Aleksandr
2026-03-15 13:56     ` Ruinskiy, Dima
2026-03-15 14:09       ` Kohei Enju [this message]
2026-03-07 18:27 ` [Intel-wired-lan] [PATCH iwl-next v1 2/2] igc: enable build_skb on the non-XDP small-frame RX path Kohei Enju
2026-03-07 18:27   ` Kohei Enju
2026-03-10  7:44   ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-03-10  7:44     ` Loktionov, Aleksandr

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=aba7x6y1uuSp--tH@x1 \
    --to=kohei@enjuk.jp \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=dima.ruinskiy@intel.com \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kohei.enju@gmail.com \
    --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 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.