From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by mail.toke.dk (Postfix) with ESMTPS id 0EAFFA2A1E5 for ; Thu, 14 Sep 2023 18:31:51 +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=N/XFMA4z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694709113; x=1726245113; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=jzenu2jYGbPBWtnlA1h++PnDfhV2KbUJl9bSa0TuY14=; b=N/XFMA4z95c7Y+56KPhn3j8RZnbA3R/BaQNY/OSA0s0z+xEHgGM0iR/K N5QlW91er2LjNH2MIX6yw2ud2Q2DkU5NvrQtvJOxX+W5WP4B5ycIvbx2a dPy3hdeBCSIs4yw7OkXTqzBD9xiAjH76KGvwD+V69QTJCldSiYKLeLPif TkdCQCujvzujgNkwlx18zmWS2nUBZitt6Y4HJHNz4xJAIuK3r+Rcb/dws JKdOJG7vZ674KkbdLIgLbkFlhZ1t4+Vl9fz0+AM8erqzSOeMNI82zjUsV DJF3bcDkoOAt6W/lGGzF+7Q7OHWReTZpl7B95KipYhBCe7m0ZM4G9bdA4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="377913526" X-IronPort-AV: E=Sophos;i="6.02,146,1688454000"; d="scan'208";a="377913526" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2023 09:31:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="814765202" X-IronPort-AV: E=Sophos;i="6.02,146,1688454000"; d="scan'208";a="814765202" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 14 Sep 2023 09:31:38 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX601.amr.corp.intel.com (10.22.229.14) 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 09:31:38 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx612.amr.corp.intel.com (10.22.229.25) 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 09:31:38 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.175) by edgegateway.intel.com (134.134.137.100) 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 09:31:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QiZsihE7cs9SHWOzDuBTr5er8uEg4Q5Yo1c9Jjb8+wadoGraF599+i8LYoNpJj2wyyMpLoHBj4e9pyOEx0mtq1O7/Ov5WV4DBE5Mh8CAbbR2uMjxMSeSC3ZC5jH7ZIGd+dY3X7iZHTR+D1WJhdw19IK92hEIypB3NUwxrQ6jhMQcDwNYdhoqmS2+lk1VGUDDXS1NmVODsG38g2wR2SW/48j4sGzpnW+YJ9spSI3R1RcruLHwKOz+FmWuqnFhcL0R/Pr8aIx5zh/uY+F2FcfvOjB33AqkPgUdkTRtSdzk0mwlW6a9pLTuUKg+E+IEMPMyfDaxTqVV/BALW9/B+Gr7yw== 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=+ibrxsXSKJSOzsyQQwK6THsSVMQ1l32bv8gLvJOapKA=; b=HPSIes5Lil41kTxhh5fCtjamO7qRMGBZXE3HUCh83O5JExfWcfrxNJXLwUu+4RiRJ6b7kEWVpQ25TpnK6WOMmNXdfWsxVNdyZuEl27BPV2agc+HVkIzyWJr2Soaxsmjfz/u1uix6K1A5nBBOVNFgL67w1l9y/BCZF1hN7gbZHiudFsl6lHzlW0btNcfjnpGEyypFLT+M69+OijmErJUFUtmQGrPNG1V5OTy/FwDR11Be+MDjRxe1mixQsQsYf+XimAV3sAyQU1cY5c2Fxh0FhUzfRej/YhpJwLaQlA0trmIsAhI5xTsffHlA81WGzAYdtb5gLo4FWVJOGOYHltljEw== 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 DM6PR11MB3625.namprd11.prod.outlook.com (2603:10b6:5:13a::21) by SN7PR11MB7116.namprd11.prod.outlook.com (2603:10b6:806:29b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 14 Sep 2023 16:31:27 +0000 Received: from DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::bede:bd20:31e9:fcb4]) by DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::bede:bd20:31e9:fcb4%7]) with mapi id 15.20.6768.029; Thu, 14 Sep 2023 16:31:27 +0000 Message-ID: <7bd185f5-13fb-692d-a0d0-95d77685e9f4@intel.com> Date: Thu, 14 Sep 2023 18:30:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Larysa Zaremba References: <20230824192703.712881-1-larysa.zaremba@intel.com> <20230824192703.712881-12-larysa.zaremba@intel.com> From: Alexander Lobakin In-Reply-To: <20230824192703.712881-12-larysa.zaremba@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR2P281CA0115.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:9d::17) To DM6PR11MB3625.namprd11.prod.outlook.com (2603:10b6:5:13a::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR11MB3625:EE_|SN7PR11MB7116:EE_ X-MS-Office365-Filtering-Correlation-Id: 252ff9aa-3ec7-4379-b50a-08dbb5400b2b 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: mRe4V0A5PMgsvF6KcYaKbinbazJJsXyPcYX9YWHub5BVxqJOTpAmrtgsjUNeGU3byQfA/Ksw275+jwYcMcOriayzn743JyppxGIVQnWQIN75S/aAj/5eGhysI+A/38b18ScBE5Na9ZEM8j+Zh1leo/YTTBr3CoGjvq81it16PBydr5/C8hLDFyQlXukKgDbHF3MT3fzRWXsCw4sQtXL4ejghfsEIrvtdpcPL3bxs0qr5nuYnPoPcP3D8ckt0aAZi+MkfJz/YUTZquiMIVlxdqF1KAnoUDSPk4qhEhYvvnRIZA7zS2AcXIfjop2oDNns1MFmmeRLbZydIhBl9PYyp76OmwUPcXL4yGAYKiBDSeMRzZuEP/CE0DqnsuN1gpwCH8uOAx5yzF3T6zy7z32uk7EGZdPKp3aMZyvFCgGJVdIfRwpE0i+7lkXfHwGxUgnvv7dHOckrRcE8c6HlfFX8MioZUvvonDG4q+hrIcXXbhTlvm2Kbyisl30Z55mFp16gsC2jfLTXrfJ18a8aXqyBmnlxJ4Weu1nvsoJ8Htbev1nzn9i/wMx1OOojAjw4jzlwzj6cOcuRp0w3dBHTvi8rctfkh2/+dEosqOJ5AmnHju2WXYK9PxRyAYlymAxmru8Gu6SENgvWZolXXVIO4viNW+w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB3625.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(346002)(39860400002)(366004)(396003)(1800799009)(451199024)(186009)(2906002)(6862004)(6486002)(26005)(6512007)(66476007)(6666004)(37006003)(54906003)(8936002)(6636002)(66946007)(316002)(8676002)(4326008)(5660300002)(41300700001)(6506007)(66556008)(7416002)(478600001)(38100700002)(82960400001)(2616005)(31696002)(36756003)(86362001)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cmwvakl3bjNSa3FPYmJUVXVlcjJjMmNQM0NYYUkvaU1xUHYxNFlSMUZnZ3Rn?= =?utf-8?B?dnhDaVFiZnBkTEQvZldRQ1YzVU5YeDBIaEhpaEk5VUJqT0c2Y09HUi9ZcnBu?= =?utf-8?B?R2Y4ZHkvSFZKVmZGMWFGaERGZTlGb2V6SzNPOUNGZzhPZk1zNkd6clo3b2l1?= =?utf-8?B?MXF5OFd4ZWw4Sm5aNFBtdlo1UEZmLzVhMGdjV2hRMzhoSVdRdVhJTjJybnY1?= =?utf-8?B?cWJTa2l1bWpacFczbGt5VkxSdTRpeVd0ZFlzeDB2TUNoTjdTRlJySWp5U2Zz?= =?utf-8?B?QTZmZXFuZ0YxY1YvdHo3OWhmRi9yd1F1TFZkZ2NnRmJvbDZFb1FtZ1hkeXY2?= =?utf-8?B?Z0JVOTg1OEwwMW95Yis4enJrakE1RmZXM2hRLzdiekplSkNHMGo3akNJaW8w?= =?utf-8?B?RTAwRVNIZmo0emZOMkRjU3JjZkMwRGNodGFQTG9McG1mY3V6RHR1REswZmNx?= =?utf-8?B?aStrUDdhQ1QwV2JLW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f-8?B?TUk5Y2dERUxBNThxbjlESVRpaDJJSTg1R0dka2h3RjlTZ1BXR3E2Z2ZlZFor?= =?utf-8?B?MTRQTm9YeSsycGRaVFpVNHBibEhvZnJzd29PTTlJcXJGbzViUElNc3h0WXN3?= =?utf-8?B?bjNUaHdEeFQ0eVkyQzFsYmxzNzI5MXFqbWduK3N4M3Fjd0RjejhpZEo2WXpV?= =?utf-8?B?enoyNlUwNTQxK0FkM2tmQlJuNndVR2poLzlZWHJUczlwWWs1a2plUUVPVndE?= =?utf-8?B?TDJPU0FWZTVUUHhjdDRIaWJsK0tocytrcVNpYkVDQUc0cWRNdkwvNnZHSSti?= =?utf-8?B?TFlQV1ZvckJnZHhYWVFFVzJyc1cwd0hpR09ZdEJ5dExkUlduRGk2M2dqUnRW?= =?utf-8?B?M1dlcjNibW9hS01CT1VaaTdUUE5kODljNTBYYk1GbUlCY05EV2F6YTUzOTJx?= =?utf-8?B?WVhmYUE0ZjIxVnFxRENVc0twU2hadCtKclhZeXl5QnpkV25PQTlrMnA2Y285?= =?utf-8?B?eHlHcVZEd2M4UUdRUG8zT1l6R0N4c1dvMmYrVzI0ZnQxcTNRMEt6SmhrU0tk?= =?utf-8?B?SS96dXVEMXIvSmVrWm1SNytsS1N3T1VscFdCRU1PNWxzYWYwWUlwOVRrR01Q?= =?utf-8?B?bElHNGl5WU9YNSt2WVdKbkxnOWpoMk1IN2NST0lIY1pmVEJsU2J6a0k0ek9C?= =?utf-8?B?K1VaZGszbWpxM1RTYml0YlM4UXVnMmdVM0FHSVdhYmEzNEtVT1BQa3BzcDV5?= =?utf-8?B?THQ5Y3lZZVoyd2dHajJxZmhBckFCajgvNnNBLzhhU1BObnNsT3psSFlUelBv?= =?utf-8?B?YlE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 252ff9aa-3ec7-4379-b50a-08dbb5400b2b X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3625.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2023 16:31:27.5775 (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: Y51fpJcQoqIaoGb0x5v7ADxQcEwOAi4CcQJHZlheocmiKVRdL82lG3eS6pAXRVbOTuYWLE6k9L1DGt/fmOh/zyR4cHzUZqsCA1xjvbuLF9I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7116 X-OriginatorOrg: intel.com Message-ID-Hash: SGVAUL4KTHXDBNZUCF2VIBXNOVPOPO62 X-Message-ID-Hash: SGVAUL4KTHXDBNZUCF2VIBXNOVPOPO62 X-MailFrom: aleksander.lobakin@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 , Simon Horman , Tariq Toukan , Saeed Mahameed X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [RFC bpf-next 11/23] 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: From: Larysa Zaremba Date: Thu, 24 Aug 2023 21:26:50 +0200 > 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 is misleading. [...] > 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->pkt_ctx.vlan_proto) I'd wrap the first expression into ()s to make it more readable (and no questions like "shouldn't these be three &&?"). > + __vlan_hwaccel_put_tag(skb, rx_ring->pkt_ctx.vlan_proto, > + vlan_tci); > > napi_gro_receive(&rx_ring->q_vector->napi, skb); > } [...] Thanks, Olek