Hi,

Thanks for the help, we will look into the suggested and get back if we
have any concerns.

Thanks
Pragash Vijayragavan
pxv3...@rit.edu
585 764 4662

On Sat, Feb 18, 2017 at 4:12 PM, Dave Barach (dbarach) <dbar...@cisco.com>
wrote:

> A bit more inline, see drb>>>
>
> Thanks… Dave
>
> -----Original Message-----
> From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On
> Behalf Of Neale Ranns (nranns)
> Sent: Saturday, February 18, 2017 3:52 PM
> To: pxv3...@rit.edu; vpp-dev@lists.fd.io
> Cc: Shailesh Vajpayee <srv6...@rit.edu>; Arjun Dhuliya <amd5...@rit.edu>;
> Minseok Kwon <mxk...@rit.edu>
> Subject: Re: [vpp-dev] vpp query
>
>
> 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.
>
> drb>>> By default, the dual-loop pattern prefetches 2 packets ahead. It
> sometimes helps a bit to change the prefetch stride, e.g. to 3 or 4 ahead.
> Vpp runs with a measured instructions-per-clock > 2. Until the compiler
> runs out of registers, processing multiple packets at once helps the
> hardware exploit fine-grained parallelism. Simple story: packet i uses a
> set of registers to do <whatever>. Packet i+1 uses a disjoint set of
> registers to do <whatever>.
>
> Selected routines benefit from quad-looping, processing 4 packets at a
> time. Take a look at dpdk_device_input(...) in .../src/vnet/devices/dpdk/
> node.c.
>
> 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
>
> drb>>> Note that if you need a heap > 4gb, special arrangements are
> required. Ping me if you think you need to go there.
>
> 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
>



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