Skip to content

Commit

Permalink
Merge pull request #40 from raakella1/sisl_10x
Browse files Browse the repository at this point in the history
Sisl 10x
  • Loading branch information
raakella1 authored Aug 9, 2023
2 parents e6d1ec7 + 3df8ee0 commit b2e5867
Show file tree
Hide file tree
Showing 90 changed files with 8,608 additions and 5,088 deletions.
5 changes: 4 additions & 1 deletion .jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pipeline {
STABLE_BRANCH = 'stable/v*'
LAST_COMMITS = ''
built_chain = ''
failed_pkg = ""
}

parameters {
Expand Down Expand Up @@ -185,6 +184,7 @@ pipeline {
}
}

/* FIXME (bszmyd): Disabled till integration.
stage("Downstream Build") {
when { allOf {
expression { (env.BRANCH_NAME == "${TARGET_BRANCH}") }
Expand Down Expand Up @@ -217,15 +217,18 @@ pipeline {
}
}
}
*/
}

post {
failure {
/*
script {
if ("${failed_pkg}" != "") {
slackSend color: '#E43237', channel: '#homestore-build', message: "@here IOManager's downstream pkg - *${failed_pkg}* build failed.\n*URL:* ${BUILD_URL}\n*Last 2 commits:* ```${LAST_COMMITS}```\nIf result not expected, revert (aka `conan remove -r ebay-local`) these pkgs: ```${built_chain}```"
}
}
*/
slackSend color: '#E43237', channel: '#sds-ci', message: "*${PROJECT}/${TAG}* has had a failure : ${BUILD_URL}"
}
success {
Expand Down
42 changes: 23 additions & 19 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class IOMgrConan(ConanFile):
name = "iomgr"
version = "8.7.3"
version = "9.2.1"
homepage = "https://github.com/eBay/IOManager"
description = "Asynchronous event manager"
topics = ("ebay", "nublox", "aio")
Expand All @@ -20,16 +20,20 @@ class IOMgrConan(ConanFile):
"coverage": ['True', 'False'],
"grpc_support": ['True', 'False'],
"sanitize": ['True', 'False'],
"spdk": ['True', 'False'],
"testing" : ['full', 'off', 'epoll_mode', 'spdk_mode'],
"fiber_impl" : ['boost', 'folly']
}
default_options = {
'shared': False,
'fPIC': True,
'coverage': False,
'grpc_support': True,
'sanitize': False,
'spdk': True,
'testing': 'full',
'sisl:prerelease': True,
'fiber_impl': 'boost',
}

generators = "cmake", "cmake_find_package"
Expand All @@ -46,53 +50,53 @@ def configure(self):

def build_requirements(self):
self.build_requires("gtest/1.13.0")
self.build_requires("cpr/1.10.4")

def requirements(self):
self.requires("sisl/[~=9, include_prerelease=True]@oss/master")
self.requires("sisl/[~=10, include_prerelease=True]@oss/master")

self.requires("boost/1.79.0")
self.requires("folly/2022.01.31.00")
self.requires("boost/1.82.0")
self.requires("folly/nu2.2022.01.31.00")
if self.options.grpc_support:
self.requires("grpc/1.48.0")
self.requires("grpc/1.50.1")
self.requires("grpc_internal/1.48.0")
self.requires("liburing/2.1")
self.requires("libevent/2.1.12")
self.requires("spdk/21.07.y")
if self.options.spdk:
self.requires("spdk/21.07.y")
self.requires("pistache/0.0.5")
self.requires("zmarok-semver/1.1.0")

self.requires("flatbuffers/1.12.0", override=True)
self.requires("openssl/1.1.1s", override=True)
self.requires("zlib/1.2.12", override=True)
self.requires("openssl/3.1.1", override=True)
self.requires("libcurl/8.0.1", override=True)

def build(self):
cmake = CMake(self)
definitions = {'CMAKE_TEST_TARGET': self.options.testing,
'CMAKE_EXPORT_COMPILE_COMMANDS': 'ON',
'CONAN_CMAKE_SILENT_OUTPUT': 'ON',
'MEMORY_SANITIZER_ON': 'OFF'}
test_target = None

run_tests = True
test_target = None
if self.settings.build_type == "Debug":
if self.options.sanitize:
definitions['MEMORY_SANITIZER_ON'] = 'ON'
elif self.options.coverage:
definitions['BUILD_COVERAGE'] = 'ON'
test_target = 'coverage'
else:
run_tests = False

if self.options.fiber_impl == "boost":
definitions['FIBER_IMPL'] = 'boost'
else:
definitions['FIBER_IMPL'] = 'folly'

cmake.configure(defs=definitions)
cmake.build()
# Only test in Sanitizer mode, Coverage mode or Release mode
if run_tests:
cmake.test(target=test_target, output_on_failure=True)
cmake.test(target=test_target, output_on_failure=True)

def package(self):
copy(self, "LICENSE", self.source_folder, join(self.package_folder, "licenses"), keep_path=False)
copy(self, "*.h", join(self.source_folder, "src", "include"), join(self.package_folder, "include", "iomgr"), keep_path=True)
copy(self, "*.hpp", join(self.source_folder, "src", "include"), join(self.package_folder, "include", "iomgr"), keep_path=True)
copy(self, "*.h", join(self.source_folder, "src", "include"), join(self.package_folder, "include"), keep_path=True)
copy(self, "*.hpp", join(self.source_folder, "src", "include"), join(self.package_folder, "include"), keep_path=True)
copy(self, "*iomgr_config_generated.h", join(self.build_folder, "src"), join(self.package_folder, "include", "iomgr"), keep_path=False)
copy(self, "*.a", self.build_folder, join(self.package_folder, "lib"), keep_path=False)
copy(self, "*.so", self.build_folder, join(self.package_folder, "lib"), keep_path=False)
Expand Down
101 changes: 101 additions & 0 deletions scripts/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Common shell utility functions

# Check if PCI device is on PCI_WHITELIST and not on PCI_BLACKLIST
# Env:
# if PCI_WHITELIST is empty assume device is whitelistened
# if PCI_BLACKLIST is empty assume device is NOT blacklistened
# Params:
# $1 - PCI BDF
function pci_can_use() {
local i

# The '\ ' part is important
if [[ " $PCI_BLACKLIST " =~ \ $1\ ]] ; then
return 1
fi

if [[ -z "$PCI_WHITELIST" ]]; then
#no whitelist specified, bind all devices
return 0
fi

for i in $PCI_WHITELIST; do
if [ "$i" == "$1" ] ; then
return 0
fi
done

return 1
}

# This function will ignore PCI PCI_WHITELIST and PCI_BLACKLIST
function iter_all_pci_class_code() {
local class
local subclass
local progif
class="$(printf %02x $((0x$1)))"
subclass="$(printf %02x $((0x$2)))"
progif="$(printf %02x $((0x$3)))"

if hash lspci &>/dev/null; then
if [ "$progif" != "00" ]; then
lspci -mm -n -D | \
grep -i -- "-p${progif}" | \
awk -v cc="\"${class}${subclass}\"" -F " " \
'{if (cc ~ $2) print $1}' | tr -d '"'
else
lspci -mm -n -D | \
awk -v cc="\"${class}${subclass}\"" -F " " \
'{if (cc ~ $2) print $1}' | tr -d '"'
fi
elif hash pciconf &>/dev/null; then
local addr=($(pciconf -l | grep -i "class=0x${class}${subclass}${progif}" | \
cut -d$'\t' -f1 | sed -e 's/^[a-zA-Z0-9_]*@pci//g' | tr ':' ' '))
printf "%04x:%02x:%02x:%x\n" ${addr[0]} ${addr[1]} ${addr[2]} ${addr[3]}
else
echo "Missing PCI enumeration utility" >&2
exit 1
fi
}

# This function will ignore PCI PCI_WHITELIST and PCI_BLACKLIST
function iter_all_pci_dev_id() {
local ven_id
local dev_id
ven_id="$(printf %04x $((0x$1)))"
dev_id="$(printf %04x $((0x$2)))"

if hash lspci &>/dev/null; then
lspci -mm -n -D | awk -v ven="\"$ven_id\"" -v dev="\"${dev_id}\"" -F " " \
'{if (ven ~ $3 && dev ~ $4) print $1}' | tr -d '"'
elif hash pciconf &>/dev/null; then
local addr=($(pciconf -l | grep -i "chip=0x${dev_id}${ven_id}" | \
cut -d$'\t' -f1 | sed -e 's/^[a-zA-Z0-9_]*@pci//g' | tr ':' ' '))
printf "%04x:%02x:%02x:%x\n" ${addr[0]} ${addr[1]} ${addr[2]} ${addr[3]}
else
echo "Missing PCI enumeration utility" >&2
exit 1
fi
}

function iter_pci_dev_id() {
local bdf=""

for bdf in $(iter_all_pci_dev_id "$@"); do
if pci_can_use "$bdf"; then
echo "$bdf"
fi
done
}

# This function will filter out PCI devices using PCI_WHITELIST and PCI_BLACKLIST
# See function pci_can_use()
function iter_pci_class_code() {
local bdf=""

for bdf in $(iter_all_pci_class_code "$@"); do
if pci_can_use "$bdf"; then
echo "$bdf"
fi
done
}
23 changes: 23 additions & 0 deletions scripts/fiber-gdb-master/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Loading

0 comments on commit b2e5867

Please sign in to comment.