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 512ACA0548; Thu, 20 Oct 2022 12:43:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35F8042C80; Thu, 20 Oct 2022 12:43:44 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 61A7842C7C for ; Thu, 20 Oct 2022 12:43:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666262622; x=1697798622; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=5dgMLdkjY0+G0flOvOR1an2SMVNUsGh0hb/AAb/aRx8=; b=mKQmSi4qLKAPpYa3r4T9evlOL/O2F7F1VW5DrGEw8FouZi1ejEpTV4iq e8EtIQlAbC0/gHBYlIaMsFbMv9Vqqf49D0ONm33UqTVb54fkXW53l3RNZ ZHoZfiyUd+sDEMaVz2SfHlp0SCJ/EYp4gZLlq5fAmw5Rpe9UvnnTf9FvA kfinrDNtqKk26Hx3JhnfTg4DZQ+yogTMD5nEuBjRLTov88JMImAiRxSvL GugtSopg8j2GIFX1JVuQEpuRPH4UfxOSsUJj0ihCbHhPKhLNhKH5I2VOQ 7MXMBpz4BvXpXysXwvwEYfMmWNL90Wcx2wexY9NZW6rnnJCp5TDa5tev6 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="307772484" X-IronPort-AV: E=Sophos;i="5.95,198,1661842800"; d="scan'208";a="307772484" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2022 03:43:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="734757189" X-IronPort-AV: E=Sophos;i="5.95,198,1661842800"; d="scan'208";a="734757189" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga002.fm.intel.com with ESMTP; 20 Oct 2022 03:43:33 -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.2375.31; Thu, 20 Oct 2022 03:43:33 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.2375.31; Thu, 20 Oct 2022 03:43:33 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.2375.31 via Frontend Transport; Thu, 20 Oct 2022 03:43:33 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.175) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Thu, 20 Oct 2022 03:43:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dYEwd0xV9OUCvH1Vj0mLgtliTC0tp+3Q3jWwBN8DEcOtOUcFyWhkfNnlAWgH/w8lwNGohYphB2A0oYQEEaMsFKVD3CmV2LTQpUNI23TOJMXhqK+1Orf3LSTXz2mXwhtY1g5F3FaODTUnACs4BL5jTMHPwcoACGsHzdl5RqIY1ZOHZb0B3XREyd9Uw0H2HeggLw8dq9ktJlYfF2gBCOrcu7fJkcYIQyL9Jfp5vm4L5DRuAcpetL6u7ULYNWjmqS2xQNt5x244XFv2XjjDMdyOVpH9K07XWk2TS9DXgjtoLWAV7e1U3tM8FbAK1EQU6BIv3+QvIqJ89+6Elmd9vkOyXQ== 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=exgz63ruJnRNmzyjl0QiLlHzVB6iGMEnALq17wd0mZs=; b=WJZMvDlMn+IQNI03T7Mo+n2oml9oQ+K/jLaRY6pr2XpQNpXKudkZtUXOUNixIljXHKoOdiYVMWhDKPK5RIBHEBCS6QqEdUVp+h6NLz92ibR+rHgJKyZ+jC59Z6gxIwZQuN8mOizmEB6amCy5VnBLwWivqcmJDgZtJRVeRdlzwX5mioWQ7DwFFBS3WRy10gXuFE3Hj7frV1zI7TifHCaYgRuZP+X5DDA00/1ifxJntUbzmxspKMS5HmYYrDtu6DXOqRoSnHU8PLo+4GoYjt/kBnIiZDr5jtQGy7nro92Br50vHKPUiKWp4GqVtlj1sCzFf9DvNXHl4ozHJq56M9M8dg== 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 DM6PR11MB3737.namprd11.prod.outlook.com (2603:10b6:5:144::28) by MN0PR11MB6208.namprd11.prod.outlook.com (2603:10b6:208:3c4::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.30; Thu, 20 Oct 2022 10:43:29 +0000 Received: from DM6PR11MB3737.namprd11.prod.outlook.com ([fe80::127a:3e51:4136:57c2]) by DM6PR11MB3737.namprd11.prod.outlook.com ([fe80::127a:3e51:4136:57c2%7]) with mapi id 15.20.5723.035; Thu, 20 Oct 2022 10:43:28 +0000 From: "Kaur, Arshdeep" To: Stephen Hemminger , "dev@dpdk.org" CC: "Chintalapalle, Balaji" , "Beadle, Michael" Subject: RE: [RFT] dumpcap: add file-prefix option Thread-Topic: [RFT] dumpcap: add file-prefix option Thread-Index: AQHYxtplRdC30afRDUi3/7aVSZuaU64SPdfggAUV4mA= Date: Thu, 20 Oct 2022 10:43:28 +0000 Message-ID: References: <20220912124309.233363-1-arshdeep.kaur@intel.com> <20220912190330.73159-1-stephen@networkplumber.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.500.17 dlp-reaction: no-action 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: DM6PR11MB3737:EE_|MN0PR11MB6208:EE_ x-ms-office365-filtering-correlation-id: 390db8c1-79d2-47fb-aeb2-08dab287ec78 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mbRANYG+QDLfg6gcPLns5RtxIsHNDyKldmi/KbPDk/U+X4OgM+r8HkjMk3ERs3jBN1ytr7xWw4VUB3dIygSvRR1jnnXa1/oM9h6WZp8Da1ayOfHidI+Mfc88bzSrbXQDV8nSSJExi93iZ9Y4YloagFQdE/uGFM6Nfkulg6J5+Dj4u2FtattndxshUGQ/9t+ExqxPVSbaUGhMKN0nPPIg0YWa1nqvVBWHSsgOTS62EiNeK1s3Mmt+C5nvyUwHamBfyRTbCg5pQHcCGi34F1Jl1FHNw32gFT46HH6mQ0z1iLPO8T5CCwuhnc2L+UeEzptiBRgtk3d5P3heFNHyORFIgW8t2TlslueOCm4R28wCg/3ntrkLa24UIBD1Ev9Fpm6WSHnzloNa11a4JvcYlxKzaXsjAIjO79+nkNr5x2FVAGHc6Y7GZPhV7FaoOtldNsY3tPsr+rMODS2ZATe2WTheOANFwT86lD54fZniR6ZQWZnzbccbr3zfMizCUPCaclKybngzsyFm2JqfwhocwNd4xZQBYUxNQMOMhxtdCVNc2VZR+2GmWCiS1KS/heMJDATWuqId1I+/eBgAYYuZGwbW4lYWaO078Bv6AeJ9j2fFNM61d4HyZ48m2phkZcllLuddZ/PU9k9cBirWhYDDnSiL2N9ZEL8R3HS6Q0/eR5YRohqKQ7w7L7AbwvTq9yMI7oJs6xcFuu8WLr0qB357XUon05DVTS4/Rwps5DG5H3SBgJ+gvkxd5gHck98BM5YNIYVps+7eaZAk2L18K0Zvp9k0RyqLX7CsO7vDzHflFniRl3o= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3737.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(39860400002)(346002)(366004)(396003)(136003)(451199015)(41300700001)(186003)(26005)(478600001)(64756008)(38070700005)(107886003)(9686003)(2906002)(6506007)(52536014)(53546011)(8936002)(5660300002)(4326008)(33656002)(86362001)(7696005)(38100700002)(110136005)(54906003)(316002)(122000001)(76116006)(71200400001)(55016003)(8676002)(66446008)(66556008)(66476007)(83380400001)(66946007)(966005)(82960400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?dafkDU+8QwURNjWmIUW8uEGlo5yyy6ie1TBXgBJ1IWfJU6ab7tJNP51++Ys8?= =?us-ascii?Q?G0vgnYD1nvdBdsrlL9yVNYygvWFjA5cE//jFtI+nXjk1XdmwwRINaXlZyUcx?= =?us-ascii?Q?OvNIcuTO0SL2j8ZbEEFP2wktMSVIc6sTbgAgcprZF8LXFLYtri63l9YoqzVR?= =?us-ascii?Q?8pLOQsbWONo4TCOmpVkjUGhZlZ2xb7wYXXrBwTZry6fXy0zNbHWc0QfjhJJ4?= =?us-ascii?Q?uPTWvmcm1sbsNE/CX1md/5IFeUl4x1VN/0he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?wD63uSlq+7kegtYkd+Q+rQp/cf4qn1TQCZXMSRdVHevuk6JOlAqOIs0WE/pl?= =?us-ascii?Q?GrTI1PBhd6Oj3Eu/VrbrCN6enMTOIJA791y8d3wzdFjJsIUnPY4FHK50gmp7?= =?us-ascii?Q?5c6AL338Jq6ziL1PTLxJjkyAjU40T6Xpv6nEEZv1Aw+DmkENk7G8C3Z02gIc?= =?us-ascii?Q?XNv94r99MyLbcCOhwXo5H54qpaf+HHGEL3JITR00SS3QRH7eRnZkrOrEggIA?= =?us-ascii?Q?gmakAXQ9BeZph/e47bCz3K9imXcRoDD4YZE3g6D4rkaO7TiZbn72E6WNjDc6?= =?us-ascii?Q?4I/Atkjt96W8zVsUeWEvMO21O45DmryjzhDco78YRPWBClp6tFYMqZsrmVvA?= =?us-ascii?Q?TDIbUieQXis1PbUboj0Nd/fk0v23vQU61/twaCZCglVQ2PG+mIVybN4Trgng?= =?us-ascii?Q?Wrj1TYBDm2OiKaSuJ4/FL3E+lYP4MaFkGjPj7bi8?= 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: DM6PR11MB3737.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 390db8c1-79d2-47fb-aeb2-08dab287ec78 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2022 10:43:28.3851 (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: FOXOHoBHFeXjgcCseRbvq8lJTu+pyq98z4ZWGh0Ll0jquHJ/6GsHQJQPEtcyMd5mQlmM9us/ugE3WmPRZEfXig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR11MB6208 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 Hi Stephen, a gentle reminder. Thanks and regards, Arshdeep Kaur > -----Original Message----- > From: Kaur, Arshdeep > Sent: Monday, October 17, 2022 10:38 AM > To: Stephen Hemminger ; dev@dpdk.org > Cc: Chintalapalle, Balaji ; Beadle, Micha= el > > Subject: RE: [RFT] dumpcap: add file-prefix option >=20 > Hi Stephen, >=20 > These changes are looking good as compared to > http://patches.dpdk.org/project/dpdk/patch/20220912190330.73159-1- > stephen@networkplumber.org/. > I have tested the changes. Works for me. > I am looking for this change in this release. Can you send the v1? >=20 > Thanks and regards, > Arshdeep Kaur >=20 > > -----Original Message----- > > From: Stephen Hemminger > > Sent: Tuesday, September 13, 2022 12:34 AM > > To: dev@dpdk.org > > Cc: Stephen Hemminger ; Kaur, > Arshdeep > > > > Subject: [RFT] dumpcap: add file-prefix option > > > > When using dumpcap in container environment or with multiple DPDK > > processes, it is useful to be able to specify file prefix. > > > > This version only accepts the long format option used by other > commands. > > If no prefix is specified then the default is used. > > > > Suggested-by: Arshdeep Kaur > > Signed-off-by: Stephen Hemminger > > --- > > Did basic command line test, but still needs testing with a prefix > > being used (ie multiple apps). > > > > app/dumpcap/main.c | 24 ++++++++++++++++++------ > > 1 file changed, 18 insertions(+), 6 deletions(-) > > > > diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c index > > a6041d4ff495..bdeef96d9c0b 100644 > > --- a/app/dumpcap/main.c > > +++ b/app/dumpcap/main.c > > @@ -61,6 +61,7 @@ static char *output_name; static const char > > *filter_str; static unsigned int ring_size =3D 2048; static const cha= r > > *capture_comment; > > +static const char *file_prefix; > > static uint32_t snaplen =3D RTE_MBUF_DEFAULT_BUF_SIZE; static bool > > dump_bpf; static struct { @@ -122,6 +123,7 @@ static void usage(void) > > " add a capture comment to the outpu= t file\n" > > "\n" > > "Miscellaneous:\n" > > + " --file-prefix=3D prefix to use for multi-process\= n" > > " -q don't report packet capture counts= \n" > > " -v, --version print version information and exit= \n" > > " -h, --help display this help and exit\n" > > @@ -310,6 +312,7 @@ static void parse_opts(int argc, char **argv) > > static const struct option long_options[] =3D { > > { "autostop", required_argument, NULL, 'a' }, > > { "capture-comment", required_argument, NULL, 0 }, > > + { "file-prefix", required_argument, NULL, 0 }, > > { "help", no_argument, NULL, 'h' }, > > { "interface", required_argument, NULL, 'i' }, > > { "list-interfaces", no_argument, NULL, 'D' }, > > @@ -330,11 +333,13 @@ static void parse_opts(int argc, char **argv) > > > > switch (c) { > > case 0: > > - switch (option_index) { > > - case 0: > > + if (!strcmp(long_options[option_index].name, > > + "capture-comment")) { > > capture_comment =3D optarg; > > - break; > > - default: > > + } else if (!strcmp(long_options[option_index].name, > > + "file-prefix")) { > > + file_prefix =3D optarg; > > + } else { > > usage(); > > exit(1); > > } > > @@ -512,12 +517,14 @@ static void dpdk_init(void) > > static const char * const args[] =3D { > > "dumpcap", "--proc-type", "secondary", > > "--log-level", "notice" > > - > > }; > > - const int eal_argc =3D RTE_DIM(args); > > + int eal_argc =3D RTE_DIM(args); > > char **eal_argv; > > unsigned int i; > > > > + if (file_prefix !=3D NULL) > > + eal_argc +=3D 2; > > + > > /* DPDK API requires mutable versions of command line arguments. > > */ > > eal_argv =3D calloc(eal_argc + 1, sizeof(char *)); > > if (eal_argv =3D=3D NULL) > > @@ -527,6 +534,11 @@ static void dpdk_init(void) > > for (i =3D 1; i < RTE_DIM(args); i++) > > eal_argv[i] =3D strdup(args[i]); > > > > + if (file_prefix !=3D NULL) { > > + eal_argv[i++] =3D strdup("--file-prefix"); > > + eal_argv[i++] =3D strdup(file_prefix); > > + } > > + > > if (rte_eal_init(eal_argc, eal_argv) < 0) > > rte_exit(EXIT_FAILURE, "EAL init failed: is primary process > > running?\n"); > > > > -- > > 2.35.1