Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11450538rwd; Thu, 22 Jun 2023 13:30:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7u1QU4lOfpazrK7DQq8zaE3hHzS47MEyJHa26zMvXnkzblQuI4QN9fE4SYFnx4gnNyrmDP X-Received: by 2002:a05:6870:b302:b0:19e:34f8:4d4f with SMTP id a2-20020a056870b30200b0019e34f84d4fmr14022048oao.32.1687465815239; Thu, 22 Jun 2023 13:30:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687465815; cv=none; d=google.com; s=arc-20160816; b=GVWXLkfTGNDN2LIHxPCEb7Q3m8WOBSrYOy4+jeQyl7AZtLKkgO1W/+FgtvI67n1DMb QZ/tWXGYFtuySVaBx6PsyK9uk813BI7nyomk5wMWwaY8QokAIFfqZ3A7uqkhZevijsMy 4ilHgFIcce78bEHCOpPJXofXJ+1ND5dGD2W4/s8Nb70FDnMToUjuYSkSmWX+kstEMht4 p+bpXAo0I4tPCu46AZro36gVC5ISfcFv56ltCWb5AyIoip96YiOdwZ95HUqDJpgy9U1H UbRYOhlI3a8i9JeAvk3P9DqjiYDTvPllEZU6alSO3j7h63hihEXmGjk1attmkB2o9TJ4 XnXw== 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=WG0uz4gqdZ7SJ07EVjiw7v/fWmioCrPXPxSXwJL/oMo=; b=rb7D/Ftj9OVvxF44du3QUNFPo3eW1LNrpjlBIrccsCViKhmrNQyE2eYJ7UdtnPNJDe +YTC96dmmwwnXbvc1+0ALHCWdKVO86cmTvg5zrS4xANtKI4dpbUyCkIJxsySPZJERlKk 5e/8G0Kx9yjBoOHNAJsjPjIpVw84Y9g5ebMqXxG3mty86d4tgAX33hSuoG0ogkMFvDI9 lpBnN+krqLuCDk0c7k5FRu3EhvyNwc0BBRlbdvjSSP2iR9gVrxqRZA0A6lMC/cyEs4ch 4q4ufN0WWjO2frssdh4358c1ILTmXI1zel+KMYnFhOwoPr6j1/tygoEc4xD3pqJs4mM2 Vklg== 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 x191-20020a6386c8000000b00552db08cd8bsi7291235pgd.730.2023.06.22.13.30.02; Thu, 22 Jun 2023 13:30:15 -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 S230484AbjFVT4k (ORCPT + 99 others); Thu, 22 Jun 2023 15:56:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230379AbjFVT4j (ORCPT ); Thu, 22 Jun 2023 15:56:39 -0400 X-Greylist: delayed 78 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 22 Jun 2023 12:56:37 PDT Received: from us-smtp-delivery-44.mimecast.com (unknown [207.211.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E13161BDA for ; Thu, 22 Jun 2023 12:56:37 -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-311-ABNjBXxtP72N4mZmt67qWQ-1; Thu, 22 Jun 2023 15:55:00 -0400 X-MC-Unique: ABNjBXxtP72N4mZmt67qWQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A8D64856506; Thu, 22 Jun 2023 19:54:55 +0000 (UTC) Received: from hog (unknown [10.39.195.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9FBCE2166B25; Thu, 22 Jun 2023 19:54:54 +0000 (UTC) Date: Thu, 22 Jun 2023 21:54:53 +0200 From: Sabrina Dubroca To: Carlos Fernandez Cc: Jakub Kicinski , "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3] net: macsec SCI assignment for ES = 0 Message-ID: References: <20230620091301.21981-1-carlos.fernandez@technica-engineering.de> <20230621173429.18348fc8@kernel.org> 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.6 X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_VALIDITY_RPBL,RDNS_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Carlos, 2023-06-22, 11:49:44 +0000, Carlos Fernandez wrote: > Hi Jakub, > > Also, about the double look up: > I know it's there, but I tried to only change the function that returns the correct SCI in every case. Also, it should be a 1 and only item list. I do not think this should be dangerous or slow. Why is it a 1 item list? Even if that was guaranteed to be true in normal conditions, we could have a situation where lots of MACsec SecYs and RXSCs are set up, and packets start hitting this loop. And could you quote the correct section of 802.1AE? I can't find the reference for the behavior you're implementing in this patch. All I can find is (from section 9.5): The ES bit is clear if the Source Address is not used to determine the SCI. The SC bit shall be clear if an SCI is not present in the SecTAG. which doesn't say anything about how to interpret both bits being clear. (and please don't top-post) Thanks, -- Sabrina