Skip to content

Commit

Permalink
openonload-201205-u1
Browse files Browse the repository at this point in the history
    8edc22de205ffb4604beb12858da1ec4  openonload-201205-u1.tgz
  • Loading branch information
solarflare authored and majek committed Jun 13, 2014
1 parent 8808a49 commit f7f1179
Show file tree
Hide file tree
Showing 191 changed files with 3,576 additions and 2,270 deletions.
49 changes: 49 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,53 @@

openonload-201205-u1
--------------------

- Various workarounds for IOMMU-related kernel bugs.
- Compatibility with RHEL6.3 and linux-3.4.0.
- Use IP ID of zero with TCP.
- bug29724: Do not accept unsolicited ARPs that change MAC associated with IP.
- bug29870: Share iommu domain between VFs in a single Onload stack.
- Fix previously ignored option EF_TCP_ADV_WIN_SCALE_MAX.
- bug29996: Do not send packets with IP TTL=0.
- bug27919: Fix poll() after nonblocking connect on TCP socket.
- bug27932: Fix RPM dependency bugs.
- Improve error messages when out of socket buffers.
- Reduce cost of waking other threads for loopback and pipes.
- bug30140: Fix bugs in error handling in pipe read/write.
- bug30140: Fix race with pipes between close() of write-fd and read().
- Various improvements and minor bug fixes to spin-loops.
- bug30199: Fix python3 compatibility bug in affinity scripts.
- bug30214: Return 0 rather than EAGAIN on onload_zc_recv() if called callback.
- bug23968: Fix warnings from recent gcc versions.
- bug30218: Fix getsockopt(TCP_INFO) on new socket.
- bug30219: Do not print scary warning when tcgetpgrp() is called.
- bug29929: Ensure we always drain OS path in UDP onload_zc_recv().
- Avoid syscall in ioctl(SIOCATMARK).
- bug30260: Fix RTNL message length for RTM_GETLINK request.
- bug30173: Do not wait forever for flush to complete -- it may fail.
- bug30251: Don't return error with EF_NO_FAIL=0 if socket type not onloadable.
- bug27042: Reduce delayed-ack time to avoid spurious retransmits.
- bug26090: Fix send to host with no route and SO_BINDTODEVICE.
- Fix minor memory leak in cicppl_arp_pkt_tx_queue.
- bug26089: Fix packets sent via kernel w SO_BINDTODEVICE going to wrong intf.
- Fix error return code from udp send interrupted by signal.
- bug30359: Fix error code returned from sigaction and exit_group syscalls.
- Avoid polling the stack when EF_POLL_ON_DEMAND=0.
- Improve onload_stackdump's handling of zombie stacks.
- Add "onload_stackdump -z kill" to terminate stacks lingering after exit.
- bug30218: Reduce initial RTO to 1s from 3d to match Linux.
- bug30516: Fix interrupts with scalable packet buffer mode.
- bug30633: Fix kernel panic on driver reload.
- License ef_vi samples as BSD so users can cut-and-paste.
- bug27835: Added extern "C" to ef_vi headers to ease use from C++.
- bug21349: Keep zwin timer running in FIN-WAIT-1.
- bug30863: Fix for ARP confirmation when using a gateway.
- bug30892: Fix inconsistency in locking operations.
- sfc: Updated sfc net driver to v3_2_1_6099.
- bug30711: ef_vi: Make SOP/CONT flags available in RX_DISCARD events.
- bug31026: Fix seg-fault in epoll_ctl(DEL) with EF_UL_EPOLL=0|2.


openonload-201205-p4
--------------------

Expand Down
6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,6 @@ Any questions?


==========
version: openonload-201205-p4
revision: 064da35e74f4 (ool201205) openonload-201205-p4
date: Thu Jul 5 15:02:49 BST 2012
version: openonload-201205-u1
revision: 71cc77f8f44e (ool201205) oo_32031/openonload-201205-u1
date: Wed Jul 18 09:48:13 BST 2012
17 changes: 10 additions & 7 deletions ReleaseNotes
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@

OpenOnload 201205 Release Notes
===============================
OpenOnload 201205-u1 Release Notes
==================================

This is a major release of OpenOnload that includes new features and bug
fixes. Please see the ChangeLog for the full list of changes. These
release notes give further details about the more significant changes.
This is an update release of OpenOnload that includes fixes for a number
of bugs found during testing. Please see the ChangeLog for the full list
of changes.

There are no major new features in this release, so the notes below detail
features added in the openonload-201205 release.


