From owner-freebsd-net@freebsd.org Thu Apr 28 19:15:06 2016 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 413F9B203AB for ; Thu, 28 Apr 2016 19:15:06 +0000 (UTC) (envelope-from bazzoola@gmail.com) Received: from mail-pa0-x244.google.com (mail-pa0-x244.google.com [IPv6:2607:f8b0:400e:c03::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12AFF14CC; Thu, 28 Apr 2016 19:15:06 +0000 (UTC) (envelope-from bazzoola@gmail.com) Received: by mail-pa0-x244.google.com with SMTP id i5so10185097pag.3; Thu, 28 Apr 2016 12:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=2YJci7qlV4wYV9Ljybq+rMvyPFPsZYl0Vs461SM0Ruc=; b=kzOmUicTD9yWPBYU5Wk0vKLOe68bYUvVGk8sSLCNf4A6MhzT1d0SYGl+L+xqybF3s4 H/5INe0hMagJLJd/3mfgxZNm1BJGgP74MTGaI2vRH9d0zj4a1l3dSq7JYtbg7PsavXn1 LCinO82K6kldTZy7+AyHuzV9DslZIlUGgC4P4Vj9MbYkQ3QSK3gvfoZZlo4fS17XRvsu fPRVkwd9UmHh7lKRzZg1o51YEgXHJcJlcvTy/uGmSkMcnABNot5fYiGY7MxPSktuzdbF AUuwMiKyfE8N79Q0dveAfcBF3TQqvJEDMBIJb0AM8GyMOqab3zxbN0dDKNFnULdLcOuR EyPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=2YJci7qlV4wYV9Ljybq+rMvyPFPsZYl0Vs461SM0Ruc=; b=H/06fwFGaYkX74SsGSgjbOQdtwDcPpZy9MPQ0bUg1isYDVOWKuXIL+wIOrBx7Ky/Jz hFPMm4VMLOhMCwgYsveVFzu1q7yLFy8pjNl1v6aFhbJ7vY52hOj9wKh/nDeqCYtdGtE9 awA4oBXQxtrLCv8qJnYbc88c3B7/noErF/vY4wT1QxfTC4Q1lNApHJMW0i6ZLyG4Zmye WEOiIIxoIz3ql0wQWouBGpBVwBwNlDCJtUJaMLtrjSty5ZnUaOsYFhTri4ACLx6JAR4h D7+jhYQ2OZJ4wAHt+PbiZIWIWh7786aPeSV+RHe70iLiWhJK9olo704ClOQM7gwDgoqc viFA== X-Gm-Message-State: AOPr4FU3u3DKkGa75fgu3O6/AGqO2spQUFzs2p2aMohQqE9rQqF3t9PoJNBcWqXzytivJA== X-Received: by 10.66.193.161 with SMTP id hp1mr23090525pac.9.1461870905697; Thu, 28 Apr 2016 12:15:05 -0700 (PDT) Received: from ?IPv6:2620:83:8001:24::1:567? ([2620:83:8001:24::1:567]) by smtp.googlemail.com with ESMTPSA id b64sm17057448pfa.48.2016.04.28.12.15.04 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Apr 2016 12:15:05 -0700 (PDT) Subject: Re: netmap overrun counters To: Luigi Rizzo References: <9fd88731-2cdf-a6da-4b4e-f97bb120696a@FreeBSD.org> <863506de-870e-0da4-81d3-6ab537feaa2b@gmail.com> Cc: Navdeep Parhar , "freebsd-net@freebsd.org" From: bazzoola Message-ID: Date: Thu, 28 Apr 2016 12:15:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2016 19:15:06 -0000 On 04/28/2016 12:06 PM, Luigi Rizzo wrote: > > > On Thursday, April 28, 2016, bazzoola > wrote: > > > > On 04/28/2016 11:35 AM, Navdeep Parhar wrote: > > On 04/28/2016 11:13, bazzoola wrote: > >> Hi! > >> > >> Two questions: > >> > >> (1) Is there a way to know when netmap rx rings overrun? Most NIC > >> drivers provide MPC (missed packet count) and sysctl for rx_overrun. > >> > >> I would like to know if my application is not reading as fast, > i.e., no > >> frames are being dropped. > > > > A NIC's hardware counters don't distinguish between netmap or normal > > operation so you can monitor the existing sysctls for rx > drops/overruns. > > > > Regards, > > Navdeep > > > > Navdeep, > > I am not asking about NIC's ring overrun. As you know netmap has its own > rings. Is there a way to know if netmap's rx ring overrun? > > > Overruns by definition can only be counted by the NIC > > Cheers > Luigi > > Luigi, I will rephrase the question to avoid the 'overrun' definition. (1) if my application is not reading fast enough is there a way to know if netmap's rx ring starts overwriting unread slots? Also, my section question was: (2) What is the benefit of NETMAP_DO_RX_POLL? I do see the slots being updated when I set this flag but 'tail' is not advancing unless I read. Basically, all I am trying to do is detect if frames are dropped in my application using netmap API. Thanks! B.