From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wes1-so2.wedos.net (wes1-so2.wedos.net [46.28.106.16]) by dpdk.org (Postfix) with ESMTP id 4E2F83977 for ; Thu, 14 Jul 2016 18:33:05 +0200 (CEST) Received: from jvn (dynamic-109-81-211-32.ipv4.broadband.iol.cz [109.81.211.32]) by wes1-so2.wedos.net (Postfix) with ESMTPSA id 3rr1TX6snYzBhy; Thu, 14 Jul 2016 18:33:04 +0200 (CEST) Date: Thu, 14 Jul 2016 18:33:12 +0200 From: Jan Viktorin To: Shreyansh Jain Cc: , , Message-ID: <20160714183312.182b1424@jvn> In-Reply-To: <1468303282-2806-18-git-send-email-shreyansh.jain@nxp.com> References: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> <1468303282-2806-1-git-send-email-shreyansh.jain@nxp.com> <1468303282-2806-18-git-send-email-shreyansh.jain@nxp.com> Organization: RehiveTech X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v6 17/17] ethdev: get rid of device type 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: Thu, 14 Jul 2016 16:33:05 -0000 On Tue, 12 Jul 2016 11:31:22 +0530 Shreyansh Jain wrote: > Now that hotplug has been moved to eal, there is no reason to keep the device > type in this layer. > > Signed-off-by: David Marchand > Signed-off-by: Shreyansh Jain > --- > app/test/virtual_pmd.c | 2 +- > drivers/net/af_packet/rte_eth_af_packet.c | 2 +- > drivers/net/bonding/rte_eth_bond_api.c | 2 +- > drivers/net/cxgbe/cxgbe_main.c | 2 +- > drivers/net/mlx4/mlx4.c | 2 +- > drivers/net/mlx5/mlx5.c | 2 +- > drivers/net/mpipe/mpipe_tilegx.c | 2 +- > drivers/net/null/rte_eth_null.c | 2 +- > drivers/net/pcap/rte_eth_pcap.c | 2 +- > drivers/net/ring/rte_eth_ring.c | 2 +- > drivers/net/vhost/rte_eth_vhost.c | 2 +- > drivers/net/virtio/virtio_user_ethdev.c | 2 +- > drivers/net/xenvirt/rte_eth_xenvirt.c | 2 +- > examples/ip_pipeline/init.c | 22 ---------------------- > lib/librte_ether/rte_ethdev.c | 5 ++--- > lib/librte_ether/rte_ethdev.h | 15 +-------------- > 16 files changed, 16 insertions(+), 52 deletions(-) > [...] > > -static int > -app_link_is_virtual(struct app_link_params *p) > -{ > - uint32_t pmd_id = p->pmd_id; > - struct rte_eth_dev *dev = &rte_eth_devices[pmd_id]; > - > - if (dev->dev_type == RTE_ETH_DEV_VIRTUAL) > - return 1; > - > - return 0; > -} > - > void > app_link_up_internal(struct app_params *app, struct app_link_params *cp) > { > uint32_t i; > int status; > > - if (app_link_is_virtual(cp)) { > - cp->state = 1; > - return; > - } > - > /* For each link, add filters for IP of current link */ > if (cp->ip != 0) { > for (i = 0; i < app->n_links; i++) { > @@ -736,11 +719,6 @@ app_link_down_internal(struct app_params *app, struct app_link_params *cp) > uint32_t i; > int status; > > - if (app_link_is_virtual(cp)) { > - cp->state = 0; > - return; > - } > - > /* PMD link down */ I understand that app_link_is_virtual is useless. However, it changes semantics. What is the behaviour of the app_link_up_internal after this change? > status = rte_eth_dev_set_link_down(cp->pmd_id); > if (status < 0) [...]