[PATCH 0/2] vhost: add port mirroring function in the vhost lib
Jiang, Cheng1
cheng1.jiang at intel.com
Mon May 8 14:23:15 CEST 2023
Hi Maxime,
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin at redhat.com>
> Sent: Wednesday, May 3, 2023 5:37 PM
> To: Jiang, Cheng1 <cheng1.jiang at intel.com>; Xia, Chenbo
> <chenbo.xia at intel.com>
> Cc: dev at dpdk.org; Hu, Jiayu <jiayu.hu at intel.com>; Ding, Xuan
> <xuan.ding at intel.com>; Ma, WenwuX <wenwux.ma at intel.com>; Wang, YuanX
> <yuanx.wang at intel.com>; He, Xingguang <xingguang.he at intel.com>; David
> Marchand <david.marchand at 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?
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
> >
More information about the dev
mailing list