From patchwork Tue Jun 23 23:53:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 217240 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E1A0C433E0 for ; Tue, 23 Jun 2020 23:53:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 036BD2075D for ; Tue, 23 Jun 2020 23:53:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="vbGWwC4t" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387871AbgFWXxU (ORCPT ); Tue, 23 Jun 2020 19:53:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387520AbgFWXxS (ORCPT ); Tue, 23 Jun 2020 19:53:18 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C70CC061755 for ; Tue, 23 Jun 2020 16:53:18 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id g12so174804pll.10 for ; Tue, 23 Jun 2020 16:53:18 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=gHNOOCaaOKCgcOHPsZ+vkVizkJqVg+rvtjue+mBjdzM=; b=vbGWwC4tAsCoq63jn8OoxgNQwz2F22VNEQhRyR5sGy/Qq1Hv834cjQ/2DJ/YHBCzC+ US4bu0r7i4B2fSaEcfeWe703C/xo1nxCQkeZQSh7/3+ubQyqTfTonq2SpJibdZ/iPypz tA7OfWnWgWBOrKaSqUR0f4qvMdf5ZIid8Sw8A2+ET32z7IPYqllSAsycpUSTU7A0MGs0 mBgBVGF0IL2bhsD3GLEjUVyYwf8z6R/UO+/1Grq1I9///df3iETGVtkRrSbaVSAGu8v3 MsBJvWTQADDvlaotW2aRa0Q/biUgsC1Wk+KTXgTn+pEJHnMQ5dPZg5CgwUjBz3ZPj5Ag rdtQ== 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:mime-version:content-transfer-encoding; bh=gHNOOCaaOKCgcOHPsZ+vkVizkJqVg+rvtjue+mBjdzM=; b=Si+/hFfoZUqTILVnNLXKp+4difUxteuuTY9HeXJJllSA/8e/FmKviG2IRlApazczuY RkV3UJYyiLzvT3AKheTKb/WoBWec/an5u8lbCdELh1pAeZlJNgVLj3PsfMmixIeTAMAx fWKia3QEsoC+1kBrzSqHJHH0RutOtJlBThewnHdSAfdsAQ8cZK7tRO7TrkDxDSJrUgxl 2n0tHpFCx/QbfzBLn+IMe9vnb84tvCo53Ro1wD/PKG26jAGo8QJq/k25HyTHX8cJaN8k 3rQkVL1OUKIgMGL6XcP1Pd9AdHpEPUGGL3WnfEdKlu7tzSgLI/70j3fQbZPaO6LvfeWJ OaRQ== X-Gm-Message-State: AOAM532f8OnMje8l3dhigzUKfRt9UXKykwuTsVfm+XWOHOAm0W+VOStV J66224slRRPLge41xsPeYR1IaRfCDJU= X-Google-Smtp-Source: ABdhPJyXv88jxw0mDGUFQmVVvdZPGIMiuyfBmQqRvkbWCVZ9xaHCM9DpkZbCTkzDzllW8rbzHYpGlA== X-Received: by 2002:a17:902:70ca:: with SMTP id l10mr23992709plt.31.1592956397050; Tue, 23 Jun 2020 16:53:17 -0700 (PDT) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 23sm18096521pfy.199.2020.06.23.16.53.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 16:53:16 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2 1/5] bpf: replace slave with sub Date: Tue, 23 Jun 2020 16:53:03 -0700 Message-Id: <20200623235307.9216-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623235307.9216-1-stephen@networkplumber.org> References: <20200623235307.9216-1-stephen@networkplumber.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The term sub interface is more appropriate for bpf devices. Signed-off-by: Stephen Hemminger --- lib/bpf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bpf.c b/lib/bpf.c index c7d45077c14e..9271e169a992 100644 --- a/lib/bpf.c +++ b/lib/bpf.c @@ -666,7 +666,7 @@ static int bpf_gen_master(const char *base, const char *name) return bpf_gen_global(bpf_sub_dir); } -static int bpf_slave_via_bind_mnt(const char *full_name, +static int bpf_sub_via_bind_mnt(const char *full_name, const char *full_link) { int ret; @@ -689,7 +689,7 @@ static int bpf_slave_via_bind_mnt(const char *full_name, return ret; } -static int bpf_gen_slave(const char *base, const char *name, +static int bpf_gen_sub(const char *base, const char *name, const char *link) { char bpf_lnk_dir[PATH_MAX + NAME_MAX + 1]; @@ -709,7 +709,7 @@ static int bpf_gen_slave(const char *base, const char *name, return ret; } - return bpf_slave_via_bind_mnt(bpf_sub_dir, + return bpf_sub_via_bind_mnt(bpf_sub_dir, bpf_lnk_dir); } @@ -733,7 +733,7 @@ static int bpf_gen_hierarchy(const char *base) ret = bpf_gen_master(base, bpf_prog_to_subdir(__bpf_types[0])); for (i = 1; i < ARRAY_SIZE(__bpf_types) && !ret; i++) - ret = bpf_gen_slave(base, + ret = bpf_gen_sub(base, bpf_prog_to_subdir(__bpf_types[i]), bpf_prog_to_subdir(__bpf_types[0])); return ret; From patchwork Tue Jun 23 23:53:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 217239 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9668AC433E1 for ; Tue, 23 Jun 2020 23:53:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 686762098B for ; Tue, 23 Jun 2020 23:53:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="v3nxufkj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387907AbgFWXxX (ORCPT ); Tue, 23 Jun 2020 19:53:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387850AbgFWXxT (ORCPT ); Tue, 23 Jun 2020 19:53:19 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F6D6C061573 for ; Tue, 23 Jun 2020 16:53:19 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id s14so183317plq.6 for ; Tue, 23 Jun 2020 16:53:19 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=dP5k/r9w3jlzmTndtnmcpS5dbCt0BobrXyjxWIQuuWU=; b=v3nxufkjqjC/SpkNw49gQTcHHYYdlqv2EmwSdmcdc1O8B77ICdFn7pmGJWFPjWocZv Z+eJz1hWCqe5sPCfcJuiDbl8QbHAYzLdqAwU6pKQUkvq4DzigQ/3RoXWZRc2scmBQYcl kZFMUndnOhdvDADUt/w7N1z3W+w5rKiY2f//e20xtA0R9Pk7Ha/Dt4zo3AsFdpVx31G3 EzwvGKQ/22IyeumEj+cK5hTXgNnkUT/Slid7IlESGB7JMkM7gJGtecdd38JlTWuxGb5y HzfsojAIE3zXveaBPaSH/HDR4a8mZcG6lYt1/CTanmOGRxBnz2OhYDJjFKNu3XhE0WO/ 0h/A== 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:mime-version:content-transfer-encoding; bh=dP5k/r9w3jlzmTndtnmcpS5dbCt0BobrXyjxWIQuuWU=; b=esrjq7E4PVLi7IXVKyY6YQHJEqw/xhOL4BVgawLC/JBupxLbD1eng9fRkMNXXap6se 6IR5M8YbOssf3T4N3A2q5yYg3VkUxLInHDfE4JjpNDuhRKUOEZ/s56pOtmzzmeDBtzEJ vIsIS3bZp9LieCtPnr2sMiJJcMmNsj2tmDXpuf+6AJnFS7rDz/sip01XWcYTWGUGGJa3 gJQZnUU1S3u73TOqgE2wN67YzqWDXV0p8MhH5NmatFhN+STgB3dx78Ijp40lLpE3wdc8 PwVUHUkg2abl9rXHkPdMiLEYjs9fV8PyPECz9rdSPMWiCjSO2FMDrg3Ns/EteIGoJlr9 4V8g== X-Gm-Message-State: AOAM531jtVUlKl2iYlrrjPZC258bfdEuGL9ZU5EyO0xVLo9JD0sTbMCc 4oMV7564IUnL/9pGp+MyA/px14rdhX8= X-Google-Smtp-Source: ABdhPJwFOrWDETEQMzXYQrFBStogZxyIhow/mL+UMJNZfTeEXawESq+xsj4ae2WgvAR8GtXKdMdgcw== X-Received: by 2002:a17:90a:ac05:: with SMTP id o5mr26457335pjq.228.1592956398453; Tue, 23 Jun 2020 16:53:18 -0700 (PDT) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 23sm18096521pfy.199.2020.06.23.16.53.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 16:53:17 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2 2/5] bridge: remove slave from comments and message Date: Tue, 23 Jun 2020 16:53:04 -0700 Message-Id: <20200623235307.9216-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623235307.9216-1-stephen@networkplumber.org> References: <20200623235307.9216-1-stephen@networkplumber.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org No need for slave in comment and message. Can't change API (yet) since part of Linux uapi. Signed-off-by: Stephen Hemminger --- bridge/vlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridge/vlan.c b/bridge/vlan.c index 0d142bc9055d..9128769eaf3d 100644 --- a/bridge/vlan.c +++ b/bridge/vlan.c @@ -469,7 +469,7 @@ static void print_vlan_stats_attr(struct rtattr *attr, int ifindex) if (filter_vlan && filter_vlan != vstats->vid) continue; - /* skip pure port entries, they'll be dumped via the slave stats call */ + /* skip pure port entries, they'll be dumped via the port stats call */ if ((vstats->flags & BRIDGE_VLAN_INFO_MASTER) && !(vstats->flags & BRIDGE_VLAN_INFO_BRENTRY)) continue; @@ -592,7 +592,7 @@ static int vlan_show(int argc, char **argv, int subject) filt_mask = IFLA_STATS_FILTER_BIT(IFLA_STATS_LINK_XSTATS_SLAVE); if (rtnl_statsdump_req_filter(&rth, AF_UNSPEC, filt_mask) < 0) { - perror("Cannot send slave dump request"); + perror("Cannot send port stats dump request"); exit(1); } From patchwork Tue Jun 23 23:53:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 217238 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67D4AC433DF for ; Tue, 23 Jun 2020 23:53:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 427E5208A9 for ; Tue, 23 Jun 2020 23:53:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="NSsimIa0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387940AbgFWXx2 (ORCPT ); Tue, 23 Jun 2020 19:53:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387850AbgFWXxY (ORCPT ); Tue, 23 Jun 2020 19:53:24 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32A53C061755 for ; Tue, 23 Jun 2020 16:53:22 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id h185so215542pfg.2 for ; Tue, 23 Jun 2020 16:53:22 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=3mEJDzaWQ4l091KLnMAOuiONSZwy+jNM1y+BZ46c1vg=; b=NSsimIa0Zdja+mljoI1xzE1d06iK3b2dekprE/MFh6FlMx8bOuC/9ybnjUf434S54Q QqKO6WbW8Bp2nm0SnqiZO9LFnsyMDoc7sOy14BxJ52AFC2z4T6GboVHu70Vnyaszva6s 0YkwFxVRB5Mw0b6qpjoWNcmPJ3fhRyECuLuOmvfhbE0yUUDU3hkrLjTIzj5auXb3xPhe eiVvpQsUl1DuPNmX1ptIxzigeOL4vEmdjcyM57+eU1w563tWziyodmi4JopNXZKI6qOj Nr99JeYFmDMhp9o5tU/L+yjjlZ4ohSMJLbY0UOSJ0jJBNEQihpa7ux4cspO0aX/ne8a6 90yg== 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:mime-version:content-transfer-encoding; bh=3mEJDzaWQ4l091KLnMAOuiONSZwy+jNM1y+BZ46c1vg=; b=aXah5vUweVW0BRkMwUMp/xu74PU7DWfFMfQbVW6MPeohsJRU6HJdLEehyYgxm2JqQl CsbCtb86S42NNptgSkA/7Ppu1PafXKdLfhx5zU/MoLntVuDZvMh5Zll/Vs0h9PwSAo4j 36vIF8r2yKGmLfu9ks44qw6pSfVF+bq33bcDvTd3gcwiSL6eAUCr3muMlO2OcoJTrhuO ofFh1AFpwnQez+62RdkI2KHcsyLqG8kNz2nH6x6syoTX/NnCMB5YQZf61KTet+PJhbv0 QCVGXGQOK/JWdBU4KgCkK5GD+f0asufHBR1d12n4Y5R90HI0BLrbojnsEbsyUshk26Am WcwQ== X-Gm-Message-State: AOAM530OTo4grKWIjjojtzzL4RusttRq5S5ZiyinJfbeEtoSQcput0dD m6/bKaTc9sA5k9n5/uT/uUuV2x/XSMc= X-Google-Smtp-Source: ABdhPJwhVi82SRSi7QwaLXB22/8Ff6VhhBkuTxQtpBnxecd/2OdUJU8ZGrdoZM+U80D8dvoXssTj+Q== X-Received: by 2002:aa7:9599:: with SMTP id z25mr28556123pfj.176.1592956401284; Tue, 23 Jun 2020 16:53:21 -0700 (PDT) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 23sm18096521pfy.199.2020.06.23.16.53.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 16:53:20 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2 4/5] ip: replace slave_kind Date: Tue, 23 Jun 2020 16:53:06 -0700 Message-Id: <20200623235307.9216-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200623235307.9216-1-stephen@networkplumber.org> References: <20200623235307.9216-1-stephen@networkplumber.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Instead of slave_kind, rename variable to sub_kind to describe the kind of sub-device that is being looked for when filtering messages. Signed-off-by: Stephen Hemminger --- ip/ip_common.h | 2 +- ip/ipaddress.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ip/ip_common.h b/ip/ip_common.h index d604f7554405..7d0c9f57745a 100644 --- a/ip/ip_common.h +++ b/ip/ip_common.h @@ -23,7 +23,7 @@ struct link_filter { int group; int master; char *kind; - char *slave_kind; + char *sub_kind; int target_nsid; }; diff --git a/ip/ipaddress.c b/ip/ipaddress.c index f97eaff3dbbf..4cbff38c9834 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -924,7 +924,7 @@ int print_linkinfo(struct nlmsghdr *n, void *arg) if (filter.kind && match_link_kind(tb, filter.kind, 0)) return -1; - if (filter.slave_kind && match_link_kind(tb, filter.slave_kind, 1)) + if (filter.sub_kind && match_link_kind(tb, filter.sub_kind, 1)) return -1; if (n->nlmsg_type == RTM_DELLINK) @@ -2012,7 +2012,7 @@ static int ipaddr_list_flush_or_save(int argc, char **argv, int action) soff = strlen(*argv) - strlen("_slave"); if (!strcmp(*argv + soff, "_slave")) { (*argv)[soff] = '\0'; - filter.slave_kind = *argv; + filter.sub_kind = *argv; } else { filter.kind = *argv; }