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 1BF20A00C5; Wed, 2 Feb 2022 15:05:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C11040E03; Wed, 2 Feb 2022 15:05:58 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 4C90B40141 for ; Wed, 2 Feb 2022 15:05:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643810756; x=1675346756; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=nilhQqFmpus5kFoSeBvesv0sz9uodIrex9u/sGjyaPI=; b=hNyDykJmbXXFTY0KMzPGXwM3SBSX90VejFxxk1a+R84wxQ5zadfxYwCo R6M0SH5J8R1rWY56eyZTU7g/NZc6Xo3fO1J5Vg6He3eESCpmShE7pKgC7 qYHZIYixITH+M8YS2RFT7yJoIOJSyaynrvF5L1Kyq7ENAwgtZhRgC8fGn SrWpf403fFTN9ptXr/Qpm7whu6Y29g0uBtyRCh7oWqeTo5gcg05cUDDwj eXQ2z9d4L7ZQNjY8JGceflFqHu8vUuxH8ks+Zoi2T0s4mLUkdoudnZJAy CFLZYreVMdtfVFUrv8W8SUsfmJq5Lg5JpnfIpJUIl83dPy70K8kS0Wt2c Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10245"; a="334279369" X-IronPort-AV: E=Sophos;i="5.88,337,1635231600"; d="scan'208";a="334279369" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2022 06:05:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,337,1635231600"; d="scan'208";a="630928500" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga004.jf.intel.com with ESMTP; 02 Feb 2022 06:05:47 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 2 Feb 2022 06:05:47 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 2 Feb 2022 06:05:47 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 2 Feb 2022 06:05:47 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) 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.2308.20; Wed, 2 Feb 2022 06:05:46 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G/EIxyrF9FM4NlbSMrS0jnubSiqOM/f8UQhV/SUosYdP8Xpe5U2nJmBvf+6HFIiKOXX0HAT0v0EimW+tMzfilYgJI/QbZyChDL9MmKgF2XN6irqDpJmWhUydgAtVmYsdeWZyZUcxZkU/FjXjZStMi8RTbd84Mgwa4IlofpLGmixjAtU7YxspLe3BvCBugQsVbhz9MEB5gZ7qr+FRyV72BawpZ+EhR0V1tdW+LaZ/QaX3W6i8PtoJW9p+nqhI6/jzPuU0F5brVq/4+YlogPsZkXFAD/1vauZ00X2/Av5TsZFgm8Zbd0x6dczH3blQt831pe1gCjOnadm5yZEYIRZJ3w== 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=lZGTmHdAeDGYydpLmynTn8jK3roLKQxLiB8RlNAY8Po=; b=mMUVNbaqxhaIQU3zU2dg7QfT0SkksuQw4IjkpcRcOW0JbumNCaYg7BLw+KRYbSHnjI+QLMSXOCDLSVgTsa2h2fI7qSmJG+j83qe8IczMyfqKSqP7HEr9u3+g9Be4B72LIf8k2Q0S/NWqavMeX45G2C07hWPWn/n61KDthRd1QW3CTOqz0s8bbmJWkWVZpXiF+CfaOsxH4ToWWCaDFoPLf4waUSwhqOJJzeqaRZzWOtB9iwD09YpuousN2vAMzsHhi9Y084angQcSKeo0jQsUrPhQsCQmF5k8wUyfmO6kBcreMuOhlymY2gNq1dZPvTg6RTkEPvzblLj6Ef/uOAC97Q== 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 SA2PR11MB5164.namprd11.prod.outlook.com (2603:10b6:806:f9::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Wed, 2 Feb 2022 14:05:45 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e%7]) with mapi id 15.20.4951.012; Wed, 2 Feb 2022 14:05:45 +0000 Message-ID: Date: Wed, 2 Feb 2022 14:05:39 +0000 Content-Language: en-US To: Akhil Goyal , "dev@dpdk.org" , "thomas@monjalon.net" , "andrew.rybchenko@oktetlabs.ru" CC: Anoob Joseph , "matan@nvidia.com" , "konstantin.ananyev@intel.com" , "rosen.xu@intel.com" , Jerin Jacob Kollanukkaran , "stephen@networkplumber.org" , "mdr@ashroe.eu" References: <20220120162627.4155695-1-gakhil@marvell.com> <20220130175935.1947730-1-gakhil@marvell.com> <20220130175935.1947730-2-gakhil@marvell.com> From: Ferruh Yigit Subject: Re: [EXT] Re: [PATCH v3 1/4] ethdev: introduce IP reassembly offload X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO3P123CA0009.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:ba::14) 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: 18582050-c5d1-4945-41c4-08d9e6551b2b X-MS-TrafficTypeDiagnostic: SA2PR11MB5164:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AhLa1e0c3lEoBu5PHt2asY9Z/GqPZryaB5QNfWhvy8sY+MTY2eHuNEIDI9Tk/UbIBiShXxxlUqKhoV6zL36egzLw2u4LZ3t1MV/CKWmaadWMEPkNPec9EOZb6f4ZR0+GVcbiY1pbkSzBRxhGwRFtAMp+dHt4WQqPWKnIEGbd3B55bC9AyXMLiWe6iTbPHpNz8hCTeBTRDpdIERYSVfyy+2BHDM7IDbPrqEa2by9XuqMVsZamB9oX+FsENFnfvo5RXDTaKA37bzza2DGD/Yf+fMwyGa4vWgMg3v7Ji3F5Z2jSC1kTxuA/612wAOBqqHNdb4JqeqLst4YCyoImOknBEk3Y0Jsl201C9OFVkuH0VjwD/lccW+a2m35iTtfQIge6hkIdiHINODl7HDs8Vp2sWlRTCWy2Td07O/kdmErwfBLuj3SQo02OPMSUilQM/dTaJ8tODQz/KecS4RsF1JG025BoOFXzYfucHQv8anwrK3erfx3pqY0qymhnxiL2HVoo7C6mmud88KNBEJ71RlhLOMVMcAHvs/to0Kli5hNDVAGpchvxPxxtkC20QSv663M8ccDko/aApjvW/hsJi16idJA2mG+Bdt5tOAYH3FogO7llOySVYvOirCvqzmb4T6GcrLn6/jISS0aEqbKfUs6WJPfDqocY2RQ843eB0YV1tm3drlQO5wBE+nKXyf5WUSBfEdjXY7o0386tbX68TvwytbuFK3SCwh3lfao8lWGYFNE= 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)(26005)(82960400001)(5660300002)(186003)(2906002)(31686004)(36756003)(44832011)(86362001)(6486002)(8936002)(8676002)(53546011)(4326008)(31696002)(66476007)(66556008)(66946007)(6666004)(110136005)(508600001)(55236004)(6512007)(316002)(38100700002)(54906003)(2616005)(6506007)(21314003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dWlnakhYeGtwVHN0ellCUENuVE9FTzMwbVdCbzBRbEVtWkEvbzM3dFhISVVr?= =?utf-8?B?M3dTTEVzVDZvaDVHdndOSVc0UndwdlVjRXZMRlByY3V5a3ZKb2txTHk4MzNI?= =?utf-8?B?U1ExaXQrOHUyWlBFSHJaM1VJTTMwZWlCOXRQZm9ERVplRWgyeHE4YUYwTlAy?= =?utf-8?B?TnptK0J1WGsxQkFyTHpaRmFZZUZuMDVKcGNyanFUYi93Nm5SWi90dHVUMmpw?= =?utf-8?B?Zlp6VEhzYnk0ZGROcFNSYmU0M0sySmJncGtSL0tvU2RJW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BIdy9ZWGFZamVycXF4K1laYWVLUHhkbWw3OUJKZmo5?= =?utf-8?B?aERpQi95VE5zZG1vWnFWY1A4K0phZjJMdXJpMlVKZU4yRStxM1RCNUU1KzhH?= =?utf-8?Q?YUE9r3tDEL/I0FEgFDHZX2s=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 18582050-c5d1-4945-41c4-08d9e6551b2b X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2022 14:05:45.4407 (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: 700nESIWc9z3O5GEkh5dGJDn3fuwVXtZzRzOYLZCF/Ilv0py9mVyaC7ZPCiz0+GPpFsjIe4xegghhaXNX4bq8A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5164 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/2/2022 10:57 AM, Akhil Goyal wrote: >>> +/* 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)) >>> +/** >>> + * A structure used to get/set IP reassembly configuration. >>> + * >>> + * If RTE_ETH_RX_OFFLOAD_IP_REASSEMBLY flag is set in offloads field, >>> + * the PMD will attempt IP reassembly for the received packets as per >>> + * properties defined in this structure. >>> + */ >>> +struct rte_eth_ip_reass_params { >> >> As a generic comment, what do you think to use full 'reassembly' instead >> of 'reass' short version, to clarify/simplify the meaning? > > Full reassembly was used in most places. But here the struct name would be too big. > IMO, reass is good enough here. Though, no strong opinion. Will change if you insist. > Only it doesn't remind me 'reassembly' when I see 'reass', so I think not clear, we can wait for more comments from others. >> >>> + /** Maximum time in ms which PMD can wait for other fragments. */ >>> + uint32_t reass_timeout_ms; >>> + /** Maximum number of fragments that can be reassembled. */ >>> + uint16_t max_frags; >>> + /** >>> + * Flags to enable reassembly of packet types - >>> + * RTE_ETH_DEV_REASSEMBLY_F_xxx. >>> + */ >>> + uint16_t flags; >>> +}; >>> + >>> /** >>> * A structure used to retrieve the contextual information of >>> * an Ethernet device, such as the controlling driver of the >>> @@ -1841,8 +1865,10 @@ struct rte_eth_dev_info { >>> * embedded managed interconnect/switch. >>> */ >>> struct rte_eth_switch_info switch_info; >>> + /** IP reassembly offload capabilities that a device can support. */ >>> + struct rte_eth_ip_reass_params reass_capa; >>> >> >> "struct rte_eth_dev_info" & 'rte_eth_dev_info_get()' are very common, >> all applications that use net devices and even some internal APIs rely on >> this struct and API. >> It makes me uneasy to extend this struct with rarely used features, >> worrying on loading to much (capability/status/config) on single >> API/struct can cause an unmaintainable code by time. >> >> Also most of the time (if not always) offload flag is just an on/off flag >> to the PMD, application set/unset offload flag and PMD knows what to do. >> But for this case some capability variables, and a configuration API is >> required/involved. >> >> For considering above two cases, what do you think implement this as >> control plane APIs instead of offload flag? >> There are already 'conf_set()' and 'conf_get()' APIs introduced in coming >> patches, introducing an additional 'capability_get()' API removes the need >> of change in "struct rte_eth_dev_info" and >> 'RTE_ETH_RX_OFFLOAD_IP_REASSEMBLY' >> can be removed. >> Thomas, Andrew, what do you think? > > We are ok to add a new dev_op for capability_get() if we agree on that. > Thomas, Andrew, let me know if you think otherwise. > >> >> >>> - uint64_t reserved_64s[2]; /**< Reserved for future fields */ >>> + uint64_t reserved_64s[1]; /**< Reserved for future fields */ >>> void *reserved_ptrs[2]; /**< Reserved for future fields */ >>> }; >>> >