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 D5637A0543; Thu, 25 Aug 2022 15:54:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74DC740693; Thu, 25 Aug 2022 15:54:00 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 1D055400EF for ; Thu, 25 Aug 2022 15:53:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661435638; x=1692971638; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=8Eefi1y1Vr+ZrAEl+kE4WXqrcZIPss4n1AtDrxhvgOI=; b=frZF0de4ngIov56DvTrWmEXAKnXXdmPZU9YdLEgpz5K8B+l1ZCCN7NAd uONtv9qCL3pXFIVyiNaTYa+OMZ0Q2AFniQlB0++QZS6b/0AcbvdXbXqo1 JFAmiN9YaUSntw+kms6SnLOi2WWMrYtZky84OUm3hun/txxyzadt8Pwhu imjVoVZdvqlpVwpoBHc2RfhmkwUZ7yckK2NhREN9CyLHVKn5DFt5utgOq AkISrVW/xgsCKmLBIku/xn6OVKLHm4ig+nbWoZClVHeQKvFPnzjj9AUq8 7HfPgk+wlce7VJox/wfuOpkkyaYiemp5TMuYumswKS6+fbLAyXB2Gts4k Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="273993476" X-IronPort-AV: E=Sophos;i="5.93,263,1654585200"; d="scan'208";a="273993476" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 06:53:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,263,1654585200"; d="scan'208";a="713499000" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga002.fm.intel.com with ESMTP; 25 Aug 2022 06:53:48 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 25 Aug 2022 06:53:48 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 25 Aug 2022 06:53:47 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Thu, 25 Aug 2022 06:53:47 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.42) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Thu, 25 Aug 2022 06:53:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g3zylPcDARl9YCKwJ3OGie96sYURoa5dktK/R7AYzX9oH68DQqEepPJ4ULyiePgytxK1bUFXSdYx6J50KNtUD5KnTqq5obT+orCONSmFWjlu9WXT5TBBVrZKA8uySu69gXIN3uYA2UjYqer8ql1vKlhW5NWBwwLKoY2PE5Ez7JfqKW2rD6oi+9HioX+MobPYpi/IBmCIboJen4k8Laab7BzONjob52vZ/r45qR9awFbPv+1kv+RbJdZc6MFPFsq4xHHpvAiIhaMF8JOn676oMdNCsVLDoWuyXWcWrSLWYKyu1Ie+Ssei3qX4K63QQCrqvjG7hazjeOlrIFI/MggOyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8Eefi1y1Vr+ZrAEl+kE4WXqrcZIPss4n1AtDrxhvgOI=; b=VDVaf54fnmAzva2nfVctXTd3y3UCkqGTCa7pjH937L1LyiRw8GQvj/S/6ErTR4xfc1+DneTxnOS41Vm3G5KDZP0ckW/MkQxUnU7HmrpGlGOG/Rjy7bvTOye98ScWd8my+qlZ1EV+XvIaBlkzZVjYLnWf2mYAEu/GW+R0/yqrg/r7526J1ncAVXlGxWqG4sju9S7PJLM41XsDZ3RdzcryZ6JXCJ2lOcXoVwATbGUjJlaq18sSNcHUPxWabGqEI/5CYAWOG4Qtjcz0WHgZu1eR93Kz2VDyKRSOYTDzgVFmT3DdSHgMzk5CyMS7lQLcKcl7AAlK7qF60/XwxCv6ObLJIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BL0PR11MB3187.namprd11.prod.outlook.com (2603:10b6:208:67::19) by BYAPR11MB3143.namprd11.prod.outlook.com (2603:10b6:a03:92::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.22; Thu, 25 Aug 2022 13:53:43 +0000 Received: from BL0PR11MB3187.namprd11.prod.outlook.com ([fe80::a9d9:9ba8:cce7:575f]) by BL0PR11MB3187.namprd11.prod.outlook.com ([fe80::a9d9:9ba8:cce7:575f%4]) with mapi id 15.20.5546.022; Thu, 25 Aug 2022 13:53:43 +0000 From: "Jiang, Cheng1" To: =?iso-8859-1?Q?Morten_Br=F8rup?= , "Stephen Hemminger" CC: "maxime.coquelin@redhat.com" , "Xia, Chenbo" , "dev@dpdk.org" , "Hu, Jiayu" , "Ding, Xuan" , "Ma, WenwuX" , "Wang, YuanX" , "Yang, YvonneX" Subject: RE: [RFC 1/2] vhost: add ingress API for port mirroring datapath Thread-Topic: [RFC 1/2] vhost: add ingress API for port mirroring datapath Thread-Index: AQHYr+Caymx9q8Fff0G9onvJmp5qi62ufNsAgAPot0CAAeihIIALUYzg Date: Thu, 25 Aug 2022 13:53:43 +0000 Message-ID: References: <20220814124920.14338-1-cheng1.jiang@intel.com> <20220814124920.14338-2-cheng1.jiang@intel.com> <20220814075826.218f0e00@hermes.local> <98CBD80474FA8B44BF855DF32C47DC35D87282@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D87282@smartserver.smartshare.dk> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.500.17 dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1e5325c5-5e9c-42cc-8c3e-08da86a1392a x-ms-traffictypediagnostic: BYAPR11MB3143:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dVHbJsPJ6kf6Uv6kuupqmjIt25eXmuYqRZ5EwCFjXAiANRNbRJI9lS7+PzAaYR3HHcRD2SW7kteD66OENnRmoMAYhkONfF0dhFF/AooXjo2CZIqgk3ixATPTp0bi2VIeWzQdGkN3/4vT6a27NpeaOkIFFVNluk5zlcaCDSZLxWdRfRPxSn80Xm6tmFqPnXqgcSn7L1O3gJIguXuMMfllO2TfTFF4xMk9BPuGrBBSNszEPG8fZizNl8tYOcVhzdw8HKO8LpWn8pk1BodhuxpJi7aEfALpBLtkeVGmmk+maH+rdpffif9R+SsW3xTylI/h47X27MS4i7duKKklhNNgfdSBnA7/YZnHQNuhjamrWeOzNM14NXxJ8+Np69xawyCLg2qSsCFcF/akde5oAnVrIqYJrKzZTjFRhm6t4Ix6OiES26Mq2MD9y8fGd8helZzwaiznCb8zx76w20/fKCjffgzUsqg7z+yVtwen63Fsoca2AUUTwCJ+ZQjqpjurkSK3KO3wmpEIf5y4M5lfLeSCT4hBJucxv3yENpB9grBE0+E3S7fmIO7WjeCOXAH6kty9uT1iw94r5999Pe8kgeoSQdFVQZXB1Y+PaK+vjCsD2KWPwXkvC7Zi+t0Dt4477NmBjOCS2uLujMsgewi/tEWbAXW89QAoyOtRIfgzukQAi/7aOeMoFEnKX7+VczbTqEFvxtpQIHVtEY8Kr9ftIUh0TqW9ZNGIecDNYObQEbF28WiDkfAG8hlcewEmFrVlRmcsP3swvfpIPbqUhSHfSyguDEa4dLqUnDQMXAr9+cuHPNE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3187.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(39860400002)(396003)(366004)(136003)(346002)(376002)(54906003)(83380400001)(66446008)(66574015)(186003)(38100700002)(86362001)(41300700001)(478600001)(122000001)(316002)(64756008)(966005)(66556008)(33656002)(8676002)(66946007)(38070700005)(66476007)(76116006)(82960400001)(4326008)(2906002)(52536014)(6506007)(55016003)(8936002)(9686003)(26005)(110136005)(7696005)(53546011)(5660300002)(107886003)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?L4KeGsqiKJuchJoPyUfNDeE4BkI7+7ECB27CjzAd2I5HWT9H91TLeC5v1M?= =?iso-8859-1?Q?TLV+FeS5EvagI/dYyGfEjs9XU/nq8Rrsj3ssPOcVMnnH6+9Hqlx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u/SRw43aV7pIOfG4m/AV6HCUPbGrDHcoMId6F?= =?iso-8859-1?Q?IqeGfgO7ZTnCmh6pPZeBXpUR45ZDXqkT7C3OwaUacv+MMCDikgnfeGTy9a?= =?iso-8859-1?Q?e+Xy1Xhmy448iyKFy1a5EnfdYoLoLSKxWwVBZTP7ukO4M37c/qMOgmQwuK?= =?iso-8859-1?Q?s0NDhmQas1I37nOpiSeVZPLLm+19NEEU4stLvry4v6rhvCrJpO7JZTSfOv?= =?iso-8859-1?Q?7QLa0OBMpjvW/YLsO0QIPWT+pGdZJNRK9jNIGT3GPJeRGCLlhqCAs5EQ4z?= =?iso-8859-1?Q?fWtYPy9HpoJ7CNA4ctfqELinsSvPSEZzb9YqnNaZR8Ia22sfI637+4jl/n?= =?iso-8859-1?Q?Y8ffp1a0Bl+tUWKShDXGMrRiBf9tysjq/H1+teyjOW+6JiWmZBp+3MBM0I?= =?iso-8859-1?Q?/Wel9Yj8KOXevq/uCihcHVbPCYrHdiWrmql5zucQ1InC1UJRn4VIFXpiZ/?= =?iso-8859-1?Q?odZxQHAIaNeggqzFJu2uiZsPu96ljhElsMD+sLY5SJK12xkAtMbwvZsW4I?= =?iso-8859-1?Q?6jPMoRvvydbbEgZjk9ukzBu/wWE+80Fa4TPHBMSOTiFPRdwZwzkyT4m5Lc?= =?iso-8859-1?Q?N9Xhj4LuNNR/r6kfbodc+myIO9E9hblejkbRk6CXatfttiFYYAJFrikk4q?= =?iso-8859-1?Q?l3YYQ3pUZt0jbuq7bVQfUQtgq1ttOqz9//?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL0PR11MB3187.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1e5325c5-5e9c-42cc-8c3e-08da86a1392a X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Aug 2022 13:53:43.3136 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: OoKMi5FqzANWchzsna7NjQ5z/mwbSJ+vbjzHWJ8UwWh2+N4t3lNcTEwKQqexsyBCzBlFeH4M2YJrdKH/xv40LQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3143 X-OriginatorOrg: intel.com 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 Hi, > -----Original Message----- > From: Morten Br=F8rup > Sent: Thursday, August 18, 2022 4:17 PM > To: Jiang, Cheng1 ; Stephen Hemminger > > Cc: maxime.coquelin@redhat.com; Xia, Chenbo ; > dev@dpdk.org; Hu, Jiayu ; Ding, Xuan > ; Ma, WenwuX ; Wang, > YuanX ; Yang, YvonneX > Subject: RE: [RFC 1/2] vhost: add ingress API for port mirroring datapath >=20 > > From: Jiang, Cheng1 [mailto:cheng1.jiang@intel.com] > > Sent: Thursday, 18 August 2022 08.58 > > > > Hi, > > > > > -----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. > > > > 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. > > > > Thanks, > > Cheng >=20 > Thank you for elaborating the use case. >=20 > In other words: This is a performance optimization for a specific use cas= e. >=20 > This raises two questions: >=20 > 1. Please convince us that this is a common use case? Using VM to monitor the other VM's traffic is a common use case. This is co= mmonly used in an intrusion detection system, passive probe or real user mo= nitoring technology. > 2. What is the performance compared to implementing it at the application > level? >=20 This API is introduced mainly to enable DMA acceleration in vhost port mirr= or scenario. And leverage DMA's strong performance. >=20 > Overall, I totally agree with Stephen: >=20 > 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. >=20 > If the application needs to mirror all (or some) packets, why not just le= t the > application do it? >=20 > Furthermore, the application might need to mirror the packets to a physic= al > port, and perhaps encapsulate it for remote packet capture. Sampling coul= d > also be required. Here's a prediction for you: More features will creep i= nto to > this API over time, and it will end up like the ethdev mirroring API bein= g > removed because the alternatives are better and more versatile. First of all, These are Vhost lib APIs based on async vhost which is accele= rated by DMA device. And they are provided for Vhost PMD or other Vhost applications. So, I am n= ot sure whether these APIs are similar to ethdev mirroring APIs which are r= emoved. As far as I understand, RTE_FLOW is used for ethdev. I'm not sure there are= conflicts between mirror API in Vhost and RTE_FLOW, since vhost/virtio is = a virtual protocol. We will consider your suggestion carefully again. Thank you very much. Cheng >=20 > [1]: https://doc.dpdk.org/guides/rel_notes/release_21_11.html#removed- > items