Received: by 2002:a05:7412:3210:b0:e2:908c:2ebd with SMTP id eu16csp1177387rdb; Fri, 1 Sep 2023 15:41:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGpsDvXFXvhqkL3VH5w28In4AH3Tnz/JLkpywS43z22/rSAkZpEb9SLFCrrIMGg4B2SRSed X-Received: by 2002:a17:902:f54d:b0:1c0:953d:3a with SMTP id h13-20020a170902f54d00b001c0953d003amr4943391plf.29.1693608102875; Fri, 01 Sep 2023 15:41:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693608102; cv=none; d=google.com; s=arc-20160816; b=D1CgbaMcGAQw69hcOLZRJygnDj34fBb0MNtk4u9cxK3en/doMd8saxCDANuu1HcEVw w2UHEjuSyI4/xAMCnw4MPygvDOEwtLspqfP6R+xtvU4AP89ofNG1uhrXQ9y0j/GfoVkz h1Utcss06SplqROwjalm6w2jRbQbfGnMm8s83fCvvA04vREaVhZMB9q03pgd+mG8vayH mxcAWe7kop6FQpH9n81UvE/i8MW7isxbiVmVx70VWuPGrJ0nMLIlRik7/lTORzRA764t aBFfZswgnH33Tiqc+DFUJnlcRU0idyziloj33OzbdmRnNK9kuHbepg3JQgtVSAtMsYDN 1/tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=qZberMW1v4szLbgrG+AjX0QJY7ckDOHgh0KevgFX9HU=; fh=H3bc5MKE/G/TrUcMZcOOFR2QsYONXleNbmfBrRwTV/w=; b=dUJ+dqJ30Wwz61o1NxKedqhY0P7QNWW4u1iFUFU7AsH3l03rVGErH6lC0lYm17v3DG oI7ZvqcaPAJ0Pr+iThyhS3FwGIffX0lCPXmfPhcjHPY2RoAWBAuE8As5YDwHI3M56lX/ RbnVs6ONo0cQ8lPQFMquelPBMXNrgLT1haspdI/+MkMZabI4ZZ36WUvLRnh6Bpc0cNyR JAovoiuMI3s02HIWPx0sKVglLOWNGuUyCsEISy6LtMwsxfxnjgd93kg2xF/lTL7gbc4G 5cJn2eT+uppH+Kwb/AUGMVpEXXhHY9xo+RO15agWYkHoI8LCcn8c9Kf6Ua5dFHZEDLwF ermQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p21-20020a170902f09500b001b8af83d939si3322110pla.537.2023.09.01.15.41.30; Fri, 01 Sep 2023 15:41:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235576AbjIAPiJ (ORCPT + 99 others); Fri, 1 Sep 2023 11:38:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbjIAPiJ (ORCPT ); Fri, 1 Sep 2023 11:38:09 -0400 Received: from us-smtp-delivery-44.mimecast.com (us-smtp-delivery-44.mimecast.com [205.139.111.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A41810E0 for ; Fri, 1 Sep 2023 08:38:06 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-250-_sMitSrMPp-aigNXGlT-DA-1; Fri, 01 Sep 2023 11:38:03 -0400 X-MC-Unique: _sMitSrMPp-aigNXGlT-DA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DEA99805C10; Fri, 1 Sep 2023 15:38:02 +0000 (UTC) Received: from hog (unknown [10.45.224.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E81EAD4781C; Fri, 1 Sep 2023 15:38:00 +0000 (UTC) Date: Fri, 1 Sep 2023 17:37:59 +0200 From: Sabrina Dubroca To: "Radu Pirea (OSS)" Cc: "atenart@kernel.org" , "andrew@lunn.ch" , "linux@armlinux.org.uk" , "hkallweit1@gmail.com" , "davem@davemloft.net" , Sebastian Tobuschat , "linux-kernel@vger.kernel.org" , "pabeni@redhat.com" , "richardcochran@gmail.com" , "edumazet@google.com" , "kuba@kernel.org" , "netdev@vger.kernel.org" Subject: Re: [RFC net-next v2 5/5] net: phy: nxp-c45-tja11xx: implement mdo_insert_tx_tag Message-ID: References: <20230824091615.191379-1-radu-nicolae.pirea@oss.nxp.com> <20230824091615.191379-6-radu-nicolae.pirea@oss.nxp.com> <5d42d6c9-2f0c-8913-49ec-50a25860c49f@oss.nxp.com> <518c11e9000f895fddb5b3dc4d5b2bf445cf320f.camel@nxp.com> <831bc700-a9a2-7eda-e97b-e1d54dc806f9@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2023-09-01, 17:22:49 +0300, Radu Pirea (OSS) wrote: > > > On 01.09.2023 16:57, Sabrina Dubroca wrote: > > 2023-09-01, 14:58:12 +0300, Radu Pirea (OSS) wrote: > > > On 01.09.2023 13:07, Sabrina Dubroca wrote: > > > > > (the interface was up before) > > > > > [root@alarm ~]# ip link add link end0 macsec0 type macsec encrypt on > > > > > offload phy > > > > > [root@alarm ~]# ip link set end0 down > > > > > [root@alarm ~]# ip macsec add macsec0 rx port 1 address > > > > > 00:01:be:be:ef:33 > > > > > RTNETLINK answers: Operation not supported > > > > > > > > Where does that EOPNOTSUPP come from? nxp_c45_mdo_add_rxsc from this > > > > version of the code can't return that, and macsec_add_rxsc also > > > > shouldn't at this point. > > > > > > This is the source of -EOPNOTSUPP > > > https://elixir.bootlin.com/linux/latest/source/drivers/net/macsec.c#L1928 > > > > Could you check which part of macsec_get_ops is failing? Since > > macsec_newlink with "offload phy" worked, macsec_check_offload > > shouldn't fail, so why does macsec_get_ops return NULL? > > real_dev->phydev was NULL'ed? > > This check logical and returns false: > https://elixir.bootlin.com/linux/latest/source/drivers/net/macsec.c#L343 > > real_dev->phydev was nulled. > The call stack is next: > fec_enet_close -> phy_disconnect -> phy_detach -> > https://elixir.bootlin.com/linux/latest/source/drivers/net/phy/phy_device.c#L1815 Ok, thanks for looking this up. So we can't have a consistent behavior between SW and PHY modes unfortunately. -- Sabrina