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 4BCF445EA2; Sat, 14 Dec 2024 19:09:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 065184028C; Sat, 14 Dec 2024 19:08:58 +0100 (CET) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id 2265B4025D for ; Sat, 14 Dec 2024 19:08:55 +0100 (CET) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-21675fd60feso30505115ad.2 for ; Sat, 14 Dec 2024 10:08:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734199734; x=1734804534; 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=nfsTAFh7bJnm1Uz1sNdEnklHYL9CIfLp9l3T2wVifyJQAM1UpeOcNnU8ojIProtVpD Xs15GR1uK8iH3vHGGU9s1Gn/VxnaRYLFAm63+xKROu1OEKwq0fpLWfGU0kccVDrHCCrM zhEO5U/TvMCFd2VqtZd3NgD9ABWNNuyqwxiG8bsGBAUMEOep1SRwBsLaCcark6qkpl9l F1kulADoUpmcVDPVl27cVsUAoK72UKXxdHvz5+dKFKvkT/yx4F7DqN8k/mFADBsPmNFj PS4ux9alIymIr+MRDnfdQ+WS+odk9EXRPRXtpy+OkjtLOJv3UXt/Ec98vv5eQwbTm9hW f1/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734199734; x=1734804534; 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=T0FtFMWrFK1jg5AWfmSQoxCtBVMr6lNcOFNXIES5780kAsiQdA8pH2K6yHvJhDt41o ayIf7Gx+FLp9BeeRj3hxGvB5MBT7IThcM36+wLird+J3HRUTv9b4dP8TfnZ5VNILeU5R 6bUkFUFvjNUm9eq3K5lRGOnn5Lde1qAC/0qxmbPpxUWSEA/C0JCsfGodh2WpDezt+5Aa 4ER1TKsDbpawqJc2HUmNP0+H8j5h3cAliYZHifmy3/8NCV1OLI/vv90UMvKnMXer1BXr wIMxutIuawJBBjUbaUur5gkJ2CbN6qBPdSme3E3/fpfsM9tXdEl8YG3Rns2UIOdsux6Y H3/g== X-Gm-Message-State: AOJu0Yy41b5GTc9tEwKukT3fd752fy2oRATKL2GUM1VlOszSrU72uSMK RQAFpRBb893RyL8Q4BaYgmMwYNZTLsJoc3IFRqrQ2UvLFIxLv0uWMOJdqQVSIrbTeWWWzq1HUzs s X-Gm-Gg: ASbGncsfKvzscLjaGer8Ut7nJUIuRuUw5xoJ+hZCAbbdHOhxjITvwHOYjiwcjlzXFDs 3Ou3WRWNVtmAR6w2nk51zfIwcklaERDF3HXvi4IbUn/IVBJ8rh1S3kRWDGz+kNRllod9d0zoRSI 130DVH1NmylFBIz4nmA8h6as7H3jCC5OHKfInS4y7h7NuP+nyReLIA2Yfg9tdQvlda22fQRn/Wi Vs/jByQd+7qHLY+BHf0x3hNyqbcXRTE2SQqRPg4/4fGDduxK9M4WKGj3kDYLbkSKRdAGgpsP+wm TydNA3ajYxy7WptCiWMrjZJl2V0XBzTByQ== X-Google-Smtp-Source: AGHT+IGryWdemReTO4aSU8RDzxWwRDWU5sB5baC34WOvfVSoupz1cVsYWcqpyiR7deap2ZIfCLNrxg== X-Received: by 2002:a17:902:d2c5:b0:216:3297:92a4 with SMTP id d9443c01a7336-21892a76f80mr97443785ad.46.1734199734228; Sat, 14 Dec 2024 10:08:54 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-218a1db755dsm15341355ad.42.2024.12.14.10.08.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Dec 2024 10:08:53 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Subject: [PATCH v2 1/5] ethdev: check that device supports deferred start Date: Sat, 14 Dec 2024 10:07:32 -0800 Message-ID: <20241214180843.6662-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241214180843.6662-1-stephen@networkplumber.org> References: <20241213214929.817688-1-stephen@networkplumber.org> <20241214180843.6662-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