From owner-freebsd-stable@FreeBSD.ORG Fri Sep 10 17:12:23 2010 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FA4C106566C for ; Fri, 10 Sep 2010 17:12:23 +0000 (UTC) (envelope-from mamalos@eng.auth.gr) Received: from vergina.eng.auth.gr (vergina.eng.auth.gr [155.207.18.1]) by mx1.freebsd.org (Postfix) with ESMTP id 174158FC18 for ; Fri, 10 Sep 2010 17:12:22 +0000 (UTC) Received: from mamalacation.ee.auth.gr (mamalacation.ee.auth.gr [155.207.33.29]) by vergina.eng.auth.gr (8.14.3/8.14.1) with ESMTP id o8AHCLxH027393; Fri, 10 Sep 2010 20:12:21 +0300 (EEST) (envelope-from mamalos@eng.auth.gr) Message-ID: <4C8A66EE.4090705@eng.auth.gr> Date: Fri, 10 Sep 2010 20:12:14 +0300 From: George Mamalakis User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100821 Thunderbird/3.1.2 MIME-Version: 1.0 To: pluknet References: <4C8A336D.9080302@eng.auth.gr> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: stable@freebsd.org Subject: Re: AoE driver for FBSD8 or later? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2010 17:12:23 -0000 On 10/09/2010 19:05, pluknet wrote: > On 10 September 2010 17:32, George Mamalakis wrote: >> Hi everybody, >> >> we have a coraid device with 15x1GB disks on it, and would like to use it >> with fbsd8 (zfs, etc). The http://support.coraid.com/support/freebsd/ is >> really outdated, and the port that creates the kernel module does not >> compile on FBSD8 (obviously!). Is there any effort on migrating the driver >> onto fbsd8 or should I plug the coraid on a linux system and use it from >> there? >> > This change below looks obvious to me. > Not sure if this is enough to make it work though. > There are also might be issues with those interfaces which announce > itself as IFT_ETHER, but have NULL if_input. > > # cat files/patch-dev-aoe-aoenet.c > --- aoenet.c.orig 2006-05-25 16:10:11.000000000 +0000 > +++ aoenet.c 2010-09-10 15:03:01.000000000 +0000 > @@ -77,8 +77,11 @@ > #define NECODES (sizeof(aoe_errlist) / sizeof(char *) - 1) > #if (__FreeBSD_version< 600000) > #define IFPADDR(ifp) (((struct arpcom *) (ifp))->ac_enaddr) > +#elif (__FreeBSD_version< 700000) > +#define IFPADDR(ifp) IFP2ENADDR(ifp) > #else > -#define IFPADDR(ifp) IFP2ENADDR(ifp) > +#include > +#define IFPADDR(ifp) IF_LLADDR(ifp) > #endif > #define IFLISTSZ 1024 > > @@ -223,7 +226,11 @@ > > m1->m_ext.ref_cnt = NULL; > MEXTADD(m1, f->f_data, len, nilfn, > +#if (__FreeBSD_version< 800000) > NULL, 0, EXT_NET_DRV); > +#else > + f->f_data, NULL, 0, EXT_NET_DRV); > +#endif > m1->m_len = len; > m1->m_next = NULL; > } > > Hi, and thanx for your quick reply. I patched my workdir on /usr/ports/net/aoe/work/dev/aoe but got the following output, which probably suggests that we may be talking about a different version you and me: [root]# patch -p0 < patch-dev-aoe-aoenet.c Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- aoenet.c.orig 2006-05-25 16:10:11.000000000 +0000 |+++ aoenet.c 2010-09-10 15:03:01.000000000 +0000 -------------------------- Patching file aoenet.c using Plan A... Hunk #1 failed at 77. Hunk #2 failed at 226. 2 out of 2 hunks failed--saving rejects to aoenet.c.rej Hmm... Ignoring the trailing garbage. done After cd'ing into /usr/ports/net/aoe and giving make I got: [root]# make ===> Configuring for aoe-1.2.0_1 ===> Building for aoe-1.2.0_1 ..... ..... aoenet.c:226:24: error: macro "MEXTADD" requires 8 arguments, but only 7 given aoenet.c: In function 'frame_mbufinit': aoenet.c:225: error: 'MEXTADD' undeclared (first use in this function) aoenet.c:225: error: (Each undeclared identifier is reported only once aoenet.c:225: error: for each function it appears in.) cc1: warnings being treated as errors aoenet.c: In function 'aoenet_xmitbcast': aoenet.c:278: warning: implicit declaration of function 'IFP2ENADDR' aoenet.c:278: warning: nested extern declaration of 'IFP2ENADDR' aoenet.c:278: warning: passing argument 2 of 'memcpy' makes pointer from integer without a cast aoenet.c: In function 'aoenet_enaddr': aoenet.c:294: warning: return makes pointer from integer without a cast *** Error code 1 Stop in /usr/ports/net/aoe/work/dev/aoe. *** Error code 1 Stop in /usr/ports/net/aoe. Which was pretty obvious, since not much had been patched... I didn't include the whole output; the missing part is correct compilation parts. Thanx again for your help, and if you could point me into the right source code (or port, whatsoever), I could try your patch and see whether the driver would be built. cheers, mamalos -- George Mamalakis IT Officer Electrical and Computer Engineer (Aristotle Un. of Thessaloniki), MSc (Imperial College of London) Department of Electrical and Computer Engineering Faculty of Engineering Aristotle University of Thessaloniki phone number : +30 (2310) 994379