From owner-freebsd-net@FreeBSD.ORG Thu Oct 3 06:51:47 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 A81496A0 for ; Thu, 3 Oct 2013 06:51:47 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ea0-x22b.google.com (mail-ea0-x22b.google.com [IPv6:2a00:1450:4013:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 300B12787 for ; Thu, 3 Oct 2013 06:51:47 +0000 (UTC) Received: by mail-ea0-f171.google.com with SMTP id n15so861631ead.2 for ; Wed, 02 Oct 2013 23:51:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QhKmahYgqr+cRH7Dv8Hdiwtaf+OtgGlmNLc24pA3zSk=; b=ilXjbdjxFtdPlsYw2Rdckg1caLRaJgZ8fRxdyLg0Sss88A3eEe/FtK2IWxjFrowiM6 GFgJLC1xR3xOBboC8jn5RBuKusHuEffVr1IhthK5lnsanBEi1e0csljcSpE2dzN7fY3H xA8KWrirHRnlqmSpo7CCnGSGcPD5l+l3JugjWYolOvom3sA4/NpKyH+R2PqAXQMlttGo yECQexkwa0jXPFwEwoZxwEQY2BU2b97kb3BXIiSyZiUPkD5HgNl97VoHI3sbP/KiaU1v 0Z5GvMVDuZB5gikGhVcRAfQQZa6bQlCop0QtZyAOQhjOj1LGM0/iDqcYz34orxaA5sIf FsDQ== MIME-Version: 1.0 X-Received: by 10.14.37.4 with SMTP id x4mr10419860eea.16.1380783105452; Wed, 02 Oct 2013 23:51:45 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Wed, 2 Oct 2013 23:51:45 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 Oct 2013 23:51:45 -0700 Message-ID: Subject: Re: netmap: understanding pkg-gen.c From: hiren panchasara To: Luigi Rizzo 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: Thu, 03 Oct 2013 06:51:47 -0000 On Wed, Oct 2, 2013 at 11:05 PM, Luigi Rizzo wrote: > > > > On Thu, Oct 3, 2013 at 6:34 AM, hiren panchasara < > hiren.panchasara@gmail.com> wrote: > >> >> Thanks Luigi. >>>>>> >>>>>> Coming back to this thread to actually understand what's going on. >>>>>> >>>>>> >>>>>> On Tue, Sep 24, 2013 at 8:37 PM, Luigi Rizzo wrote: >>>>>> >>>>>>> > >>>>>>> > On this box, I have 2 interfaces igb0 (10.73.149.28) and ix1 >>>>>>> (10.73.149.17) >>>>>>> > and this is how I am using this binary: >>>>>>> > >>>>>>> > -bash-4.2$ sudo ./pkt-gen -i ix1 -f tx -n 100000000 -c 8 -p 8 -d >>>>>>> > 10.73.149.17 -s 10.73.149.28 >>>>>>> >>>>>> >> Thanks to Juli, I realized that I was doing it wrong. >> >> Trying to _send_ pkts from ix1 via netmap and looking at ix1's _receive_ >> buffers. >> >> I am setting up another machine with ixgbe to have 2 different machines >> for proper testing. >> > > since you have a dual port card, you can actually run the experiment > on a single machine, connecting the two ports with a > cross cable and run the sender on ix1 and the receiver on ix0. > Thanks but for now I have 2 machines with ixgbe to play with. > > But you will still see traffic only to one queue, because > pkt-gen by default uses the same DST-MAC address so the > way you configure RSS is irrelevant. > What/where is the exact logic/code of how card determines what traffic goes to what queue? Is it based on DST-MAC always? > What you could do is, when prefilling the buffers, use > different mac or ip addresses. There is some unfinished > code in pkt-gen.c to implement that. > I see we are not playing with g.dst_mac.name much. Let me know if you have unfinished code sitting somewhere I can look. Thanks, Hiren