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 4CA1AA0C43; Thu, 23 Sep 2021 20:23:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1CCA841263; Thu, 23 Sep 2021 20:23:23 +0200 (CEST) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mails.dpdk.org (Postfix) with ESMTP id 9D08741260 for ; Thu, 23 Sep 2021 20:23:21 +0200 (CEST) Received: by mail-pg1-f178.google.com with SMTP id n18so7143287pgm.12 for ; Thu, 23 Sep 2021 11:23:21 -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=jd5TLEXe6Q4e1tXX+djTfUqVaPMC2g2P7zR9CPvhlQQ=; b=wUy/93T+MJM+cL/OpUWuUa4RhKu9wnKgAnLPTOeKdnR+SnxFsOnWIcz69/Qy7335S1 EUqibkRTSE9XVhgd5fbxtRVnrTEDc+V82lHF68gj/2Za0m3ZitxbZA4NPGtKKkuD/3+A AEMjkDbLtAbxhpYENalvvfBWlRglkwTXl3Gj1dyR7ngF5QkckafU9DOB2ldyl2cvG/FR NAgCqsiayWRO0vkm981+FABFIT/en+EW04cEXK5AETtal1QxIipca26OXSdvadX+JjG5 ScfmWEBdgWeLL//OunDmWmbYqYGVMBLzgm12STl9kE17twqCSRVasuYVWQx/yqaFnUZv IjPA== 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=jd5TLEXe6Q4e1tXX+djTfUqVaPMC2g2P7zR9CPvhlQQ=; b=uU04UIrT64AkG58y+YHbI0zQ6acKn20RCof/JKDTHzQRlKePAM+aauD92Aft8NaSYu KoPCsRye7DRRra7Hwv+dNy9LEnpACfUbvxIBVIzYl0LuZ2vKIj2OesTQ0eOitaDWI9ER dutP3womU/ANDXjL0UYReIgYXE4CDL8LlWL/+HymjNEKtsg8KUs/2KYAss53EIf1NH/I 8wHAUL7QtHOVc+x27qVLKg4HW7qBKOoh15hSsdMxxcoG0eyCkbPujwjr/tsCf2Y2sdjW E17IF32bnLhuefvji5bsGqB/E2cCwFcm+aH8zsNZ6S0d0W9yD92lUSifcQSN8eqEE9PF Qd+w== X-Gm-Message-State: AOAM533nPD0Xm/gZJAlm7IWjLEJEPOxNnxenXqJlfGR6cornB3D+ihZ+ fJrGoZfLadn9nyzcVzRyAnjOvw== X-Google-Smtp-Source: ABdhPJySzsIe6sSQgq17jYEXlWZZLPokKVfuauPx7Vnbk1TUohDAH3eiy4RFdl1mdC5wn/38z5B0IQ== X-Received: by 2002:aa7:825a:0:b0:43e:124e:5c1e with SMTP id e26-20020aa7825a000000b0043e124e5c1emr5913011pfn.76.1632421400570; Thu, 23 Sep 2021 11:23:20 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id t14sm7180811pga.62.2021.09.23.11.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 11:23:20 -0700 (PDT) Date: Thu, 23 Sep 2021 11:23:17 -0700 From: Stephen Hemminger To: "Pattan, Reshma" Cc: "dev@dpdk.org" Message-ID: <20210923112317.1d8e0591@hermes.local> In-Reply-To: References: <20210903004732.109023-1-stephen@networkplumber.org> <20210916222630.71543-1-stephen@networkplumber.org> <20210916222630.71543-7-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v10 06/12] pdump: support pcapng and filtering 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 Thu, 23 Sep 2021 16:11:42 +0000 "Pattan, Reshma" wrote: > > > > + * Similar behavior to rte_bpf_eth callback. > > + * if BPF program returns zero value for a given packet, > > + * then it will be ignored. > > + */ > Looks like wrong callback name referred in the comment, should be corrected? It really is pcap_offline_filter() and Linux kernel socket filter. > > + if (cbs->filter && rcs[i] == 0) { > Why do we need to do this again if some packets already filtered. The earlier call (rte_bpf_exec_burst) returns the number of packets that were processed. Actually, the return value there is always equal n. So this code is the filtering, there was an issue with checking return value of exec_burst.