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 2121EA0567; Wed, 10 Mar 2021 14:46:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B540022A668; Wed, 10 Mar 2021 14:46:24 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2068.outbound.protection.outlook.com [40.107.94.68]) by mails.dpdk.org (Postfix) with ESMTP id DF6F622A660; Wed, 10 Mar 2021 14:46:22 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QX1J9XPSzL7rLel4JLiWb8N6RKn2anc1aVrF60Q6qp8Mu2K7/a9o5XGNQYQROlqGxv2x0ET+1F8pDOuc67Cxu8vrWbZ+YMqRSCOOXStxXOZD3RjO5LMzLqSDAzxTiH5nJbd+bUL0cSIqBbQ+giTPaLMb0c84XKr0lY/3So27uh3GXpudUerQRMlO9UnFc4aXiPs5N0XbmYRv76dalI/+2WOUOpmnJnpIY25ZIL4ThqiTI79VV1249bErCOa5Ezh3x90SxWzb8Zw274V6quT7hQGXS7g5BfxMxcp3txGbOxk2jHVNBP0h4PVe50gJp9xkXpAitmneGWtHdRk57xvesw== 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=mT5QVaDMQJcMLOEZBaoEmvgBBW9fUBMUg+WFWoWA5XgoUVVivDfvazp3sPr9ZMCmoMwfgRcmJv86Bd1KqMC/UDzWQmjWMyU7f96cWq3/PbhY3pp9XJIVfIocVKe9i00hGikww1XvbHAt0RHJBr12BQvx6Q6s+gvxUjWRkeCk4SKgyv1HNJ7hNgOgpDj5vnf6sK+D1h4myoSKjbEsQk0T4GYy8Uwm6CbIV0pwnXVBX0KIXuGCohLWedLb9npZBbTvG3nsOlUbl/dNf4WhQ14WXNfyhz2mY719Gl87SA+lx5cxjk09KSXeeIXkHlQElxMr0+d0cijdn5tTkLcbC+Q4mw== 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=azC64521DT4/C+td1WZvsLl3dorlQg6Q/zn9Jxy9RKxtPvDgstPZAG/pKXfVgiq/hRHpNvZsGWoZgyDUB5TvASZKrubTMC7K0ClnLAdS7CfjSC+D68shEprTN+y2kMya/AT8B/nk6Fa/aAiBXUbCAa+OrmggadZaUwSlZW28MEkoj9tVdVmhQDgfQjnfIoRmm88CQf2YkeLSQ40L1CRvUyyZGa2f0pud/9XgDidLK8ULqqKAihA7ERGK7tiLc3FhYeO/KgQhVHx+Nbe57bQ3/89Xt05OQ9gJyduJv4tA11GPvS+Q++1Yvmu1Z7fR1VqWzmSDw0leBf4cQN/yi+Obiw== Received: from DM5PR20CA0004.namprd20.prod.outlook.com (2603:10b6:3:93::14) by DM6PR12MB5024.namprd12.prod.outlook.com (2603:10b6:5:20a::12) 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:46:21 +0000 Received: from DM6NAM11FT009.eop-nam11.prod.protection.outlook.com (2603:10b6:3:93:cafe::12) by DM5PR20CA0004.outlook.office365.com (2603:10b6:3:93::14) 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:46:21 +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 DM6NAM11FT009.mail.protection.outlook.com (10.13.173.20) 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:46:21 +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:46:18 +0000 From: Wisam Jaddo To: , , , , CC: , Date: Wed, 10 Mar 2021 15:45:52 +0200 Message-ID: <20210310134554.7948-6-wisamm@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210310134554.7948-1-wisamm@nvidia.com> References: <20210307091202.586-2-wisamm@nvidia.com> <20210310134554.7948-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: bc3dd2e8-5409-4fe4-b1c5-08d8e3cae395 X-MS-TrafficTypeDiagnostic: DM6PR12MB5024: 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: iMohg4SjbWykyVVCQuuNXPIqTl8ETHuDa58ep/2SaPK/fqkin4wdUCTSQvIYl+DS9jp7JanhSmkAsLvBrN/UPv719SKuFglt+DQau/WcBIOhnF5TXp29FHZoioiHtYtwQVMlfSuJrH0FRhPa2rNgyZtyXzQ5ZpOSFn0aZnsei046zSjQzfRKmOGRX8b4mMgIyW8QbOz6k4ftNKXcbfLiBLOyO2CTNZX4VH4m5WYhIDaqKuRCJX98TZWHvtAuWc01t1LvFRWNj48VRelbvTEi1EwYFXmFCIGci589xmoUWtr1Q2Zq0Mcxef/bixXMMx9dDwxPR19pBPm+qKwuVaTsdXCQ/CbHVGjjIvWrgoms6EEPqdNFplILzlHB4CQ5qthhdWFYdYIjn2N8W9U+Xh7PD1B5RYPhnaCb4iu6gx+yk0EkYU0QZ5K8IPQggoa7oaRKB/5qaa/DfYe09nx59p6Q4iVPlN9n3Q1/7DN8kCcq/N6q13eRqUe+kVSfXjy+PUi8zslz4FhEPfGd1P6Lr2BLYTn71FIxYq7Rtr8xmJI0mg3/POeE+OSN+ZpXciEahoaRdDNhM1NIzwR39C0+2kvti97w1r23CXj5g51bbqkdwTvkhkVLci8s+elr4rnbOad10BHX8/W3HY2Fvge522FuBYeNZEVj1U+rrtBqkIet5xGdo8vN3CxWA+Q71VWi/Hp8 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)(136003)(39860400002)(396003)(346002)(46966006)(36840700001)(8676002)(16526019)(186003)(47076005)(478600001)(6666004)(316002)(70586007)(5660300002)(83380400001)(26005)(4326008)(7636003)(36756003)(1076003)(7696005)(82740400003)(82310400003)(34020700004)(426003)(2616005)(356005)(110136005)(55016002)(36860700001)(2906002)(54906003)(36906005)(70206006)(8936002)(336012)(6286002)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2021 13:46:21.2993 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc3dd2e8-5409-4fe4-b1c5-08d8e3cae395 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: DM6NAM11FT009.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB5024 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