From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30357A04B9; Mon, 7 Sep 2020 10:28:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 86D511BE0C; Mon, 7 Sep 2020 10:28:40 +0200 (CEST) Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by dpdk.org (Postfix) with ESMTP id 996EE29AC for ; Mon, 7 Sep 2020 10:28:39 +0200 (CEST) Received: from hkpgpgate102.nvidia.com (Not Verified[10.18.92.9]) by nat-hk.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 07 Sep 2020 16:28:38 +0800 Received: from HKMAIL101.nvidia.com ([10.18.16.10]) by hkpgpgate102.nvidia.com (PGP Universal service); Mon, 07 Sep 2020 01:28:38 -0700 X-PGP-Universal: processed; by hkpgpgate102.nvidia.com on Mon, 07 Sep 2020 01:28:38 -0700 Received: from HKMAIL101.nvidia.com (10.18.16.10) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 7 Sep 2020 08:28:28 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.103) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Mon, 7 Sep 2020 08:28:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h8BHtDav0EWSMsAWQQvCoQ/Xc9O2he2/tyQy1mhPFw/wRa1O+RTvcjLlwnQxoXMC5jB6XNztSKFtwtdSU6vu3Jzbx5NZD6SvTECJAc7ld03COdqRftjT8IB+Df2qy3znFMPIStR7clPWcEB9Gawo6dJeGSCOu31ylgXsf17NI2XPhxIj9J/xC1O4vsMTCW/HA7u8uVsmP3ookkAAICo9lxvw825wkBhy7MPHl3FeAcbs9LPV/uyXrjN5C4jXOiwdWw4ObZVn+xPepFYRoL5FZxiQvWU0EP9343fki93j0+90Zu5XhonjjbkZDPvqxpc6PJSiwm+DRKFYCChySm4Z8g== 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-SenderADCheck; bh=lARXNqb+ez6H2OaeZcQPumZaTgunrzSJDFJEgBMuTXY=; b=lgCcg+/cvua0WIltEuWMzYJJYrXCErj5WDEx0AFazDeSXBd+e1lSlkp0XhETg/Xly+9IkCLkvSCxyo1YHkLPeRC4HF7iA+6EgwDCI1aN5lgGz8a06NYWklEEfkLNpkHxPmk+5f8sJ8nZWk2/mKGzhghl78sWsoZmWaQXdKtPwNgWBs+5qsljBHXwis2RVAUANVRUw7A94o/RANmBMcZjg9BVW2YU+hJ/uSP1hKYWtbyd13jJkHaCl5YUZrd30xw3LSBDXDowG5coSMoSnfGMqDomiAxFzB4CrP6u0kUxS3XbMVQZUSNku5ANKwlZjl31y3VuU42WtWQzf12aw94mTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from MW2PR12MB2492.namprd12.prod.outlook.com (2603:10b6:907:8::19) by MWHPR1201MB0112.namprd12.prod.outlook.com (2603:10b6:301:5a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15; Mon, 7 Sep 2020 08:28:25 +0000 Received: from MW2PR12MB2492.namprd12.prod.outlook.com ([fe80::693f:4ec4:caa9:ac9c]) by MW2PR12MB2492.namprd12.prod.outlook.com ([fe80::693f:4ec4:caa9:ac9c%5]) with mapi id 15.20.3348.019; Mon, 7 Sep 2020 08:28:25 +0000 From: Matan Azrad To: Chengchang Tang , "dev@dpdk.org" CC: "maryam.tahhan@intel.com" , "linuxarm@huawei.com" , "ferruh.yigit@intel.com" , "wenzhuo.lu@intel.com" , NBU-Contact-Thomas Monjalon , "arybchenko@solarflare.com" Thread-Topic: [dpdk-dev] [PATCH v3 1/4] ethdev: add a field for rxq info structure Thread-Index: AQHWfdRddMw/ykWHNkeaRKxv9sXGxqlT7AawgADRJ4CAADaIUIAAMMIAgAAB59CAAQacAIAFfPZAgAEwlgCAAAaVoA== Date: Mon, 7 Sep 2020 08:28:25 +0000 Message-ID: References: <1592483709-7076-1-git-send-email-tangchengchang@huawei.com> <1598685199-1630-1-git-send-email-tangchengchang@huawei.com> <1598685199-1630-2-git-send-email-tangchengchang@huawei.com> <1a4dc7d6-5596-34cb-9eb1-adcd2adef2fb@huawei.com> <66ecf741-ac5b-cf61-66f3-c5df59c1bd49@huawei.com> In-Reply-To: <66ecf741-ac5b-cf61-66f3-c5df59c1bd49@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [77.126.81.41] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d125b451-3a28-4b39-197d-08d85307fd9a x-ms-traffictypediagnostic: MWHPR1201MB0112: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1EwJXuZG/4NMYIxXDhYaXNVYS9csEamDbEPY0PvGFxMpMdpSeg2jlcmSFi5JXey0Zmvqj1Gfc6QdAJJnnmmoG6E+iiZ6lBaSPLIvfaP4dmthliQhyo9MUR/JpECxRnDVBLUx6UttawTMc/EEFjcv4C7/mE9R6+rpeaWCbcMtcsw34C/Zebkq0aaqLPd96tLQriaU6MRYxBTQfq3cTEUYbI1hp+zeY+073pVupppiHphwLm12oMd+RPyVLp0johzwx5b5uidxtsHUIeuzTUlXMhD2rv+AQnZLx5gFSchEayw8Z9VZe4MkCTCSUorAQdDzKFytM0gT0qqWTcZLdfpkQg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR12MB2492.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(366004)(136003)(39860400002)(346002)(33656002)(186003)(53546011)(7696005)(6506007)(8676002)(76116006)(5660300002)(478600001)(52536014)(8936002)(2906002)(66946007)(66446008)(64756008)(66556008)(66476007)(71200400001)(26005)(86362001)(110136005)(55016002)(4326008)(9686003)(83380400001)(316002)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: YbJix1tUZJUg8k5w1aMpOBEuwQPJBsomYtsiqXPHcLzuzXPlHDcpoMW5cp4w84Mm4eYidid/ycIc0WcxLM7sbhPCXBSAI4gfXMMpBnoPf5myd3rJpfmbL3UG/OcSkIJyWaEVT39Sej+g1N2W+AZ4lKwL0ocwQWDcp/0mNCAmTTHl1R3y62xu1SqA8+6lQXiJ2Ekz7plQpWW2nXl3QYDCB3ag7F9SsnMl5bktREzsS/P1Y/QUFGdX7FW4qxEI22o/0pPhsh2twJuSjx4qayYPC51T1O0JHCHJmeOWl3oXnzY3iYOzmSKES2k9sPSKYGymVaVaahRuxmQivrKuYJo3SPhqnKKTRXi8SbXzvlE/LXA4+2smuIgFcyyvkhOSN9PxjX1e+2SaT7Nx16QeuAoomWWebi6IRWQS6ZAflct9nVUgjrNKUfO/CeU1fAy5j8zWWyJmmXjylg+BG48DLW2tbUAbZAUF3ZJBY04CBKfcpN4icu2fg1D0seJ0yK5yYtLsZROXXWnQRk14/Vkl/dPq8TwsCBdHuwkHRdsMhZw0zcWsAW5cuB+BNenyQCt1QMw6LV+31UoZKNY3PyKwNggdr1Fcc+WMuTSJTZqJRGKWHUlNW+pAzLqNNlSt+Z0nU9+yiJd3cxpGdxGc7fewSFqbsA== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW2PR12MB2492.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d125b451-3a28-4b39-197d-08d85307fd9a X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2020 08:28:25.5787 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hTrhzYQ8Eq+jLgZQnj5e4Qw1495cBbK1VSC9fNfmIB9FqfkVqO4NAA4r2Koel3XWT2uqacNnpaPl9R12tEQ/sA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0112 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1599467318; bh=lARXNqb+ez6H2OaeZcQPumZaTgunrzSJDFJEgBMuTXY=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-microsoft-antispam-prvs:x-ms-oob-tlc-oobclassifiers: x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info:x-forefront-antispam-report: x-ms-exchange-antispam-messagedata:x-ms-exchange-transport-forked: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=Zqel0chKWRrvWp1YD61Zadqcz8l3P0k25lJw1lMmw7I9svd+VAyutpyLrtXVmi31R Mlvfc01WD/uNVKTpBBKQJNyJHtB8qtFKMUUkr015TuKDIpTl7QtGj0LeBwB1Hp4Rbq fezgFCoA+moTPbtNllU5QF5QKsksHEPs2LagL+cdTXazdNe4Y8XBerZl6yJcgL7X2P T4NDEPBBzw6aeqBo+SoXsYMsgFewOPKugFws4D+gKtNoEFGQ4BS/pLdDwW064giXV7 sdbvAv4/F0dPoVhQNeP5hgbzNd5Mlh5UnLlqCO2WOEfA+ZpBCK3/RFaFX2KnoS+cCL 4Ihfxfm945VVg== Subject: Re: [dpdk-dev] [PATCH v3 1/4] ethdev: add a field for rxq info structure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Chengchang From: Chengchang Tang: > Hi Matan >=20 > On 2020/9/6 21:45, Matan Azrad wrote: > > > > Hi Chengchang > > > > From: Chengchang Tang: > >> Hi, Matan > >> > >> On 2020/9/2 18:30, Matan Azrad wrote: > >>> Hi Chengchang > >>> > >>> From: Chengchang Tang > >>>> Hi, Matan > >>>> > >>>> On 2020/9/2 15:19, Matan Azrad wrote: > >>>>> > >>>>> Hi Chengchang > >>>>> > >>>>> From: Chengchang Tang > >>>>>> Hi, Matan > >>>>>> > >>>>>> On 2020/9/1 23:33, Matan Azrad wrote: > >>>>>>> > >>>>>>> Hi Chengchang > >>>>>>> > >>>>>>> Please see some question below. > >>>>>>> > >>>>>>> From: Chengchang Tang > >>>>>>>> Add a field named rx_buf_size in rte_eth_rxq_info to indicate > >>>>>>>> the buffer size used in receiving packets for HW. > >>>>>>>> > >>>>>>>> In this way, upper-layer users can get this information by > >>>>>>>> calling rte_eth_rx_queue_info_get. > >>>>>>>> > >>>>>>>> Signed-off-by: Chengchang Tang > > >>>>>>>> Reviewed-by: Wei Hu (Xavier) > >>>>>>>> Acked-by: Andrew Rybchenko > >>>>>>>> --- > >>>>>>>> lib/librte_ethdev/rte_ethdev.h | 2 ++ > >>>>>>>> 1 file changed, 2 insertions(+) > >>>>>>>> > >>> So the user can configure X and the driver will use Y!=3DX? > >> > >> Yes, it depends on the HW. In the queue setup API, it just checks > >> whether the input is greater than the required minimum value. But HW > >> usually has requirements for alignment and so on. > >> So when X does not meet these requirements, PMDs will calculate a new > >> value Y that meets these requirements to configure the hardware (Y <= =3D > >> X, to ensure no memory overflow occurs). > >>> Should the application validate its own configurations after setting > >>> them > >> successfully? > >> > >> It depends on their own needs. The application should not be forced > >> to verify it to avoid affecting the ease of use of PMDs. For some > >> applications, they don't care about this value. > > > > I understand, > > It looks me like a bad ping-pong between app and PMD (for all the > > fields in the struct), And we should avoid adding fields to this struct= ure if > we can. > > > > What's about adding field in rte_eth_dev_info to expose the rx buffer > alignment supported by the PMD? > > Then, application has all the knowledge you want to expose before the > configuration. >=20 > This may not work because there may be other restrictions besides > alignment, which are related to the hardware design. Therefore, it is dif= ficult > to describe all constraints in a single field. > Moreover, this approach seems to > constrain the PMDs and HW to some extent. Ok, so maybe other ethdev capability API to get the Rx buffer size adjustme= nt by the PMD? Don't you think it is important information to the application in order to = decide the mempool buffer size \ enabling scatter? In any case, I think you should add documentation in the RX setup API that = the HW buf size may be changed by the PMD.