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 A0CF445B09; Thu, 10 Oct 2024 20:13:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6EF76402D7; Thu, 10 Oct 2024 20:13:11 +0200 (CEST) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mails.dpdk.org (Postfix) with ESMTP id 780C84025D for ; Thu, 10 Oct 2024 20:13:10 +0200 (CEST) Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-7e9f955cb97so690153a12.3 for ; Thu, 10 Oct 2024 11:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728583989; x=1729188789; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=q8D/NGvg3rdiUfW3rRS5HrZ0ZFVBfvXIWIn4EKOszj4=; b=a9LxMHyKqSb150unjxsO1v1kFmBc5oM7I0qxGCXxDrLXGK1fCHHURxw/ooDDRKdUO7 pl2+q7tECzu17jIehkFz41r+IHVIG6ReuQM0iWvImLFBuBivEL4lSrLX7+B4/9Um9VbB QI4bw0heNlGud7cEsEocUvoxR8H/egAnWgGNE1MO2IXUuoGkDaLK3IozZPkcgygWUDP3 aiaUfW9/mpALk/HziGWQg5Ct/BstULJ+4lqobv1VfSiSmoR2co/R8/xJxuOxr8GdcPSh 19OyQfA/u+oYLBIXr7m14CGUZpB1XndmbOS75Qgccjp3/TKLWifiA5mW/9qHvIoWCNgS awiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728583989; x=1729188789; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q8D/NGvg3rdiUfW3rRS5HrZ0ZFVBfvXIWIn4EKOszj4=; b=ww47jmJgrYGPOMSJSNMGaRbRuw+Df4p0lLmbrpFJkrC0OQYbwi67MX2jleEE4Nea9r dYT04xekeXOwEvzG+4ybQY0GXrEcoMd7nykrOpjVWYk3XYoox5jn5OSD0kUitkdgbo7y 5bc9c8kiaCbKowHVinbiUZ5/WRKfuRLB7m421mMpVZ57+Fv851wpTCTB8vbU8dAy3Xxq vyc8U4UZS9oYhNNHlJtCcpVpLDQcA99zotVG/K+94k8j0DgXFVzMH3TvV5eo3pa0W0dk EYPNLA7EIwEWWAMwSXbpFiSvkLHY+1R+ylHGv7H+ekbJye4ta1w48i3QABrSkhyawpu9 qUBQ== X-Gm-Message-State: AOJu0YzYcJFC9j59jTOXWPphatFc/UcLSXexZjhFKjfJltNjBT/Nwel8 r77/lfKB3dYDB5wnP8kvUZZE6kedYEFExK6Gs2zNZ/1o3FaWqV8gyeu/Ew5q/HY= X-Google-Smtp-Source: AGHT+IE9NfWRktrSXLIDTtzSxstHFGm9ieypnvMe5JHObR5K5wNqmbGXxmvzyE+tBHRk99vQ6FtLuQ== X-Received: by 2002:a17:90a:ca83:b0:2e2:a097:bb02 with SMTP id 98e67ed59e1d1-2e2f0a62d40mr76433a91.11.1728583989532; Thu, 10 Oct 2024 11:13:09 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e2d5df1ed0sm1658835a91.19.2024.10.10.11.13.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 11:13:09 -0700 (PDT) Date: Thu, 10 Oct 2024 11:13:07 -0700 From: Stephen Hemminger To: Chaoyong He Cc: dev@dpdk.org, oss-drivers@corigine.com, Long Wu , Peng Zhang Subject: Re: [PATCH 2/2] net/bonding: add command to set dedicated queue size Message-ID: <20241010111307.559d432e@hermes.local> In-Reply-To: <20240624020355.3712965-3-chaoyong.he@corigine.com> References: <20240624020355.3712965-1-chaoyong.he@corigine.com> <20240624020355.3712965-3-chaoyong.he@corigine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: > 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 = 0; > mode4->dedicated_queues.rx_qid = UINT16_MAX; > mode4->dedicated_queues.tx_qid = UINT16_MAX; > + mode4->dedicated_queues.rx_queue_size = SLOW_RX_QUEUE_HW_DEFAULT_SIZE; > + mode4->dedicated_queues.tx_queue_size = 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) Should be const char * for queue type > +{ > + struct rte_eth_dev *dev; > + struct bond_dev_private *internals; > + > + if (valid_bonding_port_id(port) != 0) { > + RTE_BOND_LOG(ERR, "The bonding port id is invalid"); > + return -EINVAL; > + } > + > + dev = &rte_eth_devices[port]; > + > + /* Device must be stopped to set up slow queue */ > + if (dev->data->dev_started != 0) { > + RTE_BOND_LOG(ERR, "Please stop the bonding port"); > + return -EINVAL; > + } > + > + internals = dev->data->dev_private; > + if (internals->mode4.dedicated_queues.enabled == 0) { > + RTE_BOND_LOG(ERR, "Please enable dedicated queue"); > + return -EINVAL; > + } > + > + if (strcmp(queue_type, "rxq") == 0) > + internals->mode4.dedicated_queues.rx_queue_size = queue_size; > + else if (strcmp(queue_type, "txq") == 0) > + internals->mode4.dedicated_queues.tx_queue_size = queue_size; > + else > + return -EINVAL; Add error message like: RTE_BOND_LOG(ERR, "Unknown queue type %s", queue_type); > + > + return 0; > +}