Re: [vpp-dev] I want to construct some packets to be sent by a specified thread,what can I do?

2019-09-11 Thread Christian Hopps


> On Sep 11, 2019, at 2:07 AM, wei_sky2...@163.com wrote:
> 
> On Tue, Sep 10, 2019 at 12:44 AM, Christian Hopps wrote:
> UTSL
> Thank you for reply。
> In our  scenario,we use the Intel ‘s DDP feature to hash different GTP 
> packets into different threads。And We want the GTP packets from the same UE 
> to be hashed on the same thread,DDP can‘t implement this function。
> So we consider using the Handoff mechanism 。But We still have some doubts.
> (1) We know VPP ensure efficiency by deal one group packets by the same 
> thread's nodes,if we use handoff ,how much does this mechanism affect 
> efficiency?Or is there any other mechanism to meet our requirements?

Actually, the fundamental efficiency is based on I-cache utilization, AFAICT. 
By processing a bunch of packets (the vector of packets, i.e., the node's 
frame) using the same smallish bit of code (the node function) the i-cache is 
only invalidated/reloaded when moving from node to node and so it executes very 
quickly over a large set of packets. In addition a very common design pattern 
inside a VPP node function is to loop on a clump of packets, while prefeching 
the next clump (which happens in parallel) so that the load from RAM to D-cache 
hit is hopefully minimized.

Together these optimizations work regardless of which thread is processing the 
vector of packets.

> (2)If we use Handoff,Which method is better:
> a)  Dealing GTP packet RSS without using devices, use software 
> RSS,use one Thread receive All packets,then handoff to other threads
> b)  Dealing GTP packet RSS with using devices, when the thread 
> receive packet, determine if the current thread need to deal this packet,if 
> not,handoff to other thread。

I think you'll need to figure this out yourself (or maybe someone else can 
help). I'm myself writing an application and learning what works and doesn't 
work right now. :)

Thanks,
Chris.

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#13949): https://lists.fd.io/g/vpp-dev/message/13949
> Mute This Topic: https://lists.fd.io/mt/34077019/1826170
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [cho...@chopps.org]
> -=-=-=-=-=-=-=-=-=-=-=-



signature.asc
Description: Message signed with OpenPGP
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13951): https://lists.fd.io/g/vpp-dev/message/13951
Mute This Topic: https://lists.fd.io/mt/34077019/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] I want to construct some packets to be sent by a specified thread,what can I do?

2019-09-10 Thread wei_sky2008
On Tue, Sep 10, 2019 at 12:44 AM, Christian Hopps wrote:

> 
> UTSL

Thank you for reply。
In our  scenario,we use the Intel ‘s DDP feature to hash different GTP packets 
into different threads。And We want the GTP packets from the same UE to be 
hashed on the same thread,DDP can‘t implement this function。
So we consider using the Handoff mechanism 。But We still have some doubts.
(1) We know VPP ensure efficiency by deal one group packets by the same 
thread's nodes,if we use handoff ,how much does this mechanism affect 
efficiency?Or is there any other mechanism to meet our requirements? (2)If we 
use Handoff,Which method is better:
a)  Dealing GTP packet RSS without using devices, use software RSS,use one 
Thread receive All packets,then handoff to other threads
b)  Dealing GTP packet RSS with using devices, when the thread receive packet, 
determine if the current thread need to deal this packet,if not,handoff to 
other thread。
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13949): https://lists.fd.io/g/vpp-dev/message/13949
Mute This Topic: https://lists.fd.io/mt/34077019/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] I want to construct some packets to be sent by a specified thread,what can I do?

2019-09-10 Thread Christian Hopps
UTSL. :)

vlib_buffer_enqueue_to_thread (vlib_main_t * vm, u32 frame_queue_index,
...
  to_next_thread[0] = buffer_indices[0];
  to_next_thread++;
  n_left_to_next_thread--;

i.e., it does not copy the buffers.

Thanks,
Chris.

> On Sep 10, 2019, at 3:24 AM, wei_sky2...@163.com wrote:
> 
> Thank you for your response。
>  I still have another question,does this mechanism involve copying?We need to 
> ensure packet forwarding efficiency -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#13933): https://lists.fd.io/g/vpp-dev/message/13933
> Mute This Topic: https://lists.fd.io/mt/34077019/1826170
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [cho...@chopps.org]
> -=-=-=-=-=-=-=-=-=-=-=-



signature.asc
Description: Message signed with OpenPGP
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13934): https://lists.fd.io/g/vpp-dev/message/13934
Mute This Topic: https://lists.fd.io/mt/34077019/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] I want to construct some packets to be sent by a specified thread,what can I do?

2019-09-10 Thread wei_sky2008
Thank you for your response。
I still have another question,does this mechanism involve copying?We need to 
ensure packet forwarding efficiency
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13933): https://lists.fd.io/g/vpp-dev/message/13933
Mute This Topic: https://lists.fd.io/mt/34077019/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] I want to construct some packets to be sent by a specified thread,what can I do?

2019-09-09 Thread Christian Hopps
https://fdio-vpp.readthedocs.io/en/latest/gettingstarted/developers/vlib.html#handing-off-buffers-between-threads

> On Sep 9, 2019, at 2:28 AM, wei_sky2...@163.com wrote:
> 
> our process mode need to construct some packets  which is to be sent by a 
> specified thread
> in A thread ,a node receive some packets ,when these packet deal finish,they 
> need to  be sent to another node which is belong to B thread,
> What can be done to meet this requirement?
> Thanks
>   -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#13922): https://lists.fd.io/g/vpp-dev/message/13922
> Mute This Topic: https://lists.fd.io/mt/34077019/1826170
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [cho...@chopps.org]
> -=-=-=-=-=-=-=-=-=-=-=-



signature.asc
Description: Message signed with OpenPGP
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13924): https://lists.fd.io/g/vpp-dev/message/13924
Mute This Topic: https://lists.fd.io/mt/34077019/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-