From owner-freebsd-net@FreeBSD.ORG Wed Sep 25 09:05:50 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 9657157E for ; Wed, 25 Sep 2013 09:05:50 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-lb0-x232.google.com (mail-lb0-x232.google.com [IPv6:2a00:1450:4010:c04::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 23A5E243D for ; Wed, 25 Sep 2013 09:05:49 +0000 (UTC) Received: by mail-lb0-f178.google.com with SMTP id z5so4923104lbh.9 for ; Wed, 25 Sep 2013 02:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=azVs6BPhadee4Ayq5Al/IFt0vAd5ju41EdYaLUVoIjE=; b=IzRzgrisEgjflDbmJDOrRBLhL0b1kxA6x7x9M4T2Lv5CCA5QK4PEPfFPqG8NX5PStf NVZYbMoBpO2ey4R4ieiDXEuo8BysOCa0eEtilkDI92XPhljn4KQ6zIfb7EmfAMnPH9Q0 jR8I2p0FxCWCAutsB+WQBIxkO870N0OQSlJtCbwqb7x9/Li6WyFxjsNyDNasL6HrrdoR u5StByqdBVQ9QdPlITG44ibVUKRHJKT1TadMLrqQLLbkAeVB+p85W/lCEMAiXqz+EO6d zdXg5QdkiyTtcrWNJJykIMNfBhdd7O48k+9PhptDX/APHtC04cFWYUh7FDB0infKj3Pv WxzA== MIME-Version: 1.0 X-Received: by 10.152.30.74 with SMTP id q10mr10960737lah.27.1380099948190; Wed, 25 Sep 2013 02:05:48 -0700 (PDT) Sender: rizzo.unipi@gmail.com Received: by 10.114.172.105 with HTTP; Wed, 25 Sep 2013 02:05:48 -0700 (PDT) In-Reply-To: References: Date: Wed, 25 Sep 2013 11:05:48 +0200 X-Google-Sender-Auth: 1vi4sESCJ2IezPvzTBnz8ZwDGUA Message-ID: Subject: Re: netmap: traffic distribution From: Luigi Rizzo To: hiren panchasara Content-Type: text/plain; charset=ISO-8859-1 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: Wed, 25 Sep 2013 09:05:50 -0000 On Wed, Sep 25, 2013 at 10:53 AM, hiren panchasara wrote: > > > > On Wed, Sep 25, 2013 at 1:22 AM, Luigi Rizzo wrote: >> >> On Wed, Sep 25, 2013 at 10:07 AM, hiren panchasara >> wrote: >> > >> > I am providing line rate traffic (via pkg-gen.c) to my 10gig ix >> > interface. >> > >> > Now on receiving side, is there a way to sub-divide the traffic into >> > multiple workloads using netmap? >> > >> > For example, can I get two 5G flows from 10Gbps traffic? >> >> not directly. You'd need to send packets with different addresses that >> match >> the way the filters on the NIC (RSS or similar) are programmed. > > > Thanks for quick responses, Liugi. > > So, FreeBSD needs PF_RING like thing? Any other way we can do it? no, PF_RING does nothing more than netmap. the partitioning of traffic into queues is done by the NIC's hardware, through some filters that i mentioned and are NIC specific. They are often named RSS (receive side scaling), RFS (receive flow steering), Flow Director, and so on. Some NICs compute a hash of various header fields and use the result to direct packets to specific queues. Others have "exact match" filters where you can map certain mac headers to specific queues, and so on. A software demultiplexer that sits on top of a netmap ring may certainly be useful, but i have not yet designed it. cheers luigi