From owner-svn-src-head@FreeBSD.ORG Sat Nov 10 21:02:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE4011AE; Sat, 10 Nov 2012 21:02:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 2E8FD8FC0C; Sat, 10 Nov 2012 21:02:24 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id C2A065C59; Sat, 10 Nov 2012 22:02:23 +0100 (CET) Message-ID: <509EC0E5.6040109@FreeBSD.org> Date: Sat, 10 Nov 2012 22:02:29 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Xin LI Subject: Re: svn commit: r242842 - in head/sys: conf modules/mthca References: <201211100032.qAA0Wlvw090497@svn.freebsd.org> In-Reply-To: <201211100032.qAA0Wlvw090497@svn.freebsd.org> Content-Type: multipart/mixed; boundary="------------030108040104080601000702" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Nov 2012 21:02:25 -0000 This is a multi-part message in MIME format. --------------030108040104080601000702 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2012-11-10 01:32, Xin LI wrote: > Author: delphij > Date: Sat Nov 10 00:32:47 2012 > New Revision: 242842 > URL: http://svnweb.freebsd.org/changeset/base/242842 > > Log: > Attempt toward a buildable universe by silenting a few warnings for OFED. ... > -OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions > +OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions -Wno-switch -Wno-sometimes-uninitialized -Wno-conversion -Wno-initializer-overrides A few of these warnings point to real bugs, e.g. the uninitialized packet_length variable in ib_ud_header_init(), and the incorrect value passed to rdma_notify() in sdp_rx_comp_work(). The others are not that severe, but very easy to fix, as you can see from the attached diff. If anything, I hope the maintainer(s) will check with upstream whether these bugs are already fixed? Meanwhile, I see no reason why we could not do a local fix. --------------030108040104080601000702 Content-Type: text/x-diff; name="fix-ofed-warn-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix-ofed-warn-1.diff" Index: sys/conf/kern.pre.mk =================================================================== --- sys/conf/kern.pre.mk (revision 242861) +++ sys/conf/kern.pre.mk (working copy) @@ -156,7 +156,7 @@ NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU] # Infiniband C flags. Correct include paths and omit errors that linux # does not honor. OFEDINCLUDES= -I$S/ofed/include/ -OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions -Wno-switch -Wno-sometimes-uninitialized -Wno-conversion -Wno-initializer-overrides +OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions OFEDCFLAGS= ${CFLAGS:N-I*} ${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR} OFED_C_NOIMP= ${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} ${PROF} OFED_C= ${OFED_C_NOIMP} ${.IMPSRC} Index: sys/modules/mthca/Makefile =================================================================== --- sys/modules/mthca/Makefile (revision 242861) +++ sys/modules/mthca/Makefile (working copy) @@ -28,4 +28,4 @@ opt_inet6.h: .include -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions -Wno-switch -Wno-sometimes-uninitialized -Wno-conversion -Wno-initializer-overrides +CFLAGS+= -Wno-cast-qual -Wno-pointer-arith -fms-extensions Index: sys/ofed/drivers/infiniband/core/cma.c =================================================================== --- sys/ofed/drivers/infiniband/core/cma.c (revision 242861) +++ sys/ofed/drivers/infiniband/core/cma.c (working copy) @@ -1312,7 +1312,7 @@ static int cma_iw_handler(struct iw_cm_id *iw_id, *sin = iw_event->local_addr; sin = (struct sockaddr_in *) &id_priv->id.route.addr.dst_addr; *sin = iw_event->remote_addr; - switch (iw_event->status) { + switch ((int)iw_event->status) { case 0: event.event = RDMA_CM_EVENT_ESTABLISHED; break; Index: sys/ofed/drivers/infiniband/core/ud_header.c =================================================================== --- sys/ofed/drivers/infiniband/core/ud_header.c (revision 242861) +++ sys/ofed/drivers/infiniband/core/ud_header.c (working copy) @@ -230,7 +230,7 @@ void ib_ud_header_init(int payload_bytes int immediate_present, struct ib_ud_header *header) { - u16 packet_length; + u16 packet_length = 0; memset(header, 0, sizeof *header); Index: sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c =================================================================== --- sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c (revision 242861) +++ sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c (working copy) @@ -590,7 +590,7 @@ sdp_rx_comp_work(struct work_struct *work) if (unlikely(!ssk->poll_cq)) { struct rdma_cm_id *id = ssk->id; if (id && id->qp) - rdma_notify(id, RDMA_CM_EVENT_ESTABLISHED); + rdma_notify(id, IB_EVENT_COMM_EST); goto out; } Index: sys/ofed/include/linux/pci.h =================================================================== --- sys/ofed/include/linux/pci.h (revision 242861) +++ sys/ofed/include/linux/pci.h (working copy) @@ -73,10 +73,12 @@ struct pci_device_id { #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 -#define PCI_VDEVICE(vendor, device) \ - PCI_VENDOR_ID_##vendor, (device), PCI_ANY_ID, PCI_ANY_ID, 0, 0 -#define PCI_DEVICE(vendor, device) \ - (vendor), (device), PCI_ANY_ID, PCI_ANY_ID, 0, 0 +#define PCI_VDEVICE(_vendor, _device) \ + .vendor = PCI_VENDOR_ID_##_vendor, .device = (_device), \ + .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID +#define PCI_DEVICE(_vendor, _device) \ + .vendor = (_vendor), .device = (_device), \ + .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID #define to_pci_dev(n) container_of(n, struct pci_dev, dev) --------------030108040104080601000702--