----------------------------------------
Expand Down Expand Up @@ -39,7 +42,7 @@ New configuration options

EF_TCP_RST_DELAYED_CONN
- Set this option to prevent data being delivered late by TCP due to
retransmits. Useful for trading application where delivering the data
retransmits. Useful for trading applications where delivering the data
late is worse than not delivering it at all.

EF_DYNAMIC_ACK_THRESH
Expand Down Expand Up @@ -124,4 +127,4 @@ Scalable packet buffer mode


David Riddoch
2012/05/02
2012/07/05
2 changes: 1 addition & 1 deletion mk/site/ciul.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LINK_CIUL_LIB := $(MMakeGenerateLibLink)
# releases, because the internals of the data structures are exposed. That
# means that almost any non-trivial change to ef_vi should cause the MAJOR
# version number to be incremented.
lib_maj := 2
lib_maj := 3
lib_min := 0
lib_mic := 0
CIUL_REALNAME := $(MMakeGenerateDllRealname)
Expand Down
28 changes: 22 additions & 6 deletions scripts/onload_misc/openonload.spec
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
# support older distros) to update this spec to use kernel modules packaging
# templates.

%define pkgversion 201205-p4
%define pkgversion 201205-u1

%{!?kernel: %{expand: %%define kernel %%(uname -r)}}
%{!?target_cpu: %{expand: %%define target_cpu %{_host_cpu}}}
Expand All @@ -47,7 +47,7 @@

%define have_lsb %( ! which lsb_release > /dev/null 2>&1; echo $? )

%define knownvariants '@(BOOT|PAE|@(big|huge)mem|debug|enterprise|kdump|?(big|large)smp|uml|xen[0U]?(-PAE)|xen|rt|default|big|pae)'
%define knownvariants '@(BOOT|PAE|@(big|huge)mem|debug|enterprise|kdump|?(big|large)smp|uml|xen[0U]?(-PAE)|xen|rt?(-trace|-vanilla)|default|big|pae|vanilla|trace|timing)'
%define knownvariants2 '%{knownvariants}'?(_'%{knownvariants}')

# Determine distro
Expand All @@ -69,7 +69,7 @@

%define kernel_pkg %( rpm -q --whatprovides /lib/modules/%{kernel} | grep -v source | grep -v base)
# form a fake kernel name in known format 2.6.32-0.41-rt
%define kernel_long %( echo %{kernel_pkg} | sed "s/kernel-\\([a-zA-Z_]*\\)[-\.]\\([2-9].[0-9].*\\)/\\2-\\1/; s/kernel-//")
%define kernel_long %( echo %{kernel_pkg} | sed "s/kernel-\\([a-zA-Z_-]*\\)[-\.]\\([2-9].[0-9].*\\)/\\2-\\1/; s/kernel-//")

%else

Expand Down Expand Up @@ -97,6 +97,15 @@
%define libpcap_devel libpcap-devel
%endif

# On SLES11 source packages for RT kernels are called kernel-source-rt
# rather than kernel-source.
%define rtkernel %( echo %{kernel} | grep -q -- -rt && echo 1 || echo 0 )
%if 0%{?sles_version} >= 11 && %{rtkernel}
%define kernelsource kernel-source-rt
%else
%define kernelsource kernel-source
%endif

# kmodtool doesn't count 'rt' as a variant. So I've stolen the bash
# regexp. Only faffing with this because rpmbuild BuildRequires doesn't
# agree that kernel-rt provides 'kernel = blah-rt' !
Expand Down Expand Up @@ -128,9 +137,9 @@ Source0 : openonload-%{pkgversion}.tgz
BuildRoot : %{_builddir}/%{name}-root
AutoReqProv : no
%if %{redhat}
BuildRequires : gawk gcc sed make bash kernel%{kvariantsuffix_dash} = %{kverrel}, kernel%{kvariantsuffix_dash}-devel = %{kverrel} glibc-common %{libpcap_devel}
BuildRequires : gawk gcc sed make bash kernel%{kvariantsuffix_dash} = %{kverrel} kernel%{kvariantsuffix_dash}-devel = %{kverrel} glibc-common %{libpcap_devel}
%else
BuildRequires : gawk gcc sed make bash kernel%{kvariantsuffix_dash} = %{kverrel}, kernel-source = %{kverrel} glibc-devel glibc %{libpcap_devel}
BuildRequires : gawk gcc sed make bash kernel%{kvariantsuffix_dash} = %{kverrel} %{kernelsource} = %{kverrel} glibc-devel glibc %{libpcap_devel}
%ifarch x86_64
%if %{build32}
BuildRequires : glibc-devel-32bit
Expand Down Expand Up @@ -160,8 +169,12 @@ Group : System Environment/Kernel
%if %( ! echo %{kvariantsuffix} | grep PAE &> /dev/null; echo $? )
Requires : openonload = %{version}-%{release}, kernel-%{target_cpu} = %{kverrel}%{kvariantsuffix}
%else
%if %( ! echo %{kvariantsuffix} | grep -E trace\|vanilla &> /dev/null; echo $? )
Requires : openonload = %{version}-%{release}, kernel%{kvariantsuffix_dash} = %{kverrel}
%else
Requires : openonload = %{version}-%{release}, kernel%{kvariantsuffix_dash}-%{target_cpu} = %{kverrel}
%endif
%endif
%endif

