Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp5515794rwb; Wed, 9 Aug 2023 05:32:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOQPmjT6XOijVVuCp93lI9ksPNhDnd2okj795ygnQ0LsO8ZBsgo0a0/6N7wUlbdvFt1Qz0 X-Received: by 2002:a17:906:3191:b0:994:1880:dc32 with SMTP id 17-20020a170906319100b009941880dc32mr2768447ejy.17.1691584331394; Wed, 09 Aug 2023 05:32:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691584331; cv=none; d=google.com; s=arc-20160816; b=jMEdQaV9XKnIl1+Xhs53/IgZ5cmj6Vh5/786GaNPOd/MI+ULnw67sMEmLBh+UUWkYA JOnB8ljs4NWYTmnGEHMcdJU8NQc8LbZXqxWmNXdVvRt7sYeu7SNsZhN2N2VOTn+xm0CY ecUS6w6Z59sTLuD/ZWHxvIAbDLIfL08XSGwL/05H/uS7DFWLntAkZmXvhJTZbx2WOWh9 5049+xvDWhScSWEF1YrPM4T1/Cld12EbSR89DQOMNT8d65r4DkBCe+XQaMjNY/IUd5h4 cL9FEm0B6amZCZy7QA8lw3JoHrU7QIm1bn4OdhtsDsEb9mmrgWl6iEI/P84PKDLOk1fv QNeA== 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=R61hbRCvsBK/Ss02RzPAv0qeqANHmJ0yfa+moN4/4Jk=; fh=LXcmG8X66NYjbXJJ/hZH2Em8OQGMHTcRrvEInU3ycx4=; b=DAo++zl4De/KgaZ+3kMazUBSN5nPNZqe7ukF6mNInolmpvKj2RvewGUGWtzVnK+mqp NXwe9kr6zT413Fpb7I1v+sLOHdUmMIP9NmDm3TFGTeNjC8oYgH2sg+G5r2SxYv9Kyq/L 9rkspAjTAGFArns7uX39/jy02p/qwSLeCrHmxJjf5GyBobM6D2grjGrrQA6Cmhh6SdZ+ ivMp4Vwl7tbd6Fg/vtOfEVsG40Qmc9xX/T5PnVBn1pU4cCEF6NOK1lG/W9QloMxR5Q5b kp2wohDHzDXCX4udIvj7iBhZ2H55VulPZn+5HKdAws9h6mQP6uoXrdhKA7Mi7qBPe8qg TavQ== 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 u27-20020a17090617db00b0099329251046si7326822eje.14.2023.08.09.05.31.46; Wed, 09 Aug 2023 05:32:11 -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 S230260AbjHIMK3 (ORCPT + 99 others); Wed, 9 Aug 2023 08:10:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231532AbjHIMK3 (ORCPT ); Wed, 9 Aug 2023 08:10:29 -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 798DB1FDF for ; Wed, 9 Aug 2023 05:10:28 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-124-iGeVhJ_INwOx6wUxFJOhlQ-1; Wed, 09 Aug 2023 08:10:24 -0400 X-MC-Unique: iGeVhJ_INwOx6wUxFJOhlQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0F5873811F40; Wed, 9 Aug 2023 12:10:24 +0000 (UTC) Received: from hog (unknown [10.45.224.100]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CA9105CC01; Wed, 9 Aug 2023 12:10:22 +0000 (UTC) Date: Wed, 9 Aug 2023 14:10:21 +0200 From: Sabrina Dubroca To: "Radu Pirea (OSS)" Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: macsec: use TX SCI as MAC address Message-ID: References: <20230808141429.220830-1-radu-nicolae.pirea@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.5 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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-08-09, 09:37:40 +0300, Radu Pirea (OSS) wrote: > > > On 08.08.2023 18:22, Sabrina Dubroca wrote: > > 2023-08-08, 17:14:29 +0300, Radu Pirea (NXP OSS) wrote: > > > According to IEEE 802.1AE the SCI comprises the MAC address and the port > > > identifier. > > > > I don't think the SCI needs to be composed of the actual device's MAC > > address. 8.2.1 says that the MAC address *can* be used to compose the > > SCI, but doesn't mandate it. > I used IEEE 802.1AE-2018 as documentation and the text is slightly > different. However, the purpose of this patch is not to force this match > between the MAC address and the SCI, is just to have different MAC addresses > when the interfaces are created with an specific SCI. > > For example, the following command will not set 00:01:be:be:ef:17 as MAC > address for the new interface. Would you expect that? > ip link add link enet_p2 macsec0 type macsec address 00:01:be:be:ef:17 port > 1 encrypt on Yes, because "address XXX" comes after "type macsec", so it's an argument of "type macsec", not of "ip link". IMO the manpage is pretty clear about this. The command you want is: ip link add link enet_p2 macsec0 addr 00:01:be:be:ef:17 type macsec port 1 encrypt on And with this, I don't think your patch is needed at all. It would even introduce an undesireable behavior, in case an explicit address is provided (as in my command example) alongside a full SCI (instead of just the port). -- Sabrina