From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22E4AA0C4E; Tue, 2 Nov 2021 11:55:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A8FF40689; Tue, 2 Nov 2021 11:55:08 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id CFA3C4003F for ; Tue, 2 Nov 2021 11:55:06 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10155"; a="317432154" X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="317432154" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 03:55:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,202,1631602800"; d="scan'208";a="667068557" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by orsmga005.jf.intel.com with ESMTP; 02 Nov 2021 03:55:01 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 2 Nov 2021 03:55:01 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 2 Nov 2021 03:55:00 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 2 Nov 2021 03:55:00 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 2 Nov 2021 03:55:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M/bag16jgkoDMTa24y3zN5IMdeZHlhzcCi6YKW0eNmyXAuQI8HQLw7WuVS6P6MDtMVWBBKw7gwqmDb50MNfttwd/DQHtJcbfEBOmzU3L43uORJTfH4907vUHmnyY7pHk0oYiepsrTjQ4eN6pO/B7smG2JyMJt6jpsWXxodR+iFNY8OpeJqQGlGpTnUnJafPX5I7sRFNM233u060jNUar+S5BsnHaoDJoa3pwql7nAu/LHIZaiFnlg+8LwS3OFSNKVMkhqfYb12KbQBmzfvl0+32Wyk2sQk5cC6cHTtXwxm0z3kKimEoHiIfS/w+O6tY/6Ep4+ueVBnX9rq9u5UzFaA== 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=UaBm5q4xsvVzqiu+tq1cBgc5jGoKTPJlLXMnbLQQOVA=; b=B9x5RdtuMGcbc9F6loyA1aHHo7Tt0nTto4QF1n/23ZC8LYuTvCCf8AqpZcgZ1reOIa1IZxjbgusLmZCZoB+HGPM6l9cYdWCDavSSUFC1meA0LJRYbedFZ5M2Qe8N8JTBbLTob7BQEUrntgBVl5FONWVCDmExjSlbKkyn5lddeDNF1B3bJdsiBTluSNaU8IU0ZBfPjWDVfF0ebNT4Gpwk+cQreFwcK7TjJNxSWNt4UDh+x3x92KiZGA8X4AVv2PbgT5PlFVfv56vQR92HUV/1sQZly+7D0boKdpj2FekL67pWJH8hZRZMFJawZRxtT0YFh1sCn4AdICMaWyjN146tDg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UaBm5q4xsvVzqiu+tq1cBgc5jGoKTPJlLXMnbLQQOVA=; b=iPFJV+NE5ZMXGM13b2NSJttiiKEgO/2Mit2QSH3ptu7NZBPIe23xEwMVLqn04Hbz/dhQwTrSPlfkhgUp65/R422vMT0WoP6+IjjKunA1f2Bbkk/n2TP42dclN4wrq1TrzPoKhRiyEs5f4SxgRAu0dyIVR0OEAFIHKMSHWU0BEj8= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM6PR11MB3690.namprd11.prod.outlook.com (2603:10b6:5:13d::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.18; Tue, 2 Nov 2021 10:54:59 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::2c0c:5383:f814:3b4e]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::2c0c:5383:f814:3b4e%6]) with mapi id 15.20.4649.019; Tue, 2 Nov 2021 10:54:59 +0000 From: "Ananyev, Konstantin" To: Stephen Hemminger CC: "dev@dpdk.org" Thread-Topic: [PATCH v2 2/2] bpf: fix convert API can be undefined Thread-Index: AQHXzzsDumlzcbtESE2yi34hhlYO46vu5wQAgAEp6sA= Date: Tue, 2 Nov 2021 10:54:59 +0000 Message-ID: References: <20211101145246.23465-1-konstantin.ananyev@intel.com> <20211101161013.31966-1-konstantin.ananyev@intel.com> <20211101161013.31966-3-konstantin.ananyev@intel.com> <20211101100558.6b33a12b@hermes.local> In-Reply-To: <20211101100558.6b33a12b@hermes.local> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b6186523-d13c-48f4-01bf-08d99def3704 x-ms-traffictypediagnostic: DM6PR11MB3690: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: o7gRuSsSSCdSyERO7PHI3z0HSm0Rlf4GO3YQv0qq4eOVd9ZLM+71JUQ6+QnUGEc/uyh2pIXGWczWtiWjREqK/5tlzSPqBe/ib36hl+ulq8K/p9/35OZ3zcSJ1+sAwT6TSLMVP6KfewPUqWsKsc6DWca2ZNksGGY6LNFpi56OKXGc3vJqF4IyZ63ajPJnbx22f4yqknbZKyNST6KJcVZ4MOBd0CfsIWLu1MEgnwaycKp5Za+Hbh6jahCEyKM/OpN1QXcLi2yihBc9iBdgbsMcY929mJRKtrWzyVcWUNcY6jLDHAmbqw97PO1g5MfPrmEzXmbh+SZo+avWldyqNFb/qOr5p2WGCdeseX8tqjYwUtdtei++hmq5ITyxsgsGSzUt9hhz9N1EQ7/BdZ2RTsv/I/EpFuIzKxj+VLplz9BaDRTgmuUph6XuZUg09n1e3DBrIpsim9l/1FquNFX0p2wq+Xifbhy+Fmv/0Kay+wP3sN60e6d43SNWxcvbBHk3fQEiIFvqk0znMkKMIivqAw1IGG++g73EmXVkJ5GIIgJb8TqusLI0Tv+U2dllEpAcr1s7QvRFyxMhjuwYisNViA/k59VCUtFSJqgClymMbe6BQyxLnICqM6B8VDrOcVq49suxnQuOQARUFjtg+P9XquSjLjgd9Z3Giskf7e4d8hUJ51MCAc8B/JINrxppvumndUSrHdVNQSF86iDut7Hz+fDAMw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(86362001)(9686003)(26005)(316002)(8676002)(38070700005)(186003)(71200400001)(55016002)(38100700002)(508600001)(122000001)(8936002)(83380400001)(6506007)(4326008)(76116006)(66446008)(55236004)(64756008)(66476007)(33656002)(6916009)(5660300002)(4744005)(66556008)(82960400001)(66946007)(2906002)(52536014)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XiyFo28uXm2GJfDXZ303rHMC1hiY3eGYio5shB0Mr3Z/4yB6vKknIhka76N3?= =?us-ascii?Q?UiAOVvRKe+wW8PedqbaFZvqzaXMaTWJAeoYV77fJ0LnGdxR3bkpI2CQim62e?= =?us-ascii?Q?yjlWp5kshljreAKjXZ3XH63/vRdhQ2d3xorpyQ1GEnTcMEslOT/ZmuMpafyt?= =?us-ascii?Q?ofXpwwgl7j7cRjdDy7BT5fNzpIdEw+vgF6G8DmUsNDNkp9eaXg1nbxupxm+p?= =?us-ascii?Q?DQmKsz8fZbq0NEhfyfq8EC8vM6jPprG99szvBLfDQ4wCaO0mwHbxDgCxsRoJ?= =?us-ascii?Q?DX2iO9E03jVVmFBVZtuFlCIpZN3bs2P9JQqmGeZ2Jgc74vUu8vswNWvP091a?= =?us-ascii?Q?wMefD+LaT1vp2cI6gTwyT8TMvxCAA/02DqJ0Ps4vTCiKr/62mvanhHgMZ/Ox?= =?us-ascii?Q?zccZzBhptZQOQcf9GMy2iSvUmrsgVMrkTPw6c8RcTDN7m1dkjuGj3oqwY5q0?= =?us-ascii?Q?c/vQEiLq45szgRDpNKL6IrIx1iliKrZA19a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zQqGSliwxx1k9qQQ6Jf4uu25o+CRnvyzTCr1kraQLAasvSzc?= =?us-ascii?Q?SOJqFG2RhLSft4K26NqnNED1FeQeXEtrRuTJmpWB7L9mYq9Q1Cq0BWwDSy5a?= =?us-ascii?Q?se0FUYxdM6zdU8hNIlK3AplCVkxVMlkYz2Oejvla7up9DjSwDSikkz72Km77?= =?us-ascii?Q?thDD1NZ7tJ89CZ7BvSv3X0kxnxVMWbR5pjwfs+VNMYyxZgDMZQQYvuZ0buYF?= =?us-ascii?Q?HZYe5iXmDFz72qlcapiLv/eh0h5r860YvzghY3g8zlFL/1BLiPqZIFGbMqvZ?= =?us-ascii?Q?0sA0tw=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6186523-d13c-48f4-01bf-08d99def3704 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2021 10:54:59.4240 (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: dQK/4vmCVTBZX3lEqrHqfJHUAx5NrR5mVsx/0NTC5tv1/Ps4sJrFLYwlMMQlk9xvxgA6uZV69oXO7taUX7GI0ULzP/mxSDVMLOWdOQR1Rro= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3690 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 2/2] bpf: fix convert API can be undefined X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > > rte_bpf_convert() implementation depends on libpcap. > > Right now it is defined only when this library is installed and > > RTE_PORT_PCAP is defined. > > Fix that by providing for such case stub rte_bpf_convert() > > implementation that will always return an error. > > Also move stub for another function (rte_bpf_elf_load) into > > the same place (bpf_stub.c). > > > > Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK = BPF") > > > > Signed-off-by: Konstantin Ananyev >=20 > Wouldn't it be better to fail compiling a program using unimplemented cal= ls > rather than forcing the user to see a failure later? You mean to keep things as they are right now? That way we'll have to put #ifdef RTE_PORT_PCAP around every call to bpf_co= nvert(). Doesn't look like a good thing to me. Also in other places we use similar approach: if HW/SW is not available pro= vide a dummy implementation that will report an error.=20