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 48B0AA0032; Wed, 6 Jul 2022 18:12:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F56640687; Wed, 6 Jul 2022 18:12:25 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2055.outbound.protection.outlook.com [40.107.93.55]) by mails.dpdk.org (Postfix) with ESMTP id 3B5E840156; Wed, 6 Jul 2022 18:12:24 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L+33RY5ffNe/eUpiU5ACUafOq0QZ24InT5WoM7EqK3l5DvjnhxrKErWzCqlUHnZl2v9oDVG0NCtchK0TRaXd5rP/EEt4plsNOR5Y9+iZ05ftVYLGQUiyUnExYHBaJq1O62OI4S1b004sB01RddkTIFruMf68YkNFezfZ7inZq3wTLrCDi0vkDgK2TOeJC91DotG24oe4Mc4Jiu/qBHOlZpaCTxjCcJlQUM0tImVOMwNhxay3GNtUVBQxm0pDMagKFPYt4+kEj6ujskPMJUdCkLCJwhzl6wjw0O7bFzi+dUpEhTm7c9bnC+ZcVns0jAOTJyJe9Vzf2+W21KooPAeq8g== 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=xeBufxO++vn8vqQQbNGrld6NegTb0hHmNQbW51xPg5w=; b=eiRPmZ3ToUtg4K7gVdgs+nYsD2AtVe6tzigM8q75CNUHEdmXZu6AiqiASxWF8mTjjvG6hsJsK56z8PLBoAGFUC5FWHdYqiBi0vb6hw2c8kW192gKWZaRX/Elza0cAzY30qv7L0kUgYiRaqq4q2ShOkRJq/cdHKwyJsViueJk/6+Wu5C1J2QlYA4Tp5ZTXErBhW/gM5nIKqdt1JsBgWcnIVKWp99skrvCuE73ADD6KVg4SVE790FEHmwVaczz+u7c4j8An7MARTasld9j+9nAE+zp32/vtFdJG0GMMSIX1So31oGVWiZeqpLp+s8lCKAN3+5bp+eryBNzLD0cQDCNgg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=oktetlabs.ru 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=xeBufxO++vn8vqQQbNGrld6NegTb0hHmNQbW51xPg5w=; b=MMmdFX23vKq4msu/S8ngKlJtLSAdTXIdlXwfdObcJ51h65xNCeg789207qvCSKmPlVhHuF+4L4ZzW/qRqp0kTVrly676KJYqJHvSztBj5txmqcHMYSJxNbGPwFnpWzuPruJH/maqa93aKcP11HEIQb54s/GaaVsGFna41jyoAcCW2owAX4aBuRSSMyqy8Vd88FPmjnKKB4Lioc88rgO88pNN/B8FY9D8KvmWVpNXjJvgPRAdqaLGUmRASUOIwCiEccZQc8pz8WRGLa109t3ZYnAC7fJvNoJ2h+9EX7AaVYxzA4eWmf7sfYyXJ0WLiL6ivOjGmIp6BxfAzh2vFb1VZg== Received: from MWHPR22CA0069.namprd22.prod.outlook.com (2603:10b6:300:12a::31) by MWHPR12MB1469.namprd12.prod.outlook.com (2603:10b6:301:10::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.17; Wed, 6 Jul 2022 16:12:20 +0000 Received: from CO1NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:300:12a:cafe::db) by MWHPR22CA0069.outlook.office365.com (2603:10b6:300:12a::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.22 via Frontend Transport; Wed, 6 Jul 2022 16:12:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT053.mail.protection.outlook.com (10.13.175.63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5417.15 via Frontend Transport; Wed, 6 Jul 2022 16:12:19 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 6 Jul 2022 16:12:19 +0000 Received: from nvidia.com (10.126.230.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.26; Wed, 6 Jul 2022 09:12:15 -0700 From: Gregory Etelson To: CC: , , , , Aman Singh , Andrew Rybchenko , Ori Kam , Yuying Zhang , Viacheslav Ovsiienko Subject: [PATCH v2] app/testpmd: fix GTP PSC raw processing Date: Wed, 6 Jul 2022 19:11:50 +0300 Message-ID: <20220706161150.25447-1-getelson@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220630125055.19719-1-getelson@nvidia.com> References: <20220630125055.19719-1-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.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: 0325330d-51d1-4286-3505-08da5f6a4d7d X-MS-TrafficTypeDiagnostic: MWHPR12MB1469:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AJKEvpCiRvvjhzAX/ofKEpf1P1m4m01e/C76puqeCYG1HD7jjs7UNmFyvApDIvaWdvL3lWA8hHWR2nKZURAw18iKVPh6+lr+efvUDMWiPwIJWj342OJGuH+6NwqpzoeijT2ILslDxsJvP66y31nKXyqosSOhHQg3U7LpM4rgSkf7XVwtp+060Rr2KF6OUXizlzmdMT9FhfUhPNH13eyHsRYFvzhxv4X8AIpAKupsENbUb2tt6MjLQAJYqwA63eb3rhIJytEU3PybGnElA5kb0yH8LUMwlWdDk/+f6HG5c3Mdoz2gHGshuUkeEwLl5hBf39cgIq8poQ0revFrpAsYSHowiOSLUOBBg1o3YzapEdCEa4fIx0vwGdVhBvpN6WHNclI6GyDWRgxI6dpaL0iY05ZKN93QdZjXdYJHNW25TqP/PcuJ7j/Q30w935ZcMIsy86OoMJ/PZ6DWB3EgfbURZOX6gcWcpbJ9headmZiNv3JCBX01awcxvuKITnX1wdNR8BI+yW5H7IKCdyv571nG9jU1cny9jh8bMQvlXNdHe/udCA2GaujJCkIpvkrhSOW6n9snMJojv+w9YcqLSMIWOJAGx/ulZuiL93ekwINkgr3GwXHxf/M96MsYM+lzROVCEO1q2eAGjd5he8M20XGFHV1FnrGg1nQTOwJIBNRm0JRMdigiqDHNOuRcoaAP4n9/zcf2U7Blap1YBg36z9CZYPncrO2CSUJaYN8lEzKOk2TA7DpIbU2HFBjeF6ukODWtDhRFYSyowvARhEN1mDUE7DoPgDtL1ahSIzVnX0DpzKJcJsDZSN6Q9r29SIZvwmaafWUJyb+mlw82UvmR7BjCj8JVSiGGOYFvZr7mR6XkV9U= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(376002)(346002)(136003)(39860400002)(396003)(40470700004)(46966006)(36840700001)(55016003)(40480700001)(40460700003)(36860700001)(36756003)(316002)(47076005)(186003)(83380400001)(16526019)(82310400005)(1076003)(2906002)(2616005)(107886003)(336012)(8676002)(6666004)(478600001)(426003)(81166007)(41300700001)(6916009)(6286002)(5660300002)(26005)(86362001)(70206006)(7696005)(70586007)(8936002)(4326008)(356005)(82740400003)(54906003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2022 16:12:19.5851 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0325330d-51d1-4286-3505-08da5f6a4d7d 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.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT053.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1469 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 GTP PSP extension size initialization. Clear input buffer. Fixes: c65282c9aa31 ("app/testpmd: fix GTP PSC raw processing") Cc: stable@dpdk.org Signed-off-by: Gregory Etelson Acked-by: Aman Singh Reviewed-by: Andrew Rybchenko --- v2: fix comment tags order. --- app/test-pmd/cmdline_flow.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 6cb1173385..7f50028eb7 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -11030,10 +11030,12 @@ cmd_set_raw_parsed(const struct buffer *in) const struct rte_flow_item_gtp_psc *opt = item->spec; struct rte_gtp_psc_generic_hdr *hdr; - - *total_size += RTE_ALIGN(sizeof(hdr), + size_t hdr_size = RTE_ALIGN(sizeof(*hdr), sizeof(int32_t)); + + *total_size += hdr_size; hdr = (typeof(hdr))(data_tail - (*total_size)); + memset(hdr, 0, hdr_size); *hdr = opt->hdr; hdr->ext_hdr_len = 1; gtp_psc = i; -- 2.34.1