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 C25054402A; Tue, 14 May 2024 10:37:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D923402DF; Tue, 14 May 2024 10:37:57 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by mails.dpdk.org (Postfix) with ESMTP id 3C359402AE for ; Tue, 14 May 2024 10:37:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715675875; x=1747211875; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=OHkNyuD0N41+idieCaTTKqm3JZhypSlZ4Rx4Lp/caxA=; b=jTrQE/lWu+jogp3WnaOWnpt0fw4wOHWWOkANTSdQVZPub8fru081nxzu 87Iq7oZ9v9ter2K5JZstAcbJqqNQBFc/prrfBTKqpJoZ990IZkk0I0fCI U3VH+F/s6nASbK4k+RIgucZ4HhDGSVljuSZ6ocigQBULt9QCJr6adjZQE gQFOfS2GHykJJ5HsQm2urp+MBYgj6mhfrAuNdUNafbdlq9XwYE2GPXxvn jbUTST89/EOuLROHJl9a0ULdJY2H48T0N4YGkgXpINZOxaylvJIiPv2ZJ gTDd2l+jVz06LdH4pfHBE/I287NxYULBGdOUR+WbKp7SGJN4XNFDd+xZR g==; X-CSE-ConnectionGUID: p/XmI4eITiOpBDfh5qZKkw== X-CSE-MsgGUID: Teiz6Z0ZS4GPxUt711E06g== X-IronPort-AV: E=McAfee;i="6600,9927,11072"; a="22244158" X-IronPort-AV: E=Sophos;i="6.08,159,1712646000"; d="scan'208";a="22244158" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2024 01:37:53 -0700 X-CSE-ConnectionGUID: MjN01ux2SvWLL/tc/d6a4A== X-CSE-MsgGUID: eDkrLiPsRZqWokpQttoEzA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,159,1712646000"; d="scan'208";a="30686461" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa010.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 14 May 2024 01:37:53 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 14 May 2024 01:37:53 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 14 May 2024 01:37:53 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 14 May 2024 01:37:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HX2V96FXH+ep8UhxmnNOle7uQsIF4LKbYRduEPM54V7UkyhMekCJm7RNKLPFSt871dslIz4KHFufXnvJX3jMfdHSoLsZ89wo+P3WVv2C0c7WHlivBrCgvIH2WmqhkU6rGDX17Un38J9nAiV12hkNUUw8w/4OdyOl1ueBVAAgeI5YBTsLJPBnJfAQqwsxhLYeFYG5c3wLc1n1E8SqqAw6oMekfVFH/BaoBP/vRZjHsBq6D0F9K1vzbjdezHGWYsQx7ki/ACrmSfobHFbfsolxj73bIBnEUyXBOgzAD9ZKVp3PbMqOYYETrHMowvYpDvC7YOhinYA4wAc7M96wSVak/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Zj4BdTMTYh4a92jgyo6p2sRMUBEOeGF3YqXVfyMH4qs=; b=YwR+8U/Tg+wHfPeRVR8VdLgs/BCjPP3zyqyvlnQBOhsV/4RuVlulPI7xmiBDB6DpFVwJxVGCmGwtdKR61HrocoVbQuBAN0j8e0hfRqokIvFUYEwYi09O3oVI2jynSmMCgweE5Pz1Deu9xzETGirG5je5m1TzbXz/w+mCxS75l/8d0YrlcKKxCBQJP6qO+Pb7P/UaBMpxkYLFYCCEI9KzJlfrFR0VQN2TYr8rEmS+Zlh+fyOy5kkGYL8R/AlU7eCzTvF9n80/xeMYGk06DfO+dg2coT/Jc/llWUVQfsM0R67br/AoQybRWFp6e8I5lxfuIus+eq+VVxthkTORD++hLw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by BL1PR11MB5286.namprd11.prod.outlook.com (2603:10b6:208:312::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Tue, 14 May 2024 08:37:51 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::6444:ca4c:aa3e:f8d2]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::6444:ca4c:aa3e:f8d2%4]) with mapi id 15.20.7544.052; Tue, 14 May 2024 08:37:51 +0000 From: "Loftus, Ciara" To: Stephen Hemminger CC: "dev@dpdk.org" Subject: RE: [PATCH 2/3] net/af_xdp: Fix mbuf alloc failed statistic Thread-Topic: [PATCH 2/3] net/af_xdp: Fix mbuf alloc failed statistic Thread-Index: AQHaosF4vS9krFftWkGcRq6lu0Sc17GQka4AgAXcnRA= Date: Tue, 14 May 2024 08:37:51 +0000 Message-ID: References: <20240510100358.18815-1-ciara.loftus@intel.com> <20240510100358.18815-2-ciara.loftus@intel.com> <20240510080612.7b420011@hermes.local> In-Reply-To: <20240510080612.7b420011@hermes.local> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5872:EE_|BL1PR11MB5286:EE_ x-ms-office365-filtering-correlation-id: f58e6125-aab8-4ddf-aaee-08dc73f12431 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|1800799015|366007|376005|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?iZ4HifMkj2FfgkBrOSzmQ1iL4ojEjZvrQia1IaLHuu3dyO648HKzML3caobw?= =?us-ascii?Q?rTD8+tFKC5heBccG/TLQI2ADUb25Y79b0x0R2+JirG+aWV3DzLD3cE5X2Vlr?= =?us-ascii?Q?XzF/4+5O00yCXec9/Dqwnw8hrSerIkfyJw13ayvbVGm8tGxmiLNZn5QFkCEn?= =?us-ascii?Q?5OSrjwBxWPPB5WyDXU16X/7ZTcWZwxA7MNw4RKYpwR1svaIx0AixtJ8s7SKi?= =?us-ascii?Q?9SZcdBz6KVLeHocyZTEofD2nV6dU6STxeZCm7ZLjeL/ZGT9RKUX3ir9j4Qv9?= =?us-ascii?Q?MSnsgeMXrx9rZKmZboBN8YcuvIsikJmAv6zlQYeVLktmgE4iXx2Dx8jK5GBH?= =?us-ascii?Q?nEYntjFduuD3Wh1kMAC5v/uX1Gq8q88yX7DBVwUBkAJM4nCYYjW/zcrYTaAb?= =?us-ascii?Q?g4vHCt+bF7CyjeijTmBkblklFl4KoseKWXF4oJsHOuccYNSDD7yxtg/+FvT5?= =?us-ascii?Q?w118ZBNc9NbpM4rB0vNKVigz1X+o2i1EVSrMRAdj67gltaXz1wfTtlhtz6Wc?= =?us-ascii?Q?G9HMKEVlQs+v2OUjmcMpLsTkDkuqbg5zXtoYMPeUQltjIQWnfH5EAHAWKCiB?= =?us-ascii?Q?1mjZn9nojgzYgyL46LstRtY5eawR1Wwst36HaHznQ6wmDk01VrpJqbvtfh69?= =?us-ascii?Q?ErKZzYc83EuXNZsMr6KKSTjIR3mi1hzvbIHgswVKroSgFzDMzLCu65qrtZJ7?= =?us-ascii?Q?Xe4yL/aLKAd/8alTYFJ5z2CoG9Qc8FSgzjp7LazTN4eaaXXjJobLURJEtgT2?= =?us-ascii?Q?qJliQ22Doz+8tKO04krrw76v+KKqERTwN88iRe00rpvH8V6uNVAg3RUc+bX7?= =?us-ascii?Q?2lmIHCH91tmzQ5xi+AOSTIvOJpgPbTn0LfFDy0R4e2OSL/f0nWSG4OQwQMI5?= =?us-ascii?Q?b203zljYxIailZaSnKYN4EttWS7B0wuDlf4wXFxE/lJmyn/uh6PEp549XFTR?= =?us-ascii?Q?0MEqvkf1WIvJDjcUqry2G6ExSN8bqQfvfwR6kxGihsBFjTUoIwr+kOI3aEjd?= =?us-ascii?Q?LWw/N3WQa7FxssPsziiinQ+HuQsqkFTuFXq3FOT89q+7DI2QabvXQi4LclRI?= =?us-ascii?Q?PGS+01+oU3rmncwwNojO7L56Z+STc1053p++6xe4f38WogUD3FzuDBz3ckVQ?= =?us-ascii?Q?CIA4bOyVyR1AbTYeV+6bPuJ1QgMmmPzBGX3ndJupRjTcyyQuawa/LALbwxBt?= =?us-ascii?Q?hNzssbqBjxyKO6xGZIr4VdP0I6hD1elxf4km1vhQN1CwbgqmYH4D5oEjrDjm?= =?us-ascii?Q?MChcjWesH/zLw8YUgio0ynQVD7krtqeLZU3K/0eSvGZeQkiP2HdKgL2otHYt?= =?us-ascii?Q?Da1+3IFcm2iltA23VVl6VccmURhc4Vrfj2rLZVCiEzJHCQ=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR11MB5872.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(366007)(376005)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1W1zIXRSvWzKOauyjbj90qcLPjuDFbzsfKNB0xTt5KNM0SbB6zWR0zPkJ9mR?= =?us-ascii?Q?v8TSkew9bFkm6xjR5UXxNY8HyG7C3xLxJAcxSCdRxgHo4UWLVTHoE033K6Zm?= =?us-ascii?Q?MRDcojXovPawukrsoaJydKCoxkr+ke2A/i/imcP249pyGsE59rIBG/68QkpF?= =?us-ascii?Q?XH/WZUyOzqCv/2XFRxLTyoJnS7M3WDWJ3yQSzNx86qzsCJPs0bYMlHe93ZMK?= =?us-ascii?Q?syqkhXnES569YZGZz2bUgMGDazpV3SMurJ5p8fw42PSYplfV208Ho0vNIEND?= =?us-ascii?Q?NJl8b7NSl5DBNu0H5fXOFOCytEFAcrSiqYf7h/yxHzZlA0CnJIpQXAL8dLru?= =?us-ascii?Q?aiGHXO1IQ6P2FK/JUsF6DSfEcKUQCLHvF+6mFoKFkfCfr3r8pCTgEpKeyS0P?= =?us-ascii?Q?PLwLjKSbAhukAQCCpS19QcHkRVSLaRI7RKzInPsm2t/pZbSahCmKbJXUwq/a?= =?us-ascii?Q?QPBqqQza/Jfqt7H25ZVgthr+H3xeLnX2y0pofi8m75e//PHg4WPyi1mqQNAR?= =?us-ascii?Q?7WWn+erSqwRbH2RnKGxV6dWsPoi3i5ijRrcMf/OCevZ8454bNm+Ebrad2lu9?= =?us-ascii?Q?aNnmP+BAm7bkwCR8ndhD1F70O6mVJYghnVHrfEZZl1AZuWN2PqU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hpTdMHZrQZJn4ZPW/zm9VqKwqHEY210Jsgvs0wO?= =?us-ascii?Q?4Pe3x+ijl8n5DwFyA1zrSRVuvEqZLCpLDjAzsE3d?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f58e6125-aab8-4ddf-aaee-08dc73f12431 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 May 2024 08:37:51.0735 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tTNEkiyVyX/r+xlRZN20kGOUoUJZQ4YMRScLSZYNVCnMIeIsrliAMHqTQrMFXaYPbvb/VJsMUVno9ZvZ4DyLzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5286 X-OriginatorOrg: intel.com 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 >=20 > On Fri, 10 May 2024 10:03:57 +0000 > Ciara Loftus wrote: >=20 > > diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c > b/drivers/net/af_xdp/rte_eth_af_xdp.c > > index fee0d5d5f3..968bbf6d45 100644 > > --- a/drivers/net/af_xdp/rte_eth_af_xdp.c > > +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c > > @@ -124,6 +124,7 @@ struct rx_stats { > > uint64_t rx_pkts; > > uint64_t rx_bytes; > > uint64_t rx_dropped; > > + uint64_t alloc_failed; > > }; >=20 > You don't have to use local statistic for this, there already is one in t= he dev > struct > i.e dev->data->rx_mbuf_alloc_failed. The problem is you need the DPDK por= t > number to find > what dev is. We now have the port number from the first patch in this series so that's n= o longer an issue. >=20 > And the code in ethdev for stats get will put it in the right place. >=20 >=20 > PS: what is the point of rxq->stats.rx_dropped? It is never incremented. Looks pointless indeed. Will add another patch to the series and remove it. >=20 > PPS: Looks like AF_XDP considers kernel full as an error (ie tx_dropped g= ets > counted as error). > This is not what real hardware does.