[lng-odp] ODP CRC32

2018-12-31 Thread Daniel Feferman
Hi all,

I'm new into ODP and this is probably a too simple question, but I want to
make the CRC32 of an ipv4 source address (e.g.: 211.97.49.209) using the
function odp_hash_crc32(). However, I'm not quite sure what the data
pointer should contain, is it:

-211.97.49.209
-d3.61.31.d1
-d36131d1
-Any other option?

Can someone help me with this question?

Thanks,
Daniel


Re: [lng-odp] odp_hash_crc32() vs python zlib crc32

2018-08-20 Thread Daniel Feferman
Hi Petri,

Thanks for the feedback. Yes, trying "123456789" I'm able to check the
result 0xcbf43926, but the result of crc32 on ODP is a decimal and seems to
be a positive number, always, am I wrong?

Best,
Daniel

On Mon, Aug 20, 2018 at 4:42 AM Savolainen, Petri (Nokia - FI/Espoo) <
petri.savolai...@nokia.com> wrote:

> Hi,
>
> Did you give 0x as the init value for zlib call? CRC32 algorithm
> is defined with that as the init value. Also, you can check correct
> operation by trying to hash  "123456789" (the common check string), which
> should result 0xcbf43926 as output for CRC32.
>
> See e.g.
> http://reveng.sourceforge.net/crc-catalogue/17plus.htm#crc.cat-bits.32
>
> -Petri
>
> > -Original Message-
> > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
> Daniel
> > Feferman
> > Sent: Friday, August 17, 2018 7:18 PM
> > To: lng-odp@lists.linaro.org
> > Subject: [lng-odp] odp_hash_crc32() vs python zlib crc32
> >
> > Hi all,
> >
> > I'm comparing odp crc32 function vs python zlib
> > <https://docs.python.org/3/library/zlib.html#zlib.crc32> library output
> and
> > they are not matching. Was this behavior expected? Can someone give me a
> > hint about this?
> >
> > Best,
> > Daniel
>


[lng-odp] odp_hash_crc32() vs python zlib crc32

2018-08-17 Thread Daniel Feferman
Hi all,

I'm comparing odp crc32 function vs python zlib
 library output and
they are not matching. Was this behavior expected? Can someone give me a
hint about this?

Best,
Daniel


[lng-odp] odph_chksum vs odp_chksum_ones_comp16

2018-08-07 Thread Daniel Feferman
Hi All,

I was using odph_chksum on odp v16. Now, it seems that this function is
discontinued and v19 uses odp_chksum_ones_comp16. However, my results seem
to be a lot different from previously, is there any modification on it? My
application was load balancing based on the hash output, the former
(odph_chksum) is balancing so much better than the newest one
(odp_chksum_ones_comp16).

Best,
Daniel


Re: [lng-odp] odph_cuckoo_table_create not working with more than 8192 capacity

2018-08-03 Thread Daniel Feferman
Thanks a lot!

Best
,
Daniel


On Fri, Aug 3, 2018 at 8:21 AM Elo, Matias (Nokia - FI/Espoo) <
matias@nokia.com> wrote:

>
>
> > On 3 Aug 2018, at 13:39, Daniel Feferman  wrote:
> >
> > Hi all,
> >
> > Thanks for the feedback, while 8192 seems a small amount I think 1
> million should be sufficient enough for my application. What is the effect
> expected by setting this to the max value? Like some consequence on memory
> requirements, performance, etc?
>
> Hi,
>
> ODP linux-generic queues are implemented using rings which store 32-bit
> values. By
> default there are 1024 queues (ODP_CONFIG_QUEUES).
>
> So if my math is correct:
> 1024 * 8192 * 4 ~= 33.6MB
> 1024 * 1 048 576 * 4 ~= 4.3GB
>
> Assuming you have enough memory the performance impact should be
> negligible.
>
> -Matias
>
>


Re: [lng-odp] odph_cuckoo_table_create not working with more than 8192 capacity

2018-08-03 Thread Daniel Feferman
Hi all,

Thanks for the feedback, while 8192 seems a small amount I think 1 million
should be sufficient enough for my application. What is the effect expected
by setting this to the max value? Like some consequence on memory
requirements, performance, etc?

Best,
Daniel

On Fri, Aug 3, 2018, 3:38 AM Bogdan Pricope 
wrote:

