From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from prod-mail-xrelay06.akamai.com (prod-mail-xrelay06.akamai.com [96.6.114.98]) by dpdk.org (Postfix) with ESMTP id 738A7C31A for ; Fri, 10 Jul 2015 15:46:23 +0200 (CEST) Received: from prod-mail-xrelay06.akamai.com (localhost.localdomain [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id 8306716A351; Fri, 10 Jul 2015 13:46:22 +0000 (GMT) Received: from prod-mail-relay09.akamai.com (prod-mail-relay09.akamai.com [172.27.22.68]) by prod-mail-xrelay06.akamai.com (Postfix) with ESMTP id 6CD0416A2C1; Fri, 10 Jul 2015 13:46:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=akamai.com; s=a1; t=1436535982; bh=0WlW4+TVuvQmg2anWT9MvxL+aJ2jRpyIX7zx4nIQjxA=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=OkotUko+90fhrrLAAk7GdyQu+u3B92btiSfjAMhnQjovMkLILzeUT3RKLPQLJUiPj RCLqwiFTsz3CsQ0/kUv+cQcPRRk7ms8negHeJzJCY6vVgJTs3gXTfqmjtYvUEIVHkR FMBCSJLjxYw5it/G1YoU5P4E1Zi6LNtwqbiE6NCI= Received: from email.msg.corp.akamai.com (ustx2ex-cas5.msg.corp.akamai.com [172.27.25.34]) by prod-mail-relay09.akamai.com (Postfix) with ESMTP id 682BE1E07C; Fri, 10 Jul 2015 13:46:22 +0000 (GMT) Received: from USTX2EX-DAG1MB3.msg.corp.akamai.com (172.27.27.103) by ustx2ex-dag1mb1.msg.corp.akamai.com (172.27.27.101) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Fri, 10 Jul 2015 08:46:21 -0500 Received: from USTX2EX-DAG1MB3.msg.corp.akamai.com ([172.27.27.103]) by ustx2ex-dag1mb3.msg.corp.akamai.com ([172.27.27.103]) with mapi id 15.00.1076.000; Fri, 10 Jul 2015 08:46:21 -0500 From: "Sanford, Robert" To: Matt Laswell , "Wiles, Keith" Thread-Topic: [dpdk-dev] DPDK Port Mirroring Thread-Index: AQHQuoRKeztjuhd1u02RKAlhI8AU4J3T6jaAgADfKAA= Date: Fri, 10 Jul 2015 13:46:21 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.4.3.140616 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.19.133.153] Content-Type: text/plain; charset="us-ascii" Content-ID: <37091A7C50DDA44F89A8ABBD369B70A4@akamai.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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:46:23 -0000 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()? -- 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. >> >>