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 02A5342AD5; Thu, 11 May 2023 14:16:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A549406B6; Thu, 11 May 2023 14:16:14 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 4012440697 for ; Thu, 11 May 2023 14:16:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683807372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vTuJ26t74uwHQiXVlSkH8SHJmQTffnvIllFhR612Hes=; b=IwuEAkiWDsLi2sPxhhAOhNC5fAGaBvh2MFrqHGIUjHtageE5l9iQG8h/B/bvCg/ZPEE2zR cMiHlOEEKigTMXy3t6NvnPVXR+dflOpBNIh3sw3SEGDvOCbWDQsJ/5P+foM5MNVCc2ZOQ9 Jg8bhCJlsUm3fjrRSDi4ffmMOdT81zQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-127-KdmVI8HYPKiUqL3kTlRpGw-1; Thu, 11 May 2023 08:16:11 -0400 X-MC-Unique: KdmVI8HYPKiUqL3kTlRpGw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D48AC857E0C; Thu, 11 May 2023 12:16:10 +0000 (UTC) Received: from [10.39.208.9] (unknown [10.39.208.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D84D401DE04; Thu, 11 May 2023 12:16:08 +0000 (UTC) Message-ID: <5adb400f-89c4-40d8-f667-4cbaed07632a@redhat.com> Date: Thu, 11 May 2023 14:16:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 0/2] vhost: add port mirroring function in the vhost lib To: "Xia, Chenbo" , "Jiang, Cheng1" Cc: "dev@dpdk.org" , "Hu, Jiayu" , "Ding, Xuan" , "Ma, WenwuX" , "Wang, YuanX" , "He, Xingguang" , David Marchand References: <20230421010932.46847-1-cheng1.jiang@intel.com> <42af2ea2-0c07-bc76-e086-9eb6bf0c639e@redhat.com> From: Maxime Coquelin In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 5/11/23 10:59, Xia, Chenbo wrote: >> -----Original Message----- >> From: Jiang, Cheng1 >> Sent: Monday, May 8, 2023 8:23 PM >> To: Maxime Coquelin ; Xia, Chenbo >> >> Cc: dev@dpdk.org; Hu, Jiayu ; Ding, Xuan >> ; Ma, WenwuX ; Wang, YuanX >> ; He, Xingguang ; David >> Marchand >> Subject: RE: [PATCH 0/2] vhost: add port mirroring function in the vhost >> lib >> >> Hi Maxime, >> >>> -----Original Message----- >>> From: Maxime Coquelin >>> Sent: Wednesday, May 3, 2023 5:37 PM >>> To: Jiang, Cheng1 ; Xia, Chenbo >>> >>> Cc: dev@dpdk.org; Hu, Jiayu ; Ding, Xuan >>> ; Ma, WenwuX ; Wang, YuanX >>> ; He, Xingguang ; David >>> Marchand >>> Subject: Re: [PATCH 0/2] vhost: add port mirroring function in the vhost >> lib >>> >>> Hi Cheng, >>> >>> On 4/21/23 03:09, Cheng Jiang wrote: >>>> Similar to the port mirroring function on the switch or router, this >>>> patch set implements such function on the Vhost lib. When data is sent >>>> to a front-end, it will also send the data to its mirror front-end. >>>> When data is received from a front-end, it will also send the data to >>>> its mirror front-end. >>> >>> Why not just keeping mirroring in the switch/router? >>> I am really not convinced this is the way to go: >>> 1. API is too complex >>> 2. It requires async support >>> 3. There is too much code duplication, it increases virtio-net.c by >>> 30%, and it is without packed ring support. >>> 4. If mirror port is down for any reason, packets to/from the original >>> port are dropped. >>> 5. It seems to assume negotiated features of the two ports are >>> identical, e.g. Virtio-net header length? If so, that's not a >>> manageable solution. >> >> Thank you for your feedback. >> I concur that placing the mirror function in the Vhost library is not >> ideal. We are currently considering implementing either a mirror Vhost PMD, >> or adding a function to TestPMD to handle this functionality. >> Would you please share your thoughts on this plan and let us know which >> option you prefer? > > Based on current implementation, it seems that vhost lib could be ignorant > of the mirroring usage. Making these logic into APP like testpmd seems to make > more sense. I agree with Chenbo, it should be done at the application level, which would enable to also mirror non-Vhost ports. Thanks, Maxime > Thanks, > Chenbo > >> >> Thanks a lot, >> Cheng >> >> >> >>> >>> Regards, >>> Maxime >>> >>>> >>>> Cheng Jiang (2): >>>> vhost: add ingress API for port mirroring datapath >>>> vhost: add egress API for port mirroring datapath >>>> >>>> lib/vhost/rte_vhost_async.h | 17 + >>>> lib/vhost/version.map | 3 + >>>> lib/vhost/virtio_net.c | 1266 >> +++++++++++++++++++++++++++++++++++ >>>> 3 files changed, 1286 insertions(+) >>>> >>>> -- >>>> 2.35.1 >>>> >