From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0073.outbound.protection.outlook.com [104.47.42.73]) by dpdk.org (Postfix) with ESMTP id 834E1FAE0 for ; Thu, 2 Mar 2017 12:40:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=x3RZJKlJRr5z5S7vohrmKDigpaEPY0UVKxUQcqg0KOQ=; b=NJiBjX09BKpRU32MoqWMGoMXepaJLRJpELws3jfx1Og8SfSrf7PQoDKmEYHoEDRGtKe8gE8eqbTbyCnJm59D+yr0SBJHh5duqd0rQB0R8gRyb90uIaGodT44K98WdA/lxJvPbru/qUozpdWv95RTgxACoemyYjP02srIm9nCuy8= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from lio357.in.caveonetworks.com (14.140.2.178) by CY1PR07MB2277.namprd07.prod.outlook.com (10.164.112.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Thu, 2 Mar 2017 11:40:09 +0000 From: Shijith Thotton To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Jerin Jacob , Derek Chickles , Venkat Koppula , Srisivasubramanian S , Mallesham Jatharakonda Date: Thu, 2 Mar 2017 17:02:48 +0530 Message-Id: <1488454371-3342-44-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1487669225-30091-1-git-send-email-shijith.thotton@caviumnetworks.com> <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: BM1PR01CA0021.INDPRD01.PROD.OUTLOOK.COM (10.163.198.156) To CY1PR07MB2277.namprd07.prod.outlook.com (10.164.112.155) X-MS-Office365-Filtering-Correlation-Id: 763a657e-019c-438b-f710-08d46160e333 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR07MB2277; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 3:lCKbfMM4k3GSb6RA9srt6Mb2fqW7gqf/Dg+XIVIB3KZ6KEBW89qNfOs5mzb67AD18EZ0ns04G772AHyZUkUz6g8VSWfK77fkhCrycYolVPVDtPEUzJ6j8zsEeNM87MLNzRPbxFaL9hAdwg7sM6MXX97imdqlpZLCtCesP8eF9zRLwimMZHEZY+bsBV5166uDdMM4k2xrRiltPuYV0+0hKU4r+H/pcSUS1uZ8B9ugbPtJuPQFs44Gqr441kNwzJNI7GoftGJOO10IzQG94fyKEg==; 25:g6IuZIYJuhS7HpNZEjMOD4No68mo5YTU2JGPe9vpYRIz3KozM0s+HQ8HSU4F4kdXpdDY3Q1YpH6ZKMTF5L9mXXQm4rqKEsKo6SnBSNs75E7IyvxkhDZDkUXyLBKkM5cuJXy4Bw5TZhS9RjTbnWwDyYyPxNWkz+tpdh6QCMiS/SpjmHvNXKEhSc/iVCSZiflkukiZK4be8fREtyMKEBkxkAqQfWj92LLNeDTDE61UrFXOKmSZuqJ3BMJgmIjuulbPN9PLPgekcNH8WIXIGINgTVb2oi//skm84Gz39HI8q6lGtdpPhSm01VPYytCE4FtEhnLn0GdxzrgGThkO9Hp2gITYSgFgnx5AUy0y0ywsP8kGn1sKMcSKYmBHm/qLf2Zs2oVosSAbh9xGQs0ijMGkWnQpIJei6o5QZg5eNT7MjvBi/Y7ccdzd0vFXbdpZJZ6YyBOKdzZJAIvdX0k7as4GIw== X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 31:H6wTxwQGlvjNl8heEToQEz0kSnOWDbtj2i4Mszkw+LGhyE+dIKL/RKP3+EtYyUQq6KdAh7xIOeLs8MvpUwSRbJDdypdlPR5g9ZRNphPhyZ8HJO5KVgUItD+dCbQa5rTmrUEaUx3qi3DDkuFIc9DLpvmlvv6U0a210eh/hcpcErIt6dalmyXSVRCVGggf7CfjhlUnbfQ/iR0hUVAC1dkpAtH25sv8nj+n9tpWMsS5pDI=; 20:yaYryhyUiGMjazlJX7yr6044mP09rER6+FBkivH+GvBf86xXq/eaNNPZYv8vdD0v7fNHtmbe60MsX7ZonJ8nBkR0MKeUiJBV7I+yfYEISibOlhpvTjqiVU6G4Z53CxfJaJbYDkjCwUqI06mkFzWUsCqnKMLn2rrbagq/46cB9oje5auGI1Ds0ACocFFYWdcep3u/Qq2D6qR+eiuNO165EFLQcS7VSAfboLsDyaIJlHzZlnEQigZDXwkUS0yYZLULctNt/nNFHwGlY1p/RXIJruVXfVHQGwBjkDEA3QL49vDrMsPsBHRJf/ws67WqeTkLWN546QWTQFRi+MKgSbTplCzCosje+T+UUzNIIkM3tUpzcS4czkScY/jHQQXGL0eVU7P7eHbOHzkKXv4fC6ENOpKQn7hzzSRP0jNEUyWm65fXktLMlPx1TKf+thYoLy+/E7qThppktP1GQXWNF/hM/Z6jU0Nj/C+J45RqZqHbUVip2RN2hpDx0iqK3fgADOJT8pZ1LwSnpy7e3BucT4SdKn1Frh/SccqkLIUA3pG7KGwFihiXbFEisz66K5rKxkuWqwG3sC34i4xW4i9OwccALGziPMQdol3mKVJnbm7lqlY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123558025)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:CY1PR07MB2277; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2277; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 4:RfOEW9vwa+7A3DQgZNQKBEqgfEo4j+VpFoNhkpUaiGqfe7ryHQshxMixLjf51N2FKY6dpXffHAmZLcOgIJ6ZK9cixjtJgNJLEqn6I2scLCglravntl8aNOSHkpycocatr5OsAbsV7sBWbNSS+apk/c53tZzWmliMLooIMkl+bQJgLcN0PfGiySCvxsibK+xM0pcWdJPxEmRVYIrRge/J23O/zuDG0E6/Rje3XLincn2g0ucevLEm8mGdSuaD0N/V2oZUmIhhzH0vpqZrqlPN32e5/WhQlI/GVj2DVKeRvIjcePcP8SIiCPETDOGajqhbyb+IQssywF2kX3e0YKUN3nL7gNfyvX5ySyqqb2IH/uY3pCkcNiNm6a3XNkClCeH9wX2oS/UOhZ6f/1Me1l4O9digVbPQbG/Kk2xyI70ir+foBlxADRr2Sa2THwQGlbkvPjIwPLKAiMWxXhWeaisGeroZewiJdhRu8nC7aGvRjUtD9Co1AuUWA+02dDbI6bS5FumVi1rcL6+K3QBnsZHcAh8m/4HCAZJ2pkBlmUXQzM5BeuOHaXCdA5RAh77GCYJdgOnARwjG5zGUffaJXXkun6rmjNBIXHLj0gDJhtmYg28= X-Forefront-PRVS: 023495660C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(2950100002)(6916009)(42882006)(575784001)(5660300001)(92566002)(4720700003)(33646002)(48376002)(50226002)(6666003)(2906002)(5003940100001)(36756003)(8676002)(50466002)(81166006)(110136004)(38730400002)(4326008)(305945005)(2361001)(53936002)(2351001)(25786008)(6512007)(189998001)(54906002)(47776003)(6506006)(6486002)(66066001)(6116002)(3846002)(50986999)(76176999)(5009440100003)(42186005)(7736002)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2277; H:lio357.in.caveonetworks.com; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2277; 23:HHsYtfh8X1QWYq0Y02gB/sdAzOFkRuFdfcMQ81qPg?= =?us-ascii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 7:N5AZG/DSZkIhqhORvwI34/D7MnhsVX8DOaP0gmdwEb9vNTwV1nwOnhIMBeiqDLCZd/VA4DwigQTnN9yYVSFnk5URMhglq+9Ynzdy9/RatJo0xgAFIPgp+4DHkbxOl97GWANfObWOYqEC+fOlio6ZxH6clqEWT3wZzxg5Zest5ZdKfR6jAgdi+T3vwDSnglg/aRu1Rt6fT0hYhbRaeg//YOXhsDBaPBBItqXDyACestb37FD6xgk7+a8UYWVRqItYz9tryiyoAjDpPHAVB4GiVxO0wHfyiIl44o1fQrKORwXQfyR0mmBbMcRxi4k2dn0q3xUqQUfWdfi6mLE4jZLuxg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2017 11:40:09.5326 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2277 Subject: [dpdk-dev] [PATCH v2 43/46] net/liquidio: add API to stop device 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 11:40:14 -0000 Signed-off-by: Shijith Thotton Signed-off-by: Jerin Jacob Signed-off-by: Derek Chickles Signed-off-by: Venkat Koppula Signed-off-by: Srisivasubramanian S Signed-off-by: Mallesham Jatharakonda --- drivers/net/liquidio/lio_ethdev.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index 8459986..b0db8ea 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -1359,6 +1359,25 @@ struct rte_lio_xstats_name_off { return ret; } +/* Stop device and disable input/output functions */ +static void +lio_dev_stop(struct rte_eth_dev *eth_dev) +{ + struct lio_device *lio_dev = LIO_DEV(eth_dev); + + lio_dev_info(lio_dev, "Stopping port %d\n", eth_dev->data->port_id); + lio_dev->intf_open = 0; + rte_mb(); + + /* Cancel callback if still running. */ + rte_eal_alarm_cancel(lio_sync_link_state_check, eth_dev); + + lio_send_rx_ctrl_cmd(eth_dev, 0); + + /* Clear recorded link status */ + lio_dev->linfo.link.link_status64 = 0; +} + static int lio_dev_set_link_up(struct rte_eth_dev *eth_dev) { @@ -1656,6 +1675,7 @@ static int lio_dev_configure(struct rte_eth_dev *eth_dev) static const struct eth_dev_ops liovf_eth_dev_ops = { .dev_configure = lio_dev_configure, .dev_start = lio_dev_start, + .dev_stop = lio_dev_stop, .dev_set_link_up = lio_dev_set_link_up, .dev_set_link_down = lio_dev_set_link_down, .allmulticast_enable = lio_dev_allmulticast_enable, -- 1.8.3.1