From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ie0-f170.google.com (mail-ie0-f170.google.com [209.85.223.170]) by dpdk.org (Postfix) with ESMTP id 7026711C5 for ; Thu, 9 Jul 2015 22:27:46 +0200 (CEST) Received: by iecuq6 with SMTP id uq6so184243340iec.2 for ; Thu, 09 Jul 2015 13:27:46 -0700 (PDT) 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:date :message-id:subject:from:to:cc:content-type; bh=latH4LqqY6FUuI3u5ACKht3XQ+FkTbQVrFP37llBX/I=; b=feQss5xScvZouh1Vd3pCiD10JcQkW/D02Ry3p5I/+0xUg4IcyhJ/D9TAToJ2uG5Kct IjCmC2vtb8t/tvOWgJwBiw2aGMqZhXVSmLsVpBfqici+sA2kBRKhvLblbkgXHJXI3eCD JEz7jJqwXjInIuQtgmhMlp3EoQVp8xNd0UUZkMIMQ0xgsENRdEUeoAj91thQGCC+4Dhl nJaNDuy10MKVYBhSDXlli8+UnCW4KhrVH8om6dYu/F1rbSzPyFgP0Fk5l5W1cepnEOU+ dMDJQMzzwCfKaViWLCqSy0AQoTSnQM4VVvf0Z3ghESajq3NkLxB6NVdI1jaxgHUBMcv9 xIoQ== X-Gm-Message-State: ALoCoQmnXvM73KKRKyT7V8oNac09T3GeIHgRbhUPftWxkDS52Kp1Zn1LshLJ6Kn0zEZCu6WVGxON MIME-Version: 1.0 X-Received: by 10.50.18.43 with SMTP id t11mr100726968igd.25.1436473665882; Thu, 09 Jul 2015 13:27:45 -0700 (PDT) Received: by 10.36.159.68 with HTTP; Thu, 9 Jul 2015 13:27:45 -0700 (PDT) In-Reply-To: References: Date: Thu, 9 Jul 2015 15:27:45 -0500 Message-ID: From: Matt Laswell To: "Wiles, Keith" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" , "Assaad, Sami \(Sami\)" Subject: Re: [dpdk-dev] DPDK Port Mirroring X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 20:27:46 -0000 Keith speaks truth. If I were going to do what you're describing, I would do the following: 1. Start with the l2fwd example application. 2. Remove the part where it modifies the ethernet MAC address of received packets. 3. Add a call in to clone mbufs via rte_pktmbuf_clone() and send the cloned packets out of the port of your choice As long as you don't need to modify the packets - and if you're mirroring, you shouldn't - simply cloning received packets and sending them out your mirror port should get you most of the way there. On Thu, Jul 9, 2015 at 3:17 PM, Wiles, Keith wrote: > > > On 7/9/15, 12:26 PM, "dev on behalf of Assaad, Sami (Sami)" > wrote: > > >Hello, > > > >I want to build a DPDK app that is able to port-mirror all ingress > >traffic from two 10G interfaces. > > > >1. Is it possible in port-mirroring traffic consisting of 450byte > >packets at 20G without losing more than 5% of traffic? > > > >2. Would you have any performance results due to packet copying? > > Do you need to copy the packet if you increment the reference count you > can send the packet to both ports without having to copy the packet. > > > >3. Would you have any port mirroring DPDK sample code? > > DPDK does not have port mirroring example, but you could grab the l2fwd or > l3fwd and modify it to do what you want. > > > >Thanks in advance. > > > >Best Regards, > >Sami Assaad. > >