Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1820608ybh; Tue, 14 Jul 2020 08:10:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyFvn7dGNF1xBN747BvlNp5/rEczqQu7iWTIZTfiPnfygWoHRunjVCWk1nO+RYqsTcCD19 X-Received: by 2002:a05:6402:742:: with SMTP id p2mr4785832edy.135.1594739429258; Tue, 14 Jul 2020 08:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594739429; cv=none; d=google.com; s=arc-20160816; b=Wz3A4DndpZESd9DjOOZhQdEiKdq2Eh8cE19V9VEjOMDZKB2AG8HE8iMID+MyVImXDG 2GD070Tu4Ejb7WV/5YhBXMZVHr6rl3gkVl+IiIeIVW6iZByj1mKOnlcgSM80L0OAdceP RtC3+lKWX5Fhgc9RHiuu/5Bnziy/kYf/QoR1JYWya0DWENKH5XjY/rtk506JyfMYNv6f xvIgBB0ggH4WuHBSQUYPMaZDu2BrV+TZAzVJSmc00RTVt5Rs/vKy7GWTK2oTkdk71bU8 74i/quLN+Zr2TXZaVvJSuw4ThfbsRMeZO1mFV5LAqzXzcYFRA8vKcj99yQmTHg81H5Zm 5bCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:dkim-signature; bh=/bJZ4RmJ65BBujB5SS2labFhSb9UMcgTYEb8gx62VFU=; b=I6usQM0xrEY8eyESWpI0jqkXTPBzGhvSI6tUvdNfD/29fwyBqVogEs4Vta2N8kYecT SuHUeRN1v0ZMjrh6IPpjFvDkiRvA4wbF7dxUdY8D/SeRR1zf0DYGRGpDpIXBSrC2OCZw C26neb0XMZY/3ixRRn88U3IvowzUNxfX5tl5UdH3y0SJ7rm/ARK0ltFk0yYsZly/RwTE j0/qZsQ22UfnX3y/U1YJ0AZXkzHMtzUwbRtMDqIShk4i8eyuQyhU6I26+Q14xF3Q7Z4j mluCJ6PNBQiWTZJkrhx2a/R1raUBmBZgvTF+GzE1ZbKi2aJKAo5aTdjpLTBiUsb8s0Yz RrDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=Unde2c2H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f10si11292567edr.215.2020.07.14.08.10.05; Tue, 14 Jul 2020 08:10:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=Unde2c2H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728716AbgGNPHs (ORCPT + 99 others); Tue, 14 Jul 2020 11:07:48 -0400 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:7943 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727044AbgGNPHs (ORCPT ); Tue, 14 Jul 2020 11:07:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1594739267; x=1626275267; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=r4E3DoO/243oOPim9W7seyYjqcxT6G/IVb7gOQ45Lro=; b=Unde2c2H4RzcmdcUM7YRZdV4sWorooEnnEm+QKlTwoxd5COaX7NneoYe 4K3JRmjJw/WLYJ1Ecm1ndYV4UkW2FDkFaqqS1Euty2ZdOKVTYzRcQqR6j YKP5rZ9/oRip+bM2npaibp0i4odQo8v8PU6CmfUZdOzhLGXI4Nxw7UBgn 8mQz6twKxqWebfOoOUIUM36pAlvNWeDR87NQGVHooBin+WhNTSkiZBWeD Jrh3feZYk67zjzR8XSvmVHHMLapBfsTz9EM9PNrT1cvaSbSIfm7ItFhfN PR8gpEa3c9+FgFT9jnuShsiLokQmd+0YAuqiDGNnhJCglIJ6t1qmkshNw Q==; IronPort-SDR: xDQSwPuhqU7Ybp5HXbBfTw7cq+gRPc6CJJmlk9FcqnzuBAMlCMPHO4oL+j9RO1j+qZonhl9nQj ipIqKBX5v7ZnmdwN6YOdaytNUgEhfZPVoyNncEWAd5S+XdxGVDHzN1sIqxuIYYfCyC1/4JX3SC 6BudxW5pHXORtW29hNKBlT+DLq5GE0J9+bluOqhVuNzsxceWDnKlkYoyNclz1AaNMasSh5gqla h2o7ousKExjo3i97YlWwdwkyVbrI+N681OYJSq4zLih25GXhxc/UiT9lhTOTUMINVP4BQNDaM8 ws4= X-IronPort-AV: E=Sophos;i="5.75,350,1589266800"; d="scan'208";a="81800580" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Jul 2020 08:07:47 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Tue, 14 Jul 2020 08:07:46 -0700 Received: from localhost (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Tue, 14 Jul 2020 08:07:14 -0700 Date: Tue, 14 Jul 2020 17:07:40 +0200 From: Horatiu Vultur To: Nikolay Aleksandrov CC: , , , , , , , , , Subject: Re: [PATCH net-next v4 12/12] net: bridge: Add port attribute IFLA_BRPORT_MRP_IN_OPEN Message-ID: <20200714150740.3ji3qhtvikhrizfn@soft-dev3.localdomain> References: <20200714073458.1939574-1-horatiu.vultur@microchip.com> <20200714073458.1939574-13-horatiu.vultur@microchip.com> <9eeb89c5-865f-2b21-c7c6-7f4479bf4175@cumulusnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <9eeb89c5-865f-2b21-c7c6-7f4479bf4175@cumulusnetworks.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 07/14/2020 16:29, Nikolay Aleksandrov wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > On 14/07/2020 10:34, Horatiu Vultur wrote: > > This patch adds a new port attribute, IFLA_BRPORT_MRP_IN_OPEN, which > > allows to notify the userspace when the node lost the contiuity of > > MRP_InTest frames. > > > > Signed-off-by: Horatiu Vultur > > --- > > include/uapi/linux/if_link.h | 1 + > > net/bridge/br_netlink.c | 3 +++ > > tools/include/uapi/linux/if_link.h | 1 + > > 3 files changed, 5 insertions(+) > > Hi Nik, > > It's kind of late by now, but I'd wish these were contained in a nested MRP attribute. :) > Horatiu, do you expect to have many more MRP attributes outside of MRP netlink code? I don't expect to add any other MRP attributes outside of MRP netlink code. > > Perhaps we should at least dump them only for MRP-aware ports, that should be easy. > They make no sense outside of MRP anyway, but increase the size of the dump for all > right now. You are right. Then should I first send a fix on the net for this and after that I will fix these patches or just fix this in the next patch series? > > Acked-by: Nikolay Aleksandrov > > > diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h > > index cc185a007ade8..26842ffd0501d 100644 > > --- a/include/uapi/linux/if_link.h > > +++ b/include/uapi/linux/if_link.h > > @@ -344,6 +344,7 @@ enum { > > IFLA_BRPORT_ISOLATED, > > IFLA_BRPORT_BACKUP_PORT, > > IFLA_BRPORT_MRP_RING_OPEN, > > + IFLA_BRPORT_MRP_IN_OPEN, > > __IFLA_BRPORT_MAX > > }; > > #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) > > diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c > > index c532fa65c9834..147d52596e174 100644 > > --- a/net/bridge/br_netlink.c > > +++ b/net/bridge/br_netlink.c > > @@ -152,6 +152,7 @@ static inline size_t br_port_info_size(void) > > #endif > > + nla_total_size(sizeof(u16)) /* IFLA_BRPORT_GROUP_FWD_MASK */ > > + nla_total_size(sizeof(u8)) /* IFLA_BRPORT_MRP_RING_OPEN */ > > + + nla_total_size(sizeof(u8)) /* IFLA_BRPORT_MRP_IN_OPEN */ > > + 0; > > } > > > > @@ -216,6 +217,8 @@ static int br_port_fill_attrs(struct sk_buff *skb, > > !!(p->flags & BR_NEIGH_SUPPRESS)) || > > nla_put_u8(skb, IFLA_BRPORT_MRP_RING_OPEN, !!(p->flags & > > BR_MRP_LOST_CONT)) || > > + nla_put_u8(skb, IFLA_BRPORT_MRP_IN_OPEN, > > + !!(p->flags & BR_MRP_LOST_IN_CONT)) || > > nla_put_u8(skb, IFLA_BRPORT_ISOLATED, !!(p->flags & BR_ISOLATED))) > > return -EMSGSIZE; > > > > diff --git a/tools/include/uapi/linux/if_link.h b/tools/include/uapi/linux/if_link.h > > index cafedbbfefbe9..781e482dc499f 100644 > > --- a/tools/include/uapi/linux/if_link.h > > +++ b/tools/include/uapi/linux/if_link.h > > @@ -344,6 +344,7 @@ enum { > > IFLA_BRPORT_ISOLATED, > > IFLA_BRPORT_BACKUP_PORT, > > IFLA_BRPORT_MRP_RING_OPEN, > > + IFLA_BRPORT_MRP_IN_OPEN, > > __IFLA_BRPORT_MAX > > }; > > #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) > > > -- /Horatiu