bnxt patchset
Subsystems (2)
PATCH 1/4 introduce Broadcom Stingray
In reply to Ajit KhapardeFrom: Scott Branden <[email protected]>
Add Broadcom Stingray machine support based on armv8.
For product brief see:
https://www.broadcom.com/products/ethernet-connectivity/controllers/bcm58800
--- config/defconfig_arm64-stingray-linuxapp-gcc | 16 ++++++++++++++ mk/machine/stingray/rte.vars.mk | 31 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 config/defconfig_arm64-stingray-linuxapp-gcc create mode 100644 mk/machine/stingray/rte.vars.mk
config/defconfig_arm64-stingray-linuxapp-gcc new file +16 -0
@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (C) Broadcom 2017-2018. All rights reserved. +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +# Broadcom - Stingray +CONFIG_RTE_MACHINE="stingray" +CONFIG_RTE_ARCH_ARM_TUNE="cortex-a72" + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +CONFIG_RTE_EAL_IGB_UIO=y +CONFIG_RTE_KNI_KMOD=n
mk/machine/stingray/rte.vars.mk new file +31 -0
@@ -0,0 +1,31 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (C) Broadcom 2017-2018. All rights reserved. +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +MACHINE_CFLAGS += -march=armv8-a+crc+crypto
Signature · 1 line
2.14.3 (Apple Git-98)
PATCH 2/4 net/bnxt: add support for Stingray PF devices ids
In reply to Ajit KhapardeFrom: Scott Branden <[email protected]>
Add support for Stingray PF devices ids:
BCM58802 = 0xd802
BCM58804 = 0xd804
BCM58808 = 0x16f0
--- drivers/net/bnxt/bnxt_ethdev.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/bnxt/bnxt_ethdev.c +6 -0
@@ -97,6 +97,9 @@ int bnxt_logtype_driver;#define BROADCOM_DEV_ID_57407_MF 0x16ea#define BROADCOM_DEV_ID_57414_MF 0x16ec#define BROADCOM_DEV_ID_57416_MF 0x16ee +#define BROADCOM_DEV_ID_58802 0xd802 +#define BROADCOM_DEV_ID_58804 0xd804 +#define BROADCOM_DEV_ID_58808 0x16f0static const struct rte_pci_id bnxt_pci_id_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM,
@@ -135,6 +138,9 @@ static const struct rte_pci_id bnxt_pci_id_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57317_SFP) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57414_MF) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57416_MF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_58802) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_58804) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_58808) }, { .vendor_id = 0, /* sentinel */ }, };
Signature · 1 line
2.14.3 (Apple Git-98)
PATCH 3/4 mk: allow kernel artifacts to be located in output directory
In reply to Ajit KhapardeFrom: Scott Branden <[email protected]>
Allow kernel artifacts to be located in output directory specific by RTE_KERNELDIR_OUT. If RTE_KERNELDIR_OUT not specified than source directory RTE_KERNEL is used.
--- mk/rte.module.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
mk/rte.module.mk +6 -3
@@ -39,6 +39,9 @@ _postinstall: build .PHONY: build build: _postbuild +# Allow kernel artifacts to be located in a different location that source +RTE_KERNELDIR_OUT ?= ${RTE_KERNELDIR} + # Link all sources in build directory %_link: FORCE $(if $(call compare,$(notdir $*),$*),\
@@ -48,7 +51,7 @@ build: _postbuild # build module $(MODULE).ko: $(SRCS_LINKS) @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0) # install module in $(RTE_OUTPUT)/kmod
@@ -59,7 +62,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko # install module modules_install: - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ modules_install .PHONY: clean
@@ -69,7 +72,7 @@ clean: _postclean .PHONY: doclean doclean: @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean + $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\ if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;) @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fi
Signature · 1 line
2.14.3 (Apple Git-98)
PATCH 4/4 igb_uio: bind error if pcie bridge
In reply to Ajit KhapardeFrom: Darren Edamura <[email protected]>
Probe function should exit immediately if pcie bridge detected
--- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 3 +++ 1 file changed, 3 insertions(+)
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +3 -0
@@ -473,6 +473,9 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)void *map_addr;int err; +if (pci_is_bridge (dev)) +return -ENODEV ; + udev =kzalloc (sizeof (struct rte_uio_pci_dev ),GFP_KERNEL );if (!udev)return -ENOMEM ;
Signature · 1 line
2.14.3 (Apple Git-98)
cover bnxt patchset
Patchset adding support for Broadcom® NetXtreme® S-Series BCM58800 family of data center System-on-Chip (SoC) devices.
Please apply.
----
Darren Edamura (1):
igb_uio: bind error if pcie bridge
Scott Branden (3):
introduce Broadcom Stingray
net/bnxt: add support for Stingray PF devices ids
mk: allow kernel artifacts to be located in output directory
config/defconfig_arm64-stingray-linuxapp-gcc | 16 ++++++++++++++ drivers/net/bnxt/bnxt_ethdev.c | 6 ++++++ lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 3 +++ mk/machine/stingray/rte.vars.mk | 31 ++++++++++++++++++++++++++++ mk/rte.module.mk | 9 +++++--- 5 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 config/defconfig_arm64-stingray-linuxapp-gcc create mode 100644 mk/machine/stingray/rte.vars.mk
Signature · 1 line
2.14.3 (Apple Git-98)
Re: [PATCH 4/4] igb_uio: bind error if pcie bridge
In reply to Ajit KhapardeQuoted 17 lines · Ajit Khaparde
From: Darren Edamura <[email protected]>
Probe function should exit immediately if pcie bridge detected
Signed-off-by Darren Edamura <[email protected]>Signed-off-by Rahul Gupta <[email protected]>Signed-off-by Scott Branden <[email protected]>Signed-off-by Ajit Khaparde <[email protected]>--- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 3 +++ 1 file changed, 3 insertions(+)lib/librte_eal/linuxapp/igb_uio/igb_uio.c +0
-0
lib/librte_eal/linuxapp/igb_uio/igb_uio.c igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · line 477
Quoted 5 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +2
-0@@ -473,6 +473,9 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)void *map_addr;int err; +if (pci_is_bridge (dev)) +return -ENODEV ;
What do you think printing a log here?
Quoted 5 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +1
-0+ udev =kzalloc (sizeof (struct rte_uio_pci_dev ),GFP_KERNEL );if (!udev)return -ENOMEM ;
Re: [PATCH 4/4] igb_uio: bind error if pcie bridge
Hi Ferruh,
Quoted 21 lines · Ferruh Yigit
Quoted 20 lines · Ajit Khaparde
From: Darren Edamura <[email protected]>
Probe function should exit immediately if pcie bridge detected
Signed-off-by Darren Edamura <[email protected]>Signed-off-by Rahul Gupta <[email protected]>Signed-off-by Scott Branden <[email protected]>Signed-off-by Ajit Khaparde <[email protected]>--- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 3 +++ 1 file changed, 3 insertions(+)lib/librte_eal/linuxapp/igb_uio/igb_uio.c +0
-0@@ -473,6 +473,9 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)void *map_addr;int err;
Quoted 3 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · line 477
Quoted 2 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +2
-0+if (pci_is_bridge (dev)) +return -ENODEV ;What do you think printing a log here?
I think it brings little value. ENODEV is already returned?
Quoted 6 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · line 481
Quoted 6 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +1
-0+ udev =kzalloc (sizeof (struct rte_uio_pci_dev ),GFP_KERNEL );if (!udev)return -ENOMEM ;
Regards,
Scott
Re: [PATCH 4/4] igb_uio: bind error if pcie bridge
Quoted 25 lines · Scott Branden
Hi Ferruh,
Quoted 21 lines · Ferruh Yigit
Quoted 20 lines · Ajit Khaparde
From: Darren Edamura <[email protected]>
Probe function should exit immediately if pcie bridge detected
Signed-off-by Darren Edamura <[email protected]>Signed-off-by Rahul Gupta <[email protected]>Signed-off-by Scott Branden <[email protected]>Signed-off-by Ajit Khaparde <[email protected]>--- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 3 +++ 1 file changed, 3 insertions(+)lib/librte_eal/linuxapp/igb_uio/igb_uio.c +0
-0@@ -473,6 +473,9 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)void *map_addr;int err;
Quoted 4 lines
Quoted 3 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · line 477
Quoted 2 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +2
-0+if (pci_is_bridge (dev)) +return -ENODEV ;What do you think printing a log here?
I think it brings little value. ENODEV is already returned?
User should not provide bridge address at first place, I guess this is a protection in case user provides bridge address by mistake.
In that case no device will be probed and user won't have any idea why. I think a log in dmesg saying bridge device is provided may help to the user.
Quoted 9 lines
Quoted 6 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · line 481
Quoted 6 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +1
-0+ udev =kzalloc (sizeof (struct rte_uio_pci_dev ),GFP_KERNEL );if (!udev)return -ENOMEM ;Regards,
Scott
Re: [PATCH 4/4] igb_uio: bind error if pcie bridge
Quoted 26 lines · Ferruh Yigit
Quoted 25 lines · Scott Branden
Hi Ferruh,
Quoted 21 lines · Ferruh Yigit
Quoted 20 lines · Ajit Khaparde
From: Darren Edamura <[email protected]>
Probe function should exit immediately if pcie bridge detected
Signed-off-by Darren Edamura <[email protected]>Signed-off-by Rahul Gupta <[email protected]>Signed-off-by Scott Branden <[email protected]>Signed-off-by Ajit Khaparde <[email protected]>--- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 3 +++ 1 file changed, 3 insertions(+)lib/librte_eal/linuxapp/igb_uio/igb_uio.c +0
-0@@ -473,6 +473,9 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)void *map_addr;int err;
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · line 477
Quoted 2 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +2
-0+if (pci_is_bridge (dev)) +return -ENODEV ;What do you think printing a log here?
I think it brings little value. ENODEV is already returned?
User should not provide bridge address at first place, I guess this is a protection in case user provides bridge address by mistake.
In that case no device will be probed and user won't have any idea why. I think a log in dmesg saying bridge device is provided may help to the user.
I'll add a dev_warn as we actually encounter this issue on old silicon revisions due to bridge address equaling a PF. It's not a user error in such case and just needs to be ignored. So adding this generic check allows such to occur. For other use cases like you mentioned it would be a user mistake.
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) · line 481
Quoted 5 lines
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +1
-0+ udev =kzalloc (sizeof (struct rte_uio_pci_dev ),GFP_KERNEL );if (!udev)return -ENOMEM ;Regards,
Scott
PATCH v2 1/1 igb_uio: bind error if pcie bridge
In reply to Ferruh YigitFrom: Darren Edamura <[email protected]>
Probe function should exit immediately if pcie bridge detected
---v1->v2: add a log message if the condition is true.
--- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 5 +++++ 1 file changed, 5 insertions(+)
lib/librte_eal/linuxapp/igb_uio/igb_uio.c +5 -0
@@ -473,6 +473,11 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)void *map_addr;int err; +if (pci_is_bridge (dev)) { +dev_warn (&dev->dev,"Ignoring PCI bridge device\n" ); +return -ENODEV ; + } + udev =kzalloc (sizeof (struct rte_uio_pci_dev ),GFP_KERNEL );if (!udev)return -ENOMEM ;
Signature · 1 line
2.14.3 (Apple Git-98)
Re: [PATCH 1/4] introduce Broadcom Stingray
In reply to Ajit KhapardeQuoted 22 lines · Ajit Khaparde
From: Scott Branden <[email protected]>
Add Broadcom Stingray machine support based on armv8.
For product brief see:
https://www.broadcom.com/products/ethernet-connectivity/controllers/bcm58800Signed-off-by Scott Branden <[email protected]>Signed-off-by Ajit Khaparde <[email protected]>--- config/defconfig_arm64-stingray-linuxapp-gcc | 16 ++++++++++++++ mk/machine/stingray/rte.vars.mk | 31 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 config/defconfig_arm64-stingray-linuxapp-gcc create mode 100644 mk/machine/stingray/rte.vars.mkconfig/defconfig_arm64-stingray-linuxapp-gcc new file +0
-0
config/defconfig_arm64-stingray-linuxapp-gcc line 8
Quoted 8 lines
config/defconfig_arm64-stingray-linuxapp-gcc new file +8
-0@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (C) Broadcom 2017-2018. All rights reserved. +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +# Broadcom - Stingray +CONFIG_RTE_MACHINE="stingray"
This is same as armv8a machine type, is it required to add new "stingray" machine type?
<...>
Re: [PATCH 2/4] net/bnxt: add support for Stingray PF devices ids
In reply to Ajit KhapardeQuoted 11 lines · Ajit Khaparde
From: Scott Branden <[email protected]>
Add support for Stingray PF devices ids:
BCM58802 =0xd802
BCM58804 =0xd804
BCM58808 =0x16f0Signed-off-by Scott Branden <[email protected]>Signed-off-by Ajit Khaparde <[email protected]>--- drivers/net/bnxt/bnxt_ethdev.c | 6 ++++++
Can you please update driver documentation (doc/guides/nics/bnxt.rst) with new device information.
Also it can be good to update release notes to announce new device support.
Re: [PATCH 3/4] mk: allow kernel artifacts to be located in output directory
In reply to Ajit KhapardeQuoted 4 lines · Ajit Khaparde
From: Scott Branden <[email protected]>
Allow kernel artifacts to be located in output directory specific by
RTE_KERNELDIR_OUT.
How to use this variable, I tried following but kernel modules are still in same place:
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh install
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh modules_install
/tmp/kmod not created.
And what we are fixing here, what was wrong with old code?
Quoted 2 lines
If
RTE_KERNELDIR_OUTnot specified than
source directoryRTE_KERNELis used.
${RTE_KERNELDIR} is used as external Linux kernel source folder, why we are want to put artifacts into kernel source?
Quoted 49 lines
Signed-off-by Scott Branden <[email protected]>Signed-off-by Ajit Khaparde <[email protected]>--- mk/rte.module.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)mk/rte.module.mk +6
-3@@ -39,6 +39,9 @@ _postinstall: build .PHONY: build build: _postbuild +# Allow kernel artifacts to be located in a different location that source +RTE_KERNELDIR_OUT ?= ${RTE_KERNELDIR} + # Link all sources in build directory %_link: FORCE $(if $(call compare,$(notdir $*),$*),\@@ -48,7 +51,7 @@ build: _postbuild # build module $(MODULE).ko: $(SRCS_LINKS) @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0) # install module in $(RTE_OUTPUT)/kmod@@ -59,7 +62,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko # install module modules_install: - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ modules_install .PHONY: clean@@ -69,7 +72,7 @@ clean: _postclean .PHONY: doclean doclean: @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean + $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\ if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;) @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fi
Re: [PATCH 3/4] mk: allow kernel artifacts to be located in output directory
Hi Ferruh,
Quoted 7 lines · Ferruh Yigit
Quoted 4 lines · Ajit Khaparde
From: Scott Branden <[email protected]>
Allow kernel artifacts to be located in output directory specific by
RTE_KERNELDIR_OUT.How to use this variable, I tried following but kernel modules are still in same place:
export RTE_KERNELDIR and RTE_KERNELDIR_OUT and it works fine. RTE_KERNELDIR already exists in Makefile. Are you able to override it?
Quoted 7 lines
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh install
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruhmodules_install
/tmp/kmodnot created.And what we are fixing here, what was wrong with old code?
Old code puts the intermediate object files in the kernel source directory. This doesn't work when building an external module in openembedded recipes. We need the Makefile change to be able to able to specify the kernel and output directories separately.
Quoted 5 lines
Quoted 3 lines
If
RTE_KERNELDIR_OUTnot specified than
source directoryRTE_KERNELis used.${RTE_KERNELDIR} is used as external Linux kernel source folder, why we are want to put artifacts into kernel source?
I just kept the default behaviour the same as what it does today.
Quoted 38 lines
Quoted 38 lines
Signed-off-by Scott Branden <[email protected]>Signed-off-by Ajit Khaparde <[email protected]>--- mk/rte.module.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)mk/rte.module.mk +5
-2@@ -39,6 +39,9 @@ _postinstall: build .PHONY: build build: _postbuild +# Allow kernel artifacts to be located in a different location that source +RTE_KERNELDIR_OUT ?= ${RTE_KERNELDIR} + # Link all sources in build directory %_link: FORCE $(if $(call compare,$(notdir $*),$*),\@@ -48,7 +51,7 @@ build: _postbuild # build module $(MODULE).ko: $(SRCS_LINKS) @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0) # install module in $(RTE_OUTPUT)/kmod@@ -59,7 +62,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko # install module modules_install: - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ modules_install
Quoted 11 lines
mk/rte.module.mk clean: _postclean · line 78
Quoted 11 lines
mk/rte.module.mk +1
-1.PHONY: clean@@ -69,7 +72,7 @@ clean: _postclean .PHONY: doclean doclean: @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean + $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\ if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;) @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fi
Regards,
Scott
Re: [PATCH 2/4] net/bnxt: add support for Stingray PF devices ids
In reply to Ferruh YigitQuoted 8 lines · Ferruh Yigit
Quoted 7 lines · Ajit Khaparde
From: Scott Branden <[email protected]>
Add support for Stingray PF devices ids:
BCM58802 =0xd802
BCM58804 =0xd804
BCM58808 =0x16f0
Quoted 8 lines
Quoted 4 lines
Signed-off-by Scott Branden <[email protected]>Signed-off-by Ajit Khaparde <[email protected]>--- drivers/net/bnxt/bnxt_ethdev.c | 6 ++++++Can you please update driver documentation (
doc/guides/nics/bnxt.rst) with new device information.Also it can be good to update release notes to announce new device support.
OK, will update. I was not familiar with all the changes necessary. Thanks for pointing this out.
Thanks,
Scott
Re: [PATCH 1/4] introduce Broadcom Stingray
In reply to Ferruh YigitQuoted 17 lines · Ferruh Yigit
Quoted 16 lines · Ajit Khaparde
From: Scott Branden <[email protected]>
Add Broadcom Stingray machine support based on armv8.
For product brief see:
https://www.broadcom.com/products/ethernet-connectivity/controllers/bcm58800Signed-off-by Scott Branden <[email protected]>Signed-off-by Ajit Khaparde <[email protected]>--- config/defconfig_arm64-stingray-linuxapp-gcc | 16 ++++++++++++++ mk/machine/stingray/rte.vars.mk | 31 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+)create mode 100644 config/defconfig_arm64-stingray-linuxapp-gcc create mode 100644
mk/machine/stingray/rte.vars.mk
Quoted 16 lines
Quoted 6 lines
config/defconfig_arm64-stingray-linuxapp-gcc new file +0
-0config/defconfig_arm64-stingray-linuxapp-gcc line 8
Quoted 8 lines
config/defconfig_arm64-stingray-linuxapp-gcc new file +8
-0@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (C) Broadcom 2017-2018. All rights reserved. +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +# Broadcom - Stingray +CONFIG_RTE_MACHINE="stingray"This is same as armv8a machine type, is it required to add new "stingray" machine type?
Good question. We could have tuning or other differences in the future but it looks like we can use the armv8a machine. I think we can get rid of rte.vars.mk for now.
Quoted 2 lines
<...>
Re: [PATCH 3/4] mk: allow kernel artifacts to be located in output directory
In reply to Scott BrandenQuoted 5 lines · Scott Branden
Hi Ferruh,
Quoted 1 line · Ferruh Yigit
On 3/21/2018 6:06 PM, Ajit Khaparde wrote:
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
From: Scott Branden <[email protected]>
Allow kernel artifacts to be located in output directory specific by
RTE_KERNELDIR_OUT.How to use this variable, I tried following but kernel modules are still in same place:
export
RTE_KERNELDIRandRTE_KERNELDIR_OUTand it works fine.RTE_KERNELDIRalready exists in Makefile. Are you able to override it?
Please help me a little more, can you please list your commands?
Before your patch, what I do:
export RTE_KERNELDIR=~/development/linux/linux
make defconfig
make <--- After this kernel modules in ./build/kmod/*.ko
make DESTDIR=/tmp/for-scott install
kernel modules are installed into /tmp/for-scott/lib/modules/uname -r/extra/dpdk/*.ko
Here uname -r is wrong but your patch is not related this.
I am using RTE_KERNELDIR a lot since I am compiling with various kernel versions, not seen .ko files goes into source folder, what is your command line?
Or _after_ your patch:
export RTE_KERNELDIR=~/development/linux/linux
export RTE_KERNELDIR_OUT=/tmp/kmod
make defconfig
make <--- After this kernel modules in ./build/kmod/*.ko
Getting following build error:/bin/sh: scripts/mod/modpost: No such file or directory make[7]: *** [.../development/linux/linux/scripts/Makefile.modpost:92:__modpost] Error 127
make[6]: *** [.../development/linux/linux/Makefile:1558: modules] Error 2 make[5]: *** [Makefile:146: sub-make] Error 2
make[4]: *** [../mk/rte.module.mk:54: igb_uio.ko] Error 2
Can you please describe how this variable intended to be used?
Quoted 69 lines
Quoted 7 lines
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh install
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruhmodules_install
/tmp/kmodnot created.And what we are fixing here, what was wrong with old code?
Old code puts the intermediate object files in the kernel source directory. This doesn't work when building an external module in openembedded recipes. We need the
Makefilechange to be able to able to specify the kernel and output directories separately.Quoted 5 lines
Quoted 3 lines
If
RTE_KERNELDIR_OUTnot specified than
source directoryRTE_KERNELis used.${RTE_KERNELDIR} is used as external Linux kernel source folder, why we are want to put artifacts into kernel source?
I just kept the default behaviour the same as what it does today.
Quoted 38 lines
Quoted 38 lines
Signed-off-by Scott Branden <[email protected]>Signed-off-by Ajit Khaparde <[email protected]>--- mk/rte.module.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)mk/rte.module.mk +5
-2@@ -39,6 +39,9 @@ _postinstall: build .PHONY: build build: _postbuild +# Allow kernel artifacts to be located in a different location that source +RTE_KERNELDIR_OUT ?= ${RTE_KERNELDIR} + # Link all sources in build directory %_link: FORCE $(if $(call compare,$(notdir $*),$*),\@@ -48,7 +51,7 @@ build: _postbuild # build module $(MODULE).ko: $(SRCS_LINKS) @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0) # install module in $(RTE_OUTPUT)/kmod@@ -59,7 +62,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko # install module modules_install: - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ modules_installQuoted 11 lines
mk/rte.module.mk clean: _postclean · line 78
Quoted 11 lines
mk/rte.module.mk +1
-1.PHONY: clean@@ -69,7 +72,7 @@ clean: _postclean .PHONY: doclean doclean: @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean + $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\ if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;) @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fiRegards,
Scott
Re: [PATCH 3/4] mk: allow kernel artifacts to be located in output directory
In reply to a message not in the archiveHi Ferruh,
Somehow I did not receive your other email so Ajit fowarded it to me. So I am responding to it here.
Sorry for the previous confusion: RTE_KERNELDIR_OUT specifies the location of the output of the kernel artifacts, not the output of the DPDK build artifacts.
Here is an example to use RTE_KERNELDIR_OUT:
export ARCH=arm64
export CROSS_COMPILE=~/gcc-linaro-aarch64-linux-gnu/bin/aarch64-linux-gnu- export CROSS=aarch64-linux-gnu-
export RTE_KERNELDIR_OUT=~/test/linux-out
export RTE_KERNELDIR=~/test/linux
cd $RTE_KERNELDIR
make defconfig O=$RTE_KERNELDIR_OUT
make -j 8 O=$RTE_KERNELDIR_OUT
cd ~/test/dpdk
make config T=arm64-stingray-linuxapp-gcc
make
Note:
With this example you will likely hit a few compile errors as latest dpdk has compile bugs with unused variables/type mismatches in the code.
Regards,
Scott
Quoted 144 lines · Ajit Khaparde
Scott, are you looking at this?
---------- Forwarded message ----------
From: *Ferruh Yigit* <[email protected] <mailto:[email protected]>>
Date: Tue, Apr 3, 2018 at 7:18 AM
Subject: Re: [PATCH 3/4] mk: allow kernel artifacts to be located in output directory
To: Scott Branden <[email protected] <mailto:[email protected]>>, Ajit Khaparde <[email protected] <mailto:[email protected]>>, [email protected] <mailto:[email protected]>Quoted 6 lines · Scott Branden
Hi Ferruh,
Quoted 2 lines · Ferruh Yigit
Quoted 1 line · Ajit Khaparde
From: Scott Branden <[email protected]
<mailto:[email protected]>>
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Allow kernel artifacts to be located in output directory specific by
RTE_KERNELDIR_OUT.How to use this variable, I tried following but kernel modules are
still in same
Quoted 3 lines
Quoted 1 line
place:
export
RTE_KERNELDIRandRTE_KERNELDIR_OUTand it works fine.RTE_KERNELDIRalready exists in Makefile. Are you able to override it?Please help me a little more, can you please list your commands?
Before your patch, what I do:
export RTE_KERNELDIR=~/development/linux/linux make defconfig
make <--- After this kernel modules in ./build/kmod/*.ko make DESTDIR=/tmp/for-scott installkernel modules are installed into
/tmp/for-scott/lib/modules/uname -r/extra/dpdk/*.koHere
uname -ris wrong but your patch is not related this.I am using
RTE_KERNELDIRa lot since I am compiling with various kernel versions, not seen .ko files goes into source folder, what is your command line?Or _after_ your patch:
export RTE_KERNELDIR=~/development/linux/linux export RTE_KERNELDIR_OUT=/tmp/kmod
make defconfig
make <--- After this kernel modules in ./build/kmod/*.koGetting following build error:
/bin/sh:scripts/mod/modpost: No such file or directory
make[7]: *** [.../development/linux/linux/scripts/Makefile.modpost:92:__modpost] Error 127
make[6]: *** [.../development/linux/linux/Makefile:1558: modules] Error 2 make[5]: *** [Makefile:146: sub-make] Error 2
make[4]: *** [../mk/rte.module.mk:54<http://rte.module.mk:54>: igb_uio.ko] Error 2Can you please describe how this variable intended to be used?
Quoted 3 lines
Quoted 3 lines
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh install
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh
modules_installQuoted 12 lines
Quoted 4 lines
/tmp/kmodnot created.And what we are fixing here, what was wrong with old code?
Old code puts the intermediate object files in the kernel source directory. This doesn't work when building an external module in openembedded recipes. We need the
Makefilechange to be able to able to specify the kernel and output directories separately.Quoted 4 lines
Quoted 3 lines
If
RTE_KERNELDIR_OUTnot specified than
source directoryRTE_KERNELis used.${RTE_KERNELDIR} is used as external Linux kernel source folder,
why we are want
Quoted 4 lines
Quoted 1 line
to put artifacts into kernel source?
I just kept the default behaviour the same as what it does today.
Quoted 2 lines
Quoted 2 lines
Signed-off-by Scott Branden <[email protected]<mailto:[email protected]>>
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signed-off-by Ajit Khaparde <[email protected]<mailto:[email protected]>>
Quoted 5 lines
Quoted 5 lines
<http://rte.module.mk>
Quoted 5 lines
---
mk/rte.module.mk <http://rte.module.mk> | 9 ++++++---1 file changed, 6 insertions(+), 3 deletions(-)<http://rte.module.mk> renamed from mk/rte.module.mk +0
-0
b/mk/rte.module.mk<http://rte.module.mk>Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
index
1ada528a0..e2e1af716100644mk/rte.module.mk <http://rte.module.mk> +0
-0@@ -39,6 +39,9 @@ _postinstall: build.PHONY: build
build:_postbuild+# Allow kernel artifacts to be located in a different location
that source
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
mk/rte.module.mk <http://rte.module.mk> +2
-0+RTE_KERNELDIR_OUT ?= ${RTE_KERNELDIR} +# Link all sources in build directory
%_link: FORCE
$(if $(call compare,$(notdir $*),$*),\mk/rte.module.mk <http://rte.module.mk> +0
-0@@ -48,7 +51,7 @@ build: _postbuild # build module $(MODULE).ko: $(SRCS_LINKS)@if [ ! -f $(notdir
Makefile) ]; then ln -nfs$(SRCDIR)/Makefile . ; fi
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0)# install module in $(RTE_OUTPUT)/kmodmk/rte.module.mk <http://rte.module.mk> +0
-0@@ -59,7 +62,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko # install modulemodules_install:
- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
modules_installQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
.PHONY: clean
mk/rte.module.mk <http://rte.module.mk> +0
-0@@ -69,7 +72,7 @@ clean: _postclean.PHONY: doclean
doclean:
@if [ ! -f $(notdirMakefile) ]; then ln -nfs$(SRCDIR)/Makefile . ; fi
Quoted 1 line
Quoted 1 line
Quoted 1 line
- $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR)
clean
Quoted 1 line
Quoted 1 line
Quoted 1 line
+ $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR)
O=$(RTE_KERNELDIR_OUT) clean
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
@$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\
if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir$(FILE)) ; fi ;)
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
@if [ -h $(notdir
Makefile) ]; then rm -f $(notdirMakefile) ; fiRegards,
Scott
Re: [PATCH 3/4] mk: allow kernel artifacts to be located in output directory
Quoted 7 lines · Scott Branden
Hi Ferruh,
Somehow I did not receive your other email so Ajit fowarded it to me. So I am responding to it here.
Sorry for the previous confusion:
RTE_KERNELDIR_OUTspecifies the location of the output of the kernel artifacts, not the output of the DPDK build artifacts.
Ahh, this makes more sense now J Thanks.
Quoted 13 lines
Here is an example to use
RTE_KERNELDIR_OUT:export ARCH=arm64
export CROSS_COMPILE=~/gcc-linaro-aarch64-linux-gnu/bin/aarch64-linux-gnu- export CROSS=aarch64-linux-gnu-export RTE_KERNELDIR_OUT=~/test/linux-out
export RTE_KERNELDIR=~/test/linux
cd $RTE_KERNELDIR
make defconfig O=$RTE_KERNELDIR_OUT
make -j 8 O=$RTE_KERNELDIR_OUT
Quoted 3 lines
cd ~/test/dpdk
make config T=arm64-stingray-linuxapp-gcc
make
I guess using "~/test/linux-out" as RTE_KERNELDIR also works (because of "source" link), but your patch looks more proper way.
There are a few documents for build parameters, can you please update them too:doc/guides/prog_guide/dev_kit_build_system.rst doc/guides/linux_gsg/build_dpdk.rst <-- not sure about this one, please check doc/build-sdk-quick.txt <-- this is "make help" output
Quoted 5 lines
Note:
With this example you will likely hit a few compile errors as latest dpdk has compile bugs with unused variables/type mismatches in the code.
I didn't get the error, if you observe build error please report or better a patch to fix is always welcome :)
Quoted 150 lines
Regards,
Scott
Quoted 142 lines · Ajit Khaparde
Scott, are you looking at this?
---------- Forwarded message ----------
From: *Ferruh Yigit* <[email protected] <mailto:[email protected]>>
Date: Tue, Apr 3, 2018 at 7:18 AM
Subject: Re: [PATCH 3/4] mk: allow kernel artifacts to be located in output directory
To: Scott Branden <[email protected] <mailto:[email protected]>>, Ajit Khaparde <[email protected] <mailto:[email protected]>>, [email protected] <mailto:[email protected]>Quoted 6 lines · Scott Branden
Hi Ferruh,
Quoted 2 lines · Ferruh Yigit
Quoted 1 line · Ajit Khaparde
From: Scott Branden <[email protected]
<mailto:[email protected]>>
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Allow kernel artifacts to be located in output directory specific by
RTE_KERNELDIR_OUT.How to use this variable, I tried following but kernel modules are still in
same
Quoted 3 lines
Quoted 1 line
place:
export
RTE_KERNELDIRandRTE_KERNELDIR_OUTand it works fine.RTE_KERNELDIRalready exists in Makefile. Are you able to override it?Please help me a little more, can you please list your commands?
Before your patch, what I do:
export RTE_KERNELDIR=~/development/linux/linux make defconfig
make <--- After this kernel modules in ./build/kmod/*.ko make DESTDIR=/tmp/for-scott installkernel modules are installed into
/tmp/for-scott/lib/modules/uname -r/extra/dpdk/*.koHere
uname -ris wrong but your patch is not related this.I am using
RTE_KERNELDIRa lot since I am compiling with various kernel versions, not seen .ko files goes into source folder, what is your command line?Or _after_ your patch:
export RTE_KERNELDIR=~/development/linux/linux export RTE_KERNELDIR_OUT=/tmp/kmod
make defconfig
make <--- After this kernel modules in ./build/kmod/*.koGetting following build error:
/bin/sh:scripts/mod/modpost: No such file or directory make[7]: *** [.../development/linux/linux/scripts/Makefile.modpost:92:__modpost] Error 127
make[6]: *** [.../development/linux/linux/Makefile:1558: modules] Error 2 make[5]: *** [Makefile:146: sub-make] Error 2
make[4]: *** [../mk/rte.module.mk:54<http://rte.module.mk:54>: igb_uio.ko] Error 2Can you please describe how this variable intended to be used?
Quoted 4 lines
Quoted 4 lines
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh install
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruhmodules_installQuoted 11 lines
Quoted 3 lines
/tmp/kmodnot created.And what we are fixing here, what was wrong with old code?
Old code puts the intermediate object files in the kernel source directory. This doesn't work when building an external module in openembedded recipes. We need the
Makefilechange to be able to able to specify the kernel and output directories separately.Quoted 4 lines
Quoted 3 lines
If
RTE_KERNELDIR_OUTnot specified than
source directoryRTE_KERNELis used.${RTE_KERNELDIR} is used as external Linux kernel source folder, why we are
want
Quoted 4 lines
Quoted 1 line
to put artifacts into kernel source?
I just kept the default behaviour the same as what it does today.
Quoted 2 lines
Quoted 2 lines
Signed-off-by Scott Branden <[email protected]<mailto:[email protected]>>
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signed-off-by Ajit Khaparde <[email protected]<mailto:[email protected]>>
Quoted 5 lines
Quoted 5 lines
mk/rte.module.mk
Quoted 5 lines
---
mk/rte.module.mk <http://rte.module.mk> | 9 ++++++---1 file changed, 6 insertions(+), 3 deletions(-)mk/rte.module.mk renamed from mk/rte.module.mk <http://rte.module.mk> +0
-0Quoted 44 lines
Quoted 30 lines
Quoted 30 lines
index
1ada528a0..e2e1af716100644mk/rte.module.mk <http://rte.module.mk> +0
-0@@ -39,6 +39,9 @@ _postinstall: build.PHONY: build
build:_postbuildmk/rte.module.mk <http://rte.module.mk> +3
-0+# Allow kernel artifacts to be located in a different location that source +RTE_KERNELDIR_OUT ?= ${RTE_KERNELDIR} +# Link all sources in build directory
%_link: FORCE
$(if $(call compare,$(notdir $*),$*),\mk/rte.module.mk <http://rte.module.mk> +0
-0@@ -48,7 +51,7 @@ build: _postbuild # build module $(MODULE).ko: $(SRCS_LINKS)@if [ ! -f $(notdir
Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0)# install module in $(RTE_OUTPUT)/kmodmk/rte.module.mk <http://rte.module.mk> +0
-0@@ -59,7 +62,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko # install modulemodules_install:
- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
modules_installQuoted 11 lines
Quoted 11 lines
.PHONY: clean
mk/rte.module.mk <http://rte.module.mk> +0
-0@@ -69,7 +72,7 @@ clean: _postclean.PHONY: doclean
doclean:
@if [ ! -f $(notdirMakefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean + $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\
if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;) @if [ -h $(notdirMakefile) ]; then rm -f $(notdirMakefile) ; fiRegards,
Scott
Re: [PATCH 3/4] mk: allow kernel artifacts to be located in output directory
Quoted 22 lines · Ferruh Yigit
Quoted 7 lines · Scott Branden
Hi Ferruh,
Somehow I did not receive your other email so Ajit fowarded it to me. So I am responding to it here.
Sorry for the previous confusion:
RTE_KERNELDIR_OUTspecifies the location of the output of the kernel artifacts, not the output of the DPDK build artifacts.Ahh, this makes more sense now J Thanks.
Quoted 12 lines
Here is an example to use
RTE_KERNELDIR_OUT:export ARCH=arm64
export CROSS_COMPILE=~/gcc-linaro-aarch64-linux-gnu/bin/aarch64-linux-gnu- export CROSS=aarch64-linux-gnu-export RTE_KERNELDIR_OUT=~/test/linux-out
export RTE_KERNELDIR=~/test/linux
cd $RTE_KERNELDIR
make defconfig O=$RTE_KERNELDIR_OUT
make -j 8 O=$RTE_KERNELDIR_OUT
Quoted 5 lines
Quoted 3 lines
cd ~/test/dpdk
make config T=arm64-stingray-linuxapp-gcc
makeI guess using "~/test/linux-out" as
RTE_KERNELDIRalso works (because of "source" link), but your patch looks more proper way.
Actually, you may be correct.
Perhaps all this requires is a documentation change.
Does any of DPDK build system actually require to know where the kernel source directory is? Or, does DPDK only require to know where the kernel artifacts exist (ie. generated headers)
Looking at the documentation it is a little confusing. Each one describes something different.guides/linux_gsg/build_dpdk.rst
99: the ``RTE_KERNELDIR`` environment variable should be used to point the compilation at a copy of the kernel version to be used on the target machine.
guides/prog_guide/dev_kit_build_system.rst
297:* RTE_KERNELDIR: This variable contains the absolute path to the kernel sources that will be used to compile the kernel modules.
build-sdk-quick.txt
24: RTE_KERNELDIR linux headers path
In guides/prog_guide/dev_kit_build_system.rst. If "kernel sources" was changed to "linux headers" my change may not be needed. I'm doing some more testing now with RTE_KERNELDIR set to linux-out in other DPDK builds.
Quoted 6 lines
There are a few documents for build parameters, can you please update them too:
doc/guides/prog_guide/dev_kit_build_system.rstdoc/guides/linux_gsg/build_dpdk.rst<-- not sure about this one, please checkdoc/build-sdk-quick.txt<-- this is "make help" output
Quoted 6 lines
Quoted 4 lines
Note:
With this example you will likely hit a few compile errors as latest dpdk has compile bugs with unused variables/type mismatches in the code.
I didn't get the error, if you observe build error please report or better a patch to fix is always welcome :)
Yes - we have patches being created for 64-bit build warnings/errors that we will submit.
Quoted 144 lines
Quoted 144 lines
Regards,
Scott
Quoted 137 lines · Ajit Khaparde
Scott, are you looking at this?
---------- Forwarded message ----------
From: *Ferruh Yigit* <[email protected] <mailto:[email protected]>>
Date: Tue, Apr 3, 2018 at 7:18 AM
Subject: Re: [PATCH 3/4] mk: allow kernel artifacts to be located in output directory
To: Scott Branden <[email protected] <mailto:[email protected]>>, Ajit Khaparde <[email protected] <mailto:[email protected]>>, [email protected] <mailto:[email protected]>Quoted 6 lines · Scott Branden
Hi Ferruh,
Quoted 2 lines · Ferruh Yigit
Quoted 1 line · Ajit Khaparde
From: Scott Branden <[email protected]
<mailto:[email protected]>>
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
Allow kernel artifacts to be located in output directory specific by
RTE_KERNELDIR_OUT.How to use this variable, I tried following but kernel modules are still in
same
Quoted 3 lines
Quoted 1 line
place:
export
RTE_KERNELDIRandRTE_KERNELDIR_OUTand it works fine.RTE_KERNELDIRalready exists in Makefile. Are you able to override it?Please help me a little more, can you please list your commands?
Before your patch, what I do:
export RTE_KERNELDIR=~/development/linux/linux make defconfig
make <--- After this kernel modules in ./build/kmod/*.ko make DESTDIR=/tmp/for-scott installkernel modules are installed into
/tmp/for-scott/lib/modules/uname -r/extra/dpdk/*.koHere
uname -ris wrong but your patch is not related this.I am using
RTE_KERNELDIRa lot since I am compiling with various kernel versions, not seen .ko files goes into source folder, what is your command line?Or _after_ your patch:
export RTE_KERNELDIR=~/development/linux/linux export RTE_KERNELDIR_OUT=/tmp/kmod
make defconfig
make <--- After this kernel modules in ./build/kmod/*.koGetting following build error:
/bin/sh:scripts/mod/modpost: No such file or directory make[7]: *** [.../development/linux/linux/scripts/Makefile.modpost:92:__modpost] Error 127
make[6]: *** [.../development/linux/linux/Makefile:1558: modules] Error 2 make[5]: *** [Makefile:146: sub-make] Error 2
make[4]: *** [../mk/rte.module.mk:54<http://rte.module.mk:54>: igb_uio.ko] Error 2Can you please describe how this variable intended to be used?
Quoted 4 lines
Quoted 4 lines
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh install
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruhmodules_installQuoted 10 lines
Quoted 3 lines
/tmp/kmodnot created.And what we are fixing here, what was wrong with old code?
Old code puts the intermediate object files in the kernel source directory. This doesn't work when building an external module in openembedded recipes. We need the
Makefilechange to be able to able to specify the kernel and output directories separately.Quoted 3 lines
Quoted 2 lines
If
RTE_KERNELDIR_OUTnot specified than
source directoryRTE_KERNELis used.${RTE_KERNELDIR} is used as external Linux kernel source folder, why we are
want
Quoted 3 lines
Quoted 1 line
to put artifacts into kernel source?
I just kept the default behaviour the same as what it does today.
Quoted 1 line
Quoted 1 line
Signed-off-by Scott Branden <[email protected]<mailto:[email protected]>>
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signed-off-by Ajit Khaparde <[email protected]<mailto:[email protected]>>
Quoted 5 lines
Quoted 5 lines
mk/rte.module.mk
Quoted 5 lines
--- mk/rte.module.mk <http://rte.module.mk> | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)mk/rte.module.mk renamed from mk/rte.module.mk <http://rte.module.mk> +0
-0Quoted 44 lines
Quoted 30 lines
Quoted 30 lines
index
1ada528a0..e2e1af716100644mk/rte.module.mk <http://rte.module.mk> +5
-2@@ -39,6 +39,9 @@ _postinstall: build .PHONY: build build: _postbuild +# Allow kernel artifacts to be located in a different location that source +RTE_KERNELDIR_OUT ?= ${RTE_KERNELDIR} + # Link all sources in build directory %_link: FORCE $(if $(call compare,$(notdir $*),$*),\@@ -48,7 +51,7 @@ build: _postbuild # build module $(MODULE).ko: $(SRCS_LINKS) @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0) # install module in $(RTE_OUTPUT)/kmod@@ -59,7 +62,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko # install module modules_install: - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ modules_installQuoted 11 lines
mk/rte.module.mk <http://rte.module.mk> clean: _postclean · line 78
Quoted 11 lines
mk/rte.module.mk <http://rte.module.mk> +1
-1.PHONY: clean@@ -69,7 +72,7 @@ clean: _postclean .PHONY: doclean doclean: @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean + $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\ if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;) @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fiRegards,
Scott
v4 cover bnxt patchset to support Stingray product family
In reply to Ferruh YigitPatchset adding support for Broadcom Stingray product family
Scott Branden (3):
introduce Broadcom Stingray
net/bnxt: add support for Stingray PF devices ids
doc: add Broadcom Stingray SoC support to release notes
config/defconfig_arm64-stingray-linuxapp-gcc | 16 ++++++++++++++++ doc/guides/nics/bnxt.rst | 6 +++--- doc/guides/rel_notes/release_18_05.rst | 15 ++++++++++++--- drivers/net/bnxt/bnxt_ethdev.c | 6 ++++++ 4 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 config/defconfig_arm64-stingray-linuxapp-gcc
Signature · 1 line
2.15.1 (Apple Git-101)
PATCH v4 1/3 introduce Broadcom Stingray
From: Scott Branden <[email protected]>
Add Broadcom Stingray machine support based on armv8.
For product brief see:
https://www.broadcom.com/products/ethernet-connectivity/controllers/bcm58800
--- config/defconfig_arm64-stingray-linuxapp-gcc | 16 ++++++++++++++++ doc/guides/nics/bnxt.rst | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 config/defconfig_arm64-stingray-linuxapp-gcc
config/defconfig_arm64-stingray-linuxapp-gcc new file +16 -0
@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (C) Broadcom 2017-2018. All rights reserved. +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +# Broadcom - Stingray +CONFIG_RTE_MACHINE="armv8a" +CONFIG_RTE_ARCH_ARM_TUNE="cortex-a72" + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +CONFIG_RTE_EAL_IGB_UIO=y +CONFIG_RTE_KNI_KMOD=n
doc/guides/nics/bnxt.rst +3 -3
@@ -6,15 +6,15 @@ BNXT Poll Mode Driver The bnxt poll mode library (**librte_pmd_bnxt**) implements support for: - * **Broadcom NetXtreme-C®/NetXtreme-E® BCM5730X and BCM574XX family of - Ethernet Network Controllers** + * **Broadcom NetXtreme-C®/NetXtreme-E®/NetXtreme-S® + BCM5730X / BCM574XX / BCM58000 family of Ethernet Network Controllers** These adapters support Standards compliant 10/25/50/100Gbps 30MPPS full-duplex throughput. Information about the NetXtreme family of adapters can be found in the `NetXtreme® Brand section - <https://www.broadcom.com/products/ethernet-communication-and-switching?technology%5B%5D=88>`_ + <https://www.broadcom.com/products/ethernet-connectivity/controllers/>`_ of the `Broadcom website <http://www.broadcom.com/>`_. * **Broadcom StrataGX® BCM5871X Series of Communucations Processors**
Signature · 1 line
2.15.1 (Apple Git-101)
PATCH v4 2/3 net/bnxt: add support for Stingray PF devices ids
In reply to Ajit KhapardeFrom: Scott Branden <[email protected]>
Add support for Stingray PF devices ids:
BCM58802 = 0xd802
BCM58804 = 0xd804
BCM58808 = 0x16f0
--- drivers/net/bnxt/bnxt_ethdev.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/bnxt/bnxt_ethdev.c +6 -0
@@ -69,6 +69,9 @@ int bnxt_logtype_driver;#define BROADCOM_DEV_ID_57407_MF 0x16ea#define BROADCOM_DEV_ID_57414_MF 0x16ec#define BROADCOM_DEV_ID_57416_MF 0x16ee +#define BROADCOM_DEV_ID_58802 0xd802 +#define BROADCOM_DEV_ID_58804 0xd804 +#define BROADCOM_DEV_ID_58808 0x16f0static const struct rte_pci_id bnxt_pci_id_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM,
@@ -107,6 +110,9 @@ static const struct rte_pci_id bnxt_pci_id_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57317_SFP) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57414_MF) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57416_MF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_58802) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_58804) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_58808) }, { .vendor_id = 0, /* sentinel */ }, };
Signature · 1 line
2.15.1 (Apple Git-101)
PATCH v4 3/3 doc: add Broadcom Stingray SoC support to release notes
In reply to Ajit KhapardeFrom: Scott Branden <[email protected]>
Update 18.05 release notes to indicate support for Broadcom Stingray SoC support.
--- doc/guides/rel_notes/release_18_05.rst | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
doc/guides/rel_notes/release_18_05.rst +12 -3
@@ -41,6 +41,16 @@ New Features Also, make sure to start the actual text at the margin. ========================================================= +* **Added support for Broadcom NetXtreme-S (BCM58800) family of controllers (aka Stingray) ** + + The BCM58800 devices feature a NetXtreme E-Series advanced network controller, a high-performance + ARM CPU block, PCI Express (PCIe) Gen3 interfaces, key accelerators for compute offload and a high- + speed memory subsystem including L3 cache and DDR4 interfaces, all interconnected by a coherent + Network-on-chip (NOC) fabric. + + The ARM CPU subsystem features eight ARMv8 Cortex-A72 CPUs at 3.0 GHz, arranged in a multi-cluster + configuration. + * **Added RSS hash and key update to CXGBE PMD.** Support to update RSS hash and key has been added to CXGBE PMD.
@@ -158,11 +168,10 @@ The libraries prepended with a plus sign were incremented in this version. librte_bus_vdev.so.1 librte_cfgfile.so.2 librte_cmdline.so.2 - + librte_common_octeontx.so.1 librte_cryptodev.so.4 librte_distributor.so.1 - + librte_eal.so.7 - + librte_ethdev.so.9 + librte_eal.so.6 + librte_ethdev.so.8 librte_eventdev.so.3 librte_flow_classify.so.1 librte_gro.so.1
Signature · 1 line
2.15.1 (Apple Git-101)
Re: [PATCH 3/4] mk: allow kernel artifacts to be located in output directory
In reply to Scott BrandenQuoted 28 lines · Scott Branden
Quoted 25 lines · Ferruh Yigit
Quoted 7 lines · Scott Branden
Hi Ferruh,
Somehow I did not receive your other email so Ajit fowarded it to me. So I am responding to it here.
Sorry for the previous confusion:
RTE_KERNELDIR_OUTspecifies the location of the output of the kernel artifacts, not the output of the DPDK build artifacts.Ahh, this makes more sense now J Thanks.
Quoted 15 lines
Here is an example to use
RTE_KERNELDIR_OUT:export ARCH=arm64
export CROSS_COMPILE=~/gcc-linaro-aarch64-linux-gnu/bin/aarch64-linux-gnu- export CROSS=aarch64-linux-gnu-export RTE_KERNELDIR_OUT=~/test/linux-out
export RTE_KERNELDIR=~/test/linux
cd $RTE_KERNELDIR
make defconfig O=$RTE_KERNELDIR_OUT
make -j 8 O=$RTE_KERNELDIR_OUTcd ~/test/dpdk
make config T=arm64-stingray-linuxapp-gcc
make
Quoted 8 lines
Quoted 2 lines
I guess using "~/test/linux-out" as
RTE_KERNELDIRalso works (because of "source" link), but your patch looks more proper way.Actually, you may be correct.
Perhaps all this requires is a documentation change.
Does any of DPDK build system actually require to know where the kernel source directory is?
Or, does DPDK only require to know where the kernel artifacts exist (ie. generated headers)
Both are required, kernel source is required because of some headers, there are multiple components depends on kernel headers, also kernel artifacts are required like kernel config mainly for building kernel modules.
Quoted 12 lines
Looking at the documentation it is a little confusing. Each one describes something different.
guides/linux_gsg/build_dpdk.rst
99: the ``RTE_KERNELDIR`` environment variable should be used to point the compilation at a copy of the kernel version to be used on the target machine.
guides/prog_guide/dev_kit_build_system.rst
297:*RTE_KERNELDIR: This variable contains the absolute path to the kernel sources that will be used to compile the kernel modules.
Quoted 6 lines
build-sdk-quick.txt
24: RTE_KERNELDIR linux headers pathIn guides/prog_guide/dev_kit_build_system.rst. If "kernel sources" was changed to "linux headers" my change may not be needed. I'm doing some more testing now with
RTE_KERNELDIRset to linux-out in other DPDK builds.
I believe it is not just "linux headers", it is more like "compiled kernel source"
Quoted 160 lines
Quoted 7 lines
There are a few documents for build parameters, can you please update them too:
doc/guides/prog_guide/dev_kit_build_system.rstdoc/guides/linux_gsg/build_dpdk.rst<-- not sure about this one, please checkdoc/build-sdk-quick.txt<-- this is "make help" outputQuoted 6 lines
Quoted 4 lines
Note:
With this example you will likely hit a few compile errors as latest dpdk has compile bugs with unused variables/type mismatches in the code.
I didn't get the error, if you observe build error please report or better a patch to fix is always welcome :)
Yes - we have patches being created for 64-bit build warnings/errors that we will submit.
Quoted 144 lines
Quoted 144 lines
Regards,
Scott
Quoted 137 lines · Ajit Khaparde
Scott, are you looking at this?
---------- Forwarded message ----------
From: *Ferruh Yigit* <[email protected] <mailto:[email protected]>>
Date: Tue, Apr 3, 2018 at 7:18 AM
Subject: Re: [PATCH 3/4] mk: allow kernel artifacts to be located in output directory
To: Scott Branden <[email protected] <mailto:[email protected]>>, Ajit Khaparde <[email protected] <mailto:[email protected]>>, [email protected] <mailto:[email protected]>Quoted 6 lines · Scott Branden
Hi Ferruh,
Quoted 2 lines · Ferruh Yigit
Quoted 1 line · Ajit Khaparde
From: Scott Branden <[email protected]
<mailto:[email protected]>>
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
Allow kernel artifacts to be located in output directory specific by
RTE_KERNELDIR_OUT.How to use this variable, I tried following but kernel modules are still in
same
Quoted 3 lines
Quoted 1 line
place:
export
RTE_KERNELDIRandRTE_KERNELDIR_OUTand it works fine.RTE_KERNELDIRalready exists in Makefile. Are you able to override it?Please help me a little more, can you please list your commands?
Before your patch, what I do:
export RTE_KERNELDIR=~/development/linux/linux make defconfig
make <--- After this kernel modules in ./build/kmod/*.ko make DESTDIR=/tmp/for-scott installkernel modules are installed into
/tmp/for-scott/lib/modules/uname -r/extra/dpdk/*.koHere
uname -ris wrong but your patch is not related this.I am using
RTE_KERNELDIRa lot since I am compiling with various kernel versions, not seen .ko files goes into source folder, what is your command line?Or _after_ your patch:
export RTE_KERNELDIR=~/development/linux/linux export RTE_KERNELDIR_OUT=/tmp/kmod
make defconfig
make <--- After this kernel modules in ./build/kmod/*.koGetting following build error:
/bin/sh:scripts/mod/modpost: No such file or directory make[7]: *** [.../development/linux/linux/scripts/Makefile.modpost:92:__modpost] Error 127
make[6]: *** [.../development/linux/linux/Makefile:1558: modules] Error 2 make[5]: *** [Makefile:146: sub-make] Error 2
make[4]: *** [../mk/rte.module.mk:54<http://rte.module.mk:54>: igb_uio.ko] Error 2Can you please describe how this variable intended to be used?
Quoted 4 lines
Quoted 4 lines
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh install
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruhmodules_installQuoted 10 lines
Quoted 3 lines
/tmp/kmodnot created.And what we are fixing here, what was wrong with old code?
Old code puts the intermediate object files in the kernel source directory. This doesn't work when building an external module in openembedded recipes. We need the
Makefilechange to be able to able to specify the kernel and output directories separately.Quoted 3 lines
Quoted 2 lines
If
RTE_KERNELDIR_OUTnot specified than
source directoryRTE_KERNELis used.${RTE_KERNELDIR} is used as external Linux kernel source folder, why we are
want
Quoted 3 lines
Quoted 1 line
to put artifacts into kernel source?
I just kept the default behaviour the same as what it does today.
Quoted 1 line
Quoted 1 line
Signed-off-by Scott Branden <[email protected]<mailto:[email protected]>>
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signed-off-by Ajit Khaparde <[email protected]<mailto:[email protected]>>
Quoted 5 lines
Quoted 5 lines
mk/rte.module.mk
Quoted 5 lines
--- mk/rte.module.mk <http://rte.module.mk> | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)mk/rte.module.mk renamed from mk/rte.module.mk <http://rte.module.mk> +0
-0Quoted 44 lines
Quoted 30 lines
Quoted 30 lines
index
1ada528a0..e2e1af716100644mk/rte.module.mk <http://rte.module.mk> +5
-2@@ -39,6 +39,9 @@ _postinstall: build .PHONY: build build: _postbuild +# Allow kernel artifacts to be located in a different location that source +RTE_KERNELDIR_OUT ?= ${RTE_KERNELDIR} + # Link all sources in build directory %_link: FORCE $(if $(call compare,$(notdir $*),$*),\@@ -48,7 +51,7 @@ build: _postbuild # build module $(MODULE).ko: $(SRCS_LINKS) @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0) # install module in $(RTE_OUTPUT)/kmod@@ -59,7 +62,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko # install module modules_install: - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ modules_installQuoted 11 lines
mk/rte.module.mk <http://rte.module.mk> clean: _postclean · line 78
Quoted 11 lines
mk/rte.module.mk <http://rte.module.mk> +1
-1.PHONY: clean@@ -69,7 +72,7 @@ clean: _postclean .PHONY: doclean doclean: @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean + $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\ if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;) @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fiRegards,
Scott
Re: [PATCH 3/4] mk: allow kernel artifacts to be located in output directory
Hi Ferruh,
We dropped this patch from the series - comment inline.
Quoted 50 lines · Ferruh Yigit
Quoted 27 lines · Scott Branden
Quoted 25 lines · Ferruh Yigit
Quoted 7 lines · Scott Branden
Hi Ferruh,
Somehow I did not receive your other email so Ajit fowarded it to me. So I am responding to it here.
Sorry for the previous confusion:
RTE_KERNELDIR_OUTspecifies the location of the output of the kernel artifacts, not the output of the DPDK build artifacts.Ahh, this makes more sense now J Thanks.
Quoted 15 lines
Here is an example to use
RTE_KERNELDIR_OUT:export ARCH=arm64
export CROSS_COMPILE=~/gcc-linaro-aarch64-linux-gnu/bin/aarch64-linux-gnu- export CROSS=aarch64-linux-gnu-export RTE_KERNELDIR_OUT=~/test/linux-out
export RTE_KERNELDIR=~/test/linux
cd $RTE_KERNELDIR
make defconfig O=$RTE_KERNELDIR_OUT
make -j 8 O=$RTE_KERNELDIR_OUTcd ~/test/dpdk
make config T=arm64-stingray-linuxapp-gcc
makeQuoted 8 lines
Quoted 2 lines
I guess using "~/test/linux-out" as
RTE_KERNELDIRalso works (because of "source" link), but your patch looks more proper way.Actually, you may be correct.
Perhaps all this requires is a documentation change.
Does any of DPDK build system actually require to know where the kernel source directory is?
Or, does DPDK only require to know where the kernel artifacts exist (ie. generated headers)Both are required, kernel source is required because of some headers, there are multiple components depends on kernel headers, also kernel artifacts are required like kernel config mainly for building kernel modules.
Quoted 11 lines
Looking at the documentation it is a little confusing. Each one describes something different.
guides/linux_gsg/build_dpdk.rst
99: the ``RTE_KERNELDIR`` environment variable should be used to point the compilation at a copy of the kernel version to be used on the target machine.
guides/prog_guide/dev_kit_build_system.rst
297:*RTE_KERNELDIR: This variable contains the absolute path to the kernel sources that will be used to compile the kernel modules.
Quoted 7 lines
Quoted 6 lines
build-sdk-quick.txt
24: RTE_KERNELDIR linux headers pathIn guides/prog_guide/dev_kit_build_system.rst. If "kernel sources" was changed to "linux headers" my change may not be needed. I'm doing some more testing now with
RTE_KERNELDIRset to linux-out in other DPDK builds.I believe it is not just "linux headers", it is more like "compiled kernel source"
Yes - everything is provided in the linux-out directory.
I have no need for this patch and we have dropped it from the patch series. Setting RTE_KERNELDIR to the linux-out directory allows DPDK to build.
Quoted 157 lines
Quoted 157 lines
Quoted 7 lines
There are a few documents for build parameters, can you please update them too:
doc/guides/prog_guide/dev_kit_build_system.rstdoc/guides/linux_gsg/build_dpdk.rst<-- not sure about this one, please checkdoc/build-sdk-quick.txt<-- this is "make help" outputQuoted 6 lines
Quoted 4 lines
Note:
With this example you will likely hit a few compile errors as latest dpdk has compile bugs with unused variables/type mismatches in the code.
I didn't get the error, if you observe build error please report or better a patch to fix is always welcome :)
Yes - we have patches being created for 64-bit build warnings/errors that we will submit.
Quoted 142 lines
Quoted 142 lines
Regards,
Scott
Quoted 136 lines · Ajit Khaparde
Scott, are you looking at this?
---------- Forwarded message ----------
From: *Ferruh Yigit* <[email protected] <mailto:[email protected]>>
Date: Tue, Apr 3, 2018 at 7:18 AM
Subject: Re: [PATCH 3/4] mk: allow kernel artifacts to be located in output directory
To: Scott Branden <[email protected] <mailto:[email protected]>>, Ajit Khaparde <[email protected] <mailto:[email protected]>>, [email protected] <mailto:[email protected]>Quoted 6 lines · Scott Branden
Hi Ferruh,
Quoted 2 lines · Ferruh Yigit
Quoted 1 line · Ajit Khaparde
From: Scott Branden <[email protected]
<mailto:[email protected]>>
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
Allow kernel artifacts to be located in output directory specific by
RTE_KERNELDIR_OUT.How to use this variable, I tried following but kernel modules are still in
same
Quoted 3 lines
Quoted 1 line
place:
export
RTE_KERNELDIRandRTE_KERNELDIR_OUTand it works fine.RTE_KERNELDIRalready exists in Makefile. Are you able to override it?Please help me a little more, can you please list your commands?
Before your patch, what I do:
export RTE_KERNELDIR=~/development/linux/linux make defconfig
make <--- After this kernel modules in ./build/kmod/*.ko make DESTDIR=/tmp/for-scott installkernel modules are installed into
/tmp/for-scott/lib/modules/uname -r/extra/dpdk/*.koHere
uname -ris wrong but your patch is not related this.I am using
RTE_KERNELDIRa lot since I am compiling with various kernel versions, not seen .ko files goes into source folder, what is your command line?Or _after_ your patch:
export RTE_KERNELDIR=~/development/linux/linux export RTE_KERNELDIR_OUT=/tmp/kmod
make defconfig
make <--- After this kernel modules in ./build/kmod/*.koGetting following build error:
/bin/sh:scripts/mod/modpost: No such file or directory make[7]: *** [.../development/linux/linux/scripts/Makefile.modpost:92:__modpost] Error 127
make[6]: *** [.../development/linux/linux/Makefile:1558: modules] Error 2 make[5]: *** [Makefile:146: sub-make] Error 2
make[4]: *** [../mk/rte.module.mk:54<http://rte.module.mk:54>: igb_uio.ko] Error 2Can you please describe how this variable intended to be used?
Quoted 4 lines
Quoted 4 lines
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruh install
- make RTE_KERNELDIR_OUT=/tmp/kmod O=ferruh DESTDIR=/tmp/ferruhmodules_installQuoted 10 lines
Quoted 3 lines
/tmp/kmodnot created.And what we are fixing here, what was wrong with old code?
Old code puts the intermediate object files in the kernel source directory. This doesn't work when building an external module in openembedded recipes. We need the
Makefilechange to be able to able to specify the kernel and output directories separately.Quoted 3 lines
Quoted 2 lines
If
RTE_KERNELDIR_OUTnot specified than
source directoryRTE_KERNELis used.${RTE_KERNELDIR} is used as external Linux kernel source folder, why we are
want
Quoted 3 lines
Quoted 1 line
to put artifacts into kernel source?
I just kept the default behaviour the same as what it does today.
Quoted 1 line
Quoted 1 line
Signed-off-by Scott Branden <[email protected]<mailto:[email protected]>>
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signed-off-by Ajit Khaparde <[email protected]<mailto:[email protected]>>
Quoted 5 lines
Quoted 5 lines
mk/rte.module.mk
Quoted 5 lines
--- mk/rte.module.mk <http://rte.module.mk> | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)mk/rte.module.mk renamed from mk/rte.module.mk <http://rte.module.mk> +0
-0Quoted 44 lines
Quoted 30 lines
Quoted 30 lines
index
1ada528a0..e2e1af716100644mk/rte.module.mk <http://rte.module.mk> +5
-2@@ -39,6 +39,9 @@ _postinstall: build .PHONY: build build: _postbuild +# Allow kernel artifacts to be located in a different location that source +RTE_KERNELDIR_OUT ?= ${RTE_KERNELDIR} + # Link all sources in build directory %_link: FORCE $(if $(call compare,$(notdir $*),$*),\@@ -48,7 +51,7 @@ build: _postbuild # build module $(MODULE).ko: $(SRCS_LINKS) @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0) # install module in $(RTE_OUTPUT)/kmod@@ -59,7 +62,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko # install module modules_install: - @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ + @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ modules_installQuoted 11 lines
mk/rte.module.mk <http://rte.module.mk> clean: _postclean · line 78
Quoted 11 lines
mk/rte.module.mk <http://rte.module.mk> +1
-1.PHONY: clean@@ -69,7 +72,7 @@ clean: _postclean .PHONY: doclean doclean: @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi - $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean + $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\ if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;) @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fiRegards,
Scott
Re: [PATCH v4 3/3] doc: add Broadcom Stingray SoC support to release notes
In reply to Ajit KhapardeQuoted 4 lines · Ajit Khaparde
doc/guides/rel_notes/release_18_05.rst +0
-0@@ -158,11 +168,10 @@ The libraries prepended with a plus sign were incremented in this version. librte_bus_vdev.so.1 librte_cfgfile.so.2 librte_cmdline.so.2
doc/guides/rel_notes/release_18_05.rst The libraries prepended with a plus sign were incremented in this version. · line 177
Quoted 10 lines
doc/guides/rel_notes/release_18_05.rst +2
-3- + librte_common_octeontx.so.1 librte_cryptodev.so.4 librte_distributor.so.1 - + librte_eal.so.7 - + librte_ethdev.so.9 + librte_eal.so.6 + librte_ethdev.so.8 librte_eventdev.so.3 librte_flow_classify.so.1 librte_gro.so.1
I guess these changes are unintentional, looks like git artifacts, can you please send a new version?
PATCH v5 1/3 introduce Broadcom Stingray
From: Scott Branden <[email protected]>
Add Broadcom Stingray machine support based on armv8.
For product brief see:
https://www.broadcom.com/products/ethernet-connectivity/controllers/bcm58800
--- config/defconfig_arm64-stingray-linuxapp-gcc | 16 ++++++++++++++++ doc/guides/nics/bnxt.rst | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 config/defconfig_arm64-stingray-linuxapp-gcc
config/defconfig_arm64-stingray-linuxapp-gcc new file +16 -0
@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright (C) Broadcom 2017-2018. All rights reserved. +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +# Broadcom - Stingray +CONFIG_RTE_MACHINE="armv8a" +CONFIG_RTE_ARCH_ARM_TUNE="cortex-a72" + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +CONFIG_RTE_EAL_IGB_UIO=y +CONFIG_RTE_KNI_KMOD=n
doc/guides/nics/bnxt.rst +3 -3
@@ -6,15 +6,15 @@ BNXT Poll Mode Driver The bnxt poll mode library (**librte_pmd_bnxt**) implements support for: - * **Broadcom NetXtreme-C®/NetXtreme-E® BCM5730X and BCM574XX family of - Ethernet Network Controllers** + * **Broadcom NetXtreme-C®/NetXtreme-E®/NetXtreme-S® + BCM5730X / BCM574XX / BCM58000 family of Ethernet Network Controllers** These adapters support Standards compliant 10/25/50/100Gbps 30MPPS full-duplex throughput. Information about the NetXtreme family of adapters can be found in the `NetXtreme® Brand section - <https://www.broadcom.com/products/ethernet-communication-and-switching?technology%5B%5D=88>`_ + <https://www.broadcom.com/products/ethernet-connectivity/controllers/>`_ of the `Broadcom website <http://www.broadcom.com/>`_. * **Broadcom StrataGX® BCM5871X Series of Communucations Processors**
Signature · 1 line
2.15.1 (Apple Git-101)
PATCH v5 2/3 net/bnxt: add support for Stingray PF devices ids
From: Scott Branden <[email protected]>
Add support for Stingray PF devices ids:
BCM58802 = 0xd802
BCM58804 = 0xd804
BCM58808 = 0x16f0
--- drivers/net/bnxt/bnxt_ethdev.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/bnxt/bnxt_ethdev.c +6 -0
@@ -69,6 +69,9 @@ int bnxt_logtype_driver;#define BROADCOM_DEV_ID_57407_MF 0x16ea#define BROADCOM_DEV_ID_57414_MF 0x16ec#define BROADCOM_DEV_ID_57416_MF 0x16ee +#define BROADCOM_DEV_ID_58802 0xd802 +#define BROADCOM_DEV_ID_58804 0xd804 +#define BROADCOM_DEV_ID_58808 0x16f0static const struct rte_pci_id bnxt_pci_id_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM,
@@ -107,6 +110,9 @@ static const struct rte_pci_id bnxt_pci_id_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57317_SFP) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57414_MF) }, { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57416_MF) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_58802) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_58804) }, + { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_58808) }, { .vendor_id = 0, /* sentinel */ }, };
Signature · 1 line
2.15.1 (Apple Git-101)
PATCH v5 3/3 doc: add Broadcom Stingray SoC support to release notes
In reply to Ajit KhapardeUpdate 18.05 release notes to indicate support for Broadcom Stingray SoC support.
--- doc/guides/rel_notes/release_18_05.rst | 10 ++++++++++ 1 file changed, 10 insertions(+)
doc/guides/rel_notes/release_18_05.rst +10 -0
@@ -46,6 +46,16 @@ New Features Applications can now query drivers for device-tuned values of ring sizes, burst sizes, and number of queues. +* **Added support for Broadcom NetXtreme-S (BCM58800) family of controllers (aka Stingray) ** + + The BCM58800 devices feature a NetXtreme E-Series advanced network controller, a high-performance + ARM CPU block, PCI Express (PCIe) Gen3 interfaces, key accelerators for compute offload and a high- + speed memory subsystem including L3 cache and DDR4 interfaces, all interconnected by a coherent + Network-on-chip (NOC) fabric. + + The ARM CPU subsystem features eight ARMv8 Cortex-A72 CPUs at 3.0 GHz, arranged in a multi-cluster + configuration. + * **Added RSS hash and key update to CXGBE PMD.** Support to update RSS hash and key has been added to CXGBE PMD.
Signature · 1 line
2.15.1 (Apple Git-101)
Re: [PATCH v5 1/3] introduce Broadcom Stingray
In reply to Ajit KhapardeQuoted 9 lines · Ajit Khaparde
From: Scott Branden <[email protected]>
Add Broadcom Stingray machine support based on armv8.
For product brief see:
https://www.broadcom.com/products/ethernet-connectivity/controllers/bcm58800Signed-off-by Scott Branden <[email protected]>Signed-off-by Ajit Khaparde <[email protected]>
Series applied to dpdk-next-net/master, thanks.