DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Jiang, Cheng1" <cheng1.jiang@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
	"Xia, Chenbo" <chenbo.xia@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Hu, Jiayu" <jiayu.hu@intel.com>,
	"Ding, Xuan" <xuan.ding@intel.com>,
	"Ma, WenwuX" <wenwux.ma@intel.com>,
	"Wang, YuanX" <yuanx.wang@intel.com>,
	"He, Xingguang" <xingguang.he@intel.com>,
	David Marchand <david.marchand@redhat.com>
Subject: RE: [PATCH 0/2] vhost: add port mirroring function in the vhost lib
Date: Wed, 17 May 2023 07:34:46 +0000	[thread overview]
Message-ID: <SN7PR11MB70192E24A0D746383D25C445DC7E9@SN7PR11MB7019.namprd11.prod.outlook.com> (raw)
In-Reply-To: <5adb400f-89c4-40d8-f667-4cbaed07632a@redhat.com>

Hi Maxime/Chenbo,

> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Thursday, May 11, 2023 8:16 PM
> To: Xia, Chenbo <chenbo.xia@intel.com>; Jiang, Cheng1
> <cheng1.jiang@intel.com>
> Cc: dev@dpdk.org; Hu, Jiayu <jiayu.hu@intel.com>; Ding, Xuan
> <xuan.ding@intel.com>; Ma, WenwuX <wenwux.ma@intel.com>; Wang, YuanX
> <yuanx.wang@intel.com>; He, Xingguang <xingguang.he@intel.com>; David
> Marchand <david.marchand@redhat.com>
> Subject: Re: [PATCH 0/2] vhost: add port mirroring function in the vhost lib
> 
> 
> 
> On 5/11/23 10:59, Xia, Chenbo wrote:
> >> -----Original Message-----
> >> From: Jiang, Cheng1 <cheng1.jiang@intel.com>
> >> Sent: Monday, May 8, 2023 8:23 PM
> >> To: Maxime Coquelin <maxime.coquelin@redhat.com>; Xia, Chenbo
> >> <chenbo.xia@intel.com>
> >> Cc: dev@dpdk.org; Hu, Jiayu <jiayu.hu@intel.com>; Ding, Xuan
> >> <xuan.ding@intel.com>; Ma, WenwuX <wenwux.ma@intel.com>; Wang,
> YuanX
> >> <yuanx.wang@intel.com>; He, Xingguang <xingguang.he@intel.com>; David
> >> Marchand <david.marchand@redhat.com>
> >> Subject: RE: [PATCH 0/2] vhost: add port mirroring function in the
> >> vhost lib
> >>
> >> Hi Maxime,
> >>
> >>> -----Original Message-----
> >>> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> >>> Sent: Wednesday, May 3, 2023 5:37 PM
> >>> To: Jiang, Cheng1 <cheng1.jiang@intel.com>; Xia, Chenbo
> >>> <chenbo.xia@intel.com>
> >>> Cc: dev@dpdk.org; Hu, Jiayu <jiayu.hu@intel.com>; Ding, Xuan
> >>> <xuan.ding@intel.com>; Ma, WenwuX <wenwux.ma@intel.com>; Wang,
> YuanX
> >>> <yuanx.wang@intel.com>; He, Xingguang <xingguang.he@intel.com>;
> >>> David Marchand <david.marchand@redhat.com>
> >>> 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.

I mostly agree with your opinions. However, the workload for implementing a general mirror framework to support all ports in the application level would be too large for us for now. Currently, we are more focused on demonstrating the superior performance advantages of async Vhost and DSA with this mirror work. Therefore, we may need to temporarily put this upstream process on hold.

I greatly appreciate your feedback and help. Maybe we can discuss the details in the future. Thank you again!

Best regards,
Cheng

> 
> 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
> >>>>
> >


      reply	other threads:[~2023-05-17  7:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  1:09 Cheng Jiang
2023-04-21  1:09 ` [PATCH 1/2] vhost: add ingress API for port mirroring datapath Cheng Jiang
2023-04-21  1:09 ` [PATCH 2/2] vhost: add egress " Cheng Jiang
2023-05-03  9:36 ` [PATCH 0/2] vhost: add port mirroring function in the vhost lib Maxime Coquelin
2023-05-08 12:23   ` Jiang, Cheng1
2023-05-11  8:59     ` Xia, Chenbo
2023-05-11 12:16       ` Maxime Coquelin
2023-05-17  7:34         ` Jiang, Cheng1 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN7PR11MB70192E24A0D746383D25C445DC7E9@SN7PR11MB7019.namprd11.prod.outlook.com \
    --to=cheng1.jiang@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jiayu.hu@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=wenwux.ma@intel.com \
    --cc=xingguang.he@intel.com \
    --cc=xuan.ding@intel.com \
    --cc=yuanx.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).