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 C78E44401B; Mon, 13 May 2024 17:53:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4DC5D4064A; Mon, 13 May 2024 17:53:42 +0200 (CEST) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id DA44A402CD for ; Mon, 13 May 2024 17:53:40 +0200 (CEST) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-6f4472561f1so4181073b3a.0 for ; Mon, 13 May 2024 08:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1715615620; x=1716220420; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=cHH/7474XAVqrjPXB/GktAULPFr+2C5CyPe1Gip4Ywc=; b=BYhCExapa0kpO6LxMsgr03KrEkPrPcy/PYb6sQ5/RZpUA2imo/hU3Qx5RNThIiP6VT 8E/1xAvtZn0V7Yjt78V1ZdvgjEVQenSsurfrFrZskaO88NWY89p9ZRbkp3/bvIhCeahw hEnJ/QayounXt9DNQ8hsDg3pdQV78uppTDtb8BEb8ZQpbKNasLhk4s0KqzFSRBCUXtRI Y1EQAMqxs//IbHXV9OY9e6rabdgxx2byAVJg1gC9Kuov6hs+QDxa0/6jBGvrmlbjWMAh nlptc7NXIxgCOYQSt0SQ/bNLhSDsb5gdzSFqvHUpBqltbWptrtqUdlm8/v1uh4LgVd/+ 5NpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715615620; x=1716220420; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cHH/7474XAVqrjPXB/GktAULPFr+2C5CyPe1Gip4Ywc=; b=jhOwSlNbScolKTKIkvgcqUBCKApXdyRxfC7PkUeeyobUIf5Kxo2zOLsUT/Rk+I8gUM SLTTjy2/ld3bzoWIDrHyb67XRNtkIBgycL8U2tuUeK0QHp28AScGejUePDyAg6K/yuxy KM6HBtsumVQDRqw7oVcgVWea8Xg3NOO4sorLX5qlqYbAmxiJx6F3a8MY1d20ElQAmDgS pnS1BYnwgIpk+37MeSo6ylrVMd0rOkCA2mbLzBtx1q8yypSW0lbtA3vSIDjS74NbmPvC 2KM2dHOOSvYTApflqGtxm0NuV5/pfP0wRHGBjMjbUBrNEHa/79V9gvOy49WMHLdw5u2t U3XA== X-Gm-Message-State: AOJu0YwDcPum13QDGQcyKAvkwIUtpQFzSnp1722JPDI7vvbuGRVpn38A T9AQ2cbom6iQYB+AglcQ75BvdkBnvQa3dtSh2rn9VuEtuKaZcbDfpsa90g4f7nI= X-Google-Smtp-Source: AGHT+IHXVxHJGGzUQs4tPVMrZfrypRn6v1FD3OrjnjbExVj8ph3O6/s8XmdJNAocQNCvGJ4ZS5wfkA== X-Received: by 2002:a05:6a00:13a6:b0:6ea:b073:c10c with SMTP id d2e1a72fcca58-6f4e029cbefmr16712191b3a.6.1715615619675; Mon, 13 May 2024 08:53:39 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6340b86255asm6931352a12.38.2024.05.13.08.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 08:53:39 -0700 (PDT) Date: Mon, 13 May 2024 08:53:37 -0700 From: Stephen Hemminger To: Maryam Tahhan Cc: dev@dpdk.org Subject: Re: [PATCH 2/3] net/af_xdp: Fix mbuf alloc failed statistic Message-ID: <20240513085337.6665bd5f@hermes.local> In-Reply-To: <97be801a-bc5c-47bd-bb1f-23cca7f1fbcf@redhat.com> References: <20240510100358.18815-1-ciara.loftus@intel.com> <20240510100358.18815-2-ciara.loftus@intel.com> <20240510080612.7b420011@hermes.local> <97be801a-bc5c-47bd-bb1f-23cca7f1fbcf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Mon, 13 May 2024 09:23:08 +0100 Maryam Tahhan wrote: > On 10/05/2024 16:06, Stephen Hemminger wrote: > > You don't have to use local statistic for this, there already is one in the dev struct > > i.e dev->data->rx_mbuf_alloc_failed. The problem is you need the DPDK port number to find > > what dev is. > > I think the diff id that dev->data->rx_mbuf_alloc_failed would reflect > the pure HW(NIC) failed allocations where as the local alloc_failed > would reflect the failed allocations on the xdp side. Both should be > accounted for. Since this is not the fast path, why not just increment the global statistic. This is a SW driver, but it can increment statistics just like a HW NIC driver.