From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0062.outbound.protection.outlook.com [104.47.40.62]) by dpdk.org (Postfix) with ESMTP id 6517F1BA8C for ; Mon, 14 May 2018 09:53:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=O1bzB/bezGhWAhxIJgzrHRhfgQtqiEU9vmBOR3/jZto=; b=CvMsb9h4WVxvpjr8wipQsr+gCjGFFPoUXSvAz0PswvHY9Y/VnMmyjz3Rn/hniboCc7PMZDGiK2Z/+E8MXz5NocPhFGuUtGxvL9mAPg9Od1hQRiuSVUxIL+lPoD6uJgoVYwkgU9c7KfxYnCJcqlRHAqXEB+iY//WNVfkiovyht2A= Received: from CY4PR0701MB3634.namprd07.prod.outlook.com (52.132.101.164) by CY4PR0701MB3731.namprd07.prod.outlook.com (52.132.102.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Mon, 14 May 2018 07:53:43 +0000 Received: from CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::b0a9:2be9:bfdf:fc0a]) by CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::b0a9:2be9:bfdf:fc0a%13]) with mapi id 15.20.0755.018; Mon, 14 May 2018 07:53:41 +0000 From: "Verma, Shally" To: Pablo de Lara , "dev@dpdk.org" CC: "fiona.trahe@intel.com" , "ahmed.mansour@nxp.com" , "Gupta, Ashish" , "Gupta, Ashish" , "Sahu, Sunila" Thread-Topic: [PATCH v6 02/14] compressdev: add queue pair management Thread-Index: AQHT3isC5cf9BOid/UmSWBgovfMrsqQu9HrQ Date: Mon, 14 May 2018 07:53:41 +0000 Message-ID: References: <1517595924-25963-1-git-send-email-fiona.trahe@intel.com> <20180427132407.13385-1-pablo.de.lara.guarch@intel.com> <20180427132407.13385-3-pablo.de.lara.guarch@intel.com> In-Reply-To: <20180427132407.13385-3-pablo.de.lara.guarch@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shally.Verma@cavium.com; x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR0701MB3731; 7:TcDiPn+znlH/OPTygPh/PoMk2gSCJpFrplNFQSjT46AFMdzQUJVknbrIbrFOUmtm0PhrkPmMuzeTzEUAxP7NH0A9wu2LQJiYNjSbvrSITjlL9+NoC2hs7VHlFHUepjqOHwZO7F6FWESiWCCdokhF3V0KFKXwco50D1E16YoR6LMdX6+cyg+3WR+BRBWdtc6gYGVy2J0ITjlJ+8xVxFQdeusGwnD2wdbpG93qisEKuNbpBl4jmhMSplfQIGnZyH2K x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(396003)(346002)(366004)(39850400004)(376002)(39380400002)(189003)(199004)(13464003)(54906003)(110136005)(6506007)(4326008)(316002)(106356001)(102836004)(107886003)(6246003)(53936002)(55016002)(59450400001)(66066001)(186003)(68736007)(3660700001)(99286004)(55236004)(2501003)(86362001)(105586002)(305945005)(5250100002)(25786009)(26005)(9686003)(81156014)(33656002)(74316002)(11346002)(14454004)(8656006)(76176011)(8676002)(3280700002)(3846002)(7736002)(2906002)(97736004)(486006)(229853002)(5660300001)(72206003)(6436002)(478600001)(446003)(7696005)(2900100001)(81166006)(476003)(8936002)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3731; H:CY4PR0701MB3634.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:CY4PR0701MB3731; x-ms-traffictypediagnostic: CY4PR0701MB3731: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:CY4PR0701MB3731; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0701MB3731; x-forefront-prvs: 067270ECAF received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: ZjOY0r+bcznGITqIA6Et1ZZ6/Y557+okwaRMAx/KsNMIRpOueq5SUDp4vIVqD/FGB93+76ynXuORteIfKo/SRo+XkC3BGaa5BImWi0G+XLpqJRyyYx7vCoU/w9Z5vL1mLBZSdIAKrWrbPqxxv0kCGAXxiNgogOfX8X1Wtdf/wf1abI4311FyVnDoXLcfHijE spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 7083e93b-ab5f-4bde-6b5d-08d5b96fcf38 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7083e93b-ab5f-4bde-6b5d-08d5b96fcf38 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 May 2018 07:53:41.1257 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3731 Subject: Re: [dpdk-dev] [PATCH v6 02/14] compressdev: add queue pair management 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: , X-List-Received-Date: Mon, 14 May 2018 07:53:46 -0000 HI Pablo >-----Original Message----- >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com] >Sent: 27 April 2018 18:54 >To: dev@dpdk.org >Cc: fiona.trahe@intel.com; Verma, Shally ; ahmed.= mansour@nxp.com; Gupta, Ashish >; Pablo de Lara ;= Verma, Shally ; Gupta, >Ashish >Subject: [PATCH v6 02/14] compressdev: add queue pair management > >From: Fiona Trahe > >Add functions to manage device queue pairs. > >Signed-off-by: Fiona Trahe >Signed-off-by: Pablo de Lara >Signed-off-by: Shally Verma >Signed-off-by: Ashish Gupta >--- > lib/librte_compressdev/rte_compressdev.c | 178 ++++++++++++++++= ++++- > lib/librte_compressdev/rte_compressdev.h | 45 ++++++ > lib/librte_compressdev/rte_compressdev_internal.h | 5 + > lib/librte_compressdev/rte_compressdev_pmd.h | 47 ++++++ > lib/librte_compressdev/rte_compressdev_version.map | 2 + > 5 files changed, 276 insertions(+), 1 deletion(-) > >diff --git a/lib/librte_compressdev/rte_compressdev.c b/lib/librte_compres= sdev/rte_compressdev.c >index 751517c3d..6667528b5 100644 >--- a/lib/librte_compressdev/rte_compressdev.c >+++ b/lib/librte_compressdev/rte_compressdev.c >@@ -227,10 +227,136 @@ rte_compressdev_pmd_release_device(struct rte_compr= essdev *compressdev) > return 0; > } > >+uint16_t __rte_experimental >+rte_compressdev_queue_pair_count(uint8_t dev_id) >+{ >+ struct rte_compressdev *dev; >+ >+ dev =3D &rte_comp_devices[dev_id]; >+ return dev->data->nb_queue_pairs; >+} >+ >+static int >+rte_compressdev_queue_pairs_config(struct rte_compressdev *dev, >+ uint16_t nb_qpairs, int socket_id) >+{ >+ struct rte_compressdev_info dev_info; >+ void **qp; >+ unsigned int i; >+ >+ if ((dev =3D=3D NULL) || (nb_qpairs < 1)) { >+ COMPRESSDEV_LOG(ERR, "invalid param: dev %p, nb_queues %u", >+ dev, nb_qpairs); [Shally] shouldn't nb_qpairs < 0 as nb_qpairs =3D 0 a valid input which im= ply number of supported qp is implementation defined and thus unlimited. Thanks Shally //snip