From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E60A15A80 for ; Mon, 19 Jan 2015 12:58:42 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 19 Jan 2015 03:54:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,426,1418112000"; d="scan'208";a="639289416" Received: from unknown (HELO Sent) ([10.217.248.44]) by orsmga001.jf.intel.com with SMTP; 19 Jan 2015 03:58:39 -0800 Received: by Sent (sSMTP sendmail emulation); Mon, 19 Jan 2015 12:57:56 +0200 From: Tomasz Kulasek To: dev@dpdk.org Date: Mon, 19 Jan 2015 12:56:39 +0100 Message-Id: <1421668601-156-2-git-send-email-tomaszx.kulasek@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1421668601-156-1-git-send-email-tomaszx.kulasek@intel.com> References: <1418375682-4703-3-git-send-email-michalx.k.jastrzebski@intel.com> <1421668601-156-1-git-send-email-tomaszx.kulasek@intel.com> Subject: [dpdk-dev] [PATCH v2 1/3] PMD Ring - Add link up/down functions 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: Mon, 19 Jan 2015 11:58:43 -0000 Link up and down implementation. Signed-off-by: Tomasz Kulasek Signed-off-by: Pawel Wodkowski --- lib/librte_pmd_ring/rte_eth_ring.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c index 4f1b6ed..929e71a 100644 --- a/lib/librte_pmd_ring/rte_eth_ring.c +++ b/lib/librte_pmd_ring/rte_eth_ring.c @@ -121,6 +121,20 @@ eth_dev_stop(struct rte_eth_dev *dev) } static int +eth_dev_set_link_down(struct rte_eth_dev *dev) +{ + dev->data->dev_link.link_status = 0; + return 0; +} + +static int +eth_dev_set_link_up(struct rte_eth_dev *dev) +{ + dev->data->dev_link.link_status = 1; + return 0; +} + +static int eth_rx_queue_setup(struct rte_eth_dev *dev,uint16_t rx_queue_id, uint16_t nb_rx_desc __rte_unused, unsigned int socket_id __rte_unused, @@ -207,6 +221,8 @@ eth_link_update(struct rte_eth_dev *dev __rte_unused, static struct eth_dev_ops ops = { .dev_start = eth_dev_start, .dev_stop = eth_dev_stop, + .dev_set_link_up = eth_dev_set_link_up, + .dev_set_link_down = eth_dev_set_link_down, .dev_configure = eth_dev_configure, .dev_infos_get = eth_dev_info, .rx_queue_setup = eth_rx_queue_setup, -- 1.7.9.5