Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebieder...
[sfrench/cifs-2.6.git] / samples / bpf / xdp_redirect_cpu_user.c
index 35fec9fecb57c3cae6cfcd9104bdf11a3f5ae50d..23744a8aaf2160ad3c435df973f0ba5cec59917d 100644 (file)
@@ -26,7 +26,7 @@ static const char *__doc__ =
 
 /* Wanted to get rid of bpf_load.h and fake-"libbpf.h" (and instead
  * use bpf/libbpf.h), but cannot as (currently) needed for XDP
- * attaching to a device via set_link_xdp_fd()
+ * attaching to a device via bpf_set_link_xdp_fd()
  */
 #include "libbpf.h"
 #include "bpf_load.h"
@@ -67,7 +67,7 @@ static void int_exit(int sig)
                "Interrupted: Removing XDP program on ifindex:%d device:%s\n",
                ifindex, ifname);
        if (ifindex > -1)
-               set_link_xdp_fd(ifindex, -1, xdp_flags);
+               bpf_set_link_xdp_fd(ifindex, -1, xdp_flags);
        exit(EXIT_OK);
 }
 
@@ -682,7 +682,7 @@ int main(int argc, char **argv)
        /* Remove XDP program when program is interrupted */
        signal(SIGINT, int_exit);
 
-       if (set_link_xdp_fd(ifindex, prog_fd[prog_num], xdp_flags) < 0) {
+       if (bpf_set_link_xdp_fd(ifindex, prog_fd[prog_num], xdp_flags) < 0) {
                fprintf(stderr, "link set xdp fd failed\n");
                return EXIT_FAIL_XDP;
        }