%else
Requires : openonload = %{version}-%{release}, kernel%{kvariantsuffix_dash} = %{kverrel}
Expand Down Expand Up @@ -280,6 +293,9 @@ rm -fR $RPM_BUILD_ROOT
/usr/libexec/onload/modules

%changelog
* Mon May 14 2012 Mark Spender <mspender@solarflare.com> 201205
- Added fix for MRG trace and vanilla kernel variants

* Mon Feb 13 2012 Mark Spender <mspender@solarflare.com> 201202
- Added depenency fix for MRG rt kernels and RHEL 4 kernel variants

Expand Down
2 changes: 2 additions & 0 deletions scripts/onload_tool
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ do_unload() {
tryunload sfc_mtd
tryunload sfc_control
tryunload sfc
grep -q sfc/sfc.ko /lib/modules/$(uname -r)/modules.dep && \
log "WARNING: sfc driver may reload due to an in-distro driver"
return $rc
}

Expand Down
32 changes: 21 additions & 11 deletions scripts/sfcaffinity.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,20 +126,30 @@ def cmp_irq_name(a, b):
try:
a_pre, a_suf = a.rsplit('-', 1)
b_pre, b_suf = b.rsplit('-', 1)
c = cmp(a_pre, b_pre)
c = a_pre < b_pre
if c:
return c
return cmp(int(a_suf), int(b_suf))
return int(a_suf) < int(b_suf)
except:
return cmp(a, b)
return a < b


# Python 3 compat. They really shouldn't have killed cmp.
def sort_irq_names(irq_names):
import sys
if sys.version_info >= (3,0):
import functools
irq_names.sort(key=functools.cmp_to_key(cmp_irq_name))
else:
irq_names.sort(cmp=cmp_irq_name)


def irq_names_matching_pattern(pattern):
"""Return list of interrupt names that match the given pattern. The
list is sorted nicely."""
n2v = irq_get_name2vec_map()
irq_names = [n for n in n2v.keys() if re.match(pattern, n)]
irq_names.sort(cmp=cmp_irq_name)
sort_irq_names(irq_names)
return irq_names


Expand Down Expand Up @@ -252,12 +262,12 @@ def __repr__(self):

class Topology(object):
def get_cores(self):
return self.id2core.values()
return list(self.id2core.values())
def get_packages(self):
return self.id2package.values()
return list(self.id2package.values())
def get_cache_levels(self):
if self.shared_caches:
return self.shared_caches.keys()
return list(self.shared_caches.keys())
else:
return []
def get_top_level_shared_caches(self):
Expand Down Expand Up @@ -337,14 +347,14 @@ def __build_topology(all_cores):
cs = core_id_to_core_siblings[core_id] & cores_mask
top.id2core[core_id] = Core(top, core_id, pkg, ts, cs)

top.core_ids = top.id2core.keys()
top.core_ids = list(top.id2core.keys())
top.core_ids.sort()
top.cores_mask = mask.to_int(top.core_ids)
top.package_ids = top.id2package.keys()
top.package_ids = list(top.id2package.keys())
top.package_ids.sort()
top.real_cores = dict([(c.id, c) for c in top.id2core.values()
if c.id == c.real_core])
top.real_core_ids = top.real_cores.keys()
top.real_core_ids = list(top.real_cores.keys())
top.real_core_ids.sort()
top.real_cores_mask = mask.to_int(top.real_core_ids)

Expand Down Expand Up @@ -449,7 +459,7 @@ def dump_irqs():
outl("%20s: %d" % (irq_name, vector))
outl("irq_get_vec2names_map():")
v2n = irq_get_vec2names_map()
vectors = v2n.keys()
vectors = list(v2n.keys())
vectors.sort()
for v in vectors:
outl("%20d: %s" % (v, v2n[v]))
Expand Down
37 changes: 24 additions & 13 deletions scripts/sfcaffinity_config
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ LL_DEBUG = 10

