DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] LRU using DPDK 1.7
@ 2014-09-23  1:08 Saha, Avik (AWS)
  2014-09-23  1:33 ` Matthew Hall
  0 siblings, 1 reply; 5+ messages in thread
From: Saha, Avik (AWS) @ 2014-09-23  1:08 UTC (permalink / raw)
  To: dev

Hello
   I was wondering if there is way to use the rte_table_hash_lru without building a pipeline - Basically using the same hash table like functionality of add, delete and lookup without setting up a pipeline and connect it to ports etc.

Thanks
Avik

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] LRU using DPDK 1.7
  2014-09-23  1:08 [dpdk-dev] LRU using DPDK 1.7 Saha, Avik (AWS)
@ 2014-09-23  1:33 ` Matthew Hall
  2014-09-23  2:42   ` Venkatesan, Venky
  2014-09-23  3:43   ` Saha, Avik (AWS)
  0 siblings, 2 replies; 5+ messages in thread
From: Matthew Hall @ 2014-09-23  1:33 UTC (permalink / raw)
  To: Saha, Avik (AWS); +Cc: dev

On Tue, Sep 23, 2014 at 01:08:21AM +0000, Saha, Avik (AWS) wrote:
> I was wondering if there is way to use the rte_table_hash_lru without 
> building a pipeline - Basically using the same hash table like functionality 
> of add, delete and lookup without setting up a pipeline and connect it to 
> ports etc.

I've been finding that rte_hash is designed only for some very specialized 
purposes. It doesn't work well if you use unexpected sizes of keys or want 
behavior that isn't precisely doing what the designers of the hash used it 
for... it's not very general-purpose.

I did try to point out one example of the issue but I didn't get much response 
yet to my questions about its limitations and whether a more general-purpose 
table was available, or at least some discussion what rte_hash is for and what 
it's not for.

Matthew.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] LRU using DPDK 1.7
  2014-09-23  1:33 ` Matthew Hall
@ 2014-09-23  2:42   ` Venkatesan, Venky
  2014-09-23  3:43   ` Saha, Avik (AWS)
  1 sibling, 0 replies; 5+ messages in thread
From: Venkatesan, Venky @ 2014-09-23  2:42 UTC (permalink / raw)
  To: dev


On 9/22/2014 6:33 PM, Matthew Hall wrote:
> On Tue, Sep 23, 2014 at 01:08:21AM +0000, Saha, Avik (AWS) wrote:
>> I was wondering if there is way to use the rte_table_hash_lru without
>> building a pipeline - Basically using the same hash table like functionality
>> of add, delete and lookup without setting up a pipeline and connect it to
>> ports etc.
> I've been finding that rte_hash is designed only for some very specialized
> purposes. It doesn't work well if you use unexpected sizes of keys or want
> behavior that isn't precisely doing what the designers of the hash used it
> for... it's not very general-purpose.
Yes, it isn't very general purpose as of now (arbitrary key sizes, 
failure path on add if bucket is full etc.). It was designed to be a 
tuple matcher, albeit for a much different performance level than what 
we have driven the DPDK to at present.

That said, the structure of this is something that I expect that we will 
change to make much more flexible, and have a few ideas I'm exploring 
along that line. What would be helpful is start adding to that list of 
limitations from your perspective so that we can address as much of that 
with one patch set.
>
> I did try to point out one example of the issue but I didn't get much response
> yet to my questions about its limitations and whether a more general-purpose
> table was available, or at least some discussion what rte_hash is for and what
> it's not for.
>
> Matthew.

I missed the original email you refer to - I'll dig that up as well from 
the archives.

Regards,
-Venky

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] LRU using DPDK 1.7
  2014-09-23  1:33 ` Matthew Hall
  2014-09-23  2:42   ` Venkatesan, Venky
@ 2014-09-23  3:43   ` Saha, Avik (AWS)
  2014-09-23  5:26     ` Matthew Hall
  1 sibling, 1 reply; 5+ messages in thread
From: Saha, Avik (AWS) @ 2014-09-23  3:43 UTC (permalink / raw)
  To: Matthew Hall; +Cc: dev

So with DPDK 1.7 there are 2 separate implementations - one is the rte_hash which does not support LRU (at least to my understanding - I could be wrong here) and then there is the librte_table library which has support for LRU in a hash table. I m a little confused as to which one you are referring to Matthew.

-----Original Message-----
From: Matthew Hall [mailto:mhall@mhcomputing.net] 
Sent: Monday, September 22, 2014 6:34 PM
To: Saha, Avik (AWS)
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] LRU using DPDK 1.7

On Tue, Sep 23, 2014 at 01:08:21AM +0000, Saha, Avik (AWS) wrote:
> I was wondering if there is way to use the rte_table_hash_lru without 
> building a pipeline - Basically using the same hash table like 
> functionality of add, delete and lookup without setting up a pipeline 
> and connect it to ports etc.

I've been finding that rte_hash is designed only for some very specialized purposes. It doesn't work well if you use unexpected sizes of keys or want behavior that isn't precisely doing what the designers of the hash used it for... it's not very general-purpose.

I did try to point out one example of the issue but I didn't get much response yet to my questions about its limitations and whether a more general-purpose table was available, or at least some discussion what rte_hash is for and what it's not for.

Matthew.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] LRU using DPDK 1.7
  2014-09-23  3:43   ` Saha, Avik (AWS)
@ 2014-09-23  5:26     ` Matthew Hall
  0 siblings, 0 replies; 5+ messages in thread
From: Matthew Hall @ 2014-09-23  5:26 UTC (permalink / raw)
  To: Saha, Avik (AWS); +Cc: dev

On Tue, Sep 23, 2014 at 03:43:59AM +0000, Saha, Avik (AWS) wrote:

> So with DPDK 1.7 there are 2 separate implementations - one is the rte_hash 
> which does not support LRU (at least to my understanding - I could be wrong 
> here) and then there is the librte_table library which has support for LRU 
> in a hash table. I m a little confused as to which one you are referring to 
> Matthew.

I'm referring to the fact that rte_hash'es of all types are kind of 
special-purpose. So it's important to clarify what kind of data you're 
planning to match, using which of the hashes, and which strategy.

In my case I wanted to use them for variable-length data which will likely not 
fit onto a cacheline such as URL's, and they don't work for this application.

Matthew.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-23  5:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-23  1:08 [dpdk-dev] LRU using DPDK 1.7 Saha, Avik (AWS)
2014-09-23  1:33 ` Matthew Hall
2014-09-23  2:42   ` Venkatesan, Venky
2014-09-23  3:43   ` Saha, Avik (AWS)
2014-09-23  5:26     ` Matthew Hall

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git