From owner-freebsd-net@FreeBSD.ORG Sun Jan 3 14:54:35 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 93161106566C for ; Sun, 3 Jan 2010 14:54:35 +0000 (UTC) (envelope-from Michael.Tuexen@lurchi.franken.de) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id B0D4E8FC0C for ; Sun, 3 Jan 2010 14:54:33 +0000 (UTC) Received: from [192.168.1.190] (p508FE5E5.dip.t-dialin.net [80.143.229.229]) by mail-n.franken.de (Postfix) with ESMTP id 8D19A1C0C0BEA; Sun, 3 Jan 2010 15:54:32 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=iso-8859-1 From: =?iso-8859-1?Q?Michael_T=FCxen?= In-Reply-To: Date: Sun, 3 Jan 2010 15:54:31 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <133FB4C8-AF96-4CBC-8291-2325592AB628@lurchi.franken.de> References: <969646.48748.qm@web63905.mail.re1.yahoo.com> To: =?iso-8859-1?Q?Michael_T=FCxen?= X-Mailer: Apple Mail (2.1077) Cc: Barney Cordoba , jfvogel@gmail.com, freebsd-net@freebsd.org Subject: Re: igb interrupt moderation 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: Sun, 03 Jan 2010 14:54:35 -0000 Dear all, I just figured out that there is a newer version of the spec available: 2.45. Some of the issues as indicated inline are already resolved.=20 Best regards Michael On Jan 3, 2010, at 2:55 PM, Michael T=FCxen wrote: > Hi Barney, Hi Jack, >=20 > some comments and some more questions inside... >=20 > Best regards > Michael >=20 > On Jan 2, 2010, at 8:42 PM, Barney Cordoba wrote: >=20 >> Jack, >>=20 >> I'm trying to get some clarification on differences I'm finding = between >> the 82575 and 82576 parts with respect to interrupt moderation. The = spec >> I have for the 82576 (82576_Datasheet_v2p1.pdf) indicates that the=20 > I'm only commenting 82576. You can get rev 2.41 from intels website... It is really 2.45 now >>=20 >> ITR algorithm is different than the one used (I don't have one of the >> secret copies of the 82575 spec). The algorithm shown is >>=20 >> interrupts/sec =3D 1/(2 * 10-6sec x interval) (page 295, Section = 7.3.4) >>=20 >> which is clearly wrong from practice. I have an 82576 (device id = 10C9) > If you look at section 8.8.12, you find other formulas... > Jack: Which ones are correct? The formulas is 8.8.12 are gone. Issue resolved. >> if I use the 125d setting in the example get just under 32000 = interrupts >> per second. Clearly your code doesnt implement this, nor do you have >> different settings for the 82575 and 82576 parts. So I assume that = the=20 >> same formula for the em parts hold for the igb parts, and that the=20 >> datasheet is wrong? >>=20 >> There does seem to be a slight difference. The setting that gets 1000 >> ints/second on the 82575 generates about 1020 on the 82576. Not a big >> deal but I wonder why there's a difference? Is the reference clock = for >> these something that may not be fixed and could vary from board to=20 >> board? Note that both devices are on the same MB. >>=20 >> Also, it seems that settings to EITR over 32767 wrap on the 82576 = (for >> example writing 32768 to EITR is the same as writing a 1). So the = minimum setting on the 82576 is around 125 ints/second. The 82575 can = accept=20 >> values up the 65535 before wrapping.=20 > Hmm, looking at the table in 8.8.12 would suggest: > Setting it to one sets a reserved bit, but does not change the = interval. > Setting it to 2^15 should set the LLI_EN bit, but does not change in = interval. >=20 > Jack is setting the register to > igb_low_latency: 128 > igb_ave_latency: 450 > igb_bulk_latency: 1200 >=20 > This would result in intervals of: > igb_low_latency: 32 > igb_ave_latency: 112 > igb_bulk_latency: 300 > Jack: What are the corresponding interrupt rates? The spec provides = different > formulas and talks about a 1us, 2us or 8us counter. Not sure what = is right... The interrupt rates are according to the formula in the spec igb_low_latency: 31250 igb_ave_latency: 8929 igb_bulk_latency: 3333 Jack: Is this right? > Jack: Why are you setting bit1 (which is reserved) in the case = igb_ave_latency? Still valid. >=20 > And another question for Jack: > In igb_update_aim() you do > if (olditr !=3D newitr) { > /* Change interrupt rate */ > rxr->eitr_setting =3D newitr; > E1000_WRITE_REG(&adapter->hw, E1000_EITR(rxr->me), > newitr | (newitr << 16)); > } > So why are setting the higher bits of the EITR? You are setting > igb_low_latency: the LL Counter becomes 0, the moderation counter = becomes 16 > igb_ave_latency: the LL Counter becomes 2, the moderation counter = becomes 56 > igb_bulk_latency: the LL Counter becomes 16, the moderation counter = becomes 148 Still valid. >=20 > I really do not understand these settings. Maybe the spec is wrong? Or = you do mean > if (olditr !=3D newitr) { > /* Change interrupt rate */ > rxr->eitr_setting =3D newitr; > E1000_WRITE_REG(&adapter->hw, E1000_EITR(rxr->me), = newitr); > } > Or do you want to preserve the counters, set the CNT_INGR bit and mean > if (olditr !=3D newitr) { > /* Change interrupt rate */ > rxr->eitr_setting =3D newitr; > E1000_WRITE_REG(&adapter->hw, E1000_EITR(rxr->me), = 0x80000000 | newitr); > } >=20 > Could you clarify that? Still valid. >>=20 >> The 82576 document doesn't have a map of the register that I can = find, so >> Im curious as to whether these observations are something I can = assume is >> true across all parts and motherboards/cards, or is there some >> implementation variance that will cause these to only apply to the = ones >> I happen to be testing? >>=20 >> Thanks, >>=20 >> Barney >>=20 >>=20 >>=20 >>=20 >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to = "freebsd-net-unsubscribe@freebsd.org" >>=20 >=20 > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >=20