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 31F6743902 for ; Fri, 19 Jan 2024 21:42:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A6F442B71; Fri, 19 Jan 2024 21:42:28 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2057.outbound.protection.outlook.com [40.107.93.57]) by mails.dpdk.org (Postfix) with ESMTP id 3F3CE4029F for ; Fri, 19 Jan 2024 21:42:27 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y0HEpCtwYf4/amUI6CGdNRz7pl2WBeh88cTiM74bmLHlhgty7F/c/779uyB5d4ytcHOy9WMZZIxLJEUGfFZ/7Iqjl/7Av/TVP15wN2vfzK8Cai43sV7IEP4FP0WQ3DGgXef3yFsFyY+NTyk9PxAmljRMO+FSuCFaR39LMR9MPn9LIpAVQ0Otbj9+zMhZ07VPlZQDlA2vPSycFXDAwpxh8By1FdGUTIICjTrY2NwzzV/B2tbTQGNZPmzl+EGF82OeH1Lej3mLItvw3gLQY/UGQgkRmYHPlPzxL9ZPQwtnkYQD9HMR0g3IUiykPmNplOlAhJb39M3DWQToG4eLWFub3Q== 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=LtDt44Xxr4jmisxRujsqkrrDrg1MZuEfKFr90ZuCVqQ=; b=WRLfUGhilhn9+wep2raReTwA0e/1Q6iyOplDOdECRJwtpCCdwHJTI7GGNB6mbQf08ifu7ZDuh4SUznZsHzVsERhIrJLdyRKBlOd74zvqrnjvjq40LqiBZBzogFDkV1pp/ekCt/NS9WD5m3CZUvFDE9AAnGLGKfsG8lVUwJnCYnqZXXfTw3P1q37s2G//lS9toNK8MUMkxFwroEulyeu+S7V/t8NUZPRSyxEsyY9DtJjy7h/uG4DMp7JtwdalFnsiSFifneqXIF8P9d2vgQesDLLYgD8mA1LS4lgHUxqhRl2x5GL7MZ/YFKek07R+wLLZUkue0LsTc+nUUf7X9lqRCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=ntop.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=LtDt44Xxr4jmisxRujsqkrrDrg1MZuEfKFr90ZuCVqQ=; b=DeqStoiJcV9F5jo1ZHgCisAMoh6AAG9mUb9RNqYHG/is8GOx5MtlYOWTl2W+fTgUlrXcY92w5Ickle5I+MSNzcgUKxsY1xLDttTv+kIS5n1HoW0xY2dUS5EN8vbE+QkrISXRNSkG6gQPIXr9DKVMLFngYINYtPGwLjv6nP+oTwU= Received: from MW4PR03CA0170.namprd03.prod.outlook.com (2603:10b6:303:8d::25) by MW4PR12MB7240.namprd12.prod.outlook.com (2603:10b6:303:226::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24; Fri, 19 Jan 2024 20:42:24 +0000 Received: from CO1PEPF000042AA.namprd03.prod.outlook.com (2603:10b6:303:8d:cafe::7e) by MW4PR03CA0170.outlook.office365.com (2603:10b6:303:8d::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24 via Frontend Transport; Fri, 19 Jan 2024 20:42:24 +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 CO1PEPF000042AA.mail.protection.outlook.com (10.167.243.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7202.16 via Frontend Transport; Fri, 19 Jan 2024 20:42:23 +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, 19 Jan 2024 14:42:22 -0600 From: Andrew Boyer To: CC: , Akshay Dorwat , , Subject: [PATCH 07/12] net/ionic: fix RSS query routine Date: Fri, 19 Jan 2024 12:41:45 -0800 Message-ID: <20240119204150.723-8-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240119204150.723-1-andrew.boyer@amd.com> References: <20240119204150.723-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: CO1PEPF000042AA:EE_|MW4PR12MB7240:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f36913e-ef73-47ce-fd3b-08dc192f2417 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i4+ElfkP/9BnEa5K848g+uNEr/XqwmMN6K7kx/SH8vEdCvgjkgTRWESRXyqZYyPLxuN/RYpooMiCq+dtSyYCdJF6Z3BJaPsKZggaxnUSpNGaokAk28YSfQ5Y+O8yfotqtnwXU1b6MndRF6TRCgG7nDDkSPC4+4DJ+dEcnhpz58+pdUUB0ArkImyHNBtgKzoWyIhy5AtThMh+Hkz0jWwItEdmblqHwUuLHamMysbW5KrD9pkcvh/4A7mId89rNjJ6prVjLWuveHLzOBQHSOFql0mbtXXJdnL7C0vdN/FcdyJNBgDvbLRPGY4KZsUhNMapOF22aXaTxsaNndYJpvICDnTUfJvPXqZzTlYVZpA6hPYQWS3GU/kxb0ub8mMQsthHfb+CdHH80Y4wh1HffdtSJ4gJZ+6lAXtqVGGbImKakMFtC8dCzE84Cd9qOlUD4Q0e1rGL6ym6MjlfV1Zr22KWD0s6mutkz1ktWsUSncgE/gLc1xmvOog5JUWLXjIOBQDpdzTCOocDEgl7gualP4VqESqrd878cyE6pFDamlQCDWoWy6yYLzSmJnDw6rOJ9JGXD/K1Cq3xUObY3r/WGEf9U6RKLWrfSC80Imf0IGcRyj5ivFSnj1o1abMpyWxFoMRVCszHpqvzHv8b3GZgWYyFo4y67bwIZM6hGP9eUMB9MwBkEgSBplJRI7+v2rA6j2AWVne3w8z6PKPEK2T9EnFekvf8IR2Xhp4Hudb+m2BEm3TxY02SgmvNX3NFuxHLBviDgM0wF1dzZUGDvJ3m0KpDnA== 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)(396003)(346002)(39860400002)(136003)(230922051799003)(186009)(82310400011)(1800799012)(451199024)(64100799003)(40470700004)(46966006)(36840700001)(336012)(1076003)(16526019)(26005)(2616005)(426003)(6666004)(36860700001)(83380400001)(5660300002)(47076005)(2906002)(44832011)(41300700001)(8936002)(4326008)(8676002)(6862004)(37006003)(478600001)(54906003)(316002)(6636002)(70206006)(70586007)(81166007)(86362001)(36756003)(82740400003)(356005)(40460700003)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 20:42:23.7914 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f36913e-ef73-47ce-fd3b-08dc192f2417 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: CO1PEPF000042AA.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7240 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 It can't use memcpy() because the LIF fields are only 8-bit values. 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