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 7051745B0C; Fri, 11 Oct 2024 05:01:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14F89402EF; Fri, 11 Oct 2024 05:01:00 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2134.outbound.protection.outlook.com [40.107.94.134]) by mails.dpdk.org (Postfix) with ESMTP id 38A25402E1 for ; Fri, 11 Oct 2024 05:00:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=s58kh8AzW1k0P1GEcXk3ZO2nTOPbbbdk9dNr2PLdxvaxuhjV1wrAkgAfe0NVlsnqjqkrPAbqStisttoh7MmhKUHJ6zXhQQKay91CpQGyhJ+yDbXiUviQ9cGYCEf8nZRZP6iUlhlLG++EQQZlapoHGvPpUSYTjwD/pjJNiRF2IOWThqxzLFVpn2E7jPUJ/Gh6nyWFcJyTiFEmwt5KmnvhxAooGEUwrLiTLrvvMKPp1sU8KkTJ29UdOgIZMCYcsM1Rta8CxSj2V/7mSs0FWZXZC0PH4cZ+362nvJyhKU3HSQYDmgOmTU515VO56a4+5v9uTfOrliGNfVKR9wqQfOFqWg== 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=TWUhZ8Pebt8HRhcDiRvf3biWkAKPyWMzrlMAFmAoSQU=; b=U0vJgUbcAh+Z1su/362AmRVFtgLG0ZBWw0zTevOTn+BK7MG8LzdJI/62OusGwgo0tQ0zB6ox5RcdvGRccN9YqxmHFWY1FUCFj1/6bgJ9K8uq4KQzMCWUIboCxDFopoO0jfzf9dgIZvOaG+S0VYq1/Rooxueb0Axf7mZ1TVfSr3xaaLM62NxynhfIDKtWDfJtLo5n1lAw069JdoIQGTAnh4GhcbhRNK35m1zTlsBqvF1nElu6/DxplhlCPDam2fgq3oFQUYnrZrt124SIqUZHG0tYThZPIrgeoI8mHrQpVafxMEN0ah3Q9cByDn/zoJ3V4Euc4f36m6LKRUTj7aBdXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TWUhZ8Pebt8HRhcDiRvf3biWkAKPyWMzrlMAFmAoSQU=; b=tlsPh5KnYoRxlvNkmAXxbvgZYRhcaqb4beog4qZLTuG3/sY252Mv1Qh7PLpDm7wyA7W9KPdRtAJB3ruvIceh/+HDoHg2cVlXM9VJogUzvCp2ENSRSCWaaJq/AuaK5yiL77lUKNhAf5hGhy2PuAuIb6E5uhbuZVFebvY+p+DvBRw= Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by DM6PR13MB3642.namprd13.prod.outlook.com (2603:10b6:5:24b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.18; Fri, 11 Oct 2024 03:00:54 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%5]) with mapi id 15.20.8026.020; Fri, 11 Oct 2024 03:00:53 +0000 From: Chaoyong He To: Stephen Hemminger CC: "dev@dpdk.org" , oss-drivers , Long Wu , Nole Zhang Subject: RE: [PATCH 2/2] net/bonding: add command to set dedicated queue size Thread-Topic: [PATCH 2/2] net/bonding: add command to set dedicated queue size Thread-Index: AQHaxdrRh0jHI0KXH0aofpfW+MRtH7KA9GeAgACTWgA= Date: Fri, 11 Oct 2024 03:00:53 +0000 Message-ID: References: <20240624020355.3712965-1-chaoyong.he@corigine.com> <20240624020355.3712965-3-chaoyong.he@corigine.com> <20241010111307.559d432e@hermes.local> In-Reply-To: <20241010111307.559d432e@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR13MB5545:EE_|DM6PR13MB3642:EE_ x-ms-office365-filtering-correlation-id: e3b1c0cc-d27b-4c2c-c2f6-08dce9a0ebc3 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|1800799024|376014|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?PmQKjNrAKwqp5ka+lOB+cRynrJW7lmFJsaMbC6Ju2QxaRDigee+8WVIa1dye?= =?us-ascii?Q?fwwzDa7Y1m892GmjGzGGkYxOlJ5n0iVqWZQ09/W2oFiWl0kklVH3EAu4OH7R?= =?us-ascii?Q?M7oIINdSX5rCPRBL9HEkmgHP/Azccm9e+VtRactdXMM5lwVlogzy9q/CBsp/?= =?us-ascii?Q?loHj++GuW5W0xvf96X8SUzp9sMqw3IO1fVt2jOzk1Dzivsuk46uhfXTuV2PT?= =?us-ascii?Q?07b/U2/zDz9VCKanBi7cZoodCPm8gqi6Gh0JyL1iMMZ0egoC37jpGaOynHyj?= =?us-ascii?Q?PQ5MauZafMwS9bWHqXXSH0Lgs5wkySD+n2PtafEQGEDyQ45NnfL3mJPbivRN?= =?us-ascii?Q?nC4gQZBDr//o4QJm1lsqGFv8AJCWwLY3YGhrWKUK2DfUmUYWGhlj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S+84+7C0j10Gtf6Km+8ieq8NwrWEmxiz9jyRtaLjIGRL?= =?us-ascii?Q?W6w/3GIgQCytokv+WyPBIad3cIlIAyvOpNwrEKnTyQz8uQ=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?uCJs4GoLan9VgGx78xgTIco4ZQQf1kkpwzz8BMpbOk+6C7Nq0grfsD3RlVyP?= =?us-ascii?Q?QJCXdV4nxyeb1wJxNT7iZdD+SKofMsgx5NdnHeVin6hIAD/+Da1cScX6OC8f?= =?us-ascii?Q?ka/Qmm7YSE2XSTzC6Dfus9cvGeLl+26iNa/Nnbh1fPe324x1txxeStsADgQR?= =?us-ascii?Q?LxtjjCTNAF9z26t3zT4j5USp3tac/+EN69+LIareh4XFuwrxDS0URdbAB4lV?= =?us-ascii?Q?8TwEahYVFQZ3TK52yp2Na4JYtWG07Qn7rl5mRjMguM+xzBXmrZKWDM5Tbsfe?= =?us-ascii?Q?r+1NAfr/rgbWBp38BSXAxzpYaoBp/Bn+uR5nIf3e+wHHc0JTmBHsK3x4oHyl?= =?us-ascii?Q?ntemT5zpbCQQEpZFheZpl3wRLw3ISbgzTUJbCN9KuTqwlGXHAL+Bhk/G+Zmy?= =?us-ascii?Q?czwZ8k8kfZgp4mBBGLFUB71waS3zn/R9q0OEpEddbkxJYXO1XRnktxmY4u6I?= =?us-ascii?Q?N1Ln4mEjwu9EmP6+AzLY/g1gOA0g9/dHXjTn4J7TAUzdMQCOL/1+bscKz85B?= =?us-ascii?Q?dbyqj3QCu53FBxt/8270/DdqTi4gd/rpll0laEDgblnOgLG5Oz1L6qTH3L7l?= =?us-ascii?Q?IyIBOa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?us-ascii?Q?R2RpLtOOiLw4tmB+1w07miAWsUTm01T2X0CTDMhHReGrcseUvLfJPU+lgxB8?= =?us-ascii?Q?RCZGKwGPLsSBfxx4Wy6PxYPPI26tjXV4U9jrYKUY?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3b1c0cc-d27b-4c2c-c2f6-08dce9a0ebc3 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2024 03:00:53.9131 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: f0HAymjnTOHrC7dkhIvxiu7/gLcbZshchK8zuyrMYukOgCxB0+bro2NmnSy5NvoQfbZsmsHTP97g8UsYZkr0+43P4o0stMfvHNTLmHr8hbk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB3642 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 Mon, 24 Jun 2024 10:03:55 +0800 > Chaoyong He wrote: >=20 > > diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c > b/drivers/net/bonding/rte_eth_bond_8023ad.c > > index 06c21ebe6d..c19645aa4f 100644 > > --- a/drivers/net/bonding/rte_eth_bond_8023ad.c > > +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c > > @@ -1254,6 +1254,8 @@ bond_mode_8023ad_conf_assign(struct > mode8023ad_private *mode4, > > mode4->dedicated_queues.enabled =3D 0; > > mode4->dedicated_queues.rx_qid =3D UINT16_MAX; > > mode4->dedicated_queues.tx_qid =3D UINT16_MAX; > > + mode4->dedicated_queues.rx_queue_size =3D > SLOW_RX_QUEUE_HW_DEFAULT_SIZE; > > + mode4->dedicated_queues.tx_queue_size =3D > SLOW_TX_QUEUE_HW_DEFAULT_SIZE; > > } > > > > void > > @@ -1753,3 +1755,40 @@ > rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port) > > > > return retval; > > } > > + > > +int > > +rte_eth_bond_8023ad_dedicated_queue_size_set(uint16_t port, > > + uint16_t queue_size, > > + char *queue_type) >=20 > Should be const char * for queue type >=20 > > +{ > > + struct rte_eth_dev *dev; > > + struct bond_dev_private *internals; > > + > > + if (valid_bonding_port_id(port) !=3D 0) { > > + RTE_BOND_LOG(ERR, "The bonding port id is invalid"); > > + return -EINVAL; > > + } > > + > > + dev =3D &rte_eth_devices[port]; > > + > > + /* Device must be stopped to set up slow queue */ > > + if (dev->data->dev_started !=3D 0) { > > + RTE_BOND_LOG(ERR, "Please stop the bonding port"); > > + return -EINVAL; > > + } > > + > > + internals =3D dev->data->dev_private; > > + if (internals->mode4.dedicated_queues.enabled =3D=3D 0) { > > + RTE_BOND_LOG(ERR, "Please enable dedicated queue"); > > + return -EINVAL; > > + } > > + > > + if (strcmp(queue_type, "rxq") =3D=3D 0) > > + internals->mode4.dedicated_queues.rx_queue_size =3D > queue_size; > > + else if (strcmp(queue_type, "txq") =3D=3D 0) > > + internals->mode4.dedicated_queues.tx_queue_size =3D > queue_size; > > + else > > + return -EINVAL; >=20 > Add error message like: > RTE_BOND_LOG(ERR, "Unknown queue type %s", > queue_type); Okay, will add in next version patch. >=20 > > + > > + return 0; > > +}