From owner-freebsd-net@FreeBSD.ORG Tue Jul 15 02:04:01 2014 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 ESMTPS id 14DAED18 for ; Tue, 15 Jul 2014 02:04:01 +0000 (UTC) Received: from mail-oa0-x233.google.com (mail-oa0-x233.google.com [IPv6:2607:f8b0:4003:c02::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D664D2B2C for ; Tue, 15 Jul 2014 02:04:00 +0000 (UTC) Received: by mail-oa0-f51.google.com with SMTP id o6so3244967oag.38 for ; Mon, 14 Jul 2014 19:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=A3QYFdBgHrZ4kgEi1oWCi1/DtuRpp4pMB/ndTKd5M94=; b=nyv3vYC/NiIVkowqVzKA9w+0oWxc60JZ51YlhnTeNNlV/ZOfYsdxf8rk7pay7aaPa5 MsaJFy4qYhbXl0gJh/x2r4gnMaQJ0ixloGmywB7Hj1LQ49yzAI1m3V3vE9bErKJD1kQ9 ZWrFwevWnv+8YeJtpd4OoXkmCJCBmFhLARe/lzZaUlSh+pfQrI+i0pEHEsZNj0QlHNvG ij+jgrwZY2o7OvGRztvMjZkocxJNJFD9LodzVk4T/Ej5zbUMiM90mULBnxgGwjDZDMkx lnBDHNBDjVZL+JsSejX/LnllowlWDYfoMOZpD9sJo/2GoQh5pKdWobfAKYQ2bh+Zes0I +lVw== MIME-Version: 1.0 X-Received: by 10.60.124.162 with SMTP id mj2mr21980806oeb.22.1405389840135; Mon, 14 Jul 2014 19:04:00 -0700 (PDT) Received: by 10.76.27.164 with HTTP; Mon, 14 Jul 2014 19:04:00 -0700 (PDT) Date: Tue, 15 Jul 2014 10:04:00 +0800 Message-ID: Subject: netmap: how to manage SW & NIC ring at same em0? From: upyzl To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 02:04:01 -0000 Hi all, I'm a newbie on netmap development using FreeBSD 10 release x64("device netmap" added and recompiled) I'm study on develop openflow-based datapath(software switch function/module) by netmap-bridge my understanding: ./bridge -i em0 -i em0 --- would be using SW ring for em0, and if there's a packet send to em0, it should forward to host stack; ./bridge -i em0 -i em1 --- normal bridge using netmap framework (NIC ring) (above in /usr/src/tools/tools/netmap) but in openflow, there's an required action "Forward: local", when a packet matched(I implemented matching flow by modified bridge.c->process_rings() ), the packeted should send to host stack, as SW ring does it is a possible scene: a ICMP packet arrived in em0, forward to em1; a TCP packet arrived in em0, forward to host stack; I want to know whether is a method to implement it? or could give me any advice... or in fact I'm wrong in understanding? Thanks in advance