From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 85D0BF3026A for ; Sun, 15 Mar 2026 14:10:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3194440B56; Sun, 15 Mar 2026 14:10:24 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Ez_CsXOADUJc; Sun, 15 Mar 2026 14:10:22 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 42E1840B3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1773583822; bh=RcLrErX1O4pkT2Qd0Kt1wtzixyuWXIGtCs14H59Vd08=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=SNSBKxMfvAy760nfVMSSgtX6+vrv0D01GdXxn2KJSPiY6sc45cRR5KlfQXw0PYA3Q VXy0B1QNODbRU901hX18Cqf0TS+jFUpb+L62V2QQbuhjRTh7t3E4dRQAmIcFiaaPhu zQaI6tGJqkugruEBt1Y9blvKavDdmJ03noyoNQdm7NuO+j80oP4qHcZiVVohyVl8PD 3NSc6d1JK62OMCrHjMmMLGqMbTnNzJ+UBIQc3M43AZz5dWq5pRUI5XX0u3d1dwP2fP f2jYSRDnyHLp2uB98DpjwNsnODSc/w/bGadGFGn8z39lj2RGHEz9LuiAsx4YPi3mXf rNcoB70UD9wJw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 42E1840B3A; Sun, 15 Mar 2026 14:10:22 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id 45D081B4 for ; Sun, 15 Mar 2026 14:10:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 379B68236A for ; Sun, 15 Mar 2026 14:10:21 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id XDoWY334rbTj for ; Sun, 15 Mar 2026 14:10:20 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=49.212.198.91; helo=www2881.sakura.ne.jp; envelope-from=kohei@enjuk.jp; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 147048231F DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 147048231F Received: from www2881.sakura.ne.jp (www2881.sakura.ne.jp [49.212.198.91]) by smtp1.osuosl.org (Postfix) with ESMTPS id 147048231F for ; Sun, 15 Mar 2026 14:10:19 +0000 (UTC) Received: from x1 (168.25.31.150.dy.iij4u.or.jp [150.31.25.168]) (authenticated bits=0) by www2881.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 62FE9mRs025689 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 15 Mar 2026 23:09:50 +0900 (JST) (envelope-from kohei@enjuk.jp) Date: Sun, 15 Mar 2026 23:09:48 +0900 From: Kohei Enju To: "Ruinskiy, Dima" Cc: "Loktionov, Aleksandr" , "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" , "Nguyen, Anthony L" , "Kitszel, Przemyslaw" , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "kohei.enju@gmail.com" Message-ID: References: <20260307182808.155027-1-kohei@enjuk.jp> <20260307182808.155027-2-kohei@enjuk.jp> <25df2a93-07c8-477e-9717-fb4a815cff2c@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <25df2a93-07c8-477e-9717-fb4a815cff2c@intel.com> X-Mailman-Original-DKIM-Signature: a=rsa-sha256; bh=RcLrErX1O4pkT2Qd0Kt1wtzixyuWXIGtCs14H59Vd08=; c=relaxed/relaxed; d=enjuk.jp; h=From:Message-ID:To:Subject:Date; s=rs20251215; t=1773583790; v=1; b=YXZpGz/XTHPMvGFL9MKXfc/wBYEcHYF9aPl9MKrn6PgZcv1VNLWwwjptSe9SNY9o e3sCICn5ZJqWeYnejX0Lm7IFi0bGoPThpSLVLmYQ0D6J9FEO88rBr7/ecwwKbYoH kADFsD6cMIHee9Frk7LXOv5cRwCxe9scKpAbgoUIhYhkf6fXppz/KcNz80ipF0Wx bIWYGCXE6DasmIRJCvLmQVwlLSM/b9C9TcOE9789BcaUrJhLN3Nan9zrmB5AmojY f9fq038F4iNf09EZfaFxOOM/eWkfDMGwjq38I0y+L02WelZ7MMsiclJHlZgFMmqC w2Z47VWjlSLstnvbulfkVQ== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=enjuk.jp X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=enjuk.jp header.i=@enjuk.jp header.a=rsa-sha256 header.s=rs20251215 header.b=YXZpGz/X Subject: Re: [Intel-wired-lan] [PATCH iwl-next v1 1/2] igc: set RX hardware timestamps in igc_build_skb() X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" 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.