[dpdk-dev] [PATCH v3 6/8] mk: Add rule for installing nic bind files

Panu Matilainen pmatilai at redhat.com
Fri Oct 2 12:49:40 CEST 2015


On 10/01/2015 03:11 AM, Mario Carrillo wrote:
> Add hierarchy-file support to the DPDK nic bind files,
> when invoking "make install-sbin" nic bind files will
> be installed by default in: $(DESTDIR)/$(SBIN_DIR)
> where SBIN_DIR=/usr/sbin/dpdk_nic_bind by default,
> you can override SBIN_DIR var.
> This hierarchy is based on:
> http://www.freedesktop.org/software/systemd/man/file-hierarchy.html
> and dpdk spec file.
>
> Signed-off-by: Mario Carrillo <mario.alfredo.c.arevalo at intel.com>
> ---
>   mk/rte.sdkinstall.mk | 14 ++++++++++++++
>   mk/rte.sdkroot.mk    |  4 ++--
>   2 files changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
> index 5a2fd40..4eecf31 100644
> --- a/mk/rte.sdkinstall.mk
> +++ b/mk/rte.sdkinstall.mk
> @@ -46,11 +46,13 @@ else
>   INCLUDE_DIR ?= /usr/include/dpdk
>   BIN_DIR ?= /usr/bin
>   DOC_DIR ?= /usr/share/doc/dpdk
> +SBIN_DIR ?= /usr/sbin/dpdk_nic_bind
>   HSLINKS := $(wildcard $(RTE_OUTPUT)/include/*)
>   BINARY_FILES := $(patsubst %.map,,$(wildcard $(RTE_OUTPUT)/app/*))
>   LIBS := $(wildcard $(RTE_OUTPUT)/lib/*)
>   MODULES := $(wildcard $(RTE_OUTPUT)/kmod/*)
>   DOCS := $(wildcard $(BUILD_DIR)/doc/*)
> +NIC_BIND_FILES := $(wildcard $(BUILD_DIR)/tools/*nic_bind.py)
>   include $(BUILD_DIR)/build/.config
>   RTE_ARCH := $(CONFIG_RTE_ARCH:"%"=%)
>   RTE_EXEC_ENV := $(CONFIG_RTE_EXEC_ENV:"%"=%)
> @@ -161,6 +163,18 @@ install-doc:
>   	echo installing: $$DOC; \
>   	done
>   #
> +# install nic bind files in /usr/sbin/dpdk_nic_bind
> +# by default SBIN_DIR can be overridden.
> +#

This creates an out-of-path directory /usr/sbin/dpdk_nic_bind/ in which 
the dpdk_nic_bind.py is installed. Besides not being a very accessible 
location, the FHS explicitly forbids creation of subdirectories below 
/usr/[s]bin.

SBIN_DIR should be /usr/sbin unless overridden, but OTOH I think this 
could go into /usr/bin just as well, the split is fairly ambiguous 
anyway (I mean, testpmd is not something a regular user is going to run 
either)

In addition, if dpdk_nic_bind.py is installed then perhaps the 
cpu_layout.py utility should be installed too?

	- Panu -


More information about the dev mailing list