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 8C0DA43A2A for ; Wed, 7 Feb 2024 04:14:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 886D442E15; Wed, 7 Feb 2024 04:14:33 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2046.outbound.protection.outlook.com [40.107.94.46]) by mails.dpdk.org (Postfix) with ESMTP id 2CF5A42DD9; Wed, 7 Feb 2024 04:14:24 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ExdNgE8EB0769tZT7hjEvXjUFGXMinNkVpHyZEzojdO2TVDkT/NM0ef7E4FNCV0OF39Ac2e/L8dwWg2OprCmRH5foK2Psdp67GfvyGsbQVgNYwm+yG8ozGqTbM8dPPt44xvf8uV1jskqJtTTnVzlz3eLy//2wICprUblLQmQmKt23ZdBL8E4qM3bWURoeTqIgVJzKz5xY1ijWfhXNnM+06GC4CJ/WpPNqqeAxHmAlsG9YQ5qHjX+U6YLecB6Tzk/l5Pi6kcXiVIUWkQWPGCAIsfaftuj5NRB9Njqi/5tWZht0LgqKebhsvbC60sq+MVVPTpVF23t19js3ToJy/izxQ== 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=KyI0/J+yXH0Bbge7csA3yEg+AtxZdoL5g5J8mCYnwqTAGX9V7xQ8cFBuly0cqCxq5jy5WSxN0B+y9Jb1E/gOIJx6dr23ZqLKzJImGNFsFJKRZiqet09LgcheY3YLyPHXZAj6HqqpiBCBPvjYMqVc0GtAA0kdyWPps1ZMA1yhVRWOwdhNOeelwk4I4eCZl/0N+ggA1GRbw+Ki2IwUul2woJnf6cHbG9ZwtptOgLysT+PtuHJH/nv+NXX2R8uBDttu6UsFrxAxmdPZJlEPKnOE/4JS4xw4WDNKvvT3eh3tzb2oI3t63LyISAA6fVL9LC85roTS/l1WvA4XfYEAxqmA5w== 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=ciNkSw/frPUxLc0NEsNTxQdcxgyXoj+GMCohaZwV2ZjAoWJtiVWgUuLHqxNl0Iy2GRbFnwo9EMqn5N2yEdbTPbNVOXDDT0ZgRoqiQr8nLvS0IMo5LjnI4r/uupf2XBLKtUlGi108wucNxQ5EXaIXdoKgP2BitYPt+LgO0aXQcA4= Received: from DM6PR02CA0152.namprd02.prod.outlook.com (2603:10b6:5:332::19) by SA1PR12MB7247.namprd12.prod.outlook.com (2603:10b6:806:2bb::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.14; Wed, 7 Feb 2024 03:14:21 +0000 Received: from CO1PEPF000044F7.namprd21.prod.outlook.com (2603:10b6:5:332:cafe::a3) by DM6PR02CA0152.outlook.office365.com (2603:10b6:5:332::19) 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 03:14:21 +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 CO1PEPF000044F7.mail.protection.outlook.com (10.167.241.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.0 via Frontend Transport; Wed, 7 Feb 2024 03:14: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; Tue, 6 Feb 2024 21:14:16 -0600 From: Andrew Boyer To: CC: Akshay Dorwat , , , Andrew Boyer Subject: [PATCH v3 07/13] net/ionic: fix RSS query routine Date: Tue, 6 Feb 2024 19:13:11 -0800 Message-ID: <20240207031317.32293-8-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240207031317.32293-1-andrew.boyer@amd.com> References: <20240202193238.62669-1-andrew.boyer@amd.com> <20240207031317.32293-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: CO1PEPF000044F7:EE_|SA1PR12MB7247:EE_ X-MS-Office365-Filtering-Correlation-Id: 06d085ca-27df-4f3d-f7ab-08dc278ae0c3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b6Qbuu2nVPLq+/TggQhfTafU5+UvDDPf2ImQ7RA4E9m1G7QVO/kUInYJpBDr6pN1w7308UbUteO0WQ3Y9ywbqPpE+aWBU5HViJE8j7y5hoQ9zXxvxcOL0mhxPAwTeyu4W9+bPxWqlQ9aZKeOZHuFruK35NnTnGbc7EMBi5XxMqapYxuX46s+fFWe+2alKZtqRtN26+cP23ikZQzrCxPMdNfPzwqOAmvbqHQnnAi2VhDFvr/kQL1/7YdSXlvpHE0oQC9XHMV5gTbRIjh2k2aR/bX5cR28ue8innnp/byl9kHs70MxkoakIF6BBkSQkCJ4TIZOqPc1ot6NSbtxPWENOjRLS01SUpN8maobOfMFFY1XL/3Lwzq6Bl10ccluB2dVtu3FXb8FzNsqyjVAdRmE3wtlza1ZiEbYDew4hf1pWMzif4pYuLzszLjHBvoU6qDkJMG1RhUOpXwVfxThFHNAMMMYGPxCcSxjsLYWBCkt6fWXekHwDTzkQQkXSEqimALLVHfnjzYXgUg8DPA3d9BeBeKFS4NfwGKyJuhFksic4g1sjxqUeNTtUXVDQOfTsep/isggcvgOjSL+QcbDTp1+2Ak0V8y9HDjA4mwcvW7w/foW4j62mv+FZZB2oNbz0Pxlfh6QCLrDNUz/Y0ppEFoPlIAAuclgxc7ZRB//GDtgQoehevYDj2OLXm9LmPOqtLVApe/eqUpjxn/zpNBjU9k25eVs4hyL09VZu3UrxOhUuD7KvIJ9oBmFHPYjcYZbmuORyDFpP5gEhZPekmDewuHJGA== 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)(39860400002)(396003)(376002)(346002)(136003)(230922051799003)(451199024)(64100799003)(82310400011)(1800799012)(186009)(46966006)(36840700001)(40470700004)(40460700003)(478600001)(26005)(83380400001)(2616005)(81166007)(336012)(16526019)(82740400003)(41300700001)(54906003)(2906002)(36860700001)(8936002)(6916009)(70206006)(356005)(316002)(1076003)(44832011)(8676002)(5660300002)(47076005)(6666004)(426003)(70586007)(86362001)(4326008)(36756003)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 03:14:20.8114 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 06d085ca-27df-4f3d-f7ab-08dc278ae0c3 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: CO1PEPF000044F7.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7247 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