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 471BC45AFB; Thu, 10 Oct 2024 04:15:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBA624029A; Thu, 10 Oct 2024 04:15:02 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2068.outbound.protection.outlook.com [40.107.95.68]) by mails.dpdk.org (Postfix) with ESMTP id 599EF4025C for ; Thu, 10 Oct 2024 04:15:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=T5YSnTeQlnxJTMcmSHilGkBFdgZhad/fYbtjokPYii0syC51+ClIbMFSG4/h5qJXL4526TMWOnpBJbnWnfxWGL1uUwCZ8vKCAqSQOgMgNn0n/NLFEBxG9CDuiJHgUCd3SwgOJi7nlPiQ4hMcROYNaH0ccDyj7WsJVxsBbDiG4KcPRNcokyltleeO17+Wg7AH6hp0/OAgYJYM8avtheE01M9rryDhSDXhkdyLscU/qtcwkVVAefxKJB33jYasqC1yHmSIHR7EmCGVVUImL73Qv9CCpOnQQOIo6eOxksxd/5z0+pmbQZEx+LXpVoOU1JmgwSHNShcOXjIVQzNnOSHyGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=/qivuxSmD2848t2d5QePuwbN1FF3CSBHREdyOLmHz3Q=; b=UXzHj/JpCzja9j2qzge2PrOO5DLMMQ6S00rEcAVhV8YGV/3wESIS8VcQ4T2r4sBmPuXSp8jgs/8SXrIB26hD1WAT3yE5s1APePXUpW82Xx6Q9IV05wBq1tWXdu+dTbXGV8MRFbuUEm2BfUAQQjWsHjtnCdzEXVNxi3/y4B8cOiSG5p+QAvtimPNWPq+uh8kNgq9DCdnAgl3zn8Lv6Uw40EoUG1nqFLvEU2R35ybDUczLju0HPkWA4bLqkWsXpw1nq87zuMszxvvmNUdo019rLSUVsmtjj6TKh9Qo+dfLbfTOLPMD/dnEd2lgnwgadmvZYTC3VzG9wTJwmsQr4AgjvA== 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=/qivuxSmD2848t2d5QePuwbN1FF3CSBHREdyOLmHz3Q=; b=OgDdtmbudgsMcv/bPuz0rCrdRs9M41Yxw0RjsPZKUMPoRi1slKFTcPkkboIS1SViNWQmoh/P5Gso6b6vMg9iNahBkI1CFJzsau9yIW1AS/+ZnC97NeHHxLyqg+oI57stkvKRBK0awSBitbrkB11fh7XCyJpy9oddZ+FbbcwXf40= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SJ2PR12MB8830.namprd12.prod.outlook.com (2603:10b6:a03:4d0::9) by DM4PR12MB6663.namprd12.prod.outlook.com (2603:10b6:8:8f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Thu, 10 Oct 2024 02:14:59 +0000 Received: from SJ2PR12MB8830.namprd12.prod.outlook.com ([fe80::c3eb:df02:eaa9:2055]) by SJ2PR12MB8830.namprd12.prod.outlook.com ([fe80::c3eb:df02:eaa9:2055%4]) with mapi id 15.20.8026.020; Thu, 10 Oct 2024 02:14:59 +0000 Message-ID: <5fd99bc4-cad2-4a40-b4cd-6d6332cc491b@amd.com> Date: Thu, 10 Oct 2024 03:14:48 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net/pcap: use pcap_next_ex to track errors To: Stephen Hemminger , dev@dpdk.org Cc: Ofer Dagan , Tyler Retzlaff References: <20240905161129.73553-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/6Ud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LHqNxKuyO 8Zk= In-Reply-To: <20240905161129.73553-1-stephen@networkplumber.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SG2PR01CA0140.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::20) To SJ2PR12MB8830.namprd12.prod.outlook.com (2603:10b6:a03:4d0::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR12MB8830:EE_|DM4PR12MB6663:EE_ X-MS-Office365-Filtering-Correlation-Id: a44877f0-19d2-4b2c-79f3-08dce8d15741 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?QU1iY3hRMEwzR09KWnhrcnZyUUNoaHhnNzNWYUt6N2ZGTktCMlk2T0w2d1pJ?= =?utf-8?B?THdTK1lBV0ZqQStPUXhlc3BEVkxQc2ZlQWJVYm9SYTB6ZUIyc0VtRGlXZkNy?= =?utf-8?B?RGRxUW5DenJ4YS9RbHdPWkdFdFVETlJ2b01FeFJHSFA5enorbkNwQkdIUkUv?= =?utf-8?B?V1BUMTQxS2pKZkFLSWNLbHhEOEN3R1pYLzB5VmRTQ2hCYjJvVGUyWGt4aTY0?= =?utf-8?B?UUMvSkhmbERNZW5wUEtPQWJBSkVpWE83SFRzamlsQ01yalN5MDRsY2lSMTJp?= =?utf-8?B?UXBWRzY5b0Fib215b1owckxLSngrSTJIUkc3Tm9LN0ZLSEhjVUhhMzVjODRz?= =?utf-8?B?K0NrYnAyZFlyT2ZvTitSdEgwUzJzaVhBS0M0ZTBES2VCbkJpZTdHb1JJTDMx?= =?utf-8?B?VEwrSGJuYktkUU00UzBwMkppYko3Qmc5Y2VMMkVnN1JUelZhUVp1dTZHc0JF?= =?utf-8?B?dVpTRnp5UmZKVnltb0krdi9jcllPcTFQdGNIdnhxVGJrUDQrNXp1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djVUlDRFlhSjdCdDROY3UxMXZH?= =?utf-8?B?NTJDUlg5dS9ONUllbnljQTVsbGJZaTdsMEtBeElYTDZoMGFXSDVlUVJFMTVM?= =?utf-8?B?VUExc2hZejlLTGwzeFNIMTNnam5vS3pMbU94ZEZ4UWViODk2TjRLc0FRMlY1?= =?utf-8?B?M2NhSmNTd1BDcFpIOXltNWlKeXNRb2puaWNKRDIwQVdHOWQyTlZPdEV5Z2JV?= =?utf-8?B?eHFyZUNtK2lZdWluNFo1SHJiTjFET0VEckxxSjMvbmNtUU41UGt6UlptRURu?= =?utf-8?B?aG02Y0dncXU0SVp2K0RSa2VydkFXaFcwRGtwTkM5bkRYOUZKN3FPZjZ3PT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ2PR12MB8830.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Vkx4Mit2Q2taTlo1MGlld0xLUzdhczQrcHZDU2tuQjFuOGZhR2dCSjRsdkIr?= =?utf-8?B?QTJOYzNJZnJYRE00YjJnK1kyOW9uTkZOUWxjdGZZelVORTAxYkxPTEJVU2VL?= =?utf-8?B?My9DSXJqVGtuOGU0S0RCNEpLakZ4Nm9NZHdKa254eXhCMDRrRlFPWWFVZ2tr?= =?utf-8?B?eFB3amZ2UzJQSm9sQVlnM0ZDeUdtNFVoWFppYi83Z1JWL2ZWbG5rVk5PcDR5?= =?utf-8?B?cjJMSVJlZXovMEZMWGRNcGxkZldOZkZIUVJkZW10b3p3MXdkZEFTNm0vMGxG?= =?utf-8?B?K3E3OUJMbGUyWFRqSmdEMXJDVVlhRU10UEZOVElaaDFjcm9pWVF4MW85R2hn?= =?utf-8?B?ZVcyNEdJMEJubnhJa2t4c3lzNnVYQk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a44877f0-19d2-4b2c-79f3-08dce8d15741 X-MS-Exchange-CrossTenant-AuthSource: SJ2PR12MB8830.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2024 02:14:59.2003 (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: OnsdB3Tpwsvzabn05VNpEnX3YnpqaMlaRCAAA7gcgmwFQ+LUCKoKrv2YHDqFIlRg X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6663 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 9/5/2024 5:10 PM, Stephen Hemminger wrote: > Use pcap_next_ex rather than just pcap_next because pcap_next > always blocks if there is no packets to receive. > Hi Stephen, Do you know if using 'pcap_next_ex()' (instead of 'pcap_next()') has any dependency impact? Like can we rely that all libraries that support 'pcap_next()', also supports 'pcap_next_ex()'? > Bugzilla ID: 1526 > Reported-by: Ofer Dagan > Signed-off-by: Stephen Hemminger > Hi Ofer, Can you please verify this fix? > --- > drivers/net/pcap/pcap_ethdev.c | 33 +++++++++++++++++---------------- > 1 file changed, 17 insertions(+), 16 deletions(-) > > diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c > index bfec085045..261997be5c 100644 > --- a/drivers/net/pcap/pcap_ethdev.c > +++ b/drivers/net/pcap/pcap_ethdev.c > @@ -274,7 +274,7 @@ static uint16_t > eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) > { > unsigned int i; > - struct pcap_pkthdr header; > + struct pcap_pkthdr *header; > struct pmd_process_private *pp; > const u_char *packet; > struct rte_mbuf *mbuf; > @@ -294,9 +294,13 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) > */ > for (i = 0; i < nb_pkts; i++) { > /* Get the next PCAP packet */ > - packet = pcap_next(pcap, &header); > - if (unlikely(packet == NULL)) > + int ret = pcap_next_ex(pcap, &header, &packet); > + if (ret != 1) { > + if (ret == PCAP_ERROR) > + pcap_q->rx_stat.err_pkts++; > + > break; > + } > > mbuf = rte_pktmbuf_alloc(pcap_q->mb_pool); > if (unlikely(mbuf == NULL)) { > @@ -304,33 +308,30 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) > break; > } > > - if (header.caplen <= rte_pktmbuf_tailroom(mbuf)) { > + uint32_t len = header->caplen; > + if (len <= rte_pktmbuf_tailroom(mbuf)) { > /* pcap packet will fit in the mbuf, can copy it */ > - rte_memcpy(rte_pktmbuf_mtod(mbuf, void *), packet, > - header.caplen); > - mbuf->data_len = (uint16_t)header.caplen; > + rte_memcpy(rte_pktmbuf_mtod(mbuf, void *), packet, len); > + mbuf->data_len = len; > } else { > /* Try read jumbo frame into multi mbufs. */ > if (unlikely(eth_pcap_rx_jumbo(pcap_q->mb_pool, > - mbuf, > - packet, > - header.caplen) == -1)) { > + mbuf, packet, len) == -1)) { > pcap_q->rx_stat.err_pkts++; > rte_pktmbuf_free(mbuf); > break; > } > } > > - mbuf->pkt_len = (uint16_t)header.caplen; > - *RTE_MBUF_DYNFIELD(mbuf, timestamp_dynfield_offset, > - rte_mbuf_timestamp_t *) = > - (uint64_t)header.ts.tv_sec * 1000000 + > - header.ts.tv_usec; > + mbuf->pkt_len = len; > + uint64_t us = (uint64_t)header->ts.tv_sec * US_PER_S + header->ts.tv_usec; > + > + *RTE_MBUF_DYNFIELD(mbuf, timestamp_dynfield_offset, rte_mbuf_timestamp_t *) = us; > mbuf->ol_flags |= timestamp_rx_dynflag; > mbuf->port = pcap_q->port_id; > bufs[num_rx] = mbuf; > num_rx++; > - rx_bytes += header.caplen; > + rx_bytes += len; > } > pcap_q->rx_stat.pkts += num_rx; > pcap_q->rx_stat.bytes += rx_bytes;