From owner-freebsd-stable@FreeBSD.ORG Sun Jul 7 17:10:44 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 23A1CF8B for ; Sun, 7 Jul 2013 17:10:44 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-vc0-x22a.google.com (mail-vc0-x22a.google.com [IPv6:2607:f8b0:400c:c03::22a]) by mx1.freebsd.org (Postfix) with ESMTP id DC22F1C66 for ; Sun, 7 Jul 2013 17:10:43 +0000 (UTC) Received: by mail-vc0-f170.google.com with SMTP id hf12so2745343vcb.15 for ; Sun, 07 Jul 2013 10:10:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Y2ENQCxOjIir3SxA6WVeXn2dMgw+NYzGyr5qVQVsEqc=; b=pPZzXXN/7xo2kbzRn1UjGnvQHkwxYShpnFoXODVtycN99NvmAnu06CDwavU7RmB+33 ump9vbRt1GzATELC33Yqvrssw9yM9QiKU9gRw1wY9xWGKr5yTvWspntL1FDTWz79inFB mrMynNvXtjsvh/50wxLG4gvivVMbrUljFmZF8+4LXsZxTXIOqaeO/mJ4imQ1WbJv0eh6 4iDhlu9nwfvujuy2iUImfjtI5sQpZ0Q46bodFqeqKcMAp9WvRsUssex/HZDqEOKC7mtC 8RB7I50lAFlzDQeD1tHU679QrrOkeJKLCPc41d0VOs6GRzIScshgc/JmxoOztMT50ERJ ja9Q== MIME-Version: 1.0 X-Received: by 10.52.228.226 with SMTP id sl2mr10187172vdc.52.1373217043441; Sun, 07 Jul 2013 10:10:43 -0700 (PDT) Received: by 10.220.52.200 with HTTP; Sun, 7 Jul 2013 10:10:43 -0700 (PDT) In-Reply-To: References: Date: Sun, 7 Jul 2013 10:10:43 -0700 Message-ID: Subject: Re: ixgbe Jumbo race condition leading to Deadlock From: Jack Vogel To: Kaushal Bhandankar Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 17:10:44 -0000 The "potential race condition" as the data sheet puts it, is only when you are trying to manage your RX ring by reading the RDH register, this is a bad idea anyway, none of our (Intel) drivers do this. Using the DD bit is what you want to do. The DD bit is set when the descriptor is written back, and that happens when the DMA is complete. The packet is incomplete until the descriptor with EOP set, in my code an mbuf chain is created, and as each new descriptor is processed the pointer to the head of the whole chain is kept in rxbuf->fmp, thus when you get to the EOP descriptor you will be ready to send the whole chain to the stack. Its good that you are using ONEBUF since packet split has hardware issues on 82599. Are you developing a new driver, or simply having issues using mine? Regards, Jack On Sun, Jul 7, 2013 at 2:24 AM, Kaushal Bhandankar wrote: > In 82599, for a Jumbo packet of 9.5 K ( which consumes 5 descriptors of > 2048 bytes each ), when does the Descriptor write back happen ? Does it > happen per Descriptor or once per aggregated Descriptors ? Is it possible > that all descriptors except last one to be written back and when you read > RDH register, I get the last pending descriptor waiting inside 82599. > We are using srrctl |= IXGBE_SRRCTL_DESCTYPE_ADV_ONEBUF; > > In my setup, I am seeing that, I don't see EOP set even when I read 5 > descriptors. Checking DD will return me an incomplete packet. What should I > do in such a case ? > > References from Data sheet: > -> Checking through DD bits eliminates a potential race condition: all > descriptor data is posted internally prior to incrementing the head > register and a read of the head register could potentially pass the > descriptor waiting inside the 82599. > > Regards, > Kaushal > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >