diff options
author | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
commit | 05e97a9eda72d58dba293857df6aac62584ef99a (patch) | |
tree | e86e692f26d4879ff2210c54722e2b7780210249 /samples/bpf/xdp1_user.c | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
parent | d4ed3b9015b5eebc90d629579d9e7944607cbae5 (diff) |
Merge tag 'nand/fixes-for-4.12-rc3' of git://git.infradead.org/linux-mtd into MTD
From Boris:
"""
This pull request contains several fixes to the core and the tango
driver.
tango fixes:
* Add missing MODULE_DEVICE_TABLE() in tango_nand.c
* Update the number of corrected bitflips
core fixes:
* Fix a long standing memory leak in nand_scan_tail()
* Fix several bugs introduced by the per-vendor init/detection
infrastructure (introduced in 4.12)
* Add a static specifier to nand_ooblayout_lp_hamming_ops definition
"""
Diffstat (limited to 'samples/bpf/xdp1_user.c')
-rw-r--r-- | samples/bpf/xdp1_user.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/samples/bpf/xdp1_user.c b/samples/bpf/xdp1_user.c index 378850c70eb8..2431c0321b71 100644 --- a/samples/bpf/xdp1_user.c +++ b/samples/bpf/xdp1_user.c | |||
@@ -62,13 +62,14 @@ static void usage(const char *prog) | |||
62 | fprintf(stderr, | 62 | fprintf(stderr, |
63 | "usage: %s [OPTS] IFINDEX\n\n" | 63 | "usage: %s [OPTS] IFINDEX\n\n" |
64 | "OPTS:\n" | 64 | "OPTS:\n" |
65 | " -S use skb-mode\n", | 65 | " -S use skb-mode\n" |
66 | " -N enforce native mode\n", | ||
66 | prog); | 67 | prog); |
67 | } | 68 | } |
68 | 69 | ||
69 | int main(int argc, char **argv) | 70 | int main(int argc, char **argv) |
70 | { | 71 | { |
71 | const char *optstr = "S"; | 72 | const char *optstr = "SN"; |
72 | char filename[256]; | 73 | char filename[256]; |
73 | int opt; | 74 | int opt; |
74 | 75 | ||
@@ -77,6 +78,9 @@ int main(int argc, char **argv) | |||
77 | case 'S': | 78 | case 'S': |
78 | xdp_flags |= XDP_FLAGS_SKB_MODE; | 79 | xdp_flags |= XDP_FLAGS_SKB_MODE; |
79 | break; | 80 | break; |
81 | case 'N': | ||
82 | xdp_flags |= XDP_FLAGS_DRV_MODE; | ||
83 | break; | ||
80 | default: | 84 | default: |
81 | usage(basename(argv[0])); | 85 | usage(basename(argv[0])); |
82 | return 1; | 86 | return 1; |
@@ -102,6 +106,7 @@ int main(int argc, char **argv) | |||
102 | } | 106 | } |
103 | 107 | ||
104 | signal(SIGINT, int_exit); | 108 | signal(SIGINT, int_exit); |
109 | signal(SIGTERM, int_exit); | ||
105 | 110 | ||
106 | if (set_link_xdp_fd(ifindex, prog_fd[0], xdp_flags) < 0) { | 111 | if (set_link_xdp_fd(ifindex, prog_fd[0], xdp_flags) < 0) { |
107 | printf("link set xdp fd failed\n"); | 112 | printf("link set xdp fd failed\n"); |