Subject: Re: [Intel-wired-lan] [PATCH iwl-next v1 1/2] igc: set RX hardware timestamps in igc_build_skb()

From: Kohei Enju <[email-masked]>
Date: Sun, 15 Mar 2026 23:09:48 +0900

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.