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 B529B43B3C; Fri, 16 Feb 2024 14:57:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 846EE43001; Fri, 16 Feb 2024 14:57:07 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2057.outbound.protection.outlook.com [40.107.237.57]) by mails.dpdk.org (Postfix) with ESMTP id 890C242FA5 for ; Fri, 16 Feb 2024 14:57:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C4V5ctjy1XzTSzuBnqEBbPxIxo3Y4WYcxqvf1b7SFu9LXjYAGr4Rpp8M8hFv//7NPAcaHuAVEng/XJ3jqcxPoAbyjBBLOOnhgz+KYgg3xQGNBaDmX6s7Gq+xcw9hYYgAOe1ky2WX8egNW6UMOjC4YpOW1cmkf5/roKnN95cjbxtE1egMsfBaXLLP60Go87ldFSz9QJ+ukM6uU39IgVPmxK9caUPpzrsnB0J6KuZkFkBHRzN6Eks0QkUJPkzp3tC73zqhOmUkTyRPh70+6xTrteKEqxp6qsugm2TJcirjEW50W59flc7UZgEAkvWkO98yfhpTQqY3AzNnOWFBVuh/TA== 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=sevU14Fa0paqoezOjfuEAzWLTDVfrT28a5Ywos+drS0=; b=EiBmdxZvkcqjHIhTafWcbeeE208IO49o6yXiyTZoCOYkiexP9DxHFnLJHr6e0LSBuiVxUb27h+rREoyVRl5sn4PIHi9hypiEzG/gCq73RDQf74TkRpzMI1V1tgsVzkmueYZMb/w22Ph+yGOmvyVlD5PNKR8pGodUr3UMUHvDnsnoUVnlwtJ9vtuxE4PAUCKsuMRkKm46sEEDbvT1ErUBmiI3ZXnnBLmjvFNAK5LHPRjRrW7nde4kT/O4uWlXRV9PmAzbJHttDPwUVmLIYI9aZzXXPYvdRFSUnfN67EzubxDNsVyI80dX8dPI7eEeCbmWXFDdlPx2dEv1TVV0rN3y9g== 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=sevU14Fa0paqoezOjfuEAzWLTDVfrT28a5Ywos+drS0=; b=SA9E2p21PvTdCE2hKnSnUmICMaHyUnG5JJLg8sBs9iqdQ+bJKXuI94DkYyYm47SdJ1iM0Wax7Y/nC9JP5p0HNCtIGDdk8TLYhHTOpfUjfPXjNLTLpTijuW4/jEvxPryMFofbCdBFx5jpw8F+xHC7IQjgNdeRVdVvIUn614jRWPs= 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 CH3PR12MB7762.namprd12.prod.outlook.com (2603:10b6:610:151::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.14; Fri, 16 Feb 2024 13:57:05 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529%5]) with mapi id 15.20.7316.012; Fri, 16 Feb 2024 13:57:04 +0000 Message-ID: <8c3d602b-b83b-4cb6-af04-f51576d72284@amd.com> Date: Fri, 16 Feb 2024 13:56:58 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8] app/testpmd : fix packets not getting flushed in heavy-weight mode API Content-Language: en-US To: Kumara Parameshwaran , hujiayu.hu@foxmail.com Cc: dev@dpdk.org References: <20240117195228.423261-1-kumaraparamesh92@gmail.com> <20240216034750.47539-1-kumaraparamesh92@gmail.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/6B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Scp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20240216034750.47539-1-kumaraparamesh92@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DUZPR01CA0035.eurprd01.prod.exchangelabs.com (2603:10a6:10:468::13) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH3PR12MB7762:EE_ X-MS-Office365-Filtering-Correlation-Id: 66178435-471a-4e00-1f21-08dc2ef72804 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZlYR+KjoP7F5EdJTkNtL3cWJ095p1FdUtaZ/hnVK/jv4hJFlSdtS6++9GxZGEIrZuHfVOirAsYbTADa79rZiQba7xSuYLFK7zDto6nZrt6Vnd7p2aZL3V46ZSMD/TD3tNmHUuv9Fq9vSb6uVksD6SQNd9HC1NRP4D2kFiaB4ws3L4HKQHUXVwfH0G2oOO8UYX9hujOU9ihiQy7BYXPK6e5jwAEYo29/vBGJk9juQ1vmkd5MY/eLE10UAia93bCf0H/XokwQvQcSxeWDRxOWz0cCQU5ZUWuHuwE/IpWSc/izq4RQ2HR+P+N4lLGnZSt/PDo1efAxHz9P6HXoIDe9FmkZ9wGaAYyOi8cvn886gZgnDxH025Au6bUzNNpl5V0GNifzqd9EVyutAMyzfRHzVW2nhqGZR+yTmE0wkbbqA9xbHZfIzs5/9wlRQRh//DJqBunYKT9PPcc8EF0YXPVNUZIRxK/0FRaEMaYMThiCCL1P30OTEifVaOQHCSfExrSHNQJmS6VHl/Niw54WQeywunLHHDYm4oI+70h2mo/ez5YAOHbdj73vIdituEBuvtExS 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)(376002)(346002)(136003)(396003)(366004)(230922051799003)(230273577357003)(64100799003)(186009)(451199024)(1800799012)(36756003)(31696002)(31686004)(86362001)(4326008)(8676002)(8936002)(66556008)(66476007)(66946007)(44832011)(5660300002)(2906002)(38100700002)(83380400001)(6666004)(6506007)(316002)(26005)(41300700001)(2616005)(478600001)(6512007)(53546011)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eklQcnIzRkJNV1ZjRW9GOGE4YmlFdWpvbjZwYWh6M2hsKzBJVHphSU5nZkhq?= =?utf-8?B?MTNUQ0dsV1FHQXZzUm1wRzN4cVJlSnFoOGNYZElLYjQrTldHanhXdGZ5RW02?= =?utf-8?B?VUZXckwzY21VM25tTmNNMkVjRU1hQzBDT1pzNVpoaU54VytTUGw5RERYcXg0?= =?utf-8?B?VlZ0V3BQWDhXdHdJSXJoelExMFlsM1AvN2hSN3l1S0lsQzVaZlFZQWxZczJX?= =?utf-8?B?aWVqa0Mwd0ttNkx3d3dGVWtGQUVqQ25sL0hoZ2R5L1hDNmQyMnNaMS92bXBP?= =?utf-8?B?ajkrUWlNSmdJUDcrY2tJWWZocFhWcnkvaDFrN2d5dGxvclEyVUpWbWdiMW5y?= =?utf-8?B?bENhK1A5YWw5ZVFaaXVqNVlKQzlIUkhVQkh4cDFaMFVxVVQrblB3dzRON3F3?= =?utf-8?B?N2piQmkrT1lJN0lBbUwzRTZJQTh1a3QwYjhKM2Rmc2c1RGlFTEJTTTBxVm5h?= =?utf-8?B?Q255U29NclZjUk9TM29ob0V1RHp2aW5DTGlIZUtXQmJRUjc4dHdLTlFWWW9w?= =?utf-8?B?MEkvSXhXREJqb21XNlQrNjkycW9SdmoyQXRMU1ZSbm0zMlJGUWRRUDlFZ1BX?= =?utf-8?B?WVd5V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f-8?B?QmY3MFBudTRlcEpXWXhtbm10c2NVdm9YdndhekxmZU5WaHBiTHMxb0d4Z2ZE?= =?utf-8?B?SkRyQXQxdkVQNE9qbTBJOVRPU01ZcmJYS1RSdDNsbVovVEhVWEVVNkt3V0tN?= =?utf-8?B?T3JoUHdzamd3OUMvK1JCZmZYYnhQRjhJbTZ3bmVoNG03VDJiQUU5dUlLa3V0?= =?utf-8?B?VWtnNUh0Ry9EdHJlU2RPNmtkTzJCU2pBM1U2azNxVHNZVUR0QTd5dkdGSGJl?= =?utf-8?B?OGZTRlczeU5LbjV6M1ljeFVkWTNzc0NiUy91QndxaEdBQVI0RTloekRDSHBX?= =?utf-8?B?dFd1Z3Qya1ZXbGVWcmxQSGFFWHU2Y2JrUVJkSnBCUzlBTFkvTVBhNDdPY1pL?= =?utf-8?B?VTh0akVMM2tHWkRBTCtsd2xZaUtGaU1icWFiN252WXF0cWtoL3ZTVjRTNDFR?= =?utf-8?B?VHlXL1VnMitINEhNUDNKQzI0cHBQWnoyRnhtMVVBZEVleDNDbWZrcEV5RjNi?= =?utf-8?B?TllCSE1yamg4bk85a0U4Mk5LTzlKOEhVektQZGgxWDdZN0p6U3p4MktqN3FG?= =?utf-8?B?L1hyS0tVSmZIeDF4cmNLYjhqc0VWaG9VanMwcldrd1FRT0dPK1pMalcwSkpv?= =?utf-8?Q?HLPg7KpmK+tCxWfvhetBYDsxV?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 66178435-471a-4e00-1f21-08dc2ef72804 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2024 13:57:04.7409 (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: rvk5p6pT44dEvY+wZ0zmNEosJN3FJ3FzM5i20wsHFUHZ75zR86fz8Fx+ZsENY3uf X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7762 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 2/16/2024 3:47 AM, Kumara Parameshwaran wrote: > In heavy-weight mode GRO which is based on timer, the GRO packets > will not be flushed in spite of timer expiry if there is no packet > in the current poll. If timer mode GRO is enabled the > rte_gro_timeout_flush API should be invoked. > > Fixes: b7091f1dcfbc ("app/testpmd: enable the heavyweight mode TCP/IPv4 GRO") > Cc: hujiayu.hu@foxmail.com > > Signed-off-by: Kumara Parameshwaran > --- > v1: > Changes to make sure that the GRO flush API is invoked if there are no packets in > current poll and timer expiry. > > v2: > Fix code organisation issue > > v3: > Fix warnings > > v4: > Fix error and warnings > > v5: > Fix compilation issue when GRO is not defined > > v6: > Address review comments > > v7: > Address review comments > > v8: > Fix spell check warnings > > app/test-pmd/csumonly.c | 22 ++++++++++++++++++---- > 1 file changed, 18 insertions(+), 4 deletions(-) > > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c > index c103e54111..a922160f6d 100644 > --- a/app/test-pmd/csumonly.c > +++ b/app/test-pmd/csumonly.c > @@ -863,16 +863,29 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) > > /* receive a burst of packet */ > nb_rx = common_fwd_stream_receive(fs, pkts_burst, nb_pkt_per_burst); > - if (unlikely(nb_rx == 0)) > + if (unlikely(nb_rx == 0)) { > +#ifndef RTE_LIB_GRO > return false; > +#else > + gro_enable = gro_ports[fs->rx_port].enable; > + /* > + * Make sure that in case of Heavyweight mode GRO the packets in > + * GRO cache should be flushed as the timer could have expired. > + * > + * The order of conditions should be the same as gro_ctx is valid > + * only when gro_flush_cycles is not the GRO_DEFAULT_FLUSH_CYCLES which > + * indicates light weight mode GRO > + */ > Updated comment as below to make it terse, what do you think: /* * Check if packets need to be flushed in the GRO context * due to a timeout. * * Continue only in GRO heavyweight mode and if there are * packets in the GRO context. */ > + if (!gro_enable || (gro_flush_cycles == GRO_DEFAULT_FLUSH_CYCLES) || > + (rte_gro_get_pkt_count(current_fwd_lcore()->gro_ctx) == 0)) > + return false; > +#endif > + } > Another issue but also related to your patch, if there is no packet to Tx after GRO block, should we add another zero packet check: if (unlikely(nb_rx == 0)) return false; To prevent executing GSO and Tx path code with zero packet, do you think does this make sense?