Skip to contentSkip to conversation

rte_tailq.h: Fix compilation under FreeBSD

PATCH In review Alan Carew 4 participants 7 messages Jun 5, 2014 – Jun 11, 2014 4 messages not in the archive

lore
Share & tools
lore

Alan Carew

author
#0 lore raw

PATCH 1/2 rte_tailq.h: Fix compilation under FreeBSD

Recent change to rte_dump_tailq, which now uses a FILE parameter causes compilation to fail under FreeBSD and sourced to a missing include of stdio.h

This and next patch(both small) allows to compile without error.

---
 lib/librte_eal/common/include/rte_tailq.h | 1 +
 1 file changed, 1 insertion(+)
lib/librte_eal/common/include/rte_tailq.h +1 -0
index 42df7d2..0ddcc11 100644
@@ -45,6 +45,7 @@ extern "C" {
 #endif
 
 #include <sys/queue.h>
+#include <stdio.h>
 
 /** dummy structure type used by the rte_tailq APIs */
 struct rte_dummy {
Signature · 1 line
1.9.3

A message that is not in the archive (sent off-list or not yet received): 1401984728-21665-1-git-send-email-alan.carew-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org

author
#2 lore raw

PATCH 2/2 eal_pci: Fix compilation under FreeBSD

I'm not sure why this has not caused an issue before, perhaps missing -Werror=unused-parameter or super-set
and subsequently fixed.
This patch adds __rte_unused to pci_unbind_kernel_driver(struct rte_pci_device *dev)

---
 lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_eal/bsdapp/eal/eal_pci.c +1 -1
index 94ae461..5c4d81b 100644
@@ -110,7 +110,7 @@ static struct uio_res_list *uio_res_list = NULL;
 
 /* unbind kernel driver for this device */
 static int
-pci_unbind_kernel_driver(struct rte_pci_device *dev)
+pci_unbind_kernel_driver(struct rte_pci_device *dev __rte_unused)
 {
 	RTE_LOG(ERR, EAL, "RTE_PCI_DRV_FORCE_UNBIND flag is not implemented "
 		"for BSD\n");
Signature · 1 line
1.9.3

A message that is not in the archive (sent off-list or not yet received): 1401984728-21665-2-git-send-email-alan.carew-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org

A message that is not in the archive (sent off-list or not yet received): 20140610210047.GB25593-IWE99D/oH1/[email protected]

#6 lore raw

Re: [PATCH 2/2] eal_pci: Fix compilation under FreeBSD

2014-06-10 22:00, Bruce Richardson:

Quoted 10 lines · Alan Carew
Quoted 7 lines

I'm not sure why this has not caused an issue before, perhaps missing -Werror=unused-parameter or super-set
and subsequently fixed.
This patch adds __rte_unused to pci_unbind_kernel_driver(struct rte_pci_device *dev)

Applied for version 1.7.0.

Thanks

Signature · 1 line
Thomas
Tested-by
#7 lore raw
In reply to a message not in the archive

This patch is to fix compilation error in the FreeBSD 10.0 like the followings:
.. /include/rte_tailq.h:177:21: error: unknown type name 'FILE' void rte_dump_tailq(FILE *f); ../include/rte_memory.h:146:30: error: unknown type name 'FILE' void rte_dump_physmem_layout(FILE *f);

After merged this patch with last dpdk.org, compilation can pass without error in FreeBSD 10.0

A message that is not in the archive (sent off-list or not yet received): 20140610205805.GA25593-IWE99D/oH1/[email protected]