Re: [vpp-dev] Copy packet forwarding performance issues

2022-08-02 Thread Benoit Ganne (bganne) via lists.fd.io
Ha I see, then I guess you can alloc multiple heads at once and then use 
vlib_buffer_attach_clone().
You usually need to duplicate the head of the packet you're cloning because 
it's going to be rewritten when you forward (ttl decrement, l2 rewrite etc).

ben

> -Original Message-
> From: vpp-dev@lists.fd.io  On Behalf Of NUAA??
> Sent: Tuesday, August 2, 2022 9:46
> To: vpp-dev@lists.fd.io
> Subject: Re: [vpp-dev] Copy packet forwarding performance issues
> 
> Hi, ben
> Thanks for your hint, i used vlib_buffer_clone() to copy packet, but the
> performance is drop
> i found that vlib_buffer_clone is use vlib_buffer_alloc(),is there other
> way to improve performance?
> 
> by the way,i also used rte_mbuf_from_vlib_buffer() to use dpdk‘s rte_mbuf
> to use dpdk buf refcnt, but this way need to copy vpp's buffer to dpdk
> buffer,
> can vpp use dpdk's rte_mbuf directly?
> 
> best
> wanghe
> 
> Benoit Ganne (bganne) via lists.fd.io <http://lists.fd.io>
> mailto:cisco@lists.fd.io> > 于2022年8月
> 1日周一 15:08写道:
> 
> 
>   You probably want to use vlib_buffer_clone() instead.
> 
>   Best
>   ben
> 
>   > -Original Message-
>   > From: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>   d...@lists.fd.io <mailto:vpp-dev@lists.fd.io> > On Behalf Of NUAA??
>   > Sent: Monday, August 1, 2022 4:53
>   > To: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>
>   > Subject: [vpp-dev] Copy packet forwarding performance issues
>   >
>   > Hi,vpp experts
>   > I have a task that send one packet to three NIC
>   > my method is that use "vlib_buffer_alloc" function to copy three
> buffer,
>   > but this method is poor performance,about that if vpp is 10G bps
> , once
>   > copy will reduce 1.5G bps
>   >
>   > is vpp has like dpdk buffer use refcnt count to avoid copy buffer
> ? can
>   > you give me some suggestions to send packet with high performence
> ?
>   >
>   > Best wish
>   > wanghe
>   >
>   >
> 
> 
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21758): https://lists.fd.io/g/vpp-dev/message/21758
Mute This Topic: https://lists.fd.io/mt/92739833/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Copy packet forwarding performance issues

2022-08-02 Thread NUAA无痕
Hi, ben
Thanks for your hint, i used vlib_buffer_clone() to copy packet, but the
performance is drop
i found that vlib_buffer_clone is use vlib_buffer_alloc(),is there other
way to improve performance?

by the way,i also used rte_mbuf_from_vlib_buffer() to use dpdk‘s rte_mbuf
to use dpdk buf refcnt, but this way need to copy vpp's buffer to dpdk
buffer,
can vpp use dpdk's rte_mbuf directly?

best
wanghe

Benoit Ganne (bganne) via lists.fd.io 
于2022年8月1日周一 15:08写道:

> You probably want to use vlib_buffer_clone() instead.
>
> Best
> ben
>
> > -Original Message-
> > From: vpp-dev@lists.fd.io  On Behalf Of NUAA??
> > Sent: Monday, August 1, 2022 4:53
> > To: vpp-dev@lists.fd.io
> > Subject: [vpp-dev] Copy packet forwarding performance issues
> >
> > Hi,vpp experts
> > I have a task that send one packet to three NIC
> > my method is that use "vlib_buffer_alloc" function to copy three buffer,
> > but this method is poor performance,about that if vpp is 10G bps, once
> > copy will reduce 1.5G bps
> >
> > is vpp has like dpdk buffer use refcnt count to avoid copy buffer? can
> > you give me some suggestions to send packet with high performence?
> >
> > Best wish
> > wanghe
> >
> >
>
>
> 
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21757): https://lists.fd.io/g/vpp-dev/message/21757
Mute This Topic: https://lists.fd.io/mt/92739833/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Copy packet forwarding performance issues

2022-08-01 Thread Benoit Ganne (bganne) via lists.fd.io
You probably want to use vlib_buffer_clone() instead.

Best
ben

> -Original Message-
> From: vpp-dev@lists.fd.io  On Behalf Of NUAA??
> Sent: Monday, August 1, 2022 4:53
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] Copy packet forwarding performance issues
> 
> Hi,vpp experts
> I have a task that send one packet to three NIC
> my method is that use "vlib_buffer_alloc" function to copy three buffer,
> but this method is poor performance,about that if vpp is 10G bps, once
> copy will reduce 1.5G bps
> 
> is vpp has like dpdk buffer use refcnt count to avoid copy buffer? can
> you give me some suggestions to send packet with high performence?
> 
> Best wish
> wanghe
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21748): https://lists.fd.io/g/vpp-dev/message/21748
Mute This Topic: https://lists.fd.io/mt/92739833/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] Copy packet forwarding performance issues

2022-07-31 Thread NUAA无痕
Hi,vpp experts
I have a task that send one packet to three NIC
my method is that use "vlib_buffer_alloc" function to copy three buffer,but
this method is poor performance,about that if vpp is 10G bps, once copy
will reduce 1.5G bps

is vpp has like dpdk buffer use refcnt count to avoid copy buffer? can you
give me some suggestions to send packet with high performence?

Best wish
wanghe

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21747): https://lists.fd.io/g/vpp-dev/message/21747
Mute This Topic: https://lists.fd.io/mt/92739833/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-