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 969FCA04B9; Mon, 11 Nov 2019 14:20:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 11C6F2BF5; Mon, 11 Nov 2019 14:19:59 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 5F40A2BF5 for ; Mon, 11 Nov 2019 14:19:57 +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 xABDHUOw026235; Mon, 11 Nov 2019 05:19:56 -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=4m94dtXibL6a1dRuUXyAZQ4yRE2VCy52+Xmw90iUWCw=; b=VK1U8NZcXp59KYeVvjN6GKaBqYsLAk/idYOUyam6w4Wj+OK4TDIzQCrDrA4yL2kkJlpf k3lg9aVHB7cDFcYkaebPjONBO50BkXdmqBPxIqTqMPqFTVZISY/Bnr3tA7j6WzlwRutY pPNyxmDtN1KIvBOoyNO+LwIAC67dx2n0JTg5GgIRUmFGuRp68ttlIEzV6fOw7uOMsaMx fujeUBIGXcuSAp+aOCXY1eXGzv6S38x4JEaiouOWw7tmyAVUOlRKpYE9c8Xhpma1PhjE Gvd7yHalMGtllNtFUojWZh4rGOletkrrWYGXT7zB40M4j3P5yr6jqOO7hbQe7NTVwbw7 Gg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2w5wurp909-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 11 Nov 2019 05:19:56 -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:19:54 -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:19:54 -0800 Received: from BG-LT7430.marvell.com (unknown [10.28.17.38]) by maili.marvell.com (Postfix) with ESMTP id C31763F703F; Mon, 11 Nov 2019 05:19:50 -0800 (PST) From: To: , , , , Marko Kovacevic , Ori Kam , Bruce Richardson , Radu Nicolau , "Akhil Goyal" , Tomasz Kantecki , Sunil Kumar Kori , Pavan Nikhilesh CC: Date: Mon, 11 Nov 2019 18:49:11 +0530 Message-ID: <20191111131914.16559-8-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 07/10] examples/l2fwd: disable ptype parsing 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 packet type parsing as l2fwd doesn't rely on packet types. Signed-off-by: Pavan Nikhilesh --- examples/l2fwd/Makefile | 2 ++ examples/l2fwd/main.c | 5 +++++ examples/l2fwd/meson.build | 2 ++ 3 files changed, 9 insertions(+) diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile index 230352093..59b2b4ab4 100644 --- a/examples/l2fwd/Makefile +++ b/examples/l2fwd/Makefile @@ -51,6 +51,8 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +# Add flag to allow experimental API as l2fwd uses rte_ethdev_set_ptype API +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk endif diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index d7bcbfae7..09257aab1 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -713,6 +713,11 @@ main(int argc, char **argv) "Cannot set error callback for tx buffer on port %u\n", portid); + ret = rte_eth_dev_set_ptypes(portid, RTE_PTYPE_UNKNOWN, NULL, + 0); + if (ret < 0) + printf("Port %u, Failed to disable Ptype parsing\n", + portid); /* Start device */ ret = rte_eth_dev_start(portid); if (ret < 0) diff --git a/examples/l2fwd/meson.build b/examples/l2fwd/meson.build index c34e11e36..50d88caa0 100644 --- a/examples/l2fwd/meson.build +++ b/examples/l2fwd/meson.build @@ -6,6 +6,8 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +# Enable experimental API flag as l2fwd uses rte_ethdev_set_ptype API +allow_experimental_apis = true sources = files( 'main.c' ) -- 2.17.1