######################################################################

def read_file(fname):
"Read a small ascii file with a single read() call."
# Looks like overkill? Reason for this obfuscation is to get something
# that works on python 2.x and 3.x.
fd = os.open(fname, os.O_RDONLY)
bytes = os.read(fd, 8192)
return str(bytes.decode('ascii'))

######################################################################

class Bucket(object):
pass

Expand Down Expand Up @@ -211,19 +221,18 @@ def count_bits(mask):


def file_get_int(fname):
f = open(fname)
return int(f.read())
f = read_file(fname)
return int(f.strip())


def file_get_int_list(fname):
f = open(fname)
l = f.read().strip()
l = read_file(fname).strip()
return [int(x) for x in l.split()]


def file_get_cpumask(fname):
cscm = open(fname).read()
return mask.comma_sep_hex_to_int(cscm.strip())
cscm = read_file(fname).strip()
return mask.comma_sep_hex_to_int(cscm)


def get_topology():
Expand All @@ -238,11 +247,13 @@ def get_topology():
cores = [c.id for c in topology.get_cores()
if c.pkg.id in packages]
topology = affinity.get_topology(cores=cores)
except affinity.NoCores, inst:
except affinity.NoCores:
fail("No cores left after applying filters.")
except affinity.BadCoreId, inst:
except affinity.BadCoreId:
inst = sys.exc_info()[1]
fail("Bad core id %d" % inst.core_id)
except mask.BadMask, inst:
except mask.BadMask:
inst = sys.exc_info()[1]
fail("Bad mask in --%s=%s" % (opt, inst.msg))
return topology

Expand Down Expand Up @@ -299,7 +310,7 @@ proc_interrupts_rxq_fmts = ['\<%s-rx-', '\<%s-']
def __interface_n_rxqs(ethname, fmt):
match = fmt % ethname
f = do_popen("grep '\<%s[0-9]' /proc/interrupts | wc -l" % match)
return int(f.read())
return int(f.read().strip())

def interface_n_rxqs(ethname):
for fmt in proc_interrupts_rxq_fmts:
Expand All @@ -313,7 +324,7 @@ def sfc_interface_n_rxqs(ethname):
dir = "/proc/driver/sfc/nic_%s" % ethname
cmd = "cd %s 2>/dev/null && /bin/ls -d rxq[0-9]* | wc -w" % dir
f = do_popen(cmd)
return int(f.read())
return int(f.read().strip())
except:
warn(["%s is missing." % dir,
"Is debugfs mounted?"])
Expand All @@ -324,7 +335,7 @@ def num_cpus():
# Or alternatively get cpu topology at start of day and use
# that info here.
f = do_popen("grep 'core id' /proc/cpuinfo | wc -l")
return int(f.read())
return int(f.read().strip())


def module_loaded(modname):
Expand Down Expand Up @@ -423,7 +434,7 @@ def rxq_get_irq(ethx, rxq):
assert n_rxqs > 0
match = fmt % ethx + str(rxq) + '\>'
f = do_popen("grep '%s' /proc/interrupts | awk -F: '{print $1}'" % match)
return int(f.read())
return int(f.read().strip())


def rxq_set_affinity(ethx, rxq, cpumask):
Expand Down
10 changes: 6 additions & 4 deletions scripts/sfcirqaffinity
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def out(x, file=sys.stdout):
try:
file.write(x)
except:
print repr(x)
sys.stderr.write("ERROR: repr(x) = %s\n" % repr(x))
raise


Expand Down Expand Up @@ -105,11 +105,13 @@ def do_irqpattern_corespec(irq_name_pattern, cores_args):
cores = [c.id for c in topology.get_cores()
if c.pkg.id in packages]
topology = affinity.get_topology(cores=cores)
except affinity.NoCores, inst:
except affinity.NoCores:
fail("No cores left after applying filters.")
except affinity.BadCoreId, inst:
except affinity.BadCoreId:
inst = sys.exc_info()[1]
fail("Bad core id %d" % inst.core_id)
except mask.BadMask, inst:
except mask.BadMask:
inst = sys.exc_info()[1]
fail("Bad mask in --%s=%s" % (opt, inst.msg))

caches = topology.get_top_level_shared_caches()
Expand Down
Loading

0 comments on commit f7f1179

Please sign in to comment.