From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from m15-61.126.com (m15-61.126.com [220.181.15.61]) by dpdk.org (Postfix) with ESMTP id C48564AAD for ; Tue, 15 Mar 2016 02:02:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=Date:From:Subject:MIME-Version:Message-ID; bh=7u2Uy BGpgX3Ij8ghGXfFX8UpkASGm6c3gUXRr8amgGU=; b=XEvagtb4qSJuv2ecTAyti /mdNsLh8sMzVdwKc4aFmRsJe4L0BKlCWUnXhLoYPe340P9PguERCvqTWOmiII4+K shlvBGXmrQXHKuyKG+DL81U7HCP58tMEX+gDhj41vRufODwwZenBSggAmlYdiK9t o1FWkzqaIf9who555I/rkg= Received: from zhangwqh$126.com ( [161.253.123.101, 54.215.2.217, 10.144.1.72] ) by ajax-webmail-wmsvr61 (Coremail) ; Tue, 15 Mar 2016 09:02:36 +0800 (CST) X-Originating-IP: [161.253.123.101, 54.215.2.217, 10.144.1.72] Date: Tue, 15 Mar 2016 09:02:36 +0800 (CST) From: =?GBK?B?1cXOsA==?= To: "Dhananjaya Eadala" Cc: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com, michael.qiu@intel.com, dev@dpdk.org X-Priority: 3 X-Mailer: Coremail Webmail Server Version SP_ntes V3.5 build 20160223(81157.8522) Copyright (c) 2002-2016 www.mailtech.cn 126com In-Reply-To: <56E75DF9.7020900@gmail.com> References: <1457921808-14261-1-git-send-email-edreddy@gmail.com> <6973f29e.6e8e.153736aae3b.Coremail.zhangwqh@126.com> <56E75DF9.7020900@gmail.com> X-CM-CTRLDATA: cmIinWZvb3Rlcl9odG09Mjc2ODI6NTY= MIME-Version: 1.0 Message-ID: <63a15ce2.10cc.15377cbc47b.Coremail.zhangwqh@126.com> X-Coremail-Locale: zh_CN X-CM-TRANSID: PcqowEAJd0UsX+dWfzw5AA--.1544W X-CM-SenderInfo: x2kd0wxztkqiyswou0bp/1tbiHAwt6Vagxuhq4wAAsF X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== Content-Type: text/plain; charset=GBK Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] hash: fix memcmp function pointer in multi-process environment 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 Mar 2016 01:02:44 -0000 VGhhbmtzIHNvIG11Y2ggZm9yIHlvdXIgcGF0Y2ghIFlvdXIgcGF0Y2ggZXhhY3RseSBzb2x2ZXMg bXkgYnVnLiA6KQoKCkF0IDIwMTYtMDMtMTUgMDg6NTc6MjksICJEaGFuYW5qYXlhIEVhZGFsYSIg PGVkcmVkZHlAZ21haWwuY29tPiB3cm90ZToKSGkKCkkgbG9va2VkIGF0IHlvdXIgaW5mbyBmcm9t IGdkYiBhbmQgc291cmNlIGNvZGUuCkZyb20gc291cmNlIGNvZGUsICBydGVfaGFzaF9sb29rdXBf d2l0aF9oYXNoIC8gX19ydGVfaGFzaF9sb29rdXBfd2l0aF9oYXNoKCkgZnVuY3Rpb24gZG9lc24n dCBpbnZva2UgcnRlX2hhc2hfcmVzZXQoKSBmdW5jdGlvbi4KSXQgbWF5IGJlIHBvc3NpYmxlIHRo YXQgcnRlX2hhc2hfY21wX2VxIGZ1bmN0aW9uIHBvaW50ZXIgZnJvbSBvbmUgcHJvY2VzcyBpcyBt YXRjaGluZyB0byBhZGRyZXNzIG9mIHJ0ZV9oYXNoX3Jlc2V0ICgpIGluIG90aGVyIHByb2Nlc3Mu CgpGb3IgcXVpY2sgdGVzdCwgeW91IGNhbiBkbyB0d28gdGhpbmdzLgoKMS4ganVzdCBhcHBseSB0 aGUgcGF0Y2ggSSBwcm92aWRlZCBhbmQgcmVjb21waWxlIHRoZSBkcGRrIHdpdGggYSAtRCB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2hhc2hfcGFyYW1zLm5hbWUgPSBzOwoKICAgICAgICBp cHY0X2hhc2hfcGFyYW1zLnNvY2tldF9pZCA9IHJ0ZV9zb2NrZXRfaWQoKTsKCiAgICAgICAgc25w cmludGYocywgc2l6ZW9mKHMpLCAib252bV9mdF8lZC0lIlBSSXU2NCwgcnRlX2xjb3JlX2lkKCks IHJ0ZV9nZXRfdHNjX2N5Y2xlcygpKTsKCiAgICAgICAgaGFzaCA9IHJ0ZV9oYXNoX2NyZWF0ZSgm aXB2NF9oYXNoX3BhcmFtcyk7CgogICAgICAgIGlmIChoYXNoID09IE5VTEwpIHsKCiAgICAgICAg ICAgICAgICByZXR1cm4gTlVMTDsKCiAgICAgICAgfQoKICAgICAgICBmdCA9IChzdHJ1Y3Qgb252 bV9mdCopcnRlX2NhbGxvYygidGFibGUiLCAxLCBzaXplb2Yoc3RydWN0IG9udm1fZnQpLCAwKTsK CiAgICAgICAgaWYgKGZ0ID09IE5VTEwpIHsKCiAgICAgICAgICAgICAgICBydGVfaGFzaF9mcmVl KGhhc2gpOwoKICAgICAgICAgICAgICAgIHJldHVybiBOVUxMOwoKICAgICAgICB9CgogICAgICAg IGZ0LT5oYXNoID0gaGFzaDsKCiAgICAgICAgZnQtPmNudCA9IGNudDsKCiAgICAgICAgZnQtPmVu dHJ5X3NpemUgPSBlbnRyeV9zaXplOwoKICAgICAgICAvKiBDcmVhdGUgZGF0YSBhcnJheSBmb3Ig c3RvcmluZyB2YWx1ZXMgKi8KCiAgICAgICAgZnQtPmRhdGEgPSBydGVfY2FsbG9jKCJlbnRyeSIs IGNudCwgZW50cnlfc2l6ZSwgMCk7CgogICAgICAgIGlmIChmdC0+ZGF0YSA9PSBOVUxMKSB7Cgog ICAgICAgICAgICAgICAgcnRlX2hhc2hfZnJlZShoYXNoKTsKCiAgICAgICAgICAgICAgICBydGVf ZnJlZShmdCk7CgogICAgICAgICAgICAgICAgcmV0dXJuIE5VTEw7CgogICAgICAgIH0KCiAgICAg ICAgcm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RFX0xJQl9NUF9OT19G VU5DX1BUUgo+KwkJCWlmIChtZW1jbXAoa2V5LCBrLT5rZXksIGgtPmtleV9sZW4pID09IDApIHsK PisjZWxzZQo+IAkJCWlmIChoLT5ydGVfaGFzaF9jbXBfZXEoa2V5LCBrLT5rZXksIGgtPmtleV9s ZW4pID09IDApIHsKPisjZW5kaWYKPiAJCQkJcmVtb3ZlX2VudHJ5KGgsIGJrdCwgaSk7Cj4gCj4g CQkJCS8qCj5AQCAtOTgwLDcgKzEwMDQsMTEgQEAgbG9va3VwX3N0YWdlMyh1bnNpZ25lZCBpZHgs IGNvbnN0IHN0cnVjdCBydGVfaGFzaF9rZXkgKmtleV9zbG90LCBjb25zdCB2b2lkICogY28KPiAJ dW5zaWduZWQgaGl0Owo+IAl1bnNpZ25lZCBrZXlfaWR4Owo+IAo+KyNpZmRlZiBSVEVfTElCX01Q X05PX0ZVTkNfUFRSCj4rCWhpdCA9ICFtZW1jbXAoa2V5X3Nsb3QtPmtleSwga2V5c1tpZHhdLCBo LT5rZXlfbGVuKTsKPisjZWxzZQo+IAloaXQgPSAhaC0+cnRlX2hhc2hfY21wX2VxKGtleV9zbG90 LT5rZXksIGtleXNbaWR4XSwgaC0+a2V5X2xlbik7Cj4rI2VuZGlmCj4gCWlmIChkYXRhICE9IE5V TEwpCj4gCQlkYXRhW2lkeF0gPSBrZXlfc2xvdC0+cGRhdGE7Cj4gCj4tLSAKPjIuNS4wCj4KCgoK CgogCgoKCgoKIAoKCg== >From helin.zhang@intel.com Tue Mar 15 02:26:46 2016 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 83D414AAD for ; Tue, 15 Mar 2016 02:26:45 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 14 Mar 2016 18:26:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,337,1455004800"; d="scan'208";a="933857174" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga002.jf.intel.com with ESMTP; 14 Mar 2016 18:26:24 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 14 Mar 2016 18:26:24 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 14 Mar 2016 18:26:23 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.132]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.18]) with mapi id 14.03.0248.002; Tue, 15 Mar 2016 09:26:21 +0800 From: "Zhang, Helin" To: Thomas Monjalon , "marcdevel@gmail.com" , "Richardson, Bruce" , "Doherty, Declan" , "Ananyev, Konstantin" , "Lu, Wenzhuo" , "Chen, Jing D" , "harish.patil@qlogic.com" , "rahul.lakkireddy@chelsio.com" , "johndale@cisco.com" , "vido@cesnet.cz" , "adrien.mazarguil@6wind.com" , "alejandro.lucero@netronome.com" CC: "dev@dpdk.org" Thread-Topic: [PATCH v10 1/8] ethdev: use constants for link state Thread-Index: AQHRfjx9VhAQtHaHTkCGK1E0N22tJ59ZtiHQ Date: Tue, 15 Mar 2016 01:26:21 +0000 Message-ID: References: <1456793151-1475-1-git-send-email-marcdevel@gmail.com> <1457992546-32230-1-git-send-email-thomas.monjalon@6wind.com> <1457992546-32230-2-git-send-email-thomas.monjalon@6wind.com> In-Reply-To: <1457992546-32230-2-git-send-email-thomas.monjalon@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZThkNjRjYTEtMTAwNS00ODYzLWFjOTItOTQxMDMyZTc0ZTc5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IklvWXJjRnlYNVhqeFFCRVZGSUh5a1NqbWsxc3JEaXVzYjNCVkdaNVM5ME09In0= x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v10 1/8] ethdev: use constants for link state 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 Mar 2016 01:26:46 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Tuesday, March 15, 2016 5:56 AM > To: marcdevel@gmail.com; Richardson, Bruce ; > Doherty, Declan ; Ananyev, Konstantin > ; Lu, Wenzhuo ; > Zhang, Helin ; Chen, Jing D ; > harish.patil@qlogic.com; rahul.lakkireddy@chelsio.com; johndale@cisco.com= ; > vido@cesnet.cz; adrien.mazarguil@6wind.com; > alejandro.lucero@netronome.com > Cc: dev@dpdk.org > Subject: [PATCH v10 1/8] ethdev: use constants for link state >=20 > Define and use ETH_LINK_UP and ETH_LINK_DOWN where appropriate. >=20 > Signed-off-by: Marc Sune > Signed-off-by: Thomas Monjalon > --- ................ > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.= h index > d867976..6704a82 100644 > --- a/lib/librte_ether/rte_ethdev.h > +++ b/lib/librte_ether/rte_ethdev.h > @@ -247,7 +247,7 @@ struct rte_eth_stats { struct rte_eth_link { > uint16_t link_speed; /**< ETH_LINK_SPEED_[10, 100, 1000, 10000] */ > uint16_t link_duplex; /**< ETH_LINK_[HALF_DUPLEX, FULL_DUPLEX] > */ > - uint8_t link_status : 1; /**< 1 -> link up, 0 -> link down */ > + uint8_t link_status : 1; /**< ETH_LINK_[DOWN/UP] */ > }__attribute__((aligned(8))); /**< aligned for atomic64 read/write *= / >=20 > #define ETH_LINK_SPEED_AUTONEG 0 /**< Auto-negotiate link > speed. */ > @@ -259,9 +259,12 @@ struct rte_eth_link { > #define ETH_LINK_SPEED_20G 20000 /**< 20 gigabits/second. */ > #define ETH_LINK_SPEED_40G 40000 /**< 40 gigabits/second. */ >=20 > +/* Utility constants */ > #define ETH_LINK_AUTONEG_DUPLEX 0 /**< Auto-negotiate duplex. > */ > #define ETH_LINK_HALF_DUPLEX 1 /**< Half-duplex connection. */ > #define ETH_LINK_FULL_DUPLEX 2 /**< Full-duplex connection. */ > +#define ETH_LINK_DOWN 0 /**< Link is down. */ > +#define ETH_LINK_UP 1 /**< Link is up. */ I was thinking if there is a link state of ETH_LINK_UNKOWN is needed? Sometimes, it cannot get the real link status from hardware. Any comments about this from others? /Helin >=20 > /** > * A structure used to configure the ring threshold registers of an RX/T= X > -- > 2.7.0