From owner-freebsd-current@freebsd.org Mon Jan 29 17:54:49 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2CA2ED4A00 for ; Mon, 29 Jan 2018 17:54:49 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CC7D7DCA2 for ; Mon, 29 Jan 2018 17:54:48 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 78c11014-051d-11e8-bb8e-b35b57339d60 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 78c11014-051d-11e8-bb8e-b35b57339d60; Mon, 29 Jan 2018 17:54:37 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w0THse1D005193; Mon, 29 Jan 2018 10:54:40 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1517248480.1517.12.camel@freebsd.org> Subject: Re: Error compiling isboot-kmod From: Ian Lepore To: John Nielsen Cc: freebsd-current , Warner Losh , Maurizio Vairani Date: Mon, 29 Jan 2018 10:54:40 -0700 In-Reply-To: <8C0D755C-5DD8-40BE-A0F8-180152A0BF84@jnielsen.net> References: <9D0C6C9E-3020-4EC0-97AF-6498FB7356C7@jnielsen.net> <1516988137.42536.255.camel@freebsd.org> <09C92929-BC36-4C75-A2F2-0607C9701D40@jnielsen.net> <1517070032.84051.6.camel@freebsd.org> <8C0D755C-5DD8-40BE-A0F8-180152A0BF84@jnielsen.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2018 17:54:49 -0000 On Mon, 2018-01-29 at 10:29 -0700, John Nielsen wrote: > > > > On Jan 27, 2018, at 9:20 AM, Ian Lepore wrote: > > > > On Fri, 2018-01-26 at 23:20 -0700, John Nielsen wrote: > > > > > > > > > > > > > > > On Jan 26, 2018, at 9:42 PM, John Nielsen > > > > wrote: > > > > > > > > > > > > > > > > > > > [...] > > > > --- iscsi.o --- > > > > iscsi.c:1146:3: error: incompatible pointer types passing 'void > > > > (struct mbuf *, void *, void *)' to parameter of type > > > > 'm_ext_free_t *' (aka 'void (*)(struct mbuf *)') [-Werror,- > > > > Wincompatible-pointer-types] > > > >                MEXTADD(md, (caddr_t)ds_dd, (ISCSI_ALIGN(pp- > > > > >ds_len) > > > >                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > ~~~~ > > > > /usr/src/sys/sys/mbuf.h:887:42: note: expanded from macro > > > > 'MEXTADD' > > > >    m_extadd((m), (char *)(buf), (size), (free), (arg1), > > > > (arg2),        \ > > > >                                         ^~~~~~ > > > > /usr/src/sys/sys/mbuf.h:634:59: note: passing argument to > > > > parameter here > > > > void             m_extadd(struct mbuf *, char *, u_int, > > > > m_ext_free_t, > > > Looks like iscsi.c needs to be fixed up following r324446 > > > (https://svnweb.freebsd.org/changeset/base/324446). Starting to > > > be > > > out of my depth unless there's a mechanical way to make the > > > changes? > > I'm not set up to test-compile this against -current right now, so > > I'm > > not sure if this is all that remains or just another breadcrumb on > > the > > trail, but... try the attached patch. > > > > -- Ian > > --- iscsi.c.orig 2018-01-27 08:43:26.937858000 -0700 > > +++ iscsi.c 2018-01-27 09:15:39.631501000 -0700 > > @@ -1071,17 +1071,23 @@ > > } > > > > > > -#if __FreeBSD_version >= 1100000 > > +#if __FreeBSD_version >= 1200051 > > +static void > > +isboot_free_mbufext(struct mbuf *m) > > +{ > > + void *p = m->m_ext.ext_arg1; > > +#elif __FreeBSD_version >= 1100000 > > static void > > isboot_free_mbufext(struct mbuf *m, void *p, void *optarg) > > #elif __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000 > > static int > > isboot_free_mbufext(struct mbuf *m, void *p, void *optarg) > > +{ > > #else > > static void > > isboot_free_mbufext(void *p, void *optarg) > > -#endif > > { > > +#endif > Thanks Ian. I think I ran in to a copy/paste issue on my end with the > above but I can compile with this similar patch. Is it functionally > equivalent to yours? > > --- iscsi.c.orig 2015-11-05 09:50:51.000000000 -0700 > +++ iscsi.c 2018-01-29 10:20:00.586277000 -0700 > @@ -1070,9 +1070,11 @@ >   return (n); >  } >   > - > -#if __FreeBSD_version >= 1100000 > +#if __FreeBSD_version >= 1200051 >  static void > +isboot_free_mbufext(struct mbuf *m) > +#elif __FreeBSD_version >= 1100000 > +static void >  isboot_free_mbufext(struct mbuf *m, void *p, void *optarg) >  #elif __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000 >  static int > @@ -1082,7 +1084,9 @@ >  isboot_free_mbufext(void *p, void *optarg) >  #endif >  { > - > +#if __FreeBSD_version >= 1200051 > + void *p = m->m_ext.ext_arg1; > +#endif >   ISBOOT_TRACE("isboot_free_mbufext\n"); >   if (p == NULL) >  #if __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000 Yeah, that looks the same.  But someone else reported that once you get it to compile, it crashes at runtime, not necessarily in a way that involves this part of the code.  I probably can't help much with that, I don't know anything about iscsi, and don't have a setup for testing. -- Ian