From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mail.toke.dk (Postfix) with ESMTPS id C1940A06F98 for ; Mon, 15 May 2023 17:48:50 +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=FH+ItwMG DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684165730; x=1715701730; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=3mQZ7SnAbvZPcYFXJjkGRwzOfYXinWUlTjKwZvaNiq8=; b=FH+ItwMGc6xLQtAzBwSGFq+FfzsG/ZDak1du4KBEShrNNw8x0ee/zPeP hYpZuNmB1yGZFAJ7gm2OzqP/kdplI2m98ykKEnRGyIJa4HbD8hUM7lyta Wa3sO2sAQL5t5LbNunofPee7ojDRKcjnSS3dZWjzYa70PxY6iCjhC7lLi qC3lWvNWTrMoxLk+AmkYkJtMEvQ3c4cSOOXhLGzHoSztw9ZEFPKgUA03G Pm8U0vMTRyWw/H8PXm+9laC9utCuMQpw4cTy5joivEqi9kDIgsSo3MzNX xj1ufB4naXjkqJqeF3ZWqtqMLCfDqb0BL1LLffgD30GhPitO//DR4cr8g w==; X-IronPort-AV: E=McAfee;i="6600,9927,10711"; a="340589659" X-IronPort-AV: E=Sophos;i="5.99,277,1677571200"; d="scan'208";a="340589659" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2023 08:48:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10711"; a="731675824" X-IronPort-AV: E=Sophos;i="5.99,277,1677571200"; d="scan'208";a="731675824" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga008.jf.intel.com with ESMTP; 15 May 2023 08:48:47 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 15 May 2023 08:48:47 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.23; Mon, 15 May 2023 08:48:46 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.23 via Frontend Transport; Mon, 15 May 2023 08:48:46 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.102) 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.23; Mon, 15 May 2023 08:48:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l74XF8qoovh5Gtrdd+7duud+PRzc+G3vrHg8eDY+MwallEma0vLYq3ZvMwLTAjw0sNkH0Rp7vFd+4UCQI01QDN/6c1v9IayWcjHDkI04I3Z2im1vGG41qWj0lG8B7A7cXq9U8fFZFLvzDH2Mcfksr5wroNnV0rJssovHfXXpTpJ0w9u2Pt17XZU9cJO5Lk9Zo2m9SXp14Ss4PRrEQIkRnVBUylydxALMPyb9PpwRwkHmvgQjMAy8W2nQsBeo5RPiDN0V5VfwPIG+qsLdKQJkI6HNjQVfhdb/N227ST3L0KVqKWkBCtvwUxa40fbjhlHigULQZykdMnPe/LRG0oTYpw== 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=ssSIUrVPp5bcxQ9LaSoN0JHOXfX88KS7ReFe3w7ISlU=; b=lGyaFT8CgorlKLs360N4dzjBrMxORxhQ1k0/J24hRqCwJFtzB/MU/uvtJC95fxyJYS9dfu3urQcASMwvojQ8y+2bA+2DR03DKvt7iXO7xyPaFYdcv16ak4IcorL8LXRte8kK9M+uhaCostX0jWV7nP6nFHLnVpECRPBvsK7jbycLsonSOEfI70cb+bt3/ASMbWEbvwqdUNDSALIAmwFySCOJetHxrURATcE3klqFWXXNtthIZG/girOs24uj7LmRQVXDuuT2FpvxtYkkK6vN/Uo7RFCa/ZNUoJzcHgeZV7gyGKUgaWVFwow09O0gYSYsTH/WsNWafNIeOOvtsGarEw== 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 DM4PR11MB5471.namprd11.prod.outlook.com (2603:10b6:5:39d::10) by DM4PR11MB6480.namprd11.prod.outlook.com (2603:10b6:8:8d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.30; Mon, 15 May 2023 15:48:39 +0000 Received: from DM4PR11MB5471.namprd11.prod.outlook.com ([fe80::907c:ffaa:352a:8913]) by DM4PR11MB5471.namprd11.prod.outlook.com ([fe80::907c:ffaa:352a:8913%6]) with mapi id 15.20.6387.030; Mon, 15 May 2023 15:48:39 +0000 Date: Mon, 15 May 2023 17:45:54 +0200 From: Larysa Zaremba To: Jesper Dangaard Brouer Message-ID: References: <20230512152607.992209-1-larysa.zaremba@intel.com> <20230512152607.992209-11-larysa.zaremba@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: FR3P281CA0117.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a3::8) To DM4PR11MB5471.namprd11.prod.outlook.com (2603:10b6:5:39d::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB5471:EE_|DM4PR11MB6480:EE_ X-MS-Office365-Filtering-Correlation-Id: 62f2ab86-d7ab-4f9b-d0e2-08db555bd9db 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: YRTQGirnJlopIJ7kKt8hTpwb/XGhNCdrfZjBwEpvCtsj7H6rK4MCfe+EfANmY1X3vkJGlh2ZRHX2f2toX4TSssz6V/JS9Iubg4kjX16cxZQpP7GyeRKs2yqkwKe5svZXrg5FRZz+3ur9M3NwhMilbOkHM+2xrBA19mM9cITmk+miFq0Foh1di0massZrJZ3RhESD+zKVCxx8pSOAi541fNaMJJACcqJuEvKty0qbhU6HntWrPnxHX2q2IVygAuqYM4kk6cjECXHOo80WHinoaj8DRVmwxspGhXleleFkErYdlJFhFs4yr1vlmiusx1qZusq/e9yxUyEXdNHjfitaF4fE8zIOzsqxwasNnTtg9zo4KV4pXv5z33+CwtW1QFVVPsmNozPKo23dN3v13G/bhG9ePiBzdec4mOCHXDrVKt/TQgLbtLiIgFjXqcuOszOLiDonIYnkz0+LUixWADawhMHZAPLHspWqZ5Y/PloRjTRv7ceChbr4tUizXM1QaHj9Dlz88TFqN+VTLN0xRm3Nuf9Gj1RBT6R5SBGhag9KroSLafuXWdfuitYGe2rVqThF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB5471.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(7916004)(136003)(366004)(376002)(39860400002)(396003)(346002)(451199021)(33716001)(83380400001)(66476007)(66556008)(9686003)(66946007)(6486002)(26005)(6506007)(6512007)(478600001)(54906003)(6666004)(7416002)(186003)(44832011)(86362001)(8676002)(8936002)(5660300002)(2906002)(41300700001)(4326008)(6916009)(316002)(82960400001)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?lc5vbAsLotNMDVYSysp/hJFv6ZPFc8zOK06mDJsB0GiJDvzRIiAuZX80Blu0?= =?us-ascii?Q?WNVvV6xLSG+gO/JwdjEFEYDFwR4ICl+DEcqeFvnwsy9q2NXFYEFFZkRSPXIG?= =?us-ascii?Q?GBKxK8XiynlVLQ2rJP3HgNRmafAgPCqfMJGICI8L2ih5OAX0fLylsDan9VxG?= =?us-ascii?Q?k1dO8XCuZgs0T2EomvFCKoCbeFPLn9PudC8BCzScxHM2Np7tnvfgE32PU+UK?= =?us-ascii?Q?bGiic294+wd3IemAo5QdVrP/I6278PHwGbs9x70I+ItnhYtHeWbvclFfsQw5?= =?us-ascii?Q?KqVFJCoetHGp49vztz32lpE3hnCwcLB4fsV/m5VcOljRdC0B3usSiNIphOM0?= =?us-ascii?Q?D/gvHh9wnr2G0f1lDCJYKfl+o53Sdno5gQBJbalnveIXVvFcf4W7zEIqkq/v?= =?us-ascii?Q?KOg2lksmxtXFn0VxhC/ZtlgTnBSJm/cdLgo85AE6cW8QDIsL7M/tczQA2LS5?= =?us-ascii?Q?1zL16o9uW4BixKg8GxCI7dDJn+Pbz7ylfD95q7Cem3eKmS6un8r6T53erixt?= =?us-ascii?Q?dwOsQliepBbsv/55Os71q08/cC48yis3yTBfxU7JSI/89cgjjbApGSLuYdKS?= =?us-ascii?Q?eRsAGIZ5lgCagyltYQEvYtT+odVKzXcS1DwT0vPOw8CJLXO0iCRdRVtSrGaI?= =?us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bs/eczuXMY9Hjmy+zLkXcuksFYfmCD?= =?us-ascii?Q?lWG1sRYQf3Iiy1fP+Cdd8TgtD13bHKAMDdYlkzvlwuaSsgWWNK80YEKIuYk9?= =?us-ascii?Q?bg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 62f2ab86-d7ab-4f9b-d0e2-08db555bd9db X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5471.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2023 15:48:39.0948 (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: 0R1wj/BfqgVm3Z8S3Zah03D5gFWznzifLYEWABTcewMUXRJUTyl1UHtyb9KCcgR/7rTqV3QLDQq1NDHKj91Uuw/uuRUBf1cYz063BPNdtr0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6480 X-OriginatorOrg: intel.com Message-ID-Hash: 5WSRATXVSZFVRGI37YHTA6VZ2GEL5D3Z X-Message-ID-Hash: 5WSRATXVSZFVRGI37YHTA6VZ2GEL5D3Z X-MailFrom: larysa.zaremba@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: Stanislav Fomichev , brouer@redhat.com, bpf@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Jakub Kicinski , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Jiri Olsa , Jesse Brandeburg , Tony Nguyen , Anatoly Burakov , Alexander Lobakin , Magnus Karlsson , Maryam Tahhan , xdp-hints@xdp-project.net, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [PATCH RESEND bpf-next 10/15] 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 Mon, May 15, 2023 at 05:07:19PM +0200, Jesper Dangaard Brouer wrote: > > > On 15/05/2023 15.41, Larysa Zaremba wrote: > > > > + *vlan_tag = ice_get_vlan_tag_from_rx_desc(xdp_ext->eop_desc); > > > Should we also do the following: > > > > > > if (!*vlan_tag) > > > return -ENODATA; > > > > > > ? > > Oh, returning VLAN tag with zero value really made sense to me at the beginning, > > but after playing with different kinds of packets, I think returning error makes > > more sense. Will change. > > > > IIRC then VLAN tag zero is also a valid id, right? AFAIK, 0x000 is reseved and basically means "no vlan tag". When ice hardware returns such value in descriptor, it says "no vlan tag was stripped" and this doesn't necessarily mean there is no VLAN tag in the packet. For example, let us consider a packet: Ether/802.1ad(s-tag)/802.1q(c-tag)/... Hardware does not strip c-tag in such case and sends 0x000 in the descriptor, but packet clearly does contain a c-tag, so at least in ice, it is reasonable to not consider '0' a reliable value. I guess, for s-tag value of 0x000 should be more reliable, so maybe 'if (!*vlan_tag)' usage can be limited to c-tag function. > > --Jesper >