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 13C8EA0C56; Fri, 26 Nov 2021 14:10:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EA29642748; Fri, 26 Nov 2021 14:10:03 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2080.outbound.protection.outlook.com [40.107.94.80]) by mails.dpdk.org (Postfix) with ESMTP id 07E1942746 for ; Fri, 26 Nov 2021 14:10:03 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SS8zcEFximqTWqsh3MTApkRkHLUlCzaWDB+jntpfI9q3k5cvCu0pbJgDzw0I2bc3N4fKrhTChJv86oRAz9PtP5uPJflk8V0GxkI7dPlS7AK7XcmrrxUQWsDMkRZetNQc9T/7/BsEPwiFWNTTusJk4JarJQlRwd8SHWY8AjqatzM8ea94PqJr2/CQweMDMynMsTU25b1BaFcethm5/HY+KQhgSVfIfB+hXyaVzOZCyCPWwCvilfQrX5fdnykDWzwoQl+vBAweBgT3SE/RBFv3CdR1v8ddQQPef3p5UTJTyV32dh7JmPDzDgc/TSrLilbrpXC8fv8trcNkq7jWywGENQ== 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=bePVNFMolkNJqAmn6iMFax2DghMdZ7a0FNe/Xlk9rXI=; b=S3Px7V3eKwpoM7CiXIFROHGXs8B5ALznjsIfUl12UUvt5nVVrta8D/K/QPD3ZS60urDtmLKxGA0VMQs1p1gYekoijcvl4s4OhRb+pOQZJ0/gHLo5bsgqwAhNN2eylmx6pe5NvZ4JgiZbQacLsqSGqiTQWjYcVTdx8wUu4qwoCowCvDlXgoL9gKEksuA6So4RbEBqs8oApBs9B2j+N5PAKPgK1EAU7np8/Zzl6Q53Zz8c9sxpBBHmV8aOo7FWNZgEdbm5mJ7MH+J8bpQz3kWfjPVBs4QyCkVaH6X11AYBqseYGOaBbTAUT2CCLq/QxQUlfDfS5xClzXgWBtsw7kk7HA== 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=bePVNFMolkNJqAmn6iMFax2DghMdZ7a0FNe/Xlk9rXI=; b=ZIsh9d2Flv4pd6HFr3hEsf/T9247kMPWLqZJF83QxwKE/7DGSQ7yLdnQ1nVZVBBBBQGy3Lf0t/1hh35nbgOZCjc1xf4OKmY7ykMckDMrVo5KnZql1zWCSIH6sGdWqXr2RuD0LEIDE2nkn/usaMvvlm6OyQDDWYjgYisf/dQKJ+fPROaaedtHGHETsJE+cEhrE8nSucKZddjHfgCH2P4YP88kSob2Yoq8ynTqnI94OOvNVZKSfrwTO3ckry/aIuvbZEeN+9xSW+sNufFbdqFGVTcyaPzRjPJRMoNC5MJIgGXN+lsCpb8ORRJplnIa4gl5fRnOKoD6xVmg+Irccie2FQ== Received: from MW4PR03CA0022.namprd03.prod.outlook.com (2603:10b6:303:8f::27) by DM6PR12MB5008.namprd12.prod.outlook.com (2603:10b6:5:1b7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.21; Fri, 26 Nov 2021 13:10:01 +0000 Received: from CO1NAM11FT042.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8f:cafe::8c) by MW4PR03CA0022.outlook.office365.com (2603:10b6:303:8f::27) 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 13:10:01 +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 CO1NAM11FT042.mail.protection.outlook.com (10.13.174.250) 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 13:10:00 +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 13:09:58 +0000 From: Viacheslav Ovsiienko To: CC: , , , Subject: [PATCH v2] net/mlx5: fix modify field MAC address offset Date: Fri, 26 Nov 2021 15:09:45 +0200 Message-ID: <20211126130945.14467-1-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20211126115113.11684-1-viacheslavo@nvidia.com> References: <20211126115113.11684-1-viacheslavo@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 45b502d1-bf35-4207-f82b-08d9b0de0dad X-MS-TrafficTypeDiagnostic: DM6PR12MB5008: 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: oLBp+0cw0TfrdURWYOEMIBHoOpMPZA+baxUcK1Qd4tftgQJdqXSyq3CKzBmYGOHoj3cVw7i/shwmeTOXswy/puOC/+yPjWa6Rw0DUELq2fLV/3xrZV8N3mHKiB8F8x0LpcQ6EuWr6d/NJOhTL7+OLbs5IQzBHt3+NgJ9hBAxa9/RW7zzcZKFvWaHSvY0OkF/AgtnCZ9dEgq/s+A7Kue7vIpp4JkFNY7umAjVZYXoBRsVLRF6onJLNCKUgynaBAK9LxZbSynwZTnZ3PzLLppYWxbB0wrKETcpojQM7MqxDLhi47ASDQDyFELez1y5fPlDxfR0JbXW6wqinuragBlVLMyU0R2cnl+VadPojA2lt44/Rasrqky+ccC7lPJglh0Dd+PyCdTXvGMbhR0eHRYCaLueRSY0jF1FYj95rJpiA7/DnO2469iNfGT23H3wKIUDYhbZ3NBTACVLGce1gYyksppMRJwENk/URMWwTzkzSLrEKVse3q72LB32E8fr1JlS/qzKAE0KPzaHiBAIya4DwKPwGINgHEYwrIpGGiQSX4tbgzeRhS/n3OGbw9bBfSZxUkYtExwf48bsKldQM/N1o3g3WJdTke7h2Stxha/MT9O6jnbqJqNfglqP5wMHSRoM8CvhXemeRbp4bn7QxTy5rwwIBZjNqW6kEqISbwzI5h29QYvYex+jvuAXb8/F+DGAkF5AVJ+fiZZFfmujDoogVw== 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)(46966006)(36840700001)(356005)(7636003)(316002)(36756003)(6286002)(508600001)(36860700001)(107886003)(54906003)(4326008)(7696005)(5660300002)(70586007)(336012)(16526019)(2906002)(426003)(8936002)(186003)(2616005)(86362001)(26005)(70206006)(8676002)(55016003)(82310400004)(1076003)(83380400001)(6916009)(6666004)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2021 13:10:00.7299 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 45b502d1-bf35-4207-f82b-08d9b0de0dad 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: CO1NAM11FT042.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB5008 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 malfunction of MODIFY_FIELD action with MAC address fields as source or destination and with non zero field offset. 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