From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0083.outbound.protection.outlook.com [104.47.32.83]) by dpdk.org (Postfix) with ESMTP id 0B89FF956 for ; Tue, 21 Feb 2017 10:30:32 +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=GdskS0o2TiobD99tBG7tr5GzO5eh+blhIV5bmogH9K4=; b=fQiimloxHysyOlx+2QxgIRGKieIqAtHuZtxfKfSJRMgvMmrxsLQRYIHUnKMMz4xmao29xbLAgZBiLMuP3PhqoxIapyT2QIkDZ1hjzqItV0QptnB8X39u7IKvv7NKFL50UWxGNGaxlMy3MXbNBibv0vd3kFWgVeoJKgrnJ4I3I4s= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Shijith.Thotton@cavium.com; Received: from lio357.in.caveonetworks.com (14.140.2.178) by SN1PR07MB2285.namprd07.prod.outlook.com (10.164.47.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.13; Tue, 21 Feb 2017 09:30:29 +0000 From: Shijith Thotton To: dev@dpdk.org Cc: Jerin Jacob , Derek Chickles , Venkat Koppula , Mallesham Jatharakonda Date: Tue, 21 Feb 2017 14:57:02 +0530 Message-Id: <1487669225-30091-48-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1487669225-30091-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1487669225-30091-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: MA1PR01CA0089.INDPRD01.PROD.OUTLOOK.COM (10.174.56.29) To SN1PR07MB2285.namprd07.prod.outlook.com (10.164.47.155) X-MS-Office365-Filtering-Correlation-Id: 333cfcbd-caa4-4236-ff38-08d45a3c47bc X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:SN1PR07MB2285; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 3:MTuJid6I5v05sKSYyTkzwuyTAYuKkJLRjvaW21GktTv81USNh86Ggnn8OPd8zet698K9HUZU8LlbYU8hBISYyOXjWZL04w+52v9WBnnzUQdOr5YDRI+qqRNyaAmboxhDxq03aht5G8aPAnBgffUdqV68g5wbQMmQxLtsmtOHgPAXduqJbfFli1yExZr+hbZOiSqNW9XDMizZZ84imUue3Xfq6rBWR7NETU6MpzaS9Yq6FTe+boOsYWie44DiVYnWVEbv8EfnHY/jnKhoh6pKcA==; 25:GKkSaC31drZ0d1+KyxAvbnw97y85u/PP6HI/woncDyd4+yh/D/+6eDG8X5TxFB+Ccf3PynNZXCzmHNG/kXUVtEKMj3b/8FSjzGiN0Yx3QTCg3m+GYxWS6A1R/BlgzD9Q3FuPVJ9QZpV5YFAAZd38xvuLLvIw9o3zS6YTMS2JqLJs4sTlKcAG2C5K3kVOx+XUW3idqa/JTufUU0ffVgUtO3eRKX1544fenc8hVl2ipqiY/AxStf5Dp849pIyX2BxfDoqMbS/s6TmrT/sfVTkvnYlYRPZEoUSnEgaDYr0RdNw2oVhpWhrcSAr/rS056IjHB8m3sof4ue2X5tkIeevxfDS/OMHfcXSZyxIfaTLAAQ91aU5vScSxQjIDr/cbJB5wMGj02wG/uSnJnJkwAi5CwLS7S08WJRlUDmVrsscZ5Epi8IiUYqFpPH+gLWubBsOqX22QoBHYzWKaFPaiswPxAg== X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 31:MdOQ+UNE/3pF/U3/T+vcKCZKn+PgMrPVmwT5GohpvVTs+9Q86EQC3p/QcT0ObW39oP/2NBweeUqlD0QpDGJSWBoN4XIDNUfjll1Pca11aQqmmWfjZYGYXSalfQ8h+GAgOTQJMDAlqSMVR8tSnA/HCbxvv0V/4J3iPWsPLwdGxQHTSCETqjel+OyYEvEY4sR9fsDwnG2H0XLWpo7V70Ky5lbQ8rWoZD/uFuHIugE1LWs=; 20:11vp89NLHN2iqGXGdAa1w1BETYypVDTzDO01xoFV9qMyJMNt7jQx1y86uTACsbMell3BhQIe1QbYEisFMXVsEhqgU0+TBTc1fFO+dvDcn78HZC+evfFRl62tWtJmkRUOtwhsHtlalWDxXdhCi6Cl3MVprrs61lueqCO7LAlWLo2E5TjWASQR1rN0dGJ7OmKblgYuVJ6Zub/Um6vgOlwbhxW4yDO25ZdYZECc29yC7JKaz4FOx6pYTGsbMObqbCn99DAT0bFjZSMa1p7qyr3C8Qkyyj+3oR3SxcunlQ+qFp/Jt+cTx0SNqmc6IALTCO9p31zDXiY10qTF/zeoDk/60MYAw9OK1jMRqzn2qlwVEAED3pdWuoq2cMukpUn2CYBpzetODDaG9qRXxtWlh9+bilnFy+ovdHl2Ek1Tmeau9viDkuaOA3Uv4FzyIvexdOltrN4/5irwBfk1A4W/zmMTtTyqWG/JfWE/QxQjE3pQBgZ0JGrkyxEVRlmOoR3WOvOkqGqSZ428YycBu/ZhwLyj3+DM2N3wKYzjp/xJ7PfXAvwA0hH8zm93sV/yH1HMB2Gt0019nDMY5XUTRsbMfBuN5InpzvaIeR48wgfNTxMoPvw= 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)(3002001)(10201501046)(6041248)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(20161123558025)(6072148); SRVR:SN1PR07MB2285; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2285; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 4:ohHqhh1wfkpE5xNC3XMzcVS1PkZU+p9/7L3SKkqw8tyXuse0AU+zAltxwpob+yFmBhSxVGVEeQk/uZZT0gQt9IQme1kuyruUVwG/BH/YN3nC3Lrk4Ts6/Ewv5ASQ1wflzLVzb30AfWyfKDotuxj7lq+wTo0OohqpyyGUxYkwBQVIivmlA1SEezqdVyMkM0ssdo9XtP0eb94A9+E/KV2zoKjsczGs5WAkdmQr/kdXbV2g2wnhYWKuZe1PvH6+ac8z4qW429q9aXdtSiEf3esbGEkFnt21IVPBSLwRxDr0ZV9038Xx8sYtO9i5NJnMovdsEV2HHA1GXHUrrCCP3tJwCDeTeD+Cg2xkynPZiknCcYwX0Ngtz0yKkZm5jAS6953ysYidUqbyeznCkJ0eEWITuAotzsIUpDRX5csyZFqYgqfZfgZ2PzUvgk3UL30Mv8ZsFHttFeIxLni3jLqUKmOM58RH4YkkJIcOKKPqbX6dOUI7PGv/s2X5d/nBRe/DeBgMpAb2wUP4YZ09xzDvkIHU7HrATFeUsuRCAbVVrhqwgxxamYaL8zjKrtRA3uactbkO8vSIj8S/Mr4BlDg9zV5MKXeA3MxNwTaoSV7cA4yEq1A= X-Forefront-PRVS: 0225B0D5BC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(39410400002)(39830400002)(189002)(199003)(50226002)(81166006)(42186005)(2361001)(101416001)(81156014)(305945005)(3846002)(6116002)(5009440100003)(8676002)(105586002)(7736002)(53936002)(36756003)(110136004)(106356001)(6506006)(25786008)(38730400002)(2351001)(92566002)(48376002)(6486002)(97736004)(50466002)(5003940100001)(189998001)(68736007)(2906002)(4326007)(33646002)(76176999)(54906002)(5660300001)(6666003)(6916009)(50986999)(2950100002)(6512007)(4720700003)(42882006)(66066001)(47776003)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2285; H:lio357.in.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB2285; 23:DxM4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9SSnYbuqFQhBK36TNmH8tCT8EPkj4UNTOvm+avgtI/1Zl/UYz6+bAkz6mB+8Y+Q==; 24:+s/KeR3kGiJ0ZHnW5FnIGSNFP8/Z2Rmb15AowywsC9zAGTXFi0VR+j1mAE4dpKLmDY8d4xRcbRsmil4g4cLweLRbrOTxgD0yjHM+LptrDBw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 7:wvU9JaWWO/Cxws2B8kWMxWGKxWzr6rUJOBOiYT8bB3+i3wUJnFr9j17uSxuuhk88SLiaXC6tpqhoNig2OS/HlBwOR+CnzME8Q+OFACALEeVvX5CGsFwYvcJhv5krANrKDRPlhvhhfMSb/X8UvyvwdZIXN4mqqO7q2/0vaYaFYlrkReBu737zEBoXbDsPTT1kOyvo2moI0EAjaA7A2vfxs/18leQ7ccHft2ZXQjzMEpFlthXwveLbIcfhrcvwMKnkzpuSeN/Irh8sqLIO6S6zVM71PZWQYd/yNOn8lDk4uQ5cV91i7q9Mpojq3TdAc5UTaiOk1QYOAHGuK35PKJjFCw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2017 09:30:29.4969 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2285 Subject: [dpdk-dev] [PATCH 47/50] net/liquidio: add API for dev stop 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: Tue, 21 Feb 2017 09:30:33 -0000 Signed-off-by: Shijith Thotton Signed-off-by: Jerin Jacob Signed-off-by: Derek Chickles Signed-off-by: Venkat Koppula 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 17448fe..d28ded8 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -1360,6 +1360,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) { @@ -1657,6 +1676,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