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 A1F8243A2A for ; Wed, 7 Feb 2024 03:19:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8506542DD2; Wed, 7 Feb 2024 03:19:55 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2085.outbound.protection.outlook.com [40.107.220.85]) by mails.dpdk.org (Postfix) with ESMTP id 0A7DA42DBB; Wed, 7 Feb 2024 03:19:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X0cide68K3IT0y7H2wJikemUEyB+xw0/XY8kPxRRtq0Fox2ABPLMJ5+fL59U8Y3WRDi0K0+uFyVpMk9X5kuNHts03DneimevAWwr1TRPhgEKfTcEIvU9xFxmmBs30TfwE2lwGbQj4yMGAJ2y/OqKCD5EfEBa33++SSDO66rV+Uq2WFkbk6nUdXaiw063zhADMpgKcu+6D6hFmcJVZ6u94F3RTPt0TzQedCIa60W1VuPGagUok4ZYBB90I0s1+2BKubxEzKulUqD3Clvm8+9XjJ0ng7rqT0NQI1xGHkvEHSZtjlj7E06ybUCHpLSKFz3UBpy6DSYK7Y7CsuVKxIHKzQ== 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=bwANvq28skBh6jyweeNHYgK714aHX8VSyn/x+jipmxyWM9v6a08TN2LAY8e9COBScFE92CITYoMtHEeOSMqZEAcFruekFV/qm315LsXzaL1z3iQXJ/q4m46OKRXw8cLiWe2ZhVz2gcQ8i8ateOcl07fcRAJPHNIdNdLPTN+Qd/hfxyvuxRTFAAHXYM5+nJNzz8VYUTw5zzMtsa6QxundeO0NBbkrcxfh6oSnu5WtW8/OkvK7Xq6Oa64uEu+FgDo+7U7jmL8NIyWvwMYHo55SHf/JIX0clf2AUbw4tEXCMz7XZsroo1xOlyA6Krzedg0HEZlIEOPQJaYb6r/vQ9ED7w== 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=1pGwwmt+JhsJMIjiwzc94zKVE8Di6R7uFOGTmyo3vMUa48lu2Z7QTUgg5qD2w6maxH7/f5Kg+7HPE/uuWRBYB+o9E+/oGzY1wIhvuGXmfNkvWLx8Epr57V2/EYCrAtEfxrAp4DTLx0t5+mRXfkXbEWJk+mWaX20hq7q3PjuxSs0= Received: from PR3PR09CA0002.eurprd09.prod.outlook.com (2603:10a6:102:b7::7) by DM6PR12MB4484.namprd12.prod.outlook.com (2603:10b6:5:28f::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.17; Wed, 7 Feb 2024 02:19:49 +0000 Received: from SA2PEPF000015CC.namprd03.prod.outlook.com (2603:10a6:102:b7:cafe::62) by PR3PR09CA0002.outlook.office365.com (2603:10a6:102:b7::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36 via Frontend Transport; Wed, 7 Feb 2024 02:19:48 +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 SA2PEPF000015CC.mail.protection.outlook.com (10.167.241.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Wed, 7 Feb 2024 02:19:48 +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; Tue, 6 Feb 2024 20:19:44 -0600 From: Andrew Boyer To: CC: Akshay Dorwat , , , Andrew Boyer Subject: [PATCH v2 07/13] net/ionic: fix RSS query routine Date: Tue, 6 Feb 2024 18:18:43 -0800 Message-ID: <20240207021849.52988-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015CC:EE_|DM6PR12MB4484:EE_ X-MS-Office365-Filtering-Correlation-Id: 5dc9b7c4-11c5-4544-8b6a-08dc2783421b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yuCnSOJZBmx0OCO/SY4xyYr26nkT48HnGYN1AIvseOzndSSiWfKqHMeOSp/iF1g09DIKkFc5xyUFYLP3NGtY97N9vdEbU/0yQvuwZyYJxSeU23Fgu8Fturz6OgWQ98sQK2PIwH35dG+HfvbtZDKiiQZPuM8xTZ9XFk22d0g8ZASFV1goQa6AwSfWwIDi1dWUtxphXSuMKd3nsJFTz8GFRY3HI40swYwaWL4+i1szV7adeem/gmiqwqWXzOHAMcUOTnsICbWT7mLSjJ2zwo8gsVPdrGVbQ1M/MeocBukA6D0jYE63FlaxRtqvIVrLqdDh45kSfNmeCxhjxzndrXq3ybRdbCIjIdhyc32u7lXN8quQ//5e7wpTzkFA/VdbcY2NN/oGnBC9UDGuhzGp112bxA0MwGg0D8vbcec+IWKMif+wjbG6Bt+LqHRWgBODWsZpj/Fk9t+VGpQHJIGFW+WcWmXo3DwZKwrFp2ZcXP+ZkCDvadXtsEXn22Pa9P5mqYzOvwPbJ/Ug7hxs0EAFgpWgm162w/FvOlUPkzV/y8DXnNGC9HqAHluiq9X9fe0iThV2T55Bhu3OB2PBlIUTj2+HTp9B8WL4XPNi72ZSPTYb0jLDSkWg+LDcmwmi4YHf6ZmhTA5FlrUxU9f04vBvNMXon8PPToJXQmcBeKtJcPQwmiZ0/DO1kdYjKVyO3qGMdeB4R8+SMZUbBtorux58+XCi5rplvtKWTs/kwa1AKrfbdOcNCpdk/TXncqiNNT9nGhbyq/6nXAd/oydtDpkfFpMPMQ== 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)(39860400002)(136003)(396003)(346002)(230922051799003)(82310400011)(64100799003)(186009)(1800799012)(451199024)(36840700001)(40470700004)(46966006)(40480700001)(41300700001)(40460700003)(426003)(54906003)(86362001)(36756003)(1076003)(336012)(47076005)(81166007)(2616005)(356005)(83380400001)(82740400003)(26005)(478600001)(16526019)(8676002)(316002)(2906002)(6916009)(8936002)(70206006)(44832011)(70586007)(5660300002)(36860700001)(4326008)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 02:19:48.1349 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5dc9b7c4-11c5-4544-8b6a-08dc2783421b 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: SA2PEPF000015CC.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4484 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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