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 01DD1A3160 for ; Thu, 10 Oct 2019 06:34:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EB98F1E8ED; Thu, 10 Oct 2019 06:34:43 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id BFDEC1E8DC for ; Thu, 10 Oct 2019 06:34:42 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9A4YfXv026734; Wed, 9 Oct 2019 21:34:41 -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-type; s=pfpt0818; bh=+/Gl1auRFAA9JBpF+F6B+o7XCDz3HviYTJFNQAwuLPI=; b=Tv6OenN9N1skTm8ObI4JLmRCZv8GT59pytYukfFi3ARR3mYPg36VuMxTqjobLvk9GWDO 9iTHrWDjEjv2uZiUTp8mkGzQp/ygiLbdhCPOZVsw7okPKgIFS4QZBWLjl4tTXZn3xZw9 bpoA1Cxkt7mivA8en2eiS8uArgbFgeWIrZ6Qw701Jtf3XzWqWbxiyh+9d9sSOxhVSJGr r/2ZvA+I7vboR2mLjhwYKDv2vDleJX58abOngZRX42uwc0KQo6LpZ7kJ5uTqRiSf4jvg Z0VLtSTf4UJaaeJCO+B6RTOJU+d4a/qPLheeYTYsjmFpqBmm/Cs1dPBegd/c+6OZVadG 2Q== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2vh5rqnbmf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 09 Oct 2019 21:34:41 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 9 Oct 2019 21:34:40 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 9 Oct 2019 21:34:40 -0700 Received: from dell-e5540.caveonetworks.com (unknown [10.29.16.81]) by maili.marvell.com (Postfix) with ESMTP id 6D32A3F703F; Wed, 9 Oct 2019 21:34:33 -0700 (PDT) From: To: CC: , , Vivek Sharma Date: Thu, 10 Oct 2019 10:04:26 +0530 Message-ID: <1570682066-1974-1-git-send-email-viveksharma@marvell.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-10_02:2019-10-08,2019-10-10 signatures=0 Subject: [dpdk-dev] [PATCH] app/testpmd: introduce Rx offloads argument 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: Vivek Sharma Introduce boot time argument for configuring all rx offloads. Signed-off-by: Vivek Sharma --- app/test-pmd/parameters.c | 16 +++++++++++++++- doc/guides/testpmd_app_ug/run_app.rst | 5 +++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 6c78dca..7e8b7e1 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -68,7 +68,8 @@ usage(char* progname) "--rss-ip | --rss-udp | " "--rxpt= | --rxht= | --rxwt= | --rxfreet= | " "--txpt= | --txht= | --txwt= | --txfreet= | " - "--txrst= | --tx-offloads= | --vxlan-gpe-port= ]\n", + "--txrst= | --tx-offloads= | | --rx-offloads= | " + "--vxlan-gpe-port= ]\n", progname); #ifdef RTE_LIBRTE_CMDLINE printf(" --interactive: run in interactive mode.\n"); @@ -186,6 +187,7 @@ usage(char* progname) printf(" --flow-isolate-all: " "requests flow API isolated mode on all ports at initialization time.\n"); printf(" --tx-offloads=0xXXXXXXXX: hexadecimal bitmask of TX queue offloads\n"); + printf(" --rx-offloads=0xXXXXXXXX: hexadecimal bitmask of RX queue offloads\n"); printf(" --hot-plug: enable hot plug for device.\n"); printf(" --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n"); printf(" --mlockall: lock all memory\n"); @@ -642,6 +644,7 @@ launch_args_parse(int argc, char** argv) { "print-event", 1, 0, 0 }, { "mask-event", 1, 0, 0 }, { "tx-offloads", 1, 0, 0 }, + { "rx-offloads", 1, 0, 0 }, { "hot-plug", 0, 0, 0 }, { "vxlan-gpe-port", 1, 0, 0 }, { "mlockall", 0, 0, 0 }, @@ -1221,6 +1224,17 @@ launch_args_parse(int argc, char** argv) rte_exit(EXIT_FAILURE, "tx-offloads must be >= 0\n"); } + + if (!strcmp(lgopts[opt_idx].name, "rx-offloads")) { + char *end = NULL; + n = strtoull(optarg, &end, 16); + if (n >= 0) + rx_offloads = (uint64_t)n; + else + rte_exit(EXIT_FAILURE, + "rx-offloads must be >= 0\n"); + } + if (!strcmp(lgopts[opt_idx].name, "vxlan-gpe-port")) { n = atoi(optarg); if (n >= 0) diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst index d0d89b3..985fcf4 100644 --- a/doc/guides/testpmd_app_ug/run_app.rst +++ b/doc/guides/testpmd_app_ug/run_app.rst @@ -385,6 +385,11 @@ The command line options are: Set the hexadecimal bitmask of TX queue offloads. The default value is 0. +* ``--rx-offloads=0xXXXXXXXX`` + + Set the hexadecimal bitmask of RX queue offloads. + The default value is 0. + * ``--hot-plug`` Enable device event monitor mechanism for hotplug. -- 2.7.4