From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f179.google.com (mail-pf0-f179.google.com [209.85.192.179]) by dpdk.org (Postfix) with ESMTP id D4C5B2BB1 for ; Thu, 2 Mar 2017 01:37:31 +0100 (CET) Received: by mail-pf0-f179.google.com with SMTP id x66so16023558pfb.3 for ; Wed, 01 Mar 2017 16:37:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CnMvwqamamJTZ8j7f8894gTDV6z3Y+XU7UP2DdcpgVI=; b=wrqvkj6uuNxVzv14YatbT85A4Z7zh5XJulIGViIr/eUQbxejbruotlXEh6w0seelyy tyLsumimpueDn+6o/yAyLCWl7fnuHKj/FN3fcx8Av6Dnvb7BtdFibJzZLM5/rwOws7Do FKTTJlLaYqUNJDQywk31+UC/+PrDbIqJ2RqOMY/SocXhDkqwq+Doax3u14tpXwXjt+7Y 4xlVHFLcXriGLYDgsdWYjClh6RB81RneZt9bvMcFntkEJkD32I6WvE5f3kowSUqlantA ak5N1jGsIZ9xM2ONowfWgEYZWTNA/SmByDScqD9D4XiQ/yXvAOsPjlxzLZ9QUPtENUh2 GLUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CnMvwqamamJTZ8j7f8894gTDV6z3Y+XU7UP2DdcpgVI=; b=sTwpihGRn4JVWDGXiZy+yq6+jL0Q3zyZNrOOjMkGyspXUjn7NkmrT3nx+FuIxGdYkf qEVwoCpXz1aMZ/CyHhDO+Fa1n4xnzSR3r8voYjGWHubBHKbLdiYEaGwiwVyEBdRAmmZI guZjG0wnxRrLI6huivQzobQzMDMKmnX3l+B4w/h4j6jVMfx2QlJVRjTM96WKAec9UfwQ R19jLA4UCRhBhxXkfWarRup/VstJYXSZruucWx+DqICzlsVw3uRvrLQ3T/Nd0piBNMhT MBmvoAFnW2bvDspmYOZ2401bFlUVOLFS7LUzzSLNp+rZ76WqMsTnaVfaY08+jObgfkat 8AiQ== X-Gm-Message-State: AMke39mlBiF6yr12w773EKQCpk+b96zvJvFZSDiEMSbb7dDc2QSy4Cy8RNs8sfvC+mnQOw== X-Received: by 10.99.150.10 with SMTP id c10mr12196953pge.160.1488415051164; Wed, 01 Mar 2017 16:37:31 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id q73sm12719470pfa.129.2017.03.01.16.37.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Mar 2017 16:37:31 -0800 (PST) Date: Wed, 1 Mar 2017 16:37:29 -0800 From: Stephen Hemminger To: Allain Legacy Cc: , , , , Message-ID: <20170301163729.6b687ad9@xeon-e3> In-Reply-To: <1488414008-162839-16-git-send-email-allain.legacy@windriver.com> References: <1488136143-116389-1-git-send-email-allain.legacy@windriver.com> <1488414008-162839-1-git-send-email-allain.legacy@windriver.com> <1488414008-162839-16-git-send-email-allain.legacy@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 15/16] net/avp: device start and stop operations 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: , X-List-Received-Date: Thu, 02 Mar 2017 00:37:32 -0000 On Wed, 1 Mar 2017 19:20:07 -0500 Allain Legacy wrote: > + > +static void > +avp_dev_close(struct rte_eth_dev *eth_dev) > +{ > + struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); > + int ret; > + > + rte_spinlock_lock(&avp->lock); > + if (avp->flags & AVP_F_DETACHED) { > + PMD_DRV_LOG(ERR, "Operation not supported during VM live migration\n"); > + goto unlock; > + } > + > + /* remember current link state */ > + avp->flags &= ~AVP_F_LINKUP; > + avp->flags &= ~AVP_F_CONFIGURED; > + > + ret = avp_dev_disable_interrupts(eth_dev); > + if (ret < 0) { > + PMD_DRV_LOG(ERR, "Failed to disable interrupts\n"); > + /* continue */ > + } > + > + /* update device state */ > + ret = avp_dev_ctrl_shutdown(eth_dev); > + if (ret < 0) { > + PMD_DRV_LOG(ERR, "Device shutdown failed by host, ret=%d\n", > + ret); > + goto unlock; > + } > + > +unlock: > + rte_spinlock_unlock(&avp->lock); > +} The second goto is unnecessary.