From owner-freebsd-net@freebsd.org Wed Oct 25 21:14:28 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69ACFE548F8 for ; Wed, 25 Oct 2017 21:14:28 +0000 (UTC) (envelope-from aspam@cox.net) Received: from fed1rmwml107.cox.net (fed1rmwml107.cox.net [68.230.241.177]) by mx1.freebsd.org (Postfix) with ESMTP id 49A4C82852 for ; Wed, 25 Oct 2017 21:14:28 +0000 (UTC) (envelope-from aspam@cox.net) Received: from eastrmimpo110.cox.net ([68.230.241.223]) by eastrmfepo203.cox.net (InterMail vM.8.01.05.28 201-2260-151-171-20160122) with ESMTP id <20171025210241.GSDQ4081.eastrmfepo203.cox.net@eastrmimpo110.cox.net> for ; Wed, 25 Oct 2017 17:02:41 -0400 Received: from thunder.sweets ([68.100.138.62]) by eastrmimpo110.cox.net with cox id Rx2h1w00F1LxgH801x2hhz; Wed, 25 Oct 2017 17:02:41 -0400 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020205.59F0FBF1.013B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=2.2 cv=J/fa1EvS c=1 sm=1 tr=0 a=3mkzfl4ircflX6G+lDqBYw==:117 a=3mkzfl4ircflX6G+lDqBYw==:17 a=8nJEP1OIZ-IA:10 a=x7bEGLp0ZPQA:10 a=02M-m0pO-4AA:10 a=e9ASbk4n0QUA:10 a=5bW0dUBaVq7C9jwtRgUA:9 a=wPNLvfGTeEIA:10 X-CM-Score: 0.00 Authentication-Results: cox.net; none Received: from [10.10.10.15] (thunder.sweets [10.10.10.15]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by thunder.sweets (Postfix) with ESMTP id 1B2EA113FC for ; Wed, 25 Oct 2017 17:02:41 -0400 (EDT) Message-ID: <59F0FBEE.6030008@cox.net> Date: Wed, 25 Oct 2017 17:02:38 -0400 From: Joe Buehler User-Agent: Thunderbird 1.5.0.12 (X11/20120201) MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: virtio_net / netmap RX dropping frames Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 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 Oct 2017 21:14:28 -0000 I am running virtio_net (netmap-modified) on top of netmap (latest) in a KVM virtual machine. The host adapter is Intel 82599ES 10G and the VM is connected to it via macvtap. My test setup is a small program in the VM sending frames out to an external loopback device and watching what comes back. I am running at fairly low frame rates (200k frames / sec) and seeing RX frame drops and high latency (a few milliseconds). The TX frames are all making it to the external loopback device (based on device counters) but the macvtap device in the RX path is reporting dropped frames, the count agreeing with what the test program observes. I guess my first question has to do with ring sizes. The netmap API is reporting 255 buffers in the RX and TX rings. How do I increase this substantially? Joe