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 0DA70A0567; Wed, 10 Mar 2021 14:49:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6DB0C22A677; Wed, 10 Mar 2021 14:49:30 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2067.outbound.protection.outlook.com [40.107.93.67]) by mails.dpdk.org (Postfix) with ESMTP id DAC3822A684; Wed, 10 Mar 2021 14:49:28 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AbXNpsH6o0FD6m5aY3Q0bBHed4WWhB5S9GSBPY1WRQUjf6QRIHJvdj9o4UEHzx3b1dgWQbFYXKUt6hlIZejLgrqQZyA+bTgUlFhEvzMYF3noj/y8FEfucpR9I1Sm6TtcL9a1x7HHfQX+nPjq8rmHYPFZSbAVEqkRNYPEN0/vVTxjC4eKZ4t/xlkYHYcizJ40XXMS39aOXLs10VPf2F+gOOAKSM2+y8wg44t+lkMs+EAnCd3pAnN/UR+Oc81dKkrFPZ4CHhXYa1JIiebfqwWvqjwwrlOibuQ67asyW/mazoltCaxaJ0w5tlIuqy2f4KgPdASnG/K1vYjd1abfvqXrPw== 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=nv7hJJCbEEofG6beAjO8ezhMRsmvtMJb8uuAq8niqbBoGKSU1NW4Y4Ly/lWv/WmMLuPJfY0WExBlNdM5aOD0x0jlZJR0kFbNnUZtdgP7RuaVmpXt9cefUvkYfqcEeKwjwGKW32Bd/+jG6Wc+c8TYrpPITUCqbznA0t6sxkvQ2WsNzBKfkZMCyD5RylwPS1dOuOZ3JOSNBF9TxG/1ZA7ZqXG9SnrnCLMOxONRyz9GuYvMnOdQ5Uj4MsBWAAl8WrCAaZ1DJfVk1P7r4zGYOXIjDNUHDsGMHhHu4pQmAVWU/hxbHxPUQdg/5THn2vRYR51RddWSmxFTW9Bzu4cSpz33og== 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=q2Jqsp8LqeXOxmSMsF8doc4dC+b78kRAV7J3V+Iv3WXZphzEsPlpmvP/TXNkYfjmMnKctAyc6UB7YgdqCyUVwvWAnGHkGMEjWOeg5XZPOpt2wF7VN17aoI4iPAlj4/Y4zjeStz9mwkABNfqYSJTbpS39c4YK3g7pZzigN1TaWoXtV+p0xkQgns2qWUQ06AEsb04XqkkHtr88rJ+ZEfrLVEFvnqDBDPRM8nWXrRX4MHNUEI7FJLlFLur+iT2e9aiw14LtR8GcvdstCo1KTuHgrBKhaHfyGuxTPJOcrZd/WWzU/qT6NNl+b19K2kiCyFxqHJEIzIKxzNj1tkskw7PbYQ== Received: from MW4PR03CA0235.namprd03.prod.outlook.com (2603:10b6:303:b9::30) by DM6PR12MB3643.namprd12.prod.outlook.com (2603:10b6:5:3d::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Wed, 10 Mar 2021 13:49:26 +0000 Received: from CO1NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b9:cafe::db) by MW4PR03CA0235.outlook.office365.com (2603:10b6:303:b9::30) 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:49:26 +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 CO1NAM11FT060.mail.protection.outlook.com (10.13.175.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3912.17 via Frontend Transport; Wed, 10 Mar 2021 13:49:26 +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:49:24 +0000 From: Wisam Jaddo To: , , , , CC: , Date: Wed, 10 Mar 2021 15:48:56 +0200 Message-ID: <20210310134858.8104-6-wisamm@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210310134858.8104-1-wisamm@nvidia.com> References: <20210307091202.586-2-wisamm@nvidia.com> <20210310134858.8104-1-wisamm@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7e2e7128-48b9-47fb-5857-08d8e3cb5215 X-MS-TrafficTypeDiagnostic: DM6PR12MB3643: 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: uwAigMd344ityiZPlOCRxrgcWW089zo7lYEQiS8Lok5ALqHkagWzm3d425+dO7oO3trdZmo6oBPEH/hgutmMX7Xftr40WdE+BAFsF6BQjaYtbOJlY9mpWhj912E1Yi5joBF5xXKdzitlN3Q/fOyw4Z0gNJ8IGKmp7kDM2r0v1uH87WV/qWtd25Lfut9rnrLx85OuCnleVINh+DxxEEq0LKYufGk8QGbtbWVcDv+pTRZZ3JRWdY9VNHSdpYXP5VRtr298P4LkUtrN3BakEL83jy3CmfV8l6FgcwUbvBW44oCbiZYFQ2B63CIGcX1hGKIeTRpqATmEYmhzdAKeXenXDerUSb5x3KklzqP3sSWICLqnapA8bA9V7ZURAygVyg2JWuRLwhU2NJheVfendnUMOStKXM0tklMxneD1lNARmC1vR+maXUHTgj4WI+96DXGLWHlh4HERvmDVWSHrhenyBGfVBS12sUTheOOxv3t7Uf0zXmP3Hc57fnVkMNU3K+zdbdIyIWnxWvJmCMGkGnBKU+Fe2nvhYJu/t86XTz6t8/8dQg9AXJ87Ibr30gnYJcpvbGJ6pRaMj18dw81Yjw9O40JpFD+AT4vffJzoUban8cnHP260cuzTOD+RPjDLdaWiPCI/Fu9wUBKMJAT+ePlvUDfpCztDp+5DErpKHJl1xcd8q1XDmkyFTc6oNpcMkZBf 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)(39860400002)(396003)(346002)(376002)(136003)(36840700001)(46966006)(336012)(1076003)(70586007)(356005)(5660300002)(26005)(82310400003)(83380400001)(478600001)(36860700001)(186003)(8936002)(4326008)(426003)(8676002)(7696005)(16526019)(7636003)(70206006)(34020700004)(6666004)(55016002)(316002)(2906002)(2616005)(54906003)(110136005)(82740400003)(47076005)(6286002)(36756003)(86362001)(36906005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2021 13:49:26.6902 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e2e7128-48b9-47fb-5857-08d8e3cb5215 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: CO1NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3643 Subject: [dpdk-dev] [PATCH v2 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]; -- 2.17.1