DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: Timothy Redaelli <tredaelli@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [pktgen PATCH] Fix dpdk-version.sh on Fedora
Date: Fri, 28 Jul 2017 17:32:20 +0000	[thread overview]
Message-ID: <FD4D3E83-C057-4FCF-B26A-CCD778C91556@intel.com> (raw)
In-Reply-To: <4711b98574eee0efd9e6867c4413b82be98c6167.1501258132.git.tredaelli@redhat.com>


> On Jul 28, 2017, at 11:08 AM, Timothy Redaelli <tredaelli@redhat.com> wrote:
> 
> Fedora and RHEL dpdk-devel package installs rte_version.h inside
> $RTE_INCLUDE (/usr/include/dpdk) instead of $RTE_SDK
> 
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
> tools/dpdk-version.sh | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/dpdk-version.sh b/tools/dpdk-version.sh
> index 0989aa4..75146cf 100755
> --- a/tools/dpdk-version.sh
> +++ b/tools/dpdk-version.sh
> @@ -87,15 +87,19 @@ EOM
> 	exit 1
> }
> 
> -if [ -z ${RTE_SDK} ] ; then
> -	echo "*** RTE_SDK is not set, using "${PWD}
> -	sdk=${PWD}
> +if [ -n ${RTE_INCLUDE} ] ; then
> +	fpath=${RTE_INCLUDE}/${fname}
> else
> -	sdk=${RTE_SDK}
> +	if [ -z ${RTE_SDK} ] ; then
> +		echo "*** RTE_SDK is not set, using "${PWD}
> +		sdk=${PWD}
> +	else
> +		sdk=${RTE_SDK}
> +	fi
> +
> +	fpath=${sdk}/lib/librte_eal/common/include/${fname}
> fi
> 
> -fpath=${sdk}/lib/librte_eal/common/include/${fname}

I applied your patch to my ‘dev’ branch. I had added a file path output as well. I did have to patch your patch to work correctly of non-RTE_INCLUDE usage. It appears the [ -n ${RTE_INCLUDE} ] test had to be converted to a -z as the RTE_INCLUDE path was always executed even if RTE_INCLUDE was not defined.

Please give the new version a try and let me know if it works.

> -
> if [ ! -e ${fpath} ]; then
> 	echo "File not found @ "${fpath}
> 	usage
> -- 
> 2.13.3
> 

Regards,
Keith


      reply	other threads:[~2017-07-28 17:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28 16:08 Timothy Redaelli
2017-07-28 17:32 ` Wiles, Keith [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FD4D3E83-C057-4FCF-B26A-CCD778C91556@intel.com \
    --to=keith.wiles@intel.com \
    --cc=dev@dpdk.org \
    --cc=tredaelli@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).