From patchwork Thu Jun 16 18:01:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Etelson, Gregory" X-Patchwork-Id: 112927 X-Patchwork-Delegate: andrew.rybchenko@oktetlabs.ru Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0BC2AA00C2; Thu, 16 Jun 2022 20:01:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AFD844014F; Thu, 16 Jun 2022 20:01:27 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2072.outbound.protection.outlook.com [40.107.236.72]) by mails.dpdk.org (Postfix) with ESMTP id EAB1D40141; Thu, 16 Jun 2022 20:01:26 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KOuT7knRY5zi01lchSplsDEb4LUC5a/wLIRZmzitP1OWBeOapAdmjtieP7FirM5e9jwHs9bfU9NztgnCt6T8mX1523prdQi+GCCnz0QNvwMu0ygNHak6D7QPy7crCDPLpinuA2iyQlp8n61hpe9luNR/ta1PBiYejTc30HhiMvu8ns+f4jVVL7DmA096x3E/mvlnUisTk9IF9S/lva2sDdO01vzqlSjQfyYHhjfPqZHoil7tGji4m8rlJNL24l8vH3ZcXjBMAA9izefYUrUIOwCE9QCudqJ0/v1k7nOo/DVkGo6FqsalL/Ln+pXz2kan9uAnAQ7fZSLLrUVDBXUDZw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tvtculxFkQjl8WqO9H0UeG1T9nLXTcmNPyjW0ADgEns=; b=oVNosI43kEWpUzXcffeTLWtjw6FokyYQYY7ZXM4DvuKLmio3qc9+WPqUjG+/ZWp+iMgo63isfWSt4oYJZmNwZY6KWcnvSp9xYtPEKcVjpgQcHjFPu3egj0kfAe8jLpkx1x0slrls4HlDLHaT7ejaIKXdR9fO783EgDFreR+Kfj88Pt19D+U1Po4/94rDWoYryftgEL8dBJyN6e7uXMRmX+yPB4DFZp9MO0Xir9CDwa9mwTK0PcnsYw42qUXjnfXhqlvR88Qza+vysdTWCVgp/hG9bBCzTKnGdGkqBiZuNN0EiiBZwuLHT2gSCaz/9T/pk+3o4Dd3KPx7BjOmRr9GHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=6wind.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=tvtculxFkQjl8WqO9H0UeG1T9nLXTcmNPyjW0ADgEns=; b=XeS5zW985KoFf3J8oSabzyX2mdUFg0lmiErFp0gvuhz6sEewMEs+E78Z/T5yyj3Ynox4LM03lxErvOUeMCKJnTwrGPMetJ6JgzMobWOUiKxiJnY4pRSBtzeCjrBl0PaDszC/lNKlo2vPyfFzPuQAGyo2xFweGwtLdmlUVni2xRnaxUatg0hjkysmUcMwZWj4Po2wCZy+t56TVch1Qy/CnKc9X/UDC9jnqFUQ10RkhfQIzFZOaSa5VEAMZ5dBZLQhhlV0SHeMzqJ8M0bbaXcxizCY3twyYCWCXHqTKNGiOtmIf27zE7pKXsro7c5RzbvGQY1JuByHY3TvvLN7dso9eA== Received: from DM5PR19CA0017.namprd19.prod.outlook.com (2603:10b6:3:151::27) by CY4PR12MB1864.namprd12.prod.outlook.com (2603:10b6:903:11c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.15; Thu, 16 Jun 2022 18:01:25 +0000 Received: from DM6NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:3:151:cafe::54) by DM5PR19CA0017.outlook.office365.com (2603:10b6:3:151::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16 via Frontend Transport; Thu, 16 Jun 2022 18:01:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by DM6NAM11FT022.mail.protection.outlook.com (10.13.172.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5332.12 via Frontend Transport; Thu, 16 Jun 2022 18:01:25 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Thu, 16 Jun 2022 18:01:24 +0000 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 16 Jun 2022 11:01:22 -0700 From: Gregory Etelson To: , CC: , , Viacheslav Ovsiienko , Olivier Matz , Ferruh Yigit Subject: [PATCH v2 1/2] net: fix GTP PSC headers Date: Thu, 16 Jun 2022 21:01:03 +0300 Message-ID: <20220616180105.8839-1-getelson@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220616093417.27843-1-getelson@nvidia.com> References: <20220616093417.27843-1-getelson@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c2bcb01f-aa5e-4582-90ae-08da4fc23a9c X-MS-TrafficTypeDiagnostic: CY4PR12MB1864:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lJxv1ql2G50VKS8dw4htEHNGsXtcE6NufzmRLA7jE45AOs0BgO9lMeBwYI24nVhoTK0Go5Q6w8hVH76NvBWcVuEPAxASsi5CbuzAv7X2onu3kbsVdH8ty7N9IA+lGU+LrVuCI4mBvzPjwiN7eOPR5ed6GBRs+oYrCSNZeWKvEISOfIL+2H33f7RaGNJdmbJbz4D0FG4/VbTNScYbvcto6TpMs37vlyDSLkf9S2TA9nwsP/Nhj13q11h2Moq0HhsDVt11NG3ICmS/mGOOg41d1ra89CyebYTvjRspI/f69acKhVOmcMrxWGD198r/4kR3FP3e53W4mYlYuckL/gGdJkZf6ZPWu+TGqaYtV1KSI8Fveaa008iAPlB3zZYznAul3o77W5w3GF4slddEUhB9f1rPVYmDih/DAzopALHstoj1K9JoJCZ+5p82gRE0BGGM9ovvY3ulcOncS4zl5JwJlQ7LW/tRlqc9uEX5pXmUJWq6aixntATSQsJ+ebiRq43JeyRBYIsNkkyq2eLS5icnhsMaxM0uqp9vSv2tyNSE2rJrfcGi+d1kjPBg6HJQtO8FZiRbs/NLFx/JFghnuLcuARQvF9GC/M5mOkD29L+x0bCulVq6ekrM7WdbMVvxMoDkbJbgJX/YhtbNZyuorQy5JncKo7CaJs2kxO2T6J1r7AtIVTritHRcta/klhWPNSf5RhudEVlZilx/dkZTVIykYA== X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(46966006)(36840700001)(40470700004)(7696005)(6286002)(26005)(1076003)(6666004)(81166007)(336012)(36756003)(426003)(47076005)(2616005)(8936002)(2906002)(5660300002)(55016003)(82310400005)(4326008)(83380400001)(16526019)(356005)(316002)(186003)(7049001)(70206006)(110136005)(36860700001)(40460700003)(86362001)(70586007)(54906003)(508600001)(8676002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 18:01:25.0841 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c2bcb01f-aa5e-4582-90ae-08da4fc23a9c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1864 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 Fix bitmap fields order in little endian section of GTP PSC headers. Fixes: e8ca1479cdc4 ("net: add extension header for GTP PSC") cc: stable@dpdk.org Signed-off-by: Gregory Etelson Reviewed-by: Viacheslav Ovsiienko Acked-by: Aman Singh Reviewed-by: Andrew Rybchenko --- v2: --- lib/net/rte_gtp.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/net/rte_gtp.h b/lib/net/rte_gtp.h index dca940c2c5..9849872366 100644 --- a/lib/net/rte_gtp.h +++ b/lib/net/rte_gtp.h @@ -75,11 +75,11 @@ struct rte_gtp_psc_generic_hdr { 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 */ + uint8_t qfi:6; /**< Qos Flow Identifier */ + uint8_t spare:2; /**< type specific spare bits */ #endif uint8_t data[0]; /**< variable length data fields */ } __rte_packed; @@ -100,12 +100,13 @@ struct rte_gtp_psc_type0_hdr { 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 qmp:1; /**< Qos Monitoring Packet */ uint8_t type:4; /**< PDU type */ + uint8_t qfi:6; /**< Qos Flow Identifier */ + uint8_t rqi:1; /**< Reflective Qos Indicator */ + uint8_t ppp:1; /**< Paging policy presence */ #endif uint8_t data[0]; /**< variable length data fields */ } __rte_packed; @@ -127,14 +128,14 @@ struct rte_gtp_psc_type1_hdr { 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 */ + 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 */ #endif uint8_t data[0]; /**< variable length data fields */ } __rte_packed; From patchwork Thu Jun 16 18:01:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Etelson, Gregory" X-Patchwork-Id: 112928 X-Patchwork-Delegate: andrew.rybchenko@oktetlabs.ru Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C42F7A00C2; Thu, 16 Jun 2022 20:01:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA68D410E8; Thu, 16 Jun 2022 20:01:31 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2082.outbound.protection.outlook.com [40.107.223.82]) by mails.dpdk.org (Postfix) with ESMTP id E051C40FAE; Thu, 16 Jun 2022 20:01:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YBdhFV4kM8IgVo/5JeSCbM+hO0N/ndWPTj7MRVHA3FkeeALUWSL3IHoIbdcS0vbm8oykSrzGAfWTbzi2WR9Q+ourl1h7edthC3p9PtFMz3U+496PKt4uQUInd6NotYtzDWOOWjEMNQCAOHJKWZI7PA1jjYKWxKfY8ABZpYmneT1vTaYl2eizZooMdnF5DuuFEFI80f7BtU+NWCa/+pB2CfA/jb8FofV3N9y2L9jtM4fEa48U3WZ6OD94xx4kSF3B4C7srrffASwlaH82zWNz2v4k+E48heYJ8dn7X5PRhQZ2TL0fWmt4zBwv/L7H7nSrpECi/4J5YTHYwzGgLtowsw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JOdOHtL3Ellcv6weeBXe5rngMnRGi4XwseX7MpTBl68=; b=TwSCCfuEMS6hPj7yiL2EoHHyXnpxLYMVQRH7MhAspHVGlOGWlGNuNYqpLKtI11b6SY1vXlMbrjVau2zvJjr2EZKZbIm13WkL8eZ//NujuEclFiuQw/RbjD4AbRji55wUv2cEBzOcTMB53lxLfSwc5KrYxYJYbPTi5bxMYvC4nBS+EFpiyCeNnqbnKEfMyN33QwgzckiaZCiIirTyCIriLRt3lhHJQndtGm1DDNyFlwfalf2h7C9NsUR2xlvXP9ftua81BDhX98Qw49o59dzy+3QhOn3hoVhMaluMD8anlB30qth7y/v0H9+wb3XN8Bj0r7Cf4hf4hlLYmNtIZZ8klw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=JOdOHtL3Ellcv6weeBXe5rngMnRGi4XwseX7MpTBl68=; b=gXuGG1A4Vui03m0RZU/fcY/qY/ouZtJvFPe2lrQuPwhWNSPw6YmtwH5Trg/4HeEpB/fHFhSgZqqOqcTdIU78/pkvxLxlpBx8SArzpvkMX5jMB9/fVLOOEs4zF0ao2XXqYL0EWRwxnjHiAqjMMuQ0FBZkLfi2m/HinqlnKmpaSsspTh8vSPVqbypHIQgBvwjgqW38UnE1oj22efrbQEtQ9S+dJGxwlGbbfj0+zYB6hvlbZQ7H4ss95f8WY2DJMsg4qCBty3KIz139gJDY/VzUcsABN5VQULiuLImezYoICYkxc0h/jo3AfOy7YDBXUiitTold5VKqyOHcoywPEiLvtA== Received: from BN6PR13CA0026.namprd13.prod.outlook.com (2603:10b6:404:13e::12) by BN6PR1201MB0099.namprd12.prod.outlook.com (2603:10b6:405:5a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14; Thu, 16 Jun 2022 18:01:29 +0000 Received: from BN8NAM11FT017.eop-nam11.prod.protection.outlook.com (2603:10b6:404:13e:cafe::74) by BN6PR13CA0026.outlook.office365.com (2603:10b6:404:13e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.6 via Frontend Transport; Thu, 16 Jun 2022 18:01:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.238) by BN8NAM11FT017.mail.protection.outlook.com (10.13.177.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Thu, 16 Jun 2022 18:01:29 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Thu, 16 Jun 2022 18:01:28 +0000 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 16 Jun 2022 11:01:24 -0700 From: Gregory Etelson To: , CC: , , Viacheslav Ovsiienko , Ori Kam , Xiaoyun Li , Aman Singh , Yuying Zhang Subject: [PATCH v2 2/2] app/testpmd: fix GTP PSC raw processing Date: Thu, 16 Jun 2022 21:01:04 +0300 Message-ID: <20220616180105.8839-2-getelson@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220616180105.8839-1-getelson@nvidia.com> References: <20220616093417.27843-1-getelson@nvidia.com> <20220616180105.8839-1-getelson@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7e8083e6-be4f-4c0f-0f94-08da4fc23d06 X-MS-TrafficTypeDiagnostic: BN6PR1201MB0099:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cSJTN9yi0RHBRwhAAK8Rv2u6vSvLlTBKR0qDISJgEELWJz4sI05MTyksZN7W1f2BIcKMoMCxxiUHs2Ltej/k04k72eE0H7f6iCqYFoTx90Ot8E8ALBMCIi2vgSdeqQPaQGCtrAilnkzPXc1sJ3WDqLatuOBRjVq0UlfNQOwMuLLKiubwmHw3+LpCGVcpznmmigAjRncJQC0UbU6EtqSboZUoMeoHgfnLhM1mLS65VopJ7MwYPuBqK4gyMiepwCJcdNpDfzb9FqTIeOLYXQcpVeN8fqKwdRDX7NRwKCjdxJUqE1Zq4ZZiq8nm8nM7/J17rPXCq1hE9MYBUANYQoTfI6ng24ls0mkcs/r9DMKgXI0KYBgTgQxeMJzxYTD38l+TcFP+wXMnUpzZn3JIu/nh9nJXsgWYcXNBIN/ROhqQwcXfoU1FCNdhxnZXGYbr1kDOMbNpHawM+Gpbv770a0yN5UtgZKnrvjgKE7Z2dKdyA1pndEbria/HWMmuqDCdNYAjPq733atL3SssQGP4bPnhkKbQsNDq1DdZTUphvbeFNPLJX1wwPeHDe/MTNgIWqXO4Qx4JZ5ndcGjcno9ZLTf8js/XhfOzRfASAzqILnrvxbqqDBQNYrcNB6SPKm1QkOdYmug9fPczz3Z3YeL4WJDWxH8JmWAsKTc9EiWL+RQMfUcG7k4un1apzXE3SCJKJy4Rm0FBO6ycC4Ubvm/uolqnrw== X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(36840700001)(46966006)(40470700004)(36756003)(82310400005)(55016003)(7696005)(4326008)(8676002)(8936002)(40460700003)(70586007)(5660300002)(70206006)(54906003)(110136005)(2906002)(316002)(2616005)(86362001)(26005)(508600001)(7049001)(6286002)(336012)(426003)(186003)(1076003)(6666004)(81166007)(47076005)(16526019)(356005)(83380400001)(36860700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 18:01:29.0528 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e8083e6-be4f-4c0f-0f94-08da4fc23d06 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT017.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1201MB0099 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 Use generic GTP PSC header definition in raw handler. Fixes: 9213c50e36fa ("app/testpmd: support GTP PSC option in raw sets") cc: stable@dpdk.org Signed-off-by: Gregory Etelson Reviewed-by: Viacheslav Ovsiienko Acked-by: Aman Singh --- v2: fix raw GTP PSC object creation. --- app/test-pmd/cmdline_flow.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index cfd55c598d..6cb1173385 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -11029,19 +11029,13 @@ cmd_set_raw_parsed(const struct buffer *in) } else { const struct rte_flow_item_gtp_psc *opt = item->spec; - struct { - uint8_t len; - uint8_t pdu_type:4; - uint8_t qfi:6; - uint8_t next; - } psc; - psc.len = sizeof(psc) / 4; - psc.pdu_type = opt->hdr.type; - psc.qfi = opt->hdr.qfi; - psc.next = 0; - *total_size += sizeof(psc); - rte_memcpy(data_tail - (*total_size), - &psc, sizeof(psc)); + struct rte_gtp_psc_generic_hdr *hdr; + + *total_size += RTE_ALIGN(sizeof(hdr), + sizeof(int32_t)); + hdr = (typeof(hdr))(data_tail - (*total_size)); + *hdr = opt->hdr; + hdr->ext_hdr_len = 1; gtp_psc = i; size = 0; }