From patchwork Wed Mar 10 13:53:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wisam Monther X-Patchwork-Id: 88874 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 755D0A0567; Wed, 10 Mar 2021 14:54:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E727322A6A2; Wed, 10 Mar 2021 14:54:22 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2044.outbound.protection.outlook.com [40.107.95.44]) by mails.dpdk.org (Postfix) with ESMTP id B5FE622A69E; Wed, 10 Mar 2021 14:54:21 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YYKLUuf0RbJDMUAMJMBghIDTnvL8eE+f2ze53Aw2q+8XQ8c1rNj0CcTjVPc1ysHm8qymIucugtpiFmgRsCNPWqr2VFg0nBKmZ1KH35Ae+5FzdNAfKUGY+9ZddMJ12D0Cp6AdOkt0SwyNvbbyil0GklxGOZ5vvezeJlYTUDSEWaqLgQdN2/fLtgfN/1orgbP6SaC7sZkGK9qgQfKedUyFT9nmeRt4dmigcWBQUAahT3UzYRNpEGo/lcc7KObW3IOIkNR/HHYWd0Dyolr7SEb2+mogC4YvwTewcDrpKDtEZsAfLVqzU4QVnL+Yfq9hV2pBmc8J6xoQZavgJNSV8IN0RA== 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-SenderADCheck; bh=u5+Zsrvf2Ngrc3dLWxNV+7sxU2N4vTEVZR1t47F5PCo=; b=BGs5NZWVQtYUMJPVLyoxtqgWc/rjvrmzc0KEk7BmFvCIcYMY934HoAaTFZJXS1CdIUD7n6sZuIq2C+0LsyJZdQj+64cz3i0gUYAgFLHIgnR3UMHUaPsJLtjlGzS46L4jw2RmMPsCSjBx3Dty7noIls2wUoZVxC3N9gjJTUsCTTMbW5kGDaL486uVNF11DYl6ISG6cTo9vJf2wiwGJerx1tV8JDH1kZfIeEV/R7/EBTfzosYtPJ3OmEOhy21k37e20Dn5s0J49DA34x1zhdSfwgXWZEvAiL/tdcUtot0tOZIgwr3HNuLQLRDcJslX0XulM0xAsyF2Wnw8jHoAch1nBA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=u5+Zsrvf2Ngrc3dLWxNV+7sxU2N4vTEVZR1t47F5PCo=; b=LUpZZnjK1bQTSYkEbgA3upuxtPmouBTiZIBL7MV+121tHGfUpL1m42mM7fcYrjwrFOo2JHpkYacsxfiGq+6VaTy9IbSfX8anF91y10Wc/eKuTUAgis84Lu9au3Ui/fIqANzR+4gw/9uzSlhvjbqcThmymG8rnAcnukySc0J5w7/8zPVv8gC1fs6D7GHsu9LqkAGbmFJmDC5nsL9aRBgayN7ntGn2iYV2tmK6llVhlgq44sbNXCEPPvc1RrSZmS1OIJho0Wzns55nroI15T/wWUyyEbZx5rTw98OPivY+XQQ8u3KAS7Hn5YX+wbeB0ku+A44k9bB7OixdMrEDAYMxmw== Received: from BN1PR12CA0001.namprd12.prod.outlook.com (2603:10b6:408:e1::6) by BN6PR12MB1922.namprd12.prod.outlook.com (2603:10b6:404:106::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Wed, 10 Mar 2021 13:54:19 +0000 Received: from BN8NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e1:cafe::82) by BN1PR12CA0001.outlook.office365.com (2603:10b6:408:e1::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Wed, 10 Mar 2021 13:54:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT060.mail.protection.outlook.com (10.13.177.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3933.31 via Frontend Transport; Wed, 10 Mar 2021 13:54:19 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 10 Mar 2021 13:54:17 +0000 From: Wisam Jaddo To: , , , , CC: , Date: Wed, 10 Mar 2021 15:53:51 +0200 Message-ID: <20210310135353.8429-6-wisamm@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210310135353.8429-1-wisamm@nvidia.com> References: <20210310134858.8104-2-wisamm@nvidia.com> <20210310135353.8429-1-wisamm@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 75a2dfc2-17a4-40aa-b8b9-08d8e3cc00c3 X-MS-TrafficTypeDiagnostic: BN6PR12MB1922: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:576; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t/asiB4wHUo9yIJFIXLzuB1O5ROBCNoQI/hBsB2K28SrImWgBhicWZpUbpz0KtKKuJsmsQf7TLoPiT8Qf8oVXxcNorkDKyaIx+IwhnzxjpjCNYDdsOERIQdaFiSzR1GO8NtHBHU82ggWwwvzCN9Qlr9FK04Z3MFakhiOyhmU5IIeITBC6kHdGBy7HEgbq7Ml2j5dSp7Xt5o5YA4e9NvsSlYwo4s68jLHCnh5J5G20CB2kpEgZVQGF9r+ozz0faAVtHWfgSfrT5uui6H7Jndc0spMgsXxLXwWtHLMTeLfibTlXffBRhTKdooltqo1s3HjP5iObetYjpryYlfvoZ+qNH2MnyciLcEYyX5d433SIcePOOfjJEJHxOyTej3KRDAxnsW8XCLp6lt1fBX9YE0pmLvgia+IZwct/ccNFWBF2p183iVTs2KjiaMmSenNIT1+fOhaT53qJMj1S5gcOi+/HEKRC+c/Nz8BYFIdW9izDJuWJFQOTbas0R6dYzr4SweFJodlL2Vr9eM/1y+xNg2Ybd7rbVx5VLPkjwcAdu00yQQkp4XlKtfRHEo9DnVmh6xi4wBdmR/g5v4z2ZX1wNOC6eQfGyYNSxwWiW2D4fmQRkAWwjsKVqMgRh9rDHkiUkJXmNvlkFfCV54SQhU5EnOakaI11+xq79ZmG3Ds9iffIPSVFQDgj3yQ1YiatCnBYT6i X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(136003)(396003)(346002)(39860400002)(376002)(36840700001)(46966006)(16526019)(7636003)(47076005)(336012)(1076003)(2906002)(7696005)(54906003)(426003)(34020700004)(36860700001)(356005)(82740400003)(83380400001)(36756003)(6666004)(6286002)(4326008)(8676002)(8936002)(82310400003)(86362001)(26005)(55016002)(70586007)(186003)(2616005)(70206006)(316002)(110136005)(5660300002)(478600001)(36906005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2021 13:54:19.6876 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 75a2dfc2-17a4-40aa-b8b9-08d8e3cc00c3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1922 Subject: [dpdk-dev] [PATCH v3 5/7] app/flow-perf: fix the incremental IPv6 src set 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 Sender: "dev" Currently the memset() will not set a correct src ip that represent the incremental value of the counter. This commit will fix this and each flow will have correct IPv6.src that it's incremental from previous flow and equal to the decimal values. Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation") Cc: wisamm@mellanox.com Cc: stable@dpdk.org Signed-off-by: Wisam Jaddo --- app/test-flow-perf/items_gen.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/test-flow-perf/items_gen.c b/app/test-flow-perf/items_gen.c index ccebc08b39..a73de9031f 100644 --- a/app/test-flow-perf/items_gen.c +++ b/app/test-flow-perf/items_gen.c @@ -72,14 +72,15 @@ add_ipv6(struct rte_flow_item *items, static struct rte_flow_item_ipv6 ipv6_specs[RTE_MAX_LCORE] __rte_cache_aligned; static struct rte_flow_item_ipv6 ipv6_masks[RTE_MAX_LCORE] __rte_cache_aligned; uint8_t ti = para.core_idx; + uint8_t i; /** Set ipv6 src **/ - memset(&ipv6_specs[ti].hdr.src_addr, para.src_ip, - sizeof(ipv6_specs->hdr.src_addr) / 2); - - /** Full mask **/ - memset(&ipv6_masks[ti].hdr.src_addr, 0xff, - sizeof(ipv6_specs->hdr.src_addr)); + for (i = 0; i < 16; i++) { + /* Currently src_ip is limited to 32 bit */ + if (i < 4) + ipv6_specs[ti].hdr.src_addr[15 - i] = para.src_ip >> (i * 8); + ipv6_masks[ti].hdr.src_addr[15 - i] = 0xff; + } items[items_counter].type = RTE_FLOW_ITEM_TYPE_IPV6; items[items_counter].spec = &ipv6_specs[ti];