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 0D4B6430D1; Tue, 22 Aug 2023 16:02:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A77C34021D; Tue, 22 Aug 2023 16:02:48 +0200 (CEST) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 569B240041 for ; Tue, 22 Aug 2023 16:02:47 +0200 (CEST) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-26f7f71b9a7so1039973a91.0 for ; Tue, 22 Aug 2023 07:02:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692712966; x=1693317766; 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=VpF3p8iM8SMm7droFocleaBMzdPJH77Kbb2Dn7BFE9U=; b=cravRgDHeh9JKhcjaAeDcDVGRXm397OnHlZM7DYgUhokx6J/eGXFdBK18c+dGvsnZw TXosWSDrry5ZCj90ydItMQLt4syblTXluK7nRvagNo8InDyRUoc1QI6M60mADAlmxEr6 t8bf1fTygvUQ9EXy6jK57YFmlAiLKv/Xzq26R3FBZv7ew9VSacVS+Xsk0FIce/CgwYUH kLFThrgjblXKj/uuckMQxaC8kQ+ftWjl7bOQ00t6Vhw2u+U9gW4D3qh2uogHHgpZpwem r5lPMkmCwnGBwSq6L0WE9F6P8b0//TPvplFlIN5aRX8iB3YAJ8oBTQT7crqFziOH4CWy LKXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692712966; x=1693317766; 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=VpF3p8iM8SMm7droFocleaBMzdPJH77Kbb2Dn7BFE9U=; b=dUdVFyUmkRJu1Qv1bNmdGx/d4MTbZ5+kmTFTTrqGigs/HzGCGToNbGNH9qKUGWgeTW yDwL8gG1MycGZZCvOEM3ywVW/eLSvFQz49gD0vxdbEPc5AFm7fPMxMy5eNC7lFsjIZNj gHdoGbHP9gpiDQfNybaXCh8kxtjfyEQg+gnHUCLz0ISyKWnqg48TcUApMhImqNYcfMoj ZYeLa9jF1rV/SicoWp0rRshQ1MwO4Crg5RQ3kGwv3Ng+59fer+Tt2YjqBCsbs2mXVaGg 6VWiDoys0rOwngcTFmWfsuVP/NyAHMyTB/wpNn3gqdzqljz5hY30dxKQZZAI+V6X3OXX ECaA== X-Gm-Message-State: AOJu0YyZbmboXyPt/bTrGpA30Xm60PO1CO/R96dYuv56h8UbVwYc05ux kacJlXzwm1XVlW5ugz+GZgwdxA== X-Google-Smtp-Source: AGHT+IFEdLD5qg8oaBbH3c1vkHiIYJf9Tr49X6VzURlmTRrshVxH/bwckmBw8J3kwyUJOElu8AXVwA== X-Received: by 2002:a17:90b:1997:b0:268:13c4:b800 with SMTP id mv23-20020a17090b199700b0026813c4b800mr8668637pjb.21.1692712965994; Tue, 22 Aug 2023 07:02:45 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id z15-20020a17090a014f00b0026d214a2b33sm10113927pje.7.2023.08.22.07.02.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 07:02:45 -0700 (PDT) Date: Tue, 22 Aug 2023 07:02:43 -0700 From: Stephen Hemminger To: Feifei Wang Cc: Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , dev@dpdk.org, nd@arm.com, Honnappa Nagarahalli , Ruifeng Wang , Morten =?UTF-8?B?QnLDuHJ1cA==?= Subject: Re: [PATCH v11 1/4] ethdev: add API for mbufs recycle mode Message-ID: <20230822070243.6f70e41c@hermes.local> In-Reply-To: <20230822072710.1945027-2-feifei.wang2@arm.com> References: <20220420081650.2043183-1-feifei.wang2@arm.com> <20230822072710.1945027-1-feifei.wang2@arm.com> <20230822072710.1945027-2-feifei.wang2@arm.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 Tue, 22 Aug 2023 15:27:07 +0800 Feifei Wang wrote: > + if (queue_id >= dev->data->nb_rx_queues) { > + RTE_ETHDEV_LOG(ERR, "Invalid Rx queue_id=%u\n", queue_id); > + return -EINVAL; > + } > + > + if (dev->data->rx_queues == NULL || > + dev->data->rx_queues[queue_id] == NULL) { > + RTE_ETHDEV_LOG(ERR, > + "Rx queue %"PRIu16" of device with port_id=%" > + PRIu16" has not been setup\n", > + queue_id, port_id); > + return -EINVAL; > + } This could be changed to something like: ret = eth_dev_validate_rx_queue(dev, queue_id); if (unlikely(ret != 0)) return ret;