From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail.toke.dk; spf=pass (mailfrom) smtp.mailfrom=corigine.com (client-ip=2a01:111:f400:fe59::708; helo=nam12-dm6-obe.outbound.protection.outlook.com; envelope-from=simon.horman@corigine.com; receiver=) Authentication-Results: mail.toke.dk; dkim=pass (1024-bit key; unprotected) header.d=corigine.onmicrosoft.com header.i=@corigine.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-corigine-onmicrosoft-com header.b=YGi8XVgc Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on20708.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe59::708]) by mail.toke.dk (Postfix) with ESMTPS id E3211A1B1F8 for ; Thu, 20 Jul 2023 20:50:43 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AotugDfmJVLtJhpgg2KbRWnoRcblNqpO8XdE77o4io4K3tkn+UV075mjYYifSuf2bQbLOtRA47VHSpBEBcEucBn3Ipc4D2VCizBdJGNTwiF++V5EJxh5Fv/mwrqzV+hjOCDBVsNCCsn2bVXVf9OsC3cDRHgMFNw3bJTZQ0MgP5amVirH43y4Td5QakspB2tWkSp90an52c3wlKKBjnIHTPjL3ufVf8azr3N97q6u35h4c/vzFMdCGpGUi5ND4CCH10Xz1ZxiiqqOqCx+AdHyICiBWqF3lXjQM2IR0aNLEkTcdNEQ/0hRub7I00QD2XfpnGRZ3kzONx6MUE1N/2jIKw== 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=5Yzgw8pd2HF3Ois9fNVF8okfwH677bWKV6OxoLgXM8o=; b=KvAJKB/m0ou1f726GZEVptIVDXRzF0HtUngYJ/E+JAVgm2OGgFpCzt0V+IW+OGGby/yt9kZOVQKS9phDv+uk0DhCa/M4mRY/bzmIJjNMsZTL4Eh0CCECmN3VgJ5shYoV0f1e0hRe1O/v2n+LhH1ElsDbdORoWyXujCFDSn62LRDVkK0id1Utij7WW7VOpdnHs5WK8gfI1xxPkDBwg2LwU8Ev27tqZCiMLkHkTZd9xHZeU4gscK4j6BmECM+iOG0g6BSPUePtQcULXxIPCmpchkEYmXJ7pdX7bkHF7OhrtuqD4/JVF0newmCOQOkFaF9cGX8osDlj9/yOOk276xVLJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5Yzgw8pd2HF3Ois9fNVF8okfwH677bWKV6OxoLgXM8o=; b=YGi8XVgc0y5LYWwHXYb77SXJLYsTW2PpuKnT1wfgOWyI21VUmURrx7iayFwjVBsaj1bRXItU0Uiz+1GnhY2Q+XkX5D/avzAl8tX71HIx9FM4Hkau1DVUGXGK9bX7R2REookDthPhov0Snd4q8yr804N6yQ5AJgrHvk4sSL7j1SU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by SA3PR13MB6370.namprd13.prod.outlook.com (2603:10b6:806:382::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.24; Thu, 20 Jul 2023 18:50:37 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::fde7:9821:f2d9:101d]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::fde7:9821:f2d9:101d%7]) with mapi id 15.20.6609.025; Thu, 20 Jul 2023 18:50:37 +0000 Date: Thu, 20 Jul 2023 19:50:27 +0100 From: Simon Horman To: Larysa Zaremba Message-ID: References: <20230719183734.21681-1-larysa.zaremba@intel.com> <20230719183734.21681-11-larysa.zaremba@intel.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230719183734.21681-11-larysa.zaremba@intel.com> X-ClientProxiedBy: LO2P265CA0039.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:61::27) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|SA3PR13MB6370:EE_ X-MS-Office365-Filtering-Correlation-Id: f03d1c70-830b-4867-9873-08db895234de X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QcJ75xeQKBgUJqdniDkcTjyPkd/hiVSHIRXlRfxN4U5Qcog0a9VYx20TV4TsFafZ4tx1eao6m4ddNe7gBSsR/08ObMfE13hbw9i3Nnf9ekvJd37bDLQtNA+Hi4RvE9q1XCSNOzD8tMVGhy+z8lgJb2lnc23NP/iL7g3eV/0m+elzV9lN4mT/NuoMOFBhNEkl42tybhOIsmT+lDCvc5mVDaoAQw8WRZF7raJo3xZ4YFovkQ0pYdMZpeik9c+aUYsUFAzeXX+siFsAXigUaai6FzkVV1vhC7tQ8ta+kDUWKGZI0xNrw8GRv42ro4uDNnZox7WYxXSiyZCt2LagT6gsZcCV/zKYGkxdN5JYacxp6+iZHAb/f3rij1c6Z8WjkCCrhDg29n99nE4B7JF1fcI10HNcaUEaUdc1swVWhEbeSlrb4Uh1GC3trvFalRF0tNA98huyfc5pjMO7ixSoMlQsI+ddDZuP0E3nrj0HAQpW7UbRJTndPKsLo0eXTc9oKYS8CpmD096yjT05anp7Vqu2lZtocmIHfM+CFI6YPWsIkMhhJmaSm4PQVtNoSWkzJjas3hGBAAc/Vq3RHVdssZdRe9XDnQ0uN48WLlfjV1C4d0K/vAyEHL+finPIUprYI4UCMMHEv2DZlnrqABmdnH7LGKzFlt8MFkL1+/9U9t/GT34= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(376002)(396003)(366004)(136003)(39840400004)(451199021)(38100700002)(86362001)(36756003)(6512007)(6486002)(6666004)(478600001)(26005)(2906002)(186003)(6506007)(55236004)(8676002)(316002)(8936002)(44832011)(41300700001)(54906003)(7416002)(66946007)(6916009)(66476007)(5660300002)(66556008)(4326008)(2616005)(67856001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?QoFwbbRzpp8uGiTUDhUhWlLFH2+E+nd0fVHLLZ8Q42JCilgzdWzmdDaX9yci?= =?us-ascii?Q?5h8qmtOTb8F4t0GyhsB8klhpH+27qN73D6AWnHmzeyNwchDIkalgLoXuoGmX?= =?us-ascii?Q?mlyAzFWttmnBfWhBYGtFBk0uu3JFzwg7UAObVczWbtXqqJZtQxu6PBC2S299?= =?us-ascii?Q?Tau61dsHrpki5MTsdsB3C1ax/XiyXKNs+/1xzdCkXVAcbXePuA5I5k22dGu+?= =?us-ascii?Q?1cv3B/tJqReRM6UaBbztJc+1tdzLxQ/ErTMx6Es2w45wEU6H61mUGBie69i3?= =?us-ascii?Q?1qSPbnv+Am88WoKSJ3d5VVmOGHbBRvq3gDfU1J9tScH7P8GHzjgC2OzScKwZ?= =?us-ascii?Q?85i3zNx55Eil0OYBbkMrtQFGeFRVl5sb/qd9RlvSGnckh6zIL+nkqtsCIeID?= =?us-ascii?Q?OvInBL0Z3Y2Nb3lyGeg+yZQxLr1bI7FqF495r5QNQscXmB1GZ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znLIs6Pp5wCewTQALfuco7qzVcIAvyc0WQ1dmr0/oJo4k8dM?= =?us-ascii?Q?ezH1AgEias9UIv4YEOPGaP4N6oaf0AXzezDUUjkbsTBWyfJxlYflqTCifTGc?= =?us-ascii?Q?7gonZ8k5e9hFHw2YGMm0vgfy9APHHsdBR5k6rLwHNyy9VhNjgaN+27p3uema?= =?us-ascii?Q?iU5ba30ozZycLH2ib32b7O+dKnZJhjcguYClJe9CZoXPvyDiHQZzr3mUgBJc?= =?us-ascii?Q?2OjtLp+x9xhkTjRDEo4bB3aRBRVEedmsaQQefDn8m5KxYd8dYCo0LmTkpogH?= =?us-ascii?Q?mA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: f03d1c70-830b-4867-9873-08db895234de X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2023 18:50:37.3544 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: n78DWHeuxmrcAl9eV3R4I0uAlezEpjp5+e6bYUDryM5HBHwh84vcehw3I2ByiETvcTvge0YzgXW4uSUkOM7PNRzwi5QpHOmKQyDj9j2OvXE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR13MB6370 Message-ID-Hash: BBW7VJPMNGPBOGU5IZ42J6QMYSLF46NB X-Message-ID-Hash: BBW7VJPMNGPBOGU5IZ42J6QMYSLF46NB X-MailFrom: simon.horman@corigine.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 X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next v3 10/21] 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 Wed, Jul 19, 2023 at 08:37:23PM +0200, Larysa Zaremba wrote: ... > diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c > index b11cfaedb81c..4ad6db83674e 100644 > --- a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c > +++ b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c > @@ -639,7 +639,33 @@ static int ice_xdp_rx_hash(const struct xdp_md *ctx, u32 *hash, > return 0; > } > > +/** > + * ice_xdp_rx_vlan_tag - VLAN tag XDP hint handler > + * @ctx: XDP buff pointer > + * @vlan_tci: destination address for VLAN tag > + * @vlan_proto: destination address for VLAN protocol > + * > + * Copy VLAN tag (if was stripped) and corresponding protocol > + * to the destination address. > + */ > +static int ice_xdp_rx_vlan_tag(const struct xdp_md *ctx, u16 *vlan_tci, > + __be16 *vlan_proto) > +{ > + const struct ice_xdp_buff *xdp_ext = (void *)ctx; > + > + *vlan_proto = xdp_ext->pkt_ctx.vlan_proto; > + if (!*vlan_proto) > + return -ENODATA; > + > + *vlan_tci = ice_get_vlan_tci(xdp_ext->pkt_ctx.eop_desc); > + if (!*vlan_tag) Hi Larysa, Should this be vlan_tci rather than vlan_tag? > + return -ENODATA; > + > + return 0; > +} > + ...