From patchwork Thu Nov 15 22:36:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 998581 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=networkplumber.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="WsRivGMm"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42wx7H1gnxz9s9h for ; Fri, 16 Nov 2018 09:36:59 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389042AbeKPIqk (ORCPT ); Fri, 16 Nov 2018 03:46:40 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:39574 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389029AbeKPIqj (ORCPT ); Fri, 16 Nov 2018 03:46:39 -0500 Received: by mail-pg1-f193.google.com with SMTP id r9-v6so9649509pgv.6 for ; Thu, 15 Nov 2018 14:36:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GhPBM9c+Hm0ZHIt/nSZD62SBaFFSjNa/2eLtvimxF9w=; b=WsRivGMmZ4DAKCeoLwy93es7ex3HwWx6GojzxTLuvL4cT9yH4j7lnKNKS9EUodGL3N eAHuHz9PPP/JQnpIpipA5fSnn+979cjXMxs4cdHGTuPu/NumOZypzwR1hq9MDIW4h/pW pELux7IZYNSmsfYXef2EGs6IJ8BRLDPHZpLDpDFGpczGe84elkfCg5vUrvqKal2XV2b+ A6JSbtcvGpyWYGJu3AOQ5P56iaTNBaX5VZpozt09q31XaALfDrZ2X3Wz7447DufLQfzQ bF/OwHgyKp49W1hpNFZ+4VBUYTL5tUXh6XNLRjLeDDPiRltciPeuBreur3iDOnPZXTX+ ckBw== 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=GhPBM9c+Hm0ZHIt/nSZD62SBaFFSjNa/2eLtvimxF9w=; b=t5S+nL5hqyg56aZ/ZStdrHwZkzHm8Dgekg0Yy5R9yv6mfyU3hHiQ522wJZj6pD9N0o sq7fhlUMzj5Ud/AF6jH2L1SeFTgN/MPgUesJ61XZe22gSsX2IQAN1RTtlcHMwhpQXUpx rRhSujfMxiugx6d06fD/D3UFqcTZjNxPXOUmLE21SUJg2NBThHwt+30eVMaf3KlFMQkt 9gpx0guWPJHONv7VehtKRwSrIkCSY+zInIZpjxHmAdzriwBUQpSnyNuQRWs5C0buhIxJ gaQ97Dc8WHYAdVyinc+7R1O/JFoU/4da2MCL2qB7lSUNFjYzf2RYPa+ZWHUfS7w11KB7 G7BQ== X-Gm-Message-State: AGRZ1gJ5r9sXkvFX6XHBcmtmVzaRu9asIv/hO5IrJTGrzyKpX6tNS/VC oEfvyBG+FdgXlBNk7zlQZPWynK25JR4KeA== X-Google-Smtp-Source: AJdET5fks1IAMtcLHfsoqJs4KYeFoKFUkMif1/3E9zBepGbR06hDdLwHAKjMDXLKhbXB+PV9/KB/GA== X-Received: by 2002:a63:4706:: with SMTP id u6mr7143896pga.95.1542321414863; Thu, 15 Nov 2018 14:36:54 -0800 (PST) Received: from localhost.localdomain ([64.114.255.97]) by smtp.gmail.com with ESMTPSA id c23-v6sm30580084pfn.95.2018.11.15.14.36.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Nov 2018 14:36:54 -0800 (PST) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2 14/22] tc/police: make print_police static Date: Thu, 15 Nov 2018 14:36:32 -0800 Message-Id: <20181115223640.411-15-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181115223640.411-1-stephen@networkplumber.org> References: <20181115223640.411-1-stephen@networkplumber.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org print_police function only used by m_police. Signed-off-by: Stephen Hemminger --- tc/m_police.c | 10 +++++++--- tc/tc_util.h | 3 --- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tc/m_police.c b/tc/m_police.c index f3b07f7b0439..d645999ba08b 100644 --- a/tc/m_police.c +++ b/tc/m_police.c @@ -25,6 +25,10 @@ #include "utils.h" #include "tc_util.h" +static int act_parse_police(struct action_util *a, int *argc_p, + char ***argv_p, int tca_id, struct nlmsghdr *n); +static int print_police(struct action_util *a, FILE *f, struct rtattr *tb); + struct action_util police_action_util = { .id = "police", .parse_aopt = act_parse_police, @@ -50,8 +54,8 @@ static void explain1(char *arg) fprintf(stderr, "Illegal \"%s\"\n", arg); } -int act_parse_police(struct action_util *a, int *argc_p, char ***argv_p, - int tca_id, struct nlmsghdr *n) +static int act_parse_police(struct action_util *a, int *argc_p, char ***argv_p, + int tca_id, struct nlmsghdr *n) { int argc = *argc_p; char **argv = *argv_p; @@ -256,7 +260,7 @@ int parse_police(int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n) return act_parse_police(NULL, argc_p, argv_p, tca_id, n); } -int print_police(struct action_util *a, FILE *f, struct rtattr *arg) +static int print_police(struct action_util *a, FILE *f, struct rtattr *arg) { SPRINT_BUF(b1); SPRINT_BUF(b2); diff --git a/tc/tc_util.h b/tc/tc_util.h index 76fd986d6e4c..e22c6da25696 100644 --- a/tc/tc_util.h +++ b/tc/tc_util.h @@ -117,9 +117,6 @@ int parse_action_control_slash(int *argc_p, char ***argv_p, int *result1_p, int *result2_p, bool allow_num); void print_action_control(FILE *f, const char *prefix, int action, const char *suffix); -int act_parse_police(struct action_util *a, int *argc_p, - char ***argv_p, int tca_id, struct nlmsghdr *n); -int print_police(struct action_util *a, FILE *f, struct rtattr *tb); int police_print_xstats(struct action_util *a, FILE *f, struct rtattr *tb); int tc_print_action(FILE *f, const struct rtattr *tb, unsigned short tot_acts); int tc_print_ipt(FILE *f, const struct rtattr *tb);