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 B05C943F5D; Wed, 1 May 2024 18:26:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72B0F402A8; Wed, 1 May 2024 18:26:08 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2087.outbound.protection.outlook.com [40.107.93.87]) by mails.dpdk.org (Postfix) with ESMTP id 77F974027F for ; Wed, 1 May 2024 18:26:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OaAKELSoBkiWXwfR92PYHDJHjJfCWm0oAtQ4DxqDiFheK+3YzBZBsod4GEH9zdMpZmluhH+z3AAeikN6kcJpniwe69fzl02h5xbZm9Q/lGWWOy4JTfFEUPxWOJ4K7xPPaKGQSy+/CYiee9QQKkdigFwnhbpf60IsjsQKGcjpUhHEC/VTOxZ/AJMnd8LuzbVNJXJ9Bu65GFHH+aQuqRsAy93WXsrl58QmyeJUrMDFMsfusxdy6PXieLi+35FWkpeGmaKq/W/kG3LRlTJQze4zFZeZ2WD7IQLO1gp/P/wMv96FYzqCdHhnibuQbyLasKBWUjS4WepDG32fifgJi5/cYw== 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=mOTHBOLyHdkQxyo1YK+ElTsqnmnEo7cyunKx4/USqVg=; b=IN6ooD1IIQUYw6OukRitaOpR9lZIZrVwG5JPOleE3owVAx78IIRYxXHB2etx3xomrBdzALT4flZmwTwAi172epLjbLzWU3xuIpZGsYL6eUfhB9YYNDGB3STC4GBBqRvlKgNe3CtBa1DjElxNPOXCHsoJyKfphSUBBp61sQplOgwhWtqLw5jJK+5OOQnj0ghSPIUL50aHgRyG44EtCuoAW0nI0M6mp/8Gw+VuQIl2stW6+CxYlRBJP4O5WLZjFs5t1YzoZkyC++maErDjdqGB75zDXuZ4Ivh9s8xd80eAqnG8ey6qQbZcaMDBxD6BW9H4cYICUtggNTQnNvjdV08apQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mOTHBOLyHdkQxyo1YK+ElTsqnmnEo7cyunKx4/USqVg=; b=XLBYatj1Es8qsR5MGS+ExZUVPx/CKu6KXfJxiUezhDuVsqJ20WQQuPOaqyKCXFUY+29zuRiMcHZjzrbcmZFT3FXzxHTVncWaVEgIk3HJTPqb4JujTMlb/7QlslK49pJ2TlmMdQcA1tjJsQSXqrHPDOsaeFsz3iyWDx0r2Ytf9r0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by PH7PR12MB7916.namprd12.prod.outlook.com (2603:10b6:510:26a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.35; Wed, 1 May 2024 16:26:03 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::282f:29d3:cac1:cde3]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::282f:29d3:cac1:cde3%7]) with mapi id 15.20.7519.035; Wed, 1 May 2024 16:26:03 +0000 Message-ID: <9025199c-585c-4779-9f4e-360845707088@amd.com> Date: Wed, 1 May 2024 17:25:59 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net/af_packet: fix statistics To: Stephen Hemminger , dev@dpdk.org Cc: "John W. Linville" , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= References: <20240430154129.7347-1-stephen@networkplumber.org> Content-Language: en-US From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJkdyEEBQkE3meNAAoJEFRTPtCK Km/6UdcP/0/kEp49aIUhkR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In-Reply-To: <20240430154129.7347-1-stephen@networkplumber.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0212.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::32) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH7PR12MB7916:EE_ X-MS-Office365-Filtering-Correlation-Id: 97e06ed2-43d3-4369-5c19-08dc69fb64e1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?VXZScmc2bTlqOWoxVVI1N3pTbm5UZUZyMjIrUVNVYXRWMGlReTI1cGRtNzVS?= =?utf-8?B?QWF3cG5UdWlpQysySmlkSmprRmsvYTlIMkFvTVR4MXVmR2FYTHcyUks5UGU5?= =?utf-8?B?VEJsVU5kWC9RNDFFbm1yeVo3VDU1MnZ2eUdSY1NOM0xaT2JmVUUzMDJjdkl1?= =?utf-8?B?OUJPL0crSXczWTU0UDdrUFQxRFZUTTAyeW1UbnhhWDNEcFkxeFNWUWcwTUVZ?= =?utf-8?B?dmlybHNEYXRVUVR4RWNDTmZpU2Z0eHo5TVVuZ3JXYmFidmFjRHk5SUxWbGhK?= =?utf-8?B?Y1MwdkI3STUrZTVqTEp5WndyNmdMWllYeWlXU204d2k0bkxST0xKRGZGTzZT?= =?utf-8?B?SklzK2xRdThaTURVd2s4RnJoT2piYi81SzVGdllUSTFCSjdoUkxwN01LR05R?= =?utf-8?B?eUlMdGNZZWFHYzE2SHFSNEJmL1QwQ3h4aWdpUHlER3hya2pEVFJJTU5iMk1J?= =?utf-8?B?bmdrTTVjTVFaTDV4Mko4R2szMVd5M1Fmd2xIRXFsMHdzYUpTZHYzUUR2UlE3?= =?utf-8?B?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HI0SitNZnN2?= =?utf-8?B?VFZjZ2NZbTJ3STdlNzZSZVlsRkZUNVpOeFJwQnVIekh3bmJ1UFV0Nm1ad05o?= =?utf-8?B?WjB5K2VLV2Y2clNHWHRiVDBURmROcEFFanZwWWp1SGdZOU81NDFGYW9BRUJ0?= =?utf-8?B?UTJMZUxJbTAvM2hyV0hFNnlCVERlNGVDTEllNXpoLzUzZjM5cXdFdkozWmMr?= =?utf-8?B?K3pUU1hQOXRsV3FBWURYRkI4d2JMcVA0VE00amI5SWJudnVmMmVNazIrRGN0?= =?utf-8?B?aENBbEFMMlR1TVJpWGQzMTBHVGVRbE1TTW5GMjVrVlZiOTZwWnpjVk5nPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(376005)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UkVOVmc5WHB5VndxbkJlYnRDL0xLL2NkcWEyQTR2VnJlQmpWNmNEbW55bURr?= =?utf-8?B?bDNmL0pzanA3NE9DMEQ2OGczby9VZVdrVW1IbmlzTGg5SzZzSTRMaUFBMlBF?= =?utf-8?B?bURTZDMwNFYremRZWmRoU0JQeTN2b2dOM0ovckxsdzRaMkRBV0ZobjJGZlVl?= =?utf-8?B?blJRVFBJaUFKeWRCRXJSbXhMY3l1NkYvd2YrSTJRREcxeHkwM1Joa25RV0Zi?= =?utf-8?B?MW8xTFBOdi85NTJQWi9oeXNtbDV0SFJLMmFNbk0yMGNQbEE1RnplM0lUWkRT?= =?utf-8?B?aEFEdGNwWnJCMnY2TGFwNjJHVUd2VXc1RDhVVzl0RDNpMFkvUlUvYUw3ZElU?= =?utf-8?B?NE55RE9Mb2I4ak42ZGVtK3UzS2V5MFR0TGltcVkxNnV6c0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97e06ed2-43d3-4369-5c19-08dc69fb64e1 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2024 16:26:03.2312 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9NIWtoRFvSnOmnef0kTV/e1NPwg15To/ADRQ7jjtBsIf/qY/Ctz2hKuYxhSQH5rn X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7916 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 4/30/2024 4:39 PM, Stephen Hemminger wrote: > The statistics in af_packet driver do not follow the standard > practice of other drivers: > > - Statistics should be maintained as 64 bit even on 32 bit. > ack > - Remove the tx_error counter since it was not correct. > When transmit ring is full it is not an error and > the driver correctly returns only the number sent. > nack Transmit full is not only return case here. There are actual errors continue to process relying this error calculation. Also there are error cases like interface down. Those error cases should be handled individually if we remove this. I suggest split this change to separate patch. > - Query kernel to find the number of packets missed. > ack. > - Do not mark statistics as volatile. > Instead, READ_ONCE() where necessary. > I did similar [1], and Mattias has some comments on it. Issue is not in the reader (stats_get) side. Without volatile writer (datapath thread) may end up *not* storing updated stats to memory. For reader side, I expect value not been in the register when function called, so it ends up reading from memory, which doesn't require volatile casting. [1] https://patchwork.dpdk.org/project/dpdk/patch/20240426143848.2280689-1-ferruh.yigit@amd.com/ > Also, the variable namge igb_stats looks like a copy/paste leftover > > Signed-off-by: Stephen Hemminger > --- > drivers/net/af_packet/rte_eth_af_packet.c | 82 +++++++++++++---------- > 1 file changed, 48 insertions(+), 34 deletions(-) > > diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c > index 397a32db58..0313aee482 100644 > --- a/drivers/net/af_packet/rte_eth_af_packet.c > +++ b/drivers/net/af_packet/rte_eth_af_packet.c > @@ -39,6 +39,10 @@ > #define DFLT_FRAME_SIZE (1 << 11) > #define DFLT_FRAME_COUNT (1 << 9) > > +#ifndef READ_ONCE > +#define READ_ONCE(var) (*((volatile typeof(var) *)(&(var)))) > +#endif > + > struct pkt_rx_queue { > int sockfd; > > @@ -51,8 +55,8 @@ struct pkt_rx_queue { > uint16_t in_port; > uint8_t vlan_strip; > > - volatile unsigned long rx_pkts; > - volatile unsigned long rx_bytes; > + uint64_t rx_pkts; > + uint64_t rx_bytes; > }; > > struct pkt_tx_queue { > @@ -64,9 +68,8 @@ struct pkt_tx_queue { > unsigned int framecount; > unsigned int framenum; > > - volatile unsigned long tx_pkts; > - volatile unsigned long err_pkts; > - volatile unsigned long tx_bytes; > + uint64_t tx_pkts; > + uint64_t tx_bytes; > }; > > struct pmd_internals { > @@ -305,7 +308,6 @@ eth_af_packet_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) > > pkt_q->framenum = framenum; > pkt_q->tx_pkts += num_tx; > - pkt_q->err_pkts += i - num_tx; > pkt_q->tx_bytes += num_tx_bytes; > return i; > } > @@ -386,54 +388,66 @@ eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) > } > > static int > -eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats) > +eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) > { > - unsigned i, imax; > - unsigned long rx_total = 0, tx_total = 0, tx_err_total = 0; > - unsigned long rx_bytes_total = 0, tx_bytes_total = 0; > + unsigned int i; > const struct pmd_internals *internal = dev->data->dev_private; > + uint64_t bytes, packets; > + > + for (i = 0; i < internal->nb_queues; i++) { > + const struct pkt_rx_queue *rxq = &internal->rx_queue[i]; > + struct tpacket_stats pkt_stats; > + socklen_t optlen = sizeof(pkt_stats); > + int fd = rxq->sockfd; > + > + bytes = READ_ONCE(rxq->rx_bytes); > + packets = READ_ONCE(rxq->rx_pkts); > > - imax = (internal->nb_queues < RTE_ETHDEV_QUEUE_STAT_CNTRS ? > - internal->nb_queues : RTE_ETHDEV_QUEUE_STAT_CNTRS); > - for (i = 0; i < imax; i++) { > - igb_stats->q_ipackets[i] = internal->rx_queue[i].rx_pkts; > - igb_stats->q_ibytes[i] = internal->rx_queue[i].rx_bytes; > - rx_total += igb_stats->q_ipackets[i]; > - rx_bytes_total += igb_stats->q_ibytes[i]; > + stats->ipackets += packets; > + stats->ibytes += bytes; > + > + if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) { > + stats->q_ipackets[i] = packets; > + stats->q_ibytes[i] = bytes; > + } > + > + if (getsockopt(fd, SOL_PACKET, PACKET_STATISTICS, &pkt_stats, &optlen) < 0) { > + PMD_LOG_ERRNO(ERR, "could not getet PACKET_STATISTICS on AF_PACKET socket"); > + return -1; > + } > + stats->imissed = pkt_stats.tp_drops; > } > > - imax = (internal->nb_queues < RTE_ETHDEV_QUEUE_STAT_CNTRS ? > - internal->nb_queues : RTE_ETHDEV_QUEUE_STAT_CNTRS); > - for (i = 0; i < imax; i++) { > - igb_stats->q_opackets[i] = internal->tx_queue[i].tx_pkts; > - igb_stats->q_obytes[i] = internal->tx_queue[i].tx_bytes; > - tx_total += igb_stats->q_opackets[i]; > - tx_err_total += internal->tx_queue[i].err_pkts; > - tx_bytes_total += igb_stats->q_obytes[i]; > + for (i = 0; i < internal->nb_queues; i++) { > + const struct pkt_tx_queue *txq = &internal->tx_queue[i]; > + > + bytes = READ_ONCE(txq->tx_bytes); > + packets = READ_ONCE(txq->tx_pkts); > + > + stats->opackets += packets; > + stats->obytes += bytes; > + > + if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) { > + stats->q_opackets[i] = packets; > + stats->q_obytes[i] = bytes; > + } > } > > - igb_stats->ipackets = rx_total; > - igb_stats->ibytes = rx_bytes_total; > - igb_stats->opackets = tx_total; > - igb_stats->oerrors = tx_err_total; > - igb_stats->obytes = tx_bytes_total; > + > return 0; > } > > static int > eth_stats_reset(struct rte_eth_dev *dev) > { > - unsigned i; > + unsigned int i; > struct pmd_internals *internal = dev->data->dev_private; > > for (i = 0; i < internal->nb_queues; i++) { > internal->rx_queue[i].rx_pkts = 0; > internal->rx_queue[i].rx_bytes = 0; > - } > > - for (i = 0; i < internal->nb_queues; i++) { > internal->tx_queue[i].tx_pkts = 0; > - internal->tx_queue[i].err_pkts = 0; > internal->tx_queue[i].tx_bytes = 0; > } >