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 7C28A432FA; Sat, 11 Nov 2023 04:30:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18303402A6; Sat, 11 Nov 2023 04:30:48 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2079.outbound.protection.outlook.com [40.107.223.79]) by mails.dpdk.org (Postfix) with ESMTP id 200584025C for ; Sat, 11 Nov 2023 04:30:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BnaUE+Lnp3BmRW0GdIV5JR0S+4D2weF9eH5vqcw6mOvrYBEQZhTb4lvD5fgEgwZaRZOaGaX0wLEEApu4reMoA0UGwQLH51cyCFDGOAXMRAHPnBtWEQvdVwypOUJZdGWchjkt5j57EP1113Kq9Q7gPf3pZhupHtxZFjehpFd+sjd+cSYkYODrEtFHkPLbS0Xr3glyi9fPzYZlgjrS/yb2AN8pq93534eYB0FgwI2LId18NQ0LZ4X4BAKG/W2J5akKYojhxm9+DgT/aVUIaLJEeG366SPxgounqXIxq4sk7PS2ivyjgbEnERd9hGrd2t8/3/46RJJNIXGSYJ1OBZXUxQ== 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=u1rIuV3WBa/ZoYziMpOotSMqzfGYLRPh5+sCpALLWho=; b=CdQfwSTAplGzZLO1RMtczRLagz1GvWjb4sgppKhBHl0MZmghX3HqS6QH6ql+jQabq720FGLkEhH0YtOR8Na/sz32Vea7xAwop7KA9xAyC1ERPwi9nCkBuERtKPD5orKvDJpOK5dmJtYAQeGP1oDx/NYinRH9b1RMbu6/eqAWBJMxi2RcHocApERkzUPGCwuHt6to5QFbGJdRW0eR0xUdxAFPs3hmhTXt8uqCK9Qt/s82ghMlLskylzy+5jKxvpnrpOHTNTOogryoks0rVI35wfptPKAbk/l257SgfysbumHahXOlMCJpoNFXeN/xfoffA9yUWeqBBmRo+7GwV3g8QQ== 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=u1rIuV3WBa/ZoYziMpOotSMqzfGYLRPh5+sCpALLWho=; b=5tlp3yaf2GfVbBp8kpy6laxmMOw3aN+NDIUg7D7LZ70jd5wzp9Icsk0+h4DVIkgQzDhicvlAkqXDSlG+YSlR5MNYDe9RmCvtSOnrbNq3QklGAk6ZUKPcbTDZFCY/sproaMB1Jm2my1qRDUgVWQPqXk6AwxLJfvLy+WdCboBs+WA= 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:30:42 +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:30:41 +0000 Message-ID: Date: Sat, 11 Nov 2023 03:30:17 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/3] app/testpmd: add the explicit check for tunnel TSO offload Content-Language: en-US To: Huisong Li , dev@dpdk.org, Aman Singh , Yuying Zhang , Wenzhuo Lu , Shahaf Shuler Cc: andrew.rybchenko@oktetlabs.ru, liuyonglong@huawei.com References: <20231110081925.14142-1-lihuisong@huawei.com> <20231110081925.14142-3-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 AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJkdyEEB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sS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20231110081925.14142-3-lihuisong@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0058.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4b::19) 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: fb0ebf34-8ca6-4b98-f0b3-08dbe2669484 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /F1XBo58KLNSK7h0Y/DNF9eljqwqiLgP1n26i1HlEa9Ir/DvHf4ZCiZ6p0t/4xx6CVqsneHnmuZfWMKwCXvbDlw9KTKVKLfrSn1R2UwRrcu8ZVNlq1JKYwHM4mcBO6Gf4I9I8iJIQEM7e9B0dMs8v7S6x80ELZ6Zj0nHHscyxQ892i6JT6EZfTDtFg9NpqPwDiZCIlmg3iSpROexbEVMtgE+rqQ9GWPAK3R9SY+j/d6Ua2n7FyUFFI4GA/QPWDztJSimbjef+8eFNSZtQJxBt3+Ycm+zfQJ1kn6V452NBsRfbIKF2EJTKdjC6Q4NMK1w+ZmKb4kGp/xOyeK8q6USzp5Hc2vvaRIjJzSCexF9MWxVk0eGMDmsE5MGRYPczH+ndDvELC8wXuKTvnpqDOAh6JJG7Ia9d8C8c2OZO7nUilkhgnHnBZ5Nrsapyd2rSC4zTXUy3cwHC84sqZNjMuDSLV2Rj3YU3yCqvc7RoLbkNz9O44PgSOFLqxY+Qzul8iJKdjtsuWtsJf5ocp3eccHmIHTdXqqkMh0dFCjvyd6tr6zeClmH8A4BO5s4GSYbYXZNZwQIPyD/y8RVN1gPcjtHG618aveu9GaTuR4Ob5kvnrXchiMu7OxprtDWR4r5YJzf0UyJr74G9PlmxqDMFaevQpU6TCGJSorDXDXHqSEapWPFQRxj9SIAJpYaKc3besVa 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?c09kT2RlL3p1SlYyV0RtbndMYTVjN2NwdDlYUUsrWXdwZEdjdFlRbUVpWDVt?= =?utf-8?B?STlsejZsbHZCdDdMaiszOGlkbEowOExaQ1MyRFVaSUx2UGoxdVAvSzRkSzBS?= =?utf-8?B?YlNSL21nYlFpbTFXZ0NHdVd4WlZ0YmV0S3pKU0V6NTl0R2VxSFN1SG5kSmRS?= =?utf-8?B?TE9BVlhzNVdISWc4TDJlZ09WbytFTlg0THB4aWlNWmVxL0MxdUF4WUlNbm1r?= =?utf-8?B?QlQvLzNTbkxEcnlUc3JPMXZ3NVpmVmp1MWdLZmpoRmhwaVJwM2dHMGNQdUEz?= =?utf-8?B?b2lsQ1NOTUs2TkNYcE5QaitYR3dzVjg2WS9UL2kva1E4OWxEM1JSRXo2Y0V4?= =?utf-8?B?NWdlZi91Z3loMGphSThDUFpCSzgrY1NGUDNobEo3QmFkR2hDWXB4cnpMTWJm?= =?utf-8?B?eUlrcWMvbzhFK3lES2JxVGl0V3JSTHY0RUJVL3c5TDh0R1Jl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rm9XVkthYUI0Z2Raall3SVVm?= =?utf-8?B?VTA1OFBYbDZvM3Q3bTVQbDh5b3FTTzZyNnlzOFRyR2F1dDB5RjhoZVNaVmdU?= =?utf-8?B?OG1jRVE3aHhKdzRXdXhVeVorNmV4WHNQZXQ2SHUwSW1iMHVha0oyYTZtWGQ4?= =?utf-8?B?QUFqSUNGTGdMbGdVOHpxZk1iWkJMODNabUNCT0k0aSt2WWNKcFVxb0xrWW96?= =?utf-8?B?ak4rRkExYjVrQ05nL25oZVptQkJjcm50QnZUOEVuL21oQnp4NDZhZWN1L0s5?= =?utf-8?B?UjBkVFk0VGFKM1JXNCthWVF1TDZnbWJ6VlkyK0NVS080a04vdVdYd0ExNzV1?= =?utf-8?B?ODhoY0Y3aVowcmhrcytlZ3JtS2l3M3JyanRxaW1nQXJlMnVPdVNUcHVoZHZy?= =?utf-8?B?N1NrR0Z1Z1c3aWVUVnJKQ0RCZ0hoWjB4Nmh5ODhSZFJwZDVHODUwNmhXMXRX?= =?utf-8?B?V0xxS2p0NEJSYXpkdFE2Szg5b0xUV1lkWDJJK0oxbDFLSTJ2bWpIaTVvcGVM?= =?utf-8?B?WEtVZjJnOTRFMHJ5M3NNNURJNUNmdjVWOTZqMXdRVW5hbmp0dWlDaUVxSkVM?= =?utf-8?B?ZTlNaTBBaEdVRjFFZUgwNUtXdTdJNURDcFZaZ0FlelJET2h3a1RkT3ZwMmRB?= =?utf-8?B?N3I3UUxuSHVqaVlRTVNFR2lDdldDT1BIdmI1MFNxa1NOcDJnMzFHZy9iVGxs?= =?utf-8?B?N3R0eWtkK0dvNEUwaVVORkRtaUFsdzA0R2h1Q0V5YlEvWUhNeTR4azgrZ3pK?= =?utf-8?Q?PVYeSmbFVM+4qHfatsCj5oXWC?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb0ebf34-8ca6-4b98-f0b3-08dbe2669484 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:30:41.3338 (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: d50rcvc1WGhDAgSwEtkHeVCv8nMyJXffjBtJU4iivK9rDce7s4VIfM9YCwUQZfBZ 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: > If port don't support TSO of tunnel packets, tell user in advance and > no need to change other configuration of this port in case of fault spread. > > In addition, if some tunnel offloads don't support, which is not an error > case, the log about this shouldn't be to stderr. > Overall patch looks good to me, please check a minor comment below. > Fixes: 3926dd2b6668 ("app/testpmd: enforce offload capabilities check") > Cc: stable@dpdk.org > > Signed-off-by: Huisong Li > --- > app/test-pmd/cmdline.c | 51 +++++++++++++++++++----------------------- > 1 file changed, 23 insertions(+), 28 deletions(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 25462bdbfc..d3243d016b 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -5039,28 +5039,22 @@ static void > check_tunnel_tso_nic_support(portid_t port_id, uint64_t tx_offload_capa) > { > if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO)) > - fprintf(stderr, > - "Warning: VXLAN TUNNEL TSO not supported therefore not enabled for port %d\n", > + printf("Warning: VXLAN TUNNEL TSO not supported therefore not enabled for port %d\n", > port_id); > if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO)) > - fprintf(stderr, > - "Warning: GRE TUNNEL TSO not supported therefore not enabled for port %d\n", > + printf("Warning: GRE TUNNEL TSO not supported therefore not enabled for port %d\n", > port_id); > if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO)) > - fprintf(stderr, > - "Warning: IPIP TUNNEL TSO not supported therefore not enabled for port %d\n", > + printf("Warning: IPIP TUNNEL TSO not supported therefore not enabled for port %d\n", > port_id); > if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO)) > - fprintf(stderr, > - "Warning: GENEVE TUNNEL TSO not supported therefore not enabled for port %d\n", > + printf("Warning: GENEVE TUNNEL TSO not supported therefore not enabled for port %d\n", > port_id); > if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_IP_TNL_TSO)) > - fprintf(stderr, > - "Warning: IP TUNNEL TSO not supported therefore not enabled for port %d\n", > + printf("Warning: IP TUNNEL TSO not supported therefore not enabled for port %d\n", > port_id); > if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO)) > - fprintf(stderr, > - "Warning: UDP TUNNEL TSO not supported therefore not enabled for port %d\n", > + printf("Warning: UDP TUNNEL TSO not supported therefore not enabled for port %d\n", > port_id); > } > > @@ -5071,6 +5065,12 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, > { > struct cmd_tunnel_tso_set_result *res = parsed_result; > struct rte_eth_dev_info dev_info; > + uint64_t all_tunnel_tso = RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO | > + RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO | > + RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO | > + RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO | > + RTE_ETH_TX_OFFLOAD_IP_TNL_TSO | > + RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO; > int ret; > > if (port_id_is_invalid(res->port_id, ENABLED_WARN)) > @@ -5087,26 +5087,21 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, > if (ret != 0) > return; > > - check_tunnel_tso_nic_support(res->port_id, dev_info.tx_offload_capa); > + if (ports[res->port_id].tunnel_tso_segsz != 0) { > + if ((all_tunnel_tso & dev_info.tx_offload_capa) == 0) { > + fprintf(stderr, "Error: port=%u don't support tunnel TSO offloads.\n", > + res->port_id); > + return; > + } > + check_tunnel_tso_nic_support(res->port_id, dev_info.tx_offload_capa); > + } > + Instead of having a separate if block, else leg of below if block does same check [1], what do you think to move above block to there? > if (ports[res->port_id].tunnel_tso_segsz == 0) { > - ports[res->port_id].dev_conf.txmode.offloads &= > - ~(RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO | > - RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO | > - RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO | > - RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO | > - RTE_ETH_TX_OFFLOAD_IP_TNL_TSO | > - RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO); > + ports[res->port_id].dev_conf.txmode.offloads &= ~all_tunnel_tso; > printf("TSO for tunneled packets is disabled\n"); > } else { > - uint64_t tso_offloads = (RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO | > - RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO | > - RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO | > - RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO | > - RTE_ETH_TX_OFFLOAD_IP_TNL_TSO | > - RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO); > - [1] ---> here has same logical condition > ports[res->port_id].dev_conf.txmode.offloads |= > - (tso_offloads & dev_info.tx_offload_capa); > + (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); >