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 DBD57A00BE; Thu, 16 Jun 2022 11:35:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8793B42C20; Thu, 16 Jun 2022 11:34:55 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2063.outbound.protection.outlook.com [40.107.220.63]) by mails.dpdk.org (Postfix) with ESMTP id 69F1E42C09; Thu, 16 Jun 2022 11:34:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ms2IPI2kDX0rCs/zh23k/qvbqTLultp9JBegQr7K2fVIxMr3YFJGuWC+5bHb2FdpRxlQUyUJLBIuruKwQlIsGrg6znxhjljGxU+nl8vsiycSKNzBNFjem9GCqJjqk7W0C2R4AlMWtN8yVTKRnCI9G8sw5SwISPCRJbRzVLKm9XRXTeKv8x47YGFIjhtivRqakla+8RLjhqI4jOkyOaZPWer3996L0XgpyQXJhxLbWkIiWyOAevi2h18+ynLPfZDqxm0bpFGttG+fZ8CR8A7/FL93VDcHD5xuF79zsVs6IZvaa5Mmx3yROCQgCwmhCuBrRej3u9tE/9/sSXGbgjYO0Q== 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=y0rw8Ae7lAhxma9S4q6KhtJfl7ISuHI9QCAxso9tZmQ=; b=nXWEcvJt/XgrXX0jLlCi349hYCmxpyZjBBcJQaiPhBqfufzLjFG2s51Jg/v+qAx+PAEhA9VUzNiwtVQR1qIXu0AviUKn82rQyn39P4nDO9EJ+24ydrePg5UBeGoPSNFSiXQ7qXLHe8VIKUoH62p54VI2/ORGqgvEcZeN0FdXM9j4RcHFwV6So/HoeS9YulgZ7BscXboS9xydWzBp4nfGzvjDnBeROV8GPoW61ZthHNwY50X/or0CfjlKCa/kXouaAFZjEK+d17znhkFH8MCPomtv1Id7evSLJ+pfSRHjuAPWkFx6/uiqYDMaSS0Vao+deFTYkoVEwqI8NvXjTB8Qxg== 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=y0rw8Ae7lAhxma9S4q6KhtJfl7ISuHI9QCAxso9tZmQ=; b=gRrHQ4OIpimY0hQbK0nciNlTHQN/r/uUpDcftAAG36GtXRYZ+MpMVTHAjqzHJH8rWXXyFg7Mb1RybWz9D+UakPFu4cY/SudisJxWYM7ojV2kefdemMMhTYmDQ3od3M+3SBbNOwsOxEhz4v9HXkZxpZhCB6DNDDOl6Wdw+1i82jwl/Xj0toOy+icahVh9fiYO1557vvNMLvlpVfs1La7MVLjcANBDIaBxzHYfc6ew142iuyAGfd0Sxm25Ap91PqA82B/E9TGoggOgjOJ5ISGhQWyje56s+dSg/utE3JKSrHB3MYX6EU01nz9MKlZGagxu0b8Kv40iGBFAPqSE2kDmkw== Received: from BN0PR04CA0059.namprd04.prod.outlook.com (2603:10b6:408:e8::34) by BL0PR12MB5538.namprd12.prod.outlook.com (2603:10b6:208:1c9::11) 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 09:34:53 +0000 Received: from BN8NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e8:cafe::43) by BN0PR04CA0059.outlook.office365.com (2603:10b6:408:e8::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15 via Frontend Transport; Thu, 16 Jun 2022 09:34:52 +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 BN8NAM11FT053.mail.protection.outlook.com (10.13.177.209) 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 09:34:52 +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 09:34:52 +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 02:34:47 -0700 From: Gregory Etelson To: CC: , , , , Viacheslav Ovsiienko , Ori Kam , Xiaoyun Li , Aman Singh , Yuying Zhang Subject: [PATCH 2/2] app/testpmd: fix GTP PSC raw processing Date: Thu, 16 Jun 2022 12:34:17 +0300 Message-ID: <20220616093417.27843-2-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 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 094328be-9a5d-4342-3d52-08da4f7b776a X-MS-TrafficTypeDiagnostic: BL0PR12MB5538: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: ygEn4uXsF/VThD0JF+kUSSYu/ChQcuDpMElYPo1uTXUG0SxuwRHVEK6VIxQgnScnmRzauiqSUv0+34jHBwwyB1229VsfqFyMBKrhb6Bn6OmMNpMJcS6JWlD128o4giQ0+LkM3AM++weMQUQTA3j4uzWAnn2kEyAEWn/hnvVr4u8JgDsRuHGzkZdbmF6CDyHx7GduVrKZnDhov9TYd+nepAdzJZ+5Fi0sepn3nD/WzKWyF2KEHwls5/hz8BGr/EsZIzB47NXxTzGcEAr++yas3xPOAIRhE9n8YtEKT8v6L0KEMRSYD+3gM1m1gs5og6Lhc+mjrvOk0Xfo/mVmLTz/agZ0SkpoKQXfztzIj6jK4BAbl1E3lmmnC/dANzlz0VfxJZ49LaEimPVa+QoNkquHDz7aG0z+SOFwQogtNSAVifq4V/ojo6NHrKIg/Hu+6AMgxcCy+B6+4hr0vDbFfeh/f39sCg2yVnv2p+4+efV67ddDLBvKpWdfq/VTkKh8Ik08bRRcZYMdj/jbZmOIm+mrrvAYGoABOYSoa5WzCs8qbdOImpXWZTRYLApX0yJuHHqPHiHZ0Bl0YaNAuWT/YTtOZwqYYq4kM6ZyzpzZ6ebG/qdVccEOBtt9UcedR1LejuqSkFHVgZKyOoM0soVHSKXQStJoWxsduJLMUHb8YlCgSt50xxkcDqL1YpLHWJ6mkYKxj+4aETvnu6aeft9UzqjNLQ== 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)(40470700004)(46966006)(508600001)(36860700001)(2616005)(6666004)(81166007)(40460700003)(5660300002)(316002)(82310400005)(8936002)(1076003)(426003)(186003)(336012)(55016003)(83380400001)(47076005)(16526019)(36756003)(7696005)(8676002)(26005)(356005)(70586007)(54906003)(2906002)(86362001)(6286002)(70206006)(4326008)(6916009)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 09:34:52.7650 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 094328be-9a5d-4342-3d52-08da4f7b776a 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: BN8NAM11FT053.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB5538 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 --- app/test-pmd/cmdline_flow.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index cfd55c598d..f6b39f6332 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -11029,19 +11029,15 @@ 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); + struct rte_gtp_psc_generic_hdr hdr; + size_t hdr_size = + RTE_ALIGN(sizeof(hdr), sizeof(int32_t)); + + rte_memcpy(&hdr, &opt->hdr, sizeof(hdr)); + hdr.ext_hdr_len = 1; + *total_size += hdr_size; rte_memcpy(data_tail - (*total_size), - &psc, sizeof(psc)); + &hdr, hdr_size); gtp_psc = i; size = 0; } -- 2.34.1