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 01A5341CFC for ; Tue, 21 Feb 2023 11:35:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 51C01431E4; Tue, 21 Feb 2023 11:35:46 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2122.outbound.protection.outlook.com [40.107.243.122]) by mails.dpdk.org (Postfix) with ESMTP id E3673431D6; Tue, 21 Feb 2023 11:35:43 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N2cZOZK35jR5EsOPTn28CRB04fRJLvN98uqAgm9VHIeGff/QA1MZF2vWGooRIqmSrmPU/9ja7+z7q3aveaKhWFQx6TD8AeyR7rdOZEvTjnq7c9de60aiFxK2eCsynxFdebR4CIMIo1Jzn5F3ZMdFdvumAXV5bbzeKY/mqjlNWvsvSUISiPheWetRoz3rRkcICHlIFv0hlsq/CqaeO+wRe3Y5xVozZ7Oc+z1QSHPlZ+LJARrAioRERpxmMLjHPoa4yaJRRWqqb/LGN5s9jvdh4CVO4pUaTQyBeoQQNHCYirqPMq1OIu3XkKIWMHf4UQOa0fN8wUDV/EaASbQZsiC7dQ== 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=hJyhCUku5/fiHGanEDtAIsIXOUOZLksPpdDuFcxIkEc=; b=ObWXq2NZAsPAE4eXXI4QsjMkf+ehYCf/vBiSL1QNf/1LHIxU/9ibWEJh9aOdSNVDAf0YEyFLqAuRHjhgtb5qHR+xIdkgY5R8sLticWy6uZEvld/MGkYBep/KoDBKW0EK/TSqrsGVFMM+8FGX9k40k/UtjTYLWJxFGqTmr8GH03pUjeivqYUABHhZtDrcR30YxZG1DNPU7Xoaqx5jd75fxSCOdvdWsGmmMBVeSKtKWODN9B/Lg1PIH1ciT/I2Te7caANFSrciTdneBVNM9I1iGhRhvr35zvdvY8LnW9kRCCiCcOJp5KeWZLzt9JEj0jUyPGHmxENAc+BC6+3NSZUo3Q== 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=hJyhCUku5/fiHGanEDtAIsIXOUOZLksPpdDuFcxIkEc=; b=YFwD03FmXLkBSeT9TQ555GRwqvsvbjaswUknJAImSEiwfkc0lC63CNhDPlm2v8vD3oxHtQOEwf8CWAJQIHlSXuO11h/laGXiDCX2DoWUIJ3NhBBunQNXVxoQni7nYrWK/6RxlKHIXEb8tYtJSYnhiie97Zbm1XyvYs8EFj29is0= 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 PH0PR13MB5616.namprd13.prod.outlook.com (2603:10b6:510:12b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.21; Tue, 21 Feb 2023 10:35:42 +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 10:35:42 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He , stable@dpdk.org Subject: [PATCH v2 5/6] net/nfp: fix the set TTL flow action Date: Tue, 21 Feb 2023 18:35:12 +0800 Message-Id: <20230221103513.412-6-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.29.3 In-Reply-To: <20230221103513.412-1-chaoyong.he@corigine.com> References: <20230221064930.3399-1-chaoyong.he@corigine.com> <20230221103513.412-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2P153CA0038.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c6::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_|PH0PR13MB5616:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a9aad8d-3895-4201-3da9-08db13f761a3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R5eNGwURvToQ9G6itlmEp9FFZ3h4IhxjV+uovNETNYG5kDgbk/NHuP98CGhZgOIfCBtzBkmXZkBdP7lYcDaS37iIUjujPGAJYzKcwOj/CefqqIPwXk/S4Tol9wcOo56krx5JGIedI4ldw78FJCg6J2fdFHp3ejT0Dhksyv+Yqc5xUi0ZEFC7AzvGX9q/4eNXAiEMEQTecDg2/W/jeQxSi7iKP2hCQ4ykxFUgtAXI1/to4cfGg0h2sGnLjR8s5Er5rCACGmSvoHUipLhZTtzLG+6u9YDlUgv6H3PpHJ4p0hbsCQaX0TMEq/XqAfNmsIdclAUTIhuyT2DkUV5WkuY9Q6i+l4bTOhTK0TITCcLZCkLZudBa7hR8gJj1PtdwJgVeHv+QWBL0qLNTEdhLw8XgAtzpeIcKVWqCbM+unHYYqrqGo7vI5FWTDwmelusnnzK/O7o4hfm7Lwxac/F6FgUdPPVvu/gYLCDsyNhkV8brfUEIiQgIAGWkCbhOi7RcCfB/XCHFuGcNa+aBPyYkf3cjtnNEeUeZpuYU18aHlTzJQbfweXxFAtgbSXU5zKWbwSR2R9tUQPseKWfWuReWzE2Eu2XPM+3pA6cCg2ZIWImYziqultIOxhyICQGn2MKmBo1a8PffBYpHIw2gLneu46qZOVTMCOgNk6bJpP3GJdzjLx6j1I1BjBUtO9VJo+kgRM36hK7OQZR0BIOv1aB4NukVRg== 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)(376002)(396003)(346002)(366004)(39840400004)(136003)(451199018)(83380400001)(450100002)(66476007)(66556008)(26005)(8676002)(66946007)(478600001)(316002)(4326008)(6916009)(6506007)(6666004)(6512007)(186003)(1076003)(36756003)(38100700002)(38350700002)(86362001)(6486002)(2906002)(41300700001)(8936002)(44832011)(5660300002)(52116002)(66574015)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RW4zaVJXblN4OVF2NmRGVUVkUDZMZEoxdTNmY0NBNE1TZHJGMCtja1pFS1lQ?= =?utf-8?B?ZUtENzl2Vkw1VjZ2Zlc4VXlRRC8vY2oxeGJ5M2UwS0F3Z0pQMlY4R0ZQb283?= =?utf-8?B?OUZoVC9vUURjY2F3d1ZOYkRpaUR4U0d0U0lVbXA4R1VQU3Z5OXhSVG5lNUkx?= =?utf-8?B?VVFuYXdkMzBiZjI5ZW51eUJURklQUERDWStRWElsM3ZCV2YvWXFDN241dzRL?= =?utf-8?B?cTFORmlWZ1ZFQ2U0Z05xdG05Snp0M3JSak5wc1BJT2dhZnk3OUNGamE5VWtu?= =?utf-8?B?T0QvK0lJS2VlbmVCK0R1MG9LUDV4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pSkxV?= =?utf-8?B?cmVIMzBQaVRxejFBVEJIYzBMcldTcTliWFg4V21pOXBJS0o1REhOK05jQXh1?= =?utf-8?B?ZHc9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a9aad8d-3895-4201-3da9-08db13f761a3 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2023 10:35:42.3213 (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: 44NlFGcAdF7bMbgpBtQBsEYOcEdCTqTDR1LfbYeADx5EGU+tWvQncpO4MJtsT4J7pgFP5+zY3hPExso0hDT392vNY8ptNcSvXGSdPvv7y2w= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR13MB5616 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 5be4c4f18a..77f249e2b9 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