From patchwork Thu Jan 16 04:36:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Po-Hsu Lin X-Patchwork-Id: 1224002 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47yrxw4xv0z9sRX; Thu, 16 Jan 2020 15:36:52 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1irwtk-0000Qg-C7; Thu, 16 Jan 2020 04:36:48 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1irwti-0000Py-Kc for kernel-team@lists.ubuntu.com; Thu, 16 Jan 2020 04:36:46 +0000 Received: from mail-pl1-f198.google.com ([209.85.214.198]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1irwti-0007LC-7C for kernel-team@lists.ubuntu.com; Thu, 16 Jan 2020 04:36:46 +0000 Received: by mail-pl1-f198.google.com with SMTP id g16so8103608plo.14 for ; Wed, 15 Jan 2020 20:36:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=AxaoWdV8VDzAb02gOKje5+Bue4D29nJgauxgw/yDFrk=; b=nCj5J3wf4a8ro3c6aeXQCRBh1M27h5aIzMn3tUkCuYrXK7TvHzm4T8OVYsq8t3SvG/ uF71JkZXqQUSPwYG6rs1QrrURYWhXXnC52zVDTtaIMM6vQtzFFThBxprPLcqI4FC7are PqugZocQ1cctRgV1JZtVt5kk7ICK3hkGx6zJZXE+SOp/EeXICnKaMnLhgd+5s2w6NABl LkdLmObqBuUNKCjr7SKOosRAaJyhgaKUrHRS4oDt/uwrWJPPjFSLRL1Qx8gGPh/rV1rV kFeTeLButAk+xpQVSKw//JZ6K4qsHmnPdmurDXcc4DjIfs2C2o5rztwNmPsYOCwZwViu GmDA== X-Gm-Message-State: APjAAAVy/SeEXT8ECopC67zPY0M5ZMXRNuarAPbb6vpqnFFNU3wEWIcI ZzGXgjIpRWne/pV25vVmKGCs3Q/QCc0t33hdYOXyyntypwYAlg+0XWz1pz86v1jNEkHbD5HRql6 lVhyGyxX7VAsXq6H1gtrAtm2HEzBgwVCsal1PXjc0 X-Received: by 2002:a17:902:9a95:: with SMTP id w21mr29799818plp.91.1579149404648; Wed, 15 Jan 2020 20:36:44 -0800 (PST) X-Google-Smtp-Source: APXvYqyxRGSOH9CqQMJBK6MAOu9kKDOjol5EJPRl00dqeueLmkGIUgxVLQRssdrnT6FiamsE3G/cgQ== X-Received: by 2002:a17:902:9a95:: with SMTP id w21mr29799789plp.91.1579149404183; Wed, 15 Jan 2020 20:36:44 -0800 (PST) Received: from Leggiero.taipei.internal (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id r28sm22008193pgk.39.2020.01.15.20.36.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2020 20:36:43 -0800 (PST) From: Po-Hsu Lin To: kernel-team@lists.ubuntu.com Subject: [Xenial][SRU][PATCH 1/2] selftests/net: cleanup unused parameter in psock_fanout Date: Thu, 16 Jan 2020 12:36:30 +0800 Message-Id: <20200116043631.13296-3-po-hsu.lin@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200116043631.13296-1-po-hsu.lin@canonical.com> References: <20200116043631.13296-1-po-hsu.lin@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Mike Maloney BugLink: https://bugs.launchpad.net/bugs/1853375 sock_fanout_open no longer sets the size of packet_socket ring, so stop passing the parameter. Signed-off-by: Mike Maloney Acked-by: Willem de Bruijn Signed-off-by: David S. Miller (cherry picked from commit 2e7a721714b9cdca539da78a0eb1f59dbe4020ac) Signed-off-by: Po-Hsu Lin --- 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 9b654a0..57c8258 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; @@ -211,7 +211,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); } @@ -224,26 +224,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); @@ -264,8 +264,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);