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 2785A45B42; Tue, 15 Oct 2024 17:31:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 173C2400D7; Tue, 15 Oct 2024 17:31:45 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id A22C8400D6 for ; Tue, 15 Oct 2024 17:31:43 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-71e5827d6a7so2237446b3a.3 for ; Tue, 15 Oct 2024 08:31:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729006303; x=1729611103; 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=bTvbmA/yHMuHqfzR6IHt6tVDN6Txtz/qhgAfAeGDMhE=; b=RItTtlbLAyLlf8dtaP7ofx80fT+x7TkB9lDRNEiMJJulcE4f+oZp0pbzD6wPL+cns2 rmam72cCCf4ffqABoA+d2Iu6nP5ujRtGR3jQnUgUK51R0NS3B4ArDwOjY8K2x06UycvD yt/Dij20S6iDdL/JUBeCB9DVPj03e843CsvAAZTbPYStfbzyXmjwmKDX2VHG3/VN4GB7 NWpN8fhfY9Lh29/uOsSu9XVhucORJFM6cD+H8gNeKuFVH3OtAych8iIVahY6q0SfjStW f/osRV5ItZNh89nk9kHnoUpHqQtLzIIt6dqmNSy7Q5CTc/9/89O4iwqVrR+kv6UOYwo4 cqBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729006303; x=1729611103; 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=bTvbmA/yHMuHqfzR6IHt6tVDN6Txtz/qhgAfAeGDMhE=; b=Sjpsc7Ff3AV8At/2aQSxChgb+SfhhICSmWSvGgcYDYChy6m3YA2yrUHDtZyFAVkyY1 PbDSw8q/cOeYSXjexInvP6+NB+3jNF7Nt/MwQiyushmAp0Uob00o4yYqZqcNxtWw2gtD fuywQJh7IwkVGBLklwhx7Hqn/eTAJ9c9/Oh3gt/YSq0a8kd/BU2sf0umWcYBlAuw8c5f tf5422SnfPGhHZxhpSn0vWPCzdNYy3BivQJeTfxF44uu70qCRuqShOL6Z7bzG5AnkrEb 0MKiqoHIVtCMUHhwZ+v6OKXwyK4Mu9j1k++AXoCjYTO4inCFpaKKy01yP8soZjfr3Lue flag== X-Gm-Message-State: AOJu0YyTCTPcw92QRjBiNx1gOX6G+Rl+Or/wgKPquJfAEKN3HT9Kekrk kjEA+xhODqJPGKolALk9ejDEuQqnlu7wPJf/Bv9lo5UbEp/mgsa5OaDCaiD4WDQ= X-Google-Smtp-Source: AGHT+IFnyoGZ5JJERRFLplBLsDPRfd6cpRmba+CzoqDUJfeYJVoV4qmvQpepBcYdOdF8+h2Nra16gw== X-Received: by 2002:aa7:93bc:0:b0:71e:5b0e:a5e4 with SMTP id d2e1a72fcca58-71e5b0ea793mr10609402b3a.27.1729006302794; Tue, 15 Oct 2024 08:31:42 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71e774c3795sm1436567b3a.144.2024.10.15.08.31.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 08:31:42 -0700 (PDT) Date: Tue, 15 Oct 2024 08:31:40 -0700 From: Stephen Hemminger To: Howard Wang Cc: , Subject: Re: [PATCH v1 12/18] net/r8169: implement Tx path Message-ID: <20241015083140.73bb2541@hermes.local> In-Reply-To: <20241015030928.70642-13-howard_wang@realsil.com.cn> References: <20241015030928.70642-1-howard_wang@realsil.com.cn> <20241015030928.70642-13-howard_wang@realsil.com.cn> 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 Tue, 15 Oct 2024 11:09:22 +0800 Howard Wang wrote: > +rtl_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, > + uint16_t nb_tx_desc, unsigned int socket_id, > + const struct rte_eth_txconf *tx_conf) > +{ > + struct rtl_tx_queue *txq; > + const struct rte_memzone *mz; > + struct rtl_adapter *adapter = RTL_DEV_PRIVATE(dev); > + struct rtl_hw *hw = &adapter->hw; > + u32 size; > + > + PMD_INIT_FUNC_TRACE(); > + > + if (nb_tx_desc < RTL_MIN_TX_DESC || nb_tx_desc > RTL_MAX_TX_DESC) { > + PMD_INIT_LOG(ERR, "r8169: Number of Tx descriptors must be " > + "less than or equal to %d " > + "greater than or equal to %d\n", RTL_MAX_TX_DESC, > + RTL_MIN_TX_DESC); > + return -EINVAL; > + } > + Check in driver is redundant, if you set tx_desc_lim properly. Already checked in ethdev. if (nb_tx_desc > dev_info.tx_desc_lim.nb_max || nb_tx_desc < dev_info.tx_desc_lim.nb_min || nb_tx_desc % dev_info.tx_desc_lim.nb_align != 0) { RTE_ETHDEV_LOG_LINE(ERR, "Invalid value for nb_tx_desc(=%hu), should be: <= %hu, >= %hu, and a product of %hu", nb_tx_desc, dev_info.tx_desc_lim.nb_max, dev_info.tx_desc_lim.nb_min, dev_info.tx_desc_lim.nb_align); return -EINVAL; }