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 6D02B42D9B; Sat, 1 Jul 2023 03:47:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4344E40F16; Sat, 1 Jul 2023 03:47:52 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2047.outbound.protection.outlook.com [40.107.94.47]) by mails.dpdk.org (Postfix) with ESMTP id 8334D40A79 for ; Sat, 1 Jul 2023 03:47:50 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HMHcJqnj/ghrr+7PPsmkzktfYms734+9DNavhrnMlSb5hD37KQ3LDqW1WXqBS9lp4sXdsZQwCa7/qpc0XZS4QHw6nHDW8GXodpGuuIzMmJTXV4seBsN1dunnJsoyNi+MXpaDVvlYzQ2z8lQDaCQVDsU2yiyv17RFS2X0C1oaYZs4Skf7oTV3warOugnNhro2xTVkN211XKqJZlKorgQLvBuBxPl8m+BRHnV0Yc8j+5124KM/LXa2Rw91gm6IPr5q+Rc32za2FCPsAP/b58DXfINLwWXXOfsyKgbDcLJ1P5U2zClcrzEGWDJLDBFILw7o5SoTtNmNvmRvOcNFVFbyeA== 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=OgBFqIckDDoA3bRwqA7KUalMRoSvKlqyg4zjBKL4Xjs=; b=nj11jDYcZrfHe1USon1o94veoZRDWpsgDQwxTYECmwBooLl64fGPwQEGFLnLNOpCxfxobkZ67uWJXjq+iVLw36RncppnHaBUELE/XssTKA/Pslf51CDklu/pD+uCcvA6/UXOA8IBZN1HlhtbR6pBSOnX7D14yWXifgm5b0+pA448b9uLlwc5LFUpKfnkGNLOYDXi95xGEc3J7neO1ASF20SsqxdpEroYf68jHV+QiXY7+Z3itR49o/ObsbOf0f3lP/D0fpXF7LiSBKfWzKUVomZfBCpIzNl8GMB9UZrpisV12D+EP/hy++ia5liMyp0s2EDxj41dYnuy3b2VBUfmpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=OgBFqIckDDoA3bRwqA7KUalMRoSvKlqyg4zjBKL4Xjs=; b=kSDUh81AWfKRRgHC02mhJVM4SOH9a6+Ln3nzIaWxIPiaUtwpJoA9FQrcgE48T3IfqD5CgKhRqLdggKxUjd0B2D+/y+h1xUuu/ki8Jt3eEb5jm8O+o615kB4x/JwFVuyWoKSuB3S0y4RJcltt56T6QSPdsuKAhvZN33VW9k1wvXEr/d9zT7QB/lXGd+mmHjKR8SoztpdfCICFH0UugXOnThnFh/IpRZw3kY6iuwoJRH4URIPzThpFLL0V3b5sxjsE/tWQ5i5N+oZGOxA/9XgU5utYv9aLoFoE7lb675Ont6JdwOCWXkh2uusOwFnUbhoI60RyxsP+pXVL4ITzRVcodw== Received: from BN9PR03CA0870.namprd03.prod.outlook.com (2603:10b6:408:13d::35) by CO6PR12MB5492.namprd12.prod.outlook.com (2603:10b6:5:35d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.19; Sat, 1 Jul 2023 01:47:48 +0000 Received: from BN8NAM11FT072.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13d:cafe::68) by BN9PR03CA0870.outlook.office365.com (2603:10b6:408:13d::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.22 via Frontend Transport; Sat, 1 Jul 2023 01:47:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BN8NAM11FT072.mail.protection.outlook.com (10.13.176.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.43 via Frontend Transport; Sat, 1 Jul 2023 01:47:47 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Fri, 30 Jun 2023 18:47:36 -0700 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.37; Fri, 30 Jun 2023 18:47:35 -0700 From: Bing Zhao To: , , CC: Subject: [PATCH] app/testpmd: add IPv4 length field matching Date: Sat, 1 Jul 2023 04:47:21 +0300 Message-ID: <20230701014721.437572-1-bingz@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: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT072:EE_|CO6PR12MB5492:EE_ X-MS-Office365-Filtering-Correlation-Id: 11ac88bd-82bc-445c-2ab0-08db79d52c54 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pgjqrKphsqo5dUlEcaAb/fA5Qs/QP3bL7dejQrU1p26YWyvVXNDttIsHxnFx0j7vLas/D+x6FmptkOPana1HCtE7+CGdhoudNxlx3U8fCa6hYKFgsoN4hpFqCTfLmbKkFadHjnx1aWdVzxuYfZLT2mdjbvy0TK0KTqThUC0AOqyzOk5nbYzWi5+icHp9JTXq8Eth7/rs6MrDB9D6ROpv8dZcIznC8hzif5Wu7cC1jlVFzzgMx7izAp3PquibAen28VCcFvSofnKK9rv3jCVZmxY63jALX6NobA0fWIISZgxdohe0tbi9yOrwJAjAnv/LTzh6iY9qwwINek/5OfUatY1Io/gOBrj0Y1yltNA6ExlSIDFihq7Id0pKgJkKIaKN2WfoSJSA0bJoDBa/DQZQliOnpj705PkGmjQJlNgvlkqpUUoFs5/wlJskM/D/OaLVR4XvdWirS+F5Yb4VAAx0TQPmHmxj3wqI7NZ2EJeTfzW75S7A5HEo43TAbh5Yk9abPQ6yoji3tA+soD0N0qTJPE/rKWgCX1O6Q2zY5PHD+fOBg2RClUrgMgo9dLAVev5laWYzFAgOhpPSKbh1zrocmcFsMe9SNH3Sl33rk8szykpbYb6y0XvOlAp09EXiGblqdAuRvx1nkH+4K8/N5eLDJM1Zy8ghMOu4iEpnE9Xc3Phr5CNXgjyWF1plRe7rUSlHBoJ/TrtipvrE5Ddh90B4j+jNJL4KD3UwqTgpQut2gIGucxfs/d90cQGgR3WiNvg9 X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(136003)(376002)(346002)(396003)(39860400002)(451199021)(46966006)(36840700001)(40470700004)(86362001)(8936002)(8676002)(5660300002)(82310400005)(110136005)(26005)(1076003)(7696005)(478600001)(4326008)(70206006)(70586007)(41300700001)(316002)(6666004)(6286002)(16526019)(186003)(2616005)(2906002)(40460700003)(47076005)(55016003)(336012)(426003)(36860700001)(36756003)(40480700001)(82740400003)(356005)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2023 01:47:47.9734 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 11ac88bd-82bc-445c-2ab0-08db79d52c54 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT072.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5492 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 In the command line, the total length field translation support is added to pass the value to the rte_flow API. Signed-off-by: Bing Zhao --- app/test-pmd/cmdline_flow.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index bd626e2347..738ecf2a40 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -313,6 +313,7 @@ enum index { ITEM_IPV4, ITEM_IPV4_VER_IHL, ITEM_IPV4_TOS, + ITEM_IPV4_LENGTH, ITEM_IPV4_ID, ITEM_IPV4_FRAGMENT_OFFSET, ITEM_IPV4_TTL, @@ -1604,6 +1605,7 @@ static const enum index item_vlan[] = { static const enum index item_ipv4[] = { ITEM_IPV4_VER_IHL, ITEM_IPV4_TOS, + ITEM_IPV4_LENGTH, ITEM_IPV4_ID, ITEM_IPV4_FRAGMENT_OFFSET, ITEM_IPV4_TTL, @@ -4229,6 +4231,14 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4, hdr.type_of_service)), }, + [ITEM_IPV4_LENGTH] = { + .name = "length", + .help = "total length", + .next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4, + hdr.total_length)), + }, [ITEM_IPV4_ID] = { .name = "packet_id", .help = "fragment packet id", -- 2.34.1