> I think is a better practice to use configuration file instead of
> modifying the template:
>
> ODP_CONFIG_FILE= 
>
> ODP_CONFIG_FILE=//odp/my_config.conf
> ./example/generator/odp_generator -I 1 -m r
>
>
> $ cat ./my_config.conf
> odp_implementation = "linux-generic"
> config_file_version = "0.0.1"
>
>
> queue_basic: {
> # Maximum queue size. Value must be a power of two.
> max_queue_size = 8192
>
> # Default queue size. Value must be a power of two.
> default_queue_size = 4096
> }
>
>
> On 3 August 2018 at 09:21, Elo, Matias (Nokia - FI/Espoo)
>  wrote:
> > Hi Daniel,
> >
> > The cuckoo table implementation is internally using plain queues, which
> have by default
> > a limited size of 8192 as you have noticed. You can increase this by
> changing
> > ' queue_basic.max_queue_size' in config/odp-linux-generic.conf. The
> maximum supported
> > value is currently 1 048 576. After modifying the config you have to
> either set
> > ODP_CONFIG_FILE environment variable or do 'make clean && make'.
> >
> > Would this table be large enough for your use case? If not, we have to
> think about updating
> > the cuckoo table implementation.
> >
> > Regards,
> > Matias
> >
> >
> >> On 2 Aug 2018, at 21:31, Daniel Feferman  wrote:
> >>
> >> Hi all,
> >>
> >> I was using odph_cuckoo_table_create on version 19 and it seems the
> >> capacity field can only take up to 8192, after that the function return
> >> NULL (not able to create). Since capacity is set to a type uint32_t I
> was
> >> not expecting this behavior, am I doing something wrong? Or the
> function is
> >> really set to handle just 8192?
> >>
> >> Best,
> >> Daniel
> >
>


[lng-odp] odph_cuckoo_table_create not working with more than 8192 capacity

2018-08-02 Thread Daniel Feferman
Hi all,

I was using odph_cuckoo_table_create on version 19 and it seems the
capacity field can only take up to 8192, after that the function return
NULL (not able to create). Since capacity is set to a type uint32_t I was
not expecting this behavior, am I doing something wrong? Or the function is
really set to handle just 8192?

Best,
Daniel


Re: [lng-odp] push_head vs pull_head

2018-06-19 Thread Daniel Feferman
Hi All,

Yes, I believe it fits into default headroom.

I see, since I was using MACSAD with v16, I believe I should give v19 a try
and check it. However, when I asked about IPsec, I asked cause I was using
v19 and I was still not able to see packets being forwarded. I'll check
MACSAD with new version and if not I'll go back to IPsec test.

Daniel

On Mon, Jun 18, 2018 at 4:54 PM Bill Fischofer 
wrote:

