From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id BC8BA2B83 for ; Fri, 24 Nov 2017 12:23:59 +0100 (CET) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Nov 2017 03:23:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,447,1505804400"; d="scan'208";a="179627892" Received: from silpixa00398162.ir.intel.com (HELO silpixa00398162.ger.corp.intel.com) ([10.237.223.171]) by fmsmga005.fm.intel.com with ESMTP; 24 Nov 2017 03:23:56 -0800 From: liang.j.ma@intel.com To: jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, harry.van.haaren@intel.com, bruce.richardson@intel.com, deepak.k.jain@intel.com, john.geary@intel.com Date: Fri, 24 Nov 2017 11:23:46 +0000 Message-Id: <1511522632-139652-2-git-send-email-liang.j.ma@intel.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1511522632-139652-1-git-send-email-liang.j.ma@intel.com> References: <1511522632-139652-1-git-send-email-liang.j.ma@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Subject: [dpdk-dev] [PATCH 1/7] event/opdl: add the opdl ring infrastructure library 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: Fri, 24 Nov 2017 11:24:00 -0000 RnJvbTogTGlhbmcgTWEgPGxpYW5nLmoubWFAaW50ZWwuY29tPgoKT1BETCByaW5nIGlzIHRoZSBj b3JlIGluZnJhc3RydWN0dXJlIG9mIE9QREwgUE1ELiBPUERMIHJpbmcgbGlicmFyeQpwcm92aWRl IHRoZSBjb3JlIGRhdGEgc3RydWN0dXJlIGFuZCBjb3JlIGhlbHB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DsKKworCW1vdmVfaGVhZF9hdG9taWNhbGx5KHMsICZudW1fZW50cmllcywgJm9sZF9oZWFk LCBibG9jaywgZmFsc2UpOworCWlmIChudW1fZW50cmllcyA9PSAwKQorCQlyZXR1cm4gMDsKKwor CWNvcHlfZW50cmllc19pbih0LCBvbGRfaGVhZCwgZW50cmllcywgbnVtX2VudHJpZXMpOworCisJ LyogSWYgYW5vdGhlciB0aHJlYWQgc3RhcnRlZCBpbnB1dHRpbmcgYmVmb3JlIHRoaXMgb25lLCBi dXQgaGFzbid0CisJICogZmluaXNoZWQsIHdlIG5lZWQgdG8gd2FpdCBmb3IgaXQgdG8gY29tcGxl dGUgdG8gdXBkYXRlIHRoZSB0YWlsLgorCSAqLworCXdoaWxlICh1bmxpa2VseShfX2F0b21pY19s b2FkX24oJnMtPnNoYXJlZC50YWlsLCBfX0FUT01JQ19BQ1FVSVJFKSAhPQorCQkJb2xkX2hlYWQp KQorCQlydGVfcGF1c2UoKTsKKworCV9fYXRvbWljX3N0b3JlX24oJnMtPnNoYXJlZC50YWlsLCBv bGRfaGVhZCArIG51bV9lbnRyaWVzLAorCQkJX19BVE9NSUNfUkVMRUFTRSk7CisKKwlyZXR1cm4g bnVtX2VudHJpZXM7Cit9CisKK3N0YXRpYyBpbmxpbmUgdWludDMyX3QgX19hdHRyaWJ1dGVfXygo YWx3YXlzX2lubGluZSkpCitvcGRsX2ZpcnN0X2VudHJ5X2lkKHVpbnQzMl90IHN0YXJ0X3NlcSwg dWludDhfdCBuYl9wX2xjb3JlcywKKwkJdWludDhfdCB0aGlzX2xjb3JlKQoreworCXJldHVybiAo KG5iX3BfbGNvcmVzIDw9IDEpID8gMCA6CisJCQkobmJfcF9sY29yZXMgLSAoc3RhcnRfc2VxICUg bmJfcF9sY29yZXMpICsgdGhpc19sY29yZSkgJQorCQkJbmJfcF9sY29yZXMpOworfQorCisvKiBD bGFpbSBzbG90cyB0byBwcm9jZXNzLCBvcHRpbWlzZWQgZm9yIHNpbmdsZS10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ZyAqdCA9IHMtPnQ7CisJdWlu dDMyX3QgaSA9IDAsIG9mZnNldDsKKwl1aW50OF90ICplbnRyaWVzX29mZnNldCA9ICh1aW50OF90 ICopZW50cmllczsKKworCW9mZnNldCA9IG9wZGxfZmlyc3RfZW50cnlfaWQoKnNlcSwgcy0+bmJf aW5zdGFuY2UsIHMtPmluc3RhbmNlX2lkKTsKKwludW1fZW50cmllcyA9IG9mZnNldCArIChzLT5u Yl9pbnN0YW5jZSAqIG51bV9lbnRyaWVzKTsKKworCW1vdmVfaGVhZF9hdG9taWNhbGx5KHMsICZu dW1fZW50cmllcywgJm9sZF9oZWFkLCBibG9jaywgdHJ1ZSk7CisKKwlmb3IgKDsgb2Zmc2V0IDwg bnVtX2VudHJpZXM7IG9mZnNldCArPSBzLT5uYl9pbnN0YW5jZSkgeworCQltZW1jcHkoZW50cmll c19vZmZzZXQsIGdldF9zbG90KHQsIHMtPmhlYWQgKyBvZmZzZXQpLAorCQkJdC0+c2xvdF9zaXpl KTsKKwkJZW50cmllc19vZmZzZXQgKz0gdC0+c2xvdF9zaXplOworCQlpKys7CisJfQorCWlmIChz ZXEgIT0gTlVMTCkKKwkJKnNlcSA9IG9sZF9oZWFkOworCisJcmV0dXJuIGk7Cit9CisKKy8qIENs YWltIGFuZCBjb3B5IHNsb3QgcG9pbnRlcnMsIG9wdGltaXNlZCBmb3Igc2luZ2xlLXRocmVhZCBv cGVyYXRpb24gKi8KK3N0YXRpYyBpbmxpbmUgdWludDMyX3QgX19hdHRyaWJ1dGVfXygoYWx3YXlz X2lubGluZSkpCitvcGRsX3N0YWdlX2NsYWltX2NvcHlfc2luZ2xldGhyZWFkKHN0cnVjdCBvcGRs X3N0YWdlICpzLCB2b2lkICplbnRyaWVzLAorCQl1aW50MzJfdCBudW1fZW50cmllcywgdWludDMy X3QgKnNlcSwgYm9vbCBibG9jaykKK3sKKwludW1fZW50cmllcyA9IG51bV90b19wcm9jZXNzKHMs IG51bV9lbnRyaWVzLCBibG9jayk7CisJaWYgKG51bV9lbnRyaWVzID09IDApCisJCXJldHVybiAw OworCWNvcHlfZW50cmllc19vdXQocy0+dCwgcy0+aGVhZCwgZW50cmllcywgbnVtX2VudHJpZXMp OworCWlmIChzZXEgIT0gTlVMTCkKKwkJKnNlcSA9IHMtPmhlYWQ7CisJcy0+aGVhZCArPSBudW1f ZW50cmllczsKKwlyZXR1cm4gbnVtX2VudHJpZXM7Cit9CisKKy8qIFRocmVhZC1zYWZlIHZlcnNp b24gb2YgZnVuY3Rpb24gdG8gY2xhaW0gYW5kIGNvcHkgcG9pbnRlcnMgdG8gc2xvdHMgKi8KK3N0 YXRpYyBpbmxpbmUgdWludDMyX3QgX19hdHRyaWJ1dGVfXygoYWx3YXlzX2lubGluZSkpCitvcGRs X3N0YWdlX2NsYWltX2NvcHlfbXVsdGl0aHJlYWQoc3RydWN0IG9wZGxfc3RhZ2UgKnMsIHZvaWQg KmVudHJpZXMsCisJCXVpbnQzMl90IG51bV9lbnRyaWVzLCB1aW50MzJfdCAqc2VxLCBib29sIGJs b2NrKQoreworCXVpbnQzMl90IG9sZF9oZWFkOworCisJbW92ZV9oZWFkX2F0b21pY2FsbHkocywg Jm51bV9lbnRyaWVzLCAmb2xkX2hlYWQsIGJsb2NrLCB0cnVlKTsKKwlpZiAobnVtX2VudHJpZXMg PT0gMCkKKwkJcmV0dXJuIDA7CisJY29weV9lbnRyaWVzX291dChzLT50LCBvbGRfaGVhZCwgZW50 cmllcywgbnVtX2VudHJpZXMpOworCWlmIChzZXEgIT0gTlVMTCkKKwkJKnNlcSA9IG9sZF9oZWFk OworCXJldHVybiBudW1fZW50cmllczsKK30KKworc3RhdGljIGlubGluZSB2b2lkIF9fYXR0cmli dXRlX18oKGFsd2F5c19pbmxpbmUpKQorb3BkbF9zdGFnZV9kaXNjbGFpbV9zaW5nbGV0aHJlYWRf bihzdHJ1Y3Qgb3BkbF9zdGFnZSAqcywKKwkJdWludDMyX3QgbnVtX2VudHJpZXMpCit7CisJdWlu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dG9fcHJvY2VzcyhzLCBudW1fZW50cmll cywgYmxvY2spOworCisJaWYgKG51bV9lbnRyaWVzID09IDApCisJCXJldHVybiAwOworCisJY29w eV9lbnRyaWVzX2luKHQsIGhlYWQsIGVudHJpZXMsIG51bV9lbnRyaWVzKTsKKworCXMtPmhlYWQg Kz0gbnVtX2VudHJpZXM7CisJX19hdG9taWNfc3RvcmVfbigmcy0+c2hhcmVkLnRhaWwsIHMtPmhl YWQsIF9fQVRPTUlDX1JFTEVBU0UpOworCisJcmV0dXJuIG51bV9lbnRyaWVzOworCit9CisKK3Vp bnQzMl90CitvcGRsX3JpbmdfY29weV90b19idXJzdChzdHJ1Y3Qgb3BkbF9yaW5nICp0LCBzdHJ1 Y3Qgb3BkbF9zdGFnZSAqcywKKwkJdm9pZCAqZW50cmllcywgdWludDMyX3QgbnVtX2VudHJpZXMs IGJvb2wgYmxvY2spCit7CisJdWludDMyX3QgaGVhZCA9IHMtPmhlYWQ7CisKKwludW1fZW50cmll cyA9IG51bV90b19wcm9jZXNzKHMsIG51bV9lbnRyaWVzLCBibG9jayk7CisJaWYgKG51bV9lbnRy aWVzID09IDApCisJCXJldHVybiAwOworCisJY29weV9lbnRyaWVzX291dCh0LCBoZWFkLCBlbnRy aWVzLCBudW1fZW50cmllcyk7CisKKwlzLT5oZWFkICs9IG51bV9lbnRyaWVzOworCV9fYXRvbWlj X3N0b3JlX24oJnMtPnNoYXJlZC50YWlsLCBzLT5oZWFkLCBfX0FUT01JQ19SRUxFQVNFKTsKKwor CXJldHVybiBudW1fZW50cmllczsKK30KKwordWludDMyX3QKK29wZGxfc3RhZ2VfZmluZF9udW1f YXZhaWxhYmxlKHN0cnVjdCBvcGRsX3N0YWdlICpzLCB1aW50MzJfdCBudW1fZW50cmllcykKK3sK KwkvKiByZXR1cm4gKG51bV90b19wcm9jZXNzKHMsIG51bV9lbnRyaWVzLCBmYWxzZSkpOyAqLwor CisJaWYgKGF2YWlsYWJsZShzKSA+PSBudW1fZW50cmllcykKKwkJcmV0dXJuIG51bV9lbnRyaWVz OworCisJdXBkYXRlX2F2YWlsYWJsZV9zZXEocyk7CisKKwl1aW50MzJfdCBhdmFpbCA9IGF2YWls YWJsZShzKTsKKworCWlmIChhdmFpbCA9PSAwKSB7CisJCXJ0ZV9wYXVzZSgpOworCQlyZXR1cm4g MDsKKwl9CisJcmV0dXJuIChhdmFpbCA8PSBudW1fZW50cmllcykgPyBhdmFpbCA6IG51bV9lbnRy aWVzOworfQorCit1aW50MzJfdAorb3BkbF9zdGFnZV9jbGFpbShzdHJ1Y3Qgb3BkbF9zdGFnZSAq cywgdm9pZCAqZW50cmllcywKKwkJdWludDMyX3QgbnVtX2VudHJpZXMsIHVpbnQzMl90ICpzZXEs IGJvb2wgYmxvY2ssIGJvb2wgYXRvbWljKQoreworCWlmIChzLT50aHJlYWRzYWZlID09IGZhbHNl KQorCQlyZXR1cm4gb3BkbF9zdGFnZV9jbGFpbV9zaW5nbGV0aHJlYWQocywgZW50cmllcywgbnVt X2VudHJpZXMsCisJCQkJc2VxLCBibG9jaywgYXRvbWljKTsKKwllbHNlCisJCXJldHVybiBvcGRs X3N0YWdlX2NsYWltX211bHRpdGhyZWFkKHMsIGVudHJpZXMsIG51bV9lbnRyaWVzLAorCQkJCXNl cSwgYmxvY2spOworfQorCit1aW50MzJfdAorb3BkbF9zdGFnZV9jbGFpbV9jb3B5KHN0cnVjdCBv cGRsX3N0YWdlICpzLCB2b2lkICplbnRyaWVzLAorCQl1aW50MzJfdCBudW1fZW50cmllcywgdWlu dDMyX3QgKnNlcSwgYm9vbCBibG9jaykKK3sKKwlpZiAocy0+dGhyZWFkc2FmZSA9PSBmYWxzZSkK KwkJcmV0dXJuIG9wZGxfc3RhZ2VfY2xhaW1fY29weV9zaW5nbGV0aHJlYWQocywgZW50cmllcywK KwkJCQludW1fZW50cmllcywgc2VxLCBibG9jayk7CisJZWxzZQorCQlyZXR1cm4gb3BkbF9zdGFn ZV9jbGFpbV9jb3B5X211bHRpd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