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 18168430E6; Thu, 24 Aug 2023 05:17:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2EBFF40EE1; Thu, 24 Aug 2023 05:17:00 +0200 (CEST) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2084.outbound.protection.outlook.com [40.107.105.84]) by mails.dpdk.org (Postfix) with ESMTP id C338640C35 for ; Thu, 24 Aug 2023 05:16:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ex3EqhaRXHaXGV2JF9ojYb0vnMsl45sDaa1oBWRHQN5Fn1DSG5Z5B1p7qyDJ1oEe4j3dj7DUq+/i+7Fqv7qRgfvSS24QHXdZKlReFoWdO8Q3SaC9S+8igG0QA8QGVlFRlexSL5glc//EyHyp8GxKmLnooSvTAaum3ktnoODE4RmsNKucM8L9I8xs8uxKF59Vp/X77FTnWeC05rpyhFoX0Nw9h6v7WnwrXkNXOTEgJpsmcbfCUZT1ijs9vsDWmXJ4EAbb2bwparlVSdxJ9xe5ZhUZhOiHtEiP7vxdjEC0Okj6Zv4k8+GO8mvKIxrYRNANXP+NvRFOJ7yKp0xjXorSYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7U1MIbOEzkqpbu7AnKJ6JwKQjAJ4cn8Fp9Yz9B0QZnQ=; b=SiCFIm7D3obvSYwAmVjBz1TMgoJyKguFJr6SafmKq264f7Gae+eXyTpJ7+hVcb15H6SXGvJ67LjfdQwktIfH9grpYXWfWri6Hh7ogsJ8CBXdQHidbcDFz7QEqzNYqLBpSLb5yO5S53q3yA1tq0RiynK1w4v3szg9Dpu78u1p95Uv3KiBQNxq4MNrodrkXTpaD1sfQJ3+sxLjJiyYRfgPsxbvCE1sktUcOfOUjzlF/mDta6SUFV2OWW5zApDOuA7nFMtgz1ggOPqG12RsgYWNnFtt/jgXqkYhVdzVHkIeAuJIKtI+qSgbwfKHoZTi46NQXR6Ei5MQYQPXLquK6ERkzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7U1MIbOEzkqpbu7AnKJ6JwKQjAJ4cn8Fp9Yz9B0QZnQ=; b=vTepKe75bvisd1qomk8yjmj0bNGaT9XM9CVWMWEzTrOjcYLTYWKj4Nxvqfzepj3vgOSYUn7rwne4VtGu4Q5vxOrExaxupn5vlEg4X6QCzO+NnNhh1zeVOLH9E5h7WK+0dNa1Bc5RN3Uopktm5UN0IADhPgJrMyPLVHTCndyj0i4= Received: from AS8PR08MB7718.eurprd08.prod.outlook.com (2603:10a6:20b:50a::22) by AS2PR08MB9497.eurprd08.prod.outlook.com (2603:10a6:20b:60f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.24; Thu, 24 Aug 2023 03:16:57 +0000 Received: from AS8PR08MB7718.eurprd08.prod.outlook.com ([fe80::70e8:2daa:5a39:dc50]) by AS8PR08MB7718.eurprd08.prod.outlook.com ([fe80::70e8:2daa:5a39:dc50%4]) with mapi id 15.20.6699.027; Thu, 24 Aug 2023 03:16:57 +0000 From: Feifei Wang To: Stephen Hemminger CC: "thomas@monjalon.net" , Ferruh Yigit , Andrew Rybchenko , "dev@dpdk.org" , nd , Honnappa Nagarahalli , Ruifeng Wang , =?iso-8859-1?Q?Morten_Br=F8rup?= , nd Subject: RE: [PATCH v11 1/4] ethdev: add API for mbufs recycle mode Thread-Topic: [PATCH v11 1/4] ethdev: add API for mbufs recycle mode Thread-Index: AQHZ1MoeeL/Z8xZ6IU6IpI9ubJXzt6/2WQ+AgAJwDBA= Date: Thu, 24 Aug 2023 03:16:56 +0000 Message-ID: References: <20220420081650.2043183-1-feifei.wang2@arm.com> <20230822072710.1945027-1-feifei.wang2@arm.com> <20230822072710.1945027-2-feifei.wang2@arm.com> <20230822070243.6f70e41c@hermes.local> In-Reply-To: <20230822070243.6f70e41c@hermes.local> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 59EFAA35FF583D49984EFE4A4968D483.0 x-checkrecipientchecked: true authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AS8PR08MB7718:EE_|AS2PR08MB9497:EE_ x-ms-office365-filtering-correlation-id: e79e2c5c-4190-4111-9caa-08dba450929d x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: true x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Xb0KnSM4Vw6So3Xd6KvaHbKrK7U6h98f48MPQ8T/3hBqh9l3xu+Md1m0Go8nMb/ff0U+vJypkiCCb+4Q6vikGyNr/lY0z19wppg9UD6lST9EK32NOTMtXTHKaVysDUN3fEPSl6W/N0yVUMTl5tlcq/yyLjCWK7O/a+BOKwTYI8eavPslqKzgnVwr4PJqhhl/eMciDnjCQxBtBTELstUfQFMbvFomlWynLAteSBploQle6BMcP0/bXI/u1p7S5RPmMXS4T8yIyuYvcAhfaEzUqMv1nnPOU48Dne4ZBVScM6Ljy14fd1yTMORg2HOa3SQDLqYQ+p+pxmbSsEYEepZ5D+BFOI2OjH++o+xH4CMxEpZux2px1FGk5GAdetbOUlAnSRZEzgXiJjfIlNo7erWX29EYyhT3c3XmcL8DzHeONfuBtf5KAYINK4O7KUWbqOmD4mOg4amkcyck65PKNgzmTj3Xz/PfA8+4G4hHtVrl6xSMoCpzMd0O2038onjv4x4oYmIOyIQ8Fs84d2l8VvBWh/IQ2osvYPNaUpWcZd/UP3coJ1VZqMQubP0l4phUaX2RIDFIK4tRzCDZ+HtrtGx4YLo1dwcdF4muqmPELH0TSPRhP7gMIFwXmbXfGVKD14RV x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB7718.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(39860400002)(136003)(346002)(366004)(376002)(1800799009)(186009)(451199024)(54906003)(76116006)(66476007)(6916009)(66446008)(66946007)(64756008)(9686003)(66556008)(316002)(8676002)(8936002)(4326008)(41300700001)(478600001)(55016003)(122000001)(71200400001)(38100700002)(53546011)(6506007)(38070700005)(83380400001)(66574015)(2906002)(7696005)(86362001)(5660300002)(52536014)(33656002)(26005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?fX8xDtKatVf9/3S4wUdZ2LMWPAWyaAE8x1Qi+f+W1ZnrsMxBfb/8JIQ1GN?= =?iso-8859-1?Q?OwHqVgd5QawIFpAPz+lLuoKcagc1D7zRLgRY+gXOdRE/JJ1SGtYSy6yCTG?= =?iso-8859-1?Q?vP2+surit+Rum/Ntue00ryG57CLf0OyCUiLVFHA7vbaHLVJdw2KQIePnVb?= =?iso-8859-1?Q?z3DnZKhXpcKQ6hwXPL2xi772/evytUHzG26nyBcZUTDNQ7IEIgpY3l6g1z?= =?iso-8859-1?Q?u4Tmwv4c50qV5jXjXxgbslXAMO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G28xG8KQA6HpeoHVWXyfbINa2hDQB7JnnBw3cRno/2nppTmN/WPv?= =?iso-8859-1?Q?/kWnF8Y5s+d8nXrDRPJFRG5yJMmeXNL2DrxGAjgqDD4BZaN2ZbralVUWlC?= =?iso-8859-1?Q?MqyDbVW7ZTVV0UuR/uBN/rdMNZlZArALkmPvcVqKRjptI5zRlhwvkFyxhm?= =?iso-8859-1?Q?NOShxAUpBDsPo6mt3rfHbC9PYLyArAATL+DQ2VDShY2OjXGqzwBWgmhHur?= =?iso-8859-1?Q?fk6H6j4NsKhAJsdOUIcSXd+MuxNrpSjEwzXskcZ4oTJmbttxCNLqk3qhym?= =?iso-8859-1?Q?ctJqIPiiVJLPqE1ohIC7rIyPTCILD5tl895/Y++xwcGZyKZarrPbAynZbW?= =?iso-8859-1?Q?VmLvGdypGU7TlSDu/Rc7E45RsnJL2zGvjJaEpCxg5BInEG8P2uxcHC3h5H?= =?iso-8859-1?Q?isc4kIamGhFbkKvV9xUYVckhadriUQh5FGPpEPYVEeahKq2pHeVu9E/S5Z?= =?iso-8859-1?Q?grl3v4Nlkp20iJw7GuqByYWJ8QofLvU8Oh?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AS8PR08MB7718.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e79e2c5c-4190-4111-9caa-08dba450929d X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Aug 2023 03:16:56.6964 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ehka5EUC3DCj9hWODpIqtm0IKCHJB6JTuJID2bVy7+OsAMr8zizNLJ2i3GUBS1FLbIUP9q1VGPiLEYS5k00BMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9497 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 > -----Original Message----- > From: Stephen Hemminger > Sent: Tuesday, August 22, 2023 10:03 PM > To: Feifei Wang > Cc: thomas@monjalon.net; Ferruh Yigit ; Andrew > Rybchenko ; dev@dpdk.org; nd > ; Honnappa Nagarahalli ; > Ruifeng Wang ; Morten Br=F8rup > > Subject: Re: [PATCH v11 1/4] ethdev: add API for mbufs recycle mode >=20 > On Tue, 22 Aug 2023 15:27:07 +0800 > Feifei Wang wrote: >=20 > > + if (queue_id >=3D dev->data->nb_rx_queues) { > > + RTE_ETHDEV_LOG(ERR, "Invalid Rx queue_id=3D%u\n", > queue_id); > > + return -EINVAL; > > + } > > + > > + if (dev->data->rx_queues =3D=3D NULL || > > + dev->data->rx_queues[queue_id] =3D=3D NULL) { > > + RTE_ETHDEV_LOG(ERR, > > + "Rx queue %"PRIu16" of device with port_id=3D%" > > + PRIu16" has not been setup\n", > > + queue_id, port_id); > > + return -EINVAL; > > + } >=20 > This could be changed to something like: >=20 > ret =3D eth_dev_validate_rx_queue(dev, queue_id); > if (unlikely(ret !=3D 0)) > return ret; >=20 Good comments, I just know there is an API to check these. Thanks. >=20 >=20