From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-fr.alcatel-lucent.com (fr-hpida-esg-01.alcatel-lucent.com [135.245.210.20]) by dpdk.org (Postfix) with ESMTP id DCE9AC370 for ; Fri, 10 Jul 2015 16:21:10 +0200 (CEST) Received: from us70tusmtp2.zam.alcatel-lucent.com (unknown [135.5.2.64]) by Websense Email Security Gateway with ESMTPS id 0045D37FDC291; Fri, 10 Jul 2015 14:21:07 +0000 (GMT) Received: from US70UWXCHHUB02.zam.alcatel-lucent.com (us70uwxchhub02.zam.alcatel-lucent.com [135.5.2.49]) by us70tusmtp2.zam.alcatel-lucent.com (GMO) with ESMTP id t6AEL83W002168 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Fri, 10 Jul 2015 14:21:08 GMT Received: from US70TWXCHMBA07.zam.alcatel-lucent.com ([169.254.1.180]) by US70UWXCHHUB02.zam.alcatel-lucent.com ([135.5.2.49]) with mapi id 14.03.0195.001; Fri, 10 Jul 2015 10:21:08 -0400 From: "Assaad, Sami (Sami)" To: Bruce Richardson , "Sanford, Robert" Thread-Topic: [dpdk-dev] DPDK Port Mirroring Thread-Index: AQHQuoRKeztjuhd1u02RKAlhI8AU4J3T2XKAgAEiL4CAAABXAP//xGVA Date: Fri, 10 Jul 2015 14:21:08 +0000 Message-ID: <9478F0FB69DAA249AF0A9BDA1E6ED952188498CA@US70TWXCHMBA07.zam.alcatel-lucent.com> References: <20150710134734.GA7824@bricha3-MOBL3> In-Reply-To: <20150710134734.GA7824@bricha3-MOBL3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [135.5.27.18] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" 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 14:21:11 -0000 Now; what if we are to encapsulate the packet within a tunnel; such as GRE,= prior to sending it out to a mirrored-port ... Must the packet be copied i= nto a new buffer or can we use a DPDK primitive that is more efficient? Sami. > -----Original Message----- > From: Bruce Richardson [mailto:bruce.richardson@intel.com]=20 > Sent: Friday, July 10, 2015 9:48 AM > To: Sanford, Robert > Cc: Matt Laswell; Wiles, Keith; dev@dpdk.org; Assaad, Sami (Sami) > Subject: Re: [dpdk-dev] DPDK Port Mirroring > 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= =20 > > going to modify the mbuf at all, why not just increment the reference=20 > > count with rte_mbuf_refcnt_update()? > >=20 > Yep, that should work fine too. > > /Bruce > > -- > > Thanks, > > Robert > >=20 > >=20 > > >Keith speaks truth. If I were going to do what you're describing, I=20 > > >would do the following: > > > > > >1. Start with the l2fwd example application. > > >2. Remove the part where it modifies the ethernet MAC address of=20 > > >received packets. > > >3. Add a call in to clone mbufs via rte_pktmbuf_clone() and send the=20 > > >cloned packets out of the port of your choice > > > > > >As long as you don't need to modify the packets - and if you're=20 > > >mirroring, you shouldn't - simply cloning received packets and=20 > > >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= =20 > > >> >traffic from two 10G interfaces. > > >> > > > >> >1. Is it possible in port-mirroring traffic consisting of 450= byte > > >> >packets at 20G without losing more than 5% of traffic? > > >> > > > >> >2. Would you have any performance results due to packet copyi= ng? > > >> > > >> Do you need to copy the packet if you increment the reference count= =20 > > >> you can send the packet to both ports without having to copy the pac= ket. > > >> > > > >> >3. Would you have any port mirroring DPDK sample code? > > >> > > >> DPDK does not have port mirroring example, but you could grab the=20 > > >>l2fwd or l3fwd and modify it to do what you want. > > >> > > > >> >Thanks in advance. > > >> > > > >> >Best Regards, > > >> >Sami Assaad. > > >> > > >> > >=20