From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0055.outbound.protection.outlook.com [104.47.1.55]) by dpdk.org (Postfix) with ESMTP id 6E4728E9E for ; Fri, 8 Jan 2016 15:30:52 +0100 (CET) Received: from HE1PR02CA0010.eurprd02.prod.outlook.com (2a01:111:e400:5149::20) by AM3PR02MB1137.eurprd02.prod.outlook.com (2a01:111:e400:c406::11) with Microsoft SMTP Server (TLS) id 15.1.365.19; Fri, 8 Jan 2016 14:30:50 +0000 Received: from DB3FFO11FD019.protection.gbl (2a01:111:f400:7e04::104) by HE1PR02CA0010.outlook.office365.com (2a01:111:e400:5149::20) with Microsoft SMTP Server (TLS) id 15.1.365.18 via Frontend Transport; Fri, 8 Jan 2016 14:30:50 +0000 Authentication-Results: spf=fail (sender IP is 12.216.194.146) smtp.mailfrom=ezchip.com; ezchip.com; dkim=none (message not signed) header.d=none;ezchip.com; dmarc=none action=none header.from=ezchip.com; Received-SPF: Fail (protection.outlook.com: domain of ezchip.com does not designate 12.216.194.146 as permitted sender) receiver=protection.outlook.com; client-ip=12.216.194.146; helo=lab-14.internal.tilera.com; Received: from lab-14.internal.tilera.com (12.216.194.146) by DB3FFO11FD019.mail.protection.outlook.com (10.47.217.50) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Fri, 8 Jan 2016 14:30:48 +0000 Received: (from lsun@localhost) by lab-14.internal.tilera.com (8.14.7/8.14.7/Submit) id u08EUl22021682; Fri, 8 Jan 2016 09:30:47 -0500 From: Liming Sun To: Date: Fri, 8 Jan 2016 09:30:38 -0500 Message-ID: <1452263438-21634-3-git-send-email-lsun@ezchip.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1452263438-21634-1-git-send-email-lsun@ezchip.com> References: <1450193851-9100-4-git-send-email-lsun@ezchip.com> <1452263438-21634-1-git-send-email-lsun@ezchip.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; DB3FFO11FD019; 1:toR3Dv9S1wC+oxGQ8APd4gU+NFIdrA3ZWqCLVfGLV1BQ3REbe3dT+nzVQKeWp8HVslEc4QaD0kXl9vYp8JEXMflX+GRVcEZ3+cVLvLZK3kHhPoQCCV/EgOASIFECJGkxHu40MyR3X8ZSH7Z87mmga32REAkTd4nLsoTLAOzT1pbpObCEJkiQfG7r0yv1mKhjwhVGZjgYeWwWt4WRgNWOBLtjUJAe4ngE51lgYu19NlMWTRzGZftqtJqlPIndvE7lWmkA44VFV80aNOrN56kSi1VSPneex/8UT9R2fcHDONkgY3skIP8pQwaXdbyBLg9MP5coYoprxZHgB/smFkGxDp3E1XLj3uqzYp5ICmgQSxG1XKNUocGiMnwdvZBridwaKP9cSEaGQR/HkNzWK6BAWg== X-Forefront-Antispam-Report: CIP:12.216.194.146; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(19580405001)(87936001)(105606002)(110136002)(5001970100001)(36756003)(4001430100002)(189998001)(586003)(1220700001)(107886002)(33646002)(2950100001)(50226001)(106466001)(229853001)(2351001)(11100500001)(42186005)(86362001)(5003940100001)(450100001)(2906002)(85426001)(76176999)(1096002)(47776003)(48376002)(5008740100001)(6806005)(50986999)(104016004)(92566002)(4326007)(50466002)(19580395003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM3PR02MB1137; H:lab-14.internal.tilera.com; FPR:; SPF:Fail; PTR:wb-fw1.tilera.com; MX:1; A:1; LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1; AM3PR02MB1137; 2:bw79s8rX9oBisQYdbkPZZD9Pto848iMk8GOu2HuFt0mXLRUd4ytaWBtYOJb1Klx1NPqaL2huHWKoQokblLn+28CwghKwpih64hB8eMmZ9mf3RbCtt6FYehOqm+/NkqWB7aY5LQEdjT40rloiWeiOtQ==; 3:If8h5vcom2+cFR3/gXBMToLr4CJDNznB6lxit2b3KA/WDC57XmrDBlp3KVJf5jJmyDphpg0mtVttahYsk58CLI3/5DIqGHMb39s2gStTBTDsEKkZigzq1FBhXPMegMrYJHIISuBOMoZK0FTf/f0Ihw6XWtuP1nevpWEiPrWypezoQYebhofqQYJlbqSZlF63Qt6qsh1S0swYh8z3GyPiFNdFaOXcL+D+IS71yQrLxrA=; 25:D0HTe84YaWx1WfliIA3XMyottSKf9+xoPsySXvzdsybyVhJMfxR0iKV3ujMA6FjVSLqhPc+QHWptleKkd0Q10lymG8CMW39evG1cOjf9t9gjcH4wtVDb1fJ7dcYUAhi0XFs4rBM5/ZkYMMES+iS4XsXU5Shrc6jNr4NBjkur63IwhWxM8VrvNqWhwdD4k05vpeAlPmpI8Jn4f1BzV8Jph9laFccq8fOeh9mMpqgBEry/RLXKEeOAMrwsn/Hx4Huq; 20:4iplQwFi3ke8+L7SrggPTWZGlPWFjv14fLJZu5pnpyyrMaZdcpvai5Qn0//ZKENzIihmtY9xcnwLcjlHGYdjcpAuSDpMU4uJBk6TmuL4emmF10xNxXi4V0EjujN4s2ULxPINRdiUEl2ZFy+WuAmJgfNhHwm1gVctgBKBiK7cYKU= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM3PR02MB1137; X-MS-Office365-Filtering-Correlation-Id: 0c6db059-0197-446b-6459-08d318384e0d X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(121898900299872); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13015025)(13017025)(5005006)(13018025)(8121501046)(520078)(10201501046)(3002001); SRVR:AM3PR02MB1137; BCL:0; PCL:0; RULEID:; SRVR:AM3PR02MB1137; X-Microsoft-Exchange-Diagnostics: 1; AM3PR02MB1137; 4:3ZXeKjlcPCU+jxRw+MIB+MpTLCuB6Mz+BAXBqlJhQyGiR4U9SZ9Is22Dw1R+OXO1LJmUTq1B92KBFnnoVdxCDTKunenLFJsoSz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lopnxnN5VE3WfFNgiTTiy5ucW0VQVGumapO4+o= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2016 14:30:48.9867 (UTC) X-MS-Exchange-CrossTenant-Id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0fc16e0a-3cd3-4092-8b2f-0a42cff122c3; Ip=[12.216.194.146]; Helo=[lab-14.internal.tilera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR02MB1137 Subject: [dpdk-dev] [PATCH v2 3/3] driver/net/mpipe: fix a mpipe link initialization ordering issue 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: Fri, 08 Jan 2016 14:30:52 -0000 Mpipe link structure is initialized in function mpipe_link_init(). Currently it's only called from the eth_dev_ops.dev_start, which caused crashes when link mgmt APIs (like promiscuous_enable) was called before eth_dev_ops.dev_start(). This submit fixed it by calling mpipe_link_init() in rte_pmd_mpipe_devinit(). Signed-off-by: Liming Sun Acked-by: Zhigang Lu --- drivers/net/mpipe/mpipe_tilegx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/mpipe/mpipe_tilegx.c b/drivers/net/mpipe/mpipe_tilegx.c index be7b6f2..5845511 100644 --- a/drivers/net/mpipe/mpipe_tilegx.c +++ b/drivers/net/mpipe/mpipe_tilegx.c @@ -752,13 +752,6 @@ mpipe_init(struct mpipe_dev_priv *priv) if (priv->initialized) return 0; - rc = mpipe_link_init(priv); - if (rc < 0) { - RTE_LOG(ERR, PMD, "%s: Failed to init link.\n", - mpipe_name(priv)); - return rc; - } - rc = mpipe_recv_init(priv); if (rc < 0) { RTE_LOG(ERR, PMD, "%s: Failed to init rx.\n", @@ -1633,6 +1626,13 @@ rte_pmd_mpipe_devinit(const char *ifname, eth_dev->rx_pkt_burst = &mpipe_recv_pkts; eth_dev->tx_pkt_burst = &mpipe_xmit_pkts; + rc = mpipe_link_init(priv); + if (rc < 0) { + RTE_LOG(ERR, PMD, "%s: Failed to init link.\n", + mpipe_name(priv)); + return rc; + } + return 0; } -- 1.8.3.1