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 84CE745DB6; Wed, 27 Nov 2024 12:07:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 578894021E; Wed, 27 Nov 2024 12:07:26 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by mails.dpdk.org (Postfix) with ESMTP id F20CB400D6 for ; Wed, 27 Nov 2024 12:07:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732705645; x=1764241645; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=4XVVV4QLvgE+5/hMN9GD/rnaxMtdEVDmEFPlbaP+9mw=; b=n8MtSM5dhrWVeGMzQK9Qc08+/EAFr8axOuDUAy5K4QMJJTMIL96vZ71e QJSMxYHUFOf95qdAyJ8v7SFn2HOmtlmhZcRm3IoxQuQUdP1+VdPyGzaJ0 dQynbYNxaiBIVyuS1cuXgJM5YvruAl6/+zAB2jSzUMCBZHrPrJrBwaiIf txfw0uMmYkIKhavABN+uYTwx2k62tCzWnlTPZlitaANwrskud7C8lztx/ eQkKGIlOOhxW+zQ+CzShlZ9IzCCFgSzL3TLwCaUjNiT6VP6ezgkMmAWv5 sY/paYeTk3peOr1bjmR4V0zKnQudWpMuNS9zaDeIyPNOZ12imDnRBv+Gx g==; X-CSE-ConnectionGUID: nw2A7VG8T/6tqyEDtbG2Aw== X-CSE-MsgGUID: ohjsA0hJSKyTdTuI9Mqf3w== X-IronPort-AV: E=McAfee;i="6700,10204,11268"; a="32654778" X-IronPort-AV: E=Sophos;i="6.12,189,1728975600"; d="scan'208";a="32654778" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2024 03:07:23 -0800 X-CSE-ConnectionGUID: qXa43R1ITjS/d25odNeOLw== X-CSE-MsgGUID: BTzAeoWETPGZW2lnYL7XFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,189,1728975600"; d="scan'208";a="91532714" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa006.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 27 Nov 2024 03:07:22 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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.2507.39; Wed, 27 Nov 2024 03:07:22 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.2507.39 via Frontend Transport; Wed, 27 Nov 2024 03:07:22 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.174) 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.2507.39; Wed, 27 Nov 2024 03:07:21 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Y1F3XoctqzCczQAtflUvhkkB3WAk2unzxrBb3ABYuNJ8Rx9Oc/GzoKJ+drvWuewhLf87hca5gsdcJ4x+eE6EBN2mH5i0YoIizSjZhri7jgCdXxwDcOIJeLpJKJoXSxstaXXmuKYzD6bP/VHAlC77y0cdPzy2e2H4XEoQuVq6clVcv7pA3dis/QiFWX+yxDb0pqbxmkSj2SdlEHwRVu0YY34VamWDPzZEIsmdSVsXvE98ESRevIfO0tnNS+TPSXAHZkJ3Bv+zoSYERnxjUZmAUmbJF0FhpmoKkX3DUjaY84uWmgzP3oiURLetttIjuv4HMP1a9/dP70dfyQWdeNxllQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=++UxHjwEzrYIEI5el01uradjFV2cdhrZ1LUl8+dTsM8=; b=TZ3LL0iAYDYssyqkcnZPmy1WkisxqLtwEmrbkc/V9WcF/SZPnme5LAcR3pkR4oeYQPcxnFdLdAIoPS03iLt9qnx7/g6tGlxJtUEerf+7AflglGJDPRu/V4YShv/RdAHiAa9e01ylDXwNd4WbyNmVjYq+f0JWAyTAD0l+tu0RDRSxm/FGIG0TaZSXIw67DYeQHuLoF0QFCHQXeD/yIKiNZ5a1mH+7zlIZc3YySo3B9UO7BjPtyVI9HyZsS/3H2TCM/ADcinyTOmMX8Ty5/zUbm6ukpzMza4gCPIT6jMrmM2bZzyBKnP8O5nBi7mbSnDsBNzS4LGvuvqy7L31aUnHkNQ== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by BL3PR11MB6482.namprd11.prod.outlook.com (2603:10b6:208:3bd::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.23; Wed, 27 Nov 2024 11:07:17 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%4]) with mapi id 15.20.8093.018; Wed, 27 Nov 2024 11:07:17 +0000 Date: Wed, 27 Nov 2024 11:07:11 +0000 From: Bruce Richardson To: Mattias =?iso-8859-1?Q?R=F6nnblom?= CC: "dev@dpdk.org" , Jerin Jacob Kollanukkaran , Daniel =?iso-8859-1?Q?=D6stman?= , Naga Harish K S V , , , , Mattias =?iso-8859-1?Q?R=F6nnblom?= Subject: Re: rte_event_eth_tx_adapter_enqueue() short enqueue Message-ID: References: <903aa783-5956-4020-b2a0-48def17fe03f@lysator.liu.se> <24837b70-29fd-472a-aa1d-ab350d6ba5c8@lysator.liu.se> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <24837b70-29fd-472a-aa1d-ab350d6ba5c8@lysator.liu.se> X-ClientProxiedBy: DB9PR05CA0001.eurprd05.prod.outlook.com (2603:10a6:10:1da::6) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|BL3PR11MB6482:EE_ X-MS-Office365-Filtering-Correlation-Id: 07b7d1c5-1626-4206-9a63-08dd0ed3a7c0 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?Q?lKwi6RKT8Yot3V5Z59RjCT5AqTWWAx//kKDqo/23jLH5+rSTWVTIMFSsTM?= =?iso-8859-1?Q?CIjNK7XcaqXiQKgQhxbqQPwlhmQsaznlfvDMX23gDM+seWSCg2f8kIg4vS?= =?iso-8859-1?Q?Nldv0bapocMdgZZi5chitQfPL5d08YnYW65BeCw2hf+APqVU8BtEM91H+K?= =?iso-8859-1?Q?LhHDDEEQm0VIkIbxSNrWQOeaGADNw4jqoP6dKx3pFor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M9q2qigzd3ZPhzf12nIVK3d4PKrHyNmGuRELgyPqYW7kOAX?= =?iso-8859-1?Q?LSNhbSHd6ZJocMHZRxQD4ddlEsHYmcONAus+37sfnXfdftwRfSYrY++XW8?= =?iso-8859-1?Q?2+jHcp0wAHhyaa2K+QNoltwGuqbyDRa8nTy+pkw5jhI3Zjx6AIPTKcW+3a?= =?iso-8859-1?Q?cRJ4ukI/CoQnZFi8Zq/Bb2lXxgfagEzfGR7l0cH331uJJDVQIrYH/A9llW?= =?iso-8859-1?Q?2cxF20y6UY/nBKDfkWD2uZCnPuXA9vRtBiJzXt2CP005J/ac/sn/+N00dp?= =?iso-8859-1?Q?xeLbjFoyby0iai4ZXIGB3rWUukjB2nZQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?JmGMXNFo5IB1OLfEy2HpZ41KvPsfRhM8/PcfBs6v2sst6uXnKEmNtW3MbB?= =?iso-8859-1?Q?VCF42cIIMOGDPZjXbG+CbH615yMUdkVgMTGcowGu36QFZ5YE3GvBNHyXaG?= =?iso-8859-1?Q?ZoISAodH2N55lfhiwMwC5n7w/uA3qDKvUIJVz4QeIuOfbeRcUyypM59fWk?= =?iso-8859-1?Q?lxSlXmRx3mskNVUOfvWyZ/ZliNIUSBllZzN5En9s8JA+s7sKjVlp02nuOw?= =?iso-8859-1?Q?7vKud/CtsAioh36F0bFSMbWHSknPL58+oTOU39wHg873+hmJ6jyMnViBSP?= =?iso-8859-1?Q?toxwM78UCj0Jt7dshpZ0OxUsyVFs12H005M2x6nwMkIguIgXDr8Dqkuii6?= =?iso-8859-1?Q?vTtvAU0DBrNBvLdO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859-1?Q?CK3fBKWGEvvBGl7UnIeAfD/4OXwtARmxsOeEkiYA5kFpODge0IaXIvhrxf?= =?iso-8859-1?Q?uulGNVfykow0UhwhlAqRPgI1HqNfVTeGpH9DdnRw7g7amZLU78ZZg46V9P?= =?iso-8859-1?Q?jHe00xCp01/HfViO78/L08UcXCpdJWjgmhnzVAvUkC0Nk6+MP5r0KuxBeN?= =?iso-8859-1?Q?mnptRTPdaDwNi/bhJsjHPcfXb5SUshSiSWHKZDa20wax5SUBr2hxc9vqDS?= =?iso-8859-1?Q?67TCAlW+S2/yGM5yTet1OqjO0XwW48HD3V5S+JbKO6QnPSGa9M2qUiUyfX?= =?iso-8859-1?Q?zpcdZx9V6ZCsWdUFSl8LLy834P/K5GBBQ02gzwTIejPHqCa2sS6UCkPxg2?= =?iso-8859-1?Q?pGEu26hKS5dIcfLYwIL6mb2lZOh7gdeCdw6GAtBJkLeoKhdywcXrDtPw?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 07b7d1c5-1626-4206-9a63-08dd0ed3a7c0 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2024 11:07:17.3094 (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: HahARnKzfltjOXenXf/GSmJEe1PQNGL/Fd42suSfCtWGaUXjeSwSH7HihgpJzZzt2fQGpHH9EtqMNCtmmruzjlcII6YpxRNi4roPww5AaP0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB6482 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 Wed, Nov 27, 2024 at 11:53:50AM +0100, Mattias Rönnblom wrote: > On 2024-11-27 11:38, Bruce Richardson wrote: > > On Wed, Nov 27, 2024 at 11:03:31AM +0100, Mattias Rönnblom wrote: > > > Hi. > > > > > > Consider the following situation: > > > > > > An application does > > > > > > rte_event_eth_tx_adapter_enqueue() > > > > > > and due to back-pressure or some other reason not all events/packets could > > > be enqueued, and a count lower than the nb_events input parameter is > > > returned. > > > > > > The API says that "/../ the remaining events at the end of ev[] are not > > > consumed and the caller has to take care of them /../". > > > > > > May an event device rearrange the ev array so that any enqueue failures are > > > put last in the ev array? > > > > > > In other words: does the "at the end of ev[]" mean "at the end of ev[] as > > > the call has completed", or is the event array supposed to be untouched, and > > > thus the same events are at the end both before and after the call. > > > > > > The ev array pointer is not const, so from that perspective it may be > > > modified. > > > > > > This situation may occur for example the bonding driver is used under the > > > hood. The bonding driver does this kind of rearrangements on the ethdev > > > level. > > > > > > > Interesting question. I tend to think that we should not proclude this > > reordering, as it should allow e.g an eventdev which is short on space to > > selectively enqueue only the high priority events. > > > > Allowing reordering may be a little surprising to the user. At least it > would be for me. > > Other eventdev APIs enqueue do not allow this kind of reordering (with > const-marked arrays). > That is a good point. I forgot that the events are directly passed to the enqueue functions rather than being passed as pointers, which could then be reordered without modifying the underlying events. > That said, I lean toward agreeing with you, since it will solve the ethdev > tx_burst() mapping issue mentioned. > If enabling this solves a real problem, then let's allow it, despite the inconsistency in the APIs. Again, though, we need to to call this out in the docs very prominently to avoid surprises. Alternatively, do we want to add a separate API that explicitly allows reordering, and update the existing API to have a const value parameter? For drivers that don't implement the reordering they can just not provide the reordering function and the non-reorder version can be used transparently instead. /Bruce