Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2127634rdh; Tue, 26 Sep 2023 13:22:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1fZhbJyr8KTE7GMrFhGJEbFoaXl1YPjex7/bPoZEZqUw1nq9WOnPBU+hfM9LbTbZGdkmg X-Received: by 2002:a05:6a00:8ca:b0:68a:52ec:3d36 with SMTP id s10-20020a056a0008ca00b0068a52ec3d36mr57180pfu.31.1695759738806; Tue, 26 Sep 2023 13:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695759738; cv=none; d=google.com; s=arc-20160816; b=UBg53xDEk/V9l3Qo5GP+59F5nIFzmLESsHFLBxoaz6yPdUUZ9C0IaRKoSwG39J6VBM vtdWrMEO+RBzFZxe6ej4unq6T9j+2fX+wq05YqTtuTTiHbs2HYxru4V9nA/+Epya54mz ypWUr+9jH8ZANAR98NoqzaGLIYWCZNr8juUTphvJjX1rXkSYA6tsQGXPXFWupb+Mctj0 UWo46YQhJ4OkGb4kt2lP0cC/4EMmlWn1HBwqxakS+lQde9FNhmdOMVzk+8NJ9pTUmD8S 1LBoRTvKMOKMeQYh2yB1JJKsUGI3lojZOkAN3W/7UNdLNdgdLGiCMG3lCY7bD4vI85CE DQcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=dWXOIzKr3YvQCTmxETjYvRovohbbY4Yz4fKJ63rQShU=; fh=8Xy6RKW3ZbdO8jU/DDz2tk7O2US0IArkRdyAhqrQ1JI=; b=PlbYCS+hMAepeWfNUwdGUpbW3vBo6BddYXtcW2oKY8D5Jwl/x0tlGwpo2H6TFWyqKW YBwpDJk4qI4TD6nI0FYD7yHN8ojpi9YGEujmobNpeFBv4NL9027tSTqz9EPbopnE05sm LTloXzt7EWXPbcoN9okEB+ttIz8uBwF6TMdMkePH+35XFzI+fCWd8sGKZsMBFP1B7gfX wQ4uGn0D57LKYGyVmC1Oj3wXBtzJIm3VB+0NUGIM0VZ38X3bY/cUqw9duFSMrsovuuNK IMSVFT50VpXbSBNIyD2Z1XXpge+hVjffZhPSG2uog3yTlMVaQtkzuvlHFTJNpKnE+rSz /fIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=QnHtq83n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id az1-20020a056a02004100b0055fd1bfb109si13421747pgb.679.2023.09.26.13.22.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 13:22:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=QnHtq83n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 4EEE983EE9DA; Tue, 26 Sep 2023 05:17:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234036AbjIZMRM (ORCPT + 99 others); Tue, 26 Sep 2023 08:17:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230231AbjIZMRK (ORCPT ); Tue, 26 Sep 2023 08:17:10 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B947EB; Tue, 26 Sep 2023 05:17:04 -0700 (PDT) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38QAIpAg025962; Tue, 26 Sep 2023 05:16:38 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pfpt0220; bh=dWXOIzKr3YvQCTmxETjYvRovohbbY4Yz4fKJ63rQShU=; b=QnHtq83nQHQZprgW55t1ZotopZuXmwfcrVKbEKnY9WVMMMAn7o/pkQehG5aNPUaCQb01 5Pemb+ZQB9MkTC+IS3RkwvMotswwokhUmpag8uuSp34s0iV9DftS2S81IznzOIvNrDRI +UOU+njRFOenP9v/3SntO6jNwW7w5dnB74r7puHEujuNpqCvIULUwIi6kOwpy0H4MBGK QNxb/DJm7kMzLPLFigE4hdXQhFvMZEi9gIAapzetWjdUAQI53xmCRcGPGZuHkh7Gd8Te WRJGKtQ0b4TGfFbTCNgw1jP2wrjEY2RRTtLVAxXJN2uzBL43g4P6xYlQs2AjjJlmNiRy Ow== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3t9yhm0ugq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 26 Sep 2023 05:16:38 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 26 Sep 2023 05:16:36 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Tue, 26 Sep 2023 05:16:36 -0700 Received: from [10.193.38.177] (unknown [10.193.38.177]) by maili.marvell.com (Postfix) with ESMTP id A980C3F7053; Tue, 26 Sep 2023 05:16:33 -0700 (PDT) Message-ID: Date: Tue, 26 Sep 2023 14:16:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [EXT] Re: [PATCH net-next v5 3/7] net: macsec: indicate next pn update when offloading To: "Radu Pirea (OSS)" , Sabrina Dubroca , Dmitry Bezrukov CC: , , , , , , , , , , References: <20230920092237.121033-1-radu-nicolae.pirea@oss.nxp.com> <20230920092237.121033-4-radu-nicolae.pirea@oss.nxp.com> <040a3ede-22f7-bed4-0dbf-10b68a9c7fe1@oss.nxp.com> Content-Language: en-US From: Igor Russkikh In-Reply-To: <040a3ede-22f7-bed4-0dbf-10b68a9c7fe1@oss.nxp.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: 10_H8fETF35UtVTdIfCOJoVNFs9nbO9a X-Proofpoint-ORIG-GUID: 10_H8fETF35UtVTdIfCOJoVNFs9nbO9a X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-26_08,2023-09-25_01,2023-05-22_02 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 26 Sep 2023 05:17:10 -0700 (PDT) Hi guys, > On 21.09.2023 18:11, Sabrina Dubroca wrote: >> 2023-09-20, 12:22:33 +0300, Radu Pirea (NXP OSS) wrote: >>> Indicate next PN update using update_pn flag in macsec_context. >>> Offloaded MACsec implementations does not know whether or not the >>> MACSEC_SA_ATTR_PN attribute was passed for an SA update and assume >>> that next PN should always updated, but this is not always true. >> >> This should probably go through net so that we can fix some drivers >> that are currently doing the wrong thing. octeontx2 should be >> fixable. atlantic looks like it would reset the PN to whatever was >> read during the last dump, and it's unclear if that can be fixed >> (AFAIU set_egress_sa_record writes the whole config at once). mscc Thats correct, atlantic hardware requires full table to be in data buffer registers. I really doubt its possible to skip PN writing. >> doesn't seem to modify the PN (even if requested -- should it should >> reject the update), and mlx5 doesn't allow PN update (by storing the >> initial value of next_pn on SA creation). > > I updated octeontx2, mssc and mlx5. Atlantic is unclear. > > Mark, Igor, in the atlantic MACsec driver, can the SAs be updated > without a PN update? Reviewed the code and the docs I have - my view is it can not. All the packed record in macsec_api.c:set_egress_sa_record is expected by hardware in full. Regards, Igor