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 EFD30A00C2; Thu, 10 Feb 2022 11:20:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E36E041223; Thu, 10 Feb 2022 11:20:22 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 6C6F9411DB for ; Thu, 10 Feb 2022 11:20:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644488421; x=1676024421; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=eMuRYYGhkMvyT6hia3EgQrfeCyEOvnqPPO0x74s9p+o=; b=HKrGdCD7i6fH9IfMWgrcyZJeq5iuj93eNFrs/P6dvd1jsx7adCyEIVfT uqv4fozG74RMsPO8MlWtb0dXSLqZo8Qli60GKiyezqy8LjEYBPLyB8US4 /0oVWSe5l6S+6QpTlR8+RJOfYWvFaPwz0vFbvAxE/qW/C4C2OQcsuKjVD MKfByLMIbOjLX/fuaSR9R3MU6EC7NqUfsCMTUArxO/6qFoDJZ5atpfl1h fIMSeC1U0yLMbMONqnEKxG/lcs2qgn3JZ066+DbPjeuGHNIRmiY2WVBX5 dYrD+aSE2OZV8kiGu+qI0fdqIch9BzaGIOEbv56X451lAuWwVHj7lKfY/ Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="335875342" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="335875342" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 02:20:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="633615340" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga004.jf.intel.com with ESMTP; 10 Feb 2022 02:20:20 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX602.amr.corp.intel.com (10.22.229.15) 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:20:19 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX609.amr.corp.intel.com (10.22.229.22) 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:20:19 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx609.amr.corp.intel.com (10.22.229.22) 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:20:19 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.101) 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:20:19 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DCNrC+JlouKZ83Tc+KicenT+jLFZn7yPF4xYQmSVche8owR5N1V5mYV+HfBCYXGmUm6JI3dKcKOd449sgYBSUyUmecHGPaF9nJ9ElDSLBkBcsEZBIeUhg8jWGYiGif5XGidXtHCPSiJRiVS564ZvsL8814sTlz5Qv0BwUMdPzwst7up+haPk/8lz8RMav1zsCgCyRjwbpl70ttmDoiga7bilbxpO42UGQvpQMOJUmJSu4ZL0URMF+oxsMekkOnw6ok6qDi8GtbVbT66uDsaEaksuV/Bwr2r+qCo9UBM3u4pmieFjxIOYgL8WbVRcfZPI0L9/ZbDhwqVjHT9Ep+yRXw== 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=MlF6iAJsOjMnx+ZLuk7zg2kpnMwzz8In9yUkA3RTr6U=; b=AZhaD1Dge5C8TeA7TjULtYf39Jf2W3EvOy2oLm3QYzBOecEkeLxlp7rkucezH77dq6smz8v0/4GZnydrbSYy2/2fIjo3GUvUhyYuZxV/iLMYjbpAagk1NogHdeeORk3p8CBzITqx0U6IiRSyqjiBR8tRacWtc3NjxjgRTAIS47WXf9649cYhAITnVcPMSBu5N4PliPDsHnivNC08AriD4kNur46ey44hg/WS1bRpXiyBSZKTqYzqivfkcfFJXCxRlY5xJ7dfxDl79ugX8DBDH6YIaz8ZkN5Owcc8BL4zdvlW7Y5KEV0jvITs/XNiVIS+wuMLdrDq5oA4FMtTl0BERw== 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 CY4PR11MB1477.namprd11.prod.outlook.com (2603:10b6:910:b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.18; Thu, 10 Feb 2022 10:20:16 +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:20:16 +0000 Message-ID: <3039fe3b-d74a-744d-64eb-305634eabd24@intel.com> Date: Thu, 10 Feb 2022 10:20:09 +0000 Subject: Re: [PATCH v6 1/3] ethdev: introduce IP reassembly offload Content-Language: en-US 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> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <31ccc26f-9425-8df4-0dab-b57921dfad33@oktetlabs.ru> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0078.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:190::11) 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: cc217a7e-9e61-425b-8f4f-08d9ec7eee8b X-MS-TrafficTypeDiagnostic: CY4PR11MB1477:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K0hl8DRLXPN6gfpsZlv6Iii52O8Np7R7I6Xhrw5BFNJfqgmesI9/+V5RUYttDM7YXE/WJfeu9BvRE72Wt67BhH++TBOnjMsJA5mwgdgR0IjRCsETsIbQvX6pQ8c1ygglrte/1ZNC+4iSqeZUmCs+ikklmh3hkztM1khMWWgY0PFh1Fpl4VDEyes5J02CK58/ADhaKNsDDFZ/dxonhPA2krLkhPM1PJ0rVUxlM1+EMBlKNdhUjbnyNr5z8qlxK4qoue5nGrW5zCzR4HLxGVyi8+Dtpo+8oTS0poeVDOlsj5d/VBJMtOb1Ki9AN27DzmBmODYbRxLxJCEqNMUa+L9lyDAaVHnvtncmzxg9Hz73SnS1ZDVMIJC5hqyJYQ+O7CkHFA2Q0rHqviqHX+n1BVGyo1inPwyr7oYP4R63AA0tcJe8Rr36NYPVgswqD0rTPIiDY7eo1R+I15uKYaM4ham8uTHWch70mTLjgCl+Fu+7pMrxcrMDMpb8w1kDE36w2pfn1qxus2dDuRsNqhd4zrFkyR5hU1jhIDwHLWfcHQDR3bgAroRwo9+K4WLm7L4/N178EjROxH9008vIfP5sPstpt+iSB1FSKiTvpul1fSzIX9QM34jzyQSoPKAODVvhVeuXunv/0nLsBJ2H0HX1Mg2+HvE1DqBKVY0nX3nXNfKqAmiPqxyDScdGponxdx+AR7okla5WkmNWAcdwKGS6EVR74g== 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)(2616005)(53546011)(86362001)(31696002)(6486002)(5660300002)(83380400001)(55236004)(186003)(2906002)(8676002)(66556008)(66476007)(36756003)(6666004)(6512007)(66946007)(4326008)(6506007)(82960400001)(26005)(316002)(8936002)(31686004)(508600001)(110136005)(44832011)(38100700002)(7416002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WERzK0RKNnVqSG1nTnpGOXNlRXhyQXpKaWIxSnl1Sjh6cDFqcW1NMWlja2o1?= =?utf-8?B?eFFXMlNmT3ExSFBVbW4zdE5VVG83TVhuaG1NRU82NDVhQzR4bnVOSnRBQVFW?= =?utf-8?B?d1FaMHpXdFJDUCtHYVRxYWVYTXdlZ2tLWVNuZ2pnWkkwT0ZrWkZ0N21neEUy?= =?utf-8?B?VERpS2VvWWMyMnNxRGF6SnNnbnpzVjN0VXJnZzd3UXNvMVRyV1NBdVBJSnEr?= =?utf-8?B?R2RhR3NZSGo0TlpHMzZsT2VpWnpHaExMczd2Smt2UDR6dGJlS0FHcVozTktz?= =?utf-8?B?K3J3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ZXUkphYll5?= =?utf-8?B?SDF4SHIram92eDFtYVJsS08zSThVY29EWDIrd2JqRHJFWURNcTMxb3lkT2VV?= =?utf-8?Q?KflOezd4DdN8hIVfLTIWoaI=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: cc217a7e-9e61-425b-8f4f-08d9ec7eee8b 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:20:16.4449 (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: DlkidYzWrJVK8/7xfi34/BsfIJDegH/L2jYOwiNU6JtgV2SttCQibpDsKZmR+VwBWKv2F/aG0gDGddcQezlYoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1477 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: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.