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 E8DEDA0C5C; Fri, 26 Nov 2021 12:51:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7015940C35; Fri, 26 Nov 2021 12:51:37 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2087.outbound.protection.outlook.com [40.107.220.87]) by mails.dpdk.org (Postfix) with ESMTP id 234F1406FF for ; Fri, 26 Nov 2021 12:51:36 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dTNIf/jr4ATxZ99fqkd1isWY8LEB9+QMLN/AUjxOqNW4s3UuSXaEJFEIfyQ9dTPN8SlC129XOPFGbl8C0FbhK16F0cOqW7RsYqi/oahEaocGMYDpITbC/bBRfQVI9rVR06Er5JvksSPUfKcnyNgLxeu26iqU3zQARqVdWpOmxBs+t/j7sghJspz8KECCTK7INuQPFUmOsOiFXekW3meSMGGMS82j+3xowd9TkxNjDOa9YTSFk9DLm3Gcy3BzVqG0Wp1r6SN0Hz2sfVNSFfTkEvAPuO8mVVEgtd8zn3V9G0KMylpKOc+bnC5g2m/pYzDVbncmbTjU6d+ihRPzXVDkXA== 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=f1bNkATRfSl2N9C6FDNLGQJeRXcPVuaDPQQYWKW1cig=; b=K0CPBc8nJdd5PoSFdKBCnYUzeSrxCaooUyW81wHmnEbD6vOIBNTFyHwjDZD09opIiDGt4MZIJhT71N4ezCJNHlbNl8F618paWovqQr55wq2LBymOQd7VoOdlgvelya21Uv3tI9xx6k9IUP1aCsipxXEBSaXjatLUCKcntEGAw00zV518Ffu+iQzewNxi5ROyMeaYj523R8avVZPJUBfu3H/0/m5T3b4SO1cd9UQVN+IxSonz1q6ZKcpWiy7aLYY6h4YiQkZqetTjq2Q1F8D+QtFfcVKeTt/lH9HZ997GzsWeGaCrO2+yadpEzDzA2iFEhvs2h61yhM2OwFjK6YFyZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=monjalon.net smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=f1bNkATRfSl2N9C6FDNLGQJeRXcPVuaDPQQYWKW1cig=; b=rFGb9L4kS5oxZyQjaXv6Dlpeibwjz8ZT6nTJbJefXlKc2wbYzaLhTZN4eiu/CrxP6XttCoJlJ02Q/CiX5atBlqN6mltrTyPHc1n2arUhrLPlQkUG7ATH7e6LAKEj2yfAts5qgODIGC44li4/cZLZPnjjDaBkVplfmDcVajGuKRyOvUdKqJTvNDHcusJOZsOKHgoJ7Cgf+of4B/ytg8d7Vf96J+l+8iut+ymuE9mVMeMtjc+Ycxoy8KvXQwUbmUDqo3OWDKJvo1/gVIcNWg0R+KmbLzWRF1+aqRwGUPt0UMkAwS7La///7Ie/7FbLJR0IUS22vDgTd6qUvp8teE97Iw== Received: from CO1PR15CA0045.namprd15.prod.outlook.com (2603:10b6:101:1f::13) by MN2PR12MB3072.namprd12.prod.outlook.com (2603:10b6:208:c5::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.22; Fri, 26 Nov 2021 11:51:30 +0000 Received: from CO1NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:101:1f:cafe::ae) by CO1PR15CA0045.outlook.office365.com (2603:10b6:101:1f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.22 via Frontend Transport; Fri, 26 Nov 2021 11:51:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;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 CO1NAM11FT014.mail.protection.outlook.com (10.13.175.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4734.22 via Frontend Transport; Fri, 26 Nov 2021 11:51:29 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 26 Nov 2021 11:51:27 +0000 From: Viacheslav Ovsiienko To: CC: , , , Subject: [PATCH] net/mlx5: fix modify field MAC address offset Date: Fri, 26 Nov 2021 13:51:13 +0200 Message-ID: <20211126115113.11684-1-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.187.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: 18dc72bc-a1c5-4037-fb5e-08d9b0d3159f X-MS-TrafficTypeDiagnostic: MN2PR12MB3072: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FUsUhhReo+qbN4TR/8OOYla1Gop6Pmh5uF9J7NiMw7gaXZ+cuEyjeLXaRlWM1D2Sn8L7P5gq0CxMRFSx2N0DsrQAffNb2sTmn4B8riuirQwKUDC7TPcT5BinguWVQ742sxWyRsPAkxG42uG+3vIRgCS11toIJlYpddkF5H+pk13KaCICFnBbf+vdWYMa9mVSTIcpL98IJ/+Z7DvMsD3Qshs1HmsyK9enfpE2TJuf/qvamYBzsLP0Xd6OF2Lz2cZSuxTwKG04Dz9ERyVbfGPC4ytHp0ga3sJ9csBBVWOjR9iDAPTRuS/dONG+Wd3nCMwJLJ1sTiK4o975zvUnjXDVenJaOPosdZfMsG9RudBmXmCNkaByv3CvUeHgqHvn3zLxpl0KYlqCWjpwdSvqALvFn+X36YRJK0onlCfCKStntd/fWijwMnGwH7R5pOQ4TX6Mzh1dw+6N32+GJyOofkDLyaXo+bqMBnZGPUFb+M8Zpjn7jOPCvzdKNUXDwRT+P6W9kGKYkHOZsVecIPBGonaRZofRSEgs23K0ft+37KGLcxxX6eAcvBystsRUkqGL71TBlo994lyDi3vLxMCdVWJAhi/Acu5bH/U2EwCDX2GfxvnPodkQkBlPvyNPbKCuQLNDA0QRFTo7D09YFoZf6OSLjsFcaugkiubKOMzROprEp25SMn58PIAmLjKM60rXlLQ3q9mRQhthmnGdayYfc33YHA== 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)(36840700001)(46966006)(86362001)(7636003)(82310400004)(6286002)(55016003)(5660300002)(8936002)(2616005)(426003)(356005)(36756003)(47076005)(83380400001)(16526019)(186003)(2906002)(316002)(8676002)(70586007)(54906003)(4326008)(26005)(1076003)(36860700001)(508600001)(70206006)(7696005)(107886003)(6666004)(6916009)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2021 11:51:29.5950 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 18dc72bc-a1c5-4037-fb5e-08d9b0d3159f 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: CO1NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3072 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 The MAC addresses fields are 48 bit wide and are processed by mlx5 PMD as two words. There the bug was introduced for the offset, causing wrong action translation if action field offset was not zero. Fixes: 40c8fb1fd3b3 ("net/mlx5: update modify field action") Signed-off-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_dv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 3da122cbb9..4834c752d9 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -1503,7 +1503,7 @@ mlx5_flow_field_id_to_modify_info if (data->offset < 16) info[idx++] = (struct field_modify_info){2, 0, MLX5_MODI_OUT_DMAC_15_0}; - info[idx] = (struct field_modify_info){4, 0, + info[idx] = (struct field_modify_info){4, off, MLX5_MODI_OUT_DMAC_47_16}; } break; @@ -1533,7 +1533,7 @@ mlx5_flow_field_id_to_modify_info if (data->offset < 16) info[idx++] = (struct field_modify_info){2, 0, MLX5_MODI_OUT_SMAC_15_0}; - info[idx] = (struct field_modify_info){4, 0, + info[idx] = (struct field_modify_info){4, off, MLX5_MODI_OUT_SMAC_47_16}; } break; -- 2.18.1