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 D8E9FA3DA63 for ; Fri, 17 Nov 2023 09:10:59 +0100 (CET) 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=GrgI0M23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700208660; x=1731744660; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=WhnP0lJq58v8zQ5p/vd4vUkF9rRHeQbjOYQvVudcRaQ=; b=GrgI0M239IKGoRKOAIHxd0/EsxiuoPCeLc4fXZx24pcPvK3gc66vLwtH eOfdDqBP8Y/LYkcaJLL/bqbfSf3sE0T5JqJvAVPqXnDAkCod/WI9krIz/ qTE2G95rSTmN+z/Y9xwD0VO/mn9t09Q+JMXq3u6Rh/uVY81bCkclz+KBB 96oS8Wg14wQeD/QWlj8HdzBYc+hEDyI75bCaOwonKtwjJ8XtGAYnUtNqY Bw1/MwyIhnHErnGL1PbmO+Omc5ylqNsMjxr3443kUu6wd/ngF2P00kMnh F3vKTtg5AJTe4/PQ8Gg+DRp5KbDqOgMPEiV/bF2UXAeB2umf2jLDu2pdk w==; X-IronPort-AV: E=McAfee;i="6600,9927,10896"; a="391041753" X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="391041753" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2023 00:10:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="6950809" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 Nov 2023 00:10:56 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.34; Fri, 17 Nov 2023 00:10:55 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) 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.34; Fri, 17 Nov 2023 00:10:55 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Fri, 17 Nov 2023 00:10:55 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Fri, 17 Nov 2023 00:10:55 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c//RrIWqcXpW67H16KZvnn4+r2an/YP9c+IbAFvuNiJdYnIrNu9XwdKUjN1CTmy1zeO198orhNSW8jrQ+thAHy9laxZOBJ2MzBzcFvmPW98sdYlCQStMoJGPv7KwlRTjUmQ325iNPjgQsVbFOUu8tpaVYD7+cUHrdLumbuAuASHtYsjZyq5ac5CtSvfEIJSpuVegwl9wVCq9UD6n2HT14Do2ow+AdMUC/ZsiPueZBqpnPQjpIiJSFXKDdN5vGvryj03MV1x6tYDVV0LlK2nwVEPnnF0FHi0x4FH1JwDHZWNSTURYVOi3+ak8YpVKX2w7C0xBQ1QmHhUEXDOVe5gQjA== 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=RtTm7doOnENjl3wod9+c2z/ADgYuRiIKSsPI2Jb1CPU=; b=CpkmuZC7FXRBfbjr+feb8JeXhebeNMf3a/cCp1+urDSWdAVP8mFg2XcJK/Um2agbIosCvTjsVyB0dXHVKWPvjQ2XQUanLbzTJf9yPnX2Dh026pXziqgboNZw68IyZjTiYHZKSSYj/GP5RURl7veHAQur0N0Ee+/z07josF7g5zg+IsEJoyLYTVkqbXmUx+9N6Wm1w3zZKhCgQbeHUE0ed1wL39OjqS1d+pcG/TIKBo1/jLhtmjPnFuMYRpB1eHvFZanzm4hG8RtAh1ZT1tFNCfANQSOvFfZF5bLqWkeaqwmjmFh1oDWGhZ/ei7bUyDq1PmGdmld1kB1Qcq7CLSWjNQ== 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 DM4PR11MB6117.namprd11.prod.outlook.com (2603:10b6:8:b3::19) by BL1PR11MB5256.namprd11.prod.outlook.com (2603:10b6:208:30a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.23; Fri, 17 Nov 2023 08:10:53 +0000 Received: from DM4PR11MB6117.namprd11.prod.outlook.com ([fe80::ee54:9452:634e:8c53]) by DM4PR11MB6117.namprd11.prod.outlook.com ([fe80::ee54:9452:634e:8c53%7]) with mapi id 15.20.7002.021; Fri, 17 Nov 2023 08:10:52 +0000 Date: Fri, 17 Nov 2023 09:10:44 +0100 From: Maciej Fijalkowski To: Larysa Zaremba Message-ID: References: <20231115175301.534113-1-larysa.zaremba@intel.com> <20231115175301.534113-12-larysa.zaremba@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20231115175301.534113-12-larysa.zaremba@intel.com> X-ClientProxiedBy: WA2P291CA0048.POLP291.PROD.OUTLOOK.COM (2603:10a6:1d0:1f::10) To DM4PR11MB6117.namprd11.prod.outlook.com (2603:10b6:8:b3::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6117:EE_|BL1PR11MB5256:EE_ X-MS-Office365-Filtering-Correlation-Id: 401c6bdf-641a-446e-f065-08dbe744b744 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: QCPmhRcIVHI1rFYfWvKAo+bTjmb8YuTaHqrq4CB6JRTU1cdkJ7ccYCTmcbZBQi9K/n0RIU/L6M+64qw3GkamAzPlSbwrlcImleyqK0MKUxgiqaG1UmOWi+Wug9EiCUXFhR+QnlFkJc+d9lELvh5ZIhm+5gyCtbFM8PNCWx/ZdNCVWtXI6wb2Y+2LBkA1LrA/TNHZvMpHJYGpPInHkimA68OuIJok+stuPVu4d0T3olw9LiSJnVFD0jSDpWmUfRG04VSi3gGq67g3BK4CP9ADHLz3iCEWaBDrAZWBleGkVo8ER/djQzpYBVNQQ+BQDU8Fq5/KfBxMaArwKhhIH6Qar3H5yj29fo9xFlRTNWr7Iok09ubQvmBCWUhJ7xsIw1IPYUnt3igFRihG/0JTw5yCPPf2tu0Vcn7V+SCBioO0AVeQVDhYWpEt/bacAOXCkMYpGLyms4EFfz8I+QW9DIkiyvLooKHjNGXr1k/wj+PgfdqoOeZyulUjgEABblUtMf53MYTttsVRMj47sGywS5+KHiKb01yFjqcjPV2y/F6M20l1wtn3TW/4rhC8zVf0tj0dzBZqj05q1BBF3VX2kxoZ5X9SeRBFiYrqxpWqeuq2A4M= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB6117.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(376002)(366004)(136003)(346002)(396003)(39860400002)(230922051799003)(64100799003)(186009)(1800799009)(451199024)(26005)(6506007)(82960400001)(4326008)(6862004)(8676002)(5660300002)(44832011)(8936002)(7416002)(2906002)(66476007)(54906003)(6666004)(86362001)(66556008)(66946007)(6636002)(38100700002)(33716001)(478600001)(316002)(6512007)(9686003)(6486002)(41300700001)(83380400001)(67856001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?d29jrJm3+eThz5NmUHqs8VVNCP93+VZ0rifIqoCUKXEbrZxMLqFZSS3AMS+v?= =?us-ascii?Q?FZgga79Tsm4Fk2cbA44ASdSiZDxydtmaCK6MkVIKwCYjD5ShM+dVJkU9Ye8x?= =?us-ascii?Q?08RhuilEDGj9k/lbGcpRRb+lrMKVRUsgjBPBaj/msc1GnarlU+wAlguQBgFH?= =?us-ascii?Q?1VM3gQHiPMBOggVw/FKy3BhU5fbYHUrBT/Unsn2ya24wtHmwj+y5lMw5So31?= =?us-ascii?Q?twuA7OAeVbGL4+GSMbdKmvillcqPNDUYp/XIxSIXfcSPxb7E24zNbBfWKPEX?= =?us-ascii?Q?TgPtbGQbTqeX72Kdcvq0tgvDOvZoYXp17F1Vl+WwhUN6U6cJo6+mjdYfHUkf?= =?us-ascii?Q?r+TpK3vObEMMBLhv1qmmbL7QAqZLGDML/q/u04vh1ihSvB4VhZriHU0Qvlby?= =?us-ascii?Q?bEYzJGVcGzRJY3R7dtImkmtnN7iIdTbc25QN2FbdnjnfQjIQVDERDvhG23DR?= =?us-ascii?Q?H5NJwXXZL9/sPD7qNFacQ5az3VC306kMj6vA9tEl+XuwtOkzj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wMvJfCQE8beVOWJ1twSV0eYfZDEIDq5i/K5twsVFdpeOV?= =?us-ascii?Q?g7yLcjngo81SX1vKcoT3GDeoy1LjDMMb95BSgEyv6NPtnmg9SsPeqoIojzhr?= =?us-ascii?Q?37F3HBDER0ZOomgXe2GDspnPUrY5l9SkFWCdAsmDdp+VGRhB+BRebQ5np4K/?= =?us-ascii?Q?Al+4v0suoDjb7nygCnN1FuD303ujbDr4h2PAPb6cRZWsuKX43WI5nqon6VBQ?= =?us-ascii?Q?Og=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 401c6bdf-641a-446e-f065-08dbe744b744 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6117.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2023 08:10:52.2963 (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: myx6DB+JjPhmltZtKfYlqSrxXewZuuwSM3Tew4ZZmLYvxfsyQvr32uCd6ONnP0ifeFaKeK2bXEtoA3Sj4CtWTKvpuiXAFdNVuZPsbk+MyXw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5256 X-OriginatorOrg: intel.com Message-ID-Hash: 7EAGVKL7EOBUGARGVG3J4HSZOV5WK2AO X-Message-ID-Hash: 7EAGVKL7EOBUGARGVG3J4HSZOV5WK2AO X-MailFrom: maciej.fijalkowski@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header 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 , Tariq Toukan , Saeed Mahameed X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next v7 11/18] ice: use VLAN proto from ring packet context in skb path List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, Nov 15, 2023 at 06:52:53PM +0100, Larysa Zaremba wrote: > VLAN proto, used in ice XDP hints implementation is stored in ring packet > context. Utilize this value in skb VLAN processing too instead of checking > netdev features. > > At the same time, use vlan_tci instead of vlan_tag in touched code, > because VLAN tag often refers to VLAN proto and VLAN TCI combined, > while in the code we clearly store only VLAN TCI. > > Signed-off-by: Larysa Zaremba > --- > drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 14 +++++--------- > drivers/net/ethernet/intel/ice/ice_txrx_lib.h | 2 +- > 2 files changed, 6 insertions(+), 10 deletions(-) > > diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c > index 63bf9f882363..a1f5243299c5 100644 > --- a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c > +++ b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c > @@ -246,21 +246,17 @@ ice_process_skb_fields(struct ice_rx_ring *rx_ring, > * ice_receive_skb - Send a completed packet up the stack > * @rx_ring: Rx ring in play > * @skb: packet to send up > - * @vlan_tag: VLAN tag for packet > + * @vlan_tci: VLAN TCI for packet > * > * This function sends the completed packet (via. skb) up the stack using > * gro receive functions (with/without VLAN tag) > */ > void > -ice_receive_skb(struct ice_rx_ring *rx_ring, struct sk_buff *skb, u16 vlan_tag) > +ice_receive_skb(struct ice_rx_ring *rx_ring, struct sk_buff *skb, u16 vlan_tci) > { > - netdev_features_t features = rx_ring->netdev->features; > - bool non_zero_vlan = !!(vlan_tag & VLAN_VID_MASK); > - > - if ((features & NETIF_F_HW_VLAN_CTAG_RX) && non_zero_vlan) > - __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag); > - else if ((features & NETIF_F_HW_VLAN_STAG_RX) && non_zero_vlan) > - __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021AD), vlan_tag); > + if ((vlan_tci & VLAN_VID_MASK) && rx_ring->vlan_proto) > + __vlan_hwaccel_put_tag(skb, rx_ring->vlan_proto, Umm... pkt_ctx.vlan_proto ? > + vlan_tci); > > napi_gro_receive(&rx_ring->q_vector->napi, skb); > } > diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.h b/drivers/net/ethernet/intel/ice/ice_txrx_lib.h > index 3893af1c11f3..762047508619 100644 > --- a/drivers/net/ethernet/intel/ice/ice_txrx_lib.h > +++ b/drivers/net/ethernet/intel/ice/ice_txrx_lib.h > @@ -150,7 +150,7 @@ ice_process_skb_fields(struct ice_rx_ring *rx_ring, > union ice_32b_rx_flex_desc *rx_desc, > struct sk_buff *skb); > void > -ice_receive_skb(struct ice_rx_ring *rx_ring, struct sk_buff *skb, u16 vlan_tag); > +ice_receive_skb(struct ice_rx_ring *rx_ring, struct sk_buff *skb, u16 vlan_tci); > > static inline void > ice_xdp_meta_set_desc(struct xdp_buff *xdp, > -- > 2.41.0 >