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 39FD2A053D; Thu, 23 Jul 2020 10:45:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3C51D1BF94; Thu, 23 Jul 2020 10:45:20 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2068.outbound.protection.outlook.com [40.107.22.68]) by dpdk.org (Postfix) with ESMTP id 1BF341BF7B for ; Thu, 23 Jul 2020 10:45:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n+rhw3gWkzwPtd7acVK4uiTIWGraGhCb9k0hQ4sH4zQicJKkxI1S6/ZQhd5zIDgePF6H3IUiQYD4pQxXcjqtGLsE9PxmYeX0+OEOZ1QUJa++WOiLUx422wXyslrBz81G2mTI44kVok2IynQlwlQQQknwXhCdgTeDOECI1Hf/Z++Wnh1PS5oF+cMVSQIcslALHicvbGqeqHckwbz9GI/ujQLEWIlnBBFwUYX7QtZTyyFdQtXC9XLICyLbhPZsbwxfNhxY8kQQIzL8sdPuXQPwY2qZPN0ImrGZ617skGNk+FJpWoTIaTLWZ9hunKwSvcKOBY2BDRobgdVCGmezinAFdg== 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=RKA9Y1rKmXVIaArtsHB+Z0tXUdu9h/9ySW2Vt2vtpF4=; b=PfaPRhQTfP17ir3RRCdoLVerc1/aJqLS7JKATWwpEgzgVNYctUjB0BId3jXjFhp0kRO3sE+2tLvBhKODMsDcMI/RF6mAcNWZ8UrfzosbketkdVNCG6wlt+D60w24+TsvZHdah0CaVaQsN612+9nOwk0Vv5oPxccWxbAhBQRbg/GJnUzsomWxYF8EaHBcBumZ+fZfGahsYT8uW/4yRvpZhEH1l++HvAYHbm+aWTUhYItacTCGJcwu8yzExyqcNkQADTONVNgaDXjVNhZ9RUEbbE2MKsewnZ7+4DLbYhZ/v3yLGDZF6SqB2XL2TnxNkpRPRAZGtFlzq/N+Wgof9k+zlQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RKA9Y1rKmXVIaArtsHB+Z0tXUdu9h/9ySW2Vt2vtpF4=; b=pZ4+M21TozUgvuazHr5IbnfixAo26NYrPenoxvrVD4MaDJY1s4083AwOf1ynNEbnYumQi88/8dyoasUGILcdjA/iNPnYVjx8hlhQDZhX9hIhoZFfu4C/edrnOhNYO77vROCvsozR0yWLnmzx0jSqtay60sKb0YYin3efyhKoEO0= Received: from AM5PR04MB3153.eurprd04.prod.outlook.com (2603:10a6:206:e::26) by AM7PR04MB6872.eurprd04.prod.outlook.com (2603:10a6:20b:106::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Thu, 23 Jul 2020 08:45:17 +0000 Received: from AM5PR04MB3153.eurprd04.prod.outlook.com ([fe80::9c5a:3faf:66e4:d8d3]) by AM5PR04MB3153.eurprd04.prod.outlook.com ([fe80::9c5a:3faf:66e4:d8d3%6]) with mapi id 15.20.3216.020; Thu, 23 Jul 2020 08:45:17 +0000 From: Akhil Goyal To: "Kusztal, ArkadiuszX" , "dev@dpdk.org" , "Trahe, Fiona" CC: "thomas@monjalon.net" Thread-Topic: [PATCH v3 5/5] doc: add documentation for multi process crypto app Thread-Index: AQHWWr/AMl+70E31JkO7RaxwKhRf76kI4uMwgArOHACAATQFIA== Date: Thu, 23 Jul 2020 08:45:17 +0000 Message-ID: References: <20200715155043.12476-1-arkadiuszx.kusztal@intel.com> <20200715155043.12476-6-arkadiuszx.kusztal@intel.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [45.118.166.64] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9402163e-b1cf-4135-a2ab-08d82ee4b9a3 x-ms-traffictypediagnostic: AM7PR04MB6872: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: F9tQAxVVPvH+rz3mfetNTevunRGmNfS+IcAON2WfkOVYif+kxr/m1A7yI4HztjQ7wbpQqIQH4oF+M/OWR3SDs3Qdum4ykdvhPw+kqtmvpZp+YvHUYJcsoGSoLXkOUTg3B68en4iqzbL6FW9fPyTSL+WK/VumMzRs67zB4bcVSdptEF828PGpNAdjMxjodgFaB+mO1zNTCtEQcJLBgnM7yOgH67eQvnJezT97DnFB7hPCretP2MQYTBkQ8NsVuK82JTO7s42ZRgd4+HSxhg8mcHJls3mT+v6B8bTH8TCa8Y4fItaYcAEsBv75bYMHWFtEt9pqD9A1NZe1RhK3JIWqKg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM5PR04MB3153.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(346002)(366004)(396003)(136003)(39860400002)(478600001)(8676002)(8936002)(4326008)(55016002)(2906002)(71200400001)(83380400001)(6506007)(33656002)(86362001)(7696005)(5660300002)(316002)(64756008)(66556008)(66476007)(66446008)(76116006)(26005)(44832011)(66946007)(30864003)(52536014)(110136005)(9686003)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: BwVrXFgIpZgO8b56lmp6CxCm9yLNsCUEaQQ1xjAoIw4w6bf/N5xo3Z2D2esGANSWxV8zV1nfDYbAwY+/uGzZcseHNhcsCOmcDmubxvBa1ouTEfAc47vW5etRsfS827TWu9s0e6AQjNjSv5zQgXJPS0FJzAahXx0QEZiM9w8c6jnu+d2UUONNAHPD46LkHwtufL8sMlwgasKVDxgiDhQCZ/xt4HQzvf1euH7NYBnWYescRADN0v4dVoONxnc8vI6rTfhR4D5mtGFOODBcxCk57f6TrEc6k8Di6yvp6GTYhbdt6+IJUlkY4u4PyunPD/H2Gb/5oc+aWEoxE73AljNDynvcU4Ue4ey6CWGZOmsrRkL/xi2hwFDfc9068Ei24I4oR42Tjcs3FZ2PUo3cnw0KB5DdEbRE+ahjAlryP5/8vpdmgY3kvcacYl2tvSy54WgiwVeE33nvi/zsKYVfEdreMrsHZ5NRMZ7jlkx+l+ypZAI= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM5PR04MB3153.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9402163e-b1cf-4135-a2ab-08d82ee4b9a3 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jul 2020 08:45:17.3376 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: WMoeoPJKw6dLklE4zMMak4cB7CHo7+OV2g9Cvr5HIUh0XfqMZ3Mc83ZjznXu8pAzjA19nQ9hy4ZtQDqWq9BwlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6872 Subject: Re: [dpdk-dev] [PATCH v3 5/5] doc: add documentation for multi process crypto app 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 Arek, > > > > Hi Arek, > > > > > Subject: [PATCH v3 5/5] doc: add documentation for multi process > > > crypto app > > > > Please do not make separate patches for documentation. > > Your first patch description says more info can be found in mp_crypto.r= st. > > But it is not there in that patch. > > > > You should add the relevant documentation in the first patch so that pe= ople > > can review and understand the patchset before actually reviewing the pa= tch. > > > > You should split the documentation patch and add in the patches where t= hey > > are relevant. > [AK] - sure, I will. > > > > MAINTAINERS file update is also missing for this app. > > > > > > > > > > This commit adds documentation for multi process crypto test > > > application. > > > > > > Signed-off-by: Arek Kusztal We first need to decide where to put this application.=20 Thomas, does not like the idea to have it in app/ Please analyze if it can be combined with l2fwd-crypto. Regards, Akhil > > > --- > > > doc/guides/tools/index.rst | 1 + > > > doc/guides/tools/mp_crypto.rst | 151 > > > +++++++++++++++++++++++++++++++++++++++++ > > > 2 files changed, 152 insertions(+) > > > create mode 100644 doc/guides/tools/mp_crypto.rst > > > > > > diff --git a/doc/guides/tools/index.rst b/doc/guides/tools/index.rst > > > index 4840cf4..a360307 100644 > > > --- a/doc/guides/tools/index.rst > > > +++ b/doc/guides/tools/index.rst > > > @@ -17,3 +17,4 @@ DPDK Tools User Guides > > > cryptoperf > > > comp_perf > > > testeventdev > > > + mp-crypto > > > diff --git a/doc/guides/tools/mp_crypto.rst > > > b/doc/guides/tools/mp_crypto.rst new file mode 100644 index > > > 0000000..201834f > > > --- /dev/null > > > +++ b/doc/guides/tools/mp_crypto.rst > > > @@ -0,0 +1,151 @@ > > > +.. SPDX-License-Identifier: BSD-3-Clause > > > + Copyright(c) 2020 Intel Corporation. > > > + > > > +dpdk-test-mp-crypto Application > > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > > > + > > > +The Multi-process Crypto application is a simple application that > > > +allows to run crypto related operations in a multiple process > > > +environment. It builds on the EAL primary/secondary process > > infrastructure. > > > + > > > +The application allows a user to configure devices, setup > > > +queue-pairs, create and init sessions and specify data-path flow > > > +(enqueue/dequeue) in different processes. The app can help to check > > > +if the PMD behaves correctly in scenarios like the following: > > > + > > > +* device is configured in primary process, queue-pairs are setup in > > > +secondary > > > process > > > + > > > +* queue pair is shared across processes, i.e. enqueue in one process > > > +and > > > dequeue in another > > > + > > > + > > > +Compiling the Application > > > +------------------------- > > > + > > > +To compile the sample application see :doc:`compiling`. > > > + > > > +The application is located in the ``app/test-mp_crypto`` directory. > > > + > > > +Running the Application > > > +----------------------- > > > + > > > +App binary: dpdk-test-mp-crypto (in build/app) > > > + > > > +For running PRIMARY or SECONDARY process standard EAL options apply: > > > + > > > +.. code-block:: console > > > + > > > + ./dpdk-test-mp-crypto --proc-type primary > > > + > > > + ./dpdk-test-mp-crypto --proc-type secondary > > > + > > > +.. Note:: > > > + > > > + The same set of BDFs must be passed to all processes. > > > > BDFs ?? Statement should be generic. Not all devices are PCI based. > [Arek] Sure, will change. > > > > > + > > > +.. Note:: > > > + The same crypto devices must be created in all processes, e.g. in q= at > > > + case if asym and sym devices are enabled in the primary process, > > they > > > + must be enabled in all secondary processes. > > In all secondary processes as well. > > > > > + > > > +General help can by checked by running: > > > + > > > +. code-block:: console > > > + > > > + ./dpdk-test-mp-crypto -- -h > > > + > > > +The application has a number of command line options: > > > + > > > +.. code-block:: console > > > + > > > + ./dpdk-test-mp-crypto -- --devtype [dev-name] > > > + > > > +This option specifies which driver to use by its name (for example > > "crypto_qat"). > > > +The same name must be passed to all processes. > > > + > > > +.. code-block:: console > > > + > > > + ./dpdk-test-mp-crypto -- --config_dev [devA, devB,] > > > + > > > +This option specifies the list of devices that should be configured > > > +by this > > > process, > > > +this results in a call to the ``rte_cryptodev_configure`` API. devX > > > +is a positive integer (including zero), the value is according to > > > +probe order (from the > > > smallest > > > +BDF number), not necessarily the cmdline order. > > > > Isn't it better to have a cryptodev_mask instead of config_dev? Same as= we > > do in Ipsec-secgw and l2fwd-crypto. > > Mask will specify the devices which will be configured in the current p= rocess. > > > [AK] - actually we initially have done that, in code actually list is tra= nslated to > mask because of this. We though later list can be easier to use. > > > > > + > > > +Example command: > > > + > > > +.. code-block:: console > > > + > > > + ./dpdk-test-mp-crypto -w 03:01.2 -w 03:01.1 -w 03:01.3 > > > + --config-dev 0,2 > > > + > > > ++will configure devices 03:01.1 and 03:01.3. > > > + > > > +.. code-block:: console > > > + > > > + ./dpdk-test-mp-crypto -- --qp-config=3D[devA]:[qp_A, > > > + qp_B,];[devB]:[qp_A, > > > qp_C]; > > > + > > > +devX - positive integer (including zero), as in config_dev command > > > + > > > ++qp_X - positive integer (including zero), specifies which queue pai= r > > > ++should be > > > setup > > > + > > > +This command specifies which queue pairs should be setup, resulting > > > +in a call to ``rte_cryptodev_queue_pair_setup`` API. > > > + > > > +.. code-block:: console > > > + > > > + ./dpdk-test-mp-crypto -w 03:01.2 -w 03:01.1 -w 03:01.3 --qp- > > > config=3D"0:0,1;1:1;2:0,1;" > > > + > > > +This command will configure queue pairs 0 and 1 on device 0 > > > +(03:01.1), queue > > > pair 1 > > > +on device 1 (03:01.2), queue pairs 0 and 1 on device 2 (03:01.3). Th= e > > > +device in > > > question > > > +should be configured before that, though not necessarily by the same > > process. > > > + > > > +.. code-block:: console > > > + > > > + ./dpdk-test-mp-crypto -- --enq=3D[devX]:[qpX]:[ops]:[vector_id] > > > + ./dpdk-test-mp-crypto -- --deq=3D[devX]:[qpX]:[ops]:[vector_id] > > > + > > > +devX - positive integer (including zero), as in config_dev command > > > + > > > +qp_X - positive integer (including zero), as in qp-config command > > > > qpX > [Arek] Ok. > > > > > + > > > +ops - when positive integer - number of operations to > > > +enqueue/dequeue, when > > > 0 infinite loop > > > > This should be an optional parameter and should not be part of enq/deq > > configs And default value should be 0 > [Arek] So something like (if vector number removed): > --enq=3D0:0, -> dev 0, qp 0 , infinite loop > --enq=3D0:0:5000, -> dev 0, qp 0, 5000 packets > ? > > > > > + > > > +vector_id - positive integer (including zero), vector_id used by thi= s > > > +process > > > > What is vector id? I do not see it changing in any of your examples. Do= we > > really need it? > [Arek] - with current implementation it could be dropped, but initially i= t was > created for multiple vectors. Eventually may be bring back in future. > > > > It looks that the dev id, qp_id are redundant in all three. We can prob= ably > > squeeze it in a single config > > --enq=3D(devA:qpX,qpY),(devB:qpX) > > --deq=3D(devC:qpX,qpY),(devB:qpY,qpZ) > [Arek] - comma separates processes here? So 3 processes for enqueue, 4 fo= r > dequeue? > > > > And remove config-dev and qp-config > [Arek] - not sure about that, initially first use case we were targeting = was to do > all config in one process and enq/deq in other process which can be quite > popular use case. > > > > Cumulative sum of all the devices(dev - A,B,C)/queues(A->X,Y; B->X,Y,Z;= C- > > >X,Y) in enq and deq can be configured in that process. > > This will be simple to configure from user perspective and will reduce = the risk > > of setting mismatch configuration. > > > > And if the enq and deq are same, we should be able to skip either of th= e > > configs and assume that it is same as the other one. > > > > What say? > > > > > + > > > +This commands will enqueue/dequeue "ops" number of packets to qp_X > > on > > > devX. > > > +Example usage: > > > + > > > +.. code-block:: console > > > + > > > + ./dpdk-test-mp-crypto -- --enq=3D2:0:0:0, --deq=3D2:0:0:0, > > > + > > > +Note. ',' comma character is necessary at the end due to some parser > > > shortcomings. > > > + > > > +To close the application when running in an infinite loop a signal > > > +handler is registered to catch interrupt signals i.e. ``ctrl-c`` > > > +should be used. When used in primary process other processes will be > > > +notified about exiting intention and will close after collecting rem= aining > > packets (if dequeuing). > > > + > > > +Example commands > > > +---------------- > > > + > > > +Use two different devices on 3 separate queues: > > > + > > > +.. code-block:: console > > > + > > > + ./dpdk-test-mp-crypto --proc-type primary -c 1 -w 03:01.1 -w > > > + 03:01.2 -- -- > > > devtype "crypto_qat" --config-dev 0,1 --qp-config=3D"0:0,1;1:0,1;" = --session- > > > mask=3D0x3 --enq=3D0:0:0:0, --deq=3D0:0:0:0, --print-stats > > > > You did not explain session-mask above. > > > > > + ./dpdk-test-mp-crypto --proc-type secondary -c 2 -w 03:01.1 -w > > > + 03:01.2 -- -- > > > devtype "crypto_qat" --enq=3D0:1:0:0, --deq=3D0:1:0:0, --print-stat= s > > > + ./dpdk-test-mp-crypto --proc-type secondary -c 4 -w 03:01.1 -w > > > + 03:01.2 -- -- > > > devtype "crypto_qat" --enq=3D1:0:0:0, --deq=3D1:0:0:0, --print-stat= s > > > + > > > +Use different processes to enqueue and dequeue to one queue pair: > > > + > > > +.. code-block:: console > > > + > > > + ./dpdk-test-mp-crypto --proc-type primary -c 1 -w 03:01.1 -- > > > + --devtype > > > "crypto_qat" --config-dev 0 --session-mask=3D0x3 --qp-config=3D"0:= 1;" -- > > > enq=3D0:1:0:0, --print-stats > > > + ./dpdk-test-mp-crypto --proc-type secondary -c 2 -w 03:01.1 -- > > > + --devtype > > > "crypto_qat" --deq=3D0:1:0:0, --print-stats > > > > We can probably add a sample print-stats output here > [Arek] - Sure. > > > > > + > > > +Limitations > > > +----------- > > > + > > > +Only one crypto vector and session type is possible to chose right > > > +now and it is > > > AES-GCM test case. > > > + > > > +Number of descriptors if set by default to 4096 > > > > Number of descriptors is set by default to 4096 > > > > > -- > > > 2.1.0