From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0057.outbound.protection.outlook.com [157.56.112.57]) by dpdk.org (Postfix) with ESMTP id 56FAC8D97 for ; Tue, 15 Dec 2015 16:37:53 +0100 (CET) Received: from HE1PR02MB1017.eurprd02.prod.outlook.com (10.163.172.147) by HE1PR02MB0732.eurprd02.prod.outlook.com (10.161.114.21) with Microsoft SMTP Server (TLS) id 15.1.355.16; Tue, 15 Dec 2015 15:37:52 +0000 Received: from HE1PR02CA0072.eurprd02.prod.outlook.com (10.163.170.40) by HE1PR02MB1017.eurprd02.prod.outlook.com (10.163.172.147) with Microsoft SMTP Server (TLS) id 15.1.355.16; Tue, 15 Dec 2015 15:37:49 +0000 Received: from DB3FFO11FD051.protection.gbl (2a01:111:f400:7e04::170) by HE1PR02CA0072.outlook.office365.com (2a01:111:e400:5350::40) with Microsoft SMTP Server (TLS) id 15.1.355.16 via Frontend Transport; Tue, 15 Dec 2015 15:37:48 +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-43.internal.tilera.com; Received: from lab-43.internal.tilera.com (12.216.194.146) by DB3FFO11FD051.mail.protection.outlook.com (10.47.217.82) with Microsoft SMTP Server (TLS) id 15.1.346.13 via Frontend Transport; Tue, 15 Dec 2015 15:37:48 +0000 Received: (from lsun@localhost) by lab-43.internal.tilera.com (8.14.4/8.14.4/Submit) id tBFFblGv009244; Tue, 15 Dec 2015 10:37:47 -0500 From: Liming Sun To: Date: Tue, 15 Dec 2015 10:37:31 -0500 Message-ID: <1450193851-9100-4-git-send-email-lsun@ezchip.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1450193851-9100-1-git-send-email-lsun@ezchip.com> References: <1450193851-9100-1-git-send-email-lsun@ezchip.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; DB3FFO11FD051; 1:IvEfdUbilEXvEFfz/nKoipZIJqTip2Jqjwt9cwPWz89liNv84YAVP3ePUQD8/FLH3pBWJ2Hv+0juMo+mBW5dDvpMCudOLuvzaIttVxc3t7gzVFalYfGve1CxSq2/E5KwkXTmcS+8Wt7PNVA7OVb7joywSRiS8Ck/GZayEqb7qnfL43dX+zQ5fbyMAioDmVOUK1KKB1WvjXxAILpnLvV21mhheCyRKggP9y53XrDXtr0lPkfJyi+R4JdnOMZVfR/FAqBWNNC75I4W5bb8+3pJ0UMxt2yf69b62KLqjhjifJli1JdFjTGMakJd496PWcAeB4C46H7CvqCJXVynDJC4MggDp/nu6zwsfdifgJKYIqae7694vZMUCC9ipNWxD94K5pdZOVISfn7gOR7mx5XD010rpDVtiDtukk6pBz3u2IE= X-Forefront-Antispam-Report: CIP:12.216.194.146; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(6806005)(229853001)(50226001)(4001430100002)(106466001)(5008740100001)(36756003)(450100001)(5001970100001)(86362001)(107886002)(2351001)(33646002)(110136002)(2950100001)(105606002)(42186005)(47776003)(104016004)(92566002)(1096002)(19580405001)(48376002)(50466002)(5003940100001)(586003)(1220700001)(50986999)(76176999)(189998001)(11100500001)(85426001)(19580395003)(87936001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR02MB1017; H:lab-43.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; HE1PR02MB1017; 2:nocUno3cYX0IwasgpO4Ts2Ua7qfjzstEsT1tIBdziAIBUlYk2hwBOROErkzvsaM7AhbIbcX1lOo7cBfUceAnmeD6gNTJAw7nTcSEritJHrD1meRO1FyK5FURiDKN5U879TXJy61aivvty0CxPufiPA==; 3:7+Q9GEWIOreKRhl4/KSvFGqSv0Sxtpdm7ta3Nt3DxFgRu9vnb+NlpOGSEq37ePxH+10QAHe0b/e+yF9RYXM2FQ3xRNQRSrDKmnj3WXsrzyHjq6WSpK0KCglnbP9SXOqimlKYepNBHQvTN30LtE+nB+1mLDdomiKug7cizRFOA7rRjmwshN/eVuaguiHbOPyIt2J8wpm5Iz9bLHqSc1wlLdCz41L4lhfGsXaWbLQPKoI=; 25:6ZJErzwqSt46JUMFGj493ltMUAcL0yE3NJwgfKzvRVHwEuf6E5iIofAyZEOuzYn4jTMrQm9UdbdLFwmmR9GdvxKwqq9zWH66ZyXZHPGbvTYWJ3hFek2fGOWeTfB0t9Blpyd27FrcDs7jnYTsRuPfuqqeLEyt4QjZRPC4MQYyZ1UQx57wu4IZ9FqOhTIcSXUpxpGYcIAqOXakX9dJ1SvI0+NaD3pvLzaIpdPHDqA8wu1+9uOnRPSI6BHyZCNT1lZO; 20:cw8lfxuu0e9eAYGXVQLNyvdYI/dk8L4DtJ664OhKsmCDIsikR1lDgXDl8w6RJsOnnglxG2Ir869x1JdOKzgruuLPldzYPh80+Wq5ljGoMejOrwrullNxCRy4aJakbFR1vdQvEeTZkzTxZeMsQDIQeyk9Dt3Tr9LL5Ms9WuZrxLc= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR02MB1017; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(121898900299872); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(3002001)(10201501046); SRVR:HE1PR02MB1017; BCL:0; PCL:0; RULEID:; SRVR:HE1PR02MB1017; X-Microsoft-Exchange-Diagnostics: 1; HE1PR02MB1017; 4:uSPK69pKsvVSFNckpElnPHTtqRveXKJ5uIWwdgdP+9nOew46BU+FSfyf2X2DoB75YnbTv7q2dInI9HNkDxu9wp2+zxb2h716434rCbF0WTCw4xqOn4AOJTKFX5UCVxFegD1w5rCdyzIEp1DA8xhm2Kx/7mN4vhwgOIy0ZMt3gpte735hJCYgBnK1Rr9bl9eqs8HJnUgJNhdyqGytWspEgN12ISud/FwU8vjBFmixX8z4dFQ+OGOorJwS/s7XP2wbbI5xvAEYvPl1999wq3inUMdo4HL+71/BgvdZPD7PpEaSpSsdX233xzrnhUiqm4UYVtBvLALCBhSFh2nRj8oT2MDHdUg0mB3oaMqLnKUjL9xszYqTzgxBvD59AEdjO4ideJKmpYnLqi0OTxktVlWnIEHZTE32ANI8swJV8LPh6vQ= X-Forefront-PRVS: 07915F544A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR02MB1017; 23:PMtuACfnY/VzEDTFyINc6gDFtmbC7B69pCvJCqoNW?= =?us-ascii?Q?2iq/LVnsGmWWBesRFHhLlwJ3OLplZAgaWew9AIDMnYMQQphjOBLEm4JCznEM?= =?us-ascii?Q?ladX0xk+MN49ftJZp8IlvwZRH6TJm8BUbe65h27EZPS91EYjbdNijrOcenoV?= =?us-ascii?Q?oWxg01ijYcmG8Ww9kvQ2Mk/WUG1xxNmEEe9Y1FV5V/pHa/KiAU/xZ5oZHSNS?= =?us-ascii?Q?lcgdQapk5naHQhV8iI5l4/CDuXLnh4uLIdICDrtytj3Cjl1AL0EYK2PUMVwp?= =?us-ascii?Q?GXvjUPaSMsN4pepwYar03TZ6zk4o/6dhHp9oFwxq4BhjQ5zyoWdMoypsNgpz?= =?us-ascii?Q?JYYFPsyC5JHOYre6DDz6owDeQ0iw0IIXH/6GL+hkQX/hSU7bcRHLbJJrkbdh?= =?us-ascii?Q?q2vlayCx3DypZKvgvK404fp6FNpWqyYc9aAbArtjtPnTbYMlmzHviuj9LODC?= =?us-ascii?Q?z5/i1ISyn9iIzaN6qR025f10tWXwBK7IfW28SbsfF/zmItxdG4FcBdvw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oUhOqbLcfAiNbkSNOtgSl7z6snfDy9H5yYCezifnIVsVfuJrebztY2ykZaoRa5q7POUEI0QhEs= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2015 15:37:48.1464 (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-43.internal.tilera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR02MB1017 X-Microsoft-Exchange-Diagnostics: 1; HE1PR02MB0732; 2:rVM5ey114cDzWS0Hd/+1oUOkPTwefkwrIuTBMmZuTjDqWjYYw0wNNqydbr7vk/Ck+5OVXlSnCyKWWZS18z7Ji0huJ1M+EHeaj8ViTcWSHH33bLxBd3AbcjrJ7nbQzKHXpjP2NF08L+GkG1LLPmrNeg==; 23:1McXrln5aoDIbopc6lJdSNrd7oiG+fpPIuKhIMXteh7frp9JuNtDhfGoKSi8DDVDwzL2L2n05LcZ9BX+hwacOiTGMD0Ipw/q7U759F2539Q0tvZveJB+YRdiRgBVtxzt+aGyQITm1P2g/fvjvY4uyjhQkAkFbl36p1LHp/ApMrqM0zARZfCvi4C00FUssfCg X-OriginatorOrg: ezchip.com Subject: [dpdk-dev] [PATCH 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: Tue, 15 Dec 2015 15:37:53 -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 --- drivers/net/mpipe/mpipe_tilegx.c | 14 +++++++------- 1 files 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.7.1