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 7FCAAA3201 for ; Mon, 21 Oct 2019 10:04:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A44D41BE91; Mon, 21 Oct 2019 10:04:00 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id D69001BE80 for ; Mon, 21 Oct 2019 10:03:58 +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 x9L7tYID029878; Mon, 21 Oct 2019 01:03:58 -0700 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-type; s=pfpt0818; bh=Od2z48f623b5ttBVjXe6HrcjuZNHkvKTvnJXmUIdePQ=; b=BapPaiu99/j5ouQ2MaBIN5jQkh4/SWzi3j1SMpafQoOmIJeYU8+30+5uRKkH0PGW8L6F xEvD7bKQWiPgtyCl/SfhG9OOu91vfu/24pHW0oonRalTxBbjFkax+1cT6+DDnwa+BgTk 6MHOV4M16clJnuOMXSNSGdt/ibCnX0f4EePeVn2FyHoyG7kz1/sFDXFi95yOdSh9b4Td zQABv395ymqMQUz0t/HszLDNBpxQ0JMYjbEQUNEdUqWEYwTE+Png9rRFvTkHYO3qjESx T6bU2nfctX/73n5dA2iR49uaW/y4+mhMeVbphQMM/RXxUhRe0XJ5dUed1jn/eT0+l1Co 7g== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2vr20mn69y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 21 Oct 2019 01:03:58 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 21 Oct 2019 01:03:56 -0700 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, 21 Oct 2019 01:03:56 -0700 Received: from hyd1vattunuru-dt.caveonetworks.com (unknown [10.29.52.72]) by maili.marvell.com (Postfix) with ESMTP id E7BB93F703F; Mon, 21 Oct 2019 01:03:52 -0700 (PDT) From: To: CC: , , , , , , , , Vamsi Attunuru Date: Mon, 21 Oct 2019 13:33:22 +0530 Message-ID: <20191021080324.10659-3-vattunuru@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20191021080324.10659-1-vattunuru@marvell.com> References: <20190816061252.17214-1-vattunuru@marvell.com> <20191021080324.10659-1-vattunuru@marvell.com> 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-21_02:2019-10-18,2019-10-21 signatures=0 Subject: [dpdk-dev] [PATCH v11 2/4] eal: add legacy kni option 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: Vamsi Attunuru This adds a "--legacy-kni" command-line option. It will be used to run existing KNI applications with DPDK 19.11 and later. Signed-off-by: Vamsi Attunuru Suggested-by: Ferruh Yigit --- doc/guides/rel_notes/release_19_11.rst | 4 ++++ lib/librte_eal/common/eal_common_options.c | 5 +++++ lib/librte_eal/common/eal_internal_cfg.h | 2 ++ lib/librte_eal/common/eal_options.h | 2 ++ 4 files changed, 13 insertions(+) diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst index 85953b9..ab2c381 100644 --- a/doc/guides/rel_notes/release_19_11.rst +++ b/doc/guides/rel_notes/release_19_11.rst @@ -115,6 +115,10 @@ New Features Added eBPF JIT support for arm64 architecture to improve the eBPF program performance. +* **Added EAL option to operate KNI in legacy mode.** + + Added EAL option ``--legacy-kni`` to make existing KNI applications work + with DPDK 19.11 and later. Removed Items ------------- diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 05cae5f..8f5174e 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -81,6 +81,7 @@ eal_long_options[] = { {OPT_LEGACY_MEM, 0, NULL, OPT_LEGACY_MEM_NUM }, {OPT_SINGLE_FILE_SEGMENTS, 0, NULL, OPT_SINGLE_FILE_SEGMENTS_NUM}, {OPT_MATCH_ALLOCATIONS, 0, NULL, OPT_MATCH_ALLOCATIONS_NUM}, + {OPT_LEGACY_KNI, 0, NULL, OPT_LEGACY_KNI_NUM }, {0, 0, NULL, 0 } }; @@ -1408,6 +1409,9 @@ eal_parse_common_option(int opt, const char *optarg, return -1; } break; + case OPT_LEGACY_KNI_NUM: + conf->legacy_kni = 1; + break; /* don't know what to do, leave this to caller */ default: @@ -1636,6 +1640,7 @@ eal_common_usage(void) " (ex: --vdev=net_pcap0,iface=eth2).\n" " --"OPT_IOVA_MODE" Set IOVA mode. 'pa' for IOVA_PA\n" " 'va' for IOVA_VA\n" + " --"OPT_LEGACY_KNI" Run KNI in IOVA_PA mode (legacy mode)\n" " -d LIB.so|DIR Add a driver or driver directory\n" " (can be used multiple times)\n" " --"OPT_VMWARE_TSC_MAP" Use VMware TSC map instead of native RDTSC\n" diff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h index a42f349..eee71ec 100644 --- a/lib/librte_eal/common/eal_internal_cfg.h +++ b/lib/librte_eal/common/eal_internal_cfg.h @@ -82,6 +82,8 @@ struct internal_config { rte_cpuset_t ctrl_cpuset; /**< cpuset for ctrl threads */ volatile unsigned int init_complete; /**< indicates whether EAL has completed initialization */ + volatile unsigned legacy_kni; + /**< true to enable legacy kni behavior */ }; extern struct internal_config internal_config; /**< Global EAL configuration. */ diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h index 9855429..1010ed3 100644 --- a/lib/librte_eal/common/eal_options.h +++ b/lib/librte_eal/common/eal_options.h @@ -69,6 +69,8 @@ enum { OPT_IOVA_MODE_NUM, #define OPT_MATCH_ALLOCATIONS "match-allocations" OPT_MATCH_ALLOCATIONS_NUM, +#define OPT_LEGACY_KNI "legacy-kni" + OPT_LEGACY_KNI_NUM, OPT_LONG_MAX_NUM }; -- 2.8.4