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 42912A0547; Thu, 9 Sep 2021 05:30:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB8304003E; Thu, 9 Sep 2021 05:30:05 +0200 (CEST) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id 1E34D4003C for ; Thu, 9 Sep 2021 05:30:04 +0200 (CEST) Received: by mail-pj1-f53.google.com with SMTP id j1so401418pjv.3 for ; Wed, 08 Sep 2021 20:30:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SFlhMgPIiGA4Vvkv8ongMAm+QJvpbK6dDe3nigBIsHU=; b=pOoN0ZrwMsyCXZ/f51b3xrzyHWjPAsR6+fZc/aeEaqIj5UTV+iPQg2nroYiizSZsdP bf2Xevw34Uq/K7UM43eQEwDoWnT00VMX31Zdrxqp1xqW7KJqY5cwfOPNpVj9c2pkcfYB xWbe4lWmCQ2ASEpUzGJxM8kBfmNJ/DVxKBQtpJwZmM04YYtNCqh8yIEYz3GvCk1zQs0I +FzPvcFh1sFd8K4iuQFJG2rRxlyv1jIMW97z1dGWLS+UXYpjja/XtvrjC+ylqPWp3jlP gV47edpSFDUdpNdUAfUQZWqB5dyuulsXuBGMMzDn1lEpM42qRG8305/yruhl6jAJb6Ok Gulg== 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=SFlhMgPIiGA4Vvkv8ongMAm+QJvpbK6dDe3nigBIsHU=; b=iVKffCsACR0qj1jUWtKvOHnDW8yG7un9u1y4qOMWCsbCoA8deMKXreK/Q0MwrUxsIK +T1i+uzzSfIpmQf0+8wtdjQhBafAvGwBUo1Om8XUo2BEYyJcBEO8d/2CSl/iXbrKDi50 gF8jmkpX/flCBqUwXERJcwW//KvFyZlJWVpPUNdMaswvgaT1o7O++NilwDQqp1CKp7nE ryMduFwPtOdKUCBpyS+7qlpdqxNcqpCt/vUZt+kCiAsynsy0ZzOcmdB0gV6iqtDer9Sy AUUlLE12wOVr13gC+bQqtNCY+xD3aiqmo+IqZLZiohIa2qLDQ46sV3roTdl0O50V8dHm bS0A== X-Gm-Message-State: AOAM531ZK8LumTcXxYsSpZ4xoQK4TdR9GRprlRBLXTe6JE2ngpnU4sCu Lfy4C2yFKqDmAvm8h2eq2N0Gmw== X-Google-Smtp-Source: ABdhPJxY4+BRFWr2oLaQT7CewYxbmDSY4Ltzs6bqfYryAg0iIj3epL0BFTw759VW5bDr1iaLu/V+ug== X-Received: by 2002:a17:90a:930e:: with SMTP id p14mr1003518pjo.132.1631158203056; Wed, 08 Sep 2021 20:30:03 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id z9sm315113pfk.28.2021.09.08.20.30.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 20:30:02 -0700 (PDT) Date: Wed, 8 Sep 2021 20:29:59 -0700 From: Stephen Hemminger To: Qiming Chen Cc: dev@dpdk.org, ferruh.yigit@intel.com Message-ID: <20210908202959.2099eb1e@hermes.local> In-Reply-To: <20210909024531.10009-1-chenqiming_huawei@163.com> References: <20210826032354.1146-1-chenqiming_huawei@163.com> <20210909024531.10009-1-chenqiming_huawei@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3] net/pcap: improve rx statistics 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, 9 Sep 2021 10:45:31 +0800 Qiming Chen wrote: > In the receiving direction, if alloc mbuf or jumbo process failed, there > is no err_pkts count, which makes it difficult to locate the problem. > Because alloc mbuf failed, the rx_nombuf field is counted. > > Signed-off-by: Qiming Chen > --- > v2: > Clear coding style issues. > v3: > 1) Send direction does not release mbuf. > 2) Failed to alloc mbuf is counted to the rx_nombuf field. Looks good, the field "err_pkts" is a confusing name for me. On Tx it means packets dropped because pcap_sendpacket() returned error. Looking inside libpcap that means send() failed. On Linux this is a send on a PF_PACKET socket and it appears to be a blocking socket(). So these errors are not transient conditions. On Rx it means packets dropped because out of mbufs. Perhaps a comment or renaming the field would helped.