[dpdk-dev] Bit spinlocks in DPDK

2013-12-06 Thread Pashupati Kumar
Hi,
We use bit spinlocks extensively to have compact data structures.  Are there 
any plans for adding them to DPDK in some future release?


Thanks
Pash


[dpdk-dev] Bit spinlocks in DPDK

2013-12-06 Thread Pashupati Kumar
I am looking for spinlocks that use a single bit (bit 31) of a 32 bit word for 
locking. The rest of the bits in the word are left undisturbed.  This enables 
more compact data structures as only 1 bit is consumed for the lock.

Thanks
Pash

-Original Message-
From: Thomas Monjalon [mailto:thomas.monja...@6wind.com] 
Sent: Friday, December 06, 2013 2:02 PM
To: Pashupati Kumar
Cc: dev at dpdk.org
Subject: Re: [dpdk-dev] Bit spinlocks in DPDK

Hello,

06/12/2013 13:04, Pashupati Kumar :
> We use bit spinlocks extensively to have compact data structures.  Are 
> there any plans for adding them to DPDK in some future release?

Not sure to understand your request.
Are you looking for that?
http://dpdk.org/doc/api/rte__spinlock_8h.html

--
Thomas


[dpdk-dev] Bit spinlocks in DPDK

2013-12-06 Thread Pashupati Kumar
> 06/12/2013 14:12, Pashupati Kumar :
> > From: Thomas Monjalon
> > > 06/12/2013 13:04, Pashupati Kumar :
> > > > We use bit spinlocks extensively to have compact data structures.
> > > > Are there any plans for adding them to DPDK in some future release?
> > >
> > > Not sure to understand your request.
> > > Are you looking for that?
> > >   http://dpdk.org/doc/api/rte__spinlock_8h.html
> >
> > I am looking for spinlocks that use a single bit (bit 31) of a 32 bit
> > word for locking. The rest of the bits in the word are left
> > undisturbed.  This enables more compact data structures as only 1 bit
> > is consumed for the lock.
> 
> Oh yes, like test_and_set_bit_lock() in Linux:
>   http://lxr.free-
> electrons.com/source/arch/ia64/include/asm/bitops.h?v=3.12#L205
> 
> I think that a patch would be appreciated :)
> 
> PS: please try to answer below the question. It's far easier to read.
> --
> Thomas

Yes. Thank you.

Pash



[dpdk-dev] RTE CRC hash function

2013-12-09 Thread Pashupati Kumar
Hi,
I am looking at the DPDK implementation for  the CRC hash function using Intel 
intrinsics.  Shouldn't the order of the arguments being passed to  
_mm_crc32_u32 be reversed ?
http://dpdk.org/doc/api/rte__hash__crc_8h.html

For a quick reference, here is the code with Actual and Modified calls.
static inline uint32_t
rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
{
Actual > return _mm_crc32_u32(data, init_val);
Modified > return _mm_crc32_u32(init_val, data);
}


Thanks
Pash



[dpdk-dev] kni vs. pmd

2013-12-12 Thread Pashupati Kumar
> -Original Message-
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Jose Gavine Cueto
> Sent: Tuesday, December 10, 2013 3:16 PM
> To: dev at dpdk.org
> Subject: Re: [dpdk-dev] kni vs. pmd
> 
> Additional question:
> 
> Apart from the possible fact that kni performs zero-copy in the driver layer,
> does this also apply on the sockets layer, or does the sockets operations (+
> sys calls) are not avoided ?  This is assuming that the application uses 
> regular
> sockets to read/write to knis.
If you are going to use KNI, there is a copy involved from iovec to RTE mbuf 
memory ( assuming you are going to use Ring library for communication between 
DPDK application and KNI). I look at KNI as more for control path operation and 
PMDs for data path. 
> 
> Cheers,
> Pepe
> 
> 
> On Wed, Dec 11, 2013 at 7:12 AM, Jose Gavine Cueto
> wrote:
> 
> > Hi,
> >
> > Correct me if I'm wrong, but in a high-level perspective I see that
> > kni is providing an option for applications to use their regular interfaces
> (e.g.
> > sockets) and abstracts the usage of pmds.
> >
> > If this is somehow correct, are there any differences with regard to
> > performance benefits that can be brought between directly using pmd
> > apis and kni ?
> >
> > I see that kni is easier to use, however at first (no code inspection)
> > look, it interfaces with the kernel which might have introduced some
> > overhead.
> >
> > Cheers,
> > Pepe
> >
> >
> > --
> > To stop learning is like to stop loving.
> >
> 
> 
> 
> --
> To stop learning is like to stop loving.

Thanks
Pash


[dpdk-dev] Running load balancer sample app

2013-11-25 Thread Pashupati Kumar
Hi,
I am trying to run the load balancer sample application included in the DPDK.  
I am looking at the relevant section in Sample Applications User Guide. There 
is mention of test report ( Please see the snippet below)

For examples of application command lines and traffic generator flows, please 
refer to
the Intel(r) DPDK Test Report.

How & Where do I get this document? Can someone also suggest what traffic 
generator tool should I use?

Thanks
Pash