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 5A5DA432FA; Sat, 11 Nov 2023 04:37:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28B60402A6; Sat, 11 Nov 2023 04:37:39 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2049.outbound.protection.outlook.com [40.107.93.49]) by mails.dpdk.org (Postfix) with ESMTP id E7A8B4025C for ; Sat, 11 Nov 2023 04:37:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kKhoBHp/Mf8PTRUPzO0XPp/AIa15aIpHDF6wLwdsbdNaj2H6cUTAwF9EtrJrgXL/kccZRfl0sm+Zw3Cc7jvV8wcAHwcXTJ3P89cz1worwW/ehT6FHRxtCQ4wh9NaFKdXCGV9ENO95ALTAofbSo5/2dtL+5RPv5uUcV+IuMfrY5TLher/5p2lORT/1NT0FajY142NQHkQ1q1cvIpfXRVUPkFj6YFAw5YVgj3rl3FELKF5C9nccygzHsI1KXMGnIDLGkzyRr0Ntpf9jJSSwSuddZvfpEntb/1hO7VJbyuF3Rhxf8O7aqHRUGMtiV492P3WMpDvkIdXXzBKHYMu2OPv9A== 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=Rgd+ZoZEnNWqz/e/U91vwcDjblcAgkTESjcEGSb5evM=; b=X0Ek4XxDZ/4+ddoaHkSacjBu+0XKAa+GNZ+gm+ZtmvNnDWB1NT3Oa4GMBgxLM3qfyvrnlYfl4a/8PWxmTqLHziZLIbyIdqgJWPcsHkQTA/86ST92P2pzuZEsdQgsGGVFv8s4tdFJkP3D4eGCrqbvrdLHFgqJfDPLZ3tAHEtRXw0UHM/FanmYqEOpSeIUBA+fvB4XUFE6ytIWjIwqLzp/GE8O6MIdFq0S7TFdcPApeDjLn1GcLsbHHODLi+uf/h8KWbJr8UriaEJm/Dr9Oc2ei2e7GUCscn+boRWHYhUcdnbbmF53MQcmDAkaltnwhsBsCewlP/TptJ5wt6XKKTIoRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none 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=Rgd+ZoZEnNWqz/e/U91vwcDjblcAgkTESjcEGSb5evM=; b=IhIl6jCoYXu5wJ17BtLJJVW9chDdOIcre7y9rJ/b+qyLxgU9KLUwb9MgQrg4xO+IM+A8MuyQDv8nDpq58wX/gyyG3cJqZAg/XVcuEh6uNDcYySgEUjv4qlULrX2yrUROsmeUpQTgO1ACw3xAqquHqdKDSEObLbn155npiwS/8oY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DM6PR12MB4450.namprd12.prod.outlook.com (2603:10b6:5:28e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Sat, 11 Nov 2023 03:37:35 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f%6]) with mapi id 15.20.6954.029; Sat, 11 Nov 2023 03:37:35 +0000 Message-ID: Date: Sat, 11 Nov 2023 03:37:10 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 3/3] app/testpmd: fix unnecessary change when set tunnel TSO Content-Language: en-US To: Huisong Li , dev@dpdk.org, Aman Singh , Yuying Zhang , Shahaf Shuler , Wenzhuo Lu Cc: andrew.rybchenko@oktetlabs.ru, liuyonglong@huawei.com References: <20231110081925.14142-1-lihuisong@huawei.com> <20231110081925.14142-4-lihuisong@huawei.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhB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UMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20231110081925.14142-4-lihuisong@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0043.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:48::8) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM6PR12MB4450:EE_ X-MS-Office365-Filtering-Correlation-Id: c14772b3-3fd6-40b2-5228-08dbe2678b3d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c09EiU5DYB9VeNs0ZEc/vwzZ7ybia1MBhDeI+3fbgr5kxKwyoSesWBsL38iYUG90BxRlbu/9gjE1TidaRkLjBUe1HwjmKEUe/bslzeYGnHa8vsmGj9jN5Cw55mtXRsKmJ64LycgpkeulSlg5EHAARbqXf12jX87rNDfxYgjMFrXsLpSbMnfb5dsDBfLbCbQ3Blj4F6kE3xVlAXeQXpSd3500O4IXC9LhkhghSE4hJD3sgLHd8GWOmWKZ6nP1pw7Jl1jlAXQiLg3CS6C85UHqAc9qy3ArY/QVURx85IK5MZAESo7ApESPom4BgCfTJV2reCau2aInY2Tt2lP0ey0wcqubhsWaIoCO1KERX5Ul80Dh0/2DwVY3ftIZBgf5uNe9F8ODKhOfGy7NwlsccvSNv9TACIHuLMtGFM+FdSHOyO/QbfAWTP48zbsKaVCF6EZL98BlEHbJoYKu1fP0w46AiQwHlrxHaLW5BWWkYnwQvq74yZ8dcRLtnrsY77yVc4csHu3pCH64NoR2lfyzZTtklRbpkuNQSBJFRbTZovYs2b8VuzVLhl2BM9mT6vQZzATqj0ff3TNnT1l3Soxewuze35IOz/tEQLQMtCUJIlGeq8+ovN/K7GGoyqdzLLJGCMxBM17sSm+B6RhPEGYTmVi8wBGvTnwGewh98ejb/im8vZhAh3xTG1I46FfbX8Q0/mLD X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(396003)(346002)(376002)(136003)(366004)(230173577357003)(230273577357003)(230922051799003)(64100799003)(186009)(1800799009)(451199024)(2616005)(6486002)(478600001)(110136005)(53546011)(2906002)(6506007)(66946007)(26005)(316002)(66476007)(6512007)(66556008)(8676002)(8936002)(4326008)(44832011)(5660300002)(41300700001)(6666004)(86362001)(83380400001)(31696002)(36756003)(38100700002)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QmFBSW5CeWhyR3BSa2lOR3NxNWs5OXJPRjhyaTRXVUQ4M2o0MTZhVDJSb3hR?= =?utf-8?B?eTdFUzlqdnJxRE5aUmFaK2dnVGt1YllRRjI4aUNRZmtxclNIRElqNFFNb0pP?= =?utf-8?B?Z0JUYXVwY2RPYmw3dFZwV3czakIrTkh3Sm1XQ1FtdU1QbFRRWkZ5a1RhVUY4?= =?utf-8?B?R2RaanlmdDBIVTVTUkFaVnZCcklqemd3T2tTd0gxZGRNVUQ4TG1iZ1pBaWJQ?= =?utf-8?B?VFpyYmtXbGpyWjBaUkZCZ2pTQ3lEem8yZEhPTUQ2L2dzYXVOS25ocnVoL0Fw?= =?utf-8?B?VE53NUVYZTJabDNOMVRwU0c5N2xIRzBtQURHNFhLYU90UTF2N1p2dGVoaHdB?= =?utf-8?B?NzVmRlJYVXZCY0ROZ3BnZkZvREJQMENubUt0LzFlT0lCblBIR0RtNkd4MWQ3?= =?utf-8?B?THk5NjJBQzhHckR0WmZwcDY1TlhHMlJtRm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mdWFsSEoxdUNSQWFjeWFBbmFrd1ZQSTZlVVlYZWVR?= =?utf-8?B?VStNcnU0WjYwQmg5azNKSUJnK1FXRE1oVXFCMnU1ZElRdisrdGZDdWx1L1lT?= =?utf-8?B?RDhCQ2V3K1ZLZTdlc3RYeGY5K2c0OXVOdTlhb2trb2JTRUZoeGRXb0Z6RUhz?= =?utf-8?B?ZDJFZytUQ0xHcFUvM2RmbmE2LzRMSTJaTGFOdGtZUzlhSldwZyt4VW0yQXdR?= =?utf-8?B?aEsxUm9uZDlHM0RlbXFsSUdWK0J5dmlQMFBPbzVvK1dXT2lEZUZsVEhoUm90?= =?utf-8?B?OUlTR0JkSUJoT2M4Y3Y0Z00yaEtoeS90QWZUZjUwMk40Z3dxK2tnWktJOE5K?= =?utf-8?B?cmFBaUFBb2RPQmVlV21DQmJCUWVCeDZobUNMMUJrTGl5a1FtZmJ2VG5oNkIr?= =?utf-8?B?dGVySk9ucVd3NFMvMWhyd2FJcW5WdEZBUzA1cHowREgwQk1paUxEdE43QTJX?= =?utf-8?B?NXlNTy9kb0F2NVZiYWpqaE5jeVJ5aWpwaVE4YmhuU2RaU3h6dVdkWmNsTFhs?= =?utf-8?B?bkpWZnFGZEFLYzRoVmpkUEd0S0dmOHNxWmd0aStOTml4U3VQL3pYRG1sRWRR?= =?utf-8?B?WDVJYW9rdHI4MXFvRS92M201TFBwaVdVZmFYR0lqTzFGRXRDc04yakYyLzcw?= =?utf-8?B?THNVUDQveEZHYWVCemFUUTJ5bndzOE41d2JBK2p2eHF3Mm44d1FZajV3UmQx?= =?utf-8?B?WWdsNTRLQ3RSbHM0WHF3eTZOS2hlZ3ZrQzZ3SEtzcU1Cd2ptTDlob1pvV3JH?= =?utf-8?Q?LdJYhEEfBGre6JKVeEloWT1hf?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c14772b3-3fd6-40b2-5228-08dbe2678b3d X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2023 03:37:35.0943 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: X4RRlLFBn1t/HnWuEUIEd6ZTikSwwvVIKR/2ka59+DWiDDKCXhZ8feLvvf/7uUe3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4450 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 On 11/10/2023 8:19 AM, Huisong Li wrote: > Currently, there are two conditions to set tunnel TSO, like "parse tunnel" > and "outer IP checksum". If these conditions are not satisfied, testpmd > should not change their configuration, like tx_offloads on port and per > queue, and no need to request "reconfig device". > > Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API") > Cc: stable@dpdk.org > > Signed-off-by: Huisong Li > --- > app/test-pmd/cmdline.c | 36 ++++++++++++++++++++---------------- > 1 file changed, 20 insertions(+), 16 deletions(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index d3243d016b..33e66d1d93 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -5093,17 +5093,6 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, > res->port_id); > return; > } > - check_tunnel_tso_nic_support(res->port_id, dev_info.tx_offload_capa); > - } > - > - if (ports[res->port_id].tunnel_tso_segsz == 0) { > - ports[res->port_id].dev_conf.txmode.offloads &= ~all_tunnel_tso; > - printf("TSO for tunneled packets is disabled\n"); > - } else { > - ports[res->port_id].dev_conf.txmode.offloads |= > - (all_tunnel_tso & dev_info.tx_offload_capa); > - printf("TSO segment size for tunneled packets is %d\n", > - ports[res->port_id].tunnel_tso_segsz); > > /* Below conditions are needed to make it work: > * (1) tunnel TSO is supported by the NIC; > @@ -5116,14 +5105,29 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, > * is not necessary for IPv6 tunneled pkts because there's no > * checksum in IP header anymore. > */ > - > - if (!ports[res->port_id].parse_tunnel) > + if (!ports[res->port_id].parse_tunnel) { > fprintf(stderr, > - "Warning: csum parse_tunnel must be set so that tunneled packets are recognized\n"); > + "Error: csum parse_tunnel must be set so that tunneled packets are recognized\n"); > + return; > + } > if (!(ports[res->port_id].dev_conf.txmode.offloads & > - RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM)) > + RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM)) { > fprintf(stderr, > - "Warning: csum set outer-ip must be set to hw if outer L3 is IPv4; not necessary for IPv6\n"); > + "Error: csum set outer-ip must be set to hw if outer L3 is IPv4; not necessary for IPv6\n"); > + return; > + } > + > + check_tunnel_tso_nic_support(res->port_id, dev_info.tx_offload_capa); > + } > + > + if (ports[res->port_id].tunnel_tso_segsz == 0) { > + ports[res->port_id].dev_conf.txmode.offloads &= ~all_tunnel_tso; > + printf("TSO for tunneled packets is disabled\n"); > + } else { > + ports[res->port_id].dev_conf.txmode.offloads |= > + (all_tunnel_tso & dev_info.tx_offload_capa); > + printf("TSO segment size for tunneled packets is %d\n", > + ports[res->port_id].tunnel_tso_segsz); > Similar comment with previous patch, why having separate if block for same check, above block can be merged to it.