From patchwork Thu Apr 20 19:25:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Maloney X-Patchwork-Id: 752983 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3w88411qk5z9s78 for ; Fri, 21 Apr 2017 05:26:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pAoom9v/"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S947036AbdDTT0G (ORCPT ); Thu, 20 Apr 2017 15:26:06 -0400 Received: from mail-yw0-f196.google.com ([209.85.161.196]:34246 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S946975AbdDTT0E (ORCPT ); Thu, 20 Apr 2017 15:26:04 -0400 Received: by mail-yw0-f196.google.com with SMTP id u70so6892959ywe.1 for ; Thu, 20 Apr 2017 12:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=R/78Z0qSh2v3t2hR1bm2w43JvemVysr3W0+NfpEdXE4=; b=pAoom9v/FzMmiw7Cdn9XDgAB2BTRIw4XPAhfAUpEgeVCzfMxW9AOV+Hao9nLCRfaBa XChru+y2/x49g2pKkocaLpFYnG4Qsz6bC2ePT5m1ekqKEorE9qMY+9BFkasHg7N6wjfW p795D1h/dWIomtvXNR2EYSZg1ANBndlpT7xOSiHxQAUs20iFPZs2yj4JrttCnSyc4Gm1 w/py1qORB4Z/uLHtizqDNkj6WOJ3Ac6rOtS2zKKgLB8nnjsDK4z+wK28nojT8i7S46/s mihAk8C3F2+Bp4r8T+MBJh849uaB0SzWiHivq8TI/siAPYRefQyMcBoMa9LyRi+DU83P PeDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=R/78Z0qSh2v3t2hR1bm2w43JvemVysr3W0+NfpEdXE4=; b=HPFVLK45ZPrnVdgVa6C1CtKw4K2KgxRhcq0i5Guyr+kxT8XNeIXnRuJ/yhjnLE5rFe yOw1mPJUYJp+Hfc64iNiP3kGyiFu13y7TMRRqeuwun/disLRMkBbgOGbMmD+MeawwwIM Kink6iPizhXN5ZUs96Nj7bMbsUHpHE2n7CEH7NrOXXrDA1qcUBxDSXPVcp2065J/zeEU 6IaMapacxkB6tLvyWSsOtVhkIu8EqV8UzwfRnrKd05YRiwcYwq+rrt3qfbbNssoW7wWV /zURuTcUvQXaayuBf/kO1IZdrL1TFqUfuDmw/8OAUEyaaSv3XlFsrRr1fNMjBW+JcsH4 lzIA== X-Gm-Message-State: AN3rC/4mshPy6pnlLN+61uoPJXyqiFPURwqasBgQ3/IDBQOQTbiChFQY CjFZfM3xIbCncg== X-Received: by 10.13.200.135 with SMTP id k129mr8012938ywd.40.1492716363724; Thu, 20 Apr 2017 12:26:03 -0700 (PDT) Received: from mjam-cloud.hot.corp.google.com ([100.109.172.144]) by smtp.gmail.com with ESMTPSA id k188sm2942998ywf.70.2017.04.20.12.26.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Apr 2017 12:26:02 -0700 (PDT) From: Mike Maloney To: netdev@vger.kernel.org, davem@davemloft.net Cc: Mike Maloney Subject: [PATCH netnext 1/3] selftests/net: cleanup unused parameter in psock_fanout Date: Thu, 20 Apr 2017 15:25:44 -0400 Message-Id: <20170420192546.5567-2-maloneykernel@gmail.com> X-Mailer: git-send-email 2.12.2.816.g2cccc81164-goog In-Reply-To: <20170420192546.5567-1-maloneykernel@gmail.com> References: <20170420192546.5567-1-maloneykernel@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Mike Maloney 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 Acked-by: Willem de Bruijn --- 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);