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 8894CA00C2; Thu, 10 Feb 2022 11:30:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62C5A40140; Thu, 10 Feb 2022 11:30:32 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 13B034013F for ; Thu, 10 Feb 2022 11:30:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644489031; x=1676025031; h=message-id:date:subject:from:to:cc:references: in-reply-to:content-transfer-encoding:mime-version; bh=0VFkyJKPMW+cgES2HBbll1f753Y+0xZl+zTFoy8irA0=; b=O8ZKDFjBdLvI5Fj2WaK+P8mywIgrJzlWWOWuZe3rwqCJRcTFaQraHGrg oPbP46KeBiCbr/D2Mb8ef3oGXKnQ+uhKba3l/xQul9hT/RU7KyZNf12rs rXAsLtMr5U2QA9/HBVpl6l7USphlwllS8J7b5V66ddXS19gAFbrMves/7 kzylly60FOfXWqmey9iPJqI4Ls3uvXeVeQj/O5yw8u9ruiMu4zmfAhsZb dBZytSklgQUOz6eSIRBjz5QAGYR/XyZJLRnLS00iqD3DH/7ZX/m/swD8v IuQRf6Dmr0qWuyq58zYbCjxjObwBj2VgAc7JroyIjGb+ha288990Ic91U w==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="310199467" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="310199467" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 02:30:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="526427260" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga007.jf.intel.com with ESMTP; 10 Feb 2022 02:30:29 -0800 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 10 Feb 2022 02:30:29 -0800 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) 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.2308.20; Thu, 10 Feb 2022 02:30:29 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Thu, 10 Feb 2022 02:30:29 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 10 Feb 2022 02:30:28 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e2Jcs5QXw/crdIUWP67HMXFsc2ivLYP/yUoH4rCsR7PAec48AEVaBksX7cFInNUOdAwfop8Nj1dQcKHLF2oh2K6bv6lIBdLLnBbY6jS1Jiira4LHCGxdn/jw1yoxPxG7yJNAglRSDjgdbvdVO+1Pp4CMeb12O88mMWEOovXjhS00r/uX/sAjtRhnr0UFUtcM1ptfqP0nB4JUHIGxl1VTH4Uqk4piOsqvgGh/mXNqj9+sHmk542MC56vvR0uzc8p5mW5LuohGELR4rVZLyidcEQD0mi/A4tfVb+NlEAHjyHyUi+vz6yRNSRJw0bulHnc59djokR2n1OnHk4U/oks8FA== 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=PfY87hN5CD4ET0ewUlyG1tt7RZ4du82Q4XUP9E/ZyZ8=; b=nkNIL5P6BH/GiK/VZs3YswUiYyMm1C8Ks/yIHp8tbR3kDiSh9G1ngMvPkDtnzW29I+z3q2I79kdAlIj9kHv+ANAx8v20JGn0y3PhGRyxanZwoxzJoXB45vPyjhTja9oflBipsLGeoWkPUxNJV1kcOaAjqgD1DINiDdBcguDqqCH8sO/cILr9QDwA1tcbQn3Y4Xz2btpJV2ENbulJJ5Tt8fdH5BJg8Dc8SJeggql3pgSqlGbwDHyU2l7jXLFFW4I8Gf+bGjAeZDuHkCeWhEnz5OHNav2+/SHvylySTLxASXDFAl/F761zZ7AeAFsP/c7K7xAzO628CYELmDFkNeTWCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by BN6PR11MB1985.namprd11.prod.outlook.com (2603:10b6:404:46::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Thu, 10 Feb 2022 10:30:27 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2%4]) with mapi id 15.20.4975.011; Thu, 10 Feb 2022 10:30:27 +0000 Message-ID: Date: Thu, 10 Feb 2022 10:30:20 +0000 Subject: Re: [PATCH v6 1/3] ethdev: introduce IP reassembly offload Content-Language: en-US From: Ferruh Yigit To: Andrew Rybchenko , Akhil Goyal , CC: , , , , , , , , , , References: <20220208201111.420971-1-gakhil@marvell.com> <20220208222027.1364292-1-gakhil@marvell.com> <20220208222027.1364292-2-gakhil@marvell.com> <31ccc26f-9425-8df4-0dab-b57921dfad33@oktetlabs.ru> <3039fe3b-d74a-744d-64eb-305634eabd24@intel.com> X-User: ferruhy In-Reply-To: <3039fe3b-d74a-744d-64eb-305634eabd24@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO3P123CA0007.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:ba::12) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9ff2d636-fc47-4610-110f-08d9ec805a94 X-MS-TrafficTypeDiagnostic: BN6PR11MB1985:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SThTXTTa+A3zzT1YNUt85FFuVhj9IuOtyjxIudKnOA6SYkkQGtC8tqGMrBYoAWTrVuDretDxj2gBbmbxxWktPwhWeytSeHb6wIq8YwQzhQWEYPOmZuF4CvpuT2181A33Ll1n6mzryubegRpAUW8pyaBxV+XUZPIS3HFf3SHZXvCi5e5M06/9aEOXguGpHajMj1Dib6P79eORkR+S+b5lSHA+GjyOHq4Tb/zH7Iwr74W9nHXtmhWHqRWS5ynwuvFGL9LKRyXbVHi0s9mKA5EqShnyfNTabknm8/u5AFHidWML0CM/Okvb8kV52aP1+JVDdKb7u/h2tABqS4zmwae9TlM014av7kJKvqu+j8QIW0/WFG7Nqbiy06j+yMEQ+UQzJ7tPKtwP8MEAuiaaEgUf4JLrV0NfJTDHXfPXnC/AdcmBLV9Q2wOQW17jdvgDhMjVASQrLRBSEae4BdrH3k5+wSS9+9VfZMhRzcMEIb5mP02GFwTM7ji/i7YQSBXYDA7eDGTTWsg/Hjors5lI0ydouNOlwbDhzQ2DpISMrVdKSJBHvP1tTV7l3mlCYCvlWaNYV+ZBbQE3ez/eQpO6ta76PTTE/pseoPgQga5HPbO7Rw6maII2j1M33+VZlmR8IF2dU2xk4fx9yPLUrlLKWJ/8exQbDM2uUsAvgTv5keta4fM/y/ZWVt6/cIAazURWzh5uz/oXhr1ikkf3KdpEXLJ2EA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(31686004)(8936002)(5660300002)(6486002)(66946007)(4326008)(8676002)(66476007)(66556008)(82960400001)(6666004)(508600001)(36756003)(31696002)(6512007)(83380400001)(7416002)(2616005)(55236004)(53546011)(38100700002)(2906002)(44832011)(26005)(186003)(110136005)(316002)(6506007)(86362001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UHd2eUNDa2MvZk1DT3Nzd2dIVzhoOVd1bElDblJTdzdaaE0wK2F0WG9SM2hs?= =?utf-8?B?RXl0YWg3cDUyeHhWRDZtbGRDRE5wcHVrMjJMeDU1TzRydDFydFlVWnVBaGFW?= =?utf-8?B?RGNwM3ZGSXVaVDZlY3JiNjlBSlZJV0VBSmY3SXo5WnpLWlpOaWV4c1lsMlp6?= =?utf-8?B?K0Naa0tLVVp2Ly9iQjhCdi9wdjJFZXArWEF4eFZPRXFuZCtjRndBbGwrODNx?= =?utf-8?B?bG5NUE1QYVZOTEJzdUtueGRvaWZUWERYNjQzRHQ0elIvZ2pxL0czVVVqakpr?= =?utf-8?B?bmFCeWwxRkxHNTNMeGl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DVXhNQnRu?= =?utf-8?B?ell0TkczRGkrM3B4a0JxalBOYU91V0ZGTHFvQVRUaVE0bDhTK1Q2UXlqWmlU?= =?utf-8?Q?5/ZhT9dFp7l7h95Xa194/F0=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 9ff2d636-fc47-4610-110f-08d9ec805a94 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 10:30:27.1442 (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: Oh922m0DBc/2gcUq9cr2Dc4o1V9m/oyWtUPMD3xunbDArcakwSJHZM6N41fcXVEpxQg9DREIBCVKlauIy8Y+hQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1985 X-OriginatorOrg: intel.com 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/10/2022 10:20 AM, Ferruh Yigit wrote: > On 2/10/2022 10:08 AM, Andrew Rybchenko wrote: >> On 2/9/22 01:20, Akhil Goyal wrote: >>> IP Reassembly is a costly operation if it is done in software. >>> The operation becomes even more costlier if IP fragments are encrypted. >>> However, if it is offloaded to HW, it can considerably save application >>> cycles. >>> >>> Hence, a new offload feature is exposed in eth_dev ops for devices which >>> can attempt IP reassembly of packets in hardware. >>> - rte_eth_ip_reassembly_capability_get() - to get the maximum values >>>    of reassembly configuration which can be set. >>> - rte_eth_ip_reassembly_conf_set() - to set IP reassembly configuration >>>    and to enable the feature in the PMD (to be called before >>>    rte_eth_dev_start()). >>> - rte_eth_ip_reassembly_conf_get() - to get the current configuration >>>    set in PMD. >>> >>> Now when the offload is enabled using rte_eth_ip_reassembly_conf_set(), >>> the resulting reassembled IP packet would be a typical segmented mbuf in >>> case of success. >>> >>> And if reassembly of IP fragments is failed or is incomplete (if >>> fragments do not come before the reass_timeout, overlap, etc), the mbuf >>> dynamic flags can be updated by the PMD. This is updated in a subsequent >>> patch. >>> >>> Signed-off-by: Akhil Goyal >> >> Just one nit below, sorry that I'm so late >> >>> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h >>> index 147cc1ced3..0215f9d854 100644 >>> --- a/lib/ethdev/rte_ethdev.h >>> +++ b/lib/ethdev/rte_ethdev.h >>> @@ -5202,6 +5202,106 @@ int rte_eth_representor_info_get(uint16_t port_id, >>>   __rte_experimental >>>   int rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features); >>> +/* Flag to offload IP reassembly for IPv4 packets. */ >>> +#define RTE_ETH_DEV_REASSEMBLY_F_IPV4 (RTE_BIT32(0)) >>> +/* Flag to offload IP reassembly for IPv6 packets. */ >>> +#define RTE_ETH_DEV_REASSEMBLY_F_IPV6 (RTE_BIT32(1)) >> >> Doxygen style comments shoud be above: /** > > ack. Let me fix that in next-net. done, please verify in next-net