From owner-freebsd-net@FreeBSD.ORG Thu Oct 3 17:05:42 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 94E6FD75 for ; Thu, 3 Oct 2013 17:05:42 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-qe0-x22a.google.com (mail-qe0-x22a.google.com [IPv6:2607:f8b0:400d:c02::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5211821AB for ; Thu, 3 Oct 2013 17:05:42 +0000 (UTC) Received: by mail-qe0-f42.google.com with SMTP id 1so2002441qec.1 for ; Thu, 03 Oct 2013 10:05:41 -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=QwDRD23H5LZeC6WUh1xsdyv2Ec/ntdEs52Vh1ODSyW4=; b=t1mJ1mgyIEd1EtbVoI/HRlR2fpH7axztARosjJWGRebmquhZyNmpqPm0WKDLFtFRLr lz6sDJp3zfQQoRcIfeqBN8JQQYnOK1orCDmxHbwEK3tQDjWrEjv9aHWv7EHJcZVXQ1Zm NNd5nR375jL692BCl8HUj9W3OKmKKPuykZDY6BPwoXgbLbV5MVZumVaapKpkxG/1CWLF Vw2of3F0jbEbtwZvx4+8lTX3f3F3++2Y8UNbgVD3c9z7OrwVXIl2/gao/Lxe7n1KFgxp 1DX1sWaHfrKvwR3BiU4srAaRZYNDA5cU+hYSnnbbvKmkyP29ct61ShzeJeot531XL+Je LqDw== MIME-Version: 1.0 X-Received: by 10.224.5.137 with SMTP id 9mr11831508qav.65.1380819941442; Thu, 03 Oct 2013 10:05:41 -0700 (PDT) Received: by 10.49.117.134 with HTTP; Thu, 3 Oct 2013 10:05:41 -0700 (PDT) In-Reply-To: References: Date: Thu, 3 Oct 2013 13:05:41 -0400 Message-ID: Subject: Re: netmap: understanding pkg-gen.c From: Ryan Stone To: hiren panchasara Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-net@freebsd.org" , Luigi Rizzo 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 17:05:42 -0000 On Thu, Oct 3, 2013 at 2:51 AM, hiren panchasara wrote: > What/where is the exact logic/code of how card determines what traffic goes > to what queue? > Is it based on DST-MAC always? RSS is based off of a hash of the 4-tuple (src/dst ip, src/dst port). Note that this is very dependent on the hardware's ability to parse the packet. The hardware supported by ixgbe only understands vlan encapsulation, so if you use any other type of L2 encapsulation (e.g. MPLS, PPPoE, etc) RSS will not be able to balance your traffic across multiple queues. Layer 3 encapsulations like GRE are not supported either, but the hardware will be able to parse the packet up to the outer IP header and will load balance based on the src/dst address of the outer IP. The ixgbe hardware of course will understand unencapsulated TCP/IP or UDP/IP in ethernet. All hardware supports IPv6 as well as IPv4.