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 057FA431E4 for ; Mon, 23 Oct 2023 19:19:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B6295402CB; Mon, 23 Oct 2023 19:19:39 +0200 (CEST) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id 3F48040275 for ; Mon, 23 Oct 2023 19:19:38 +0200 (CEST) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1ca72f8ff3aso22732665ad.0 for ; Mon, 23 Oct 2023 10:19:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1698081577; x=1698686377; 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=X768pVpkXlqZoSSkEttOVRWKjc8UeumPUCepaSiqWKU=; b=b+PqTdPjDeFp7D7yb9apKzC4n7PRZGkgUB4shf/m95yxiKLv9UnrtdZfVPxcMp4cRf NibrFiniAkL0UhaBzdm+BQWjsfllBnotUveEJ8sH//3irgp62FYVtZ7ppo0p5V+dKOuf 7fXtyiDomzHXGjfywDJE7EnWvy/qX9SCnnrQTqk3aet0FOp0nw+wuWjo/qBQz+xpsA4W iLXTdGKxfOuEj9C3RVzuenx8tomaOM5135uZFaERjJrNhGlCxC1jufdc8OF7tdWcPwPy uoQ0jITVAB7EKs+JiimKawGrPo/ZIKGkoAUpXOHTp4oDHwwqoh4bz4Qwg2YN7KyepxEH 54+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698081577; x=1698686377; 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=X768pVpkXlqZoSSkEttOVRWKjc8UeumPUCepaSiqWKU=; b=dN6Xt6TdzvJfoRE1UY2HAp0ZVHHQnSiZLT/6LauXq6lG87Kd0QdpfcW1Urp0gT4ZF3 Hx9KAaOPPsVBDnkw6JG/mN/rVaDM72XAO6D+7G3b0aypdjWprpw3JFfvXWnm2EjMNRTM YNB1NsQpH+AaLpvc8zu0KZId1KP2ka6dehgael4++WtrGylTyhrDoXX/jvoe/HB9g0G/ BaMNr/76rxm+6yB+UOIEcCNNK+Xuz3WubYpngs5pI0koPW7wVPIpCHlO+ewfB08CFv8r pvIMAgHM7aN7ESyaG3ZrYp+mZSN9w20PP1ydDO9lpLx7I0wTGYBl0sjGKLpd7N1KDs+6 hhbA== X-Gm-Message-State: AOJu0Yy2kYSa1JzwLbTmlTpJSAMnhhfAc3le/BKw5SipZWTnhDaSV7Ki BAjHDZIw4m0skKMK4DhVjF/fcMFLBr2RZtKjarGEPw== X-Google-Smtp-Source: AGHT+IEzr3X9uVHMRLY6qexiA7toTmRj/5lnblFF0X40V5QLbBUIisiucipTqPyJr267bdwCLxscDw== X-Received: by 2002:a17:902:f202:b0:1ca:87e0:93e3 with SMTP id m2-20020a170902f20200b001ca87e093e3mr7433623plc.7.1698081577289; Mon, 23 Oct 2023 10:19:37 -0700 (PDT) Received: from hermes.local (204-195-126-68.wavecable.com. [204.195.126.68]) by smtp.gmail.com with ESMTPSA id c11-20020a170902d48b00b001b9be3b94d3sm6149840plg.140.2023.10.23.10.19.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 10:19:36 -0700 (PDT) Date: Mon, 23 Oct 2023 10:19:34 -0700 From: Stephen Hemminger To: Pavel Vazharov Cc: users Subject: Re: Questions about the the pdump functionality Message-ID: <20231023101934.19d96421@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Mon, 23 Oct 2023 18:32:48 +0300 Pavel Vazharov wrote: > Hi there, > > We've a DPDK based application from which we need to take packet dumps from > time to time when problems arise. We are planning to use librte_pdump > functions and the dpdk-dumppcap tool. > I've few questions in related to the pdump functionality which we want to > use: > - Is calling `rte_pdump_init` at the startup of the main application > causing some overhead for the packet processing during its run if there is > no actual packet capturing enabled by the dpdk-dumppcap tool? I suppose > there should be some check in place but is it something like a single `if` > condition on a boolean flag or something heavier? > - Is it possible then to call `rte_pdump_init` during the runtime of the > main application only when I know that I'm about to start the dpdk-dumppcap > tool? I mean, is it supported and safe to call `rte_pdump_init` and > `rte_pdump_uninit` while the main application is running and processing > packets or these functions are supposed to be called only at application > startup and application stop. > > Thanks in advance, > Pavel. Short answer: The overhead only happens when the dump application is running. Long answer: Running rte_pdump_init() tells adds an additional service to the multi-process (primary/secondary) communication mechanism. Secondary and primary process connect with each other over Unix domain socket, and the services are handled by the multi-process thread in the primary process. Adding a service does not interact with fast path at all. The best way (as always) to discover this yourself is to read the source code and follow along.