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 9E83142C4E; Wed, 7 Jun 2023 17:20:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C817A42D17; Wed, 7 Jun 2023 17:20:08 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 6EF6A410FD for ; Wed, 7 Jun 2023 17:20:06 +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 357Dvh1s028140; Wed, 7 Jun 2023 08:19:57 -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=hs6ngKFev9/OO7C/HvoKX8B4n/bIqlJz2Ku9oWlgXXzCuq+CADg+JRjZg06hs2cdZBgG F3Xx1pFoPnnjY+X3AsTXeWkodRhHIbSGd3Zk7OXNm7mDTAqYWcGwbh7UbdLBHPXHLmsI tgseYgrOtIkN30l4cH12ELiVFYZKtoCBmCJZXvb8U+FNMpIbkWONXUPs73YYykfcXmMP zgXwuU5QpwPSJxqTBfLe0pYNFNJxvuBGvsvhhfNkIGwddFCJAg7OKgONDgMqqAgPJYeZ Ab5SRnRWgCsC3sKoolzUmXnhFbofA501vsKD8M9Uc/iMzhTzQo68exUfRGkKl1BXwHm+ rw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3r2a7bv658-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 07 Jun 2023 08:19:57 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 7 Jun 2023 08:19:55 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 7 Jun 2023 08:19:55 -0700 Received: from localhost.localdomain (unknown [10.28.36.102]) by maili.marvell.com (Postfix) with ESMTP id 3486E3F7084; Wed, 7 Jun 2023 08:19:51 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , , , , , Akhil Goyal Subject: [PATCH v2 02/13] security: add MACsec packet number threshold Date: Wed, 7 Jun 2023 20:49:29 +0530 Message-ID: <20230607151940.223417-3-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230607151940.223417-1-gakhil@marvell.com> References: <20230523194918.1940212-1-gakhil@marvell.com> <20230607151940.223417-1-gakhil@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: J8-RoopbAoUfYjS-ORt8OFQsyFb8QiX- X-Proofpoint-GUID: J8-RoopbAoUfYjS-ORt8OFQsyFb8QiX- 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-07_07,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