From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 63CE2A2E1B for ; Tue, 3 Sep 2019 12:04:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 50A631DFEA; Tue, 3 Sep 2019 12:04:28 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 20F601C2B2 for ; Tue, 3 Sep 2019 12:04:26 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x83A0NT3023290; Tue, 3 Sep 2019 03:04:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=7KT9LMpn9iAWH3dlX/A8dn0SVf8O7ob+VVuaD8YW1Xk=; b=IN5iolL1jPeclnvA1vua2sQ6AblhCbIB5nEv82/BVlKQd/LekH/+F10/s3jKjIqeF+cS 9zvZbV5oiCM0t6rs3W5IkWT7CWqRgchdhyeyCSmV2Pi45I8hgmlehdYixEwCr87SwLNN 63cYcNdJZR8sV++B9x9ExGnv1zdCVepWY4RfIUQ6vfrywE4dAYLb8JdvrRdACL+vTUMy QzXS3BbCjUZ1INw3ZFr5f3Tsu7CQth0wBl6lQjcPE0WUqeNm79gX/3J/AtWHfDW9x0GN 78Frn+V4LasIuascyMIqN9gAn/SFeop6IqOrxX8aUXvF6y6vZrwLiVNUIPxHiv2EO+nn rA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2uqp8p9p1v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 03 Sep 2019 03:04:26 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 3 Sep 2019 03:04:24 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (104.47.33.51) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 3 Sep 2019 03:04:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DJdGYA0eB4WB1cYdY7gn+0VQtaFXluJipkh5R5BnxhrjwNFc+Ptz0M+rcNGOQz8sBHcGradX3o6Bv0IqyAJPNEZiUrJUHHkLYNFsoVp/NP5Vpe3jB+Du1AWf9dYwPYxEJnJKEn410V/J8eV5z2kTWcfecQ2ew7Emj/w9SEaO/ARl8weQGlfqxgAX/n4iuJ/+jGPb8LRsEm+pItb24FnPMfAUcaD4PqzrZwBfPDBSukAJHAYNPuLqLKB/qn5NbbV29rP8qh2aZN824+eYM6SPzNR9S1RM+9fMPUWaru5tgIrWeZB5Ohc/UBxfujO1dFpWYQkbZN01ELK1hjVFIB2V3g== 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-SenderADCheck; bh=7KT9LMpn9iAWH3dlX/A8dn0SVf8O7ob+VVuaD8YW1Xk=; b=G1V+mlBLNdft3UmCoYr/wWNprXSL2spnlvudlUkJsTf8V+XYAjEe/p+jDYG1dasGX3tl9FtUh9T12wfd+FEYiByYBVPd2ryh5XSnh4+8vS/hy1FVqORj6DjyS2BR7C8BzSZv/O7s00KUebsN7qsQYgoB1JNyL01So/F+6V1/7b9rkFdSP8V1HDPGbMIuwCArVw2RSKmTr+4Ti5CzXGFLz+elX1QO+8OQ60FwMAaPICyh3OnNxVsYYhkBZolxZxWbdxzQtZZDroBAY7+VBAY7JwQDeTW8Ah5fJdHjZsynYiXX12itCKliDXzgMZyNGaDmpISzkWKQ4lkPULHxahwzQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7KT9LMpn9iAWH3dlX/A8dn0SVf8O7ob+VVuaD8YW1Xk=; b=Smgmb22fqbhAStq7F5d6ZcxK3se0YopuZF6a28PICqOUMFoVJeUe+OPuicp9Xrmi7vjYJEQYw9J9LZoMbnbOW57yODN/6JPfnwqwiQhFiAPvOfcWA3ySOyuWcJbKC0O9rbkmHrifpzKRZb40qJGxQSCSE69EOxQ/iAon4X1kH3A= Received: from MN2PR18MB2877.namprd18.prod.outlook.com (20.179.20.218) by MN2PR18MB2799.namprd18.prod.outlook.com (20.179.22.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.20; Tue, 3 Sep 2019 10:04:22 +0000 Received: from MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::7cdd:71d0:6771:4bed]) by MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::7cdd:71d0:6771:4bed%6]) with mapi id 15.20.2220.021; Tue, 3 Sep 2019 10:04:22 +0000 From: Anoob Joseph To: Radu Nicolau , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "konstantin.ananyev@intel.com" , "bernard.iremonger@intel.com" , "declan.doherty@intel.com" , "stephen@networkplumber.org" Thread-Topic: [dpdk-dev] [PATCH v2] security: add statistics definitions and update API Thread-Index: AQHVYjvUtx26SgERp0aAt7nl0hXqiacZtemw Date: Tue, 3 Sep 2019 10:04:22 +0000 Message-ID: References: <1567156760-29520-1-git-send-email-radu.nicolau@intel.com> <1567503690-15586-1-git-send-email-radu.nicolau@intel.com> In-Reply-To: <1567503690-15586-1-git-send-email-radu.nicolau@intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 80569f14-8339-4760-b721-08d7305617f9 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:MN2PR18MB2799; x-ms-traffictypediagnostic: MN2PR18MB2799: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 01494FA7F7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(136003)(366004)(376002)(396003)(39850400004)(189003)(199004)(13464003)(256004)(99286004)(6506007)(53546011)(86362001)(76176011)(55236004)(14444005)(66556008)(66476007)(66446008)(26005)(64756008)(66946007)(2501003)(966005)(102836004)(74316002)(14454004)(5660300002)(6116002)(81156014)(8936002)(478600001)(6436002)(305945005)(7736002)(81166006)(76116006)(52536014)(476003)(11346002)(55016002)(6246003)(9686003)(229853002)(3846002)(486006)(15650500001)(446003)(2906002)(66066001)(110136005)(186003)(54906003)(4326008)(316002)(7696005)(6306002)(53936002)(71190400001)(71200400001)(25786009)(33656002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2799; H:MN2PR18MB2877.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: xPKeWQ3PfD8Y2eRT86Gf+vxVhglWdiBNa2t/sNNz9Wx4gBvnWD2+IV16xtETuRP4MhoHIoGXflWPoiJUpy9ny7wCUUt9YftQRi33e12F2poYSNEiKNHt2RC0+4SCsruk2CXzhFhOEnI3M9Azo0yWmJHVhldF1S5Ju4ANH8S/8jSoiOuaekE3CRqVm8EjdWf09mhtrK75/xRbgnhioZmamUkeHOvCctAxgD8tyNNr8mDt+/+iKid4QhvTGBr6cCDa9/aA2kXeEek8JeyP2M2W5WMv5I5Z6Kl7Hu2uXakQxw8+nd6wwWmcEV4d+yEhpRK93Ambf+qLIESEbcvSg1BeSuVYK7Z5Lxv/8H3+rVzzs8uNZ/5zjw1//nHyMPpBoCMV8M5pBfIK+TIbzAnsjWCCSp42GaguoqeM0fLej7241Hk= 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-Network-Message-Id: 80569f14-8339-4760-b721-08d7305617f9 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Sep 2019 10:04:22.2357 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: CDcZ4SQibxN4y6UCQnpslZ1rboQbNmNQhSbNuZ3Fqbuctg/VJGTMEeh0Rv3dSXz3B5b66Vhnpi312rsVWoYmDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2799 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-03_01:2019-09-03,2019-09-03 signatures=0 Subject: Re: [dpdk-dev] [PATCH v2] security: add statistics definitions and update API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Hi Radu, Please see inline. Thanks, Anoob > -----Original Message----- > From: dev On Behalf Of Radu Nicolau > Sent: Tuesday, September 3, 2019 3:12 PM > To: dev@dpdk.org > Cc: akhil.goyal@nxp.com; konstantin.ananyev@intel.com; > bernard.iremonger@intel.com; declan.doherty@intel.com; > stephen@networkplumber.org; Radu Nicolau > Subject: [dpdk-dev] [PATCH v2] security: add statistics definitions and u= pdate > API >=20 > Update IPsec statistics struct definition, add per SA statistics collecti= on enable > flag. >=20 > Signed-off-by: Radu Nicolau > --- > v2: added second reserved field >=20 > lib/librte_security/rte_security.h | 24 ++++++++++++++++++++---- > 1 file changed, 20 insertions(+), 4 deletions(-) >=20 > diff --git a/lib/librte_security/rte_security.h > b/lib/librte_security/rte_security.h > index 96806e3..21bbee2 100644 > --- a/lib/librte_security/rte_security.h > +++ b/lib/librte_security/rte_security.h > @@ -172,6 +172,14 @@ struct rte_security_ipsec_sa_options { > * * 0: Inner/outer header are not modified. > */ > uint32_t ecn : 1; > + > + /**< Security statistics > + * > + * * 1: Enable per session security statistics collection for > + * this SA, if supported by the driver. > + * * 0: Disable per session security statistics collection for this SA. > + */ [Anoob] I believe you will have to add the above description after the item= . Else the documentation generated could end up wrong. Description of all i= tems of this structure is actually wrong. https://doc.dpdk.org/api/structrte__security__ipsec__sa__options.html =20 > + uint32_t stats : 1; > }; >=20 > /** IPSec security association direction */ @@ -482,8 +490,14 @@ struct > rte_security_macsec_stats { }; >=20 > struct rte_security_ipsec_stats { > - uint64_t reserved; > - > + uint64_t ipackets; /**< Successfully received IPsec packets. */ > + uint64_t opackets; /**< Successfully transmitted IPsec packets.*/ > + uint64_t ibytes; /**< Successfully received IPsec bytes. */ > + uint64_t obytes; /**< Successfully transmitted IPsec bytes. */ > + uint64_t ierrors; /**< IPsec packets receive/decrypt errors. */ > + uint64_t oerrors; /**< IPsec packets transmit/encrypt errors. */ > + uint64_t reserved1; /**< Reserved for future use. */ > + uint64_t reserved2; /**< Reserved for future use. */ > }; >=20 > struct rte_security_pdcp_stats { > @@ -507,10 +521,12 @@ struct rte_security_stats { > * > * @param instance security instance > * @param sess security session > + * If security session is NULL then global (per security instance) > + statistics > + * will be retrieved, if supported [Anoob] With NULL as security session, do we expect PMDs to return stats fo= r all sessions or only for the ones 'stats' is enabled? =20 > * @param stats statistics > * @return > - * - On success return 0 > - * - On failure errno > + * - On success, return 0 > + * - On failure, a negative value [Anoob] PMDs which doesn't support this would return ENOTSUP, right? Do you= think we should document that? =20 > */ > __rte_experimental > int > -- > 2.7.4