From owner-freebsd-net@freebsd.org Wed Mar 25 22:53:28 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FF9A265E6C for ; Wed, 25 Mar 2020 22:53:28 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48nk1M3FQFz41KC; Wed, 25 Mar 2020 22:53:27 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1jHEtX-0004yH-JW; Thu, 26 Mar 2020 01:53:07 +0300 Date: Thu, 26 Mar 2020 01:53:07 +0300 From: Slawa Olhovchenkov To: Vincenzo Maffione Cc: Alexandre Snarskii , "freebsd-net@freebsd.org" Subject: Re: netmap/ixl and crc addition.. Message-ID: <20200325225307.GM8028@zxy.spb.ru> References: <20200324123721.GA26248@staff.retn.net> <20200324140839.GB26248@staff.retn.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 48nk1M3FQFz41KC X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 22:53:28 -0000 On Wed, Mar 25, 2020 at 11:31:30PM +0100, Vincenzo Maffione wrote: > Hi Alexandre, > Thanks. Your patch looks good to me. I assume you have tested it? > I will commit that to stable/11. > > The issue you report on stable/12 is more worrisome. The 'no space in TX > ring' condition (head==cur==tail) is ok per-se: on a subsequent poll() > wakeup (e.g. TX interrupt) or explicit ioctl(NIOCTXSYNC) you should see > tail moving forward, therefore freeing some space to be used in the ring. > However, the ring_reinit means that something is going wrong: either your > application is using the TX ring incorrectly, or there is a bug in the > netmap iflib code. Since FreeBSD 12, netmap support is provided by iflib, > while before netmap support was provided directly by the ixl driver. > In any case, it would probably help if you could provide some more detailed > info (how to reproduce the problem). Just run pkt-gen for transmit. The conditions is guaranteed to occur (for me, at least).