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 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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 --- 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; } -- 2.34.1