Re: [vpp-dev] vpp with dpdk shared library

2018-05-27 Thread Michael Lilja
Hi Damjan,

Well, with regards to upstreaming our PMD it is not as easy as it seems. The 
driver we have today is binary shipped and open-sourcing that is not just 
something you do over-night. We tried to upstream a PMD that would dlopen() our 
binary library and link into DPDK that way (this is what we have in the 
www.github.com/napatech/dpdk<http://www.github.com/napatech/dpdk> today). This 
approach was rejected by DPDK and even though they might have opened up for the 
discussion again, we have not pursued it yet.

Another issue we have with the way our NICs work is that all ports on the card 
share the same PCI BUS-ID, so that's why we don't easily work out-of-the-box 
unless some small tweaks are made.  Part of the reason for me investigating in 
different DPDK apps is to figure our how we can make a generic way of getting 
the shared-bus-id to work.

Thanks,
Michael

From: Damjan Marion <dmarion.li...@gmail.com>
Sent: 27. maj 2018 11:42
To: Michael Lilja <m...@napatech.com>
Cc: Catalin Fierut <catalin.fie...@gmail.com>; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] vpp with dpdk shared library


Dear Michael,

interesting work.

Do you plan to upstream your PMD to DPDK mainline?

Thanks,

--
Damjan


On 25 May 2018, at 10:50, Michael Lilja 
<m...@napatech.com<mailto:m...@napatech.com>> wrote:

Hi,

I had to use another DPDK source base also as shared library, so I went though 
a few trails before I got things to work. I have documented my quirks here: 
https://www.napatech.com/vpp-200g-nic/

I hope it is helpful.

/Michael

From: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> 
<vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> On Behalf Of Catalin Fierut
Sent: 24. maj 2018 13:55
To: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>
Subject: [vpp-dev] vpp with dpdk shared library

Hello vpp,


I'm trying to run vpp with external dpdk. I compiled dpdk with support of 
shared library in order to have support for collectd. I made changes  in 
vpp.mk<http://vpp.mk/> in order to enable the usage of external dpdk already 
installed  and support for shared library inside vpp. The build passed 
successfully, but when I'm runing the vpp binary it crashes  in init.c from 
vpp/src/plugins/dpdk/devices in  dpdk_config function. The reason why is 
crashing is the fact that is not loading the rte_mempool_ring.so file from 
dpdk. which by the way exist. This file is responsible with the initialization 
of structures ops_sp_sc, ops_mp_sc, ops_sp_mc, ops_mp_mc, basically  ops=NULL.
When I let vpp to use the dpdk deb files all runs ok, and the references  to 
dpdk structures are present in the dpdk_plugin.so file. In this working way vpp 
is using dpdk library statically.
I was expected base on dpdk.am<http://dpdk.am/> that on shared library branch  
dpdk_pluging to be build based on dpdk dynamic library info.
Is any way to run vpp with shared library support? Any idea  why the 
responsible library is not loaded?



BR/
Catalin




Re: [vpp-dev] vpp with dpdk shared library

2018-05-25 Thread Michael Lilja
Hi,

I had to use another DPDK source base also as shared library, so I went though 
a few trails before I got things to work. I have documented my quirks here: 
https://www.napatech.com/vpp-200g-nic/

I hope it is helpful.

/Michael

From: vpp-dev@lists.fd.io  On Behalf Of Catalin Fierut
Sent: 24. maj 2018 13:55
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] vpp with dpdk shared library

Hello vpp,


I'm trying to run vpp with external dpdk. I compiled dpdk with support of 
shared library in order to have support for collectd. I made changes  in 
vpp.mk in order to enable the usage of external dpdk already 
installed  and support for shared library inside vpp. The build passed 
successfully, but when I'm runing the vpp binary it crashes  in init.c from 
vpp/src/plugins/dpdk/devices in  dpdk_config function. The reason why is 
crashing is the fact that is not loading the rte_mempool_ring.so file from 
dpdk. which by the way exist. This file is responsible with the initialization 
of structures ops_sp_sc, ops_mp_sc, ops_sp_mc, ops_mp_mc, basically  ops=NULL.
When I let vpp to use the dpdk deb files all runs ok, and the references  to 
dpdk structures are present in the dpdk_plugin.so file. In this working way vpp 
is using dpdk library statically.
I was expected base on dpdk.am that on shared library branch  
dpdk_pluging to be build based on dpdk dynamic library info.
Is any way to run vpp with shared library support? Any idea  why the 
responsible library is not loaded?



BR/
Catalin



Re: [vpp-dev] Calling a C function in one plugin from another plugin?

2018-02-05 Thread Michael Lilja
Perfect, that seems like a much easier solution :)

Thanks

/Michael

From: "Dave Barach (dbarach)" <dbar...@cisco.com>
Sent: Monday, 5 February 2018, 4.17 PM
To: Michael Lilja; vpp-dev@lists.fd.io <vpp-dev@lists.fd.io>
Subject: RE: Calling a C function in one plugin from another plugin?

You can ask vlib_get_plugin_symbol ("plugin_name", "function_name") for the 
address of a function...

Returns NULL if e.g. the plugin in question isn't loaded or the symbol is 
missing.

HTH... D.

-Original Message-
From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Michael Lilja
Sent: Monday, February 5, 2018 9:54 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] Calling a C function in one plugin from another plugin?

Hi,

I'm looking at using DPDK rte_flow (generic flow API) for ACL offloading. From 
what I can see the only option I have is to implement a v1_msg_* receiver in 
the DPDK plugin to accept commands from ACL via the SHMEM rings. The concern I 
have is that this might be in conflict with the design of VPP, I'm not sure if 
VPP is designed to have inter-plugin-communication?

Does anyone have another approach to call DPDK functions from within another 
plugins instead of the v1_msg_* layer?

Thanks,
Michael
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] Calling a C function in one plugin from another plugin?

2018-02-05 Thread Michael Lilja
Hi,

I'm looking at using DPDK rte_flow (generic flow API) for ACL offloading. From 
what I can see the only option I have is to implement a v1_msg_* receiver in 
the DPDK plugin to accept commands from ACL via the SHMEM rings. The concern I 
have is that this might be in conflict with the design of VPP, I'm not sure if 
VPP is designed to have inter-plugin-communication?

Does anyone have another approach to call DPDK functions from within another 
plugins instead of the v1_msg_* layer?

Thanks,
Michael
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev