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 2F9A3A0C43; Thu, 23 Sep 2021 18:11:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3C0941273; Thu, 23 Sep 2021 18:11:52 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id F144A41257 for ; Thu, 23 Sep 2021 18:11:50 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10116"; a="204038074" X-IronPort-AV: E=Sophos;i="5.85,316,1624345200"; d="scan'208";a="204038074" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2021 09:11:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,316,1624345200"; d="scan'208";a="455171367" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga002.jf.intel.com with ESMTP; 23 Sep 2021 09:11:48 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 23 Sep 2021 09:11:43 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 23 Sep 2021 09:11:43 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Thu, 23 Sep 2021 09:11:43 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 23 Sep 2021 09:11:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dpZTCP3STdPlGkX4XtVwm0T/2hP7+30zzjBCw7tqxNre3AAiis16K3oU0xb6OYTzQMiEw4JLUqj2oEuRzlCTRNSPpPdbAMAGv/Wj6A5S5brO5IT0pjEUsStcuiSz4V4s4bH0Hu9xy6MMV16mRCjC6mUTHF6MlpjKhZzmHsQQ4s5FzaKvmdB2rgjnOXvnoMyviLnYn/EuK3ULlsvaNbgvbzh3HLAFkHqKNq6CMJvaKaxlqmAQzlT3K9srvrR19dGaVlR6W3sHnT8jFMntSGLb576/JL4fThv4ldpQ62stplCgpHYxJEdclRAQKCyUbsuQYrBPKUSoGepkzm4VBptkww== 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; bh=7U+wJvJBNNcicRB9pAz0B87vgwh9R9gMkWb2iCEtq9c=; b=e52fNxWVOr6KiJEL+zmDMjad+0tOCnQjiOpgi0FUi/Dd9TgDepth7OcCRVW7FjGWFC3m61I+uPOtNfAfMxZ3uEmPZASTGXZZr85zFeLyK5hFjLEibHwNgZQ7Fx3OgWo0Lix3oOhHjpaXFmbcnvihO93rvmdIRXcNwy4QSL/jLBlmZyc2thEemRKbGxN8wT8jixEo0rjgrhQq8SGo2/aaPQNO0ShKN1RADglOp3OzpN5MWVqguttwOuzli3A7CrQwqoZXWg8OWFPkZTCqwEZeImBi33NvvOWBEguaE6EJjXFS54V4yhg9DbYikVr7ZH7u8mOLOcUxf2bRy7g6kN/3ow== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7U+wJvJBNNcicRB9pAz0B87vgwh9R9gMkWb2iCEtq9c=; b=P2N5h+HCOtp7g7AhoTnDroKEzdUq1V8DePzwDv2mGXTbS3tmY1v7Yf+YQjENXcFnehrAkA/gyERtHCdbyl5zbzNP3ejaV388ZQVs+oqxU4rMPhHga4mbdVADensrKu0IttKYpD1u1v8aFKINwC3IJm7omN4F1NOXoqDzhqPjoVI= Received: from BYAPR11MB3366.namprd11.prod.outlook.com (20.177.185.84) by SJ0PR11MB4895.namprd11.prod.outlook.com (20.182.115.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Thu, 23 Sep 2021 16:11:42 +0000 Received: from BYAPR11MB3366.namprd11.prod.outlook.com ([fe80::81f1:6506:57b8:65d]) by BYAPR11MB3366.namprd11.prod.outlook.com ([fe80::81f1:6506:57b8:65d%4]) with mapi id 15.20.4544.015; Thu, 23 Sep 2021 16:11:42 +0000 From: "Pattan, Reshma" To: Stephen Hemminger , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v10 06/12] pdump: support pcapng and filtering Thread-Index: AQHXq0oP4DaQNcP7hkSJYA1sccIcZKuxr7Ow Date: Thu, 23 Sep 2021 16:11:42 +0000 Message-ID: References: <20210903004732.109023-1-stephen@networkplumber.org> <20210916222630.71543-1-stephen@networkplumber.org> <20210916222630.71543-7-stephen@networkplumber.org> In-Reply-To: <20210916222630.71543-7-stephen@networkplumber.org> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c50b1988-8021-4daf-9bf1-08d97eacd504 x-ms-traffictypediagnostic: SJ0PR11MB4895: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cEc7rBkQIGdqrSLedWRboOYVTiOPdNchK+ZuwLS4WgjicRe9y4u++TKnb2HnX+Wo576EE/N/PuA16/N2qETpUK8tQMje1wLKCHQk8jliwr91yBT2PN9tWgxzXo01DMdkDKp4r5MqgK5duQV3iSV9EQkWsddcWbMIyuNqEPwwGFVLdWZVSJYbG2XMqzgq4QWjTWC5WqUnlv7/8B9xZmMJkmuFBLtZ5mcEofmri+2Xy790/SyvTHqmaH4VJQNa8dTaj37YHMmsez/h35az9/JJ7X8n/YbbAf10g1wdVD2bevZQNonxaJNBz+Nfp7qYKGKOyUa3n8wxawSF5tXdr1CP8Y+7waeIdVjVka/OLhQGz+Fd6hiTXaXOtnJWvFyFCbob/jelKDAa3zjSi23txjjHG0IboHZ5+M8OaDKixPC3hJUIPAcAJOLQxcoQKEnLExLHv2V65KOV06vInOqY1DvvWyreWW+7WLJmKNoMD094hLfn+hwNx2qZzsSRy1pEj1b88BkPz71NwPsaF5D68WV3xjD8JS6kGC6YEB9wC/qFLVkuZVv5HBKQJvyvxhKClapufu22pIB02UctG5g5srwGt60DxDlWEmiyYmOA8iIeN7EzCHqqdlIi3l3REOoeh7Jz3NUkHplk2/GpouBEtgA481hlPRpU4HD2BPmPwLhGJXTU1Mea6qLlvsvj+AN0UyJnn3Kq9PQXxDPjlSJraVAg7A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3366.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(71200400001)(83380400001)(7696005)(186003)(38100700002)(122000001)(33656002)(66556008)(6506007)(508600001)(66476007)(26005)(9686003)(38070700005)(2906002)(52536014)(8676002)(76116006)(8936002)(64756008)(86362001)(5660300002)(316002)(66446008)(66946007)(110136005)(55016002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Ti0NL3ocFKRxHSzJR+Ied5PApi/F7Uz6MwDE0sg1nd1wQcRDUkUpd4XzqMge?= =?us-ascii?Q?+YRknCInchso3ycBTyyoCNY+iTbgndl1I8PiHMW+DAGVC/per5miXpNMvWoY?= =?us-ascii?Q?/LuW86YHMMqaI+FuyB3kdlsJwFD9bjV+lAKenGhtpdjeVQXUJkoJm9GzGtLo?= =?us-ascii?Q?TA8RqxQwfEXHHmYDUPY2QbA2wRI+l9yToSeu8FD3gClH6zPe3axw6OLytZZJ?= =?us-ascii?Q?xFyIuadXuzM2uNnLThToKGDp3+Au4SVfmAx/O1fHGErs4p08JHs/QOuyzzjR?= =?us-ascii?Q?jKuIRvjuanRQILzG2izbdkO8hAB7o1p4vpSeMY303YxUiLy2tQnukf8VGK67?= =?us-ascii?Q?hhLjPHbJdmuYT34+lXTvCaUBJw8ekthcUCwxFl3kJyW8BTePpwkku9QM3bbY?= =?us-ascii?Q?Xg9IQ68WSqBrHU8ii8bpHYTJedd7C0UcUQ16Vvax9fAbzB2ULwigmS5zHGBQ?= =?us-ascii?Q?RDFz1bcwjPUar5kNGj4VWrzX2/dGXN5ic/IYpS0wGlcWbdPmkGWP9Ii74S2g?= =?us-ascii?Q?ZqL9jWm//n/7CBZWbCLTTCs0TEsIGEl3EoigueCnMU/TcsxGr+/N8gBIQA3D?= =?us-ascii?Q?7+9gg2vaekDWbuTz64cc2ryRhOb9OyOJoXjPGSLni+Oy+lW/p+hsJXqoEOb0?= =?us-ascii?Q?BmcDvbkjId1yU5G+dRhDcSBmEc+lRSkUGBBqM46XRGlNRCTp74ZeRoAMyByL?= =?us-ascii?Q?hK9l6Er1a8A17hbUmikFduMiNR1rouRmEvw+ccH7L+R+Xsx1xBwGHi7Z7IEq?= =?us-ascii?Q?BZ6vCYENiD3AEUAInlqwwiKWdZpDS3xCZAcANYhXBixXSjf9nBVaIdMP/40r?= =?us-ascii?Q?k98HSvPMagb2w5g49MvmXUPSBYCfO0OjyJSYao+VKLOBsKglty8uzXPlrxhe?= =?us-ascii?Q?MSBMnIxi+c7tqfd0e5xb0gTichtmj8PceOMHr4ythmlh4TCT5eNyrF3vziRO?= =?us-ascii?Q?GvQlPWn2xmh5ofVFHjPcx1G5UXcmSI5Glv8Mc5mLj09SawEMsK7NapGKaB2C?= =?us-ascii?Q?/bdTzrrVtF8EIXbNAGVRwSan/pbXilT96FEL4hXuIj20PnJ7OQpI9WDxUfOS?= =?us-ascii?Q?KGVWXF/YHKEjHjBfGPq/WXCsS3Pt5/C8s8OOvn1e7nTKoBI+TjzB6SIrPx0r?= =?us-ascii?Q?lK7sLWjZj9Xt7Qd32FRAr1fsUcD9S8YtRmUTUILE+leW9vtUn2yEh7pCiIt7?= =?us-ascii?Q?/yFgw5bQruFxaaWOiY/275xvfngUloWGBGDLpkPv8h+gB5/PQ72w2bDep6MR?= =?us-ascii?Q?zJmHX/RT/pUTfMxuafdgpxtNtqII25WpVsAzfKcIsHl6BpCFWT0tx+C5fZx8?= =?us-ascii?Q?d9jIeZ577VoP3WwBvNALW/Km?= x-ms-exchange-transport-forked: True 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: BYAPR11MB3366.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c50b1988-8021-4daf-9bf1-08d97eacd504 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Sep 2021 16:11:42.1520 (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: baAxyDORko5OPl7YGrN+Fc1qVKtmEmV76zKQYCRsSaZg9aUlfZnpgB1eKGzat3LCCA+aT6PxMASSLZtlcNRmrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4895 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v10 06/12] pdump: support pcapng and filtering 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 Sender: "dev" > -----Original Message----- > From: dev On Behalf Of Stephen Hemminger >=20 > +++ b/lib/meson.build > + 'bpf', > 'bitratestats', If alphabetical order, should bpf come after bitratestats? > +/* > + * Note: version numbers intentionally start at 3 > + * in order to catch any application built with older out > + * version of DPDK using incompatible client request format. > + */ > enum pdump_version { > - V1 =3D 1 > + PDUMP_CLIENT_LEGACY =3D 3, > + PDUMP_CLIENT_PCAPNG =3D 4, The version numbering was internal to library, applications do not have co= ntrol over it, can't we start enumeration from 1? > struct pdump_request { > + uint16_t flags; Why is the flags type changed from unit32_t unint16_t? >=20 > + * Similar behavior to rte_bpf_eth callback. > + * if BPF program returns zero value for a given packet, > + * then it will be ignored. > + */ Looks like wrong callback name referred in the comment, should be corrected= ? > + if (cbs->filter && rcs[i] =3D=3D 0) { Why do we need to do this again if some packets already filtered. > + if (!(p->ver =3D=3D PDUMP_CLIENT_LEGACY || > + p->ver =3D=3D PDUMP_CLIENT_PCAPNG)) { > + PDUMP_LOG(ERR, > + "incorrect client version %u\n", p->ver); > + return -EINVAL; > + } This check is not useful here I guess, as we are setting the version in the= library itself below. >=20 > +pdump_prepare_client_request(const char *device, uint16_t queue, > + req->queue =3D queue; This assignment is done below as well, so here it is redundant I guess? > - } else { > + req->queue =3D queue; > } >=20 > + if (pdump_stats =3D=3D NULL) { > + if (rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) { > + PDUMP_LOG(ERR, > + "pdump not initialized\n"); Might be god to say "pdump stats" not initialized instead of just saying "= pdump"? >=20 > +/** > + * Retrieve the packet capture statistics for a queue. > + * > + * @param port_id > + * The port identifier of the Ethernet device. > + * @param stats > + * A pointer to structure of type *rte_pdump_stats* to be filled in. > + * @return > + * Zero if successful. -1 on error and rte_errno is set. > + */ Missing below experimental warning in the above comments . > + * @warning > + * @b EXPERIMENTAL: this API may change, or be removed, without prior > +notice