Date: Sat, 19 May 2018 16:44:12 +0000 (UTC) From: Matt Macy <mmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333879 - head/sys/net Message-ID: <201805191644.w4JGiC5A011903@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mmacy Date: Sat May 19 16:44:12 2018 New Revision: 333879 URL: https://svnweb.freebsd.org/changeset/base/333879 Log: mp_ring: fix i386 Even though 64-bit atomics are supported on i386 there are panics indicating that the code does not work correctly there. Switch to mutex based variant (and fix that while we're here). Reported by: pho, kib Modified: head/sys/net/mp_ring.c Modified: head/sys/net/mp_ring.c ============================================================================== --- head/sys/net/mp_ring.c Sat May 19 15:18:15 2018 (r333878) +++ head/sys/net/mp_ring.c Sat May 19 16:44:12 2018 (r333879) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <machine/cpu.h> -#if defined(__powerpc__) || defined(__mips__) +#if defined(__powerpc__) || defined(__mips__) || defined(__i386__) #define NO_64BIT_ATOMICS #endif @@ -345,6 +345,7 @@ ifmp_ring_enqueue(struct ifmp_ring *r, void **items, i if (n >= space_available(r, os)) { counter_u64_add(r->drops, n); MPASS(os.flags != IDLE); + mtx_unlock(&r->lock); if (os.flags == STALLED) ifmp_ring_check_drainage(r, 0); return (ENOBUFS);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805191644.w4JGiC5A011903>