patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] bpf: fix build with some libpcap version on FreeBSD
@ 2022-03-10 18:30 David Marchand
  2022-03-10 18:54 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2022-03-10 18:30 UTC (permalink / raw)
  To: dev; +Cc: blo, stable, Konstantin Ananyev, Ferruh Yigit

This is something caught in UNH FreeBSD env.

For some reason [1], the pcap/bpf.h header started to define _BPF_H_.

It happens that the bpf_impl.h internal DPDK header uses this define as
an internal guard.
This triggers a build failure in bpf_convert.c which can't find
RTE_BPF_LOG macro.

Fix the include guard to use the filename and remove _.

1: https://github.com/the-tcpdump-group/libpcap/pull/1074

Fixes: 94972f35a02e ("bpf: add BPF loading and execution framework")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/bpf/bpf_impl.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/bpf/bpf_impl.h b/lib/bpf/bpf_impl.h
index 26d165ad5c..b4d8e87c6d 100644
--- a/lib/bpf/bpf_impl.h
+++ b/lib/bpf/bpf_impl.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2018 Intel Corporation
  */
 
-#ifndef _BPF_H_
-#define _BPF_H_
+#ifndef BPF_IMPL_H
+#define BPF_IMPL_H
 
 #include <rte_bpf.h>
 #include <sys/mman.h>
@@ -43,4 +43,4 @@ bpf_size(uint32_t bpf_op_sz)
 	return 0;
 }
 
-#endif /* _BPF_H_ */
+#endif /* BPF_IMPL_H */
-- 
2.23.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bpf: fix build with some libpcap version on FreeBSD
  2022-03-10 18:30 [PATCH] bpf: fix build with some libpcap version on FreeBSD David Marchand
@ 2022-03-10 18:54 ` Stephen Hemminger
  2022-03-14 10:51   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2022-03-10 18:54 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, blo, stable, Konstantin Ananyev, Ferruh Yigit

On Thu, 10 Mar 2022 19:30:40 +0100
David Marchand <david.marchand@redhat.com> wrote:

> This is something caught in UNH FreeBSD env.
> 
> For some reason [1], the pcap/bpf.h header started to define _BPF_H_.
> 
> It happens that the bpf_impl.h internal DPDK header uses this define as
> an internal guard.
> This triggers a build failure in bpf_convert.c which can't find
> RTE_BPF_LOG macro.
> 
> Fix the include guard to use the filename and remove _.
> 
> 1: https://github.com/the-tcpdump-group/libpcap/pull/1074
> 
> Fixes: 94972f35a02e ("bpf: add BPF loading and execution framework")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bpf: fix build with some libpcap version on FreeBSD
  2022-03-10 18:54 ` Stephen Hemminger
@ 2022-03-14 10:51   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2022-03-14 10:51 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, blo, stable, Konstantin Ananyev, Ferruh Yigit, Stephen Hemminger

10/03/2022 19:54, Stephen Hemminger:
> On Thu, 10 Mar 2022 19:30:40 +0100
> David Marchand <david.marchand@redhat.com> wrote:
> 
> > This is something caught in UNH FreeBSD env.
> > 
> > For some reason [1], the pcap/bpf.h header started to define _BPF_H_.
> > 
> > It happens that the bpf_impl.h internal DPDK header uses this define as
> > an internal guard.
> > This triggers a build failure in bpf_convert.c which can't find
> > RTE_BPF_LOG macro.
> > 
> > Fix the include guard to use the filename and remove _.
> > 
> > 1: https://github.com/the-tcpdump-group/libpcap/pull/1074
> > 
> > Fixes: 94972f35a02e ("bpf: add BPF loading and execution framework")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>

Applied, thanks.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-14 10:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10 18:30 [PATCH] bpf: fix build with some libpcap version on FreeBSD David Marchand
2022-03-10 18:54 ` Stephen Hemminger
2022-03-14 10:51   ` Thomas Monjalon

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).