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 4423445EC3; Mon, 16 Dec 2024 20:13:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56BC1402D1; Mon, 16 Dec 2024 20:13:38 +0100 (CET) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mails.dpdk.org (Postfix) with ESMTP id 120DC40144 for ; Mon, 16 Dec 2024 20:13:36 +0100 (CET) Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-215770613dbso30177725ad.2 for ; Mon, 16 Dec 2024 11:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734376415; x=1734981215; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=waZdoGMxXUywXyIC8/Y6obZUK389IcdYsMCW7f8EDtA=; b=Qd1xv5uYZh08xykyAINAIixFboH16qmi3kWIb6X25Y85KML5Q4Etekexm0bg/nM4tp JVe4E8Aht+MRWRwycHvUGgr556IAKC7nu+Ar/bqA4isByOb6M+DTqgbdBYEyOeD5RqmD jO4GuZ36qA24EgPkLGCPu2BJEvI/mjjsw1SmwRrGvcycqSmJC4YHdkqWe5V0Ivf7XXig rD3cP7WKWgXpjhf9kG6WVcnAu5wG9juaHJFAYTiUOZUloYlC60TNp21pyt5YXT1llCMT a6oA64m7/K/o3Deay9pwnbUUFEnTK5G0C6WSxLLagqxjvrQAIYd1wx8XjRE/JgrmIoo4 0dSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734376415; x=1734981215; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=waZdoGMxXUywXyIC8/Y6obZUK389IcdYsMCW7f8EDtA=; b=mqyWT40+j2yqQ87ouKbxLQSmxPOTjoA0mT5KUU2ja2+t09IWZtib6Zg4+ymJ+NbbJr i2ziJA0cFMji6OddXHbdV2bpqfoIElXaWSNvbUdsuDOj4p1WFXOryzhjSR9EJ6tYKBiN SVKYMCR+xPYfMwOLdhjEwzxkc0z1B8m9aM7U6zPtv+TmiJ33M8EDxls9gzOMFma+P3WD UYGrhX9SlOjupbvbK/OrJegdIWcli7o0oajBj1bVXBYL4pkQ/60I7XO+LOZnG3vwjY+6 XCuN+MsUkjWwSinHocSA3mswtPlXs15pI7ah5eUnBL6LL8owpUv1pIaYEBG4e5lOVmCG nRRg== X-Gm-Message-State: AOJu0Yz0sdWAOVNpvSDS220ezWAW9ZvGOeaCuDX5DyHc+IWasYAtWJxn z41+xryjvyfSg4qZtwqnZjFL3U6Uy8/OJKhEvwm/RfWgGmNBH9YsHY1EQk6oJMtNaSrQ3dKzGH2 lP74= X-Gm-Gg: ASbGncvpAQ7WtpOos/R+KffOW+1PbPXBcvMy9CuoZ6HZgbGYik9IYrUh5XTHAM2/EWR pj4ByPdL5o/h/VckoTZThOhiMQNOKUACW+xPpeRBIqYWXruMOjSHiwcOAzszEHzekaHWXn4JJTE 4R2gtmhryPQDRH8Aokykx/lMcAcZt3PH7yrgWHRZdJyLtdrOXC1XZ79zhDMzrMPlzM/3fu6c0MR rlrTevIvkH/eJIQ2DTYH+Kn12WB7A6MyFMOfwBirOGda6iCHLAP3yUfs0m3/2Frr11X0ROKtlHS XZL7tvUlI/3E2qStz56NarZo3iuy6jtOGQ== X-Google-Smtp-Source: AGHT+IHNOnp3t7jd/b+E0rJ0b3Bqlq8cAnZExB/hs4eqIP9qEtf873unanguWVdHlrqcqgSsaC50DQ== X-Received: by 2002:a17:902:d543:b0:216:2426:767f with SMTP id d9443c01a7336-21892a41d41mr210923275ad.49.1734376414937; Mon, 16 Dec 2024 11:13:34 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-218a1e6c6d2sm46413865ad.255.2024.12.16.11.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 11:13:34 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Andrew Rybchenko , Thomas Monjalon , Ferruh Yigit Subject: [PATCH v3 1/6] ethdev: check that device supports deferred start Date: Mon, 16 Dec 2024 11:11:33 -0800 Message-ID: <20241216191323.75753-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241216191323.75753-1-stephen@networkplumber.org> References: <20241213214929.817688-1-stephen@networkplumber.org> <20241216191323.75753-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The check for supporting deferred start should be handled at the ethdev level for all devices. Signed-off-by: Stephen Hemminger Acked-by: Andrew Rybchenko --- lib/ethdev/rte_ethdev.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index 6413c54e3b..7678fa47b6 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -2264,6 +2264,14 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, if (rx_conf != NULL) rx_offloads |= rx_conf->offloads; + /* Deferred start requires that device supports queue start */ + if (rx_conf != NULL && rx_conf->rx_deferred_start && + *dev->dev_ops->rx_queue_start == NULL) { + RTE_ETHDEV_LOG_LINE(ERR, + "Deferred start requested, but driver does not support queue start"); + return -ENOTSUP; + } + /* Ensure that we have one and only one source of Rx buffers */ if ((mp != NULL) + (rx_conf != NULL && rx_conf->rx_nseg > 0) + @@ -2575,6 +2583,14 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id, return -EINVAL; } + /* Deferred start requires that device supports queue start */ + if (tx_conf != NULL && tx_conf->tx_deferred_start && + *dev->dev_ops->tx_queue_start == NULL) { + RTE_ETHDEV_LOG_LINE(ERR, + "Deferred start requested, but driver does not support queue start"); + return -ENOTSUP; + } + ret = rte_eth_dev_info_get(port_id, &dev_info); if (ret != 0) return ret; -- 2.45.2