From owner-freebsd-questions@FreeBSD.ORG Mon Nov 17 00:36:13 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6BD51065679 for ; Mon, 17 Nov 2008 00:36:12 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.189]) by mx1.freebsd.org (Postfix) with ESMTP id C5F6F8FC13 for ; Mon, 17 Nov 2008 00:36:11 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by ti-out-0910.google.com with SMTP id a1so1264740tib.3 for ; Sun, 16 Nov 2008 16:36:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:date:from :to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=jIDMSOrG4aDWfmq4oWwb5f6vYzU3OyISAzJKl9oeuCU=; b=Z2Uu2c9Dt3UFZT2+8gQRu/z9ApBH3kzGWqhgXLUlsaMPrpDWQxmgRagZ1wD3npDaI3 3ZIP9FvvNJrHT2ZvWxsgXv5wa9qjqJ2MPAHLTKXjlVynglWml3k7SOTEdItUyMpQn4Oi zyqLyYDPMOcSGQD77EZoeq6kbnTEihm5rTtZs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=fWi0kmqsBqqVyVGhK/IULpu4nlA9wAa7XnTb/1YtCs1nH7LVtcaOmxHibotf93Ds9S nHA1hWSi6evjNumpXIbC1OKBtHgtr5UMyWaMX/FSkrZvHO9pd6NdTkJy1RSF1kA1o+NI GZPq0yQ5WiEV79zjeS/re3BVbgjLfvCy+YgNw= Received: by 10.110.60.2 with SMTP id i2mr4427532tia.28.1226882170738; Sun, 16 Nov 2008 16:36:10 -0800 (PST) Received: from michelle.cdnetworks.co.kr ([211.53.35.84]) by mx.google.com with ESMTPS id y3sm4973646tia.6.2008.11.16.16.36.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 16 Nov 2008 16:36:09 -0800 (PST) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id mAH0Y4DX051042 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 Nov 2008 09:34:04 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id mAH0Y2Au051041; Mon, 17 Nov 2008 09:34:02 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Mon, 17 Nov 2008 09:34:02 +0900 From: Pyun YongHyeon To: Yony Yossef Message-ID: <20081117003402.GA50872@cdnetworks.co.kr> References: <20def4870811160403i67f9e8d6i1a52e93d1b68c5ad@mail.gmail.com> <20081116121345.GA952@icarus.home.lan> <20def4870811160427k1a718a8es9287220c03f71f26@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20def4870811160427k1a718a8es9287220c03f71f26@mail.gmail.com> User-Agent: Mutt/1.4.2.1i X-Mailman-Approved-At: Mon, 17 Nov 2008 03:03:53 +0000 Cc: freebsd-net@freebsd.org, Jeremy Chadwick , Yehonatan Yossef , freebsd-questions@freebsd.org, liranl@mellanox.co.il Subject: Re: HW VLAN Filtering on FreeBSD 6.3 + 7.0 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2008 00:36:13 -0000 On Sun, Nov 16, 2008 at 02:27:36PM +0200, Yony Yossef wrote: > > > > > I would like to enable my NIC HW VLAN filtering, is there any way for > > my > > > driver to access the OS vlan table? (something like vlan_group_get_device > > on > > > linux) > > > > > > I understood from previous investigation that on FreeBSD 6.3 and 7.0 > > there's > > > no ioctl informing the driver of vlan addition/removal. Is that correct? > > > > Man pages to check out: vlan(4) and ifconfig(8). I'm pretty sure the > > vlan tagging feature is per-driver. > > > > Also, the vlan(4) list of supported drivers is out of date (for example, > > em(4) is missing), so be sure to check the man page of your NIC driver. > > > Sorry, i explained myself pretty bad. I'm working on an Ethernet driver for > FreeBSD. > The VLAN hw tagging is already working properly, but my nic is capable of > holding a vlan table on hw, filtering vlans on it's own. > I need to find a way to update that hw table. > one way is to recieve a ioctl from the OS of it's vlan table event (add, > remove). I can't find such ioctl. FreeBSD doesn't use ioctl to manipulate VLAN HW table. > second is to have a direct access from the driver to the OS vlan table. I'm > not familiar with the interface or if it's possible at all, and that is my > actual question. > See EVENT_HANDLER(9) and igb(4) for working example. -- Regards, Pyun YongHyeon