Hi Pragash,

Some answers inline @[NR]


From: <vpp-dev-boun...@lists.fd.io> on behalf of Pragash Vijayaragavan 
<pxv3...@rit.edu>
Reply-To: "pxv3...@rit.edu" <pxv3...@rit.edu>
Date: Saturday, 18 February 2017 at 03:56
To: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io>
Cc: Shailesh Vajpayee <srv6...@rit.edu>, Arjun Dhuliya <amd5...@rit.edu>, 
Minseok Kwon <mxk...@rit.edu>
Subject: [vpp-dev] vpp query

Hi,


We are working on a bloom Filter algorithm for ipv6 lookup in vpp and we have a 
few queries.
It would be great if someone could help us with the following queries.

1. from the code, ip6_forward.c file processes 2 packets at a time from the 
frame.
how are threads used in this. Is there a thread for each frame to be processed 
or a thread per packet.

[NR] there is one thread per frame. If multiple threads are used, then each 
thread will invoke ip6_lookup_inline will a different frame.
Processing two packets at once in the same thread is to improve d-cache 
performance.

2. A problem which we came across was synchronization for the lookup and 
filling of the filter, Dave suggested
we use 2 filters and swap between them to address this issue
Is there any limitation on the amount of memory to be used for the filter. 

[NR] the only limit is the heap size. This is (1<<30) bytes by default. You can 
change it;
 https://wiki.fd.io/view/VPP/Command-line_Arguments#.22heapsize.22_parameter

3. Also we are required to handle 2 threads for our filter, one is to fill up 
the filter using the fib entries
and the other is for lookup
- the ip6_forward.c -> ip6_lookup_inline function does the lookup part. From 
our understanding this function
is processing the packets and checking if the destination ip is in the fib. But 
we are required to fill our filter
with all fib entries dynamically as well, we understand this is also similar to 
the mtrie code, but we are not able to 
get how it works and threading is done here.

[NR]
there’s a brief into the thread models here:
  https://wiki.fd.io/view/VPP/Using_VPP_In_A_Multi-thread_Model

in multi-thread mode worker threads invoke ip6_lookup_inline, the main thread 
does the filing. In single thread mode the main thread does both.

The IPv6 FIB is composed of 2 tables (where a table in this context means a DB 
keyed by prefix); forwarding and non-forwarding.
The non-forwarding table contains ALL the prefixes that VPP is aware of – a 
lookup in this table will result in a fib_entry_t.
The forwarding table contains the sub-set of prefixes that can be used for 
forwarding – a lookup in this table will result in a load_balance_t.
I suspect you want to use bloom filters for the forwarding table. Additions and 
removals from this table are via ip6_fib_table_fwding_dpo_update and 
ip6_fib_table_fwding_dpo_remove respectively.

HTH,
neale

-- 
Thanks, 

Pragash Vijayaragavan (pxv3...@rit.edu)
ph : 585 764 4662



_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to