From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0100.outbound.protection.outlook.com [157.56.112.100]) by dpdk.org (Postfix) with ESMTP id D7B439A8F for ; Fri, 8 Jan 2016 04:09:02 +0100 (CET) Received: from VI1PR02MB1151.eurprd02.prod.outlook.com (10.163.164.15) by VI1PR02MB1071.eurprd02.prod.outlook.com (10.163.163.143) with Microsoft SMTP Server (TLS) id 15.1.361.13; Fri, 8 Jan 2016 03:09:01 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=zlu@ezchip.com; Received: from zhigangTHINK (58.135.92.20) by VI1PR02MB1151.eurprd02.prod.outlook.com (10.163.164.15) with Microsoft SMTP Server (TLS) id 15.1.361.13; Fri, 8 Jan 2016 03:08:57 +0000 From: Tony Lu To: 'Liming Sun' , References: <1450193851-9100-1-git-send-email-lsun@ezchip.com> <1450193851-9100-4-git-send-email-lsun@ezchip.com> In-Reply-To: <1450193851-9100-4-git-send-email-lsun@ezchip.com> Date: Fri, 8 Jan 2016 11:08:35 +0800 Message-ID: <003401d149c1$ed3e3d90$c7bab8b0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdE3Tp4a8wot4QlNTnWF441JgLGIzAScy7fg Content-Language: zh-cn X-Originating-IP: [58.135.92.20] X-ClientProxiedBy: PS1PR06CA0026.apcprd06.prod.outlook.com (25.169.59.164) To VI1PR02MB1151.eurprd02.prod.outlook.com (25.163.164.15) X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB1151; 2:WjT1di3Ojli+OcZjJFLZJjSysmKV27/xw04dg96D81Wgami9qRZDI6AknKIAO5DbECJeSGKFxkOM1BWQUTD8HnhcCosjw0bUuQULOrHjdU0kSGyG2x5onW5fYRC8Up/OvxgLLXQfnxMgbSIwxqMhcw==; 3:oXpVtpqPRF2FYp2ncCHbLz86Ous0aWv4WIAOc60bs68B0p2OzqyhA75f3GmS3y2Fi0d9tRX8sFmcZ3CKMhbJmvAjbvvyCvcjpaqx6xNNzOvXIb5rK9SZ1VloORQojXRz; 25:dLx/q8B04DuXo6Da94PXV82keLQjG49CcOi7J0ewC0iWTFvQYDxPIfg5yinD1DS4jMbnXEB66wi7a6PxKZXZwzPgWTqOnkHNo8f01XBqM+/4rYozVYH7udrJWJ6zSVRnnVjI/l9Q25zNdz1CDuhtDeYT2MzmoYBwBsT8Z3/FO57qKe6oC9wNBxGsFuEdZEzZFItiYMlvlqv3ukrRP4kKZVQFRq2PtkqQOEasa2jEh+wNNtHO8Z0aWSu6UdGVd3fq; 20:u9iW8cnt9hVmY+p0YyUW5W60fXfSHiXmcAmEoPuvN2QyEdEF30vClKUpIu5RTOIVKZsauH72kBP7y+pXh9SMy0dI0av8YQfCFnaXk+lT8Cl4x6C9qSFpqSdvKtZSvbrz/Nl0hGIxj3B5ceMmRVFyU+ZMn8A8Y5+6sMyZVk5jfFs= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR02MB1151; X-MS-Office365-Filtering-Correlation-Id: 90733635-4c27-45d4-1ae7-08d317d90db2 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)(5005006)(8121501046)(10201501046)(3002001); SRVR:VI1PR02MB1151; BCL:0; PCL:0; RULEID:; SRVR:VI1PR02MB1151; X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB1151; 4:kHEHDb7jYKCvQ9Llfgoti7zfIwfelEXpjYa0rJMKS74D4bFDI6O3GT4o/wXz41MwkNlBW7PCUKdO1fZLFqKEICoQRYVfc9g7aoiAaXxP8jy+erEG1p3HDpwZjQhcRV1fmbV1tNd7/xmpyjUUIMfLJHxpfrFOTy8f3A5udClWkg4Usu2TWlp5xfCXWn60VdrkYBFdCcACS2lU5SK90UZb/Uat4X2ZrtXQ3kwnUBABDdYX7csvWBoyoLr5oBR7ZMRPtjns8nYrIOiTOeWSV9RxLeg92AaA3+5CTIQxwynQhhGGffEU+ar52O/e/4RWCTproexglB2U5qB/f6RWJZJo0GRYbf9FCoYTYqVQ0FhCEZctlDAgT4b0sQA4CMR6/GyRMj9hS/h0Jq7QrPHo62OG+0u1zJkk13zEVaMuTRzKS+U= X-Forefront-PRVS: 0815F8251E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(13464003)(189002)(377454003)(199003)(33716001)(59696002)(46406003)(189998001)(5004730100002)(1420700001)(50226001)(230700001)(19580395003)(97756001)(50466002)(19580405001)(23726003)(586003)(2906002)(96836002)(102836003)(6116002)(5008740100001)(101416001)(1096002)(3846002)(33646002)(122386002)(5001770100001)(5001960100002)(50986999)(107886002)(77096005)(40100003)(47776003)(84116002)(76176999)(87976001)(66066001)(42186005)(61296003)(86362001)(97736004)(2950100001)(92566002)(105586002)(14726001)(106356001)(450100001)(81156007); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR02MB1151; H:zhigangTHINK; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: ezchip.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR02MB1151; 23:Vwp+UKnUXSg5pcBAQ1tQJSg+7uO8rKGHFmZIdmLu8?= =?us-ascii?Q?ChPLQu7X7st2RATW/fJOh4LD1j4ECO32K+fKt3UOie1n18jxHdIxTafeIJ5x?= =?us-ascii?Q?lYQtToigjah0bg605Jrpo3DJ5S6XwtPJJaTxcV/aG+pubT6CAAG7a8ZqMraM?= =?us-ascii?Q?MlrHBaUs8OEFZsW7vh6jvrxkpVHh/0gWE2JXTotpj+a16xyx4VYE+OVX2fJc?= =?us-ascii?Q?oFf4wvjsyXqfskIoJ8e6gwuLCm/v61abgt5DqLLSUUAJ0XnTtb/0N6gAZCk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mopCEH2MrzluXFDxY1Q44sAa5Yjl5pOVn?= =?us-ascii?Q?Fl4d2l+yzNQRnr0lAPzwcHYzOE/gIlE/+8SphandyCsM5kS/xaCD462kabyC?= =?us-ascii?Q?FK3WUlNeLNhJuiwY3ls//hDj0ztRQuIy7rbR+E3kTvwUc4j4deMDmV+H4lE3?= =?us-ascii?Q?apcOeXG9FfBH/rtdWlX/04=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB1151; 5:3dWLWQz4DD8PVPqwjO3t7gqoL+PlRckO547qFmsSe3YJrEMPWHG/D7afnWgXfxeQRcHPmtJ8kDdC2Reo5aONf7NBWy9MRlNBa8RbWQiOnEgqMzVwg5lxdkEQTF1FxJ+Xt/RaGnCwWb/rdF3xYreWLg==; 24:w+I1xsmeintpyrJjCOVUF6hobj379/O2X/fbT0KatHfiIZ4ckK++QzRfudiVKSWWobo5E59SRJfzUwKFGept7QmSoYWinMofrC7gdYu4nVE= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2016 03:08:57.7145 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR02MB1151 X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB1071; 2:e2QZpN5o+sKc1YwWYhi5pgmji1e3KoX2Hv7aT6Qk1BpELzBhyqPoIVA3kdPbnhhnTlA+r4pDCNsYtBcSMpAXdB7L1iVeiy9ZaSrWR6vIkXzNlLJgxdS+oiWWScv80oGo8uny713ghRmtjdSU7ol/0g==; 23:vkRWwEYunEcy3yk+ak/8ZOrGtGpcIO6YX76koxWQpSQxgHxhprrBToIix78TLoc5gQrLn97H7DiSgvLT+4XC8xKRaZwlbFYysdLVfVRS9pmU1V8V8nNHJOrAjSJys7czCPpjeeHfzUq1yet+RqPVNLdegDrO5/fK9h3+hmF2tnYl8IGI4dbbd8rXg/5et2KC X-OriginatorOrg: ezchip.com Subject: Re: [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: Fri, 08 Jan 2016 03:09:03 -0000 >-----Original Message----- >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Liming Sun >Sent: Tuesday, December 15, 2015 11:38 PM >To: dev@dpdk.org >Subject: [dpdk-dev] [PATCH 3/3] driver/net/mpipe: fix a mpipe link initialization >ordering issue > >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 Acked-by: Zhigang Lu