From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 3EB69C328 for ; Fri, 10 Jul 2015 15:47:50 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 10 Jul 2015 06:47:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,446,1432623600"; d="scan'208";a="744473169" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.63]) by fmsmga001.fm.intel.com with SMTP; 10 Jul 2015 06:47:35 -0700 Received: by (sSMTP sendmail emulation); Fri, 10 Jul 2015 14:47:34 +0025 Date: Fri, 10 Jul 2015 14:47:34 +0100 From: Bruce Richardson To: "Sanford, Robert" Message-ID: <20150710134734.GA7824@bricha3-MOBL3> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) 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: Fri, 10 Jul 2015 13:47:50 -0000 On Fri, Jul 10, 2015 at 01:46:21PM +0000, Sanford, Robert wrote: > Silly questions: Why use rte_pktmbuf_clone()? Assuming that one is not > going to modify the mbuf at all, why not just increment the reference > count with rte_mbuf_refcnt_update()? > Yep, that should work fine too. /Bruce > -- > Thanks, > Robert > > > >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. > >> > >> >