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 292BCA0C56; Mon, 23 Aug 2021 12:56:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BAB74116E; Mon, 23 Aug 2021 12:56:31 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2078.outbound.protection.outlook.com [40.107.220.78]) by mails.dpdk.org (Postfix) with ESMTP id 034704116E for ; Mon, 23 Aug 2021 12:56:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k2ePuylYG0fA1EIZ3sKncrRJZbrOFmLHSlxb52KvSwe75W0YkftfnrI+ZuTN4cNzZrB/tpvVK0H3lBFu3HpuCPSBQWQ1mBecUTHP/xbQF3IPFA9fpyyRhYkKXFxaPUf44Ca3dIbxwaSDyHEEYsZVY3KcVObdYluFA4NN1Txc+D7N0RvtklcQ5itcYM5iP7i+waCPJ6SwXlaX2uU4TNdHDq9yrNnRY3NhJo9tEPtYLBpk4UvwyKB7zrNsZgy+z2ohRWbyi13x/X0G45JQanZVVJb8OQdCQYPF6z9dx07Mr/YP/jZ3DoqsNBSTEuw6D3hJ24yzJfS0xr/P2jhfDlJ4pw== 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=S3/b1cjI4tPlrIS8RR/LQBBOkPmZ5Pz+rpCFtyvxEyg=; b=HrijSJrnHa63ssSXE4u11bpu6w0YwQot2x+nqkZEWlbx/wbBuTrlBbdmExClOXJBoZYtFa4eYmosow43We61L9XO9EdTKeo5PQtwm/gQ40F37Nq+nFdhwQVBstxjjg0PgtDSLQRzJoyBM8tv/4PpS1Ivik0Fs/DkPHJqKvkZld1zQqRUIzwfKKrCJ+xw4nxtbcLovKQbZrHRCCM9HrabzKdCJYZxOQU8PD/glofQmBrXJWTFjhs2Ir0/wj4JPnsIIOWNAv91pQ52LxE3J59jQQdPU+9BWNgscOmz7kp9aMX5q5/E9M0zAYZJLFWyLiDw/tKWeVdIhc8T+ikG7s+iFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine 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=S3/b1cjI4tPlrIS8RR/LQBBOkPmZ5Pz+rpCFtyvxEyg=; b=aIHC7Y9vNrJ3HHeQKcSHCn5aaF96nYqPTPimaE1iyy/c59nBgN9Z4fKYvmsUA1INJ5Fbv49caTFA6SkSo1Y/87Zh9U+MZYoHo3a5CohJzpYlWBp3byJ6dI3fC/IJ0e1UvL3JGV7WVvvmPRX0Csud64pLE7C+z4UfUVLGsGrtglNg1KKgqoxN3KJaTX5ILMUR2shzjTUfnIFOLhTi8fSYrbie3iev1dIAGcZsv9aqpcLPpd4aRgxJ8LjeGzNaA2BfZm9JYLPgnU78DKs+gT1lBPcf9wjFQ7bzolx9VFAMkOQILcUMkawsStXNnYV/6SPePOfh9gJ2Bw5hyULJ+pVO/w== Received: from MWHPR17CA0068.namprd17.prod.outlook.com (2603:10b6:300:93::30) by BN9PR12MB5356.namprd12.prod.outlook.com (2603:10b6:408:105::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.17; Mon, 23 Aug 2021 10:56:28 +0000 Received: from CO1NAM11FT039.eop-nam11.prod.protection.outlook.com (2603:10b6:300:93:cafe::80) by MWHPR17CA0068.outlook.office365.com (2603:10b6:300:93::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19 via Frontend Transport; Mon, 23 Aug 2021 10:56:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; 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 CO1NAM11FT039.mail.protection.outlook.com (10.13.174.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4436.19 via Frontend Transport; Mon, 23 Aug 2021 10:56:27 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 23 Aug 2021 10:56:25 +0000 From: Raslan Darawsheh To: CC: , , , , Date: Mon, 23 Aug 2021 13:55:38 +0300 Message-ID: <20210823105541.308-2-rasland@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210823105541.308-1-rasland@nvidia.com> References: <20210617091716.2354978-1-rasland@nvidia.com> <20210823105541.308-1-rasland@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] 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: 7bad0ca9-58ad-4eb5-9e0d-08d96624a855 X-MS-TrafficTypeDiagnostic: BN9PR12MB5356: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1013; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bWCeumTGjsgVeBEnyg4KTDCaY62NdeYcyz1jbX15ZzJWyf8aqD5jJ1t5UdHCu0vCRQWOOc0oqC4m7RtuieP2v7QCZg+NCQQSCwbZlB7D7R7WRjFTVQqZwHASuN97+c2T8wvbiL7D7xg6KSMZ3fLmDVqM2LSmjsEBiDHvjO9ZUW3FcAKtfpRfYNYExpVaatokmY24+JAwBg2BxDtz5lKKo3F1mtymi1vS6t1r5AaYqhM6+PmWoxbTkbnTz5Kh7E4JBPcgx+oMuQsaCWKa25agfufGm/e/RC0B2lEkPLBdv3+tIUxLqAUp2tRhduQ/KRQlX2NkJyFh0XvIgAJDHo7LuKpczNekDbDBrpeMQeS47mTiWVofJ0siVMNK1J6XOZf1LXP2Z/ZcYj/7GZnLslTUdWcrQx/jM9ypuhKUgnjcqimVuLZNf8xVJvQ5aj03r+TfhlrNP32vkdOGSwi83A0bjqySJnkH0yzks2ib8JPdI21H/5HxgLGVVQ1bnVmKHyejQmYdC6s+yDavFar5rv+xpoucumQ2ZX1jr8vsEGjSMWfakMmWrh9iD5Dvt+xlZNRejDiPQr06KT/4jFKQFq5zjl/SB7fl2nVWjHDnKs0b7D8MIkAqyqzoaMzW3vG2yVRpPnzQGcFi3mkT7v+eweSBML17fZP6NsUBsk0hBuzaxBzfM6RJdwaSnbDJCFTyY1+1cez83Jos09jNs1NrkrzYxg== 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)(376002)(136003)(39860400002)(396003)(346002)(46966006)(36840700001)(47076005)(36906005)(70206006)(356005)(36756003)(2906002)(6666004)(82310400003)(5660300002)(4326008)(36860700001)(82740400003)(7636003)(336012)(70586007)(54906003)(2616005)(26005)(86362001)(478600001)(426003)(16526019)(8676002)(6916009)(55016002)(1076003)(6286002)(8936002)(83380400001)(7696005)(316002)(186003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2021 10:56:27.7485 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7bad0ca9-58ad-4eb5-9e0d-08d96624a855 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: CO1NAM11FT039.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5356 Subject: [dpdk-dev] [PATCH v7 1/2] net: 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..9f6deb9c7e 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 specific 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 specific pad bits */ + uint8_t qmp:1; /**< Qos Monitoring Packet */ + uint8_t type:4; /**< PDU type */ +#endif + uint8_t data[0]; /**< variable length data fields */ +} __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 fields */ +} __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 fields */ +} __rte_packed; + /** GTP header length */ #define RTE_ETHER_GTP_HLEN \ (sizeof(struct rte_udp_hdr) + sizeof(struct rte_gtp_hdr)) -- 2.25.1