> Hi Daniel,
>
> ODP support for IPsec was introduced in v1.17.0.0 and is part of the Tiger
> Moth LTS level of the code (v1.19 series). If your intent is to do things
> with IPsec I recommend upgrading to that. The current LTS support level is
> v1.19.0.1. I'm not sure if that will work with MACSAD, but you might want
> to check.
>
> Are you able to see if this level of the code works for you?
>
> Thanks.
>
> On Mon, Jun 18, 2018 at 2:33 PM, Maxim Uvarov 
> wrote:
>
>> how match do you pull head? Does this value fit into default headroom?
>>
>> Maxim.
>>
>> On 18 June 2018 at 18:34, Daniel Feferman  wrote:
>>
>>> Hi Bill,
>>>
>>> Thank you for your answer. Answering your questions:
>>>
>>> -v16. odp-linux.
>>> -It was a Xeon E5, then x86 using a link of up to 10G.
>>> -I'm new on ODP, I'm currently working on a VXLAN implementation (but we
>>> similar problem with a BNG use case) using P4 language with this compiler
>>> (which I'm a bit more familiar) that uses ODP:
>>> https://github.com/intrig-unicamp/macsad
>>>
>>> So, you may be right, it may be after APIs are called. However, for now,
>>> my
>>> best guess was something known with ODP. I was thinking to run one of ODP
>>> examples with both functions to test the performance and see if I get the
>>> same throughput to discard ODP. I saw this IPsec which seems to use both
>>> of
>>> them, but I'm sending packets and it's not forwarding, I've tried the
>>> "--enable-debug-print" flag but I was not able to figure it out what's
>>> wrong.
>>>
>>> I'm running IPsec using:
>>>
>>> ./odp_ipsec -i veth1,veth3,veth5 -m 0
>>>
>>> I'm using scapy to send the packet set like:
>>>
>>> pkt1 =
>>>
>>> Ether(dst='08:00:27:4C:55:CC',src='08:00:27:76:B5:E0')/IP(dst='192.168.111.1',src='192.168.111.2')
>>>
>>> And sending it through veth1. Am I doing something wrong? Do you have any
>>> hint about it?
>>>
>>> Best,
>>> Daniel
>>>
>>>
>>> On Mon, Jun 18, 2018 at 11:54 AM Bill Fischofer <
>>> bill.fischo...@linaro.org>
>>> wrote:
>>>
>>> > Hi Daniel. Can you give a bit more detail?
>>> >
>>> > - What version of ODP are you using? Is this the odp-linux or odp-dpdk
>>> > reference implementations from GitHub or some other implementation?
>>> > - The platform / system you're running on. x86? Arm? Something else?
>>> > - A small code snippet / test program illustrating what you're trying
>>> to
>>> > do?
>>> >
>>> > The push/pull routines should have similar performance characteristics.
>>> > The differences you're observing may be due to what's happening in your
>>> > program after these APIs are called.
>>> >
>>> > On Mon, Jun 18, 2018 at 9:35 AM, Daniel Feferman >> >
>>> > wrote:
>>> >
>>> >> Hi all,
>>> >>
>>> >> I'm running a compiler that takes advantage of ODP to allow good
>>> >> throughput
>>> >> with portability. However, one of our tests seems to point that
>>> >> odp_packet_pull_head
>>> >> strongly impact the performance compared to the "opposite" function (
>>> >> odp_packet_push_head), I mean a program using push seems have
>>> considerably
>>> >> better throughput than the same using pull. Is it a known issue or
>>> >> something that someone has seen before?
>>> >>
>>> >> Furthermore, I'm trying to run IPsec example to test it, but I was not
>>> >> able
>>> >> to run it with 3 different veth interface, ODP simply does not
>>> forward the
>>> >> packet. Do I really need 3 separate VMs to run it or may I use veth
>>> to set
>>> >> similar environment?
>>> >>
>>> >> Thanks,
>>> >> Daniel
>>> >>
>>> >
>>> >
>>>
>>
>>
>


Re: [lng-odp] push_head vs pull_head

2018-06-18 Thread Daniel Feferman
Hi Bill,

Thank you for your answer. Answering your questions:

-v16. odp-linux.
-It was a Xeon E5, then x86 using a link of up to 10G.
-I'm new on ODP, I'm currently working on a VXLAN implementation (but we
similar problem with a BNG use case) using P4 language with this compiler
(which I'm a bit more familiar) that uses ODP:
https://github.com/intrig-unicamp/macsad

So, you may be right, it may be after APIs are called. However, for now, my
best guess was something known with ODP. I was thinking to run one of ODP
examples with both functions to test the performance and see if I get the
same throughput to discard ODP. I saw this IPsec which seems to use both of
them, but I'm sending packets and it's not forwarding, I've tried the
"--enable-debug-print" flag but I was not able to figure it out what's
wrong.

I'm running IPsec using:

./odp_ipsec -i veth1,veth3,veth5 -m 0

I'm using scapy to send the packet set like:

pkt1 =
Ether(dst='08:00:27:4C:55:CC',src='08:00:27:76:B5:E0')/IP(dst='192.168.111.1',src='192.168.111.2')

And sending it through veth1. Am I doing something wrong? Do you have any
hint about it?

Best,
Daniel


On Mon, Jun 18, 2018 at 11:54 AM Bill Fischofer 
wrote:

> Hi Daniel. Can you give a bit more detail?
>
> - What version of ODP are you using? Is this the odp-linux or odp-dpdk
> reference implementations from GitHub or some other implementation?
> - The platform / system you're running on. x86? Arm? Something else?
> - A small code snippet / test program illustrating what you're trying to
> do?
>
> The push/pull routines should have similar performance characteristics.
> The differences you're observing may be due to what's happening in your
> program after these APIs are called.
>
> On Mon, Jun 18, 2018 at 9:35 AM, Daniel Feferman 
> wrote:
>
>> Hi all,
>>
>> I'm running a compiler that takes advantage of ODP to allow good
>> throughput
>> with portability. However, one of our tests seems to point that
>> odp_packet_pull_head
>> strongly impact the performance compared to the "opposite" function (
>> odp_packet_push_head), I mean a program using push seems have considerably
>> better throughput than the same using pull. Is it a known issue or
>> something that someone has seen before?
>>
>> Furthermore, I'm trying to run IPsec example to test it, but I was not
>> able
>> to run it with 3 different veth interface, ODP simply does not forward the
>> packet. Do I really need 3 separate VMs to run it or may I use veth to set
>> similar environment?
>>
>> Thanks,
>> Daniel
>>
>
>


[lng-odp] push_head vs pull_head

2018-06-18 Thread Daniel Feferman
Hi all,

I'm running a compiler that takes advantage of ODP to allow good throughput
with portability. However, one of our tests seems to point that
odp_packet_pull_head
strongly impact the performance compared to the "opposite" function (
odp_packet_push_head), I mean a program using push seems have considerably
better throughput than the same using pull. Is it a known issue or
something that someone has seen before?

Furthermore, I'm trying to run IPsec example to test it, but I was not able
to run it with 3 different veth interface, ODP simply does not forward the
packet. Do I really need 3 separate VMs to run it or may I use veth to set
similar environment?

Thanks,
Daniel


[lng-odp] odp_hash_crc32 support

2018-06-05 Thread Daniel Feferman
Hi All,

I saw on this link:

https://www.opendataplane.org/api-documentation/master/api/group__odp__hash.html#ga9ecafbeec4af9a0cd93311a1ee324725

That odp has support to Calculate CRC-32 without Castagnoli. I've tried so
many ways and I was not able to do so. Then, I saw an example using Castagnoli,
I've tried to implement it and using Castagnoli worked. So, I'd like to
double check, does ODP (still) has support to Calculate CRC-32 without
Castagnoli?

Best,
Daniel


Re: [lng-odp] ODP Hello World

2018-06-05 Thread Daniel Feferman
Thank you all, it worked :)



On Tue, May 29, 2018 at 9:31 AM Elo, Matias (Nokia - FI/Espoo) <
matias@nokia.com> wrote:

>
>
> > On 29 May 2018, at 0:31, Daniel Feferman  wrote:
> >
> > Hi all,
> >
> > I'm trying to reproduce "ODP Hello World" example from this Link
> > <https://www.opendataplane.org/hello-world/> but I'm getting:
> >
> > W: The repository 'http://deb.opendataplane.org xenial Release' does not
> > have a Release file.
> > N: Data from such a repository can't be authenticated and is therefore
> > potentially dangerous to use.
> > N: See apt-secure(8) manpage for repository creation and user
> configuration
> > details.
> > E: Failed to fetch
> > http://deb.opendataplane.org/dists/xenial/main/binary-amd64/Packages
> 404
> > Not Found
> > E: Some index files failed to download. They have been ignored, or old
> ones
> > used instead.
> >
> > When running:
> >
> > ./setup_odp_example.sh
> >
> > Can someone please give me a hint on how to solve this?
> >
> > Best,
> > Daniel
>
>
> Hi Daniel,
>
> The website seems to be deprecated and should be updated. Here's how to
> build and run the hello example:
>
> git clone https://github.com/Linaro/odp.git odp.git
> cd odp.git/
>
> # Make sure you have all the dependencies installed (listed in file
> DEPENDENCIES).
>
> ./bootstrap
> ./configure
> make
>
> cd example/hello
> ./odp_hello
>
> Regards,
> Matias
>
>
>
>
>


[lng-odp] ODP Hello World

2018-05-28 Thread Daniel Feferman
Hi all,

I'm trying to reproduce "ODP Hello World" example from this Link
 but I'm getting:

W: The repository 'http://deb.opendataplane.org xenial Release' does not
have a Release file.
N: Data from such a repository can't be authenticated and is therefore
potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration
details.
E: Failed to fetch
http://deb.opendataplane.org/dists/xenial/main/binary-amd64/Packages  404
 Not Found
E: Some index files failed to download. They have been ignored, or old ones
used instead.

When running:

./setup_odp_example.sh

Can someone please give me a hint on how to solve this?

Best,
Daniel