From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B117BC61DA4 for ; Fri, 3 Feb 2023 20:44:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232929AbjBCUob (ORCPT ); Fri, 3 Feb 2023 15:44:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230042AbjBCUo2 (ORCPT ); Fri, 3 Feb 2023 15:44:28 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CBC21DB8D; Fri, 3 Feb 2023 12:44:27 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id l37-20020a05600c1d2500b003dfe46a9801so3299593wms.0; Fri, 03 Feb 2023 12:44:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2i9kAduLyvWzDNPasV+KzeGgY8drvOps/KxoO5LHdEw=; b=Vh4yFSLP4dnir5alPOP/BdqGJ1iEQMpXhQ+vDTowlNH9vMovkkNBYPi8Uhk8C7itGw pWJPGbneNPZx8bgItqJXAuo9hewbHrvUsmkjhmhjo7iVzDaPKFrVlDjUisuzBbOPzaBk hoew3vOtR7JhNkpbPch0cih/aKZQY3wZX9AulnE0kyyhblR3bKcZnRU35XovU5/9VbYj lHi0Szbc9Ujf075Lgy9ykV7iQTSzJNKLodhKzj3evBAx2txbaKjEgLHvLZEo7Spemc80 Fne13usGX0QFsuTnmHXtqiB94MQK2ebcXK5/Xito6NgmRWOGINev3LN1yORMLgTrA/pn 3OHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2i9kAduLyvWzDNPasV+KzeGgY8drvOps/KxoO5LHdEw=; b=tQRDvalvBCu8Jr0AZDgMSa5WvOI9wSuQwQEWnyWUut5i0QdFndpJwXlscBnaTfLWKy wtfBT3bsid09OJLr0JFLMTZOsEbofvG0FLa6/DFRcmZhzvIIpKPzqAT6LlUzg3t9lT9Y U7k+l6UdCl/oa+KZjwvYiQaJCU6iOazXMbjhEcZgzt2178NBB/eSafKm2W99UUIXehOX 8j2X8N91vhwSe9op3vIL+ymyHCLJhAV0cTWag1AkP1oxTtJKcGL+Iappt/w++t+ynbUi IuTX3RJVPSyZ9prJA25WeX7t3d9aFmv9cUGGBit+j07m9yz4/lyDu2YupULJ4J+NWaO/ 3iow== X-Gm-Message-State: AO0yUKW/pCDgPFsqDHgXW+BeaDg4+0xEPxctLNO2zTuB+HrzI9Rv1lY6 y43RkoVoT0+qTnf94gRQLdM= X-Google-Smtp-Source: AK7set+E0bvJKJbO9QlN+pgygfVmSHBtgpwZ8dotHCW3HBDbg/640wbwRlbuPaDZ1oHGBTvA8Ms6OQ== X-Received: by 2002:a05:600c:1994:b0:3d3:5709:68e8 with SMTP id t20-20020a05600c199400b003d3570968e8mr10077158wmq.36.1675457065628; Fri, 03 Feb 2023 12:44:25 -0800 (PST) Received: from skbuf ([188.26.57.116]) by smtp.gmail.com with ESMTPSA id r30-20020adfa15e000000b002bfafadb22asm2834308wrr.87.2023.02.03.12.44.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 12:44:25 -0800 (PST) Date: Fri, 3 Feb 2023 22:44:22 +0200 From: Vladimir Oltean To: Simon Horman Cc: netdev@kapio-technology.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Florian Fainelli , Andrew Lunn , Eric Dumazet , Paolo Abeni , Kurt Kanzenbach , Hauke Mehrtens , Woojung Huh , "maintainer:MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER" , Sean Wang , Landen Chao , DENG Qingfang , Matthias Brugger , Claudiu Manoil , Alexandre Belloni , =?utf-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Nikolay Aleksandrov , Russell King , Christian Marangi , open list , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" , "open list:RENESAS RZ/N1 A5PSW SWITCH DRIVER" , "moderated list:ETHERNET BRIDGE" Subject: Re: [PATCH net-next 5/5] net: dsa: mv88e6xxx: implementation of dynamic ATU entries Message-ID: <20230203204422.4wrhyathxfhj6hdt@skbuf> References: <20230130173429.3577450-1-netdev@kapio-technology.com> <20230130173429.3577450-6-netdev@kapio-technology.com> <9b12275969a204739ccfab972d90f20f@kapio-technology.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 03, 2023 at 09:20:22AM +0100, Simon Horman wrote: > > else if (someflag) > > dosomething(); > > > > For now only one flag will actually be set and they are mutually exclusive, > > as they will not make sense together with the potential flags I know, but > > that can change at some time of course. > > Yes, I see that is workable. I do feel that checking for other flags would > be a bit more robust. But as you say, there are none. So whichever > approach you prefer is fine by me. The model we have for unsupported bits in the SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS and SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS handlers is essentially this: if (flags & ~(supported_flag_mask)) return -EOPNOTSUPP; if (flags & supported_flag_1) ... if (flags & supported_flag_2) ... I suppose applying this model here would address Simon's extensibility concern. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17BC6C61DA4 for ; Fri, 3 Feb 2023 20:46:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BX2ajKiS3LwAliPwk3C77bml/LedR03NGvSZvrDuUdw=; b=jl6kI9656Tp5aa FCtWfjeNUt+cSE9c79zh+iWiXMdfzzdP2x2d8PUU8hsTIlWbjG+5WJDyNXubvlgok3h4FLyCXuCgy siDH0zRI9P/puVaIfsgRLdKO5U5TLAJUPyi0Rlf26u+P66pQ9Oc4Rgy1lIhg6qNFIDLGHRkcgvANb 6TwheBUBnkFT8iXv7hlKKTsvNMsLOpmqvYJqdH3rd67sWuwUX+gWpfFCqK+HQESvvxLUaX7tSzIIY l+DSN6k+Fnl9VxSHv3YBA03MVqsrjmU6ihSKkX0FhSOXaqNB8Oar40QL757TbzL0dheuOdptcXZQY YnlUdbo4JHUlMe9uyy0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pO2vB-003XXK-Bs; Fri, 03 Feb 2023 20:44:33 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pO2v7-003XVZ-RA; Fri, 03 Feb 2023 20:44:31 +0000 Received: by mail-wm1-x331.google.com with SMTP id k16so4771596wms.2; Fri, 03 Feb 2023 12:44:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2i9kAduLyvWzDNPasV+KzeGgY8drvOps/KxoO5LHdEw=; b=Vh4yFSLP4dnir5alPOP/BdqGJ1iEQMpXhQ+vDTowlNH9vMovkkNBYPi8Uhk8C7itGw pWJPGbneNPZx8bgItqJXAuo9hewbHrvUsmkjhmhjo7iVzDaPKFrVlDjUisuzBbOPzaBk hoew3vOtR7JhNkpbPch0cih/aKZQY3wZX9AulnE0kyyhblR3bKcZnRU35XovU5/9VbYj lHi0Szbc9Ujf075Lgy9ykV7iQTSzJNKLodhKzj3evBAx2txbaKjEgLHvLZEo7Spemc80 Fne13usGX0QFsuTnmHXtqiB94MQK2ebcXK5/Xito6NgmRWOGINev3LN1yORMLgTrA/pn 3OHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2i9kAduLyvWzDNPasV+KzeGgY8drvOps/KxoO5LHdEw=; b=nmRLM8WwF/39I54MnEYckO8Exk0YYtT2k+BQCMZQm9Fx0Lur6V8yRIXF854f4xw78F zslhcxAy4U7Svi0R1u2hegWFoYETPdulMBXXqcglAQsNt08vjaUaEdOVCfOucDtcugeS i5G1Cu68UtLAG5+dXOwrtpqfPADbaZzSGSPCBfBKrTyDFK6H/CgNSyotzwEJ0TmdiX5H 34hEZTkdcoBE/4jwRzVw/9mAEGnGGS3nTyurgCZE4T++5YiG3ixwV7oRVJK2jJqD9HqS dOMfV4mAHqrnh2Ub/IYAMNtYGusttb74CUduKVORfMUS9Ik2VhAfnjDlzceTOfAEfsiK Zdag== X-Gm-Message-State: AO0yUKV6eURQFGdfakDC4Owsbq/wcsL0sh/E4UIDbFRioxrYSyPbJzIo QXTyGTfKGhAE9dxnAKAHxk0= X-Google-Smtp-Source: AK7set+E0bvJKJbO9QlN+pgygfVmSHBtgpwZ8dotHCW3HBDbg/640wbwRlbuPaDZ1oHGBTvA8Ms6OQ== X-Received: by 2002:a05:600c:1994:b0:3d3:5709:68e8 with SMTP id t20-20020a05600c199400b003d3570968e8mr10077158wmq.36.1675457065628; Fri, 03 Feb 2023 12:44:25 -0800 (PST) Received: from skbuf ([188.26.57.116]) by smtp.gmail.com with ESMTPSA id r30-20020adfa15e000000b002bfafadb22asm2834308wrr.87.2023.02.03.12.44.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 12:44:25 -0800 (PST) Date: Fri, 3 Feb 2023 22:44:22 +0200 From: Vladimir Oltean To: Simon Horman Cc: netdev@kapio-technology.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Florian Fainelli , Andrew Lunn , Eric Dumazet , Paolo Abeni , Kurt Kanzenbach , Hauke Mehrtens , Woojung Huh , "maintainer:MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER" , Sean Wang , Landen Chao , DENG Qingfang , Matthias Brugger , Claudiu Manoil , Alexandre Belloni , =?utf-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , Jiri Pirko , Ivan Vecera , Roopa Prabhu , Nikolay Aleksandrov , Russell King , Christian Marangi , open list , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" , "open list:RENESAS RZ/N1 A5PSW SWITCH DRIVER" , "moderated list:ETHERNET BRIDGE" Subject: Re: [PATCH net-next 5/5] net: dsa: mv88e6xxx: implementation of dynamic ATU entries Message-ID: <20230203204422.4wrhyathxfhj6hdt@skbuf> References: <20230130173429.3577450-1-netdev@kapio-technology.com> <20230130173429.3577450-6-netdev@kapio-technology.com> <9b12275969a204739ccfab972d90f20f@kapio-technology.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230203_124429_923062_40D16A5B X-CRM114-Status: GOOD ( 16.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Feb 03, 2023 at 09:20:22AM +0100, Simon Horman wrote: > > else if (someflag) > > dosomething(); > > > > For now only one flag will actually be set and they are mutually exclusive, > > as they will not make sense together with the potential flags I know, but > > that can change at some time of course. > > Yes, I see that is workable. I do feel that checking for other flags would > be a bit more robust. But as you say, there are none. So whichever > approach you prefer is fine by me. The model we have for unsupported bits in the SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS and SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS handlers is essentially this: if (flags & ~(supported_flag_mask)) return -EOPNOTSUPP; if (flags & supported_flag_1) ... if (flags & supported_flag_2) ... I suppose applying this model here would address Simon's extensibility concern. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5E5798224E DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 874CB8224D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2i9kAduLyvWzDNPasV+KzeGgY8drvOps/KxoO5LHdEw=; b=Vh4yFSLP4dnir5alPOP/BdqGJ1iEQMpXhQ+vDTowlNH9vMovkkNBYPi8Uhk8C7itGw pWJPGbneNPZx8bgItqJXAuo9hewbHrvUsmkjhmhjo7iVzDaPKFrVlDjUisuzBbOPzaBk hoew3vOtR7JhNkpbPch0cih/aKZQY3wZX9AulnE0kyyhblR3bKcZnRU35XovU5/9VbYj lHi0Szbc9Ujf075Lgy9ykV7iQTSzJNKLodhKzj3evBAx2txbaKjEgLHvLZEo7Spemc80 Fne13usGX0QFsuTnmHXtqiB94MQK2ebcXK5/Xito6NgmRWOGINev3LN1yORMLgTrA/pn 3OHA== Date: Fri, 3 Feb 2023 22:44:22 +0200 From: Vladimir Oltean Message-ID: <20230203204422.4wrhyathxfhj6hdt@skbuf> References: <20230130173429.3577450-1-netdev@kapio-technology.com> <20230130173429.3577450-6-netdev@kapio-technology.com> <9b12275969a204739ccfab972d90f20f@kapio-technology.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Bridge] [PATCH net-next 5/5] net: dsa: mv88e6xxx: implementation of dynamic ATU entries List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Simon Horman Cc: Andrew Lunn , Alexandre Belloni , Nikolay Aleksandrov , Kurt Kanzenbach , Eric Dumazet , netdev@kapio-technology.com, Ivan Vecera , Florian Fainelli , "moderated list:ETHERNET BRIDGE" , Russell King , Roopa Prabhu , kuba@kernel.org, Paolo Abeni , =?utf-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , Christian Marangi , Woojung Huh , Landen Chao , Jiri Pirko , Hauke Mehrtens , Sean Wang , DENG Qingfang , Claudiu Manoil , "moderated list:ARM/Mediatek SoC support" , Matthias Brugger , "moderated list:ARM/Mediatek SoC support" , netdev@vger.kernel.org, open list , "maintainer:MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER" , "open list:RENESAS RZ/N1 A5PSW SWITCH DRIVER" , davem@davemloft.net On Fri, Feb 03, 2023 at 09:20:22AM +0100, Simon Horman wrote: > > else if (someflag) > > dosomething(); > > > > For now only one flag will actually be set and they are mutually exclusive, > > as they will not make sense together with the potential flags I know, but > > that can change at some time of course. > > Yes, I see that is workable. I do feel that checking for other flags would > be a bit more robust. But as you say, there are none. So whichever > approach you prefer is fine by me. The model we have for unsupported bits in the SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS and SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS handlers is essentially this: if (flags & ~(supported_flag_mask)) return -EOPNOTSUPP; if (flags & supported_flag_1) ... if (flags & supported_flag_2) ... I suppose applying this model here would address Simon's extensibility concern.