From owner-freebsd-net@FreeBSD.ORG Fri Aug 23 14:01:41 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 410CFF24 for ; Fri, 23 Aug 2013 14:01:41 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A59CD29A1 for ; Fri, 23 Aug 2013 14:01:40 +0000 (UTC) Received: (qmail 86676 invoked from network); 23 Aug 2013 14:44:24 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 23 Aug 2013 14:44:24 -0000 Message-ID: <52176B3A.1040804@freebsd.org> Date: Fri, 23 Aug 2013 16:01:30 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Harika Tandra Subject: Re: Netmap ixgbe stripping Vlan tags References: <521708E8.4000105@freebsd.org> <5217494C.6060302@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Juli Mallett , "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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, 23 Aug 2013 14:01:41 -0000 On 23.08.2013 15:12, Harika Tandra wrote: > Hi all, > > I agree with Andre's statement >> A netmap consumer >> typically doesn't expect packets be mangled at all, mostly likely netmap is >> expressly used to get the packet exactly as they were seen on the wire. > > For my application I want to see the whole packet as is (as seen on the wire). > I am sure it is important for many users who are interested in > using netmap for speedup of packet capture in network security/monitoring applications. > > When I disable "vlanhwfilter" flag on the interface. It is behaving as expected and is > not stripping the Vlan tags when placed in promiscuous mode. Netmap seems to be ignoring > his setting or is resetting this option someplace (??). Any suggestion on where in Netmap > code this maybe ? When you switch an interface to netmap mode it does a soft-reset first. That reverts the vlanhwfilter configuration to default on. It's not netmap that does it but the driver. It seems to happen in or around ixgbe_setup_vlan_hw_support(). -- Andre