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 7FD16A0556; Mon, 17 Oct 2022 07:12:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27BE440143; Mon, 17 Oct 2022 07:12:16 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 69E1B400D7 for ; Mon, 17 Oct 2022 07:12:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665983533; x=1697519533; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=7l66gAz3/YcJSDvsegDcGQN5WczWizR7a4E4Bf9dh2s=; b=DaPSFXDB//dJnIK/XG7n6xq6BUM8BXZTv3Q0SRosYue9txUM0mUFyJj+ 1Gw+SWNtPV49b+6zgbwQ9O44AyJTmU6pZmIbIrfQVLZADZ5iTS4jsIJMh RMqleSaHgAkpc62tJNOxVH40b4GET3zZ8dBEbA095XYUWrmV2VaFj233K jTRGi+o5UNb5y8Sez6WAuuJ0yTNlBUn7ErgOob9g53naCWPcHTtGBlwOc DA0VJGDSeQMuamb9UGV+D3bbZlDYPe4VLn+0PZoWm6MQPHCjC7RaPxDhj o6ivkZQ5ZFwSoZB2FgNA85Z4DKx2qKzE4TNP6Mj3P7Or0MBmmk1Hvp9gC w==; X-IronPort-AV: E=McAfee;i="6500,9779,10502"; a="367733114" X-IronPort-AV: E=Sophos;i="5.95,190,1661842800"; d="scan'208";a="367733114" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2022 22:08:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10502"; a="579243868" X-IronPort-AV: E=Sophos;i="5.95,190,1661842800"; d="scan'208";a="579243868" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga003.jf.intel.com with ESMTP; 16 Oct 2022 22:08:18 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sun, 16 Oct 2022 22:08:18 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sun, 16 Oct 2022 22:08:18 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Sun, 16 Oct 2022 22:08:18 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.108) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Sun, 16 Oct 2022 22:08:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XQOlBa63j6x5JWhMPU7GkXil8H2SZj2nXIrt/HlPpTadazA1sethMEVqbt6Q7JHWZg4JRtYrriCqezOjnul8HzA3mW3QoySILBRHxENm5wGDpsvceXwDpRweFDq3sBvb3Uy5QmgoRNvGAOPpe5aeyRQDSy7GyoQoo2XUQq0lgdVss3VlxHVmtrgodk9XgMtO4fqK6kxCFZ6fs4xyAREIb8UdAI7MdEC0O4gH6XrllECoSgGQh53dxgH6qFhY0RrMZajBo22AEQlPP+jSHMg43S3wiJ4aQmxnMOlp0UmR0wL9EpgvE2UjzChp/GkKRlj73uFyo7VAsQXs9+XdR4oXoA== 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=PNr9IZybTHd7ebLQxI0cZ+YJz7sdBUy4JaeITbIWDD0=; b=eZE+wRSIBaP69uA6Iyn3PfddSj0jiGe/tJY8Sf6tvxNoY0RuGuq9+QsdeYBCUE6SzDajyQs5tJoEC0xh9HHTq9qZ1qD6kFs2+1ufw3tE2ljbiNyOyhQ7F1SLr3WnizwgzQPjwc4Z2td92f0kbPTTkBhNkbwWWC2l2JDliNlX4BMHs6BNKZp9M3nU5CMvLTQOk8NXBZVQ0uNfM/KVhy+2pPizhlAOoA41zE1QrLZEfAwp3UKLIBSv5h90cfaEkDUVoRLYa31W1k65hYO7hsUNGEKN1ql1z4ZeYoVUqd34zOKOdrD7sRFxOqc/uNwCyPEh6syitYlKJoWLsU0LEHnGJw== 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 SA2PR11MB5148.namprd11.prod.outlook.com (2603:10b6:806:11e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Mon, 17 Oct 2022 05:08:16 +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.033; Mon, 17 Oct 2022 05:08:16 +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/7aVSZuaU64SPdfg Date: Mon, 17 Oct 2022 05:08:16 +0000 Message-ID: References: <20220912124309.233363-1-arshdeep.kaur@intel.com> <20220912190330.73159-1-stephen@networkplumber.org> In-Reply-To: <20220912190330.73159-1-stephen@networkplumber.org> 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_|SA2PR11MB5148:EE_ x-ms-office365-filtering-correlation-id: 8ead35ba-249b-4459-5f6a-08daaffd995d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6tOZFxieoUJk0SiQwOOeKD8SvJ1c3MgqgOc25otppyZyigSzp5/r2JtSrB6iW64ecc0gH1byw9vLRM8bsVjmOTiOpfHxXvt6Yd56FEPByevJzHWT9Akf95arByV+ih14dlRh10+J4coIHVQrCeTBALwwEgmyOcWgS2Ibu7E8JESjil93RKZAeheT/5MWJcZ+CWWtDQQ+Y8qOftasQtx/uxXZ5b5lww7WMlCrr0UgRBbKjN2ujtfPfhQoTi1YKznVC4t8xuPvKD1J9uUx3ZGjSARnPpwMgH4JC9th9CPdn5AOTCqhtMe4W0j66RkV4Piqd1xt/kz5ULI3qEVt1n4I4oDMeCvj2kRrYWWNAFwMYIDpwSd5LwXcE+cTNsXeGGwCscUZbUzjXSiDd6SJgphOGW/TbeXPrGwfa3pIz8DqMaMDriTkVEg2yKWcOxT6Sm5NK9Nd3wOJXYPYxuXzlWsz8uEsb4DwGekfjBIKlFaRvoQoo+pzmjlgN2dEB5jQCNlrV3t6QXbvv8YsAzOaG1uh36lFuXmhiBL6EZnZEU5VpswBGkaJfd/cjkBX6CmkZwt20OFqv31U0zm6krK49a+lHk0r2Fd/1q1lt6SvhRHxIOA2CCb8sPA5I2Rqynqqphwh0S03plcxpuHY14OVOBg3cwZVhEu4JyNx77nfwaetltZfFKhdTRkgqLk01U7VdGayqc0Td3k+rH3mK7OvpSPWrhNEIfOms8/ZmpE/UaZLwMMvuPzSdZxIHmZtbeZQxVF9l155V7RlIIKQL3RUNHv2TzVlhgkkKH/SL/rhNgx/f9k= 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)(396003)(346002)(39860400002)(366004)(136003)(376002)(451199015)(186003)(83380400001)(38070700005)(86362001)(38100700002)(82960400001)(122000001)(5660300002)(2906002)(54906003)(41300700001)(4326008)(52536014)(55016003)(8676002)(26005)(64756008)(107886003)(110136005)(478600001)(9686003)(53546011)(6506007)(7696005)(316002)(966005)(76116006)(66446008)(66476007)(66556008)(66946007)(71200400001)(8936002)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?hHqJBFDl3GkbQpFgmUoyK4rRU+1Jkq4Rux6mD/Rm1eaclkHkp7Y92Fchvuhg?= =?us-ascii?Q?fnVrjOze7Aatw6dq1ia28ErYJ3F/hYI9R6kUbcJbrzavCIgkVMU32Kx+JzJH?= =?us-ascii?Q?+dY1VM5S/HAlobOsKpBPdFUqg9iUdGulNmzC+sutrTUublG3XH+/QFeZAjru?= =?us-ascii?Q?eIJraBHeQlI/qfI4kyyd66ZaKTcTtukYe7vHKtrOQGY/GCZn/INuolm1GUhO?= =?us-ascii?Q?mwBukrgJFf9WH8xyC6YNW2+dziZI4B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aLOca938f/ulBUII0u5pSE+fg2Y2Ugv8phXtqhHAkE8H0828hq6k7jEDn?= =?us-ascii?Q?tmdGhKdDya5vdGsvIhj4JDnZFj8SkVRdt3jPpK9L9HeNgXy0dojEiny0FzT7?= =?us-ascii?Q?dOieokTaduZAskTGDWtzPRQ+z1aPs2Hidr5+9Tj7o1gnqpOzTEYuiJCpX1jr?= =?us-ascii?Q?dv5xJXx/vXuNBFr++MeP2eKRb2dNomKZ6fi3rjkQZzGaa4O0fIwq1dTXUTlh?= =?us-ascii?Q?F2iXKKofBSY5DXKeVfM011mn+aa1RGg0iCFLvMNu2VypmcvQYx5CMosF/sBs?= =?us-ascii?Q?LtDoUozuz7QuCFCS7GonmPczBKnGz1UHHZ2Q1XU1Z49IRDJshctYUz7t7BZt?= =?us-ascii?Q?0ocuym6cO608rtEW/0DL626VE6f4SNBHPOZp7Zy0pUNFS8FlceeGUbRBqGvp?= =?us-ascii?Q?rTX9s8wkSY6DkTxjjnrju1DanFaW402bpi0OFamz?= 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: 8ead35ba-249b-4459-5f6a-08daaffd995d X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Oct 2022 05:08:16.0341 (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: 6g/VWvqhSZYGVwej7+oP6G87kDF72iLdlkiadFn5cnw3Gj68cxY81kJfZoNd9k98wwMJ2KrqFLecVE4RYbaZQw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5148 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, These changes are looking good as compared to=20 http://patches.dpdk.org/project/dpdk/patch/20220912190330.73159-1-stephen@n= etworkplumber.org/. I have tested the changes. Works for me. I am looking for this change in this release. Can you send the v1? Thanks and regards, Arshdeep Kaur > -----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 >=20 > When using dumpcap in container environment or with multiple DPDK > processes, it is useful to be able to specify file prefix. >=20 > This version only accepts the long format option used by other commands. > If no prefix is specified then the default is used. >=20 > 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). >=20 > app/dumpcap/main.c | 24 ++++++++++++++++++------ > 1 file changed, 18 insertions(+), 6 deletions(-) >=20 > 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 char > *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 output = 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) >=20 > 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; >=20 > + 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]); >=20 > + 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"); >=20 > -- > 2.35.1