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 7CEC8A00C4; Thu, 30 Jun 2022 14:51:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0662140A80; Thu, 30 Jun 2022 14:51:18 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id 75BDA40223; Thu, 30 Jun 2022 14:51:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hpkQEvpEePHaRaGVTZ4M3Zw2neCDU5e/LJ2cR6gM1ADJHjXe2Ra410znQTruLnPwHIEzqoyk795QSII1VdCIRSz7AVPnm9z8rvggdeCIGZJCwBAZT7E8v6HuFcwTOIX+SCBb3pd4LwB+6lfVSr/7Ogctb5zIXnQeWMjvqwoxZVExlG1uD5CjchhhRZgciAlqLyXoYeMsOVwnZlZugqkqgF6VGDOd5r3Szv/roB8M3oNkS+89y/rKXcaBPS8v06Cpc3TYl8D4JbgvyLfkexqOLzLTaUBF0Wzk7yjK46a822Qj+Z4C4Ryf9jQtr1JUCRkjgoxQRBB8mmOZIjgsrCn4Dg== 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=ft4dP4SUQ1cBwwf5nInpH+PDWhPqsBoa/HGSS6YSwBM=; b=VOl5MXx5Mn6ZxnXzv/ucItkL0hdZcd3dyipqOYaell6BEhPVSez/UHIdUb9vhhYpXsRTq/pGAEXpM/LmBEcSt0s1OQ5uy9E+metIkomwTTuWrWTKX4nr1b4WeFo6uyJpL82VABQul8uuesxRGkPj6m3UuX2mTkuAJrxRZTtLni9TtGpItobx/bfUEoZSev2lVOGGLGMLxUCCnPCb6jsEm116ba6DM7QeVNh8CNV8kAk63+qlk9cRceD/vGqlRAV4rISGScGoMomgD9jXbKDchtHrovX4ocFm+kxend2IQrZbCExkyJjYb0lyMUOJH2Zeku8UaxOty5VwrB9y+Jp3Gg== 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=ft4dP4SUQ1cBwwf5nInpH+PDWhPqsBoa/HGSS6YSwBM=; b=cXXYgWfB/CoCcmtU7vkAcNNoHrCJBPaiYk6L8QO7VtIJf2B1U54USmlZoufsiAPwC5C+DALs1LPnkfVMugisAQ6Ly4qJfnu82GKhGR4pyLZTO2qi3vTPtst0NydwifBjijBMn4oCyIWc6sZrpq+YNWCxtLBLTZv7GFWI+YFmvt/Tpzp2kTmxwhOSzN4Aa73ORolRe1zjLjI78ns4oJIm3R8LUYvd3c3NKvkOO38idKNe/90VuhjEHNpUQ0n1qcBLIABw6FCi7yEX/C1p2j4BS26JNE/RannbkgpotQ0g4Wvx5iQn2oMIdUhInBSnCoUj1QpBEPCQ+v45hTcPsbxXpA== Received: from BN9PR03CA0810.namprd03.prod.outlook.com (2603:10b6:408:13f::35) by MW3PR12MB4586.namprd12.prod.outlook.com (2603:10b6:303:53::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17; Thu, 30 Jun 2022 12:51:14 +0000 Received: from BN8NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13f:cafe::89) by BN9PR03CA0810.outlook.office365.com (2603:10b6:408:13f::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14 via Frontend Transport; Thu, 30 Jun 2022 12:51:14 +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.5395.14 via Frontend Transport; Thu, 30 Jun 2022 12:51:14 +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, 30 Jun 2022 12:51:13 +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; Thu, 30 Jun 2022 05:51:09 -0700 From: Gregory Etelson To: CC: , , , , Ori Kam , Aman Singh , Yuying Zhang , Viacheslav Ovsiienko Subject: [PATCH] app/testpmd: fix GTP PSC raw processing Date: Thu, 30 Jun 2022 15:50:55 +0300 Message-ID: <20220630125055.19719-1-getelson@nvidia.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.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: b6fd057c-ad7c-494f-e820-08da5a97376d X-MS-TrafficTypeDiagnostic: MW3PR12MB4586:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oWA0d280dm8mseEgTN0vYrrgl+plvJOKuHQY9ScC0wKZucbtlfTybKlteTE2cjawg3ETisim3+A+6gnMxv5x1kLG8eOZv1OikUWDmDAR/HbcNNsazYdL+A5tuMBGBAMG5FzGret0l10DiV2OcUPK3JQCz8eXa7TvxfcnOPaDqUFs88iN8AxmTllTaihLtlN+moBnl4jxECv20E9MQS5kre0HaGOkNmRYEkRlBGxrU5Sovl4J3EYs05Nz9Ab2+MEREhMnW2zGk4XhbWAlak+uX+MfsVOWqMErYs/HnpqcdCjEaX6udopLKESMKs3kO2YJ4JwkT/9Ljl53VrTxLUO9kr0E7SFDfozmKTdWkYhyPBOTg/f296d9b6zeL1KLu20k08zqtMjT8CPyukGGhZborZxOPu6eNPKyglYy0fw6xWePXN5PE7rG4Lbg+rSjXbhUdcjZ71XiUdYLsK1rhbGcaUU3ujutg11s2QpqHoBAhLycQKbPM8DhH2+7PbTHXghk9cld2RxxRna0fVLAlr6gZjdtemBEesIvLqlxMxoUlmiK7KhUPMZGG1TYFKKXaEnEt5FvI1QQxfaPt+ON743GrTezH1CdZmwcU1wRtYCdUjKeumfsMqmMWOvFTmK5wzxZETtCD0R8+IYONbQ48G+HLxjc2ZTxz/5bZMM4nTeinD7obVymcR/dk1Hzs3W2cisnMcW9QEpPk/nPdvbv6u9j5UfL3/adanHD1A0JMVY0mUHrfnKVuH9+WKEo/cIbQ1TJ2Wt+g5Ndqc150kJro5ST4xr5EYhN+b+3II08t2t3feiaFJ70hmDm2ZPem8SyNApUarwge8XLvN7VEntU2j0DukFFabOJmK8IMphzwZ2lo/wuxAnuA/Vzdi+TnQZPGYJ6P7nWBf8SIZZVO9rGzhxHCg== 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)(346002)(376002)(396003)(39860400002)(136003)(40470700004)(46966006)(36840700001)(2616005)(4326008)(8676002)(70206006)(26005)(5660300002)(6286002)(55016003)(83380400001)(36860700001)(8936002)(6666004)(70586007)(40460700003)(40480700001)(82740400003)(81166007)(4744005)(107886003)(356005)(478600001)(1076003)(82310400005)(2906002)(7696005)(316002)(6916009)(54906003)(426003)(47076005)(36756003)(16526019)(41300700001)(86362001)(336012)(186003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2022 12:51:14.1139 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b6fd057c-ad7c-494f-e820-08da5a97376d 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: MW3PR12MB4586 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. cc: stable@dpdk.org Fixes: c65282c9aa31 ("app/testpmd: fix GTP PSC raw processing") Signed-off-by: Gregory Etelson --- 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