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 DEFCFA0547; Tue, 26 Oct 2021 17:51:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A096240E0F; Tue, 26 Oct 2021 17:51:40 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 965B3407FF for ; Tue, 26 Oct 2021 17:51:38 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10149"; a="216855357" X-IronPort-AV: E=Sophos;i="5.87,184,1631602800"; d="scan'208";a="216855357" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2021 08:50:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,184,1631602800"; d="scan'208";a="446803961" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga006.jf.intel.com with ESMTP; 26 Oct 2021 08:50:44 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 26 Oct 2021 08:50:43 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 26 Oct 2021 08:50:43 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 26 Oct 2021 08:50:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gPDYyTvaD3fWwyCqK+7TVfIZdFNRcrzCz6IbelzCRDelTNytkVkLyiNbAuwfanUjNgqRMuxPPX2H773APW8GIIrSf5iUy9yj26mv82v4VMUv126Is28GZYuG+OzFASFm3Dx1SAbURC+5wwB9uMBsWctVhsKc4Gp4Fnj3w3GcKFK+evC5fHbnG60eDvkioJifWp5mjlRs1OJgR7xstnK8q5USY1VWoofkPKDJCIkzXswBQaGh9hh+sc6MLVuEclH4hQW49zw+bC6SfDMNf1t3ql4qYUphqNVjWl+iHxq6CWQTCQaftIWTgLK9AQG76FpXCj6iQaIpV5m8SXpM1BzmQg== 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=ht44HUelMUkYt1rFKDw2keW6aBVJHrzDniNE8JbyZA4=; b=ocijiPZHF5+U3foqt7FsRETF2b2LYDgaH8qDx93MmnqBLthbnFqoD5JbaqfLZkTt2w7SpO56fEZ3HkbWqNsPJLDRO6sGi1GzTfb12T3riGCHSU/0AHuflHQJH8gTR2mJTiok964W8iCYPfPSmPyZYL1exUsxAKz2EhHtCEbhEtxNrLBTVj3S67HDRzkDa+Shgx4P95YlTrrWFIMZ6IC1Rk5xNExyxzfSny7adQZ2WzlFmCie0MMn2elzBCkhyCAW0nLI2cR5ms7yqNabx8/o5c9eHPUPSLYA4NRaZ/ctwVtXyoIbsoc52HA05thJtngWAjF2d4ukow22165x8A+Ukg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ht44HUelMUkYt1rFKDw2keW6aBVJHrzDniNE8JbyZA4=; b=SoYWuR0JPK76BgdlPODB8BVSj6aOgpyUqN8/D8gwmY+2hbV2hb8XJ2TR9eK/5nHCIAcuNj/fswl+4pvHUGApmgsWmLuhDwPI04hog3WfXyUZtMhSzmdNv9Vz97+AwQeo84e+okFk2uS6QIP8P2hkZq1FbXKt2Ae/z/9u2/Tcok8= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from CO1PR11MB4868.namprd11.prod.outlook.com (2603:10b6:303:90::19) by MWHPR1101MB2253.namprd11.prod.outlook.com (2603:10b6:301:52::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.13; Tue, 26 Oct 2021 15:50:42 +0000 Received: from CO1PR11MB4868.namprd11.prod.outlook.com ([fe80::7c6e:d458:33ed:e579]) by CO1PR11MB4868.namprd11.prod.outlook.com ([fe80::7c6e:d458:33ed:e579%8]) with mapi id 15.20.4628.020; Tue, 26 Oct 2021 15:50:42 +0000 To: Akhil Goyal , Konstantin Ananyev , Bernard Iremonger , Vladimir Medvedkin CC: "dev@dpdk.org" , Anoob Joseph , "Declan Doherty" , Abhijit Sinha , Daniel Martin Buckley , Fan Zhang References: <20211018145824.1211074-1-radu.nicolau@intel.com> <20211018145824.1211074-2-radu.nicolau@intel.com> From: "Nicolau, Radu" Message-ID: Date: Tue, 26 Oct 2021 16:50:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.14.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-ClientProxiedBy: DU2PR04CA0265.eurprd04.prod.outlook.com (2603:10a6:10:28e::30) To CO1PR11MB4868.namprd11.prod.outlook.com (2603:10b6:303:90::19) MIME-Version: 1.0 Received: from [192.168.1.21] (109.255.186.106) by DU2PR04CA0265.eurprd04.prod.outlook.com (2603:10a6:10:28e::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Tue, 26 Oct 2021 15:50:40 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d368d5e8-fc3d-46ce-5e36-08d998985d8e X-MS-TrafficTypeDiagnostic: MWHPR1101MB2253: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wnfATr2o1pCiCASaIM3diX0LTzo0Nst/CCPZv1cVkb6VgGbyO/Ugb0nk9u8Ktsdd0NZF1UUkdXf5nx4leuVKn2lKKf+dZ+v2FD+Go6i7JXLNsbgkKKfwYy60d7o4kAWe2pblrJEPkmQmg7kagTZoghz8s2Qyh0fzP6sFuao1KzmkI/iIz8Esb5gIio35cVs5SbMNyhEu2V0z73zx/vd5pJigPY1HCd9ObWmjqEBMBh6QRh0ZZZuLtfnv8YqTsYfD+Vo0RSOc7UdmughNIF2TVFQfcAKHnLHz27CHZTldjUpcU0ykS1oigPtlA6+K0+5N5gDVSsmRPKCzAvikV+QMlT3HFU4R6a/KPrIJItMZM4HDgqWGPQQRz/70UiHJYb3MFL0hV30XwjUGSoG3KPe/6Dx3VZiDXOBNV1rcmsOIuOQot8+nJZa55CSymI+qqU9yk515latUMtS1pV8SqZE8a/AC4vwoGbVWjN+RxR8uE+ZYnS3XyetLAVa/Yenoi2qL9rrov3Hqm7CjKKpuCM1QY/ShwtcWRvzwrZjwNNbDwV0hNchMdNcfSFkibDuR5gUefpcFi1eK6vhodnr2k95fCRtDdffHLECkDT5+3PhPP6E6VHbTGDOw15ILTdb8oPxS+4RyGOy+0YUpZBYIGT7jpVBBFa/fzJt6yPacR4FBKbmZEHl5RRuQiSAZ7RvYx47kqAlG7zGRLbQpF6/U/1qzoM7bRMf6bUlN/OZyS9NThEE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB4868.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(16576012)(316002)(2616005)(36756003)(66476007)(107886003)(66556008)(956004)(2906002)(54906003)(110136005)(6636002)(31686004)(4744005)(5660300002)(6666004)(38100700002)(83380400001)(186003)(55236004)(86362001)(66946007)(508600001)(26005)(4326008)(82960400001)(8936002)(8676002)(6486002)(31696002)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YXJYMVluUVpYOHFFZzAxRlR3UzFEV1FoTFc5b3czMEtGUW51ekJ2TEhROEt3?= =?utf-8?B?U1l0Z0twQWxIU01maGNnMmtadDlPSDV0ODB0RkJRaVM3QjlpTnRwUUptLzBv?= =?utf-8?B?aVpTclJWZ2lQTEJGSW1ZcWFFY2Y5Zmt5LzVJTlA3eG5xaDJsOHdKbDFMR2p1?= =?utf-8?B?bFVXNnV2ZSthRjI2SDhxbXFnNG9CdCt0Mk1sc2NWQkpEeElwM3Mwa093RmNh?= =?utf-8?B?OXpua1ZiWFJZWmZTbXU5bHNvRU43Uk1QT29QK3FnYWFJWHlrengrU0NPNzZ5?= =?utf-8?B?b1BETTNoTjBmbTNWOVdjVDNDczVlYysyUm91aklNOUlaSDdydjBsQ1RsdDZa?= =?utf-8?B?d3J4L1dPRHVtWE1PV0ZhaEYwN3hhc0NsQ2hyNkMwaDYwZUlvWVhr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kw=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: d368d5e8-fc3d-46ce-5e36-08d998985d8e X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4868.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2021 15:50:42.2833 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: piLdlkOSHmBiu737sJ+UWu74pbcG5Kkgz2a9qN39+ridG1WWjWaxk7L3WeZZPA1RXJaPQ5EdgpPZMglfAIM0MA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2253 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [EXT] [PATCH 1/2] ipsec: add transmit segmentation offload support 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 Sender: "dev" Hi Akhil, I will address all issues except the last one with a comment below: >> - n = num; >> - sqn = esn_outb_update_sqn(sa, &n); >> - if (n != num) >> + n_sqn = nb_segs_t; >> + sqn = esn_outb_update_sqn(sa, &n_sqn); >> + if (n_sqn != nb_segs_t) { >> rte_errno = EOVERFLOW; > If it is an error condition, shouldn't we return. > Also, I do not see rte_errno being checked anywhere in the app/test or ipsec-secgw. We are sending all packets that don't cause a SN overflow, and we set the error flag. The user will see that not all packets were sent and and rte_errno, and this is the behaviour that was in place before this patch. > >> + /* if there are segmented packets find out how many can be >> + * sent until overflow occurs >> + */ >> + if (nb_segs_t > num) { /* there is at least 1 */ >> + uint32_t seg_cnt = 0; >> + for (i = 0; i < num && seg_cnt < n_sqn; i++) >> + seg_cnt += nb_segs[i]; >> + num = i - 1; >> + } else { >> + num = n_sqn; /* no segmented packets */ >> + } >> + } >>