[ovs-dev] [PATCH RFC dpdk-latest] build: Add support for DPDK meson build.

Ilya Maximets i.maximets at ovn.org
Sat Jul 4 14:53:29 UTC 2020


On 7/3/20 3:58 PM, Pai G, Sunil wrote:
>> -----Original Message-----
>> From: Ilya Maximets <i.maximets at ovn.org>
>> Sent: Thursday, July 2, 2020 10:50 PM
>> To: Pai G, Sunil <sunil.pai.g at intel.com>; Ilya Maximets
>> <i.maximets at ovn.org>; dev at openvswitch.org
>> Cc: Stokes, Ian <ian.stokes at intel.com>; david.marchand at redhat.com;
>> Richardson, Bruce <bruce.richardson at intel.com>; Tummala, Sivaprasad
>> <sivaprasad.tummala at intel.com>
>> Subject: Re: [PATCH RFC dpdk-latest] build: Add support for DPDK meson
>> build.
>>
>> On 7/2/20 5:25 PM, Pai G, Sunil wrote:
>>>>
>>>>> +
>>>>>      if [ "${DPDK_VER##refs/*/}" != "${DPDK_VER}" ]; then
>>>>>          # Avoid using cache for git tree build.
>>>>>          rm -rf dpdk-dir
>>>>> @@ -108,7 +112,8 @@ function install_dpdk()
>>>>>          if [ -f "${VERSION_FILE}" ]; then
>>>>>              VER=$(cat ${VERSION_FILE})
>>>>>              if [ "${VER}" = "${DPDK_VER}" ]; then
>>>>> -                EXTRA_OPTS="${EXTRA_OPTS} --with-dpdk=$(pwd)/dpdk-
>> dir/build"
>>>>> +                sudo ninja -C $(pwd)/dpdk-dir/build install
>>>>> +                sudo ldconfig
>>>>
>>>> I think that installing right here inside the cached folder and just
>>>> adjusting environment variables should be a bit faster than re-installing
>> DPDK every time.
>>>>
>>>> This script also will be a good example for people like me, who
>>>> really don't want to install development versions of DPDK globally on
>>>> a work laptop while testing OVS builds.
>>>
>>> Yes , Thanks for the suggestion. Although ,using an install to a
>>> directory with a prefix would require this patch from Bruce:
>>> https://patches.dpdk.org/patch/72271/
>>>  (which is not merged yet as of this writing) .without this , OVS
>>> would fail to run searching for few shared DPDK libraries even when built
>> with static libraries.
>>
>> But, IIUC, we could just add a path to ld.so.conf to avoid that.
>> Will it work?  You're updating ldconfig here anyway.
> 
> Yes , this will probably work . exporting LD_LIBRARY_PATH will also help .
> But I thought it makes sense only when OVS consumes DPDK shared libs.
> Bruce also acknowledged this as a bug and gracefully gave a fix as well.
> So, I thought it's better to install it system wide until the patch is merged in DPDK. 
> But I am quite open to take the other approach as well and export the LD_LIBRARY_PATH :)
> Let me know your thoughts.
> 

Exporting one extra variable doesn't make any harm, but allows to save
a bit of time not installing DPDK every time.  So, I'd vote to do that.


More information about the dev mailing list