From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by mail.toke.dk (Postfix) with ESMTPS id 6CBA0A2A28F for ; Thu, 14 Sep 2023 19:09:19 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=YiQChDRx DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694711359; x=1726247359; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=jCJN0REaZl66sDijyA9z8Wg8CwhiRyn9woFhGTNwGt4=; b=YiQChDRxiesMSF/nG4pZ5Wvj/Qppt3XcPUWDcHlfR4kGG3a6gTO153bQ L0ibwBD8sMO+hxp4srG4d5imErQrFux+jc433V0e9UDJUjluXwtqpGirW Xb/5OwYhAEuGam0Uv9KwWsIe/156ODb6wncA5AbpNO/XxjlyX+86urFju DA7uR4w5fX5CUUCyHCH6lEsEu/SOxyOGx0zDFirjObZ59s42AM4vU852e FZ22LERbEazmMYf4fObgai9PC7WZgLYWyalBZMWsSpKJMiIl5vAmjyqkA 1pRAbklWoJtNDiElBGNkfKDSM1XE3fq0gK81En5og6GbhfGkrGFgz5MwI w==; X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="378937510" X-IronPort-AV: E=Sophos;i="6.02,146,1688454000"; d="scan'208";a="378937510" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 10:08:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="868321051" X-IronPort-AV: E=Sophos;i="6.02,146,1688454000"; d="scan'208";a="868321051" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 14 Sep 2023 10:08:45 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Thu, 14 Sep 2023 10:08:44 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Thu, 14 Sep 2023 10:08:44 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Thu, 14 Sep 2023 10:08:44 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.174) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Thu, 14 Sep 2023 10:08:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YfwMG6VnBKvfIcxhEjIvgCBTsHZ+WuDiJq+5SHFhZMW43A/ykfcX5XBLMeKffesZmutSvRU+p45KsujxM4CR6UxStszp4Hx26Wa5n/DItqYIDbcCPuITHlEKxi9CVElYn8QAdQgpe0fdVWgAVz0XCSf3bFeHpd/0ZVt8/ODAIeoryOAaYtSfZtzLZ2qUIPHDNbp081c0KOuNyg6RKgbqaWp+Je+56yWughYZRhZ+U7h/+ufbwChG/xJssk73nlL4biFHIgGlJ0zv+48MI8Xp3kp+Y7T4XcFEbjJOn9InskI5sjH2io+B91QQ+2GfgM45VyAXvExF5XMJsUManM8cwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KpFkZpM+7e817s2zfgMCTa/yhkR/Gjh9CwgpTXQa4jk=; b=dxcUyq+rbDY8ViaC+FB3LMZyu7GSjxa+eHRmec61kB99XkQKg0k9zBWnPx2hdkMl4xspeLO2SQ7LYKQ9XV2D1IZRx/7N+wOpvgFti2PSEZlBARIjWwj3xU1lV0W9C7xFGwkVLuRmyi3xvm1fp7dzBKK8Upn+uzxWNZGU939SLJzvqPG51cb2j9sBuhvM1NcM/FKUc9+Du3LOBRYohSn0ivVy8cmaYvWftrlgBtWBF+HAXEGqQyQTnpjhK9SMmnX0ln8hKlPo6wbeRpzVQrrvxhPsrEhNpOd8GPEJ9qZSfYGqsXymnKt/oD7WpSomf5o4+2Pjbf+m2P5qFts5kECC0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SN7PR11MB7540.namprd11.prod.outlook.com (2603:10b6:806:340::7) by DM4PR11MB6408.namprd11.prod.outlook.com (2603:10b6:8:b7::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.31; Thu, 14 Sep 2023 17:08:40 +0000 Received: from SN7PR11MB7540.namprd11.prod.outlook.com ([fe80::10f1:d83:9ee2:bf5d]) by SN7PR11MB7540.namprd11.prod.outlook.com ([fe80::10f1:d83:9ee2:bf5d%3]) with mapi id 15.20.6768.029; Thu, 14 Sep 2023 17:08:40 +0000 Date: Thu, 14 Sep 2023 19:02:56 +0200 From: Larysa Zaremba To: Alexander Lobakin Message-ID: References: <20230824192703.712881-1-larysa.zaremba@intel.com> <20230824192703.712881-11-larysa.zaremba@intel.com> <0abb29d7-fcad-c014-ea06-c7ec9460245e@intel.com> <3f8f0fd8-b75c-5666-797b-315ebb632ca2@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <3f8f0fd8-b75c-5666-797b-315ebb632ca2@intel.com> X-ClientProxiedBy: FR0P281CA0060.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:49::17) To SN7PR11MB7540.namprd11.prod.outlook.com (2603:10b6:806:340::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR11MB7540:EE_|DM4PR11MB6408:EE_ X-MS-Office365-Filtering-Correlation-Id: 396e2884-47a6-4611-916c-08dbb5453cad X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sCirvlR3yfH4JRzyFt0xsVfzz1t37EdtW6V7hfCjTcbTHWaFonUszU8ZIS0PQCDEtah8XXVQ/x59KtNo9R/5PROaD/ozPyDgBdv08T3P6cofvc8bxRDUnCvt2EJuiOeC4wLYDTYmot1VrUmsTi9PG15jH/9pGhFFQ4PQ0++sOzJqHCyr/omLAGX+Zr5YKLQ7SdMz7QR8Nji3Z8xPD4o3xXshqX6HQ0Uga3jMorLeCrIU7AIhJbcc4ImhNEv2bMttBSynsLu1z+0pmfvAEEBoik5ljph4cf89IviMbODykm0qlOnHTf50ySzQ4g+cS8rpXBB6Sar+VhvPzWgL71SkxcoualSldSzv9GIvCdqkXyCVuAYIBaigm+J7jbRufj4TNvcr+ZuPYBK7i1fJOF9UyYaC/fLodj92eFUEACNQCqFA5vj3UCSwMomBWJB+do3N5HAWUb5QrLzyanQx9aeoyACMtXcKKGlHNEfNbXYzHyJhelSU7wxJT8pMXI6d65tUKIr1eyOhOak7aPxlTyA3m3fhhl6zHIZrsN/OYAImfh59lxGt2JWGRR85shmdx0Ps X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR11MB7540.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(39860400002)(346002)(366004)(376002)(136003)(396003)(1800799009)(186009)(451199024)(7416002)(6666004)(6486002)(6506007)(6512007)(9686003)(66556008)(2906002)(41300700001)(44832011)(54906003)(6636002)(33716001)(66946007)(5660300002)(4326008)(26005)(66476007)(6862004)(316002)(8936002)(8676002)(82960400001)(86362001)(38100700002)(478600001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Y3vI2uxb1R9lq9lHBioNjcBRPoXlP2VkdvjpaZMmZTAZoKaA5O77kJHluneC?= =?us-ascii?Q?h0PaZgjmpYmBV7NyA+PyAyb/odnlkY613XKcVIytrExYIrcQHdTZ+mSiLgid?= =?us-ascii?Q?9o4eDvb2/gj7KJ07A5tla/9SDt8i/nxrkE3fMr4sb6sKKi8VXNYwk4KKE7kv?= =?us-ascii?Q?pwjZM6DOQWmlMRWMFH05pd4GH1TN0VqwiGLFw28/7aexZbPWiDsiii/gWAQS?= =?us-ascii?Q?ZYJYOVadOc7Ug0TVQQpVoYek3xn2eZDtDxLiAUb92Fv2TpqlnQ/tSc3XSP7f?= =?us-ascii?Q?djTaR2QWiYuoPY3UD6s4rewDiyPr6VBnnaS7JpOFe9rz/mEqQr62PiZ9+NNS?= =?us-ascii?Q?1p4VPcNeICBHCcfPK3DiCu5l6TF/iR0PXcN009jS/OuNPO1du3L0Qqr9KC0g?= =?us-ascii?Q?H1hNOok6JKGnE9IMrIOpmRSn2S086Eg0hpozTvhnBnOsEUbDmwXW5V3LbA2x?= =?us-ascii?Q?HE8JpjMvQPBxl53I1ySi+G+ihGUt2sRpzsOH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QRRHjbwoRJ8RFTwhw0FGiNkbhc2uF53weZTwnMNdyxkPvw+Ra?= =?us-ascii?Q?HQ1plKB4c5wRPIIPY6GP/proeDZhOlmpGhXBt0uIuKdu2r3yIbCwwgr3dD46?= =?us-ascii?Q?nH2qzdDisA8DveJqactZdJSJwWW8KjW6YD86UnUynD+1XRrs3av9SogMQUGa?= =?us-ascii?Q?sR1bh9Cy0sxF6xiQbsInYil+QkSvZqG04XmvDJ6KqimmYFyHXyJzXkda4ZGE?= =?us-ascii?Q?NQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 396e2884-47a6-4611-916c-08dbb5453cad X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB7540.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2023 17:08:40.1474 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +Qvr0mqtBl6RNurACy18el8DvRDWe4vokimsZ3mMbPixobiIjAoUO5UOm5s/pk+4wybebLK+GCJs4j2mqBOf4Ns4f4KZH9zoYg+Pyjm4bC0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6408 X-OriginatorOrg: intel.com Message-ID-Hash: 4HUOJLSVTVF6PDHRFMEY4KV22X47635E X-Message-ID-Hash: 4HUOJLSVTVF6PDHRFMEY4KV22X47635E X-MailFrom: larysa.zaremba@intel.com X-Mailman-Rule-Hits: member-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address CC: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, David Ahern , Jakub Kicinski , Willem de Bruijn , Jesper Dangaard Brouer , Anatoly Burakov , Alexander Lobakin , Magnus Karlsson , Maryam Tahhan , xdp-hints@xdp-project.net, netdev@vger.kernel.org, Willem de Bruijn , Alexei Starovoitov , Simon Horman , Tariq Toukan , Saeed Mahameed X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [RFC bpf-next 10/23] ice: Implement VLAN tag hint List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, Sep 14, 2023 at 06:38:04PM +0200, Alexander Lobakin wrote: > From: Larysa Zaremba > Date: Thu, 14 Sep 2023 18:28:07 +0200 > > > On Thu, Sep 14, 2023 at 06:25:04PM +0200, Alexander Lobakin wrote: > >> From: Larysa Zaremba > >> Date: Thu, 24 Aug 2023 21:26:49 +0200 > > [...] > > >>> +static void > >>> +ice_set_rx_rings_vlan_proto(struct ice_vsi *vsi, __be16 vlan_ethertype) > >> > >> @vsi can be const (I hope). > > > > I will try to make it const. > > > >> Line can be broken on arguments, not type (I hope). > >> > > > > This is how we break the lines everywhere in this file though :/ > > I know and would really like us stop at least adding new such > occurrences when not needed :s I think with such minor stuff, it is more important to keep style consistent in files. > > > > >>> +{ > >>> + u16 i; > >>> + > >>> + ice_for_each_alloc_rxq(vsi, i) > >>> + vsi->rx_rings[i]->pkt_ctx.vlan_proto = vlan_ethertype; > >>> +} > >>> + > >>> /** > >>> * ice_set_vlan_offload_features - set VLAN offload features for the PF VSI > >>> * @vsi: PF's VSI > >>> @@ -6049,6 +6066,11 @@ ice_set_vlan_offload_features(struct ice_vsi *vsi, netdev_features_t features) > >>> if (strip_err || insert_err) > >>> return -EIO; > >>> > >>> + if (enable_stripping) > >>> + ice_set_rx_rings_vlan_proto(vsi, htons(vlan_ethertype)); > >>> + else > >>> + ice_set_rx_rings_vlan_proto(vsi, 0); > >> > >> Ternary? > > > > Would look ugly in this particular case, I think, too long expressions and no > > return values. > > ice_set_rx_rings_vlan_proto(vsi, strip ? htons(vlan_ethertype) : 0); > > ? > > [...] > > >>> - vlan_tag = ice_get_vlan_tag_from_rx_desc(rx_desc); > >>> + vlan_tci = ice_get_vlan_tci(rx_desc); > >> > >> Unrelated: I never was a fan of scattering rx_desc parsing across > >> several files, I remember I moved it to process_skb_fields() in both ice > >> (Hints series) and iavf (libie), maybe do that here as well? Or way too > >> out of context? > > > > A little bit too unrelated to the purpose of the series, but a thing we must do > > in the future. > > Sure, + > > > > >> > >>> > >>> /* pad the skb if needed, to make a valid ethernet frame */ > >>> if (eth_skb_pad(skb)) > >> > >> [...] > >> > >> Thanks, > >> Olek > > Thanks, > Olek