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 6D3C1A0524; Sun, 14 Mar 2021 10:55:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C1EE160890; Sun, 14 Mar 2021 10:54:58 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2049.outbound.protection.outlook.com [40.107.244.49]) by mails.dpdk.org (Postfix) with ESMTP id AEF901608F9; Sun, 14 Mar 2021 10:54:54 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M+SwRcd40sxeSlxNbcKUeC27nIwcTkAaLaMFejmvofBNZGFS09FJL+7TUSxyOy/GZCoi4+7fbyqFpBrL/8z7/cJdZU4mtviS5m7eEKanEoRwwNvBc4LLPaTIAshcgrY/3NbQZ24Pbg4PIy1l7wqWz5fpb1XVYin9ZQ2Q66FXp6YMM/ohxi3L7r7cS0uRsCp88/5mxzxN5NnB2oT+WM2qoabLWgxTrNSi1l2ddqEli8GBfgXK3o0sZbsM+Yu15ZGqIWn07QiVQnAxg8/gRyanrxaxb0A7Zh04p6dXvXoMkjMcu0/pdTHzUtX7uCFvGOvwzJ3gGn5Y8FnDrhkrf0mUQw== 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=cEcT4TTzPODAayZ/hrB70olEiHwV2RjMps4xvLm3plw=; b=L8XuMOdhpMWpf0x9dNM2RoN+pP8d9on3fpjEqLmQyNg0Zr6I0DZZF/LQB73YEz642KfODBJ/WsjKSk9Lk8ueazEpKjB+ziWsnUeAnDD7UstxEol6LQNzCHkRSTppaRHSFeiulFlOaJAtObbPDjdVtFo2J7yh5aMd8uRqEWAd2c+mZ0KU/2Bgq0/wIBbLM27yrCU69giWU03O0dtr8qluraR9WlNYU3w5TmR9ZYRXRAEzIkvwAPL1QE3DSlo4WAJfVCa8ZO2m2wVSuZF3+Sbb40mwQ02mXDilmUcmdZuMoZr/DM4d9TAERdUJXOwDb5C49kB9N7crdfnjBRWeAcOJ0g== 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=cEcT4TTzPODAayZ/hrB70olEiHwV2RjMps4xvLm3plw=; b=SSkeBymCYUZdnCfONqYSanp2AGLlYrlP+WXJQL0fbYRfdz5CuydqgNqAc/fLFc1NFE3iuz3DGoUHPz1212otAVfTpNmfoe+bDr8axTmEdALIpgGoxLhmPXJdDr/87gitAYBurHHhc2aTu7tN6ER8Ur2U2Oeh+wSWdHSW+6EuNqFCpTYy075/X35aou1+OhPfoJCierV5nGf6+olO+dElwcBYgqcPNn9VmZdBe0sq1W+DVA+vx9aKPpX2r9WxEl0/m+w92XF//ZlGBb7W1LZa6BLkf/WoknZALdKaC/tzbD1INGFhdNda6vAKkA1+Lq45ux5pxZjIFH8YruNEpIy0qQ== Received: from BN0PR04CA0142.namprd04.prod.outlook.com (2603:10b6:408:ed::27) by DM6PR12MB3675.namprd12.prod.outlook.com (2603:10b6:5:14a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32; Sun, 14 Mar 2021 09:54:52 +0000 Received: from BN8NAM11FT041.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ed:cafe::d3) by BN0PR04CA0142.outlook.office365.com (2603:10b6:408:ed::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32 via Frontend Transport; Sun, 14 Mar 2021 09:54:52 +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 BN8NAM11FT041.mail.protection.outlook.com (10.13.177.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3933.31 via Frontend Transport; Sun, 14 Mar 2021 09:54:52 +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; Sun, 14 Mar 2021 09:54:49 +0000 From: Wisam Jaddo To: , , , , CC: , Date: Sun, 14 Mar 2021 11:54:25 +0200 Message-ID: <20210314095427.10101-6-wisamm@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210314095427.10101-1-wisamm@nvidia.com> References: <20210310135546.8680-2-wisamm@nvidia.com> <20210314095427.10101-1-wisamm@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain 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: 28cfac61-7c22-480e-8112-08d8e6cf36d4 X-MS-TrafficTypeDiagnostic: DM6PR12MB3675: 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: gCm7i5/X8erI1Ll3N3Umw6deJu1gZDP8CYFh+K4XvF41Rh7UgYCYrKwRj3wBHPLS51bM3WfY0zBZ4YuLnuWw3ZqQxailsmIM6ed0jstqZmvPlS2og5x839nBWiaXgtA/1lF3aoN0wALsncDC85gDc3uHRkha4LsI+KZ+y4pQOOz5H4OLJJkb8FWlmdce7EgtENITcLLEg1zHgPSS34D42m7SsES4vmD5GYadL7fgFcJMHiOja7B9bwF3yhrx6VyQLld/X0rjMRI9z1OSy7COD1p8YU07/RHUWbbZ3JEnd8yislBsUFVa8II7LcGcOKx/SBCz5U1vWhC9n0RWNLbFfaQ73p0OVV21RRQKW7q6nfcfvNHjTCzYI+nxStpjCs+ra86jcKQvri8yjHzI4xbPpZIXbl/xx52aIgMgQTgNe0q5eGUMrKVav6RZbsSwYDSQlPympP6BwL26mwZZuft+zHkOCv7KCo6qykQTA9KdWTY2U/m5Xw0ACwdwi3T1bu16erdOQOnYnSrsYbcYp6OvzWVx64d+v521NsmDOb4RZ/VCvzXPAN5hkjgu7YFnjFHyF+PUBI8eGXP8OLMDTNnySbnMoqeF4IOm62TGoElvcNn/Op2uIxQRSRwHF93eZJsNd35z9LtrRSf/Fu1U07rW1PbGSPWMlzK+t+1rp4lyw3f7/g4LWz15ZloMYKpcXubr 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)(376002)(396003)(136003)(39860400002)(346002)(46966006)(36840700001)(356005)(8936002)(186003)(4326008)(36860700001)(316002)(8676002)(7696005)(70586007)(54906003)(82310400003)(478600001)(34020700004)(336012)(70206006)(16526019)(6666004)(36756003)(86362001)(110136005)(2616005)(26005)(6286002)(1076003)(55016002)(7636003)(36906005)(82740400003)(47076005)(5660300002)(426003)(2906002)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2021 09:54:52.3841 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 28cfac61-7c22-480e-8112-08d8e6cf36d4 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: BN8NAM11FT041.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3675 Subject: [dpdk-dev] [PATCH v4 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 Acked-by: Alexander Kozyrev --- 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]; -- 2.17.1