From owner-freebsd-net@FreeBSD.ORG Fri Dec 17 04:19:57 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C9D1106564A for ; Fri, 17 Dec 2010 04:19:57 +0000 (UTC) (envelope-from abcde0@yahoo.com) Received: from web53807.mail.re2.yahoo.com (web53807.mail.re2.yahoo.com [206.190.36.202]) by mx1.freebsd.org (Postfix) with SMTP id 0D9C28FC0A for ; Fri, 17 Dec 2010 04:19:56 +0000 (UTC) Received: (qmail 87108 invoked by uid 60001); 17 Dec 2010 03:53:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1292557996; bh=e6ZdfHDcC7piKfK12z7ltkfTjg4bgJ8UzZMIbjPc1Os=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=upCh19MVTM8+eaKIKApjBTtzatT5/PMWNoiArJEQk8EfeGWsHvnY2Z33va/6yluxMt+BbyDbu3T2kIaRyDIf6HHd68qe/nLttuC5M2TJbTIwxS47Tb4DJ7SGEGVBh8Bl407+f575piULQCJHTSgmoG2ptNMwcyvW43q54BaQ7V8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=5NT2YTLfLneWUGFoZWIn8ZvRarNHT7Dnvg/L27qrsW+4hpga4wRtsATTcyYTWZp/GIeUdOLU6hbW2qLoCX22rujZ608TGk51TnBc4IcwmJuwf/sUZ5m8v9roULy/20a2MEgIijxOaIF3mVG1TtdCAzFN4Y8n74ZOMEPETpj7y58=; Message-ID: <808782.86181.qm@web53807.mail.re2.yahoo.com> X-YMail-OSG: OCf5qwAVM1leLCV8JvKL8wr_ts5grjL1qqds1.bWeeNCQ1L dY7IKxfVB4t_ypzE3lnX8DB.g03YqlOHOdoK_xL98pApx2J8dG3eNoWceahp 1p4mPQLaK8TgiMzS9G72Ab92cV3L_QWQKNpN89d_4qD_Q18Fu.ty_E9_WvC_ 3XVh3ys2wjmueXaGCnCu6Evwv5QEHrZD592PrYtF0sXkKu3WKBQjTEzn70Jy xv0MiYUPCFoLR1QXN_Zo4Wv7hGFS6CF063VzYcRCyrEruyTDdfrcQLTjbe6E 4YtWKK_PhSiLm9nSxb06RYm0qwTVK1M7SnXiSQqJw47HPkxiVsrDS80f.g3o Lf7HzoxG6b.AecY9sjGgZL3pmKyyC.5fZXEz2vFNf27MWU58Vv.AVvHMwvKS LYk0q7uCMIYQ- Received: from [71.116.89.13] by web53807.mail.re2.yahoo.com via HTTP; Thu, 16 Dec 2010 19:53:16 PST X-Mailer: YahooMailRC/553 YahooMailWebService/0.8.107.285259 Date: Thu, 16 Dec 2010 19:53:16 -0800 (PST) From: abcde abcde To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: nfe_defrag() routine in nividia ethernet driver 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, 17 Dec 2010 04:19:57 -0000 Hi, we ported the nvidia ethernet driver to our product.=A0 It's been OK un= til =0Arecently we=A0ran into an error condition where packets would get dr= opped quietly. =0AThe root cause resides in the nfe_encap() routine, where = we call nfe_defrag() to =0Atry to reduce the length of the mbuf chain to 32= , if it's longer than 32. In the =0Aevent the 32 mbufs need more than 32 se= gments, the subsequent call to =0Abus_dmamap_load_mbuf_sg() would cause it = to return an error then the packet is =0Asubsequently dropped. =0A=0A=0AMy = questions are,=0A=0A1. there appears to be a generic m_defrag() routine ava= ilable, which doesn't =0Astop at 32 and is used by a couple of other driver= s (Intel, Broadcom, to name a =0Afew). What was the need for a nvidia versi= on of the defrag routine?=0A=0A2. The NFE_MAX_SCATTER constant, which limit= s how many segments can be used, is =0Adefined to be 32, while the correspo= nding constants for other drivers are 100 or =0A64 (again Intel or Broadcom= ). How was the value 32 picked? Anybody knows the =0Areasoning behind them?= =0A=0AThanks,=0Amc =0A=0A=0A