From owner-freebsd-net@FreeBSD.ORG Fri Oct 25 21:38:10 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 626429C9 for ; Fri, 25 Oct 2013 21:38:10 +0000 (UTC) (envelope-from syuu@dokukino.com) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2FBF82382 for ; Fri, 25 Oct 2013 21:38:10 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id fb1so4206444pad.23 for ; Fri, 25 Oct 2013 14:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dokukino.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=OmjmVklGxAtCU65DXOl5CL/sfH4fe7GGycShTMQtFHQ=; b=NolITtjZQc5oBXLRJtnclI3nsbBovOTjoQcvbu1V30GgmnscJ33g3AYwRkt0rLR2PD O099HAhojLrgPONcXPJoRLW6ubVVeMWLxR+bJe54qbnihfj96hVTi4g6zz6Fwatn8E3u ESSU6f8yyeONBRjAS/aMJ+E0Xu0Py0F2bUiJQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=OmjmVklGxAtCU65DXOl5CL/sfH4fe7GGycShTMQtFHQ=; b=IEKl5UC2XE5QXT3O5u759/3lgg06vaG7z+nWkg3Y3gfX+76hgPJLa17rv4mo46r0b/ NevpDy4FIzHWO5Apn3i5hlfiBo29VOXzzBz9c36auiHiskyv6/5Oetel32R3M1UDMaKi L4AB2KaSMXDD1AEZqiUJZ1tCs3KnVilDN/gfw6+bu187dLz3Z7bDdMn9tkY4Er249thk O/NQl7rZmNryUmCqEXq5FNi3MR9/Wepz4gk5eYplF8Ulj4CrSxBhRg6Po3vl2U9WpeaG R0C6sDaeA8yMppBkrV2bMAw285LQXi92nsSGmXdWa08qOWwVR1pD9h9xF3ZcZeCdtP1B udLg== X-Gm-Message-State: ALoCoQnDXW/12NWaNT0SktrK5eKrBUAuYPMfoVT8w4C+S8FJUUt8/G+xwtHVncCZhEqJaSKHpvOI X-Received: by 10.66.162.167 with SMTP id yb7mr12905933pab.16.1382737089666; Fri, 25 Oct 2013 14:38:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.220.138 with HTTP; Fri, 25 Oct 2013 14:37:29 -0700 (PDT) In-Reply-To: References: From: Takuya ASADA Date: Sat, 26 Oct 2013 06:37:29 +0900 Message-ID: Subject: Re: Adding Flow Director sysctls to ixgbe(4) (was: netmap: traffic distribution) To: hiren panchasara Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "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, 25 Oct 2013 21:38:10 -0000 2013/10/24 hiren panchasara > On Mon, Oct 7, 2013 at 5:49 PM, hiren panchasara > wrote: > > On Mon, Oct 7, 2013 at 12:01 AM, Takuya ASADA wrote: > >> Hi, > >> > >> This is updated version of "ixgbetool" patch. > > I will try to give this a try tomorrow. > > Alright, sorry for the delay. I now have bandwidth/setup to test this. > > > > Cheers, > > Hiren > >> Here's improved feature list: > >> - signature filter list feature available > >> - user-defined filter can be use with an ATR. > > How does this work? You identify user-defined flows and apply ATR on > the rest of the flows? > I made a hash table for user-defined filters, insert a filter entry into a hash table when it added. And when ixgbe driver try to change queue assignment by ATR, lookup a hash table and prevent changing if the entry is on a hash table. >> To enable it, add "hw.ixgbe.cooperative_atr=1" on /boot/loader.conf > >> > >> Usage is as follows: > >> ixgbetool [operation] > >> add_sig_filter > >> > >> show_sig_filter > >> del_sig_filter > > I believe, I can somehow test whether the signature filter works or > not by generating custom traffic, creating matching filter, directing > the traffic to a specific queue and watch that queue. > > But how do I test/see ATR (application targeted receive) in action? > Traffic for a specific application should follow the application on > different cpus, right? Any guidance on how to do that would be great. > To do it specifically, we should add debug printf on ixgbe_rxeof, printout hash value and queue number. Actually, if test flow is only one, you can see which queue is processing the flow by using "top -P". If ATR is working properly, ixgbe will changes queue assign every few moments (unless communicating process is pinned by cpuset command). But I don't see such behavior when I using ATR, even my patch is not applied. I'm guessing ixgbe_atr() function is failing to detect current CPU of communicating process. Could be it required extra kernel parameter configuration to enable ATR, but I haven't find any informations for it.