From owner-freebsd-net@FreeBSD.ORG Mon Sep 17 12:51:29 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CDB80106566B for ; Mon, 17 Sep 2012 12:51:29 +0000 (UTC) (envelope-from ivsan@ngs.ru) Received: from smtpout.ngs.ru (smtpout25.ngs.ru [195.19.71.8]) by mx1.freebsd.org (Postfix) with ESMTP id 694AC8FC08 for ; Mon, 17 Sep 2012 12:51:28 +0000 (UTC) Received: from mx14.intranet.ru (mx14.intranet.ru [172.16.7.2]) by mail.ngs.ru (smtp) with ESMTP id BF6F620CB10 for ; Mon, 17 Sep 2012 19:51:24 +0700 (NOVT) Received: from mx16.intranet.ru (mx16.intranet.ru [172.16.7.4]) by mx14.intranet.ru (mx14.intranet.ru) with ESMTP id B0AD8FB6A for ; Mon, 17 Sep 2012 19:51:24 +0700 (NOVT) Received: from [80.242.66.33] (account ivsan@ngs.ru) by mx16.intranet.ru (CommuniGate Pro WebUser 4.3.11) with HTTP id 25262422 for freebsd-net@freebsd.org; Mon, 17 Sep 2012 19:51:24 +0700 From: "Ivan Alexandrovich" To: freebsd-net@freebsd.org Date: Mon, 17 Sep 2012 19:51:24 +0700 Message-ID: In-Reply-To: References: <50564BE9.6050104@sentex.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit X-SpamTest-Envelope-From: ivsan@ngs.ru X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: NOTSPAM X-SpamTest-Info: Profiles 36718 [Sep 17 2012] X-SpamTest-Method: none X-SpamTest-Rate: 0 X-SpamTest-Status-Extended: not_detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0284], KAS30/Release Subject: Re: getting counters for a plenty of vlan ifaces X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 12:51:29 -0000 Hi Thanks for your replies. Mike Tancsa mike at sentex.net wrote: > We approach it a little differently and collect all the data via > netflow, or in this case argus. Netflow is fine. We used ng_netflow with ng_vlan on a previous installation with FreeBSD-6.x and it worked fine. Then we had to drop it as a safety measure since the hardware itself was slow and once failed to sustain anomalous packet rate the during packet storm. Currently that's enough for us to have ipt_NETFLOW (linux) on a border router and some service-specific RDRs from SCE. Zaphod Beeblebrox zbeeble at gmail.com wrote > It strikes me that a little kernel module that provided a kernel call > that (when called) walked the list of interfaces (in kernel) building > a table as described and then shipping that table to userland in one > go would be exceedingly cheep to call. Custom syscall? Thanks for the idea, i'll try. Would freebsd-net be the right place to ask specific questions concerning in-kernel data structures? Adrian Chadd adrian at freebsd.org wrote: > you just have to make sure you get the locking right. Thanks, I'll try. And what will be the right way to ensure the code is smp safe before taking it into production? Run a few scripts that will continuosly create/destroy vlans? Thanks, Ivan