Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jan 2018 10:54:40 -0700
From:      Ian Lepore <ian@freebsd.org>
To:        John Nielsen <lists@jnielsen.net>
Cc:        freebsd-current <freebsd-current@freebsd.org>, Warner Losh <imp@bsdimp.com>, Maurizio Vairani <maurizio1018@gmail.com>
Subject:   Re: Error compiling isboot-kmod
Message-ID:  <1517248480.1517.12.camel@freebsd.org>
In-Reply-To: <8C0D755C-5DD8-40BE-A0F8-180152A0BF84@jnielsen.net>
References:  <CAN0zgYUEUYDm%2BT3H-hOq%2BQ=N84m3CcNAVz=gXA8e0vxb38Ab4Q@mail.gmail.com> <CANCZdfodgQEFOZhajAvnoGmf%2BZtGq1oC3WAorKOP8EHSLVYiAg@mail.gmail.com> <CAN0zgYXutpiJz7pGUDhEKvB6bB=PvpwoGexctbwvhN7KMofZxQ@mail.gmail.com> <9D0C6C9E-3020-4EC0-97AF-6498FB7356C7@jnielsen.net> <1516988137.42536.255.camel@freebsd.org> <DB16E5CD-16F8-4A77-8CFA-84A0EF06764C@jnielsen.net> <09C92929-BC36-4C75-A2F2-0607C9701D40@jnielsen.net> <1517070032.84051.6.camel@freebsd.org> <8C0D755C-5DD8-40BE-A0F8-180152A0BF84@jnielsen.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2018-01-29 at 10:29 -0700, John Nielsen wrote:
> > 
> > On Jan 27, 2018, at 9:20 AM, Ian Lepore <ian@FreeBSD.org> wrote:
> > 
> > On Fri, 2018-01-26 at 23:20 -0700, John Nielsen wrote:
> > > 
> > > > 
> > > > 
> > > > On Jan 26, 2018, at 9:42 PM, John Nielsen <lists@jnielsen.net>
> > > > 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1517248480.1517.12.camel>