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 A373B41CF8 for ; Tue, 21 Feb 2023 07:50:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B5A74319F; Tue, 21 Feb 2023 07:50:02 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2121.outbound.protection.outlook.com [40.107.243.121]) by mails.dpdk.org (Postfix) with ESMTP id 52C1C43199; Tue, 21 Feb 2023 07:50:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YFIrZ1imFBeT31lCnE5awKXRogLhq6QaVqp9WLoqfEBPsEtd5zSIoNc9LkZbIHNrDz1EP9/Y93runqDTEmUVe27/BH/gwA9JABW2cyOMEqCRUkE4l+vOmTAkVq1K/Ihd9Rs7YFAonoClRlHmvX555HkjD+FXpLxSlk/mM1+BHpndpHETMmUJXCQtcD+7JbpCS4wmYd+aUXmbDk0YnU4Npi0H89OvrxjrOHvMn75IsJDliTHe1uQwsXXAgceg6mS016cRbma3eNnHUZRn+IzvOLRcB+jkSckYeskfS0KNRB7G+8yvou2HxrIIs+R2AG+FzFkxhve655usfIkxtyvEog== 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=5HieQ6nfU2Tvkxud5wZBQTEYAIYTvV0lmww4866JC/c=; b=DbBH+srrkyIEhhTJNFvCrQ4X7QaIeULysMIEv8sue4uEAc/ZPIEFri2B3oiS5S1MCDlrr+jiraaPpvjSxQG3Tdli0uP3yCjYhhBVmLCxWYlu+Z5tJ/rPyysep9E2Q3Ib77mGJJ4xRzN7fYIX7hF6FKUW9SjJTsZ82bI1qR/ceERehNpSrYPj2iMBhuPqGyEGurTkZeprtRiCy7bxLsU/t4+podlTRCH9IHSunbkX5BSeqner5co/fySusnu5uW9d5uIvNtDXXhlQOEmC1BcZSWGpGf6EpilTGXRf6ssX/IcfGz9gWAzypeV7oLIE3w8XD1OD5/3oQjOb3rm02i9iWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5HieQ6nfU2Tvkxud5wZBQTEYAIYTvV0lmww4866JC/c=; b=aXD5SC9e0IPmjUIpg0UczF+viVVedGeluZ1C6KmkUChfOQP12wHFYeJQ/8JUZh/LqpI1B01LeSQijwjN868xGiPO1jUWNsOF8OIY17OvggCeSEIqcu8U0PAIj37KmQGgi7K6xqFmZlVCLgaKY2tb9CXsM5Y6htWq+cPP6PHugjI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by PH7PR13MB5455.namprd13.prod.outlook.com (2603:10b6:510:139::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.15; Tue, 21 Feb 2023 06:50:00 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7ea4:e421:5dd5:9f4d]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7ea4:e421:5dd5:9f4d%7]) with mapi id 15.20.6111.021; Tue, 21 Feb 2023 06:49:59 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He , stable@dpdk.org Subject: [PATCH 5/6] net/nfp: fix the set TTL flow action Date: Tue, 21 Feb 2023 14:49:29 +0800 Message-Id: <20230221064930.3399-6-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.29.3 In-Reply-To: <20230221064930.3399-1-chaoyong.he@corigine.com> References: <20230221064930.3399-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2PR02CA0049.apcprd02.prod.outlook.com (2603:1096:4:196::7) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH7PR13MB5455:EE_ X-MS-Office365-Filtering-Correlation-Id: 9aff2354-453e-4dea-41f5-08db13d7d9a8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Lb4ugTzLt68jhN2vBk8bkITlFJZsvrWE/TDWD0Sk/S8OjS3D2JLqOvcCGCkdKTpgN4qiVAhYpisyp/nrQxh8G5s0F9HlhdQR7lPe8rcwx+kzPt4U2y0mBvrSVSKxy3L+gFMbAMLTFm3bYgimyD/JeaKffnIfiY+AZ5xuIiGL1MIn+7ICZCO/6x1hpovQgUcHUuoH9Dj6uVVKfrqGdJ4Ubq9fkRLqotTmZLdkqACKO+SqTVtgKYwktdBsyknE2slfPbWN+kqSjbODfvgjQKfK30u6hJ1577i3eac4ydXv6/yDijzV/ktYrcvP0HrxgJNZUrl3RzQNfgwALnPYd0XOClwlFzy/oK8S11r5xR0Ong57xHYrVVrCIm9uJFnd5eraUofrtoEhnZHEU/xmENah2E+PXyvrs6gMddtz6C/Z1LHYK/9KKKqfhA0LwqPdu1n1dHpqAnxOoIo4FlwZOx0dMRLwnw96hFoFxH2cQyLODHvqf4e38dxYfldYKxeu6+JRTGrkMRaRzWXo/7kiYDIbmt0EInAuOzKPY7kl0XIKGsdfzLxeE9HT0acGKXDn6sNApXWymctSRD7vuEENSDi8cjxyvDApIqp1zVzWXXu2uS60Fdam8B0hDWVDvq+Ippv5ABoCLd/BaUpgzEVO+OLjwqNcuJDgHgoUAUzonv7ja99bRzB7z+D4Awzh4pxvqMMweklcrpROHoF8ThDIlpT0MA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(366004)(39840400004)(376002)(136003)(396003)(346002)(451199018)(6512007)(41300700001)(450100002)(2616005)(66556008)(66946007)(66574015)(316002)(8676002)(4326008)(5660300002)(8936002)(6666004)(6916009)(66476007)(26005)(478600001)(52116002)(6486002)(6506007)(186003)(83380400001)(36756003)(1076003)(86362001)(44832011)(2906002)(38100700002)(38350700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?czZPVEtVS0JUUmh2U2xNN3lWYUFTbzMwMEdmMXlMRWJlbDYxbnByMVkvU3Zx?= =?utf-8?B?Ym12enovWTFVZzg1U3Z0QXhKdUlERlo2S2Zyalo1UHM3MXhxbTNEaWREbXd2?= =?utf-8?B?Y1JEb2tMbFZzRHdBaFJydG9ubUZBV09FbnVBeVRyWWtzeER1c0J6UDg4cWFx?= =?utf-8?B?eGJTOVFhSFNLRnVsV3JTR2U0eHBWMENwbnBiRGVQMFlXU3YrUlIvRFB4YitM?= =?utf-8?B?d3Jzd3IwVUY3bmxETzVPZlI3bnpTdWFzTnRxOU4rZUFUM08vR1JmUFBHcHBH?= =?utf-8?B?ckVLYkg1bEZ6ZnNFcEtjWHRvRmFyNlh1T2djUWdoRHpPbW96UFQxVjBwMnZG?= =?utf-8?B?ZE0wQ2paUnd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aW5ITHhSdy9oUDNIMGFXZ25P?= =?utf-8?B?bFE9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9aff2354-453e-4dea-41f5-08db13d7d9a8 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2023 06:49:59.7698 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XlBPVJT431P234oyXA6Ip0hCNEcVu+uQNDLEsPM72/IFTL84v/jETZO7S6YHoWkgag2Fe06HFLpv5WGvyxf6D5odc9KAyBFr7z+QYplcfrA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB5455 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 The former logic of set TTL flow action don't consider the mask filed of control message passed to the firmware. This caused the firmware skip the set action logic, and the offloaded packets don't have the right TTL as expected. Fixes: ac12e126c482 ("net/nfp: support TTL flow action") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/nfp_flow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index f22e89e1ea..c6e19d8cac 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -2252,6 +2252,7 @@ nfp_flow_action_set_ttl(char *act_data, ttl_conf = (const struct rte_flow_action_set_ttl *)action->conf; ttl_tos->ipv4_ttl = ttl_conf->ttl_value; + ttl_tos->ipv4_ttl_mask = 0xff; ttl_tos->reserved = 0; } @@ -2275,6 +2276,7 @@ nfp_flow_action_set_hl(char *act_data, ttl_conf = (const struct rte_flow_action_set_ttl *)action->conf; tc_hl->ipv6_hop_limit = ttl_conf->ttl_value; + tc_hl->ipv6_hop_limit_mask = 0xff; tc_hl->reserved = 0; } -- 2.29.3