From owner-freebsd-net@FreeBSD.ORG Mon Dec 18 21:11:52 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B52316A403 for ; Mon, 18 Dec 2006 21:11:52 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52E0143CA3 for ; Mon, 18 Dec 2006 21:11:51 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (uzfgi6uufgz8n3ue@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id kBIKmuZr037222; Mon, 18 Dec 2006 12:48:56 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id kBIKmuS5037221; Mon, 18 Dec 2006 12:48:56 -0800 (PST) (envelope-from jmg) Date: Mon, 18 Dec 2006 12:48:56 -0800 From: John-Mark Gurney To: tanniru.sankar@wipro.com Message-ID: <20061218204856.GC1350@funkthat.com> Mail-Followup-To: tanniru.sankar@wipro.com, freebsd-net@freebsd.org References: <8B9F8433B684734581EB519F1A3E5AF436CC6A@blr-m3-msg.wipro.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8B9F8433B684734581EB519F1A3E5AF436CC6A@blr-m3-msg.wipro.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-net@freebsd.org Subject: Re: ' bus_dmamap_load_mbuf_sg ( ) ' function usage problem X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Dec 2006 21:11:52 -0000 tanniru.sankar@wipro.com wrote this message on Mon, Dec 18, 2006 at 20:05 +0530: > I am facing a problem on FreeBSD 7.0 during mapping using ' > bus_dmamap_load_mbuf_sg ( ) ' function . > Details are below. > > It is AMD 64 bit machine. I have allocated jumbo buffer memory using > ' m_getcl ' function. > > mp = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); > > As it got success here, I am trying to map the buffer as below. > > err = bus_dmamap_load_mbuf_sg(dma_tag_rx, map, mp, &seg, &cnt, > BUS_DMA_NOWAIT); > > Here it is getting error for the mbuf size equal to MJUM9BYTES. > The type of error is ' EFBIG '. > > I have create rx jumbo dma tag with attributes as following. [...] > MJUM9BYTES, /* Maximum Size */ > > 1 , /* Number of Segments */ > > MJUM9BYTES, /* Maximum Segment Size */ This is probably the problem... Most likely the buffer is non-contiguous in memory, and needs 3 segments to satisfy the mapping... Try increasing the number of segments and see what happens... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."