Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Dec 2010 19:53:16 -0800 (PST)
From:      abcde abcde <abcde0@yahoo.com>
To:        freebsd-net@freebsd.org
Subject:   nfe_defrag() routine in nividia ethernet driver
Message-ID:  <808782.86181.qm@web53807.mail.re2.yahoo.com>

next in thread | raw e-mail | index | archive | help
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      



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?808782.86181.qm>