From owner-freebsd-net@freebsd.org Fri Apr 14 16:32:23 2017 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 862E8D3E2A3 for ; Fri, 14 Apr 2017 16:32:23 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pf0-x231.google.com (mail-pf0-x231.google.com [IPv6:2607:f8b0:400e:c00::231]) (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 540AD339 for ; Fri, 14 Apr 2017 16:32:23 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by mail-pf0-x231.google.com with SMTP id 194so3222493pfv.3 for ; Fri, 14 Apr 2017 09:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GX/yBmVVIt77clpSZAGDHlGCrrRwdBmYAFRtb9pjbFA=; b=hzw/gZJlqVMTEuGQnEbzEHEQnb1v4jW2sHzyV6kqnG1rf3URwTp56tAgR2+rMH0M3T YWj74S2K/g/xycsmrorZaAGA7y8qVlNR3PjC4gDhQOQw3rnMvj/rZMa2ZYIhvGztkPRf gD432r9hYCDrrsNK5Or835MVUUoRQOATYIBf9ni9bnJSA9dw613iOCX+RpmU8YYh66c9 xdMHsDks5/u9SfROS37PUEx5QN4GtNaGOB/5297mv76ITbQC8dWS0NyOTkBvNf/qhtly SpMTUx+8+UL/mn7DXL688AQ+BXos8kZ2xRhqUTAMRKKwRJNp/a5OTEiHvkAjU3LyKE5N 6Erg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=GX/yBmVVIt77clpSZAGDHlGCrrRwdBmYAFRtb9pjbFA=; b=mvWUbZip8aJoavXQhwpS/rbdbHS1DLCDe/u5kfLr7vdQhSYyQTco7ZM0KSl6J5iD1c m6ZO1mHbo9LuedhyClEHYjtB7qLelcv/sjqOZqh5zoM14JdMP+tPcfyFkHfyvfFouBLw +PYfbiMAwhUvduZEwwlu/6M3hdc81b+geARzftL1AKxEbtgvVGvpj55ORqt+fLszT2aB opEFCoOKxkOY8dnTqK2cwJRMVptbQ9SvTWw1qAJT1wOlHqy7otMXyVi1DUsHJlnSM1Ji N1Noq3+U52cEIYJY+Od593GpKXydonkhQEeHJmUiJs91UIuowVPVx/s5d7lAJW92PNky 11uA== X-Gm-Message-State: AN3rC/5aqr7XVHmuuuPBblmblryEfIFP/wlsrvbPYFdICwe33GNMVuda PEeYMGz9n+ryNtXD X-Received: by 10.84.238.143 with SMTP id v15mr10001725plk.102.1492187542844; Fri, 14 Apr 2017 09:32:22 -0700 (PDT) Received: from ox ([2601:641:c000:b800:201d:8cb6:8467:a85c]) by smtp.gmail.com with ESMTPSA id z123sm4202300pfz.56.2017.04.14.09.32.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 09:32:21 -0700 (PDT) Date: Fri, 14 Apr 2017 09:32:15 -0700 From: Navdeep Parhar To: Joe Jones Cc: "freebsd-net@freebsd.org" Subject: Re: cxgbe netmap promiscuous mode? Message-ID: <20170414163215.GA9358@ox> Mail-Followup-To: Joe Jones , "freebsd-net@freebsd.org" References: <58D3C6F4.6010500@stream-technologies.com> <58D521C0.1000804@stream-technologies.com> <58F0E683.7050806@stream-technologies.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <58F0E683.7050806@stream-technologies.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 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, 14 Apr 2017 16:32:23 -0000 On Fri, Apr 14, 2017 at 04:10:59PM +0100, Joe Jones wrote: > Hi Navdeep, > > I think I have found a driver bug. Earlier today I set up the switch I'm > using so that two of the ports mirror the traffic on one of the other ports. > We are planning on using a similar setup to allow packet tracing without > stressing the boxes our application is running on any more then they are > already. > > I connected both ports to one of our cxgbe cards, My intention was to use > tcpdump to check that my switch config was doing what I thought it should. I > ran > > ifconfig cxl? promisc -vlanhwtag up Does the problem occur only if you use this form of ifconfig? Can you please try "ifconfig up" and "ifconfig cxl? promisc" separately and see what happens? Regards, Navdeep > > on both interfaces, this is what the interfaces looked like > > cxl0: flags=28943 > metric 0 mtu 1500 > options=ec07ab > ether 00:07:43:33:8a:20 > nd6 options=29 > media: Ethernet 10Gbase-Twinax > status: active > vcxl0: flags=8802 metric 0 mtu 1500 > options=ec07bb > ether 00:07:43:33:8a:22 > nd6 options=29 > media: Ethernet 10Gbase-Twinax > status: active > cxl1: flags=28943 > metric 0 mtu 1500 > options=ec07ab > ether 00:07:43:33:8a:28 > nd6 options=29 > media: Ethernet 10Gbase-Twinax > status: active > vcxl1: flags=8802 metric 0 mtu 1500 > options=ec07bb > ether 00:07:43:33:8a:2a > nd6 options=29 > media: Ethernet 10Gbase-Twinax > status: active > > The interesting thing is, a tcpdump on cxl0 showed all the traffic I > expected to see, while tcpdump on cxl1 showed only broadcast traffic. After > playing with the switch config to make sure the difference was not on the > switch I pulled both patch cables out and into another server with the same > card. On the second server I could use tcpdump and see all the traffic I > expected on either interface. > > Then back on the original server, I reloaded the device driver and tried > again. Now I got only broadcast on cxl0 and cxl1. Then finally I got all the > traffic to show up by doing > > ifconfig cxl1 -promisc > ifconfig cxl1 promisc > > It would appearer to me that the card can get into a state where ifconfig > reports that it is in promiscuous mode when it is not. > > > Joe Jones