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 9235FA0C4E; Fri, 15 Oct 2021 16:05:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BA9B411CB; Fri, 15 Oct 2021 16:05:30 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 6B5EC410F1 for ; Fri, 15 Oct 2021 16:05:27 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10137"; a="227810048" X-IronPort-AV: E=Sophos;i="5.85,375,1624345200"; d="scan'208";a="227810048" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2021 07:05:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,375,1624345200"; d="scan'208";a="564295504" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by FMSMGA003.fm.intel.com with ESMTP; 15 Oct 2021 07:05:25 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 15 Oct 2021 07:05:25 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 15 Oct 2021 07:05:24 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Fri, 15 Oct 2021 07:05:24 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.45) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Fri, 15 Oct 2021 07:05:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cpg0i3yW9aZ30JBEJuf+vUBE0NEGWzfTs23On9hNzxkRemlfnV07A9NDhlDP5FxHrRWtIqCh6Y555Z4J+vxEHigqmgAqXtjjRqvehIcufkAqkO1XmlXpGfV9aLToImgsScsCkzjStqYJtB2C5NA5ICkL1clXase9B3uMz8vGMiJc1RORJehUKtfs120JjHCdqJ4BnKF0aC/J/qrTsp91vGGyT51f04PSCFwYtUfYFk+LBiOwntBChNzW7Qb8+KosrVXpS7wdSiTERX9BsJCIe6PpOu5uYlfuOEn5hvgqo/zfOV9Mp5kGO5DKsqzwqarNSDjlMhr+h7QoSB9/NOCkkQ== 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=fzuVPCueFSX59lVzUe2H4LeeXlJE8oDrZOr0iun414Y=; b=H8kr8u5A4USfUtPe6QRaDiZRpexwCoRtJPfGN2Ix8+OEUB8bpwzxn9THqMmXLKoyiiM7GAYB4HuHxzgsqegG5C8e1jo9JdpzhzkHehAMkOmbWiTDLz9BC1C0+XwHoniPY92C89KE7h4EQamGPo7TzTIExF2DfK1y+fXF11KpDqOnelxFcyBEMRwseldoWvn/xBgGwridtk9IiiS+Eo0GZ/Iy7TTz6eG34hI7Ygo7H8NuR2OKgVMlhNhX2YDgJ+SFi8PuAOe9AMdru/11kPiJZ1lK4j4T2eAu12TRtgRMG3X63n/Dm/58JY4525Gwo7N1y2aiDXOTUf0ZIs2UQd+0nA== 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=fzuVPCueFSX59lVzUe2H4LeeXlJE8oDrZOr0iun414Y=; b=SzamV1zMTyhK3RnsvUjd0yfh0o5tifPF6m7Cku6N4HSCUHxMZLfTfWNRMC2nogtOB5cTe8WtPoWg2HQDEFg5+TIdTwm83xHhye3ICZd23UTmtkxtyiWxftrqK7aPvR4tUADWmX4aFA4nXFF6RC3HZ3y3vpD00U3Jclw4XWehUTY= 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 MWHPR11MB1872.namprd11.prod.outlook.com (2603:10b6:300:110::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Fri, 15 Oct 2021 14:05:22 +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.4608.017; Fri, 15 Oct 2021 14:05:22 +0000 To: Olivier Matz CC: , Declan Doherty References: <20210903105942.265501-1-radu.nicolau@intel.com> From: "Nicolau, Radu" Message-ID: <7d3286f1-6a24-713d-6edb-07892cd12bea@intel.com> Date: Fri, 15 Oct 2021 15:05:17 +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: DB6PR0301CA0083.eurprd03.prod.outlook.com (2603:10a6:6:30::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 DB6PR0301CA0083.eurprd03.prod.outlook.com (2603:10a6:6:30::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Fri, 15 Oct 2021 14:05:21 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 68c64cde-38af-4163-d562-08d98fe4d44f X-MS-TrafficTypeDiagnostic: MWHPR11MB1872: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bb4lK+OcmqnnOypB68rJ8ZZXNEDyOzIdPCe6v+OiA1cVr/OJQ2tnXO/z25R6tjSyI+jUv0mclqjGpx3H+x+xlenyg8vC/xVxDAmyeKx4pIUfC34uTuhn3L/+VTgMQW/vNprnqbVeal+pU/jz+OwbIYNdyf2i7BIDxcWaCgqoO3YOQNDFT2neEaoSAlicC4maQvea4B4wMWnCOCi0HDsIfDXwiYwuawE1B9h1qUyQ33YgF/xZcsSjncbzMWkOw2SRp08PVclEX+BuViQZf6y2Sw2n1x39qUbC9iWh1DA+pw1w2GtEPi5QSY7U7kylit2cfrBe/3NmEvTOJlAg9zJp0iEQMSHeQ4vlebvEjIg0Mbr5rSiwGdO9otijZrAXfkEOYjeGm9eozbksp+rOXEgC9ICen3aLaJK/1wK2TrcPQn5uO7MkkKPqjyr/bCCliYNEbHUO6ukb51Afd5p9A10ZgoqaiBKjEn1OyTRqBbrh0kMDPe1O7nvi7v3j2MJBF454017HEfkwrFhva9n4EJ+zTUZUMTMAN0rv5OztoiDzUNg5Nt5/YzyZelmLDjyCAmcXhEN98ivZzzz122Rw9RSjVxWCX2aDPw6gUd4142akc7jFLZ6Rrr2/J5fVlcUeUVzKMZ1mVJyszoB8Gov+QwORl56QBimAoXI0d8jWQAlOQwfQVNoQZfe3v6Fz6U4ko361+Nj5JkcW/EWgil26WyqWzaIIxo336RDhyFZacc7rVGc8InuTkE4NthuRMBjhdhUr 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)(8676002)(53546011)(86362001)(38100700002)(31696002)(55236004)(2616005)(508600001)(36756003)(82960400001)(66946007)(83380400001)(6916009)(186003)(2906002)(16576012)(4326008)(6666004)(66556008)(31686004)(6486002)(107886003)(8936002)(956004)(5660300002)(316002)(66476007)(26005)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?b0Z1UUpHNk1GbjdMTHk2VkVvMC84VEtJcVc0TUswa3BxTllnUVc1K2VrVUI1?= =?utf-8?B?akF4bGZwd0hhQVU3cXZEeUVFWG9uNUs0Mk1lK21JeksvV3FWMVlUeEZPSi9h?= =?utf-8?B?c0h3ZlBTYURTV1NQcGVZS0pEdnFFYnFuRUNqQUJWOGJkRFJJbDZOdUJrUHZQ?= =?utf-8?B?bm5oY29qWlNyR3ZtTGtSYWpMaXZoTzJPR05hbUNXUEFjVFdJYUdISVNNWWJt?= =?utf-8?B?US9GTkh6Zm16dTZUOXRoM2Fra2FzczNic1U2aGJTUEhtV3VMOWI1L0QrM3Bq?= =?utf-8?B?RS8wUjVIRDFwWlRVQ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bnJOczN1Wkh4bXE3T0FzalJSNDU5aVFwWjRzSjJoa21YUGwzRW5HQTdF?= =?utf-8?B?d3VqOUNkMWdvQkRPKzZrY1JIUzNTNWw3QWRXUzFObFhLdXlxWnVhd0Vra1VQ?= =?utf-8?B?RlN0aG5oYWp4d1F2WWEweEtqK0lsYzU2T28rVERwTXRlWC95dy8ydnZsR0ZB?= =?utf-8?B?R21Ob2F5ckpZQ3lUZXExV1FEZnE2bjlJSTBvMC9TSC9FR0VHaEw2VytxM0hs?= =?utf-8?B?VzdlalhVbVB4USt6L1pRc0M3Sy8ramdEWE4yNW1FZlR1aDJSRzQ1NnpjNHB1?= =?utf-8?B?RTZjSytmT0YwVVRwQmszOERMbE9QdnFtb3h4c2JCUkFSWlp5MStkcVhrUlNw?= =?utf-8?B?UTdaMkpwRnV3dzBpRVVEWHNrWm5MY1ZucHliZXlTS09yUUZOdnoyYzl1NFFG?= =?utf-8?B?d2VZOVEwbFE3V01kRXM5ZHJFeXpJVnVSOEJycUh6UzJuYzI5RFRONGYrYm5J?= =?utf-8?B?eWpYYTBzamRaMStnT2xsbThCcGVwVFkyQ0p3OWZ6M3lFNEhRSnNud1dMa25T?= =?utf-8?Q?DcCnKUDQcZq8GTAmn8DnO9FjLAJG9bKKWUTnfr4?= X-MS-Exchange-CrossTenant-Network-Message-Id: 68c64cde-38af-4163-d562-08d98fe4d44f X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4868.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2021 14:05:22.8078 (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: rjlLMrYd5iPThnnTx1sw/xD6V2eoHpQYYqh8XSWrk21iEjIfV68RfCLZaaPCJ9qSKhgACldvtnO82HHcL+HEIQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1872 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] net: add support for UDP segmentation case 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 Olivier, thanks for the feedback. I marked it as deferred for this release. On 10/14/2021 4:46 PM, Olivier Matz wrote: > Hi Radu, > > On Fri, Sep 03, 2021 at 11:59:42AM +0100, Radu Nicolau wrote: >> [PATCH] net: add support for UDP segmentation case > What about this title instead? > > net: exclude IP len from phdr cksum if offloading UDP frag > >> Add support to the ipv4/ipv6 pseudo-header function when TSO is enabled >> in the UDP case, eg PKT_TX_UDP_SEG is set in the mbuf ol_flags > I think it would be clearer to say "UDP fragmentation" instead of > "TSO is enabled in the UDP case". > >> Signed-off-by: Declan Doherty >> Signed-off-by: Radu Nicolau >> --- >> lib/net/rte_ip.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h >> index 05948b69b7..c916ec1b09 100644 >> --- a/lib/net/rte_ip.h >> +++ b/lib/net/rte_ip.h >> @@ -333,7 +333,7 @@ rte_ipv4_phdr_cksum(const struct rte_ipv4_hdr *ipv4_hdr, uint64_t ol_flags) >> psd_hdr.dst_addr = ipv4_hdr->dst_addr; >> psd_hdr.zero = 0; >> psd_hdr.proto = ipv4_hdr->next_proto_id; >> - if (ol_flags & PKT_TX_TCP_SEG) { >> + if (ol_flags & (PKT_TX_TCP_SEG | PKT_TX_UDP_SEG)) { >> psd_hdr.len = 0; >> } else { >> l3_len = rte_be_to_cpu_16(ipv4_hdr->total_length); > Can you also update the API comment? > >> @@ -474,7 +474,7 @@ rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags) >> } psd_hdr; >> >> psd_hdr.proto = (uint32_t)(ipv6_hdr->proto << 24); >> - if (ol_flags & PKT_TX_TCP_SEG) { >> + if (ol_flags & (PKT_TX_TCP_SEG | PKT_TX_UDP_SEG)) { >> psd_hdr.len = 0; >> } else { >> psd_hdr.len = ipv6_hdr->payload_len; >> -- >> 2.25.1 >> > No objection for this patch, but I think we should consider removing > this ol_flags parameter from the pseudo header checksum calculation > functions in the future, because it is a bit confusing. > > Historically, this was done in commit 4199fdea60c3 ("mbuf: generic > support for TCP segmentation offload") because we were expecting that > this pseudo-header checksum (required by Intel hw when doing checksum or > TSO) will be done in the same way for many drivers (i.e. without the IP > length for TSO). I don't know if it is the case. > > Or maybe a 'use_0_length' parameter would make more sense than > 'ol_flags'. > > Thanks, > Olivier