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 D10CE42E3C for ; Mon, 10 Jul 2023 18:49:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A1B1340698; Mon, 10 Jul 2023 18:49:42 +0200 (CEST) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mails.dpdk.org (Postfix) with ESMTP id 436E440150 for ; Mon, 10 Jul 2023 18:49:41 +0200 (CEST) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-666ed230c81so4092353b3a.0 for ; Mon, 10 Jul 2023 09:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1689007780; x=1691599780; 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=HvOWHROzg/7p8TnxwfTXemKPJJ+NCvkSJJ2cu8iT9V4=; b=RJdxiBPBOq9Dyxr1aMUB50cyL/+9LfPZjKPRx4i5if7D2bglIuVToXt3zPlHh0P1Bx a75olVxxMialJXKPvVK4vj2/4Mr6o3SrGTZVnitjcC7vB/1ivGebTMb/VNnmEX5Ps+xk 3aoGn+Us69XfHKYToCEWNz2aWb5mNPXQ50ut23WE6iwM8GEEJoSEmGDo2N+6ZPbCIjTb 0+dCgXN8doOpS1HTt1ev/3gRFsg9+hcXP5apMN9GUXwILinQmUPPCO4ZaURdQ8auFg9G Y/hDEWQerZVgtEQWHBpnCe1FD2YV0hCHPsllzIOqt5iRUHP5ro/fqkJA8rBmxtKbXGwX jb+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689007780; x=1691599780; 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=HvOWHROzg/7p8TnxwfTXemKPJJ+NCvkSJJ2cu8iT9V4=; b=gS6/UFRwb9SgFJjkUWrq8OC+pWTqvxzIzkW6EoQHnz8hbmHUT3mE4bgWFWrvvDF6xD 0LokYnnahHfzXAssTeabmir2lUqQcGmwE52vO6+kMitrSW8XxTCMLAH1tkHXMRFeAUsd Yk96dFlBwxdEZLpnh0tO4Qt9exX9GvkCWxcfiyewZRqvpz5cNKnGKZIiDIscYrqLgn+c c7Vxqp02ub9rTIPjlBXrN75slEI4zhRXM80M5E6KVWQGwb/oX8SclW4xwy9b3+at31Wt 5f3XkllfLlGGeDmPqYpSdCGwaZmCcv+njtcO9CdMVE2iJy35W2SaH20Ci9wyrFtzXzDZ 3UuQ== X-Gm-Message-State: ABy/qLZKijWzY6TEYR+hG8bAG6JDwQY6Fyupc3Fm+Hv9auChSLeI46p6 UNaVLrZqwlZc5JfrtIzlq5tt+g== X-Google-Smtp-Source: APBJJlFA77ZeT1glPz1joM1xSg42WYbumO/URzvoKoNq6JbGtPHq6ImwJTCgtXAQiz/to2/T6ZxTow== X-Received: by 2002:a17:902:d2cf:b0:1b3:d357:5ea6 with SMTP id n15-20020a170902d2cf00b001b3d3575ea6mr15519128plc.53.1689007780309; Mon, 10 Jul 2023 09:49:40 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id jw20-20020a170903279400b001aaecc0b6ffsm123716plb.160.2023.07.10.09.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 09:49:40 -0700 (PDT) Date: Mon, 10 Jul 2023 09:49:38 -0700 From: Stephen Hemminger To: Fuji Nafiul Cc: "users@dpdk.org" Subject: Re: How to add packet capture framework to a custom simple dpdk app Message-ID: <20230710094938.06b36ad8@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 Sun, 9 Jul 2023 10:36:53 +0600 Fuji Nafiul wrote: > Hi, > I am using dpdk_v22.11.1 on ubuntu_v22.04.2. I have a simple app derived > from skeleton and icmpecho which can reply to proper arp requests and also > can reply to appropriate pings. Now whats the proper steps to add a packet > capture framework like dpdk-dumpcap here as the doc didnt clearly said it, > rather pointed out to check the testpmd.c > > I simply added pdump header files, then initialized rte_pdump_init(), then > I tried to run dpdk-dumpcap separately that was successful after running > testpmd app but with my custom app it failed.to run Then I > noticed configure_rxtx_dump_callbacks() in port initialization and tried to > add it properly in my app but failed. I am just not sure whether I am on > the right way or not. so please help if you have already passed this. > thanks in advance..! The rte_pdump_init() handles registering the service to enable packet capture. It causes the application (primary process) to listen for when secondary wants capture. The capture application (dpdk-dumpcap) then makes request to the primary process. That request causes the dump callbacks to happen. The application should not change. One non obvious part is that the application has to be up and running before the capture application starts.