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 AE54345E94; Fri, 13 Dec 2024 22:49:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F2CEE40E20; Fri, 13 Dec 2024 22:49:43 +0100 (CET) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mails.dpdk.org (Postfix) with ESMTP id 53DCC400D5 for ; Fri, 13 Dec 2024 22:49:42 +0100 (CET) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-7fd2ff40782so2021474a12.2 for ; Fri, 13 Dec 2024 13:49:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734126581; x=1734731381; 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=NwucLz4BNrpWzEGpOfB2xMpLchuQr3u0m5PiDMxv690=; b=zl7A6MLPgHTj2x54EnRatvaNlW04lGVy4bwKsvhyiZVjsBsKYI31sFRyADh6XyK14X NsLgVifTkkYoquSFzO4PAsvvUjpMrD6rVCdK/SittBZPYBL6HlR4KuUUYJWJjNhhT1xz HyvhXqU2LpznAfQbwUWCeo0r1iduGn8NMXJnp+/RvjiRFRTpJvxwIx3x7b3xEjU8D5f8 d989l138qyI0Qpq3T0gfNhBtHpOhBF4DyqdI4vPyQMI/QBTa85dPVnnGJ8wcpH9MkVGW gwRSEzdn5nWsty+/tJnEWmjtuFDRnVm4l1NRAj+EW/ANQRK5ZAhVuvoAoM9ReKjX5p/P B/mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734126581; x=1734731381; 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=NwucLz4BNrpWzEGpOfB2xMpLchuQr3u0m5PiDMxv690=; b=RmcN6OFArad9wIUtT42EZbjVH3+jDnd+EcuUOz8RntgWOF3fX029Vf87wBt5qc656O mEPhm6E182eCKbiK+vIvBJ6LkjSKXuLDgwJhrnw6YrcIVdH4sZSAtO7q+MGGhNGiAe3o WnSvKLrtiKZmUwrm4ipQxZOGGhr9V3Q5JskHyUIxjkq4DRhQZSFhvsFYJh9PL4Qa5EAp aw76zC2U656/97YEoqfjl/ImYx9l0dVxuDYYlKclaRcy3HwKF7tqbvndGS6SRO2ck0NS hT02ObbfENo/1LzZBcWMwJgSR3RgTn71yQwlxwQxjORKmH1bsjNVWzd2O9XrlxNAUsb8 Q+dw== X-Gm-Message-State: AOJu0Yzgrs5ezM/uzVz1LAMqRldaam5RF8EfYIQUgUcr5e3ePsLrAWzQ WM3dC+Dz42T/6Jn9ectUlfdHD5f06074dbc3eAn26GxZNsg8osDzYDkQXPZPW0PpmzMRdA7ZnNF S X-Gm-Gg: ASbGnctHtRWha8lACXrqz+TUq0jDApPsCIi8tOhriAbz+s+hOp4pxFPwMVDor6n+Dj9 L10M5yRsQGxKQNAdunQn0l1VPIYQBJG4/V1p+jJOWmRVPwO3jc7shfo3ldhFBFxG40KWT93lyxj nd+XwJouR9wmdV6/PkY4o129zao4jIGgJL0sU/qso9LuiAxMFc+JulHne5yjz/k9oJGlXJb52Uh X3zLgzqpJXZ+VXuTHpmfGAPuhyGNIXmoJOYwWIKljmhH15FUjpj05hCCQcvWOSqa+aGqxEfZaUa ZLeft22t44jPevipNnEF6Q0u6HTHQNIB3A== X-Google-Smtp-Source: AGHT+IHWzsTAK8lB7f2ojwUxfCxF3LOcKjEyQg0bghBvcTwkbHPtd8lZjyjLophRAAzh4LxbeYSMEw== X-Received: by 2002:a17:90b:3c0a:b0:2ee:c9b6:c266 with SMTP id 98e67ed59e1d1-2f28fb67310mr6354343a91.13.1734126581431; Fri, 13 Dec 2024 13:49:41 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f2a2434adesm282596a91.38.2024.12.13.13.49.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 13:49:40 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Subject: [PATCH 1/5] ethdev: check that device supports deferred start Date: Fri, 13 Dec 2024 13:48:14 -0800 Message-ID: <20241213214929.817688-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241213214929.817688-1-stephen@networkplumber.org> References: <20241213214929.817688-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 --- lib/ethdev/rte_ethdev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index 6413c54e3b..7768058f6d 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -2264,6 +2264,11 @@ 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) + 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 +2580,11 @@ 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) + return -ENOTSUP; + ret = rte_eth_dev_info_get(port_id, &dev_info); if (ret != 0) return ret; -- 2.45.2