Date: Sun, 9 Jan 2011 23:05:46 +0000 (UTC) From: Juli Mallett <jmallett@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r217210 - head/sys/mips/cavium/octe Message-ID: <201101092305.p09N5ktu059874@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jmallett Date: Sun Jan 9 23:05:46 2011 New Revision: 217210 URL: http://svn.freebsd.org/changeset/base/217210 Log: o) Remove some unused local definitions of IP protocol numbers. o) Use CPU_FOREACH rather than a miscrafted for loop with an off-by-one to enable workq interrupts on all cores. Modified: head/sys/mips/cavium/octe/ethernet-defines.h head/sys/mips/cavium/octe/ethernet.c Modified: head/sys/mips/cavium/octe/ethernet-defines.h ============================================================================== --- head/sys/mips/cavium/octe/ethernet-defines.h Sun Jan 9 22:47:58 2011 (r217209) +++ head/sys/mips/cavium/octe/ethernet-defines.h Sun Jan 9 23:05:46 2011 (r217210) @@ -79,8 +79,6 @@ AND WITH ALL FAULTS AND CAVIUM NETWORKS #define USE_MULTICORE_RECEIVE 0 #endif -#define IP_PROTOCOL_TCP 6 -#define IP_PROTOCOL_UDP 0x11 #define FAU_NUM_PACKET_BUFFERS_TO_FREE (CVMX_FAU_REG_END - sizeof(uint32_t)) #define TOTAL_NUMBER_OF_PORTS (CVMX_PIP_NUM_INPUT_PORTS+1) Modified: head/sys/mips/cavium/octe/ethernet.c ============================================================================== --- head/sys/mips/cavium/octe/ethernet.c Sun Jan 9 22:47:58 2011 (r217209) +++ head/sys/mips/cavium/octe/ethernet.c Sun Jan 9 23:05:46 2011 (r217210) @@ -235,15 +235,16 @@ static void cvm_oct_configure_common_hw( if (USE_MULTICORE_RECEIVE) { critical_enter(); { - int cpu; - for (cpu = 0; cpu < mp_maxid; cpu++) { - if (!CPU_ABSENT(cpu) && - (cpu != PCPU_GET(cpuid))) { - cvmx_ciu_intx0_t en; - en.u64 = cvmx_read_csr(CVMX_CIU_INTX_EN0(cpu*2)); - en.s.workq |= (1<<pow_receive_group); - cvmx_write_csr(CVMX_CIU_INTX_EN0(cpu*2), en.u64); - } + cvmx_ciu_intx0_t en; + int core; + + CPU_FOREACH(core) { + if (core == PCPU_GET(cpuid)) + continue; + + en.u64 = cvmx_read_csr(CVMX_CIU_INTX_EN0(core*2)); + en.s.workq |= (1<<pow_receive_group); + cvmx_write_csr(CVMX_CIU_INTX_EN0(core*2), en.u64); } } critical_exit();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101092305.p09N5ktu059874>