[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220607084003.898387-3-liuhangbin@gmail.com>
Date: Tue, 7 Jun 2022 16:40:02 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: netdev@...r.kernel.org
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jesper Dangaard Brouer <hawk@...nel.org>,
Toke Høiland-Jørgensen <toke@...hat.com>,
John Fastabend <john.fastabend@...il.com>,
Björn Töpel <bjorn@...nel.org>,
Magnus Karlsson <magnus.karlsson@...el.com>,
Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
Jonathan Lemon <jonathan.lemon@...il.com>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
KP Singh <kpsingh@...nel.org>, bpf@...r.kernel.org,
Hangbin Liu <liuhangbin@...il.com>
Subject: [PATCH bpf-next 2/3] samples/bpf: move AF_XDP APIs to libxdp
libbpf APIs for AF_XDP are deprecated starting from v0.7.
Let's move to libxdp.
Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
---
samples/bpf/xdpsock_ctrl_proc.c | 5 +----
samples/bpf/xdpsock_user.c | 5 +----
samples/bpf/xsk_fwd.c | 5 +----
3 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/samples/bpf/xdpsock_ctrl_proc.c b/samples/bpf/xdpsock_ctrl_proc.c
index 28b5f2a9fa08..964fb3f9c12b 100644
--- a/samples/bpf/xdpsock_ctrl_proc.c
+++ b/samples/bpf/xdpsock_ctrl_proc.c
@@ -12,12 +12,9 @@
#include <unistd.h>
#include <bpf/bpf.h>
-#include <bpf/xsk.h>
+#include <xdp/xsk.h>
#include "xdpsock.h"
-/* libbpf APIs for AF_XDP are deprecated starting from v0.7 */
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
static const char *opt_if = "";
static struct option long_options[] = {
diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c
index 3ea46c300df2..9231bfadf419 100644
--- a/samples/bpf/xdpsock_user.c
+++ b/samples/bpf/xdpsock_user.c
@@ -33,13 +33,10 @@
#include <sched.h>
#include <bpf/libbpf.h>
-#include <bpf/xsk.h>
+#include <xdp/xsk.h>
#include <bpf/bpf.h>
#include "xdpsock.h"
-/* libbpf APIs for AF_XDP are deprecated starting from v0.7 */
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
#ifndef SOL_XDP
#define SOL_XDP 283
#endif
diff --git a/samples/bpf/xsk_fwd.c b/samples/bpf/xsk_fwd.c
index 2324e18ccc7e..946d29dd2a9e 100644
--- a/samples/bpf/xsk_fwd.c
+++ b/samples/bpf/xsk_fwd.c
@@ -23,12 +23,9 @@
#include <linux/if_xdp.h>
#include <bpf/libbpf.h>
-#include <bpf/xsk.h>
+#include <xdp/xsk.h>
#include <bpf/bpf.h>
-/* libbpf APIs for AF_XDP are deprecated starting from v0.7 */
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
typedef __u64 u64;
--
2.35.1
Powered by blists - more mailing lists