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 B2D71A04B9; Mon, 11 Nov 2019 14:20:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3F5B73423; Mon, 11 Nov 2019 14:20:08 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 5BE6E3256 for ; Mon, 11 Nov 2019 14:20:06 +0100 (CET) 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 xABDHSNv026226; Mon, 11 Nov 2019 05:20:05 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=ers8ClF3VPYVHTMStqZcr5tYP8nDrHKm7ptFQV4M9oM=; b=ZL7kc1dWq5APMgw6CrBiXAiwzMxKFFLW5iiJQQ9RZsk2upLsG6K3mm0x2wI2gNBULWoS h30biqrDY5aNxEBcIlTONz0Fu4I9lVq3a+L+AwhWRf+M5dUKmqjrOIn5US1QfxG50mem 3c25ux2wC6V8l31bgfNSYHctOKHmhPaHJSXP4Uy8lFGUYqr398ed6DqYYNpo8TxVXvT9 IRDCyPuFGdW4kOylUpN5nz6q+qs1vViT5yzcnmE5dCS73RU+DfLd+qKARXizLUswRzQ+ TA9xjRFcwJEGJKoznPznat37T8CeL8vyadEdg2fA5hTKKYZcFeG4TeMuczQT7+1WdteY 4A== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2w5wurp90u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 11 Nov 2019 05:20:05 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 11 Nov 2019 05:20:03 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 11 Nov 2019 05:20:03 -0800 Received: from BG-LT7430.marvell.com (unknown [10.28.17.38]) by maili.marvell.com (Postfix) with ESMTP id B3F743F7043; Mon, 11 Nov 2019 05:20:00 -0800 (PST) From: To: , , , , Wenzhuo Lu , Jingjing Wu , "Bernard Iremonger" CC: , Pavan Nikhilesh Date: Mon, 11 Nov 2019 18:49:13 +0530 Message-ID: <20191111131914.16559-10-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191111131914.16559-1-pbhagavatula@marvell.com> References: <20191106191803.15098-1-pbhagavatula@marvell.com> <20191111131914.16559-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-11_04:2019-11-11,2019-11-11 signatures=0 Subject: [dpdk-dev] [PATCH v17 09/10] app/testpmd: disable packet type parsing by default 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: Pavan Nikhilesh Disable packey type parsing on port init, user can enable ptype parsing by issuing set ptype command. Signed-off-by: Pavan Nikhilesh --- app/test-pmd/cmdline.c | 2 ++ app/test-pmd/testpmd.c | 12 ++++++++++++ app/test-pmd/testpmd.h | 1 + 3 files changed, 15 insertions(+) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index da556f91e..bd056033c 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -19082,6 +19082,8 @@ cmd_set_port_ptypes_parsed( rte_get_ptype_name(ptypes[i], ptype_name, sizeof(ptype_name)); printf("%s\n", ptype_name); } + + clear_ptypes = false; } cmdline_parse_inst_t cmd_set_port_ptypes = { diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 44443469a..446da3623 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -359,6 +359,9 @@ uint8_t hot_plug = 0; /**< hotplug disabled by default. */ /* After attach, port setup is called on event or by iterator */ bool setup_on_probe_event = true; +/* Clear ptypes on port initialization. */ +uint8_t clear_ptypes = true; + /* Pretty printing of ethdev events */ static const char * const eth_event_desc[] = { [RTE_ETH_EVENT_UNKNOWN] = "unknown", @@ -2269,6 +2272,15 @@ start_port(portid_t pid) return -1; } configure_rxtx_dump_callbacks(verbose_level); + if (clear_ptypes) { + diag = rte_eth_dev_set_ptypes(pi, RTE_PTYPE_UNKNOWN, + NULL, 0); + if (diag < 0) + printf( + "Port %d: Failed to disable Ptype parsing\n", + pi); + } + /* start port */ if (rte_eth_dev_start(pi) < 0) { printf("Fail to start port %d\n", pi); diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index caabf3254..90694a330 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -334,6 +334,7 @@ extern uint32_t event_print_mask; extern bool setup_on_probe_event; /**< disabled by port setup-on iterator */ extern uint8_t hot_plug; /**< enable by "--hot-plug" parameter */ extern int do_mlockall; /**< set by "--mlockall" or "--no-mlockall" parameter */ +extern uint8_t clear_ptypes; /**< disabled by set ptype cmd */ #ifdef RTE_LIBRTE_IXGBE_BYPASS extern uint32_t bypass_timeout; /**< Store the NIC bypass watchdog timeout */ -- 2.17.1