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 6C43C45C95; Wed, 6 Nov 2024 14:28:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 356F5402C3; Wed, 6 Nov 2024 14:28:44 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mails.dpdk.org (Postfix) with ESMTP id 169E040265 for ; Wed, 6 Nov 2024 14:28:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730899723; x=1762435723; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=eYadv0f7aWfWs5NW+vLfEfR74yt8vaN5HlPQv2AokBU=; b=KzGe0VzD9BQZkSrn3T55SGGCu76wDMw+ff1kmc2+p7C1EDF8Usm8di5Y jNc2upzWv6pzilq+yv6DfsC1436XSuOOvLBnt1R+ppttVeVqllf197dZP LlwpEvlHFFqKwU3S2acCpH1C5XlKibKxx0mydeqeVnBbwnZqvbR2GMmwa KNPQnB51winRjaTPdfxGIu6yzP23NhuMwb9P3ycujmaSpRCUYiiVTAXAL 7kIqXSQF9UKfEYDvFta2DHEwP5EA7nObi1SIRQt4Vj6g9IrCvBW3D02SO mqgOxZjYCFCmy05CioeAjJ27iLoxcTItinj3BB/q9iG54O1ed81Q8C98L w==; X-CSE-ConnectionGUID: TLGnM9i3Qx6lm2v5Dkz1pw== X-CSE-MsgGUID: aqWSUMHSQsKrpgf+ucodTw== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="41245804" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="41245804" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2024 05:28:41 -0800 X-CSE-ConnectionGUID: 47h54Qb1S1uhn1NhSuozcg== X-CSE-MsgGUID: XIYm1+WvRFuiBj9HmbcZMQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,262,1725346800"; d="scan'208";a="84639809" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa008.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Nov 2024 05:28:40 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) 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.2507.39; Wed, 6 Nov 2024 05:28:39 -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.2507.39 via Frontend Transport; Wed, 6 Nov 2024 05:28:39 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.45) 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.2507.39; Wed, 6 Nov 2024 05:28:39 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lo21i8Ya1gwlTHt6cYSOsuuCmYNYY7zZqmid/DFXMjKHcYjBX0SU6pOAYL0hrNM6HfNQ+cx36YH0SLhBjvulY24c2dLqTpvfbFUoTmA4vMtzni34kh01Czeyi2Ot/g41mQPzrCxVg0idMTkybXrSvWrdcyMUoo0EatZQgQS/EIrayB47cwXwiV5NL1fWqUutelK4Dgq+xQmc394Tpi21P47Sjf3s3D5geSBuXAQFRB6VqZL04bjMq4L5pHFgPqz1efdGddIbqETK1priu2U+5Um/jSyQEv2Xvascjdbo6RLERRgBh4BqBk3CxbEicanssgOJdW7WJBK2p/QLU/iZQg== 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=P7z2JL37Za6leL7stcMq7GiDaNJOgV6Ks/NklBBPmnk=; b=BbbSo3XjU6Hm6M17TZ0JhzF1jpCQWa+o2buSfDReH5Vrxfcs5FPKbL3Q1vorrfhhIuaSCJ1Ytd6mgBX281qI5QPwbFN6LGRitXRhCNh5yMDHDqDQUfxDt2KRzimv4pjUNI46fbieRee6gnW0KGWQ9xZUwoRHHYVs5g6e6I7vXdEXhUbvrPxlooxbZ6A8FTwEbcKEl8usORCdEwmQdBajkFDs62scqCwYQKONo2qxdvKShlxEPJfDkvb40H7QvGBXevULwxCd22PSFSwpY4cr/5TA8ZTlmTfxA4vHfQ+S+UCa30Bkn7ofF5mDWlOaaeI9n/7EwrmOa4il+oRzdHQjNg== 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 DM4PR11MB5293.namprd11.prod.outlook.com (2603:10b6:5:390::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.19; Wed, 6 Nov 2024 13:28:37 +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, 6 Nov 2024 13:28:37 +0000 Date: Wed, 6 Nov 2024 13:28:31 +0000 From: Bruce Richardson To: Morten =?iso-8859-1?Q?Br=F8rup?= CC: , Tyler Retzlaff , "Thomas Monjalon" , Ferruh Yigit , "Andrew Rybchenko" , Ajit Khaparde , Somnath Kotur , Gaetan Rivet , Jie Hai , Long Li , Wei Hu Subject: Re: [PATCH 2/2] drivers/net: support single queue per port Message-ID: References: <20241025115223.1230680-1-mb@smartsharesystems.com> <20241025115223.1230680-3-mb@smartsharesystems.com> <98CBD80474FA8B44BF855DF32C47DC35E9F88A@smartserver.smartshare.dk> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F88A@smartserver.smartshare.dk> X-ClientProxiedBy: DUZPR01CA0272.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b9::12) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DM4PR11MB5293:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b60ccc3-dc3a-4c72-0580-08dcfe66eb9c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|7416014|1800799024; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?Q?VeziVhVlNDPvZ/ezs2RgMDF6Fv/N8BQpH3VIXjsFfFe3GTafsZl7PznChB?= =?iso-8859-1?Q?L3UR5Akwuf7cwCKevVyxdeCpVxM5dT4rXBov9WqomR63tepg0MF3B2UreJ?= =?iso-8859-1?Q?mrUOdelt/4AlWRwiQ5aCyq8d224N/H7K1pra8Rvnrte8X8xgd11kwtbrVl?= =?iso-8859-1?Q?O8uMyyBb0LXbcIPB4RnBnhFIUYbSM5p8PMPNjC3A1IbmA62s9sH0Boj5d1?= =?iso-8859-1?Q?VRaBex2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I+uoNt0IYoPxXM/TVh3J?= =?iso-8859-1?Q?dOzGm6qWlB0RZgTyb7VkslE3kOG7EUv8n3SFPXDxle/oV6oME8R7XiekFv?= =?iso-8859-1?Q?dB/2+frGoqilj7DiO0O/GPZcXewhFws5EXTSEbnbuB/qNtSwgLO46oOdDq?= =?iso-8859-1?Q?YBpdZnha/VvSBkoZUm+q3CjH/Ngrb1VmX1unnJasPcDKIjvreB/TOkRjb2?= =?iso-8859-1?Q?QfTDG5iUfUzHLQx8X9SLaCoRboLCHJUxorwxXBH7nl+QAyHN0034qN2HcD?= =?iso-8859-1?Q?2b9cngI9Tk?= 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)(366016)(376014)(7416014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?Qb3vqeLm7v90WEYYAMqpNObEWYnk2mngX5MuA7J4RDpeg9w0jTcO0N76T4?= =?iso-8859-1?Q?5rLrIESA77d2jCr+K7Mf/a4Jq3kK3xSJFMzUv5ffvsqpL01Mv5I9j4NlfD?= =?iso-8859-1?Q?BHGKc5tqoWWNh+MBsi14OZlmXmUDnwr82Fp1RhvIb32aw2enuF8ZLW5r34?= =?iso-8859-1?Q?X0B6PQg7nTnS/MjB7ekAZGUGAHpGlQ2+/4KxLdrX1ks33KOIZ+8Xe5Mja4?= =?iso-8859-1?Q?ip3Tzro+e4C6jafHEg5UGUaT+hOoXcRGVaWFHh/4YOqI1fI/DDR4HJcmDs?= =?iso-8859-1?Q?gd5t1emXAQYBn1X/OTqztOWoUjt30/okKbdE7V0uDAMyVk49jdkJTChkbR?= =?iso-8859-1?Q?aKp391rfSnDp2A0qtY/AU832wtRbOgCb/N5kc/Etou7lcGdwhUI9WnDa5g?=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KUpM15zQzPdVd9gCCYAeRcc8ymWcV1?= =?iso-8859-1?Q?M0S1SVk5KkJPT70+en1iq+v4bVGulcl1tRnJ32Up72g92B/eJr1RVyVbA+?= =?iso-8859-1?Q?EE7UshygwToguz1s5GIL1e0F9TNPJvtcEqtiC9BELkOkvZxjoq+Y83xcKx?= =?iso-8859-1?Q?Gaf7OlWKY+85aWQUIXCt8lGchX+eDPh8ELlj8kddB0+21Mkhu9cgHNfmoX?= =?iso-8859-1?Q?Clpqpj+e/7B9hRTx0Tepw2DR/y1LarbpPg1OQ5/2vwPJVFX1+juCIQoO7J?= =?iso-8859-1?Q?p5twHf7QDg6R2QQL0wIHzjsJJEeWWRYnNTsUKDJn1wt9TZP1Tm/ZtvaOcn?= =?iso-8859-1?Q?lHxOrt6ktjQIR0IlC4OU50kGYk58nkED1n9cGYjfGdAeAABdc4Ufxg3w?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 7b60ccc3-dc3a-4c72-0580-08dcfe66eb9c X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2024 13:28:37.4057 (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: Dh6IkMBBLlWZ04Co/U/ZLewMOHRW6W8EIMlNYT/TE8f5x3yzPCA2D0BhlIwHSK/eOUxMtCLdZbB/7KTj6IU+0zU04Kq6huUdjZFaMs2iHnw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5293 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 06, 2024 at 01:19:40PM +0100, Morten Brørup wrote: > > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > > Sent: Wednesday, 6 November 2024 12.52 > > > > On Fri, Oct 25, 2024 at 11:52:23AM +0000, Morten Brørup wrote: > > > When configuring DPDK for one queue per port > > > (#define RTE_MAX_QUEUES_PER_PORT 1), compilation of some network > > drivers > > > fails with e.g.: > > > > > > ../drivers/net/bnxt/bnxt_rxq.c: In function 'bnxt_rx_queue_stop': > > > ../drivers/net/bnxt/bnxt_rxq.c:587:34: error: array subscript 1 is > > above array bounds of 'uint8_t[1]' {aka 'unsigned char[1]'} [- > > Werror=array-bounds=] > > > 587 | dev->data->rx_queue_state[q_id] = > > RTE_ETH_QUEUE_STATE_STOPPED; > > > | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ > > > In file included from ../drivers/net/bnxt/bnxt.h:16, > > > from ../drivers/net/bnxt/bnxt_rxq.c:10: > > > ../lib/ethdev/ethdev_driver.h:168:17: note: while referencing > > 'rx_queue_state' > > > 168 | uint8_t rx_queue_state[RTE_MAX_QUEUES_PER_PORT]; > > > | ^~~~~~~~~~~~~~ > > > > > > To fix this, a hint is added to the network drivers where a compiler > > in > > > the CI has been seen to emit the above error when DPDK is configured > > for > > > one queue per port, but we know that the error cannot occur. > > > > > > Signed-off-by: Morten Brørup > > > --- > > > drivers/net/bnxt/bnxt_ethdev.c | 2 ++ > > > drivers/net/bnxt/bnxt_rxq.c | 1 + > > > drivers/net/e1000/igb_rxtx.c | 2 ++ > > > drivers/net/failsafe/failsafe_ops.c | 10 ++++++++-- > > > drivers/net/hns3/hns3_rxtx.c | 2 ++ > > > drivers/net/mana/tx.c | 1 + > > > 6 files changed, 16 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/net/bnxt/bnxt_ethdev.c > > b/drivers/net/bnxt/bnxt_ethdev.c > > > index 1f7c0d77d5..136e308437 100644 > > > --- a/drivers/net/bnxt/bnxt_ethdev.c > > > +++ b/drivers/net/bnxt/bnxt_ethdev.c > > > @@ -910,6 +910,7 @@ static int bnxt_start_nic(struct bnxt *bp) > > > struct bnxt_rx_queue *rxq = bp->rx_queues[j]; > > > > > > if (!rxq->rx_deferred_start) { > > > + __rte_assume(j < RTE_MAX_QUEUES_PER_PORT); > > > bp->eth_dev->data->rx_queue_state[j] = > > > RTE_ETH_QUEUE_STATE_STARTED; > > > rxq->rx_started = true; > > > @@ -930,6 +931,7 @@ static int bnxt_start_nic(struct bnxt *bp) > > > struct bnxt_tx_queue *txq = bp->tx_queues[j]; > > > > > > if (!txq->tx_deferred_start) { > > > + __rte_assume(j < RTE_MAX_QUEUES_PER_PORT); > > > bp->eth_dev->data->tx_queue_state[j] = > > > RTE_ETH_QUEUE_STATE_STARTED; > > > txq->tx_started = true; > > > diff --git a/drivers/net/bnxt/bnxt_rxq.c > > b/drivers/net/bnxt/bnxt_rxq.c > > > index 1c25c57ca6..1651c26545 100644 > > > --- a/drivers/net/bnxt/bnxt_rxq.c > > > +++ b/drivers/net/bnxt/bnxt_rxq.c > > > @@ -584,6 +584,7 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, > > uint16_t rx_queue_id) > > > return -EINVAL; > > > } > > > > > > + __rte_assume(q_id < RTE_MAX_QUEUES_PER_PORT); > > > dev->data->rx_queue_state[q_id] = RTE_ETH_QUEUE_STATE_STOPPED; > > > rxq->rx_started = false; > > > PMD_DRV_LOG_LINE(DEBUG, "Rx queue stopped"); > > > diff --git a/drivers/net/e1000/igb_rxtx.c > > b/drivers/net/e1000/igb_rxtx.c > > > index d61eaad2de..4276bb6d31 100644 > > > --- a/drivers/net/e1000/igb_rxtx.c > > > +++ b/drivers/net/e1000/igb_rxtx.c > > > @@ -1868,6 +1868,7 @@ igb_dev_clear_queues(struct rte_eth_dev *dev) > > > struct igb_rx_queue *rxq; > > > > > > for (i = 0; i < dev->data->nb_tx_queues; i++) { > > > + __rte_assume(i < RTE_MAX_QUEUES_PER_PORT); > > > txq = dev->data->tx_queues[i]; > > > if (txq != NULL) { > > > igb_tx_queue_release_mbufs(txq); > > > @@ -1877,6 +1878,7 @@ igb_dev_clear_queues(struct rte_eth_dev *dev) > > > } > > > > > > for (i = 0; i < dev->data->nb_rx_queues; i++) { > > > + __rte_assume(i < RTE_MAX_QUEUES_PER_PORT); > > > rxq = dev->data->rx_queues[i]; > > > if (rxq != NULL) { > > > igb_rx_queue_release_mbufs(rxq); > > > > For e1000, this is fine. > > > > Acked-by: Bruce Richardson > > > > BTW: is this the only/best way to put in the assumption? If it were me, > > I'd > > look to put before the loop the underlying assumption that > > (dev->data->nb_XX_queues < RTE_MAX_QUEUES_PER_PORT), rather than > > putting > > the assumption on "i". > > I would also prefer putting it outside the loop, but it doesn't work in cases where the variable is potentially modified inside the loop. And here's the problem with that: Passing it as a parameter to a logging macro makes the compiler think it is "potentially modified". > That's pretty unfortunate. Thanks for explaining. My ack stands. /Bruce