From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 725BA8E8E for ; Fri, 15 Jan 2016 17:18:12 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 15 Jan 2016 08:18:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,300,1449561600"; d="scan'208";a="29985992" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga004.fm.intel.com with ESMTP; 15 Jan 2016 08:18:11 -0800 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u0FGIAPW024916; Fri, 15 Jan 2016 16:18:10 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u0FGIAQc012951; Fri, 15 Jan 2016 16:18:10 GMT Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id u0FGIAtF012947; Fri, 15 Jan 2016 16:18:10 GMT From: Ferruh Yigit To: dev@dpdk.org Date: Fri, 15 Jan 2016 16:18:04 +0000 Message-Id: <1452874684-12750-4-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1452874684-12750-1-git-send-email-ferruh.yigit@intel.com> References: <1452874684-12750-1-git-send-email-ferruh.yigit@intel.com> Subject: [dpdk-dev] [RFC 3/3] examples/ethtool: add control interface support to the application X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2016 16:18:12 -0000 Control interface APIs added into the sample application. To have the support corresponding kernel module (KCP) needs to be inserted. If kernel module is not there, application will run as it is without kernel control path support. When KCP module inserted, running application creates a virtual Linux network interface (dpdk$) per DPDK port. This interface can be used by traditional Linux tools. Signed-off-by: Ferruh Yigit --- examples/ethtool/ethtool-app/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c index e21abcd..bfa2128 100644 --- a/examples/ethtool/ethtool-app/main.c +++ b/examples/ethtool/ethtool-app/main.c @@ -44,6 +44,7 @@ #include #include #include +#include #include "ethapp.h" @@ -54,7 +55,6 @@ #define PKTPOOL_EXTRA_SIZE 512 #define PKTPOOL_CACHE 32 - struct txq_port { uint16_t cnt_unsent; struct rte_mbuf *buf_frames[MAX_BURST_LENGTH]; @@ -254,6 +254,8 @@ static int slave_main(__attribute__((unused)) void *ptr_data) } rte_spinlock_unlock(&ptr_port->lock); } /* end for( idx_port ) */ + rte_eth_control_interface_process_msg( + RTE_ETHTOOL_CTRL_IF_PROCESS_MSG, 0); } /* end for(;;) */ return 0; @@ -293,6 +295,8 @@ int main(int argc, char **argv) id_core = rte_get_next_lcore(id_core, 1, 1); rte_eal_remote_launch(slave_main, NULL, id_core); + rte_eth_control_interface_create(); + ethapp_main(); app_cfg.exit_now = 1; @@ -301,5 +305,7 @@ int main(int argc, char **argv) return -1; } + rte_eth_control_interface_destroy(); + return 0; } -- 2.5.0