From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D9852A034C; Thu, 18 Aug 2022 10:16:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77DAC40694; Thu, 18 Aug 2022 10:16:36 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 67EA140156 for ; Thu, 18 Aug 2022 10:16:35 +0200 (CEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [RFC 1/2] vhost: add ingress API for port mirroring datapath Date: Thu, 18 Aug 2022 10:16:32 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87282@smartserver.smartshare.dk> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [RFC 1/2] vhost: add ingress API for port mirroring datapath Thread-Index: AQHYr+Caymx9q8Fff0G9onvJmp5qi62ufNsAgAPot0CAAeihIA== References: <20220814124920.14338-1-cheng1.jiang@intel.com> <20220814124920.14338-2-cheng1.jiang@intel.com> <20220814075826.218f0e00@hermes.local> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Jiang, Cheng1" , "Stephen Hemminger" Cc: , "Xia, Chenbo" , , "Hu, Jiayu" , "Ding, Xuan" , "Ma, WenwuX" , "Wang, YuanX" , "Yang, YvonneX" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: Jiang, Cheng1 [mailto:cheng1.jiang@intel.com] > Sent: Thursday, 18 August 2022 08.58 >=20 > Hi, >=20 > > -----Original Message----- > > From: Stephen Hemminger > > Sent: Sunday, August 14, 2022 10:58 PM > > > > On Sun, 14 Aug 2022 12:49:19 +0000 > > Cheng Jiang wrote: > > > > > From: Wenwu Ma > > > > > > Similar to the port mirroring function on the switch or router, > this > > > patch also implements an ingress function on the Vhost lib. When > data > > > is sent to a front-end, it will also send the data to its mirror > > > front-end. > > > > > > Signed-off-by: Cheng Jiang > > > Signed-off-by: Wenwu Ma > > > > We already have rte_flow, packet capture, and rx/tx callbacks. > > This seems like re-invention. >=20 > Sorry that I didn't make it clear in the v1 commit message. This port > mirror function is based on async vhost which is accelerated by DMA > device. Compared with other mirror implements: 1. It's targeted for > vhost. 2. The performance is really good. Its use scenario is to let > one front-end(mirror-VM) monitor the traffic of another front-end(VM). > It's different from the things you mentioned above. So, IMO I don't > think it's re-invention. >=20 > Thanks, > Cheng Thank you for elaborating the use case. In other words: This is a performance optimization for a specific use = case. This raises two questions: 1. Please convince us that this is a common use case? 2. What is the performance compared to implementing it at the = application level? Overall, I totally agree with Stephen: Port Mirroring was removed from ethdev with the 21.11 release [1] for = the reasons mentioned by Stephen. Please don't try to reintroduce it. If the application needs to mirror all (or some) packets, why not just = let the application do it? Furthermore, the application might need to mirror the packets to a = physical port, and perhaps encapsulate it for remote packet capture. = Sampling could also be required. Here's a prediction for you: More = features will creep into to this API over time, and it will end up like = the ethdev mirroring API being removed because the alternatives are = better and more versatile. [1]: = https://doc.dpdk.org/guides/rel_notes/release_21_11.html#removed-items