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 5881CA0547; Thu, 29 Apr 2021 10:11:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42B55412CB; Thu, 29 Apr 2021 10:11:19 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2066.outbound.protection.outlook.com [40.107.244.66]) by mails.dpdk.org (Postfix) with ESMTP id 304F3412C6 for ; Thu, 29 Apr 2021 10:11:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=obHTz+K9M2E6SHUMSkJfITvBcLDR0lOn+9gGcUhhJBfVC8BIkoFylrm3QsefxX+LDbf2znhXPN9b0D0tHDBLr7Px1cxYoPzPpFOuzhxYpjGa9d9zpKh14emst8k8Wm1jfA2fZuGpLw/V//P2Mjm8YP9OqoArQDrz27mIILXLimo/BXPvBuMUwdO/Qu6Kpo+b2fZC4HNy2AOOjuhBCtPNRXTGUVfEDQgxxSIG9jwJrAuPVKC2NCjHeEGUUubDOQKKCEjPN3de8LT1z0C7CiyaH30BYL8vlG83tEV8mhKm6x8O2+HT8Ry5xi/zVMrrXGHoZ7nY7OuOeERoJbTsuAn/bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UBjjHDagzHfAb2m/sYFOdqOyv5K+oD7ulxnZYPIAgeQ=; b=n+oiRkbn+6PnHGHbHtBjF0F31pysljKLdX7NjCzJcJNcveT21JuCSTES7i61e4iIDDsaM2WonijF9eMEyKGk4mfdvhHwfoLqGlMbxmjrrZjeC26WMvl5/2YFKr3Mbx6TEOQj6H1zTQcskr282mfwFB1jfSW09lC6eoGZzgY+zLpPhltT1XvvX+lbQ6mfxGTLrirNl9S50X2k9bEiI/pw+rLmLShw75Z9iF37/fiq+Z3Uf40mqq/xDAEZSoRuBFs6Gik78wYa3dTbc1aqt7cilmBt8z1taL87JrfDomOK7lsbVRPE+vX28V8Vp6bdi/yNZAfDUEy6uDCkejWbHLT/Dw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=oktetlabs.ru smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UBjjHDagzHfAb2m/sYFOdqOyv5K+oD7ulxnZYPIAgeQ=; b=ZW8701rYF97+M9UW3JZ3VncZMn6GKjPIJo7poUCc71cV3b0vTfzBAmff9g5k8glO10D+Jq3I1MCkcExgI7rr5VHLpZfJConTPcOSIghTNClC9Lic8sJZnpXowqMjjM6oZfdCFIoxWLhmcePu4JvNQt86HheZyHUmsSuoiBh64jamVetgh4597vHeqFnJnMYZseF4LrVxkZ64SitjCq4CO5l1qzgM13Nunwg3RqIGtmzjwYoDWxX6FFipHvcTIwRcmCHNGcDwK++j7adNjv2sTgBSBRGLqT8Kg3OTGQRuknJgTO5aUdIahn8deKIsHeCNF97GVbnp4cObPCj4WShxHQ== Received: from CO2PR05CA0100.namprd05.prod.outlook.com (2603:10b6:104:1::26) by CY4PR12MB1175.namprd12.prod.outlook.com (2603:10b6:903:3d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Thu, 29 Apr 2021 08:11:14 +0000 Received: from CO1NAM11FT020.eop-nam11.prod.protection.outlook.com (2603:10b6:104:1:cafe::a2) by CO2PR05CA0100.outlook.office365.com (2603:10b6:104:1::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.8 via Frontend Transport; Thu, 29 Apr 2021 08:11:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; oktetlabs.ru; dkim=none (message not signed) header.d=none;oktetlabs.ru; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT020.mail.protection.outlook.com (10.13.174.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4087.27 via Frontend Transport; Thu, 29 Apr 2021 08:11:13 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 29 Apr 2021 08:11:09 +0000 From: Raslan Darawsheh To: CC: , , , , , , , Date: Thu, 29 Apr 2021 11:10:48 +0300 Message-ID: <20210429081048.16627-2-rasland@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210429081048.16627-1-rasland@nvidia.com> References: <20210404074552.24190-1-rasland@nvidia.com> <20210429081048.16627-1-rasland@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0bb58b35-fd91-481f-0a8a-08d90ae65b31 X-MS-TrafficTypeDiagnostic: CY4PR12MB1175: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1013; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MhcRODp1yKrqkF9JpG1udH1gik8tUPEULNMqPsffthqhUD/VMq9KKIA5f+jdSZfLs4/GxOvnpP+93hxsU+4MEApeFrtaRZO1GTAyuWn9qCrLjfl0CFAna15MoCMwsoRbRqdUX1qtPm9LxCn9m7aWvkMEjmpeGjHuoCnMdN42e6FT/Mn0L1TgXntI0pmpYOuCZp4mEAeGUlOS+xRn/YCKRw6KW6gmZOx3bukXIOm0dwcVtzRkGRk805C+exNZBH8+9jHlVsjlCFqvOLdZfAxc2goly8XfZNIqqg1d087G3dxHU0h9r1VzB4s4VPnwDrrSUzvyIFDdQH6Lzlyz/VzBKEIhkpi9p5WcjQCb01DyM2V/DUV93gqJP3MZ6hDpDNeoLQo5pS6HkUk+yd48aJUOMwURm9tl/RvelXwF36uQAzBEOIx4nvcqio/Wex+31OaGeSW1TcxGIl4TJU2A7NtZJh6gbda7gKX0ynPuEk/DuylvsIoQQLhVEJGH6cMJWj5XWjE40iynOkP7FF50cU/ApajHzets9/tLGF4Bd1ORMq/Ek7h17u5j/QqhsJgayG/h+UEg7tqQ06zy58oZyyR98t6l3AAyO5LMUs7PJDhIz6ypyGzFMYX2TN7Xfu1RZSWMIXKzMRi0ZHgrcyQqqMIo8pPNp3LCVZefL9VLrwO7Rz0= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(346002)(376002)(136003)(39860400002)(396003)(36840700001)(46966006)(83380400001)(54906003)(6916009)(4326008)(316002)(107886003)(8676002)(478600001)(36906005)(82740400003)(8936002)(186003)(16526019)(1076003)(26005)(2616005)(336012)(426003)(5660300002)(2906002)(36756003)(82310400003)(86362001)(6666004)(70206006)(6286002)(7696005)(7636003)(47076005)(70586007)(55016002)(36860700001)(356005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 08:11:13.7272 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0bb58b35-fd91-481f-0a8a-08d90ae65b31 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT020.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1175 Subject: [dpdk-dev] [PATCH v5 1/1] ethdev: add new ext hdr for gtp psc 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 Sender: "dev" Define new rte header for gtp PDU session container based on RFC 38415-g30 Signed-off-by: Raslan Darawsheh --- lib/net/rte_gtp.h | 78 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/lib/net/rte_gtp.h b/lib/net/rte_gtp.h index 6a6f9b238d..5a850a26e4 100644 --- a/lib/net/rte_gtp.h +++ b/lib/net/rte_gtp.h @@ -61,6 +61,84 @@ struct rte_gtp_hdr_ext_word { uint8_t next_ext; /**< Next Extension Header Type. */ } __rte_packed; +/** + * Optional extension for GTP with next_ext set to 0x85 + * defined based on RFC 38415-g30. + */ +__extension__ +struct rte_gtp_psc_generic_hdr { + uint8_t ext_hdr_len; /**< PDU ext hdr len in multiples of 4 bytes */ +#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN + uint8_t type:4; /**< PDU type */ + uint8_t qmp:1; /**< Qos Monitoring Packet */ + uint8_t pad:3; /**< type specfic pad bits */ + uint8_t spare:2; /**< type specific spare bits */ + uint8_t qfi:6; /**< Qos Flow Identifier */ +#else + uint8_t qfi:6; /**< Qos Flow Identifier */ + uint8_t spare:2; /**< type specific spare bits */ + uint8_t pad:3; /**< type specfic pad bits */ + uint8_t qmp:1; /**< Qos Monitoring Packet */ + uint8_t type:4; /**< PDU type */ +#endif + uint8_t data[0]; /**< variable length data feilds */ +} __rte_packed; + +/** + * Optional extension for GTP with next_ext set to 0x85 + * type0 defined based on RFC 38415-g30 + */ +__extension__ +struct rte_gtp_psc_type0_hdr { + uint8_t ext_hdr_len; /**< PDU ext hdr len in multiples of 4 bytes */ +#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN + uint8_t type:4; /**< PDU type */ + uint8_t qmp:1; /**< Qos Monitoring Packet */ + uint8_t snp:1; /**< Sequence number presence */ + uint8_t spare_dl1:2; /**< spare down link bits */ + uint8_t ppp:1; /**< Paging policy presence */ + uint8_t rqi:1; /**< Reflective Qos Indicator */ + uint8_t qfi:6; /**< Qos Flow Identifier */ +#else + uint8_t qfi:6; /**< Qos Flow Identifier */ + uint8_t rqi:1; /**< Reflective Qos Indicator */ + uint8_t ppp:1; /**< Paging policy presence */ + uint8_t spare_dl1:2; /**< spare down link bits */ + uint8_t snp:1; /**< Sequence number presence */ + uint8_t type:4; /**< PDU type */ +#endif + uint8_t data[0]; /**< variable length data feilds */ +} __rte_packed; + +/** + * Optional extension for GTP with next_ext set to 0x85 + * type1 defined based on RFC 38415-g30 + */ +__extension__ +struct rte_gtp_psc_type1_hdr { + uint8_t ext_hdr_len; /**< PDU ext hdr len in multiples of 4 bytes */ +#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN + uint8_t type:4; /**< PDU type */ + uint8_t qmp:1; /**< Qos Monitoring Packet */ + uint8_t dl_delay_ind:1; /**< dl delay result presence */ + uint8_t ul_delay_ind:1; /**< ul delay result presence */ + uint8_t snp:1; /**< Sequence number presence ul */ + uint8_t n_delay_ind:1; /**< N3/N9 delay result presence */ + uint8_t spare_ul2:1; /**< spare up link bits */ + uint8_t qfi:6; /**< Qos Flow Identifier */ +#else + uint8_t qfi:6; /**< Qos Flow Identifier */ + uint8_t spare_ul2:1; /**< spare up link bits */ + uint8_t n_delay_ind:1; /**< N3/N9 delay result presence */ + uint8_t snp:1; /**< Sequence number presence ul */ + uint8_t ul_delay_ind:1; /**< ul delay result presence */ + uint8_t dl_delay_ind:1; /**< dl delay result presence */ + uint8_t qmp:1; /**< Qos Monitoring Packet */ + uint8_t type:4; /**< PDU type */ +#endif + uint8_t data[0]; /**< variable length data feilds */ +} __rte_packed; + /** GTP header length */ #define RTE_ETHER_GTP_HLEN \ (sizeof(struct rte_udp_hdr) + sizeof(struct rte_gtp_hdr)) -- 2.25.1