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 96116A04DD; Tue, 20 Oct 2020 11:18:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1FC59BCE2; Tue, 20 Oct 2020 11:11:39 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 4F272BCCC for ; Tue, 20 Oct 2020 11:11:37 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09K9AHW6007983; Tue, 20 Oct 2020 02:11:35 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=enQV7Bb4aNY3iCFLh389rNoS+YysFKttl3FWIJoeHtg=; b=kbDzcSaIbymTv3a3sKuJLjFubJx0C6hERmzK6D4g5U2xmQIZGOU6n0c+AMY+f+XLngYG CKZjCmiVfGCGe6d9wThx4cvycuIkUvCrnTiKWHJsagxDXAiiuOo4SbpArS3Av9/I1nqc Sk0isuGdnzZRJnJnxmoXON+INhnlsmAgJd2TaOamTLi51nk3ZeL8Cp7tKXBeRaGELofN czODwajCLka4nw+P3ekg3YZl7d5WO/KCARviP+WwKrDFH8yvC9YX+cw+TogYO4+cipxM tqMb5UgPW6z5wnOeLJn1iLmMWy0+iTi3bREJzB1QLz/WuMfKuEFWOC7Fjz09cVgZogBF Ug== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 34804nr4pp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 20 Oct 2020 02:11:35 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 20 Oct 2020 02:11:33 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 20 Oct 2020 02:11:27 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 20 Oct 2020 02:11:27 -0700 Received: from vvenus124.il.marvell.com (unknown [10.5.116.64]) by maili.marvell.com (Postfix) with ESMTP id E1E843F703F; Tue, 20 Oct 2020 02:11:25 -0700 (PDT) From: To: CC: , , , , Date: Tue, 20 Oct 2020 12:10:08 +0300 Message-ID: <20201020091008.25537-1-guyk@marvell.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-20_04:2020-10-20, 2020-10-20 signatures=0 Subject: [dpdk-dev] [PATCH v1] app/regex: configure qp according to device capabilities 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" From: Guy Kaneti configure qp with OOS according to device capabilities returned from rte_regexdev_info_get. Signed-off-by: Guy Kaneti --- app/test-regex/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/test-regex/main.c b/app/test-regex/main.c index e6080b44b..3deaf3c80 100644 --- a/app/test-regex/main.c +++ b/app/test-regex/main.c @@ -173,7 +173,7 @@ init_port(struct rte_mempool **mbuf_mp, uint32_t nb_jobs, }; struct rte_regexdev_qp_conf qp_conf = { .nb_desc = 1024, - .qp_conf_flags = RTE_REGEX_QUEUE_PAIR_CFG_OOS_F, + .qp_conf_flags = 0, }; int res = 0; @@ -218,6 +218,8 @@ init_port(struct rte_mempool **mbuf_mp, uint32_t nb_jobs, printf("Error, can't configure device %d.\n", id); goto error; } + if (info.regexdev_capa & RTE_REGEXDEV_CAPA_QUEUE_PAIR_OOS_F) + qp_conf.qp_conf_flags |= RTE_REGEX_QUEUE_PAIR_CFG_OOS_F; res = rte_regexdev_queue_pair_setup(id, 0, &qp_conf); if (res < 0) { printf("Error, can't setup queue pair for device %d.\n", -- 2.28.0