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 A6CF943A53; Fri, 2 Feb 2024 20:34:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CFDC42EA0; Fri, 2 Feb 2024 20:33:27 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2085.outbound.protection.outlook.com [40.107.243.85]) by mails.dpdk.org (Postfix) with ESMTP id D21E442E90; Fri, 2 Feb 2024 20:33:24 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fF5m1F+VAeC9dakdf3jt7Ioz31bt8VgHOLk9EwVeufw5DDSsYmYZURmmqZ60wIGMsX2UrUl8PbOeNYv5nVptm92r+Sig0JmecKVnvjS6KJCdAMvoL5deUEiq5FdOlUb8qWOvINHSSNjoaMEkpU8voZh8o2cIzyuo5y0saAkjCYAAgVMIJR/hJUNUGiB/Jy8S9P0Ir1mCw//8RzSMrGcTknZsfptd8GbX1S0CQLYqpxA4exl9K/ugv4j44VIKB3A7G/ZJpTiKEGKhdOETkqUEKbarHvlYvwLbHNYIE4dNOiXwKiK+JU/++if6bHFdNOCgWcwcKI/0j1c5IizdriGrYQ== 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=t3QTwfu8q8DL9MTAxqoYJSmiMIxX6+5NKuzhjf4i3as=; b=eIkavk5bDONW9EhMVVJJGKMaDf8QeTZfsMfOa+jHHn5TT5w+9ucuCUU0KYRLlbnUyWNkPgQ9101DljWQHWqm83hIDTO/m5Ez5zEBrhNSSpqX15eF67dbEArtnwwtfYzrNF7BQb3JiZsOrxxcsT94SQxIDhNtSQemQN/30vRTvty29Xqkn7QHVh7gYAEjUT8Ni5y5Pd54NmqObp7haPBuDoqr8NZYfkFG2L4jn3NKeZ5czgYgangkwO50Xvu8+6/BhnjBVdhIB1yZgLexi3tveH4QVPFE3u1A4D959NLxHQJrOx4g6+t9SAlQDnx8CoOv0eYBtqo8RpnPZyHo+Uk/Qg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t3QTwfu8q8DL9MTAxqoYJSmiMIxX6+5NKuzhjf4i3as=; b=49MzBGMMKgpe+rSYDh0t3oOu3NrDLCiPALJ74DOgTnPSoZhL6wrDjNVm4nn5DhTUTECQRKHhaqQqvFwo8H+VZH5WrfQ8Bcs/d2FxLYQCfsyr13sZJ+HxCviCy6PR9Qoth/WgUPaB3ftHXeHI+KJb+ILfT1F47t3BsaT8LgJ5LSE= Received: from DM6PR10CA0032.namprd10.prod.outlook.com (2603:10b6:5:60::45) by PH7PR12MB8828.namprd12.prod.outlook.com (2603:10b6:510:26b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.12; Fri, 2 Feb 2024 19:33:20 +0000 Received: from DS1PEPF0001708F.namprd03.prod.outlook.com (2603:10b6:5:60:cafe::70) by DM6PR10CA0032.outlook.office365.com (2603:10b6:5:60::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.24 via Frontend Transport; Fri, 2 Feb 2024 19:33:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF0001708F.mail.protection.outlook.com (10.167.17.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Fri, 2 Feb 2024 19:33:20 +0000 Received: from driver-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Fri, 2 Feb 2024 13:33:18 -0600 From: Andrew Boyer To: CC: Akshay Dorwat , , , Andrew Boyer Subject: [PATCH 07/13] net/ionic: fix RSS query routine Date: Fri, 2 Feb 2024 11:32:32 -0800 Message-ID: <20240202193238.62669-8-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240202193238.62669-1-andrew.boyer@amd.com> References: <20240202193238.62669-1-andrew.boyer@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001708F:EE_|PH7PR12MB8828:EE_ X-MS-Office365-Filtering-Correlation-Id: 49a83a3b-f540-4ab6-982e-08dc2425d01a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cdAevZxtszCcLvH2GQxdYpzNIVMMAdU8P5BMOezfKSW1MhLhTytRUTwfNm/bIkBh80Ok+wIuovIEVSbHdbbyX0Tn2mrgR+fANPw5somHOM5JgJajvCiDtAL5GwzYmdckoJPjfRIIDl6BQurIrQrmZ9qN0mK6FInjAEpVVgxfo6DXQ2/wc+dkfDgimGaOS1Z1QMFFnWv+FMg6TwBNhk3IgHt7czq2hlj0EKynFlzY3EI/nMajSF31YlLZhhyVjG37O2rC0kih1zAGvWOC2TKJn0W7lLggvs+S2HuPd7PHEITeVL5PxViH6H7XtQZHgSny8c0eaQXne9uuD6uTiqorrTuKdDxVrorO5Jq9IlD15ydAbW4vjpzE6F4pJXvXXOexXRnKKP9nIL5Zqr+5HDTqKZVWfeCQFFS9NxLy6mF1ydj5Za98JfYuzK5GDCitqlPe4BVD5pYdFLoVVGvupyJza7aHHFkqRHpgIXw9RqN0uV+tN5nKPT1dXv0K/tnmN+47gmfMLUZHytTFC+ucppx4gePSS6mhjnua0KnXU6NHaI+Rj6HmPeNb/u4UTNDMdr0Sg375tqeRW7p6+3+0Gux8mB0FYgqae8XAp0i18uzqzPH96Gg3jtoeQ3jgAvZldEgbOkC4AdNUvCYIgcA7+ybcfv8vxZpiROGkDfOkab8NXFbdFIloRfQwxQP4YDxqHN+wY38uQxXUpK+CmyoI/tZf3hrbiqlVKkGKWQctiuKFMBxlMDUh+PEBNl2GbqagzbfPz+f821gAPT9fCfmtreNSqg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(136003)(39860400002)(396003)(346002)(230922051799003)(64100799003)(186009)(82310400011)(1800799012)(451199024)(36840700001)(46966006)(40470700004)(478600001)(41300700001)(83380400001)(82740400003)(36860700001)(40480700001)(40460700003)(81166007)(47076005)(356005)(26005)(16526019)(426003)(336012)(36756003)(6666004)(316002)(6916009)(70586007)(5660300002)(54906003)(2906002)(8936002)(4326008)(70206006)(44832011)(86362001)(2616005)(1076003)(8676002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2024 19:33:20.2623 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 49a83a3b-f540-4ab6-982e-08dc2425d01a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001708F.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8828 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 From: Akshay Dorwat The routine that copies out the RSS config can't use memcpy() because 'reta_conf->reta' is an array of uint16_t while 'lif->rss_ind_tbl' is an array of uint8_t. Instead, copy the values individually. Fixes: 22e7171bc63b ("net/ionic: support RSS") Cc: cardigliano@ntop.org Cc: stable@dpdk.org Signed-off-by: Akshay Dorwat Signed-off-by: Andrew Boyer --- drivers/net/ionic/ionic_ethdev.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c index 340fd0cd59..008e50e0b9 100644 --- a/drivers/net/ionic/ionic_ethdev.c +++ b/drivers/net/ionic/ionic_ethdev.c @@ -561,7 +561,7 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev, struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev); struct ionic_adapter *adapter = lif->adapter; struct ionic_identity *ident = &adapter->ident; - int i, num; + int i, j, num; uint16_t tbl_sz = rte_le_to_cpu_16(ident->lif.eth.rss_ind_tbl_sz); IONIC_PRINT_CALL(); @@ -582,9 +582,10 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev, num = reta_size / RTE_ETH_RETA_GROUP_SIZE; for (i = 0; i < num; i++) { - memcpy(reta_conf->reta, - &lif->rss_ind_tbl[i * RTE_ETH_RETA_GROUP_SIZE], - RTE_ETH_RETA_GROUP_SIZE); + for (j = 0; j < RTE_ETH_RETA_GROUP_SIZE; j++) { + reta_conf->reta[j] = + lif->rss_ind_tbl[(i * RTE_ETH_RETA_GROUP_SIZE) + j]; + } reta_conf++; } -- 2.17.1