From owner-freebsd-net@FreeBSD.ORG Fri Dec 29 13:01:22 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 46E4216A403 for ; Fri, 29 Dec 2006 13:01:22 +0000 (UTC) (envelope-from tanniru.sankar@wipro.com) Received: from wip-ectls-mx1.wipro.com (wip-ectls-mx1.wipro.com [203.91.193.21]) by mx1.freebsd.org (Postfix) with ESMTP id A6A9F13C46B for ; Fri, 29 Dec 2006 13:01:21 +0000 (UTC) (envelope-from tanniru.sankar@wipro.com) Received: from wip-ectls-mx1.wipro.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id 72D8922058B; Fri, 29 Dec 2006 12:10:48 +0530 (IST) Received: from blr-ec-bh01.wipro.com (blr-ec-bh01.wipro.com [10.201.50.91]) by wip-ectls-mx1.wipro.com (Postfix) with ESMTP id 66F2222017A; Fri, 29 Dec 2006 12:10:48 +0530 (IST) Received: from blr-m3-msg.wipro.com ([10.114.50.99]) by blr-ec-bh01.wipro.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 29 Dec 2006 12:10:48 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 29 Dec 2006 12:13:08 +0530 Message-ID: <8B9F8433B684734581EB519F1A3E5AF43D88A5@blr-m3-msg.wipro.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: ' bus_dmamap_load_mbuf_sg ( ) ' function usage problem Thread-Index: Acci5g/dMWkrdRXJRd2tArne+O331AILkL8g From: To: X-OriginalArrivalTime: 29 Dec 2006 06:40:48.0437 (UTC) FILETIME=[466F0650:01C72B14] 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 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 13:01:22 -0000 =20 Hi Mark, Is it possible to allocate contigous memory of MJUM9BYTES ( 9K ) and dmamap_load in one segment ?=20 =20 Thanks, Sankar =20 =20 =20 -----Original Message----- From: John-Mark Gurney [mailto:gurney_j@resnet.uoregon.edu]=20 Sent: Tuesday, December 19, 2006 2:19 AM To: Tanniru Sankar (WT01 - Computing Systems & Storage) Cc: freebsd-net@freebsd.org Subject: Re: ' bus_dmamap_load_mbuf_sg ( ) ' function usage problem 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. > =20 > It is AMD 64 bit machine. I have allocated jumbo buffer memory=20 > using ' m_getcl ' function. > =20 > mp =3D m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); > =20 > As it got success here, I am trying to map the buffer as below. > =20 > err =3D bus_dmamap_load_mbuf_sg(dma_tag_rx, map, mp, &seg, &cnt,=20 > BUS_DMA_NOWAIT); > =20 > Here it is getting error for the mbuf size equal to MJUM9BYTES. > The type of error is ' EFBIG '. > =20 > I have create rx jumbo dma tag with attributes as following. [...] > MJUM9BYTES, /* Maximum Size */ >=20 > 1 , /* Number of Segments */ >=20 > 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... --=20 John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and= may contain proprietary, confidential or privileged information. If you= are not the intended recipient, you should not disseminate, distribute or= copy this e-mail. Please notify the sender immediately and destroy all= copies of this message and any attachments.=20 WARNING: Computer viruses can be transmitted via email. The recipient= should check this email and any attachments for the presence of viruses.= The company accepts no liability for any damage caused by any virus= transmitted by this email. =20 www.wipro.com