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 6E1BCA0C53; Wed, 3 Nov 2021 11:54:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3D2A341134; Wed, 3 Nov 2021 11:54:59 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id C38C2410E5 for ; Wed, 3 Nov 2021 11:54:57 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10156"; a="231424888" X-IronPort-AV: E=Sophos;i="5.87,205,1631602800"; d="scan'208";a="231424888" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2021 03:54:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,205,1631602800"; d="scan'208";a="638723758" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga001.fm.intel.com with ESMTP; 03 Nov 2021 03:54:56 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 3 Nov 2021 03:54:55 -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; Wed, 3 Nov 2021 03:54:55 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.45) 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; Wed, 3 Nov 2021 03:54:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Psb0rP7vTEhvvpiS4SnF6L6jX+8Ka2uAmzrW9TX23kX/bd9pwT9+slWlLORIItazR+Y25SWQy0tgZ8dyIqK6UdARjttp0YmfI2mfo6oA5v6mB3FnyoEpgFnScT1GOLxnoGg1rZFHTYtibww2N8wZ+iKbpS2jaFSQkMai5LPYjy8y/6oEaG7E2UN84vSg3qrPxJzMLS6voeeTLmU9TVMwXs0+wyltPXgpESY3S977ZJXf4r9chySuROqnULdl15svlnYvNnoDdVPA4sBkO+2XcPoaOvcXBvuojY0kHmpW8PhgFdpdocqcx+qqUopPUQIw56UqdrnwgRjmDhFUWHATXA== 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=NsOdh76dv1pjnQ9y9sQKRmBgBru2ko1PLuegDrLrLNc=; b=R2cJ9wm8DgB+5FTpuEcCCCLZy0GI0dUnxgtIXqiFsSdltVlQgOiroN4SE9gw1wr7OB0C215zzZhX1QNNk6KejoHZbP+gjmSyMqihjnyNaRDK+lkjHuvOp5I/ZeBLLKtOq0NsiVlTx+iRFnKKuKD/xoAcgV/imV0h+mu+dawsIjpOhuUWEX9HXg9yCR694LMd3gjRnyr5EWGujZIGjm3rL5e3Vxv4dsFVo9IKLQLlb/E/LMHZT+1lyyIOoVFt6ExuDqyZKBb3QlSxVMadkBAU5SVA0F8v4QHHOqqv8i3Wfs0OGcigbzrCYJmNKVb8oomJX+vmVU1nZRK21MijnWbUtw== 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=NsOdh76dv1pjnQ9y9sQKRmBgBru2ko1PLuegDrLrLNc=; b=ZEvPE/LZGw9FeGsMIkTbB/kqDHX9f9bwC/2oKGFT3ecsYBFJbjz/9z7aRBkPwfwzb4tntDaE0nfDsgt+bVZ9SaFB77HKRaDFomLbz70nHHtWtOANdav6MZB5UbIAmc/eqNOrkorN4XmgW3bOs5WlUY9Io1SNZH69l5vSjaK4dPU= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM4PR11MB5437.namprd11.prod.outlook.com (2603:10b6:5:398::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Wed, 3 Nov 2021 10:54:54 +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.020; Wed, 3 Nov 2021 10:54:54 +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: AQHXzzsDumlzcbtESE2yi34hhlYO46vu5wQAgAEp6sCAAEajAIABTCwg Date: Wed, 3 Nov 2021 10:54:54 +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> <20211102080504.7cd5713d@hermes.local> In-Reply-To: <20211102080504.7cd5713d@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: 9a658d9a-8c46-4ebc-bae4-08d99eb85e49 x-ms-traffictypediagnostic: DM4PR11MB5437: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eine6gBAeg30BHKUGSP4FYiMYthlEtLIIEjeu2nTponz5A/4CONHQrqqqNHEwwjJucrGSIJGWXCVjN8QXizU37ltHD0UlSBQ0QHuxPDuXFZ/LEBcpOP0m+5fF2/sVIxIQAiS6CFCqJNQpZokIUcCnpEJfQSN/00kx9tTOGbOlteCBZgxO9DAT8BKqFo04k9u+9xItqVCqJM7r2grVx9Fir5MrycEseUNTrgC5W+rolrCIyAgUb1Aqc2/d7fiXgBh5YAaR9OBLug3vd1/Wh60+pj8Q7dBsEEk2uUc1UmzZh7oM3fg6b3QAfLFLyINVWqw0BUrVoBF993U9LQRMMu+p8a7kRHeRjBxROSFW4Xj7p7dzrVAKWMporVfOzPlrqs0NgJ/QDjHGSww6G08yIJd1h0NqvYkZgv7oee7pfQJ6hY9d8OBGXahgksdAVbQktPS4/rhZ+Z6dsIHt0CXzCbBbW2psrm2Ff3YY5+UvrxEVSovZtZAx/XShROY7yuhHtVjEhstiIS/gp2yG8vdkm7iZtxR3Hpjv/rwgOwxL0TaZX7bsBop4Q4L0mBe+ijqmrLqc6vN9EGM10PtYzCSQDI9jVBvITFEbjTrgcBsAdwPxxFnwKL/jdWNawep4WCcoRmtV3NFC9tcy7TWC46yFIZ/cTcEW0ANbjH1VkDIUz0biiiUr3L+7swOhQrsiAVJMBDSBBWaCvxJjAcquicAO3Jxkw== 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)(186003)(8676002)(55236004)(71200400001)(6916009)(82960400001)(26005)(316002)(8936002)(2906002)(38100700002)(122000001)(38070700005)(83380400001)(66946007)(5660300002)(7696005)(86362001)(76116006)(9686003)(55016002)(64756008)(66446008)(66556008)(66476007)(6506007)(4326008)(33656002)(508600001)(52536014); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Qi1Tg67+QyDRp5iHjyGAyRZGRsh33mqMkLW2aTLzmvl5MA+I0qUE04+VWh/e?= =?us-ascii?Q?BOL2JDJA76VyS46Eoh8GEMep/i3jDwzhTkVPIp6bK8EzdrJ7jgiK8CcPY4bO?= =?us-ascii?Q?wqWOvl7yleGd+gr+iVzkuXXkARN9YwfOYF18/4nYR6pj2PlBa3rBpGXH0onc?= =?us-ascii?Q?dRlpQVYHbgInglLwuOJi7qAOOIw2wTm/Qi5i3IPEeHC7QeUwFMB37gOB/3p7?= =?us-ascii?Q?AuvaGOVb5IgC6yAwBr5PlHfqwL1zt58+BXe4lkIn6m63xuGU/XQQI5M+//OH?= =?us-ascii?Q?cDbO1futppoYM1Hg+II21ksO/D4zb7oRaDNc2gcKAZmNkQVlutMpTpZ8dwaq?= =?us-ascii?Q?+AUWSLoA2uSvD1rDlVZi8SpSJcMx6MfYSamEFl0rI1AG2lsOfYdfOQswkFyP?= =?us-ascii?Q?va+nmjVK5EK2EU5GrUbVwpHm7HFaBJOc678WwY5FJlL0tkAtE8gXJrJBPUuR?= =?us-ascii?Q?g+IkSJMc0xpHjW0o2IzLMEHJOuoyKyQ8Q4yUNojyJw1cN0S37BGHY5+SHphm?= =?us-ascii?Q?QHNqFALS7MXjA1RJ65CUz327SU+DbNe/zbxd0xuBPw4SureL/hoCtZPMlWFl?= =?us-ascii?Q?1INaS/HUhM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ii?Q?orvwg47ku5gcDxih+NBgj3j0XPM01tJKXIGnZTAFzKnk4cFuGIVfEdbULZUc?= =?us-ascii?Q?KG1sF0b83Ok4y4OIVRTQnnnMmxpWWJtsGyE2XM+E4YoxtNPKfmbqdTRskgG4?= =?us-ascii?Q?1gsq6rK+lqtGWwCXUEwWs0f45/5mucaVgTljjLi7H60qAebitzsr+BKI8PgH?= =?us-ascii?Q?2+bVpg=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: 9a658d9a-8c46-4ebc-bae4-08d99eb85e49 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Nov 2021 10:54:54.2337 (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: ZwpkabOcwtRgKB75gK6XlRZGgyhMyjH47dHGX1nfCZ4OMTDjilc+A1JRwnZLTwb9b1roKXxnenbOA5/WL1XhFW8k8DfDVs+RuExw6+eLpfI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5437 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" > On Tue, 2 Nov 2021 10:54:59 +0000 > "Ananyev, Konstantin" wrote: >=20 > > > > 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 D= PDK BPF") > > > > > > > > Signed-off-by: Konstantin Ananyev > > > > > > Wouldn't it be better to fail compiling a program using unimplemented= calls > > > 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 bp= f_convert(). > > Doesn't look like a good thing to me. > > Also in other places we use similar approach: if HW/SW is not available= provide > > a dummy implementation that will report an error. >=20 > Is there a way to do both, return an error and report a warning in the bu= ild? Sounds like a good idea, will add a warning to meson.build.