From patchwork Sat Apr 13 22:04:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13628805 X-Patchwork-Delegate: dsahern@gmail.com Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10AB256B66 for ; Sat, 13 Apr 2024 22:05:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045930; cv=none; b=AMdoyGlAKZEWaJnCVFG9tVltFHC73yewapfc8C7BOJI92suSvOCKgYG8Z5UXqqxI6bwUyQmUWeuB49epMv4tHxUiRcRrcdJxias+gO/Q6XA1oybhSRZWre+Bm1kcVBn+50khBvojRhlHML5V1goIORPuUgSi7BQplN0QSWjtwSg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045930; c=relaxed/simple; bh=zOuW04K6nU2M6/O+pQx+VAURU/cCrgRvJXjFIlrCI20=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hbAbpuE7ulTV7LhhOABSekMFdPCiazdlMJFH+g3HBfRdgGZzd6keKlBFyA0GptUnuaGdL+ozuF8NpHjD7hzjCoXkGnRVVrRruAc1cpnduVjHJ+NNYTiqethqTHqvS7RcH45XtH2tct4Km9fgpyFT4eNZWFLz5UGV/WMWshr+f18= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b=iLV7gb9P; arc=none smtp.client-ip=209.85.210.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="iLV7gb9P" Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6ee0642f718so1630212b3a.0 for ; Sat, 13 Apr 2024 15:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713045928; x=1713650728; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XsQvzsw2W1zaLCAxBLZHIkfzakye2H14iWudFAXI19g=; b=iLV7gb9PxfZ4vHdArE0OfUlBbKuz+H4008tZ6Stf9OrTE08nuJ2s+B0X10BxhvrFjg ULjNw6XcqpPKZ72+d+kTq7hq6pHk/N3vNMYW7HCQ4TIDHM6WO+i5NyCi9DXsFC8P24qB S5TrOOcqtyyMPvMVOQQx9ETgQRuMJdcC2PsihjMWZL87gK/p4qrhtJt/3aZrHDFBvMgF LrLTK8gqejLrS5d6LyQaMDP6Om+EXtnlQDlIG4wPf5I2CLESQz8QyXSXGf/cqJTcr6zZ jxyXCwhML6SJLSoA1zS0pegcsWxKrtBHzuVgbH8IttGlsxp9GrtMc+3qJVxlnbtjHcj2 YApw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713045928; x=1713650728; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XsQvzsw2W1zaLCAxBLZHIkfzakye2H14iWudFAXI19g=; b=XtCa6W5dOzzmRxGpdggVhpFFCX0iXiKUfgi8TeXTgHAVswESihBkvHgfRTvbiVtg6i IZY1uPq6JgAj11CT3ghUNOJLJzmxGzo4zhiuvh2Zm4b2S4iGSGRmfsM+a+PmyHLWtjyt wCGyDRrfBlpctd+DXJpcSDfMcPheiHi1eD8TqtAcwmhEfSRgNaLgg0h6lpo2A+fWuP/L HmE3HZslv6VTE3vPAJZJlI6DJiRtl3RIMEShcuReRh+CTX+A0gd1oI0wMGe3DX0Bz+oT 4xWRVHiQDugEaV26Ts7wfvQnzyOXbU6S+l4wlrjip/eoL9J1JytS01LaJRWhhBDNdyG7 5HwA== X-Gm-Message-State: AOJu0YwCbRmRDIPg9ZecNepn7TM34ixH72GqiWapiB3GNG0p5Mw2rXF8 EIhcgwTjQ2IMExE3PbYqgCv3Ah6oHoIRRTcBpJDIb7eb6NwZWZc62G6Bq4SXuxBHUYVyVcCgSJs q X-Google-Smtp-Source: AGHT+IGdNKuZo6/Y9X7rCFh7oPCZ3oQHqxJVpWnvVQOieREnjnaH3nB+EpnM08sSpKNSu9Fjpd9K2g== X-Received: by 2002:a17:903:2443:b0:1e5:62:7a81 with SMTP id l3-20020a170903244300b001e500627a81mr8503603pls.22.1713045928177; Sat, 13 Apr 2024 15:05:28 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id x16-20020a170902ec9000b001e3fe207a15sm5008082plg.138.2024.04.13.15.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 15:05:27 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2-next 1/7] tc/u32: remove FILE argument Date: Sat, 13 Apr 2024 15:04:02 -0700 Message-ID: <20240413220516.7235-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240413220516.7235-1-stephen@networkplumber.org> References: <20240413220516.7235-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: dsahern@gmail.com The pretty printing routines no longer use the file handle. Signed-off-by: Stephen Hemminger --- tc/f_u32.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tc/f_u32.c b/tc/f_u32.c index 8a241310..f8e1ff6e 100644 --- a/tc/f_u32.c +++ b/tc/f_u32.c @@ -820,7 +820,7 @@ static int parse_hashkey(int *argc_p, char ***argv_p, struct tc_u32_sel *sel) return 0; } -static void print_ipv4(FILE *f, const struct tc_u32_key *key) +static void print_ipv4(const struct tc_u32_key *key) { char abuf[256]; @@ -895,7 +895,7 @@ static void print_ipv4(FILE *f, const struct tc_u32_key *key) close_json_object(); } -static void print_ipv6(FILE *f, const struct tc_u32_key *key) +static void print_ipv6(const struct tc_u32_key *key) { char abuf[256]; @@ -971,7 +971,7 @@ static void print_ipv6(FILE *f, const struct tc_u32_key *key) close_json_object(); } -static void print_raw(FILE *f, const struct tc_u32_key *key) +static void print_raw(const struct tc_u32_key *key) { open_json_object("match"); print_nl(); @@ -985,14 +985,14 @@ static void print_raw(FILE *f, const struct tc_u32_key *key) static const struct { __u16 proto; __u16 pad; - void (*pprinter)(FILE *f, const struct tc_u32_key *key); + void (*pprinter)(const struct tc_u32_key *key); } u32_pprinters[] = { {0, 0, print_raw}, {ETH_P_IP, 0, print_ipv4}, {ETH_P_IPV6, 0, print_ipv6}, }; -static void show_keys(FILE *f, const struct tc_u32_key *key) +static void show_keys(const struct tc_u32_key *key) { int i = 0; @@ -1002,7 +1002,7 @@ static void show_keys(FILE *f, const struct tc_u32_key *key) for (i = 0; i < ARRAY_SIZE(u32_pprinters); i++) { if (u32_pprinters[i].proto == ntohs(f_proto)) { show_k: - u32_pprinters[i].pprinter(f, key); + u32_pprinters[i].pprinter(key); return; } } @@ -1333,7 +1333,7 @@ static int u32_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, int i; for (i = 0; i < sel->nkeys; i++) { - show_keys(f, sel->keys + i); + show_keys(sel->keys + i); if (show_stats && NULL != pf) print_u64(PRINT_ANY, "success", " (success %llu ) ", pf->kcnts[i]); From patchwork Sat Apr 13 22:04:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13628806 X-Patchwork-Delegate: dsahern@gmail.com Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF5B856B69 for ; Sat, 13 Apr 2024 22:05:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045931; cv=none; b=EsaaCW18uDl6++krzO5J3o5+b+zvkLmQxNXLNyMpouTit3GdUR1utGcE1fl8jTDzQN3DQCEiwIzfR7vs/K8ADKmPhhkhaJNAfEto7bH5pJhgow/XA8p4q1vNvuuXenxNrkEMmR4nwbH4bGMbtCQndeFIy8fX84yAsCwryUmUDpM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045931; c=relaxed/simple; bh=KdeV1kYDuRsVYgYBjLJ8A03xJofGS+/z4NHigM7ezaA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TSa9JVC8Z9sZOC5lIGMDGZVhTyCn2Hxkws5q8nRZe3SHA6TvH3d7xVb99sgVmNkBsGThYvLA2zSmC9TRuCdy9ovitWmvN/yLHOBkmn6Dcs8S51+EeqjOj/x20i85HJpth0kolDvNzAiHUZldbalRlfU6Rcib4w4lThsSIsd/Tlc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b=SkFm3JX2; arc=none smtp.client-ip=209.85.214.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="SkFm3JX2" Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1e411e339b8so16044025ad.3 for ; Sat, 13 Apr 2024 15:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713045929; x=1713650729; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Bnz0SHCH34wJqsNY0aYKG8143htnBJpUOYFCrCUHe2M=; b=SkFm3JX2SPrky1WgwAYOHOAB6tIbamDzSudT2kAEqQVszSNxtMqo6em7/1+M+861Kz QX/TESpUDwe9ReoTrSB0TF6+A30U3ukxPstAzeU2CDce+/f5sNThWNFLdq0wWl9e3Hsx Btu5zp/ooFAdPPnuggj0LruQbiHSgAfTVTqAcXo4xyC1qRXXIZrLmmitNCpVHexq6ijj LtWZNg8bVaNekc+AyB/IgLVL++4hbpY7Rhwi86NPEm4xen+gCoycU8+cDweP9MTlZOtg y3kOvk5l07i3s2mRWuMDNA9GwQCJpa2z6ApRBjIzQQvuvLlFTZ7sKx7qCHW5PiI0w8xr O1BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713045929; x=1713650729; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bnz0SHCH34wJqsNY0aYKG8143htnBJpUOYFCrCUHe2M=; b=lc8qCPVYnHXbLyqb4Nyq87NMt2bSdRY3iz3VDZLRHtpe6JpeONgg2zRrZEw7/LONXd ZcOJLmW2XPXpVZb/SwavDX2hH7aCApueTsQ++qlYyhfCJiLf2qTXNQ0tavhu8aIFCGc8 s6z99tZ4aLraqkyXvHH8k49Q1OSpRHzbI1Td52GlC78JFkz12nG/L/SjnlU3IrYMK9DV epLQNw3EndrqS+jMMrL7Ynpm4FAlIU5fTIvSfAabOIhvcvDyk3nhOf4weiMbYNvb7HiO c017w/iKBlFg6uXmVBsNzP5myqpeplm875SWHV7O4Q1XiRyDv8dzB2yZiEJIeBtZ11f1 pvDA== X-Gm-Message-State: AOJu0YyANoI1j7MjCsWSul03TeU73jbba6RSbqDYSvTW/i9zGqi7oOat F5WKqpbjEYHvUunTDFgcyJ0wQl7T9mSMg+iwm0Lws92FxYwC1eCwwivQ6dcxDS5WUc61VKP25ds O X-Google-Smtp-Source: AGHT+IEUBOKaYf5EAkHNKovfVBv2OgdII8V7NpPs68mYBdgxnJpL7QvOXRRlb4xbLseVVBDxDholCw== X-Received: by 2002:a17:902:b104:b0:1e5:3d8a:75fd with SMTP id q4-20020a170902b10400b001e53d8a75fdmr5888007plr.69.1713045928963; Sat, 13 Apr 2024 15:05:28 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id x16-20020a170902ec9000b001e3fe207a15sm5008082plg.138.2024.04.13.15.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 15:05:28 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2-next 2/7] tc/util: remove unused argument from print_tm Date: Sat, 13 Apr 2024 15:04:03 -0700 Message-ID: <20240413220516.7235-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240413220516.7235-1-stephen@networkplumber.org> References: <20240413220516.7235-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: dsahern@gmail.com File argument no longer used. Signed-off-by: Stephen Hemminger --- tc/m_bpf.c | 2 +- tc/m_connmark.c | 2 +- tc/m_csum.c | 2 +- tc/m_ct.c | 2 +- tc/m_ctinfo.c | 2 +- tc/m_gact.c | 2 +- tc/m_gate.c | 2 +- tc/m_ife.c | 2 +- tc/m_mirred.c | 2 +- tc/m_mpls.c | 2 +- tc/m_nat.c | 2 +- tc/m_pedit.c | 2 +- tc/m_police.c | 2 +- tc/m_sample.c | 2 +- tc/m_simple.c | 2 +- tc/m_skbedit.c | 2 +- tc/m_skbmod.c | 2 +- tc/m_tunnel_key.c | 2 +- tc/m_vlan.c | 2 +- tc/tc_util.c | 2 +- tc/tc_util.h | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tc/m_bpf.c b/tc/m_bpf.c index da50c05e..5cae51ba 100644 --- a/tc/m_bpf.c +++ b/tc/m_bpf.c @@ -200,7 +200,7 @@ static int bpf_print_opt(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_ACT_BPF_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_ACT_BPF_TM]); - print_tm(f, tm); + print_tm(tm); } } diff --git a/tc/m_connmark.c b/tc/m_connmark.c index 8506d95a..bd388665 100644 --- a/tc/m_connmark.c +++ b/tc/m_connmark.c @@ -123,7 +123,7 @@ static int print_connmark(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_CONNMARK_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_CONNMARK_TM]); - print_tm(f, tm); + print_tm(tm); } } print_nl(); diff --git a/tc/m_csum.c b/tc/m_csum.c index f5fe8f55..966ae18e 100644 --- a/tc/m_csum.c +++ b/tc/m_csum.c @@ -213,7 +213,7 @@ print_csum(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_CSUM_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_CSUM_TM]); - print_tm(f, tm); + print_tm(tm); } } print_nl(); diff --git a/tc/m_ct.c b/tc/m_ct.c index 8c471489..95098c88 100644 --- a/tc/m_ct.c +++ b/tc/m_ct.c @@ -534,7 +534,7 @@ static int print_ct(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_CT_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_CT_TM]); - print_tm(f, tm); + print_tm(tm); } } print_nl(); diff --git a/tc/m_ctinfo.c b/tc/m_ctinfo.c index 996a3621..606ab280 100644 --- a/tc/m_ctinfo.c +++ b/tc/m_ctinfo.c @@ -166,7 +166,7 @@ static void print_ctinfo_stats(FILE *f, struct rtattr *tb[TCA_CTINFO_MAX + 1]) if (tb[TCA_CTINFO_TM]) { tm = RTA_DATA(tb[TCA_CTINFO_TM]); - print_tm(f, tm); + print_tm(tm); } if (tb[TCA_CTINFO_STATS_DSCP_SET]) diff --git a/tc/m_gact.c b/tc/m_gact.c index 225ffce4..0d90963c 100644 --- a/tc/m_gact.c +++ b/tc/m_gact.c @@ -203,7 +203,7 @@ print_gact(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_GACT_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_GACT_TM]); - print_tm(f, tm); + print_tm(tm); } } print_nl(); diff --git a/tc/m_gate.c b/tc/m_gate.c index 37afa426..b2643ad8 100644 --- a/tc/m_gate.c +++ b/tc/m_gate.c @@ -527,7 +527,7 @@ static int print_gate(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_GATE_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_GATE_TM]); - print_tm(f, tm); + print_tm(tm); } } diff --git a/tc/m_ife.c b/tc/m_ife.c index 162607ce..f5b2d52d 100644 --- a/tc/m_ife.c +++ b/tc/m_ife.c @@ -315,7 +315,7 @@ static int print_ife(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_IFE_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_IFE_TM]); - print_tm(f, tm); + print_tm(tm); } } diff --git a/tc/m_mirred.c b/tc/m_mirred.c index 60bd9045..5e9856e0 100644 --- a/tc/m_mirred.c +++ b/tc/m_mirred.c @@ -348,7 +348,7 @@ print_mirred(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_MIRRED_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_MIRRED_TM]); - print_tm(f, tm); + print_tm(tm); } } print_nl(); diff --git a/tc/m_mpls.c b/tc/m_mpls.c index dda46805..a378e35e 100644 --- a/tc/m_mpls.c +++ b/tc/m_mpls.c @@ -283,7 +283,7 @@ static int print_mpls(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_MPLS_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_MPLS_TM]); - print_tm(f, tm); + print_tm(tm); } } diff --git a/tc/m_nat.c b/tc/m_nat.c index 95b35584..e4c74b08 100644 --- a/tc/m_nat.c +++ b/tc/m_nat.c @@ -179,7 +179,7 @@ print_nat(struct action_util *au, FILE * f, struct rtattr *arg) if (tb[TCA_NAT_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_NAT_TM]); - print_tm(f, tm); + print_tm(tm); } } diff --git a/tc/m_pedit.c b/tc/m_pedit.c index 32f03415..fc06d04b 100644 --- a/tc/m_pedit.c +++ b/tc/m_pedit.c @@ -801,7 +801,7 @@ static int print_pedit(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_PEDIT_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_PEDIT_TM]); - print_tm(f, tm); + print_tm(tm); } } open_json_array(PRINT_JSON, "keys"); diff --git a/tc/m_police.c b/tc/m_police.c index 46c39a81..d140c1eb 100644 --- a/tc/m_police.c +++ b/tc/m_police.c @@ -347,7 +347,7 @@ static int print_police(struct action_util *a, FILE *f, struct rtattr *arg) if (tb[TCA_POLICE_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_POLICE_TM]); - print_tm(f, tm); + print_tm(tm); } } print_nl(); diff --git a/tc/m_sample.c b/tc/m_sample.c index 769de144..36e4c1db 100644 --- a/tc/m_sample.c +++ b/tc/m_sample.c @@ -171,7 +171,7 @@ static int print_sample(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_SAMPLE_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_SAMPLE_TM]); - print_tm(f, tm); + print_tm(tm); } } print_nl(); diff --git a/tc/m_simple.c b/tc/m_simple.c index fe2bca21..a2366187 100644 --- a/tc/m_simple.c +++ b/tc/m_simple.c @@ -187,7 +187,7 @@ static int print_simple(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_DEF_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_DEF_TM]); - print_tm(f, tm); + print_tm(tm); } } print_nl(); diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c index d55a6128..00b245ee 100644 --- a/tc/m_skbedit.c +++ b/tc/m_skbedit.c @@ -250,7 +250,7 @@ static int print_skbedit(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_SKBEDIT_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_SKBEDIT_TM]); - print_tm(f, tm); + print_tm(tm); } } diff --git a/tc/m_skbmod.c b/tc/m_skbmod.c index b1c8d00d..c7a2ccd5 100644 --- a/tc/m_skbmod.c +++ b/tc/m_skbmod.c @@ -218,7 +218,7 @@ static int print_skbmod(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_SKBMOD_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_SKBMOD_TM]); - print_tm(f, tm); + print_tm(tm); } } diff --git a/tc/m_tunnel_key.c b/tc/m_tunnel_key.c index ff699cc8..e62f9118 100644 --- a/tc/m_tunnel_key.c +++ b/tc/m_tunnel_key.c @@ -742,7 +742,7 @@ static int print_tunnel_key(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_TUNNEL_KEY_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_TUNNEL_KEY_TM]); - print_tm(f, tm); + print_tm(tm); } } diff --git a/tc/m_vlan.c b/tc/m_vlan.c index c1dc8b42..31d3b06f 100644 --- a/tc/m_vlan.c +++ b/tc/m_vlan.c @@ -293,7 +293,7 @@ static int print_vlan(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_VLAN_TM]) { struct tcf_t *tm = RTA_DATA(tb[TCA_VLAN_TM]); - print_tm(f, tm); + print_tm(tm); } } diff --git a/tc/tc_util.c b/tc/tc_util.c index aa7cf60f..25c8d6b6 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -650,7 +650,7 @@ const char *get_clock_name(clockid_t clockid) return "invalid"; } -void print_tm(FILE *f, const struct tcf_t *tm) +void print_tm(const struct tcf_t *tm) { int hz = get_user_hz(); diff --git a/tc/tc_util.h b/tc/tc_util.h index 623d9888..152ef3e6 100644 --- a/tc/tc_util.h +++ b/tc/tc_util.h @@ -114,7 +114,7 @@ void print_action_control(FILE *f, const char *prefix, 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 parse_action(int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n); -void print_tm(FILE *f, const struct tcf_t *tm); +void print_tm(const struct tcf_t *tm); int prio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt); int cls_names_init(char *path); From patchwork Sat Apr 13 22:04:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13628808 X-Patchwork-Delegate: dsahern@gmail.com Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5822E56B85 for ; Sat, 13 Apr 2024 22:05:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045933; cv=none; b=BmLSIhzax1Uj0lp6umDSv7jMvKG/xwXtEhQcpGKmPzEuzQ+ZwYjsMhrH8rTFTX7c582X3l94Sm444839iHe7JJWHAWWwBW0hNfZqbmu4r0kwaSapjFWYUwAcaPFmj+IMx8m5X6zjtddVaDKhSWfj2Hn4QtPeM5lDwoBz+XaIs0A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045933; c=relaxed/simple; bh=ex/TK/QBRkAh8HQkH0wf94ThCtVC+tnXA1lrd/DBA0s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rn5a+gkTEvu2cKFfhn9NPLh9W8XnXUS24w9i9/VQnRKXCgr2qdwmfcWGo89zWOtGpOa8e0PTcB7hARjtHhwkK7MxuPwh184BUKkzBUehk3m3alDfEw5KFTD9p8d1/MdAJw34Q0CBBp3chZdYc6/Esf0jk+jwE/AXCfWmUg/4fHU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b=zR5F67Pv; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="zR5F67Pv" Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-6ee13f19e7eso1497736b3a.1 for ; Sat, 13 Apr 2024 15:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713045930; x=1713650730; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/KG0pi9cMDvzn7qBR5LlmuWI16FJF/UDqfeTzMUaA8E=; b=zR5F67PvBb3Hr0L+qDZjdaJdomk2DduPAzVkNZbYG0I6ZOJ/lss0XUD96zccttCJX9 iFF3X56/0+jzIiOQKianEtzy7s1QrvCVK+A+Mpju6AJEQ/qGXKEBGmLrCQOIN4SyYlQt 0OamqLONwYh4GclMmUn+YM+Z2662qfDPvestjATT4wOJXXlXtqKg8kdlOXD5WFgiwol1 zdtBs5caTpLNLzhdo6bZs+dgerxx3d5kwEVWLdHTdl2LsTCTKpJSaMkEBo22KKxqSNiK PQANHxH9YPODhs7T9L3Eh9CYX0h/gA+s8Rys+EqOLbc5y8S8UDc/c47Cum8iihiUXHMv 4zMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713045930; x=1713650730; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/KG0pi9cMDvzn7qBR5LlmuWI16FJF/UDqfeTzMUaA8E=; b=dIdC0cvRdZh4vndL+Myr5NsYu/saVqQGe/kzV+qrFG4i1TApypE43q1driNTMn9kX+ gRtjfXU7eWXju6TTKmU+JTaBVsOL60y7HxH4gKIVgH+zrQQRs2UAuwSyLMGp6LPxJZ2Y zMZeMQFdNNJQLT9HyJBwdYpkhVuSxvMD7L59DQGw//TeVfYxxpnrhoNHy43AAzeo+aXP dbFco+Cume7cykIQP4rYrZrVR4xJTgCs7c7AG6/DCKxT9RERdrrJxUjhUw3uFyuInpuh PmCZvRx4ZbYVCWF13H0xdmRs1Mra3owj/b9jtEtCOBDGsuun9UxJof3oLZQU585FEVPT Ia2Q== X-Gm-Message-State: AOJu0YxUkaN/uLe50I+VCWdGcCxWGJeWiS8818wD2TNnWA9vc8XVYK// z58ug/2fW+G5mbSIlct7WI0i1F3Nxow4mMTJGx0VYSR/jiD0+PKHy2htLSNkPStNwLjq/dlEfOf M X-Google-Smtp-Source: AGHT+IFTO5+fFpsebTTiObQRyBZDovWcmjBGVY13NsaNjhLx0OoCvfkr4lIGVw3/YAXEY0kAmwu6cQ== X-Received: by 2002:a05:6a21:81:b0:1a7:7ac1:a3ba with SMTP id iw1-20020a056a21008100b001a77ac1a3bamr5251228pzc.53.1713045929755; Sat, 13 Apr 2024 15:05:29 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id x16-20020a170902ec9000b001e3fe207a15sm5008082plg.138.2024.04.13.15.05.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 15:05:29 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2-next 3/7] tc/util: remove unused argument from print_action_control Date: Sat, 13 Apr 2024 15:04:04 -0700 Message-ID: <20240413220516.7235-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240413220516.7235-1-stephen@networkplumber.org> References: <20240413220516.7235-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: dsahern@gmail.com The FILE handle is no longer used. Signed-off-by: Stephen Hemminger --- tc/m_bpf.c | 2 +- tc/m_connmark.c | 2 +- tc/m_csum.c | 2 +- tc/m_ct.c | 2 +- tc/m_ctinfo.c | 2 +- tc/m_gact.c | 4 ++-- tc/m_gate.c | 2 +- tc/m_ife.c | 2 +- tc/m_mirred.c | 2 +- tc/m_mpls.c | 2 +- tc/m_nat.c | 2 +- tc/m_pedit.c | 2 +- tc/m_police.c | 4 ++-- tc/m_sample.c | 2 +- tc/m_skbedit.c | 2 +- tc/m_skbmod.c | 2 +- tc/m_tunnel_key.c | 2 +- tc/m_vlan.c | 2 +- tc/tc_util.c | 3 +-- tc/tc_util.h | 3 +-- 20 files changed, 22 insertions(+), 24 deletions(-) diff --git a/tc/m_bpf.c b/tc/m_bpf.c index 5cae51ba..f0cfd066 100644 --- a/tc/m_bpf.c +++ b/tc/m_bpf.c @@ -191,7 +191,7 @@ static int bpf_print_opt(struct action_util *au, FILE *f, struct rtattr *arg) b, sizeof(b))); } - print_action_control(f, "default-action ", parm->action, _SL_); + print_action_control("default-action ", parm->action, _SL_); print_uint(PRINT_ANY, "index", "\t index %u", parm->index); print_int(PRINT_ANY, "ref", " ref %d", parm->refcnt); print_int(PRINT_ANY, "bind", " bind %d", parm->bindcnt); diff --git a/tc/m_connmark.c b/tc/m_connmark.c index bd388665..880500fa 100644 --- a/tc/m_connmark.c +++ b/tc/m_connmark.c @@ -112,7 +112,7 @@ static int print_connmark(struct action_util *au, FILE *f, struct rtattr *arg) ci = RTA_DATA(tb[TCA_CONNMARK_PARMS]); print_uint(PRINT_ANY, "zone", "zone %u", ci->zone); - print_action_control(f, " ", ci->action, ""); + print_action_control(" ", ci->action, ""); print_nl(); print_uint(PRINT_ANY, "index", "\t index %u", ci->index); diff --git a/tc/m_csum.c b/tc/m_csum.c index 966ae18e..8724bf0d 100644 --- a/tc/m_csum.c +++ b/tc/m_csum.c @@ -204,7 +204,7 @@ print_csum(struct action_util *au, FILE *f, struct rtattr *arg) uflag_4, uflag_5, uflag_6, uflag_7); print_string(PRINT_ANY, "csum", "(%s) ", buf); - print_action_control(f, "action ", sel->action, _SL_); + print_action_control("action ", sel->action, _SL_); print_uint(PRINT_ANY, "index", "\tindex %u", sel->index); print_int(PRINT_ANY, "ref", " ref %d", sel->refcnt); print_int(PRINT_ANY, "bind", " bind %d", sel->bindcnt); diff --git a/tc/m_ct.c b/tc/m_ct.c index 95098c88..3d71d8d4 100644 --- a/tc/m_ct.c +++ b/tc/m_ct.c @@ -523,7 +523,7 @@ static int print_ct(struct action_util *au, FILE *f, struct rtattr *arg) ct_print_helper(tb[TCA_CT_HELPER_FAMILY], tb[TCA_CT_HELPER_PROTO], tb[TCA_CT_HELPER_NAME]); ct_print_nat(ct_action, tb); - print_action_control(f, " ", p->action, ""); + print_action_control(" ", p->action, ""); print_nl(); print_uint(PRINT_ANY, "index", "\t index %u", p->index); diff --git a/tc/m_ctinfo.c b/tc/m_ctinfo.c index 606ab280..2021d46d 100644 --- a/tc/m_ctinfo.c +++ b/tc/m_ctinfo.c @@ -236,7 +236,7 @@ static int print_ctinfo(struct action_util *au, FILE *f, struct rtattr *arg) zone = rta_getattr_u16(tb[TCA_CTINFO_ZONE]); print_hu(PRINT_ANY, "zone", "zone %u", zone); - print_action_control(f, " ", ci->action, ""); + print_action_control(" ", ci->action, ""); print_nl(); print_uint(PRINT_ANY, "index", "\t index %u", ci->index); diff --git a/tc/m_gact.c b/tc/m_gact.c index 0d90963c..111dff28 100644 --- a/tc/m_gact.c +++ b/tc/m_gact.c @@ -178,7 +178,7 @@ print_gact(struct action_util *au, FILE *f, struct rtattr *arg) } p = RTA_DATA(tb[TCA_GACT_PARMS]); - print_action_control(f, "action ", p->action, ""); + print_action_control("action ", p->action, ""); #ifdef CONFIG_GACT_PROB if (tb[TCA_GACT_PROB] != NULL) { pp = RTA_DATA(tb[TCA_GACT_PROB]); @@ -191,7 +191,7 @@ print_gact(struct action_util *au, FILE *f, struct rtattr *arg) print_nl(); print_string(PRINT_ANY, "random_type", "\t random type %s", prob_n2a(pp->ptype)); - print_action_control(f, " ", pp->paction, " "); + print_action_control(" ", pp->paction, " "); print_int(PRINT_ANY, "val", "val %d", pp->pval); close_json_object(); #endif diff --git a/tc/m_gate.c b/tc/m_gate.c index b2643ad8..ea49b09f 100644 --- a/tc/m_gate.c +++ b/tc/m_gate.c @@ -517,7 +517,7 @@ static int print_gate(struct action_util *au, FILE *f, struct rtattr *arg) if (tb[TCA_GATE_ENTRY_LIST]) print_gate_list(tb[TCA_GATE_ENTRY_LIST]); - print_action_control(f, "\t", parm->action, ""); + print_action_control("\t", parm->action, ""); print_uint(PRINT_ANY, "index", "\n\t index %u", parm->index); print_int(PRINT_ANY, "ref", " ref %d", parm->refcnt); diff --git a/tc/m_ife.c b/tc/m_ife.c index f5b2d52d..08b9d7de 100644 --- a/tc/m_ife.c +++ b/tc/m_ife.c @@ -236,7 +236,7 @@ static int print_ife(struct action_util *au, FILE *f, struct rtattr *arg) print_string(PRINT_ANY, "mode", "%s ", p->flags & IFE_ENCODE ? "encode" : "decode"); - print_action_control(f, "action ", p->action, " "); + print_action_control("action ", p->action, " "); if (tb[TCA_IFE_TYPE]) { ife_type = rta_getattr_u16(tb[TCA_IFE_TYPE]); diff --git a/tc/m_mirred.c b/tc/m_mirred.c index 5e9856e0..714f2472 100644 --- a/tc/m_mirred.c +++ b/tc/m_mirred.c @@ -337,7 +337,7 @@ print_mirred(struct action_util *au, FILE *f, struct rtattr *arg) print_string(PRINT_ANY, "to_dev", " to device %s)", dev); } - print_action_control(f, " ", p->action, ""); + print_action_control(" ", p->action, ""); print_nl(); print_uint(PRINT_ANY, "index", "\tindex %u", p->index); diff --git a/tc/m_mpls.c b/tc/m_mpls.c index a378e35e..65b7163d 100644 --- a/tc/m_mpls.c +++ b/tc/m_mpls.c @@ -272,7 +272,7 @@ static int print_mpls(struct action_util *au, FILE *f, struct rtattr *arg) } break; } - print_action_control(f, " ", parm->action, ""); + print_action_control(" ", parm->action, ""); print_nl(); print_uint(PRINT_ANY, "index", "\t index %u", parm->index); diff --git a/tc/m_nat.c b/tc/m_nat.c index e4c74b08..ec421cdc 100644 --- a/tc/m_nat.c +++ b/tc/m_nat.c @@ -169,7 +169,7 @@ print_nat(struct action_util *au, FILE * f, struct rtattr *arg) print_string(PRINT_ANY, "new_addr", " %s", format_host_r(AF_INET, 4, &sel->new_addr, buf1, sizeof(buf1))); - print_action_control(f, " ", sel->action, ""); + print_action_control(" ", sel->action, ""); print_nl(); print_uint(PRINT_ANY, "index", "\t index %u", sel->index); print_int(PRINT_ANY, "ref", " ref %d", sel->refcnt); diff --git a/tc/m_pedit.c b/tc/m_pedit.c index fc06d04b..5afa33d9 100644 --- a/tc/m_pedit.c +++ b/tc/m_pedit.c @@ -791,7 +791,7 @@ static int print_pedit(struct action_util *au, FILE *f, struct rtattr *arg) } } - print_action_control(f, "action ", sel->action, " "); + print_action_control("action ", sel->action, " "); print_uint(PRINT_ANY, "nkeys", "keys %d\n", sel->nkeys); print_uint(PRINT_ANY, "index", " \t index %u", sel->index); print_int(PRINT_ANY, "ref", " ref %d", sel->refcnt); diff --git a/tc/m_police.c b/tc/m_police.c index d140c1eb..02e50142 100644 --- a/tc/m_police.c +++ b/tc/m_police.c @@ -325,12 +325,12 @@ static int print_police(struct action_util *a, FILE *f, struct rtattr *arg) print_u64(PRINT_ANY, "pkts_burst", "pkts_burst %llu ", ppsburst64); } - print_action_control(f, "action ", p->action, ""); + print_action_control("action ", p->action, ""); if (tb[TCA_POLICE_RESULT]) { __u32 action = rta_getattr_u32(tb[TCA_POLICE_RESULT]); - print_action_control(f, "/", action, " "); + print_action_control("/", action, " "); } else { print_string(PRINT_FP, NULL, " ", NULL); } diff --git a/tc/m_sample.c b/tc/m_sample.c index 36e4c1db..6e2bca58 100644 --- a/tc/m_sample.c +++ b/tc/m_sample.c @@ -160,7 +160,7 @@ static int print_sample(struct action_util *au, FILE *f, struct rtattr *arg) print_uint(PRINT_ANY, "trunc_size", " trunc_size %u", rta_getattr_u32(tb[TCA_SAMPLE_TRUNC_SIZE])); - print_action_control(f, " ", p->action, ""); + print_action_control(" ", p->action, ""); print_nl(); print_uint(PRINT_ANY, "index", "\t index %u", p->index); diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c index 00b245ee..8e25c268 100644 --- a/tc/m_skbedit.c +++ b/tc/m_skbedit.c @@ -239,7 +239,7 @@ static int print_skbedit(struct action_util *au, FILE *f, struct rtattr *arg) "inheritdsfield"); } - print_action_control(f, " ", p->action, ""); + print_action_control(" ", p->action, ""); print_nl(); print_uint(PRINT_ANY, "index", "\t index %u", p->index); diff --git a/tc/m_skbmod.c b/tc/m_skbmod.c index c7a2ccd5..acb118b5 100644 --- a/tc/m_skbmod.c +++ b/tc/m_skbmod.c @@ -178,7 +178,7 @@ static int print_skbmod(struct action_util *au, FILE *f, struct rtattr *arg) p = RTA_DATA(tb[TCA_SKBMOD_PARMS]); fprintf(f, "skbmod "); - print_action_control(f, "", p->action, " "); + print_action_control("", p->action, " "); if (tb[TCA_SKBMOD_ETYPE]) { skbmod_etype = rta_getattr_u16(tb[TCA_SKBMOD_ETYPE]); diff --git a/tc/m_tunnel_key.c b/tc/m_tunnel_key.c index e62f9118..83adb09c 100644 --- a/tc/m_tunnel_key.c +++ b/tc/m_tunnel_key.c @@ -731,7 +731,7 @@ static int print_tunnel_key(struct action_util *au, FILE *f, struct rtattr *arg) tb[TCA_TUNNEL_KEY_ENC_TTL]); break; } - print_action_control(f, " ", parm->action, ""); + print_action_control(" ", parm->action, ""); print_nl(); print_uint(PRINT_ANY, "index", "\t index %u", parm->index); diff --git a/tc/m_vlan.c b/tc/m_vlan.c index 31d3b06f..fb5a0669 100644 --- a/tc/m_vlan.c +++ b/tc/m_vlan.c @@ -282,7 +282,7 @@ static int print_vlan(struct action_util *au, FILE *f, struct rtattr *arg) print_string(PRINT_ANY, "src_mac", " src_mac %s", b1); } } - print_action_control(f, " ", parm->action, ""); + print_action_control(" ", parm->action, ""); print_nl(); print_uint(PRINT_ANY, "index", "\t index %u", parm->index); diff --git a/tc/tc_util.c b/tc/tc_util.c index 25c8d6b6..133fe9f9 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -539,8 +539,7 @@ int parse_action_control_slash(int *argc_p, char ***argv_p, return 0; } -void print_action_control(FILE *f, const char *prefix, - int action, const char *suffix) +void print_action_control(const char *prefix, int action, const char *suffix) { print_string(PRINT_FP, NULL, "%s", prefix); open_json_object("control_action"); diff --git a/tc/tc_util.h b/tc/tc_util.h index 152ef3e6..851c2092 100644 --- a/tc/tc_util.h +++ b/tc/tc_util.h @@ -109,8 +109,7 @@ void parse_action_control_dflt(int *argc_p, char ***argv_p, int default_result); 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); +void print_action_control(const char *prefix, int action, const char *suffix); 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 parse_action(int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n); From patchwork Sat Apr 13 22:04:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13628807 X-Patchwork-Delegate: dsahern@gmail.com Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E8ED56B64 for ; Sat, 13 Apr 2024 22:05:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045933; cv=none; b=MPMka6X7KubwtsJbsuvxwe5GWOV2QJ5MmJROm++aTTlP5DF5hx2RKIx3n0OCEqCOyHNsu2b3wuR0EwIuylIiUI+gxUjyB3cp+s2WqQH8cRq3hQldZxt037X/GC8/W9xaWT89K47G/8aGVe2nor6tH5TikxVecZzVbo0lSFE7xGM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045933; c=relaxed/simple; bh=RqQxMm8f5HS3EJivC3U1Bk3lkI8CuQfdofo2EpaA0Ww=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LZgmuzT+ZqWevoVgaM/hdms8o1vDp6vbqsGt3PngMeRoPwuBOjS9oLdvCft2UtO89WLIEtoRB+dEw3DnP7DvExvWE4Q1RVvd13tzVKbxjbDJtZQ/FhtocP8KZXuMcfE/kuqahDpu3NYLmbDQV7gTD1vWE/oTbgYbYy1ikIrqLpo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b=v1BBj6kH; arc=none smtp.client-ip=209.85.210.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="v1BBj6kH" Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-6ecf406551aso1601404b3a.2 for ; Sat, 13 Apr 2024 15:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713045930; x=1713650730; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WyCEu2k0Ebvr+LbMmoI6zuSOabwfOsVHMOu4A+9qTiw=; b=v1BBj6kHGy+AMh6lzu/vAvTfFw3FMuTGg4a2N8t5VqSY543Ztvt0vSMIG+RLgl/yQ1 iEsNhvQKiHBpCySrDLo0Nxtu1XqEiRIRgeX+5yigjVmXMvPnoraKGHve5AGuItJSqgiG PFAjgRVx5Uha57pi9OQkBX2cV0rF8trwefjXBmEfWcVqO9yt5lqIp8w4um8g0mjgmgqc HS1h3i/K1niKjbIuDBWsoPY3QOe4wrA88Jzt4IO+IWnHeerRK+tcs+OT0La5l5gF+4th gTK/GP8+3v9MaO/RuwZXZeEO5lqyB7J+00K/qo4ueQmAkfkJPYei3KIpSpvHZUCOqmUT Dr0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713045930; x=1713650730; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WyCEu2k0Ebvr+LbMmoI6zuSOabwfOsVHMOu4A+9qTiw=; b=O4fJaE5WkcQqzFSCrNI2r57msb9q3arpxE+Zfi8oKzzNpf1Q+0N9swX8m+Ob+MXDFI uU9d43P3Tsz+lezourso5OKVB+eHRqy50bVK8sNyC0JX+Y2iiEM3jQxI8lAtMTExYCdn rkI84T3v4soPQfmc1reDv66Il5HvEKd0AhExyejpap0HBvhRb3uyAX5FE9u/zGHWuNrV QXGEL/tlCgugnnSZ1uerw89SOqoKd8kmNO1+i+tVYvSz16hBVptPCdhnzVsfx9NAZ9JJ okWbTnxdtc2ApdMCxzCefAZKZQyAc/w3Y5Yv2/kUx+YAU2vaOm9ci13sIc5QBgu2YzPV SELQ== X-Gm-Message-State: AOJu0Yw6d352fUELGE2ZDv72ti+nJBj5O3K+Gx4MKisEgC4slci8Gz8v qeeZqx5bCb+KxWuV0v1Ihiv8wLqU2x2ntQBNTS2PCYeABgpL09GFJnKfHNzkX4nCWOyhyokqA54 K X-Google-Smtp-Source: AGHT+IGPV8YKRieD/yzosGW1q0yT6HRJkvvGR8PunF506VMRniGxm+ZO+dxUygbJssdDxcCQrEGvKg== X-Received: by 2002:a17:902:f709:b0:1e5:8629:44d with SMTP id h9-20020a170902f70900b001e58629044dmr6865890plo.1.1713045930412; Sat, 13 Apr 2024 15:05:30 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id x16-20020a170902ec9000b001e3fe207a15sm5008082plg.138.2024.04.13.15.05.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 15:05:30 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2-next 4/7] tc/police: remove unused argument to tc_print_police Date: Sat, 13 Apr 2024 15:04:05 -0700 Message-ID: <20240413220516.7235-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240413220516.7235-1-stephen@networkplumber.org> References: <20240413220516.7235-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: dsahern@gmail.com FILE handle no longer used. Signed-off-by: Stephen Hemminger --- tc/f_basic.c | 2 +- tc/f_bpf.c | 2 +- tc/f_cgroup.c | 2 +- tc/f_flow.c | 2 +- tc/f_fw.c | 2 +- tc/f_route.c | 2 +- tc/f_u32.c | 2 +- tc/m_police.c | 6 +++--- tc/tc_util.h | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tc/f_basic.c b/tc/f_basic.c index 1ceb15d4..6b36028f 100644 --- a/tc/f_basic.c +++ b/tc/f_basic.c @@ -130,7 +130,7 @@ static int basic_print_opt(struct filter_util *qu, FILE *f, if (tb[TCA_BASIC_POLICE]) { print_nl(); - tc_print_police(f, tb[TCA_BASIC_POLICE]); + tc_print_police(tb[TCA_BASIC_POLICE]); } if (tb[TCA_BASIC_ACT]) { diff --git a/tc/f_bpf.c b/tc/f_bpf.c index a6d4875f..f265249d 100644 --- a/tc/f_bpf.c +++ b/tc/f_bpf.c @@ -250,7 +250,7 @@ static int bpf_print_opt(struct filter_util *qu, FILE *f, if (tb[TCA_BPF_POLICE]) { print_nl(); - tc_print_police(f, tb[TCA_BPF_POLICE]); + tc_print_police(tb[TCA_BPF_POLICE]); } if (tb[TCA_BPF_ACT]) diff --git a/tc/f_cgroup.c b/tc/f_cgroup.c index 291d6e7e..d4201b91 100644 --- a/tc/f_cgroup.c +++ b/tc/f_cgroup.c @@ -93,7 +93,7 @@ static int cgroup_print_opt(struct filter_util *qu, FILE *f, if (tb[TCA_CGROUP_POLICE]) { print_nl(); - tc_print_police(f, tb[TCA_CGROUP_POLICE]); + tc_print_police(tb[TCA_CGROUP_POLICE]); } if (tb[TCA_CGROUP_ACT]) diff --git a/tc/f_flow.c b/tc/f_flow.c index 4a29af22..07340f2a 100644 --- a/tc/f_flow.c +++ b/tc/f_flow.c @@ -347,7 +347,7 @@ static int flow_print_opt(struct filter_util *fu, FILE *f, struct rtattr *opt, if (tb[TCA_FLOW_EMATCHES]) print_ematch(f, tb[TCA_FLOW_EMATCHES]); if (tb[TCA_FLOW_POLICE]) - tc_print_police(f, tb[TCA_FLOW_POLICE]); + tc_print_police(tb[TCA_FLOW_POLICE]); if (tb[TCA_FLOW_ACT]) { print_nl(); tc_print_action(f, tb[TCA_FLOW_ACT], 0); diff --git a/tc/f_fw.c b/tc/f_fw.c index 5e72e526..190f79fc 100644 --- a/tc/f_fw.c +++ b/tc/f_fw.c @@ -146,7 +146,7 @@ static int fw_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u } if (tb[TCA_FW_POLICE]) - tc_print_police(f, tb[TCA_FW_POLICE]); + tc_print_police(tb[TCA_FW_POLICE]); if (tb[TCA_FW_INDEV]) { struct rtattr *idev = tb[TCA_FW_INDEV]; diff --git a/tc/f_route.c b/tc/f_route.c index ca8a8ddd..3b6f5c2f 100644 --- a/tc/f_route.c +++ b/tc/f_route.c @@ -165,7 +165,7 @@ static int route_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, print_color_string(PRINT_ANY, COLOR_IFNAME, "fromif", "fromif %s", ll_index_to_name(rta_getattr_u32(tb[TCA_ROUTE4_IIF]))); if (tb[TCA_ROUTE4_POLICE]) - tc_print_police(f, tb[TCA_ROUTE4_POLICE]); + tc_print_police(tb[TCA_ROUTE4_POLICE]); if (tb[TCA_ROUTE4_ACT]) tc_print_action(f, tb[TCA_ROUTE4_ACT], 0); return 0; diff --git a/tc/f_u32.c b/tc/f_u32.c index f8e1ff6e..c04ec02d 100644 --- a/tc/f_u32.c +++ b/tc/f_u32.c @@ -1365,7 +1365,7 @@ static int u32_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, if (tb[TCA_U32_POLICE]) { print_nl(); - tc_print_police(f, tb[TCA_U32_POLICE]); + tc_print_police(tb[TCA_U32_POLICE]); } if (tb[TCA_U32_INDEV]) { diff --git a/tc/m_police.c b/tc/m_police.c index 02e50142..d7a396a2 100644 --- a/tc/m_police.c +++ b/tc/m_police.c @@ -260,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); } -static int print_police(struct action_util *a, FILE *f, struct rtattr *arg) +static int print_police(struct action_util *a, FILE *funused, struct rtattr *arg) { SPRINT_BUF(b2); struct tc_police *p; @@ -356,7 +356,7 @@ static int print_police(struct action_util *a, FILE *f, struct rtattr *arg) return 0; } -int tc_print_police(FILE *f, struct rtattr *arg) +int tc_print_police(struct rtattr *arg) { - return print_police(&police_action_util, f, arg); + return print_police(&police_action_util, NULL, arg); } diff --git a/tc/tc_util.h b/tc/tc_util.h index 851c2092..de908d5e 100644 --- a/tc/tc_util.h +++ b/tc/tc_util.h @@ -98,7 +98,7 @@ int get_tc_classid(__u32 *h, const char *str); int print_tc_classid(char *buf, int len, __u32 h); char *sprint_tc_classid(__u32 h, char *buf); -int tc_print_police(FILE *f, struct rtattr *tb); +int tc_print_police(struct rtattr *tb); int parse_percent(double *val, const char *str); int parse_police(int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n); From patchwork Sat Apr 13 22:04:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13628809 X-Patchwork-Delegate: dsahern@gmail.com Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD24C56B9E for ; Sat, 13 Apr 2024 22:05:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045933; cv=none; b=j3s8afu47rmbSPS1XQlOKTTvc8zyT62nY5mhBR7uBWUorkJb8g0+NYsGL0tPHb1daIwDB/03msYxXD9taVUFCao6dX84G0MuG0WeM1AC39EuD7i7/csclI43PQXroFiOXoU+r/L5YbSHgy5bMfX4U26bygm7mrwA6Uuu/ytVnVU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045933; c=relaxed/simple; bh=LSNu5ygi1wErnw72sK40/mBEJoMHFSho8xO5YDgBlm0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lGZ1xdKVnfH/+DI0pHmzAzpt7vAUeqmZl6YT8zPp+M+xc8bHivyxPFU4pr+nkZk3VoeoGWsEqG4/7TJbTQYwdY/ARknJuGjSRfC6C+iljqREf+R2xfky8EGFdpDuTdyy/YruNWf2uktwCpV3yLW18LH+m48z8kcBEsZl7mlfeAU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b=TvmtmQmL; arc=none smtp.client-ip=209.85.215.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="TvmtmQmL" Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-5e42b4bbfa4so1184354a12.1 for ; Sat, 13 Apr 2024 15:05:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713045931; x=1713650731; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NVH20qj8Zvy4wq8TL+O3ho3KjZhlfthBML53rBGlaAc=; b=TvmtmQmL2hD2uLIZpylYEmbpRSJB2B4AtHO9j/lzEgv++FTvMFXFzEiGqT0pXQNIAZ QHED5e1Vc1+sM2TTXlivfZ8AmGO5jUpgK5AZRGz1Ve6fElb/g0f+3mA0TbiaCoybiR61 6j1U2andnuveRsH1HtHVxYO2eFyVojR3XGMsnOmnfFP8BQASwWxQ9L0Yrf5xN8jCvT3r JIpxVd32eBq/+TLXabIWneJOUibfdv07exNZJnwHWcAk3neJ9wruRWfyVn5lPsayiGt3 MdWLcXmbjGK7RowlnU4vBkZKaRn5q9wmXSoa5zOHSBgyAKGWh2JljhS669o2wh0GrkmP AgAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713045931; x=1713650731; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NVH20qj8Zvy4wq8TL+O3ho3KjZhlfthBML53rBGlaAc=; b=Mh+vKL9nqvt9Y0y7U8WuDNTu0HJk2D1QQg0A0hP6kNsNeq91sf6BV9yxefqgSseRYh aBEYBgbOSKaRbdfZNjN+Y2ONuBNLK6mGdtV4rSPR/UwdqJaV8GRT021L+uCFpBseqx+E 0KHoEaPUwKmOsz/UbjIWZ1+CtXJudpjV4LDhrbmQeOuZvW6ckUV5wKgfcQEvRhLIv8gf 0AbDiViS9BsOy1c2WjHtmUCcdvAtzlFU9q/G8oQHuZWbwff4HEgyup0ZW7hQ+2xiH13V EvKlvJ+9f7KLtQDswuf2s9RNKr9hMJNTSuOPmV16pi3iCekoS5bJx4Xd3KzY3hnUBIss Aoyg== X-Gm-Message-State: AOJu0Yx3Cbgr+xps+mdRg/EM0uM04hHwsLkutEFVZX1BbmyZhI2xx08d n/ep6zqLHW3DzI8XWmNTyNPeI8S3T9SdmvnEjChewvqxPZP+37QBYaevIC5isKchIC8ovsfmuAW R X-Google-Smtp-Source: AGHT+IF4WymW3SrJe4++UN3rxm5uRSuJoaGQzoi4KWadde8NFJdR0oXMb18oizNgKcL6AuoSOB91oA== X-Received: by 2002:a17:902:c40d:b0:1e2:8c26:3264 with SMTP id k13-20020a170902c40d00b001e28c263264mr9052647plk.36.1713045931270; Sat, 13 Apr 2024 15:05:31 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id x16-20020a170902ec9000b001e3fe207a15sm5008082plg.138.2024.04.13.15.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 15:05:30 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2-next 5/7] tc/util: remove unused argument from print_tcstats2_attr Date: Sat, 13 Apr 2024 15:04:06 -0700 Message-ID: <20240413220516.7235-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240413220516.7235-1-stephen@networkplumber.org> References: <20240413220516.7235-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: dsahern@gmail.com The function doesn't use the FILE handle. Signed-off-by: Stephen Hemminger --- tc/m_action.c | 2 +- tc/tc_util.c | 5 ++--- tc/tc_util.h | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tc/m_action.c b/tc/m_action.c index 6a361f11..feb869a9 100644 --- a/tc/m_action.c +++ b/tc/m_action.c @@ -396,7 +396,7 @@ static int tc_print_one_action(FILE *f, struct rtattr *arg, bool bind) print_string(PRINT_FP, NULL, "\tAction statistics:", NULL); print_nl(); open_json_object("stats"); - print_tcstats2_attr(f, tb[TCA_ACT_STATS], "\t", NULL); + print_tcstats2_attr(tb[TCA_ACT_STATS], "\t", NULL); close_json_object(); print_nl(); } diff --git a/tc/tc_util.c b/tc/tc_util.c index 133fe9f9..f9151408 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -708,8 +708,7 @@ static void print_tcstats_basic_hw(struct rtattr **tbs, const char *prefix) print_uint(PRINT_ANY, "hw_packets", " %u pkt", bs_hw.packets); } -void print_tcstats2_attr(FILE *fp, struct rtattr *rta, - const char *prefix, struct rtattr **xstats) +void print_tcstats2_attr(struct rtattr *rta, const char *prefix, struct rtattr **xstats) { struct rtattr *tbs[TCA_STATS_MAX + 1]; @@ -790,7 +789,7 @@ void print_tcstats_attr(FILE *fp, struct rtattr *tb[], const char *prefix, struct rtattr **xstats) { if (tb[TCA_STATS2]) { - print_tcstats2_attr(fp, tb[TCA_STATS2], prefix, xstats); + print_tcstats2_attr(tb[TCA_STATS2], prefix, xstats); if (xstats && !*xstats) goto compat_xstats; return; diff --git a/tc/tc_util.h b/tc/tc_util.h index de908d5e..2d38dd58 100644 --- a/tc/tc_util.h +++ b/tc/tc_util.h @@ -91,8 +91,7 @@ char *sprint_linklayer(unsigned int linklayer, char *buf); void print_tcstats_attr(FILE *fp, struct rtattr *tb[], const char *prefix, struct rtattr **xstats); -void print_tcstats2_attr(FILE *fp, struct rtattr *rta, - const char *prefix, struct rtattr **xstats); +void print_tcstats2_attr(struct rtattr *rta, const char *prefix, struct rtattr **xstats); int get_tc_classid(__u32 *h, const char *str); int print_tc_classid(char *buf, int len, __u32 h); From patchwork Sat Apr 13 22:04:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13628810 X-Patchwork-Delegate: dsahern@gmail.com Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A685757310 for ; Sat, 13 Apr 2024 22:05:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045934; cv=none; b=Cwenyk74ueYZze2+yIienuU6nEGXI5JyRDbWN11hvtHtj+v+20UUmWX8UKw1aZutSDenuYU/qghF0/nVRJKCCh0KKM5arbMHgcPsqVBcSZr309IekzpdS2X1OVvWwxSREgz92xStZTQRs3b6ibBau/LevjiUuRxDRHgoF2PU7Do= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045934; c=relaxed/simple; bh=DoKOborxdg9vEFlBWhzU4w/9KLbX6sSntzqrRAcT9Kw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bhRnPeLN9AmYwGD22awFFr60W0c+rPcV3Y8BhDt9HKHTeZKD4xzgvOq6dkegrn9wnZyHRBlRFtXFICk/9Ok6iZNRD+Dr1xKxb346NQjG5NdTmpHdll1Xhv9pG5Mk5qeXBFgkNBpFwp68WOMvOzy85/DZutisMHJlyfEWuQTN+Hg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b=wvZypPA2; arc=none smtp.client-ip=209.85.214.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="wvZypPA2" Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1e220e40998so13161355ad.1 for ; Sat, 13 Apr 2024 15:05:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713045932; x=1713650732; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xuG0zC7KJZKKRfVx+EmkeXdKZGVMHcd6tlFd7MhxRk0=; b=wvZypPA2CcS+WPFTo1/Efm6PnVQzg/y+NXYUErCzJoPoLEXd+BcIpc52a6GXoalkv8 tnxC2O9xGRV7HWJBED8cFnEOS8+CtncVURokAFEha+/myrscBOGCZspMYzU+/pnqN1gg L1Pia7P8a9msbyiReuWSTbjo+7kv1RS8VdU2UqrRSeHyw0jLY4YeF8kDUB1zLITpRVvD U2fH3ZEAANEA+5VhAgy1Doj5SF7QEytC7lWiUve3Eca8XoJH7iSFtbj0p/2ng6qeqaiD x2R1UM54GGVJsHrRJqq0em6ONaexFQzhjk5BbiI1QwuqAVuXfOjbB73Lu8FDLKLZ4/Vh YuGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713045932; x=1713650732; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xuG0zC7KJZKKRfVx+EmkeXdKZGVMHcd6tlFd7MhxRk0=; b=sKuw2w+ti0SFN6BGDwccZKXtQwfLcOsYv5l5PvoQW7Upp0bzs4dDeWsAHdULjtN5wR LMu2jQu3Ccg5E9e+gP45VlrucBr7+bwop59jY4gq5kfOcsEDwkFzJzZaek0dJksMdI2h 1i0tBFf4JOezCl40meQ3UpUO8OW+QcKFafM8AhbYUH1N1mojvDKgjvRcDozrDBcrrHeo hR9FufU5qEkLPhhkDfUBfxVzaXyMbPRfK1JWW5CMWmxYCXbYMatl6lNi9jwq3sMdnjeJ 84v9R2JEf32aPnqQPdC8r4wT5pu7pUXuW3b+WqRk0sqI06+FhsqGAYyJ8A1oiYtt1bVa ku5Q== X-Gm-Message-State: AOJu0YzoyorpaxyJxrh32qsmz73IVOJ3bWv68O8lyVWUg72gKCp3htiM ezJwBVwQnCYzzgL793Ni/bZAabgL52Oe3zyUdVbPzcAa06iJdvgS7tw8WZAy9nRQxqK+g8muxIv M X-Google-Smtp-Source: AGHT+IFd/WT03qzuSP8CmjuruwqqiSCf8Sb7pYwDUUc6lPYhIA50tRLonGnWt1AmLlzo6JN0q7Mz7Q== X-Received: by 2002:a17:902:c3c6:b0:1e2:ae83:3197 with SMTP id j6-20020a170902c3c600b001e2ae833197mr7110188plj.10.1713045931939; Sat, 13 Apr 2024 15:05:31 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id x16-20020a170902ec9000b001e3fe207a15sm5008082plg.138.2024.04.13.15.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 15:05:31 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2-next 6/7] tc/action: remove unused args from tc_print_action Date: Sat, 13 Apr 2024 15:04:07 -0700 Message-ID: <20240413220516.7235-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240413220516.7235-1-stephen@networkplumber.org> References: <20240413220516.7235-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: dsahern@gmail.com The file handle is not used, and total actions is always zero. Signed-off-by: Stephen Hemminger --- tc/f_basic.c | 2 +- tc/f_bpf.c | 2 +- tc/f_cgroup.c | 2 +- tc/f_flow.c | 2 +- tc/f_flower.c | 2 +- tc/f_fw.c | 2 +- tc/f_matchall.c | 2 +- tc/f_route.c | 2 +- tc/f_u32.c | 2 +- tc/m_action.c | 28 +++++++++++++++------------- tc/tc_util.h | 2 +- 11 files changed, 25 insertions(+), 23 deletions(-) diff --git a/tc/f_basic.c b/tc/f_basic.c index 6b36028f..b76092c6 100644 --- a/tc/f_basic.c +++ b/tc/f_basic.c @@ -134,7 +134,7 @@ static int basic_print_opt(struct filter_util *qu, FILE *f, } if (tb[TCA_BASIC_ACT]) { - tc_print_action(f, tb[TCA_BASIC_ACT], 0); + tc_print_action(tb[TCA_BASIC_ACT]); } return 0; diff --git a/tc/f_bpf.c b/tc/f_bpf.c index f265249d..ad40bc99 100644 --- a/tc/f_bpf.c +++ b/tc/f_bpf.c @@ -254,7 +254,7 @@ static int bpf_print_opt(struct filter_util *qu, FILE *f, } if (tb[TCA_BPF_ACT]) - tc_print_action(f, tb[TCA_BPF_ACT], 0); + tc_print_action(tb[TCA_BPF_ACT]); return 0; } diff --git a/tc/f_cgroup.c b/tc/f_cgroup.c index d4201b91..ed7638ed 100644 --- a/tc/f_cgroup.c +++ b/tc/f_cgroup.c @@ -97,7 +97,7 @@ static int cgroup_print_opt(struct filter_util *qu, FILE *f, } if (tb[TCA_CGROUP_ACT]) - tc_print_action(f, tb[TCA_CGROUP_ACT], 0); + tc_print_action(tb[TCA_CGROUP_ACT]); return 0; } diff --git a/tc/f_flow.c b/tc/f_flow.c index 07340f2a..0e27d216 100644 --- a/tc/f_flow.c +++ b/tc/f_flow.c @@ -350,7 +350,7 @@ static int flow_print_opt(struct filter_util *fu, FILE *f, struct rtattr *opt, tc_print_police(tb[TCA_FLOW_POLICE]); if (tb[TCA_FLOW_ACT]) { print_nl(); - tc_print_action(f, tb[TCA_FLOW_ACT], 0); + tc_print_action(tb[TCA_FLOW_ACT]); } return 0; } diff --git a/tc/f_flower.c b/tc/f_flower.c index 53188f1c..1d2cff46 100644 --- a/tc/f_flower.c +++ b/tc/f_flower.c @@ -3178,7 +3178,7 @@ static int flower_print_opt(struct filter_util *qu, FILE *f, } if (tb[TCA_FLOWER_ACT]) - tc_print_action(f, tb[TCA_FLOWER_ACT], 0); + tc_print_action(tb[TCA_FLOWER_ACT]); return 0; } diff --git a/tc/f_fw.c b/tc/f_fw.c index 190f79fc..80809f13 100644 --- a/tc/f_fw.c +++ b/tc/f_fw.c @@ -156,7 +156,7 @@ static int fw_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u if (tb[TCA_FW_ACT]) { print_nl(); - tc_print_action(f, tb[TCA_FW_ACT], 0); + tc_print_action(tb[TCA_FW_ACT]); } return 0; } diff --git a/tc/f_matchall.c b/tc/f_matchall.c index 38b68d7e..2ecf028b 100644 --- a/tc/f_matchall.c +++ b/tc/f_matchall.c @@ -155,7 +155,7 @@ static int matchall_print_opt(struct filter_util *qu, FILE *f, if (tb[TCA_MATCHALL_ACT]) - tc_print_action(f, tb[TCA_MATCHALL_ACT], 0); + tc_print_action(tb[TCA_MATCHALL_ACT]); return 0; } diff --git a/tc/f_route.c b/tc/f_route.c index 3b6f5c2f..0af2fde1 100644 --- a/tc/f_route.c +++ b/tc/f_route.c @@ -167,7 +167,7 @@ static int route_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, if (tb[TCA_ROUTE4_POLICE]) tc_print_police(tb[TCA_ROUTE4_POLICE]); if (tb[TCA_ROUTE4_ACT]) - tc_print_action(f, tb[TCA_ROUTE4_ACT], 0); + tc_print_action(tb[TCA_ROUTE4_ACT]); return 0; } diff --git a/tc/f_u32.c b/tc/f_u32.c index c04ec02d..6e2e00b1 100644 --- a/tc/f_u32.c +++ b/tc/f_u32.c @@ -1377,7 +1377,7 @@ static int u32_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, } if (tb[TCA_U32_ACT]) - tc_print_action(f, tb[TCA_U32_ACT], 0); + tc_print_action(tb[TCA_U32_ACT]); return 0; } diff --git a/tc/m_action.c b/tc/m_action.c index feb869a9..6910562e 100644 --- a/tc/m_action.c +++ b/tc/m_action.c @@ -41,7 +41,7 @@ static void act_usage(void) */ fprintf(stderr, "usage: tc actions *\n" - "Where: ACTSPECOP := ACR | GD | FL\n" + "Where: ACTSPECOP := ACR | GD | FL\n" " ACR := add | change | replace *\n" " GD := get | delete | *\n" " FL := ls | list | flush | \n" @@ -360,7 +360,7 @@ bad_val: return -1; } -static int tc_print_one_action(FILE *f, struct rtattr *arg, bool bind) +static int tc_print_one_action(struct rtattr *arg, bool bind) { struct rtattr *tb[TCA_ACT_MAX + 1]; @@ -382,7 +382,7 @@ static int tc_print_one_action(FILE *f, struct rtattr *arg, bool bind) if (a == NULL) return err; - err = a->print_aopt(a, f, tb[TCA_ACT_OPTIONS]); + err = a->print_aopt(a, stdout, tb[TCA_ACT_OPTIONS]); if (err < 0) return err; @@ -466,7 +466,7 @@ static int tc_print_one_action(FILE *f, struct rtattr *arg, bool bind) } static int -tc_print_action_flush(FILE *f, const struct rtattr *arg) +tc_print_action_flush(const struct rtattr *arg) { struct rtattr *tb[TCA_MAX + 1]; @@ -486,16 +486,18 @@ tc_print_action_flush(FILE *f, const struct rtattr *arg) return err; delete_count = RTA_DATA(tb[TCA_FCNT]); - fprintf(f, " %s (%d entries)\n", a->id, *delete_count); + print_string(PRINT_FP, NULL, " %s ", a->id); + open_json_object(a->id); + print_int(PRINT_ANY, "entries", "(%d entries)\n", *delete_count); + close_json_object(); + tab_flush = 0; return 0; } static int -tc_dump_action(FILE *f, const struct rtattr *arg, unsigned short tot_acts, - bool bind) +tc_dump_action(const struct rtattr *arg, unsigned short tot_acts, bool bind) { - int i; if (arg == NULL) @@ -509,7 +511,7 @@ tc_dump_action(FILE *f, const struct rtattr *arg, unsigned short tot_acts, parse_rtattr_nested(tb, tot_acts, arg); if (tab_flush && tb[0] && !tb[1]) - return tc_print_action_flush(f, tb[0]); + return tc_print_action_flush(tb[0]); open_json_array(PRINT_JSON, "actions"); for (i = 0; i <= tot_acts; i++) { @@ -518,7 +520,7 @@ tc_dump_action(FILE *f, const struct rtattr *arg, unsigned short tot_acts, print_nl(); print_uint(PRINT_ANY, "order", "\taction order %u: ", i); - if (tc_print_one_action(f, tb[i], bind) < 0) + if (tc_print_one_action(tb[i], bind) < 0) fprintf(stderr, "Error printing action\n"); close_json_object(); } @@ -530,9 +532,9 @@ tc_dump_action(FILE *f, const struct rtattr *arg, unsigned short tot_acts, } int -tc_print_action(FILE *f, const struct rtattr *arg, unsigned short tot_acts) +tc_print_action(const struct rtattr *arg) { - return tc_dump_action(f, arg, tot_acts, true); + return tc_dump_action(arg, 0, true); } int print_action(struct nlmsghdr *n, void *arg) @@ -585,7 +587,7 @@ int print_action(struct nlmsghdr *n, void *arg) } open_json_object(NULL); - tc_dump_action(fp, tb[TCA_ACT_TAB], tot_acts ? *tot_acts:0, false); + tc_dump_action(tb[TCA_ACT_TAB], tot_acts ? *tot_acts : 0, false); if (tb[TCA_ROOT_EXT_WARN_MSG]) { print_string(PRINT_ANY, "warn", "%s", diff --git a/tc/tc_util.h b/tc/tc_util.h index 2d38dd58..a1137bc2 100644 --- a/tc/tc_util.h +++ b/tc/tc_util.h @@ -110,7 +110,7 @@ int parse_action_control_slash(int *argc_p, char ***argv_p, int *result1_p, int *result2_p, bool allow_num); void print_action_control(const char *prefix, int action, const char *suffix); 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_action(const struct rtattr *tb); int parse_action(int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n); void print_tm(const struct tcf_t *tm); int prio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt); From patchwork Sat Apr 13 22:04:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13628811 X-Patchwork-Delegate: dsahern@gmail.com Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A36225732E for ; Sat, 13 Apr 2024 22:05:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045935; cv=none; b=tWzjmJ2BkqKJBKOfPnXHymT25DAYTPpkUi7FSQrivslrl/dfoB+iR6oQXcIsjeu6igxGChuVj/aMrw6d+5MJWEeiHX+Kd/mRuPUlXLT/NS9WSLpgCb1euflTtV2idxL2VwgUln9dTGDbS8FOBP+pqY25v2LaRpDiTdf48dkrI40= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713045935; c=relaxed/simple; bh=sSLSq+Dg/7uZyw/218CptWM0h5jkmmvgwD6P0Dthcg4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=czFEgZ0b6S3oHmeiCsK7Fb+UlBODJmSmJ9ay3ZuuSqdSE/5hPV8Tp5LlxxfEkhLJMJ2wLq+UDPpnt/WYFR2Vsf3A46r3lgsCFi5Eaj0hazb27prhmRImzztypdjcmD4NaV0WJLhPrzoAGPPX83neJLKBN8E6N/fwgE1TJo4KU4s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b=akHAcN9n; arc=none smtp.client-ip=209.85.161.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="akHAcN9n" Received: by mail-oo1-f51.google.com with SMTP id 006d021491bc7-5aa27dba8a1so1358974eaf.0 for ; Sat, 13 Apr 2024 15:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713045933; x=1713650733; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=j0bov/MreT9q7kvyM9v8P5W49GmdWTipQ6PC8aRlAhk=; b=akHAcN9nPv0pkAs4bFmaZAC3iSUycpDmbM8CyeojFyWxEkPwNQiDsRjxBcs4KbDyrm RqHgPYKSqfe2SZQbgdQbzY7YEUNrp2wGwV2ILVuss6YibjzIAZ8ceZ73RUzuAsDtFDt/ fLKWL0WOkg00A2yX+WwpUEQO5Dn6OwWEdjouBkzuRWgdL1ZO/CY250rY52ewPAVJpHYw MqUZsJC6GXYR53rqNqVWwOxCGM0Xx2VzGDEOAm2DAvANZsZhWqn0tdDAVLLiqkbSuplf 9yYlL0cAokh5ILj+wDN746DGy1uEql9jbkWr8gS8bMKOIlKURwHV2gDok82Gza0TMfXu UUlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713045933; x=1713650733; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j0bov/MreT9q7kvyM9v8P5W49GmdWTipQ6PC8aRlAhk=; b=Ejt2nlj8MQPKq4Yt16cwhmVmLET3jlnT8TymKqDg9kFcMG9hIyVna/N5piTA0IpxzO lbaoSSDEdocgZ7ZympPohnJMInFiPDJtWbNu0Ng+LKmgwNi94VdEK09viiPZbBPbvdqa A3B6mHzYnoeCuOZqs2q636hN1Z7iirf7L/29GwiT9mlOfXE/nSN9Q7EJfHhhn63DMcfj EM3Rhu8KZX6I7WMtmItH0VXUEnvemlR0aXxtNvFFJ/PhxNLsY0kXK1FJk0na8/kkCKC7 y2adUXtL1r2dH6Y/rN+PmwMcQfyN+qImDvKiXRLQI6MihEODB1NbZERkBfcqYF7N3m7c Fq9w== X-Gm-Message-State: AOJu0YxaKWpPduVwWRT0Av4O7+hhS5C9FkaYhWZgj0b8Rnmm2NkH8KDH d8fX6M0ySN00t003Lf+iIp49mVQEdu0MQlysr3OxyoGd5D5WX4CeCdKpTJ6+ozt3EcW6hlHF2/n d X-Google-Smtp-Source: AGHT+IHjTD4xXi5fV1k+1Bgh0atU71gXawbhSrYDW3mzNOMNE1nMCnmWfZRxpd65PZ5fSYmDWmf1uw== X-Received: by 2002:a05:6359:4902:b0:183:676f:c751 with SMTP id mt2-20020a056359490200b00183676fc751mr9292403rwb.27.1713045932602; Sat, 13 Apr 2024 15:05:32 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id x16-20020a170902ec9000b001e3fe207a15sm5008082plg.138.2024.04.13.15.05.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 15:05:32 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2-next 7/7] tc/police: remove unused prototype police_print_xstats Date: Sat, 13 Apr 2024 15:04:08 -0700 Message-ID: <20240413220516.7235-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240413220516.7235-1-stephen@networkplumber.org> References: <20240413220516.7235-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: dsahern@gmail.com Signed-off-by: Stephen Hemminger --- tc/tc_util.h | 1 - 1 file changed, 1 deletion(-) diff --git a/tc/tc_util.h b/tc/tc_util.h index a1137bc2..86200f1e 100644 --- a/tc/tc_util.h +++ b/tc/tc_util.h @@ -109,7 +109,6 @@ void parse_action_control_dflt(int *argc_p, char ***argv_p, int parse_action_control_slash(int *argc_p, char ***argv_p, int *result1_p, int *result2_p, bool allow_num); void print_action_control(const char *prefix, int action, const char *suffix); -int police_print_xstats(struct action_util *a, FILE *f, struct rtattr *tb); int tc_print_action(const struct rtattr *tb); int parse_action(int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n); void print_tm(const struct tcf_t *tm);