From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 00F4F28EE for ; Tue, 23 May 2017 09:26:10 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 May 2017 00:26:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,381,1491289200"; d="scan'208";a="90560533" Received: from kmsmsx155.gar.corp.intel.com ([172.21.73.106]) by orsmga004.jf.intel.com with ESMTP; 23 May 2017 00:26:01 -0700 Received: from pgsmsx106.gar.corp.intel.com ([169.254.9.228]) by KMSMSX155.gar.corp.intel.com ([169.254.15.30]) with mapi id 14.03.0319.002; Tue, 23 May 2017 15:24:05 +0800 From: "Dai, Wei" To: "Roger B. Melton" , Laurent Hardy , "dev@dpdk.org" CC: "Yigit, Ferruh" , "Zhang, Helin" , "Ananyev, Konstantin" , "olivier.matz@6wind.com" Thread-Topic: 2nd try: problem with ixgbe_dev_link_update() for multi-speed fiber [was] Re: [dpdk-dev] [PATCH v4] net/ixgbe: ensure link status is updated Thread-Index: AQHSv2eQ8cvohgjyJk+8QW/OlYl4rKH4HsSAgAg184CAAUYUYA== Date: Tue, 23 May 2017 07:24:04 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D650A80C16@PGSMSX106.gar.corp.intel.com> References: <49759EB36A64CF4892C1AFEC9231E8D650A662DC@PGSMSX101.gar.corp.intel.com> <1493305422-10611-1-git-send-email-laurent.hardy@6wind.com> <1160d98e-93a7-c14c-82a9-0944a2df6e5c@cisco.com> <3aa30d0c-bd00-af5c-f8fa-c081e86adadb@cisco.com> In-Reply-To: <3aa30d0c-bd00-af5c-f8fa-c081e86adadb@cisco.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODI2ODg1ZWMtZmQ4Ni00ZTY4LWI3OGMtYzMwMTc0MWVmNDk0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlJCVGJkdmZFbzVkejhnNFBBcnBqaXJVZ3VSaW5EekVCRVhjQUhFeSt1WnM9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] 2nd try: problem with ixgbe_dev_link_update() for multi-speed fiber [was] Re: [PATCH v4] net/ixgbe: ensure link status is updated 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, 23 May 2017 07:26:11 -0000 SGksIFJvZ2VyDQpTb3JyeSBmb3IgbGF0ZSByZXNwb25zZSBhcyB3ZSBhcmUgYnVzeSB3aXRoIG90 aGVyIGhpZ2hlciBwcmlvcml0eSB0YXNrLg0KaXhnYmVfc2V0dXBfbWFjX2xpbmtfbXVsdGlzcGVl ZF9maWJlciggKSBpbiBpeGdiZV9jb21tb24uYyBjYWxscyBpeGdiZV9zZXR1cF9tYWNfbGluaygg KSB3aGljaCBzb21lIGZ1bmN0aW9ucyBkZWZpbmVkIGluIGl4Z2JlL2Jhc2UgLg0KV291bGQgeW91 IHBsZWFzZSBnaXZlIHVzIG1vcmUgaW5mbyB0by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