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 7A45CA0C4E; Tue, 2 Nov 2021 16:27:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4ABB141152; Tue, 2 Nov 2021 16:27:46 +0100 (CET) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id 5FFD14113F for ; Tue, 2 Nov 2021 16:27:45 +0100 (CET) Received: by mail-pl1-f174.google.com with SMTP id y1so16767691plk.10 for ; Tue, 02 Nov 2021 08:27:45 -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=2c/wpgMh3nQDV6RKYO+1gVHH3hY0RK8VoEUJC9+p7t8=; b=T1Oy+ZRk7MrD2BJ53YI3QH/0FtMqjS1E2x87d0Gnmy1ZfXAtHj1EHH4ACm2hITdl+i AMhjCq4s6spjWzukpkXxa9TOo0BRxoVt22jI2X8YpJgPPbWxcNNPDcMTjHHc6Yo4BVVC fQjmHisSUKzbN4u5gltBclczobADwtzD8XsyK5M6AKefdHIlkb98OHKsR/AzdGSGSiw/ vRJC/mZ4yGYoAHu6U9d01x9LoeQW3MBk6HVBmGTB63ufQU0EkDxiRjBq+zhaVT/OiB49 VcNX04OxeJYijAS4wbqndrT1yMeyRDL71VIKDdDY0spXd2RiscyVP3oJmqdq19L8neCg M9Zg== 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=2c/wpgMh3nQDV6RKYO+1gVHH3hY0RK8VoEUJC9+p7t8=; b=3r7WR/C99LyOrhZKuUS2jJYcxi8JxBnO2Vgre1ElHfFJG1IET22ooe8hIy8D1taEsY uX/3ieNNiJrZuXp312S0DydjcK0qpDZumtB6zBKbZqI7dazpRhMqzcef86OanIO817/b WPDaRwDqh5geqAuord4ir5x/yljZ+9xcSEhafLC1YIhTsqNj7KAQFnu+QArShyr6+7A1 4ylzomzvhpgTUgPQjbBAxQEduCC73p4BghYvTG8EqtZQiooVH2U72DE7WHUxGXIFzf8f 2iqCDvMcm0lBM/IFQuD5hNQ4lf1Oe1B99XJGTZT/tyeDS0whwpjGYwEE+ouSskcwStns SM/w== X-Gm-Message-State: AOAM532CnrF9I7wvw4VGOt0ngpqYHhX3a7zGOWFrRaQA5BzucyUIFjSY RXbBsScUPBgCXfDxlxnRZAR4Nw== X-Google-Smtp-Source: ABdhPJx810CGqDpE/wJYUStNLh0YpK1lX/2XR8AgWSwHybXNF/3PVpaCSXhpMgFuk3CoS28w/NpODQ== X-Received: by 2002:a17:902:d711:b0:141:efff:9f3 with SMTP id w17-20020a170902d71100b00141efff09f3mr11705216ply.48.1635866864536; Tue, 02 Nov 2021 08:27:44 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id z71sm20099533pfc.19.2021.11.02.08.27.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 08:27:44 -0700 (PDT) Date: Tue, 2 Nov 2021 08:27:40 -0700 From: Stephen Hemminger To: Konstantin Ananyev Cc: dev@dpdk.org Message-ID: <20211102082740.2f08593d@hermes.local> In-Reply-To: <20211101161013.31966-3-konstantin.ananyev@intel.com> References: <20211101145246.23465-1-konstantin.ananyev@intel.com> <20211101161013.31966-1-konstantin.ananyev@intel.com> <20211101161013.31966-3-konstantin.ananyev@intel.com> 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 Mon, 1 Nov 2021 16:10:13 +0000 Konstantin Ananyev 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 Should also change dumpcap to print more complete error? diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c index baf9eee46666..fff460eee518 100644 --- a/app/dumpcap/main.c +++ b/app/dumpcap/main.c @@ -285,7 +285,7 @@ static void compile_filter(void) bpf_prm = rte_bpf_convert(&bf); if (bpf_prm == NULL) rte_exit(EXIT_FAILURE, - "bpf convert failed\n"); + "bpf convert failed: %s\n", rte_strerror(rte_errno)); if (dump_bpf) { printf("cBPF program (%u insns)\n", bf.bf_len);