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 4C6F3A0C4E; Tue, 2 Nov 2021 16:05:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 149DB4113A; Tue, 2 Nov 2021 16:05:15 +0100 (CET) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id E2D4E4068F for ; Tue, 2 Nov 2021 16:05:13 +0100 (CET) Received: by mail-pl1-f169.google.com with SMTP id b13so5265329plg.2 for ; Tue, 02 Nov 2021 08:05:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KLZ1CVSjZdSMa/HvZaSfCfsjOwD3hQa3k0tTgrENcuY=; b=WPEuVESZzktlcdVKuhk2ZvKWgWt3CN4FDCKQ04hHGIYdIJRy+WX9QK+FQiyvr3BpEY FnfU9Lt4iT0/D2gQ50/buXhtM59n5XDdCqV+r6wQw9W5WQLk1XO85iWznv+zMgnft/AB bip4KFjsdYGda+hVsnqNKAO4zXhjsMfF8E08S4CRYExl+2i2P9jGRnpSyoBTfKjaPqR/ vAlxpyM0ug4hrR/VAiLYINQ32Gv/YaFYn3hp0rYuQz5T5RLXk4x13r/fvGZWZjOZYDbw v5axb3MhBVZh3dmrFsSZ0B5PgmLrLyW0LUZoKzvqC79M+z7eN+zLlwCW4MYSq2od8Eqb rTLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KLZ1CVSjZdSMa/HvZaSfCfsjOwD3hQa3k0tTgrENcuY=; b=jpLzHU8QJYhMwJfyK3Gw1pyjchKmy/vPunZE3c49bB7dUKHmLBD9NEM4z+ufRRSeMm +aYuT+IUdhVrq2TvwPqEBIvMiWRkWrBJepfoZ2HYCFwIhbcf1xh509loAHeWzsSE0mpR Tg/jmnf8i0dGHOVKYowtm8eL3+V0sMFjFw7IFhJq5pz2Mt2Dt7mXdljDz+0RFjMD7f5x UFSHIXvm5+YXLR8+x7kZfFjD8lFKJgKFKd84nmnWCxzl6fKQBVHx6bLodnbAdFd5YFnR ePbzCA+6BtNZNEkufhExZKfcfy/wMgLJrqeQpSK2TrOwoe1WuwW484RiUIJhBRUSLj9J h4DQ== X-Gm-Message-State: AOAM5321035nXNLqOekwecaGDSapL413NXkRsgwVtOWWIszt1nfxNHsh NFgaL9t/Z6jvR45yjBwKc7XPZg== X-Google-Smtp-Source: ABdhPJyIuVjuRM5+95dHmaxKrWMJLpqN5PFLwnWL1PmD3zIX/n+fW70iWi2v9Hy9AjWN1uTtpYRe2g== X-Received: by 2002:a17:90a:800a:: with SMTP id b10mr7413590pjn.162.1635865513049; Tue, 02 Nov 2021 08:05:13 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id y35sm3492914pfa.43.2021.11.02.08.05.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 08:05:12 -0700 (PDT) Date: Tue, 2 Nov 2021 08:05:04 -0700 From: Stephen Hemminger To: "Ananyev, Konstantin" Cc: "dev@dpdk.org" Message-ID: <20211102080504.7cd5713d@hermes.local> In-Reply-To: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: > > > 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 > > > > 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 bpf_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. Is there a way to do both, return an error and report a warning in the build?