From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 41C8542C5A; Thu, 8 Jun 2023 08:55:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B88E742C76; Thu, 8 Jun 2023 08:55:32 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 5E7EC40A84 for ; Thu, 8 Jun 2023 08:55:29 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 357LwAdZ023531; Wed, 7 Jun 2023 23:55:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=/te6SjN+49DdP6sPClyO7QlARO0aWlJ/UKPWoUWMVa0=; b=WazSsqy+HnHx5+WoZ6VCGyhHcpRtfGk2So/wMiJ5mBL2+i1FPb0n8THubmf4lY1zRvcO A+WFOb+Gdmo1To8QcHkXqVfVZtvYKQm9PiC5Cm+yCjDbjFli/Ntf8C1Hvf6CM+/6lsns e6CG2GVB0RviKdOGv/HtrlaCSsMTwIsPTfuyukdKulGMVuCTd1R2gBjXXBXdmSDFQ5W+ 0As3VqnkCkTu0aRPFdNDE6pHZ6iYuamAvj5OywVfXXMfgbZe8jW1xQ3Xf79Kv+UbDgnf wygQmNMtQj8l57M719lImnZljQWCaKaY7tDZxEl55eb+Uhj2/EIHwmwjINBao/UYEf/l yA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3r329c1jsf-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 07 Jun 2023 23:55:26 -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; Wed, 7 Jun 2023 23:55:11 -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; Wed, 7 Jun 2023 23:55:11 -0700 Received: from localhost.localdomain (unknown [10.28.36.102]) by maili.marvell.com (Postfix) with ESMTP id 507BD3F703F; Wed, 7 Jun 2023 23:55:08 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , , , , , Akhil Goyal Subject: [PATCH v3 02/13] security: add MACsec packet number threshold Date: Thu, 8 Jun 2023 12:24:47 +0530 Message-ID: <20230608065458.333670-3-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230608065458.333670-1-gakhil@marvell.com> References: <20230607151940.223417-1-gakhil@marvell.com> <20230608065458.333670-1-gakhil@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: ixhs8e4hJHoqfFihC5YsMHZ4wu4QNkN2 X-Proofpoint-ORIG-GUID: ixhs8e4hJHoqfFihC5YsMHZ4wu4QNkN2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-08_04,2023-06-07_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Added Packet number threshold parameter in MACsec SC configuration to identify the maximum allowed threshold for packet number field in the packet. A field is_xpn is also added to identify if the SAs are configured for extended packet number or not so that packet number threshold can be configured accordingly. Signed-off-by: Akhil Goyal --- lib/security/rte_security.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h index c7a523b6d6..30bac4e25a 100644 --- a/lib/security/rte_security.h +++ b/lib/security/rte_security.h @@ -399,6 +399,8 @@ struct rte_security_macsec_sa { struct rte_security_macsec_sc { /** Direction of SC */ enum rte_security_macsec_direction dir; + /** Packet number threshold */ + uint64_t pn_threshold; union { struct { /** SAs for each association number */ @@ -407,8 +409,10 @@ struct rte_security_macsec_sc { uint8_t sa_in_use[RTE_SECURITY_MACSEC_NUM_AN]; /** Channel is active */ uint8_t active : 1; + /** Extended packet number is enabled for SAs */ + uint8_t is_xpn : 1; /** Reserved bitfields for future */ - uint8_t reserved : 7; + uint8_t reserved : 6; } sc_rx; struct { uint16_t sa_id; /**< SA ID to be used for encryption */ @@ -416,8 +420,10 @@ struct rte_security_macsec_sc { uint64_t sci; /**< SCI value to be used if send_sci is set */ uint8_t active : 1; /**< Channel is active */ uint8_t re_key_en : 1; /**< Enable Rekeying */ + /** Extended packet number is enabled for SAs */ + uint8_t is_xpn : 1; /** Reserved bitfields for future */ - uint8_t reserved : 6; + uint8_t reserved : 5; } sc_tx; }; }; -- 2.25.1