From owner-freebsd-virtualization@FreeBSD.ORG Tue Mar 16 14:29:50 2010 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A23B1065672 for ; Tue, 16 Mar 2010 14:29:50 +0000 (UTC) (envelope-from freebsd-virtualization@dino.sk) Received: from loki.netlab.sk (ns3.netlab.sk [84.245.65.11]) by mx1.freebsd.org (Postfix) with ESMTP id A89F98FC25 for ; Tue, 16 Mar 2010 14:29:49 +0000 (UTC) Received: from via.dino.sk (fw1.dino.sk [84.245.95.252]) (AUTH: PLAIN milan, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by loki.netlab.sk with esmtp; Tue, 16 Mar 2010 15:28:29 +0100 id 0002E12C.4B9F958D.000053CA From: Milan Obuch To: freebsd-virtualization@freebsd.org Date: Tue, 16 Mar 2010 15:29:32 +0100 User-Agent: KMail/1.9.10 References: <201003161455.43783.freebsd-virtualization@dino.sk> In-Reply-To: <201003161455.43783.freebsd-virtualization@dino.sk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201003161529.33273.freebsd-virtualization@dino.sk> Subject: Re: shmget and vimage X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 14:29:50 -0000 On Tuesday 16 March 2010 14:55:43 Milan Obuch wrote: > Hi, > > some time ago I built a multi network monitor using older version with > Marko Zec's vimage patch. I am trying to port it to 8-STABLE (newer > features, easier maintenance...) with partial success. > > Basically, I use shared memory as common data area across more vimages in > order to be able to generate quick summaries from in-memory data. I was not > able to get it running under freshly compiler 8-STABLE, error message is > > shmget: Function not implemented > > Has anybody any idea? Patch to test to enable use of shared memory in vnet > jails? > > Regards, > Milan > Forget to add... In my code, I use if ((shmid = shmget(shmkey,sizeof(mdc),IPC_CREAT | 0640)) == -1) err(1,"shmget"); to create a shared segment and if ((shmid = shmget(shmkey,sizeof(mdc),0)) == -1) err(1,"shmget"); to get an id for already created segment. Both are failing under non-root vimage jail, but it works under main host. At first I thought shared memory is not yet virtualized, but ipcs display existing segments in both root/main host and vnet jail.ipcrm, however, works only in non-jailed host... ipcrm: shmid(131072): : Function not implemented Regards, Milan