aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMike Maloney <maloney@google.com>2017-04-21 10:56:10 -0400
committerDavid S. Miller <davem@davemloft.net>2017-04-24 12:46:00 -0400
commit2e7a721714b9cdca539da78a0eb1f59dbe4020ac (patch)
tree20fb646c29611669e99c110b0d3b44cf7e4423e2 /tools
parent69226896ad636b94f6d2e55d75ff21a29c4de83b (diff)
selftests/net: cleanup unused parameter in psock_fanout
sock_fanout_open no longer sets the size of packet_socket ring, so stop passing the parameter. Signed-off-by: Mike Maloney <maloney@google.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/net/psock_fanout.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/testing/selftests/net/psock_fanout.c b/tools/testing/selftests/net/psock_fanout.c
index e62bb354820c..27c4027fab03 100644
--- a/tools/testing/selftests/net/psock_fanout.c
+++ b/tools/testing/selftests/net/psock_fanout.c
@@ -71,7 +71,7 @@
71 71
72/* Open a socket in a given fanout mode. 72/* Open a socket in a given fanout mode.
73 * @return -1 if mode is bad, a valid socket otherwise */ 73 * @return -1 if mode is bad, a valid socket otherwise */
74static int sock_fanout_open(uint16_t typeflags, int num_packets) 74static int sock_fanout_open(uint16_t typeflags)
75{ 75{
76 int fd, val; 76 int fd, val;
77 77
@@ -228,7 +228,7 @@ static void test_control_single(void)
228 fprintf(stderr, "test: control single socket\n"); 228 fprintf(stderr, "test: control single socket\n");
229 229
230 if (sock_fanout_open(PACKET_FANOUT_ROLLOVER | 230 if (sock_fanout_open(PACKET_FANOUT_ROLLOVER |
231 PACKET_FANOUT_FLAG_ROLLOVER, 0) != -1) { 231 PACKET_FANOUT_FLAG_ROLLOVER) != -1) {
232 fprintf(stderr, "ERROR: opened socket with dual rollover\n"); 232 fprintf(stderr, "ERROR: opened socket with dual rollover\n");
233 exit(1); 233 exit(1);
234 } 234 }
@@ -241,26 +241,26 @@ static void test_control_group(void)
241 241
242 fprintf(stderr, "test: control multiple sockets\n"); 242 fprintf(stderr, "test: control multiple sockets\n");
243 243
244 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 20); 244 fds[0] = sock_fanout_open(PACKET_FANOUT_HASH);
245 if (fds[0] == -1) { 245 if (fds[0] == -1) {
246 fprintf(stderr, "ERROR: failed to open HASH socket\n"); 246 fprintf(stderr, "ERROR: failed to open HASH socket\n");
247 exit(1); 247 exit(1);
248 } 248 }
249 if (sock_fanout_open(PACKET_FANOUT_HASH | 249 if (sock_fanout_open(PACKET_FANOUT_HASH |
250 PACKET_FANOUT_FLAG_DEFRAG, 10) != -1) { 250 PACKET_FANOUT_FLAG_DEFRAG) != -1) {
251 fprintf(stderr, "ERROR: joined group with wrong flag defrag\n"); 251 fprintf(stderr, "ERROR: joined group with wrong flag defrag\n");
252 exit(1); 252 exit(1);
253 } 253 }
254 if (sock_fanout_open(PACKET_FANOUT_HASH | 254 if (sock_fanout_open(PACKET_FANOUT_HASH |
255 PACKET_FANOUT_FLAG_ROLLOVER, 10) != -1) { 255 PACKET_FANOUT_FLAG_ROLLOVER) != -1) {
256 fprintf(stderr, "ERROR: joined group with wrong flag ro\n"); 256 fprintf(stderr, "ERROR: joined group with wrong flag ro\n");
257 exit(1); 257 exit(1);
258 } 258 }
259 if (sock_fanout_open(PACKET_FANOUT_CPU, 10) != -1) { 259 if (sock_fanout_open(PACKET_FANOUT_CPU) != -1) {
260 fprintf(stderr, "ERROR: joined group with wrong mode\n"); 260 fprintf(stderr, "ERROR: joined group with wrong mode\n");
261 exit(1); 261 exit(1);
262 } 262 }
263 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 20); 263 fds[1] = sock_fanout_open(PACKET_FANOUT_HASH);
264 if (fds[1] == -1) { 264 if (fds[1] == -1) {
265 fprintf(stderr, "ERROR: failed to join group\n"); 265 fprintf(stderr, "ERROR: failed to join group\n");
266 exit(1); 266 exit(1);
@@ -281,8 +281,8 @@ static int test_datapath(uint16_t typeflags, int port_off,
281 281
282 fprintf(stderr, "test: datapath 0x%hx\n", typeflags); 282 fprintf(stderr, "test: datapath 0x%hx\n", typeflags);
283 283
284 fds[0] = sock_fanout_open(typeflags, 20); 284 fds[0] = sock_fanout_open(typeflags);
285 fds[1] = sock_fanout_open(typeflags, 20); 285 fds[1] = sock_fanout_open(typeflags);
286 if (fds[0] == -1 || fds[1] == -1) { 286 if (fds[0] == -1 || fds[1] == -1) {
287 fprintf(stderr, "ERROR: failed open\n"); 287 fprintf(stderr, "ERROR: failed open\n");
288 exit(1); 288 exit(1);