From: Mike Maloney <maloneykernel@gmail.com>
To: netdev@vger.kernel.org, davem@davemloft.net
Cc: Mike Maloney <maloney@google.com>
Subject: [PATCH netnext 1/3] selftests/net: cleanup unused parameter in psock_fanout
Date: Thu, 20 Apr 2017 15:25:44 -0400 [thread overview]
Message-ID: <20170420192546.5567-2-maloneykernel@gmail.com> (raw)
In-Reply-To: <20170420192546.5567-1-maloneykernel@gmail.com>
From: Mike Maloney <maloney@google.com>
sock_fanout_open no longer sets the size of packet_socket ring, so stop
passing the parameter.
Tested:
Built and ran the test, it passed.
Signed-off-by: Mike Maloney <maloney@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
---
tools/testing/selftests/net/psock_fanout.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tools/testing/selftests/net/psock_fanout.c b/tools/testing/selftests/net/psock_fanout.c
index 412459369686..b475d87d3aa3 100644
--- a/tools/testing/selftests/net/psock_fanout.c
+++ b/tools/testing/selftests/net/psock_fanout.c
@@ -71,7 +71,7 @@
/* Open a socket in a given fanout mode.
* @return -1 if mode is bad, a valid socket otherwise */
-static int sock_fanout_open(uint16_t typeflags, int num_packets)
+static int sock_fanout_open(uint16_t typeflags)
{
int fd, val;
@@ -210,7 +210,7 @@ static void test_control_single(void)
fprintf(stderr, "test: control single socket\n");
if (sock_fanout_open(PACKET_FANOUT_ROLLOVER |
- PACKET_FANOUT_FLAG_ROLLOVER, 0) != -1) {
+ PACKET_FANOUT_FLAG_ROLLOVER) != -1) {
fprintf(stderr, "ERROR: opened socket with dual rollover\n");
exit(1);
}
@@ -223,26 +223,26 @@ static void test_control_group(void)
fprintf(stderr, "test: control multiple sockets\n");
- fds[0] = sock_fanout_open(PACKET_FANOUT_HASH, 20);
+ fds[0] = sock_fanout_open(PACKET_FANOUT_HASH);
if (fds[0] == -1) {
fprintf(stderr, "ERROR: failed to open HASH socket\n");
exit(1);
}
if (sock_fanout_open(PACKET_FANOUT_HASH |
- PACKET_FANOUT_FLAG_DEFRAG, 10) != -1) {
+ PACKET_FANOUT_FLAG_DEFRAG) != -1) {
fprintf(stderr, "ERROR: joined group with wrong flag defrag\n");
exit(1);
}
if (sock_fanout_open(PACKET_FANOUT_HASH |
- PACKET_FANOUT_FLAG_ROLLOVER, 10) != -1) {
+ PACKET_FANOUT_FLAG_ROLLOVER) != -1) {
fprintf(stderr, "ERROR: joined group with wrong flag ro\n");
exit(1);
}
- if (sock_fanout_open(PACKET_FANOUT_CPU, 10) != -1) {
+ if (sock_fanout_open(PACKET_FANOUT_CPU) != -1) {
fprintf(stderr, "ERROR: joined group with wrong mode\n");
exit(1);
}
- fds[1] = sock_fanout_open(PACKET_FANOUT_HASH, 20);
+ fds[1] = sock_fanout_open(PACKET_FANOUT_HASH);
if (fds[1] == -1) {
fprintf(stderr, "ERROR: failed to join group\n");
exit(1);
@@ -263,8 +263,8 @@ static int test_datapath(uint16_t typeflags, int port_off,
fprintf(stderr, "test: datapath 0x%hx\n", typeflags);
- fds[0] = sock_fanout_open(typeflags, 20);
- fds[1] = sock_fanout_open(typeflags, 20);
+ fds[0] = sock_fanout_open(typeflags);
+ fds[1] = sock_fanout_open(typeflags);
if (fds[0] == -1 || fds[1] == -1) {
fprintf(stderr, "ERROR: failed open\n");
exit(1);
--
2.12.2.816.g2cccc81164-goog
next prev parent reply other threads:[~2017-04-20 19:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-20 19:25 [PATCH netnext 0/3] packet: Add option to create new fanout group with unique id Mike Maloney
2017-04-20 19:25 ` Mike Maloney [this message]
2017-04-20 19:25 ` [PATCH netnext 3/3] selftests/net: add tests for PACKET_FANOUT_FLAG_UNIQUEID Mike Maloney
2017-04-21 14:59 ` [PATCH netnext 0/3] packet: Add option to create new fanout group with unique id Willem de Bruijn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170420192546.5567-2-maloneykernel@gmail.com \
--to=maloneykernel@gmail.com \
--cc=davem@davemloft.net \
--cc=maloney@google.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).