From owner-freebsd-net@freebsd.org Fri Mar 30 04:00:30 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 368D5F6DA99 for ; Fri, 30 Mar 2018 04:00:30 +0000 (UTC) (envelope-from Ming.Fu@esentire.com) Received: from mail.esentire.com (mail.esentire.com [52.129.34.132]) (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 CB13C74933 for ; Fri, 30 Mar 2018 04:00:29 +0000 (UTC) (envelope-from Ming.Fu@esentire.com) Received: from exchange.esentire.com (cas01cmb01p.internal [10.1.120.116]) by mail.esentire.com (Postfix) with ESMTPS id DCFA3180C13 for ; Fri, 30 Mar 2018 04:00:16 +0000 (UTC) Received: from mbx01cmb01p.esentire.local (10.1.120.118) by mbx02cmb01p.esentire.local (10.1.120.125) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Fri, 30 Mar 2018 00:00:16 -0400 Received: from mbx01cmb01p.esentire.local ([fe80::c159:1a2d:8a3:d44b]) by mbx01cmb01p.esentire.local ([fe80::c159:1a2d:8a3:d44b%14]) with mapi id 15.00.1365.000; Fri, 30 Mar 2018 00:00:16 -0400 From: Ming Fu To: "freebsd-net@freebsd.org" Subject: netmap: How the buf_num of buffers is used by driver and monitor app Thread-Topic: netmap: How the buf_num of buffers is used by driver and monitor app Thread-Index: AdPH2el7Gg10RcF+QIGs5CCTcZiD5Q== Date: Fri, 30 Mar 2018 04:00:15 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.1.120.131] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2018 04:00:30 -0000 Hi, I am wondering about the netmap module parameters buf_num. The default buf_= num 163840 seems fairly big compare to intel 10G ixgbe of max 4096 queue si= ze. A full queue of the interface can only use a very small portion of the = buf_num. Can the netmap enabled driver like ixgbe use more buffers than the= "ethtool -G" configured rx/tx queue size? I need to feed packages captured from netmap device to a few traffic monito= rs on the same box. The monitor application attach to the device as netmap = monitor with the /r at the end of device name. My question is if the primar= y read of the device calls poll(), the netmap buffer is synced with the ker= nel. Can the other monitor application still access the packet that the pri= mary read just returned to the kernel? If one of the monitor on the netmap = device is slow, will it cause trouble for the primary reader and other moni= tors? How can I cache a lot of packets in the buffer in case one of the mon= itor application had a temporary slow down? Thanks, Ming